diff --git a/.github/workflows/agw-sdk-validation.yml b/.github/workflows/agw-sdk-validation.yml new file mode 100644 index 00000000..67a23a41 --- /dev/null +++ b/.github/workflows/agw-sdk-validation.yml @@ -0,0 +1,71 @@ +name: AGW SDK validation (unfunded) +on: + pull_request: + paths: + [ + 'packages/core/**', + 'tsconfig.base.json', + 'yarn.lock', + '.github/workflows/agw-sdk-validation.yml', + ] + workflow_dispatch: + inputs: + contracts: + description: 'Run contract suites and full API checks (slower)' + type: boolean + default: false +permissions: + contents: read +concurrency: + group: agw-validation-${{ github.ref }} + cancel-in-progress: true +jobs: + validate: + runs-on: ubuntu-latest + timeout-minutes: 30 + env: + NX_DAEMON: 'false' + YARN_ENABLE_HARDENED_MODE: '1' + AGW_REPO: ${{ github.workspace }}/.ci-contracts + steps: + - uses: actions/checkout@v5 + with: + persist-credentials: false + - uses: actions/checkout@v5 + if: github.event_name == 'workflow_dispatch' && inputs.contracts + with: + repository: pushchain/push-agentic-wallets + ref: ffd567d3e49b2d27c6f50ad36093274dbac3090f + path: .ci-contracts + persist-credentials: false + - uses: actions/setup-node@v6 + with: + node-version: '24.18.0' + package-manager-cache: false + - uses: foundry-rs/foundry-toolchain@v1 + if: github.event_name == 'workflow_dispatch' && inputs.contracts + with: + version: v1.5.1 + - run: corepack enable + - uses: actions/cache@v4 + with: + path: .yarn/cache + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: ${{ runner.os }}-yarn- + - run: yarn install --immutable + - name: SDK tests, types, build and package checks + if: github.event_name != 'workflow_dispatch' || !inputs.contracts + run: node packages/core/scripts/agw-verify.js --sdk-only + - name: Full unfunded contract and SDK checks + if: github.event_name == 'workflow_dispatch' && inputs.contracts + env: + AGW_LOCAL_DIR: ${{ runner.temp }}/agw-v6-build + AGW_ALLOW_COMPILER_DOWNLOAD: '1' + run: node packages/core/scripts/agw-verify.js + - uses: actions/upload-artifact@v4 + if: always() + with: + name: agw-unfunded-validation + path: .agw-validation/ + include-hidden-files: true + if-no-files-found: ignore diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a4794fe4..e4e2eee7 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -25,6 +25,7 @@ on: - cross-chain - read - known-fail + - agw dry_run: description: 'Pre-flight only — report balances, fund nothing, run no tests' required: true diff --git a/.gitignore b/.gitignore index 20499081..5cd47d8e 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,7 @@ e2e-logs/ /packages/core/outbound-test-logs /packages/core/__e2e__/graphify-out /graphify-out +.agw-validation/ +.ci-contracts/ +.agw-runtime-validation/ +/plan/agw/research/native-multi-action-e2e-2026-10-12/logs diff --git a/packages/core/.eslintrc.json b/packages/core/.eslintrc.json index 4096b286..cc65fded 100644 --- a/packages/core/.eslintrc.json +++ b/packages/core/.eslintrc.json @@ -23,6 +23,9 @@ { "ignoredFiles": [ "{projectRoot}/eslint.config.{js,cjs,mjs}", + "{projectRoot}/scripts/check-agw-docs.js", + "{projectRoot}/scripts/check-agw-package.js", + "{projectRoot}/scripts/check-agw-api.js", "{projectRoot}/**/*.spec.ts" ], "ignoredDependencies": [ diff --git a/packages/core/AGW.md b/packages/core/AGW.md new file mode 100644 index 00000000..d2d28b64 --- /dev/null +++ b/packages/core/AGW.md @@ -0,0 +1,350 @@ +# Agentic wallets on Push Chain + +This branch implements the SDK-only October 12 feedback against the deployed Donut v6 contracts. The runtime targets v6 only; existing v5 wallets are not silently adapted. + +## Connect + +Use an application-managed key; examples do not load secrets or execute automatically. + +```ts +import { + PushChain, + AgenticError, + AgenticRevertError, + type AuthoredRule, + type Rule, +} from '@pushchain/core'; +import { + createWalletClient, + http, + parseEther, + encodeFunctionData, + erc20Abi, + type Address, + type Hex, +} from 'viem'; +import { privateKeyToAccount } from 'viem/accounts'; + +type WalletTransaction = Awaited>; + +const NETWORK = PushChain.CONSTANTS.PUSH_NETWORK.TESTNET_DONUT; +const PUSH = PushChain.CONSTANTS.CHAIN.PUSH_TESTNET_DONUT; +const SEPOLIA = PushChain.CONSTANTS.CHAIN.ETHEREUM_SEPOLIA; +const ETH = PushChain.CONSTANTS.MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.ETH; + +async function connectPush(key: Hex, wallet?: Address): Promise { + const walletClient = createWalletClient({ + account: privateKeyToAccount(key), + transport: http('https://evm.donut.rpc.push.org/'), + }); + const signer = await PushChain.utils.signer.toUniversalFromKeypair( + walletClient, + { chain: PUSH, library: PushChain.CONSTANTS.LIBRARY.ETHEREUM_VIEM }, + ); + return PushChain.initialize(signer, { + network: NETWORK, + ...(wallet ? { agenticWallet: wallet } : {}), + }); +} +``` + +## Create and manage rules + +Every chain uses `Rule.allowedCalls`. Omit `chainNamespace` for Push. The agent is always its Push address: a native EOA or an external signer's UEA. The owner cannot be its own agent. + +```ts +async function createNative(owner: PushChain, agent: Address, token: Address, recipient: Address) { + const rule: Rule = { + agent, + validUntil: Math.floor(Date.now() / 1000) + 3600, + allowedCalls: [{ + target: token, + selector: 'transfer(address,uint256)', + pins: [{ arg: 0, expected: recipient }, { arg: 1, max: 10n }], + }], + }; + return owner.agentic.create('operations', { rules: [rule] }); +} + +async function manage(owner: PushChain, address: Address, id: Hex) { + const wallet = owner.agentic.wallet(address); + const record = await wallet.rules.get(id); + // Reads preserve the constraints needed by update. + const changed = await wallet.rules.update({ + rules: [{ rulesId: id, rule: { ...record.rule, validUntil: record.validUntil + 3600 } }], + }); + await wallet.setLabel('renamed'); // direct cosmetic write; no checkpoint + await wallet.rules.delete([changed.rules[0].rulesId]); + // Delete all requires an explicit target: + // await wallet.rules.delete({ all: true }); + return wallet.info(); +} +``` + +`derive({ index? })` returns the predicted address, index and deployment state. `list()` enumerates the connected owner's wallets. A wallet handle provides `info`, `owner`, `checkpoints`, `setLabel`, and `rules.list/get/add/update/delete`. Deleted rules are not returned in v1. Rule IDs may change during update. + +`create` and `rules.add` reject a duplicate agent/chain pair with `DUPLICATE_RULE`. Put several permitted calls in the same rule. Existing overlapping grants can still cause `AMBIGUOUS_RULE` when sending; the owner must resolve the overlap. The contract validates every actual agent call. + +On deployed v6, native rules allow at most **eight** calls, eight equality/maximum pins per call. Public native lifetime budgets, `maxCalls`, `amount`, single-call shorthand and `actions[]` are retired. Native value and call counters accumulate for reporting and atomic updates. A v6 MAX pin only bounds an individual call and does not increment amountSpent; that counter belongs to the separate internal amount meter. + +## Pins and zero defaults + +An equality pin fixes an argument; a maximum pin bounds it. For EVM signatures, `arg` is a zero-based static argument position. With a raw four-byte selector, it is a 32-byte ABI head-word position. Reads return a raw selector and these word positions. For full signatures, a path such as `arg: [0, 3]` selects a field within a static tuple or fixed array. Dynamic layouts fail explicitly. Reads retain exact word positions rather than guessing missing ABI metadata. + +`PushChain.CONSTANTS.AGENTIC.WALLET` resolves to the AGW on Push, its CEA on an EVM destination, or its CEA/selected token ATA on Solana. Deployment addresses and encoding helpers are internal. + +For directly authored rules, omitted `maxValue`, `assets[].maxTotal`, and `maxGasPerCall` default to **zero**. Presets supply explicit policy values as described below. Asset totals meter tokens sent from Push; they do not meter trading or lending using capital already in the destination CEA. Specify positive caps for sends that need value, tokens or destination gas. Native value is limited per call; there is no public native lifetime-total cap. + +## EVM destinations + +```ts +function evmRule(agent: Address, target: Address): Rule { + return { + agent, + chainNamespace: SEPOLIA, + validUntil: Math.floor(Date.now() / 1000) + 3600, + assets: [{ token: ETH, maxPerCall: 1_000n, maxTotal: 10_000n }], + maxGasPerCall: parseEther('20'), + allowedCalls: [{ + target, + selector: 'deposit(address,uint256)', + pins: [{ arg: 0, expected: PushChain.CONSTANTS.AGENTIC.WALLET }], + }], + }; +} +``` + +The deployed v6 policy supports up to eight EQ/MAX pins per EVM destination call and 32 across the rule. Multiple entries for the same target/function are alternatives; every constraint in one entry must pass. The SDK rejects a bare alternative beside a pinned one because it would bypass the pins. + +When the caller omits destination `gasLimit`, a fresh EVM CEA gets a 2,000,000 gas default to cover first-use deployment. An existing CEA uses the normal quote default. An explicit caller value is preserved. The rule's gas/value caps still apply. + +## Displaying errors in the UI + +Use `userMessage` for `AgenticError` and `AgenticRevertError`. Keep `code`, `message`, `hint`, `details`, `decodedError` and `cause` for diagnostics or application-specific translations. Unknown exceptions should get a neutral fallback instead of raw RPC/ABI text. + +```ts +function walletErrorText(error: unknown): string { + if (error instanceof AgenticError || error instanceof AgenticRevertError) { + return error.userMessage; + } + return 'The request could not be completed. Check wallet activity before trying again.'; +} +``` + +Creation and rule-preparation errors include a zero-based `details.ruleIndex` when a rule can be identified, with `assetIndex`, `callIndex` and `field` where available. The UI message uses a one-based rule number. Use these details to show the error on the relevant rule instead of only in a footer. Read/receipt failures preserve their causes and transaction hashes; do not automatically retry a submitted transaction whose outcome is unknown. + +`TOKEN_ROUTE_UNAVAILABLE` means an asset cannot be resolved for transfers from Push. Choose a token with a supported route on this network, or wait for a verified PRC20 route for that exact token address. Changing a symbol does not create a route. Display `error.userMessage`. + +A DEX condition-limit failure reports `details.reason = 'RULE_CONSTRAINT_LIMIT'`, `actual`, `limit` and `callCount`. Conditions here are generated input checks (for example token, recipient and amount checks), rather than the number of visible function names. A stock DEX preset contains eight allowed-call entries and twenty-one conditions. Appending the same call list again makes forty-two conditions. The SDK rejects this; it does not deduplicate, remove conditions or split authority automatically. Preserve per-chain rules and regenerate after edits rather than appending generated calls. + +For the review screen, show the actual network (including testnet name), selected token addresses and limits. Label maxGasPerCall as a maximum PC gas budget, not a guaranteed fee or execution gas-unit count. maxTotal meters cumulative Push outbounds, including outbounds whose destination execution later fails; it is not a lifetime destination-spend limit. Destination pins and maxValue limit each call separately. + +## Solana destinations + +Rules use fixed-width signatures and numeric positions, without an IDL: + +```ts +function solanaRule(agent: Address, program: string): Rule { + return { + agent, + chainNamespace: PushChain.CONSTANTS.CHAIN.SOLANA_DEVNET, + validUntil: Math.floor(Date.now() / 1000) + 3600, + maxGasPerCall: parseEther('20'), + allowedCalls: [{ + target: program, + selector: 'receive_sol(u64)', + pins: [ + { account: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }, + { arg: 0, max: 1_000n }, + ], + }], + }; +} +``` + +Use the program's actual account positions. `{ account, expected: WALLET, token: mint }` pins the wallet's ATA, using the verified mint/token-program context. Fixed integer, bool, pubkey and fixed-array layouts are supported; dynamic or undefined layouts fail before signing. Raw eight-byte discriminators support account pins; argument pins also need argument types. A nonzero per-call EVM `maxValue` has no Solana encoding. + +Solana reads return `format: 'decoded'` with exact stored discriminators, offsets and constraints. This raw form is accepted by `rules.update`, preserving restrictions without inventing an IDL. Reusing it for another wallet/gateway is rejected. A decoded rule with a data pin counted from the end of the instruction data (`fromEnd: true`) is refused on create/add/update (`INVALID_RULE`, `details.reason = 'FROM_END_PIN_UNSUPPORTED'`): the deployed SvmRulebook does not tie the instruction-data length to the rule, so appended bytes could shift such a pin. Existing rules with these pins still read normally. Send-data encoding still uses the existing `utils.helpers.encodeTxData` IDL helper; rule authoring and transaction encoding are separate operations. + +## Spend, checkpoints and execution + +`rules.get/list` return `spent`. Universal spend contains one entry per asset in stored order. A single native call has scalar value/amount/call counters. Several native calls return `spent.actions`, with each entry identified by target and selector; unrelated token amounts are not summed. + +Native historical terms with lifetime limits or differing per-action expiries that the new public shape cannot preserve return an explicit capability error rather than silently dropping restrictions. + +Connect with `PushChain.initialize(signer, { agenticWallet: address })` to send from the wallet. Signer identity determines the owner or agent door. Native agent arrays are atomic and every call passes policy checks. `from` cannot be overridden. Responses identify the wallet as `from` and signer as `origin`, including wait/replay results. + +Updates assert existing spend, delete the old rule and grant its replacement atomically. Native updates assert each action separately: a rule with N native actions records N+4 checkpoints on current v5. Agent execution records no owner checkpoint. Direct `setLabel` records none. + +## V6 deployment and creation + +The runtime uses factory `0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc` and URP `0xBA32e7A1500cb34311a31127bcD40CA52C8CFd36`, from source `ffd567d`. URP still reports 3.1.0; verified deployment wiring and the v6 ABI identify the supported generation. + +`create` uses one index-bound `createWalletWithSig` call from the owner's Push identity, with the contract's owner-caller empty-signature path. The wallet and up to eight initial rules are committed atomically. A concurrent slot change returns INDEX_RACE; a receipt-read failure retains the submitted hash for recovery. CREATE_PARTIAL is removed. No sequential creation fallback exists. + +For outbound sends on either door, the wallet approves the gateway inside the transaction after policy authorization, executes the outbound, and clears remaining allowance. No separate approval or SDK allowance check is needed; GATEWAY_ALLOWANCE_INSUFFICIENT is removed. Approval/cleanup uses the contract's best-effort token calls. To stop an agent, delete its rules; clearing the gateway allowance does not disable an otherwise valid rule. + +The wire encoder uses uint32 maximum for unlimited native calls and 255 for unspecified Solana account count. Neither uses the retired zero sentinel. The envelope remains version 1. Existing v5 wallets and addresses do not become v6 wallets. + +`rules.delete` is the public name; on-chain `revokeRules` names/events remain unchanged. Revert errors retain decoded details and cause. Core transaction response fields used by other SDK routes are not globally removed. + +## Preset discovery and templates (section 7) + +`PushChain.utils.agentic` contains `presets.list/get`. The categories are `AGENTIC.PRESETS.CATEGORY.DEXES`, `LENDING` and `STAKING`. The catalog contains only presets that ran live on the Donut testnets: + +- DEXES: Uniswap V3 on Sepolia, Base Sepolia and Arbitrum Sepolia. +- LENDING: Aave V3 on Sepolia, Base Sepolia and Arbitrum Sepolia. +- STAKING: no entries yet. Hide categories with empty `chains` lists. + +Every preset sends only native ETH from Push. The agent wraps it into WETH on the destination chain as the first call of the same transaction, then uses the app. Because native ETH is routed to every listed chain, every listed preset can be created; there is no readiness report to check. + +```ts +const { presets } = PushChain.utils.agentic.presets.list({ type: 'CATEGORY' }); +const availablePresets = presets.filter(preset => preset.chains.length > 0); +const { rules: reviewTemplates } = PushChain.utils.agentic.presets.get( + PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.DEXES, +); +// Each rule sends native ETH from Push with the SDK's limits, a 20 PC gas +// ceiling and a seven-day expiry. Supply the agent to get complete Rule[]. +const configuredPreset = PushChain.utils.agentic.presets.get( + PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.LENDING, + { chainNamespace: 'eip155:11155111', agent: '0x0000000000000000000000000000000000001234' }, +); +// Pass configuredPreset.rules directly to create. + +function filledPreset(agent: Address, maxPerCall: bigint, maxTotal: bigint) { + return PushChain.utils.agentic.presets.get( + PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.DEXES, + { + chainNamespace: 'eip155:84532', + agent, + validUntil: Math.floor(Date.now() / 1000) + 3600, + assets: [ + { token: PushChain.CONSTANTS.MOVEABLE.TOKEN.BASE_SEPOLIA.ETH, maxPerCall, maxTotal }, + ], + }, + ); +} +``` + +`get` returns `{ rules }`, one rule per chain, in the shape `create` takes. With an agent supplied, `rules` is typed as `Rule[]`; otherwise it is `PresetRuleTemplate[]` with a generated expiry and missing agent. An omitted gas budget uses the preset policy; an explicit zero remains zero. + +### What each preset allows + +Caps marked "ETH cap" equal the ETH asset's `maxPerCall`, in wei. + +| Preset | Allowed calls | +| --- | --- | +| DEXES | `WETH.deposit()` with `maxValue` = ETH cap; `WETH.approve(router, ≤ ETH cap)`; `exactInputSingle`/`exactOutputSingle` WETH → USDC with WETH and USDC pinned, recipient = wallet and input ≤ ETH cap; `USDC.approve(router, ≤ 10 USDC)`; the same two swaps USDC → WETH with input ≤ 10 USDC; `WETH.withdraw(≤ ETH cap)` to unwrap | +| LENDING | `WETH.deposit()` with `maxValue` = ETH cap; `WETH.approve(pool, ≤ ETH cap)`; Aave `supply`, `withdraw`, `borrow`, `repay` with the asset pinned to the reserve WETH, the beneficiary pinned to the wallet and the amount ≤ ETH cap; `WETH.withdraw(≤ ETH cap)` | + +| Network | Uniswap router | DEX WETH / USDC | Aave pool | Aave WETH reserve | +| --- | --- | --- | --- | --- | +| Sepolia | `0x3bFA…Ae48E` | canonical WETH `0xfff9…6B14` / Circle USDC `0x1c7D…7238` | `0x6Ae4…8951` | Aave WETH `0xC558…9c3c` | +| Base Sepolia | `0x94cC…2bc4` | WETH `0x4200…0006` / Circle USDC `0x036C…CF7e` | `0x8bAB…aE27` | WETH `0x4200…0006` | +| Arbitrum Sepolia | `0x101F…663E` | WETH `0x980B…7c73` / Circle USDC `0x75fa…AA4d` | `0xBfC9…2Eff` | Aave WETH `0x1dF4…053D` | + +Each router's `WETH9()` is the DEX WETH it pins. Circle USDC is the only token with WETH liquidity on these Uniswap deployments; it is used only on the destination chain and is never sent from Push. The fee tier is not pinned: testnet pools are thin and often mispriced (on Arbitrum Sepolia the 0.05% pool returns nothing for small swaps), so an agent should pick the tier from a QuoterV2 quote. Testnet tokens with similar names can have different addresses; the returned addresses are authoritative. Templates describe permissions, not available liquidity or guaranteed execution. Presets do not sign, fetch app ABIs or modify wallets. + +### Limits and overrides + +| Setting | Default | +| --- | --- | +| ETH per Push outbound and per allowed call | 0.001 ETH | +| ETH sent from Push in total | 0.01 ETH | +| USDC per swap on the destination chain | 10 USDC (fixed in the returned rule) | +| Gas ceiling | 20 PC per outbound | +| Expiry | seven days from the get call | + +Pass `assets` to set the ETH limits. Each selected chain needs exactly one native ETH asset, written as the zero address or the chain's `MOVEABLE.TOKEN..ETH`, with positive `maxPerCall` and `maxTotal`. A non-ETH token, a missing or zero limit, an empty array or a selected chain without an asset throws `INVALID_RULE`. Assets must name their chain unless a single chain filter is supplied. Call `get` again after changing a limit: the wrap value, approvals and operation pins all follow `maxPerCall`. To change the 10 USDC swap limit, edit the returned rule before `create`. + +The 20 PC gas ceiling is not a flat fee or a reservation. Actual sends obtain a fresh quote and remain subject to the rule cap; unused destination gas is refunded. + +### Configure and regenerate + +```ts +async function createConfiguredDex( + client: PushChain, agent: Address, maxPerCall: bigint, maxTotal: bigint, +) { + const configured = filledPreset(agent, maxPerCall, maxTotal); + return client.agentic.create('My DEX agent', { rules: configured.rules }); +} + +async function replaceConfiguredDex( + client: PushChain, wallet: Address, rulesId: Hex, + agent: Address, maxPerCall: bigint, maxTotal: bigint, +) { + // Re-run get after editing limits so every cap in allowedCalls follows them. + const configured = filledPreset(agent, maxPerCall, maxTotal); + return client.agentic.wallet(wallet).rules.update({ + rules: [{ rulesId, rule: configured.rules[0] }], + }); +} +``` + +Save the preset category and editable inputs in the UI if subsequent edits should regenerate the preset. On-chain rules do not retain preset provenance or display metadata. A regenerated result is a replacement: do not append it to the old allowedCalls. An update creates a new rulesId and resets counters, as documented above. + +### Enforcement scope + +**A per-call limit applies to each allowed contract call, not the sum of several calls in one transaction. `maxTotal` is the cumulative Push-outbound amount, including outbounds whose destination execution later fails; it is not lifetime turnover on the destination.** These statements also hold for tokens already in the wallet's destination account, such as USDC from an earlier swap. Destination lifetime or batch-total accounting requires contract support. + +The contract allows at most 32 pins across a universal rule. A DEX preset uses 8 calls and 21 pins, and a LENDING preset 7 calls and 15 pins. Expansion fails explicitly if an edited rule exceeds the ceiling; no restrictions are silently dropped. Custom rules remain possible through the normal rule API. + +## Validation + +Run `node packages/core/scripts/check-agw-docs.js` to typecheck these examples. Unit tests use the normal core Jest configuration. `jest.agw-local.config.ts` uses pinned real AGW contracts and a stub gateway. Live E2Es are opt-in under `__e2e__/agw`; preflight verifies the deployment and funding limits. Local tests do not prove destination delivery, and historical live results do not count as validation of a changed public API. + + +### Live preset acceptance + +The opt-in `agw-presets-acceptance` group runs all six shipped presets on Donut. From `packages/core`, run `npm run e2e:preflight -- --group agw-presets-acceptance --dry-run`, then `npm run e2e:ci -- --group agw-presets-acceptance`. Each case passes the returned `rules` unchanged to `create`, reads back every asset, cap, function and pin, then has the agent send ETH twice (first use and subsequent) with `[deposit, approve, swap or supply]`. It checks destination success, the resulting USDC or aToken balance and the recorded ETH spend. The owner needs the chain's gas PRC20 (pETH, pETH_BASE or pETH_ARB) for two bounded sends; each case funds a fresh wallet with 50 PC. No mainnet transaction is part of this group. + +AGW token resolution uses the destination chain for ordinary token objects: an explicit Base or Arbitrum ETH token must not select Sepolia's PRC20 merely because its symbol/address is identical. An explicit Push PRC20 reference must name the same source chain as the destination; a mismatch fails before signing. + +### Creation UI: apps, tokens and preset availability + +**Tokens without an app.** On an EVM network, a rule with ERC20 assets and no `allowedCalls` (omitted or `[]`) lets the agent transfer each token only back to the owner. The SDK adds one `transfer(address,uint256)` call per token, pinned to the owner's own EVM address and capped at that asset's `maxPerCall`. The owner's address is the Push EOA, or the EVM address the owner's account comes from. `transferTo` names more recipients, one more call per token each; the owner stays included. + +```ts +const tokensOnly: AuthoredRule = { + agent: '0x0000000000000000000000000000000000001234', + chainNamespace: 'eip155:11155111', + validUntil: Math.floor(Date.now() / 1000) + 7 * 86400, + assets: [ + { + token: PushChain.CONSTANTS.MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, + maxPerCall: BigInt(10_000_000), + maxTotal: BigInt(100_000_000), + }, + ], + // Optional: also allow transfers to this address. + transferTo: ['0x0000000000000000000000000000000000005678'], +}; +``` + +The per-transfer limit can be repeated until the rule expires, so the agent can move the token's whole balance in the destination account, including tokens already there, but only to these recipients. Refused with `INVALID_RULE` and a `details.reason`: + +- `TOKENS_ONLY_NATIVE`: native ETH or BNB in such a rule (a rule cannot allow a plain coin transfer). +- `TOKENS_ONLY_UNSUPPORTED`: a Solana rule without an app, or `transferTo` outside EVM. +- `TRANSFER_RECIPIENT_REQUIRED`: an owner whose account comes from Solana and no `transferTo`. +- `TRANSFER_TO_WITH_CALLS`: `transferTo` together with allowed functions; add the transfer as an allowed function instead. + +A Push-chain rule, or an EVM rule with neither assets nor functions, still returns `ALLOWED_FUNCTION_REQUIRED`. A Push-chain rule allows at most eight functions; other networks allow 32. + +**All supported tokens.** `assets: [{ token: PushChain.CONSTANTS.MOVEABLE.TOKEN..ALL }]` expands, when the rule is prepared, to every token Push can send to that chain, each with its default limit (10 per send and 100 in total for USDC, USDT and DAI; 0.001 and 0.01 for ETH, WETH and stETH; 0.01 and 0.1 for BNB and SOL). The Circle USDC route and the routed mock USDC are separate tokens and are both listed. Tokens added to Push later are not included in an existing rule. `ALL` takes no limits (`ALL_WITH_LIMITS`); a token listed next to it replaces its default entry. Without an app, `ALL` leaves native ETH/BNB out, so the rule transfers every routable ERC20 back to the owner. Use `PushChain.utils.agentic.assets.all(chainNamespace)` to show the expanded list and its limits before signing. + +`assets: []` still grants no transfers from Push; it never means all tokens. Allowed calls may still interact with destination-held assets under their configured constraints. A rule holds at most eight assets. + +Every listed preset can be created; there is no readiness check. Do not substitute a routed token solely because its symbol matches: the protocol must support that exact address, and swaps need compatible liquidity. + +### Exact-preset acceptance and gas evidence + +Read-only compatibility checks are available with `node packages/core/scripts/check-agw-preset-compatibility.js /tmp/compatibility.json` after building core. For every preset chain it simulates `deposit()` on the wrap target with native value, checks that the router wraps into that WETH and that Uniswap's QuoterV2 returns USDC for a dust swap at some fee tier, and that the Aave pool lists the WETH reserve. RPC and read errors are recorded and fail the check; they are never reported as compatibility. `node packages/core/scripts/check-agw-route-registry.js /tmp/registry.json` compares the SDK's routes with the Push node's token registry (uregistry): it fails on a mismatched or SDK-only route and lists enabled node routes the SDK does not resolve. + +`maxGasPerCall` is an owner-authorized ceiling on the PC attached to each outbound. The send-time `gasLimit` is a different field: the multiplier for the destination gas price. Omitted or zero uses the network base (500,000 on the EVM testnets, 960 on Solana devnet). Agent EVM sends without an explicit gasLimit instead use 2,000,000 on first use (the destination account is deployed), and 1,000,000 when they export a non-native token or make more than one destination call. A Sepolia Circle USDC export with approve and a Uniswap swap ran out of gas at the 500,000 base. An explicit value below the base is refused before quoting with `INVALID_RULE` and `details.minimum`. When omitted on Solana, the SDK raises the limit to cover finalization rent instead of using an EVM-style million-unit fallback. If a gas-price change leaves that budget short even after one re-quote, the send is refused before signing (`INCONSISTENT_READ`). + +The attached budget is at least $1 of PC: 10 PC at the fixed $0.10 rate used for Push-native agents, and less or more for agents signing from another chain, which are priced through that origin's Donut stable pool. It is never less than the current Push pool cost of the destination gas plus 20%. BNB testnet gas is valued at that pool rate, because no BNB/USD feed exists (the BSC gateway feed is ETH/USD). The gateway refunds unused PC in the same transaction. After the destination executes, the node also refunds unused destination gas, `(gasLimit − gasUsed) × gasPrice`, to the wallet as PC in a later Push transaction; this was verified on Donut for EVM and Solana. On October 20 the gas swaps actually consumed 0.0008-2.37 PC per send. 0.1 PC can never cover the minimum budget. The 20 PC preset ceiling covered the Sepolia, Base Sepolia, Arbitrum Sepolia and Solana devnet runs; BNB testnet first sends exceed it while Donut's BNB gas price is high. There is no cumulative gas cap; the wallet's PC balance is the only total limit. `node packages/core/scripts/check-agw-gas-quotes.js /tmp/quotes.json` records current quotes for Push-native and Sepolia-origin agents without signing. Quotes change; they are not fixed fees or a validated default for custom rules. + +The separate `agw-svm-agent-spl` group verifies the known devnet test harness's `receive_spl` instruction: wallet ATA pins, an amount ceiling, exact recipient credit and first/subsequent sends with omitted gas. It uses the existing counter program and does not certify a third-party Solana protocol. The gas evidence records Push transaction fees, attached quote budgets and destination fees separately. Run both new groups with the normal `__e2e__/ci/preflight.ts --group ...` and `__e2e__/ci/run.ts --group ...` commands. + +The `agw-gas` group measures first-use and subsequent native-token agent sends on Sepolia, Base Sepolia, Arbitrum Sepolia and BNB testnet using the existing counter fixtures. Its route/gas coverage is separate from protocol preset acceptance. diff --git a/packages/core/MARKETPLACE.md b/packages/core/MARKETPLACE.md new file mode 100644 index 00000000..3a5511e8 --- /dev/null +++ b/packages/core/MARKETPLACE.md @@ -0,0 +1,206 @@ +# Agentic marketplace and jobs + +This SDK checkpoint targets UniversalMarketplace v2 on Push Donut, its pUSDC kernel and AGW v6. It implements card management, JobSpec authoring and paid previews, preview/open, historical deposits and the kernel lifecycle. The evaluator is currently an EOA: there is no automatic verification, baseline or rating claim. + +`PushChain.initialize` now exposes `client.market` and `client.job`. Helpers are `PushChain.utils.market` and `PushChain.utils.job`; vocabulary is under `PushChain.CONSTANTS.AGENTIC`. There is no separate `client.evaluation` namespace. Read-only clients can discover cards and jobs. + +## Author a card + +Use verified application/token addresses and raw token units. The following helper returns permissions and a criteria template; it does not sign or send anything. + +```ts +import { PushChain, MarketError, type AgentCardInput, type AgentCardRules, type JobPlan, type JobWatchCursor, type MarketDepositResult, type PreviewJobSpecOptions } from '@pushchain/core'; +import { parseAbi, type Address } from 'viem'; + +function authorCard(app: Address, token: Address, receiptToken: Address) { + const { WALLET, PRINCIPAL, JOB } = PushChain.CONSTANTS.AGENTIC; + const read = PushChain.utils.job.prepareRead({ + chain: PushChain.CONSTANTS.CHAIN.BNB_TESTNET, + target: receiptToken, + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: [WALLET], + }); + const jobSpecTemplate = PushChain.utils.job.buildJobSpecTemplate({ + reads: [read], + checks: [{ read: 0, evaluation: JOB.EVALUATION.COMPARE, operation: JOB.OPERATION.GREATER_OR_EQUAL, target: { principalBps: 9990n } }], + logic: JOB.LOGIC.ALL, + allowedMutability: JOB.ALLOWED_MUTABILITY.NONE, + }); + const rules: AgentCardRules = { + assets: [{ token, maxPerCall: PRINCIPAL, maxTotal: PRINCIPAL }], + principalAsset: 0, + maxGasPerCall: 10n ** 18n, + allowedCalls: [ + { target: token, selector: 'approve(address,uint256)', pins: [{ arg: 0, expected: app }, { arg: 1, max: PRINCIPAL }] }, + { target: app, selector: 'supply(address,uint256,address,uint16)', pins: [{ arg: 0, expected: token }, { arg: 1, max: PRINCIPAL }, { arg: 2, expected: WALLET }] }, + ], + }; + PushChain.utils.market.validateAgentCardRules(rules); + return { rules, jobSpecTemplate }; +} +``` + +`client.universal.read.prepare(options)` is the same pure authoring helper. `client.universal.read(prepared, options?)` sends a resolved prepared call and returns raw consensus bytes. WALLET/PARAM holes must first be resolved; the sender rejects them before a paid request. Existing async `universal.prepareRead(subject, options)` remains the paid-request preparation API. They produce different representations. A literal zero is never guessed to be a placeholder. Dynamic-layout placeholders are refused. Descriptions retain ABI function names in memory when available and apply explicit token decimals while retaining raw targets; chain-decoded specs fall back to selectors and addresses. + +Cards name one execution chain and one provider. Destination tokens resolve to verified Push PRC20 routes on that chain. An explicit `{ prc20: address }` is available for already-known Push tokens and is returned by lossless rule decoding. No route or same-symbol alias is invented. Structural validation alone does not establish deployment or liquidity readiness. + +Approvals are **allowed calls with spender/amount pins** in v2. There is no separate `approvals[]` field or automatic owner-approval deposit step. Principal caps meter outbound tokens from Push; they are not a destination-lifetime trading budget. Spec comparisons use raw units; the receipt token must have the units expected by the criterion. + +## Register, preview and open + +```ts +async function registerOffer( + provider: PushChain, + listing: AgentCardInput, + app: Address, + token: Address, + receiptToken: Address, +) { + const authored = authorCard(app, token, receiptToken); + return provider.market.agent.register(listing, authored); +} + +async function openReviewedJob(owner: PushChain, cardId: bigint) { + const now = Math.floor(Date.now() / 1000); + const plan = await owner.market.preview(cardId, { + principal: 100_000_000n, + executeBy: now + 3600, + expiredAt: now + 86400, + }); + // Render every mayDo/mayMove/judgedBy entry and the logic before signing. + return owner.market.openJob(plan, { + progressHook: event => console.log(event.id, event.message), + }); +} +``` + +Opening deploys/reuses the AGW, grants the card's exact resolved permissions and creates an Open job. It moves no principal or fee. The plan is revalidated before signing; changed card versions, nonces, occupancy or plan content require a new preview. OwnerIntent authorization uses the factory EIP-712 domain. Client submission can require a second wallet interaction; no relay is supplied in this checkpoint. + +Opening supports EVM typed-data signers. An external owner's UEA must already be deployed on Push (`OWNER_NOT_DEPLOYED` otherwise). The SDK checks the factory domain before prompting, then simulates the complete signed request through the real owner verifier before broadcasting. UEA and ERC-1271 acceptance follows the deployed contract; an EIP-7702 delegate without a compatible verifier fails simulation. Signing capability checks run before prompting; a verifier can reject the resulting signature after prompting. Provider writes use the connected signer's ordinary Push identity, including when the instance also has an AGW execution context. + +```ts +async function recoverOpening(client: PushChain, reviewedPlan: JobPlan, txHash: string) { + const tx = await client.universal.trackTransaction(txHash); + return client.market.openJob(reviewedPlan, { resume: tx }); +} +``` + +If receipt lookup or post-state verification fails, keep the original plan and reported transaction hash. Resume verifies the mined input, event, permission ID, wallet ownership, kernel record and marketplace mappings without another signature or submission. A read-only client can recover an existing opening. Normal writes copy reviewed inputs before awaiting RPCs or wallet prompts. Provider registration/update also simulate the exact card write before submission. A reference ERC-1271 contract-owner adapter and compatible/incompatible EIP-7702 verifiers are exercised against real contracts in the local acceptance suite; custom wallets supply their own `UniversalSigner` transport. + +Native transport errors also retain `txHash` and, when confirmation is uncertain, `pendingTransactionHash` after broadcast. Atomic native sends never fall back to sequential calls after a hash exists. Track that hash before another attempt; a confirmed revert retains its hash without claiming that it is still pending. + +**Current destination readiness:** BSC Testnet has passing live open/cancel coverage. Sepolia, Base Sepolia and Arbitrum Sepolia have different CEA factories in the marketplace configuration and current SDK routing table; preview returns `CEA_MISMATCH`. The SDK does not substitute the marketplace's account for an independently derived account. Align the deployment/routing configuration before opening on those chains. + +Card IDs, versions, ratings and job IDs are bigint. `jobType` reads are the canonical bytes32 hash, not a guessed original name. `cards` walks IDs with bounded concurrency; summaries remain readable even if an unverified provider stored a malformed template. Full `card` decoding/preview rejects unsupported content. `agent.card`, `agent.update` and `agent.setActive` manage the provider's one card. Preserve raw `rulesBytes`/`jobSpecTemplateBytes` for archival rather than serializing away unknown wire metadata. + +## Fund and track the kernel lifecycle + +```ts +async function depositForJob(owner: PushChain, jobId: bigint): Promise { + return owner.market.deposit(jobId, { + // Target wallet PC balance, not a gas quote for the whole job. + pcAmount: 10n ** 18n, + funding: 'push', + progressHook: event => console.log(event.id, event.message), + }); +} +``` + +`deposit` recovers the original principal and card version from the opening event and historical card state. It never sizes an old job from today's updated card. It tops up wallet balances to the principal, original reference fee and PC target; a shared principal/fee token is combined before subtracting the balance. `providerFee` explicitly overrides the fee reserve and `pcAmount` overrides the PC target. The default PC target is one per-call card gas cap, not a promise that all job execution is covered. This operation leaves the kernel escrow Open and makes no destination approval calls: those are pinned permissions granted to the agent in v2. + +The default source is the connected signer's Push identity, even on an instance configured to execute through an AGW. `funding: 'origin'` explicitly uses normal inbound `funds` transfers for registered assets from the connected origin chain; required tokens without such a route fail before any leg is sent. PC still comes from the signer's Push holdings. The underlying gateway's normal route, liquidity, balance and fee checks apply. + +Steps are separate transactions. `DEPOSIT_INCOMPLETE` retains `details.txs`, any `details.pending` broadcast hash and chain, and the original cause. The same client remembers submitted steps; pass `resume: previousSteps` when continuing with another client. After restarting, rehydrate recorded hashes with `universal.trackTransaction(hash, { chain })` before passing their transaction responses. Pending receipts must settle before another transfer, and a confirmed transfer whose target balance has since fallen requires manual review. Concurrent deposits on the same client are rejected. Coordinate other clients and avoid running the agent during deposits. Deposits require an Open, unexpired job and an enabled permission with no recorded asset spend. When archive state is unavailable or updates share the opening block, the SDK recovers the version from registration/update events and canonical transaction input, checking emitted content hashes, fee and immutable card identity. If neither source can authenticate it, `HISTORY_UNAVAILABLE` stops the operation. + +```ts +async function priceAndFund(provider: PushChain, owner: PushChain, jobId: bigint) { + // First deposit the payment token, principal and PC appropriate to the job. + await (await provider.job.setBudget(jobId, 5_000_000n)).wait(); + // Explicitly pass the price the client reviewed; never silently accept a re-quote. + return owner.job.fund(jobId, { expectedBudget: 5_000_000n }); +} + +async function trackJob(client: PushChain, provider: PushChain, jobId: bigint) { + const stop = client.job.watch(jobId, event => console.log(event.kind)); + const job = await client.job.status(jobId); + await (await provider.job.submit(jobId, { deliverable: 'ipfs://deliverable' })).wait(); + stop(); + return job; +} +``` + +The kernel currently accepts pUSDC (`USDC.eth`, 6 decimals) only; explicit mismatching payment tokens are rejected. A card's providerFee is a reference price. For an unchanged marketplace card version, omitted expectedBudget uses that reference; plain jobs or changed card versions need an explicit reviewed amount. A zero-price job is valid. + +For AGW clients, fund verifies ownership, rule/provider identity and expiry, then batches any necessary ERC20 allowance change and escrow funding through the owner door. This allowance is distinct from the AGW's automatic gateway allowance. Plain-client allowance/fund batching requires a supported atomic signer transport; the SDK does not silently fall back to sequential acceptance. + +`status` reads the kernel and hook, retains binary description bytes, decodes supported v2 JobSpecs, and recovers deliverable from submission logs. `evaluation.available` is false for this manual/unverified evaluator profile; frozen/baseline/verdict data is not fabricated. Plain text descriptions may have no decoded JobSpec. `list` can filter client/provider/status; `watch` polls bounded event ranges, reports read errors, supports a starting block and returns a stop function. It is not an indexer or a reorg-finality service. + +```ts +function resumeJobEvents(client: PushChain, jobId: bigint, cursor?: JobWatchCursor) { + return client.job.watch(jobId, event => { + // Persist cursor only after your application handles the event. + if (event.kind !== 'Error') console.log(event.kind, event.cursor); + }, cursor ? { cursor } : { pollIntervalMs: 3000 }); +} +``` + +Each delivered event has an exact block/log cursor. Resuming excludes already delivered logs within the same block; duplicate RPC logs are delivered once. RPC failures retry the same range, consumer callback errors do not rewind delivery, and unsubscribe suppresses pending callbacks. A changed canonical cursor emits `WATCH_REORG` and stops; reload status and choose a reviewed restart block. + +```ts +async function stopOpenJob(owner: PushChain, jobId: bigint) { + // For marketplace AGWs, one owner batch rejects the Open job and revokes its recorded grant. + return owner.job.cancel(jobId); +} + +function marketplaceErrorText(error: unknown): string { + return error instanceof MarketError ? error.userMessage : 'Check transaction activity before retrying.'; +} +``` + +Cancellation is client-side Open-job rejection. It does not withdraw deposited wallet balances; those remain under the owner's existing transfer authority. A plain job has no marketplace grant to infer. Other terminal paths do not imply AGW permission revocation. `claimRefund` respects expiry/grace and remains available while the kernel is paused; a third party may trigger it, with funds returned to the recorded client. + +Plain jobs can use `job.create` with provider/evaluator/hook/expiry/paymentToken plus either binary jobSpec or text description. The kernel's Solidity string slot can carry binary JobSpec bytes; the SDK preserves them and retains the original createJob selector. + +## Paid criteria preview + +```ts +async function previewCriteria(client: PushChain, template: ReturnType['jobSpecTemplate'], wallet: Address) { + const options: PreviewJobSpecOptions = { + client, wallet, principal: 100_000_000n, + maxTotalFee: 10n ** 16n, + advanced: { timeout: 120_000 }, + }; + return PushChain.utils.job.previewJobSpec(template, options); +} +``` + +This prepares every raw read, checks the total callback/protocol fee cap, then executes through the existing universal-read registry (or an explicit `callback`). Native transaction gas is separate from `maxTotalFee`. A real SDK client derives destination CEAs for template wallet holes using its configured routes; `accounts` supplies explicit destination addresses when needed. An AGW's Push address is never substituted for its destination account. + +The result includes raw values, decoded fields, request responses and fees. `pass` and each check are `true`, `false`, or `null` (unknown). NUMBER and PERCENTAGE require an explicit per-read `baseline`; missing baselines, zero percentage denominators and unavailable reads stay unknown. A preview is an observation, not an automatic evaluator verdict or proof that a job is complete. Raw EVM calls are also available as `universal.read(target, { chain, callData })` and return consensus bytes. + +`PREVIEW_INCOMPLETE` retains all known request IDs and transaction hashes. Track uncertain submissions before retrying. Pass `resume: requestIds` (one per read, in order) to finish without new requests or payment. Resume checks each on-chain destination, call, pin and confirmation requirement before evaluating; unrelated reads are refused. `fees.newlyPaid` is zero on recovery, while `fees.paid` retains the original request deposits. A zero `maxTotalFee` is valid for recovery. + +## Explicit placeholders + +- `job.verify`, baseline/prefund/retry integration: no compatible automatic evaluator is configured. A different linked evaluator source has a different wire and enum values. +- Replacement JobSpecs, non-NONE marketplace criteria, recurring jobs and relay are unavailable. + +Unsupported paths throw before signing/sending. They do not return successful dummy results. Keep message, code, details and cause for diagnostics. + +## E2E validation + +From the repository root: + +```sh +# Real deployed stack on an isolated Anvil fork; no private keys or public-chain writes. +node node_modules/jest/bin/jest.js --config packages/core/jest.marketplace-local.config.ts --runInBand +# Read-only live Donut acceptance. +node node_modules/ts-node/dist/bin.js --compiler-options '{"module":"commonjs"}' packages/core/__e2e__/ci/run.ts --group marketplace +# Explicit funded smoke, using packages/core/.env: fresh provider/card/owner/wallet, then cancel/revoke/deactivate. +node node_modules/ts-node/dist/bin.js --compiler-options '{"module":"commonjs"}' packages/core/__e2e__/ci/run.ts --group marketplace-live +# Owned-token acceptance: actual deposits, native/AGW escrow and payouts, BSC-origin principal bridging. +node node_modules/ts-node/dist/bin.js --compiler-options '{"module":"commonjs"}' packages/core/__e2e__/ci/run.ts --group marketplace-funding +``` + +Marketplace groups stay out of the runner's default `all`. The basic live group spends bounded PC for gas/test wallets and read callbacks. The separate funding group uses owned test assets: 0.01 pUSDC per paid job, 0.01 USDT of bridged principal and up to 0.01 pBNB for source-gas setup. It cancels/revokes market jobs, completes plain jobs with a fresh controlled manual evaluator, returns principal/reserve/payout tokens and deactivates its card. The deployed marketplace evaluator remains unchanged. Pause/refund and signature variants use the local fork. The fork's UEA signature test uses a native submitter because Anvil has no Cosmos transport; live cases exercise actual external-owner transport. No automated verdict is implied by those results. Signature fixtures compile from repo-owned source at harness startup; Foundry and cached solc 0.8.26 are prerequisites. diff --git a/packages/core/README.md b/packages/core/README.md index e19eeebe..d65a3a00 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -8,6 +8,8 @@ Push Chain is a true universal L1 that is 100% EVM compatible. It allows develop ## Documentation +For AGW v5 in this branch, see the [agentic wallet integration guide](AGW.md) for creation, rules, funding, execution and recovery. + For full documentation, API references, and guides, visit: 👉 [Push Chain Developer Docs](https://push.org/docs) diff --git a/packages/core/__agw-local__/agw-local-advanced.spec.ts b/packages/core/__agw-local__/agw-local-advanced.spec.ts new file mode 100644 index 00000000..8dd9c360 --- /dev/null +++ b/packages/core/__agw-local__/agw-local-advanced.spec.ts @@ -0,0 +1,619 @@ +import { readNativeCounters } from '../__e2e__/shared/agw-state'; +/** + * Real-contract checks for the harder AGW paths (pinned v5 on anvil). + * The universal-outbound block drives the SDK's composer with a runtime whose + * CEA and fee quote are local stand-ins (no destination chain or price feeds + * exist here); URP still decides every gate on the composed request. + */ +import { + encodeAbiParameters, + encodeFunctionData, + getAddress, + keccak256, + parseAbi, + toBytes, + type Address, + type Hex, +} from 'viem'; +import { AgenticRevertError, CHAIN, type PushChain } from '../src'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../src/lib/agentic/errors'; +import { agenticSend } from '../src/lib/agentic/execution/send'; +import { updateRules } from '../src/lib/agentic/management/rules-write'; +import type { AgenticRuntime } from '../src/lib/agentic/runtime'; +import type { AgenticExecutionContext } from '../src/lib/agentic/context'; +import { buildSession, encodeEnvelope } from '../src/lib/agentic/codec/session'; +import { encodeUniversalTerms } from '../src/lib/agentic/codec/universal-terms'; +import { startHarness, type Harness } from './harness'; +const TARGET_ABI = parseAbi([ + 'function increment()', + 'function deposit(address beneficiary, uint256 amount) payable', + 'function lastBeneficiary() view returns (address)', + 'function counter() view returns (uint256)', +]); +const TOKEN_ABI = parseAbi([ + 'function mint(address to, uint256 amount)', + 'function balanceOf(address) view returns (uint256)', + 'function allowance(address,address) view returns (uint256)', + 'function approve(address,uint256) returns (bool)', + 'function totalSupply() view returns (uint256)', +]); +const GATEWAY_ABI = parseAbi([ + 'function outboundCount() view returns (uint256)', + 'function lastSender() view returns (address)', + 'function lastRequestHash() view returns (bytes32)', +]); +const CORE_ABI = parseAbi([ + 'function getOutboundTxGasAndFees(address,uint256) view returns (address,uint256,uint256,uint256,string,uint256)', +]); +type Internals = { + agenticRuntime: AgenticRuntime; + agenticContext?: AgenticExecutionContext; +}; +const internals = (c: PushChain) => c as unknown as Internals; +async function chainNow(h: Harness): Promise { + return Number((await h.publicClient.getBlock()).timestamp); +} +async function warp(h: Harness, seconds: number): Promise { + await h.publicClient.request({ + method: 'evm_increaseTime' as never, + params: [seconds] as never, + }); + await h.publicClient.request({ + method: 'evm_mine' as never, + params: [] as never, + }); +} +const fund = (h: Harness, to: Address, value: bigint) => + h.wallets[4].sendTransaction({ + to, + value, + account: h.wallets[4].account!, + chain: h.wallets[4].chain, + }); +describe('AGW advanced paths against real v6 contracts', () => { + let h: Harness; + let owner: PushChain; + let agentAddr: Address; + beforeAll(async () => { + h = await startHarness(18547); + owner = await h.client(0); + agentAddr = h.wallets[1].account!.address; + }); + afterAll(async () => { + await h?.stop(); + }); + describe('native pins, amount and value caps', () => { + let wallet: Address; + let agent: PushChain; + const beneficiary = getAddress( + '0x00000000000000000000000000000000000b0b0b' + ); + beforeAll(async () => { + const created = await owner.agentic.create('pins', { + rules: [ + { + agent: agentAddr, + validUntil: (await chainNow(h)) + 3600, + allowedCalls: [ + { + target: h.addresses.target, + selector: 'deposit(address,uint256)', + maxValue: BigInt(1000), + pins: [ + { arg: 0, expected: beneficiary }, + { arg: 1, max: BigInt(10) }, + ], + }, + ], + }, + ], + }); + wallet = created.wallet; + await h.publicClient.waitForTransactionReceipt({ + hash: await fund(h, wallet, BigInt(10) ** BigInt(18)), + }); + agent = await h.client(1, { agenticWallet: wallet }); + }); + const deposit = (to: Address, amount: bigint, value = BigInt(0)) => + agent.universal.sendTransaction({ + to: h.addresses.target, + value, + data: encodeFunctionData({ + abi: TARGET_ABI, + functionName: 'deposit', + args: [to, amount], + }), + }); + it('a pinned beneficiary and an in-cap amount pass', async () => { + await (await deposit(beneficiary, BigInt(5), BigInt(10))).wait(); + expect( + await h.publicClient.readContract({ + address: h.addresses.target, + abi: TARGET_ABI, + functionName: 'lastBeneficiary', + }) + ).toBe(beneficiary); + }); + it('a wrong beneficiary is rejected by URP with a decoded error and no state change', async () => { + const err = await deposit(agentAddr, BigInt(5)).catch((e) => e); + expect(err).toBeInstanceOf(AgenticRevertError); + expect(err.decodedError?.name).toBe( + 'PolicyCheckReverted(ArgPinMismatch)' + ); + const rec = await owner.agentic.wallet(wallet).rules.list(); + expect(rec.rules[0].spent).toMatchObject({ + kind: 'native', + amountSpent: BigInt(0), + callsUsed: 1, + }); + expect( + await readNativeCounters( + h.publicClient, + h.generation.addresses, + wallet, + rec.rules[0].rulesId + ) + ).toMatchObject({ amountSpent: BigInt(0), callsUsed: 1 }); + }); + it('per-call amounts are enforced and repeated valid calls remain usable', async () => { + await expect(deposit(beneficiary, BigInt(11))).rejects.toBeInstanceOf( + AgenticRevertError + ); + await (await deposit(beneficiary, BigInt(10))).wait(); + await (await deposit(beneficiary, BigInt(1))).wait(); + }); + it('the decoded native terms carry the pins and caps as stored', async () => { + const { rules } = await owner.agentic.wallet(wallet).rules.list(); + expect(rules[0].rule).toMatchObject({ + allowedCalls: [ + { + pins: [ + { + arg: 0, + expected: `0x${'0'.repeat(24)}${beneficiary + .slice(2) + .toLowerCase()}`, + }, + { arg: 1, max: BigInt(10) }, + ], + maxValue: BigInt(1000), + }, + ], + }); + }); + }); + describe('stale-spend replacement race', () => { + it('an agent spend between the read and inclusion reverts the whole replacement atomically', async () => { + const created = await owner.agentic.create('race', { + rules: [ + { + agent: agentAddr, + validUntil: (await chainNow(h)) + 3600, + allowedCalls: [ + { + target: h.addresses.target, + selector: 'increment()', + }, + ], + }, + ], + }); + const wallet = created.wallet; + const oldId = created.rulesIds[0]; + const agent = await h.client(1, { agenticWallet: wallet }); + const rt = internals(owner).agenticRuntime; + const cpBefore = await h.publicClient.readContract({ + address: wallet, + abi: parseAbi(['function checkpointCount() view returns (uint64)']), + functionName: 'checkpointCount', + }); + const racing: AgenticRuntime = { + ...rt, + reader: rt.reader, + execute: async (params, options) => { + // The agent spends after the SDK read the counters, before the owner's tx lands. + await ( + await agent.universal.sendTransaction({ + to: h.addresses.target, + data: encodeFunctionData({ + abi: TARGET_ABI, + functionName: 'increment', + }), + }) + ).wait(); + return rt.execute(params, options); + }, + }; + const err = await updateRules(racing, h.generation, wallet, { + rules: [ + { + rulesId: oldId, + rule: { + agent: agentAddr, + validUntil: (await chainNow(h)) + 3600, + target: h.addresses.target, + selector: 'increment()', + }, + }, + ], + }).catch((e) => e); + expect(err).toBeInstanceOf(AgenticRevertError); + // Nothing changed: the old rule is still the only enabled rule and no checkpoint landed. + const { rules } = await owner.agentic.wallet(wallet).rules.list(); + expect(rules.map((r) => r.rulesId)).toEqual([oldId]); + expect( + await h.publicClient.readContract({ + address: wallet, + abi: parseAbi(['function checkpointCount() view returns (uint64)']), + functionName: 'checkpointCount', + }) + ).toBe(cpBefore); + }); + }); + describe('expiry', () => { + it('an expired-but-enabled rule still identifies the agent; the send fails on-chain', async () => { + const created = await owner.agentic.create('expiring', { + rules: [ + { + agent: agentAddr, + validUntil: (await chainNow(h)) + 600, + allowedCalls: [ + { + target: h.addresses.target, + selector: 'increment()', + }, + ], + }, + ], + }); + await warp(h, 1200); + const agent = await h.client(1, { agenticWallet: created.wallet }); + const err = await agent.universal + .sendTransaction({ + to: h.addresses.target, + data: encodeFunctionData({ + abi: TARGET_ABI, + functionName: 'increment', + }), + }) + .catch((e) => e); + expect(err).toBeInstanceOf(AgenticRevertError); + expect(err.decodedError?.name).toBe('PolicyCheckReverted(RulesExpired)'); + }); + }); + describe('atomic create rollback', () => { + it('a rejected initial rule rolls back wallet creation and every grant', async () => { + const predicted = await owner.agentic.derive(); + // Chain time runs ahead of the local clock: the SDK accepts validUntil, the policy does not. + const skewedValidUntil = Math.floor(Date.now() / 1000) + 600; + await warp(h, 7200); + const err = await owner.agentic + .create('partial', { + rules: [ + { + agent: agentAddr, + validUntil: (await chainNow(h)) + 3600, + allowedCalls: [ + { + target: h.addresses.target, + selector: 'increment()', + }, + ], + }, + { + agent: h.wallets[3].account!.address, + validUntil: skewedValidUntil, + allowedCalls: [ + { + target: h.addresses.target, + selector: 'increment()', + }, + ], + }, + ], + }) + .catch((e) => e); + expect(err).toBeInstanceOf(AgenticRevertError); + expect(await owner.agentic.derive()).toEqual(predicted); + expect( + await h.publicClient.getCode({ address: predicted.address }) + ).toBeUndefined(); + }); + it('rules.add with several rules is one atomic owner batch: OWNER_ACTION + RULES_GRANTED per rule', async () => { + const created = await owner.agentic.create('multi-add', { rules: [] }); + const before = await h.publicClient.readContract({ + address: created.wallet, + abi: parseAbi(['function checkpointCount() view returns (uint64)']), + functionName: 'checkpointCount', + }); + const added = await owner.agentic.wallet(created.wallet).rules.add([ + { + agent: agentAddr, + validUntil: (await chainNow(h)) + 3600, + allowedCalls: [ + { + target: h.addresses.target, + selector: 'increment()', + }, + ], + }, + { + agent: h.wallets[3].account!.address, + validUntil: (await chainNow(h)) + 3600, + allowedCalls: [ + { + target: h.addresses.target, + selector: 'increment()', + }, + ], + }, + ]); + expect(added.rulesIds).toHaveLength(2); + expect(added.tx.atomic).toBe(true); + const { checkpoints } = await owner.agentic + .wallet(created.wallet) + .checkpoints({ sinceBlock: added.tx.blockNumber }); + expect(BigInt(checkpoints.length)).toBe(BigInt(4)); + expect(checkpoints.map((c) => c.kind)).toEqual([ + 'OWNER_ACTION', + 'RULES_GRANTED', + 'OWNER_ACTION', + 'RULES_GRANTED', + ]); + expect(before).toBe(BigInt(0)); + }); + }); + describe('agent EVM outbound (v6 multi-asset terms, stub gateway)', () => { + const SEPOLIA = CHAIN.ETHEREUM_SEPOLIA; + const CEA = getAddress('0x000000000000000000000000000000000000cea1'); + const destTarget = getAddress('0x00000000000000000000000000000000000d0d0d'); + let token: Address; + let wallet: Address; + let rulesId: Hex; + let runtime: AgenticRuntime; + let ctx: AgenticExecutionContext; + let ownerAgw: PushChain; + beforeAll(async () => { + token = await h.deploy(0, 'HarnessPRC20', 'HarnessFixtures.sol', [ + SEPOLIA, + 6, + ]); + const created = await owner.agentic.create('outbound', { rules: [] }); + wallet = created.wallet; + await h.write(0, token, TOKEN_ABI, 'mint', [wallet, BigInt(1000000)]); + await h.publicClient.waitForTransactionReceipt({ + hash: await fund(h, wallet, BigInt(10) ** BigInt(17)), + }); + // Fixture setup (raw owner call): grant a v6 multi-asset universal rule. + const terms = encodeUniversalTerms({ + validUntil: (await chainNow(h)) + 3600, + expectedCEA: CEA, + assets: [ + { token: token, maxPerCall: BigInt(1000), maxTotal: BigInt(1500) }, + ], + maxGasPerCall: BigInt(10) ** BigInt(16), + allowedCalls: [ + { + target: destTarget, + selector: '0xd09de08a', + pins: [], + beneficiaryOffset: 0, + hasBeneficiary: false, + maxValue: BigInt(0), + }, + ], + }); + const session = buildSession({ + validator: h.addresses.validator, + agent: agentAddr, + rulesPolicy: h.addresses.rulesPolicy, + actions: [ + { + target: h.addresses.gateway, + selector: '0x77b86bec', + initData: encodeEnvelope(SEPOLIA, terms), + }, + ], + }); + await h.write( + 0, + wallet, + h.generation.contracts.abis.wallet as never, + 'grantRules', + [session] + ); + [rulesId] = (await h.publicClient.readContract({ + address: h.addresses.engine, + abi: h.generation.contracts.abis.engine, + functionName: 'getPermissionIDs', + args: [wallet], + })) as Hex[]; + const agent = await h.client(1, { agenticWallet: wallet }); + ctx = internals(agent).agenticContext!; + const base = internals(agent).agenticRuntime; + runtime = { + ...base, + reader: base.reader, + resolveCEA: async () => ({ cea: CEA, isDeployed: false }), + resolvePrc20: () => token, + quoteOutbound: async (prc20, gasLimit) => { + const [, gasFee, protocolFee, , , gasLimitUsed] = + (await h.publicClient.readContract({ + address: h.addresses.universalCore, + abi: CORE_ABI, + functionName: 'getOutboundTxGasAndFees', + args: [prc20, gasLimit], + })) as readonly [Address, bigint, bigint, bigint, string, bigint]; + return { protocolFee, nativeValueForGas: gasFee, gasLimitUsed }; + }, + }; + ownerAgw = await h.client(0, { agenticWallet: wallet }); + }); + // Explicit call array: the funds land in the wallet's CEA and the listed + // call runs as given (a single `data` would also prepend transfer(target)). + const send = (amount: bigint) => + agenticSend(runtime, ctx, { + to: { address: destTarget, chain: SEPOLIA }, + data: [{ to: destTarget, value: BigInt(0), data: '0xd09de08a' }], + funds: { + amount, + token: { + symbol: 'USDC', + decimals: 6, + address: token, + mechanism: 'approve', + }, + }, + }); + it('sends successfully without an owner gateway allowance', async () => { + expect( + ( + await h.publicClient.waitForTransactionReceipt({ + hash: (await send(BigInt(100))).hash as Hex, + }) + ).status + ).toBe('success'); + }); + it('owner sets a bounded allowance with an ordinary owner-door send; the agent outbound passes URP, pulls and burns', async () => { + await ( + await ownerAgw.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ + abi: TOKEN_ABI, + functionName: 'approve', + args: [h.addresses.gateway, BigInt(300)], + }), + }) + ).wait(); + const supplyBefore = (await h.publicClient.readContract({ + address: token, + abi: TOKEN_ABI, + functionName: 'totalSupply', + })) as bigint; + const tx = await send(BigInt(100)); + const receipt = await h.publicClient.waitForTransactionReceipt({ + hash: tx.hash as Hex, + }); + expect(receipt.status).toBe('success'); + expect( + await h.publicClient.readContract({ + address: h.addresses.gateway, + abi: GATEWAY_ABI, + functionName: 'lastSender', + }) + ).toBe(wallet); + expect( + await h.publicClient.readContract({ + address: token, + abi: TOKEN_ABI, + functionName: 'totalSupply', + }) + ).toBe(supplyBefore - BigInt(100)); + expect( + await h.publicClient.readContract({ + address: token, + abi: TOKEN_ABI, + functionName: 'allowance', + args: [wallet, h.addresses.gateway], + }) + ).toBe(BigInt(0)); + // The request the wallet sent: empty recipient, wallet refund, nonzero gas cap, multicall payload. + const payload = `0x2cc2842d${encodeAbiParameters( + [ + { + type: 'tuple[]', + components: [ + { name: 'to', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'data', type: 'bytes' }, + ], + }, + ], + [[{ to: destTarget, value: BigInt(0), data: '0xd09de08a' }]] + ).slice(2)}` as Hex; + const expected = keccak256( + encodeAbiParameters( + [ + { + type: 'tuple', + components: [ + { name: 'recipient', type: 'bytes' }, + { name: 'token', type: 'address' }, + { name: 'amount', type: 'uint256' }, + { name: 'gasLimit', type: 'uint256' }, + { name: 'gasPrice', type: 'uint256' }, + { name: 'maxPCForGas', type: 'uint256' }, + { name: 'payload', type: 'bytes' }, + { name: 'revertRecipient', type: 'address' }, + ], + }, + ], + [ + { + recipient: '0x', + token, + amount: BigInt(100), + gasLimit: BigInt(2000000), + gasPrice: BigInt(0), + maxPCForGas: BigInt(10) ** BigInt(15), + payload, + revertRecipient: wallet, + }, + ] + ) + ); + expect( + await h.publicClient.readContract({ + address: h.addresses.gateway, + abi: GATEWAY_ABI, + functionName: 'lastRequestHash', + }) + ).toBe(expected); + expect(tx.from).toBe(wallet); + expect(tx.route).toBe('UOA_TO_CEA'); + expect(tx.agentic).toMatchObject({ + door: 'agent', + rulesId, + destinationAccount: CEA, + chainNamespace: SEPOLIA, + }); + expect(keccak256(toBytes(SEPOLIA))).toBeTruthy(); + }); + it('zero standing allowance does not revoke an otherwise valid rule', async () => { + await ( + await ownerAgw.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ + abi: TOKEN_ABI, + functionName: 'approve', + args: [h.addresses.gateway, BigInt(0)], + }), + }) + ).wait(); + expect( + ( + await h.publicClient.waitForTransactionReceipt({ + hash: (await send(BigInt(10))).hash as Hex, + }) + ).status + ).toBe('success'); + }); + it('a call outside the allow-list is rejected by URP on-chain', async () => { + await ( + await ownerAgw.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ + abi: TOKEN_ABI, + functionName: 'approve', + args: [h.addresses.gateway, BigInt(50)], + }), + }) + ).wait(); + const err = await agenticSend(runtime, ctx, { + to: { address: destTarget, chain: SEPOLIA }, + data: '0x12345678', + }).catch((e) => e); + expect(err).toBeInstanceOf(AgenticRevertError); + }); + }); +}); diff --git a/packages/core/__agw-local__/agw-local-batch.spec.ts b/packages/core/__agw-local__/agw-local-batch.spec.ts new file mode 100644 index 00000000..fdb5713c --- /dev/null +++ b/packages/core/__agw-local__/agw-local-batch.spec.ts @@ -0,0 +1,157 @@ +/** Real EIP-7702 self-delegation and real AGW/engine/policy; executor is a small + * test-only ERC-7821-shaped CALL dispatcher. No UEA relay or live network. */ +import { + encodeFunctionData, + getAddress, + parseAbi, + type Address, + type Hex, +} from 'viem'; +import { AgenticRevertError, CHAIN, type PushChain } from '../src'; +import { PUSH_BATCH_EXECUTOR_ADDRESS } from '../src/lib/constants/chain'; +import { startHarness, type Harness } from './harness'; +import { EvmClient } from '../src/lib/vm-client/evm-client'; +import { readNativeCounters } from '../__e2e__/shared/agw-state'; +const ABI = parseAbi([ + 'function increment()', + 'function counter() view returns(uint256)', +]); +let h: Harness; +let owner: PushChain; +let previous: Address | undefined; +beforeAll(async () => { + h = await startHarness(18552); + previous = PUSH_BATCH_EXECUTOR_ADDRESS[CHAIN.PUSH_LOCALNET]; + const executor = await h.deploy( + 0, + 'HarnessAtomicExecutor', + 'HarnessFixtures.sol' + ); + PUSH_BATCH_EXECUTOR_ADDRESS[CHAIN.PUSH_LOCALNET] = executor; + owner = await h.client(0); +}); +afterAll(async () => { + if (previous) PUSH_BATCH_EXECUTOR_ADDRESS[CHAIN.PUSH_LOCALNET] = previous; + else delete PUSH_BATCH_EXECUTOR_ADDRESS[CHAIN.PUSH_LOCALNET]; + await h?.stop(); +}); +async function walletFor(_maxCalls: number) { + const result = await owner.agentic.create('native-batch', { + rules: [ + { + agent: h.wallets[1].account!.address, + validUntil: Number((await h.publicClient.getBlock()).timestamp) + 3600, + allowedCalls: [ + { + target: h.addresses.target, + selector: 'increment()', + }, + ], + }, + ], + }); + const agent = await h.client(1, { agenticWallet: result.wallet }); + return { ...result, agent }; +} +const calls = () => + Array.from({ length: 2 }, () => ({ + to: h.addresses.target, + value: BigInt(0), + data: encodeFunctionData({ abi: ABI, functionName: 'increment' }), + })); +const counter = () => + h.publicClient.readContract({ + address: h.addresses.target, + abi: ABI, + functionName: 'counter', + }); +it('atomic native agent array preserves the agent sender and meters both actions', async () => { + const { wallet, rulesIds, agent } = await walletFor(3); + const before = await counter(); + const tx = await agent.universal.sendTransaction({ + to: h.addresses.target, + data: calls(), + }); + expect((await tx.wait()).status).toBe(1); + expect(tx.from).toBe(wallet); + expect(tx.agentic?.nativeCalls).toHaveLength(2); + expect(await counter()).toBe(before + BigInt(2)); + expect( + await readNativeCounters( + h.publicClient, + h.generation.addresses, + wallet, + rulesIds[0] + ) + ).toMatchObject({ callsUsed: 2 }); + // Verify actual type-4 outer transaction and its signer identity independently. + const raw = await h.publicClient.getTransaction({ hash: tx.hash as Hex }); + expect(raw.type).toBe('eip7702'); + expect(getAddress(raw.from)).toBe(h.wallets[1].account!.address); + expect(getAddress(raw.to as Address)).toBe(h.wallets[1].account!.address); +}); +it('failure of a later native action rolls back the earlier call and its counters', async () => { + const { wallet, rulesIds, agent } = await walletFor(1); + const before = await counter(); + const nonceBefore = await h.publicClient.getTransactionCount({ + address: h.wallets[1].account!.address, + }); + // Normal estimation now refuses this invalid batch before broadcast. For + // this separate rollback proof, override only the test estimate so the real + // signed type-4 transaction reaches the real contracts and reverts there. + const original = EvmClient.prototype.sendBatch7702; + const send = jest + .spyOn(EvmClient.prototype, 'sendBatch7702') + .mockImplementation(async function (this: EvmClient, params) { + const estimate = jest + .spyOn(this.publicClient, 'estimateGas') + .mockResolvedValue(BigInt(2000000)); + try { + return await original.call(this, params); + } finally { + estimate.mockRestore(); + } + }); + try { + await expect( + agent.universal.sendTransaction({ + to: h.addresses.target, + data: [calls()[0], { ...calls()[1], data: '0xffffffff' }], + }) + ).rejects.toBeInstanceOf(AgenticRevertError); + } finally { + send.mockRestore(); + } + // Prove this was a mined transaction failure, not an early SDK rejection. + expect( + await h.publicClient.getTransactionCount({ + address: h.wallets[1].account!.address, + }) + ).toBeGreaterThan(nonceBefore); + expect(await counter()).toBe(before); + expect( + await readNativeCounters( + h.publicClient, + h.generation.addresses, + wallet, + rulesIds[0] + ) + ).toMatchObject({ callsUsed: 0 }); +}); +it('normal estimation refuses an invalid native batch before broadcasting', async () => { + const { agent } = await walletFor(1); + const nonce = await h.publicClient.getTransactionCount({ + address: h.wallets[1].account!.address, + }); + await expect( + agent.universal.sendTransaction({ + to: h.addresses.target, + data: [calls()[0], { ...calls()[1], data: '0xffffffff' }], + }) + ).rejects.toBeInstanceOf(AgenticRevertError); + expect( + await h.publicClient.getTransactionCount({ + address: h.wallets[1].account!.address, + }) + ).toBe(nonce); +}); diff --git a/packages/core/__agw-local__/agw-local-races.spec.ts b/packages/core/__agw-local__/agw-local-races.spec.ts new file mode 100644 index 00000000..251b8ddd --- /dev/null +++ b/packages/core/__agw-local__/agw-local-races.spec.ts @@ -0,0 +1,175 @@ +/** + * Race regressions found during independent SDK review, + * against the real pinned v6 contracts on local anvil. + * R1 — a concurrent creation must never let this create() grant on a wallet it + * did not deploy (the deploy is index-bound through deployWalletWithSig). + * R4 — an owner outbound must never restore an allowance revoked after the + * SDK read it (the SDK never writes allowances). + */ +import { encodeFunctionData, parseAbi, type Address, type Hex } from 'viem'; +import { AgenticRevertError, CHAIN, type PushChain } from '../src'; +import type { AgenticRuntime } from '../src/lib/agentic/runtime'; +import { v6 } from '../src/lib/agentic/contracts/v6'; +import { AGENTIC_ERROR_CODE } from '../src/lib/agentic/errors'; +import { startHarness, type Harness } from './harness'; +const TOKEN = parseAbi([ + 'function mint(address,uint256)', + 'function approve(address,uint256) returns (bool)', + 'function allowance(address,address) view returns (uint256)', +]); +const internalsOf = (c: PushChain) => + ( + c as unknown as { + agenticRuntime: AgenticRuntime; + } + ).agenticRuntime; +describe('AGW race regressions (real v6 contracts)', () => { + let h: Harness; + let owner: PushChain; + beforeAll(async () => { + h = await startHarness(18549); + owner = await h.client(0); + }); + afterAll(async () => { + await h?.stop(); + }); + it('R1 a concurrent creation makes create() fail with nothing granted on either wallet', async () => { + const expected = await owner.agentic.derive(); + const rt = internalsOf(owner); + const execute = rt.execute; + rt.execute = async (params, options) => { + rt.execute = execute; + await h.write( + 0, + h.addresses.factory, + h.generation.contracts.abis.factory, + 'deployWallet', + ['other-purpose-wallet'] + ); + return execute(params, options); + }; + const err = await owner.agentic + .create('intended', { + rules: [ + { + agent: h.wallets[1].account!.address, + validUntil: + Number((await h.publicClient.getBlock()).timestamp) + 3600, + allowedCalls: [ + { + target: h.addresses.target, + selector: 'increment()', + }, + ], + }, + ], + }) + .catch((e) => e) + .finally(() => { + rt.execute = execute; + }); + expect(err).toMatchObject({ + code: AGENTIC_ERROR_CODE.INDEX_RACE, + details: { committed: false }, + }); + const permissionIds = (address: Address) => + h.publicClient.readContract({ + address: h.addresses.engine, + abi: h.generation.contracts.abis.engine, + functionName: 'getPermissionIDs', + args: [address], + }); + expect(await permissionIds(expected.address)).toHaveLength(0); + const next = await owner.agentic.derive(); + expect(next.index).toBe(expected.index + 1); + expect(await permissionIds(next.address)).toHaveLength(0); + // A retry re-reads the slot and succeeds. + const retried = await owner.agentic.create('intended', { rules: [] }); + expect(retried.index).toBe(next.index); + }); + it('v6 outbound succeeds after a standing allowance is revoked and leaves zero allowance', async () => { + const { wallet } = await owner.agentic.create('allowance-race', { + rules: [], + }); + const token = await h.deploy(0, 'HarnessPRC20', 'HarnessFixtures.sol', [ + CHAIN.ETHEREUM_SEPOLIA, + 6, + ]); + await h.write(0, token, TOKEN, 'mint', [wallet, BigInt(1000)]); + await h.publicClient.waitForTransactionReceipt({ + hash: await h.wallets[0].sendTransaction({ + to: wallet, + value: BigInt(10) ** BigInt(17), + account: h.wallets[0].account!, + chain: h.wallets[0].chain, + }), + }); + const c = await h.client(0, { agenticWallet: wallet }); + await ( + await c.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ + abi: TOKEN, + functionName: 'approve', + args: [h.addresses.gateway, BigInt(50)], + }), + }) + ).wait(); + const rt = internalsOf(c); + rt.resolvePrc20 = () => token; + rt.resolveCEA = async () => ({ + cea: h.wallets[2].account!.address, + isDeployed: true, + }); + rt.quoteOutbound = async () => ({ + protocolFee: BigInt(10) ** BigInt(14), + nativeValueForGas: BigInt(10) ** BigInt(15), + gasLimitUsed: BigInt(200000), + }); + const execute = rt.execute; + rt.execute = async (params, options) => { + rt.execute = execute; + const revoke = v6.encodeExecute([ + { + target: token, + value: BigInt(0), + data: encodeFunctionData({ + abi: TOKEN, + functionName: 'approve', + args: [h.addresses.gateway, BigInt(0)], + }), + }, + ]); + await (await execute({ to: wallet, data: revoke })).wait(); + return execute(params, options); + }; + const err = await c.universal + .sendTransaction({ + to: { + address: h.wallets[3].account!.address as Address, + chain: CHAIN.ETHEREUM_SEPOLIA, + }, + data: '0xd09de08a', + funds: { amount: BigInt(10) }, + }) + .catch((e) => e) + .finally(() => { + rt.execute = execute; + }); + expect( + ( + await h.publicClient.waitForTransactionReceipt({ + hash: err.hash as Hex, + }) + ).status + ).toBe('success'); + expect( + await h.publicClient.readContract({ + address: token, + abi: TOKEN, + functionName: 'allowance', + args: [wallet, h.addresses.gateway], + }) + ).toBe(BigInt(0)); + }); +}); diff --git a/packages/core/__agw-local__/agw-local.spec.ts b/packages/core/__agw-local__/agw-local.spec.ts new file mode 100644 index 00000000..efab53b9 --- /dev/null +++ b/packages/core/__agw-local__/agw-local.spec.ts @@ -0,0 +1,434 @@ +import { readNativeCounters } from '../__e2e__/shared/agw-state'; +/** + * Real-contract checks of the AGW SDK against the pinned v6 contracts on a + * local anvil chain (see harness.ts for scope and limits). Every assertion + * about authorization, atomicity, counters and checkpoints is decided by the + * real contracts; the only stubbed component is the gateway. + */ +import { + encodeFunctionData, + getAddress, + parseAbi, + type Address, + type Hex, +} from 'viem'; +import { + AgenticError, + AgenticRevertError, + CHAIN, + type PushChain, +} from '../src'; +import { AGENTIC_ERROR_CODE } from '../src/lib/agentic/errors'; +import { startHarness, type Harness } from './harness'; +const TARGET_ABI = parseAbi([ + 'function increment()', + 'function counter() view returns (uint256)', + 'function deposit(address beneficiary, uint256 amount) payable', + 'function lastBeneficiary() view returns (address)', +]); +const WALLET_ABI = parseAbi([ + 'function checkpointCount() view returns (uint64)', + 'function agentOf(bytes32) view returns (address)', + 'function owner() view returns (address)', +]); +const inAnHour = () => Math.floor(Date.now() / 1000) + 3600; +describe('AGW SDK against real v6 contracts (local anvil)', () => { + let h: Harness; + let owner: PushChain; + let ownerAddr: Address; + let agentAddr: Address; + beforeAll(async () => { + h = await startHarness(); + owner = await h.client(0); + ownerAddr = h.wallets[0].account!.address; + agentAddr = h.wallets[1].account!.address; + }); + afterAll(async () => { + await h?.stop(); + }); + const counter = () => + h.publicClient.readContract({ + address: h.addresses.target, + abi: TARGET_ABI, + functionName: 'counter', + }); + const checkpointCount = (wallet: Address) => + h.publicClient.readContract({ + address: wallet, + abi: WALLET_ABI, + functionName: 'checkpointCount', + }); + it('derive() predicts slot 0 from the signer identity and matches the factory', async () => { + const d = await owner.agentic.derive(); + expect(d.index).toBe(0); + expect(d.deployed).toBe(false); + const [predicted] = (await h.publicClient.readContract({ + address: h.addresses.factory, + abi: h.generation.contracts.abis.factory, + functionName: 'predictWallet', + args: [ownerAddr, BigInt(0)], + })) as readonly [Address, boolean]; + expect(d.address).toBe(getAddress(predicted)); + }); + let bare: Address; + it('create(label, { rules: [] }) deploys a bare wallet without funding it', async () => { + const created = await owner.agentic.create('scratch', { rules: [] }); + bare = created.wallet; + expect(created.index).toBe(0); + expect(created.rulesIds).toEqual([]); + expect(await h.publicClient.getBalance({ address: bare })).toBe(BigInt(0)); + const info = await owner.agentic.wallet(bare).info(); + expect(info).toMatchObject({ + label: 'scratch', + index: 0, + owner: ownerAddr, + deployed: true, + rulesCount: 0, + }); + }); + let wallet: Address; + let rule1: Hex; + it('create with a native rule returns the receipt-confirmed ID; grant order and IDs match the contract', async () => { + const created = await owner.agentic.create('ops', { + rules: [ + { + agent: agentAddr, + validUntil: inAnHour(), + allowedCalls: [ + { + target: h.addresses.target, + selector: 'increment()', + }, + ], + }, + ], + }); + wallet = created.wallet; + rule1 = created.rulesIds[0]; + expect(created.index).toBe(1); + expect(created.rulesIds).toHaveLength(1); + const agentOf = await h.publicClient.readContract({ + address: wallet, + abi: WALLET_ABI, + functionName: 'agentOf', + args: [rule1], + }); + expect(agentOf).toBe(agentAddr); + // Sequential fallback on a 7702-less localnet is reported honestly. + expect(typeof created.tx.atomic).toBe('boolean'); + }); + it('list() returns both deployed wallets plus the next undeployed slot', async () => { + const { wallets } = await owner.agentic.list(); + expect( + wallets.map((w) => [w.index, w.label, w.deployed, w.rulesCount]) + ).toEqual([ + [0, 'scratch', true, 0], + [1, 'ops', true, 1], + [2, '', false, 0], + ]); + }); + it('rules.get / rules.list decode active terms including spend', async () => { + const rec = await owner.agentic.wallet(wallet).rules.get(rule1); + expect(rec.agent).toBe(agentAddr); + expect(rec.rule).toMatchObject({ + allowedCalls: [{ target: h.addresses.target, maxValue: BigInt(0) }], + }); + expect(rec).toHaveProperty('spent'); + expect( + await readNativeCounters( + h.publicClient, + h.generation.addresses, + wallet, + rule1 + ) + ).toEqual({ valueSpent: BigInt(0), amountSpent: BigInt(0), callsUsed: 0 }); + const { rules } = await owner.agentic.wallet(wallet).rules.list(); + expect(rules.map((r) => r.rulesId)).toEqual([rule1]); + }); + let agent: PushChain; + it('agent client: universal.account is the wallet, origin stays the signer, sends go through executeAsAgent', async () => { + agent = await h.client(1, { agenticWallet: wallet }); + expect(agent.universal.account).toBe(wallet); + expect(agent.universal.origin.address.toLowerCase()).toBe( + agentAddr.toLowerCase() + ); + const before = await counter(); + const tx = await agent.universal.sendTransaction({ + to: h.addresses.target, + data: encodeFunctionData({ abi: TARGET_ABI, functionName: 'increment' }), + }); + const receipt = await tx.wait(); + expect(receipt.status).toBe(1); + expect(await counter()).toBe(before + BigInt(1)); + expect(tx.from).toBe(wallet); + expect(receipt.from).toBe(wallet); + expect(tx.to).toBe(h.addresses.target); + expect(tx.agentic).toMatchObject({ wallet, door: 'agent', rulesId: rule1 }); + expect(tx.agentic?.rawTo?.toLowerCase()).toBe(wallet.toLowerCase()); + }); + it('agent sends do not tick checkpoints; counters increase without the retired maxCalls limit', async () => { + const cpBefore = await checkpointCount(wallet); + await ( + await agent.universal.sendTransaction({ + to: h.addresses.target, + data: encodeFunctionData({ + abi: TARGET_ABI, + functionName: 'increment', + }), + }) + ).wait(); + expect(await checkpointCount(wallet)).toBe(cpBefore); + const rec = await owner.agentic.wallet(wallet).rules.get(rule1); + expect(rec).toHaveProperty('spent'); + expect( + await readNativeCounters( + h.publicClient, + h.generation.addresses, + wallet, + rule1 + ) + ).toMatchObject({ callsUsed: 2 }); + await ( + await agent.universal.sendTransaction({ + to: h.addresses.target, + data: encodeFunctionData({ + abi: TARGET_ABI, + functionName: 'increment', + }), + }) + ).wait(); + expect( + (await owner.agentic.wallet(wallet).rules.get(rule1)).spent + ).toMatchObject({ kind: 'native', callsUsed: 3 }); + }); + it('a stranger cannot initialize against the wallet', async () => { + await expect(h.client(2, { agenticWallet: wallet })).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.NOT_OWNER_OR_AGENT, + }); + }); + it('owner client goes through execute and ticks one OWNER_ACTION checkpoint per call', async () => { + const ownerAgw = await h.client(0, { agenticWallet: wallet }); + const before = await checkpointCount(wallet); + const data = encodeFunctionData({ + abi: TARGET_ABI, + functionName: 'increment', + }); + const tx = await ownerAgw.universal.sendTransaction({ + to: h.addresses.target, + data: [ + { to: h.addresses.target, value: BigInt(0), data }, + { to: h.addresses.target, value: BigInt(0), data }, + ], + }); + await tx.wait(); + expect(await checkpointCount(wallet)).toBe(before + BigInt(2)); + expect(tx.agentic?.door).toBe('owner'); + const { checkpoints } = await owner.agentic + .wallet(wallet) + .checkpoints({ sinceBlock: tx.blockNumber }); + expect(checkpoints.map((c) => c.kind)).toEqual([ + 'OWNER_ACTION', + 'OWNER_ACTION', + ]); + }); + it('native agent arrays require an available atomic executor instead of sequential fallback', async () => { + const data = encodeFunctionData({ + abi: TARGET_ABI, + functionName: 'increment', + }); + await expect( + agent.universal.sendTransaction({ + to: h.addresses.target, + data: [ + { to: h.addresses.target, value: BigInt(0), data }, + { to: h.addresses.target, value: BigInt(0), data }, + ], + }) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE, + }); + }); + let rule2: Hex; + it('rules.update replaces atomically: five checkpoints, old disabled, new usable with reset counters', async () => { + const before = await checkpointCount(wallet); + const res = await owner.agentic.wallet(wallet).rules.update({ + rules: [ + { + rulesId: rule1, + rule: { + agent: agentAddr, + validUntil: inAnHour(), + allowedCalls: [ + { + target: h.addresses.target, + selector: 'increment()', + }, + ], + }, + }, + ], + }); + rule2 = res.rules[0].rulesId; + expect(res.rules[0].replaced).toBe(rule1); + expect(await checkpointCount(wallet)).toBe(before + BigInt(5)); + const { checkpoints } = await owner.agentic + .wallet(wallet) + .checkpoints({ sinceBlock: res.tx.blockNumber }); + expect(checkpoints.map((c) => c.kind)).toEqual([ + 'OWNER_ACTION', + 'OWNER_ACTION', + 'RULES_REVOKED', + 'OWNER_ACTION', + 'RULES_GRANTED', + ]); + const rec = await owner.agentic.wallet(wallet).rules.get(rule2); + expect(rec).toHaveProperty('spent'); + expect( + await readNativeCounters( + h.publicClient, + h.generation.addresses, + wallet, + rule2 + ) + ).toMatchObject({ callsUsed: 0 }); + await expect( + owner.agentic.wallet(wallet).rules.get(rule1) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.RULE_NOT_FOUND, + }); + const tx = await agent.universal.sendTransaction({ + to: h.addresses.target, + data: encodeFunctionData({ abi: TARGET_ABI, functionName: 'increment' }), + }); + expect(tx.agentic?.rulesId).toBe(rule2); + }); + it('full checkpoint history is contiguous and matches checkpointCount()', async () => { + const { checkpoints } = await owner.agentic.wallet(wallet).checkpoints(); + expect(checkpoints.map((c) => c.seq)).toEqual( + checkpoints.map((_, i) => i + 1) + ); + expect(BigInt(checkpoints.length)).toBe(await checkpointCount(wallet)); + expect(checkpoints[0].kind).toBe('RULES_GRANTED'); + }); + it('bare revoke is refused; revoke({ all: true }) disables every rule', async () => { + await expect( + owner.agentic.wallet(wallet).rules.delete(undefined as unknown as Hex[]) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.DELETE_NEEDS_TARGET }); + await expect( + owner.agentic.wallet(wallet).rules.delete([]) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.DELETE_NEEDS_TARGET, + }); + await ( + await owner.agentic.wallet(wallet).rules.delete({ all: true }) + ).wait(); + const { rules } = await owner.agentic.wallet(wallet).rules.list(); + expect(rules).toEqual([]); + await expect( + agent.universal.sendTransaction({ + to: h.addresses.target, + data: encodeFunctionData({ + abi: TARGET_ABI, + functionName: 'increment', + }), + }) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.NO_RULES_FOR_CHAIN }); + }); + it('a non-owner cannot write rules (fails before signing)', async () => { + const stranger = await h.client(2); + await expect( + stranger.agentic.wallet(wallet).rules.add([ + { + agent: agentAddr, + validUntil: inAnHour(), + allowedCalls: [ + { + target: h.addresses.target, + selector: 'increment()', + }, + ], + }, + ]) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.NOT_WALLET_OWNER }); + }); + it('a read-only client can read but never sign, even with the owner address', async () => { + const ro = await h.readOnlyClient(0, { agenticWallet: wallet }); + expect(ro.universal.account).toBe(wallet); + expect((await ro.agentic.wallet(wallet).owner()).owner).toBe(ownerAddr); + await expect( + ro.agentic.wallet(wallet).rules.add([ + { + agent: agentAddr, + validUntil: inAnHour(), + allowedCalls: [ + { + target: h.addresses.target, + selector: 'increment()', + }, + ], + }, + ]) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.READ_ONLY }); + expect(() => + ro.universal.sendTransaction({ to: h.addresses.target, data: '0x' }) + ).toThrow(/Read only/); + }); + it('reinitialize without agenticWallet returns an ordinary client', async () => { + const ownerAgw = await h.client(0, { agenticWallet: wallet }); + const plain = await ownerAgw.reinitialize( + await import('../src').then((m) => + m.PushChain.utils.signer.toUniversalFromKeypair(h.wallets[0], { + chain: m.CHAIN.PUSH_LOCALNET, + library: m.PushChain.CONSTANTS.LIBRARY.ETHEREUM_VIEM, + }) + ) + ); + expect(plain.universal.account.toLowerCase()).toBe(ownerAddr.toLowerCase()); + }); + it('signer-level and cascade entry points are closed in agentic mode', async () => { + const ownerAgw = await h.client(0, { agenticWallet: wallet }); + const code = AGENTIC_ERROR_CODE.NOT_ALLOWED_IN_AGENTIC_MODE; + expect(() => + ownerAgw.universal.prepareTransaction({ + to: h.addresses.target, + data: '0x', + }) + ).toThrow(expect.objectContaining({ code })); + await expect( + ownerAgw.universal.executeTransactions([]) + ).rejects.toMatchObject({ code }); + expect(() => ownerAgw.universal.migrateCEA(CHAIN.ETHEREUM_SEPOLIA)).toThrow( + expect.objectContaining({ code }) + ); + expect(() => + ownerAgw.universal.rescueFunds({ + universalTxId: `0x${'00'.repeat(32)}`, + prc20: h.addresses.target, + }) + ).toThrow(expect.objectContaining({ code })); + await expect( + ownerAgw.universal.sendTransaction({ + to: h.addresses.target, + data: '0x', + payGasWith: {}, + }) + ).rejects.toMatchObject({ code }); + await expect( + ownerAgw.universal.sendTransaction({ + to: { address: h.addresses.target, chain: CHAIN.PUSH_LOCALNET }, + from: { chain: CHAIN.ETHEREUM_SEPOLIA }, + }) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.FROM_NOT_ALLOWED }); + }); + it('getAccountStatus stays signer-scoped in agentic mode', async () => { + const ownerAgw = await h.client(0, { agenticWallet: wallet }); + const status = await ownerAgw.getAccountStatus(); + expect(status.mode).toBe('signer'); + expect(ownerAgw.universal.account).toBe(wallet); + }); + it('errors from the agentic surface are typed', () => { + expect( + new AgenticError(AGENTIC_ERROR_CODE.AMBIGUOUS_RULE, 'x') + ).toBeInstanceOf(Error); + }); +}); diff --git a/packages/core/__agw-local__/delayed-index.spec.ts b/packages/core/__agw-local__/delayed-index.spec.ts new file mode 100644 index 00000000..958bf8c3 --- /dev/null +++ b/packages/core/__agw-local__/delayed-index.spec.ts @@ -0,0 +1,257 @@ +/** Real v5 execution/receipts; only origin mapping and Cosmos indexing are fixtures. */ +import { getAddress, parseAbi, type Address, type Hex } from 'viem'; +import { CHAIN, type PushChain } from '../src'; +import * as account from '../src/lib/universal/account/account'; +import type { AgenticRuntime } from '../src/lib/agentic/runtime'; +import type { OrchestratorContext } from '../src/lib/orchestrator/internals/context'; +import { detectRouteFromUniversalTxData } from '../src/lib/orchestrator/internals/tx-transformer'; +import { UniversalTxStatus } from '../src/lib/generated/uexecutor/v1/types'; +import { + OutboundStatus, + UniversalTxV2Codec, + OutboundTxV2Codec, +} from '../src/lib/generated/uexecutor/v2/types'; +import type { ProgressEvent } from '../src/lib/progress-hook/progress-hook.types'; +import { startHarness, type Harness } from './harness'; + +const DEST = getAddress('0x0000000000000000000000000000000000001234'); +const CEA = getAddress('0x000000000000000000000000000000000000cea1'); +const EXTERNAL_HASH = `0x${'ef'.repeat(32)}` as Hex; +const CORE = parseAbi([ + 'function setGasToken(string,address)', + 'function getOutboundTxGasAndFees(address,uint256) view returns (address,uint256,uint256,uint256,string,uint256)', +]); +const runtime = (c: PushChain) => + (c as unknown as { agenticRuntime: AgenticRuntime }).agenticRuntime; +const context = (c: PushChain) => + (c as unknown as { orchestrator: { ctx: OrchestratorContext } }).orchestrator + .ctx; + +describe('AGW replay with delayed Cosmos indexing', () => { + let h: Harness, token: Address; + beforeAll(async () => { + h = await startHarness(18553); + token = await h.deploy(0, 'HarnessPRC20', 'HarnessFixtures.sol', [ + CHAIN.ETHEREUM_SEPOLIA, + 18, + ]); + await h.write(0, h.addresses.universalCore, CORE, 'setGasToken', [ + CHAIN.ETHEREUM_SEPOLIA, + token, + ]); + }); + afterEach(() => jest.restoreAllMocks()); + afterAll(async () => h?.stop()); + + function configure(c: PushChain) { + runtime(c).resolvePrc20 = () => token; + runtime(c).resolveCEA = async () => ({ cea: CEA, isDeployed: false }); + runtime(c).quoteOutbound = async (asset, limit) => { + const [, nativeValueForGas, protocolFee, , , gasLimitUsed] = + await h.publicClient.readContract({ + address: h.addresses.universalCore, + abi: CORE, + functionName: 'getOutboundTxGasAndFees', + args: [asset, limit], + }); + return { nativeValueForGas, protocolFee, gasLimitUsed }; + }; + } + + it.each([ + ['owner', 'success'], + ['agent', 'success'], + ['owner', 'failed'], + ['agent', 'failed'], + ['owner', 'timeout'], + ['agent', 'timeout'], + ] as const)( + '%s door: real Push receipt then delayed external %s', + async (door, outcome) => { + // No UEA factory is present locally. Preserve real EVM RPC and contract + // verification, while isolating the unrelated UEA origin lookup. + jest + .spyOn(account, 'convertExecutorToOrigin') + .mockResolvedValue({ account: null, exists: false }); + const owner = await h.client(0); + configure(owner); + const created = await owner.agentic.create('delayed-index', { + rules: [ + { + agent: h.wallets[1].account!.address, + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, + assets: [], + maxGasPerCall: BigInt(10) ** BigInt(16), + validUntil: Math.floor(Date.now() / 1000) + 3600, + allowedCalls: [{ target: DEST, selector: 'increment()' }], + }, + ], + }); + const wallet = created.wallet; + await h.publicClient.waitForTransactionReceipt({ + hash: await h.wallets[4].sendTransaction({ + to: wallet, + value: BigInt(10) ** BigInt(18), + account: h.wallets[4].account!, + chain: h.wallets[4].chain, + }), + }); + const sender = await h.client(door === 'owner' ? 0 : 1, { + agenticWallet: wallet, + }); + configure(sender); + const sent = await sender.universal.sendTransaction({ + to: { address: DEST, chain: CHAIN.ETHEREUM_SEPOLIA }, + data: [{ to: DEST, value: BigInt(0), data: '0xd09de08a' }], + }); + const root = await h.publicClient.waitForTransactionReceipt({ + hash: sent.hash as Hex, + }); + expect(root.status).toBe('success'); + expect(getAddress(root.from)).toBe( + h.wallets[door === 'owner' ? 0 : 1].account!.address + ); + + const init: ProgressEvent[] = [], + perCall: ProgressEvent[] = []; + const tracker = await h.client(0, { + progressHook: (e) => init.push(e as ProgressEvent), + }); + const ctx = context(tracker); + const partial = UniversalTxV2Codec.fromPartial({ + id: 'delayed-record', + universalStatus: UniversalTxStatus.PC_EXECUTED_SUCCESS, + pcTx: [ + { + txHash: sent.hash, + status: 'SUCCESS', + sender: wallet, + gasUsed: 0, + blockHeight: Number(root.blockNumber), + errorMsg: '', + }, + ], + }); + expect(detectRouteFromUniversalTxData(partial)).toBe('UOA_TO_PUSH'); + let waiting = false, + polls = 0; + const lookup = jest + .spyOn(ctx.pushClient, 'getUniversalTxByIdV2') + .mockImplementation(async () => { + if (!waiting) return { universalTx: partial }; + polls++; + // Missing record, then root-only record, then the destination observation. + if (polls === 1) return { universalTx: undefined }; + if (polls === 2 || outcome === 'timeout') + return { universalTx: partial }; + return { + universalTx: UniversalTxV2Codec.fromPartial({ + ...partial, + universalStatus: UniversalTxStatus.OUTBOUND_PENDING, + outboundTx: [ + OutboundTxV2Codec.fromPartial({ + destinationChain: CHAIN.ETHEREUM_SEPOLIA, + sender: wallet, + recipient: CEA, + amount: '0', + prc20AssetAddr: token, + externalAssetAddr: token, + outboundStatus: + outcome === 'success' + ? OutboundStatus.OBSERVED + : OutboundStatus.REVERTED, + observedTx: { + txHash: EXTERNAL_HASH, + success: outcome === 'success', + errorMsg: + outcome === 'failed' ? 'fixture destination revert' : '', + blockHeight: 1, + gasFeeUsed: '', + pc20WrapperAddress: '', + }, + }), + ], + }), + }; + }); + const cosmos = jest + .spyOn(ctx.pushClient, 'getCosmosTx') + .mockResolvedValue({ + events: [], + height: Number(root.blockNumber), + txIndex: 0, + code: 0, + transactionHash: sent.hash, + msgResponses: [], + gasWanted: BigInt(0), + gasUsed: BigInt(0), + }); + const signerNonces = await Promise.all( + h.wallets + .slice(0, 2) + .map((signer) => + h.publicClient.getTransactionCount({ + address: signer.account!.address, + blockTag: 'pending', + }) + ) + ); + const replay = await tracker.universal.trackTransaction(sent.hash, { + progressHook: (e) => perCall.push(e), + }); + expect(lookup).toHaveBeenCalledTimes(1); + expect(polls).toBe(0); + expect(replay).toMatchObject({ + from: wallet, + origin: sent.origin, + to: DEST, + data: '0xd09de08a', + route: 'UOA_TO_CEA', + chain: CHAIN.ETHEREUM_SEPOLIA, + }); + expect(replay.agentic).toMatchObject({ wallet, door }); + waiting = true; + const receipt = await replay.wait({ + outboundInitialWaitMs: 0, + outboundPollingIntervalMs: 1, + outboundTimeoutMs: outcome === 'timeout' ? 100 : 1000, + }); + expect(receipt).toMatchObject({ + status: 1, + from: wallet, + externalStatus: outcome, + }); + expect(cosmos).toHaveBeenCalledTimes(1); + expect(polls).toBeGreaterThanOrEqual(outcome === 'timeout' ? 1 : 3); + if (outcome !== 'timeout') + expect(receipt.externalTxHash).toBe(EXTERNAL_HASH); + else expect(receipt.externalTxHash).toBeUndefined(); + const terminal = + outcome === 'success' + ? 'SEND-TX-299-01' + : outcome === 'failed' + ? 'SEND-TX-299-02' + : 'SEND-TX-299-03'; + for (const events of [init, perCall]) { + expect(events.filter((event) => event.id === terminal)).toHaveLength(1); + } + expect(perCall.map((e) => e.id)).toEqual(init.map((e) => e.id)); + // wait reuses the mined root; it does not sign or send a replacement. + expect( + await Promise.all( + h.wallets + .slice(0, 2) + .map((signer) => + h.publicClient.getTransactionCount({ + address: signer.account!.address, + blockTag: 'pending', + }) + ) + ) + ).toEqual(signerNonces); + expect( + (await h.publicClient.getTransaction({ hash: sent.hash as Hex })).input + ).toBe(sent.agentic!.rawData); + } + ); +}); diff --git a/packages/core/__agw-local__/harness.ts b/packages/core/__agw-local__/harness.ts new file mode 100644 index 00000000..ce2ac894 --- /dev/null +++ b/packages/core/__agw-local__/harness.ts @@ -0,0 +1,453 @@ +/** + * Local AGW contract harness — REVIEW ONLY. + * + * Starts anvil as a stand-in Push LOCALNET (chainId 9000, the SDK's + * CHAIN_INFO[PUSH_LOCALNET].chainId), deploys the REAL pinned v5 + * contracts (SmartSession, AgentValidator, UniversalRulesPolicy behind a + * TransparentUpgradeableProxy, AGW implementation, AGWFactory behind an + * ERC1967Proxy) from an isolated build prepared by + * scripts/agw-local/prepare.sh, and installs a stub gateway at the + * UniversalGatewayPC precompile address. It registers that deployment as a + * NON-advertised generation so the SDK can be driven end to end. + * + * Limits: no UEA factory / precompiles / Cosmos module, so only Push-EOA + * signers are exercised; the gateway is a stub (pull + burn + fee arithmetic); + * no TSS, relay or destination execution happens. + */ +import { spawn, type ChildProcess } from 'node:child_process'; +import { readFileSync, existsSync } from 'node:fs'; +import { join } from 'node:path'; +import { + createPublicClient, + createWalletClient, + defineChain, + encodeFunctionData, + getAddress, + http, + type Abi, + type Address, + type Hex, + type PublicClient, + type WalletClient, +} from 'viem'; +import { privateKeyToAccount } from 'viem/accounts'; +import { PushChain } from '../src'; +import { CHAIN, PUSH_NETWORK } from '../src/lib/constants/enums'; +import { LIBRARY } from '../src/lib/constants/enums'; +import { + registerAgenticGeneration, + resetAgenticGenerations, + type AgenticGeneration, +} from '../src/lib/agentic/deployments'; + +export const CHAIN_ID = 9000; +export const GATEWAY_PRECOMPILE = getAddress( + '0x00000000000000000000000000000000000000c1' +); +export const EXECUTOR_MODULE = getAddress( + '0x00000000000000000000000000000000000000e1' +); +export const ACCOUNT_ID = 'push.agw.1.0.0'; + +/** Anvil's well-known development keys (public test material, not secrets). */ +export const DEV_KEYS: Hex[] = [ + '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80', + '0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d', + '0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a', + '0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6', + '0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a', +]; + +export function buildDir(): string { + const dir = process.env['AGW_LOCAL_DIR']; + if (!dir || !existsSync(join(dir, 'out', 'AGW.sol', 'AGW.json'))) { + throw new Error( + 'AGW_LOCAL_DIR must point at a build produced by packages/core/scripts/agw-local/prepare.sh' + ); + } + return dir; +} + +function artifact( + dir: string, + file: string, + name: string +): { abi: Abi; bytecode: Hex } { + const json = JSON.parse( + readFileSync(join(dir, 'out', file, `${name}.json`), 'utf8') + ); + return { abi: json.abi as Abi, bytecode: json.bytecode.object as Hex }; +} + +export interface Harness { + rpcUrl: string; + anvil: ChildProcess; + publicClient: PublicClient; + wallets: WalletClient[]; + generation: AgenticGeneration; + addresses: { + engine: Address; + validator: Address; + rulesPolicy: Address; + walletImplementation: Address; + factory: Address; + universalCore: Address; + gateway: Address; + target: Address; + }; + deploy( + walletIndex: number, + name: string, + file: string, + args?: readonly unknown[] + ): Promise
; + write( + walletIndex: number, + to: Address, + abi: Abi, + functionName: string, + args: readonly unknown[], + value?: bigint + ): Promise; + client( + walletIndex: number, + opts?: { agenticWallet?: Address; progressHook?: (e: unknown) => void } + ): Promise; + readOnlyClient( + walletIndex: number, + opts?: { agenticWallet?: Address } + ): Promise; + stop(): Promise; + dir: string; +} + +const localChain = (rpcUrl: string) => + defineChain({ + id: CHAIN_ID, + name: 'push-localnet-harness', + nativeCurrency: { name: 'PC', symbol: 'PC', decimals: 18 }, + rpcUrls: { default: { http: [rpcUrl] } }, + }); + +async function waitForRpc(url: string, timeoutMs = 20_000): Promise { + const start = Date.now(); + for (;;) { + try { + const res = await fetch(url, { + method: 'POST', + headers: { 'content-type': 'application/json' }, + body: JSON.stringify({ + jsonrpc: '2.0', + id: 1, + method: 'eth_chainId', + params: [], + }), + }); + if (res.ok) return; + } catch { + // not yet listening + } + if (Date.now() - start > timeoutMs) + throw new Error(`anvil did not start at ${url}`); + await new Promise((r) => setTimeout(r, 200)); + } +} + +export async function startHarness(port = 18545): Promise { + const dir = buildDir(); + const rpcUrl = `http://127.0.0.1:${port}`; + const anvil = spawn( + 'anvil', + [ + '--port', + String(port), + '--chain-id', + String(CHAIN_ID), + '--hardfork', + 'prague', + '--silent', + ], + { stdio: 'ignore' } + ); + try { + return await deployHarness(dir, rpcUrl, anvil); + } catch (err) { + await stopAnvil(anvil); + throw err; + } +} + +/** Wait for the child to release its port; never leave cleanup to Jest exit. */ +async function stopAnvil(child: ChildProcess): Promise { + if (child.exitCode !== null || child.signalCode !== null) return; + await new Promise((resolve, reject) => { + const killTimer = setTimeout(() => child.kill('SIGKILL'), 2000); + const deadline = setTimeout(() => { + cleanup(); + reject(new Error('Anvil did not exit after SIGTERM/SIGKILL')); + }, 5000); + const cleanup = () => { + clearTimeout(killTimer); + clearTimeout(deadline); + child.off('exit', exited); + }; + const exited = () => { + cleanup(); + resolve(); + }; + child.once('exit', exited); + child.kill('SIGTERM'); + }); +} + +async function deployHarness( + dir: string, + rpcUrl: string, + anvil: ChildProcess +): Promise { + await waitForRpc(rpcUrl); + const chain = localChain(rpcUrl); + const publicClient = createPublicClient({ + chain, + transport: http(rpcUrl), + }) as PublicClient; + const wallets = DEV_KEYS.map((k) => + createWalletClient({ + account: privateKeyToAccount(k), + chain, + transport: http(rpcUrl), + }) + ); + const clients = new Set(); + + let svmLibrary: Address | undefined; + const deploy = async ( + walletIndex: number, + name: string, + file: string, + args: readonly unknown[] = [] + ) => { + const art = artifact(dir, file, name); + if (name === 'UniversalRulesPolicy') { + if (!svmLibrary) + svmLibrary = await deploy(0, 'SvmRulebook', 'SvmRulebook.sol'); + art.bytecode = art.bytecode.replace( + /__\$[0-9a-fA-F]{34}\$__/g, + svmLibrary.slice(2) + ) as Hex; + } + const hash = await wallets[walletIndex].deployContract({ + abi: art.abi, + bytecode: art.bytecode, + args: args as unknown[], + account: wallets[walletIndex].account!, + chain, + }); + const receipt = await publicClient.waitForTransactionReceipt({ hash }); + if (!receipt.contractAddress) throw new Error(`deploy ${name} failed`); + return getAddress(receipt.contractAddress); + }; + const write = async ( + walletIndex: number, + to: Address, + abi: Abi, + functionName: string, + args: readonly unknown[], + value?: bigint + ) => { + const hash = await wallets[walletIndex].sendTransaction({ + to, + data: encodeFunctionData({ abi, functionName, args: args as unknown[] }), + value, + account: wallets[walletIndex].account!, + chain, + }); + const receipt = await publicClient.waitForTransactionReceipt({ hash }); + if (receipt.status !== 'success') + throw new Error(`${functionName} reverted`); + return hash; + }; + + const admin = wallets[0].account!.address; + const engine = await deploy(0, 'SmartSession', 'SmartSession.sol'); + const validator = await deploy(0, 'AgentValidator', 'AgentValidator.sol'); + const urpLogic = await deploy( + 0, + 'UniversalRulesPolicy', + 'UniversalRulesPolicy.sol' + ); + const urpAbi = artifact( + dir, + 'UniversalRulesPolicy.sol', + 'UniversalRulesPolicy' + ).abi; + const rulesPolicy = await deploy( + 0, + 'TransparentUpgradeableProxy', + 'TransparentUpgradeableProxy.sol', + [ + urpLogic, + admin, + encodeFunctionData({ + abi: urpAbi, + functionName: 'initialize', + args: [GATEWAY_PRECOMPILE, EXECUTOR_MODULE, engine], + }), + ] + ); + const coreLogic = await deploy( + 0, + 'HarnessUniversalCore', + 'HarnessFixtures.sol' + ); + const universalCore = getAddress( + '0x00000000000000000000000000000000000000c0' + ); + await publicClient.request({ + method: 'anvil_setCode' as never, + params: [ + universalCore, + await publicClient.getCode({ address: coreLogic }), + ] as never, + }); + // The stub's storage initializers are not installed by etching code. + await publicClient.request({ + method: 'anvil_setStorageAt' as never, + params: [ + universalCore, + `0x${'00'.repeat(32)}`, + `0x${BigInt(10 ** 15) + .toString(16) + .padStart(64, '0')}`, + ] as never, + }); + await publicClient.request({ + method: 'anvil_setStorageAt' as never, + params: [ + universalCore, + `0x${'00'.repeat(31)}01`, + `0x${BigInt(10 ** 14) + .toString(16) + .padStart(64, '0')}`, + ] as never, + }); + const gatewayImpl = await deploy( + 0, + 'HarnessGatewayPC', + 'HarnessFixtures.sol', + [universalCore] + ); + const gatewayCode = await publicClient.getCode({ address: gatewayImpl }); + await publicClient.request({ + method: 'anvil_setCode' as never, + params: [GATEWAY_PRECOMPILE, gatewayCode] as never, + }); + const walletImplementation = await deploy(0, 'AGW', 'AGW.sol', [ + engine, + rulesPolicy, + validator, + GATEWAY_PRECOMPILE, + ]); + const factoryLogic = await deploy(0, 'AGWFactory', 'AGWFactory.sol'); + const factoryAbi = artifact(dir, 'AGWFactory.sol', 'AGWFactory').abi; + const factory = await deploy(0, 'ERC1967Proxy', 'ERC1967Proxy.sol', [ + factoryLogic, + encodeFunctionData({ + abi: factoryAbi, + functionName: 'initialize', + args: [admin, walletImplementation], + }), + ]); + const target = await deploy(0, 'HarnessTarget', 'HarnessFixtures.sol'); + + resetAgenticGenerations(); + const generation = registerAgenticGeneration({ + id: 'v6', + sourceCommit: 'ffd567d3e49b2d27c6f50ad36093274dbac3090f', + network: PUSH_NETWORK.LOCALNET, + advertised: false, + addresses: { + factory, + walletImplementation, + sessionEngine: engine, + rulesPolicy, + sessionValidator: validator, + gateway: GATEWAY_PRECOMPILE, + }, + startBlock: BigInt(0), + accountId: ACCOUNT_ID, + }); + + const signerFor = (walletIndex: number) => + PushChain.utils.signer.toUniversalFromKeypair(wallets[walletIndex], { + chain: CHAIN.PUSH_LOCALNET, + library: LIBRARY.ETHEREUM_VIEM, + }); + + const client = async ( + walletIndex: number, + opts: { agenticWallet?: Address; progressHook?: (e: unknown) => void } = {} + ) => { + const c = await PushChain.initialize(await signerFor(walletIndex), { + network: PUSH_NETWORK.LOCALNET, + rpcUrls: { [CHAIN.PUSH_LOCALNET]: [rpcUrl] }, + ...(opts.agenticWallet ? { agenticWallet: opts.agenticWallet } : {}), + ...(opts.progressHook + ? { progressHook: opts.progressHook as never } + : {}), + }); + clients.add(c); + return c; + }; + + const readOnlyClient = async ( + walletIndex: number, + opts: { agenticWallet?: Address } = {} + ) => { + const c = await PushChain.initialize( + { + address: wallets[walletIndex].account!.address, + chain: CHAIN.PUSH_LOCALNET, + }, + { + network: PUSH_NETWORK.LOCALNET, + rpcUrls: { [CHAIN.PUSH_LOCALNET]: [rpcUrl] }, + ...(opts.agenticWallet ? { agenticWallet: opts.agenticWallet } : {}), + } + ); + clients.add(c); + return c; + }; + + return { + rpcUrl, + anvil, + publicClient, + wallets, + generation, + addresses: { + engine, + validator, + rulesPolicy, + walletImplementation, + factory, + universalCore, + gateway: GATEWAY_PRECOMPILE, + target, + }, + deploy, + write, + client, + readOnlyClient, + dir, + stop: async () => { + await Promise.allSettled([...clients].map((c) => c.accountStatusReady)); + resetAgenticGenerations(); + await stopAnvil(anvil); + }, + }; +} + +export function artifactAbi(dir: string, file: string, name: string): Abi { + return artifact(dir, file, name).abi; +} diff --git a/packages/core/__agw-local__/labels.spec.ts b/packages/core/__agw-local__/labels.spec.ts new file mode 100644 index 00000000..d03f51b5 --- /dev/null +++ b/packages/core/__agw-local__/labels.spec.ts @@ -0,0 +1,141 @@ +/** Real v5 wallet/factory label state; no bridge or destination simulation. */ +import { decodeEventLog, type Address } from 'viem'; +import { PushChain } from '../src'; +import { v6 } from '../src/lib/agentic/contracts/v6'; +import { AGENTIC_ERROR_CODE } from '../src/lib/agentic/errors'; +import { startHarness, type Harness } from './harness'; + +describe('v6 label SDK against real contracts', () => { + let h: Harness; + let owner: PushChain; + beforeAll(async () => { + h = await startHarness(18565); + owner = await h.client(0); + }); + afterAll(async () => { + await h?.stop(); + }); + const count = (address: Address) => + h.publicClient.readContract({ + address, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }); + + it('stores custom deploy labels and defaults empty labels per owner index', async () => { + const first = await owner.agentic.create('', { rules: [] }); + const second = await owner.agentic.create('custom', { rules: [] }); + const other = await h.client(2); + const theirs = await other.agentic.create('', { rules: [] }); + expect((await owner.agentic.wallet(first.wallet).info()).label).toBe( + `AGW ${first.index + 1}` + ); + expect((await owner.agentic.wallet(second.wallet).info()).label).toBe( + 'custom' + ); + expect((await other.agentic.wallet(theirs.wallet).info()).label).toBe( + 'AGW 1' + ); + expect(await count(first.wallet)).toBe(BigInt(0)); + }); + + it('renames and resets through public SDK; fresh info/list and checkpoints agree', async () => { + const made = await owner.agentic.create('before', { rules: [] }); + const w = owner.agentic.wallet(made.wallet); + const hook = jest.fn(); + const before = await count(made.wallet); + const tx = await w.setLabel('after', { progressHook: hook }); + const receipt = await tx.wait(); + const labelEvents = receipt.logs.flatMap((log) => { + if (log.address.toLowerCase() !== made.wallet.toLowerCase()) return []; + try { + const ev = decodeEventLog({ + abi: v6.abis.wallet, + data: log.data, + topics: log.topics, + }); + return ev.eventName === 'LabelSet' ? [ev.args.label] : []; + } catch { + return []; + } + }); + expect(labelEvents).toEqual(['after']); + expect((await w.info()).label).toBe('after'); + expect( + (await owner.agentic.list()).wallets.find( + (x) => x.address === made.wallet + )?.label + ).toBe('after'); + expect(await count(made.wallet)).toBe(before); + expect(hook).toHaveBeenCalledWith( + expect.objectContaining({ id: 'AGENTIC-TX-199-01' }) + ); + await w.setLabel(''); + expect((await w.info()).label).toBe(`AGW ${made.index + 1}`); + expect(await count(made.wallet)).toBe(before); + }); + + it('direct contract rename changes no checkpoint; subsequent SDK reads show it', async () => { + const made = await owner.agentic.create('before', { rules: [] }); + const before = await count(made.wallet); + await h.write(0, made.wallet, v6.abis.wallet, 'setLabel', ['direct']); + expect(await count(made.wallet)).toBe(before); + expect((await owner.agentic.wallet(made.wallet).info()).label).toBe( + 'direct' + ); + }); + + it('accepts exactly 64 UTF-8 bytes and rejects invalid create/rename without changing count or state', async () => { + const unicode = '🙂'.repeat(16); + const made = await owner.agentic.create(unicode, { rules: [] }); + const w = owner.agentic.wallet(made.wallet); + await w.setLabel('a'.repeat(64)); + const before = await count(made.wallet); + const next = await owner.agentic.derive(); + for (const invalid of ['a'.repeat(65), '🙂'.repeat(17)]) { + await expect(w.setLabel(invalid)).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.INVALID_RULE, + }); + await expect( + owner.agentic.create(invalid, { rules: [] }) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.INVALID_RULE }); + await expect( + h.publicClient.simulateContract({ + address: made.wallet, + abi: v6.abis.wallet, + functionName: 'setLabel', + args: [invalid], + account: h.wallets[0].account!.address, + }) + ).rejects.toThrow('LabelTooLong'); + } + expect(await owner.agentic.derive()).toEqual(next); + expect(await count(made.wallet)).toBe(before); + expect((await w.info()).label).toBe('a'.repeat(64)); + }); + + it('non-owner and read-only SDK calls cannot rename; actual contract also rejects non-owner', async () => { + const made = await owner.agentic.create('owner-only', { rules: [] }); + const agent = await h.client(1); + await expect( + agent.agentic.wallet(made.wallet).setLabel('attack') + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.NOT_WALLET_OWNER }); + const ro = await h.readOnlyClient(0); + await expect( + ro.agentic.wallet(made.wallet).setLabel('attack') + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.READ_ONLY }); + await expect( + h.publicClient.simulateContract({ + address: made.wallet, + abi: v6.abis.wallet, + functionName: 'setLabel', + args: ['attack'], + account: h.wallets[1].account!.address, + }) + ).rejects.toThrow('CallerIsNotOwner'); + expect((await owner.agentic.wallet(made.wallet).info()).label).toBe( + 'owner-only' + ); + expect(await count(made.wallet)).toBe(BigInt(0)); + }); +}); diff --git a/packages/core/__agw-local__/native-multi-action.spec.ts b/packages/core/__agw-local__/native-multi-action.spec.ts new file mode 100644 index 00000000..f49dddc6 --- /dev/null +++ b/packages/core/__agw-local__/native-multi-action.spec.ts @@ -0,0 +1,267 @@ +/** + * Multi-action native rules against the real pinned v6 contracts: one rule ID + * allows several Push functions, each metered by its own stored terms. + * Unified section-6 public shape; the contract support + * (AGW MAX_NATIVE_ACTIONS = 8) is what these tests exercise. + */ +import { + encodeFunctionData, + getAddress, + parseAbi, + type Address, + type Hex, +} from 'viem'; +import { AgenticRevertError, CHAIN, type Rule, type PushChain } from '../src'; +import { PUSH_BATCH_EXECUTOR_ADDRESS } from '../src/lib/constants/chain'; +import { startHarness, type Harness } from './harness'; +const ABI = parseAbi([ + 'function increment()', + 'function counter() view returns (uint256)', + 'function deposit(address beneficiary, uint256 amount) payable', + 'function lastBeneficiary() view returns (address)', + 'function received() view returns (uint256)', +]); +const WALLET = parseAbi(['function checkpointCount() view returns (uint64)']); +const beneficiary = getAddress('0x00000000000000000000000000000000000b0b0b'); +let h: Harness; +let owner: PushChain; +let previousExecutor: Address | undefined; +beforeAll(async () => { + h = await startHarness(18553); + previousExecutor = PUSH_BATCH_EXECUTOR_ADDRESS[CHAIN.PUSH_LOCALNET]; + PUSH_BATCH_EXECUTOR_ADDRESS[CHAIN.PUSH_LOCALNET] = await h.deploy( + 0, + 'HarnessAtomicExecutor', + 'HarnessFixtures.sol' + ); + owner = await h.client(0); +}); +afterAll(async () => { + if (previousExecutor) + PUSH_BATCH_EXECUTOR_ADDRESS[CHAIN.PUSH_LOCALNET] = previousExecutor; + else delete PUSH_BATCH_EXECUTOR_ADDRESS[CHAIN.PUSH_LOCALNET]; + await h?.stop(); +}); +const now = async () => Number((await h.publicClient.getBlock()).timestamp); +const counter = () => + h.publicClient.readContract({ + address: h.addresses.target, + abi: ABI, + functionName: 'counter', + }); +const increment = () => + encodeFunctionData({ abi: ABI, functionName: 'increment' }); +const deposit = (to: Address, amount: bigint) => + encodeFunctionData({ abi: ABI, functionName: 'deposit', args: [to, amount] }); +async function rule(): Promise { + return { + agent: h.wallets[1].account!.address, + validUntil: (await now()) + 3600, + allowedCalls: [ + { + target: h.addresses.target, + selector: 'increment()', + }, + { + target: h.addresses.target, + selector: 'deposit(address,uint256)', + pins: [ + { arg: 0, expected: beneficiary }, + { arg: 1, max: BigInt(10) }, + ], + }, + ], + }; +} +describe('multi-action native rules (real v6 contracts)', () => { + let wallet: Address; + let rulesId: Hex; + let agent: PushChain; + beforeAll(async () => { + const created = await owner.agentic.create('multi-action', { + rules: [await rule()], + }); + wallet = created.wallet; + rulesId = created.rulesIds[0]; + agent = await h.client(1, { agenticWallet: wallet }); + }); + it('grants both functions under ONE rule ID and reads them back in order', async () => { + const { rules } = await owner.agentic.wallet(wallet).rules.list(); + expect(rules.map((r) => r.rulesId)).toEqual([rulesId]); + const decoded = rules[0].rule as Rule; + expect(decoded.allowedCalls.map((a) => a.selector)).toEqual([ + '0xd09de08a', + '0x47e7ef24', + ]); + expect(rules[0].spent).toMatchObject({ + kind: 'native', + actions: [ + expect.objectContaining({ callsUsed: 0 }), + expect.objectContaining({ callsUsed: 0 }), + ], + }); + expect(decoded.allowedCalls[1]).toMatchObject({ + pins: [ + { + arg: 0, + expected: `0x${'0'.repeat(24)}${beneficiary.slice(2).toLowerCase()}`, + }, + { arg: 1, max: BigInt(10) }, + ], + }); + }); + it('the agent can call each allowed function; each is checked against its own terms', async () => { + const before = await counter(); + const t1 = await agent.universal.sendTransaction({ + to: h.addresses.target, + data: increment(), + }); + expect((await t1.wait()).status).toBe(1); + expect(t1.agentic?.rulesId).toBe(rulesId); + const t2 = await agent.universal.sendTransaction({ + to: h.addresses.target, + data: deposit(beneficiary, BigInt(5)), + }); + expect((await t2.wait()).status).toBe(1); + expect(t2.agentic?.rulesId).toBe(rulesId); + expect(await counter()).toBe(before + BigInt(2)); + expect( + await h.publicClient.readContract({ + address: h.addresses.target, + abi: ABI, + functionName: 'lastBeneficiary', + }) + ).toBe(beneficiary); + }); + it('per-action limits still apply: a wrong pin and an over-cap amount are rejected on-chain', async () => { + const wrongPin = await agent.universal + .sendTransaction({ + to: h.addresses.target, + data: deposit(h.wallets[3].account!.address, BigInt(5)), + }) + .catch((e) => e); + expect(wrongPin).toBeInstanceOf(AgenticRevertError); + expect(wrongPin.decodedError?.name).toBe( + 'PolicyCheckReverted(ArgPinMismatch)' + ); + const overCap = await agent.universal + .sendTransaction({ + to: h.addresses.target, + data: deposit(beneficiary, BigInt(11)), + }) + .catch((e) => e); + expect(overCap).toBeInstanceOf(AgenticRevertError); + }); + it('a function outside the rule’s actions is rejected on-chain', async () => { + const err = await agent.universal + .sendTransaction({ + to: h.addresses.target, + data: encodeFunctionData({ abi: ABI, functionName: 'received' }), + }) + .catch((e) => e); + expect(err).toBeInstanceOf(AgenticRevertError); + }); + it('per-action spend is independent across repeated calls', async () => { + await ( + await agent.universal.sendTransaction({ + to: h.addresses.target, + data: increment(), + }) + ).wait(); + await ( + await agent.universal.sendTransaction({ + to: h.addresses.target, + data: increment(), + }) + ).wait(); + await ( + await agent.universal.sendTransaction({ + to: h.addresses.target, + data: deposit(beneficiary, BigInt(5)), + }) + ).wait(); + expect( + (await owner.agentic.wallet(wallet).rules.get(rulesId)).spent + ).toMatchObject({ + kind: 'native', + actions: [ + { callsUsed: 3, amountSpent: BigInt(0) }, + { callsUsed: 2, amountSpent: BigInt(0) }, + ], + }); + }); + it('one atomic agent batch can mix functions of the same rule', async () => { + const created = await owner.agentic.create('multi-action-batch', { + rules: [await rule()], + }); + const batchAgent = await h.client(1, { agenticWallet: created.wallet }); + const before = await counter(); + const tx = await batchAgent.universal.sendTransaction({ + to: h.addresses.target, + data: [ + { to: h.addresses.target, value: BigInt(0), data: increment() }, + { + to: h.addresses.target, + value: BigInt(0), + data: deposit(beneficiary, BigInt(7)), + }, + ], + }); + expect((await tx.wait()).status).toBe(1); + expect(tx.agentic?.rulesId).toBe(created.rulesIds[0]); + expect(await counter()).toBe(before + BigInt(2)); + // All-or-nothing: an over-cap item reverts the whole batch, including the increment. + const mid = await counter(); + const bad = await batchAgent.universal + .sendTransaction({ + to: h.addresses.target, + data: [ + { to: h.addresses.target, value: BigInt(0), data: increment() }, + { + to: h.addresses.target, + value: BigInt(0), + data: deposit(beneficiary, BigInt(11)), + }, + ], + }) + .catch((e) => e); + expect(bad).toBeInstanceOf(AgenticRevertError); + expect(await counter()).toBe(mid); + }); + it('rules.update replaces a multi-action rule atomically, asserting every action’s spend', async () => { + const before = (await h.publicClient.readContract({ + address: wallet, + abi: WALLET, + functionName: 'checkpointCount', + })) as bigint; + const replacement: Rule = { + ...(await rule()), + allowedCalls: [(await rule()).allowedCalls[0]], + }; + const res = await owner.agentic + .wallet(wallet) + .rules.update({ rules: [{ rulesId, rule: replacement }] }); + // 2 assertions + revoke + grant = 4 OWNER_ACTION, then RULES_REVOKED and RULES_GRANTED. + expect( + (await h.publicClient.readContract({ + address: wallet, + abi: WALLET, + functionName: 'checkpointCount', + })) as bigint + ).toBe(before + BigInt(6)); + const { rules } = await owner.agentic.wallet(wallet).rules.list(); + expect(rules.map((r) => r.rulesId)).toEqual([res.rules[0].rulesId]); + expect((rules[0].rule as Rule).allowedCalls).toHaveLength(1); + // The new rule starts with fresh counters: increment() works again. + expect( + ( + await ( + await agent.universal.sendTransaction({ + to: h.addresses.target, + data: increment(), + }) + ).wait() + ).status + ).toBe(1); + }); +}); diff --git a/packages/core/__agw-local__/preset-acceptance.spec.ts b/packages/core/__agw-local__/preset-acceptance.spec.ts new file mode 100644 index 00000000..34250b34 --- /dev/null +++ b/packages/core/__agw-local__/preset-acceptance.spec.ts @@ -0,0 +1,109 @@ +/** Exact default preset output -> real AGW/URP -> exact public readback. + * The gas PRC20 and gateway are local stand-ins. This proves SDK preservation, + * not live route availability or delivery. + */ +import { getAddress, parseAbi, zeroAddress } from 'viem'; +import { startHarness, type Harness } from './harness'; +import { PushChain } from '../src'; +import type { AgenticRuntime } from '../src/lib/agentic/runtime'; +import * as accountLookup from '../src/lib/universal/account/account'; +import { configId } from '../src/lib/agentic/codec/ids'; +import { + PRESET_ACCEPTANCE_CASES, + expectStoredPreset, +} from '../__e2e__/shared/agw-preset-acceptance'; +const CORE = parseAbi([ + 'function setGasToken(string,address)', + 'function setSourceTokenAddress(string)', +]); +const CEA = getAddress('0x000000000000000000000000000000000000cea1'); +const runtime = (c: PushChain) => + (c as unknown as { agenticRuntime: AgenticRuntime }).agenticRuntime; + +describe('unchanged default preset contract acceptance', () => { + let h: Harness, owner: PushChain, lookup: jest.SpyInstance; + const gasTokens = new Set(); + beforeAll(async () => { + lookup = jest + .spyOn(accountLookup, 'convertExecutorToOrigin') + .mockResolvedValue({ account: null, exists: false }); + h = await startHarness(18555); + owner = await h.client(0); + runtime(owner).resolveCEA = async () => ({ + cea: CEA, + isDeployed: false, + }); + runtime(owner).resolvePrc20 = () => { + throw new Error('Presets must not resolve a non-native route'); + }; + }); + afterAll(async () => { + try { + await h?.stop(); + } finally { + lookup?.mockRestore(); + } + }); + it.each(PRESET_ACCEPTANCE_CASES)( + '%s %s preserves every generated asset, cap, function and pin', + async (category, chainNamespace) => { + const generated = PushChain.utils.agentic.presets.get(category, { + chainNamespace, + agent: h.wallets[1].account!.address, + }); + const before = JSON.stringify(generated.rules, (_k, v) => + typeof v === 'bigint' ? String(v) : v + ); + // Presets send only native ETH, which resolves to the chain's gas PRC20. + for (const asset of generated.rules[0].assets!) { + const source = getAddress( + typeof asset.token === 'string' ? asset.token : asset.token.address + ); + expect(source).toBe(zeroAddress); + if (!gasTokens.has(chainNamespace)) { + const mapped = await h.deploy( + 0, + 'HarnessPRC20', + 'HarnessFixtures.sol', + [chainNamespace, 18] + ); + // Live gas PRC20s report an empty or zero source token. + await h.write(0, mapped, CORE, 'setSourceTokenAddress', ['']); + await h.write(0, h.addresses.universalCore, CORE, 'setGasToken', [ + chainNamespace, + mapped, + ]); + gasTokens.add(chainNamespace); + } + } + const made = await owner.agentic.create('preset-exact', { + rules: generated.rules, + }); + const records = await owner.agentic.wallet(made.wallet).rules.list(); + expect(records.rules).toHaveLength(1); + const record = await owner.agentic + .wallet(made.wallet) + .rules.get(made.rulesIds[0]); + expectStoredPreset(generated.rules[0], record); + // Readback maps pins to agentic:wallet; check the stored destination itself. + const [action] = await h.publicClient.readContract({ + address: h.addresses.engine, + abi: h.generation.contracts.abis.engine, + functionName: 'getEnabledActions', + args: [made.wallet, made.rulesIds[0]], + }); + const config = await h.publicClient.readContract({ + address: h.addresses.rulesPolicy, + abi: h.generation.contracts.abis.policy, + functionName: 'getConfig', + args: [configId(made.wallet, made.rulesIds[0], action), made.wallet], + }); + expect(config.expectedCEA).toBe(CEA); + expect( + JSON.stringify(generated.rules, (_k, v) => + typeof v === 'bigint' ? String(v) : v + ) + ).toBe(before); + } + ); +}); diff --git a/packages/core/__agw-local__/setup.ts b/packages/core/__agw-local__/setup.ts new file mode 100644 index 00000000..c35a8fc5 --- /dev/null +++ b/packages/core/__agw-local__/setup.ts @@ -0,0 +1,18 @@ +/** Actual RPC/actions with a local poll interval, not mocked transactions. */ +jest.mock('viem', () => { + const actual = jest.requireActual('viem'); + return { + ...actual, + // viem 2.27 poll() leaves an already-scheduled wait alive after unwatch. + // Its production 4s default needlessly delays local Jest shutdown. Keep + // real receipt/replacement logic, and configure short local polling. + createPublicClient: (options: { + pollingInterval?: number; + [key: string]: unknown; + }) => + actual.createPublicClient({ + ...options, + pollingInterval: options?.pollingInterval ?? 25, + }), + }; +}); diff --git a/packages/core/__agw-local__/svm-backend.spec.ts b/packages/core/__agw-local__/svm-backend.spec.ts new file mode 100644 index 00000000..c51453c5 --- /dev/null +++ b/packages/core/__agw-local__/svm-backend.spec.ts @@ -0,0 +1,564 @@ +/** Internal SVM lifecycle/execution on actual v6 contracts; no Solana/TSS simulation. */ +import { PublicKey } from '@solana/web3.js'; +import { + encodeFunctionData, + encodeErrorResult, + parseAbi, + type Address, + type Hex, +} from 'viem'; +import { CHAIN, type PushChain } from '../src'; +import type { AgenticRuntime } from '../src/lib/agentic/runtime'; +import { Snapshot } from '../src/lib/agentic/reads/snapshot'; +import { readSvmRule } from '../src/lib/agentic/reads/svm'; +import { + grantSvmWire, + prepareSvmReplacement, + replaceSvmWire, + type SvmWireGrant, +} from '../src/lib/agentic/management/svm'; +import { + resolveSvmContext, + type SvmMetadataProvider, +} from '../src/lib/agentic/management/svm-context'; +import { + prepareSvmAgentExecution, + sendSvmAgentWire, +} from '../src/lib/agentic/execution/svm-send'; +import { + registerIdl, + clearRegistry, +} from '../src/lib/orchestrator/svm-idl/registry'; +import { v6 } from '../src/lib/agentic/contracts/v6'; +import { wrapSendError } from '../src/lib/agentic/management/common'; +import { startHarness, type Harness } from './harness'; + +const key = (b: string) => `0x${b.repeat(32)}` as Hex; +const GATEWAY = key('22'), + PROGRAM = key('33'), + MINT = key('44'), + MINT2 = key('55'); +const SPL = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', + TOKEN2022 = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'; +const TOKEN = parseAbi([ + 'function allowance(address,address) view returns(uint256)', + 'function mint(address,uint256)', + 'function approve(address,uint256) returns (bool)', + 'function setSourceTokenAddress(string)', + 'function setSourceChainNamespace(string)', +]); +const CORE = parseAbi([ + 'function setGasToken(string,address)', + 'function getOutboundTxGasAndFees(address,uint256) view returns (address,uint256,uint256,uint256,string,uint256)', +]); +const rt = (c: PushChain) => + (c as unknown as { agenticRuntime: AgenticRuntime }).agenticRuntime; +const metadata: SvmMetadataProvider = { + gateway: async (chain) => ({ chainNamespace: chain, program: GATEWAY }), + mint: async (_chain, address) => ({ + mint: address, + tokenProgram: address === MINT2 ? TOKEN2022 : SPL, + }), +}; + +describe('internal prepared SVM backend on v6', () => { + let h: Harness, owner: PushChain, tokens: Address[]; + beforeAll(async () => { + h = await startHarness(18554); + owner = await h.client(0); + tokens = []; + for (const source of ['', MINT, MINT2]) { + const token = await h.deploy(0, 'HarnessPRC20', 'HarnessFixtures.sol', [ + CHAIN.SOLANA_DEVNET, + 9, + ]); + await h.write(0, token, TOKEN, 'setSourceTokenAddress', [source]); + tokens.push(token); + } + await h.write(0, h.addresses.universalCore, CORE, 'setGasToken', [ + CHAIN.SOLANA_DEVNET, + tokens[0], + ]); + }); + afterEach(() => { + jest.restoreAllMocks(); + clearRegistry(); + }); + afterAll(async () => h?.stop()); + const cfg = async (wallet: Address, id: Hex) => + readSvmRule( + await Snapshot.at(rt(owner).reader), + h.generation, + wallet, + id, + rt(owner).pushChainNamespace + ); + function configure(runtime: AgenticRuntime) { + runtime.quoteOutbound = async (token, limit) => { + const [, nativeValueForGas, protocolFee, , , gasLimitUsed] = + await h.publicClient.readContract({ + address: h.addresses.universalCore, + abi: CORE, + functionName: 'getOutboundTxGasAndFees', + args: [token, limit], + }); + return { nativeValueForGas, protocolFee, gasLimitUsed }; + }; + } + async function setup() { + const { wallet } = await owner.agentic.create('svm-backend', { rules: [] }); + const caps = tokens.map((token) => ({ + token, + maxPerCall: BigInt(5), + maxTotal: BigInt(10), + })); + const resolved = await resolveSvmContext( + await Snapshot.at(rt(owner).reader), + wallet, + CHAIN.SOLANA_DEVNET, + caps, + metadata + ); + const terms = { + ...resolved, + validUntil: Math.floor(Date.now() / 1000) + 3600, + maxGasPerCall: BigInt(10) ** BigInt(16), + programs: [ + { + program: PROGRAM, + discriminator: '0x0102030405060708' as Hex, + discriminatorLen: 8, + dataless: false, + maxAccounts: 3, + }, + ], + pins: resolved.ceaAccounts.map((expected, accountIndex) => ({ + ruleIndex: 0, + accountIndex, + expected, + })), + dataPins: [], + }; + const input: SvmWireGrant = { + agent: h.wallets[1].account!.address, + chainNamespace: CHAIN.SOLANA_DEVNET, + terms, + }; + const grant = await grantSvmWire(rt(owner), h.generation, wallet, input); + registerIdl({ + address: new PublicKey(Buffer.from(PROGRAM.slice(2), 'hex')).toBase58(), + metadata: { name: 'fixture', version: '1', spec: '0.1.0' }, + instructions: [ + { + name: 'go', + discriminator: [1, 2, 3, 4, 5, 6, 7, 8], + accounts: [ + { name: 'cea_authority', writable: true }, + ...resolved.ceaAccounts.slice(1).map((k, i) => ({ + name: `ata${i}`, + writable: true, + address: new PublicKey(Buffer.from(k.slice(2), 'hex')).toBase58(), + })), + ], + args: [], + }, + ], + }); + await h.publicClient.waitForTransactionReceipt({ + hash: await h.wallets[4].sendTransaction({ + to: wallet, + value: BigInt(10) ** BigInt(18), + account: h.wallets[4].account!, + chain: h.wallets[4].chain, + }), + }); + for (const token of tokens) { + await h.write(0, token, TOKEN, 'mint', [wallet, BigInt(100)]); + await h.write(0, wallet, v6.abis.wallet, 'execute', [ + key('00'), + v6.packSingle({ + target: token, + value: BigInt(0), + data: encodeFunctionData({ + abi: TOKEN, + functionName: 'approve', + args: [h.addresses.gateway, BigInt(100)], + }), + }), + ]); + } + const agent = await h.client(1); + configure(rt(agent)); + const request = (token = tokens[2], amount = BigInt(5)) => ({ + wallet, + rulesId: grant.rulesId, + token, + amount, + gasLimit: BigInt(200_000), + program: PROGRAM, + instructionData: new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]), + }); + return { wallet, id: grant.rulesId, input, agent, request }; + } + it('reads all source assets/counters/pins losslessly through public SVM reads', async () => { + const s = await setup(), + stored = await cfg(s.wallet, s.id); + expect(stored.config.assets.map((a) => a.token)).toEqual(tokens); + expect(stored.config.assets.map((a) => a.spent)).toEqual([ + BigInt(0), + BigInt(0), + BigInt(0), + ]); + expect(stored.config.pins).toEqual(s.input.terms.pins); + expect(stored.chainNamespace).toBe(CHAIN.SOLANA_DEVNET); + await expect( + owner.agentic.wallet(s.wallet).rules.get(s.id) + ).resolves.toMatchObject({ + rule: { format: 'decoded', pins: s.input.terms.pins }, + }); + }); + it('runs context, IDL, quote, allowance, wrapping and real token pull/burn as the agent', async () => { + const s = await setup(); + const sent = await sendSvmAgentWire( + rt(s.agent), + h.generation, + s.request(), + metadata + ); + expect((await sent.tx.wait()).status).toBe(1); + const root = await h.publicClient.getTransactionReceipt({ + hash: sent.tx.hash as Hex, + }); + expect(root.from).toBe(h.wallets[1].account!.address.toLowerCase()); + expect( + (await cfg(s.wallet, s.id)).config.assets.map((a) => a.spent) + ).toEqual([BigInt(0), BigInt(0), BigInt(5)]); + }); + it('refuses the wrong signer before execute', async () => { + const s = await setup(), + execute = jest.spyOn(rt(owner), 'execute'); + await expect( + prepareSvmAgentExecution(rt(owner), h.generation, s.request(), metadata) + ).rejects.toMatchObject({ code: 'NOT_OWNER_OR_AGENT' }); + expect(execute).not.toHaveBeenCalled(); + }); + it('automatically approves and clears the gateway on the agent path', async () => { + const s = await setup(); + await h.write(0, s.wallet, v6.abis.wallet, 'execute', [ + key('00'), + v6.packSingle({ + target: tokens[2], + value: BigInt(0), + data: encodeFunctionData({ + abi: TOKEN, + functionName: 'approve', + args: [h.addresses.gateway, BigInt(0)], + }), + }), + ]); + const execute = jest.spyOn(rt(s.agent), 'execute'); + const sent = await sendSvmAgentWire( + rt(s.agent), + h.generation, + s.request(), + metadata + ); + expect((await sent.tx.wait()).status).toBe(1); + expect(execute).toHaveBeenCalledTimes(1); + expect( + await h.publicClient.readContract({ + address: tokens[2], + abi: TOKEN, + functionName: 'allowance', + args: [s.wallet, h.addresses.gateway], + }) + ).toBe(BigInt(0)); + }); + it('atomically replaces and resets every asset, recording five checkpoints', async () => { + const s = await setup(); + await ( + await sendSvmAgentWire(rt(s.agent), h.generation, s.request(), metadata) + ).tx.wait(); + const before = await h.publicClient.readContract({ + address: s.wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }); + const next = await replaceSvmWire( + rt(owner), + h.generation, + s.wallet, + s.id, + s.input + ); + expect( + (await cfg(s.wallet, next.rulesId)).config.assets.map((a) => a.spent) + ).toEqual([BigInt(0), BigInt(0), BigInt(0)]); + await expect(cfg(s.wallet, s.id)).rejects.toMatchObject({ + code: 'RULE_NOT_FOUND', + }); + expect( + await h.publicClient.readContract({ + address: s.wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }) + ).toBe(before + BigInt(5)); + }); + it('a second-asset spend after snapshot rolls back revoke/grant/checkpoints', async () => { + const s = await setup(), + prepared = await prepareSvmReplacement( + rt(owner), + h.generation, + s.wallet, + s.id, + s.input + ); + await ( + await sendSvmAgentWire( + rt(s.agent), + h.generation, + s.request(tokens[1]), + metadata + ) + ).tx.wait(); + const before = await h.publicClient.readContract({ + address: s.wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }); + const error = await rt(owner) + .execute({ to: s.wallet, value: BigInt(0), data: prepared.data }) + .catch(wrapSendError); + expect(error).toMatchObject({ + decodedError: { name: 'AssetSpentMismatch' }, + }); + expect((await cfg(s.wallet, s.id)).config.assets[1].spent).toBe(BigInt(5)); + expect( + await h.publicClient.readContract({ + address: s.wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }) + ).toBe(before); + }); + it('grant initialization failure after revoke rolls back the old rule', async () => { + const s = await setup(); + const alternate = await h.deploy(0, 'HarnessPRC20', 'HarnessFixtures.sol', [ + CHAIN.SOLANA_DEVNET, + 9, + ]); + const input = { + ...s.input, + terms: { + ...s.input.terms, + assets: [ + { token: alternate, maxPerCall: BigInt(5), maxTotal: BigInt(10) }, + ], + }, + }; + const prepared = await prepareSvmReplacement( + rt(owner), + h.generation, + s.wallet, + s.id, + input + ); + await h.write(0, alternate, TOKEN, 'setSourceChainNamespace', [ + CHAIN.ETHEREUM_SEPOLIA, + ]); + const error = await rt(owner) + .execute({ to: s.wallet, value: BigInt(0), data: prepared.data }) + .catch(wrapSendError); + expect(error).toMatchObject({ decodedError: { name: 'ChainMismatch' } }); + expect((await cfg(s.wallet, s.id)).config.assets).toHaveLength(3); + }); + it('generic owner revocation disables a SVM rule without public decoding', async () => { + const s = await setup(); + await (await owner.agentic.wallet(s.wallet).rules.delete([s.id])).wait(); + await expect(cfg(s.wallet, s.id)).rejects.toMatchObject({ + code: 'RULE_NOT_FOUND', + }); + }); + it('returns the receipt ID when another owner grant advances the nonce during replacement', async () => { + const s = await setup(), + execute = rt(owner).execute; + let intercepted = false; + rt(owner).execute = async (params, opts) => { + if (!intercepted) { + intercepted = true; + await grantSvmWire(rt(owner), h.generation, s.wallet, s.input); + } + return execute(params, opts); + }; + try { + const next = await replaceSvmWire( + rt(owner), + h.generation, + s.wallet, + s.id, + s.input + ); + expect((await cfg(s.wallet, next.rulesId)).config.assets).toHaveLength(3); + await expect(cfg(s.wallet, s.id)).rejects.toMatchObject({ + code: 'RULE_NOT_FOUND', + }); + } finally { + rt(owner).execute = execute; + } + }); + it.each(['balance', 'revocation'])( + 'on-chain %s change after preflight refuses submission without metering', + async (kind) => { + const s = await setup(), + runtime = rt(s.agent), + original = runtime.execute; + const before = await cfg(s.wallet, s.id); + const nonce = await h.publicClient.getTransactionCount({ + address: h.wallets[1].account!.address, + blockTag: 'pending', + }); + let ticks: bigint | undefined; + runtime.execute = async (params, options) => { + if (kind === 'revocation') + await ( + await owner.agentic.wallet(s.wallet).rules.delete([s.id]) + ).wait(); + else + await h.write(0, s.wallet, v6.abis.wallet, 'execute', [ + key('00'), + v6.packSingle({ + target: tokens[2], + value: BigInt(0), + data: encodeFunctionData({ + abi: parseAbi([ + 'function approve(address,uint256) returns(bool)', + 'function transfer(address,uint256) returns(bool)', + ]), + functionName: kind === 'allowance' ? 'approve' : 'transfer', + args: [ + kind === 'allowance' + ? h.addresses.gateway + : h.wallets[0].account!.address, + kind === 'allowance' ? BigInt(0) : BigInt(100), + ], + }), + }), + ]); + ticks = await h.publicClient.readContract({ + address: s.wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }); + return original(params, options); + }; + try { + const error = await sendSvmAgentWire( + runtime, + h.generation, + s.request(), + metadata + ).catch((e) => e); + expect(error.name).toBe('AgenticRevertError'); + if (kind === 'revocation') + expect(error.decodedError?.name).toBe('CallerIsNotAgent'); + else { + const name = kind === 'allowance' ? 'LowAllowance' : 'LowBalance'; + const data = encodeErrorResult({ + abi: parseAbi([`error ${name}()`]), + errorName: name, + }); + expect(error.message).toContain(data); + } + const stored = await h.publicClient.readContract({ + address: h.addresses.rulesPolicy, + abi: v6.abis.policy, + functionName: 'getSvmConfig', + args: [before.configId, s.wallet], + }); + expect(stored.assets.map((a) => a.spent)).toEqual([ + BigInt(0), + BigInt(0), + BigInt(0), + ]); + expect( + await h.publicClient.getTransactionCount({ + address: h.wallets[1].account!.address, + blockTag: 'pending', + }) + ).toBe(nonce); + expect( + await h.publicClient.readContract({ + address: s.wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }) + ).toBe(ticks); + } finally { + runtime.execute = original; + } + } + ); + it('an RPC outage during rule reads fails before execute or signing', async () => { + const s = await setup(), + runtime = rt(s.agent), + reader = runtime.reader, + read = reader.readContract.bind(reader); + const execute = jest.spyOn(runtime, 'execute'); + const failedReader = { + ...reader, + readContract: async (args: Parameters[0]) => { + if (args.functionName === 'getSvmConfig') + throw new Error('fixture RPC outage'); + return read(args); + }, + }; + const failed = { ...runtime, reader: failedReader }; + await expect( + sendSvmAgentWire(failed, h.generation, s.request(), metadata) + ).rejects.toMatchObject({ code: 'RULE_READ_FAILED' }); + expect(execute).not.toHaveBeenCalled(); + expect( + (await cfg(s.wallet, s.id)).config.assets.map((a) => a.spent) + ).toEqual([BigInt(0), BigInt(0), BigInt(0)]); + }); + it('receipt failure after a mined grant retains the hash and does not retry', async () => { + const s = await setup(), + runtime = rt(owner), + original = runtime.execute; + let hash: Hex | undefined, + submissions = 0; + runtime.execute = async (params, options) => { + submissions++; + const tx = await original(params, options); + hash = tx.hash as Hex; + await h.publicClient.waitForTransactionReceipt({ hash }); + tx.wait = async () => { + throw new Error('fixture receipt outage'); + }; + return tx; + }; + try { + await expect( + grantSvmWire(runtime, h.generation, s.wallet, s.input) + ).rejects.toMatchObject({ + code: 'RECEIPT_UNAVAILABLE', + details: { txHash: expect.any(String) }, + }); + expect(submissions).toBe(1); + expect(hash).toBeDefined(); + expect( + await h.publicClient.readContract({ + address: s.wallet, + abi: v6.abis.wallet, + functionName: 'grantNonce', + }) + ).toBe(BigInt(2)); + expect( + (await h.publicClient.getTransactionReceipt({ hash: hash! })).status + ).toBe('success'); + } finally { + runtime.execute = original; + } + }); +}); diff --git a/packages/core/__agw-local__/svm-differential.spec.ts b/packages/core/__agw-local__/svm-differential.spec.ts new file mode 100644 index 00000000..53385abb --- /dev/null +++ b/packages/core/__agw-local__/svm-differential.spec.ts @@ -0,0 +1,418 @@ +/** Seeded, independent SDK-vs-contract comparisons. No live transport/funding. */ +import { + encodeAbiParameters, + encodeFunctionData, + parseAbi, + type Hex, +} from 'viem'; +import { CHAIN } from '../src/lib/constants/enums'; +import { buildSession, encodeEnvelope } from '../src/lib/agentic/codec/session'; +import { + SVM_TERMS_PARAM, + validateSvmTerms, + type SvmTermsWire, +} from '../src/lib/agentic/codec/svm-terms'; +import { + encodeAgwSvmPayload, + validateAgwSvmPayload, +} from '../src/lib/agentic/execution/svm-payload'; +import { v6 } from '../src/lib/agentic/contracts/v6'; +import { deriveAgwSvmValueAccounts } from '../src/lib/agentic/codec/svm-accounts'; +import { decodeAgenticRevert } from '../src/lib/agentic/revert'; +import { startHarness, type Harness } from './harness'; +const key = (b: string) => `0x${b.repeat(32)}` as Hex; +const GATEWAY = key('22'), + PROGRAM = key('33'); +const TOKEN = parseAbi([ + 'function mint(address,uint256)', + 'function approve(address,uint256) returns(bool)', +]); +const seed = 0x5a17; +let rng = seed; +function random(n: number) { + rng = (Math.imul(rng, 1664525) + 1013904223) >>> 0; + return rng % n; +} +const clone = (t: T): T => structuredClone(t); + +describe('seeded SVM differential validation', () => { + let h: Harness, wallet: `0x${string}`, token: `0x${string}`; + let terms: SvmTermsWire; + beforeAll(async () => { + h = await startHarness(18555); + token = await h.deploy(0, 'HarnessPRC20', 'HarnessFixtures.sol', [ + CHAIN.SOLANA_DEVNET, + 9, + ]); + wallet = ( + await (await h.client(0)).agentic.create('differential', { rules: [] }) + ).wallet; + const derived = deriveAgwSvmValueAccounts(wallet, GATEWAY, []); + terms = { + ...derived, + validUntil: Math.floor(Date.now() / 1000) + 3600, + assets: [{ token, maxPerCall: BigInt(10), maxTotal: BigInt(100) }], + maxGasPerCall: BigInt(10) ** BigInt(16), + programs: [ + { + program: PROGRAM, + discriminator: '0x0100000000000000', + discriminatorLen: 1, + dataless: false, + maxAccounts: 1, + }, + ], + pins: [{ ruleIndex: 0, accountIndex: 0, expected: derived.expectedCEA }], + dataPins: [], + }; + }); + afterAll(async () => h?.stop()); + const session = (t: SvmTermsWire) => + buildSession({ + validator: h.addresses.validator, + rulesPolicy: h.addresses.rulesPolicy, + agent: h.wallets[1].account!.address, + actions: [ + { + target: h.addresses.gateway, + selector: '0x77b86bec', + initData: encodeEnvelope( + CHAIN.SOLANA_DEVNET, + encodeAbiParameters([SVM_TERMS_PARAM], [t]) + ), + }, + ], + }); + + it('grant-shape corpus agrees with the actual URP initializer', async () => { + const cases: { name: string; terms: SvmTermsWire }[] = []; + const add = (name: string, mutate: (t: SvmTermsWire) => void) => { + const t = clone(terms); + mutate(t); + cases.push({ name, terms: t }); + }; + add('base', () => { + /* Keep the baseline unchanged for the first comparison. */ + }); + for (const per of [ + BigInt(0), + BigInt(1), + (BigInt(1) << BigInt(64)) - BigInt(1), + (BigInt(1) << BigInt(256)) - BigInt(1), + ]) + for (const total of [ + BigInt(0), + BigInt(1), + (BigInt(1) << BigInt(64)) - BigInt(1), + (BigInt(1) << BigInt(256)) - BigInt(1), + ]) + add(`caps-${per}-${total}`, (t) => { + t.assets = [{ token, maxPerCall: per, maxTotal: total }]; + }); + add('zero-pc-hard-cap', (t) => { + t.maxGasPerCall = BigInt(0); + }); + add('zero-assets', (t) => { + t.assets = []; + }); + add('duplicate-asset', (t) => { + t.assets = [...t.assets, t.assets[0]]; + }); + add('zero-token', (t) => { + t.assets = [ + { ...t.assets[0], token: '0x0000000000000000000000000000000000000000' }, + ]; + }); + add('empty-programs', (t) => { + t.programs = []; + }); + add('zero-cea', (t) => { + t.expectedCEA = key('00'); + }); + add('zero-gateway', (t) => { + t.gatewayProgram = key('00'); + }); + add('zero-expiry', (t) => { + t.validUntil = 0; + }); + add('no-pins', (t) => { + t.pins = []; + }); + add('duplicate-pin', (t) => { + t.pins = [...t.pins, t.pins[0]]; + }); + add('pin-rule-outside', (t) => { + t.pins[0].ruleIndex = 1; + }); + add('pin-index-outside', (t) => { + t.pins[0].accountIndex = 64; + }); + add('no-cea-coverage', (t) => { + t.ceaAccounts = []; + }); + add('duplicate-cea', (t) => { + t.ceaAccounts = [t.expectedCEA, t.expectedCEA]; + }); + add('forbidden-program', (t) => { + t.programs[0].program = t.gatewayProgram; + }); + add('overlapping-program-rules', (t) => { + t.programs = [...t.programs, { ...t.programs[0] }]; + t.pins = [...t.pins, { ...t.pins[0], ruleIndex: 1 }]; + }); + for (const count of [0, 1, 63, 64, 65]) + add(`account-count-${count}`, (t) => { + t.programs[0].maxAccounts = count; + }); + for (const len of [0, 1, 8, 9]) + add(`tag-len-${len}`, (t) => { + t.programs[0].discriminatorLen = len; + }); + add('dataless', (t) => { + t.programs[0].dataless = true; + t.programs[0].discriminatorLen = 0; + }); + for (let i = 0; i < 64; i++) { + const mode = random(4), + width = [0, 1, 2, 8, 9, 32, 33][random(7)], + fromEnd = Boolean(random(2)); + const offset = [0, 1, width, 1024 - width, 1024, 1025][random(6)]; + add(`pin-seed-${i}`, (t) => { + t.dataPins = [ + { + ruleIndex: 0, + fromEnd, + offset, + offsetB: width, + len: width, + mode, + expected: key('00'), + num: BigInt(mode === 3 ? random(2) : 0), + den: BigInt(mode === 3 ? random(2) : 0), + }, + ]; + }); + } + const mismatches: string[] = []; + let accepted = 0, + rejected = 0; + const now = Number((await h.publicClient.getBlock()).timestamp); + for (const c of cases) { + let sdk = true, + contract = true; + try { + validateSvmTerms(c.terms, now); + } catch { + sdk = false; + } + try { + await h.publicClient.call({ + to: wallet, + data: v6.encodeGrantRules(session(c.terms)), + account: h.wallets[0].account!.address, + }); + } catch (e) { + contract = false; + expect(decodeAgenticRevert(e)).toBeDefined(); + } + if (contract) accepted++; + else rejected++; + if (sdk !== contract) + mismatches.push(c.name + `: sdk=${sdk},contract=${contract}`); + } + expect(accepted).toBeGreaterThan(0); + expect(rejected).toBeGreaterThan(0); + expect(mismatches).toEqual([]); + console.log( + JSON.stringify({ + corpus: 'svm-grant', + seed, + cases: cases.length, + accepted, + rejected, + mismatches, + }) + ); + }); + + it('payload mutation corpus agrees with actual URP authorization and rejects without metering', async () => { + const t = clone(terms); + t.programs[0].maxAccounts = 255; + t.dataPins = [ + { + ruleIndex: 0, + fromEnd: false, + offset: 1, + offsetB: 0, + len: 1, + mode: 1, + expected: `0x${'00'.repeat(31)}05`, + num: BigInt(0), + den: BigInt(0), + }, + ]; + await h.write(0, wallet, v6.abis.wallet, 'grantRules', [session(t)]); + const [id] = await h.publicClient.readContract({ + address: h.addresses.engine, + abi: v6.abis.engine, + functionName: 'getPermissionIDs', + args: [wallet], + }); + await h.publicClient.waitForTransactionReceipt({ + hash: await h.wallets[4].sendTransaction({ + to: wallet, + value: BigInt(10) ** BigInt(18), + account: h.wallets[4].account!, + chain: h.wallets[4].chain, + }), + }); + await h.write(0, token, TOKEN, 'mint', [wallet, BigInt(100)]); + await h.write(0, wallet, v6.abis.wallet, 'execute', [ + key('00'), + v6.packSingle({ + target: token, + value: BigInt(0), + data: encodeFunctionData({ + abi: TOKEN, + functionName: 'approve', + args: [h.addresses.gateway, BigInt(100)], + }), + }), + ]); + const base = encodeAgwSvmPayload( + PROGRAM, + [{ pubkey: t.expectedCEA, isWritable: true }], + new Uint8Array([1, 5]) + ); + const cases: { name: string; payload: Hex }[] = [ + { name: 'base', payload: base }, + ]; + for (const amount of [0, 4, 5, 6, 255]) + cases.push({ + name: `floor-${amount}`, + payload: encodeAgwSvmPayload( + PROGRAM, + [{ pubkey: t.expectedCEA, isWritable: true }], + new Uint8Array([1, amount]) + ), + }); + cases.push({ + name: 'uncovered-cea-alias', + payload: encodeAgwSvmPayload( + PROGRAM, + [ + { pubkey: t.expectedCEA, isWritable: true }, + { pubkey: t.expectedCEA, isWritable: false }, + ], + new Uint8Array([1, 5]) + ), + }); + cases.push({ + name: 'pin-substitution', + payload: encodeAgwSvmPayload( + PROGRAM, + [{ pubkey: key('66'), isWritable: true }], + new Uint8Array([1, 5]) + ), + }); + for (let i = 0; i < 80; i++) { + const bytes = Buffer.from(base.slice(2), 'hex'); + if (i % 4 === 0) + cases.push({ + name: `truncate-${i}`, + payload: `0x${bytes + .subarray(0, random(bytes.length)) + .toString('hex')}`, + }); + else if (i % 4 === 1) + cases.push({ + name: `trailing-${i}`, + payload: `${base}${random(256).toString(16).padStart(2, '0')}` as Hex, + }); + else { + const at = random(bytes.length); + bytes[at] ^= 1 << random(8); + cases.push({ + name: `flip-${i}-${at}`, + payload: `0x${bytes.toString('hex')}`, + }); + } + } + const mismatches: string[] = []; + let accepted = 0, + rejected = 0; + for (const c of cases) { + let sdk = true, + contract = true; + try { + validateAgwSvmPayload(t, PROGRAM, c.payload); + } catch { + sdk = false; + } + const data = encodeFunctionData({ + abi: parseAbi([ + 'function sendUniversalTxOutbound((bytes recipient,address token,uint256 amount,uint256 gasLimit,uint256 gasPrice,uint256 maxPCForGas,bytes payload,address revertRecipient) req) payable', + ]), + functionName: 'sendUniversalTxOutbound', + args: [ + { + recipient: PROGRAM, + token, + amount: BigInt(1), + gasLimit: BigInt(200_000), + gasPrice: BigInt(0), + maxPCForGas: BigInt(10) ** BigInt(15), + payload: c.payload, + revertRecipient: wallet, + }, + ], + }); + try { + await h.publicClient.simulateContract({ + address: wallet, + abi: v6.abis.wallet, + functionName: 'executeAsAgent', + args: [ + id, + key('00'), + v6.packSingle({ + target: h.addresses.gateway, + value: BigInt(11) * BigInt(10) ** BigInt(14), + data, + }), + ], + account: h.wallets[1].account!.address, + }); + } catch (e) { + contract = false; + expect(decodeAgenticRevert(e)).toBeDefined(); + } + if (contract) accepted++; + else rejected++; + if (sdk !== contract) + mismatches.push(c.name + `: sdk=${sdk},contract=${contract}`); + } + expect(accepted).toBeGreaterThan(0); + expect(rejected).toBeGreaterThan(0); + expect(mismatches).toEqual([]); + // Every case used eth_call; even successful probes cannot spend an asset. + expect( + await h.publicClient.readContract({ + address: token, + abi: parseAbi(['function balanceOf(address) view returns(uint256)']), + functionName: 'balanceOf', + args: [wallet], + }) + ).toBe(BigInt(100)); + console.log( + JSON.stringify({ + corpus: 'svm-payload', + seed, + cases: cases.length, + accepted, + rejected, + mismatches, + }) + ); + }); +}); diff --git a/packages/core/__agw-local__/svm-internals.spec.ts b/packages/core/__agw-local__/svm-internals.spec.ts new file mode 100644 index 00000000..9145a861 --- /dev/null +++ b/packages/core/__agw-local__/svm-internals.spec.ts @@ -0,0 +1,328 @@ +/** Actual v6 SVM URP checks on Anvil. No Solana execution/TSS is simulated. */ +import { encodeFunctionData, parseAbi, type Address, type Hex } from 'viem'; +import { CHAIN } from '../src/lib/constants/enums'; +import { buildSession, encodeEnvelope } from '../src/lib/agentic/codec/session'; +import { configId } from '../src/lib/agentic/codec/ids'; +import { + encodeSvmTerms, + SvmDataPinMode, + UINT64_MAX, + type SvmTermsWire, +} from '../src/lib/agentic/codec/svm-terms'; +import { deriveAgwSvmValueAccounts } from '../src/lib/agentic/codec/svm-accounts'; +import { encodeAgwSvmPayload } from '../src/lib/agentic/execution/svm-payload'; +import { composeAgwSvmAction } from '../src/lib/agentic/execution/svm-outbound'; +import { v6, type SvmConfigRead } from '../src/lib/agentic/contracts/v6'; +import { startHarness, type Harness } from './harness'; + +const key = (b: string) => `0x${b.repeat(32)}` as Hex; +const GATEWAY_PROGRAM = key('22'), + PROGRAM = key('33'), + MINT = key('44'); +const TOKEN = parseAbi([ + 'function mint(address,uint256)', + 'function approve(address,uint256) returns (bool)', +]); +const UINT256_MAX = BigInt(2) ** BigInt(256) - BigInt(1); + +describe('internal SVM codec/payloads against actual v6 contracts', () => { + let h: Harness, token: Address; + beforeAll(async () => { + h = await startHarness(18552); + token = await h.deploy(0, 'HarnessPRC20', 'HarnessFixtures.sol', [ + CHAIN.SOLANA_DEVNET, + 9, + ]); + }); + afterAll(async () => { + await h?.stop(); + }); + async function setup( + options: { dataless?: boolean; maxAccounts?: number } = {} + ) { + const owner = await h.client(0), + created = await owner.agentic.create('svm-internal', { rules: [] }); + const wallet = created.wallet; + const derived = deriveAgwSvmValueAccounts(wallet, GATEWAY_PROGRAM, [ + { mint: MINT }, + ]); + const t: SvmTermsWire = { + ...derived, + validUntil: Math.floor(Date.now() / 1000) + 3600, + assets: [{ token, maxPerCall: UINT256_MAX, maxTotal: UINT256_MAX }], + maxGasPerCall: BigInt(10) ** BigInt(16), + programs: [ + { + program: PROGRAM, + discriminator: '0x0100000000000000', + discriminatorLen: options.dataless ? 0 : 1, + dataless: options.dataless ?? false, + maxAccounts: options.maxAccounts ?? 255, + }, + ], + pins: [ + { ruleIndex: 0, accountIndex: 0, expected: derived.expectedCEA }, + { ruleIndex: 0, accountIndex: 1, expected: derived.ceaAccounts[1] }, + ], + dataPins: options.dataless + ? [] + : [ + { + ruleIndex: 0, + fromEnd: true, + offset: 4, + offsetB: 2, + len: 2, + mode: SvmDataPinMode.RATIO_GTE_LE, + expected: key('00'), + num: BigInt(9), + den: BigInt(10), + }, + ], + }; + const session = buildSession({ + validator: h.addresses.validator, + rulesPolicy: h.addresses.rulesPolicy, + agent: h.wallets[1].account!.address, + actions: [ + { + target: h.addresses.gateway, + selector: '0x77b86bec', + initData: encodeEnvelope(CHAIN.SOLANA_DEVNET, encodeSvmTerms(t, 0)), + }, + ], + }); + await h.write(0, wallet, v6.abis.wallet, 'grantRules', [session]); + const [id] = await h.publicClient.readContract({ + address: h.addresses.engine, + abi: v6.abis.engine, + functionName: 'getPermissionIDs', + args: [wallet], + }); + const [action] = await h.publicClient.readContract({ + address: h.addresses.engine, + abi: v6.abis.engine, + functionName: 'getEnabledActions', + args: [wallet, id], + }); + const cid = configId(wallet, id, action); + const cfg = (await h.publicClient.readContract({ + address: h.addresses.rulesPolicy, + abi: v6.abis.policy, + functionName: 'getSvmConfig', + args: [cid, wallet], + })) as SvmConfigRead; + await h.publicClient.waitForTransactionReceipt({ + hash: await h.wallets[4].sendTransaction({ + to: wallet, + value: BigInt(10) ** BigInt(18), + account: h.wallets[4].account!, + chain: h.wallets[4].chain, + }), + }); + await h.write(0, token, TOKEN, 'mint', [wallet, BigInt(100)]); + await h.write(0, wallet, v6.abis.wallet, 'execute', [ + key('00'), + v6.packSingle({ + target: token, + value: BigInt(0), + data: encodeFunctionData({ + abi: TOKEN, + functionName: 'approve', + args: [h.addresses.gateway, BigInt(100)], + }), + }), + ]); + const accounts = [ + { pubkey: t.expectedCEA, isWritable: true }, + { pubkey: t.ceaAccounts[1], isWritable: true }, + ]; + const payload = encodeAgwSvmPayload( + PROGRAM, + accounts, + options.dataless ? new Uint8Array() : new Uint8Array([1, 90, 0, 100, 0]) + ); + const input = { + wallet, + gateway: h.addresses.gateway, + token, + amount: BigInt(5), + recipient: PROGRAM, + payload, + gasLimit: BigInt(200_000), + protocolFee: BigInt(10) ** BigInt(14), + maxPCForGas: BigInt(10) ** BigInt(15), + }; + const call = composeAgwSvmAction(input, cfg, 0); + const simulate = (p: Hex, recipient = PROGRAM, amount = BigInt(5)) => { + const data = encodeFunctionData({ + abi: parseAbi([ + 'function sendUniversalTxOutbound((bytes recipient,address token,uint256 amount,uint256 gasLimit,uint256 gasPrice,uint256 maxPCForGas,bytes payload,address revertRecipient) req) payable', + ]), + functionName: 'sendUniversalTxOutbound', + args: [ + { + recipient, + token, + amount, + gasLimit: BigInt(200_000), + gasPrice: BigInt(0), + maxPCForGas: input.maxPCForGas, + payload: p, + revertRecipient: wallet, + }, + ], + }); + return h.publicClient.simulateContract({ + address: wallet, + abi: v6.abis.wallet, + functionName: 'executeAsAgent', + args: [ + id, + key('00'), + v6.packSingle({ + target: h.addresses.gateway, + value: call.value, + data, + }), + ], + account: h.wallets[1].account!.address, + }); + }; + async function reject( + p: Hex, + name: string, + recipient = PROGRAM, + amount = BigInt(5) + ) { + try { + await simulate(p, recipient, amount); + throw new Error('Expected policy rejection'); + } catch (error) { + const { decodeAgenticRevert } = await import( + '../src/lib/agentic/revert' + ); + expect(decodeAgenticRevert(error)?.name).toBe( + `PolicyCheckReverted(${name})` + ); + } + } + return { + wallet, + id, + cid, + t, + cfg, + accounts, + payload, + call, + simulate, + reject, + }; + } + it('grants SDK-encoded SVM terms and preserves every field/account', async () => { + const { cfg, t } = await setup(); + expect(cfg).toMatchObject({ + initialized: true, + expectedCEA: t.expectedCEA, + gatewayProgram: t.gatewayProgram, + ceaAccounts: t.ceaAccounts, + programs: t.programs, + pins: t.pins, + dataPins: t.dataPins, + assets: [ + { + token, + maxPerCall: UINT256_MAX, + maxTotal: UINT256_MAX, + spent: BigInt(0), + }, + ], + }); + }); + it('the internal composed call passes actual S1–S18 and meters its token', async () => { + const { wallet, id, cid, call } = await setup(); + await h.write(1, wallet, v6.abis.wallet, 'executeAsAgent', [ + id, + key('00'), + v6.packSingle(call), + ]); + const cfg = await h.publicClient.readContract({ + address: h.addresses.rulesPolicy, + abi: v6.abis.policy, + functionName: 'getSvmConfig', + args: [cid, wallet], + }); + expect(cfg.assets[0].spent).toBe(BigInt(5)); + }); + it('account substitution and CEA aliasing are rejected by URP', async () => { + const s = await setup(); + await s.reject( + encodeAgwSvmPayload( + PROGRAM, + [{ ...s.accounts[0], pubkey: key('77') }, s.accounts[1]], + new Uint8Array([1, 90, 0, 100, 0]) + ), + 'SvmAccountPinMismatch' + ); + await s.reject( + encodeAgwSvmPayload( + PROGRAM, + [...s.accounts, s.accounts[0]], + new Uint8Array([1, 90, 0, 100, 0]) + ), + 'CeaAccountAtUnpinnedIndex' + ); + }); + it('relative price floor and recipient/program identity are enforced on-chain', async () => { + const s = await setup(); + await s.reject( + encodeAgwSvmPayload( + PROGRAM, + s.accounts, + new Uint8Array([1, 89, 0, 100, 0]) + ), + 'SvmDataRatioNotMet' + ); + await s.reject(s.payload, 'RecipientTargetMismatch', key('66')); + }); + it('trailing bytes, non-execute IDs and u64 overflow are rejected', async () => { + const s = await setup(); + await s.reject(`${s.payload}00`, 'MalformedSvmPayload'); + const bytes = Buffer.from(s.payload.slice(2), 'hex'); + bytes[bytes.length - 33] = 1; + await s.reject(`0x${bytes.toString('hex')}`, 'SvmInstructionNotExecute'); + await s.reject( + s.payload, + 'AmountExceedsU64', + PROGRAM, + UINT64_MAX + BigInt(1) + ); + }); + it('dataless rules accept only empty instruction data', async () => { + const s = await setup({ dataless: true }); + await expect(s.simulate(s.payload)).resolves.toBeDefined(); + await s.reject( + encodeAgwSvmPayload(PROGRAM, s.accounts, new Uint8Array([1])), + 'ProgramNotAllowed' + ); + }); + it('fixed account counts reject appended accounts and failed calls do not change spend', async () => { + const s = await setup({ maxAccounts: 2 }); + await s.reject( + encodeAgwSvmPayload( + PROGRAM, + [...s.accounts, { pubkey: key('55'), isWritable: false }], + new Uint8Array([1, 90, 0, 100, 0]) + ), + 'SvmAccountCountMismatch' + ); + const cfg = await h.publicClient.readContract({ + address: h.addresses.rulesPolicy, + abi: v6.abis.policy, + functionName: 'getSvmConfig', + args: [s.cid, s.wallet], + }); + expect(cfg.assets[0].spent).toBe(BigInt(0)); + }); +}); diff --git a/packages/core/__agw-local__/svm-public.spec.ts b/packages/core/__agw-local__/svm-public.spec.ts new file mode 100644 index 00000000..bd78096e --- /dev/null +++ b/packages/core/__agw-local__/svm-public.spec.ts @@ -0,0 +1,534 @@ +/** Public numeric-pin API against actual AGW/URP; destination/gateway are fixtures. */ +import { PublicKey } from '@solana/web3.js'; +import type { Idl } from '@coral-xyz/anchor'; +import { + hexToBytes, + sha256, + toHex, + encodeFunctionData, + parseAbi, + zeroAddress, + type Address, + type Hex, +} from 'viem'; +import { CHAIN, PushChain, AgenticRevertError, type Rule } from '../src'; +import type { AgenticRuntime } from '../src/lib/agentic/runtime'; +import { v6 } from '../src/lib/agentic/contracts/v6'; +import { clearRegistry } from '../src/lib/orchestrator/svm-idl/registry'; +import { startHarness, type Harness } from './harness'; +const program = new PublicKey(Buffer.alloc(32, 51)).toBase58(); +const gateway = new PublicKey(Buffer.alloc(32, 34)).toBase58(); +const idl: Idl = { + address: program, + metadata: { name: 'named', version: '1', spec: '0.1.0' }, + instructions: [ + { + name: 'deposit', + discriminator: Array.from( + hexToBytes(sha256(toHex('global:deposit'))).slice(0, 8) + ), + accounts: [{ name: 'cea_authority', writable: true }], + args: [{ name: 'amount', type: 'u64' }], + }, + ], +}; +const TOKEN = parseAbi([ + 'function mint(address,uint256)', + 'function setSourceTokenAddress(string)', + 'function approve(address,uint256) returns (bool)', +]); +const CORE = parseAbi(['function setGasToken(string,address)']); +const rt = (c: PushChain) => + (c as unknown as { agenticRuntime: AgenticRuntime }).agenticRuntime; +describe('public Solana rules on actual v6', () => { + let h: Harness, owner: PushChain, token: Address; + beforeAll(async () => { + h = await startHarness(18561); + owner = await h.client(0); + token = await h.deploy(0, 'HarnessPRC20', 'HarnessFixtures.sol', [ + CHAIN.SOLANA_DEVNET, + 9, + ]); + await h.write(0, token, TOKEN, 'setSourceTokenAddress', ['']); + await h.write(0, h.addresses.universalCore, CORE, 'setGasToken', [ + CHAIN.SOLANA_DEVNET, + token, + ]); + configure(owner); + }); + afterAll(async () => { + clearRegistry(); + await h?.stop(); + }); + function configure(client: PushChain) { + Object.assign(rt(client), { + svmMetadata: { + gateway: async (chain: string) => ({ + chainNamespace: chain, + program: gateway, + }), + mint: async () => { + throw new Error('native-only fixture'); + }, + }, + resolvePrc20: () => token, + quoteOutbound: async () => ({ + protocolFee: BigInt(10) ** BigInt(14), + nativeValueForGas: BigInt(10) ** BigInt(15), + gasLimitUsed: BigInt(100000), + }), + }); + } + const rule = (): Rule => ({ + agent: h.wallets[1].account!.address, + chainNamespace: CHAIN.SOLANA_DEVNET, + validUntil: Math.floor(Date.now() / 1000) + 3600, + maxGasPerCall: BigInt(10) ** BigInt(17), + assets: [ + { token: zeroAddress, maxPerCall: BigInt(5), maxTotal: BigInt(10) }, + ], + allowedCalls: [ + { + target: program, + selector: 'deposit(u64)', + pins: [ + { account: 0, expected: PushChain.CONSTANTS.AGENTIC.WALLET }, + { arg: 0, max: BigInt(5) }, + ], + }, + ], + }); + it('create/get/list/update/revoke use public named inputs and exact stored reads', async () => { + const made = await owner.agentic.create('public-svm', { rules: [rule()] }); + const wallet = owner.agentic.wallet(made.wallet); + const record = await wallet.rules.get(made.rulesIds[0]); + expect(record).not.toHaveProperty('ref'); + expect(record.rule).toMatchObject({ + format: 'decoded', + dataPins: [{ offset: 8, len: 8, mode: 2 }], + }); + expect((await wallet.rules.list()).rules).toHaveLength(1); + const update = await wallet.rules.update({ + rules: [ + { + rulesId: made.rulesIds[0], + rule: { ...record.rule, validUntil: record.validUntil + 60 }, + }, + ], + }); + expect(update.rules[0].rulesId).not.toBe(made.rulesIds[0]); + const reread = await wallet.rules.get(update.rules[0].rulesId); + expect(reread.rule).toEqual({ + ...record.rule, + validUntil: record.validUntil + 60, + }); + await (await wallet.rules.delete([update.rules[0].rulesId])).wait(); + expect((await wallet.rules.list()).rules).toHaveLength(0); + }); + it('agent public send uses wallet context, mapped errors and replay metadata', async () => { + const made = await owner.agentic.create('public-send', { rules: [rule()] }); + await h.publicClient.waitForTransactionReceipt({ + hash: await h.wallets[4].sendTransaction({ + to: made.wallet, + value: BigInt(10) ** BigInt(18), + account: h.wallets[4].account!, + chain: h.wallets[4].chain, + }), + }); + await h.write(0, token, TOKEN, 'mint', [made.wallet, BigInt(20)]); + await h.write(0, made.wallet, v6.abis.wallet, 'execute', [ + `0x${'00'.repeat(32)}`, + v6.packSingle({ + target: token, + value: BigInt(0), + data: encodeFunctionData({ + abi: TOKEN, + functionName: 'approve', + args: [h.addresses.gateway, BigInt(20)], + }), + }), + ]); + const agent = await h.client(1, { agenticWallet: made.wallet }); + configure(agent); + const data = (n: bigint) => + PushChain.utils.helpers.encodeTxData({ + abi: idl, + functionName: 'deposit', + args: [n], + }); + const tx = await agent.universal.sendTransaction({ + to: { chain: CHAIN.SOLANA_DEVNET, address: program }, + data: data(BigInt(5)), + value: BigInt(5), + }); + expect(tx.from).toBe(made.wallet); + expect(tx.agentic?.destinationInstruction?.data).toBe(data(BigInt(5))); + expect( + (await h.publicClient.getTransactionReceipt({ hash: tx.hash as Hex })) + .status + ).toBe('success'); + const { adaptTrackedResponse } = await import( + '../src/lib/agentic/response' + ); + const raw: typeof tx = { + ...tx, + agentic: undefined, + from: tx.raw!.from, + to: tx.raw!.to, + data: tx.raw!.data, + }; + await adaptTrackedResponse(rt(agent), raw); + expect(raw.agentic?.destinationInstruction).toEqual( + tx.agentic?.destinationInstruction + ); + await expect( + agent.universal.sendTransaction({ + to: { chain: CHAIN.SOLANA_DEVNET, address: program }, + data: data(BigInt(6)), + value: BigInt(5), + }) + ).rejects.toMatchObject({ + name: 'AgenticRevertError', + decodedError: { name: 'PolicyCheckReverted(SvmDataCeilingExceeded)' }, + }); + }); + it('owner sends use the wallet CEA without requiring an agent rule', async () => { + const made = await owner.agentic.create('svm-owner', { rules: [] }); + await h.publicClient.waitForTransactionReceipt({ + hash: await h.wallets[4].sendTransaction({ + to: made.wallet, + value: BigInt(10) ** BigInt(18), + account: h.wallets[4].account!, + chain: h.wallets[4].chain, + }), + }); + const sender = await h.client(0, { agenticWallet: made.wallet }); + configure(sender); + const tx = await sender.universal.sendTransaction({ + to: { chain: CHAIN.SOLANA_DEVNET, address: program }, + data: PushChain.utils.helpers.encodeTxData({ + abi: idl, + functionName: 'deposit', + args: [BigInt(0)], + }), + }); + expect(tx.agentic?.door).toBe('owner'); + expect(tx.agentic?.rulesId).toBeUndefined(); + expect( + (await h.publicClient.getTransactionReceipt({ hash: tx.hash as Hex })) + .status + ).toBe('success'); + }); + it('owner funds-only sends use an empty payload and preserve transfer metadata in replay', async () => { + const made = await owner.agentic.create('svm-owner-transfer', { + rules: [], + }); + await h.publicClient.waitForTransactionReceipt({ + hash: await h.wallets[4].sendTransaction({ + to: made.wallet, + value: BigInt(10) ** BigInt(18), + account: h.wallets[4].account!, + chain: h.wallets[4].chain, + }), + }); + await h.write(0, token, TOKEN, 'mint', [made.wallet, BigInt(10)]); + await h.write(0, made.wallet, v6.abis.wallet, 'execute', [ + `0x${'00'.repeat(32)}`, + v6.packSingle({ + target: token, + value: BigInt(0), + data: encodeFunctionData({ + abi: TOKEN, + functionName: 'approve', + args: [h.addresses.gateway, BigInt(10)], + }), + }), + ]); + const sender = await h.client(0, { agenticWallet: made.wallet }); + configure(sender); + clearRegistry(); // A simple transfer needs no program IDL. + const tx = await sender.universal.sendTransaction({ + to: { chain: CHAIN.SOLANA_DEVNET, address: program }, + value: BigInt(5), + }); + expect(tx.to).toBe('0x' + Buffer.alloc(32, 51).toString('hex')); + expect(tx.value).toBe(BigInt(5)); + expect(tx.agentic?.destinationInstruction).toBeUndefined(); + expect(tx.agentic?.destinationTransfer).toMatchObject({ + token, + amount: BigInt(5), + }); + const raw: typeof tx = { + ...tx, + agentic: undefined, + from: tx.raw!.from, + to: tx.raw!.to, + data: tx.raw!.data, + route: 'UOA_TO_PUSH', + }; + const { adaptTrackedResponse } = await import( + '../src/lib/agentic/response' + ); + await adaptTrackedResponse(rt(sender), raw); + expect(raw.to).toBe(tx.to); + expect(raw.data).toBe('0x'); + expect(raw.value).toBe(BigInt(5)); + expect(raw.agentic?.destinationTransfer).toEqual( + tx.agentic?.destinationTransfer + ); + expect(raw.route).toBe('UOA_TO_CEA'); + const baseReader = rt(sender).reader; + const unavailable = { + ...baseReader, + readContract: async ( + params: Parameters[0] + ) => { + if (params.functionName === 'gasTokenPRC20ByChainNamespace') + throw new Error('historical metadata unavailable'); + return baseReader.readContract(params); + }, + }; + const fallback: typeof tx = { + ...tx, + agentic: undefined, + from: tx.raw!.from, + to: tx.raw!.to, + data: tx.raw!.data, + route: 'UOA_TO_PUSH', + }; + await adaptTrackedResponse( + { network: rt(sender).network, reader: unavailable }, + fallback + ); + expect(fallback.route).toBe('UOA_TO_CEA'); + expect(fallback.agentic?.destinationTransfer).toBeUndefined(); + + expect( + (await h.publicClient.getTransactionReceipt({ hash: tx.hash as Hex })) + .status + ).toBe('success'); + }); + it('actual policy refusals return mapped contract errors and preserve counters', async () => { + const made = await owner.agentic.create('svm-policy-errors', { + rules: [rule()], + }); + await h.publicClient.waitForTransactionReceipt({ + hash: await h.wallets[4].sendTransaction({ + to: made.wallet, + value: BigInt(10) ** BigInt(18), + account: h.wallets[4].account!, + chain: h.wallets[4].chain, + }), + }); + const agent = await h.client(1, { agenticWallet: made.wallet }); + configure(agent); + const handle = owner.agentic.wallet(made.wallet), + before = await handle.rules.get(made.rulesIds[0]); + const error = await agent.universal + .sendTransaction({ + to: { chain: CHAIN.SOLANA_DEVNET, address: program }, + data: PushChain.utils.helpers.encodeTxData({ + abi: idl, + functionName: 'deposit', + args: [BigInt(6)], + }), + }) + .catch((e) => e); + expect(error).toBeInstanceOf(AgenticRevertError); + expect(error.decodedError.name).toBe( + 'PolicyCheckReverted(SvmDataCeilingExceeded)' + ); + expect(await handle.rules.get(made.rulesIds[0])).toEqual(before); + await expect( + agent.universal.sendTransaction({ + to: { chain: CHAIN.SOLANA_DEVNET, address: program }, + value: BigInt(1), + }) + ).rejects.toMatchObject({ code: 'INVALID_RULE' }); + }); + it('SPL and output mints derive protected wallet ATAs through public grants', async () => { + const mint = new PublicKey(Buffer.alloc(32, 68)).toBase58(); + const output = new PublicKey(Buffer.alloc(32, 85)).toBase58(); + const spl = await h.deploy(0, 'HarnessPRC20', 'HarnessFixtures.sol', [ + CHAIN.SOLANA_DEVNET, + 6, + ]); + await h.write(0, spl, TOKEN, 'setSourceTokenAddress', [mint]); + const source = await h.client(0); + configure(source); + Object.assign(rt(source), { + resolvePrc20: () => spl, + svmMetadata: { + gateway: async (chain: string) => ({ + chainNamespace: chain, + program: gateway, + }), + mint: async (_chain: string, address: string) => ({ + mint: address, + tokenProgram: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', + }), + }, + }); + const input = rule(); + input.assets = [ + { token: mint, maxPerCall: BigInt(5), maxTotal: BigInt(5) }, + ]; + input.allowedCalls[0].pins!.push( + { account: 1, expected: PushChain.CONSTANTS.AGENTIC.WALLET, token: mint }, + { + account: 2, + expected: PushChain.CONSTANTS.AGENTIC.WALLET, + token: output, + } + ); + const made = await source.agentic.create('public-spl', { rules: [input] }); + const read = await source.agentic + .wallet(made.wallet) + .rules.get(made.rulesIds[0]); + if (!('format' in read.rule)) + throw new Error('expected decoded Solana rule'); + expect(read.rule.ceaAccounts).toHaveLength(3); + expect(read.rule.pins.map((p) => p.expected)).toEqual( + read.rule.ceaAccounts + ); + expect(read.rule.assets[0].maxTotal).toBe(BigInt(5)); + await h.publicClient.waitForTransactionReceipt({ + hash: await h.wallets[4].sendTransaction({ + to: made.wallet, + value: BigInt(10) ** BigInt(18), + account: h.wallets[4].account!, + chain: h.wallets[4].chain, + }), + }); + await h.write(0, spl, TOKEN, 'mint', [made.wallet, BigInt(10)]); + await h.write(0, made.wallet, v6.abis.wallet, 'execute', [ + `0x${'00'.repeat(32)}`, + v6.packSingle({ + target: spl, + value: BigInt(0), + data: encodeFunctionData({ + abi: TOKEN, + functionName: 'approve', + args: [h.addresses.gateway, BigInt(10)], + }), + }), + ]); + const sender = await h.client(0, { agenticWallet: made.wallet }); + Object.assign(rt(sender), { + svmMetadata: rt(source).svmMetadata, + resolvePrc20: rt(source).resolvePrc20, + quoteOutbound: rt(source).quoteOutbound, + }); + const quote = jest.spyOn(rt(sender), 'quoteOutbound'); + const tx = await sender.universal.sendTransaction({ + to: { chain: CHAIN.SOLANA_DEVNET, address: program }, + funds: { + token: { + address: mint, + symbol: 'MOCK', + decimals: 6, + mechanism: 'approve', + }, + amount: BigInt(5), + }, + }); + expect(tx.value).toBe(BigInt(0)); + expect(tx.agentic?.destinationTransfer).toMatchObject({ + token: spl, + amount: BigInt(5), + }); + expect(quote.mock.calls[0][3]).toMatchObject({ + wallet: made.wallet, + splMintBase58: mint, + burnAmount: BigInt(5), + }); + expect( + (await h.publicClient.getTransactionReceipt({ hash: tx.hash as Hex })) + .status + ).toBe('success'); + }); + it('invalid account position and removed ref never submit a transaction', async () => { + const before = await h.publicClient.getTransactionCount({ + address: h.wallets[0].account!.address, + }); + const r = rule(); + r.allowedCalls[0].pins = [ + { account: 64, expected: PushChain.CONSTANTS.AGENTIC.WALLET }, + ]; + await expect( + owner.agentic.create('invalid', { rules: [r] }) + ).rejects.toThrow('account position'); + await expect( + owner.agentic.create('removed-ref', { + rules: [{ ...rule(), ref: `0x${'11'.repeat(32)}` } as never], + }) + ).rejects.toThrow('ref is not supported'); + expect( + await h.publicClient.getTransactionCount({ + address: h.wallets[0].account!.address, + }) + ).toBe(before); + }); + it('the contract rejects an outbound above its PC cap through the same error mapper', async () => { + const input = rule(); + input.maxGasPerCall = BigInt(1); + const made = await owner.agentic.create('svm-pc-cap', { rules: [input] }); + await h.publicClient.waitForTransactionReceipt({ + hash: await h.wallets[4].sendTransaction({ + to: made.wallet, + value: BigInt(10) ** BigInt(18), + account: h.wallets[4].account!, + chain: h.wallets[4].chain, + }), + }); + const agent = await h.client(1, { agenticWallet: made.wallet }); + configure(agent); + const error = await agent.universal + .sendTransaction({ + to: { chain: CHAIN.SOLANA_DEVNET, address: program }, + data: PushChain.utils.helpers.encodeTxData({ + abi: idl, + functionName: 'deposit', + args: [BigInt(0)], + }), + }) + .catch((e) => e); + expect(error).toBeInstanceOf(AgenticRevertError); + expect(error.decodedError.name).toBe( + 'PolicyCheckReverted(PCValueExceedsCap)' + ); + }); + it('expired SVM permissions are refused by the actual contract rather than a local policy check', async () => { + const input = rule(); + input.validUntil = + Number((await h.publicClient.getBlock()).timestamp) + 120; + const made = await owner.agentic.create('svm-expired', { rules: [input] }); + await h.publicClient.waitForTransactionReceipt({ + hash: await h.wallets[4].sendTransaction({ + to: made.wallet, + value: BigInt(10) ** BigInt(18), + account: h.wallets[4].account!, + chain: h.wallets[4].chain, + }), + }); + const agent = await h.client(1, { agenticWallet: made.wallet }); + configure(agent); + await h.publicClient.request({ + method: 'evm_setNextBlockTimestamp' as never, + params: [input.validUntil + 1] as never, + }); + await h.publicClient.request({ method: 'evm_mine' as never }); + const error = await agent.universal + .sendTransaction({ + to: { chain: CHAIN.SOLANA_DEVNET, address: program }, + data: PushChain.utils.helpers.encodeTxData({ + abi: idl, + functionName: 'deposit', + args: [BigInt(0)], + }), + }) + .catch((e) => e); + expect(error).toBeInstanceOf(AgenticRevertError); + expect(error.decodedError.name).toBe('PolicyCheckReverted(RulesExpired)'); + }); +}); diff --git a/packages/core/__agw-local__/v5-multiasset.spec.ts b/packages/core/__agw-local__/v5-multiasset.spec.ts new file mode 100644 index 00000000..a1e5af80 --- /dev/null +++ b/packages/core/__agw-local__/v5-multiasset.spec.ts @@ -0,0 +1,737 @@ +import { agenticPresets } from '../src/lib/agentic/presets'; +import * as accountLookup from '../src/lib/universal/account/account'; +import { buildPresetApi } from '../src/lib/agentic/presets'; +import { publicRules } from '../src/lib/agentic/public-rule'; +/** Actual v6 AGW/URP/engine. Token/core/gateway and destination lookup are local fixtures; no bridge/TSS proof. */ +import { + encodeFunctionData, + getAddress, + parseAbi, + zeroAddress, + type Address, + type Hex, +} from 'viem'; +import { CHAIN, type PushChain, type Rule } from '../src'; +import type { AgenticRuntime } from '../src/lib/agentic/runtime'; +import { updateRules } from '../src/lib/agentic/management/rules-write'; +import { createWallet } from '../src/lib/agentic/management/create'; +import { configId } from '../src/lib/agentic/codec/ids'; +import { prepareWalletRules } from '../src/lib/agentic/management/prepare'; +import { Snapshot } from '../src/lib/agentic/reads/snapshot'; +import { buildSession } from '../src/lib/agentic/codec/session'; +import { + encodeNativeTerms, + nativeRuleToTerms, +} from '../src/lib/agentic/codec/native'; +import { startHarness, type Harness } from './harness'; + +const TOKEN = parseAbi([ + 'function mint(address,uint256)', + 'function approve(address,uint256) returns (bool)', +]); +const CORE = parseAbi([ + 'function setGasToken(string,address)', + 'function getOutboundTxGasAndFees(address,uint256) view returns (address,uint256,uint256,uint256,string,uint256)', +]); +const CHAIN_NS = CHAIN.ETHEREUM_SEPOLIA; +const CEA = getAddress('0x000000000000000000000000000000000000cea1'); +const DEST = getAddress('0x0000000000000000000000000000000000001234'); +const internal = (c: PushChain) => + (c as unknown as { agenticRuntime: AgenticRuntime }).agenticRuntime; + +describe('v6 multi-asset SDK management and execution', () => { + let h: Harness, owner: PushChain, a: Address, b: Address; + let originLookup: jest.SpyInstance; + beforeAll(async () => { + // This harness deploys no UEA factory; its receivers are local contracts. + // Keep actual AGW/RPC execution while isolating response-origin metadata. + originLookup = jest + .spyOn(accountLookup, 'convertExecutorToOrigin') + .mockResolvedValue({ account: null, exists: false }); + h = await startHarness(18551); + owner = await h.client(0); + a = await h.deploy(0, 'HarnessPRC20', 'HarnessFixtures.sol', [CHAIN_NS, 6]); + b = await h.deploy(0, 'HarnessPRC20', 'HarnessFixtures.sol', [ + CHAIN_NS, + 18, + ]); + await h.write(0, h.addresses.universalCore, CORE, 'setGasToken', [ + CHAIN_NS, + a, + ]); + configure(internal(owner)); + }); + afterAll(async () => { + try { + await h?.stop(); + } finally { + originLookup?.mockRestore(); + } + }); + function configure(rt: AgenticRuntime) { + // Fixture source token addresses equal fixture PRC20s; production uses the token registry. + rt.resolvePrc20 = (token) => + getAddress(typeof token === 'string' ? token : token?.address ?? a); + rt.resolveCEA = async () => ({ cea: CEA, isDeployed: false }); + rt.quoteOutbound = async (token, limit) => { + const [, nativeValueForGas, protocolFee, , , gasLimitUsed] = + await h.publicClient.readContract({ + address: h.addresses.universalCore, + abi: CORE, + functionName: 'getOutboundTxGasAndFees', + args: [token, limit], + }); + return { nativeValueForGas, protocolFee, gasLimitUsed }; + }; + } + function rule( + assets: Rule['assets'] = [ + { token: a, maxPerCall: BigInt(5), maxTotal: BigInt(7) }, + { token: b, maxPerCall: BigInt(9), maxTotal: BigInt(30) }, + ] + ): Rule { + return { + agent: h.wallets[1].account!.address, + chainNamespace: CHAIN_NS, + assets, + validUntil: Math.floor(Date.now() / 1000) + 3600, + maxGasPerCall: BigInt(10) ** BigInt(16), + allowedCalls: [{ target: DEST, selector: 'increment()' }], + }; + } + async function setup(input = rule()) { + const created = await owner.agentic.create('v5', { rules: [input] }); + const wallet = created.wallet, + id = created.rulesIds[0]; + await h.publicClient.waitForTransactionReceipt({ + hash: await h.wallets[4].sendTransaction({ + account: h.wallets[4].account!, + chain: h.wallets[4].chain, + to: wallet, + value: BigInt(10) ** BigInt(18), + }), + }); + for (const token of [a, b]) { + await h.write(0, token, TOKEN, 'mint', [wallet, BigInt(1000)]); + const w = await h.client(0, { agenticWallet: wallet }); + await ( + await w.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ + abi: TOKEN, + functionName: 'approve', + args: [h.addresses.gateway, BigInt(1000)], + }), + }) + ).wait(); + } + const agent = await h.client(1, { agenticWallet: wallet }); + configure(internal(agent)); + const send = (token: Address, amount: bigint) => + agent.universal.sendTransaction({ + to: { address: DEST, chain: CHAIN_NS }, + funds: { + amount, + token: { + symbol: 'fixture', + decimals: 6, + address: token, + mechanism: 'approve', + }, + }, + data: [{ to: DEST, data: '0xd09de08a', value: BigInt(0) }], + }); + return { wallet, id, agent, send }; + } + async function waitPush( + tx: ReturnType + ) { + const response = await tx; + return h.publicClient.waitForTransactionReceipt({ + hash: response.hash as Hex, + }); + } + async function stored(wallet: Address, id: Hex) { + const [action] = await h.publicClient.readContract({ + address: h.addresses.engine, + abi: h.generation.contracts.abis.engine, + functionName: 'getEnabledActions', + args: [wallet, id], + }); + return h.publicClient.readContract({ + address: h.addresses.rulesPolicy, + abi: h.generation.contracts.abis.policy, + functionName: 'getConfig', + args: [configId(wallet, id, action), wallet], + }); + } + it('v6 EVM alternatives enforce both spender and MAX, and reads update losslessly', async () => { + const input = rule(); + input.allowedCalls = [DEST, CEA].map((spender) => ({ + target: a, + selector: 'approve(address,uint256)', + pins: [ + { arg: 0, expected: spender }, + { arg: 1, max: BigInt(5) }, + ], + })); + const { wallet, id, agent } = await setup(input); + const send = (spender: Address, amount: bigint) => + agent.universal.sendTransaction({ + to: { address: a, chain: CHAIN_NS }, + data: [ + { + to: a, + value: BigInt(0), + data: encodeFunctionData({ + abi: TOKEN, + functionName: 'approve', + args: [spender, amount], + }), + }, + ], + }); + await waitPush(send(DEST, BigInt(5))); + await waitPush(send(CEA, BigInt(4))); + await expect( + send(h.wallets[3].account!.address, BigInt(1)) + ).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(ArgPinMismatch)' }, + }); + await expect(send(DEST, BigInt(6))).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(ArgPinAboveMax)' }, + }); + const handle = owner.agentic.wallet(wallet), + record = await handle.rules.get(id); + expect((record.rule as Rule).allowedCalls).toHaveLength(2); + const updated = await handle.rules.update({ + rules: [ + { + rulesId: id, + rule: { ...record.rule, validUntil: record.validUntil + 60 }, + }, + ], + }); + expect((await handle.rules.get(updated.rules[0].rulesId)).rule).toEqual({ + ...record.rule, + validUntil: record.validUntil + 60, + }); + }); + it('v6 refuses a bare alternative that bypasses a pinned function and too many initial rules', async () => { + const input = rule(); + input.allowedCalls = [ + { target: DEST, selector: 'increment()', pins: [] }, + { + target: DEST, + selector: 'increment()', + pins: [{ arg: 0, max: BigInt(1) }], + }, + ]; + await expect( + owner.agentic.create('bypass', { rules: [input] }) + ).rejects.toMatchObject({ code: 'INVALID_RULE' }); + const rules = Array.from({ length: 9 }, (_, i) => ({ + ...rule(), + agent: getAddress(`0x${(100 + i).toString(16).padStart(40, '0')}`), + })); + const before = await owner.agentic.derive(); + await expect( + owner.agentic.create('too-many', { rules }) + ).rejects.toMatchObject({ code: 'INVALID_RULE' }); + expect(await owner.agentic.derive()).toEqual(before); + }); + + const presetOptions = (maxPerCall: bigint) => ({ + chainNamespace: CHAIN_NS, + agent: h.wallets[1].account!.address, + validUntil: Math.floor(Date.now() / 1000) + 3600, + maxGasPerCall: BigInt(10) ** BigInt(16), + assets: [{ token: zeroAddress, maxPerCall, maxTotal: BigInt(40) }], + }); + const PRESET_ABI = parseAbi([ + 'function deposit() payable', + 'function approve(address,uint256) returns (bool)', + 'function exactInputSingle((address tokenIn,address tokenOut,uint24 fee,address recipient,uint256 amountIn,uint256 amountOutMinimum,uint160 sqrtPriceLimitX96)) returns (uint256)', + 'function supply(address,uint256,address,uint16)', + ]); + // Native ETH funds the wallet's destination account; the rule caps the wrap value. + const wrapCall = (weth: Address, value: bigint) => ({ + to: weth, + value, + data: encodeFunctionData({ abi: PRESET_ABI, functionName: 'deposit' }), + }); + const approveCall = (token: Address, spender: Address, amount: bigint) => ({ + to: token, + value: BigInt(0), + data: encodeFunctionData({ + abi: PRESET_ABI, + functionName: 'approve', + args: [spender, amount], + }), + }); + it('the shipped DEX catalog enforces the wrap value, tuple receiver/token and amount pins on actual v6 URP', async () => { + const { rules } = agenticPresets.get('DEXES', presetOptions(BigInt(5))); + const { wallet, id, agent } = await setup(rules[0]); + expect((await stored(wallet, id)).assets[0]).toMatchObject({ + token: a, + maxPerCall: BigInt(5), + }); + const weth = getAddress(rules[0].allowedCalls[0].target); + const router = getAddress(rules[0].allowedCalls[2].target); + const usdc = getAddress(rules[0].allowedCalls[4].target); + const swap = ( + tokenIn: Address, + tokenOut: Address, + amountIn: bigint, + recipient = CEA + ) => ({ + to: router, + value: BigInt(0), + data: encodeFunctionData({ + abi: PRESET_ABI, + functionName: 'exactInputSingle', + args: [ + { + tokenIn, + tokenOut, + fee: 3000, + recipient, + amountIn, + amountOutMinimum: BigInt(0), + sqrtPriceLimitX96: BigInt(0), + }, + ], + }), + }); + const send = (data: ReturnType[], amount = BigInt(5)) => + agent.universal.sendTransaction({ + to: { address: router, chain: CHAIN_NS }, + funds: { amount }, + data, + }); + const sell = (amount: bigint, recipient = CEA) => [ + wrapCall(weth, amount), + approveCall(weth, router, amount), + swap(weth, usdc, amount, recipient), + ]; + await waitPush(send(sell(BigInt(5)))); + expect((await stored(wallet, id)).assets[0].spent).toBe(BigInt(5)); + await expect( + send([wrapCall(weth, BigInt(6)), ...sell(BigInt(5)).slice(1)]) + ).rejects.toMatchObject({ + decodedError: { + name: 'PolicyCheckReverted(InnerValueExceedsAllowance)', + }, + }); + await expect(send(sell(BigInt(5), DEST))).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(ArgPinMismatch)' }, + }); + await expect( + send([...sell(BigInt(5)).slice(0, 2), swap(DEST, usdc, BigInt(5))]) + ).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(ArgPinMismatch)' }, + }); + await expect( + send([...sell(BigInt(5)).slice(0, 2), swap(weth, usdc, BigInt(6))]) + ).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(ArgPinAboveMax)' }, + }); + // Destination-held USDC swaps back under the fixed 10 USDC per-swap pin. + const usdcCap = BigInt(10_000_000); + await waitPush( + send( + [approveCall(usdc, router, usdcCap), swap(usdc, weth, usdcCap)], + BigInt(0) + ) + ); + // The policy reports the first matching entry's failure: the WETH-in swap's token pin. + await expect( + send([swap(usdc, weth, usdcCap + BigInt(1))], BigInt(0)) + ).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(ArgPinMismatch)' }, + }); + // Calls using destination-held capital do not consume the Push bridge counter. + expect((await stored(wallet, id)).assets[0].spent).toBe(BigInt(5)); + }); + + it('the shipped LENDING catalog pins Aave supply to WETH and the wallet, and a regenerated cap applies through rules.update', async () => { + const first = agenticPresets.get('LENDING', presetOptions(BigInt(5))); + const { wallet, id, agent } = await setup(first.rules[0]); + const weth = getAddress(first.rules[0].allowedCalls[0].target); + const pool = getAddress(first.rules[0].allowedCalls[2].target); + const supply = (amount: bigint, asset = weth, onBehalfOf = CEA) => [ + wrapCall(weth, amount), + approveCall(weth, pool, amount), + { + to: pool, + value: BigInt(0), + data: encodeFunctionData({ + abi: PRESET_ABI, + functionName: 'supply', + args: [asset, amount, onBehalfOf, 0], + }), + }, + ]; + const send = (data: ReturnType, amount: bigint) => + agent.universal.sendTransaction({ + to: { address: pool, chain: CHAIN_NS }, + funds: { amount }, + data, + }); + await waitPush(send(supply(BigInt(5)), BigInt(5))); + await expect( + send(supply(BigInt(5), DEST), BigInt(5)) + ).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(ArgPinMismatch)' }, + }); + await expect( + send(supply(BigInt(5), weth, DEST), BigInt(5)) + ).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(ArgPinMismatch)' }, + }); + const w = owner.agentic.wallet(wallet); + const changed = agenticPresets.get('LENDING', presetOptions(BigInt(2))); + const before = await h.publicClient.readContract({ + address: wallet, + abi: h.generation.contracts.abis.wallet, + functionName: 'checkpointCount', + }); + const replaced = await w.rules.update({ + rules: [{ rulesId: id, rule: changed.rules[0] }], + }); + expect( + await h.publicClient.readContract({ + address: wallet, + abi: h.generation.contracts.abis.wallet, + functionName: 'checkpointCount', + }) + ).toBe(before + BigInt(5)); + expect(replaced.rules[0].rulesId).not.toBe(id); + await expect(send(supply(BigInt(3)), BigInt(3))).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(AmountExceedsCap)' }, + }); + await waitPush(send(supply(BigInt(2)), BigInt(2))); + expect( + (await stored(wallet, replaced.rules[0].rulesId)).assets[0].spent + ).toBe(BigInt(2)); + }); + + it('a fixture preset produces rules accepted by public create and enforced by real contracts', async () => { + const presets = buildPresetApi([ + { + constant: 'DEXES', + name: 'Local fixture only', + chains: [ + { + chainNamespace: CHAIN_NS, + allowedCalls: [ + { target: DEST, selector: 'increment()', app: 'Harness' }, + ], + maxGasPerCall: BigInt(10) ** BigInt(16), + }, + ], + }, + ]); + const { rules } = presets.get('DEXES', { + agent: h.wallets[1].account!.address, + validUntil: Math.floor(Date.now() / 1000) + 3600, + assets: [ + { + chainNamespace: CHAIN_NS, + token: zeroAddress, + maxPerCall: BigInt(5), + maxTotal: BigInt(7), + }, + ], + }); + const { wallet, id, send } = await setup(rules[0]); + await waitPush(send(a, BigInt(5))); + expect((await stored(wallet, id)).assets[0].spent).toBe(BigInt(5)); + await expect(send(a, BigInt(3))).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(TotalSpendCapExceeded)' }, + }); + }); + + it('a tokens-only rule lets the agent transfer each token only back to the owner, capped per transfer', async () => { + const ownerAddress = h.wallets[0].account!.address; + const { wallet, id, agent } = await setup({ + agent: h.wallets[1].account!.address, + chainNamespace: CHAIN_NS, + assets: [{ token: a, maxPerCall: BigInt(5), maxTotal: BigInt(20) }], + validUntil: Math.floor(Date.now() / 1000) + 3600, + maxGasPerCall: BigInt(10) ** BigInt(16), + } as unknown as Rule); + const record = await owner.agentic.wallet(wallet).rules.get(id); + if (!('allowedCalls' in record.rule)) throw new Error('Expected EVM rule'); + expect(record.rule.allowedCalls).toHaveLength(1); + const ERC20 = parseAbi([ + 'function transfer(address,uint256) returns (bool)', + ]); + const send = (to: Address, amount: bigint, funded = BigInt(5)) => + agent.universal.sendTransaction({ + to: { address: a, chain: CHAIN_NS }, + funds: { + amount: funded, + token: { + symbol: 'fixture', + decimals: 6, + address: a, + mechanism: 'approve', + }, + }, + data: [ + { + to: a, + value: BigInt(0), + data: encodeFunctionData({ + abi: ERC20, + functionName: 'transfer', + args: [to, amount], + }), + }, + ], + }); + await waitPush(send(ownerAddress, BigInt(5))); + expect((await stored(wallet, id)).assets[0].spent).toBe(BigInt(5)); + await expect(send(DEST, BigInt(5))).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(ArgPinMismatch)' }, + }); + await expect(send(ownerAddress, BigInt(6))).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(ArgPinAboveMax)' }, + }); + }); + + it('public create encodes two ordered assets; public get reconstructs source-token caps', async () => { + const { wallet, id } = await setup(); + expect((await stored(wallet, id)).assets.map((x) => x.token)).toEqual([ + a, + b, + ]); + expect( + (await owner.agentic.wallet(wallet).rules.get(id)).rule + ).toMatchObject({ + assets: [ + { token: a, maxPerCall: BigInt(5), maxTotal: BigInt(7) }, + { token: b, maxPerCall: BigInt(9), maxTotal: BigInt(30) }, + ], + }); + }); + it('a token from the wrong chain fails before deployment', async () => { + const wrong = await h.deploy(0, 'HarnessPRC20', 'HarnessFixtures.sol', [ + 'eip155:1', + 6, + ]); + const count = await h.publicClient.readContract({ + address: h.addresses.factory, + abi: h.generation.contracts.abis.factory, + functionName: 'walletCount', + args: [h.wallets[0].account!.address], + }); + await expect( + owner.agentic.create('wrong-chain', { + rules: [rule([{ token: wrong, maxPerCall: BigInt(1) }])], + }) + ).rejects.toMatchObject({ code: 'ASSET_CHAIN_MISMATCH' }); + expect( + await h.publicClient.readContract({ + address: h.addresses.factory, + abi: h.generation.contracts.abis.factory, + functionName: 'walletCount', + args: [h.wallets[0].account!.address], + }) + ).toBe(count); + }); + it('a same-chain registry identity mismatch fails before deployment', async () => { + const rt = internal(owner); + const resolve = rt.resolvePrc20; + rt.resolvePrc20 = () => b; + try { + await expect( + owner.agentic.create('wrong-identity', { + rules: [rule([{ token: a, maxPerCall: BigInt(1) }])], + }) + ).rejects.toMatchObject({ code: 'INVALID_RULE' }); + } finally { + rt.resolvePrc20 = resolve; + } + }); + it('both tokens execute under one rule and keep independent counters/limits', async () => { + const { wallet, id, send } = await setup(); + await waitPush(send(a, BigInt(5))); + await expect(send(a, BigInt(3))).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(TotalSpendCapExceeded)' }, + }); + await waitPush(send(b, BigInt(9))); + expect((await stored(wallet, id)).assets.map((x) => x.spent)).toEqual([ + BigInt(5), + BigInt(9), + ]); + }); + it('omitted and explicit zero totals both prohibit movement', async () => { + const { wallet, id, send } = await setup( + rule([ + { token: a, maxPerCall: BigInt(5) }, + { token: b, maxPerCall: BigInt(9), maxTotal: BigInt(0) }, + ]) + ); + expect((await stored(wallet, id)).assets.map((x) => x.maxTotal)).toEqual([ + BigInt(0), + BigInt(0), + ]); + await expect(send(a, BigInt(1))).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(TotalSpendCapExceeded)' }, + }); + await expect(send(b, BigInt(1))).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(TotalSpendCapExceeded)' }, + }); + expect((await stored(wallet, id)).assets[1].spent).toBe(BigInt(0)); + }); + it('empty user assets grants one zero-cap gas token and executes a call-only request', async () => { + const { wallet, id, send } = await setup(rule([])); + expect((await stored(wallet, id)).assets).toEqual([ + { + token: a, + maxPerCall: BigInt(0), + maxTotal: BigInt(0), + spent: BigInt(0), + }, + ]); + await waitPush(send(a, BigInt(0))); + await expect(send(a, BigInt(1))).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(AmountExceedsCap)' }, + }); + }); + it('public update resets both counters in one batch and records five checkpoints', async () => { + const { wallet, id, send } = await setup(); + await waitPush(send(b, BigInt(4))); + const count = await h.publicClient.readContract({ + address: wallet, + abi: h.generation.contracts.abis.wallet, + functionName: 'checkpointCount', + }); + const result = await owner.agentic + .wallet(wallet) + .rules.update({ rules: [{ rulesId: id, rule: rule() }] }); + expect( + (await stored(wallet, result.rules[0].rulesId)).assets.map((x) => x.spent) + ).toEqual([BigInt(0), BigInt(0)]); + expect( + await h.publicClient.readContract({ + address: wallet, + abi: h.generation.contracts.abis.wallet, + functionName: 'checkpointCount', + }) + ).toBe(count + BigInt(5)); + }); + it('spend on the second asset after snapshot rolls back revoke/grant and checkpoint writes', async () => { + const { wallet, id, send } = await setup(); + const base = internal(owner); + const count = await h.publicClient.readContract({ + address: wallet, + abi: h.generation.contracts.abis.wallet, + functionName: 'checkpointCount', + }); + const racing = { + ...base, + execute: async (...args: Parameters) => { + await waitPush(send(b, BigInt(1))); + return base.execute(...args); + }, + }; + await expect( + updateRules(racing, h.generation, wallet, { + rules: [{ rulesId: id, rule: publicRules([rule()])[0] }], + }) + ).rejects.toMatchObject({ decodedError: { name: 'AssetSpentMismatch' } }); + expect( + await h.publicClient.readContract({ + address: h.addresses.engine, + abi: h.generation.contracts.abis.engine, + functionName: 'getPermissionIDs', + args: [wallet], + }) + ).toEqual([id]); + expect( + await h.publicClient.readContract({ + address: wallet, + abi: h.generation.contracts.abis.wallet, + functionName: 'checkpointCount', + }) + ).toBe(count); + }); + it('out-of-band duplicate contract grants still make sends ambiguous', async () => { + const created = await owner.agentic.create('multiple', { + rules: [rule()], + }); + const rt = internal(owner); + const [prepared] = await prepareWalletRules( + rt, + h.generation, + h.wallets[0].account!.address, + created.wallet, + publicRules([rule()]), + await Snapshot.at(rt.reader) + ); + await h.write( + 0, + created.wallet, + h.generation.contracts.abis.wallet as never, + 'grantRules', + [prepared.session] + ); + const agent = await h.client(1, { agenticWallet: created.wallet }); + await expect( + agent.universal.sendTransaction({ + to: { address: DEST, chain: CHAIN_NS }, + data: '0xd09de08a', + }) + ).rejects.toMatchObject({ code: 'AMBIGUOUS_RULE' }); + }); + it('a legacy two-field envelope is refused by the actual v6 grant path', async () => { + const bare = await owner.agentic.create('old-envelope', { rules: [] }); + const { encodeAbiParameters } = await import('viem'); + const terms = nativeRuleToTerms( + { + agent: h.wallets[1].account!.address, + target: h.addresses.target, + selector: 'increment()', + validUntil: Math.floor(Date.now() / 1000) + 3600, + }, + { nowSeconds: 0 } + ).terms; + const session = buildSession({ + validator: h.addresses.validator, + rulesPolicy: h.addresses.rulesPolicy, + agent: h.wallets[1].account!.address, + actions: [ + { + target: terms.target, + selector: terms.selector, + initData: encodeAbiParameters( + [{ type: 'string' }, { type: 'bytes' }], + ['eip155:9000', encodeNativeTerms(terms)] + ), + }, + ], + }); + await expect( + h.publicClient.simulateContract({ + address: bare.wallet, + abi: h.generation.contracts.abis.wallet, + functionName: 'grantRules', + args: [session as never], + account: h.wallets[0].account!.address, + }) + ).rejects.toMatchObject({ + cause: { data: { errorName: 'Panic', args: [BigInt(65)] } }, + }); + expect( + await h.publicClient.readContract({ + address: h.addresses.engine, + abi: h.generation.contracts.abis.engine, + functionName: 'getPermissionIDs', + args: [bare.wallet], + }) + ).toEqual([]); + }); +}); diff --git a/packages/core/__agw-local__/vectors.spec.ts b/packages/core/__agw-local__/vectors.spec.ts new file mode 100644 index 00000000..f75b3e80 --- /dev/null +++ b/packages/core/__agw-local__/vectors.spec.ts @@ -0,0 +1,229 @@ +import type { AgenticRuntime } from '../src/lib/agentic/runtime'; +/** + * Contract-generated vectors for the pure AGW codecs. Every `expected` value + * below is computed BY THE PINNED CONTRACTS (pure engine/factory views, or + * state read back after a real grant), never by the SDK under test. + * + * AGW_WRITE_VECTORS=1 → (re)write src/lib/agentic/__fixtures__/v6-vectors.json + * otherwise → assert the committed file still matches the contracts + */ +import { execSync } from 'node:child_process'; +import { readFileSync, writeFileSync, mkdirSync } from 'node:fs'; +import { join } from 'node:path'; +import { getAddress, numberToHex, type Address, type Hex } from 'viem'; +import { buildSession } from '../src/lib/agentic/codec/session'; +import { agentConfig } from '../src/lib/agentic/codec/ids'; +import { + encodeNativeTerms, + nativeRuleToTerms, +} from '../src/lib/agentic/codec/native'; +import { + encodeEnvelope, + encodeSession, +} from '../src/lib/agentic/codec/session'; +import type { NativeRule } from '../src/lib/agentic/agentic.types'; +import { startHarness, type Harness } from './harness'; + +const FIXTURE = join( + __dirname, + '..', + 'src', + 'lib', + 'agentic', + '__fixtures__', + 'v6-vectors.json' +); +const bigintJson = (v: unknown) => + JSON.stringify( + v, + (_k, x) => (typeof x === 'bigint' ? { $bigint: x.toString() } : x), + 2 + ); + +describe('contract-generated AGW vectors (v6)', () => { + let h: Harness; + beforeAll(async () => { + h = await startHarness(18548); + }); + afterAll(async () => { + await h?.stop(); + }); + + it('matches the committed fixture (or writes it)', async () => { + const pc = h.publicClient; + const gen = h.generation; + const validator = h.addresses.validator; + const agents: Address[] = [ + h.wallets[1].account!.address, + h.wallets[2].account!.address, + getAddress('0x00000000000000000000000000000000000000ff'), + ]; + + // rulesId: SmartSession.getPermissionId is pure over (validator, initData, salt). + const rulesId = []; + for (const agent of agents) { + for (const grantNonce of [ + BigInt(0), + BigInt(1), + BigInt(7), + BigInt(2) ** BigInt(63), + ]) { + const session = { + ...buildSession({ + validator, + agent, + rulesPolicy: h.addresses.rulesPolicy, + actions: [], + }), + salt: numberToHex(grantNonce, { size: 32 }), + }; + const expected = (await pc.readContract({ + address: h.addresses.engine, + abi: gen.contracts.abis.engine, + functionName: 'getPermissionId', + args: [session as never], + })) as Hex; + rulesId.push({ + validator, + agent, + grantNonce, + agentConfig: agentConfig(agent), + expected, + }); + } + } + + // deriveWallet: factory.predictWallet for fresh owners (index 0) and a used owner (0..next). + const deriveWallet = []; + const owners: Address[] = [ + h.wallets[3].account!.address, + getAddress('0x1111111111111111111111111111111111111111'), + ]; + for (const owner of owners) { + const [expected] = (await pc.readContract({ + address: h.addresses.factory, + abi: gen.contracts.abis.factory, + functionName: 'predictWallet', + args: [owner, BigInt(0)], + })) as readonly [Address, boolean]; + deriveWallet.push({ + factory: h.addresses.factory, + walletImplementation: h.addresses.walletImplementation, + owner, + index: 0, + expected, + }); + } + + // Native session round trip: SDK-encoded grant, contract-stored terms and IDs. + const owner = await h.client(0); + const rule: NativeRule = { + agent: agents[0], + target: h.addresses.target, + selector: 'deposit(address,uint256)', + validUntil: 4102444800, // 2100-01-01, fixed so the vector is reproducible + pins: [{ arg: 0, expected: agents[1] }], + amount: { arg: 1, maxPerCall: BigInt(10), maxTotal: BigInt(100) }, + maxValuePerCall: BigInt(5), + maxValueTotal: BigInt(50), + maxCalls: 3, + }; + const { createWallet } = await import( + '../src/lib/agentic/management/create' + ); + const created = await createWallet( + (owner as unknown as { agenticRuntime: AgenticRuntime }).agenticRuntime, + 'vectors', + { rules: [rule] } + ); + const wallet = created.wallet; + const rid = created.rulesIds[0]; + const [actionId] = (await pc.readContract({ + address: h.addresses.engine, + abi: gen.contracts.abis.engine, + functionName: 'getEnabledActions', + args: [wallet, rid], + })) as Hex[]; + const { terms } = nativeRuleToTerms(rule, { nowSeconds: 0 }); + const nativeChain = `eip155:${await pc.getChainId()}`; + const session = buildSession({ + validator, + agent: rule.agent, + rulesPolicy: h.addresses.rulesPolicy, + actions: [ + { + target: terms.target, + selector: terms.selector, + initData: encodeEnvelope(nativeChain, encodeNativeTerms(terms)), + }, + ], + }); + // configId is recovered by searching what the policy accepts: the stored config is only + // initialized under the correct key, so a successful read proves the derivation. + const { configId } = await import('../src/lib/agentic/codec/ids'); + const cid = configId(wallet, rid, actionId); + const stored = (await pc.readContract({ + address: h.addresses.rulesPolicy, + abi: gen.contracts.abis.policy, + functionName: 'getNativeConfig', + args: [cid, wallet], + })) as { + initialized: boolean; + target: Address; + selector: Hex; + pins: readonly { offset: number; op: number; value: Hex }[]; + amount: { offset: number }; + }; + const native = { + rule, + nativeChain, + wallet, + rulesId: rid, + actionId, + configId: cid, + configInitialized: stored.initialized, + storedTarget: stored.target, + storedSelector: stored.selector, + storedPins: stored.pins.map((p) => ({ + offset: Number(p.offset), + op: p.op, + value: p.value, + })), + storedAmountOffset: Number(stored.amount.offset), + encodedSession: encodeSession(session), + }; + + const vectors = { + provenance: { + agwCommit: h.generation.sourceCommit, + generatedBy: 'packages/core/__agw-local__/vectors.spec.ts', + toolchain: safe( + () => execSync('forge --version').toString().split('\n')[0] + ), + chainId: await pc.getChainId(), + note: 'Addresses are deterministic for a fresh anvil + the harness deploy order.', + }, + rulesId, + deriveWallet, + native, + }; + + if (process.env['AGW_WRITE_VECTORS'] === '1') { + mkdirSync(join(FIXTURE, '..'), { recursive: true }); + writeFileSync(FIXTURE, bigintJson(vectors) + '\n'); + } + const committed = JSON.parse(readFileSync(FIXTURE, 'utf8')); + const { provenance: _a, ...current } = JSON.parse(bigintJson(vectors)); + const { provenance: _b, ...saved } = committed; + expect(current).toEqual(saved); + expect(native.configInitialized).toBe(true); + }); +}); + +function safe(f: () => string): string { + try { + return f(); + } catch { + return 'unknown'; + } +} diff --git a/packages/core/__e2e__/agw-svm-wire/outbound.spec.ts b/packages/core/__e2e__/agw-svm-wire/outbound.spec.ts new file mode 100644 index 00000000..19aea3c0 --- /dev/null +++ b/packages/core/__e2e__/agw-svm-wire/outbound.spec.ts @@ -0,0 +1,468 @@ +/** Internal wire acceptance alongside public Solana coverage. Policy refusals come from URP simulation. */ +import '@e2e/shared/setup'; +import { PushChain } from '../../src'; +import { + Keypair, + PublicKey, + type ParsedTransactionWithMeta, +} from '@solana/web3.js'; +import bs58 from 'bs58'; +import { + bytesToHex, + createPublicClient, + http, + encodeFunctionData, + erc20Abi, + parseAbi, + parseEther, + type Address, + type Hex, +} from 'viem'; +import { privateKeyToAccount } from 'viem/accounts'; +import { CHAIN, PUSH_NETWORK } from '../../src/lib/constants/enums'; +import { CHAIN_INFO, getPushViemChain } from '../../src/lib/constants/chain'; +import type { AgenticRuntime } from '../../src/lib/agentic/runtime'; +import { resolveWalletGeneration } from '../../src/lib/agentic/deployments'; +import { Snapshot } from '../../src/lib/agentic/reads/snapshot'; +import { readSvmRule } from '../../src/lib/agentic/reads/svm'; +import { grantSvmWire } from '../../src/lib/agentic/management/svm'; +import { createSvmMetadataProvider } from '../../src/lib/agentic/management/svm-metadata'; +import { resolveSvmContext } from '../../src/lib/agentic/management/svm-context'; +import { + sendSvmAgentWire, + prepareSvmAgentExecution, + type PreparedSvmRequest, +} from '../../src/lib/agentic/execution/svm-send'; +import { + SvmDataPinMode, + type SvmTermsWire, +} from '../../src/lib/agentic/codec/svm-terms'; +import { svmKey } from '../../src/lib/agentic/codec/svm-accounts'; +import { adaptTrackedResponse } from '../../src/lib/agentic/response'; +import { v6 } from '../../src/lib/agentic/contracts/v6'; +import { + setupAgw, + evmClient, + inSeconds, + type AgwFixture, +} from '../agw/_fixture'; +import { loadAgwManifest, verifyAgwManifest } from '../agw/_manifest'; +import { + inspectSvmWirePrograms, + svmWireConnection, + SVM_WIRE_CHAIN, + SVM_WIRE_GATEWAY, + SVM_WIRE_PROGRAM, + SVM_WIRE_COUNTER, + decodeWireCounter, +} from '../shared/agw-svm-preflight'; +import { probeSvmWirePolicies } from '../shared/agw-svm-policy-probe'; + +const d = process.env['AGW_SVM_WIRE_E2E'] === '1' ? describe : describe.skip; +// Load the public entry point before internal modules (the existing harness +// does the same); keeping this runtime use prevents TypeScript erasing it. +if (PushChain.CONSTANTS.CHAIN.SOLANA_DEVNET !== SVM_WIRE_CHAIN) + throw new Error('Solana fixture chain mismatch'); +const AMOUNT = BigInt(10_000); // 0.00001 SOL, twice at most per run. +const MAX_PC = parseEther('20'); +const RECEIVE = '0x79f4fa0308e5e101' as Hex; +const DECREMENT = '0x6ae3a83bf81b9665' as Hex; +const ZERO = `0x${'00'.repeat(32)}` as Hex; +const rt = (c: PushChain) => + (c as unknown as { agenticRuntime: AgenticRuntime }).agenticRuntime; +const ixData = (disc: Hex, amount: bigint) => { + const b = Buffer.alloc(16); + Buffer.from(disc.slice(2), 'hex').copy(b); + b.writeBigUInt64LE(amount, 8); + return b; +}; + +function transferFromCea( + tx: ParsedTransactionWithMeta, + cea: string, + recipient: string, + amount: bigint +) { + return tx.meta?.innerInstructions?.some((group) => + group.instructions.some( + (ix) => + 'parsed' in ix && + ix.program === 'system' && + ix.parsed.type === 'transfer' && + ix.parsed.info.source === cea && + ix.parsed.info.destination === recipient && + BigInt(ix.parsed.info.lamports) === amount + ) + ); +} + +d('agw svm wire', () => { + let f: AgwFixture, + wallet: Address, + token: Address, + rulesId: Hex, + agent: PushChain; + let gen: Awaited>; + let recipient: PublicKey, cea: PublicKey; + const sol = svmWireConnection(); + const metadata = createSvmMetadataProvider( + { + [SVM_WIRE_CHAIN]: { + gatewayProgram: SVM_WIRE_GATEWAY, + rpcUrls: CHAIN_INFO[SVM_WIRE_CHAIN].defaultRPC, + }, + }, + (url) => svmWireConnection(url) + ); + const accounts = (failure = false) => + failure + ? [ + { pubkey: svmKey(SVM_WIRE_COUNTER.toBase58()), isWritable: true }, + { pubkey: svmKey(cea.toBase58()), isWritable: false }, + ] + : [ + { pubkey: svmKey(SVM_WIRE_COUNTER.toBase58()), isWritable: true }, + { pubkey: svmKey(recipient.toBase58()), isWritable: true }, + { pubkey: svmKey(cea.toBase58()), isWritable: true }, + { pubkey: ZERO, isWritable: false }, + ]; + const request = (failure = false): PreparedSvmRequest => ({ + wallet, + rulesId, + token, + amount: AMOUNT, + gasLimit: BigInt(0), + program: SVM_WIRE_PROGRAM, + instructionData: ixData( + failure ? DECREMENT : RECEIVE, + failure ? BigInt(1) : AMOUNT + ), + accounts: accounts(failure), + }); + const stored = () => + Snapshot.at(rt(f.owner).reader).then((snap) => + readSvmRule(snap, gen, wallet, rulesId, rt(f.owner).pushChainNamespace) + ); + + beforeAll(async () => { + // Every cluster/program check runs before setupAgw can fund anything. + const preflight = await inspectSvmWirePrograms(sol); + const key = process.env['SOLANA_PRIVATE_KEY']; + if (!key) + throw new Error( + 'SOLANA_PRIVATE_KEY is needed only to identify the owned recipient' + ); + try { + recipient = Keypair.fromSecretKey(bs58.decode(key)).publicKey; + } catch { + recipient = Keypair.fromSecretKey( + Uint8Array.from(JSON.parse(key)) + ).publicKey; + } + const destination = await sol.getAccountInfo(recipient); + if ( + !destination || + destination.executable || + !destination.owner.equals(PublicKey.default) + ) + throw new Error('Owned recipient must be an existing System account'); + if ( + parseEther(process.env['AGW_E2E_AGENT_PC'] ?? '0.5') > parseEther('0.5') + ) + throw new Error('Wire suite agent funding is bounded to 0.5 PC'); + const manifest = loadAgwManifest(); + if (manifest.network !== PUSH_NETWORK.TESTNET_DONUT) + throw new Error('Wire suite is restricted to Donut'); + const push = createPublicClient({ + chain: getPushViemChain(CHAIN.PUSH_TESTNET_DONUT), + transport: http(CHAIN_INFO[CHAIN.PUSH_TESTNET_DONUT].defaultRPC[0]), + }); + await verifyAgwManifest(push, manifest); + const ownerKey = process.env['PUSH_PRIVATE_KEY'] as Hex | undefined; + if (!ownerKey) throw new Error('PUSH_PRIVATE_KEY is required'); + const ownerAddress = privateKeyToAccount(ownerKey).address; + token = await push.readContract({ + address: '0x00000000000000000000000000000000000000C0', + abi: parseAbi([ + 'function gasTokenPRC20ByChainNamespace(string) view returns (address)', + ]), + functionName: 'gasTokenPRC20ByChainNamespace', + args: [SVM_WIRE_CHAIN], + }); + const ownerTokens = await push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [ownerAddress], + }); + if (ownerTokens < AMOUNT * BigInt(2)) + throw new Error('Push owner needs 0.00002 pSOL for this bounded suite'); + if ((await push.getBalance({ address: ownerAddress })) < parseEther('45')) + throw new Error( + 'Push owner needs 45 PC to cover bounded setup and outbound budgets' + ); + f = await setupAgw(); + f.evidence('svm-wire-program-preflight', preflight); + wallet = ( + await f.owner.agentic.create('e2e-internal-svm-wire', { rules: [] }) + ).wallet; + gen = await resolveWalletGeneration( + rt(f.owner).reader, + f.manifest.network, + wallet + ); + const resolved = await resolveSvmContext( + await Snapshot.at(rt(f.owner).reader), + wallet, + SVM_WIRE_CHAIN, + [{ token, maxPerCall: AMOUNT, maxTotal: AMOUNT * BigInt(2) }], + metadata + ); + cea = new PublicKey(Buffer.from(resolved.expectedCEA.slice(2), 'hex')); + if (cea.toBase58() === preflight.counter.authority) + throw new Error( + 'Failure fixture requires a counter authority different from the fresh AGW CEA' + ); + const terms: SvmTermsWire = { + ...resolved, + validUntil: inSeconds(7200), + maxGasPerCall: MAX_PC, + programs: [RECEIVE, DECREMENT].map((discriminator, i) => ({ + program: svmKey(SVM_WIRE_PROGRAM), + discriminator, + discriminatorLen: 8, + dataless: false, + maxAccounts: i === 0 ? 4 : 2, + })), + pins: [false, true].flatMap((failure, ruleIndex) => + accounts(failure).map((a, accountIndex) => ({ + ruleIndex, + accountIndex, + expected: a.pubkey, + })) + ), + dataPins: [AMOUNT, BigInt(1)].map((limit, ruleIndex) => ({ + ruleIndex, + fromEnd: false, + offset: 8, + offsetB: 0, + len: 8, + mode: SvmDataPinMode.LTE_LE, + expected: `0x${limit.toString(16).padStart(64, '0')}`, + num: BigInt(0), + den: BigInt(0), + })), + }; + const grant = await grantSvmWire(rt(f.owner), gen, wallet, { + agent: f.agentAddress, + chainNamespace: SVM_WIRE_CHAIN, + terms, + }); + rulesId = grant.rulesId; + await f.fundPC(wallet, MAX_PC * BigInt(2) + parseEther('1')); + await ( + await f.owner.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [wallet, AMOUNT * BigInt(2)], + }), + }) + ).wait(); + const ownerWallet = await evmClient( + process.env['PUSH_PRIVATE_KEY'] as Hex, + CHAIN.PUSH_TESTNET_DONUT, + f.manifest.network, + wallet + ); + await ( + await ownerWallet.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'approve', + args: [f.manifest.addresses.gateway, AMOUNT * BigInt(2)], + }), + }) + ).wait(); + agent = await f.agent(wallet); + f.evidence('svm-wire-setup', { + wallet, + rulesId, + grantHash: grant.tx.hash, + agent: f.agentAddress, + recipient: recipient.toBase58(), + cea: cea.toBase58(), + token, + terms, + walletPCFunded: MAX_PC * BigInt(2) + parseEther('1'), + tokenFunded: AMOUNT * BigInt(2), + }); + }, 900_000); + afterAll(() => f?.teardown()); + + it('1. positive outbound: actual CEA transfer and counter execution, receipt and replay', async () => { + const before = decodeWireCounter( + (await sol.getAccountInfo(SVM_WIRE_COUNTER))!.data + ).value; + const count = await f.push.readContract({ + address: wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }); + const { tx } = await sendSvmAgentWire(rt(agent), gen, request(), metadata); + f.evidence('svm-wire-positive-submitted', { + wallet, + rulesId, + hash: tx.hash, + }); + // Existing verified-wallet replay adaptation enables normal outbound wait; + // it uses the gateway wire call as the logical summary, not a new SVM API. + await adaptTrackedResponse(rt(agent), tx); + expect(tx.from).toBe(wallet); + expect(tx.route).toBe('UOA_TO_CEA'); + const receipt = await tx.wait({ outboundTimeoutMs: 600_000 }); + f.evidence('svm-wire-positive-receipt', { hash: tx.hash, receipt }); + expect(receipt.status).toBe(1); + expect(receipt.externalStatus).toBe('success'); + expect(receipt.from).toBe(wallet); + expect(receipt.externalChain).toBe(SVM_WIRE_CHAIN); + const destination = await sol.getParsedTransaction( + receipt.externalTxHash!, + { commitment: 'confirmed', maxSupportedTransactionVersion: 0 } + ); + expect(destination).not.toBeNull(); + expect(destination!.meta!.err).toBeNull(); + expect( + transferFromCea( + destination!, + cea.toBase58(), + recipient.toBase58(), + AMOUNT + ) + ).toBe(true); + expect( + destination!.meta!.innerInstructions?.some((g) => + g.instructions.some( + (ix) => + 'data' in ix && + ix.programId.toBase58() === SVM_WIRE_PROGRAM && + bytesToHex(bs58.decode(ix.data)) === + bytesToHex(ixData(RECEIVE, AMOUNT)) && + ix.accounts.some((a) => a.equals(cea)) + ) + ) + ).toBe(true); + expect( + decodeWireCounter((await sol.getAccountInfo(SVM_WIRE_COUNTER))!.data) + .value + ).toBeGreaterThanOrEqual(before + AMOUNT); + expect((await stored()).config.assets[0].spent).toBe(AMOUNT); + expect( + await f.push.readContract({ + address: wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }) + ).toBe(count); + const replay = await f.owner.universal.trackTransaction(tx.hash); + expect(replay.from).toBe(wallet); + expect(replay.route).toBe('UOA_TO_CEA'); + expect(replay.agentic).toMatchObject({ door: 'agent', rulesId }); + const replayReceipt = await replay.wait({ outboundTimeoutMs: 600_000 }); + expect(replayReceipt.externalTxHash).toBe(receipt.externalTxHash); + f.evidence('svm-wire-positive-destination', { + hash: tx.hash, + externalTxHash: receipt.externalTxHash, + destination, + replayReceipt, + }); + }, 900_000); + + it('2. substituted account and oversized instruction amount fail before submission', async () => { + const base = request(); + const wrong = [...base.accounts!]; + wrong[2] = { ...wrong[2], pubkey: svmKey(recipient.toBase58()) }; + const nonce = await f.push.getTransactionCount({ address: f.agentAddress }); + await expect( + sendSvmAgentWire(rt(agent), gen, { ...base, accounts: wrong }, metadata) + ).rejects.toMatchObject({ + name: 'AgenticRevertError', + decodedError: { name: 'PolicyCheckReverted(SvmAccountPinMismatch)' }, + }); + await expect( + sendSvmAgentWire( + rt(agent), + gen, + { ...base, instructionData: ixData(RECEIVE, AMOUNT + BigInt(1)) }, + metadata + ) + ).rejects.toMatchObject({ + name: 'AgenticRevertError', + decodedError: { name: 'PolicyCheckReverted(SvmDataCeilingExceeded)' }, + }); + const prepared = await prepareSvmAgentExecution( + rt(agent), + gen, + base, + metadata + ); + const policy = await probeSvmWirePolicies(f.push, { + from: f.agentAddress, + wallet, + rulesId, + call: prepared.call, + blockNumber: await f.push.getBlockNumber(), + }); + expect(await f.push.getTransactionCount({ address: f.agentAddress })).toBe( + nonce + ); + f.evidence('svm-wire-preflight-refusals', { + wallet, + rulesId, + nonce, + policy, + transactionsSent: 0, + }); + }); + + it('3. destination program failure is classified and does not restore policy spend', async () => { + const prior = (await stored()).config.assets[0].spent; + const { tx } = await sendSvmAgentWire( + rt(agent), + gen, + request(true), + metadata + ); + f.evidence('svm-wire-failure-submitted', { + wallet, + rulesId, + hash: tx.hash, + }); + await adaptTrackedResponse(rt(agent), tx); + // The observed node rejection lifecycle exceeded ten minutes. Keep the + // failed assertion strict while allowing the bounded terminalization window. + const receipt = await tx.wait({ outboundTimeoutMs: 1_200_000 }); + f.evidence('svm-wire-failure-receipt', { hash: tx.hash, receipt }); + const pushReceipt = await f.push.getTransactionReceipt({ + hash: tx.hash as Hex, + }); + expect(pushReceipt.status).toBe('success'); + expect(receipt.externalStatus).toBe('failed'); + expect((await stored()).config.assets[0].spent).toBe(prior + AMOUNT); + if (receipt.externalTxHash) { + const destination = await sol.getParsedTransaction( + receipt.externalTxHash, + { commitment: 'confirmed', maxSupportedTransactionVersion: 0 } + ); + expect(destination).not.toBeNull(); + expect(destination!.meta!.err).not.toBeNull(); + f.evidence('svm-wire-failure-destination', { + hash: tx.hash, + externalTxHash: receipt.externalTxHash, + destination, + }); + } + }, 1_500_000); +}); diff --git a/packages/core/__e2e__/agw-svm-wire/replay.spec.ts b/packages/core/__e2e__/agw-svm-wire/replay.spec.ts new file mode 100644 index 00000000..a1331363 --- /dev/null +++ b/packages/core/__e2e__/agw-svm-wire/replay.spec.ts @@ -0,0 +1,102 @@ +/** Read-only acceptance of recorded wire transactions; no signer or funding required. */ +import { PushChain } from '../../src'; +import { createPublicClient, http, type Hex } from 'viem'; +import { CHAIN_INFO, getPushViemChain } from '../../src/lib/constants/chain'; +import { CHAIN, PUSH_NETWORK } from '../../src/lib/constants/enums'; +import { v6 } from '../../src/lib/agentic/contracts/v6'; +import { chainReaderFromPublicClient } from '../../src/lib/agentic/contracts/reader'; +import { resolveWalletGeneration } from '../../src/lib/agentic/deployments'; +import { Snapshot } from '../../src/lib/agentic/reads/snapshot'; +import { readSvmRule } from '../../src/lib/agentic/reads/svm'; +import { probeSvmWirePolicies } from '../shared/agw-svm-policy-probe'; + +const d = + process.env['AGW_SVM_WIRE_REPLAY_E2E'] === '1' ? describe : describe.skip; +const POSITIVE = + '0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8' as Hex; +const REJECTED = + '0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc' as Hex; +const EXTERNAL = + 'kGUaPUfASg9Poo93aMsztHJjUk27MKuRJBfDZK1WP3FFSaXSYcoPcxjUMFyDxaK6aU6mQkZeowSu3MtvK5PXKgK'; + +d('agw svm recorded replay', () => { + const push = createPublicClient({ + chain: getPushViemChain(CHAIN.PUSH_TESTNET_DONUT), + transport: http(CHAIN_INFO[CHAIN.PUSH_TESTNET_DONUT].defaultRPC[0]), + }); + let source: Awaited>; + let decoded: Extract< + NonNullable>, + { kind: 'executeAsAgent' } + >; + let client: PushChain; + beforeAll(async () => { + source = await push.getTransaction({ hash: POSITIVE }); + const call = v6.decodeWalletCall(source.input); + if (!source.to || call?.kind !== 'executeAsAgent') + throw new Error('Recorded fixture is not an AGW agent call'); + decoded = call; + client = await PushChain.initialize( + { + chain: PushChain.CONSTANTS.CHAIN.PUSH_TESTNET_DONUT, + address: source.from, + }, + { network: PUSH_NETWORK.TESTNET_DONUT } + ); + expect(client.isReadMode).toBe(true); + }); + it('1. positive replay retains wallet, signer origin and actual Solana signature', async () => { + const tx = await client.universal.trackTransaction(POSITIVE); + expect(tx.from.toLowerCase()).toBe(source.to!.toLowerCase()); + expect(tx.origin.toLowerCase()).toBe( + `eip155:42101:${source.from}`.toLowerCase() + ); + expect(tx.agentic?.rulesId).toBe(decoded.rulesId); + expect(tx.route).toBe('UOA_TO_CEA'); + const receipt = await tx.wait({ outboundTimeoutMs: 30_000 }); + expect(receipt.status).toBe(1); + expect(receipt.externalStatus).toBe('success'); + expect(receipt.externalTxHash).toBe(EXTERNAL); + }, 120_000); + it('2. later terminal rejection is failed, while the source succeeded and spend remains charged', async () => { + const tx = await client.universal.trackTransaction(REJECTED); + const receipt = await tx.wait({ outboundTimeoutMs: 30_000 }); + expect(receipt.status).toBe(1); + expect(receipt.externalStatus).toBe('failed'); + expect(receipt.externalError).toContain( + 'tx not executed on destination chain' + ); + expect(tx.from.toLowerCase()).toBe(source.to!.toLowerCase()); + // Historical snapshot after the actual refund block, immune to later owner changes. + const reader = chainReaderFromPublicClient(push); + const gen = await resolveWalletGeneration( + reader, + PUSH_NETWORK.TESTNET_DONUT, + source.to! + ); + const snapshot = new Snapshot(reader, BigInt(23950160)); + const rule = await readSvmRule( + snapshot, + gen, + source.to!, + decoded.rulesId, + 'eip155:42101' + ); + expect(rule.config.assets[0].spent).toBe(BigInt(20_000)); + }, 120_000); + it('3. pinned live policy calls refuse account and data mutations without submitting', async () => { + const receipt = await push.getTransactionReceipt({ hash: POSITIVE }); + const result = await probeSvmWirePolicies(push, { + from: source.from, + wallet: source.to!, + rulesId: decoded.rulesId, + call: decoded.calls[0], + blockNumber: receipt.blockNumber, + }); + expect(result.transactionsSent).toBe(0); + expect(result.observations.map((r) => r.decoded.name)).toEqual([ + 'PolicyCheckReverted(SvmAccountPinMismatch)', + 'PolicyCheckReverted(SvmDataCeilingExceeded)', + ]); + }); +}); diff --git a/packages/core/__e2e__/agw/_fixture.ts b/packages/core/__e2e__/agw/_fixture.ts new file mode 100644 index 00000000..4ac49fba --- /dev/null +++ b/packages/core/__e2e__/agw/_fixture.ts @@ -0,0 +1,145 @@ +/** + * Shared AGW E2E fixture. Everything here is setup: the behaviour under test + * is always exercised through public SDK methods in the specs. + * + * Accounts (never logged): + * PUSH_PRIVATE_KEY Push-native owner (the Push master); pays owner gas, + * wallet PC and the bounded per-run agent funding. + * EVM_PRIVATE_KEY external EVM agent, acting through its Sepolia-origin UEA. + * SOLANA_PRIVATE_KEY Solana-origin agent through its UEA (Push-destination only). + * A fresh Push-native agent key is generated per run and funded with at most + * AGW_E2E_AGENT_PC (default 0.5 PC). Wallets are fresh per run; nothing shared + * is revoked or drained. + */ +import '@e2e/shared/setup'; +import { appendFileSync, mkdirSync } from 'node:fs'; +import { join } from 'node:path'; +import { createPublicClient, createWalletClient, defineChain, http, parseEther, type Address, type Hex, type PublicClient } from 'viem'; +import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'; +import { PushChain } from '../../src'; +import { CHAIN_INFO } from '../../src/lib/constants/chain'; +import { CHAIN, PUSH_NETWORK } from '../../src/lib/constants/enums'; +import { registerAgenticGeneration, resetAgenticGenerations } from '../../src/lib/agentic/deployments'; +import { createEvmPushClient } from '@e2e/shared/evm-client'; +import { AgwPrerequisiteError, loadAgwManifest, verifyAgwManifest, type AgwManifest } from './_manifest'; + +export const AGW_E2E_ENABLED = process.env['AGW_E2E'] === '1'; + +export interface AgwFixture { + manifest: AgwManifest; + push: PublicClient; + owner: PushChain; + ownerAddress: Address; + agentKey: Hex; + agentAddress: Address; + agent(wallet: Address, progressHook?: (e: unknown) => void): Promise; + fundPC(to: Address, amount: bigint): Promise; + /** Funds the generated agent; already done unless setup deferred it. */ + fundAgent(): Promise; + evidence(name: string, data: Record): void; + teardown(): void; +} + +const pushChainFor = (network: PUSH_NETWORK) => + network === PUSH_NETWORK.MAINNET ? CHAIN.PUSH_MAINNET : network === PUSH_NETWORK.LOCALNET ? CHAIN.PUSH_LOCALNET : CHAIN.PUSH_TESTNET_DONUT; + +/** + * Strict prerequisite gate: throws (failing beforeAll, hence every test) when + * the manifest, keys or wiring are missing. A selected agw run can never pass + * without exercising a verified deployment. + */ +export async function setupAgw( + options: { deferAgentFunding?: boolean } = {} +): Promise { + const manifest = loadAgwManifest(); + if (manifest.network !== PUSH_NETWORK.TESTNET_DONUT) { + throw new AgwPrerequisiteError('live AGW fixtures require Donut'); + } + const pushKey = process.env['PUSH_PRIVATE_KEY'] as Hex | undefined; + if (!pushKey) throw new AgwPrerequisiteError('PUSH_PRIVATE_KEY is not set'); + const chain = pushChainFor(manifest.network); + const info = CHAIN_INFO[chain]; + const push = createPublicClient({ + chain: defineChain({ + id: Number(info.chainId), + name: 'push', + nativeCurrency: { name: 'PC', symbol: 'PC', decimals: 18 }, + rpcUrls: { default: { http: info.defaultRPC } }, + }), + transport: http(info.defaultRPC[0]), + }) as PublicClient; + await verifyAgwManifest(push, manifest); + resetAgenticGenerations(); + registerAgenticGeneration({ + id: manifest.generation, + sourceCommit: manifest.sourceCommit, + network: manifest.network, + advertised: false, + addresses: manifest.addresses, + startBlock: manifest.startBlock, + accountId: manifest.accountId, + capabilities: manifest.capabilities, + }); + + const { pushClient: owner, account } = await createEvmPushClient({ chain, privateKey: pushKey, network: manifest.network }); + const agentKey = generatePrivateKey(); + const agentAddress = privateKeyToAccount(agentKey).address; + const fundPC = async (to: Address, amount: bigint) => { + const tx = await owner.universal.sendTransaction({ to, value: amount }); + const r = await tx.wait(); + if (r.status !== 1) throw new Error(`funding ${to} failed`); + }; + const fundAgent = () => fundPC(agentAddress, parseEther(process.env['AGW_E2E_AGENT_PC'] ?? '0.5')); + // Deferred callers check their prerequisites first, so a blocked case spends nothing. + if (!options.deferAgentFunding) await fundAgent(); + + const logDir = join(__dirname, '..', '..', 'e2e-logs'); + mkdirSync(logDir, { recursive: true }); + const evidence = (name: string, data: Record) => + appendFileSync( + join(logDir, 'agw-evidence.jsonl'), + JSON.stringify( + { name, at: new Date().toISOString(), network: manifest.network, sourceCommit: manifest.sourceCommit, ...data }, + (_k, v) => (typeof v === 'bigint' ? v.toString() : v) + ) + '\n' + ); + + return { + manifest, + push, + owner, + ownerAddress: account.address, + agentKey, + agentAddress, + agent: (wallet, progressHook) => evmClient(agentKey, chain, manifest.network, wallet, progressHook), + fundPC, + fundAgent, + evidence, + teardown: () => resetAgenticGenerations(), + }; +} + +export const inSeconds = (s: number) => Math.floor(Date.now() / 1000) + s; + +/** A client for an EVM key on `origin` (Push-native or external), optionally acting as an AGW. */ +export async function evmClient( + key: Hex, + origin: CHAIN, + network: PUSH_NETWORK, + agenticWallet?: Address, + progressHook?: (e: unknown) => void +): Promise { + const walletClient = createWalletClient({ + account: privateKeyToAccount(key), + transport: http(CHAIN_INFO[origin].defaultRPC[0]), + }); + const signer = await PushChain.utils.signer.toUniversalFromKeypair(walletClient, { + chain: origin, + library: PushChain.CONSTANTS.LIBRARY.ETHEREUM_VIEM, + }); + return PushChain.initialize(signer, { + network, + ...(agenticWallet ? { agenticWallet } : {}), + ...(progressHook ? { progressHook: progressHook as never } : {}), + }); +} diff --git a/packages/core/__e2e__/agw/_manifest.ts b/packages/core/__e2e__/agw/_manifest.ts new file mode 100644 index 00000000..fa3ac52a --- /dev/null +++ b/packages/core/__e2e__/agw/_manifest.ts @@ -0,0 +1,208 @@ +/** + * AGW deployment manifest for live E2E — READ-ONLY. Loaded from the JSON file + * optionally named by AGW_DEPLOYMENT_MANIFEST, otherwise the built-in Donut v6 + * manifest. Code/wiring/version are verified before tests or preflight funding. + * + * Manifest shape: + * { + * "network": "TESTNET_DONUT", + * "generation": "v5", + * "sourceCommit": "<40-hex AGW commit>", + * "startBlock": "", + * "accountId": "push.agw.1.0.0", + * "addresses": { "factory", "walletImplementation", "sessionEngine", + * "rulesPolicy", "sessionValidator", "gateway" }, + * "capabilities": ["nativeRules", ...] // optional; defaults to the generation's + * } + */ +import { readFileSync } from 'node:fs'; +import { + getAddress, + getAbiItem, + isAddress, + type Address, + type PublicClient, + toFunctionSelector, +} from 'viem'; +import { PUSH_NETWORK } from '../../src/lib/constants/enums'; +import { AgenticCapability } from '../../src/lib/agentic/capabilities'; +import { V6_CAPABILITIES } from '../../src/lib/agentic/deployments'; +import { v6 } from '../../src/lib/agentic/contracts/v6'; +import { + DONUT_V6_ADDRESSES, + DONUT_V6_START_BLOCK, + V6_SOURCE_COMMIT, +} from '../../src/lib/agentic/contracts/donut-v6'; + +export const AGW_PREREQ_HINT = + 'AGW live E2E needs checked v5 wiring, signer keys and testnet funding. ' + + 'The default is the checked Donut v6 manifest; custom manifests must match the v5 source.'; + +export interface AgwManifest { + network: PUSH_NETWORK; + generation: 'v6'; + sourceCommit: string; + startBlock: bigint; + accountId: string; + addresses: { + factory: Address; + walletImplementation: Address; + sessionEngine: Address; + rulesPolicy: Address; + sessionValidator: Address; + gateway: Address; + }; + capabilities: ReadonlySet; +} + +export class AgwPrerequisiteError extends Error { + constructor(reason: string) { + super(`AGW prerequisite not met: ${reason}. ${AGW_PREREQ_HINT}`); + this.name = 'AgwPrerequisiteError'; + } +} + +export function loadAgwManifest( + path = process.env['AGW_DEPLOYMENT_MANIFEST'] +): AgwManifest { + if (!path) + return { + network: PUSH_NETWORK.TESTNET_DONUT, + generation: 'v6', + sourceCommit: V6_SOURCE_COMMIT, + startBlock: DONUT_V6_START_BLOCK, + accountId: 'push.agw.1.0.0', + addresses: DONUT_V6_ADDRESSES, + capabilities: V6_CAPABILITIES, + }; + let raw: Record; + try { + raw = JSON.parse(readFileSync(path, 'utf8')); + } catch (cause) { + throw new AgwPrerequisiteError( + `cannot read manifest ${path}: ${(cause as Error).message}` + ); + } + const network = raw['network'] as PUSH_NETWORK; + if (!Object.values(PUSH_NETWORK).includes(network)) + throw new AgwPrerequisiteError(`unknown network ${String(network)}`); + if (raw['generation'] !== v6.id) { + throw new AgwPrerequisiteError( + `generation ${String(raw['generation'])} has no SDK adapter` + ); + } + if (raw['sourceCommit'] !== V6_SOURCE_COMMIT) { + throw new AgwPrerequisiteError( + 'sourceCommit must match the supported v6 source pin' + ); + } + const a = (raw['addresses'] ?? {}) as Record; + const keys = [ + 'factory', + 'walletImplementation', + 'sessionEngine', + 'rulesPolicy', + 'sessionValidator', + 'gateway', + ] as const; + for (const k of keys) { + if (!isAddress(a[k] ?? '', { strict: false })) + throw new AgwPrerequisiteError(`addresses.${k} is missing or invalid`); + } + const caps = Array.isArray(raw['capabilities']) + ? new Set( + (raw['capabilities'] as string[]).map((c) => { + if (!V6_CAPABILITIES.has(c as AgenticCapability)) + throw new AgwPrerequisiteError(`unknown capability ${c}`); + return c as AgenticCapability; + }) + ) + : V6_CAPABILITIES; + return { + network, + generation: 'v6', + sourceCommit: raw['sourceCommit'], + startBlock: BigInt(String(raw['startBlock'] ?? '0')), + accountId: String(raw['accountId'] ?? 'push.agw.1.0.0'), + addresses: Object.fromEntries( + keys.map((k) => [k, getAddress(a[k])]) + ) as AgwManifest['addresses'], + capabilities: caps, + }; +} + +/** Read-only on-chain check that the manifest's wiring is what it claims. */ +export async function verifyAgwManifest( + client: PublicClient, + m: AgwManifest +): Promise { + const read = ( + address: Address, + abi: readonly unknown[], + functionName: string + ) => + client.readContract({ + address, + abi: abi as never, + functionName: functionName as never, + } as never) as Promise; + for (const [name, addr] of Object.entries(m.addresses)) { + if (name === 'gateway') continue; // a precompile may report no code + const code = await client.getCode({ address: addr }); + if (!code || code === '0x') + throw new AgwPrerequisiteError(`${name} ${addr} has no code`); + } + const impl = getAddress( + (await read( + m.addresses.factory, + v6.abis.factory, + 'walletImplementation' + )) as string + ); + if (impl !== m.addresses.walletImplementation) { + throw new AgwPrerequisiteError( + `factory implementation is ${impl}, manifest says ${m.addresses.walletImplementation}` + ); + } + const implementationCode = await client.getCode({ address: impl }); + for (const signature of ['label()', 'setLabel(string)']) { + if (!implementationCode?.includes(toFunctionSelector(signature).slice(2))) { + throw new AgwPrerequisiteError( + `implementation is missing the v6 ${signature} selector` + ); + } + } + const initialize = getAbiItem({ + abi: v6.abis.wallet, + name: 'initializeAccount', + }); + if (!implementationCode?.includes(toFunctionSelector(initialize).slice(2))) + throw new AgwPrerequisiteError( + 'wallet implementation lacks the v6 initial-rules initializer' + ); + const wiring: [string, Address][] = [ + ['SESSION_ENGINE', m.addresses.sessionEngine], + ['RULES_POLICY', m.addresses.rulesPolicy], + ['SESSION_VALIDATOR', m.addresses.sessionValidator], + ['UNIVERSAL_GATEWAY_PC', m.addresses.gateway], + ]; + for (const [fn, expected] of wiring) { + const got = getAddress((await read(impl, v6.abis.wallet, fn)) as string); + if (got !== expected) + throw new AgwPrerequisiteError( + `implementation ${fn} is ${got}, manifest says ${expected}` + ); + } + const policyVersion = await read( + m.addresses.rulesPolicy, + v6.abis.policy, + 'version' + ); + if (policyVersion !== '3.1.0') + throw new AgwPrerequisiteError( + `unsupported URP version ${String(policyVersion)}` + ); + const accountId = (await read(impl, v6.abis.wallet, 'accountId')) as string; + if (accountId !== m.accountId) + throw new AgwPrerequisiteError(`implementation accountId is ${accountId}`); +} diff --git a/packages/core/__e2e__/agw/create.spec.ts b/packages/core/__e2e__/agw/create.spec.ts new file mode 100644 index 00000000..f05d8b84 --- /dev/null +++ b/packages/core/__e2e__/agw/create.spec.ts @@ -0,0 +1,95 @@ +/** + * Scenario 1 — create: bare wallet and wallet with rules. Strictly gated on a + * verified AGW deployment manifest (see _manifest.ts); beforeAll throws when + * it is missing so a selected run cannot pass vacuously. + */ +import { decodeFunctionData, getAddress, type Address, type Hex } from 'viem'; +import { v6 } from '../../src/lib/agentic/contracts/v6'; +import { + AGW_E2E_ENABLED, + inSeconds, + setupAgw, + type AgwFixture, +} from './_fixture'; +const d = AGW_E2E_ENABLED ? describe : describe.skip; +d('agw create', () => { + let f: AgwFixture; + beforeAll(async () => { + f = await setupAgw(); + }, 300000); + afterAll(() => f?.teardown()); + it('1. bare wallet: factory records the owner and index, no rules, no implicit funding', async () => { + const before = await f.owner.agentic.derive(); + const created = await f.owner.agentic.create('e2e-bare', { rules: [] }); + expect(created.wallet).toBe(before.address); + expect(created.index).toBe(before.index); + expect(created.rulesIds).toEqual([]); + const factoryAbi = v6.abis.factory; + const [ownerOf, indexOf, balance] = await Promise.all([ + f.push.readContract({ + address: f.manifest.addresses.factory, + abi: factoryAbi, + functionName: 'ownerOf', + args: [created.wallet], + }), + f.push.readContract({ + address: f.manifest.addresses.factory, + abi: factoryAbi, + functionName: 'indexOf', + args: [created.wallet], + }), + f.push.getBalance({ address: created.wallet }), + ]); + expect(getAddress(ownerOf as Address)).toBe(f.ownerAddress); + expect(Number(indexOf)).toBe(created.index); + expect(balance).toBe(BigInt(0)); + const info = await f.owner.agentic.wallet(created.wallet).info(); + expect(info).toMatchObject({ + label: 'e2e-bare', + deployed: true, + rulesCount: 0, + owner: f.ownerAddress, + }); + f.evidence('create-bare', { + wallet: created.wallet, + index: created.index, + tx: created.tx.hash, + block: created.tx.blockNumber, + }); + }); + it('2. wallet with a native rule returns the receipt-confirmed rule ID', async () => { + const created = await f.owner.agentic.create('e2e-rules', { + rules: [ + { + agent: f.agentAddress, + validUntil: inSeconds(3600), + allowedCalls: [ + { + target: f.ownerAddress, + selector: 'value-only', + maxValue: BigInt(1), + }, + ], + }, + ], + }); + expect(created.rulesIds).toHaveLength(1); + const raw = await f.push.getTransaction({ hash: created.tx.hash as Hex }); + expect(getAddress(raw.to as Address)).toBe( + getAddress(f.manifest.addresses.factory) + ); + const call = decodeFunctionData({ abi: v6.abis.factory, data: raw.input }); + expect(call.functionName).toBe('createWalletWithSig'); + expect(call.args[3]).toHaveLength(1); + expect(created.tx.transactionHashes ?? [created.tx.hash]).toHaveLength(1); + const { rules } = await f.owner.agentic.wallet(created.wallet).rules.list(); + expect(rules.map((r) => r.rulesId)).toEqual(created.rulesIds); + expect(rules[0].agent).toBe(getAddress(f.agentAddress)); + f.evidence('create-with-rule', { + wallet: created.wallet, + rulesIds: created.rulesIds, + tx: created.tx.hash, + atomic: created.tx.atomic, + }); + }); +}); diff --git a/packages/core/__e2e__/agw/exact-routes-live.spec.ts b/packages/core/__e2e__/agw/exact-routes-live.spec.ts new file mode 100644 index 00000000..e35d406b --- /dev/null +++ b/packages/core/__e2e__/agw/exact-routes-live.spec.ts @@ -0,0 +1,120 @@ +/** Live outbound settlement of the exact node-registered Circle USDC routes. + * Owner door, funds only: the Push PRC20 is burned and the exact Circle USDC is + * delivered to the owner's own address on each chain. Route evidence only; no + * preset or agent permission is exercised here. + */ +import '@e2e/shared/setup'; +import { + createPublicClient, + http, + encodeFunctionData, + erc20Abi, + parseEther, + type Hex, +} from 'viem'; +import { CHAIN } from '../../src'; +import { PUSH_NETWORK } from '../../src/lib/constants/enums'; +import { exactAgenticRoutes } from '../../src/lib/agentic/token-routes'; +import { AGW_E2E_ENABLED, evmClient, setupAgw } from './_fixture'; + +const d = AGW_E2E_ENABLED ? describe : describe.skip; +const AMOUNT = BigInt(10_000); // 0.01 USDC +const ENDPOINTS: Partial> = { + [CHAIN.ETHEREUM_SEPOLIA]: 'https://ethereum-sepolia-rpc.publicnode.com', + [CHAIN.BASE_SEPOLIA]: 'https://base-sepolia-rpc.publicnode.com', + [CHAIN.ARBITRUM_SEPOLIA]: 'https://arbitrum-sepolia-rpc.publicnode.com', +}; + +d('agw exact route outbound', () => { + async function run(chain: CHAIN) { + const [route] = exactAgenticRoutes(chain, PUSH_NETWORK.TESTNET_DONUT); + if (!route) throw new Error(`No exact route for ${chain}`); + const rpc = createPublicClient({ + transport: http(ENDPOINTS[chain]!, { timeout: 15000, retryCount: 1 }), + }); + if ((await rpc.getChainId()) !== Number(chain.split(':')[1])) + throw new Error('Destination RPC chain mismatch'); + const f = await setupAgw({ deferAgentFunding: true }); + try { + const prc20Balance = (holder: `0x${string}`) => + f.push.readContract({ + address: route.prc20, + abi: erc20Abi, + functionName: 'balanceOf', + args: [holder], + }); + if ((await prc20Balance(f.ownerAddress)) < AMOUNT) + throw new Error(`ROUTE_PREREQUISITE: owner lacks ${route.prc20}`); + const made = await f.owner.agentic.create('exact-route', { rules: [] }); + await f.fundPC(made.wallet, parseEther('21')); + await ( + await f.owner.universal.sendTransaction({ + to: route.prc20, + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [made.wallet, AMOUNT], + }), + }) + ).wait(); + const owner = await evmClient( + process.env['PUSH_PRIVATE_KEY'] as Hex, + CHAIN.PUSH_TESTNET_DONUT, + f.manifest.network, + made.wallet + ); + const recipient = f.ownerAddress; + const delivered = () => + rpc.readContract({ + address: route.source, + abi: erc20Abi, + functionName: 'balanceOf', + args: [recipient], + }); + const before = await delivered(); + const tx = await owner.universal.sendTransaction({ + to: { chain, address: recipient }, + funds: { + amount: AMOUNT, + token: { + symbol: route.symbol, + decimals: route.decimals, + address: route.source, + mechanism: 'approve', + }, + }, + }); + expect(tx.agentic?.door).toBe('owner'); + f.evidence('exact-route-submitted', { + chain, + wallet: made.wallet, + prc20: route.prc20, + source: route.source, + hash: tx.hash, + }); + const receipt = await tx.wait({ outboundTimeoutMs: 180000 }); + expect(receipt.externalStatus).toBe('success'); + const dest = await rpc.getTransactionReceipt({ + hash: receipt.externalTxHash as Hex, + }); + expect(dest.status).toBe('success'); + expect(await delivered()).toBe(before + AMOUNT); + expect(await prc20Balance(made.wallet)).toBe(BigInt(0)); + f.evidence('exact-route-delivered', { + chain, + hash: tx.hash, + destinationHash: receipt.externalTxHash, + destinationGasUsed: dest.gasUsed, + }); + } finally { + f.teardown(); + } + } + it('1. Sepolia Circle USDC', () => run(CHAIN.ETHEREUM_SEPOLIA), 600000); + it('2. Base Sepolia Circle USDC', () => run(CHAIN.BASE_SEPOLIA), 600000); + it( + '3. Arbitrum Sepolia Circle USDC', + () => run(CHAIN.ARBITRUM_SEPOLIA), + 600000 + ); +}); diff --git a/packages/core/__e2e__/agw/funding-allowance.spec.ts b/packages/core/__e2e__/agw/funding-allowance.spec.ts new file mode 100644 index 00000000..064cd5bb --- /dev/null +++ b/packages/core/__e2e__/agw/funding-allowance.spec.ts @@ -0,0 +1,47 @@ +/** + * Scenario 2 — funding and bounded gateway allowance are ordinary sends, + * separate from create, and wallet PC is separate from signer gas. + */ +import { encodeFunctionData, erc20Abi, parseEther, type Address, type Hex } from 'viem'; +import { CHAIN } from '../../src/lib/constants/enums'; +import { getNativePRC20ForChain } from '../../src/lib/orchestrator/internals/helpers'; +import { AGW_E2E_ENABLED, evmClient, setupAgw, type AgwFixture } from './_fixture'; + +const d = AGW_E2E_ENABLED ? describe : describe.skip; + +d('agw funding', () => { + let f: AgwFixture; + let wallet: Address; + beforeAll(async () => { + f = await setupAgw(); + wallet = (await f.owner.agentic.create('e2e-funding', { rules: [] })).wallet; + }, 300_000); + afterAll(() => f?.teardown()); + + it('1. wallet PC is funded by an ordinary send and is separate from the signer balance', async () => { + const signerBefore = await f.push.getBalance({ address: f.ownerAddress }); + await f.fundPC(wallet, parseEther('0.01')); + expect(await f.push.getBalance({ address: wallet })).toBe(parseEther('0.01')); + expect(await f.push.getBalance({ address: f.ownerAddress })).toBeLessThan(signerBefore); + }); + + it('2. owner sets and removes a bounded gateway allowance through the owner door', async () => { + const token = getNativePRC20ForChain(CHAIN.ETHEREUM_SEPOLIA, f.manifest.network); + const ownerAgw = await evmClient(process.env['PUSH_PRIVATE_KEY'] as Hex, CHAIN.PUSH_TESTNET_DONUT, f.manifest.network, wallet); + const allowance = () => + f.push.readContract({ address: token, abi: erc20Abi, functionName: 'allowance', args: [wallet, f.manifest.addresses.gateway] }); + const approve = (amount: bigint) => + ownerAgw.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ abi: erc20Abi, functionName: 'approve', args: [f.manifest.addresses.gateway, amount] }), + }); + const set = await approve(BigInt(1000)); + expect((await set.wait()).status).toBe(1); + expect(set.from).toBe(wallet); + expect(set.agentic?.door).toBe('owner'); + expect(await allowance()).toBe(BigInt(1000)); + await (await approve(BigInt(0))).wait(); + expect(await allowance()).toBe(BigInt(0)); + f.evidence('allowance-set-remove', { wallet, token, setTx: set.hash }); + }); +}); diff --git a/packages/core/__e2e__/agw/gas-live.spec.ts b/packages/core/__e2e__/agw/gas-live.spec.ts new file mode 100644 index 00000000..9e58a77a --- /dev/null +++ b/packages/core/__e2e__/agw/gas-live.spec.ts @@ -0,0 +1,173 @@ +/** Measure omitted destination gas on first/subsequent supported EVM routes. + * Uses the existing counter fixtures and native PRC20s, not unavailable presets. + */ +import '@e2e/shared/setup'; +import { + createPublicClient, + http, + encodeFunctionData, + erc20Abi, + parseAbi, + parseEventLogs, + parseEther, + type Hex, + type Address, +} from 'viem'; +import { CHAIN } from '../../src'; +import { getCEAAddress } from '../../src/lib/orchestrator/cea-utils'; +import { getNativePRC20ForChain } from '../../src/lib/orchestrator/internals/helpers'; +import { EVM_CHAIN_FIXTURES } from '../shared/chain-fixtures'; +import { observeAgwGas, recordAgwPushGas } from '../shared/agw-gas-evidence'; +import { AGW_E2E_ENABLED, setupAgw, inSeconds } from './_fixture'; +const d = AGW_E2E_ENABLED ? describe : describe.skip; +const AMOUNT = BigInt(10) ** BigInt(12); +const EXECUTED = parseAbi([ + 'event UniversalTxExecuted(bytes32 indexed subTxId, bytes32 indexed universalTxId, address indexed originCaller, address target, bytes data)', +]); +const ENDPOINTS: Partial> = { + [CHAIN.ETHEREUM_SEPOLIA]: 'https://ethereum-sepolia-rpc.publicnode.com', + [CHAIN.BASE_SEPOLIA]: 'https://base-sepolia-rpc.publicnode.com', + [CHAIN.ARBITRUM_SEPOLIA]: 'https://arbitrum-sepolia-rpc.publicnode.com', + [CHAIN.BNB_TESTNET]: 'https://bsc-testnet-rpc.publicnode.com', +}; +d('agw live gas sizing', () => { + async function run(chain: CHAIN) { + const counter = EVM_CHAIN_FIXTURES.find((x) => x.chain === chain)!.contracts + .counter as Address; + const rpc = createPublicClient({ + transport: http(ENDPOINTS[chain]!, { timeout: 15000 }), + }); + if ((await rpc.getChainId()) !== Number(chain.split(':')[1])) + throw new Error('Destination RPC chain mismatch'); + if (!(await rpc.getCode({ address: counter }))) + throw new Error('GAS_PREREQUISITE: counter fixture has no code'); + const f = await setupAgw(); + try { + const token = getNativePRC20ForChain(chain, f.manifest.network); + if ( + (await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [f.ownerAddress], + })) < + AMOUNT * BigInt(2) + ) + throw new Error( + `GAS_PREREQUISITE: owner lacks native PRC20 for ${chain}` + ); + const made = await f.owner.agentic.create('route-gas-acceptance', { + rules: [ + { + agent: f.agentAddress, + chainNamespace: chain as `eip155:${string}`, + validUntil: inSeconds(3600), + assets: [ + { + token: '0x0000000000000000000000000000000000000000', + maxPerCall: AMOUNT, + maxTotal: AMOUNT * BigInt(2), + }, + ], + maxGasPerCall: parseEther('20'), + allowedCalls: [{ target: counter, selector: 'increment()' }], + }, + ], + }); + const cea = (await getCEAAddress(made.wallet, chain, ENDPOINTS[chain])) + .cea as Address; + expect(await rpc.getCode({ address: cea })).toBeUndefined(); + await f.fundPC(made.wallet, parseEther('21')); + await ( + await f.owner.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [made.wallet, AMOUNT * BigInt(2)], + }), + }) + ).wait(); + const agent = await f.agent(made.wallet); + for (const stage of ['first-use', 'subsequent']) { + const oldBalance = await rpc.getBalance({ address: cea }); + const stop = observeAgwGas(agent, f, `${chain}:${stage}`); + try { + const tx = await agent.universal.sendTransaction({ + to: { chain, address: counter }, + funds: { amount: AMOUNT }, + data: [{ to: counter, data: '0xd09de08a', value: BigInt(0) }], + }); + f.evidence('evm-gas-submitted', { + chain, + stage, + wallet: made.wallet, + cea, + hash: tx.hash, + }); + const result = await tx.wait({ outboundTimeoutMs: 180000 }); + expect(result.externalStatus).toBe('success'); + const receipt = await rpc.getTransactionReceipt({ + hash: result.externalTxHash as Hex, + }); + expect(receipt.status).toBe('success'); + expect(await rpc.getBalance({ address: cea })).toBe( + oldBalance + AMOUNT + ); + const events = parseEventLogs({ abi: EXECUTED, logs: receipt.logs }); + expect( + events.some( + (e) => + e.address.toLowerCase() === cea.toLowerCase() && + e.args.originCaller.toLowerCase() === + made.wallet.toLowerCase() && + e.args.target.toLowerCase() === counter.toLowerCase() && + e.args.data === '0xd09de08a' + ) + ).toBe(true); + await recordAgwPushGas(f, tx.hash, `${chain}:${stage}`); + f.evidence('evm-gas-delivered', { + chain, + stage, + wallet: made.wallet, + hash: tx.hash, + destinationHash: result.externalTxHash, + destinationBlock: receipt.blockNumber, + destinationGasUsed: receipt.gasUsed, + destinationGasPaidWei: receipt.gasUsed * receipt.effectiveGasPrice, + }); + } finally { + stop(); + } + } + const stored = await f.owner.agentic + .wallet(made.wallet) + .rules.get(made.rulesIds[0]); + if (stored.spent?.kind !== 'universal') + throw new Error('Missing universal spend'); + expect(stored.spent.assets[0].spent).toBe(AMOUNT * BigInt(2)); + } finally { + f.teardown(); + } + } + it( + '1. Sepolia first-use and subsequent execution', + () => run(CHAIN.ETHEREUM_SEPOLIA), + 600000 + ); + it( + '2. Base Sepolia first-use and subsequent execution', + () => run(CHAIN.BASE_SEPOLIA), + 600000 + ); + it( + '3. Arbitrum Sepolia first-use and subsequent execution', + () => run(CHAIN.ARBITRUM_SEPOLIA), + 600000 + ); + it( + '4. BNB testnet first-use and subsequent execution', + () => run(CHAIN.BNB_TESTNET), + 600000 + ); +}); diff --git a/packages/core/__e2e__/agw/identity-gas.spec.ts b/packages/core/__e2e__/agw/identity-gas.spec.ts new file mode 100644 index 00000000..b90c5bee --- /dev/null +++ b/packages/core/__e2e__/agw/identity-gas.spec.ts @@ -0,0 +1,160 @@ +/** + * Scenario 9 — external-key agents act through the UEA for their actual + * origin chain; first-use vs subsequent gas. Solana-ORIGIN agents are covered + * here on a Push destination; Solana-DESTINATION rules are a separate, + * capability-gated feature (see multi-asset-svm.spec.ts). + */ +import { Keypair } from '@solana/web3.js'; +import bs58 from 'bs58'; +import { + createPublicClient, + createWalletClient, + fallback, + getAddress, + http, + parseEther, + type Address, + type Hex, +} from 'viem'; +import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'; +import { sepolia } from 'viem/chains'; +import { PushChain } from '../../src'; +import { CHAIN } from '../../src/lib/constants/enums'; +import { CHAIN_INFO } from '../../src/lib/constants/chain'; +import { createProgressTracker } from '@e2e/shared/progress-tracker'; +import { + AGW_E2E_ENABLED, + evmClient, + inSeconds, + setupAgw, + type AgwFixture, +} from './_fixture'; +const d = AGW_E2E_ENABLED ? describe : describe.skip; +const SINK = getAddress('0x000000000000000000000000000000000000dEaD'); +async function ueaOf(address: string, chain: CHAIN): Promise
{ + const r = await PushChain.utils.account.deriveExecutorAccount( + PushChain.utils.account.toUniversal(address, { chain }), + { + skipNetworkCheck: true, + } + ); + return getAddress(r.address); +} +d('agw identity', () => { + let f: AgwFixture; + beforeAll(async () => { + f = await setupAgw(); + }, 300000); + afterAll(() => f?.teardown()); + const walletFor = async (agent: Address) => { + const created = await f.owner.agentic.create('e2e-identity', { + rules: [ + { + agent, + validUntil: inSeconds(3600), + allowedCalls: [ + { + target: SINK, + selector: 'value-only', + maxValue: BigInt(1000), + }, + ], + }, + ], + }); + await f.fundPC(created.wallet, parseEther('0.001')); + return created.wallet; + }; + it('1. an EVM key on Sepolia acts through its Sepolia UEA; origin and account status stay signer-scoped', async () => { + const key = process.env['EVM_PRIVATE_KEY'] as Hex; + if (!key) throw new Error('EVM_PRIVATE_KEY is required'); + const uea = await ueaOf( + privateKeyToAccount(key).address, + CHAIN.ETHEREUM_SEPOLIA + ); + const wallet = await walletFor(uea); + const agent = await evmClient( + key, + CHAIN.ETHEREUM_SEPOLIA, + f.manifest.network, + wallet + ); + expect(agent.universal.account).toBe(wallet); + expect(agent.universal.origin.chain).toBe(CHAIN.ETHEREUM_SEPOLIA); + expect((await agent.getAccountStatus()).uea.deployed).toBe(true); + const tx = await agent.universal.sendTransaction({ + to: SINK, + value: BigInt(1000), + }); + expect((await tx.wait()).status).toBe(1); + expect(tx.from).toBe(wallet); + expect(tx.origin.startsWith('eip155:11155111:')).toBe(true); + f.evidence('external-evm-agent', { wallet, uea, tx: tx.hash }); + }, 600000); + it('2. first use of an undeployed external UEA takes the one-time fee lock; the next action pays from the UEA', async () => { + const key = generatePrivateKey(); + const addr = privateKeyToAccount(key).address; + const transport = fallback( + CHAIN_INFO[CHAIN.ETHEREUM_SEPOLIA].defaultRPC.map((url) => http(url)) + ); + const master = createWalletClient({ + account: privateKeyToAccount(process.env['EVM_PRIVATE_KEY'] as Hex), + chain: sepolia, + transport, + }); + const origin = createPublicClient({ chain: sepolia, transport }); + const funded = await master.sendTransaction({ + to: addr, + value: parseEther(process.env['AGW_E2E_FIRST_USE_ETH'] ?? '0.003'), + account: master.account!, + chain: sepolia, + }); + await origin.waitForTransactionReceipt({ hash: funded }); + const uea = await ueaOf(addr, CHAIN.ETHEREUM_SEPOLIA); + const wallet = await walletFor(uea); + const first = createProgressTracker(); + const agent = await evmClient( + key, + CHAIN.ETHEREUM_SEPOLIA, + f.manifest.network, + wallet, + first.hook as (e: unknown) => void + ); + await ( + await agent.universal.sendTransaction({ to: SINK, value: BigInt(1) }) + ).wait(); + expect(first.hasEvent('SEND-TX-105-01')).toBe(true); + const second = createProgressTracker(); + await ( + await agent.universal.sendTransaction( + { to: SINK, value: BigInt(1) }, + { progressHook: second.hook } + ) + ).wait(); + expect(second.hasEvent('SEND-TX-105-01')).toBe(false); + f.evidence('first-use-uea', { wallet, uea }); + }, 900000); + it('3. a Solana-origin key acts through its Solana UEA on a Push destination', async () => { + const raw = process.env['SOLANA_PRIVATE_KEY']; + if (!raw) throw new Error('SOLANA_PRIVATE_KEY is required'); + const kp = Keypair.fromSecretKey(bs58.decode(raw)); + const uea = await ueaOf(kp.publicKey.toBase58(), CHAIN.SOLANA_DEVNET); + const wallet = await walletFor(uea); + const signer = await PushChain.utils.signer.toUniversalFromKeypair(kp, { + chain: CHAIN.SOLANA_DEVNET, + library: PushChain.CONSTANTS.LIBRARY.SOLANA_WEB3JS, + }); + const agent = await PushChain.initialize(signer, { + network: f.manifest.network, + agenticWallet: wallet, + }); + const tx = await agent.universal.sendTransaction({ + to: SINK, + value: BigInt(1), + }); + expect((await tx.wait()).status).toBe(1); + expect(tx.from).toBe(wallet); + expect(tx.origin.startsWith('solana:')).toBe(true); + f.evidence('solana-origin-agent', { wallet, uea, tx: tx.hash }); + }, 600000); +}); diff --git a/packages/core/__e2e__/agw/labels.spec.ts b/packages/core/__e2e__/agw/labels.spec.ts new file mode 100644 index 00000000..b46d5095 --- /dev/null +++ b/packages/core/__e2e__/agw/labels.spec.ts @@ -0,0 +1,459 @@ +/** Public SDK labels against checked Donut v5; fresh wallets only. */ +import { + decodeEventLog, + createWalletClient, + http, + getAddress, + parseEther, + type Address, + type Hex, +} from 'viem'; +import { Keypair } from '@solana/web3.js'; +import bs58 from 'bs58'; +import { CHAIN_INFO, getPushViemChain } from '../../src/lib/constants/chain'; +import { readNativeCounters } from '@e2e/shared/agw-state'; +import { privateKeyToAccount } from 'viem/accounts'; +import { PushChain } from '../../src'; +import { CHAIN } from '../../src/lib/constants/enums'; +import { v6, MODE_SINGLE } from '../../src/lib/agentic/contracts/v6'; +import { decodeAgenticRevert } from '../../src/lib/agentic/revert'; +import { + AGW_E2E_ENABLED, + evmClient, + inSeconds, + setupAgw, + type AgwFixture, +} from './_fixture'; +const d = AGW_E2E_ENABLED ? describe : describe.skip; +d('agw labels', () => { + let f: AgwFixture; + beforeAll(async () => { + f = await setupAgw(); + }, 300000); + afterAll(() => f?.teardown()); + const count = (address: Address) => + f.push.readContract({ + address, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }); + it('1. default and custom deployment labels are stored and listed', async () => { + const empty = await f.owner.agentic.create('', { rules: [] }); + const custom = await f.owner.agentic.create('e2e-v5-custom', { rules: [] }); + expect((await f.owner.agentic.wallet(empty.wallet).info()).label).toBe( + `AGW ${empty.index + 1}` + ); + expect((await f.owner.agentic.wallet(custom.wallet).info()).label).toBe( + 'e2e-v5-custom' + ); + const { wallets } = await f.owner.agentic.list(); + expect(wallets.find((w) => w.address === empty.wallet)?.label).toBe( + `AGW ${empty.index + 1}` + ); + expect(wallets.find((w) => w.address === custom.wallet)?.label).toBe( + 'e2e-v5-custom' + ); + const renamed = await f.owner.agentic + .wallet(custom.wallet) + .setLabel('isolated-rename'); + expect((await f.owner.agentic.wallet(custom.wallet).info()).label).toBe( + 'isolated-rename' + ); + expect((await f.owner.agentic.wallet(empty.wallet).info()).label).toBe( + `AGW ${empty.index + 1}` + ); + expect(await count(empty.wallet)).toBe(BigInt(0)); + expect(await count(custom.wallet)).toBe(BigInt(0)); + f.evidence('v5-label-default-custom', { + wallets: [empty.wallet, custom.wallet], + indices: [empty.index, custom.index], + hashes: [empty.tx.hash, custom.tx.hash, renamed.hash], + }); + }); + it('2. owner rename and empty reset update info/list, emit LabelSet and tick the owner door', async () => { + const made = await f.owner.agentic.create('before', { rules: [] }); + const w = f.owner.agentic.wallet(made.wallet), + before = await count(made.wallet), + hook = jest.fn(); + const tx = await w.setLabel('after', { progressHook: hook }); + const receipt = await tx.wait(); + const labels = receipt.logs.flatMap((log) => { + if (log.address.toLowerCase() !== made.wallet.toLowerCase()) return []; + try { + const ev = decodeEventLog({ + abi: v6.abis.wallet, + data: log.data, + topics: log.topics, + }); + return ev.eventName === 'LabelSet' ? [ev.args.label] : []; + } catch { + return []; + } + }); + expect(labels).toEqual(['after']); + expect((await w.info()).label).toBe('after'); + expect( + (await f.owner.agentic.list()).wallets.find( + (x) => x.address === made.wallet + )?.label + ).toBe('after'); + expect(await count(made.wallet)).toBe(before); + expect(hook).toHaveBeenCalledWith( + expect.objectContaining({ id: 'AGENTIC-TX-199-01' }) + ); + const reset = await w.setLabel(''); + expect((await w.info()).label).toBe(`AGW ${made.index + 1}`); + expect(await count(made.wallet)).toBe(before); + f.evidence('v5-label-rename-reset', { + wallet: made.wallet, + hashes: [tx.hash, reset.hash], + checkpointsBefore: before, + checkpointsAfter: await count(made.wallet), + }); + }); + it('3. UTF-8 byte boundaries are accepted or rejected without changing wallet state', async () => { + const made = await f.owner.agentic.create('🙂'.repeat(16), { rules: [] }); + const w = f.owner.agentic.wallet(made.wallet); + await w.setLabel('a'.repeat(64)); + const before = await count(made.wallet), + next = await f.owner.agentic.derive(); + for (const label of ['a'.repeat(65), '🙂'.repeat(17)]) { + await expect(w.setLabel(label)).rejects.toMatchObject({ + code: 'INVALID_RULE', + }); + await expect( + f.owner.agentic.create(label, { rules: [] }) + ).rejects.toMatchObject({ code: 'INVALID_RULE' }); + await expect( + f.push.simulateContract({ + address: made.wallet, + abi: v6.abis.wallet, + functionName: 'setLabel', + args: [label], + account: f.ownerAddress, + }) + ).rejects.toThrow('LabelTooLong'); + } + expect(await f.owner.agentic.derive()).toEqual(next); + expect((await w.info()).label).toBe('a'.repeat(64)); + expect(await count(made.wallet)).toBe(before); + f.evidence('v5-label-byte-boundary', { + wallet: made.wallet, + checkpoints: before, + unchangedNextSlot: next.index, + }); + }); + it('4. an agent cannot rename through either the SDK or the contract', async () => { + const made = await f.owner.agentic.create('owner-only', { + rules: [ + { + agent: f.agentAddress, + validUntil: inSeconds(3600), + allowedCalls: [ + { + target: f.ownerAddress, + selector: 'value-only', + }, + ], + }, + ], + }); + const before = await count(made.wallet); + const agent = await f.agent(made.wallet); + await expect( + agent.agentic.wallet(made.wallet).setLabel('attack') + ).rejects.toMatchObject({ code: 'NOT_WALLET_OWNER' }); + await expect( + f.push.simulateContract({ + address: made.wallet, + abi: v6.abis.wallet, + functionName: 'setLabel', + args: ['attack'], + account: f.agentAddress, + }) + ).rejects.toThrow('CallerIsNotOwner'); + const agentDoorError = await f.push + .simulateContract({ + address: made.wallet, + abi: v6.abis.wallet, + functionName: 'executeAsAgent', + args: [ + made.rulesIds[0], + MODE_SINGLE, + v6.packSingle({ + target: made.wallet, + value: BigInt(0), + data: v6.encodeSetLabel('attack'), + }), + ], + account: f.agentAddress, + }) + .then( + () => undefined, + (error: unknown) => error + ); + // Normal grants cannot authorize wallet-self: the engine rejects the + // absent action policy before the wallet's additional dispatch guard. + expect(decodeAgenticRevert(agentDoorError)).toMatchObject({ + name: 'NoPoliciesSet', + }); + expect((await f.owner.agentic.wallet(made.wallet).info()).label).toBe( + 'owner-only' + ); + expect(await count(made.wallet)).toBe(before); + f.evidence('v5-label-agent-refused', { + wallet: made.wallet, + checkpoints: before, + }); + }); + it('5. an external EVM owner creates and renames through its UEA', async () => { + const key = process.env['EVM_PRIVATE_KEY'] as Hex; + if (!key) throw new Error('EVM_PRIVATE_KEY is required'); + const origin = privateKeyToAccount(key).address; + const uea = getAddress( + ( + await PushChain.utils.account.deriveExecutorAccount( + PushChain.utils.account.toUniversal(origin, { + chain: CHAIN.ETHEREUM_SEPOLIA, + }), + { skipNetworkCheck: true } + ) + ).address + ); + await f.fundPC(uea, parseEther('3')); + const owner = await evmClient( + key, + CHAIN.ETHEREUM_SEPOLIA, + f.manifest.network + ); + const made = await owner.agentic.create('e2e-uea-before', { rules: [] }); + const w = owner.agentic.wallet(made.wallet); + expect((await w.owner()).owner).toBe(uea); + const before = await count(made.wallet); + const rename = await w.setLabel('e2e-uea-after'); + expect((await w.info()).label).toBe('e2e-uea-after'); + expect( + (await owner.agentic.list()).wallets.find( + (entry) => entry.address === made.wallet + )?.label + ).toBe('e2e-uea-after'); + const reset = await w.setLabel(''); + expect((await w.info()).label).toBe(`AGW ${made.index + 1}`); + expect(await count(made.wallet)).toBe(before); + f.evidence('v5-label-uea-owner', { + wallet: made.wallet, + owner: uea, + hashes: [made.tx.hash, rename.hash, reset.hash], + checkpointsBefore: before, + checkpointsAfter: await count(made.wallet), + }); + }); + it('6. a Solana-origin owner creates, renames and resets through its UEA', async () => { + const raw = process.env['SOLANA_PRIVATE_KEY']; + if (!raw) throw new Error('SOLANA_PRIVATE_KEY is required'); + let kp: Keypair; + try { + kp = Keypair.fromSecretKey(bs58.decode(raw)); + } catch { + kp = Keypair.fromSecretKey(Uint8Array.from(JSON.parse(raw))); + } + const uea = getAddress( + ( + await PushChain.utils.account.deriveExecutorAccount( + PushChain.utils.account.toUniversal(kp.publicKey.toBase58(), { + chain: CHAIN.SOLANA_DEVNET, + }), + { skipNetworkCheck: true } + ) + ).address + ); + await f.fundPC(uea, parseEther('3')); + const signer = await PushChain.utils.signer.toUniversalFromKeypair(kp, { + chain: CHAIN.SOLANA_DEVNET, + library: PushChain.CONSTANTS.LIBRARY.SOLANA_WEB3JS, + }); + const owner = await PushChain.initialize(signer, { + network: f.manifest.network, + }); + const made = await owner.agentic.create('', { rules: [] }); + const w = owner.agentic.wallet(made.wallet); + expect((await w.info()).label).toBe(`AGW ${made.index + 1}`); + expect((await w.owner()).owner).toBe(uea); + const before = await count(made.wallet); + const rename = await w.setLabel('Solana owner'); + expect((await w.info()).label).toBe('Solana owner'); + expect( + (await owner.agentic.list()).wallets.find( + (entry) => entry.address === made.wallet + )?.label + ).toBe('Solana owner'); + const reset = await w.setLabel(''); + expect((await w.info()).label).toBe(`AGW ${made.index + 1}`); + expect(await count(made.wallet)).toBe(before); + f.evidence('v5-label-solana-owner', { + wallet: made.wallet, + owner: uea, + hashes: [made.tx.hash, rename.hash, reset.hash], + checkpointsBefore: before, + checkpointsAfter: await count(made.wallet), + }); + }, 600000); + it('7. renaming an active wallet preserves rules, spend and per-call agent cap', async () => { + const made = await f.owner.agentic.create('active-before', { + rules: [ + { + agent: f.agentAddress, + validUntil: inSeconds(3600), + allowedCalls: [ + { + target: f.ownerAddress, + selector: 'value-only', + maxValue: BigInt(1), + }, + ], + }, + ], + }); + await f.fundPC(made.wallet, BigInt(10)); + const w = f.owner.agentic.wallet(made.wallet), + agent = await f.agent(made.wallet); + const first = await agent.universal.sendTransaction({ + to: f.ownerAddress, + value: BigInt(1), + }); + await first.wait(); + const ruleBefore = await w.rules.get(made.rulesIds[0]); + const spendBefore = await readNativeCounters( + f.push, + f.manifest.addresses, + made.wallet, + made.rulesIds[0] + ); + const checkpointsBefore = await count(made.wallet); + const nonceBefore = await f.push.readContract({ + address: made.wallet, + abi: v6.abis.wallet, + functionName: 'grantNonce', + }); + const rename = await w.setLabel('active-after'); + expect((await w.info()).label).toBe('active-after'); + expect(await w.rules.get(made.rulesIds[0])).toEqual(ruleBefore); + expect( + await readNativeCounters( + f.push, + f.manifest.addresses, + made.wallet, + made.rulesIds[0] + ) + ).toEqual(spendBefore); + expect( + await f.push.readContract({ + address: made.wallet, + abi: v6.abis.wallet, + functionName: 'grantNonce', + }) + ).toBe(nonceBefore); + expect(await count(made.wallet)).toBe(checkpointsBefore); + const second = await agent.universal.sendTransaction({ + to: f.ownerAddress, + value: BigInt(1), + }); + await second.wait(); + expect(second.agentic?.rulesId).toBe(made.rulesIds[0]); + const spendAfter = await readNativeCounters( + f.push, + f.manifest.addresses, + made.wallet, + made.rulesIds[0] + ); + expect(spendAfter).toMatchObject({ callsUsed: 2, valueSpent: BigInt(2) }); + const agentNonce = await f.push.getTransactionCount({ + address: f.agentAddress, + }); + await expect( + agent.universal.sendTransaction({ to: f.ownerAddress, value: BigInt(2) }) + ).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(ValueExceedsCap)' }, + }); + expect(await f.push.getTransactionCount({ address: f.agentAddress })).toBe( + agentNonce + ); + expect( + await readNativeCounters( + f.push, + f.manifest.addresses, + made.wallet, + made.rulesIds[0] + ) + ).toEqual(spendAfter); + expect(await count(made.wallet)).toBe(checkpointsBefore); + f.evidence('v5-label-active-rule', { + wallet: made.wallet, + rulesId: made.rulesIds[0], + hashes: [first.hash, rename.hash, second.hash], + spendBefore, + spendAfter, + grantNonce: nonceBefore, + }); + }); + it('8. a failed owner batch rolls back the earlier rename and all checkpoints', async () => { + const made = await f.owner.agentic.create('batch-before', { rules: [] }); + const w = f.owner.agentic.wallet(made.wallet), + before = await count(made.wallet); + const key = process.env['PUSH_PRIVATE_KEY'] as Hex; + const owner = await evmClient( + key, + CHAIN.PUSH_TESTNET_DONUT, + f.manifest.network, + made.wallet + ); + const calls = [ + { + to: made.wallet, + value: BigInt(0), + data: v6.encodeSetLabel('temporary'), + }, + { + to: made.wallet, + value: BigInt(0), + data: v6.encodeSetLabel('a'.repeat(65)), + }, + ]; + await expect( + owner.universal.sendTransaction({ to: made.wallet, data: calls }) + ).rejects.toMatchObject({ decodedError: { name: 'LabelTooLong' } }); + expect((await w.info()).label).toBe('batch-before'); + // The SDK refuses this during simulation. A bounded raw transaction using + // the same SDK encoding additionally proves rollback in a mined receipt. + const client = createWalletClient({ + account: privateKeyToAccount(key), + chain: getPushViemChain(CHAIN.PUSH_TESTNET_DONUT), + transport: http(CHAIN_INFO[CHAIN.PUSH_TESTNET_DONUT].defaultRPC[0]), + }); + const hash = await client.sendTransaction({ + chain: client.chain, + to: made.wallet, + gas: BigInt(400000), + data: v6.encodeExecute( + calls.map((call) => ({ + target: call.to, + value: call.value, + data: call.data, + })) + ), + }); + const receipt = await f.push.waitForTransactionReceipt({ hash }); + expect(receipt.status).toBe('reverted'); + expect(receipt.logs).toHaveLength(0); + expect((await w.info()).label).toBe('batch-before'); + expect(await count(made.wallet)).toBe(before); + f.evidence('v5-label-batch-rollback', { + wallet: made.wallet, + hash, + block: receipt.blockNumber, + gasUsed: receipt.gasUsed, + status: receipt.status, + checkpoints: before, + }); + }); +}); diff --git a/packages/core/__e2e__/agw/lifecycle.spec.ts b/packages/core/__e2e__/agw/lifecycle.spec.ts new file mode 100644 index 00000000..f0d06521 --- /dev/null +++ b/packages/core/__e2e__/agw/lifecycle.spec.ts @@ -0,0 +1,123 @@ +import { readNativeCounters } from '@e2e/shared/agw-state'; +/** + * Scenarios 5 and 6 — add / update / revoke lifecycle and checkpoint counts. + * A replacement is five checkpoint ticks; allowance pulls are not ticks. + * The stale-spend race (intervening agent spend) is verified against the + * real contracts in the local harness; it cannot be timed reliably live. + */ +import { v6 } from '../../src/lib/agentic/contracts/v6'; +import { getAddress, parseEther, type Address, type Hex } from 'viem'; +import { AGENTIC_ERROR_CODE } from '../../src/lib/agentic/errors'; +import { + AGW_E2E_ENABLED, + inSeconds, + setupAgw, + type AgwFixture, +} from './_fixture'; +const d = AGW_E2E_ENABLED ? describe : describe.skip; +d('agw lifecycle', () => { + let f: AgwFixture; + let wallet: Address; + let original: Hex; + const sink = getAddress('0x000000000000000000000000000000000000dEaD'); + const rule = (maxValuePerCall: bigint) => ({ + agent: f.agentAddress, + validUntil: inSeconds(3600), + allowedCalls: [ + { + target: sink, + selector: 'value-only' as const, + maxValue: maxValuePerCall, + }, + ], + }); + const count = () => + f.push.readContract({ + address: wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }) as Promise; + beforeAll(async () => { + f = await setupAgw(); + wallet = (await f.owner.agentic.create('e2e-lifecycle', { rules: [] })) + .wallet; + await f.fundPC(wallet, parseEther('0.01')); + }, 300000); + afterAll(() => f?.teardown()); + it('1. rules.add grants with one RULES_GRANTED checkpoint', async () => { + const before = await count(); + const added = await f.owner.agentic + .wallet(wallet) + .rules.add([rule(BigInt(1000))]); + original = added.rulesIds[0]; + expect(await count()).toBe(before + BigInt(1)); + const { checkpoints } = await f.owner.agentic + .wallet(wallet) + .checkpoints({ sinceBlock: added.tx.blockNumber }); + expect(checkpoints.at(-1)).toMatchObject({ + kind: 'RULES_GRANTED', + ref: original, + }); + }); + it('2. rules.update: old ID disabled, new ID usable with reset counters, five checkpoint ticks', async () => { + const agent = await f.agent(wallet); + await ( + await agent.universal.sendTransaction({ to: sink, value: BigInt(10) }) + ).wait(); + const spentBefore = await readNativeCounters( + f.push, + f.manifest.addresses, + wallet, + original + ); + expect(spentBefore).toMatchObject({ + valueSpent: BigInt(10), + callsUsed: 1, + }); + const before = await count(); + const res = await f.owner.agentic.wallet(wallet).rules.update({ + rules: [{ rulesId: original, rule: rule(BigInt(2000)) }], + }); + expect(await count()).toBe(before + BigInt(5)); + const replacement = res.rules[0].rulesId; + expect(res.rules[0].replaced).toBe(original); + expect( + await readNativeCounters( + f.push, + f.manifest.addresses, + wallet, + replacement + ) + ).toMatchObject({ valueSpent: BigInt(0), callsUsed: 0 }); + await expect( + f.owner.agentic.wallet(wallet).rules.get(original) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.RULE_NOT_FOUND }); + const tx = await agent.universal.sendTransaction({ + to: sink, + value: BigInt(1500), + }); + expect(tx.agentic?.rulesId).toBe(replacement); + f.evidence('rules-update', { + wallet, + original, + replacement, + tx: res.tx.hash, + checkpointDelta: 5, + }); + }); + it('3. checkpoint history is contiguous and matches checkpointCount()', async () => { + const { checkpoints } = await f.owner.agentic.wallet(wallet).checkpoints(); + expect(checkpoints.map((c) => c.seq)).toEqual( + checkpoints.map((_, i) => i + 1) + ); + expect(BigInt(checkpoints.length)).toBe(await count()); + }); + it('4. revoke({ all: true }) leaves no enabled rules', async () => { + await ( + await f.owner.agentic.wallet(wallet).rules.delete({ all: true }) + ).wait(); + expect((await f.owner.agentic.wallet(wallet).rules.list()).rules).toEqual( + [] + ); + }); +}); diff --git a/packages/core/__e2e__/agw/management-extended.spec.ts b/packages/core/__e2e__/agw/management-extended.spec.ts new file mode 100644 index 00000000..014dac5b --- /dev/null +++ b/packages/core/__e2e__/agw/management-extended.spec.ts @@ -0,0 +1,294 @@ +import { PushChain } from '../../src'; +import { getAddress, type Address } from 'viem'; +import type { AgenticRuntime } from '../../src/lib/agentic/runtime'; +import { v6 } from '../../src/lib/agentic/contracts/v6'; +import { setupAgw, inSeconds, type AgwFixture } from './_fixture'; +import { readNativeCounters } from '../shared/agw-state'; +const d = process.env['AGW_E2E'] === '1' ? describe : describe.skip; +const runtime = (client: PushChain) => + ( + client as unknown as { + agenticRuntime: AgenticRuntime; + } + ).agenticRuntime; +d('agw extended management', () => { + let f: AgwFixture; + beforeAll(async () => { + f = await setupAgw(); + }, 300000); + afterAll(() => f?.teardown()); + const rule = (agent = f.agentAddress) => ({ + agent, + validUntil: inSeconds(3600), + allowedCalls: [ + { + target: f.ownerAddress, + selector: 'value-only' as const, + maxValue: BigInt(10), + }, + ], + }); + const count = (wallet: Address) => + f.push.readContract({ + address: wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }); + it('1. prefunding a derived address survives deployment and info/list keep owner index and label', async () => { + const predicted = await f.owner.agentic.derive(); + expect(predicted.deployed).toBe(false); + await f.fundPC(predicted.address, BigInt(10)); + const made = await f.owner.agentic.create('e2e-prefunded-identity', { + rules: [], + }); + expect(made.wallet).toBe(predicted.address); + expect(made.index).toBe(predicted.index); + expect(await f.push.getBalance({ address: made.wallet })).toBe(BigInt(10)); + const w = f.owner.agentic.wallet(made.wallet); + expect(await w.info()).toMatchObject({ + owner: f.ownerAddress, + index: made.index, + label: 'e2e-prefunded-identity', + deployed: true, + rulesCount: 0, + }); + expect(await w.owner()).toEqual({ owner: f.ownerAddress }); + expect((await f.owner.agentic.list()).wallets).toEqual( + expect.arrayContaining([ + expect.objectContaining({ + address: made.wallet, + index: made.index, + label: 'e2e-prefunded-identity', + }), + ]) + ); + expect(await f.owner.agentic.derive({ index: made.index })).toMatchObject({ + address: made.wallet, + deployed: true, + }); + f.evidence('extended-prefunding', { + wallet: made.wallet, + index: made.index, + txHash: made.tx.hash, + }); + }); + it('2. create and add reject duplicate agent/chain rules before signing', async () => { + const nonce = await f.push.getTransactionCount({ address: f.ownerAddress }); + await expect( + f.owner.agentic.create('duplicate', { rules: [rule(), rule()] }) + ).rejects.toMatchObject({ code: 'DUPLICATE_RULE' }); + expect(await f.push.getTransactionCount({ address: f.ownerAddress })).toBe( + nonce + ); + const made = await f.owner.agentic.create('single', { rules: [rule()] }); + const w = f.owner.agentic.wallet(made.wallet), + before = await count(made.wallet); + const afterCreate = await f.push.getTransactionCount({ + address: f.ownerAddress, + }); + await expect(w.rules.add([rule()])).rejects.toMatchObject({ + code: 'DUPLICATE_RULE', + }); + expect(await f.push.getTransactionCount({ address: f.ownerAddress })).toBe( + afterCreate + ); + expect(await count(made.wallet)).toBe(before); + expect((await w.rules.list()).rules.map((r) => r.rulesId)).toEqual( + made.rulesIds + ); + await (await w.rules.delete(made.rulesIds)).wait(); + const added = await w.rules.add([rule()]); + expect(added.rulesIds[0]).not.toBe(made.rulesIds[0]); + f.evidence('duplicate-rule-guards', { + wallet: made.wallet, + deleted: made.rulesIds, + added: added.rulesIds, + }); + }); + it('3. multi-rule add and revoke are atomic batches with exact checkpoint counts', async () => { + const made = await f.owner.agentic.create('e2e-management-batches', { + rules: [], + }), + w = f.owner.agentic.wallet(made.wallet); + const added = await w.rules.add([ + rule(), + rule(getAddress('0x000000000000000000000000000000000000bEEF')), + ]); + expect(await count(made.wallet)).toBe(BigInt(4)); + expect(new Set(added.rulesIds).size).toBe(2); + expect((await w.rules.list()).rules.map((r) => r.rulesId)).toEqual( + expect.arrayContaining(added.rulesIds) + ); + await (await w.rules.delete(added.rulesIds)).wait(); + expect(await count(made.wallet)).toBe(BigInt(8)); + expect((await w.rules.list()).rules).toEqual([]); + const cp = await w.checkpoints({ sinceBlock: added.tx.blockNumber }); + expect(cp.checkpoints).toHaveLength(8); + f.evidence('extended-management-batches', { + wallet: made.wallet, + rulesIds: added.rulesIds, + addHash: added.tx.hash, + checkpoints: 8, + }); + }); + it('4. invalid revoke targets preserve enabled rules and signer nonce', async () => { + const made = await f.owner.agentic.create('e2e-revoke-guards', { + rules: [rule()], + }), + w = f.owner.agentic.wallet(made.wallet), + nonce = await f.push.getTransactionCount({ address: f.ownerAddress }); + await expect(w.rules.delete([])).rejects.toMatchObject({ + code: 'DELETE_NEEDS_TARGET', + }); + await expect( + w.rules.delete([made.rulesIds[0], made.rulesIds[0]]) + ).rejects.toMatchObject({ code: 'INVALID_RULE' }); + await expect( + w.rules.delete([`0x${'12'.repeat(32)}`]) + ).rejects.toMatchObject({ code: 'RULE_NOT_FOUND' }); + expect(await f.push.getTransactionCount({ address: f.ownerAddress })).toBe( + nonce + ); + expect((await w.rules.list()).rules.map((r) => r.rulesId)).toEqual( + made.rulesIds + ); + }); + it('5. intervening agent spend refuses a stale replacement without changing grants or checkpoints', async () => { + const made = await f.owner.agentic.create('e2e-live-stale-update', { + rules: [rule()], + }); + await f.fundPC(made.wallet, BigInt(10)); + const agent = await f.agent(made.wallet), + rt = runtime(f.owner), + original = rt.execute; + let injected = false, + hash: string | undefined; + const before = await count(made.wallet), + grantNonce = await f.push.readContract({ + address: made.wallet, + abi: v6.abis.wallet, + functionName: 'grantNonce', + }); + rt.execute = async (params, opts) => { + if (!injected && params.to === made.wallet) { + injected = true; + const tx = await agent.universal.sendTransaction({ + to: f.ownerAddress, + value: BigInt(1), + }); + await tx.wait(); + hash = tx.hash; + } + return original(params, opts); + }; + try { + const error = await f.owner.agentic + .wallet(made.wallet) + .rules.update({ rules: [{ rulesId: made.rulesIds[0], rule: rule() }] }) + .then( + () => undefined, + (e: unknown) => e + ); + expect(error).toMatchObject({ + decodedError: { name: expect.stringContaining('SpentMismatch') }, + }); + expect(injected).toBe(true); + } finally { + rt.execute = original; + } + expect(await count(made.wallet)).toBe(before); + expect( + await f.push.readContract({ + address: made.wallet, + abi: v6.abis.wallet, + functionName: 'grantNonce', + }) + ).toBe(grantNonce); + expect( + (await f.owner.agentic.wallet(made.wallet).rules.list()).rules.map( + (r) => r.rulesId + ) + ).toEqual(made.rulesIds); + expect( + await readNativeCounters( + f.push, + f.manifest.addresses, + made.wallet, + made.rulesIds[0] + ) + ).toMatchObject({ valueSpent: BigInt(1), callsUsed: 1 }); + f.evidence('extended-stale-update', { + wallet: made.wallet, + rulesId: made.rulesIds[0], + spendHash: hash, + checkpoints: before, + grantNonce, + }); + }); + it('6. index race commits no grants to the competing wallet and retry takes the next slot', async () => { + const expectedNext = await f.owner.agentic.derive(); + const rt = runtime(f.owner), + original = rt.execute; + let competing: + | Awaited> + | undefined, + injected = false; + rt.execute = async (params, opts) => { + if (!injected && params.to === f.manifest.addresses.factory) { + injected = true; + competing = await f.owner.agentic.create('e2e-race-winner', { + rules: [], + }); + } + return original(params, opts); + }; + let raceError: unknown; + try { + await f.owner.agentic.create('e2e-race-loser', { rules: [rule()] }); + } catch (error) { + raceError = error; + } + try { + const afterRace = await f.owner.agentic.derive(); + const competingRules = competing + ? (await f.owner.agentic.wallet(competing.wallet).rules.list()).rules + : undefined; + f.evidence('extended-index-race-error', { + code: ( + raceError as + | { + code?: string; + } + | undefined + )?.code, + expectedWallet: expectedNext.address, + expectedIndex: expectedNext.index, + competingWallet: competing?.wallet, + competingIndex: competing?.index, + nextAfterRace: afterRace, + competingRuleIds: competingRules?.map((r) => r.rulesId), + }); + expect(raceError).toMatchObject({ + code: 'INDEX_RACE', + details: { committed: false }, + }); + } finally { + rt.execute = original; + } + if (!competing) throw new Error('Race injection did not run'); + expect( + (await f.owner.agentic.wallet(competing.wallet).rules.list()).rules + ).toEqual([]); + const retried = await f.owner.agentic.create('e2e-race-retry', { + rules: [rule()], + }); + expect(retried.index).toBe(competing.index + 1); + expect(retried.wallet).not.toBe(competing.wallet); + f.evidence('extended-index-race', { + competing: competing.wallet, + winnerHash: competing.tx.hash, + retried: retried.wallet, + retryHash: retried.tx.hash, + }); + }); +}); diff --git a/packages/core/__e2e__/agw/native-batch.spec.ts b/packages/core/__e2e__/agw/native-batch.spec.ts new file mode 100644 index 00000000..04c9515c --- /dev/null +++ b/packages/core/__e2e__/agw/native-batch.spec.ts @@ -0,0 +1,99 @@ +/** Opt-in live cases: require the existing verified-manifest gate and native + * EIP-7702 transport. These never accept a sequential fallback as success. */ +import { getAddress, parseEther, type Hex } from 'viem'; +import { AgenticRevertError } from '../../src'; +import { readNativeCounters } from '@e2e/shared/agw-state'; +import { + AGW_E2E_ENABLED, + inSeconds, + setupAgw, + type AgwFixture, +} from './_fixture'; +const d = AGW_E2E_ENABLED ? describe : describe.skip; +const SINK = getAddress('0x000000000000000000000000000000000000dEaD'); +const calls = () => + Array.from({ length: 2 }, () => ({ + to: SINK, + value: BigInt(1000), + data: '0x' as Hex, + })); +d('agw native batch', () => { + let f: AgwFixture; + beforeAll(async () => { + f = await setupAgw(); + }, 300000); + afterAll(() => f?.teardown()); + const create = async (_maxCalls: number) => { + const created = await f.owner.agentic.create('e2e-native-batch', { + rules: [ + { + agent: f.agentAddress, + validUntil: inSeconds(3600), + allowedCalls: [ + { + target: SINK, + selector: 'value-only', + maxValue: BigInt(1000), + }, + ], + }, + ], + }); + await f.fundPC(created.wallet, parseEther('0.001')); + return { ...created, agent: await f.agent(created.wallet) }; + }; + it('1. sender-preserving atomic native batch meters both actions', async () => { + const { wallet, rulesIds, agent } = await create(3); + const before = await f.push.getBalance({ address: wallet }); + const tx = await agent.universal.sendTransaction({ + to: SINK, + data: calls(), + }); + expect((await tx.wait()).status).toBe(1); + expect(tx.agentic?.nativeCalls).toEqual(calls()); + expect(tx.from).toBe(wallet); + expect(await f.push.getBalance({ address: wallet })).toBe( + before - BigInt(2000) + ); + expect( + await readNativeCounters( + f.push, + f.manifest.addresses, + wallet, + rulesIds[0] + ) + ).toMatchObject({ callsUsed: 2, valueSpent: BigInt(2000) }); + const raw = await f.push.getTransaction({ hash: tx.hash as Hex }); + expect(raw.type).toBe('eip7702'); + expect(getAddress(raw.from)).toBe(f.agentAddress); + expect(getAddress(raw.to as Hex)).toBe(f.agentAddress); + const replay = await f.owner.universal.trackTransaction(tx.hash); + expect(replay.agentic?.nativeCalls).toEqual(calls()); + expect(replay.from).toBe(wallet); + f.evidence('native-agent-batch', { + wallet, + rulesId: rulesIds[0], + tx: tx.hash, + }); + }); + it('2. a later policy failure rolls back earlier native actions', async () => { + const { wallet, rulesIds, agent } = await create(1); + const before = await f.push.getBalance({ address: wallet }); + await expect( + agent.universal.sendTransaction({ + to: SINK, + data: [calls()[0], { ...calls()[1], value: BigInt(1001) }], + }) + ).rejects.toBeInstanceOf(AgenticRevertError); + expect(await f.push.getBalance({ address: wallet })).toBe(before); + expect( + await readNativeCounters( + f.push, + f.manifest.addresses, + wallet, + rulesIds[0] + ) + ).toMatchObject({ callsUsed: 0, valueSpent: BigInt(0) }); + f.evidence('native-agent-batch-rollback', { wallet, rulesId: rulesIds[0] }); + }); +}); diff --git a/packages/core/__e2e__/agw/native-exec.spec.ts b/packages/core/__e2e__/agw/native-exec.spec.ts new file mode 100644 index 00000000..ee3ca4b2 --- /dev/null +++ b/packages/core/__e2e__/agw/native-exec.spec.ts @@ -0,0 +1,141 @@ +/** + * Scenarios 3 and 4 — native owner and agent execution with independent + * state checks, and unauthorized / revoked / expired / over-cap failures with + * unchanged protected state. + */ +import { getAddress, parseEther, type Address, type Hex } from 'viem'; +import { privateKeyToAccount, generatePrivateKey } from 'viem/accounts'; +import { AgenticError, AgenticRevertError } from '../../src'; +import { CHAIN } from '../../src/lib/constants/enums'; +import { AGENTIC_ERROR_CODE } from '../../src/lib/agentic/errors'; +import { + AGW_E2E_ENABLED, + evmClient, + inSeconds, + setupAgw, + type AgwFixture, +} from './_fixture'; +const d = AGW_E2E_ENABLED ? describe : describe.skip; +const CAP = parseEther('0.001'); +d('agw native', () => { + let f: AgwFixture; + let wallet: Address; + let rulesId: Hex; + const recipient = getAddress( + privateKeyToAccount(generatePrivateKey()).address + ); + beforeAll(async () => { + f = await setupAgw(); + const created = await f.owner.agentic.create('e2e-native', { + rules: [ + { + agent: f.agentAddress, + validUntil: inSeconds(3600), + allowedCalls: [ + { + target: recipient, + selector: 'value-only', + maxValue: CAP, + }, + ], + }, + ], + }); + wallet = created.wallet; + rulesId = created.rulesIds[0]; + await f.fundPC(wallet, parseEther('0.01')); + }, 300000); + afterAll(() => f?.teardown()); + it('1. agent door: value moves from the wallet under its rule; signer is origin, wallet is from', async () => { + const agent = await f.agent(wallet); + expect(agent.universal.account).toBe(wallet); + const before = await f.push.getBalance({ address: recipient }); + const tx = await agent.universal.sendTransaction({ + to: recipient, + value: CAP, + }); + const receipt = await tx.wait(); + expect(receipt.status).toBe(1); + expect(await f.push.getBalance({ address: recipient })).toBe(before + CAP); + expect(tx.from).toBe(wallet); + expect(receipt.from).toBe(wallet); + expect(tx.origin.toLowerCase()).toContain(f.agentAddress.toLowerCase()); + expect(tx.agentic).toMatchObject({ door: 'agent', rulesId }); + f.evidence('native-agent-send', { + wallet, + rulesId, + tx: tx.hash, + block: tx.blockNumber, + }); + }); + it('2. owner door: value moves from the wallet without rules', async () => { + const owner = await evmClient( + process.env['PUSH_PRIVATE_KEY'] as Hex, + CHAIN.PUSH_TESTNET_DONUT, + f.manifest.network, + wallet + ); + const before = await f.push.getBalance({ address: recipient }); + const tx = await owner.universal.sendTransaction({ + to: recipient, + value: CAP * BigInt(2), + }); + expect((await tx.wait()).status).toBe(1); + expect(await f.push.getBalance({ address: recipient })).toBe( + before + CAP * BigInt(2) + ); + expect(tx.agentic?.door).toBe('owner'); + }); + it('3. over-cap value reverts with the decoded policy gate and moves nothing', async () => { + const agent = await f.agent(wallet); + const before = await f.push.getBalance({ address: recipient }); + const err = await agent.universal + .sendTransaction({ to: recipient, value: CAP + BigInt(1) }) + .catch((e) => e); + expect(err).toBeInstanceOf(AgenticRevertError); + expect(err.decodedError?.name).toMatch(/^PolicyCheckReverted/); + expect(await f.push.getBalance({ address: recipient })).toBe(before); + }); + it('4. an unrelated signer cannot initialize against the wallet', async () => { + const stranger = generatePrivateKey(); + await expect( + evmClient(stranger, CHAIN.PUSH_TESTNET_DONUT, f.manifest.network, wallet) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.NOT_OWNER_OR_AGENT, + }); + }); + it('5. after revocation the agent fails before signing with NO_RULES_FOR_CHAIN', async () => { + const agent = await f.agent(wallet); + await (await f.owner.agentic.wallet(wallet).rules.delete([rulesId])).wait(); + const err = await agent.universal + .sendTransaction({ to: recipient, value: BigInt(1) }) + .catch((e) => e); + expect(err).toBeInstanceOf(AgenticError); + expect(err.code).toBe(AGENTIC_ERROR_CODE.NO_RULES_FOR_CHAIN); + }); + it('6. an expired rule still identifies the agent; the send is refused on-chain', async () => { + const created = await f.owner.agentic.create('e2e-expiry', { + rules: [ + { + agent: f.agentAddress, + validUntil: inSeconds(45), + allowedCalls: [ + { + target: recipient, + selector: 'value-only', + maxValue: CAP, + }, + ], + }, + ], + }); + await f.fundPC(created.wallet, CAP * BigInt(2)); + await new Promise((r) => setTimeout(r, 60000)); + const agent = await f.agent(created.wallet); + const err = await agent.universal + .sendTransaction({ to: recipient, value: BigInt(1) }) + .catch((e) => e); + expect(err).toBeInstanceOf(AgenticRevertError); + expect(err.decodedError?.name).toBe('PolicyCheckReverted(RulesExpired)'); + }, 300000); +}); diff --git a/packages/core/__e2e__/agw/native-multi-action.spec.ts b/packages/core/__e2e__/agw/native-multi-action.spec.ts new file mode 100644 index 00000000..4c3e9af2 --- /dev/null +++ b/packages/core/__e2e__/agw/native-multi-action.spec.ts @@ -0,0 +1,663 @@ +/** Public multi-action native rules on checked Donut v5; no contract deployments. */ +import { + createWalletClient, + encodeFunctionData, + erc20Abi, + getAddress, + http, + parseEther, + type Address, + type Hex, +} from 'viem'; +import { privateKeyToAccount } from 'viem/accounts'; +import { AgenticRevertError, type Rule } from '../../src'; +import { CHAIN } from '../../src/lib/constants/enums'; +import { + CHAIN_INFO, + getPushViemChain, + PUSH_BATCH_EXECUTOR_ADDRESS, +} from '../../src/lib/constants/chain'; +import { getNativePRC20ForChain } from '../../src/lib/orchestrator/internals/helpers'; +import type { AgenticRuntime } from '../../src/lib/agentic/runtime'; +import { v6 } from '../../src/lib/agentic/contracts/v6'; +import { actionId } from '../../src/lib/agentic/codec/ids'; +import { readNativeActionConfigs } from '@e2e/shared/agw-state'; +import { + AGW_E2E_ENABLED, + inSeconds, + setupAgw, + type AgwFixture, +} from './_fixture'; +const d = AGW_E2E_ENABLED ? describe : describe.skip; +const ZERO = BigInt(0), + ONE = BigInt(1); +d('agw native multi-action', () => { + let f: AgwFixture, token: Address; + beforeAll(async () => { + if ( + parseEther(process.env['AGW_E2E_AGENT_PC'] ?? '0.5') > parseEther('0.5') + ) + throw new Error('Fixture agent budget is at most 0.5 PC'); + f = await setupAgw(); + token = getNativePRC20ForChain(CHAIN.ETHEREUM_SEPOLIA, f.manifest.network); + const balance = await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [f.ownerAddress], + }); + if (balance < BigInt(400)) + throw new Error( + 'Need 400 raw pETH units for bounded native multi-action fixtures' + ); + }, 300000); + afterAll(() => f?.teardown()); + const transfer = (amount: bigint, recipient = f.ownerAddress) => + encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [recipient, amount], + }); + const rule = (): Rule => ({ + agent: f.agentAddress, + validUntil: inSeconds(3600), + allowedCalls: [ + { + target: f.ownerAddress, + selector: 'value-only', + maxValue: ONE, + }, + { + target: token, + selector: 'transfer(address,uint256)', + pins: [ + { arg: 0, expected: f.ownerAddress }, + { arg: 1, max: BigInt(3) }, + ], + }, + ], + }); + async function fixture(input = rule()) { + const made = await f.owner.agentic.create('e2e-native-multi', { + rules: [input], + }); + expect(made.rulesIds).toHaveLength(1); + await f.fundPC(made.wallet, BigInt(10)); + await ( + await f.owner.universal.sendTransaction({ + to: token, + data: transfer(BigInt(20), made.wallet), + }) + ).wait(); + const agent = await f.agent(made.wallet); + return { + ...made, + id: made.rulesIds[0] as Hex, + handle: f.owner.agentic.wallet(made.wallet), + agent, + }; + } + type Fixture = Awaited>; + const sendPC = (s: Fixture, value = ONE) => + s.agent.universal.sendTransaction({ to: f.ownerAddress, value }); + const sendToken = (s: Fixture, amount = ONE, recipient = f.ownerAddress) => + s.agent.universal.sendTransaction({ + to: token, + data: transfer(amount, recipient), + }); + const calls = (amount = BigInt(2)) => [ + { to: f.ownerAddress, value: ONE, data: '0x' as Hex }, + { to: token, value: ZERO, data: transfer(amount) }, + ]; + async function state(s: Fixture) { + const blockNumber = await f.push.getBlockNumber({ cacheTime: 0 }); + const [ + configs, + walletPC, + recipientPC, + walletToken, + recipientToken, + checkpointCount, + grantNonce, + ] = await Promise.all([ + readNativeActionConfigs( + f.push, + f.manifest.addresses, + s.wallet, + s.id, + blockNumber + ), + f.push.getBalance({ address: s.wallet, blockNumber }), + f.push.getBalance({ address: f.ownerAddress, blockNumber }), + f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [s.wallet], + blockNumber, + }), + f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [f.ownerAddress], + blockNumber, + }), + f.push.readContract({ + address: s.wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + blockNumber, + }), + f.push.readContract({ + address: s.wallet, + abi: v6.abis.wallet, + functionName: 'grantNonce', + blockNumber, + }), + ]); + return { + configs, + walletPC, + recipientPC, + walletToken, + recipientToken, + checkpointCount, + grantNonce, + }; + } + function config( + snapshot: Awaited>, + target: Address, + selector: Hex + ) { + const entry = snapshot.configs.find( + (entry) => entry.actionId === actionId(target, selector) + ); + if (!entry) throw new Error('Missing independent per-action config'); + return entry.config; + } + async function refused( + s: Fixture, + send: () => Promise, + gate: string + ) { + const before = await state(s), + nonce = await f.push.getTransactionCount({ address: f.agentAddress }); + const error = await send().then( + () => undefined, + (e: unknown) => e + ); + expect(error).toBeInstanceOf(AgenticRevertError); + expect((error as AgenticRevertError).decodedError?.name).toBe(gate); + expect(await state(s)).toEqual(before); + expect(await f.push.getTransactionCount({ address: f.agentAddress })).toBe( + nonce + ); + f.evidence('native-multi-refused', { + wallet: s.wallet, + id: s.id, + gate, + state: before, + agentNonce: nonce, + }); + } + it('1. one rule grants and reads both allowedCalls; decoded terms can be granted losslessly', async () => { + const s = await fixture(); + const { rules } = await s.handle.rules.list(); + expect(rules.map((r) => r.rulesId)).toEqual([s.id]); + const decoded = (await s.handle.rules.get(s.id)).rule as Rule; + expect(decoded.allowedCalls.map((a) => [a.target, a.selector])).toEqual([ + [f.ownerAddress, 'value-only'], + [token, '0xa9059cbb'], + ]); + expect(decoded.allowedCalls[1]).toMatchObject({ + pins: [{ arg: 0 }, { arg: 1, max: BigInt(3) }], + }); + const copy = await f.owner.agentic.create('e2e-native-multi-copy', { + rules: [decoded], + }); + expect( + (await f.owner.agentic.wallet(copy.wallet).rules.get(copy.rulesIds[0])) + .rule + ).toEqual(decoded); + const before = await state(s); + const pc = await sendPC(s); + await pc.wait(); + const afterPC = await state(s); + expect(afterPC.walletPC).toBe(before.walletPC - ONE); + expect(afterPC.recipientPC).toBe(before.recipientPC + ONE); + expect(config(afterPC, token, '0xa9059cbb')).toEqual( + config(before, token, '0xa9059cbb') + ); + const moved = await sendToken(s, BigInt(2)); + await moved.wait(); + const after = await state(s); + expect(after.walletToken).toBe(before.walletToken - BigInt(2)); + expect(after.recipientToken).toBe(before.recipientToken + BigInt(2)); + expect(config(after, f.ownerAddress, '0xffffffff')).toMatchObject({ + valueSpent: ONE, + callsUsed: 1, + }); + expect(config(after, token, '0xa9059cbb')).toMatchObject({ + amountSpent: BigInt(0), + callsUsed: 1, + }); + expect(after.checkpointCount).toBe(before.checkpointCount); + expect(pc.agentic?.rulesId).toBe(s.id); + expect(moved.agentic?.rulesId).toBe(s.id); + const replay = await f.owner.universal.trackTransaction(moved.hash); + expect(replay.from).toBe(s.wallet); + expect(replay.origin).toBe(moved.origin); + expect(replay.agentic?.rulesId).toBe(s.id); + f.evidence('native-multi-grant-read-send', { + wallet: s.wallet, + id: s.id, + copy: copy.wallet, + hashes: [s.tx.hash, copy.tx.hash, pc.hash, moved.hash], + state: after, + }); + }); + it('2. wrong pin, excess amount and an ungranted selector fail without changing either action', async () => { + const s = await fixture(); + await refused( + s, + () => sendToken(s, ONE, f.agentAddress), + 'PolicyCheckReverted(ArgPinMismatch)' + ); + await refused( + s, + () => sendToken(s, BigInt(4)), + 'PolicyCheckReverted(ArgPinAboveMax)' + ); + await refused( + s, + () => + s.agent.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'approve', + args: [f.agentAddress, ONE], + }), + }), + 'NoPoliciesSet' + ); + expect( + await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'allowance', + args: [s.wallet, f.agentAddress], + }) + ).toBe(ZERO); + }); + it('3. per-call limits allow repeated calls with independent spend entries', async () => { + const s = await fixture(); + await (await sendPC(s)).wait(); + await (await sendPC(s)).wait(); + await (await sendPC(s, ZERO)).wait(); + await (await sendToken(s, BigInt(3))).wait(); + await (await sendToken(s, BigInt(2))).wait(); + await (await sendToken(s)).wait(); + const final = await state(s); + expect(config(final, f.ownerAddress, '0xffffffff')).toMatchObject({ + valueSpent: BigInt(2), + callsUsed: 3, + }); + expect(config(final, token, '0xa9059cbb')).toMatchObject({ + amountSpent: BigInt(0), + callsUsed: 3, + }); + f.evidence('native-multi-independent-counters', { + wallet: s.wallet, + id: s.id, + state: final, + }); + }); + it('4. a mixed-function atomic agent batch preserves sender, per-action spend and replay', async () => { + const s = await fixture(), + before = await state(s); + const tx = await s.agent.universal.sendTransaction({ + to: f.ownerAddress, + data: calls(), + }); + expect((await tx.wait()).status).toBe(1); + const raw = await f.push.getTransaction({ hash: tx.hash as Hex }); + expect(raw.type).toBe('eip7702'); + expect(getAddress(raw.from)).toBe(f.agentAddress); + expect(getAddress(raw.to as Address)).toBe(f.agentAddress); + const after = await state(s); + expect(after.walletPC).toBe(before.walletPC - ONE); + expect(after.walletToken).toBe(before.walletToken - BigInt(2)); + expect(config(after, f.ownerAddress, '0xffffffff')).toMatchObject({ + callsUsed: 1, + valueSpent: ONE, + }); + expect(config(after, token, '0xa9059cbb')).toMatchObject({ + callsUsed: 1, + amountSpent: BigInt(0), + }); + expect(after.checkpointCount).toBe(before.checkpointCount); + const replay = await f.owner.universal.trackTransaction(tx.hash); + expect(replay.from).toBe(s.wallet); + expect(replay.agentic?.nativeCalls).toEqual(calls()); + expect(replay.agentic?.rulesId).toBe(s.id); + f.evidence('native-multi-mixed-batch', { + wallet: s.wallet, + id: s.id, + hash: tx.hash, + state: after, + }); + }); + it('5. a failing second batch action rolls back PC, tokens and all action counters in a mined transaction', async () => { + const s = await fixture(); + // Establish delegation through the real public SDK transport, then reuse + // its configured executor for a bounded deliberately reverted transaction. + await ( + await s.agent.universal.sendTransaction({ + to: f.ownerAddress, + data: calls(ONE), + }) + ).wait(); + await refused( + s, + () => + s.agent.universal.sendTransaction({ + to: f.ownerAddress, + data: calls(BigInt(4)), + }), + 'PolicyCheckReverted(ArgPinAboveMax)' + ); + const executor = PUSH_BATCH_EXECUTOR_ADDRESS[CHAIN.PUSH_TESTNET_DONUT]; + if (!executor) throw new Error('Missing verified native batch executor'); + expect( + (await f.push.getCode({ address: f.agentAddress }))?.toLowerCase() + ).toBe(`0xef0100${executor.slice(2)}`.toLowerCase()); + const before = await state(s), + nonce = await f.push.getTransactionCount({ address: f.agentAddress }); + const raw = createWalletClient({ + account: privateKeyToAccount(f.agentKey), + chain: getPushViemChain(CHAIN.PUSH_TESTNET_DONUT), + transport: http(CHAIN_INFO[CHAIN.PUSH_TESTNET_DONUT].defaultRPC[0]), + }); + const data = v6.encodeExecute( + calls(BigInt(4)).map((c) => ({ + target: s.wallet, + value: ZERO, + data: v6.encodeExecuteAsAgent(s.id, { + target: c.to, + value: c.value, + data: c.data, + }), + })) + ); + const hash = await raw.sendTransaction({ + chain: raw.chain, + to: f.agentAddress, + data, + gas: BigInt(600000), + }); + const receipt = await f.push.waitForTransactionReceipt({ hash }); + expect(receipt.status).toBe('reverted'); + expect(receipt.logs).toHaveLength(0); + expect(await state(s)).toEqual(before); + expect(await f.push.getTransactionCount({ address: f.agentAddress })).toBe( + nonce + 1 + ); + f.evidence('native-multi-mined-rollback', { + wallet: s.wallet, + id: s.id, + hash, + block: receipt.blockNumber, + gasUsed: receipt.gasUsed, + state: before, + }); + }); + it('6. replacement guards every old action and records six checkpoints for a two-action rule', async () => { + const s = await fixture(); + await (await sendPC(s)).wait(); + await (await sendToken(s, BigInt(2))).wait(); + const before = await state(s), + input = rule(); + const replacement = await s.handle.rules.update({ + rules: [{ rulesId: s.id, rule: input }], + }); + const next = replacement.rules[0].rulesId as Hex; + expect(next).not.toBe(s.id); + await expect(s.handle.rules.get(s.id)).rejects.toMatchObject({ + code: 'RULE_NOT_FOUND', + }); + expect((await s.handle.rules.list()).rules.map((r) => r.rulesId)).toEqual([ + next, + ]); + expect( + await f.push.readContract({ + address: s.wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }) + ).toBe(before.checkpointCount + BigInt(6)); + for (const { config: cfg } of await readNativeActionConfigs( + f.push, + f.manifest.addresses, + s.wallet, + next + )) { + expect(cfg).toMatchObject({ + valueSpent: ZERO, + amountSpent: ZERO, + callsUsed: 0, + }); + } + const reused = await sendToken(s); + await reused.wait(); + expect(reused.agentic?.rulesId).toBe(next); + const trimmed = await s.handle.rules.update({ + rules: [ + { + rulesId: next, + rule: { ...rule(), allowedCalls: [rule().allowedCalls[0]] }, + }, + ], + }); + expect( + (await s.handle.rules.get(trimmed.rules[0].rulesId)).rule + ).toMatchObject({ + allowedCalls: [{ target: f.ownerAddress, selector: 'value-only' }], + }); + const nonce = await f.push.getTransactionCount({ address: f.agentAddress }); + await expect(sendToken(s)).rejects.toMatchObject({ + decodedError: { name: 'NoPoliciesSet' }, + }); + expect(await f.push.getTransactionCount({ address: f.agentAddress })).toBe( + nonce + ); + f.evidence('native-multi-replacement', { + wallet: s.wallet, + oldId: s.id, + newId: next, + trimmedId: trimmed.rules[0].rulesId, + hashes: [replacement.tx.hash, reused.hash, trimmed.tx.hash], + }); + }); + it('7. spending the second action mid-update rejects the stale batch and a fresh retry succeeds', async () => { + const s = await fixture(), + before = await state(s); + const runtime = ( + f.owner as unknown as { + agenticRuntime: AgenticRuntime; + } + ).agenticRuntime; + const original = runtime.execute; + let injected = false, + spendHash: string | undefined; + runtime.execute = async (params, options) => { + if (!injected && params.to === s.wallet) { + injected = true; + const tx = await sendToken(s); + await tx.wait(); + spendHash = tx.hash; + } + return original(params, options); + }; + try { + await expect( + s.handle.rules.update({ rules: [{ rulesId: s.id, rule: rule() }] }) + ).rejects.toMatchObject({ + decodedError: { name: 'SpentMismatch' }, + }); + expect(injected).toBe(true); + } finally { + runtime.execute = original; + } + const after = await state(s); + expect(after.checkpointCount).toBe(before.checkpointCount); + expect(after.grantNonce).toBe(before.grantNonce); + expect(config(after, f.ownerAddress, '0xffffffff')).toEqual( + config(before, f.ownerAddress, '0xffffffff') + ); + expect(config(after, token, '0xa9059cbb')).toMatchObject({ + amountSpent: ZERO, + callsUsed: 1, + }); + expect(after.walletToken).toBe(before.walletToken - ONE); + expect((await s.handle.rules.list()).rules.map((r) => r.rulesId)).toEqual([ + s.id, + ]); + const retry = await s.handle.rules.update({ + rules: [{ rulesId: s.id, rule: rule() }], + }); + expect( + await f.push.readContract({ + address: s.wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }) + ).toBe(before.checkpointCount + BigInt(6)); + f.evidence('native-multi-second-action-race', { + wallet: s.wallet, + oldId: s.id, + newId: retry.rules[0].rulesId, + spendHash, + retryHash: retry.tx.hash, + stateAfterRace: after, + }); + }); + it('8. eight unique native allowedCalls are accepted; duplicate, mixed and ninth-action inputs never sign', async () => { + const allowedCalls = Array.from({ length: 8 }, (_, i) => ({ + target: getAddress(`0x${(0x1000 + i).toString(16).padStart(40, '0')}`), + selector: 'value-only' as const, + })); + const input = { + agent: f.agentAddress, + validUntil: inSeconds(3600), + allowedCalls, + }; + const made = await f.owner.agentic.create('e2e-native-eight', { + rules: [input], + }); + expect( + ( + (await f.owner.agentic.wallet(made.wallet).rules.get(made.rulesIds[0])) + .rule as Rule + ).allowedCalls + ).toHaveLength(8); + const invalid = [ + { ...input, allowedCalls: [] }, + { + ...input, + allowedCalls: [ + ...allowedCalls, + { + target: f.ownerAddress, + selector: 'value-only', + }, + ], + }, + { ...input, allowedCalls: [allowedCalls[0], allowedCalls[0]] }, + { ...input, target: f.ownerAddress }, + ]; + const next = await f.owner.agentic.derive(), + nonce = await f.push.getTransactionCount({ address: f.ownerAddress }); + for (const rule of invalid) + await expect( + f.owner.agentic.create('invalid-native-allowedCalls', { + rules: [rule as Rule], + }) + ).rejects.toMatchObject({ + code: expect.stringMatching(/INVALID_RULE|CAPABILITY_UNAVAILABLE/), + }); + expect(await f.owner.agentic.derive()).toEqual(next); + expect(await f.push.getTransactionCount({ address: f.ownerAddress })).toBe( + nonce + ); + f.evidence('native-multi-eight-boundary', { + wallet: made.wallet, + id: made.rulesIds[0], + hash: made.tx.hash, + unchangedNextSlot: next.index, + }); + }); + it('9. one expiry applies to all calls and expired calls move nothing', async () => { + const input = rule(), + expiry = inSeconds(60); + input.validUntil = expiry; + const s = await fixture(input); + expect((await s.handle.rules.get(s.id)).validUntil).toBe(expiry); + const deadline = Date.now() + 120_000; + while (Number((await f.push.getBlock()).timestamp) <= expiry) { + if (Date.now() > deadline) throw Error('Donut expiry wait timed out'); + await new Promise((r) => setTimeout(r, 2000)); + } + await refused(s, () => sendPC(s), 'PolicyCheckReverted(RulesExpired)'); + await refused(s, () => sendToken(s), 'PolicyCheckReverted(RulesExpired)'); + f.evidence('native-multi-shared-expiry', { + wallet: s.wallet, + id: s.id, + expiry, + }); + }, 300_000); + + it('10. malformed action objects and invalid rule expiry return structured errors before signing', async () => { + const base = rule(), + next = await f.owner.agentic.derive(), + nonce = await f.push.getTransactionCount({ address: f.ownerAddress }); + const invalid = [ + { ...base, allowedCalls: [null] }, + { ...base, allowedCalls: [42] }, + { + ...base, + validUntil: undefined, + allowedCalls: [ + { + ...base.allowedCalls[0], + }, + ], + }, + { + ...base, + validUntil: 1, + allowedCalls: [ + { + ...base.allowedCalls[0], + }, + ], + }, + ]; + for (const input of invalid) + await expect( + f.owner.agentic.create('invalid-multi-action', { + rules: [input as unknown as Rule], + }) + ).rejects.toMatchObject({ name: 'AgenticError', code: 'INVALID_RULE' }); + expect(await f.owner.agentic.derive()).toEqual(next); + expect(await f.push.getTransactionCount({ address: f.ownerAddress })).toBe( + nonce + ); + f.evidence('native-multi-invalid-input', { + unchangedNextSlot: next.index, + ownerNonce: nonce, + }); + }); +}); diff --git a/packages/core/__e2e__/agw/native-policy-extended.spec.ts b/packages/core/__e2e__/agw/native-policy-extended.spec.ts new file mode 100644 index 00000000..0211b4f7 --- /dev/null +++ b/packages/core/__e2e__/agw/native-policy-extended.spec.ts @@ -0,0 +1,291 @@ +/** Native policy limits, confirmed zero defaults and lossless raw-offset reuse. */ +import { PushChain, AgenticRevertError, type RuleInput } from '../../src'; +import { encodeFunctionData, erc20Abi, type Address } from 'viem'; +import { getNativePRC20ForChain } from '../../src/lib/orchestrator/internals/helpers'; +import { readNativeCounters } from '../shared/agw-state'; +import { CHAIN } from '../../src/lib/constants/enums'; +import { setupAgw, inSeconds, type AgwFixture } from './_fixture'; +const d = process.env['AGW_E2E'] === '1' ? describe : describe.skip; +const chain = PushChain.CONSTANTS.CHAIN.PUSH_TESTNET_DONUT; +d('agw extended native policy', () => { + let f: AgwFixture, token: Address; + beforeAll(async () => { + f = await setupAgw(); + token = getNativePRC20ForChain(CHAIN.ETHEREUM_SEPOLIA, f.manifest.network); + }, 300000); + afterAll(() => f?.teardown()); + const transfer = (to: Address, amount: bigint) => + encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [to, amount], + }); + async function fixture( + balance = BigInt(50), + maxCalls = 2, + total = BigInt(15), + omitPc = false + ) { + const rule = { + agent: f.agentAddress, + validUntil: inSeconds(3600), + allowedCalls: [ + { + target: token, + selector: 'transfer(address,uint256)' as const, + ...(omitPc ? {} : { maxValue: BigInt(0) }), + pins: [ + { arg: 0, expected: f.ownerAddress }, + { arg: 1, max: total === BigInt(0) ? BigInt(0) : BigInt(10) }, + ], + }, + ], + }; + const made = await f.owner.agentic.create('e2e-native-meter', { + rules: [rule], + }); + if (balance) + await ( + await f.owner.universal.sendTransaction({ + to: token, + data: transfer(made.wallet, balance), + }) + ).wait(); + const agent = await f.agent(made.wallet); + const counters = () => + readNativeCounters( + f.push, + f.manifest.addresses, + made.wallet, + made.rulesIds[0] + ); + const tokenBalance = () => + f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [made.wallet], + }); + const send = (amount: bigint, to = f.ownerAddress, value = BigInt(0)) => + agent.universal.sendTransaction({ + to: { address: token, chain }, + value, + data: transfer(to, amount), + }); + return { ...made, agent, counters, tokenBalance, send }; + } + async function refused( + s: Awaited>, + action: () => Promise, + gate?: string + ) { + const before = await s.counters(), + balance = await s.tokenBalance(); + const error = await action().then( + () => undefined, + (e: unknown) => e + ); + expect(error).toBeInstanceOf(AgenticRevertError); + if (gate) + expect((error as AgenticRevertError).decodedError?.name).toBe( + `PolicyCheckReverted(${gate})` + ); + expect(await s.counters()).toEqual(before); + expect(await s.tokenBalance()).toBe(balance); + f.evidence('extended-native-refusal', { + wallet: s.wallet, + rulesId: s.rulesIds[0], + gate: gate ?? 'callee/engine', + counters: before, + tokenBalance: balance, + }); + } + it('1. pinned recipient and metered amount decode losslessly and transfer through explicit Push chain', async () => { + const s = await fixture(); + const record = await f.owner.agentic + .wallet(s.wallet) + .rules.get(s.rulesIds[0]); + expect(record.rule).toMatchObject({ + allowedCalls: [ + { + pins: [ + { + arg: 0, + expected: `0x${f.ownerAddress + .slice(2) + .toLowerCase() + .padStart(64, '0')}`, + }, + { arg: 1, max: BigInt(10) }, + ], + }, + ], + }); + const before = await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [f.ownerAddress], + }); + const tx = await s.send(BigInt(10)); + expect((await tx.wait()).status).toBe(1); + expect(await s.tokenBalance()).toBe(BigInt(40)); + expect(await s.counters()).toMatchObject({ + valueSpent: BigInt(0), + amountSpent: BigInt(0), + callsUsed: 1, + }); + expect( + await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [f.ownerAddress], + }) + ).toBe(before + BigInt(10)); + const replay = await f.owner.universal.trackTransaction(tx.hash); + expect(replay.from).toBe(s.wallet); + expect(replay.agentic?.rulesId).toBe(s.rulesIds[0]); + f.evidence('extended-native-meter', { + wallet: s.wallet, + rulesId: s.rulesIds[0], + txHash: tx.hash, + }); + }); + it('2. wrong recipient pin is refused with unchanged token balance and counters', async () => { + const s = await fixture(); + await refused(s, () => s.send(BigInt(1), f.agentAddress), 'ArgPinMismatch'); + }); + it('3. per-call amount cap refuses cap plus one', async () => { + const s = await fixture(); + await refused(s, () => s.send(BigInt(11)), 'ArgPinAboveMax'); + }); + it('4. repeated per-call amounts accumulate spend without a removed lifetime cap', async () => { + const s = await fixture(BigInt(50), 10); + await (await s.send(BigInt(10))).wait(); + await (await s.send(BigInt(5))).wait(); + expect((await s.counters()).amountSpent).toBe(BigInt(0)); + await (await s.send(BigInt(1))).wait(); + expect((await s.counters()).amountSpent).toBe(BigInt(0)); + }); + it('5. repeated calls have no removed maxCalls limit', async () => { + const s = await fixture(); + await (await s.send(BigInt(1))).wait(); + await (await s.send(BigInt(1))).wait(); + expect((await s.counters()).callsUsed).toBe(2); + await (await s.send(BigInt(0))).wait(); + expect((await s.counters()).callsUsed).toBe(3); + }); + it('6. explicit zero MAX pin forbids positive amount but permits a metered zero call', async () => { + const s = await fixture(BigInt(50), 10, BigInt(0)); + await refused(s, () => s.send(BigInt(1)), 'ArgPinAboveMax'); + await (await s.send(BigInt(0))).wait(); + expect(await s.counters()).toMatchObject({ + amountSpent: BigInt(0), + callsUsed: 1, + }); + }); + it('7. failed token callee leaves all policy counters unchanged', async () => { + const s = await fixture(BigInt(5)); + await refused(s, () => s.send(BigInt(10))); + }); + it('8. an ungranted selector is refused without changing balances or allowance', async () => { + const s = await fixture(); + const before = await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'allowance', + args: [s.wallet, f.agentAddress], + }); + await refused(s, () => + s.agent.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'approve', + args: [f.agentAddress, BigInt(1)], + }), + }) + ); + expect( + await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'allowance', + args: [s.wallet, f.agentAddress], + }) + ).toBe(before); + }); + it('9. omitted PC limits forbid value while still allowing a token transfer', async () => { + const s = await fixture(BigInt(5), 3, BigInt(15), true); + await f.fundPC(s.wallet, BigInt(10)); + const record = await f.owner.agentic + .wallet(s.wallet) + .rules.get(s.rulesIds[0]); + expect(record.rule).toMatchObject({ + allowedCalls: [{ maxValue: BigInt(0) }], + }); + await refused( + s, + () => s.send(BigInt(1), f.ownerAddress, BigInt(1)), + 'ValueExceedsCap' + ); + const sent = await s.send(BigInt(1)); + expect((await sent.wait()).status).toBe(1); + expect(await s.counters()).toMatchObject({ + valueSpent: BigInt(0), + amountSpent: BigInt(0), + }); + f.evidence('zero-pc-defaults', { wallet: s.wallet, txHash: sent.hash }); + }); + it('10. decoded arg-index rules can be granted again without fabricated ref metadata', async () => { + const s = await fixture(BigInt(0)); + const original = await f.owner.agentic + .wallet(s.wallet) + .rules.get(s.rulesIds[0]); + expect(original).not.toHaveProperty('ref'); + const made = await f.owner.agentic.create('arg-index-reuse', { + rules: [original.rule as RuleInput], + }); + const reread = await f.owner.agentic + .wallet(made.wallet) + .rules.get(made.rulesIds[0]); + expect(reread.rule).toEqual(original.rule); + expect(reread).not.toHaveProperty('ref'); + f.evidence('arg-index-reuse', { + wallet: made.wallet, + txHash: made.tx.hash, + }); + }); + it('11. removed ref and conflicting argument-offset inputs fail before signing', async () => { + const nonce = await f.push.getTransactionCount({ address: f.ownerAddress }); + const rule = { + agent: f.agentAddress, + validUntil: inSeconds(3600), + allowedCalls: [ + { + target: token, + selector: 'transfer(address,uint256)', + }, + ], + }; + await expect( + f.owner.agentic.create('invalid-ref', { + rules: [{ ...rule, ref: `0x${'11'.repeat(32)}` } as never], + }) + ).rejects.toMatchObject({ code: 'INVALID_RULE' }); + await expect( + f.owner.agentic.create('invalid-pin', { + rules: [ + { + ...rule, + pins: [{ arg: 0, offset: 4, expected: `0x${'00'.repeat(32)}` }], + } as never, + ], + }) + ).rejects.toMatchObject({ code: 'INVALID_RULE' }); + expect(await f.push.getTransactionCount({ address: f.ownerAddress })).toBe( + nonce + ); + }); +}); diff --git a/packages/core/__e2e__/agw/presets-acceptance.spec.ts b/packages/core/__e2e__/agw/presets-acceptance.spec.ts new file mode 100644 index 00000000..76459777 --- /dev/null +++ b/packages/core/__e2e__/agw/presets-acceptance.spec.ts @@ -0,0 +1,364 @@ +/** Release acceptance: EXACT shipped preset -> create -> readback -> two agent sends. + * Every preset sends native ETH from Push; the agent wraps it on arrival and uses + * the app. No asset, cap, call or pin is removed or substituted here. + */ +import '@e2e/shared/setup'; +import { + createPublicClient, + http, + encodeFunctionData, + erc20Abi, + parseAbi, + parseEther, + getAddress, + zeroAddress, + type ContractFunctionReturnType, + type Address, + type Hex, +} from 'viem'; +import { PushChain, CHAIN, type Rule } from '../../src'; +import { resolveAgenticPrc20 } from '../../src/lib/agentic/token-routes'; +import { v6 } from '../../src/lib/agentic/contracts/v6'; +import { actionId, configId } from '../../src/lib/agentic/codec/ids'; +import { + PRESET_ACCEPTANCE_CASES, + expectStoredPreset, +} from '../shared/agw-preset-acceptance'; +import { observeAgwGas, recordAgwPushGas } from '../shared/agw-gas-evidence'; +import { AGW_E2E_ENABLED, setupAgw } from './_fixture'; +import { getCEAAddress } from '../../src/lib/orchestrator/cea-utils'; + +const d = AGW_E2E_ENABLED ? describe : describe.skip; +const endpoints: Record = { + 'eip155:11155111': 'https://ethereum-sepolia-rpc.publicnode.com', + 'eip155:84532': 'https://base-sepolia-rpc.publicnode.com', + 'eip155:421614': 'https://arbitrum-sepolia-rpc.publicnode.com', +}; +const ABI = parseAbi([ + 'function deposit() payable', + 'function factory() view returns(address)', + 'function getPool(address,address,uint24) view returns(address)', + 'function liquidity() view returns(uint128)', + 'function supply(address,uint256,address,uint16)', + 'function balanceOf(address) view returns(uint256)', + 'function getReserveData(address) view returns ((uint256 configuration,uint128 liquidityIndex,uint128 currentLiquidityRate,uint128 variableBorrowIndex,uint128 currentVariableBorrowRate,uint128 currentStableBorrowRate,uint40 lastUpdateTimestamp,uint16 id,address aTokenAddress,address stableDebtTokenAddress,address variableDebtTokenAddress,address interestRateStrategyAddress,uint128 accruedToTreasury,uint128 unbacked,uint128 isolationModeTotalDebt))', + 'function exactInputSingle((address tokenIn,address tokenOut,uint24 fee,address recipient,uint256 amountIn,uint256 amountOutMinimum,uint160 sqrtPriceLimitX96)) returns(uint256)', +]); +// Uniswap V3 QuoterV2 on each testnet. Declared view so eth_call returns its quote. +const QUOTERS: Record = { + 'eip155:11155111': '0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3', + 'eip155:84532': '0xC5290058841028F1614F3A6F0F5816cAd0df5E27', + 'eip155:421614': '0x2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B', +}; +const QUOTER_ABI = parseAbi([ + 'function quoteExactInputSingle((address tokenIn,address tokenOut,uint256 amountIn,uint24 fee,uint160 sqrtPriceLimitX96)) view returns (uint256 amountOut,uint160 sqrtPriceX96After,uint32 initializedTicksCrossed,uint256 gasEstimate)', +]); +// Concrete operations for the shipped catalog: a WETH -> USDC swap or an Aave +// WETH supply. A new protocol needs its own receipt assertion, not a generic pass. +async function operation(rule: Rule, cea: Address) { + const rpc = createPublicClient({ + transport: http(endpoints[rule.chainNamespace!], { + timeout: 15000, + // Public testnet RPCs drop requests; a dropped receipt read is not a failure. + retryCount: 3, + }), + }); + const asset = rule.assets![0]; + if ( + (typeof asset.token === 'string' ? asset.token : asset.token.address) !== + zeroAddress + ) + throw new Error('Presets must send only native ETH'); + const amount = asset.maxPerCall / BigInt(1000); + if (amount <= BigInt(0) || (asset.maxTotal ?? BigInt(0)) < amount * BigInt(2)) + throw new Error('Default caps cannot cover two bounded acceptance sends'); + const read = < + F extends + | 'factory' + | 'getPool' + | 'liquidity' + | 'getReserveData' + | 'balanceOf' + >( + address: Address, + functionName: F, + args: readonly unknown[] = [] + ) => + rpc.readContract({ + address, + abi: ABI, + functionName: functionName as never, + args: args as never, + }) as Promise>; + const wrap = rule.allowedCalls.find((c) => c.selector === 'deposit()'); + if (!wrap || wrap.maxValue !== asset.maxPerCall) + throw new Error('Preset must wrap ETH up to its per-call cap'); + const weth = getAddress(wrap.target); + const swap = rule.allowedCalls.find( + (c) => + c.selector.toString().startsWith('exactInputSingle(') && + c.pins?.some( + (p) => + 'expected' in p && p.expected === weth && p.arg?.toString() === '0,0' + ) + ); + let target: Address, data: Hex, resultBalance: () => Promise; + if (swap) { + target = getAddress(swap.target); + const usdc = getAddress( + swap.pins!.find((p) => p.arg?.toString() === '0,1')!.expected as Address + ); + // Testnet pools are thin and often mispriced, so the first tier with + // liquidity can return nothing. Uniswap's quoter simulates each swap. + let fee: number | undefined, + best = BigInt(0); + for (const tier of [100, 500, 3000, 10000]) { + let quoted: bigint; + try { + [quoted] = await rpc.readContract({ + address: QUOTERS[rule.chainNamespace!], + abi: QUOTER_ABI, + functionName: 'quoteExactInputSingle', + args: [ + { + tokenIn: weth, + tokenOut: usdc, + amountIn: amount, + fee: tier, + sqrtPriceLimitX96: BigInt(0), + }, + ], + }); + } catch { + continue; // no pool at this tier + } + if (quoted > best) { + best = quoted; + fee = tier; + } + } + if (!fee) + throw new Error('PRESET_PROTOCOL_UNAVAILABLE: no active WETH/USDC pool'); + data = encodeFunctionData({ + abi: ABI, + functionName: 'exactInputSingle', + args: [ + { + tokenIn: weth, + tokenOut: usdc, + fee, + recipient: cea, + amountIn: amount, + amountOutMinimum: BigInt(1), + sqrtPriceLimitX96: BigInt(0), + }, + ], + }); + resultBalance = () => read(usdc, 'balanceOf', [cea]); + } else { + const supply = rule.allowedCalls.find( + (c) => c.selector === 'supply(address,uint256,address,uint16)' + ); + if (!supply) + throw new Error( + 'PRESET_ACCEPTANCE_UNIMPLEMENTED: no verified operation for this catalog entry' + ); + target = getAddress(supply.target); + const reserve = await read(target, 'getReserveData', [weth]); + if (/^0x0+$/.test(reserve.aTokenAddress)) + throw new Error( + 'PRESET_PROTOCOL_UNAVAILABLE: WETH is not an Aave reserve' + ); + data = encodeFunctionData({ + abi: ABI, + functionName: 'supply', + args: [weth, amount, cea, 0], + }); + resultBalance = () => read(reserve.aTokenAddress, 'balanceOf', [cea]); + } + return { + rpc, + amount, + target, + resultBalance, + calls: [ + { + to: weth, + value: amount, + data: encodeFunctionData({ abi: ABI, functionName: 'deposit' }), + }, + { + to: weth, + value: BigInt(0), + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'approve', + args: [target, amount], + }), + }, + { to: target, value: BigInt(0), data }, + ], + }; +} + +d('agw unchanged preset acceptance', () => { + // Explicit titles also allow CI's scenario selector to enumerate every case. + const run = async ( + category: 'DEXES' | 'LENDING', + chainNamespace: `eip155:${string}` + ) => { + const f = await setupAgw({ deferAgentFunding: true }); + try { + const generated = PushChain.utils.agentic.presets.get(category, { + chainNamespace, + agent: f.agentAddress, + }); + const before = JSON.stringify(generated.rules, (_k, v) => + typeof v === 'bigint' ? String(v) : v + ); + const predicted = await f.owner.agentic.derive(); + const cea = ( + await getCEAAddress( + predicted.address, + chainNamespace as CHAIN, + endpoints[chainNamespace] + ) + ).cea as Address; + const op = await operation(generated.rules[0], cea); + // Native ETH leaves Push as the chain's gas PRC20 (pETH, pETH_BASE, pETH_ARB). + const mapped = resolveAgenticPrc20( + { chain: chainNamespace, address: zeroAddress }, + f.manifest.network + ); + if ( + (await f.push.readContract({ + address: mapped.address, + abi: erc20Abi, + functionName: 'balanceOf', + args: [f.ownerAddress], + })) < + op.amount * BigInt(2) + ) + throw new Error( + `PRESET_PREREQUISITE: owner lacks ${mapped.symbol} for two sends` + ); + await f.fundAgent(); + const made = await f.owner.agentic.create('preset-acceptance', { + rules: generated.rules, + }); + expect(made.wallet).toBe(predicted.address); + const config = await f.push.readContract({ + address: f.manifest.addresses.rulesPolicy, + abi: v6.abis.policy, + functionName: 'getConfig', + args: [ + configId( + made.wallet, + made.rulesIds[0], + actionId(f.manifest.addresses.gateway, '0x77b86bec') + ), + made.wallet, + ], + }); + expect(config.expectedCEA).toBe(cea); + expectStoredPreset( + generated.rules[0], + await f.owner.agentic.wallet(made.wallet).rules.get(made.rulesIds[0]) + ); + expect( + JSON.stringify(generated.rules, (_k, v) => + typeof v === 'bigint' ? String(v) : v + ) + ).toBe(before); + f.evidence('unchanged-preset-created', { + category, + chainNamespace, + wallet: made.wallet, + hash: made.tx.hash, + rules: generated.rules, + }); + await f.fundPC(made.wallet, parseEther('50')); + await ( + await f.owner.universal.sendTransaction({ + to: mapped.address, + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [made.wallet, op.amount * BigInt(2)], + }), + }) + ).wait(); + const agent = await f.agent(made.wallet); + for (const stage of ['first-use', 'subsequent']) { + const oldBalance = await op.resultBalance(); + const stop = observeAgwGas( + agent, + f, + `${category}:${chainNamespace}:${stage}` + ); + try { + const tx = await agent.universal.sendTransaction({ + to: { address: op.target, chain: chainNamespace as CHAIN }, + data: op.calls, + funds: { amount: op.amount }, + }); + f.evidence('unchanged-preset-submitted', { + category, + chainNamespace, + stage, + wallet: made.wallet, + hash: tx.hash, + }); + const receipt = await tx.wait({ outboundTimeoutMs: 180000 }); + expect(receipt.externalStatus).toBe('success'); + expect(receipt.externalTxHash).toBeTruthy(); + const dest = await op.rpc.getTransactionReceipt({ + hash: receipt.externalTxHash as Hex, + }); + expect(dest.status).toBe('success'); + expect(await op.resultBalance()).toBeGreaterThan(oldBalance); + await recordAgwPushGas(f, tx.hash, stage); + f.evidence('unchanged-preset-delivered', { + category, + chainNamespace, + stage, + hash: tx.hash, + destinationHash: receipt.externalTxHash, + destinationGasUsed: dest.gasUsed, + destinationGasPaidWei: dest.gasUsed * dest.effectiveGasPrice, + }); + const stored = await f.owner.agentic + .wallet(made.wallet) + .rules.get(made.rulesIds[0]); + if (stored.spent?.kind !== 'universal') + throw new Error('Missing universal spend'); + expect(stored.spent.assets[0].spent).toBe( + op.amount * BigInt(stage === 'first-use' ? 1 : 2) + ); + } finally { + stop(); + } + } + } finally { + f.teardown(); + } + }; + it('1. DEXES Sepolia', () => run(...PRESET_ACCEPTANCE_CASES[0]), 600000); + it('2. DEXES Base Sepolia', () => run(...PRESET_ACCEPTANCE_CASES[1]), 600000); + it( + '3. DEXES Arbitrum Sepolia', + () => run(...PRESET_ACCEPTANCE_CASES[2]), + 600000 + ); + it('4. LENDING Sepolia', () => run(...PRESET_ACCEPTANCE_CASES[3]), 600000); + it( + '5. LENDING Base Sepolia', + () => run(...PRESET_ACCEPTANCE_CASES[4]), + 600000 + ); + it( + '6. LENDING Arbitrum Sepolia', + () => run(...PRESET_ACCEPTANCE_CASES[5]), + 600000 + ); +}); diff --git a/packages/core/__e2e__/agw/responses-hooks.spec.ts b/packages/core/__e2e__/agw/responses-hooks.spec.ts new file mode 100644 index 00000000..683e70af --- /dev/null +++ b/packages/core/__e2e__/agw/responses-hooks.spec.ts @@ -0,0 +1,78 @@ +/** + * Scenario 10 — init-time and per-call hooks through wait without + * duplicates, and AGW `from` / signer `origin` on live and replayed + * responses. + */ +import { getAddress, parseEther, type Address } from 'viem'; +import type { ProgressEvent } from '../../src/lib/progress-hook/progress-hook.types'; +import { + AGW_E2E_ENABLED, + inSeconds, + setupAgw, + type AgwFixture, +} from './_fixture'; +const d = AGW_E2E_ENABLED ? describe : describe.skip; +const SINK = getAddress('0x000000000000000000000000000000000000dEaD'); +d('agw responses', () => { + let f: AgwFixture; + let wallet: Address; + beforeAll(async () => { + f = await setupAgw(); + const created = await f.owner.agentic.create('e2e-hooks', { + rules: [ + { + agent: f.agentAddress, + validUntil: inSeconds(3600), + allowedCalls: [ + { + target: SINK, + selector: 'value-only', + maxValue: BigInt(10), + }, + ], + }, + ], + }); + wallet = created.wallet; + await f.fundPC(wallet, parseEther('0.001')); + }, 300000); + afterAll(() => f?.teardown()); + it('1. init and per-call hooks each see every event once, through wait', async () => { + const init: ProgressEvent[] = []; + const perCall: ProgressEvent[] = []; + const agent = await f.agent(wallet, (e) => init.push(e as ProgressEvent)); + const tx = await agent.universal.sendTransaction( + { to: SINK, value: BigInt(1) }, + { progressHook: (e) => perCall.push(e) } + ); + await tx.wait(); + const ids = (xs: ProgressEvent[]) => xs.map((e) => e.id); + expect(ids(perCall)).toEqual(ids(init)); + expect( + new Set(ids(perCall).filter((i) => i.startsWith('AGENTIC-TX'))).size + ).toBe(ids(perCall).filter((i) => i.startsWith('AGENTIC-TX')).length); + expect(ids(perCall)).toEqual( + expect.arrayContaining([ + 'AGENTIC-TX-107', + 'AGENTIC-TX-199-01', + 'SEND-TX-199-01', + ]) + ); + expect(ids(perCall)).not.toContain('AGENTIC-TX-103'); + }); + it('2. live and replayed responses agree on wallet from and signer origin', async () => { + const agent = await f.agent(wallet); + const tx = await agent.universal.sendTransaction({ + to: SINK, + value: BigInt(1), + }); + await tx.wait(); + const replay = await f.owner.universal.trackTransaction(tx.hash); + expect(replay.from).toBe(tx.from); + expect(replay.from).toBe(wallet); + expect(replay.origin).toBe(tx.origin); + expect(replay.to).toBe(SINK); + expect((await replay.wait()).from).toBe(wallet); + f.evidence('replay-identity', { wallet, tx: tx.hash }); + }); +}); diff --git a/packages/core/__e2e__/agw/svm-agent-spl.spec.ts b/packages/core/__e2e__/agw/svm-agent-spl.spec.ts new file mode 100644 index 00000000..a63b2f60 --- /dev/null +++ b/packages/core/__e2e__/agw/svm-agent-spl.spec.ts @@ -0,0 +1,307 @@ +/** Public agent SPL delivery, wallet ATA pin and amount enforcement on devnet. + * Uses the verified test_counter.receive_spl harness; no third-party protocol + * support is implied. Two sends exercise omitted gas on first/subsequent use. + */ +import '@e2e/shared/setup'; +import { Keypair, PublicKey } from '@solana/web3.js'; +import bs58 from 'bs58'; +import type { Idl } from '@coral-xyz/anchor'; +import { encodeFunctionData, erc20Abi, numberToHex, parseEther } from 'viem'; +import { PushChain, CHAIN } from '../../src'; +import { MOVEABLE_TOKEN_CONSTANTS } from '../../src/lib/constants/tokens'; +import { getPRC20Address } from '../../src/lib/universal/prc20-address'; +import { deriveAgwSvmCea } from '../../src/lib/agentic/codec/svm-accounts'; +import { AGW_E2E_ENABLED, setupAgw, inSeconds } from './_fixture'; +import { + inspectSvmWirePrograms, + svmWireConnection, + SVM_WIRE_CHAIN, + SVM_WIRE_GATEWAY, + SVM_WIRE_PROGRAM, + SVM_WIRE_COUNTER, +} from '../shared/agw-svm-preflight'; +import { observeAgwGas, recordAgwPushGas } from '../shared/agw-gas-evidence'; +import counterIdl from '../../src/lib/orchestrator/svm-idl/__fixtures__/test_counter.idl.json'; +const d = AGW_E2E_ENABLED ? describe : describe.skip; +const SPL = new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'); +const ATA = new PublicKey('ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'); +const amount = BigInt(1000); +const hex = (key: PublicKey | string) => + `0x${new PublicKey(key).toBuffer().toString('hex')}`; +const ataFor = (owner: PublicKey, mint: PublicKey) => + PublicKey.findProgramAddressSync( + [owner.toBuffer(), SPL.toBuffer(), mint.toBuffer()], + ATA + )[0]; + +d('agw public agent spl', () => { + it('1. exact wallet ATA and amount constraints survive create and two omitted-gas deliveries', async () => { + const sol = svmWireConnection(); + await inspectSvmWirePrograms(sol); + const raw = process.env['SOLANA_PRIVATE_KEY']; + if (!raw) + throw new Error('SOLANA_PRIVATE_KEY is required for the owned recipient'); + let recipient: PublicKey; + try { + recipient = Keypair.fromSecretKey(bs58.decode(raw)).publicKey; + } catch { + recipient = Keypair.fromSecretKey( + Uint8Array.from(JSON.parse(raw)) + ).publicKey; + } + const asset = MOVEABLE_TOKEN_CONSTANTS.SOLANA_DEVNET.USDT; + const mint = new PublicKey(asset.address), + recipientATA = ataFor(recipient, mint); + const info = await sol.getAccountInfo(recipientATA); + if (!info || !info.owner.equals(SPL)) + throw new Error( + 'SPL_PREREQUISITE: owned recipient needs an existing standard USDT ATA' + ); + const f = await setupAgw(); + try { + const mapped = getPRC20Address({ + chain: SVM_WIRE_CHAIN, + address: asset.address, + }); + if ( + (await f.push.readContract({ + address: mapped.address, + abi: erc20Abi, + functionName: 'balanceOf', + args: [f.ownerAddress], + })) < + amount * BigInt(2) + ) + throw new Error('SPL_PREREQUISITE: owner lacks bounded USDT PRC20'); + const rule = { + agent: f.agentAddress, + chainNamespace: SVM_WIRE_CHAIN, + validUntil: inSeconds(3600), + assets: [ + { + token: asset.address, + maxPerCall: amount, + maxTotal: amount * BigInt(2), + }, + ], + maxGasPerCall: parseEther('20'), + allowedCalls: [ + { + target: SVM_WIRE_PROGRAM, + selector: 'receive_spl(u64)' as const, + pins: [ + { account: 0, expected: SVM_WIRE_COUNTER.toBase58() }, + { + account: 1, + expected: 'agentic:wallet' as const, + token: asset.address, + }, + { account: 2, expected: recipientATA.toBase58() }, + { account: 3, expected: 'agentic:wallet' as const }, + { account: 4, expected: SPL.toBase58() }, + { arg: 0, max: amount }, + ], + }, + ], + }; + const made = await f.owner.agentic.create('agent-spl-acceptance', { + rules: [rule], + }); + const cea = new PublicKey( + Buffer.from( + deriveAgwSvmCea( + made.wallet, + `0x${new PublicKey(SVM_WIRE_GATEWAY).toBuffer().toString('hex')}` + ).address.slice(2), + 'hex' + ) + ); + const ceaATA = ataFor(cea, mint); + const record = await f.owner.agentic + .wallet(made.wallet) + .rules.get(made.rulesIds[0]); + if (!('dataPins' in record.rule)) + throw new Error('Expected a decoded Solana rule'); + expect(record.rule).toMatchObject({ + format: 'decoded', + expectedCEA: hex(cea), + maxGasPerCall: parseEther('20'), + assets: [ + { + token: hex(mint), + maxPerCall: amount, + maxTotal: amount * BigInt(2), + }, + ], + }); + // Every authored pin survives exactly; none is dropped or widened. + expect(record.rule.ceaAccounts).toEqual([hex(cea), hex(ceaATA)]); + expect(record.rule.programs).toEqual([ + { + program: hex(SVM_WIRE_PROGRAM), + discriminator: '0xb654fa2e8aa449c4', + discriminatorLen: 8, + dataless: false, + maxAccounts: 255, + }, + ]); + expect(record.rule.pins).toEqual( + [SVM_WIRE_COUNTER, ceaATA, recipientATA, cea, SPL].map((key, i) => ({ + ruleIndex: 0, + accountIndex: i, + expected: hex(key), + })) + ); + expect(record.rule.dataPins).toEqual([ + { + ruleIndex: 0, + fromEnd: false, + offset: 8, + offsetB: 0, + len: 8, + mode: 2, + expected: numberToHex(amount, { size: 32 }), + num: BigInt(0), + den: BigInt(0), + }, + ]); + await f.fundPC(made.wallet, parseEther('41')); + await ( + await f.owner.universal.sendTransaction({ + to: mapped.address, + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [made.wallet, amount * BigInt(2)], + }), + }) + ).wait(); + const agent = await f.agent(made.wallet); + const idl = JSON.parse(JSON.stringify(counterIdl)) as Idl; + const instruction = idl.instructions.find( + (i) => i.name === 'receive_spl' + )!; + Object.assign(instruction.accounts.find((a) => a.name === 'cea_ata')!, { + address: ceaATA.toBase58(), + }); + Object.assign( + instruction.accounts.find((a) => a.name === 'recipient_ata')!, + { address: recipientATA.toBase58() } + ); + const encoded = (n: bigint, source = idl) => + PushChain.utils.helpers.encodeTxData({ + abi: source, + functionName: 'receive_spl', + args: [n], + }); + const send = (n: bigint, source = idl, burnAmount = n) => + agent.universal.sendTransaction({ + to: { chain: CHAIN.SOLANA_DEVNET, address: SVM_WIRE_PROGRAM }, + data: encoded(n, source), + funds: { token: asset, amount: burnAmount }, + }); + const startNonce = await f.push.getTransactionCount({ + address: f.agentAddress, + }); + await expect( + send(amount + BigInt(1), idl, BigInt(1)) + ).rejects.toMatchObject({ + name: 'AgenticRevertError', + decodedError: { name: 'PolicyCheckReverted(SvmDataCeilingExceeded)' }, + }); + const wrong = JSON.parse(JSON.stringify(idl)) as Idl; + Object.assign( + wrong.instructions + .find((i) => i.name === 'receive_spl')! + .accounts.find((a) => a.name === 'cea_ata')!, + { address: recipientATA.toBase58() } + ); + await expect(send(BigInt(1), wrong)).rejects.toMatchObject({ + name: 'AgenticRevertError', + decodedError: { name: 'PolicyCheckReverted(SvmAccountPinMismatch)' }, + }); + // Funds may only reach the pinned recipient account. + const misdirected = JSON.parse(JSON.stringify(idl)) as Idl; + Object.assign( + misdirected.instructions + .find((i) => i.name === 'receive_spl')! + .accounts.find((a) => a.name === 'recipient_ata')!, + { + address: ataFor( + new PublicKey('11111111111111111111111111111112'), + mint + ).toBase58(), + } + ); + await expect(send(BigInt(1), misdirected)).rejects.toMatchObject({ + name: 'AgenticRevertError', + decodedError: { name: 'PolicyCheckReverted(SvmAccountPinMismatch)' }, + }); + expect( + await f.push.getTransactionCount({ address: f.agentAddress }) + ).toBe(startNonce); + for (const stage of ['first-use', 'subsequent']) { + const balance = BigInt( + (await sol.getTokenAccountBalance(recipientATA)).value.amount + ); + const stop = observeAgwGas(agent, f, `agent-spl:${stage}`); + try { + const tx = await send(amount); + f.evidence('agent-spl-submitted', { + stage, + wallet: made.wallet, + cea: cea.toBase58(), + ceaATA: ceaATA.toBase58(), + hash: tx.hash, + }); + const result = await tx.wait({ outboundTimeoutMs: 180000 }); + expect(result.externalStatus).toBe('success'); + expect( + BigInt( + (await sol.getTokenAccountBalance(recipientATA)).value.amount + ) + ).toBe(balance + amount); + const parsed = await sol.getParsedTransaction( + result.externalTxHash!, + { commitment: 'confirmed', maxSupportedTransactionVersion: 0 } + ); + expect(parsed?.meta?.err).toBeNull(); + expect( + parsed?.meta?.innerInstructions?.some((g) => + g.instructions.some( + (ix) => + 'parsed' in ix && + ix.program === 'spl-token' && + ['transfer', 'transferChecked'].includes(ix.parsed.type) && + ix.parsed.info.source === ceaATA.toBase58() && + ix.parsed.info.destination === recipientATA.toBase58() && + BigInt( + ix.parsed.info.amount ?? ix.parsed.info.tokenAmount?.amount + ) === amount + ) + ) + ).toBe(true); + await recordAgwPushGas(f, tx.hash, `agent-spl:${stage}`); + f.evidence('agent-spl-delivered', { + stage, + wallet: made.wallet, + hash: tx.hash, + destinationHash: result.externalTxHash, + destinationFeeLamports: parsed?.meta?.fee, + computeUnitsConsumed: parsed?.meta?.computeUnitsConsumed, + }); + } finally { + stop(); + } + } + const updated = await f.owner.agentic + .wallet(made.wallet) + .rules.get(made.rulesIds[0]); + if (updated.spent?.kind !== 'universal') + throw new Error('Expected per-asset spend'); + expect(updated.spent.assets[0].spent).toBe(amount * BigInt(2)); + } finally { + f.teardown(); + } + }, 600000); +}); diff --git a/packages/core/__e2e__/agw/svm-memo-live.spec.ts b/packages/core/__e2e__/agw/svm-memo-live.spec.ts new file mode 100644 index 00000000..2acc8b72 --- /dev/null +++ b/packages/core/__e2e__/agw/svm-memo-live.spec.ts @@ -0,0 +1,182 @@ +/** A second Solana program through the public API: SPL Memo v2 (non-Anchor). + * The owner door proves the gateway CPI with the wallet CEA as the signer; the + * agent door proves a rule with a raw 8-byte data prefix plus a CEA account pin + * is accepted, and that a different prefix is refused before broadcast. + */ +import '@e2e/shared/setup'; +import { Connection, PublicKey } from '@solana/web3.js'; +import { erc20Abi, parseEther, toHex, type Hex } from 'viem'; +import { PushChain, CHAIN } from '../../src'; +import { deriveAgwSvmCea } from '../../src/lib/agentic/codec/svm-accounts'; +import { getNativePRC20ForChain } from '../../src/lib/orchestrator/internals/helpers'; +import { AGW_E2E_ENABLED, evmClient, inSeconds, setupAgw } from './_fixture'; +import { SVM_WIRE_GATEWAY } from '../shared/agw-svm-preflight'; + +const d = AGW_E2E_ENABLED ? describe : describe.skip; +const MEMO = 'MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr'; +// The rule matches this 8-byte prefix; Memo accepts any UTF-8 after it. +const PREFIX = 'PUSHAGW:'; +const OTHER = 'OTHERPFX'; +const bytes = (s: string) => Array.from(Buffer.from(s, 'utf8')); +// Memo has no Anchor IDL; this one only lets the SDK place the CEA signer. +PushChain.utils.svm.registerIdl({ + address: MEMO, + metadata: { name: 'spl_memo', version: '2.0.0', spec: '0.1.0' }, + instructions: [PREFIX, OTHER].map((p) => ({ + name: p === PREFIX ? 'memo' : 'other', + discriminator: bytes(p), + accounts: [{ name: 'cea_authority', signer: true }], + args: [], + })), +}); + +d('agw svm memo', () => { + async function expectMemo(sig: string, text: string, cea: string) { + const sol = new Connection('https://api.devnet.solana.com', 'confirmed'); + let tx = await sol.getParsedTransaction(sig, { + commitment: 'confirmed', + maxSupportedTransactionVersion: 0, + }); + for (let retry = 0; !tx && retry < 5; retry++) { + await new Promise((resolve) => setTimeout(resolve, 2000)); + tx = await sol.getParsedTransaction(sig, { + commitment: 'confirmed', + maxSupportedTransactionVersion: 0, + }); + } + expect(tx?.meta?.err).toBeNull(); + const memo = (tx?.meta?.innerInstructions ?? []) + .flatMap((g) => g.instructions) + .find((ix) => ix.programId.toBase58() === MEMO); + expect(memo && 'parsed' in memo ? memo.parsed : undefined).toBe(text); + expect(tx?.meta?.logMessages?.join('\n')).toContain(`Signed by ${cea}`); + } + + it('1. owner door: the gateway runs Memo with the wallet CEA as signer', async () => { + const f = await setupAgw({ deferAgentFunding: true }); + try { + const made = await f.owner.agentic.create('svm-memo-owner', { + rules: [], + }); + await f.fundPC(made.wallet, parseEther('21')); + const owner = await evmClient( + process.env['PUSH_PRIVATE_KEY'] as Hex, + CHAIN.PUSH_TESTNET_DONUT, + f.manifest.network, + made.wallet + ); + const cea = new PublicKey( + Buffer.from( + deriveAgwSvmCea( + made.wallet, + `0x${new PublicKey(SVM_WIRE_GATEWAY).toBuffer().toString('hex')}` + ).address.slice(2), + 'hex' + ) + ).toBase58(); + const text = `${PREFIX}owner ${Date.now()}`; + const tx = await owner.universal.sendTransaction({ + to: { chain: CHAIN.SOLANA_DEVNET, address: MEMO }, + data: toHex(text), + }); + f.evidence('svm-memo-owner-submitted', { + wallet: made.wallet, + hash: tx.hash, + }); + const receipt = await tx.wait({ outboundTimeoutMs: 180000 }); + expect(receipt.externalStatus).toBe('success'); + await expectMemo(receipt.externalTxHash!, text, cea); + f.evidence('svm-memo-owner-delivered', { + hash: tx.hash, + destinationHash: receipt.externalTxHash, + }); + } finally { + f.teardown(); + } + }, 600000); + + it('2. agent door: a raw-prefix rule with a CEA pin runs, another prefix is refused', async () => { + const f = await setupAgw({ deferAgentFunding: true }); + try { + const made = await f.owner.agentic.create('svm-memo-agent', { + rules: [ + { + agent: f.agentAddress, + chainNamespace: CHAIN.SOLANA_DEVNET, + validUntil: inSeconds(3600), + assets: [], + maxGasPerCall: parseEther('20'), + allowedCalls: [ + { + target: MEMO, + selector: toHex(PREFIX) as `0x${string}`, + pins: [{ account: 0, expected: 'agentic:wallet' as const }], + }, + ], + }, + ], + }); + await f.fundPC(made.wallet, parseEther('21')); + await f.fundAgent(); + const agent = await f.agent(made.wallet); + const cea = new PublicKey( + Buffer.from( + deriveAgwSvmCea( + made.wallet, + `0x${new PublicKey(SVM_WIRE_GATEWAY).toBuffer().toString('hex')}` + ).address.slice(2), + 'hex' + ) + ).toBase58(); + const startNonce = await f.push.getTransactionCount({ + address: f.agentAddress, + }); + await expect( + agent.universal.sendTransaction({ + to: { chain: CHAIN.SOLANA_DEVNET, address: MEMO }, + data: toHex(`${OTHER}not allowed`), + }) + ).rejects.toMatchObject({ name: 'AgenticRevertError' }); + expect( + await f.push.getTransactionCount({ address: f.agentAddress }) + ).toBe(startNonce); + const text = `${PREFIX}agent ${Date.now()}`; + const tx = await agent.universal.sendTransaction({ + to: { chain: CHAIN.SOLANA_DEVNET, address: MEMO }, + data: toHex(text), + }); + f.evidence('svm-memo-agent-submitted', { + wallet: made.wallet, + hash: tx.hash, + }); + const receipt = await tx.wait({ outboundTimeoutMs: 180000 }); + expect(receipt.externalStatus).toBe('success'); + await expectMemo(receipt.externalTxHash!, text, cea); + // A zero-amount send names the zero-cap gas token and spends nothing. + const stored = await f.owner.agentic + .wallet(made.wallet) + .rules.get(made.rulesIds[0]); + if (stored.spent?.kind !== 'universal') throw new Error('Missing spend'); + expect(stored.spent.assets.every((a) => a.spent === BigInt(0))).toBe( + true + ); + expect( + await f.push.readContract({ + address: getNativePRC20ForChain( + CHAIN.SOLANA_DEVNET, + f.manifest.network + ), + abi: erc20Abi, + functionName: 'balanceOf', + args: [made.wallet], + }) + ).toBe(BigInt(0)); + f.evidence('svm-memo-agent-delivered', { + hash: tx.hash, + destinationHash: receipt.externalTxHash, + }); + } finally { + f.teardown(); + } + }, 600000); +}); diff --git a/packages/core/__e2e__/agw/svm-public.spec.ts b/packages/core/__e2e__/agw/svm-public.spec.ts new file mode 100644 index 00000000..d548b8fe --- /dev/null +++ b/packages/core/__e2e__/agw/svm-public.spec.ts @@ -0,0 +1,408 @@ +import { actionId, configId } from '../../src/lib/agentic/codec/ids'; +/** Public numeric-pin lifecycle and destination delivery on Donut/Solana devnet. */ +import '@e2e/shared/setup'; +import { PushChain, type Rule } from '../../src'; +import type { Idl } from '@coral-xyz/anchor'; +import { PublicKey, Keypair } from '@solana/web3.js'; +import bs58 from 'bs58'; +import { + createPublicClient, + http, + erc20Abi, + encodeFunctionData, + parseAbi, + parseEther, + zeroAddress, + type Address, + type Hex, +} from 'viem'; +import { privateKeyToAccount } from 'viem/accounts'; +import { CHAIN, PUSH_NETWORK } from '../../src/lib/constants/enums'; +import { CHAIN_INFO, getPushViemChain } from '../../src/lib/constants/chain'; +import counterIdl from '../../src/lib/orchestrator/svm-idl/__fixtures__/test_counter.idl.json'; +import { v6 } from '../../src/lib/agentic/contracts/v6'; +import { setupAgw, evmClient, inSeconds, type AgwFixture } from './_fixture'; +import { loadAgwManifest, verifyAgwManifest } from './_manifest'; +import { + inspectSvmWirePrograms, + svmWireConnection, + SVM_WIRE_CHAIN, + SVM_WIRE_PROGRAM, + SVM_WIRE_COUNTER, +} from '../shared/agw-svm-preflight'; + +const d = process.env['AGW_E2E'] === '1' ? describe : describe.skip; +const amount = BigInt(10_000), + pc = parseEther('41'); +d('agw public svm', () => { + let f: AgwFixture, + wallet: Address, + id: Hex, + token: Address, + agent: PushChain, + recipient: PublicKey, + cea: PublicKey, + idl: Idl; + const sol = svmWireConnection(); + const rule = (): Rule => ({ + agent: f.agentAddress, + chainNamespace: SVM_WIRE_CHAIN, + validUntil: inSeconds(3600), + assets: [{ token: zeroAddress, maxPerCall: amount, maxTotal: amount }], + maxGasPerCall: parseEther('20'), + allowedCalls: [ + { + target: SVM_WIRE_PROGRAM, + selector: 'receive_sol(u64)', + pins: [ + { account: 0, expected: SVM_WIRE_COUNTER.toBase58() }, + { account: 1, expected: recipient.toBase58() }, + { account: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }, + { account: 3, expected: PublicKey.default.toBase58() }, + { arg: 0, max: amount }, + ], + }, + ], + }); + const data = (value = amount, source = idl) => + PushChain.utils.helpers.encodeTxData({ + abi: source, + functionName: 'receive_sol', + args: [value], + }); + beforeAll(async () => { + await inspectSvmWirePrograms(sol); + const manifest = loadAgwManifest(); + if (manifest.network !== PUSH_NETWORK.TESTNET_DONUT) + throw new Error('Public SVM fixture requires Donut'); + if ( + parseEther(process.env['AGW_E2E_AGENT_PC'] ?? '0.5') > parseEther('0.5') + ) + throw new Error('Agent funding exceeds fixture budget'); + const key = process.env['SOLANA_PRIVATE_KEY']; + if (!key) throw new Error('Missing recipient identity'); + try { + recipient = Keypair.fromSecretKey(bs58.decode(key)).publicKey; + } catch { + recipient = Keypair.fromSecretKey( + Uint8Array.from(JSON.parse(key)) + ).publicKey; + } + const recipientInfo = await sol.getAccountInfo(recipient); + if ( + !recipientInfo || + recipientInfo.executable || + !recipientInfo.owner.equals(PublicKey.default) + ) + throw new Error('Owned recipient must be an existing System account'); + const push = createPublicClient({ + chain: getPushViemChain(CHAIN.PUSH_TESTNET_DONUT), + transport: http(CHAIN_INFO[CHAIN.PUSH_TESTNET_DONUT].defaultRPC[0]), + }); + await verifyAgwManifest(push, manifest); + const ownerKey = process.env['PUSH_PRIVATE_KEY'] as Hex; + if (!ownerKey) throw new Error('Missing owner'); + const ownerAddress = privateKeyToAccount(ownerKey).address; + token = await push.readContract({ + address: '0x00000000000000000000000000000000000000C0', + abi: parseAbi([ + 'function gasTokenPRC20ByChainNamespace(string) view returns (address)', + ]), + functionName: 'gasTokenPRC20ByChainNamespace', + args: [SVM_WIRE_CHAIN], + }); + if ( + (await push.getBalance({ address: ownerAddress })) < + pc + parseEther('2') || + (await push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [ownerAddress], + })) < + amount * BigInt(2) + BigInt(1) + ) + throw new Error('Insufficient bounded fixture funds'); + idl = JSON.parse(JSON.stringify(counterIdl)) as Idl; + const receive = idl.instructions.find((i) => i.name === 'receive_sol')!; + const destination = receive.accounts.find((a) => a.name === 'recipient')!; + Object.assign(destination, { address: recipient.toBase58() }); + f = await setupAgw(); + const made = await f.owner.agentic.create('public-idl-svm', { + rules: [rule()], + }); + wallet = made.wallet; + id = made.rulesIds[0]; + const record = await f.owner.agentic.wallet(wallet).rules.get(id); + if (!('expectedCEA' in record.rule)) + throw new Error('Missing decoded destination account'); + cea = new PublicKey(Buffer.from(record.rule.expectedCEA.slice(2), 'hex')); + await f.fundPC(wallet, pc); + await ( + await f.owner.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [wallet, amount * BigInt(2)], + }), + }) + ).wait(); + expect( + await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'allowance', + args: [wallet, manifest.addresses.gateway], + }) + ).toBe(BigInt(0)); + agent = await f.agent(wallet); + f.evidence('public-svm-setup', { + wallet, + id, + grantHash: made.tx.hash, + cea: cea.toBase58(), + recipient: recipient.toBase58(), + }); + }, 900_000); + afterAll(() => f?.teardown()); + it('1. numeric-pin grant reads exact raw constraints and replaces atomically', async () => { + const handle = f.owner.agentic.wallet(wallet), + record = await handle.rules.get(id); + expect(record).not.toHaveProperty('ref'); + expect(record.rule).toMatchObject({ + format: 'decoded', + dataPins: [{ offset: 8, len: 8, mode: 2 }], + }); + const count = (await handle.checkpoints()).checkpoints.length; + const updated = await handle.rules.update({ + rules: [ + { + rulesId: id, + rule: { ...record.rule, validUntil: record.validUntil + 60 }, + }, + ], + }); + const previous = id; + id = updated.rules[0].rulesId; + await expect(handle.rules.get(previous)).rejects.toMatchObject({ + code: 'RULE_NOT_FOUND', + }); + expect((await handle.checkpoints()).checkpoints.length).toBe(count + 5); + f.evidence('public-svm-replacement', { + wallet, + id, + txHash: updated.tx.hash, + }); + }); + it('2. public send confirms actual CEA transfer and preserves replay identity', async () => { + const tx = await agent.universal.sendTransaction({ + to: { chain: SVM_WIRE_CHAIN, address: SVM_WIRE_PROGRAM }, + value: amount, + gasLimit: BigInt(0), + data: data(), + }); + f.evidence('public-svm-submitted', { wallet, id, hash: tx.hash }); + const receipt = await tx.wait({ outboundTimeoutMs: 600_000 }); + expect(receipt.externalStatus).toBe('success'); + expect(receipt.from).toBe(wallet); + const destination = await sol.getParsedTransaction( + receipt.externalTxHash!, + { commitment: 'confirmed', maxSupportedTransactionVersion: 0 } + ); + expect(destination?.meta?.err).toBeNull(); + expect( + destination?.meta?.innerInstructions?.some((g) => + g.instructions.some( + (ix) => + 'parsed' in ix && + ix.program === 'system' && + ix.parsed.type === 'transfer' && + ix.parsed.info.source === cea.toBase58() && + ix.parsed.info.destination === recipient.toBase58() && + BigInt(ix.parsed.info.lamports) === amount + ) + ) + ).toBe(true); + const replay = await f.owner.universal.trackTransaction(tx.hash); + expect(replay.from).toBe(wallet); + expect(replay.agentic?.destinationInstruction).toEqual( + tx.agentic?.destinationInstruction + ); + expect( + (await replay.wait({ outboundTimeoutMs: 600_000 })).externalTxHash + ).toBe(receipt.externalTxHash); + f.evidence('public-svm-delivered', { + wallet, + hash: tx.hash, + destinationHash: receipt.externalTxHash, + instruction: tx.agentic?.destinationInstruction, + }); + }, 900_000); + it('3. contract simulation maps account and data refusals without state changes', async () => { + const config = configId( + wallet, + id, + actionId(f.manifest.addresses.gateway, '0x77b86bec') + ); + const state = async () => { + const [tokens, pcBalance, checkpoints, cfg] = await Promise.all([ + f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [wallet], + }), + f.push.getBalance({ address: wallet }), + f.push.readContract({ + address: wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }), + f.push.readContract({ + address: f.manifest.addresses.rulesPolicy, + abi: v6.abis.policy, + functionName: 'getSvmConfig', + args: [config, wallet], + }), + ]); + return { + tokens, + pcBalance, + checkpoints, + spent: cfg.assets.map((a) => a.spent), + }; + }; + const before = await state(); + const nonce = await f.push.getTransactionCount({ address: f.agentAddress }); + const wrong = JSON.parse(JSON.stringify(idl)) as Idl; + Object.assign( + wrong.instructions + .find((i) => i.name === 'receive_sol')! + .accounts.find((a) => a.name === 'recipient')!, + { address: PublicKey.default.toBase58() } + ); + await expect( + agent.universal.sendTransaction({ + to: { chain: SVM_WIRE_CHAIN, address: SVM_WIRE_PROGRAM }, + gasLimit: BigInt(0), + data: data(BigInt(1), wrong), + }) + ).rejects.toMatchObject({ + name: 'AgenticRevertError', + decodedError: { name: 'PolicyCheckReverted(SvmAccountPinMismatch)' }, + }); + await expect( + agent.universal.sendTransaction({ + to: { chain: SVM_WIRE_CHAIN, address: SVM_WIRE_PROGRAM }, + gasLimit: BigInt(0), + data: data(amount + BigInt(1)), + }) + ).rejects.toMatchObject({ + name: 'AgenticRevertError', + decodedError: { name: 'PolicyCheckReverted(SvmDataCeilingExceeded)' }, + }); + expect(await f.push.getTransactionCount({ address: f.agentAddress })).toBe( + nonce + ); + expect(await state()).toEqual(before); + f.evidence('public-svm-contract-refusals', { + wallet, + id, + agentNonce: nonce, + state: before, + }); + }); + it('4. public revoke removes the Solana rule and subsequent sends are refused', async () => { + const handle = f.owner.agentic.wallet(wallet); + await (await handle.rules.delete([id])).wait(); + expect((await handle.rules.list()).rules).toHaveLength(0); + await expect( + agent.universal.sendTransaction({ + to: { chain: SVM_WIRE_CHAIN, address: SVM_WIRE_PROGRAM }, + data: data(), + }) + ).rejects.toMatchObject({ code: 'NO_RULES_FOR_CHAIN' }); + }); + it('5. owner funds-only transfer reaches the recipient and replays with the same amount', async () => { + const ownerKey = process.env['PUSH_PRIVATE_KEY'] as Hex; + const sender = await evmClient( + ownerKey, + CHAIN.PUSH_TESTNET_DONUT, + f.manifest.network, + wallet + ); + const before = await sol.getBalance(recipient); + const balance = await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [wallet], + }); + const tx = await sender.universal.sendTransaction({ + to: { chain: SVM_WIRE_CHAIN, address: recipient.toBase58() }, + value: amount, + gasLimit: BigInt(0), + }); + f.evidence('public-svm-owner-transfer-submitted', { + wallet, + hash: tx.hash, + }); + expect(tx.agentic?.door).toBe('owner'); + expect(tx.agentic?.rulesId).toBeUndefined(); + expect(tx.agentic?.destinationInstruction).toBeUndefined(); + expect(tx.agentic?.destinationTransfer).toMatchObject({ token, amount }); + const receipt = await tx.wait({ outboundTimeoutMs: 600_000 }); + expect(receipt.externalStatus).toBe('success'); + expect(receipt.from).toBe(wallet); + expect(await sol.getBalance(recipient)).toBe(before + Number(amount)); + expect( + await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [wallet], + }) + ).toBe(balance - amount); + const replay = await f.owner.universal.trackTransaction(tx.hash); + expect(replay.to).toBe(tx.to); + expect(replay.data).toBe('0x'); + expect(replay.value).toBe(amount); + expect(replay.agentic?.destinationTransfer).toEqual( + tx.agentic?.destinationTransfer + ); + expect( + (await replay.wait({ outboundTimeoutMs: 600_000 })).externalTxHash + ).toBe(receipt.externalTxHash); + f.evidence('public-svm-owner-transfer-delivered', { + wallet, + hash: tx.hash, + destinationHash: receipt.externalTxHash, + recipient: recipient.toBase58(), + amount, + }); + }, 900_000); + it('6. agents still require an instruction and owner allowance failures do not sign', async () => { + const agentNonce = await f.push.getTransactionCount({ + address: f.agentAddress, + }); + await expect( + agent.universal.sendTransaction({ + to: { chain: SVM_WIRE_CHAIN, address: recipient.toBase58() }, + value: amount, + }) + ).rejects.toMatchObject({ code: 'INVALID_RULE' }); + expect(await f.push.getTransactionCount({ address: f.agentAddress })).toBe( + agentNonce + ); + // The owner path no longer requires a standing gateway allowance in v6. + expect( + await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'allowance', + args: [wallet, f.manifest.addresses.gateway], + }) + ).toBe(BigInt(0)); + }); +}); diff --git a/packages/core/__e2e__/agw/svm-spl-transfer.spec.ts b/packages/core/__e2e__/agw/svm-spl-transfer.spec.ts new file mode 100644 index 00000000..cb66a938 --- /dev/null +++ b/packages/core/__e2e__/agw/svm-spl-transfer.spec.ts @@ -0,0 +1,222 @@ +/** Funds-only SPL delivery through the public AGW owner path on Donut/devnet. */ +import '@e2e/shared/setup'; +import { Keypair, PublicKey } from '@solana/web3.js'; +import bs58 from 'bs58'; +import { encodeFunctionData, erc20Abi, parseEther, type Hex } from 'viem'; +import { CHAIN, PUSH_NETWORK } from '../../src/lib/constants/enums'; +import { MOVEABLE_TOKEN_CONSTANTS } from '../../src/lib/constants/tokens'; +import { getPRC20Address } from '../../src/lib/universal/prc20-address'; +import { v6 } from '../../src/lib/agentic/contracts/v6'; +import { + AGW_E2E_ENABLED, + evmClient, + setupAgw, + type AgwFixture, +} from './_fixture'; +import { loadAgwManifest } from './_manifest'; +import { + inspectSvmWirePrograms, + svmWireConnection, +} from '@e2e/shared/agw-svm-preflight'; + +const d = AGW_E2E_ENABLED ? describe : describe.skip; +const TOKEN_PROGRAM = new PublicKey( + 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' +); +const ATA_PROGRAM = new PublicKey( + 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' +); +const amount = BigInt(1000); // 0.001 USDT; fixture funding is bounded to this. + +d('agw svm spl transfer', () => { + let f: AgwFixture; + beforeAll(async () => { + if (loadAgwManifest().network !== PUSH_NETWORK.TESTNET_DONUT) + throw new Error('SPL fixture requires Donut'); + await inspectSvmWirePrograms(svmWireConnection()); + f = await setupAgw(); + }, 300_000); + afterAll(() => f?.teardown()); + + it('1. owner funds-only SPL delivery credits the recipient ATA and preserves burn, allowance and replay', async () => { + const sol = svmWireConnection(), + raw = process.env['SOLANA_PRIVATE_KEY']; + if (!raw) throw new Error('SOLANA_PRIVATE_KEY is required'); + let kp: Keypair; + try { + kp = Keypair.fromSecretKey(bs58.decode(raw)); + } catch { + kp = Keypair.fromSecretKey(Uint8Array.from(JSON.parse(raw))); + } + const recipient = kp.publicKey, + asset = MOVEABLE_TOKEN_CONSTANTS.SOLANA_DEVNET.USDT; + const mint = new PublicKey(asset.address); + const mintInfo = await sol.getAccountInfo(mint); + if (!mintInfo?.owner.equals(TOKEN_PROGRAM)) + throw new Error('Fixture mint is not a standard SPL mint'); + const ata = PublicKey.findProgramAddressSync( + [recipient.toBuffer(), TOKEN_PROGRAM.toBuffer(), mint.toBuffer()], + ATA_PROGRAM + )[0]; + const recipientBalance = async () => { + const info = await sol.getAccountInfo(ata); + if (!info) return BigInt(0); + if (!info.owner.equals(TOKEN_PROGRAM)) + throw new Error('Recipient ATA has unexpected owner'); + return BigInt((await sol.getTokenAccountBalance(ata)).value.amount); + }; + const token = getPRC20Address( + { chain: CHAIN.SOLANA_DEVNET, address: asset.address }, + { network: f.manifest.network } + ).address; + if ( + (await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [f.ownerAddress], + })) < amount + ) + throw new Error('Insufficient mapped SPL fixture funds'); + if ( + (await f.push.getBalance({ address: f.ownerAddress })) < parseEther('22') + ) + throw new Error('Insufficient bounded PC fixture funds'); + const made = await f.owner.agentic.create('v5-spl-owner-transfer', { + rules: [], + }); + await f.fundPC(made.wallet, parseEther('21')); + await ( + await f.owner.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [made.wallet, amount], + }), + }) + ).wait(); + const owner = await evmClient( + process.env['PUSH_PRIVATE_KEY'] as Hex, + CHAIN.PUSH_TESTNET_DONUT, + f.manifest.network, + made.wallet + ); + expect( + await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'allowance', + args: [made.wallet, f.manifest.addresses.gateway], + }) + ).toBe(BigInt(0)); + const beforeRecipient = await recipientBalance(); + const beforeCheckpoints = await f.push.readContract({ + address: made.wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }); + const tx = await owner.universal.sendTransaction({ + to: { chain: CHAIN.SOLANA_DEVNET, address: recipient.toBase58() }, + funds: { token: asset, amount }, + gasLimit: BigInt(0), + }); + expect(tx.value).toBe(BigInt(0)); + expect(tx.agentic).toMatchObject({ + door: 'owner', + destinationTransfer: { + recipient: `0x${recipient.toBuffer().toString('hex')}`, + token, + amount, + }, + }); + expect(tx.agentic?.destinationInstruction).toBeUndefined(); + f.evidence('v5-spl-owner-submitted', { + wallet: made.wallet, + hash: tx.hash, + mint: mint.toBase58(), + recipient: recipient.toBase58(), + ata: ata.toBase58(), + amount, + }); + const receipt = await tx.wait({ outboundTimeoutMs: 600_000 }); + expect(receipt.externalStatus).toBe('success'); + expect(receipt.from).toBe(made.wallet); + expect(await recipientBalance()).toBe(beforeRecipient + amount); + expect( + await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [made.wallet], + }) + ).toBe(BigInt(0)); + expect( + await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'allowance', + args: [made.wallet, f.manifest.addresses.gateway], + }) + ).toBe(BigInt(0)); + expect( + await f.push.readContract({ + address: made.wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }) + ).toBe(beforeCheckpoints + BigInt(1)); + let external = await sol.getParsedTransaction(receipt.externalTxHash!, { + commitment: 'confirmed', + maxSupportedTransactionVersion: 0, + }); + for (let retry = 0; !external && retry < 5; retry++) { + await new Promise((resolve) => setTimeout(resolve, 2000)); + external = await sol.getParsedTransaction(receipt.externalTxHash!, { + commitment: 'confirmed', + maxSupportedTransactionVersion: 0, + }); + } + expect(external?.meta?.err).toBeNull(); + const accountIndex = external?.transaction.message.accountKeys.findIndex( + (entry) => entry.pubkey.equals(ata) + ); + expect(accountIndex).toBeGreaterThanOrEqual(0); + const prior = external?.meta?.preTokenBalances?.find( + (balance) => + balance.accountIndex === accountIndex && + balance.mint === mint.toBase58() + ); + const credited = external?.meta?.postTokenBalances?.find( + (balance) => + balance.accountIndex === accountIndex && + balance.mint === mint.toBase58() + ); + expect(credited?.owner).toBe(recipient.toBase58()); + expect( + BigInt(credited?.uiTokenAmount.amount ?? '0') - + BigInt(prior?.uiTokenAmount.amount ?? '0') + ).toBe(amount); + const replay = await f.owner.universal.trackTransaction(tx.hash); + expect(replay.from).toBe(made.wallet); + expect(replay.to).toBe(tx.to); + expect(replay.value).toBe(BigInt(0)); + expect(replay.agentic?.destinationTransfer).toEqual( + tx.agentic?.destinationTransfer + ); + expect( + (await replay.wait({ outboundTimeoutMs: 600_000 })).externalTxHash + ).toBe(receipt.externalTxHash); + f.evidence('v5-spl-owner-delivered', { + wallet: made.wallet, + hash: tx.hash, + destinationHash: receipt.externalTxHash, + mint: mint.toBase58(), + recipient: recipient.toBase58(), + ata: ata.toBase58(), + beforeRecipient, + afterRecipient: await recipientBalance(), + amount, + }); + }, 900_000); +}); diff --git a/packages/core/__e2e__/agw/tokens-only-live.spec.ts b/packages/core/__e2e__/agw/tokens-only-live.spec.ts new file mode 100644 index 00000000..386dcd3b --- /dev/null +++ b/packages/core/__e2e__/agw/tokens-only-live.spec.ts @@ -0,0 +1,220 @@ +/** Live tokens-only rules and MOVEABLE ALL (Harsh/Zaryab decisions, 2026-10-23). + * 1: a rule with Circle USDC and no app lets the agent transfer it back to the + * owner on Sepolia; another recipient is refused before broadcast. + * 2: ALL expands on create and reads back every routable token with defaults. + */ +import '@e2e/shared/setup'; +import { + createPublicClient, + http, + encodeFunctionData, + erc20Abi, + getAddress, + parseEther, + zeroAddress, + type Hex, +} from 'viem'; +import { CHAIN, PushChain } from '../../src'; +import { PUSH_NETWORK } from '../../src/lib/constants/enums'; +import { exactAgenticRoutes } from '../../src/lib/agentic/token-routes'; +import { AGW_E2E_ENABLED, inSeconds, setupAgw } from './_fixture'; + +const d = AGW_E2E_ENABLED ? describe : describe.skip; +const AMOUNT = BigInt(10_000); // 0.01 USDC +const SEPOLIA_RPC = 'https://ethereum-sepolia-rpc.publicnode.com'; +const OTHER = getAddress('0x000000000000000000000000000000000000dEaD'); + +d('agw tokens-only live', () => { + it('1. Sepolia Circle USDC goes back to the owner only', async () => { + const [route] = exactAgenticRoutes( + CHAIN.ETHEREUM_SEPOLIA, + PUSH_NETWORK.TESTNET_DONUT + ); + const rpc = createPublicClient({ + transport: http(SEPOLIA_RPC, { timeout: 15000, retryCount: 1 }), + }); + const f = await setupAgw({ deferAgentFunding: true }); + try { + if ( + (await f.push.readContract({ + address: route.prc20, + abi: erc20Abi, + functionName: 'balanceOf', + args: [f.ownerAddress], + })) < + AMOUNT * BigInt(2) + ) + throw new Error(`TOKENS_ONLY_PREREQUISITE: owner lacks ${route.prc20}`); + await f.fundAgent(); + const made = await f.owner.agentic.create('tokens-only', { + rules: [ + { + agent: f.agentAddress, + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, + validUntil: inSeconds(3600), + assets: [ + { + token: route.source, + maxPerCall: AMOUNT, + maxTotal: AMOUNT * BigInt(2), + }, + ], + maxGasPerCall: parseEther('20'), + }, + ], + }); + const record = await f.owner.agentic + .wallet(made.wallet) + .rules.get(made.rulesIds[0]); + if (!('allowedCalls' in record.rule)) + throw new Error('Expected an EVM rule'); + expect(record.rule.allowedCalls).toEqual([ + { + target: getAddress(route.source), + selector: '0xa9059cbb', + maxValue: BigInt(0), + pins: [ + { + arg: 0, + expected: `0x${f.ownerAddress + .slice(2) + .padStart(64, '0')}`.toLowerCase(), + }, + { arg: 1, max: AMOUNT }, + ], + }, + ]); + f.evidence('tokens-only-created', { + wallet: made.wallet, + hash: made.tx.hash, + }); + await f.fundPC(made.wallet, parseEther('25')); + await ( + await f.owner.universal.sendTransaction({ + to: route.prc20, + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [made.wallet, AMOUNT * BigInt(2)], + }), + }) + ).wait(); + const agent = await f.agent(made.wallet); + const send = (to: `0x${string}`) => + agent.universal.sendTransaction({ + to: { chain: CHAIN.ETHEREUM_SEPOLIA, address: route.source }, + funds: { + amount: AMOUNT, + token: { + symbol: route.symbol, + decimals: route.decimals, + address: route.source, + mechanism: 'approve', + }, + }, + data: [ + { + to: route.source, + value: BigInt(0), + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [to, AMOUNT], + }), + }, + ], + }); + // Refused by the policy simulation, so nothing is spent. + await expect(send(OTHER)).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(ArgPinMismatch)' }, + }); + const delivered = () => + rpc.readContract({ + address: route.source, + abi: erc20Abi, + functionName: 'balanceOf', + args: [f.ownerAddress], + }); + const before = await delivered(); + const tx = await send(f.ownerAddress); + f.evidence('tokens-only-submitted', { + wallet: made.wallet, + hash: tx.hash, + }); + const receipt = await tx.wait({ outboundTimeoutMs: 180000 }); + expect(receipt.externalStatus).toBe('success'); + const dest = await rpc.getTransactionReceipt({ + hash: receipt.externalTxHash as Hex, + }); + expect(dest.status).toBe('success'); + expect(await delivered()).toBe(before + AMOUNT); + const after = await f.owner.agentic + .wallet(made.wallet) + .rules.get(made.rulesIds[0]); + if (after.spent?.kind !== 'universal') + throw new Error('Missing universal spend'); + expect(after.spent.assets[0].spent).toBe(AMOUNT); + f.evidence('tokens-only-delivered', { + hash: tx.hash, + destinationHash: receipt.externalTxHash, + destinationGasUsed: dest.gasUsed, + }); + } finally { + f.teardown(); + } + }, 600000); + + it('2. ALL expands on create to every routable Sepolia token', async () => { + const f = await setupAgw({ deferAgentFunding: true }); + try { + const expected = PushChain.utils.agentic.assets.all( + CHAIN.ETHEREUM_SEPOLIA + ); + const made = await f.owner.agentic.create('all-tokens', { + rules: [ + { + agent: f.agentAddress, + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, + validUntil: inSeconds(3600), + assets: [ + { + token: PushChain.CONSTANTS.MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.ALL, + }, + ], + maxGasPerCall: parseEther('20'), + allowedCalls: [ + { + target: '0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14', + selector: 'deposit()', + maxValue: BigInt(1), + }, + ], + }, + ], + }); + const record = await f.owner.agentic + .wallet(made.wallet) + .rules.get(made.rulesIds[0]); + if (!('allowedCalls' in record.rule)) + throw new Error('Expected an EVM rule'); + expect(record.rule.assets).toEqual( + expected.map((a) => ({ + token: getAddress( + typeof a.token === 'string' ? a.token : a.token.address + ), + maxPerCall: a.maxPerCall, + maxTotal: a.maxTotal, + })) + ); + expect(record.rule.assets).toHaveLength(6); + expect(record.rule.assets![0].token).toBe(zeroAddress); + f.evidence('all-tokens-created', { + wallet: made.wallet, + hash: made.tx.hash, + assets: record.rule.assets, + }); + } finally { + f.teardown(); + } + }, 600000); +}); diff --git a/packages/core/__e2e__/agw/universal-evm.spec.ts b/packages/core/__e2e__/agw/universal-evm.spec.ts new file mode 100644 index 00000000..b2d7fd78 --- /dev/null +++ b/packages/core/__e2e__/agw/universal-evm.spec.ts @@ -0,0 +1,324 @@ +/** + * Scenarios 7 and 8 — positive-amount EVM universal execution from the + * wallet, and destination failure classification. + * + * Rules are created through the public v5 UniversalRule SDK path. Destination + * receipt/replay checks remain opt-in funded live tests. + * + * creditRevert accounting is inert on the current executor (gap G07): a + * destination revert after URP passed still counts the spend. + */ +import { + createPublicClient, + encodeFunctionData, + erc20Abi, + fallback, + http, + parseAbi, + parseEventLogs, + parseEther, + type Address, + type Hex, +} from 'viem'; +import { sepolia } from 'viem/chains'; +import type { Rule } from '../../src'; +import { CHAIN } from '../../src/lib/constants/enums'; +import { CHAIN_INFO } from '../../src/lib/constants/chain'; +import { MOVEABLE_TOKEN_CONSTANTS } from '../../src/lib/constants/tokens'; +import { getCEAAddress } from '../../src/lib/orchestrator/cea-utils'; +import { getNativePRC20ForChain } from '../../src/lib/orchestrator/internals/helpers'; +import { v6 } from '../../src/lib/agentic/contracts/v6'; +import { EVM_CHAIN_FIXTURES } from '@e2e/shared/chain-fixtures'; +import { COUNTER_ABI } from '@e2e/shared/outbound-helpers'; +import { verifyExternalTransaction } from '@e2e/shared/external-tx-verifier'; +import { + AGW_E2E_ENABLED, + evmClient, + inSeconds, + setupAgw, + type AgwFixture, +} from './_fixture'; + +const d = AGW_E2E_ENABLED ? describe : describe.skip; +const SEPOLIA = CHAIN.ETHEREUM_SEPOLIA; +const counter = EVM_CHAIN_FIXTURES.find((x) => x.chain === SEPOLIA)!.contracts + .counter as Address; +const INCREMENT = '0xd09de08a' as Hex; +const MISSING = '0xdeadbeef' as Hex; // not implemented by the counter → destination revert +const AMOUNT = BigInt(10) ** BigInt(12); // 0.000001 pETH +// Fresh CEA finalization currently needs ~1.3m gas on Sepolia; the core +// default of 500k was independently shown to revert. Keep a bounded explicit +// destination budget and preserve that default-budget evidence separately. +const DESTINATION_GAS = BigInt(2_000_000); +const MAX_PC = parseEther(process.env['AGW_E2E_MAX_PC_PER_CALL'] ?? '20'); + +d('agw universal evm', () => { + let f: AgwFixture; + let wallet: Address; + let token: Address; + let rulesId: Hex; + let cea: Address; + + beforeAll(async () => { + f = await setupAgw(); + const created = await f.owner.agentic.create('e2e-universal', { + rules: [ + { + agent: f.agentAddress, + chainNamespace: SEPOLIA, + assets: [ + { + token: MOVEABLE_TOKEN_CONSTANTS.ETHEREUM_SEPOLIA.ETH, + maxPerCall: AMOUNT * BigInt(2), + maxTotal: AMOUNT * BigInt(10), + }, + ], + validUntil: inSeconds(3600), + maxGasPerCall: MAX_PC, + allowedCalls: [ + { target: counter, selector: INCREMENT }, + { target: counter, selector: MISSING }, + ], + }, + ], + }); + wallet = created.wallet; + rulesId = created.rulesIds[0]; + token = getNativePRC20ForChain(SEPOLIA, f.manifest.network); + cea = (await getCEAAddress(wallet, SEPOLIA)).cea as Address; + // Separate funding: wallet PC for outbound fees and pETH to burn. + await f.fundPC(wallet, MAX_PC + parseEther('1')); + await ( + await f.owner.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [wallet, AMOUNT * BigInt(3)], + }), + }) + ).wait(); + expect( + await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'allowance', + args: [wallet, f.manifest.addresses.gateway], + }) + ).toBe(BigInt(0)); + }, 900_000); + afterAll(() => f?.teardown()); + + it('1. positive-amount outbound: allowance pull/burn, the wallet CEA executes on Sepolia, receipts and replay identity', async () => { + const sep = createPublicClient({ + chain: sepolia, + transport: fallback( + CHAIN_INFO[SEPOLIA].defaultRPC.map((url) => http(url)) + ), + }); + const countBefore = (await sep.readContract({ + address: counter, + abi: COUNTER_ABI, + functionName: 'count', + })) as bigint; + const balBefore = await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [wallet], + }); + const agent = await f.agent(wallet); + const ceaBefore = await sep.getBalance({ address: cea }); + // Explicit call array: the bridged ETH lands in the wallet's CEA and the + // allow-listed call runs with zero value. A single `data` follows ordinary + // Route 2 semantics and forwards the bridged value to the target. + const tx = await agent.universal.sendTransaction({ + to: { address: counter, chain: SEPOLIA }, + data: [{ to: counter, value: BigInt(0), data: INCREMENT }], + // Omit gasLimit: the SDK must budget for this fresh CEA. + funds: { + amount: AMOUNT, + token: MOVEABLE_TOKEN_CONSTANTS.ETHEREUM_SEPOLIA.ETH, + }, + }); + expect(tx).toMatchObject({ from: wallet, route: 'UOA_TO_CEA' }); + expect(tx.agentic).toMatchObject({ + door: 'agent', + rulesId, + destinationAccount: cea, + }); + f.evidence('v5-evm-outbound-submitted', { + wallet, + cea, + pushTx: tx.hash, + destinationGasLimit: DESTINATION_GAS, + }); + const receipt = await tx.wait({ outboundTimeoutMs: 600_000 }); + expect(receipt.status).toBe(1); + expect(receipt.from).toBe(wallet); + expect(receipt.externalStatus).toBe('success'); + expect(receipt.externalTxHash).toBeTruthy(); + await verifyExternalTransaction(receipt.externalTxHash as string, SEPOLIA); + const destinationReceipt = await sep.getTransactionReceipt({ + hash: receipt.externalTxHash as Hex, + }); + // Attribute the call to this wallet's CEA, independently of a shared + // counter increase. The event is emitted by CEA for each executed step. + const executed = parseEventLogs({ + abi: parseAbi([ + 'event UniversalTxExecuted(bytes32 indexed subTxId, bytes32 indexed universalTxId, address indexed originCaller, address target, bytes data)', + ]), + logs: destinationReceipt.logs, + }); + expect( + executed.some( + (event) => + event.address.toLowerCase() === cea.toLowerCase() && + event.args.originCaller.toLowerCase() === wallet.toLowerCase() && + event.args.target.toLowerCase() === counter.toLowerCase() && + event.args.data === INCREMENT + ) + ).toBe(true); + expect( + await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [wallet], + }) + ).toBe(balBefore - AMOUNT); + expect( + await f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'allowance', + args: [wallet, f.manifest.addresses.gateway], + }) + ).toBe(BigInt(0)); + expect( + (await sep.readContract({ + address: counter, + abi: COUNTER_ABI, + functionName: 'count', + })) as bigint + ).toBeGreaterThan(countBefore); + // Independent destination check: the wallet's own CEA received the bridged amount. + expect(await sep.getBalance({ address: cea })).toBe(ceaBefore + AMOUNT); + const replay = await f.owner.universal.trackTransaction(tx.hash); + expect(replay.from).toBe(wallet); + expect(replay.agentic).toMatchObject({ door: 'agent', rulesId }); + f.evidence('universal-outbound', { + wallet, + cea, + rulesId, + pushTx: tx.hash, + externalTx: receipt.externalTxHash, + amount: AMOUNT, + }); + }, 900_000); + + it('2. destination revert is classified on the receipt; the Push leg succeeded', async () => { + const agent = await f.agent(wallet); + const tx = await agent.universal.sendTransaction({ + to: { address: counter, chain: SEPOLIA }, + data: MISSING, + gasLimit: DESTINATION_GAS, + }); + const receipt = await tx.wait({ outboundTimeoutMs: 600_000 }); + expect(receipt.status).toBe(1); + expect(receipt.externalStatus).toMatch(/fail|revert/i); + f.evidence('universal-destination-revert', { + wallet, + pushTx: tx.hash, + externalStatus: receipt.externalStatus, + }); + }, 900_000); + it('3. v6 destination EQ/MAX alternatives authorize only the pinned spender and amount', async () => { + const target = MOVEABLE_TOKEN_CONSTANTS.ETHEREUM_SEPOLIA.USDC + .address as Address; + const handle = f.owner.agentic.wallet(wallet); + const record = await handle.rules.get(rulesId); + const updated = await handle.rules.update({ + rules: [ + { + rulesId, + rule: { + ...record.rule, + allowedCalls: [f.ownerAddress, f.agentAddress].map((spender) => ({ + target, + selector: 'approve(address,uint256)', + pins: [ + { arg: 0, expected: spender }, + { arg: 1, max: BigInt(1) }, + ], + })), + } as Rule, + }, + ], + }); + rulesId = updated.rules[0].rulesId; + const agent = await f.agent(wallet); + const send = (spender: Address, amount: bigint) => + agent.universal.sendTransaction({ + to: { address: target, chain: SEPOLIA }, + data: [ + { + to: target, + value: BigInt(0), + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'approve', + args: [spender, amount], + }), + }, + ], + }); + const nonce = await f.push.getTransactionCount({ address: f.agentAddress }); + await expect( + send('0x000000000000000000000000000000000000dEaD', BigInt(1)) + ).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(ArgPinMismatch)' }, + }); + await expect(send(f.ownerAddress, BigInt(2))).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(ArgPinAboveMax)' }, + }); + expect(await f.push.getTransactionCount({ address: f.agentAddress })).toBe( + nonce + ); + // Use the SECOND alternative and a zero approval: no persistent spending authority is granted. + const tx = await send(f.agentAddress, BigInt(0)); + const receipt = await tx.wait({ outboundTimeoutMs: 600_000 }); + expect(receipt.externalStatus).toMatch(/success/i); + if (!receipt.externalTxHash) throw Error('missing destination receipt'); + const sep = createPublicClient({ + chain: sepolia, + transport: fallback( + CHAIN_INFO[SEPOLIA].defaultRPC.map((url) => http(url)) + ), + }); + const external = await sep.getTransactionReceipt({ + hash: receipt.externalTxHash as Hex, + }); + const events = parseEventLogs({ + abi: erc20Abi, + eventName: 'Approval', + logs: external.logs, + }); + expect( + events.some( + (e) => + e.address.toLowerCase() === target.toLowerCase() && + e.args.owner.toLowerCase() === cea.toLowerCase() && + e.args.spender.toLowerCase() === f.agentAddress.toLowerCase() && + e.args.value === BigInt(0) + ) + ).toBe(true); + f.evidence('v6-destination-pins', { + wallet, + cea, + rulesId, + pushTx: tx.hash, + destinationTx: receipt.externalTxHash, + }); + }, 900_000); +}); diff --git a/packages/core/__e2e__/agw/v5-multiasset.spec.ts b/packages/core/__e2e__/agw/v5-multiasset.spec.ts new file mode 100644 index 00000000..10ec0f97 --- /dev/null +++ b/packages/core/__e2e__/agw/v5-multiasset.spec.ts @@ -0,0 +1,350 @@ +/** Opt-in funded Donut acceptance. Nothing in this file runs in unit/local validation. */ +import type { Rule } from '../../src'; +import { + createPublicClient, + encodeFunctionData, + erc20Abi, + fallback, + http, + parseAbi, + parseEventLogs, + parseEther, + type Address, + type Hex, +} from 'viem'; +import { sepolia } from 'viem/chains'; +import { CHAIN_INFO } from '../../src/lib/constants/chain'; +import { getPRC20Address } from '../../src/lib/universal/prc20-address'; +import { getCEAAddress } from '../../src/lib/orchestrator/cea-utils'; +import { configId } from '../../src/lib/agentic/codec/ids'; +import { CHAIN } from '../../src/lib/constants/enums'; +import { MOVEABLE_TOKEN_CONSTANTS } from '../../src/lib/constants/tokens'; +import { v6 } from '../../src/lib/agentic/contracts/v6'; +import { EVM_CHAIN_FIXTURES } from '@e2e/shared/chain-fixtures'; +import { verifyExternalTransaction } from '@e2e/shared/external-tx-verifier'; +import { + AGW_E2E_ENABLED, + evmClient, + inSeconds, + setupAgw, + type AgwFixture, +} from './_fixture'; + +const d = AGW_E2E_ENABLED ? describe : describe.skip; +const chain = CHAIN.ETHEREUM_SEPOLIA; +const counter = EVM_CHAIN_FIXTURES.find((x) => x.chain === chain)!.contracts + .counter as `0x${string}`; + +d('agw v5 multi-asset', () => { + let f: AgwFixture; + beforeAll(async () => { + f = await setupAgw(); + }); + afterAll(() => f?.teardown()); + it('1. public create reads and replaces an ordered two-token rule', async () => { + const rule: Rule = { + agent: f.agentAddress, + chainNamespace: chain, + validUntil: inSeconds(3600), + maxGasPerCall: parseEther('20'), + assets: [ + { + token: MOVEABLE_TOKEN_CONSTANTS.ETHEREUM_SEPOLIA.ETH, + maxPerCall: BigInt(1000), + }, + { + token: MOVEABLE_TOKEN_CONSTANTS.ETHEREUM_SEPOLIA.USDC, + maxPerCall: BigInt(10), + maxTotal: BigInt(100), + }, + ], + allowedCalls: [{ target: counter, selector: 'increment()' as const }], + }; + const created = await f.owner.agentic.create('v5-two-token', { + rules: [rule], + }); + const w = f.owner.agentic.wallet(created.wallet); + const before = await w.rules.get(created.rulesIds[0]); + expect(before.rule).toMatchObject({ + assets: [ + { + maxPerCall: BigInt(1000), + maxTotal: BigInt(0), + }, + { maxPerCall: BigInt(10), maxTotal: BigInt(100) }, + ], + }); + expect(before.spent).toMatchObject({ + kind: 'universal', + assets: [ + expect.objectContaining({ spent: BigInt(0) }), + expect.objectContaining({ spent: BigInt(0) }), + ], + }); + const count = await f.push.readContract({ + address: created.wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }); + const replacement = await w.rules.update({ + rules: [{ rulesId: created.rulesIds[0], rule }], + }); + expect( + await f.push.readContract({ + address: created.wallet, + abi: v6.abis.wallet, + functionName: 'checkpointCount', + }) + ).toBe(count + BigInt(5)); + expect((await w.rules.list()).rules.map((x) => x.rulesId)).toEqual([ + replacement.rules[0].rulesId, + ]); + f.evidence('v5-two-token-replacement', { + wallet: created.wallet, + oldId: created.rulesIds[0], + newId: replacement.rules[0].rulesId, + txHash: replacement.tx.hash, + }); + }); + it('2. empty user assets routes a call-only outbound with zero token spend', async () => { + const created = await f.owner.agentic.create('v5-call-only', { + rules: [ + { + agent: f.agentAddress, + chainNamespace: chain, + assets: [], + validUntil: inSeconds(3600), + maxGasPerCall: parseEther('20'), + allowedCalls: [{ target: counter, selector: 'increment()' }], + }, + ], + }); + const record = await f.owner.agentic + .wallet(created.wallet) + .rules.get(created.rulesIds[0]); + expect(record.rule).toMatchObject({ + assets: [{ maxPerCall: BigInt(0), maxTotal: BigInt(0) }], + }); + await f.fundPC(created.wallet, parseEther('21')); + const agent = await f.agent(created.wallet); + const tx = await agent.universal.sendTransaction({ + to: { address: counter, chain }, + data: '0xd09de08a', + gasLimit: BigInt(2_000_000), + }); + const receipt = await tx.wait({ outboundTimeoutMs: 600_000 }); + expect(receipt.status).toBe(1); + expect(receipt.externalTxHash).toBeTruthy(); + await verifyExternalTransaction(receipt.externalTxHash as string, chain); + const [action] = await f.push.readContract({ + address: f.manifest.addresses.sessionEngine, + abi: v6.abis.engine, + functionName: 'getEnabledActions', + args: [created.wallet, created.rulesIds[0]], + }); + const { configId } = await import('../../src/lib/agentic/codec/ids'); + const cfg = await f.push.readContract({ + address: f.manifest.addresses.rulesPolicy, + abi: v6.abis.policy, + functionName: 'getConfig', + args: [ + configId(created.wallet, created.rulesIds[0], action), + created.wallet, + ], + }); + expect(cfg.assets.map((x) => x.spent)).toEqual([BigInt(0)]); + f.evidence('v5-call-only', { + wallet: created.wallet, + pushTx: tx.hash, + externalTx: receipt.externalTxHash, + }); + }, 900_000); + it('3. both assets execute independently after one token budget is exhausted', async () => { + const eth = MOVEABLE_TOKEN_CONSTANTS.ETHEREUM_SEPOLIA.ETH; + const usdc = MOVEABLE_TOKEN_CONSTANTS.ETHEREUM_SEPOLIA.USDC; + const amounts = [BigInt(10) ** BigInt(12), BigInt(10)]; + const tokens = [eth, usdc].map( + (token) => + getPRC20Address( + { chain, address: token.address }, + { network: f.manifest.network } + ).address + ); + // Keep an extra token unit and allowance available so total-limit failures + // reach URP instead of being masked by the SDK balance/allowance checks. + for (let i = 0; i < tokens.length; i++) { + const available = await f.push.readContract({ + address: tokens[i], + abi: erc20Abi, + functionName: 'balanceOf', + args: [f.ownerAddress], + }); + if (available < amounts[i] + BigInt(1)) + throw new Error('Insufficient master funds for two-asset fixture'); + } + const made = await f.owner.agentic.create('v5-independent-budgets', { + rules: [ + { + agent: f.agentAddress, + chainNamespace: chain, + validUntil: inSeconds(3600), + maxGasPerCall: parseEther('20'), + assets: [eth, usdc].map((token, i) => ({ + token, + maxPerCall: amounts[i], + maxTotal: amounts[i], + })), + allowedCalls: [{ target: counter, selector: 'increment()' }], + }, + ], + }); + await f.fundPC(made.wallet, parseEther('41')); + const owner = await evmClient( + process.env['PUSH_PRIVATE_KEY'] as Hex, + CHAIN.PUSH_TESTNET_DONUT, + f.manifest.network, + made.wallet + ); + for (let i = 0; i < tokens.length; i++) { + await ( + await f.owner.universal.sendTransaction({ + to: tokens[i], + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [made.wallet, amounts[i] + BigInt(1)], + }), + }) + ).wait(); + await ( + await owner.universal.sendTransaction({ + to: tokens[i], + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'approve', + args: [f.manifest.addresses.gateway, amounts[i] + BigInt(1)], + }), + }) + ).wait(); + } + const agent = await f.agent(made.wallet); + const [action] = await f.push.readContract({ + address: f.manifest.addresses.sessionEngine, + abi: v6.abis.engine, + functionName: 'getEnabledActions', + args: [made.wallet, made.rulesIds[0]], + }); + const key = configId(made.wallet, made.rulesIds[0], action); + const spent = async () => + ( + await f.push.readContract({ + address: f.manifest.addresses.rulesPolicy, + abi: v6.abis.policy, + functionName: 'getConfig', + args: [key, made.wallet], + }) + ).assets.map((asset) => asset.spent); + const sep = createPublicClient({ + chain: sepolia, + transport: fallback(CHAIN_INFO[chain].defaultRPC.map((url) => http(url))), + }); + const cea = (await getCEAAddress(made.wallet, chain)).cea as Address; + const params = (i: number, amount = amounts[i]) => ({ + to: { address: counter, chain }, + data: [{ to: counter, value: BigInt(0), data: '0xd09de08a' as Hex }], + funds: { token: [eth, usdc][i], amount }, + gasLimit: BigInt(2_000_000), + }); + const hashes: string[] = []; + expect(await spent()).toEqual([BigInt(0), BigInt(0)]); + for (let i = 0; i < tokens.length; i++) { + const beforeDestination = + i === 0 + ? await sep.getBalance({ address: cea }) + : await sep.readContract({ + address: usdc.address as Address, + abi: erc20Abi, + functionName: 'balanceOf', + args: [cea], + }); + const tx = await agent.universal.sendTransaction(params(i)); + f.evidence('v5-budget-outbound-submitted', { + wallet: made.wallet, + rulesId: made.rulesIds[0], + token: tokens[i], + amount: amounts[i], + pushTx: tx.hash, + }); + const receipt = await tx.wait({ outboundTimeoutMs: 600_000 }); + expect(receipt.externalStatus).toBe('success'); + await verifyExternalTransaction(receipt.externalTxHash!, chain); + const external = await sep.getTransactionReceipt({ + hash: receipt.externalTxHash as Hex, + }); + const executed = parseEventLogs({ + abi: parseAbi([ + 'event UniversalTxExecuted(bytes32 indexed subTxId, bytes32 indexed universalTxId, address indexed originCaller, address target, bytes data)', + ]), + logs: external.logs, + }); + expect( + executed.some( + (event) => + event.address.toLowerCase() === cea.toLowerCase() && + event.args.originCaller.toLowerCase() === + made.wallet.toLowerCase() && + event.args.target.toLowerCase() === counter.toLowerCase() + ) + ).toBe(true); + const afterDestination = + i === 0 + ? await sep.getBalance({ address: cea }) + : await sep.readContract({ + address: usdc.address as Address, + abi: erc20Abi, + functionName: 'balanceOf', + args: [cea], + }); + expect(afterDestination).toBe(beforeDestination + amounts[i]); + expect( + await f.push.readContract({ + address: tokens[i], + abi: erc20Abi, + functionName: 'balanceOf', + args: [made.wallet], + }) + ).toBe(BigInt(1)); + expect( + await f.push.readContract({ + address: tokens[i], + abi: erc20Abi, + functionName: 'allowance', + args: [made.wallet, f.manifest.addresses.gateway], + }) + ).toBe(BigInt(0)); + const expected = i === 0 ? [amounts[0], BigInt(0)] : amounts; + expect(await spent()).toEqual(expected); + const nonce = await f.push.getTransactionCount({ + address: f.agentAddress, + }); + await expect( + agent.universal.sendTransaction(params(i, BigInt(1))) + ).rejects.toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(TotalSpendCapExceeded)' }, + }); + expect( + await f.push.getTransactionCount({ address: f.agentAddress }) + ).toBe(nonce); + expect(await spent()).toEqual(expected); + hashes.push(tx.hash, receipt.externalTxHash!); + } + f.evidence('v5-independent-token-budgets', { + wallet: made.wallet, + rulesId: made.rulesIds[0], + tokens, + amounts, + spent: await spent(), + hashes, + }); + }, 1_800_000); +}); diff --git a/packages/core/__e2e__/ci/agw-svm-preflight.ts b/packages/core/__e2e__/ci/agw-svm-preflight.ts new file mode 100644 index 00000000..588ef2c5 --- /dev/null +++ b/packages/core/__e2e__/ci/agw-svm-preflight.ts @@ -0,0 +1,30 @@ +/** No dotenv, signers or transactions: inspect both networks before funding a wire test. */ +import { mkdirSync, writeFileSync } from 'node:fs'; +import { dirname } from 'node:path'; +import { createPublicClient, fallback, http, parseAbi, type Address } from 'viem'; +import { CHAIN_INFO, getPushViemChain } from '../../src/lib/constants/chain'; +import { CHAIN } from '../../src/lib/constants/enums'; +import { loadAgwManifest, verifyAgwManifest } from '../agw/_manifest'; +import { inspectSvmWirePrograms, svmWireConnection, SVM_WIRE_CHAIN } from '../shared/agw-svm-preflight'; + +async function main() { + const manifest = loadAgwManifest(); + const push = createPublicClient({ chain: getPushViemChain(CHAIN.PUSH_TESTNET_DONUT), transport: fallback(CHAIN_INFO[CHAIN.PUSH_TESTNET_DONUT].defaultRPC.map((u) => http(u))) }); + await verifyAgwManifest(push, manifest); + const block = await push.getBlockNumber(); + const token = await push.readContract({ address: '0x00000000000000000000000000000000000000C0', + abi: parseAbi(['function gasTokenPRC20ByChainNamespace(string) view returns (address)']), + functionName: 'gasTokenPRC20ByChainNamespace', args: [SVM_WIRE_CHAIN], blockNumber: block }) as Address; + const source = await push.readContract({ address: token, abi: parseAbi(['function SOURCE_CHAIN_NAMESPACE() view returns (string)']), functionName: 'SOURCE_CHAIN_NAMESPACE', blockNumber: block }); + if (source !== SVM_WIRE_CHAIN) throw new Error('Gas PRC20 does not match Solana devnet'); + const quote = await push.readContract({ address: '0x00000000000000000000000000000000000000C0', + abi: parseAbi(['function getOutboundTxGasAndFees(address,uint256) view returns (address,uint256,uint256,uint256,string,uint256)']), + functionName: 'getOutboundTxGasAndFees', args: [token, BigInt(0)], blockNumber: block }); + const solana = await inspectSvmWirePrograms(svmWireConnection()); + const result = { push: { chainId: await push.getChainId(), block, sourceCommit: manifest.sourceCommit, token, quote }, solana, transactionsSent: 0 }; + const json = JSON.stringify(result, (_k, v) => typeof v === 'bigint' ? v.toString() : v, 2) + '\n'; + const output = process.argv[2]; + if (output) { mkdirSync(dirname(output), { recursive: true }); writeFileSync(output, json); } + process.stdout.write(json); +} +main().catch((error) => { console.error((error as Error).message); process.exitCode = 1; }); diff --git a/packages/core/__e2e__/ci/ci-reporter.js b/packages/core/__e2e__/ci/ci-reporter.js index 3dcd4db6..9f23ded8 100644 --- a/packages/core/__e2e__/ci/ci-reporter.js +++ b/packages/core/__e2e__/ci/ci-reporter.js @@ -43,7 +43,10 @@ class CiReporter { numPassedTests: results.numPassedTests, numFailedTests: results.numFailedTests, numPendingTests: results.numPendingTests, - success: Boolean(results.success), + // Jest fills `success` after onRunComplete. Derive completion from final counters here. + success: results.numPassedTests > 0 && results.numFailedTests === 0 && + (results.numFailedTestSuites ?? 0) === 0 && (results.numRuntimeErrorTestSuites ?? 0) === 0 && !results.wasInterrupted, + jestReportedSuccess: Boolean(results.success), tests, }; diff --git a/packages/core/__e2e__/ci/preflight.ts b/packages/core/__e2e__/ci/preflight.ts index 405ea41f..cb315df9 100644 --- a/packages/core/__e2e__/ci/preflight.ts +++ b/packages/core/__e2e__/ci/preflight.ts @@ -64,6 +64,7 @@ import { deriveAtaPubkey, } from '../../src/lib/orchestrator/internals/svm-rent'; import { scenariosFor, aggregateNeeds, type Asset } from './suite'; +import { loadAgwManifest, verifyAgwManifest } from '../agw/_manifest'; // --------------------------------------------------------------------------- // tunables @@ -285,6 +286,10 @@ function renderTable(rows: Row[]): void { (async () => { const scenarios = scenariosFor(group); const raw = aggregateNeeds(scenarios); + if (group === 'agw-svm-replay') { + console.log('Recorded SVM replay is read-only: no keys, signing or funding needed.'); + return; + } /** Summed need for an asset, with headroom and reserve, as a decimal string. */ const target = (a: Asset): number => { @@ -326,6 +331,39 @@ function renderTable(rows: Row[]): void { chain: pushChainDef, transport: fallback(pushRpcs.map((u) => http(u))), }) as PublicClient; + + // -- AGW gate ------------------------------------------------------------ + // Every AGW group needs a verified compatible AGW deployment. + // Check it read-only BEFORE any balance work so nothing is ever funded for + // a run that cannot exercise a real deployment. + if (scenarios.some((s) => s.group.startsWith('agw'))) { + try { + await verifyAgwManifest(push, loadAgwManifest()); + console.log('AGW deployment manifest verified on-chain.'); + } catch (err) { + console.error(`\n${(err as Error).message}`); + console.error('No transactions were sent.'); + process.exit(1); + } + } + const presetCases = scenarios + .filter((s) => s.file === '__e2e__/agw/presets-acceptance.spec.ts') + .map((s) => Number(/-(\d+)$/.exec(s.id)?.[1])); + if (presetCases.length) { + const { PRESET_ACCEPTANCE_CASES } = await import('../shared/agw-preset-acceptance'); + // Only the selected cases; their ids end in the spec's case number. + for (const n of presetCases) { + const entry = PRESET_ACCEPTANCE_CASES[n - 1]; + if (!entry) throw new Error(`Unknown preset acceptance case ${n}`); + // Every shipped preset is routable; get throws if its catalog entry is gone. + PushChain.utils.agentic.presets.get(entry[0], { chainNamespace: entry[1] }); + } + } + if (scenarios.some((s) => s.group === 'agw-svm-wire' || s.group === 'agw-svm-agent-spl' || s.file === '__e2e__/agw/svm-public.spec.ts')) { + const { inspectSvmWirePrograms, svmWireConnection } = await import('../shared/agw-svm-preflight'); + await inspectSvmWirePrograms(svmWireConnection(solRpc)); + console.log('Solana wire fixture verified read-only before funding.'); + } const pushWallet = createWalletClient({ account: pushAcc, chain: pushChainDef, @@ -390,18 +428,19 @@ function renderTable(rows: Row[]): void { return BigInt(r?.value.amount ?? '0'); }); - const [dUsdtSep, dPeth, dUsdtEth, dPsol, dUsdtSol] = await Promise.all([ + const [dUsdtSep, dPeth, dUsdtEth, dPsol, dUsdtSol, dUsdcEth] = await Promise.all([ decimalsOf(usdtSepolia, sep), decimalsOf(s.pETH, push), decimalsOf(s.USDT_ETH, push), decimalsOf(s.pSOL, push), decimalsOf(s.USDT_SOL, push), + decimalsOf(s.USDC_ETH, push), ]); const dPc20 = pc20Push ? await decimalsOf(pc20Push, push) : 18; const [ sepEth, sepUsdt, - mPC, mPeth, mUsdtEth, mPsol, mUsdtSol, mPc20, + mPC, mPeth, mUsdtEth, mPsol, mUsdtSol, mUsdcEth, mPc20, uPC, uPeth, uUsdtEth, uPsol, uUsdtSol, uPc20, solBal, solUsdt, ceaSol, ceaUsdt, ] = await Promise.all([ @@ -413,6 +452,7 @@ function renderTable(rows: Row[]): void { erc20(s.USDT_ETH, pushAcc.address, push), erc20(s.pSOL, pushAcc.address, push), erc20(s.USDT_SOL, pushAcc.address, push), + erc20(s.USDC_ETH, pushAcc.address, push), pc20Push ? erc20(pc20Push, pushAcc.address, push) : Promise.resolve(BigInt(0)), retry(() => push.getBalance({ address: uea })), @@ -458,8 +498,9 @@ function renderTable(rows: Row[]): void { { scope: 'Push master (Donut)', asset: 'PC', need: units(target('masterPC'), 18) + deficit('ueaPC'), have: mPC, decimals: 18, tier: 'master' }, { scope: 'Push master (Donut)', asset: 'pETH', need: units(target('masterPETH'), dPeth) + deficit('ueaPETH'), have: mPeth, decimals: dPeth, tier: 'master' }, { scope: 'Push master (Donut)', asset: 'pUSDT.eth', need: deficit('ueaUsdtEth'), have: mUsdtEth, decimals: dUsdtEth, tier: 'master' }, - { scope: 'Push master (Donut)', asset: 'pSOL', need: deficit('ueaPSOL'), have: mPsol, decimals: dPsol, tier: 'master' }, - { scope: 'Push master (Donut)', asset: 'pUSDT.sol', need: deficit('ueaUsdtSol'), have: mUsdtSol, decimals: dUsdtSol, tier: 'master' }, + { scope: 'Push master (Donut)', asset: 'pSOL', need: units(target('masterPSOL'), dPsol) + deficit('ueaPSOL'), have: mPsol, decimals: dPsol, tier: 'master' }, + { scope: 'Push master (Donut)', asset: 'pUSDT.sol', need: units(target('masterUsdtSol'), dUsdtSol) + deficit('ueaUsdtSol'), have: mUsdtSol, decimals: dUsdtSol, tier: 'master' }, + { scope: 'Push master (Donut)', asset: 'pUSDC.eth', need: units(target('masterUsdcEth'), dUsdcEth), have: mUsdcEth, decimals: dUsdcEth, tier: 'master' }, { scope: 'Push master (Donut)', asset: 'PC20', need: deficit('ueaPC20'), have: mPc20, decimals: dPc20, tier: 'master' }, { scope: 'Solana master (Devnet)', asset: 'SOL', need: units(target('solanaSOL'), 9) + deficit('ceaSvmSOL'), have: solBal, decimals: 9, tier: 'master' }, { scope: 'Solana master (Devnet)', asset: 'USDT', need: units(target('solanaUsdt'), 6) + deficit('ceaSvmUsdt'), have: solUsdt, decimals: 6, tier: 'master' }, diff --git a/packages/core/__e2e__/ci/run.ts b/packages/core/__e2e__/ci/run.ts index 33d1ae10..5ff82702 100644 --- a/packages/core/__e2e__/ci/run.ts +++ b/packages/core/__e2e__/ci/run.ts @@ -6,8 +6,10 @@ * npx ts-node --transpile-only __e2e__/ci/run.ts [options] * * --group One of: all (default), smoke, evm-r1, evm-r2, evm-r3, - * svm-r1, svm-r2r3, pc20, push, cross-chain, known-fail - * (`all` excludes known-fail — ask for it by name) + * svm-r1, svm-r2r3, pc20, push, cross-chain, read, + * known-fail, agw, agw-svm-wire, agw-svm-replay + * (`all` excludes known-fail and AGW groups — ask by name; + * agw uses the checked Donut v5 manifest by default, see __e2e__/agw/_manifest.ts) * --list Print the selection and the jest argv, run nothing * --verify Check every `grep` against the real spec titles and exit * non-zero if any fragment matches 0 or >1 tests in its file @@ -55,7 +57,8 @@ function classify(prefix: string): 'describe' | 'it' | null { if (/\?[\s\S]*\b(it|test)\b[\s\S]*\)$/.test(p)) return 'it'; const m = p.match(/([A-Za-z_$][\w$]*)(?:\.(skip|only|failing|concurrent))?$/); if (!m) return null; - if (/^(describe|d|dWrapper|xdescribe|fdescribe)$/.test(m[1])) return 'describe'; + if (/^(describe|d|dWrapper|xdescribe|fdescribe)$/.test(m[1])) + return 'describe'; if (/^(it|test|xit|fit|itWrapper|itIf)$/.test(m[1])) return 'it'; return null; } @@ -83,7 +86,13 @@ function titlesOf(specPath: string): string[] { const depth = depthAt[at]; while (stack.length && stack[stack.length - 1].depth >= depth) stack.pop(); if (kind === 'describe') stack.push({ title: m[2], depth }); - else titles.push(stack.map((s) => s.title).concat(m[2]).join(' ')); + else + titles.push( + stack + .map((s) => s.title) + .concat(m[2]) + .join(' ') + ); } return titles; } @@ -158,13 +167,17 @@ if (has('verify')) { bad++; } else { for (const h of hits) seen.set(h, (seen.get(h) ?? []).concat(s.id)); - console.log(`✓ ${s.id.padEnd(32)} ${hits.length} test${hits.length > 1 ? 's' : ''}`); + console.log( + `✓ ${s.id.padEnd(32)} ${hits.length} test${hits.length > 1 ? 's' : ''}` + ); } } const dupes = [...seen.entries()].filter(([, ids]) => ids.length > 1); for (const [title, ids] of dupes) { - console.error(`✗ overlapping fragments — "${title}" claimed by ${ids.join(', ')}`); + console.error( + `✗ overlapping fragments — "${title}" claimed by ${ids.join(', ')}` + ); bad++; } @@ -193,7 +206,9 @@ if (has('verify')) { `\n${selected.length} scenarios, ${files.length} spec files, ${seen.size} distinct tests.` ); if (bad) { - console.error(`\n${bad} problem(s). The manifest has drifted from the specs.`); + console.error( + `\n${bad} problem(s). The manifest has drifted from the specs.` + ); process.exit(1); } console.log('Manifest is consistent with the specs.'); @@ -202,7 +217,8 @@ if (has('verify')) { if (has('list')) { const byGroup = new Map(); - for (const s of selected) byGroup.set(s.group, (byGroup.get(s.group) ?? []).concat(s)); + for (const s of selected) + byGroup.set(s.group, (byGroup.get(s.group) ?? []).concat(s)); for (const g of GROUPS) { const rows = byGroup.get(g); if (!rows) continue; @@ -214,8 +230,14 @@ if (has('list')) { console.log(` ${s.id.padEnd(32)} ${cost || '(free)'}`); } } - console.log(`\n${selected.length} scenarios across ${files.length} spec files.`); - console.log(`\nnpx ${jestArgs.map((a) => (/[\s|()]/.test(a) ? JSON.stringify(a) : a)).join(' ')}`); + console.log( + `\n${selected.length} scenarios across ${files.length} spec files.` + ); + console.log( + `\nnpx ${jestArgs + .map((a) => (/[\s|()]/.test(a) ? JSON.stringify(a) : a)) + .join(' ')}` + ); process.exit(0); } @@ -225,7 +247,9 @@ if (has('list')) { fs.mkdirSync(LOG_DIR, { recursive: true }); -console.log(`Running ${selected.length} scenarios (group: ${group}) across ${files.length} spec files.\n`); +console.log( + `Running ${selected.length} scenarios (group: ${group}) across ${files.length} spec files.\n` +); const result = spawnSync('npx', jestArgs, { cwd: CORE_ROOT, @@ -277,7 +301,9 @@ function writeSummary(): void { const skipped = all.length - passed - failed; // Skipped rows are the tests jest loaded but `-t` filtered out — noise here. - const shown = all.filter((a) => a.status !== 'pending' && a.status !== 'skipped'); + const shown = all.filter( + (a) => a.status !== 'pending' && a.status !== 'skipped' + ); const lines = [ `## E2E — group \`${group}\``, diff --git a/packages/core/__e2e__/ci/suite.ts b/packages/core/__e2e__/ci/suite.ts index 71ff5966..41f04e17 100644 --- a/packages/core/__e2e__/ci/suite.ts +++ b/packages/core/__e2e__/ci/suite.ts @@ -34,6 +34,18 @@ export const GROUPS = [ 'cross-chain', 'read', 'known-fail', + 'agw', + 'agw-svm-wire', + 'agw-svm-replay', + 'agw-presets-acceptance', + 'agw-exact-routes', + 'agw-tokens-only', + 'agw-svm-memo', + 'agw-svm-agent-spl', + 'agw-gas', + 'marketplace', + 'marketplace-live', + 'marketplace-funding', ] as const; export type Group = (typeof GROUPS)[number]; @@ -69,6 +81,9 @@ export type Asset = // Push master (PUSH_PRIVATE_KEY) on Push Donut — Push-native origin specs | 'masterPC' | 'masterPETH' + | 'masterPSOL' + | 'masterUsdcEth' + | 'masterUsdtSol' // The EVM master's UEA on Push Donut — Routes 2/3 on both VMs, and PC20 | 'ueaPC' | 'ueaPETH' @@ -149,9 +164,74 @@ const F = { readSvmIdl: '__e2e__/read/svm/account-idl.spec.ts', readMutability: '__e2e__/read/evm/any-mutability.spec.ts', readTrackLookup: '__e2e__/read/lifecycle/track-lookup.spec.ts', + agwCreate: '__e2e__/agw/create.spec.ts', + agwFunding: '__e2e__/agw/funding-allowance.spec.ts', + agwNative: '__e2e__/agw/native-exec.spec.ts', + agwLifecycle: '__e2e__/agw/lifecycle.spec.ts', + agwUniversal: '__e2e__/agw/universal-evm.spec.ts', + agwIdentity: '__e2e__/agw/identity-gas.spec.ts', + agwResponses: '__e2e__/agw/responses-hooks.spec.ts', + agwExtendedManagement: '__e2e__/agw/management-extended.spec.ts', + agwExtendedNative: '__e2e__/agw/native-policy-extended.spec.ts', } as const; export const SCENARIOS: Scenario[] = [ + { id: 'marketplace-funding-agw', group: 'marketplace-funding', file: '__e2e__/marketplace/funding.spec.ts', grep: 'marketplace funding 1\\. deposits real principal', needs: { masterPC: '1' }, env: { MARKETPLACE_FUNDING_E2E: '1', AGW_E2E_AGENT_PC: '0.1' }, note: 'Owned test tokens only; 0.01 pUSDC escrow, controlled fresh evaluator, token cleanup.' }, + { id: 'marketplace-funding-native', group: 'marketplace-funding', file: '__e2e__/marketplace/funding.spec.ts', grep: 'marketplace funding 2\\. funds a native plain job', needs: { masterPC: '1' }, env: { MARKETPLACE_FUNDING_E2E: '1', AGW_E2E_AGENT_PC: '0.1' }, note: '0.01 pUSDC escrow using native atomic approval/funding and a controlled manual evaluator.' }, + { id: 'marketplace-funding-origin', group: 'marketplace-funding', file: '__e2e__/marketplace/funding.spec.ts', grep: 'marketplace funding 3\\. bridges principal', needs: { masterPC: '1' }, env: { MARKETPLACE_FUNDING_E2E: '1', AGW_E2E_AGENT_PC: '0.1' }, note: 'Fresh BSC owner, 0.01 USDT principal, up to 0.01 pBNB for source-gas setup; explicit token cleanup.' }, + { id: 'marketplace-native-lifecycle', group: 'marketplace-live', file: '__e2e__/marketplace/lifecycle.spec.ts', grep: 'marketplace live 1\\. native provider registration', needs: { masterPC: '0.5' }, env: { MARKETPLACE_LIVE_E2E: '1', AGW_E2E_AGENT_PC: '0.1' }, note: 'Fresh provider/card/wallet only; no principal export or fee escrow. Cancels and revokes its own permission.' }, + { id: 'marketplace-paid-preview', group: 'marketplace-live', file: '__e2e__/marketplace/lifecycle.spec.ts', grep: 'marketplace live 2\\. paid JobSpec preview', needs: { masterPC: '0.5' }, env: { MARKETPLACE_LIVE_E2E: '1', AGW_E2E_AGENT_PC: '0.1' }, note: 'One live validator read through the registry, with an explicit 0.01 PC callback/protocol fee cap.' }, + { id: 'marketplace-external-owner', group: 'marketplace-live', file: '__e2e__/marketplace/lifecycle.spec.ts', grep: 'marketplace live 3\\. external EVM owner', needs: { masterPC: '0.5' }, env: { MARKETPLACE_LIVE_E2E: '1', AGW_E2E_AGENT_PC: '0.1' }, note: 'Fresh Sepolia-origin UEA funded with 0.1 PC; open/cancel using the real UEA transport; reuses this run’s card.' }, + { id: 'marketplace-readonly-bindings', group: 'marketplace', file: '__e2e__/marketplace/readiness.spec.ts', grep: 'marketplace deployed v2 read-only', needs: {}, note: 'Unfunded public SDK card/job enumeration and capability gates; no signing keys.' }, + { + id: 'agw-svm-replay-positive', + group: 'agw-svm-replay', + file: '__e2e__/agw-svm-wire/replay.spec.ts', + grep: 'agw svm recorded replay 1\\. positive replay', + needs: {}, + env: { AGW_SVM_WIRE_REPLAY_E2E: '1' }, + }, + { + id: 'agw-svm-replay-rejected', + group: 'agw-svm-replay', + file: '__e2e__/agw-svm-wire/replay.spec.ts', + grep: 'agw svm recorded replay 2\\. later terminal rejection', + needs: {}, + env: { AGW_SVM_WIRE_REPLAY_E2E: '1' }, + }, + { + id: 'agw-svm-replay-policy', + group: 'agw-svm-replay', + file: '__e2e__/agw-svm-wire/replay.spec.ts', + grep: 'agw svm recorded replay 3\\. pinned live policy', + needs: {}, + env: { AGW_SVM_WIRE_REPLAY_E2E: '1' }, + }, + { + id: 'agw-svm-wire-positive', + group: 'agw-svm-wire', + file: '__e2e__/agw-svm-wire/outbound.spec.ts', + grep: 'agw svm wire 1\\. positive outbound', + needs: { masterPC: '45', masterPSOL: '0.00002' }, + env: { AGW_SVM_WIRE_E2E: '1' }, + note: 'Internal prepared-wire backend; public SVM capability remains gated.', + }, + { + id: 'agw-svm-wire-refusals', + group: 'agw-svm-wire', + file: '__e2e__/agw-svm-wire/outbound.spec.ts', + grep: 'agw svm wire 2\\. substituted account', + needs: { masterPC: '45', masterPSOL: '0.00002' }, + env: { AGW_SVM_WIRE_E2E: '1' }, + }, + { + id: 'agw-svm-wire-failure', + group: 'agw-svm-wire', + file: '__e2e__/agw-svm-wire/outbound.spec.ts', + grep: 'agw svm wire 3\\. destination program failure', + needs: { masterPC: '45', masterPSOL: '0.00002' }, + env: { AGW_SVM_WIRE_E2E: '1' }, + }, // --------------------------------------------------------------------------- // smoke — read-only. No transactions, no funds. Runs first so a broken build or // a dead RPC fails in ~3 min instead of 90. @@ -615,8 +695,11 @@ export const SCENARIOS: Scenario[] = [ note: 'prepareRead → simulateRead → sendTransaction → trackRead → value == Sepolia balance at pin.', }, { - id: 'read-canonical-registry', group: 'read', file: F.readRegistry, - grep: 'read state › canonical registry', needs: { masterPC: '0.2' }, + id: 'read-canonical-registry', + group: 'read', + file: F.readRegistry, + grep: 'read state › canonical registry', + needs: { masterPC: '0.2' }, note: 'Callback-free read plus a second pin: verifies per-request storage, stable-key latestResult and settlement.', }, { @@ -673,16 +756,25 @@ export const SCENARIOS: Scenario[] = [ note: 'Funds a fresh wallet with 0.5 PC, as the docs prompt will.', }, { - id: 'read-docs-evm-balance', group: 'read', file: F.readPlaygrounds, - grep: 'docs-examples › 13-read-state playgrounds universal_read_evm_balance', needs: { masterPC: '0.1' }, + id: 'read-docs-evm-balance', + group: 'read', + file: F.readPlaygrounds, + grep: 'docs-examples › 13-read-state playgrounds universal_read_evm_balance', + needs: { masterPC: '0.1' }, }, { - id: 'read-docs-batch', group: 'read', file: F.readPlaygrounds, - grep: 'docs-examples › 13-read-state playgrounds universal_read_batch', needs: { masterPC: '0.1' }, + id: 'read-docs-batch', + group: 'read', + file: F.readPlaygrounds, + grep: 'docs-examples › 13-read-state playgrounds universal_read_batch', + needs: { masterPC: '0.1' }, }, { - id: 'read-docs-resume', group: 'read', file: F.readPlaygrounds, - grep: 'docs-examples › 13-read-state playgrounds universal_read_resume', needs: { masterPC: '0.1' }, + id: 'read-docs-resume', + group: 'read', + file: F.readPlaygrounds, + grep: 'docs-examples › 13-read-state playgrounds universal_read_resume', + needs: { masterPC: '0.1' }, note: 'Read-only resume (own request ID, predefined request ID, tx hash); seeds a request if the balance example was not selected.', }, { @@ -702,37 +794,55 @@ export const SCENARIOS: Scenario[] = [ note: 'Same batch through the UEA — one atomic tx.', }, { - id: 'read-app-batch-recovery', group: 'read', file: F.readBatch, + id: 'read-app-batch-recovery', + group: 'read', + file: F.readBatch, grep: 'read state › custom app batch recovers the committed read', needs: { masterPC: '0.1' }, note: 'Force sequential wallet execution; recover the first read after the second request fails.', }, { - id: 'read-api-token', group: 'read', file: F.readApi, - grep: 'read state › public API coverage ERC20 shorthand', needs: { masterPC: '0.1' }, + id: 'read-api-token', + group: 'read', + file: F.readApi, + grep: 'read state › public API coverage ERC20 shorthand', + needs: { masterPC: '0.1' }, }, { - id: 'read-api-mixed-outcomes', group: 'read', file: F.readApi, - grep: 'read state › public API coverage mixed consensus outcomes', needs: { masterPC: '0.3' }, + id: 'read-api-mixed-outcomes', + group: 'read', + file: F.readApi, + grep: 'read state › public API coverage mixed consensus outcomes', + needs: { masterPC: '0.3' }, }, { - id: 'read-svm-token-auto', group: 'read', file: F.readSvmIdl, + id: 'read-svm-token-auto', + group: 'read', + file: F.readSvmIdl, grep: 'read state › Solana automatic token and IDL account reads detects the mint program', needs: { masterPC: '0.1' }, }, { - id: 'read-svm-idl', group: 'read', file: F.readSvmIdl, + id: 'read-svm-idl', + group: 'read', + file: F.readSvmIdl, grep: 'read state › Solana automatic token and IDL account reads decodes a real Anchor account', needs: { masterPC: '0.1' }, }, { - id: 'read-evm-any-mutability', group: 'read', file: F.readMutability, - grep: 'read state › EVM nonpayable and payable functions', needs: { masterPC: '0.1' }, + id: 'read-evm-any-mutability', + group: 'read', + file: F.readMutability, + grep: 'read state › EVM nonpayable and payable functions', + needs: { masterPC: '0.1' }, note: 'QuoterV2 (nonpayable) + Multicall3.aggregate (payable) simulated at the pinned block.', }, { - id: 'read-svm-raw', group: 'read', file: F.readSvmRaw, - grep: 'read state › SVM raw account', needs: { masterPC: '0.1' }, + id: 'read-svm-raw', + group: 'read', + file: F.readSvmRaw, + grep: 'read state › SVM raw account', + needs: { masterPC: '0.1' }, }, // --------------------------------------------------------------------------- @@ -753,15 +863,374 @@ export const SCENARIOS: Scenario[] = [ '(balance - reserve, the pre-fix behaviour) where the test expects the full ' + '~20.9 PC requirement. Real regression in the Route 2 dead-zone gas sizer.', }, + + // ------------------------------------------------------------------------- + // agw — agentic wallets. EXCLUDED from `all`: every spec's beforeAll fails + // its prerequisite gate until a verified compatible AGW deployment manifest + // (AGW_DEPLOYMENT_MANIFEST) exists. Preflight + // refuses to fund the group without it. Budgets are per run: the Push master + // (owner) pays setup gas, wallet PC and the bounded fresh-agent funding; + // the EVM master's UEA pays external-agent gas; pETH funds the outbound. + // ------------------------------------------------------------------------- + { + id: 'agw-create-bare', + group: 'agw', + file: F.agwCreate, + grep: 'agw create 1\\. bare wallet', + needs: { masterPC: '2' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-create-rules', + group: 'agw', + file: F.agwCreate, + grep: 'agw create 2\\. wallet with a native rule', + needs: { masterPC: '2' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-funding-pc', + group: 'agw', + file: F.agwFunding, + grep: 'agw funding 1\\. wallet PC', + needs: { masterPC: '1' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-funding-allowance', + group: 'agw', + file: F.agwFunding, + grep: 'agw funding 2\\. owner sets and removes', + needs: { masterPC: '1' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-native-batch', + group: 'agw', + file: '__e2e__/agw/native-batch.spec.ts', + grep: 'agw native batch 1\\. sender-preserving atomic', + needs: { masterPC: '2' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-native-batch-rollback', + group: 'agw', + file: '__e2e__/agw/native-batch.spec.ts', + grep: 'agw native batch 2\\. a later policy failure', + needs: { masterPC: '2' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-native-agent', + group: 'agw', + file: F.agwNative, + grep: 'agw native 1\\. agent door', + needs: { masterPC: '2' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-native-owner', + group: 'agw', + file: F.agwNative, + grep: 'agw native 2\\. owner door', + needs: { masterPC: '0.5' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-native-over-cap', + group: 'agw', + file: F.agwNative, + grep: 'agw native 3\\. over-cap', + needs: { masterPC: '0.5' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-native-stranger', + group: 'agw', + file: F.agwNative, + grep: 'agw native 4\\. an unrelated signer', + needs: { masterPC: '0.1' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-native-revoked', + group: 'agw', + file: F.agwNative, + grep: 'agw native 5\\. after revocation', + needs: { masterPC: '0.5' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-native-expired', + group: 'agw', + file: F.agwNative, + grep: 'agw native 6\\. an expired rule', + needs: { masterPC: '1' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-lifecycle-add', + group: 'agw', + file: F.agwLifecycle, + grep: 'agw lifecycle 1\\. rules\\.add', + needs: { masterPC: '2' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-lifecycle-update', + group: 'agw', + file: F.agwLifecycle, + grep: 'agw lifecycle 2\\. rules\\.update', + needs: { masterPC: '1' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-lifecycle-checkpoints', + group: 'agw', + file: F.agwLifecycle, + grep: 'agw lifecycle 3\\. checkpoint history', + needs: { masterPC: '0.1' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-lifecycle-revoke-all', + group: 'agw', + file: F.agwLifecycle, + grep: 'agw lifecycle 4\\. revoke', + needs: { masterPC: '0.5' }, + env: { AGW_E2E: '1' }, + }, + ...Array.from({ length: 6 }, (_, i) => ({ + id: `agw-unchanged-preset-${i + 1}`, + group: 'agw-presets-acceptance' as const, + file: '__e2e__/agw/presets-acceptance.spec.ts', + grep: `agw unchanged preset acceptance ${i + 1}\\.`, + needs: { masterPC: '55' }, + env: { AGW_E2E: '1' }, + note: 'Exact public defaults: the owner sends 2 bounded ETH amounts as the chain gas PRC20, and the agent wraps and uses them.', + })), + ...Array.from({ length: 4 }, (_, i) => ({ + id: `agw-evm-gas-${i + 1}`, + group: 'agw-gas' as const, + file: '__e2e__/agw/gas-live.spec.ts', + grep: `agw live gas sizing ${i + 1}\\.`, + needs: { masterPC: '26' }, + env: { AGW_E2E: '1' }, + note: 'Two native outbounds; exact per-chain PRC20 balances are checked by the scenario before wallet creation.', + })), + ...['Sepolia', 'Base Sepolia', 'Arbitrum Sepolia'].map((name, i) => ({ + id: `agw-exact-route-${i + 1}`, + group: 'agw-exact-routes' as const, + file: '__e2e__/agw/exact-routes-live.spec.ts', + grep: `agw exact route outbound ${i + 1}\\.`, + needs: { masterPC: '26' }, + env: { AGW_E2E: '1' }, + note: `${name} Circle USDC node route; the owner must hold its exact PRC20.`, + })), + { + id: 'agw-tokens-only-owner', + group: 'agw-tokens-only', + file: '__e2e__/agw/tokens-only-live.spec.ts', + grep: 'agw tokens-only live 1\\.', + needs: { masterPC: '30' }, + env: { AGW_E2E: '1' }, + note: 'Sepolia Circle USDC back to the owner; the owner must hold its exact PRC20.', + }, + { + id: 'agw-tokens-only-all', + group: 'agw-tokens-only', + file: '__e2e__/agw/tokens-only-live.spec.ts', + grep: 'agw tokens-only live 2\\.', + needs: { masterPC: '2' }, + env: { AGW_E2E: '1' }, + note: 'Create only: MOVEABLE ALL expands to every routable Sepolia token.', + }, + ...[1, 2].map((n) => ({ + id: `agw-svm-memo-${n}`, + group: 'agw-svm-memo' as const, + file: '__e2e__/agw/svm-memo-live.spec.ts', + grep: `agw svm memo ${n}\\.`, + needs: { masterPC: '26' }, + env: { AGW_E2E: '1' }, + })), + { + id: 'agw-agent-spl-acceptance', + group: 'agw-svm-agent-spl', + file: '__e2e__/agw/svm-agent-spl.spec.ts', + grep: 'agw public agent spl 1\\.', + needs: { masterPC: '45', masterUsdtSol: '0.002' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-v6-destination-pins', + group: 'agw', + file: '__e2e__/agw/universal-evm.spec.ts', + grep: 'agw universal evm 3\\. v6 destination', + needs: { masterPC: '25' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-universal-outbound', + group: 'agw', + file: F.agwUniversal, + grep: 'agw universal evm 1\\. positive-amount outbound', + needs: { masterPC: '25', masterPETH: '0.00001' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-v5-multi-asset', + group: 'agw', + file: '__e2e__/agw/v5-multiasset.spec.ts', + grep: 'agw v5 multi-asset 1\\. public create', + needs: { masterPC: '2' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-v5-call-only', + group: 'agw', + file: '__e2e__/agw/v5-multiasset.spec.ts', + grep: 'agw v5 multi-asset 2\\. empty user assets', + needs: { masterPC: '25' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-universal-dest-revert', + group: 'agw', + file: F.agwUniversal, + grep: 'agw universal evm 2\\. destination revert', + needs: { masterPC: '5' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-identity-evm', + group: 'agw', + file: F.agwIdentity, + grep: 'agw identity 1\\. an EVM key on Sepolia', + needs: { masterPC: '1', ueaPC: '1' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-identity-first-use', + group: 'agw', + file: F.agwIdentity, + grep: 'agw identity 2\\. first use', + needs: { masterPC: '1', sepoliaEth: '0.003' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-identity-solana', + group: 'agw', + file: F.agwIdentity, + grep: 'agw identity 3\\. a Solana-origin key', + needs: { masterPC: '1' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-responses-hooks', + group: 'agw', + file: F.agwResponses, + grep: 'agw responses 1\\. init and per-call hooks', + needs: { masterPC: '1' }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-responses-replay', + group: 'agw', + file: F.agwResponses, + grep: 'agw responses 2\\. live and replayed', + needs: { masterPC: '0.5' }, + env: { AGW_E2E: '1' }, + }, + + ...Array.from({ length: 6 }, (_, i) => ({ + id: `agw-public-svm-${i + 1}`, + group: 'agw' as const, + file: '__e2e__/agw/svm-public.spec.ts', + grep: `agw public svm ${i + 1}\\.`, + needs: { masterPC: '45', masterPSOL: '0.000020001' }, + env: { AGW_E2E: '1' }, + })), + + ...Array.from({ length: 8 }, (_, i) => ({ + id: `agw-labels-${i + 1}`, + group: 'agw' as const, + file: '__e2e__/agw/labels.spec.ts', + grep: `agw labels ${i + 1}\\.`, + needs: + i === 4 + ? { masterPC: '4', sepoliaEth: '0.003' } + : i === 5 + ? { masterPC: '4', solanaSOL: '0.003' } + : { masterPC: '1' }, + env: { AGW_E2E: '1' }, + })), + + { + id: 'agw-v5-independent-token-budgets', + group: 'agw', + file: '__e2e__/agw/v5-multiasset.spec.ts', + grep: 'agw v5 multi-asset 3\\.', + needs: { + masterPC: '45', + masterPETH: '0.000001000000000001', + masterUsdcEth: '0.000011', + }, + env: { AGW_E2E: '1' }, + }, + { + id: 'agw-owner-spl-transfer', + group: 'agw', + file: '__e2e__/agw/svm-spl-transfer.spec.ts', + grep: 'agw svm spl transfer 1\\.', + needs: { masterPC: '23', masterUsdtSol: '0.001' }, + env: { AGW_E2E: '1' }, + }, + + ...Array.from({ length: 10 }, (_, i) => ({ + id: `agw-native-multi-action-${i + 1}`, + group: 'agw' as const, + file: '__e2e__/agw/native-multi-action.spec.ts', + grep: `agw native multi-action ${i + 1}\\.`, + needs: { masterPC: '1', masterPETH: '0.00000000000000004' }, + env: { AGW_E2E: '1' }, + })), + + // Extended AGW tests are opt-in and use bounded per-scenario testnet budgets. + ...[ + ['prefunding', '1\\. prefunding', '11'], + ['duplicate-rules', '2\\. create and add reject duplicate', '11'], + ['batched-lifecycle', '3\\. multi-rule add', '0.5'], + ['invalid-revoke', '4\\. invalid revoke', '0.5'], + ['stale-update', '5\\. intervening agent spend', '11'], + ['index-race', '6\\. index race', '1'], + ].map(([slug, grep, pc]) => ({ + id: `agw-extended-${slug}`, + group: 'agw' as const, + file: F.agwExtendedManagement, + grep: `agw extended management ${grep}`, + needs: { masterPC: pc }, + env: { AGW_E2E: '1' }, + })), + ...Array.from({ length: 11 }, (_, i) => ({ + id: `agw-extended-native-policy-${i + 1}`, + group: 'agw' as const, + file: F.agwExtendedNative, + grep: `agw extended native policy ${i + 1}\\.`, + needs: { masterPC: '0.25', masterPETH: '0.000000000001' }, + env: { AGW_E2E: '1' }, + })), ]; /** * Scenarios for a group. `all` means "everything that should pass" — it deliberately - * excludes `known-fail`, which has to be asked for by name. + * excludes `known-fail` and every AGW group, which must be requested by name. */ export function scenariosFor(group: string | undefined): Scenario[] { if (!group || group === 'all') { - return SCENARIOS.filter((s) => s.group !== 'known-fail'); + // AGW stays opt-in: scenarios create/fund fresh wallets and consume testnet funds. + return SCENARIOS.filter( + (s) => s.group !== 'known-fail' && !s.group.startsWith('agw') && !s.group.startsWith('marketplace') + ); } if (!(GROUPS as readonly string[]).includes(group)) { throw new Error( @@ -777,7 +1246,10 @@ export function aggregateNeeds( ): Partial> { const total: Partial> = {}; for (const s of scenarios) { - for (const [asset, amount] of Object.entries(s.needs) as [Asset, string][]) { + for (const [asset, amount] of Object.entries(s.needs) as [ + Asset, + string + ][]) { total[asset] = (total[asset] ?? 0) + Number(amount); } } diff --git a/packages/core/__e2e__/marketplace/funding.spec.ts b/packages/core/__e2e__/marketplace/funding.spec.ts new file mode 100644 index 00000000..4d92181d --- /dev/null +++ b/packages/core/__e2e__/marketplace/funding.spec.ts @@ -0,0 +1,419 @@ +/** Opt-in acceptance with bounded tokens owned by the configured test master. No public impersonation. */ +import { + createPublicClient, + createWalletClient, + encodeFunctionData, + erc20Abi, + http, + parseAbi, + parseEther, + zeroAddress, + zeroHash, + type Address, + type Hex, +} from 'viem'; +import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'; +import { PushChain } from '../../src'; +import { CHAIN } from '../../src/lib/constants/enums'; +import { CHAIN_INFO } from '../../src/lib/constants/chain'; +import { JOB_KERNEL_ABI } from '../../src/lib/market/contracts/AgenticCommerce'; +import { DONUT_MARKETPLACE as D } from '../../src/lib/market/deployment'; +import { setupAgw, evmClient, type AgwFixture } from '../agw/_fixture'; +const d = + process.env['MARKETPLACE_FUNDING_E2E'] === '1' ? describe : describe.skip; +const principalToken = '0x731aF1Da5365259d27528557EE4aFBA4baC90ef2' as Address; +const budget = BigInt(10000); // 0.01 pUSDC per paid job, returned to the master after payout. +d('marketplace funding', () => { + let f: AgwFixture; + let owner: PushChain; + let provider: PushChain; + let evaluator: PushChain; + let ownerKey: Hex; + let cardId: bigint; + const wallets: { key: Hex; origin: CHAIN; wallet: Address }[] = []; + const jobs: { jobId: bigint; market: boolean; client: PushChain }[] = []; + const sendToken = async ( + client: PushChain, + token: Address, + to: Address, + amount: bigint + ) => { + const tx = await client.universal.sendTransaction({ + to: token, + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [to, amount], + }), + }); + await tx.wait(); + return tx; + }; + const balance = (token: Address, account: Address) => + f.push.readContract({ + address: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [account], + }); + const complete = async (jobId: bigint) => { + const tx = await evaluator.universal.sendTransaction({ + to: D.kernel, + data: encodeFunctionData({ + abi: JOB_KERNEL_ABI, + functionName: 'complete', + args: [jobId, zeroHash, '0x'], + }), + }); + await tx.wait(); + return tx; + }; + beforeAll(async () => { + f = await setupAgw(); + if ( + (await balance(principalToken, f.ownerAddress)) < BigInt(1) || + (await balance(D.paymentToken, f.ownerAddress)) < budget * BigInt(3) + ) + throw new Error( + 'Configured Push master needs 1 pUSDT.bnb unit and 0.03 pUSDC for this bounded acceptance' + ); + ownerKey = generatePrivateKey(); + owner = await evmClient( + ownerKey, + CHAIN.PUSH_TESTNET_DONUT, + f.manifest.network + ); + provider = await evmClient( + f.agentKey, + CHAIN.PUSH_TESTNET_DONUT, + f.manifest.network + ); + evaluator = await evmClient( + generatePrivateKey(), + CHAIN.PUSH_TESTNET_DONUT, + f.manifest.network + ); + await f.fundPC(owner.universal.account as Address, parseEther('0.3')); + await f.fundPC(evaluator.universal.account as Address, parseEther('0.1')); + const token = PushChain.CONSTANTS.MOVEABLE.TOKEN.BNB_TESTNET.USDT + .address as Address; + const template = PushChain.utils.job.buildJobSpecTemplate({ + reads: [ + PushChain.utils.job.prepareRead({ + chain: CHAIN.BNB_TESTNET, + target: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: ['agentic:wallet'], + }), + ], + checks: [ + { + read: 0, + evaluation: 'COMPARE', + operation: 'GREATER_OR_EQUAL', + target: BigInt(0), + }, + ], + logic: 'ALL', + }); + const registered = await provider.market.agent.register( + { + jobType: 'SDK_FUNDING_ACCEPTANCE', + metadataURI: 'https://example.invalid/sdk-funding-acceptance', + metadataHash: ('0x' + '56'.repeat(32)) as Hex, + chain: CHAIN.BNB_TESTNET, + providerFee: budget, + paymentToken: D.paymentToken, + principalMin: BigInt(1), + principalMax: BigInt(10000), + minDuration: 3600, + maxDuration: 86400, + minExecuteWindow: 0, + settleWindow: 60, + }, + { + rules: { + assets: [ + { + token: { prc20: principalToken }, + maxPerCall: 'agentic:principal', + maxTotal: 'agentic:principal', + }, + ], + principalAsset: 0, + maxGasPerCall: BigInt(0), + allowedCalls: [ + { + target: token, + selector: 'balanceOf(address)', + pins: [{ arg: 0, expected: 'agentic:wallet' }], + }, + ], + }, + jobSpecTemplate: template, + } + ); + cardId = registered.cardId; + f.evidence('marketplace-funding-register', { + cardId, + txHash: registered.tx.hash, + }); + }, 300000); + afterAll(async () => { + try { + for (const j of jobs) { + let status = (await j.client.job.status(j.jobId)).status; + if (status === 'Open') + await (await j.client.job.cancel(j.jobId)).wait(); + if (!j.market && status === 'Funded') { + await ( + await provider.job.submit(j.jobId, { + deliverable: 'SDK acceptance cleanup', + }) + ).wait(); + status = 'Submitted'; + } + if (!j.market && status === 'Submitted') await complete(j.jobId); + } + for (const w of wallets) { + const client = await evmClient( + w.key, + w.origin, + f.manifest.network, + w.wallet + ); + for (const token of [principalToken, D.paymentToken]) { + const held = await balance(token, w.wallet); + if (held) await sendToken(client, token, f.ownerAddress, held); + } + } + for (const client of [provider, evaluator, owner]) { + if (!client) continue; + const held = await balance( + D.paymentToken, + client.universal.account as Address + ); + if (held) await sendToken(client, D.paymentToken, f.ownerAddress, held); + } + if (cardId && (await provider.market.card(cardId)).active) + await (await provider.market.agent.setActive(cardId, false)).wait(); + f?.evidence('marketplace-funding-cleanup', { + cardId, + jobs: await Promise.all( + jobs.map(async (j) => ({ + jobId: j.jobId, + status: (await j.client.job.status(j.jobId)).status, + })) + ), + }); + } finally { + f?.teardown(); + } + }, 300000); + it('1. deposits real principal and fee, cancels the market job, then pays an AGW plain job through a controlled manual evaluator', async () => { + await sendToken( + f.owner, + principalToken, + owner.universal.account as Address, + BigInt(1) + ); + await sendToken( + f.owner, + D.paymentToken, + owner.universal.account as Address, + budget + ); + const now = Number((await f.push.getBlock()).timestamp); + const plan = await owner.market.preview(cardId, { + principal: BigInt(1), + executeBy: now + 600, + expiredAt: now + 7200, + }); + const opened = await owner.market.openJob(plan); + jobs.push({ jobId: opened.jobId, market: true, client: owner }); + wallets.push({ + key: ownerKey, + origin: CHAIN.PUSH_TESTNET_DONUT, + wallet: opened.wallet, + }); + const deposited = await owner.market.deposit(opened.jobId, { + pcAmount: parseEther('0.001'), + }); + expect(await balance(principalToken, opened.wallet)).toBe(BigInt(1)); + expect(await balance(D.paymentToken, opened.wallet)).toBe(budget); + const recovered = await owner.market.openJob(plan, { resume: opened.tx }); + expect(recovered.jobId).toBe(opened.jobId); + await (await owner.job.cancel(opened.jobId)).wait(); + const client = await evmClient( + ownerKey, + CHAIN.PUSH_TESTNET_DONUT, + f.manifest.network, + opened.wallet + ); + const plain = await client.job.create({ + provider: provider.universal.account as Address, + evaluator: evaluator.universal.account as Address, + hook: zeroAddress, + expiredAt: now + 7200, + paymentToken: D.paymentToken, + description: 'SDK live escrow and manual evaluator acceptance', + }); + jobs.push({ jobId: plain.jobId, market: false, client }); + await (await provider.job.setBudget(plain.jobId, budget)).wait(); + const before = await balance( + D.paymentToken, + provider.universal.account as Address + ); + const funded = await client.job.fund(plain.jobId, { + expectedBudget: budget, + }); + await funded.wait(); + expect((await client.job.status(plain.jobId)).status).toBe('Funded'); + expect(await balance(D.paymentToken, opened.wallet)).toBe(BigInt(0)); + await ( + await provider.job.submit(plain.jobId, { + deliverable: 'SDK live manual evaluator proof', + }) + ).wait(); + const completed = await complete(plain.jobId); + expect((await client.job.status(plain.jobId)).status).toBe('Completed'); + expect( + await balance(D.paymentToken, provider.universal.account as Address) + ).toBeGreaterThan(before); + f.evidence('marketplace-funding-agw-paid', { + cardId, + marketJobId: opened.jobId, + plainJobId: plain.jobId, + wallet: opened.wallet, + depositHashes: deposited.txs.map((t) => t.tx.hash), + fundingHash: funded.hash, + completionHash: completed.hash, + budget, + }); + }, 600000); + it('2. funds a native plain job with an atomic token approval and pays out on live Donut', async () => { + await sendToken( + f.owner, + D.paymentToken, + owner.universal.account as Address, + budget + ); + const now = Number((await f.push.getBlock()).timestamp); + const created = await owner.job.create({ + provider: provider.universal.account as Address, + evaluator: evaluator.universal.account as Address, + hook: zeroAddress, + expiredAt: now + 7200, + paymentToken: D.paymentToken, + description: 'SDK live native escrow acceptance', + }); + jobs.push({ jobId: created.jobId, market: false, client: owner }); + await (await provider.job.setBudget(created.jobId, budget)).wait(); + const funded = await owner.job.fund(created.jobId, { + expectedBudget: budget, + }); + await funded.wait(); + expect(funded.atomic).toBe(true); + expect((await owner.job.status(created.jobId)).status).toBe('Funded'); + await ( + await provider.job.submit(created.jobId, { + deliverable: 'SDK native acceptance', + }) + ).wait(); + const completed = await complete(created.jobId); + expect((await owner.job.status(created.jobId)).status).toBe('Completed'); + f.evidence('marketplace-funding-native-paid', { + jobId: created.jobId, + fundingHash: funded.hash, + completionHash: completed.hash, + budget, + }); + }, 600000); + it('3. bridges principal from a fresh BSC origin into the opened wallet and recovers its funds after cancellation', async () => { + const sourceKey = process.env['EVM_PRIVATE_KEY'] as Hex; + if (!sourceKey) + throw new Error('EVM_PRIVATE_KEY is required for owned BSC test funding'); + const info = CHAIN_INFO[CHAIN.BNB_TESTNET]; + const bsc = createPublicClient({ transport: http(info.defaultRPC[0]) }); + const master = createWalletClient({ + account: privateKeyToAccount(sourceKey), + transport: http(info.defaultRPC[0]), + }); + if ( + (await bsc.getBalance({ address: master.account.address })) < + parseEther('0.01') + ) { + const gas = await f.owner.universal.sendTransaction({ + to: { address: master.account.address, chain: CHAIN.BNB_TESTNET }, + value: parseEther('0.01'), + }); + await gas.wait(); + f.evidence('marketplace-funding-bsc-gas', { + txHash: gas.hash, + amount: parseEther('0.01'), + }); + } + const key = generatePrivateKey(); + const address = privateKeyToAccount(key).address; + const gasHash = await master.sendTransaction({ + to: address, + value: parseEther('0.005'), + chain: null, + }); + await bsc.waitForTransactionReceipt({ hash: gasHash }); + const tokenHash = await master.writeContract({ + address: PushChain.CONSTANTS.MOVEABLE.TOKEN.BNB_TESTNET.USDT + .address as Address, + abi: erc20Abi, + functionName: 'transfer', + args: [address, BigInt(10000)], + chain: null, + }); + await bsc.waitForTransactionReceipt({ hash: tokenHash }); + const external = await evmClient( + key, + CHAIN.BNB_TESTNET, + f.manifest.network + ); + const uea = external.universal.account as Address; + const deploy = await f.owner.universal.sendTransaction({ + to: '0x00000000000000000000000000000000000000eA', + data: encodeFunctionData({ + abi: parseAbi([ + 'function deployUEA((string chainNamespace,string chainId,bytes owner) id) returns (address)', + ]), + functionName: 'deployUEA', + args: [{ chainNamespace: 'eip155', chainId: '97', owner: address }], + }), + }); + await deploy.wait(); + await f.fundPC(uea, parseEther('0.2')); + const now = Number((await f.push.getBlock()).timestamp); + const plan = await external.market.preview(cardId, { + principal: BigInt(10000), + executeBy: now + 600, + expiredAt: now + 7200, + }); + const opened = await external.market.openJob(plan); + jobs.push({ jobId: opened.jobId, market: true, client: external }); + wallets.push({ key, origin: CHAIN.BNB_TESTNET, wallet: opened.wallet }); + await sendToken(f.owner, D.paymentToken, opened.wallet, budget); + const deposited = await external.market.deposit(opened.jobId, { + funding: 'origin', + pcAmount: BigInt(0), + }); + expect(await balance(principalToken, opened.wallet)).toBe(BigInt(10000)); + expect(deposited.txs.map((t) => t.step)).toEqual(['PRINCIPAL']); + await (await external.job.cancel(opened.jobId)).wait(); + f.evidence('marketplace-funding-origin', { + cardId, + jobId: opened.jobId, + wallet: opened.wallet, + uea, + depositHashes: deposited.txs.map((t) => t.tx.hash), + principal: BigInt(10000), + origin: CHAIN.BNB_TESTNET, + }); + }, 900000); +}); diff --git a/packages/core/__e2e__/marketplace/lifecycle.spec.ts b/packages/core/__e2e__/marketplace/lifecycle.spec.ts new file mode 100644 index 00000000..e2144172 --- /dev/null +++ b/packages/core/__e2e__/marketplace/lifecycle.spec.ts @@ -0,0 +1,276 @@ +/** Opt-in funded Donut smoke. Only PC gas/fresh provider funding moves; principal and escrow stay zero. */ +import { encodeFunctionData, parseAbi, parseEther, type Address } from 'viem'; +import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'; +import { PushChain } from '../../src'; +import { CHAIN } from '../../src/lib/constants/enums'; +import { setupAgw, evmClient, type AgwFixture } from '../agw/_fixture'; +import { DONUT_MARKETPLACE as D } from '../../src/lib/market/deployment'; +const d = + process.env['MARKETPLACE_LIVE_E2E'] === '1' ? describe : describe.skip; +d('marketplace live', () => { + let f: AgwFixture; + let provider: PushChain; + let owner: PushChain; + let externalOwner: PushChain | undefined; + let externalOpened: { jobId: bigint; wallet: Address } | undefined; + let cardId: bigint | undefined; + let opened: + | { jobId: bigint; wallet: Address; rulesId: `0x${string}` } + | undefined; + beforeAll(async () => { + f = await setupAgw(); + provider = await evmClient( + f.agentKey, + CHAIN.PUSH_TESTNET_DONUT, + f.manifest.network + ); + const ownerKey = generatePrivateKey(); + owner = await evmClient( + ownerKey, + CHAIN.PUSH_TESTNET_DONUT, + f.manifest.network + ); + await f.fundPC(owner.universal.account as Address, parseEther('0.1')); + }, 300000); + afterAll(async () => { + // Best-effort cleanup after failures, restricted to this run's own fresh card and wallet. + if (opened && (await owner.job.status(opened.jobId)).status === 'Open') + await (await owner.job.cancel(opened.jobId)).wait(); + if ( + externalOwner && + externalOpened && + (await externalOwner.job.status(externalOpened.jobId)).status === 'Open' + ) + await (await externalOwner.job.cancel(externalOpened.jobId)).wait(); + if (cardId && (await provider.market.card(cardId)).active) + await (await provider.market.agent.setActive(cardId, false)).wait(); + f?.teardown(); + }); + it('1. native provider registration, reviewed open and atomic cancel/revoke on BSC Testnet', async () => { + const target = PushChain.CONSTANTS.MOVEABLE.TOKEN.BNB_TESTNET.USDT + .address as Address; + const read = PushChain.utils.job.prepareRead({ + chain: CHAIN.BNB_TESTNET, + target, + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: [PushChain.CONSTANTS.AGENTIC.WALLET], + }); + const template = PushChain.utils.job.buildJobSpecTemplate({ + reads: [read], + checks: [ + { + read: 0, + evaluation: 'COMPARE', + operation: 'GREATER_OR_EQUAL', + target: BigInt(0), + }, + ], + logic: 'ALL', + }); + const registered = await provider.market.agent.register( + { + jobType: 'SDK_MARKETPLACE_SMOKE', + metadataURI: 'https://example.invalid/push-sdk-test', + metadataHash: ('0x' + '34'.repeat(32)) as `0x${string}`, + chain: CHAIN.BNB_TESTNET, + providerFee: BigInt(0), + paymentToken: D.paymentToken, + principalMin: BigInt(1), + principalMax: BigInt(1), + minDuration: 3600, + maxDuration: 86400, + minExecuteWindow: 0, + settleWindow: 60, + }, + { + rules: { + assets: [ + { + token: { prc20: '0x731aF1Da5365259d27528557EE4aFBA4baC90ef2' }, + maxPerCall: PushChain.CONSTANTS.AGENTIC.PRINCIPAL, + maxTotal: PushChain.CONSTANTS.AGENTIC.PRINCIPAL, + }, + ], + principalAsset: 0, + maxGasPerCall: BigInt(0), + allowedCalls: [ + { + target, + selector: 'balanceOf(address)', + pins: [{ arg: 0, expected: PushChain.CONSTANTS.AGENTIC.WALLET }], + }, + ], + }, + jobSpecTemplate: template, + } + ); + cardId = registered.cardId; + f.evidence('marketplace-register', { cardId, txHash: registered.tx.hash }); + const now = Number((await f.push.getBlock()).timestamp); + const plan = await owner.market.preview(cardId, { + principal: BigInt(1), + executeBy: now + 600, + expiredAt: now + 7200, + label: 'marketplace-e2e', + }); + const result = await owner.market.openJob(plan); + opened = result; + f.evidence('marketplace-open', { + jobId: result.jobId, + wallet: result.wallet, + rulesId: result.rulesId, + txHash: result.tx.hash, + }); + const status = await owner.job.status(opened.jobId); + expect(status.status).toBe('Open'); + expect(status.description).toBe(plan.jobSpec.bytes); + const cancelled = await owner.job.cancel(opened.jobId); + await cancelled.wait(); + expect((await owner.job.status(opened.jobId)).status).toBe('Rejected'); + await expect( + owner.agentic.wallet(opened.wallet).rules.get(opened.rulesId) + ).rejects.toMatchObject({ code: 'RULE_NOT_FOUND' }); + await (await provider.market.agent.setActive(cardId, false)).wait(); + expect((await provider.market.card(cardId)).active).toBe(false); + f.evidence('marketplace-cancel-cleanup', { + cardId, + wallet: opened.wallet, + jobId: opened.jobId, + txHash: cancelled.hash, + }); + }); + it('2. paid JobSpec preview reaches live validator consensus through the registry', async () => { + const spec = PushChain.utils.job.buildJobSpec({ + reads: [ + PushChain.utils.job.prepareRead({ + chain: CHAIN.BNB_TESTNET, + target: PushChain.CONSTANTS.MOVEABLE.TOKEN.BNB_TESTNET.USDT + .address as Address, + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: [owner.universal.account], + }), + ], + checks: [ + { + read: 0, + evaluation: 'COMPARE', + operation: 'GREATER_OR_EQUAL', + target: BigInt(0), + }, + ], + logic: 'ALL', + executeBy: Math.floor(Date.now() / 1000) + 600, + failFinalAt: Math.floor(Date.now() / 1000) + 660, + }); + const result = await PushChain.utils.job.previewJobSpec(spec, { + client: owner, + maxTotalFee: parseEther('0.01'), + advanced: { timeout: 120000, pollingIntervalMs: 1000 }, + }); + f.evidence('marketplace-paid-preview', { + pass: result.pass, + fees: result.fees, + reads: result.reads.map((r) => ({ + decoded: r.decoded, + error: r.error, + requestId: r.response.requestId, + txHash: r.response.txHash, + outcome: r.response.outcome, + })), + }); + expect(result.pass).toBe(true); + expect(result.reads[0].decoded).not.toBeNull(); + const resumed = await PushChain.utils.job.previewJobSpec(spec, { + client: owner, + resume: result.reads.map((r) => r.response.requestId), + maxTotalFee: BigInt(0), + advanced: { timeout: 120000 }, + }); + expect(resumed.pass).toBe(true); + expect(resumed.fees.newlyPaid).toBe(BigInt(0)); + const authored = PushChain.utils.job.prepareRead({ + chain: CHAIN.BNB_TESTNET, + target: spec.reads[0].target, + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: [owner.universal.account], + }); + const direct = await owner.universal.read(authored, { + maxFee: parseEther('0.01'), + advanced: { timeout: 120000 }, + }); + const sameCall = await PushChain.utils.job.previewJobSpec(spec, { + client: owner, + resume: [direct.requestId], + maxTotalFee: BigInt(0), + }); + expect(sameCall.pass).toBe(true); + expect(sameCall.fees.newlyPaid).toBe(BigInt(0)); + f.evidence('marketplace-preview-recovery', { + originalRequestId: result.reads[0].response.requestId, + preparedReadRequestId: direct.requestId, + additionalPaymentOnResume: resumed.fees.newlyPaid, + }); + }); + it('3. external EVM owner opens and cancels through its real Push UEA transport', async () => { + if (!cardId) throw new Error('The fresh test card was not registered'); + const key = generatePrivateKey(); + externalOwner = await evmClient( + key, + CHAIN.ETHEREUM_SEPOLIA, + f.manifest.network + ); + const uea = externalOwner.universal.account as Address; + const deployed = await owner.universal.sendTransaction({ + to: '0x00000000000000000000000000000000000000eA', + data: encodeFunctionData({ + abi: parseAbi([ + 'function deployUEA((string chainNamespace,string chainId,bytes owner) id) returns (address)', + ]), + functionName: 'deployUEA', + args: [ + { + chainNamespace: 'eip155', + chainId: '11155111', + owner: privateKeyToAccount(key).address, + }, + ], + }), + }); + await deployed.wait(); + await f.fundPC(uea, parseEther('0.1')); + await (await provider.market.agent.setActive(cardId, true)).wait(); + const now = Number((await f.push.getBlock()).timestamp); + const plan = await externalOwner.market.preview(cardId, { + principal: BigInt(1), + executeBy: now + 600, + expiredAt: now + 7200, + }); + const openedResult = await externalOwner.market.openJob(plan); + externalOpened = openedResult; + const recovered = await externalOwner.market.openJob(plan, { + resume: openedResult.tx, + }); + expect(recovered.jobId).toBe(externalOpened.jobId); + f.evidence('marketplace-external-open', { + jobId: externalOpened.jobId, + wallet: externalOpened.wallet, + uea, + signerChainId: plan.intent.signerChainId, + txHash: openedResult.tx.hash, + }); + const cancelled = await externalOwner.job.cancel(externalOpened.jobId); + await cancelled.wait(); + expect((await externalOwner.job.status(externalOpened.jobId)).status).toBe( + 'Rejected' + ); + await (await provider.market.agent.setActive(cardId, false)).wait(); + f.evidence('marketplace-external-cleanup', { + jobId: externalOpened.jobId, + cardId, + txHash: cancelled.hash, + }); + }); +}); diff --git a/packages/core/__e2e__/marketplace/readiness.spec.ts b/packages/core/__e2e__/marketplace/readiness.spec.ts new file mode 100644 index 00000000..8876d34b --- /dev/null +++ b/packages/core/__e2e__/marketplace/readiness.spec.ts @@ -0,0 +1,55 @@ +/** Unfunded deployment acceptance. No keys, signatures or transaction broadcasts. */ +import { PushChain } from '../../src'; +import { CHAIN, PUSH_NETWORK } from '../../src/lib/constants/enums'; +import { createPublicClient, http } from 'viem'; +import { DONUT_MARKETPLACE as D } from '../../src/lib/market/deployment'; +import { MARKETPLACE_ABI } from '../../src/lib/market/contracts/UniversalMarketplace'; +import { JOB_KERNEL_ABI } from '../../src/lib/market/contracts/AgenticCommerce'; +describe('marketplace deployed v2 read-only', () => { + let sdk: PushChain; + beforeAll(async () => { + sdk = await PushChain.initialize( + { + chain: CHAIN.PUSH_TESTNET_DONUT, + address: '0x1111111111111111111111111111111111111111', + }, + { network: PUSH_NETWORK.TESTNET_DONUT } + ); + }); + it('enumerates registry and jobs through public SDK bindings and confirms the deployment/token', async () => { + const rpc = createPublicClient({ + transport: http('https://evm.donut.rpc.push.org/'), + }); + const [cards, jobs, version, count, token] = await Promise.all([ + sdk.market.cards(), + sdk.job.list(), + rpc.readContract({ + address: D.marketplace, + abi: MARKETPLACE_ABI, + functionName: 'version', + }), + rpc.readContract({ + address: D.marketplace, + abi: MARKETPLACE_ABI, + functionName: 'agentCardCount', + }), + rpc.readContract({ + address: D.kernel, + abi: JOB_KERNEL_ABI, + functionName: 'paymentToken', + }), + ]); + expect(version).toBe('2.0.0'); + expect(token.toLowerCase()).toBe(D.paymentToken.toLowerCase()); + expect(BigInt(cards.cards.length)).toBe(count); + expect(Array.isArray(jobs.jobs)).toBe(true); + }); + it('returns explicit placeholders for unavailable verification and deposit orchestration', async () => { + await expect(sdk.job.verify(BigInt(1))).rejects.toMatchObject({ + code: 'CAPABILITY_UNAVAILABLE', + }); + await expect(sdk.market.deposit(BigInt(1))).rejects.toMatchObject({ + code: 'CAPABILITY_UNAVAILABLE', + }); + }); +}); diff --git a/packages/core/__e2e__/shared/agw-gas-evidence.ts b/packages/core/__e2e__/shared/agw-gas-evidence.ts new file mode 100644 index 00000000..28f22f4e --- /dev/null +++ b/packages/core/__e2e__/shared/agw-gas-evidence.ts @@ -0,0 +1,44 @@ +/** Record quotes and measured gas separately from permission ceilings. */ +import type { PushChain } from '../../src'; +import type { AgenticRuntime } from '../../src/lib/agentic/runtime'; +import type { AgwFixture } from '../agw/_fixture'; +import type { Hex } from 'viem'; +export function observeAgwGas(client: PushChain, f: AgwFixture, stage: string) { + const rt = (client as unknown as { agenticRuntime: AgenticRuntime }) + .agenticRuntime; + const previous = rt.quoteOutbound; + rt.quoteOutbound = async (...args) => { + const quote = await previous(...args); + f.evidence('agw-gas-quote', { + stage, + token: args[0], + requestedGasLimit: args[1], + chain: args[2], + protocolFeePCWei: quote.protocolFee, + quotedGasBudgetPCWei: quote.nativeValueForGas, + gasLimitUsed: quote.gasLimitUsed, + attachedPCWei: quote.protocolFee + quote.nativeValueForGas, + gasTokenFee: quote.gasFee, + poolPcInRequired: quote.poolPcIn, + }); + return quote; + }; + return () => { + rt.quoteOutbound = previous; + }; +} +export async function recordAgwPushGas( + f: AgwFixture, + hash: string, + stage: string +) { + const receipt = await f.push.getTransactionReceipt({ hash: hash as Hex }); + f.evidence('agw-push-gas', { + stage, + hash, + block: receipt.blockNumber, + gasUsed: receipt.gasUsed, + effectiveGasPrice: receipt.effectiveGasPrice, + transactionGasPaidPCWei: receipt.gasUsed * receipt.effectiveGasPrice, + }); +} diff --git a/packages/core/__e2e__/shared/agw-preset-acceptance.ts b/packages/core/__e2e__/shared/agw-preset-acceptance.ts new file mode 100644 index 00000000..4df73f47 --- /dev/null +++ b/packages/core/__e2e__/shared/agw-preset-acceptance.ts @@ -0,0 +1,105 @@ +/** Assertions shared by live acceptance and the actual-contract local suite. + * No route substitution or asset removal is permitted in this acceptance path. + */ +import { + encodeAbiParameters, + getAddress, + parseAbiItem, + toFunctionSelector, + type AbiParameter, + type Hex, +} from 'viem'; +import type { Rule, RulesRecord } from '../../src/lib/agentic/agentic.types'; +import type { PresetCategory } from '../../src/lib/agentic/presets/types'; + +export const PRESET_ACCEPTANCE_CASES = [ + ['DEXES', 'eip155:11155111'], + ['DEXES', 'eip155:84532'], + ['DEXES', 'eip155:421614'], + ['LENDING', 'eip155:11155111'], + ['LENDING', 'eip155:84532'], + ['LENDING', 'eip155:421614'], +] as const satisfies readonly (readonly [PresetCategory, `eip155:${string}`])[]; + +function words(param: AbiParameter): number { + if (param.type === 'tuple' && 'components' in param) + return param.components.reduce((n, c) => n + words(c), 0); + if (/\[|bytes$|string$/.test(param.type)) + throw new Error('Acceptance pin needs a static argument'); + return 1; +} +function pinLocation( + inputs: readonly AbiParameter[], + path: number | readonly number[] +): { arg: number; param: AbiParameter } { + const parts = typeof path === 'number' ? [path] : path; + let current = inputs, + offset = 0, + selected: AbiParameter | undefined; + for (let depth = 0; depth < parts.length; depth++) { + const index = parts[depth]; + selected = current[index]; + if (!selected) throw new Error('Invalid pin argument path'); + offset += current.slice(0, index).reduce((n, c) => n + words(c), 0); + if (depth < parts.length - 1) { + if (selected.type !== 'tuple' || !('components' in selected)) + throw new Error('Invalid pin tuple path'); + current = selected.components; + } + } + return { arg: offset, param: selected! }; +} +export function expectStoredPreset(input: Rule, record: RulesRecord): void { + if (!('allowedCalls' in record.rule)) + throw new Error('Expected an EVM rule record'); + expect(record.enabled).toBe(true); + expect(record.agent).toBe(getAddress(input.agent)); + expect(record.chainNamespace).toBe(input.chainNamespace); + expect(record.validUntil).toBe(input.validUntil); + expect(record.rule.maxGasPerCall).toBe(input.maxGasPerCall); + expect(record.rule.assets).toEqual( + input.assets!.map((a) => ({ + token: getAddress( + typeof a.token === 'string' ? a.token : a.token.address + ), + maxPerCall: a.maxPerCall, + maxTotal: a.maxTotal ?? BigInt(0), + })) + ); + expect(record.spent).toEqual({ + kind: 'universal', + assets: input.assets!.map((a) => ({ + token: getAddress( + typeof a.token === 'string' ? a.token : a.token.address + ), + spent: BigInt(0), + })), + }); + expect(record.rule.allowedCalls).toEqual( + input.allowedCalls.map((c) => { + const fn = parseAbiItem(`function ${c.selector}`); + if (fn.type !== 'function') throw new Error('Expected a function'); + return { + target: getAddress(c.target), + selector: toFunctionSelector(fn), + maxValue: c.maxValue ?? BigInt(0), + pins: (c.pins ?? []).map((p) => { + if (!('arg' in p) || p.arg === undefined) + throw new Error('Expected authored argument pin'); + const loc = pinLocation(fn.inputs, p.arg); + if ('max' in p) return { arg: loc.arg, max: p.max }; + return { + arg: loc.arg, + expected: + p.expected === 'agentic:wallet' + ? 'agentic:wallet' + : (encodeAbiParameters( + [loc.param], + [p.expected as never] + ).toLowerCase() as Hex), + }; + }), + }; + }) + ); +} diff --git a/packages/core/__e2e__/shared/agw-state.ts b/packages/core/__e2e__/shared/agw-state.ts new file mode 100644 index 00000000..32753cff --- /dev/null +++ b/packages/core/__e2e__/shared/agw-state.ts @@ -0,0 +1,62 @@ +/** Independent contract-state assertions for AGW tests; never part of the public SDK. */ +import type { Address, Hex, PublicClient } from 'viem'; +import { v6 } from '../../src/lib/agentic/contracts/v6'; +import { configId } from '../../src/lib/agentic/codec/ids'; + +export async function readNativeCounters( + client: PublicClient, + addresses: { sessionEngine: Address; rulesPolicy: Address }, + wallet: Address, + rulesId: Hex +) { + const actions = await client.readContract({ + address: addresses.sessionEngine, + abi: v6.abis.engine, + functionName: 'getEnabledActions', + args: [wallet, rulesId], + }); + if (actions.length !== 1) + throw new Error('Native counter fixture expects one action'); + const cfg = await client.readContract({ + address: addresses.rulesPolicy, + abi: v6.abis.policy, + functionName: 'getNativeConfig', + args: [configId(wallet, rulesId, actions[0]), wallet], + }); + return { + valueSpent: cfg.valueSpent, + amountSpent: cfg.amountSpent, + callsUsed: Number(cfg.callsUsed), + }; +} + +/** All native action terms/counters in engine order, pinned to one block. */ +export async function readNativeActionConfigs( + client: PublicClient, + addresses: { sessionEngine: Address; rulesPolicy: Address }, + wallet: Address, + rulesId: Hex, + blockNumber?: bigint +) { + const block = blockNumber ?? (await client.getBlockNumber({ cacheTime: 0 })); + const actions = await client.readContract({ + address: addresses.sessionEngine, + abi: v6.abis.engine, + functionName: 'getEnabledActions', + args: [wallet, rulesId], + blockNumber: block, + }); + if (!actions.length) throw new Error('Native fixture has no enabled action'); + return Promise.all( + actions.map(async (action) => ({ + actionId: action, + config: await client.readContract({ + address: addresses.rulesPolicy, + abi: v6.abis.policy, + functionName: 'getNativeConfig', + args: [configId(wallet, rulesId, action), wallet], + blockNumber: block, + }), + })) + ); +} diff --git a/packages/core/__e2e__/shared/agw-svm-policy-probe.ts b/packages/core/__e2e__/shared/agw-svm-policy-probe.ts new file mode 100644 index 00000000..51461174 --- /dev/null +++ b/packages/core/__e2e__/shared/agw-svm-policy-probe.ts @@ -0,0 +1,81 @@ +/** Bypass SDK validation to verify the deployed URP refuses the same mutations. eth_call only. */ +import { + decodeFunctionData, + encodeFunctionData, + type Address, + type Hex, + type PublicClient, +} from 'viem'; +import { UNIVERSAL_GATEWAY_PC } from '../../src/lib/constants/abi'; +import { v6, type Call } from '../../src/lib/agentic/contracts/v6'; +import { + parseAgwSvmPayload, + encodeAgwSvmPayload, +} from '../../src/lib/agentic/execution/svm-payload'; +import { decodeAgenticRevert } from '../../src/lib/agentic/revert'; + +export async function probeSvmWirePolicies( + push: PublicClient, + input: { + from: Address; + wallet: Address; + rulesId: Hex; + call: Call; + blockNumber: bigint; + } +) { + const decodedCall = decodeFunctionData({ + abi: UNIVERSAL_GATEWAY_PC, + data: input.call.data, + }); + if (decodedCall.functionName !== 'sendUniversalTxOutbound') + throw new Error('Expected a gateway outbound request'); + const request = decodedCall.args[0]; + const parsed = parseAgwSvmPayload(request.payload); + const observations = []; + for (const kind of ['account-pin', 'instruction-data-pin'] as const) { + const accounts = parsed.accounts.map((account) => ({ ...account })); + const data = new Uint8Array(parsed.instructionData); + if (kind === 'account-pin') accounts[2].pubkey = accounts[1].pubkey; + else { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + view.setBigUint64(8, view.getBigUint64(8, true) + BigInt(1), true); + } + const altered = { + ...request, + payload: encodeAgwSvmPayload(parsed.program, accounts, data), + }; + const packet = v6.encodeExecuteAsAgent(input.rulesId, { + ...input.call, + data: encodeFunctionData({ + abi: UNIVERSAL_GATEWAY_PC, + functionName: 'sendUniversalTxOutbound', + args: [altered], + }), + }); + let decoded; + try { + await push.call({ + account: input.from, + to: input.wallet, + data: packet, + blockNumber: input.blockNumber, + }); + } catch (error) { + decoded = decodeAgenticRevert(error); + } + if (!decoded?.name?.includes('Svm')) + throw new Error( + `Expected a decoded SVM policy refusal for ${kind}, got ${ + decoded?.name ?? 'no decoded refusal' + }` + ); + observations.push({ kind, reverted: true, decoded }); + } + return { + chainId: 42101, + block: input.blockNumber.toString(), + observations, + transactionsSent: 0, + }; +} diff --git a/packages/core/__e2e__/shared/agw-svm-preflight.ts b/packages/core/__e2e__/shared/agw-svm-preflight.ts new file mode 100644 index 00000000..1272c52b --- /dev/null +++ b/packages/core/__e2e__/shared/agw-svm-preflight.ts @@ -0,0 +1,73 @@ +/** Read-only checks for the internal AGW Solana wire acceptance suite. */ +import { createHash } from 'node:crypto'; +import { BorshAccountsCoder, type Idl } from '@coral-xyz/anchor'; +import { Connection, PublicKey } from '@solana/web3.js'; +import { CHAIN_INFO } from '../../src/lib/constants/chain'; +import { CHAIN } from '../../src/lib/constants/enums'; +import gatewayIdl from '../../src/lib/constants/abi/universalGatewayV0.json'; +import counterIdl from '../../src/lib/orchestrator/svm-idl/__fixtures__/test_counter.idl.json'; + +export const SVM_WIRE_CHAIN = CHAIN.SOLANA_DEVNET; +export const SVM_WIRE_PROGRAM = counterIdl.address; +export const SVM_WIRE_GATEWAY = CHAIN_INFO[SVM_WIRE_CHAIN].lockerContract!; +export const SVM_WIRE_COUNTER = PublicKey.findProgramAddressSync( + [Buffer.from('counter')], new PublicKey(SVM_WIRE_PROGRAM) +)[0]; +const LOADER = 'BPFLoaderUpgradeab1e11111111111111111111111'; +const COUNTER_DISC = Buffer.from(counterIdl.accounts.find((a) => a.name === 'Counter')!.discriminator); + +export function decodeWireCounter(data: Buffer) { + if (data.length < 48 || !data.subarray(0, 8).equals(COUNTER_DISC)) + throw new Error('Counter data does not match the selected IDL'); + return { value: data.readBigUInt64LE(8), authority: new PublicKey(data.subarray(16, 48)).toBase58() }; +} + +export function svmWireConnection(url = CHAIN_INFO[SVM_WIRE_CHAIN].defaultRPC[0]) { + return new Connection(url, { + commitment: 'confirmed', + disableRetryOnRateLimit: true, + fetch: (input, init) => fetch(input, { ...init, signal: AbortSignal.timeout(20_000) }), + }); +} + +export async function inspectSvmWirePrograms(connection: Connection) { + const genesis = await connection.getGenesisHash(); + if (`solana:${genesis.slice(0, 32)}` !== SVM_WIRE_CHAIN) + throw new Error('Solana RPC is not the selected devnet cluster'); + const gateway = new PublicKey(SVM_WIRE_GATEWAY), program = new PublicKey(SVM_WIRE_PROGRAM); + if (gatewayIdl.address !== gateway.toBase58()) throw new Error('Gateway registry and IDL disagree'); + const config = PublicKey.findProgramAddressSync([Buffer.from('config')], gateway)[0]; + const keys = [gateway, program, SVM_WIRE_COUNTER, config]; + const info = await connection.getMultipleAccountsInfoAndContext(keys); + const fingerprint = (data: Buffer) => createHash('sha256').update(data).digest('hex'); + const programDataKeys = info.value.slice(0, 2).map((account, i) => { + if (!account?.executable || account.owner.toBase58() !== LOADER || + account.data.length !== 36 || account.data.readUInt32LE(0) !== 2) + throw new Error(`Program ${keys[i].toBase58()} is not an executable upgradeable program`); + return new PublicKey(account.data.subarray(4, 36)); + }); + const counter = info.value[2], configuration = info.value[3]; + if (!counter || counter.executable || !counter.owner.equals(program)) throw new Error('Counter account is missing or has the wrong owner'); + const counterState = decodeWireCounter(counter.data); + if (!configuration || configuration.executable || !configuration.owner.equals(gateway)) throw new Error('Gateway configuration is missing or has the wrong owner'); + const decoded = new BorshAccountsCoder(gatewayIdl as unknown as Idl).decode('Config', configuration.data); + if (decoded.paused !== false) throw new Error('Gateway is paused'); + const implementations = await connection.getMultipleAccountsInfoAndContext(programDataKeys); + const programs = implementations.value.map((account, i) => { + if (!account || account.owner.toBase58() !== LOADER || account.data.readUInt32LE(0) !== 3 || account.data.length <= 45) + throw new Error('ProgramData account is missing or invalid'); + return { + address: keys[i].toBase58(), programData: programDataKeys[i].toBase58(), + lastUpgradeSlot: account.data.readBigUInt64LE(4).toString(), + dataLength: account.data.length, dataSha256: fingerprint(account.data), + }; + }); + return { + checkedAt: new Date().toISOString(), chain: SVM_WIRE_CHAIN, genesis, + slot: info.context.slot, programDataSlot: implementations.context.slot, programs, + gatewayConfig: { address: config.toBase58(), paused: decoded.paused, dataSha256: fingerprint(configuration.data) }, + counter: { address: SVM_WIRE_COUNTER.toBase58(), value: counterState.value.toString(), authority: counterState.authority, dataSha256: fingerprint(counter.data) }, + counterIdlSha256: fingerprint(Buffer.from(JSON.stringify(counterIdl))), + gatewayIdlSha256: fingerprint(Buffer.from(JSON.stringify(gatewayIdl))), + }; +} diff --git a/packages/core/__market-local__/marketplace.spec.ts b/packages/core/__market-local__/marketplace.spec.ts new file mode 100644 index 00000000..faf01a67 --- /dev/null +++ b/packages/core/__market-local__/marketplace.spec.ts @@ -0,0 +1,846 @@ +/** Public SDK → real deployed v2/AGW v6 on an isolated Anvil Donut fork. No keys or writes to public RPC. */ +import { execFileSync, spawn, type ChildProcess } from 'node:child_process'; +import { createServer } from 'node:net'; +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { tmpdir } from 'node:os'; +import { + createPublicClient, + createWalletClient, + defineChain, + encodeFunctionData, + erc20Abi, + getAddress, + bytesToHex, + hexToBytes, + parseTransaction, + keccak256, + http, + parseAbi, + stringToHex, + zeroAddress, + zeroHash, + type Address, + type PublicClient, + type Hex, +} from 'viem'; +import { mnemonicToAccount } from 'viem/accounts'; +import { PushChain, type UniversalSigner } from '../src'; +import { CHAIN, PUSH_NETWORK, LIBRARY } from '../src/lib/constants/enums'; +import { DONUT_MARKETPLACE as D } from '../src/lib/market/deployment'; +import { JOB_KERNEL_ABI } from '../src/lib/market/contracts/AgenticCommerce'; +import { currentGeneration } from '../src/lib/agentic/deployments'; +import type { AgentCardRules } from '../src/lib/market/rules'; +import type { JobSpecTemplate } from '../src/lib/job-spec/types'; +import { MarketNamespaceImpl } from '../src/lib/market/market'; +import type { StackRuntime } from '../src/lib/market/runtime'; +import type { AgenticRuntime } from '../src/lib/agentic/runtime'; + +let node: ChildProcess; +let rpc: string; +let push: PublicClient; +let owner: PushChain; +let provider: PushChain; +let cardId: bigint; +let opened: { jobId: bigint; wallet: Address; rulesId: `0x${string}` }; +let template: JobSpecTemplate; +let rules: AgentCardRules; +let stopWatch: (() => void) | undefined; +const accounts = [0, 1, 2].map((addressIndex) => + mnemonicToAccount( + 'test test test test test test test test test test test junk', + { addressIndex } + ) +); +const token = '0x731aF1Da5365259d27528557EE4aFBA4baC90ef2'; +const tokenOnSepolia = '0xE935d9c9C24D02E61186c640cc01d713C876d40F'; +beforeAll(async () => { + execFileSync( + 'bash', + [join(__dirname, '../scripts/marketplace-local/prepare.sh')], + { stdio: 'pipe' } + ); + const port = await new Promise((resolve) => { + const server = createServer(); + server.listen(0, '127.0.0.1', () => { + const p = (server.address() as { port: number }).port; + server.close(() => resolve(p)); + }); + }); + rpc = `http://127.0.0.1:${port}`; + node = spawn( + 'anvil', + [ + '--host', + '127.0.0.1', + '--port', + String(port), + '--chain-id', + '42101', + '--fork-url', + process.env['MARKET_FORK_RPC'] ?? 'https://evm.donut.rpc.push.org/', + '--fork-block-number', + '24447347', + '--timeout', + '120000', + '--retries', + '2', + '--silent', + '--order', + 'fifo', + ], + { stdio: ['ignore', 'ignore', 'pipe'] } + ); + let logs = ''; + node.stderr?.on('data', (c) => { + logs += String(c); + }); + const chain = defineChain({ + id: 42101, + name: 'Local marketplace fork', + nativeCurrency: { name: 'PC', symbol: 'PC', decimals: 18 }, + rpcUrls: { default: { http: [rpc] } }, + }); + push = createPublicClient({ + chain, + transport: http(rpc, { timeout: 120000, retryCount: 0 }), + pollingInterval: 25, + }) as PublicClient; + let ready = false; + for (let i = 0; i < 150; i++) { + if (node.exitCode !== null) throw new Error(`Anvil stopped: ${logs}`); + try { + await push.getBlockNumber(); + ready = true; + break; + } catch { + await new Promise((r) => setTimeout(r, 200)); + } + } + if (!ready) throw new Error(`Anvil did not start: ${logs}`); + await push.request({ + method: 'evm_setNextBlockTimestamp' as never, + params: [Math.floor(Date.now() / 1000)] as never, + }); + const clients = await Promise.all( + accounts.map(async (account) => { + const wallet = createWalletClient({ + account, + chain, + transport: http(rpc, { timeout: 120000 }), + pollingInterval: 25, + }); + const signer = await PushChain.utils.signer.toUniversalFromKeypair( + wallet, + { chain: CHAIN.PUSH_TESTNET_DONUT, library: LIBRARY.ETHEREUM_VIEM } + ); + return PushChain.initialize(signer, { + network: PUSH_NETWORK.TESTNET_DONUT, + rpcUrls: { [CHAIN.PUSH_TESTNET_DONUT]: [rpc] }, + }); + }) + ); + [owner, provider] = clients; + const read = PushChain.utils.job.prepareRead({ + chain: CHAIN.BNB_TESTNET, + target: tokenOnSepolia, + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: ['agentic:wallet'], + }); + template = PushChain.utils.job.buildJobSpecTemplate({ + reads: [read], + checks: [ + { + read: 0, + evaluation: 'COMPARE', + operation: 'GREATER_OR_EQUAL', + target: BigInt(0), + }, + ], + logic: 'ALL', + }); + rules = { + assets: [ + { + token: { prc20: token }, + maxPerCall: PushChain.CONSTANTS.AGENTIC.PRINCIPAL, + maxTotal: PushChain.CONSTANTS.AGENTIC.PRINCIPAL, + }, + ], + principalAsset: 0, + maxGasPerCall: BigInt(0), + allowedCalls: [ + { + target: tokenOnSepolia, + selector: 'balanceOf(address)', + pins: [{ arg: 0, expected: PushChain.CONSTANTS.AGENTIC.WALLET }], + }, + ], + }; +}, 180000); +afterAll(async () => { + stopWatch?.(); + node?.kill('SIGTERM'); +}); + +it('registers and discovers a real v2 provider card through the public namespace', async () => { + const response = await provider.market.agent.register( + { + jobType: 'SDK_FORK_TEST', + metadataURI: 'https://example.invalid/sdk-marketplace-test', + metadataHash: ('0x' + '12'.repeat(32)) as `0x${string}`, + chain: CHAIN.BNB_TESTNET, + providerFee: BigInt(5000000), + paymentToken: D.paymentToken, + principalMin: BigInt(1), + principalMax: BigInt(100), + minDuration: 3600, + maxDuration: 90 * 86400, + minExecuteWindow: 0, + settleWindow: 60, + }, + { rules, jobSpecTemplate: template } + ); + cardId = response.cardId; + expect(response.version).toBe(BigInt(1)); + expect(cardId).toBeGreaterThan(BigInt(0)); + const card = await owner.market.card(cardId); + expect(card.provider).toBe(accounts[1].address); + expect(card.jobSpecTemplate.allowedMutability).toBe('NONE'); + expect( + (await owner.market.cards({ provider: accounts[1].address })).cards[0] + .cardId + ).toBe(cardId); + expect((await provider.market.agent.card())?.cardId).toBe(cardId); +}); +it('previews and signs the exact on-chain JobSpec, opens on real AGW v6, and preserves binary bytes', async () => { + const now = Number((await push.getBlock()).timestamp); + const plan = await owner.market.preview(cardId, { + principal: BigInt(10), + executeBy: now + 600, + expiredAt: now + 7200, + }); + const response = await owner.market.openJob(plan); + opened = response; + expect((await owner.market.activeJob(opened.wallet)).jobId).toBe( + opened.jobId + ); + const status = await owner.job.status(opened.jobId); + expect(status.description).toBe(plan.jobSpec.bytes); + expect(status.jobSpec?.spec.origin).toBe(plan.jobSpec.spec.origin); + expect(status.evaluation.available).toBe(false); +}); +it('updates a decoded card without losing rule constraints or template wire bytes', async () => { + const before = await provider.market.card(cardId); + const updated = await provider.market.agent.update( + cardId, + { ...before, metadataURI: 'https://example.invalid/updated-sdk-test' }, + { rules: before.rules, jobSpecTemplate: before.jobSpecTemplate } + ); + expect(updated.version).toBe(BigInt(2)); + const after = await owner.market.card(cardId); + expect(after.rulesBytes).toBe(before.rulesBytes); + expect(after.jobSpecTemplateBytes).toBe(before.jobSpecTemplateBytes); + expect(after.verified).toBe(false); +}); +it('deposits original principal, fee and PC after a card update and recovers history in a fresh client', async () => { + await (await provider.job.setBudget(opened.jobId, BigInt(5000000))).wait(); + await expect( + owner.job.fund(opened.jobId, { expectedBudget: BigInt(5000000) }) + ).rejects.toMatchObject({ code: 'INSUFFICIENT_FUNDS' }); + // These are real existing assets borrowed on localhost, not public-chain transfers. + const source = '0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf'; + await push.request({ + method: 'anvil_impersonateAccount' as never, + params: [source] as never, + }); + const funder = createWalletClient({ + account: source, + chain: push.chain, + transport: http(rpc), + }); + for (const [asset, amount] of [ + [token, BigInt(10)], + [D.paymentToken, BigInt(5000000)], + ] as const) { + const hash = await funder.writeContract({ + chain: push.chain, + address: asset, + abi: erc20Abi, + functionName: 'transfer', + args: [accounts[0].address, amount], + }); + await push.waitForTransactionReceipt({ hash }); + } + const deposited = await owner.market.deposit(opened.jobId, { + pcAmount: BigInt(10) ** BigInt(15), + }); + expect(deposited.cardVersion).toBe(BigInt(1)); + expect(deposited.txs.map((t) => t.step)).toEqual([ + 'PRINCIPAL', + 'PROVIDER_FEE', + 'PC', + ]); + expect((await owner.job.status(opened.jobId)).status).toBe('Open'); + expect( + await push.readContract({ + address: D.paymentToken, + abi: erc20Abi, + functionName: 'allowance', + args: [opened.wallet, D.kernel], + }) + ).toBe(BigInt(0)); + const wallet = createWalletClient({ + account: accounts[0], + chain: push.chain, + transport: http(rpc), + }); + const signer = await PushChain.utils.signer.toUniversalFromKeypair(wallet, { + chain: CHAIN.PUSH_TESTNET_DONUT, + library: LIBRARY.ETHEREUM_VIEM, + }); + const reconnected = await PushChain.initialize(signer, { + network: PUSH_NETWORK.TESTNET_DONUT, + rpcUrls: { [CHAIN.PUSH_TESTNET_DONUT]: [rpc] }, + }); + const recovered = await reconnected.market.deposit(opened.jobId, { + pcAmount: BigInt(10) ** BigInt(15), + }); + expect(recovered.cardVersion).toBe(BigInt(1)); + expect(recovered.txs).toEqual([]); +}); +it('funds through the real rules hook and submits as the provider; manual evaluator completes locally', async () => { + const events: string[] = []; + stopWatch = owner.job.watch(opened.jobId, (e) => events.push(e.kind), { + fromBlock: (await push.getBlockNumber({ cacheTime: 0 })) + BigInt(1), + pollIntervalMs: 25, + }); + await (await provider.job.setBudget(opened.jobId, BigInt(6000000))).wait(); + await expect(owner.job.fund(opened.jobId)).rejects.toMatchObject({ + code: 'EXPECTED_BUDGET_REQUIRED', + }); + await expect( + owner.job.fund(opened.jobId, { expectedBudget: BigInt(5000000) }) + ).rejects.toMatchObject({ code: 'BUDGET_MISMATCH' }); + await (await provider.job.setBudget(opened.jobId, BigInt(5000000))).wait(); + const before = await push.readContract({ + address: D.paymentToken, + abi: erc20Abi, + functionName: 'balanceOf', + args: [accounts[1].address], + }); + await ( + await owner.job.fund(opened.jobId, { expectedBudget: BigInt(5000000) }) + ).wait(); + expect((await owner.job.status(opened.jobId)).status).toBe('Funded'); + await ( + await provider.job.submit(opened.jobId, { deliverable: 'fork-only proof' }) + ).wait(); + const submitted = await owner.job.status(opened.jobId); + expect(submitted.status).toBe('Submitted'); + expect(submitted.deliverable).toBe(keccak256(stringToHex('fork-only proof'))); + await push.request({ + method: 'anvil_impersonateAccount' as never, + params: [D.evaluator] as never, + }); + await push.request({ + method: 'anvil_setBalance' as never, + params: [D.evaluator, '0x8ac7230489e80000'] as never, + }); + const evaluator = createWalletClient({ + account: D.evaluator, + chain: push.chain, + transport: http(rpc), + }); + const hash = await evaluator.sendTransaction({ + chain: push.chain, + to: D.kernel, + data: encodeFunctionData({ + abi: JOB_KERNEL_ABI, + functionName: 'complete', + args: [opened.jobId, zeroHash, '0x'], + }), + }); + await push.waitForTransactionReceipt({ hash }); + expect((await owner.job.status(opened.jobId)).status).toBe('Completed'); + const after = await push.readContract({ + address: D.paymentToken, + abi: erc20Abi, + functionName: 'balanceOf', + args: [accounts[1].address], + }); + expect(after - before).toBe(BigInt(5000000)); + await new Promise((resolve) => setTimeout(resolve, 300)); + stopWatch(); + stopWatch = undefined; + expect(events).toEqual( + expect.arrayContaining(['BudgetSet', 'Funded', 'Submitted', 'Completed']) + ); + expect(events).not.toContain('Error'); + await expect(owner.job.verify(opened.jobId)).rejects.toMatchObject({ + code: 'CAPABILITY_UNAVAILABLE', + }); +}); +it('creates a plain job and allows third-party refund while the kernel is paused', async () => { + const expiredAt = Number((await push.getBlock()).timestamp) + 600; + const plain = await owner.job.create({ + provider: accounts[1].address, + evaluator: D.evaluator, + hook: zeroAddress, + expiredAt, + paymentToken: D.paymentToken, + description: 'plain SDK fork job', + }); + await ( + await owner.job.fund(plain.jobId, { expectedBudget: BigInt(0) }) + ).wait(); + await push.request({ + method: 'anvil_impersonateAccount' as never, + params: [D.evaluator] as never, + }); + await push.request({ + method: 'anvil_setBalance' as never, + params: [D.evaluator, '0x8ac7230489e80000'] as never, + }); + const admin = createWalletClient({ + account: D.evaluator, + chain: push.chain, + transport: http(rpc), + }); + const pauseHash = await admin.writeContract({ + chain: push.chain, + address: D.kernel, + abi: JOB_KERNEL_ABI, + functionName: 'pause', + }); + await push.waitForTransactionReceipt({ hash: pauseHash }); + await push.request({ + method: 'evm_setNextBlockTimestamp' as never, + params: [expiredAt + 1] as never, + }); + await push.request({ method: 'evm_mine' as never, params: [] as never }); + await (await provider.job.claimRefund(plain.jobId)).wait(); + expect((await owner.job.status(plain.jobId)).status).toBe('Expired'); + const unpauseHash = await admin.writeContract({ + chain: push.chain, + address: D.kernel, + abi: JOB_KERNEL_ABI, + functionName: 'unpause', + }); + await push.waitForTransactionReceipt({ hash: unpauseHash }); + expect( + (await owner.job.list({ provider: accounts[1].address })).jobs.some( + (j) => j.jobId === plain.jobId + ) + ).toBe(true); +}); +it('rejects a tampered plan before signing and atomically cancels a second job with permission revocation', async () => { + const now = Number((await push.getBlock()).timestamp); + const plan = await owner.market.preview(cardId, { + principal: BigInt(10), + executeBy: now + 600, + expiredAt: now + 7200, + }); + await expect( + owner.market.openJob({ + ...plan, + preview: { ...plan.preview, mayDo: ['tampered'] }, + }) + ).rejects.toMatchObject({ code: 'STALE_PLAN' }); + const badSignature = jest + .spyOn(owner.universal, 'signTypedData') + .mockImplementationOnce(async (data) => accounts[1].signTypedData(data)); + await expect(owner.market.openJob(plan)).rejects.toMatchObject({ + code: 'OPEN_JOB_SIMULATION_FAILED', + }); + badSignature.mockRestore(); + const second = await owner.market.openJob(plan); + await (await owner.job.cancel(second.jobId)).wait(); + expect((await owner.job.status(second.jobId)).status).toBe('Rejected'); + expect((await owner.market.activeJob(second.wallet)).jobId).toBe(BigInt(0)); + const gen = currentGeneration(PUSH_NETWORK.TESTNET_DONUT); + expect( + await push.readContract({ + address: gen.addresses.sessionEngine, + abi: gen.contracts.abis.engine, + functionName: 'isPermissionEnabled', + args: [second.rulesId, second.wallet], + }) + ).toBe(false); +}); +it('accepts a real deployed EVM UEA owner signature with its home-chain domain', async () => { + const external = await PushChain.initialize( + { chain: CHAIN.ETHEREUM_SEPOLIA, address: accounts[0].address }, + { + network: PUSH_NETWORK.TESTNET_DONUT, + rpcUrls: { [CHAIN.PUSH_TESTNET_DONUT]: [rpc] }, + } + ); + const uea = getAddress(external.universal.account); + const base = (owner as unknown as { agenticRuntime: AgenticRuntime }) + .agenticRuntime; + const rt: StackRuntime = { + agw: { + ...base, + signerPushAccount: () => uea, + signerOrigin: () => ({ + chain: CHAIN.ETHEREUM_SEPOLIA, + address: accounts[0].address, + }), + signerIsPushNative: () => false, + }, + account: () => uea, + wallet: () => undefined, + send: base.execute, + // Relaying is permitted on-chain. Anvil has no Cosmos MsgExecutePayload transport; + // only the submitting transport is native here. The UEA verifies the real origin signature. + signTypedData: (data) => accounts[0].signTypedData(data), + canSignTypedData: () => true, + jobBlocks: new Map(), + }; + const market = new MarketNamespaceImpl(rt); + const now = Number((await push.getBlock()).timestamp); + const plan = await market.preview(cardId, { + principal: BigInt(10), + executeBy: now + 600, + expiredAt: now + 7200, + }); + await expect(market.openJob(plan)).rejects.toMatchObject({ + code: 'OWNER_NOT_DEPLOYED', + }); + const deploy = await owner.universal.sendTransaction({ + to: '0x00000000000000000000000000000000000000eA', + data: encodeFunctionData({ + abi: parseAbi([ + 'function deployUEA((string chainNamespace,string chainId,bytes owner) id) returns (address)', + ]), + functionName: 'deployUEA', + args: [ + { + chainNamespace: 'eip155', + chainId: '11155111', + owner: accounts[0].address, + }, + ], + }), + }); + await deploy.wait(); + expect(await push.getCode({ address: uea })).not.toBe('0x'); + const reviewed = await market.preview(cardId, { + principal: BigInt(10), + executeBy: now + 600, + expiredAt: now + 7200, + }); + expect(reviewed.intent.owner).toBe(uea); + expect(reviewed.intent.signerChainId).toBe(BigInt(11155111)); + const result = await market.openJob(reviewed); + const gen = currentGeneration(PUSH_NETWORK.TESTNET_DONUT); + expect( + await push.readContract({ + address: result.wallet, + abi: gen.contracts.abis.wallet, + functionName: 'owner', + }) + ).toBe(uea); + expect((await owner.job.status(result.jobId)).status).toBe('Open'); +}); + +function ownerArtifact(name: string) { + const base = + process.env['MARKETPLACE_LOCAL_DIR'] ?? + join(tmpdir(), 'push-marketplace-local'); + return JSON.parse( + readFileSync( + join(base, 'out', 'MarketplaceOwnerFixtures.sol', `${name}.json`), + 'utf8' + ) + ); +} +it('uses a real ERC-1271 owner adapter, rejects malformed success values, and recovers without a second signature', async () => { + const artifact = ownerArtifact('Marketplace1271Owner'); + const controller = createWalletClient({ + account: accounts[0], + chain: push.chain, + transport: http(rpc), + }); + const hash = await controller.deployContract({ + chain: push.chain, + abi: artifact.abi, + bytecode: artifact.bytecode.object, + args: [accounts[0].address], + }); + const contract = (await push.waitForTransactionReceipt({ hash })) + .contractAddress as Address; + await ( + await owner.universal.sendTransaction({ + to: contract, + value: BigInt(10) ** BigInt(18), + }) + ).wait(); + const signTypedData = jest.fn( + async (data: Parameters<(typeof accounts)[0]['signTypedData']>[0]) => + hexToBytes(await accounts[0].signTypedData(data)) + ); + const send = jest.fn(async (unsigned: Uint8Array) => { + const tx = parseTransaction(bytesToHex(unsigned)); + if (!tx.to) + throw new Error( + 'The contract-owner adapter requires a transaction target' + ); + const txHash = await controller.writeContract({ + address: contract, + chain: push.chain, + abi: artifact.abi, + functionName: 'execute', + args: [tx.to, tx.value ?? BigInt(0), tx.data ?? '0x'], + gas: BigInt(3000000), + }); + await push.request({ method: 'anvil_mine' as never, params: ['0x4'] as never }); + return hexToBytes(txHash); + }); + const signer: UniversalSigner = { + account: { chain: CHAIN.PUSH_TESTNET_DONUT, address: contract }, + signMessage: async (data) => + hexToBytes(await accounts[0].signMessage({ message: { raw: data } })), + signTypedData, + signAndSendTransaction: send, + }; + const client = await PushChain.initialize(signer, { + network: PUSH_NETWORK.TESTNET_DONUT, + rpcUrls: { [CHAIN.PUSH_TESTNET_DONUT]: [rpc] }, + }); + const now = Number((await push.getBlock()).timestamp); + const plan = await client.market.preview(cardId, { + principal: BigInt(10), + executeBy: now + 600, + expiredAt: now + 7200, + }); + for (const mode of [1, 2, 3]) { + const tx = await controller.writeContract({ + address: contract, + chain: push.chain, + abi: artifact.abi, + functionName: 'setResponseMode', + args: [mode], + }); + await push.waitForTransactionReceipt({ hash: tx }); + await expect(client.market.openJob(plan)).rejects.toMatchObject({ + code: 'OPEN_JOB_SIMULATION_FAILED', + }); + } + expect(send).not.toHaveBeenCalled(); + const reset = await controller.writeContract({ + address: contract, + chain: push.chain, + abi: artifact.abi, + functionName: 'setResponseMode', + args: [0], + }); + await push.waitForTransactionReceipt({ hash: reset }); + const opened = await client.market.openJob(plan); + const signatures = signTypedData.mock.calls.length; + const recovered = await client.market.openJob(plan, { resume: opened.tx }); + expect(recovered.jobId).toBe(opened.jobId); + expect(signTypedData.mock.calls).toHaveLength(signatures); + expect(send).toHaveBeenCalledTimes(1); + await (await client.job.cancel(opened.jobId)).wait(); + expect((await client.job.status(opened.jobId)).status).toBe('Rejected'); +}); +it('accepts a compatible EIP-7702 verifier and refuses an echo fallback before broadcast', async () => { + const controller = createWalletClient({ + account: accounts[2], + chain: push.chain, + transport: http(rpc), + }); + const artifact = ownerArtifact('Marketplace1271Owner'); + const deployed = await controller.deployContract({ + chain: push.chain, + abi: artifact.abi, + bytecode: artifact.bytecode.object, + args: [accounts[2].address], + }); + const delegate = (await push.waitForTransactionReceipt({ hash: deployed })) + .contractAddress as Address; + await push.request({ + method: 'anvil_setCode' as never, + params: [ + accounts[2].address, + ('0xef0100' + delegate.slice(2)) as Hex, + ] as never, + }); + const signer = await PushChain.utils.signer.toUniversalFromKeypair( + controller, + { chain: CHAIN.PUSH_TESTNET_DONUT, library: LIBRARY.ETHEREUM_VIEM } + ); + const client = await PushChain.initialize(signer, { + network: PUSH_NETWORK.TESTNET_DONUT, + rpcUrls: { [CHAIN.PUSH_TESTNET_DONUT]: [rpc] }, + }); + const now = Number((await push.getBlock()).timestamp); + const plan = await client.market.preview(cardId, { + principal: BigInt(10), + executeBy: now + 600, + expiredAt: now + 7200, + }); + const result = await client.market.openJob(plan); + await (await client.job.cancel(result.jobId)).wait(); + const echoArtifact = ownerArtifact('MarketplaceEchoOwner'); + const echoHash = await controller.deployContract({ + chain: push.chain, + abi: echoArtifact.abi, + bytecode: echoArtifact.bytecode.object, + args: [], + }); + const echo = (await push.waitForTransactionReceipt({ hash: echoHash })) + .contractAddress as Address; + await push.request({ + method: 'anvil_setCode' as never, + params: [accounts[2].address, ('0xef0100' + echo.slice(2)) as Hex] as never, + }); + const next = await client.market.preview(cardId, { + principal: BigInt(10), + executeBy: now + 600, + expiredAt: now + 7200, + }); + await expect(client.market.openJob(next)).rejects.toMatchObject({ + code: 'OPEN_JOB_SIMULATION_FAILED', + }); +}); +it('recovers the original card and opening when a provider updates in the same mined block', async () => { + const before = await provider.market.card(cardId); + const now = Number((await push.getBlock()).timestamp); + const plan = await owner.market.preview(cardId, { + principal: BigInt(10), + executeBy: now + 600, + expiredAt: now + 7200, + }); + let signature: Hex | undefined; + const sign = owner.universal.signTypedData.bind(owner.universal); + const capture = jest + .spyOn(owner.universal, 'signTypedData') + .mockImplementationOnce(async (data) => { + signature = (await sign(data)) as Hex; + throw new Error('Captured locally before broadcast'); + }); + await expect(owner.market.openJob(plan)).rejects.toThrow( + 'Captured locally before broadcast' + ); + capture.mockRestore(); + if (!signature) throw new Error('No owner signature captured'); + const openData = encodeFunctionData({ + abi: (await import('../src/lib/market/contracts/UniversalMarketplace')) + .MARKETPLACE_ABI, + functionName: 'openJob', + args: [ + { + cardId, + cardVersion: before.version, + job: plan.job, + session: plan.session, + intent: plan.intent, + sig: signature, + label: plan.label, + }, + ], + }); + const { chain, ...fields } = before; + const updateData = encodeFunctionData({ + abi: (await import('../src/lib/market/contracts/UniversalMarketplace')) + .MARKETPLACE_ABI, + functionName: 'updateAgentCard', + args: [ + cardId, + { + ...fields, + jobType: fields.jobType as Hex, + chainNamespace: chain, + providerFee: BigInt(7000000), + }, + PushChain.utils.market.encodeAgentCardRules( + { ...before.rules, maxGasPerCall: BigInt(17) }, + { chain } + ), + before.jobSpecTemplateBytes, + ], + }); + let openingHash: Hex; + let updateHash: Hex; + await push.request({ + method: 'evm_setAutomine' as never, + params: [false] as never, + }); + try { + openingHash = (await push.request({ + method: 'eth_sendTransaction' as never, + params: [ + { + from: accounts[0].address, + to: D.marketplace, + data: openData, + gas: '0x5b8d80', + }, + ] as never, + })) as Hex; + updateHash = (await push.request({ + method: 'eth_sendTransaction' as never, + params: [ + { + from: accounts[1].address, + to: D.marketplace, + data: updateData, + gas: '0x5b8d80', + }, + ] as never, + })) as Hex; + await push.request({ method: 'evm_mine' as never, params: [] as never }); + } finally { + await push.request({ + method: 'evm_setAutomine' as never, + params: [true] as never, + }); + } + const [openedReceipt, updatedReceipt] = await Promise.all([ + push.waitForTransactionReceipt({ hash: openingHash }), + push.waitForTransactionReceipt({ hash: updateHash }), + ]); + expect(openedReceipt.status).toBe('success'); + expect(updatedReceipt.status).toBe('success'); + expect(openedReceipt.blockNumber).toBe(updatedReceipt.blockNumber); + expect((await provider.market.card(cardId)).version).toBe( + before.version + BigInt(1) + ); + const recovered = await owner.market.openJob(plan, { + resume: await owner.universal.trackTransaction(openingHash), + }); + const source = '0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf'; + await push.request({ + method: 'anvil_impersonateAccount' as never, + params: [source] as never, + }); + const funder = createWalletClient({ + account: source, + chain: push.chain, + transport: http(rpc), + }); + for (const [asset, amount] of [ + [token, BigInt(10)], + [D.paymentToken, before.providerFee], + ] as const) { + const hash = await funder.writeContract({ + address: asset, + chain: push.chain, + abi: erc20Abi, + functionName: 'transfer', + args: [accounts[0].address, amount], + }); + await push.waitForTransactionReceipt({ hash }); + } + const deposited = await owner.market.deposit(recovered.jobId); + expect(deposited.cardVersion).toBe(before.version); + expect(deposited.txs.map((t) => [t.step, t.amount])).toEqual([ + ['PRINCIPAL', BigInt(10)], + ['PROVIDER_FEE', before.providerFee], + ]); + await (await owner.job.cancel(recovered.jobId)).wait(); +}); diff --git a/packages/core/__market-local__/setup.ts b/packages/core/__market-local__/setup.ts new file mode 100644 index 00000000..3855681f --- /dev/null +++ b/packages/core/__market-local__/setup.ts @@ -0,0 +1,42 @@ +/** Real viem RPC/actions, with local-fork timeouts and polling instead of production defaults. */ +jest.mock('viem', () => { + const actual = jest.requireActual('viem'); + return { + ...actual, + createPublicClient: (options: { + pollingInterval?: number; + [key: string]: unknown; + }) => + actual.createPublicClient({ + ...options, + pollingInterval: options.pollingInterval ?? 25, + }), + http: (url?: string, options?: Record) => + actual.http(url, { + ...(url?.startsWith('http://127.0.0.1:') ? { timeout: 120000 } : {}), + ...options, + }), + createWalletClient: (options: { + chain?: { rpcUrls?: { default?: { http?: string[] } } }; + [key: string]: unknown; + }) => { + const client = actual.createWalletClient(options); + const url = options.chain?.rpcUrls?.default?.http?.[0]; + if (url?.startsWith('http://127.0.0.1:')) { + const send = client.sendTransaction; + const local = actual.createPublicClient({ + transport: actual.http(url, { timeout: 120000 }), + }); + client.sendTransaction = async (params: unknown) => { + const hash = await send(params); + // Anvil may return the hash before its receipt is indexed, then forward a + // premature receipt query to the public fork RPC. Mine confirmation blocks locally before + // handing the real hash to SDK receipt polling. No result is mocked. + await local.request({ method: 'anvil_mine', params: ['0x4'] }); + return hash; + }; + } + return client; + }, + }; +}); diff --git a/packages/core/jest.agw-local.config.ts b/packages/core/jest.agw-local.config.ts new file mode 100644 index 00000000..c2e22b0c --- /dev/null +++ b/packages/core/jest.agw-local.config.ts @@ -0,0 +1,23 @@ +/** + * Local AGW contract harness (review-only). Runs the SDK against the real + * pinned v5 contracts on anvil. Requires Foundry and AGW_LOCAL_DIR from + * scripts/agw-local/prepare.sh. Never part of the unit or E2E runs. + * + * AGW_LOCAL_DIR=$(packages/core/scripts/agw-local/prepare.sh | tail -1) \ + * node node_modules/jest/bin/jest.js --config packages/core/jest.agw-local.config.ts --runInBand + */ +export default { + displayName: 'core-agw-local', + preset: '../../jest.preset.js', + testEnvironment: 'node', + setupFilesAfterEnv: ['/__agw-local__/setup.ts'], + transform: { + '^.+\\.[tj]s$': [ + 'ts-jest', + { tsconfig: '/tsconfig.agw-local.json' }, + ], + }, + moduleFileExtensions: ['ts', 'js', 'html'], + testTimeout: 120000, + testMatch: ['/__agw-local__/**/*.spec.ts'], +}; diff --git a/packages/core/jest.marketplace-local.config.ts b/packages/core/jest.marketplace-local.config.ts new file mode 100644 index 00000000..36c35c62 --- /dev/null +++ b/packages/core/jest.marketplace-local.config.ts @@ -0,0 +1,15 @@ +export default { + displayName: 'marketplace-local', + preset: '../../jest.preset.js', + testEnvironment: 'node', + setupFilesAfterEnv: ['/__market-local__/setup.ts'], + transform: { + '^.+\\.[tj]s$': [ + 'ts-jest', + { tsconfig: '/tsconfig.marketplace-local.json' }, + ], + }, + moduleFileExtensions: ['ts', 'js'], + testTimeout: 180000, + testMatch: ['/__market-local__/**/*.spec.ts'], +}; diff --git a/packages/core/package.json b/packages/core/package.json index 45bf8bc3..1f4eba06 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -51,6 +51,11 @@ }, "scripts": { "build:proto": "scripts/protoc-generate.sh", + "docs:check:agw": "node scripts/check-agw-docs.js", + "agw:verify": "node scripts/agw-verify.js", + "agw:check:package": "node scripts/check-agw-package.js", + "agw:check:api": "node scripts/check-agw-api.js", + "agw:check:runtimes": "node scripts/check-agw-runtimes.js", "e2e:list": "ts-node --transpile-only __e2e__/ci/run.ts --list", "e2e:verify": "ts-node --transpile-only __e2e__/ci/run.ts --verify", "e2e:preflight": "ts-node --transpile-only __e2e__/ci/preflight.ts", @@ -67,6 +72,8 @@ "src/**/*.d.ts", "src/**/*.json", "README.md", + "AGW.md", + "MARKETPLACE.md", "CHANGELOG.md" ], "devDependencies": { diff --git a/packages/core/scripts/agw-local/abis/engine.json b/packages/core/scripts/agw-local/abis/engine.json new file mode 100644 index 00000000..bdf678eb --- /dev/null +++ b/packages/core/scripts/agw-local/abis/engine.json @@ -0,0 +1,1957 @@ +[ + { + "type": "function", + "name": "areActionsEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areERC1271PoliciesEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areUserOpPoliciesEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "disableActionId", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "disableActionPolicies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + }, + { + "name": "policies", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "disableERC1271Policies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policies", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "contexts", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "disableUserOpPolicies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policies", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "enableActionPolicies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "enableERC1271Policies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "erc1271Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "enableSessions", + "inputs": [ + { + "name": "sessions", + "type": "tuple[]", + "internalType": "struct Session[]", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "permissionIds", + "type": "bytes32[]", + "internalType": "PermissionId[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "enableUserOpPolicies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getActionPolicies", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + } + ], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getERC1271Policies", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getEnabledActions", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getEnabledERC7739Content", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "enabledERC7739ContentHashes", + "type": "tuple[]", + "internalType": "struct ERC7739ContextHashes[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNameHashes", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getNonce", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPermissionIDs", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "permissionIds", + "type": "bytes32[]", + "internalType": "PermissionId[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPermissionId", + "inputs": [ + { + "name": "session", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "getSessionDigest", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + }, + { + "name": "mode", + "type": "uint8", + "internalType": "enum SmartSessionMode" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getSessionValidatorAndConfig", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "address" + }, + { + "name": "sessionValidatorData", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getUserOpPolicies", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isActionIdEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isActionPolicyEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + }, + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isERC1271PolicyEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isERC7739ContentEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "content", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isISessionValidatorSet", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isInitialized", + "inputs": [ + { + "name": "smartAccount", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isModuleType", + "inputs": [ + { + "name": "typeID", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "isPermissionEnabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isUserOpPolicyEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isValidSignatureWithSender", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "hash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "signature", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "result", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "onInstall", + "inputs": [ + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onUninstall", + "inputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "removeSession", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeEnableSignature", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setPermit4337Paymaster", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "enabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "validateUserOp", + "inputs": [ + { + "name": "userOp", + "type": "tuple", + "internalType": "struct PackedUserOperation", + "components": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "initCode", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "callData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "accountGasLimits", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "preVerificationGas", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "gasFees", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "paymasterAndData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "signature", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "userOpHash", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "vd", + "type": "uint256", + "internalType": "ValidationData" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ActionIdDisabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "indexed": false, + "internalType": "ActionId" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "NonceIterated", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newValue", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PermissionIdPermit4337Paymaster", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "enabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PolicyDisabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "policyType", + "type": "uint8", + "indexed": false, + "internalType": "enum PolicyType" + }, + { + "name": "policy", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PolicyEnabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "policyType", + "type": "uint8", + "indexed": false, + "internalType": "enum PolicyType" + }, + { + "name": "policy", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SessionCreated", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SessionRemoved", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SessionValidatorDisabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "sessionValidator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SessionValidatorEnabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "sessionValidator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AssociatedArray_OutOfBounds", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ChainIdMismatch", + "inputs": [ + { + "name": "providedChainId", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "ChainIdMismatch", + "inputs": [ + { + "name": "providedChainId", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "ForbiddenValidationData", + "inputs": [] + }, + { + "type": "error", + "name": "HashIndexOutOfBounds", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "HashMismatch", + "inputs": [ + { + "name": "providedHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "computedHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "HashMismatch", + "inputs": [ + { + "name": "providedHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "computedHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "InvalidActionId", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidCallTarget", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidData", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidEnableSignature", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "hash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "InvalidISessionValidator", + "inputs": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + } + ] + }, + { + "type": "error", + "name": "InvalidMode", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidPermissionId", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ] + }, + { + "type": "error", + "name": "InvalidSelfCall", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidSession", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ] + }, + { + "type": "error", + "name": "InvalidSessionKeySignature", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "sessionValidator", + "type": "address", + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "userOpHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "InvalidTarget", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidUserOpSender", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "NoExecutionsInBatch", + "inputs": [] + }, + { + "type": "error", + "name": "NoPoliciesSet", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ] + }, + { + "type": "error", + "name": "PartlyEnabledActions", + "inputs": [] + }, + { + "type": "error", + "name": "PartlyEnabledPolicies", + "inputs": [] + }, + { + "type": "error", + "name": "PaymasterValidationNotEnabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ] + }, + { + "type": "error", + "name": "PolicyViolation", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SignerNotFound", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SignerNotFound", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SmartSessionModuleAlreadyInstalled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "UnsupportedCallType", + "inputs": [ + { + "name": "callType", + "type": "bytes1", + "internalType": "CallType" + } + ] + }, + { + "type": "error", + "name": "UnsupportedExecutionType", + "inputs": [] + }, + { + "type": "error", + "name": "UnsupportedPolicy", + "inputs": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "UnsupportedSmartSessionMode", + "inputs": [ + { + "name": "mode", + "type": "uint8", + "internalType": "enum SmartSessionMode" + } + ] + } +] diff --git a/packages/core/scripts/agw-local/abis/factory.json b/packages/core/scripts/agw-local/abis/factory.json new file mode 100644 index 00000000..483490b2 --- /dev/null +++ b/packages/core/scripts/agw-local/abis/factory.json @@ -0,0 +1,1496 @@ +[ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "OPERATOR_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "PAUSER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UPGRADE_INTERFACE_VERSION", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "acceptDefaultAdminTransfer", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "beginDefaultAdminTransfer", + "inputs": [ + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "cancelDefaultAdminTransfer", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "changeDefaultAdminDelay", + "inputs": [ + { + "name": "newDelay", + "type": "uint48", + "internalType": "uint48" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "createWallet", + "inputs": [ + { + "name": "label", + "type": "string", + "internalType": "string" + }, + { + "name": "rules", + "type": "tuple[]", + "internalType": "struct Session[]", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "rulesIds", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "createWalletWithSig", + "inputs": [ + { + "name": "intent", + "type": "tuple", + "internalType": "struct OwnerIntent", + "components": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "sessionHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "execCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "grantNonce", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "label", + "type": "string", + "internalType": "string" + }, + { + "name": "rules", + "type": "tuple[]", + "internalType": "struct Session[]", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "rulesIds", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "defaultAdmin", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultAdminDelay", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint48", + "internalType": "uint48" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultAdminDelayIncreaseWait", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint48", + "internalType": "uint48" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deployWallet", + "inputs": [ + { + "name": "label", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "deployWalletWithSig", + "inputs": [ + { + "name": "intent", + "type": "tuple", + "internalType": "struct OwnerIntent", + "components": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "sessionHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "execCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "grantNonce", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "label", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "domainSeparator", + "inputs": [ + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "indexOf", + "inputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "admin", + "type": "address", + "internalType": "address" + }, + { + "name": "walletImplementation_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isWallet", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "ownerOf", + "inputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pendingDefaultAdmin", + "inputs": [], + "outputs": [ + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + }, + { + "name": "schedule", + "type": "uint48", + "internalType": "uint48" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pendingDefaultAdminDelay", + "inputs": [], + "outputs": [ + { + "name": "newDelay", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "schedule", + "type": "uint48", + "internalType": "uint48" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "predictWallet", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "deployed", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "proxiableUUID", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rollbackDefaultAdminDelay", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeToAndCall", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "walletCount", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "walletImplementation", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "DefaultAdminDelayChangeCanceled", + "inputs": [], + "anonymous": false + }, + { + "type": "event", + "name": "DefaultAdminDelayChangeScheduled", + "inputs": [ + { + "name": "newDelay", + "type": "uint48", + "indexed": false, + "internalType": "uint48" + }, + { + "name": "effectSchedule", + "type": "uint48", + "indexed": false, + "internalType": "uint48" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DefaultAdminTransferCanceled", + "inputs": [], + "anonymous": false + }, + { + "type": "event", + "name": "DefaultAdminTransferScheduled", + "inputs": [ + { + "name": "newAdmin", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "acceptSchedule", + "type": "uint48", + "indexed": false, + "internalType": "uint48" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WalletDeployed", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "index", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "wallet", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "label", + "type": "string", + "indexed": false, + "internalType": "string" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AccessControlBadConfirmation", + "inputs": [] + }, + { + "type": "error", + "name": "AccessControlEnforcedDefaultAdminDelay", + "inputs": [ + { + "name": "schedule", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "AccessControlEnforcedDefaultAdminRules", + "inputs": [] + }, + { + "type": "error", + "name": "AccessControlInvalidDefaultAdmin", + "inputs": [ + { + "name": "defaultAdmin", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AccessControlUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "neededRole", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "AddressEmptyCode", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "CloneArgumentsTooLong", + "inputs": [] + }, + { + "type": "error", + "name": "Create2EmptyBytecode", + "inputs": [] + }, + { + "type": "error", + "name": "ERC1967InvalidImplementation", + "inputs": [ + { + "name": "implementation", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC1967NonPayable", + "inputs": [] + }, + { + "type": "error", + "name": "EnforcedPause", + "inputs": [] + }, + { + "type": "error", + "name": "ExecutorMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ExpectedPause", + "inputs": [] + }, + { + "type": "error", + "name": "FailedCall", + "inputs": [] + }, + { + "type": "error", + "name": "FailedDeployment", + "inputs": [] + }, + { + "type": "error", + "name": "ImplementationNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "IndexMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "provided", + "type": "uint96", + "internalType": "uint96" + } + ] + }, + { + "type": "error", + "name": "IndexOutOfRange", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "next", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "InsufficientBalance", + "inputs": [ + { + "name": "balance", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "needed", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "IntentGrantNonceNotZero", + "inputs": [ + { + "name": "provided", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "IntentRulesMismatch", + "inputs": [ + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "IntentWalletMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "provided", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidOwnerSignature", + "inputs": [] + }, + { + "type": "error", + "name": "NotAWallet", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "SafeCastOverflowedUintDowncast", + "inputs": [ + { + "name": "bits", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SignatureExpired", + "inputs": [ + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "TooManyInitialRules", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "UUPSUnauthorizedCallContext", + "inputs": [] + }, + { + "type": "error", + "name": "UUPSUnsupportedProxiableUUID", + "inputs": [ + { + "name": "slot", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ZeroAddress", + "inputs": [] + } +] diff --git a/packages/core/scripts/agw-local/abis/manifest.json b/packages/core/scripts/agw-local/abis/manifest.json new file mode 100644 index 00000000..206d25bd --- /dev/null +++ b/packages/core/scripts/agw-local/abis/manifest.json @@ -0,0 +1,13 @@ +{ + "sourceRepository": "https://github.com/pushchain/push-agentic-wallets", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "deployedAbiEvidence": "v6 isolated source compilation; initial live code sizes/wiring checked at block 24244801", + "files": { + "wallet.json": "76705e5a25b10d3a84f867f983c3e4f5adfc881fb0d65710fb8684df2ea7abd3", + "factory.json": "08588f8870335492c5abeee32eec6a9bb050f81e234fdd58bbf389c6e9074a12", + "policy.json": "a07661d19b19656afdea560275d45669a908cd96646817884295e0017560f299", + "engine.json": "6e5d9cea4dbed01f06af913c1e093743b86b7432195f4a4bf90fb94b282c51b2", + "validator.json": "a4570ddc373241580de8742cbb3d9f2c837094c65bfd1cdd52243ca0c38196fd" + }, + "note": "Policy ABI includes linked SvmRulebook errors for revert decoding; callable ABI is unchanged." +} diff --git a/packages/core/scripts/agw-local/abis/policy.json b/packages/core/scripts/agw-local/abis/policy.json new file mode 100644 index 00000000..65270f95 --- /dev/null +++ b/packages/core/scripts/agw-local/abis/policy.json @@ -0,0 +1,2184 @@ +[ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "SEND_OUTBOUND_SELECTOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SESSION_ENGINE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UNIVERSAL_EXECUTOR_MODULE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UNIVERSAL_GATEWAY_PC", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "assertSpent", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "expectedValueSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expectedAmountSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expectedCalls", + "type": "uint32", + "internalType": "uint32" + } + ], + "outputs": [], + "stateMutability": "view" + }, + { + "type": "function", + "name": "assertSpent", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "expectedSpent", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "view" + }, + { + "type": "function", + "name": "checkAction", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "creditRevert", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "outboundTxId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getConfig", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct Config", + "components": [ + { + "name": "initialized", + "type": "bool", + "internalType": "bool" + }, + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "expectedCEA", + "type": "address", + "internalType": "address" + }, + { + "name": "maxGasPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "assets", + "type": "tuple[]", + "internalType": "struct AssetCapState[]", + "components": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "maxPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxTotal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "spent", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "allowedCalls", + "type": "tuple[]", + "internalType": "struct AllowedCall[]", + "components": [ + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "beneficiaryOffset", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "hasBeneficiary", + "type": "bool", + "internalType": "bool" + }, + { + "name": "maxValue", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pins", + "type": "tuple[]", + "internalType": "struct ArgPin[]", + "components": [ + { + "name": "offset", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "op", + "type": "uint8", + "internalType": "enum PinOp" + }, + { + "name": "value", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMode", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct ModeSlot", + "components": [ + { + "name": "initialized", + "type": "bool", + "internalType": "bool" + }, + { + "name": "mode", + "type": "uint8", + "internalType": "enum RulesType" + }, + { + "name": "vm", + "type": "uint8", + "internalType": "enum VmFamily" + }, + { + "name": "chainHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getNativeConfig", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct NativeConfig", + "components": [ + { + "name": "initialized", + "type": "bool", + "internalType": "bool" + }, + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "maxValuePerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxValueTotal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "valueSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amount", + "type": "tuple", + "internalType": "struct AmountRule", + "components": [ + { + "name": "enabled", + "type": "bool", + "internalType": "bool" + }, + { + "name": "offset", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "maxPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxTotal", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "amountSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxCalls", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "callsUsed", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "pins", + "type": "tuple[]", + "internalType": "struct ArgPin[]", + "components": [ + { + "name": "offset", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "op", + "type": "uint8", + "internalType": "enum PinOp" + }, + { + "name": "value", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getSvmConfig", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct SvmConfig", + "components": [ + { + "name": "initialized", + "type": "bool", + "internalType": "bool" + }, + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "expectedCEA", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "gatewayProgram", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "maxGasPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "assets", + "type": "tuple[]", + "internalType": "struct AssetCapState[]", + "components": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "maxPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxTotal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "spent", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ceaAccounts", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { + "name": "programs", + "type": "tuple[]", + "internalType": "struct AllowedProgram[]", + "components": [ + { + "name": "program", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "discriminator", + "type": "bytes8", + "internalType": "bytes8" + }, + { + "name": "discriminatorLen", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dataless", + "type": "bool", + "internalType": "bool" + }, + { + "name": "maxAccounts", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "name": "pins", + "type": "tuple[]", + "internalType": "struct SvmAccountPin[]", + "components": [ + { + "name": "ruleIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "accountIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "name": "dataPins", + "type": "tuple[]", + "internalType": "struct SvmDataPin[]", + "components": [ + { + "name": "ruleIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "fromEnd", + "type": "bool", + "internalType": "bool" + }, + { + "name": "offset", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "offsetB", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "len", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "mode", + "type": "uint8", + "internalType": "enum SvmDataPinMode" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "num", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "den", + "type": "uint64", + "internalType": "uint64" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "universalGatewayPC", + "type": "address", + "internalType": "address" + }, + { + "name": "universalExecutorModule", + "type": "address", + "internalType": "address" + }, + { + "name": "sessionEngine", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initializeWithMultiplexer", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "configId", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isCredited", + "inputs": [ + { + "name": "outboundTxId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pushChainHash", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "iid", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "pure" + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "NativeCallMetered", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "indexed": true, + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OutboundMetered", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "indexed": true, + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PolicySet", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "indexed": false, + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RevertCredited", + "inputs": [ + { + "name": "outboundTxId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "id", + "type": "bytes32", + "indexed": true, + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amountApplied", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulesConfigured", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "indexed": true, + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mode", + "type": "uint8", + "indexed": false, + "internalType": "enum RulesType" + }, + { + "name": "vm", + "type": "uint8", + "indexed": false, + "internalType": "enum VmFamily" + }, + { + "name": "chainHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AllowListOutOfRange", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AlreadyCredited", + "inputs": [ + { + "name": "outboundTxId", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "AlreadyInitialized", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + } + ] + }, + { + "type": "error", + "name": "AmountExceedsCap", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ArgPinAboveMax", + "inputs": [ + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "max", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ArgPinMismatch", + "inputs": [ + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "AssetListOutOfRange", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AssetNotAllowed", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AssetSpentMismatch", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "BatchSizeOutOfRange", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CallLimitReached", + "inputs": [ + { + "name": "callsUsed", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "maxCalls", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "type": "error", + "name": "CallNotAllowed", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "CalldataTooShort", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CalldataTooShortForAmount", + "inputs": [ + { + "name": "actualLength", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "needed", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CalldataTooShortForPin", + "inputs": [ + { + "name": "actualLength", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "needed", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CallerIsNotUEModule", + "inputs": [ + { + "name": "caller", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ChainMismatch", + "inputs": [ + { + "name": "declared", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "assetChain", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "DuplicateAsset", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "EmptyChain", + "inputs": [] + }, + { + "type": "error", + "name": "ForbiddenInnerTarget", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidAsset", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidConfigField", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidExpiry", + "inputs": [ + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRevertRecipient", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidSelector", + "inputs": [ + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "InvalidTarget", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "MalformedInnerCalldata", + "inputs": [] + }, + { + "type": "error", + "name": "MalformedOutboundRequest", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "NativeAmountExceedsCap", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "NativeTargetIsGateway", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "NativeTargetZero", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitialized", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "PCValueExceedsCap", + "inputs": [ + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "PayloadNotMulticall", + "inputs": [] + }, + { + "type": "error", + "name": "PolicyNotInitialized", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "RecipientMustBeEmpty", + "inputs": [] + }, + { + "type": "error", + "name": "RulesExpired", + "inputs": [ + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "SelectorMismatch", + "inputs": [ + { + "name": "actual", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expected", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "SpentLengthMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SpentMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TargetMismatch", + "inputs": [ + { + "name": "actual", + "type": "address", + "internalType": "address" + }, + { + "name": "expected", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "TooManyAllowedCallPins", + "inputs": [ + { + "name": "total", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TooManyPins", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TotalNativeAmountExceeded", + "inputs": [ + { + "name": "newSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TotalSpendCapExceeded", + "inputs": [ + { + "name": "wouldBeTotal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TotalValueExceeded", + "inputs": [ + { + "name": "newSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "UncappedGasSwapRejected", + "inputs": [] + }, + { + "type": "error", + "name": "UnsupportedEnvelopeVersion", + "inputs": [ + { + "name": "version", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "UnsupportedNamespace", + "inputs": [ + { + "name": "chainHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ValueExceedsCap", + "inputs": [ + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ValueOnlyCalldataNotEmpty", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ValueOnlyWithAmountRule", + "inputs": [] + }, + { + "type": "error", + "name": "ValueOnlyWithPins", + "inputs": [] + }, + { + "type": "error", + "name": "WrongModeForCall", + "inputs": [ + { + "name": "actual", + "type": "uint8", + "internalType": "enum RulesType" + } + ] + }, + { + "type": "error", + "name": "WrongVmForCall", + "inputs": [ + { + "name": "actual", + "type": "uint8", + "internalType": "enum VmFamily" + } + ] + }, + { + "type": "error", + "name": "ZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "ZeroMaxCalls", + "inputs": [] + }, + { + "type": "error", + "name": "AmbiguousRule", + "inputs": [ + { + "name": "i", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "j", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AmountExceedsU64", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CeaAccountAtUnpinnedIndex", + "inputs": [ + { + "name": "accountIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "account", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "CeaAccountsMissExpectedCEA", + "inputs": [] + }, + { + "type": "error", + "name": "DiscriminatorLenOutOfRange", + "inputs": [ + { + "name": "rule", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "len", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "DuplicateSvmPin", + "inputs": [ + { + "name": "first", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "second", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ForbiddenProgramInAllowList", + "inputs": [ + { + "name": "rule", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "program", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ForbiddenTargetProgram", + "inputs": [ + { + "name": "program", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "InvalidCeaAccount", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "InvalidSvmConfigField", + "inputs": [] + }, + { + "type": "error", + "name": "MalformedSvmPayload", + "inputs": [ + { + "name": "code", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "ProgramListOutOfRange", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ProgramNotAllowed", + "inputs": [ + { + "name": "program", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "discriminator", + "type": "bytes8", + "internalType": "bytes8" + } + ] + }, + { + "type": "error", + "name": "RecipientNotPubkey", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "RecipientTargetMismatch", + "inputs": [ + { + "name": "recipient", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "target", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "RuleWithoutPin", + "inputs": [ + { + "name": "rule", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmAccountCountBelowPin", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "needed", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmAccountCountMismatch", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expected", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmAccountPinMismatch", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "accountIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "SvmAccountsOutOfRange", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmDataCeilingExceeded", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "ceiling", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmDataFloorNotMet", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "floor", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmDataPinInvalid", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmDataPinMismatch", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "SvmDataRatioNotMet", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "a", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "b", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "num", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "den", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "SvmDataTooShortForPin", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "ixLen", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmInstructionNotExecute", + "inputs": [ + { + "name": "instructionId", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmIxDataTooLong", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmMaxAccountsOutOfRange", + "inputs": [ + { + "name": "rule", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxAccounts", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmPayloadEmpty", + "inputs": [] + }, + { + "type": "error", + "name": "SvmPinIndexOutOfRange", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "accountIndex", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmPinRuleOutOfRange", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rule", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "TooManyCeaAccounts", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TooManySvmDataPins", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TooManySvmPins", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + } +] diff --git a/packages/core/scripts/agw-local/abis/validator.json b/packages/core/scripts/agw-local/abis/validator.json new file mode 100644 index 00000000..86830881 --- /dev/null +++ b/packages/core/scripts/agw-local/abis/validator.json @@ -0,0 +1,141 @@ +[ + { + "type": "function", + "name": "isInitialized", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "isModuleType", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "onInstall", + "inputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "onUninstall", + "inputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "validateConfig", + "inputs": [ + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "validateSignatureWithData", + "inputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "validSig", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "error", + "name": "AlreadyInitialized", + "inputs": [ + { + "name": "smartAccount", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "MalformedConfig", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitialized", + "inputs": [ + { + "name": "smartAccount", + "type": "address", + "internalType": "address" + } + ] + } +] diff --git a/packages/core/scripts/agw-local/abis/wallet.json b/packages/core/scripts/agw-local/abis/wallet.json new file mode 100644 index 00000000..311c9a6f --- /dev/null +++ b/packages/core/scripts/agw-local/abis/wallet.json @@ -0,0 +1,1731 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "sessionEngine_", + "type": "address", + "internalType": "address" + }, + { + "name": "rulesPolicy_", + "type": "address", + "internalType": "address" + }, + { + "name": "sessionValidator_", + "type": "address", + "internalType": "address" + }, + { + "name": "universalGatewayPC_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "RULES_POLICY", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SESSION_ENGINE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SESSION_VALIDATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UNIVERSAL_GATEWAY_PC", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "accountId", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "agentOf", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "checkpointCount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "domainSeparator", + "inputs": [ + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "execute", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "executionCalldata", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "executeAsAgent", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "executionCalldata", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "executeWithSig", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "executionCalldata", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "intent", + "type": "tuple", + "internalType": "struct OwnerIntent", + "components": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "sessionHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "execCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "grantNonce", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "factory", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getNonce", + "inputs": [ + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + } + ], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantNonce", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRules", + "inputs": [ + { + "name": "session", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "grantRulesWithSig", + "inputs": [ + { + "name": "session", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + }, + { + "name": "intent", + "type": "tuple", + "internalType": "struct OwnerIntent", + "components": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "sessionHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "execCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "grantNonce", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initializeAccount", + "inputs": [ + { + "name": "label_", + "type": "string", + "internalType": "string" + }, + { + "name": "rules", + "type": "tuple[]", + "internalType": "struct Session[]", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "rulesIds", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "installModule", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isModuleInstalled", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isValidSignature", + "inputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "label", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "lastCheckpointBlock", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "onERC1155BatchReceived", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "onERC1155Received", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "onERC721Received", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "revokeAllRules", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRules", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLabel", + "inputs": [ + { + "name": "label_", + "type": "string", + "internalType": "string" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsExecutionMode", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "supportsModule", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "uninstallModule", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "internalType": "address" + }, + { + "name": "deInitData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "AccountInitialized", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "engine", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Checkpointed", + "inputs": [ + { + "name": "seq", + "type": "uint64", + "indexed": true, + "internalType": "uint64" + }, + { + "name": "kind", + "type": "uint8", + "indexed": false, + "internalType": "enum CheckpointKind" + }, + { + "name": "ref", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "blockNumber", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LabelSet", + "inputs": [ + { + "name": "label", + "type": "string", + "indexed": false, + "internalType": "string" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ModuleInstalled", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ModuleUninstalled", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnerExecuted", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "executionCalldataHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnerExecutedWithSig", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "executionCalldataHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "indexed": false, + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulesActionAuthorized", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "agent", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "callsHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulesGranted", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "uint8", + "indexed": false, + "internalType": "enum RulesType" + }, + { + "name": "chainHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainNamespace", + "type": "string", + "indexed": false, + "internalType": "string" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulesRevoked", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "UninstallCallbackFailed", + "inputs": [ + { + "name": "module", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AlreadyInitialized", + "inputs": [] + }, + { + "type": "error", + "name": "CallerIsNotAgent", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "caller", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "CallerIsNotFactory", + "inputs": [] + }, + { + "type": "error", + "name": "CallerIsNotOwner", + "inputs": [] + }, + { + "type": "error", + "name": "DuplicateAction", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "EmptyChain", + "inputs": [] + }, + { + "type": "error", + "name": "EngineStillHoldsPermissions", + "inputs": [] + }, + { + "type": "error", + "name": "ExecutorMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ForbiddenActionSelector", + "inputs": [ + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ForbiddenActionTarget", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ForbiddenDispatchTarget", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InconsistentChain", + "inputs": [ + { + "name": "actionIndex", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "IntentExecMismatch", + "inputs": [ + { + "name": "actualCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "IntentGrantNonceMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "provided", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "IntentSessionMismatch", + "inputs": [ + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "IntentWalletMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "provided", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidModuleAddress", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidNonce", + "inputs": [ + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "expected", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "provided", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "InvalidOwnerSignature", + "inputs": [] + }, + { + "type": "error", + "name": "LabelTooLong", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "MalformedBatchCalldata", + "inputs": [] + }, + { + "type": "error", + "name": "MalformedSessionShape", + "inputs": [] + }, + { + "type": "error", + "name": "ModuleAlreadyInstalled", + "inputs": [ + { + "name": "module", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "OutsideTimeWindow", + "inputs": [ + { + "name": "validAfter", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "OwnerLaneRequired", + "inputs": [ + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + } + ] + }, + { + "type": "error", + "name": "OwnerSigExpired", + "inputs": [ + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "ReentrancyGuardReentrantCall", + "inputs": [] + }, + { + "type": "error", + "name": "RulesTypeMismatch", + "inputs": [ + { + "name": "derived", + "type": "uint8", + "internalType": "enum RulesType" + }, + { + "name": "actionIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "TooManyActions", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "UnknownPermission", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "UnsupportedExecutionMode", + "inputs": [] + }, + { + "type": "error", + "name": "UnsupportedModuleType", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ValidationFailed", + "inputs": [ + { + "name": "authorizer", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ValidatorNotInstalled", + "inputs": [ + { + "name": "validator", + "type": "address", + "internalType": "address" + } + ] + } +] diff --git a/packages/core/scripts/agw-local/contracts/HarnessFixtures.sol b/packages/core/scripts/agw-local/contracts/HarnessFixtures.sol new file mode 100644 index 00000000..9f509350 --- /dev/null +++ b/packages/core/scripts/agw-local/contracts/HarnessFixtures.sol @@ -0,0 +1,197 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +// REVIEW-ONLY FIXTURES for the SDK's local AGW harness. None of this is production +// code and none of it is a model of a deployed Push contract beyond the narrow +// behaviour named on each contract. Live gateway/core/TSS/destination behaviour is +// NOT exercised by anything that uses these fixtures. + +/// @notice Minimal PRC20 stand-in: transfers, allowances, burn and the +/// SOURCE_CHAIN_NAMESPACE view URP interrogates at universal grant. +contract HarnessPRC20 { + string public SOURCE_CHAIN_NAMESPACE; + string private _sourceOverride; + bool private _hasSourceOverride; + function setSourceChainNamespace(string calldata chain) external { SOURCE_CHAIN_NAMESPACE = chain; } + function setSourceTokenAddress(string calldata source) external { + _sourceOverride = source; _hasSourceOverride = true; + } + function SOURCE_TOKEN_ADDRESS() external view returns (string memory) { + if (_hasSourceOverride) return _sourceOverride; + bytes memory chars = "0123456789abcdef"; + bytes memory out = new bytes(42); out[0] = "0"; out[1] = "x"; + uint160 v = uint160(address(this)); + for (uint256 i; i < 40; ++i) out[41-i] = chars[(v >> (4*i)) & 15]; + return string(out); + } + uint8 public immutable decimals; + mapping(address => uint256) public balanceOf; + mapping(address => mapping(address => uint256)) public allowance; + uint256 public totalSupply; + + error LowBalance(); + error LowAllowance(); + + event Transfer(address indexed from, address indexed to, uint256 value); + event Approval(address indexed owner, address indexed spender, uint256 value); + + constructor(string memory sourceChainNamespace, uint8 decimals_) { + SOURCE_CHAIN_NAMESPACE = sourceChainNamespace; + decimals = decimals_; + } + + function mint(address to, uint256 amount) external { + balanceOf[to] += amount; + totalSupply += amount; + emit Transfer(address(0), to, amount); + } + + function approve(address spender, uint256 amount) external returns (bool) { + allowance[msg.sender][spender] = amount; + emit Approval(msg.sender, spender, amount); + return true; + } + + function transfer(address to, uint256 amount) external returns (bool) { + _move(msg.sender, to, amount); + return true; + } + + function transferFrom(address from, address to, uint256 amount) external returns (bool) { + uint256 a = allowance[from][msg.sender]; + if (a < amount) revert LowAllowance(); + allowance[from][msg.sender] = a - amount; + _move(from, to, amount); + return true; + } + + function burn(uint256 amount) external returns (bool) { + if (balanceOf[msg.sender] < amount) revert LowBalance(); + balanceOf[msg.sender] -= amount; + totalSupply -= amount; + emit Transfer(msg.sender, address(0), amount); + return true; + } + + function _move(address from, address to, uint256 amount) internal { + if (balanceOf[from] < amount) revert LowBalance(); + balanceOf[from] -= amount; + balanceOf[to] += amount; + emit Transfer(from, to, amount); + } +} + +/// @notice Fixed-quote stand-in for UniversalCore.getOutboundTxGasAndFees. +contract HarnessUniversalCore { + uint256 public gasFee = 1e15; + uint256 public protocolFee = 1e14; + mapping(string => address) public gasTokenPRC20ByChainNamespace; + function setGasToken(string calldata chain, address token) external { gasTokenPRC20ByChainNamespace[chain] = token; } + + function getOutboundTxGasAndFees(address prc20, uint256 gasLimit) + external + view + returns (address gasToken, uint256 gasFee_, uint256 protocolFee_, uint256 gasPrice, string memory chainNamespace, uint256 gasLimitUsed) + { + (bool ok, bytes memory ret) = prc20.staticcall(abi.encodeWithSignature("SOURCE_CHAIN_NAMESPACE()")); + chainNamespace = ok ? abi.decode(ret, (string)) : ""; + return (prc20, gasFee, protocolFee, 1 gwei, chainNamespace, gasLimit == 0 ? 200_000 : gasLimit); + } +} + +struct HarnessOutboundRequest { + bytes recipient; + address token; + uint256 amount; + uint256 gasLimit; + uint256 gasPrice; + uint256 maxPCForGas; + bytes payload; + address revertRecipient; +} + +/// @notice Stub of UniversalGatewayPC's outbound pull. Models ONLY: non-zero +/// token/revertRecipient, transferFrom(msg.sender) + burn of `amount`, +/// msg.value >= protocolFee, maxPCForGas <= msg.value - protocolFee with the +/// excess refunded, and a recorded request. No fee swap, routing, TSS or +/// destination execution. Mirrors gateway bcbf7df UniversalGatewayPC.sol:141-237,430-435. +contract HarnessGatewayPC { + HarnessUniversalCore public immutable universalCore; + uint256 public outboundCount; + bytes32 public lastRequestHash; + address public lastSender; + + error InvalidInput(); + error InsufficientFee(); + + event HarnessOutbound(address indexed sender, address indexed token, uint256 amount, uint256 value, bytes32 requestHash); + + constructor(HarnessUniversalCore core_) { + universalCore = core_; + } + + function sendUniversalTxOutbound(HarnessOutboundRequest calldata req) external payable { + if (req.token == address(0) || req.revertRecipient == address(0)) revert InvalidInput(); + if (req.amount == 0 && req.payload.length == 0) revert InvalidInput(); + uint256 protocolFee = universalCore.protocolFee(); + if (msg.value < protocolFee) revert InsufficientFee(); + uint256 pcForSwap = msg.value - protocolFee; + if (req.maxPCForGas != 0) { + if (req.maxPCForGas > pcForSwap) revert InsufficientFee(); + uint256 refund = pcForSwap - req.maxPCForGas; + if (refund > 0) { + (bool ok,) = msg.sender.call{ value: refund }(""); + require(ok, "refund"); + } + } + if (req.amount > 0) { + HarnessPRC20(req.token).transferFrom(msg.sender, address(this), req.amount); + HarnessPRC20(req.token).burn(req.amount); + } + outboundCount++; + lastSender = msg.sender; + lastRequestHash = keccak256(abi.encode(req)); + emit HarnessOutbound(msg.sender, req.token, req.amount, msg.value, lastRequestHash); + } + + receive() external payable { } +} + +/// @notice Native-rule target: records calls so authorization effects are observable. +contract HarnessTarget { + uint256 public counter; + address public lastBeneficiary; + uint256 public lastAmount; + uint256 public received; + + function increment() external { + counter++; + } + + function deposit(address beneficiary, uint256 amount) external payable { + lastBeneficiary = beneficiary; + lastAmount = amount; + received += msg.value; + counter++; + } + + receive() external payable { + received += msg.value; + } +} + +/// @notice Test-only ERC-7821-shaped executor for real Anvil EIP-7702 transactions. +/// Models self-call authorization and atomic CALL dispatch, not the deployed OZ artifact. +contract HarnessAtomicExecutor { + struct Execution { address target; uint256 value; bytes callData; } + function execute(bytes32 mode, bytes calldata data) external payable { + require(msg.sender == address(this), "self call only"); + require(mode == bytes32(uint256(1) << 248), "batch/default only"); + Execution[] memory calls = abi.decode(data, (Execution[])); + for (uint256 i; i < calls.length; ++i) { + (bool ok, bytes memory ret) = calls[i].target.call{value: calls[i].value}(calls[i].callData); + if (!ok) assembly { revert(add(ret, 32), mload(ret)) } + } + } + receive() external payable {} +} diff --git a/packages/core/scripts/agw-local/contracts/MarketplaceOwnerFixtures.sol b/packages/core/scripts/agw-local/contracts/MarketplaceOwnerFixtures.sol new file mode 100644 index 00000000..c52cb567 --- /dev/null +++ b/packages/core/scripts/agw-local/contracts/MarketplaceOwnerFixtures.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +/// SDK acceptance only: a real ERC-1271 owner and an EIP-7702-compatible verifier. +contract Marketplace1271Owner { + address public immutable controller; + uint8 public responseMode; + + constructor(address controller_) { controller = controller_; } + receive() external payable {} + + function setResponseMode(uint8 mode) external { + require(msg.sender == controller, "controller"); + responseMode = mode; + } + + function isValidSignature(bytes32 digest, bytes calldata signature) external view returns (bytes4) { + if (responseMode == 1) return 0xffffffff; + if (responseMode == 2) { + // A magic prefix with nonzero trailing bytes must not count as ERC-1271 success. + assembly { mstore(0, or(shl(224, 0x1626ba7e), 1)) return(0, 32) } + } + if (responseMode == 3) { + assembly { mstore(0, shl(224, 0x1626ba7e)) return(0, 4) } + } + if (signature.length != 65) return 0xffffffff; + bytes32 r; + bytes32 s; + uint8 v; + assembly { r := calldataload(signature.offset) s := calldataload(add(signature.offset, 32)) v := byte(0, calldataload(add(signature.offset, 64))) } + if (uint256(s) > 0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0 || (v != 27 && v != 28)) return 0xffffffff; + return ecrecover(digest, v, r, s) == controller ? bytes4(0x1626ba7e) : bytes4(0xffffffff); + } + + function execute(address target, uint256 value, bytes calldata data) external payable returns (bytes memory) { + require(msg.sender == controller, "controller"); + (bool success, bytes memory result) = target.call{value: value}(data); + if (!success) assembly { revert(add(result, 32), mload(result)) } + return result; + } +} + +/// Nonreverting fallback: neither an empty nor an echoed return is a signature verifier. +contract MarketplaceEchoOwner { + fallback() external { assembly { calldatacopy(0, 0, calldatasize()) return(0, calldatasize()) } } +} diff --git a/packages/core/scripts/agw-local/gen-abi.mjs b/packages/core/scripts/agw-local/gen-abi.mjs new file mode 100644 index 00000000..a8660f78 --- /dev/null +++ b/packages/core/scripts/agw-local/gen-abi.mjs @@ -0,0 +1,71 @@ +#!/usr/bin/env node +// Regenerates packages/core/src/lib/agentic/contracts/abi/v6/*.ts from the +// pinned ABI snapshots in ./abis/. The JSON files are the source artifact set; +// this script only re-serialises them as +// `as const` TypeScript so viem can infer types. Run from the repo root: +// node packages/core/scripts/agw-local/gen-abi.mjs +import { createHash } from 'node:crypto'; +import { readFileSync, writeFileSync, mkdirSync } from 'node:fs'; +import { dirname, join, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const here = dirname(fileURLToPath(import.meta.url)); +const repo = resolve(here, '../../../..'); +const src = join(here, 'abis'); +const dst = join(repo, 'packages/core/src/lib/agentic/contracts/abi/v6'); +const PIN = 'ffd567d3e49b2d27c6f50ad36093274dbac3090f'; + +const sourceNames = { + AGW: 'wallet', + AGWFactory: 'factory', + UniversalRulesPolicy: 'policy', + SmartSession: 'engine', + AgentValidator: 'validator', +}; +const files = { + AGW: ['AGW_ABI', 'agw.ts'], + AGWFactory: ['AGW_FACTORY_ABI', 'agw-factory.ts'], + UniversalRulesPolicy: [ + 'UNIVERSAL_RULES_POLICY_ABI', + 'universal-rules-policy.ts', + ], + SmartSession: ['SMART_SESSION_ABI', 'smart-session.ts'], + AgentValidator: ['AGENT_VALIDATOR_ABI', 'agent-validator.ts'], +}; +const manifest = JSON.parse(readFileSync(join(src, 'manifest.json'), 'utf8')); +if (manifest.sourceCommit !== PIN) { + throw new Error('ABI source commit does not match the supported generation'); +} + +mkdirSync(dst, { recursive: true }); +const exports = []; +for (const [name, [constName, file]] of Object.entries(files)) { + const sourceFile = `${sourceNames[name]}.json`; + const raw = readFileSync(join(src, sourceFile)); + const sha = createHash('sha256').update(raw).digest('hex'); + if (sha !== manifest.files[sourceFile]) { + throw new Error(`ABI source hash mismatch: ${sourceFile}`); + } + const abi = JSON.parse(raw.toString()).filter( + (e) => e.type !== 'constructor' + ); + const body = + `// GENERATED by packages/core/scripts/agw-local/gen-abi.mjs — do not edit.\n` + + `// Source: packages/core/scripts/agw-local/abis/${sourceFile}\n` + + `// push-agentic-wallets@${PIN}\n` + + `// sha256(${name}.json) = ${sha}\n` + + `export const ${constName} = ${JSON.stringify(abi, null, 2)} as const;\n`; + writeFileSync(join(dst, file), body); + exports.push( + `export { ${constName} } from './${file.replace(/\.ts$/, '')}';` + ); +} +writeFileSync( + join(dst, 'index.ts'), + `// GENERATED by packages/core/scripts/agw-local/gen-abi.mjs — do not edit.\n` + + `// Review generation v6: Donut v6 deployment; source ffd567d.\n` + + `export const V6_SOURCE_COMMIT = '${PIN}' as const;\n` + + exports.join('\n') + + '\n' +); +console.log(`wrote ${Object.keys(files).length} ABI modules to ${dst}`); diff --git a/packages/core/scripts/agw-local/prepare.sh b/packages/core/scripts/agw-local/prepare.sh new file mode 100755 index 00000000..2796fe8a --- /dev/null +++ b/packages/core/scripts/agw-local/prepare.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +# Prepare an ISOLATED build of the pinned AGW contracts for the SDK's local +# contract harness (review-only; never a deployment of record). +# +# AGW_REPO path to a push-agentic-wallets clone (default: ../../../../push-agentic-wallets +# relative to this script). Only `git archive` / `git ls-tree` are run against it, +# so the clone's working tree, branches and index are never touched. +# AGW_PIN commit to extract (default: the reviewed v6). +# OUT destination directory (default: $TMPDIR/push-agw-local-). +# AGW_ALLOW_COMPILER_DOWNLOAD=1 permits Foundry to install the pinned Solidity +# compiler on a fresh CI runner. Default keeps compilation offline. +# +# The script extracts the pinned tree, fetches each git submodule at the exact +# commit recorded in that tree, copies the harness-only contracts from +# ./contracts into OUT/sdk-harness, and runs `forge build`. It never broadcasts. +set -euo pipefail + +HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +AGW_REPO="${AGW_REPO:-$HERE/../../../../../push-agentic-wallets}" +AGW_PIN="${AGW_PIN:-ffd567d3e49b2d27c6f50ad36093274dbac3090f}" +OUT="${OUT:-${TMPDIR:-/tmp}/push-agw-local-${AGW_PIN:0:7}}" + +command -v forge >/dev/null || { echo "forge not found (install Foundry)" >&2; exit 1; } +git -C "$AGW_REPO" cat-file -e "${AGW_PIN}^{commit}" 2>/dev/null || { + echo "AGW pin $AGW_PIN is not present in $AGW_REPO; fetch it first" >&2; exit 1; } + +mkdir -p "$OUT" +if [ ! -f "$OUT/.agw-pin" ] || [ "$(cat "$OUT/.agw-pin")" != "$AGW_PIN" ]; then + echo "extracting $AGW_PIN -> $OUT" + git -C "$AGW_REPO" archive "$AGW_PIN" | tar -x -C "$OUT" + # Submodules are gitlinks in the archive; fetch each at its recorded commit. + git -C "$AGW_REPO" ls-tree "$AGW_PIN" lib/ | awk '$2 == "commit" { print $3, $4 }' | + while read -r commit path; do + url="$(git -C "$AGW_REPO" show "$AGW_PIN:.gitmodules" | + git config -f /dev/stdin --get "submodule.$path.url")" + echo "submodule $path @ $commit ($url)" + rm -rf "${OUT:?}/$path" + git init -q "$OUT/$path" + git -C "$OUT/$path" fetch -q --depth 1 "$url" "$commit" + git -C "$OUT/$path" checkout -q FETCH_HEAD + test "$(git -C "$OUT/$path" rev-parse HEAD)" = "$commit" + done + echo "$AGW_PIN" > "$OUT/.agw-pin" +fi + +mkdir -p "$OUT/sdk-harness" +cp "$HERE"/contracts/*.sol "$OUT/sdk-harness/" + +AGW_BUILD_ARGS=(src sdk-harness lib/smartsessions/contracts/SmartSession.sol lib/openzeppelin-contracts/contracts/proxy) +if [ "${AGW_ALLOW_COMPILER_DOWNLOAD:-0}" != "1" ]; then + AGW_BUILD_ARGS=(--offline "${AGW_BUILD_ARGS[@]}") +fi +(cd "$OUT" && forge build "${AGW_BUILD_ARGS[@]}" >/dev/null) +echo "$OUT" diff --git a/packages/core/scripts/agw-verify.js b/packages/core/scripts/agw-verify.js new file mode 100644 index 00000000..6767f8de --- /dev/null +++ b/packages/core/scripts/agw-verify.js @@ -0,0 +1,84 @@ +/** One unfunded verification entry point. No .env loading, live E2E or publishing. */ +const { spawnSync } = require('node:child_process'); +const fs = require('node:fs'); +const path = require('node:path'); +const root = path.resolve(__dirname, '../../..'); +const sdkOnly = process.argv.includes('--sdk-only'); +const dir = path.join(root, '.agw-validation'); +fs.mkdirSync(dir, { recursive: true }); +function run(name, file, args, options = {}) { + process.stdout.write(`AGW validation: ${name}\n`); + const result = spawnSync(file, args, { + cwd: root, + encoding: 'utf8', + maxBuffer: 20 * 1024 * 1024, + ...options, + }); + const out = String(result.stdout || '') + String(result.stderr || ''); + fs.writeFileSync(path.join(dir, `${name}.log`), out); + if (result.error || result.status !== 0) { + process.stderr.write(out); + if (result.error) process.stderr.write(String(result.error) + '\n'); + throw new Error( + `AGW validation failed: ${name}; see .agw-validation/${name}.log` + ); + } + return out; +} +const node = process.execPath; +run('units', node, [ + 'node_modules/jest/bin/jest.js', + '--config', + 'packages/core/jest.config.ts', + '--runInBand', + '--testPathPattern=agentic|prc20-address|outbound-(confirmation-gate|svm-confirmation)|svm-idl|evm-client.batch-gas', +]); +for (const kind of sdkOnly ? ['spec'] : ['lib', 'spec', 'agw-local']) + run(`types-${kind}`, node, [ + 'node_modules/typescript/bin/tsc', + '-p', + `packages/core/tsconfig.${kind}.json`, + '--noEmit', + ]); +if (!sdkOnly) { + run('docs', node, ['packages/core/scripts/check-agw-docs.js']); + const env = { + ...process.env, + OUT: process.env.AGW_LOCAL_DIR || path.join(dir, 'contracts'), + }; + run( + 'prepare-contracts', + 'bash', + ['packages/core/scripts/agw-local/prepare.sh'], + { env } + ); + run( + 'local-contracts', + node, + [ + 'node_modules/jest/bin/jest.js', + '--config', + 'packages/core/jest.agw-local.config.ts', + '--runInBand', + ], + { env: { ...env, AGW_LOCAL_DIR: env.OUT } } + ); +} +run( + 'build', + node, + ['node_modules/nx/bin/nx.js', 'run', 'core:build', '--skip-nx-cache'], + { env: { ...process.env, NX_DAEMON: 'false' } } +); +run('package', node, ['packages/core/scripts/check-agw-package.js']); +if (!sdkOnly) + run('public-api', node, [ + 'packages/core/scripts/check-agw-api.js', + '--output', + path.join(dir, 'api-comparison.json'), + ]); +process.stdout.write( + sdkOnly + ? 'AGW SDK-only validation completed.\n' + : 'AGW unfunded validation completed.\n' +); diff --git a/packages/core/scripts/check-agw-api.js b/packages/core/scripts/check-agw-api.js new file mode 100644 index 00000000..ff2c461f --- /dev/null +++ b/packages/core/scripts/check-agw-api.js @@ -0,0 +1,435 @@ +/** Public export/type comparison. Report changes; do not approve pending API choices. */ +const fs = require('node:fs'); +const path = require('node:path'); +const { execFileSync } = require('node:child_process'); +const ts = require('typescript'); +const assert = require('node:assert/strict'); +const root = path.resolve(__dirname, '../../..'); +const baseline = 'b1597b91a25dbf7f691f589b4e1e154add604315'; +const config = ts.readConfigFile( + path.join(root, 'packages/core/tsconfig.lib.json'), + ts.sys.readFile +); +const options = ts.parseJsonConfigFileContent( + config.config, + ts.sys, + path.join(root, 'packages/core') +).options; +const selected = [ + 'AgenticNamespace', + 'AgenticWallet', + 'AgenticError', + 'AgenticRevertError', + 'AGENTIC_ERROR_CODE', + 'Rule', + 'RuleInput', + 'Pin', + 'Spent', + 'NativeRule', + 'ArgPin', + 'AmountLimit', + 'AssetCap', + 'AllowedCall', + 'UniversalRule', + 'RulesRecord', + 'CreateOptions', + 'CreateResult', + 'AgenticTxMetadata', +]; +function snapshot(entry) { + const program = ts.createProgram([entry], { ...options, noEmit: true }); + const diagnostics = ts.getPreEmitDiagnostics(program); + if (diagnostics.length) + throw new Error( + ts.formatDiagnostics(diagnostics, { + getCanonicalFileName: (f) => f, + getCurrentDirectory: () => root, + getNewLine: () => '\n', + }) + ); + const checker = program.getTypeChecker(), + file = program.getSourceFile(entry); + const exports = checker.getExportsOfModule(checker.getSymbolAtLocation(file)); + const literals = new Map(), + ambiguous = new Set(); + for (const source of program + .getSourceFiles() + .filter((f) => f.fileName.includes('/packages/core/src/'))) { + for (let symbol of checker.getSymbolsInScope( + source, + ts.SymbolFlags.Value + )) { + const name = symbol.name; + if (symbol.flags & ts.SymbolFlags.Alias) + symbol = checker.getAliasedSymbol(symbol); + const type = checker.getTypeOfSymbolAtLocation(symbol, source); + if (type.flags & ts.TypeFlags.EnumLiteral) continue; + const literal = type.isStringLiteral() + ? JSON.stringify(type.value) + : type.isNumberLiteral() + ? String(type.value) + : undefined; + if (literal === undefined) continue; + if (literals.has(name) && literals.get(name) !== literal) + ambiguous.add(name); + else literals.set(name, literal); + } + } + const printer = ts.createPrinter({ removeComments: true }); + const modules = new Map( + program + .getSourceFiles() + .filter((f) => f.fileName.includes('/packages/core/src/')) + .map((f) => [ + 'sdk/src/' + + f.fileName + .split('/src/') + .pop() + .replace(/\.d\.ts$|\.tsx?$/, ''), + f, + ]) + ); + function reference(match, kind, module, name) { + const source = + modules.get(module) || + program.getSourceFile(module + '.d.ts') || + program.getSourceFile(module + '.ts'); + if (!source) return match; + const moduleSymbol = checker.getSymbolAtLocation(source); + let symbol = [ + ...(moduleSymbol ? checker.getExportsOfModule(moduleSymbol) : []), + ...checker.getSymbolsInScope( + source, + ts.SymbolFlags.Type | ts.SymbolFlags.Value | ts.SymbolFlags.Namespace + ), + ].find((s) => s.name === name); + if (!symbol) return match; + if (symbol.flags & ts.SymbolFlags.Alias) + symbol = checker.getAliasedSymbol(symbol); + const decl = symbol.declarations?.[0]; + if (!decl) return match; + if (!kind && symbol.flags & ts.SymbolFlags.TypeAlias) { + const type = checker.getDeclaredTypeOfSymbol(symbol); + if ( + type.flags & + (ts.TypeFlags.StringLike | + ts.TypeFlags.NumberLike | + ts.TypeFlags.BooleanLike | + ts.TypeFlags.BigIntLike | + ts.TypeFlags.TemplateLiteral | + ts.TypeFlags.Null | + ts.TypeFlags.Undefined) + ) + return normal( + checker.typeToString( + type, + file, + ts.TypeFormatFlags.NoTruncation | ts.TypeFormatFlags.InTypeAlias + ) + ); + } + if (kind === 'typeof ') { + const type = checker.getTypeOfSymbolAtLocation(symbol, decl); + const calls = type.getCallSignatures(); + if (calls.length === 1) + return normal( + checker.signatureToString( + calls[0], + file, + ts.TypeFormatFlags.NoTruncation | + ts.TypeFormatFlags.WriteArrowStyleSignature + ) + ); + } + const location = decl.getSourceFile().fileName; + if (!location.includes('/packages/core/src/')) return match; + return `${kind || ''}import("sdk/src/${location + .split('/src/') + .pop() + .replace(/\.d\.ts$|\.tsx?$/, '')}").${symbol.name}`; + } + function canonicalType(text) { + for (let pass = 0; pass < 4; pass++) + text = text.replace( + /(typeof )?import\("([^"]+)"\)\.([A-Za-z_][\w]*)/g, + reference + ); + text = text.replace( + /typeof import\("[^"]+"\)\.([A-Za-z_][\w]*)/g, + (match, name) => + ambiguous.has(name) ? match : literals.get(name) || match + ); + const parsed = ts.createSourceFile( + 'surface.ts', + `type Surface = ${text};`, + ts.ScriptTarget.Latest, + true + ); + const result = ts.transform(parsed, [ + (context) => { + const visit = (node) => { + node = ts.visitEachChild(node, visit, context); + // Source property keys can use single quotes while declarations emit + // double quotes. Canonicalize syntax without changing the literal value. + if (ts.isStringLiteral(node)) return ts.factory.createStringLiteral(node.text); + if (ts.isUnionTypeNode(node) || ts.isIntersectionTypeNode(node)) { + const types = [...node.types].sort((a, b) => + printer + .printNode(ts.EmitHint.Unspecified, a, parsed) + .localeCompare( + printer.printNode(ts.EmitHint.Unspecified, b, parsed) + ) + ); + return ts.isUnionTypeNode(node) + ? ts.factory.createUnionTypeNode(types) + : ts.factory.createIntersectionTypeNode(types); + } + if ( + ts.isTypeLiteralNode(node) && + node.members.every( + (m) => ts.isPropertySignature(m) || ts.isMethodSignature(m) + ) + ) { + return ts.factory.createTypeLiteralNode( + [...node.members].sort((a, b) => + printer + .printNode(ts.EmitHint.Unspecified, a.name, parsed) + .localeCompare( + printer.printNode(ts.EmitHint.Unspecified, b.name, parsed) + ) + ) + ); + } + return node; + }; + return (source) => ts.visitNode(source, visit); + }, + ]); + try { + return printer.printNode( + ts.EmitHint.Unspecified, + result.transformed[0].statements[0].type, + parsed + ); + } finally { + result.dispose(); + } + } + const normal = (s) => + s.replace( + /import\("([^"]+)"\)/g, + (_, p) => + `import("${ + p.includes('/src/') ? 'sdk/src/' + p.split('/src/').pop() : p + }")` + ); + const text = (t, node) => + canonicalType( + normal( + checker.typeToString( + t, + node, + ts.TypeFormatFlags.NoTruncation | ts.TypeFormatFlags.InTypeAlias + ) + ) + ); + function properties(t) { + return Object.fromEntries( + checker + .getPropertiesOfType(t) + .filter((p) => { + const d = p.valueDeclaration || p.declarations?.[0]; + if ( + d && + /\/typescript\/lib\/lib\.[^/]+\.d\.ts$/.test( + d.getSourceFile().fileName + ) + ) + return false; + return ( + !d || + !( + ts.getCombinedModifierFlags(d) & + (ts.ModifierFlags.Private | ts.ModifierFlags.Protected) + ) + ); + }) + .map((p) => [ + p.name.replace(/(__@[^@]+)@\d+$/, '$1'), + { + optional: Boolean(p.flags & ts.SymbolFlags.Optional), + readonly: Boolean( + ts.getCheckFlags(p) & ts.CheckFlags.Readonly || + p.declarations?.some( + (d) => + ts.getCombinedModifierFlags(d) & ts.ModifierFlags.Readonly + ) + ), + type: text(checker.getTypeOfSymbolAtLocation(p, file), file), + }, + ]) + .sort(([a], [b]) => a.localeCompare(b)) + ); + } + const result = { + exports: exports.map((s) => s.name).sort(), + agw: {}, + publicSurface: {}, + }; + for (let s of exports) { + const name = s.name; + if (s.flags & ts.SymbolFlags.Alias) s = checker.getAliasedSymbol(s); + const t = + s.flags & + (ts.SymbolFlags.Interface | + ts.SymbolFlags.TypeAlias | + ts.SymbolFlags.Class) + ? checker.getDeclaredTypeOfSymbol(s) + : checker.getTypeOfSymbolAtLocation(s, file); + result.publicSurface[name] = { + type: text(t, file), + members: properties(t), + }; + } + for (const name of selected) { + let s = exports.find((s) => s.name === name); + if (!s) continue; + if (s.flags & ts.SymbolFlags.Alias) s = checker.getAliasedSymbol(s); + const t = + s.flags & + (ts.SymbolFlags.Interface | + ts.SymbolFlags.TypeAlias | + ts.SymbolFlags.Class) + ? checker.getDeclaredTypeOfSymbol(s) + : checker.getTypeOfSymbolAtLocation(s, file); + result.agw[name] = { type: text(t, file), members: properties(t) }; + } + let push = exports.find((s) => s.name === 'PushChain'); + if (push.flags & ts.SymbolFlags.Alias) push = checker.getAliasedSymbol(push); + const staticType = checker.getTypeOfSymbolAtLocation(push, file); + const instanceType = checker.getDeclaredTypeOfSymbol(push); + result.pushChainStatic = properties(staticType); + delete result.pushChainStatic.prototype; + result.pushChainInstance = properties(instanceType); + const universal = instanceType.getProperty('universal'); + result.transactionMethods = properties( + checker.getTypeOfSymbolAtLocation(universal, file) + ); + const utils = staticType.getProperty('utils'); + const utilsType = checker.getTypeOfSymbolAtLocation(utils, file); + result.utilityMethods = properties(utilsType); + delete result.utilityMethods.prototype; + const init = staticType.getProperty('initialize'); + result.initialize = text(checker.getTypeOfSymbolAtLocation(init, file), file); + const constants = staticType.getProperty('CONSTANTS'); + const cType = checker.getTypeOfSymbolAtLocation(constants, file), + agw = cType.getProperty('AGENTIC'); + const aType = checker.getTypeOfSymbolAtLocation(agw, file); + const donut = aType.getProperty('TESTNET_DONUT'); + result.agwConstants = properties( + donut + ? checker.getNonNullableType( + checker.getTypeOfSymbolAtLocation(donut, file) + ) + : aType + ); + result.constants = properties(cType); + return result; +} +const current = snapshot(path.join(root, 'packages/core/src/index.ts')); +const built = snapshot(path.join(root, 'dist/packages/core/src/index.d.ts')); +assert.deepEqual( + built, + current, + 'compiled public API differs from source public API' +); +try { + execFileSync('git', ['cat-file', '-e', `${baseline}^{commit}`], { + cwd: root, + stdio: 'ignore', + }); +} catch { + execFileSync( + 'git', + [ + 'fetch', + '--depth=1', + 'https://github.com/pushchain/push-chain-sdk.git', + baseline, + ], + { cwd: root, stdio: 'ignore' } + ); +} +const temp = fs.mkdtempSync(path.join(root, 'node_modules/.cache/agw-api-')); +try { + const archive = execFileSync( + 'git', + ['archive', baseline, 'packages/core/src'], + { cwd: root, maxBuffer: 30 * 1024 * 1024 } + ); + execFileSync('tar', ['-x', '-C', temp], { input: archive }); + const old = snapshot(path.join(temp, 'packages/core/src/index.ts')); + const changes = []; + for (const name of selected) + if (JSON.stringify(old.agw[name]) !== JSON.stringify(current.agw[name])) + changes.push(name); + const publicTypeChanges = Object.keys(current.publicSurface).filter( + (name) => + JSON.stringify(old.publicSurface[name]) !== + JSON.stringify(current.publicSurface[name]) + ); + const transactionMethodChanges = Object.keys( + current.transactionMethods + ).filter( + (name) => + JSON.stringify(old.transactionMethods[name]) !== + JSON.stringify(current.transactionMethods[name]) + ); + const instanceMethodChanges = Object.keys(current.pushChainInstance).filter( + (name) => + JSON.stringify(old.pushChainInstance[name]) !== + JSON.stringify(current.pushChainInstance[name]) + ); + const report = { + baseline, + head: execFileSync('git', ['rev-parse', 'HEAD'], { + cwd: root, + encoding: 'utf8', + }).trim(), + compiledMatchesSource: true, + initializeSignatureChanged: old.initialize !== current.initialize, + addedExports: current.exports.filter((s) => !old.exports.includes(s)), + removedExports: old.exports.filter((s) => !current.exports.includes(s)), + changedAgwTypes: changes, + publicTypeChanges, + transactionMethodChanges, + instanceMethodChanges, + agwConstantsChanged: + JSON.stringify(old.agwConstants) !== JSON.stringify(current.agwConstants), + before: old, + after: current, + scope: + 'All root exports and declared public members, PushChain static/instance members, universal transaction methods, utility groups, readonly/optional markers and constants. Behavior/default/deployment changes need the written session review.', + }; + const at = process.argv.indexOf('--output'); + if (at >= 0) + fs.writeFileSync( + path.resolve(process.argv[at + 1]), + JSON.stringify(report, null, 2) + '\n' + ); + process.stdout.write( + JSON.stringify({ + compiledMatchesSource: true, + addedExports: report.addedExports, + removedExports: report.removedExports, + changedAgwTypes: changes, + publicTypeChanges, + transactionMethodChanges, + instanceMethodChanges, + initializeSignatureChanged: report.initializeSignatureChanged, + agwConstantsChanged: report.agwConstantsChanged, + }) + '\n' + ); +} finally { + fs.rmSync(temp, { recursive: true, force: true }); +} diff --git a/packages/core/scripts/check-agw-docs.js b/packages/core/scripts/check-agw-docs.js new file mode 100644 index 00000000..af27c104 --- /dev/null +++ b/packages/core/scripts/check-agw-docs.js @@ -0,0 +1,51 @@ +/** Typecheck public AGW guide blocks; never evaluate examples or load keys. */ +const fs = require('node:fs'); +const path = require('node:path'); +const ts = require('typescript'); + +const root = path.resolve(__dirname, '../../..'); +const guide = path.join(root, process.argv[2] || 'packages/core/AGW.md'); +const guideName = path.basename(guide, '.md'); +const blocks = [ + ...fs.readFileSync(guide, 'utf8').matchAll(/```ts\n([\s\S]*?)```/g), +].map((m) => m[1]); +if (!blocks.length) throw new Error(`No ${guideName} TypeScript examples found`); +const cache = path.join(root, 'node_modules/.cache'); +fs.mkdirSync(cache, { recursive: true }); +const dir = fs.mkdtempSync(path.join(cache, 'agw-docs-')); +try { + const source = path.join(dir, 'examples.ts'); + fs.writeFileSync(source, blocks.join('\n\n')); + const configPath = path.join(root, 'packages/core/tsconfig.lib.json'); + const config = ts.readConfigFile(configPath, ts.sys.readFile); + if (config.error) + throw new Error( + ts.flattenDiagnosticMessageText(config.error.messageText, '\n') + ); + const parsed = ts.parseJsonConfigFileContent( + config.config, + ts.sys, + path.dirname(configPath) + ); + const program = ts.createProgram([source], { + ...parsed.options, + noEmit: true, + }); + const diagnostics = [...parsed.errors, ...ts.getPreEmitDiagnostics(program)]; + if (diagnostics.length) { + process.stderr.write( + ts.formatDiagnostics(diagnostics, { + getCanonicalFileName: (file) => file, + getCurrentDirectory: () => root, + getNewLine: () => '\n', + }) + ); + process.exitCode = 1; + } else { + process.stdout.write( + `${guideName} guide: ${blocks.length} TypeScript blocks typechecked against public exports; no examples executed.\n` + ); + } +} finally { + fs.rmSync(dir, { recursive: true, force: true }); +} diff --git a/packages/core/scripts/check-agw-gas-quotes.js b/packages/core/scripts/check-agw-gas-quotes.js new file mode 100644 index 00000000..8eac1e50 --- /dev/null +++ b/packages/core/scripts/check-agw-gas-quotes.js @@ -0,0 +1,122 @@ +/** Read-only current outbound quotes. These are observations, not validated gas + * defaults or measured destination execution fees. No signer/keys are loaded. + * The attached budget depends on the agent's origin: Push-native signers use + * the fixed PC/USD fallback, UEA signers the Donut WPC/stable pool for their + * origin. poolPcIn is the PC the gateway's gas swap needs at quote time. + * Build core, then: node packages/core/scripts/check-agw-gas-quotes.js [report.json] + */ +const fs = require('node:fs'); +const path = require('node:path'); +const { parseEther } = require('viem'); +const built = path.resolve(__dirname, '../../../dist/packages/core/src'); +const { PushChain } = require(built); +const { CHAIN, PUSH_NETWORK } = PushChain.CONSTANTS; +const { getNativePRC20ForChain } = require(path.join( + built, + 'lib/orchestrator/internals/helpers' +)); +const { MOVEABLE_TOKEN_CONSTANTS } = require(path.join( + built, + 'lib/constants/tokens' +)); +const { getPRC20Address } = require(path.join( + built, + 'lib/universal/prc20-address' +)); +async function main() { + const wallet = '0x0000000000000000000000000000000000005678'; + // A wallet with no CEA token account, so SPL quotes include first-use rent. + const freshWallet = '0x00000000000000000000000000000000000a6e01'; + const usdtSol = MOVEABLE_TOKEN_CONSTANTS.SOLANA_DEVNET.USDT; + const report = { + at: new Date().toISOString(), + readOnly: true, + network: PUSH_NETWORK.TESTNET_DONUT, + note: 'Current quotes only; first-use and subsequent labels describe gas-limit inputs, not executed transactions.', + origins: [], + }; + for (const origin of [CHAIN.PUSH_TESTNET_DONUT, CHAIN.ETHEREUM_SEPOLIA]) { + const client = await PushChain.initialize( + { address: wallet, chain: origin }, + { network: PUSH_NETWORK.TESTNET_DONUT } + ); + const rt = client.agenticRuntime; + if (!rt.isReadOnly) throw new Error('Quote audit must be read-only'); + const entry = { + signerOrigin: origin, + pushBlockBefore: String(await rt.reader.getBlockNumber()), + cases: [], + }; + report.origins.push(entry); + const cases = []; + for (const chain of [ + CHAIN.ETHEREUM_SEPOLIA, + CHAIN.BASE_SEPOLIA, + CHAIN.ARBITRUM_SEPOLIA, + CHAIN.BNB_TESTNET, + ]) + cases.push( + [chain, 'default-new-account', BigInt(2000000)], + [chain, 'route-default-zero-input', BigInt(0)] + ); + const sol = CHAIN.SOLANA_DEVNET; + cases.push( + [ + sol, + 'legacy-million-unit-fallback', + BigInt(1000000), + { wallet, burnAmount: BigInt(10000) }, + ], + [ + sol, + 'sdk-default-route-sizing', + BigInt(0), + { wallet, burnAmount: BigInt(10000) }, + ], + [ + sol, + 'spl-first-use-route-sizing', + BigInt(0), + { + wallet: freshWallet, + splMintBase58: usdtSol.address, + burnAmount: BigInt(1000), + }, + getPRC20Address(usdtSol).address, + ] + ); + for (const [chain, stage, gasLimit, svm, token] of cases) { + const c = { chain, stage, inputGasLimit: gasLimit }; + entry.cases.push(c); + try { + const quote = await rt.quoteOutbound( + token ?? getNativePRC20ForChain(chain, rt.network), + gasLimit, + chain, + svm + ); + Object.assign(c, quote, { + attachedPCWei: quote.protocolFee + quote.nativeValueForGas, + fits20PCCeiling: + quote.protocolFee + quote.nativeValueForGas <= parseEther('20'), + }); + } catch (e) { + c.error = e.shortMessage || e.message; + } + } + entry.pushBlockAfter = String(await rt.reader.getBlockNumber()); + } + const json = JSON.stringify( + report, + (_k, v) => (typeof v === 'bigint' ? String(v) : v), + 2 + ); + if (process.argv[2]) fs.writeFileSync(process.argv[2], json); + console.log(json); + if (report.origins.some((o) => o.cases.some((c) => c.error))) + process.exitCode = 1; +} +main().catch((e) => { + console.error(e.shortMessage || e.message); + process.exitCode = 1; +}); diff --git a/packages/core/scripts/check-agw-package.js b/packages/core/scripts/check-agw-package.js new file mode 100644 index 00000000..18b70977 --- /dev/null +++ b/packages/core/scripts/check-agw-package.js @@ -0,0 +1,105 @@ +/** Consume built JS/declarations, not tsconfig's source alias. No wallet operations. */ +const fs = require('node:fs'); +const path = require('node:path'); +const { pathToFileURL } = require('node:url'); +const { execFileSync } = require('node:child_process'); +const assert = require('node:assert/strict'); +const ts = require('typescript'); +const root = path.resolve(__dirname, '../../..'); +const built = path.join(root, 'dist/packages/core'); +async function main() { + const entry = path.join(built, 'src/index.js'); + const cjs = require(entry), + esm = await import(pathToFileURL(entry).href); + assert.equal(typeof cjs.PushChain.initialize, 'function'); + assert.equal(esm.PushChain, cjs.PushChain); + assert.equal(cjs.PushChain.CONSTANTS.AGENTIC.WALLET, 'agentic:wallet'); + assert.equal(typeof cjs.AgenticError, 'function'); + const [pack] = JSON.parse( + execFileSync('npm', ['pack', '--dry-run', '--json', '--ignore-scripts'], { + cwd: built, + encoding: 'utf8', + }) + ); + assert(pack.files.some((f) => f.path === 'AGW.md')); + assert(pack.files.some((f) => f.path === 'MARKETPLACE.md')); + assert.equal(typeof cjs.PushChain.utils.job.buildJobSpec, 'function'); + assert.equal( + typeof cjs.PushChain.utils.market.encodeAgentCardRules, + 'function' + ); + assert(!pack.files.some((f) => /(^|\/)\.env($|\.)/.test(f.path))); + assert( + !pack.files.some((f) => + /(^|\/)(plan|__e2e__|__agw-local__|__market-local__|scripts)(\/|$)/.test( + f.path + ) + ) + ); + const preset = cjs.PushChain.utils.agentic.presets.get('LENDING', { + agent: '0x0000000000000000000000000000000000005678', + chainNamespace: 'eip155:11155111', + }); + assert.deepEqual(Object.keys(preset), ['rules']); + assert.equal(preset.rules[0].assets.length, 1); + assert.equal( + preset.rules[0].assets[0].token, + '0x0000000000000000000000000000000000000000' + ); + const guide = fs.readFileSync(path.join(built, 'AGW.md'), 'utf8'); + const source = [...guide.matchAll(/```ts\n([\s\S]*?)```/g)] + .map((m) => m[1]) + .join('\n\n'); + const tmp = fs.mkdtempSync( + path.join(root, 'node_modules/.cache/agw-consumer-') + ); + try { + const file = path.join(tmp, 'consumer.ts'); + fs.writeFileSync(file, source); + const marketFile = path.join(tmp, 'market-consumer.ts'); + const marketGuide = fs.readFileSync( + path.join(built, 'MARKETPLACE.md'), + 'utf8' + ); + fs.writeFileSync( + marketFile, + [...marketGuide.matchAll(/```ts\n([\s\S]*?)```/g)] + .map((m) => m[1]) + .join('\n\n') + ); + const config = ts.readConfigFile( + path.join(root, 'packages/core/tsconfig.lib.json'), + ts.sys.readFile + ); + const parsed = ts.parseJsonConfigFileContent( + config.config, + ts.sys, + path.join(root, 'packages/core') + ); + const options = { + ...parsed.options, + noEmit: true, + paths: { '@pushchain/core': [path.join(built, 'src/index.d.ts')] }, + }; + const diagnostics = ts.getPreEmitDiagnostics( + ts.createProgram([file, marketFile], options) + ); + if (diagnostics.length) + throw new Error( + ts.formatDiagnostics(diagnostics, { + getCanonicalFileName: (f) => f, + getCurrentDirectory: () => root, + getNewLine: () => '\n', + }) + ); + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + process.stdout.write( + 'AGW package: CJS/ESM imports, compiled declaration examples and npm contents pass. No examples executed/published.\n' + ); +} +main().catch((error) => { + process.stderr.write(`${error.message}\n`); + process.exitCode = 1; +}); diff --git a/packages/core/scripts/check-agw-preset-compatibility.js b/packages/core/scripts/check-agw-preset-compatibility.js new file mode 100644 index 00000000..62c32a9d --- /dev/null +++ b/packages/core/scripts/check-agw-preset-compatibility.js @@ -0,0 +1,155 @@ +/** Read-only protocol compatibility of the shipped testnet presets. + * Build core first. No signer, environment keys, funding or transactions. + * For every preset chain: the wrap target accepts native ETH (simulated with a + * balance override), the Uniswap router wraps into that WETH and a WETH/USDC pool + * quotes USDC for a dust swap, and the Aave pool lists that WETH as a reserve. + * Usage: node packages/core/scripts/check-agw-preset-compatibility.js [report.json] + */ +const fs = require('node:fs'); +const path = require('node:path'); +const { + createPublicClient, + encodeFunctionData, + getAddress, + http, + parseAbi, +} = require('viem'); +const built = path.resolve(__dirname, '../../../dist/packages/core/src'); +const { PRESET_CATALOG } = require(path.join( + built, + 'lib/agentic/presets/catalog' +)); +const abi = parseAbi([ + 'function deposit() payable', + 'function WETH9() view returns (address)', + // QuoterV2 is non-view; declared view so eth_call returns the quote. + 'function quoteExactInputSingle((address tokenIn,address tokenOut,uint256 amountIn,uint24 fee,uint160 sqrtPriceLimitX96)) view returns (uint256,uint160,uint32,uint256)', + 'function getReservesList() view returns (address[])', +]); +const endpoints = { + 'eip155:11155111': 'https://ethereum-sepolia-rpc.publicnode.com', + 'eip155:84532': 'https://base-sepolia-rpc.publicnode.com', + 'eip155:421614': 'https://arbitrum-sepolia-rpc.publicnode.com', +}; +const PROBE = '0x000000000000000000000000000000000000dEaD'; +// Uniswap V3 QuoterV2 per testnet; the acceptance spec sends 1e12 wei. +const QUOTERS = { + 'eip155:11155111': '0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3', + 'eip155:84532': '0xC5290058841028F1614F3A6F0F5816cAd0df5E27', + 'eip155:421614': '0x2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B', +}; +const QUOTE_AMOUNT = BigInt(10) ** BigInt(12); +const callTo = (def, selector) => + def.allowedCalls.find((c) => c.selector.startsWith(selector)); +async function main() { + const report = { at: new Date().toISOString(), readOnly: true, cases: [] }; + for (const preset of PRESET_CATALOG) + for (const def of preset.chains) { + const result = { preset: preset.constant, chain: def.chainNamespace }; + report.cases.push(result); + const endpoint = endpoints[def.chainNamespace]; + if (!endpoint) { + result.error = 'no read-only endpoint configured'; + process.exitCode = 1; + continue; + } + try { + const rpc = createPublicClient({ + transport: http(endpoint, { timeout: 12000, retryCount: 1 }), + }); + const block = await rpc.getBlockNumber(); + result.block = String(block); + if ( + (await rpc.getChainId()) !== Number(def.chainNamespace.split(':')[1]) + ) + throw new Error('Destination chain mismatch'); + const read = (address, functionName, args = []) => + rpc.readContract({ + address, + abi, + functionName, + args, + blockNumber: block, + }); + const weth = getAddress(callTo(def, 'deposit(').target); + await rpc.call({ + account: PROBE, + to: weth, + data: encodeFunctionData({ abi, functionName: 'deposit' }), + value: BigInt(1), + blockNumber: block, + stateOverride: [ + { address: PROBE, balance: BigInt(10) ** BigInt(18) }, + ], + }); + result.wrapsNativeEth = true; + if (preset.constant === 'DEXES') { + const swap = callTo(def, 'exactInputSingle('); + const router = getAddress(swap.target); + const usdc = getAddress( + def.allowedCalls.find( + (c) => + c.selector === 'approve(address,uint256)' && + getAddress(c.target) !== weth + ).target + ); + result.routerWeth9 = getAddress(await read(router, 'WETH9')); + if (result.routerWeth9 !== weth) + throw new Error(`router wraps into ${result.routerWeth9}`); + // Liquidity alone is not enough: thin, mispriced testnet pools can + // return nothing. Quote a dust swap at every tier instead. + result.quotes = []; + for (const fee of [100, 500, 3000, 10000]) { + try { + const [out] = await read( + QUOTERS[def.chainNamespace], + 'quoteExactInputSingle', + [ + { + tokenIn: weth, + tokenOut: usdc, + amountIn: QUOTE_AMOUNT, + fee, + sqrtPriceLimitX96: BigInt(0), + }, + ] + ); + result.quotes.push({ fee, usdcOut: String(out) }); + } catch { + // no pool at this tier + } + } + if (!result.quotes.some((q) => BigInt(q.usdcOut) > BigInt(0))) + throw new Error('no WETH/USDC tier returns USDC for a dust swap'); + } + if (preset.constant === 'LENDING') { + const pool = getAddress(callTo(def, 'supply(').target); + const reserves = (await read(pool, 'getReservesList')).map((r) => + getAddress(r) + ); + result.wethIsReserve = reserves.includes(weth); + if (!result.wethIsReserve) + throw new Error(`${weth} is not an Aave reserve`); + } + console.log(`${preset.constant} ${def.chainNamespace}: compatible`); + } catch (error) { + // An RPC failure is unknown, not incompatible; both fail the check. + result.error = error.shortMessage || error.message; + process.exitCode = 1; + console.error( + `${preset.constant} ${def.chainNamespace}: ${result.error}` + ); + } + } + const output = process.argv[2] || '/tmp/agw-preset-compatibility.json'; + fs.writeFileSync(output, JSON.stringify(report, null, 2)); + console.log( + `Read-only report: ${output}; ${ + report.cases.filter((c) => !c.error).length + }/${report.cases.length} compatible.` + ); +} +main().catch((error) => { + console.error(error.shortMessage || error.message); + process.exitCode = 1; +}); diff --git a/packages/core/scripts/check-agw-preset-routes.js b/packages/core/scripts/check-agw-preset-routes.js new file mode 100644 index 00000000..55705637 --- /dev/null +++ b/packages/core/scripts/check-agw-preset-routes.js @@ -0,0 +1,195 @@ +/** Read-only Donut acceptance of built preset configuration and factory calldata. + * Build core first. No keys, signing, funding, deployments or broadcasts. + * Usage: node packages/core/scripts/check-agw-preset-routes.js /tmp/report.json + */ +const fs = require('node:fs'); +const path = require('node:path'); +const assert = require('node:assert/strict'); +const { createPublicClient, http, getAddress } = require('viem'); +const built = path.resolve(__dirname, '../../..', 'dist/packages/core/src'); +const { PushChain } = require(built); +const { CHAIN, PUSH_NETWORK } = PushChain.CONSTANTS; +const { currentGeneration, verifyFactoryWiring } = require(path.join( + built, + 'lib/agentic/deployments' +)); +const { Snapshot } = require(path.join(built, 'lib/agentic/reads/snapshot')); +const { publicRules } = require(path.join(built, 'lib/agentic/public-rule')); +const { prepareWalletRules } = require(path.join( + built, + 'lib/agentic/management/prepare' +)); +const { getCEAAddress } = require(path.join( + built, + 'lib/orchestrator/cea-utils' +)); +const { readOriginToken, PRC20_SOURCE_ABI } = require(path.join( + built, + 'lib/agentic/contracts/prc20-metadata' +)); +const { getPRC20Address } = require(path.join( + built, + 'lib/universal/prc20-address' +)); + +const endpoints = { + [CHAIN.ETHEREUM_SEPOLIA]: 'https://ethereum-sepolia-rpc.publicnode.com', + [CHAIN.BASE_SEPOLIA]: 'https://base-sepolia-rpc.publicnode.com', + [CHAIN.ARBITRUM_SEPOLIA]: 'https://arbitrum-sepolia-rpc.publicnode.com', + [CHAIN.BNB_TESTNET]: 'https://bsc-testnet-rpc.publicnode.com', +}; + +async function main() { + const report = { + at: new Date().toISOString(), + readOnly: true, + network: PUSH_NETWORK.TESTNET_DONUT, + cases: [], + }; + const rpc = createPublicClient({ + transport: http('https://evm.donut.rpc.push.org/', { + timeout: 15000, + retryCount: 1, + }), + }); + assert.equal(await rpc.getChainId(), 42101); + const owner = getAddress('0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf'); + const agent = getAddress('0x0000000000000000000000000000000000005678'); + // A UniversalAccount creates a read-mode client: there is no signer here. + const client = await PushChain.initialize( + { address: owner, chain: CHAIN.PUSH_TESTNET_DONUT }, + { network: PUSH_NETWORK.TESTNET_DONUT } + ); + const runtime = client.agenticRuntime; + assert.equal(runtime.isReadOnly, true); + // Same CEA factory read, with explicit public endpoints for reproducibility. + runtime.resolveCEA = (wallet, chain) => + getCEAAddress(wallet, chain, endpoints[chain]); + const gen = currentGeneration(runtime.network); + await verifyFactoryWiring(runtime.reader, gen); + const snap = await Snapshot.at(runtime.reader); + report.blockNumber = String(snap.blockNumber); + report.factory = gen.addresses.factory; + report.verifiedERC20Mappings = []; + for (const source of [ + '0xfff9976782d46cc05630d1f6ebab18b2324d6b14', + '0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af', + ]) { + const mapped = getPRC20Address({ + chain: CHAIN.ETHEREUM_SEPOLIA, + address: getAddress(source), + }); + assert.equal( + await snap.read( + mapped.address, + PRC20_SOURCE_ABI, + 'SOURCE_CHAIN_NAMESPACE' + ), + CHAIN.ETHEREUM_SEPOLIA + ); + assert.equal( + await readOriginToken(snap, mapped.address, CHAIN.ETHEREUM_SEPOLIA), + getAddress(source) + ); + report.verifiedERC20Mappings.push({ + source: getAddress(source), + prc20: mapped.address, + status: 'source-identity-verified', + }); + } + const index = await snap.read( + gen.addresses.factory, + gen.contracts.abis.factory, + 'walletCount', + [owner] + ); + const [wallet, deployed] = await snap.read( + gen.addresses.factory, + gen.contracts.abis.factory, + 'predictWallet', + [owner, index] + ); + assert.equal(deployed, false); + report.counterfactualWallet = wallet; + for (const category of ['DEXES', 'LENDING', 'STAKING']) { + const chains = PushChain.utils.agentic.presets + .list() + .presets.find((p) => p.constant === category) + .chains.filter((c) => endpoints[c]); + for (const chainNamespace of chains) { + const result = { category, chainNamespace }; + try { + const push = PushChain.utils.agentic.presets.get(category, { + agent, + chainNamespace, + }); + // Explicit prefunded fixture, not public preset acceptance or bridge proof. + const fixtureRules = push.rules.map((rule) => ({ + ...rule, + assets: [], + })); + const prepared = await prepareWalletRules( + runtime, + gen, + owner, + wallet, + publicRules(fixtureRules), + snap + ); + const data = gen.contracts.encodeCreateWalletAt( + owner, + index, + wallet, + 'preset-readonly-check', + prepared.map((p) => p.session) + ); + const simulated = await rpc.call({ + account: owner, + to: gen.addresses.factory, + data, + blockNumber: snap.blockNumber, + gas: BigInt(20000000), + }); + assert(simulated.data && simulated.data !== '0x'); + result.prefundedFixtureFactorySimulation = 'passed'; + result.selectedAssets = push.rules[0].assets; + // Every shipped preset is routable, so preparation must verify against real metadata. + await prepareWalletRules( + runtime, + gen, + owner, + wallet, + publicRules(push.rules), + snap + ); + result.pushPreparation = 'passed'; + console.log( + `${category} ${chainNamespace}: destination factory eth_call passed; Push ${result.pushPreparation}` + ); + } catch (error) { + result.error = error.shortMessage || error.message; + process.exitCode = 1; + console.error(`${category} ${chainNamespace}: ${result.error}`); + } + report.cases.push(result); + } + } + const output = process.argv[2] || '/tmp/agw-preset-route-acceptance.json'; + fs.writeFileSync( + output, + JSON.stringify( + report, + (_, value) => (typeof value === 'bigint' ? value.toString() : value), + 2 + ) + ); + console.log( + `Read-only report: ${output}; ${ + report.cases.filter((c) => !c.error).length + }/${report.cases.length} passed.` + ); +} +main().catch((error) => { + console.error(error.shortMessage || error.message); + process.exitCode = 1; +}); diff --git a/packages/core/scripts/check-agw-route-registry.js b/packages/core/scripts/check-agw-route-registry.js new file mode 100644 index 00000000..c9e320bb --- /dev/null +++ b/packages/core/scripts/check-agw-route-registry.js @@ -0,0 +1,193 @@ +/** Read-only drift check between the SDK's token routes and the Push node's + * token registry (uregistry, read through Tendermint abci_query). No keys. + * - mismatch: the SDK maps a source token to a different PRC20 than the node. + * - sdkOnly: the SDK maps a PRC20 the node does not list as enabled. + * - nodeOnly: an enabled node route the SDK does not resolve (informational). + * Exit 1 on any mismatch or sdkOnly entry. + * Build core, then: node packages/core/scripts/check-agw-route-registry.js [report.json] + */ +const fs = require('node:fs'); +const path = require('node:path'); +const { getAddress } = require('viem'); +const built = path.resolve(__dirname, '../../../dist/packages/core/src'); +const { PushChain } = require(built); +const { SYNTHETIC_PUSH_ERC20 } = require(path.join( + built, + 'lib/constants/chain' +)); +const { MOVEABLE_TOKENS } = require(path.join(built, 'lib/constants/tokens')); +const { getPRC20Address } = require(path.join( + built, + 'lib/universal/prc20-address' +)); +const { getNativePRC20ForChain } = require(path.join( + built, + 'lib/orchestrator/internals/helpers' +)); +const { exactAgenticRoutes, resolveAgenticPrc20 } = require(path.join( + built, + 'lib/agentic/token-routes' +)); +const { PRESET_CATALOG } = require(path.join( + built, + 'lib/agentic/presets/catalog' +)); +const RPC = 'https://donut.rpc.push.org:443'; +const DONUT = PushChain.CONSTANTS.PUSH_NETWORK.TESTNET_DONUT; +const NATIVE = new Set([ + '0x0000000000000000000000000000000000000000', + '11111111111111111111111111111111', +]); + +function varint(buf, i) { + let x = BigInt(0), + s = BigInt(0); + for (;;) { + const b = buf[i++]; + x |= BigInt(b & 0x7f) << s; + if (!(b & 0x80)) return [x, i]; + s += BigInt(7); + } +} +function fields(buf) { + const out = []; + let i = 0; + while (i < buf.length) { + let key; + [key, i] = varint(buf, i); + const no = Number(key >> BigInt(3)), + wt = Number(key & BigInt(7)); + if (wt === 0) { + let v; + [v, i] = varint(buf, i); + out.push([no, v]); + } else if (wt === 2) { + let l; + [l, i] = varint(buf, i); + out.push([no, buf.subarray(i, i + Number(l))]); + i += Number(l); + } else if (wt === 5) i += 4; + else if (wt === 1) i += 8; + else throw new Error(`unsupported protobuf wire type ${wt}`); + } + return out; +} +const text = (b) => Buffer.from(b).toString('utf8'); +function tokenConfig(buf) { + const t = {}; + for (const [no, v] of fields(buf)) { + if (no === 1) t.chain = text(v); + else if (no === 2) t.address = text(v); + else if (no === 4) t.symbol = text(v); + else if (no === 5) t.decimals = Number(v); + else if (no === 6) t.enabled = v === BigInt(1); + else if (no === 9) + for (const [n2, v2] of fields(v)) if (n2 === 2) t.prc20 = text(v2); + } + return t; +} +async function nodeTokenConfigs() { + const info = await (await fetch(`${RPC}/abci_info`)).json(); + // QueryAllTokenConfigsRequest { pagination: { limit: 1000 } } + const data = '0a0318e807'; + const r = await ( + await fetch( + `${RPC}/abci_query?path=%22/uregistry.v1.Query/AllTokenConfigs%22&data=0x${data}` + ) + ).json(); + const res = r.result && r.result.response; + if (!res || res.code) + throw new Error(`abci_query failed: ${JSON.stringify(r)}`); + return { + node: info.result.response.version, + height: res.height, + configs: fields(Buffer.from(res.value || '', 'base64')) + .filter(([no]) => no === 1) + .map(([, v]) => tokenConfig(v)), + }; +} +function sdkResolve(chain, address) { + if (NATIVE.has(address)) + return getAddress(getNativePRC20ForChain(chain, DONUT)); + if (chain.startsWith('solana:')) { + const token = (MOVEABLE_TOKENS[chain] || []).find( + (t) => t.address === address + ); + if (!token) throw new Error('not in SDK registry'); + return getAddress(getPRC20Address(token, { network: DONUT }).address); + } + return resolveAgenticPrc20({ chain, address }, DONUT).address; +} +async function main() { + const { node, height, configs } = await nodeTokenConfigs(); + const report = { + at: new Date().toISOString(), + readOnly: true, + rpc: RPC, + node, + height, + matched: [], + mismatch: [], + nodeOnly: [], + sdkOnly: [], + presetTokens: [], + }; + const enabled = configs.filter((c) => c.enabled && c.prc20); + const nodePrc20s = new Set(enabled.map((c) => getAddress(c.prc20))); + for (const c of enabled) { + const entry = { + chain: c.chain, + address: c.address, + symbol: c.symbol, + decimals: c.decimals, + nodePrc20: getAddress(c.prc20), + }; + try { + const sdkPrc20 = sdkResolve(c.chain, c.address); + (sdkPrc20 === entry.nodePrc20 ? report.matched : report.mismatch).push({ + ...entry, + sdkPrc20, + }); + } catch (e) { + report.nodeOnly.push({ ...entry, sdk: e.message }); + } + } + const sdkPrc20s = new Map(); + for (const [key, address] of Object.entries(SYNTHETIC_PUSH_ERC20[DONUT])) + sdkPrc20s.set(getAddress(address), key); + for (const chain of new Set(enabled.map((c) => c.chain))) + for (const route of exactAgenticRoutes(chain, DONUT)) + sdkPrc20s.set(getAddress(route.prc20), `exact:${chain}:${route.source}`); + for (const [prc20, key] of sdkPrc20s) + if (!nodePrc20s.has(prc20)) report.sdkOnly.push({ key, prc20 }); + for (const preset of PRESET_CATALOG) + for (const chain of preset.chains) { + if (!enabled.some((c) => c.chain === chain.chainNamespace)) continue; + // Presets send only native ETH; its route is the chain's gas token config. + for (const token of ['0x0000000000000000000000000000000000000000']) { + const route = enabled.find( + (c) => + c.chain === chain.chainNamespace && + c.address.toLowerCase() === token.toLowerCase() + ); + report.presetTokens.push({ + preset: preset.constant, + chain: chain.chainNamespace, + token, + nodePrc20: route ? getAddress(route.prc20) : null, + }); + } + } + const json = JSON.stringify( + report, + (_k, v) => (typeof v === 'bigint' ? String(v) : v), + 2 + ); + if (process.argv[2]) fs.writeFileSync(process.argv[2], json); + console.log(json); + if (report.mismatch.length || report.sdkOnly.length) process.exitCode = 1; +} +main().catch((e) => { + console.error(e.message); + process.exitCode = 1; +}); diff --git a/packages/core/scripts/check-agw-runtimes.js b/packages/core/scripts/check-agw-runtimes.js new file mode 100644 index 00000000..6161bc73 --- /dev/null +++ b/packages/core/scripts/check-agw-runtimes.js @@ -0,0 +1,93 @@ +/** Local runtime matrix only. Never dispatch GitHub CI, fund E2Es or publish. */ +const fs = require('node:fs'), + path = require('node:path'); +const { spawnSync } = require('node:child_process'); +const root = path.resolve(__dirname, '../../..'); +const argument = (name) => { + const at = process.argv.indexOf(name); + return at < 0 ? undefined : process.argv[at + 1]; +}; +const binaries = [ + { major: 20, node: argument('--node20') || process.execPath }, + { major: 24, node: argument('--node24') }, +]; +if (!binaries[1].node) + throw new Error( + 'Provide --node24 ; --node20 defaults to the current executable.' + ); +const output = path.resolve( + argument('--output') || path.join(root, '.agw-runtime-validation') +); +fs.mkdirSync(output, { recursive: true }); +const results = []; +function command(dir, node, args, env, name) { + const result = spawnSync(node, args, { + cwd: root, + env, + encoding: 'utf8', + maxBuffer: 30 * 1024 * 1024, + }); + fs.writeFileSync( + path.join(dir, name + '.log'), + String(result.stdout || '') + String(result.stderr || '') + ); + if (result.error || result.status !== 0) + throw new Error(`Node ${node} failed ${name}; see ${dir}/${name}.log`); + return result.stdout; +} +for (const runtime of binaries) { + const dir = path.join(output, 'node' + runtime.major); + fs.mkdirSync(dir, { recursive: true }); + const env = { + ...process.env, + PATH: path.dirname(runtime.node) + path.delimiter + process.env.PATH, + }; + const version = command( + dir, + runtime.node, + [ + '-p', + 'JSON.stringify({version:process.version,major:Number(process.versions.node.split(".")[0]),platform:process.platform,arch:process.arch})', + ], + env, + 'version' + ); + const actual = JSON.parse(version); + if (actual.major !== runtime.major) + throw new Error(`Expected Node ${runtime.major}, got ${actual.version}`); + process.stdout.write(`AGW runtime matrix: ${actual.version}\n`); + command( + dir, + runtime.node, + [ + 'node_modules/jest/bin/jest.js', + '--config', + 'packages/core/jest.config.ts', + '--runInBand', + ], + env, + 'full-unit' + ); + command( + dir, + runtime.node, + ['packages/core/scripts/agw-verify.js'], + env, + 'verification' + ); + for (const file of fs.readdirSync(path.join(root, '.agw-validation'))) { + const source = path.join(root, '.agw-validation', file); + if (fs.statSync(source).isFile()) + fs.copyFileSync(source, path.join(dir, file)); + } + results.push({ ...actual, passed: true }); +} +fs.writeFileSync( + path.join(output, 'results.json'), + JSON.stringify( + { results, hostedCi: false, published: false, fundedE2Es: false }, + null, + 2 + ) + '\n' +); +process.stdout.write('Both runtime matrix entries passed.\n'); diff --git a/packages/core/scripts/marketplace-local/prepare.sh b/packages/core/scripts/marketplace-local/prepare.sh new file mode 100644 index 00000000..ae6f6a7b --- /dev/null +++ b/packages/core/scripts/marketplace-local/prepare.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# Compile repo-owned signature acceptance fixtures. Never broadcasts or clones another repository. +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +MARKET_FIXTURE_DIR="${MARKETPLACE_LOCAL_DIR:-${TMPDIR:-/tmp}/push-marketplace-local}" +mkdir -p "$MARKET_FIXTURE_DIR/src" +cp "$SCRIPT_DIR/../agw-local/contracts/MarketplaceOwnerFixtures.sol" "$MARKET_FIXTURE_DIR/src/" +cat > "$MARKET_FIXTURE_DIR/foundry.toml" <<'EOF' +[profile.default] +src = "src" +out = "out" +solc_version = "0.8.26" +optimizer = true +optimizer_runs = 200 +EOF +forge build --root "$MARKET_FIXTURE_DIR" --offline >/dev/null +echo "$MARKET_FIXTURE_DIR" diff --git a/packages/core/src/lib/agentic/__fixtures__/v6-vectors.json b/packages/core/src/lib/agentic/__fixtures__/v6-vectors.json new file mode 100644 index 00000000..b1ecfd80 --- /dev/null +++ b/packages/core/src/lib/agentic/__fixtures__/v6-vectors.json @@ -0,0 +1,182 @@ +{ + "provenance": { + "agwCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "generatedBy": "packages/core/__agw-local__/vectors.spec.ts", + "toolchain": "forge Version: 1.5.1-stable", + "chainId": 9000, + "note": "Addresses are deterministic for a fresh anvil + the harness deploy order." + }, + "rulesId": [ + { + "validator": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "agent": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", + "grantNonce": { + "$bigint": "0" + }, + "agentConfig": "0x00000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c8", + "expected": "0xed16789aedd36446aa851df227d231dfdaab75ab95d022e251d179e27fdcee59" + }, + { + "validator": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "agent": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", + "grantNonce": { + "$bigint": "1" + }, + "agentConfig": "0x00000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c8", + "expected": "0xb5cf1093fb5b4109923a54fc9a67eff369e01392403b645e8e0155a6cb4990fe" + }, + { + "validator": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "agent": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", + "grantNonce": { + "$bigint": "7" + }, + "agentConfig": "0x00000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c8", + "expected": "0xc05ecd2b8ea27dcaff748d5027fcc6b7963b9bf5452ccc6e3016235a878a2da3" + }, + { + "validator": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "agent": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", + "grantNonce": { + "$bigint": "9223372036854775808" + }, + "agentConfig": "0x00000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c8", + "expected": "0xc568da4c1ecd6f73d2609cba4bccba9108f9b3b43e13797e63aa25db68a6ea79" + }, + { + "validator": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "agent": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", + "grantNonce": { + "$bigint": "0" + }, + "agentConfig": "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc", + "expected": "0x0a7234266892a3ade6ba3f70c1a4c0b56aefb198e74a14a5d6d08c5f8587498e" + }, + { + "validator": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "agent": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", + "grantNonce": { + "$bigint": "1" + }, + "agentConfig": "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc", + "expected": "0x66c8518bd08fc86347cb20601b22df298d73794e99c6eb9250f52ce78c949674" + }, + { + "validator": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "agent": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", + "grantNonce": { + "$bigint": "7" + }, + "agentConfig": "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc", + "expected": "0x11be56b6d0b4b6ba03b6475bdbe4393f68e689d690a5428821664947c0e9df3a" + }, + { + "validator": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "agent": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", + "grantNonce": { + "$bigint": "9223372036854775808" + }, + "agentConfig": "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc", + "expected": "0x35257788092b8179db6e880a636bc3114dbe9b1b30445d3551218ccc682478df" + }, + { + "validator": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "agent": "0x00000000000000000000000000000000000000ff", + "grantNonce": { + "$bigint": "0" + }, + "agentConfig": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "expected": "0x675a172b2a29803a43c4c478a43b68730a6d74aee6102750b59bc49d29b70b47" + }, + { + "validator": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "agent": "0x00000000000000000000000000000000000000ff", + "grantNonce": { + "$bigint": "1" + }, + "agentConfig": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "expected": "0x1ba472d29a9d5f904acd8d6682ab6beb04026365da11ec4f7142231ac3eb592b" + }, + { + "validator": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "agent": "0x00000000000000000000000000000000000000ff", + "grantNonce": { + "$bigint": "7" + }, + "agentConfig": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "expected": "0xb5e300538b76a563882467a58f2073ed1677234609d698d22bb441814355f12c" + }, + { + "validator": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "agent": "0x00000000000000000000000000000000000000ff", + "grantNonce": { + "$bigint": "9223372036854775808" + }, + "agentConfig": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "expected": "0x7b190cef2be98a983c96b0c4653480549c1f7ce35232f400dff5c6ce7f551f11" + } + ], + "deriveWallet": [ + { + "factory": "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318", + "walletImplementation": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", + "owner": "0x90F79bf6EB2c4f870365E785982E1f101E93b906", + "index": 0, + "expected": "0x030A9Ef421d9fEd942Fc5C3629A61FD0E7826c95" + }, + { + "factory": "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318", + "walletImplementation": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", + "owner": "0x1111111111111111111111111111111111111111", + "index": 0, + "expected": "0xaa19c76fe8534a2c859733Bfb11016C375b0302e" + } + ], + "native": { + "rule": { + "agent": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", + "target": "0x610178dA211FEF7D417bC0e6FeD39F05609AD788", + "selector": "deposit(address,uint256)", + "validUntil": 4102444800, + "pins": [ + { + "arg": 0, + "expected": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC" + } + ], + "amount": { + "arg": 1, + "maxPerCall": { + "$bigint": "10" + }, + "maxTotal": { + "$bigint": "100" + } + }, + "maxValuePerCall": { + "$bigint": "5" + }, + "maxValueTotal": { + "$bigint": "50" + }, + "maxCalls": 3 + }, + "nativeChain": "eip155:9000", + "wallet": "0x619ce4E44bBe9a0EDAb3420848E756FFC6274Fe1", + "rulesId": "0xed16789aedd36446aa851df227d231dfdaab75ab95d022e251d179e27fdcee59", + "actionId": "0x3fc42bf28b699aaf7e81050814910333318858878011ce9ab981ca13b7183afb", + "configId": "0xa813ee3036f4b5f260cad87886da068f472515ed393fa5d797c5ace14fcb2adf", + "configInitialized": true, + "storedTarget": "0x610178dA211FEF7D417bC0e6FeD39F05609AD788", + "storedSelector": "0x47e7ef24", + "storedPins": [ + { + "offset": 4, + "op": 0, + "value": "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" + } + ], + "storedAmountOffset": 36, + "encodedSession": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000e7f1725e7734ce288f8367e1bb143e90bb3f051200000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002047e7ef2400000000000000000000000000000000000000000000000000000000000000000000000000000000610178da211fef7d417bc0e6fed39f05609ad788000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000dc64a140aa3e981100a9beca4e685f962f0cf6c9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000b6569703135353a393030300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000f4865700000000000000000000000000610178da211fef7d417bc0e6fed39f05609ad78847e7ef24000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" + } +} diff --git a/packages/core/src/lib/agentic/__tests__/codec.spec.ts b/packages/core/src/lib/agentic/__tests__/codec.spec.ts new file mode 100644 index 00000000..a13680f0 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/codec.spec.ts @@ -0,0 +1,465 @@ +import { decodeFunctionData, getAddress, type Address, type Hex } from 'viem'; +import vectorsJson from '../__fixtures__/v6-vectors.json'; +import { + actionId, + agentConfig, + configId, + deriveWallet, + rulesId, +} from '../codec/ids'; +import { + decodeNativeTerms, + encodeNativeTerms, + nativeRuleToTerms, + nativeTermsToRule, +} from '../codec/native'; +import { + buildSession, + decodeEnvelope, + decodeSession, + encodeEnvelope, + encodeSession, +} from '../codec/session'; +import { parseSelector, VALUE_ONLY_SELECTOR } from '../codec/selectors'; +import { argumentOffset, headSize } from '../codec/abi-layout'; +import { UINT256_MAX } from '../codec/defaults'; +import { v6 } from '../contracts/v6'; +import { AGW_ABI } from '../contracts/abi/v6'; +import { AGENTIC_ERROR_CODE } from '../errors'; +import type { NativeRule } from '../agentic.types'; + +/** Restore {$bigint} markers written by the vector generator. */ +function revive(v: T): T { + return JSON.parse(JSON.stringify(v), (_k, x) => + x && typeof x === 'object' && '$bigint' in x ? BigInt(x.$bigint) : x + ); +} +const vectors = revive(vectorsJson) as unknown as { + rulesId: { + validator: Address; + agent: Address; + grantNonce: bigint; + agentConfig: Hex; + expected: Hex; + }[]; + deriveWallet: { + factory: Address; + walletImplementation: Address; + owner: Address; + index: number; + expected: Address; + }[]; + native: { + rule: NativeRule; + nativeChain: string; + wallet: Address; + rulesId: Hex; + actionId: Hex; + configId: Hex; + configInitialized: boolean; + storedTarget: Address; + storedSelector: Hex; + storedPins: { offset: number; op: number; value: Hex }[]; + storedAmountOffset: number; + encodedSession: Hex; + }; +}; + +const NOW = 1_700_000_000; +const target = getAddress('0x0000000000000000000000000000000000007a76'); +const agent = getAddress('0x00000000000000000000000000000000000000a9'); + +describe('IDs against contract-generated vectors (v5)', () => { + it.each(vectors.rulesId)( + 'rulesId(agent, nonce) = engine.getPermissionId — nonce $grantNonce', + (v) => { + expect(agentConfig(v.agent)).toBe(v.agentConfig); + expect( + rulesId({ + validator: v.validator, + agent: v.agent, + grantNonce: v.grantNonce, + }) + ).toBe(v.expected); + } + ); + + it.each(vectors.deriveWallet)( + 'deriveWallet mirrors factory.predictWallet for $owner', + (v) => { + expect(deriveWallet(v)).toBe(getAddress(v.expected)); + } + ); + + it('actionId/configId: the policy holds an initialized config under exactly this key', () => { + const n = vectors.native; + expect(n.configInitialized).toBe(true); + expect(actionId(getAddress(n.storedTarget), n.storedSelector)).toBe( + n.actionId + ); + expect(configId(n.wallet, n.rulesId, n.actionId)).toBe(n.configId); + }); + + it('rulesId rejects a grant nonce outside uint64', () => { + expect(() => + rulesId({ validator: agent, agent, grantNonce: BigInt(2) ** BigInt(64) }) + ).toThrow(/uint64/); + }); +}); + +describe('native rule codec', () => { + const v = vectors.native; + + it('encodes the session the contracts accepted and stored', () => { + const { terms } = nativeRuleToTerms(v.rule, { nowSeconds: NOW }); + const session = buildSession({ + validator: decodeSession(v.encodedSession).sessionValidator, + agent: v.rule.agent, + rulesPolicy: decodeSession(v.encodedSession).actions[0].actionPolicies[0] + .policy, + actions: [ + { + target: terms.target, + selector: terms.selector, + initData: encodeEnvelope(v.nativeChain, encodeNativeTerms(terms)), + }, + ], + }); + expect(encodeSession(session)).toBe(v.encodedSession); + expect(terms.pins).toEqual(v.storedPins); + expect(terms.amount.offset).toBe(v.storedAmountOffset); + expect(terms.selector).toBe(v.storedSelector); + }); + + it('round-trips terms through the envelope and back to a public rule', () => { + const { terms } = nativeRuleToTerms(v.rule, { nowSeconds: NOW }); + const env = decodeEnvelope( + encodeEnvelope(v.nativeChain, encodeNativeTerms(terms)) + ); + expect(env.chainNamespace).toBe(v.nativeChain); + const back = decodeNativeTerms(env.body); + expect(back).toEqual({ ...terms, validUntil: terms.validUntil }); + const rule = nativeTermsToRule(back, v.rule.agent); + // Stored terms carry offsets, not an ABI: decoded rules report the raw offset form. + expect(rule.wirePins).toEqual([ + { offset: 4, op: 0, value: terms.pins[0].value.toLowerCase() }, + ]); + expect(rule.amount).toEqual({ + offset: 36, + maxPerCall: BigInt(10), + maxTotal: BigInt(100), + }); + expect(rule).not.toHaveProperty('ref'); + // …and the decoded rule re-encodes to identical terms with only its 4-byte selector. + expect(nativeRuleToTerms(rule, { nowSeconds: NOW }).terms).toEqual(terms); + }); + + it('decoding never invents argument indexes: a static array before a pin stays a raw offset', () => { + const input: NativeRule = { + agent, + target, + selector: 'deposit(uint256[2],address)', + validUntil: NOW + 10, + pins: [{ arg: 1, expected: agent }], + }; + const { terms } = nativeRuleToTerms(input, { nowSeconds: NOW }); + expect(terms.pins[0].offset).toBe(4 + 64); + const decoded = nativeTermsToRule(terms, agent); + expect(decoded.wirePins).toEqual([ + { offset: 68, op: 0, value: terms.pins[0].value }, + ]); + expect(nativeRuleToTerms(decoded, { nowSeconds: NOW }).terms).toEqual( + terms + ); + }); + + it('a decoded address pin re-encodes in argument form once the signature is restored', () => { + const input: NativeRule = { + agent, + target, + selector: 'deposit(address,uint256)', + validUntil: NOW + 10, + pins: [{ arg: 0, expected: agent }], + }; + const { terms } = nativeRuleToTerms(input, { nowSeconds: NOW }); + const word = terms.pins[0].value; + expect( + nativeRuleToTerms( + { ...input, pins: [{ arg: 0, expected: word }] }, + { nowSeconds: NOW } + ).terms + ).toEqual(terms); + expect(() => + nativeRuleToTerms( + { ...input, pins: [{ arg: 0, expected: `0x${'ff'.repeat(32)}` }] }, + { nowSeconds: NOW } + ) + ).toThrow(/does not encode/); + }); + + it('offset-form pins must be exact words at a valid offset', () => { + const base: NativeRule = { + agent, + target, + selector: '0xd09de08a', + validUntil: NOW + 10, + }; + expect(() => + nativeRuleToTerms( + { ...base, pins: [{ offset: 3, expected: `0x${'00'.repeat(32)}` }] }, + { nowSeconds: NOW } + ) + ).toThrow(/offset/); + expect(() => + nativeRuleToTerms( + { ...base, pins: [{ offset: 4, expected: '0x01' }] }, + { nowSeconds: NOW } + ) + ).toThrow(/32-byte/); + expect( + nativeRuleToTerms( + { ...base, pins: [{ offset: 36, expected: `0x${'00'.repeat(31)}01` }] }, + { nowSeconds: NOW } + ).terms.pins + ).toEqual([{ offset: 36, op: 0, value: `0x${'00'.repeat(31)}01` }]); + }); + + it('applies confirmed zero PC defaults and independent token/call defaults', () => { + const { terms } = nativeRuleToTerms( + { + agent, + target, + selector: 'f(uint256)', + validUntil: NOW + 10, + amount: { arg: 0, maxPerCall: BigInt(1) }, + }, + { nowSeconds: NOW } + ); + expect(terms.maxValuePerCall).toBe(BigInt(0)); + expect(terms.maxValueTotal).toBe(BigInt(0)); + expect(terms.maxCalls).toBe(0xffffffff); + expect(terms.amount.maxTotal).toBe(UINT256_MAX); + }); + + it('rejects ambiguous arg-plus-offset authoring for both pins and amount', () => { + const rule = { + agent, + target, + selector: 'transfer(address,uint256)' as const, + validUntil: NOW + 10, + }; + expect(() => + nativeRuleToTerms( + { + ...rule, + pins: [ + { arg: 0, offset: 4, expected: `0x${'00'.repeat(32)}` } as never, + ], + }, + { nowSeconds: NOW } + ) + ).toThrow('mutually exclusive'); + expect(() => + nativeRuleToTerms( + { + ...rule, + amount: { arg: 1, offset: 36, maxPerCall: BigInt(1) } as never, + }, + { nowSeconds: NOW } + ) + ).toThrow('mutually exclusive'); + }); + + it('keeps an explicit zero as zero', () => { + const { terms } = nativeRuleToTerms( + { + agent, + target, + selector: 'f(uint256)', + validUntil: NOW + 10, + amount: { arg: 0, maxPerCall: BigInt(1), maxTotal: BigInt(0) }, + }, + { nowSeconds: NOW } + ); + expect(terms.amount.maxTotal).toBe(BigInt(0)); + }); + + it('value-only rules encode the reserved selector and refuse pins/amount', () => { + const { terms } = nativeRuleToTerms( + { agent, target, selector: 'value-only', validUntil: NOW + 10 }, + { nowSeconds: NOW } + ); + expect(terms.selector).toBe(VALUE_ONLY_SELECTOR); + expect(() => + nativeRuleToTerms( + { + agent, + target, + selector: 'value-only', + validUntil: NOW + 10, + pins: [{ arg: 0, expected: agent }], + }, + { nowSeconds: NOW } + ) + ).toThrow(/value-only/); + }); + + it.each([ + ['past expiry', { validUntil: NOW }], + ['zero target', { target: '0x0000000000000000000000000000000000000000' }], + [ + 'too many pins', + { + selector: 'f(uint256)', + pins: Array.from({ length: 9 }, () => ({ + arg: 0, + expected: BigInt(1), + })), + }, + ], + [ + 'pin needs a signature', + { selector: '0x12345678', pins: [{ arg: 0, expected: BigInt(1) }] }, + ], + [ + 'pin on a dynamic argument', + { selector: 'f(bytes)', pins: [{ arg: 0, expected: '0x01' }] }, + ], + [ + 'pin index out of range', + { selector: 'f(uint256)', pins: [{ arg: 1, expected: BigInt(1) }] }, + ], + [ + 'pin value of the wrong type', + { selector: 'f(address)', pins: [{ arg: 0, expected: BigInt(1) }] }, + ], + [ + 'amount on a non-uint', + { selector: 'f(address)', amount: { arg: 0, maxPerCall: BigInt(1) } }, + ], + [ + 'amount also pinned', + { + selector: 'f(uint256)', + pins: [{ arg: 0, expected: BigInt(1) }], + amount: { arg: 0, maxPerCall: BigInt(1) }, + }, + ], + ['negative cap', { maxValuePerCall: BigInt(-1) }], + ['maxCalls beyond uint32', { maxCalls: 2 ** 32 }], + ])('rejects %s before signing', (_name, patch) => { + const rule = { + agent, + target, + selector: 'increment()', + validUntil: NOW + 10, + ...patch, + } as NativeRule; + expect(() => nativeRuleToTerms(rule, { nowSeconds: NOW })).toThrow( + expect.objectContaining({ code: AGENTIC_ERROR_CODE.INVALID_RULE }) + ); + }); + + it('approval policy is external while caller-supplied pins remain ABI-validated', () => { + const base = { agent, target, validUntil: NOW + 10 }; + expect(() => + nativeRuleToTerms( + { ...base, selector: 'approve(address,uint256)' }, + { nowSeconds: NOW } + ) + ).not.toThrow(); + expect(() => + nativeRuleToTerms( + { + ...base, + selector: 'approve(address,uint256)', + pins: [{ arg: 0, expected: agent }], + }, + { nowSeconds: NOW } + ) + ).not.toThrow(); + expect(() => + nativeRuleToTerms( + { + ...base, + selector: + 'permit(address,address,uint256,uint256,uint8,bytes32,bytes32)', + pins: [{ arg: 0, expected: agent }], + }, + { nowSeconds: NOW } + ) + ).not.toThrow(); + }); +}); + +describe('ABI layout offsets', () => { + it('accounts for dynamic heads and multi-word static tuples before the pinned argument', () => { + const dyn = parseSelector('f(bytes,address)'); + expect(argumentOffset(dyn.inputs, 1, 'pin')).toBe(4 + 32); + const tup = parseSelector('f((uint256,uint256),address)'); + expect(headSize(tup.inputs![0])).toBe(64); + expect(argumentOffset(tup.inputs, 1, 'pin')).toBe(4 + 64); + const arr = parseSelector('f(uint256[3],address)'); + expect(argumentOffset(arr.inputs, 1, 'pin')).toBe(4 + 96); + const dynTuple = parseSelector('f((uint256,bytes),address)'); + expect(argumentOffset(dynTuple.inputs, 1, 'pin')).toBe(4 + 32); + }); + + it('rejects pinning a tuple', () => { + const tup = parseSelector('f((uint256,uint256),address)'); + expect(() => argumentOffset(tup.inputs, 0, 'pin')).toThrow(/single-word/); + }); + + it('parses hex, signature and value-only selectors', () => { + expect(parseSelector('0x617BA037').selector).toBe('0x617ba037'); + expect( + parseSelector('supply(address,uint256,address,uint16)').selector + ).toBe('0x617ba037'); + expect(parseSelector('value-only').valueOnly).toBe(true); + expect(() => parseSelector('not a selector' as never)).toThrow(); + }); +}); + +describe('wallet call encoders decode back to the same calls', () => { + const call = { target, value: BigInt(7), data: '0xd09de08a' as Hex }; + + it('execute single uses packed ERC-7579 calldata', () => { + const data = v6.encodeExecute([call]); + const { functionName, args } = decodeFunctionData({ abi: AGW_ABI, data }); + expect(functionName).toBe('execute'); + expect(args[0]).toBe(`0x${'00'.repeat(32)}`); + expect((args[1] as Hex).length).toBe(2 + 2 * (20 + 32 + 4)); + expect(v6.decodeWalletCall(data)).toEqual({ + kind: 'execute', + mode: args[0], + calls: [call], + }); + }); + + it('execute batch uses abi.encode(Execution[])', () => { + const data = v6.encodeExecute([call, { ...call, value: BigInt(0) }]); + const decoded = v6.decodeWalletCall(data); + expect(decoded).toMatchObject({ + kind: 'execute', + mode: `0x01${'00'.repeat(31)}`, + }); + expect((decoded as { calls: unknown[] }).calls).toEqual([ + call, + { ...call, value: BigInt(0) }, + ]); + }); + + it('executeAsAgent carries the rule ID and one packed call', () => { + const id = `0x${'42'.repeat(32)}` as Hex; + expect(v6.decodeWalletCall(v6.encodeExecuteAsAgent(id, call))).toEqual({ + kind: 'executeAsAgent', + rulesId: id, + mode: `0x${'00'.repeat(32)}`, + calls: [call], + }); + }); + + it('unknown calldata is not mistaken for a wallet call', () => { + expect(v6.decodeWalletCall('0xdeadbeef')).toBeNull(); + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/creation-errors.spec.ts b/packages/core/src/lib/agentic/__tests__/creation-errors.spec.ts new file mode 100644 index 00000000..9b9effd1 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/creation-errors.spec.ts @@ -0,0 +1,277 @@ +import { AgenticNamespaceImpl } from '../agentic'; +import { + AgenticError, + AgenticRevertError, + AGENTIC_ERROR_CODE, +} from '../errors'; +import { agenticPresets } from '../presets'; +import { normalizePublicRule, publicRules } from '../public-rule'; +import { validateUniversalRuleShape } from '../codec/universal'; +import type { UniversalRule } from '../agentic.types'; +import { wrapSendError } from '../management/common'; +import { ADDR, FakeChain, registerFakeGeneration } from './fake-chain'; +import { mockRuntime } from './mock-runtime'; +import { resetAgenticGenerations } from '../deployments'; + +const chainNamespace = 'eip155:11155111' as const; +const options = { + chainNamespace, + agent: ADDR.agent, + validUntil: 2_000_000_000, +}; +beforeEach(registerFakeGeneration); +afterEach(resetAgenticGenerations); + +it('an edited preset with an unrouted token gives a typed token-route error before any transaction', async () => { + const cause = new Error( + 'Unable to infer origin chain or token symbol for token' + ); + const rt = mockRuntime(new FakeChain(), { + signer: ADDR.owner, + resolvePrc20: () => { + throw cause; + }, + }); + const sdk = new AgenticNamespaceImpl(rt); + const { rules } = agenticPresets.get('LENDING', options); + // Aave's faucet LINK has no Push route; presets themselves send only ETH. + const edited = { + ...rules[0], + assets: [ + { + token: '0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5', + maxPerCall: BigInt(1), + maxTotal: BigInt(2), + }, + ], + }; + let failure: unknown; + try { + await sdk.create('Test', { rules: [edited] }); + } catch (error) { + failure = error; + } + expect(failure).toBeInstanceOf(AgenticError); + expect(failure).toMatchObject({ + code: 'TOKEN_ROUTE_UNAVAILABLE', + cause, + details: { + ruleIndex: 0, + assetIndex: 0, + chainNamespace, + field: 'assets[0].token', + }, + userMessage: expect.stringContaining( + 'Rule 1: This token cannot be sent from Push to Ethereum Sepolia' + ), + hint: expect.stringContaining('verified PRC20 route'), + }); + expect(rt.executeMock).not.toHaveBeenCalled(); + expect(rt.atomicMock).not.toHaveBeenCalled(); +}); + +it('reports the complete 42-condition count for duplicated DEX entries, without dropping them', async () => { + const rt = mockRuntime(new FakeChain(), { signer: ADDR.owner }); + const sdk = new AgenticNamespaceImpl(rt); + const { rules } = agenticPresets.get('DEXES', { + ...options, + }); + const calls = rules[0].allowedCalls; + // The unpinned wrap cannot repeat (a bare alternative is refused first). + const duplicated = { + ...rules[0], + allowedCalls: [...calls, ...calls.filter((c) => c.pins?.length)], + }; + await expect( + sdk.create('Test', { rules: [duplicated] }) + ).rejects.toMatchObject({ + code: 'INVALID_RULE', + details: { + reason: 'RULE_CONSTRAINT_LIMIT', + actual: 42, + limit: 32, + callCount: 15, + ruleIndex: 0, + chainNamespace, + }, + message: expect.stringContaining('42 conditions'), + userMessage: expect.stringContaining('Rule 1:'), + }); + expect(duplicated.allowedCalls).toHaveLength(15); + expect(rt.executeMock).not.toHaveBeenCalled(); +}); + +it('validates stock DEX rules independently: two 21-condition rules do not become a 42-condition rule', async () => { + const rt = mockRuntime(new FakeChain()); + for (const chain of ['eip155:11155111', 'eip155:84532'] as const) { + const { rules } = agenticPresets.get('DEXES', { + ...options, + chainNamespace: chain, + }); + const normalized = (await normalizePublicRule( + publicRules(rules)[0], + ADDR.other, + rt + )) as UniversalRule; + expect( + normalized.allowedCalls.reduce((n, c) => n + (c.pins?.length ?? 0), 0) + ).toBe(21); + expect(() => + validateUniversalRuleShape(normalized, rt.nowSeconds()) + ).not.toThrow(); + } +}); + +it('does not misclassify a destination RPC failure as an unavailable token', async () => { + const cause = new Error('RPC timeout: internal endpoint details'); + const rt = mockRuntime(new FakeChain(), { + signer: ADDR.owner, + resolveCEA: async () => { + throw cause; + }, + }); + const sdk = new AgenticNamespaceImpl(rt); + await expect( + sdk.create('Test', { rules: agenticPresets.get('LENDING', options).rules }) + ).rejects.toMatchObject({ + code: 'RULE_READ_FAILED', + cause, + userMessage: + 'Rule 1: The wallet’s destination account could not be loaded. Try again shortly.', + details: { ruleIndex: 0, chainNamespace, stage: 'destinationAccount' }, + }); + expect(rt.executeMock).not.toHaveBeenCalled(); +}); + +it.each(Object.values(AGENTIC_ERROR_CODE))( + 'provides safe UI copy for %s while retaining diagnostic text', + (code) => { + const error = new AgenticError(code, 'raw RPC details: 0x12345678'); + expect(error.userMessage.length).toBeGreaterThan(10); + expect(error.userMessage).not.toContain('raw RPC'); + expect(error.message).toBe('raw RPC details: 0x12345678'); + } +); + +it('keeps submitted hashes and uncertainty visible instead of inviting a blind retry', () => { + const error = new AgenticError( + 'RECEIPT_UNAVAILABLE', + 'technical receipt diagnostic', + { details: { txHash: '0x1234' } } + ); + expect(error.userMessage).toContain('submitted'); + expect(error.userMessage).toContain('Check its status'); + expect(error.details).toEqual({ txHash: '0x1234' }); +}); + +it('explains the create and native action ceilings using the available structured reason', () => { + expect( + new AgenticError( + 'INVALID_RULE', + 'create accepts at most eight initial rules' + ).userMessage + ).toContain('at most eight rules'); + expect( + new AgenticError('CAPABILITY_UNAVAILABLE', 'diagnostic', { + details: { capability: 'nativeActions' }, + }).userMessage + ).toContain('at most eight functions'); +}); + +it.each([9, 33])( + 'reports the eight-function Push-chain limit for %i functions, not the generic 1..32', + async (count) => { + const rt = mockRuntime(new FakeChain(), { signer: ADDR.owner }); + const sdk = new AgenticNamespaceImpl(rt); + await expect( + sdk.create('Too many', { + rules: [ + { + agent: ADDR.agent, + validUntil: 2_000_000_000, + allowedCalls: Array.from({ length: count }, (_, i) => ({ + target: `0x${(i + 16).toString(16).padStart(40, '0')}`, + selector: 'increment()' as const, + })), + }, + ], + }) + ).rejects.toMatchObject({ + code: 'CAPABILITY_UNAVAILABLE', + details: { capability: 'nativeActions' }, + userMessage: expect.stringContaining('at most eight functions'), + }); + } +); + +it('preserves decoded contract failures and cancellation causes with UI messages', () => { + const decodedError = { + name: 'PolicyCheckReverted(ArgPinAboveMax)', + selector: '0x12345678', + }; + const cause = new Error('provider detail'); + const error = new AgenticRevertError('technical revert', { + decodedError, + cause, + }); + expect(error.userMessage).toContain('exceeds'); + expect(error.decodedError).toEqual(decodedError); + expect(error.cause).toBe(cause); + const rejected = { code: 4001, message: 'User rejected request' }; + expect(wrapSendError(rejected)).toMatchObject({ + code: 'REQUEST_REJECTED', + cause: rejected, + userMessage: expect.stringContaining('cancelled'), + }); +}); + +it.each([ + ['OwnerSigExpired', 'approval has expired'], + ['RulesExpired', 'rule has expired'], + ['ERC20InsufficientAllowance', 'spending approval'], + ['ERC20InsufficientBalance', 'not enough funds'], + ['TooManyAllowedCallPins', 'more than 32 conditions'], +])( + 'explains %s without confusing approvals, rules and balances', + (name, text) => { + expect( + new AgenticRevertError('diagnostic', { decodedError: { name } }) + .userMessage + ).toContain(text); + } +); + +it.each([ + ['a Push-chain rule', {}], + ['an EVM rule without tokens', { chainNamespace, assets: [] as never[] }], +])( + 'rejects %s without allowed functions before signing', + async (_name, shape) => { + const rt = mockRuntime(new FakeChain(), { signer: ADDR.owner }); + const sdk = new AgenticNamespaceImpl(rt); + for (const allowedCalls of [undefined, []]) + await expect( + sdk.create('No functions', { + rules: [ + { + agent: ADDR.agent, + validUntil: 2_000_000_000, + ...shape, + allowedCalls, + }, + ], + }) + ).rejects.toMatchObject({ + code: 'INVALID_RULE', + details: { + reason: 'ALLOWED_FUNCTION_REQUIRED', + field: 'allowedCalls', + }, + userMessage: expect.stringContaining( + 'allow transfers back to the owner' + ), + }); + expect(rt.executeMock).not.toHaveBeenCalled(); + expect(rt.atomicMock).not.toHaveBeenCalled(); + } +); diff --git a/packages/core/src/lib/agentic/__tests__/fake-chain.ts b/packages/core/src/lib/agentic/__tests__/fake-chain.ts new file mode 100644 index 00000000..d4f824a7 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/fake-chain.ts @@ -0,0 +1,423 @@ +/** + * In-memory stand-in for the AGW contract views used by unit tests. It models + * only what the SDK reads (factory registry/prediction, wallet wiring, + * engine enumeration, URP mode/native config, checkpoints and logs), so the + * SDK's own logic — selection, consistency, error mapping — is what is tested. + * Real-contract behaviour is covered by the local harness (__agw-local__). + */ +import { + encodeAbiParameters, + encodeEventTopics, + getAddress, + keccak256, + toBytes, + type AbiEvent, + type Address, + type Hex, + type Log, + type TransactionReceipt, +} from 'viem'; +import { PUSH_NETWORK } from '../../constants/enums'; +import { v6 } from '../contracts/v6'; +import type { ChainReader } from '../contracts/reader'; +import { actionId, configId, deriveWallet } from '../codec/ids'; +import { + registerAgenticGeneration, + resetAgenticGenerations, + type AgenticGeneration, +} from '../deployments'; +import type { NativeConfigRead } from '../contracts/v6'; + +export const ADDR = { + factory: getAddress('0x00000000000000000000000000000000000fac70'), + impl: getAddress('0x00000000000000000000000000000000000001a1'), + engine: getAddress('0x00000000000000000000000000000000000e0e0e'), + policy: getAddress('0x0000000000000000000000000000000000000b01'), + validator: getAddress('0x0000000000000000000000000000000000000a1d'), + gateway: getAddress('0x00000000000000000000000000000000000000c1'), + owner: getAddress('0x00000000000000000000000000000000000000a0'), + agent: getAddress('0x00000000000000000000000000000000000000a9'), + other: getAddress('0x00000000000000000000000000000000000000b9'), + target: getAddress('0x0000000000000000000000000000000000007a76'), +}; + +export const PUSH_NS = 'eip155:42101'; +export const SEPOLIA_NS = 'eip155:11155111'; + +export interface FakeRule { + rulesId: Hex; + agent: Address; + mode: number; // 1 native, 0 universal + chain: string; + actionIds: Hex[]; + native?: Partial; + /** Per-action native config overrides, keyed by lowercase action ID. */ + nativeByAction?: Record>; + universal?: { + assets: readonly { + token: Address; + maxPerCall?: bigint; + maxTotal?: bigint; + spent?: bigint; + }[]; + expectedCEA: Address; + maxGasPerCall: bigint; + }; +} + +export interface FakeWallet { + address: Address; + owner: Address; + index: bigint; + label: string; + rules: FakeRule[]; + checkpointCount: bigint; + grantNonce: bigint; + accountId?: string; +} + +export class FakeChain implements ChainReader { + policyVersion = '3.1.0'; + sourceTokens = new Map(); + block = BigInt(100); + wallets = new Map(); + walletCounts = new Map(); + balances = new Map(); + checkpointLogs: Log[] = []; + extraLogs: Log[] = []; + failOn = new Set(); + calls: { functionName: string; blockNumber?: bigint }[] = []; + /** Override the factory's prediction (to simulate derivation drift). */ + predictOverride?: (owner: Address, index: bigint) => Address; + receipts = new Map(); + + addWallet(owner: Address, label: string, rules: FakeRule[] = []): FakeWallet { + const index = this.walletCounts.get(owner.toLowerCase()) ?? BigInt(0); + const address = deriveWallet({ + factory: ADDR.factory, + walletImplementation: ADDR.impl, + owner, + index, + }); + const w: FakeWallet = { + address, + owner, + index, + label, + rules, + checkpointCount: BigInt(0), + grantNonce: BigInt(rules.length), + }; + this.wallets.set(address.toLowerCase(), w); + this.walletCounts.set(owner.toLowerCase(), index + BigInt(1)); + this.extraLogs.push( + log( + ADDR.factory, + v6.events.walletDeployed, + { owner, index, wallet: address }, + { label }, + BigInt(10) + ) + ); + return w; + } + + nativeRule( + agent: Address, + rulesId: Hex, + extra: Partial = {} + ): FakeRule { + return { + rulesId, + agent, + mode: 1, + chain: PUSH_NS, + actionIds: [actionId(ADDR.target, '0xd09de08a')], + native: extra, + }; + } + + async readContract( + args: Parameters[0] + ): Promise { + const fn = args.functionName; + this.calls.push({ functionName: fn, blockNumber: args.blockNumber }); + if (this.failOn.has(fn)) throw new Error(`rpc failure: ${fn}`); + const a = (args.args ?? []) as readonly unknown[]; + const at = args.address.toLowerCase(); + const wallet = this.wallets.get(at); + switch (fn) { + case 'version': + return this.policyVersion; + // factory + case 'walletImplementation': + return ADDR.impl; + case 'walletCount': + return this.walletCounts.get(String(a[0]).toLowerCase()) ?? BigInt(0); + case 'predictWallet': { + const [owner, index] = a as [Address, bigint]; + const count = this.walletCounts.get(owner.toLowerCase()) ?? BigInt(0); + if (index > count) throw new Error('IndexOutOfRange'); + const addr = this.predictOverride + ? this.predictOverride(owner, index) + : deriveWallet({ + factory: ADDR.factory, + walletImplementation: ADDR.impl, + owner, + index, + }); + return [addr, index < count] as const; + } + case 'isWallet': + return this.wallets.has(String(a[0]).toLowerCase()); + case 'indexOf': + return this.wallets.get(String(a[0]).toLowerCase())?.index ?? BigInt(0); + // wallet + case 'factory': + if (!wallet) throw new Error('no factory()'); + return ADDR.factory; + case 'label': + if (!wallet) throw new Error('not a wallet'); + return wallet.label || `AGW ${wallet.index + BigInt(1)}`; + case 'owner': + if (!wallet) throw new Error('not a wallet'); + return wallet.owner; + case 'SESSION_ENGINE': + return ADDR.engine; + case 'RULES_POLICY': + return ADDR.policy; + case 'SESSION_VALIDATOR': + return ADDR.validator; + case 'UNIVERSAL_GATEWAY_PC': + return ADDR.gateway; + case 'accountId': + return wallet?.accountId ?? 'push.agw.1.0.0'; + case 'grantNonce': + return wallet?.grantNonce ?? BigInt(0); + case 'checkpointCount': + return wallet?.checkpointCount ?? BigInt(0); + case 'agentOf': { + const r = wallet?.rules.find((x) => x.rulesId === a[0]); + return r?.agent ?? '0x0000000000000000000000000000000000000000'; + } + // engine + case 'getPermissionIDs': + return (this.wallets.get(String(a[0]).toLowerCase())?.rules ?? []).map( + (r) => r.rulesId + ); + case 'isPermissionEnabled': { + const w = this.wallets.get(String(a[1]).toLowerCase()); + return !!w?.rules.some((r) => r.rulesId === a[0]); + } + case 'getEnabledActions': { + const w = this.wallets.get(String(a[0]).toLowerCase()); + return w?.rules.find((r) => r.rulesId === a[1])?.actionIds ?? []; + } + // policy + case 'getMode': { + const found = this.findConfig(a[0] as Hex, a[1] as Address); + if (!found) + return { + initialized: false, + mode: 0, + vm: 0, + chainHash: `0x${'00'.repeat(32)}`, + }; + return { + initialized: true, + mode: found.rule.mode, + vm: 0, + chainHash: keccak256(toBytes(found.rule.chain)), + }; + } + case 'getNativeConfig': { + const found = this.findConfig(a[0] as Hex, a[1] as Address); + const n = { + ...(found?.rule.native ?? {}), + ...(found + ? found.rule.nativeByAction?.[found.action.toLowerCase()] ?? {} + : {}), + }; + return { + initialized: !!found, + validUntil: 2_000_000_000, + target: ADDR.target, + selector: '0xd09de08a', + maxValuePerCall: BigInt(0), + maxValueTotal: (BigInt(1) << BigInt(256)) - BigInt(1), + valueSpent: BigInt(0), + amount: { + enabled: false, + offset: 0, + maxPerCall: BigInt(0), + maxTotal: BigInt(0), + }, + amountSpent: BigInt(0), + maxCalls: 0xffffffff, + callsUsed: 0, + pins: [], + ...n, + }; + } + case 'getConfig': { + const found = this.findConfig(a[0] as Hex, a[1] as Address); + const u = found?.rule.universal; + return { + initialized: !!found, + validUntil: 2_000_000_000, + expectedCEA: u?.expectedCEA ?? ADDR.other, + assets: (u?.assets ?? [{ token: ADDR.target }]).map((a) => ({ + maxPerCall: BigInt(1000), + maxTotal: BigInt(10000), + spent: BigInt(0), + ...a, + })), + maxGasPerCall: u?.maxGasPerCall ?? BigInt(0), + allowedCalls: [ + { + target: ADDR.target, + selector: '0xd09de08a', + beneficiaryOffset: 0, + hasBeneficiary: false, + pins: [], + maxValue: BigInt(0), + }, + ], + }; + } + case 'SOURCE_CHAIN_NAMESPACE': + return SEPOLIA_NS; + case 'SOURCE_TOKEN_ADDRESS': + return ( + this.sourceTokens.get(args.address.toLowerCase()) ?? args.address + ); + case 'gasTokenPRC20ByChainNamespace': + return getAddress('0x0000000000000000000000000000000000007070'); + case 'balanceOf': + case 'allowance': + return this.balances.get(`${fn}:${at}`) ?? BigInt(0); + default: + throw new Error(`FakeChain: unhandled ${fn}`); + } + } + + private findConfig(id: Hex, account: Address) { + const w = this.wallets.get(account.toLowerCase()); + if (!w) return undefined; + for (const rule of w.rules) { + for (const action of rule.actionIds) { + if (configId(w.address, rule.rulesId, action) === id) + return { rule, action }; + } + } + return undefined; + } + + async getBlockNumber(): Promise { + if (this.failOn.has('getBlockNumber')) + throw new Error('rpc failure: getBlockNumber'); + return this.block; + } + + async getCode(args: { address: Address }): Promise { + return this.wallets.has(args.address.toLowerCase()) ? '0x3d' : undefined; + } + + async getBalance(args: { address: Address }): Promise { + return this.balances.get(`pc:${args.address.toLowerCase()}`) ?? BigInt(0); + } + + async getLogs(args: Parameters[0]): Promise { + if (this.failOn.has('getLogs')) throw new Error('rpc failure: getLogs'); + return [...this.checkpointLogs, ...this.extraLogs].filter( + (l) => + l.address.toLowerCase() === args.address.toLowerCase() && + BigInt(l.blockNumber ?? BigInt(0)) >= args.fromBlock && + BigInt(l.blockNumber ?? BigInt(0)) <= args.toBlock + ); + } + + async getTransactionReceipt(args: { + hash: Hex; + }): Promise { + const r = this.receipts.get(args.hash); + if (!r) throw new Error(`no receipt ${args.hash}`); + return r; + } +} + +let logIndex = 0; +export function log( + address: Address, + event: AbiEvent, + indexed: Record, + data: Record, + blockNumber: bigint, + txHash: Hex = `0x${'ab'.repeat(32)}`, + transactionIndex = 0 +): Log { + const topics = encodeEventTopics({ + abi: [event], + eventName: event.name, + args: indexed, + } as never); + const nonIndexed = event.inputs.filter((i) => !('indexed' in i && i.indexed)); + return { + address, + topics: topics as [Hex, ...Hex[]], + data: encodeAbiParameters( + nonIndexed, + nonIndexed.map((i) => data[i.name as string]) as never + ), + blockNumber, + transactionHash: txHash, + transactionIndex, + logIndex: logIndex++, + blockHash: `0x${'cd'.repeat(32)}`, + removed: false, + } as Log; +} + +export function checkpointLog( + wallet: Address, + seq: number, + kind: number, + block: bigint, + txIndex = 0 +): Log { + return log( + wallet, + v6.events.checkpointed, + { seq: BigInt(seq) }, + { kind, ref: `0x${'11'.repeat(32)}`, blockNumber: block }, + block, + `0x${seq.toString(16).padStart(64, '0')}`, + txIndex + ); +} + +export function registerFakeGeneration( + network: PUSH_NETWORK = PUSH_NETWORK.TESTNET_DONUT +): AgenticGeneration { + resetAgenticGenerations(); + return registerAgenticGeneration({ + id: 'v6', + sourceCommit: 'ffd567d3e49b2d27c6f50ad36093274dbac3090f', + network, + advertised: false, + addresses: { + factory: ADDR.factory, + walletImplementation: ADDR.impl, + sessionEngine: ADDR.engine, + rulesPolicy: ADDR.policy, + sessionValidator: ADDR.validator, + gateway: ADDR.gateway, + }, + startBlock: BigInt(1), + accountId: 'push.agw.1.0.0', + }); +} + +export function ruleId(n: number): Hex { + return `0x${n.toString(16).padStart(64, '0')}`; +} diff --git a/packages/core/src/lib/agentic/__tests__/gas-budget.spec.ts b/packages/core/src/lib/agentic/__tests__/gas-budget.spec.ts new file mode 100644 index 00000000..a6985561 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/gas-budget.spec.ts @@ -0,0 +1,220 @@ +import { CHAIN, PUSH_NETWORK } from '../../constants/enums'; +import type { Orchestrator } from '../../orchestrator/orchestrator'; +import type { OrchestratorContext } from '../../orchestrator/internals/context'; +import { quoteGasPoolCost } from '../../orchestrator/internals/gas-pool-quote'; +import { agwGasBudget } from '../execution/gas-budget'; +import { createAgenticRuntime } from '../runtime'; +import { ADDR } from './fake-chain'; + +// One shared fn: requireActual re-enters this factory through circular imports. +const mockQuery = jest.fn(); +jest.mock('../../orchestrator/internals/gas-calculator', () => ({ + ...jest.requireActual('../../orchestrator/internals/gas-calculator'), + queryOutboundGasFee: (...args: unknown[]) => mockQuery(...args), +})); +const mockFinalize = jest.fn(); +jest.mock('../../orchestrator/internals/svm-rent', () => ({ + ...jest.requireActual('../../orchestrator/internals/svm-rent'), + ensureSvmFinalizeGasBudgetQuote: (...args: unknown[]) => + mockFinalize(...args), +})); +const PC = BigInt(10) ** BigInt(18); + +describe('AGW gas budget', () => { + it('excludes protocolFee, which the wallet attaches separately', () => { + expect( + agwGasBudget({ protocolFee: BigInt(3), nativeValueForGas: BigInt(13) }) + ).toBe(BigInt(10)); + }); + it('keeps the over-$10 share the sizer splits off for other routes', () => { + expect( + agwGasBudget({ + protocolFee: BigInt(0), + nativeValueForGas: BigInt(100) * PC, + sizing: { category: 'C', overflowNativePc: BigInt(806) * PC }, + }) + ).toBe(BigInt(906) * PC); + }); + it('never attaches less than the pool cost plus 20%, rounded up', () => { + // A Sepolia-UEA BNB first send: sized 23.00 PC, pool needs 23.65 PC. + const sized = BigInt('22998723343893328290'); + const pool = BigInt('23653617545786043528'); + expect( + agwGasBudget({ protocolFee: BigInt(0), nativeValueForGas: sized }, pool) + ).toBe((pool * BigInt(12) + BigInt(9)) / BigInt(10)); + // The $1 floor still wins when the pool is cheap (the observed case). + expect( + agwGasBudget( + { protocolFee: BigInt(0), nativeValueForGas: BigInt(10) * PC }, + BigInt('2069650875064483730') + ) + ).toBe(BigInt(10) * PC); + }); +}); + +describe('pool cost quote', () => { + const ctx = (reads: Record) => + ({ + pushNetwork: PUSH_NETWORK.TESTNET_DONUT, + printTraces: false, + pushClient: { + readContract: jest.fn( + async ({ functionName }: { functionName: string }) => { + const value = reads[functionName]; + if (value instanceof Error) throw value; + return value; + } + ), + }, + } as unknown as OrchestratorContext); + it('returns the exact-output WPC amount for the gas fee', async () => { + const c = ctx({ + WPC: ADDR.other, + defaultFeeTier: 500, + quoteExactOutputSingle: [BigInt(7), BigInt(0), 0, BigInt(0)], + }); + await expect( + quoteGasPoolCost(c, ADDR.target, ADDR.agent, BigInt(5)) + ).resolves.toBe(BigInt(7)); + expect( + (c.pushClient.readContract as jest.Mock).mock.calls[2][0].args[0] + ).toEqual({ + tokenIn: ADDR.other, + tokenOut: ADDR.agent, + amount: BigInt(5), + fee: 500, + sqrtPriceLimitX96: BigInt(0), + }); + }); + it('is unknown without a fee tier, a fee or a working quoter', async () => { + await expect( + quoteGasPoolCost( + ctx({ WPC: ADDR.other, defaultFeeTier: 0 }), + ADDR.target, + ADDR.agent, + BigInt(5) + ) + ).resolves.toBeUndefined(); + await expect( + quoteGasPoolCost(ctx({}), ADDR.target, ADDR.agent, BigInt(0)) + ).resolves.toBeUndefined(); + await expect( + quoteGasPoolCost( + ctx({ + WPC: ADDR.other, + defaultFeeTier: 500, + quoteExactOutputSingle: new Error('no pool'), + }), + ADDR.target, + ADDR.agent, + BigInt(5) + ) + ).resolves.toBeUndefined(); + }); +}); + +describe('AGW runtime quotes', () => { + const quote = (gasFee: bigint) => ({ + gasToken: ADDR.agent, + gasFee, + protocolFee: BigInt(2), + nativeValueForGas: BigInt(12), + gasPrice: BigInt(1), + gasLimitUsed: BigInt(500000), + universalCoreAddress: ADDR.target, + sizing: { category: 'A', overflowNativePc: BigInt(0) }, + }); + const runtime = () => { + const readContract = jest.fn( + async ({ functionName }: { functionName: string }) => + functionName === 'WPC' + ? ADDR.other + : functionName === 'defaultFeeTier' + ? 500 + : functionName === 'baseGasLimitByChainNamespace' + ? BigInt(500000) + : [BigInt(50), BigInt(0), 0, BigInt(0)] + ); + return createAgenticRuntime( + { + getNetwork: () => PUSH_NETWORK.TESTNET_DONUT, + getRpcUrls: () => ({}), + pushNetwork: PUSH_NETWORK.TESTNET_DONUT, + pushClient: { readContract }, + } as unknown as Orchestrator, + true + ); + }; + const svm = { wallet: ADDR.owner, burnAmount: BigInt(1) }; + beforeEach(() => { + mockQuery.mockReset(); + mockFinalize.mockReset(); + }); + + it('return the pool-safe budget and keep protocolFee separate', async () => { + mockQuery.mockResolvedValue(quote(BigInt(5))); + await expect( + runtime().quoteOutbound(ADDR.agent, BigInt(0), CHAIN.ETHEREUM_SEPOLIA) + ).resolves.toEqual({ + protocolFee: BigInt(2), + nativeValueForGas: BigInt(60), + gasLimitUsed: BigInt(500000), + gasFee: BigInt(5), + poolPcIn: BigInt(50), + }); + expect(mockQuery).toHaveBeenCalledWith( + expect.anything(), + ADDR.agent, + BigInt(0), + CHAIN.ETHEREUM_SEPOLIA + ); + }); + it('refuse an explicit gasLimit below the chain base before quoting', async () => { + await expect( + runtime().quoteOutbound( + ADDR.agent, + BigInt(100000), + CHAIN.ETHEREUM_SEPOLIA + ) + ).rejects.toMatchObject({ + code: 'INVALID_RULE', + details: { field: 'gasLimit', minimum: BigInt(500000) }, + }); + expect(mockQuery).not.toHaveBeenCalled(); + mockQuery.mockResolvedValue(quote(BigInt(5))); + await expect( + runtime().quoteOutbound( + ADDR.agent, + BigInt(500000), + CHAIN.ETHEREUM_SEPOLIA + ) + ).resolves.toMatchObject({ gasFee: BigInt(5) }); + }); + it('re-quote a Solana budget left short by a gas-price change', async () => { + mockQuery.mockResolvedValue(quote(BigInt(1))); + mockFinalize + .mockImplementationOnce(async ({ onMinimum }) => { + onMinimum(BigInt(10)); + return quote(BigInt(9)); + }) + .mockImplementationOnce(async ({ onMinimum, quote: q }) => { + onMinimum(BigInt(10)); + expect(q.gasFee).toBe(BigInt(9)); + return quote(BigInt(10)); + }); + await expect( + runtime().quoteOutbound(ADDR.agent, BigInt(0), CHAIN.SOLANA_DEVNET, svm) + ).resolves.toMatchObject({ gasFee: BigInt(10) }); + expect(mockFinalize).toHaveBeenCalledTimes(2); + }); + it('refuse a Solana budget that stays short after re-quoting', async () => { + mockQuery.mockResolvedValue(quote(BigInt(1))); + mockFinalize.mockImplementation(async ({ onMinimum }) => { + onMinimum(BigInt(10)); + return quote(BigInt(9)); + }); + await expect( + runtime().quoteOutbound(ADDR.agent, BigInt(0), CHAIN.SOLANA_DEVNET, svm) + ).rejects.toMatchObject({ code: 'INCONSISTENT_READ' }); + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/labels.spec.ts b/packages/core/src/lib/agentic/__tests__/labels.spec.ts new file mode 100644 index 00000000..c4f88cba --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/labels.spec.ts @@ -0,0 +1,116 @@ +import { decodeFunctionData, encodeErrorResult } from 'viem'; +import { PUSH_NETWORK } from '../../constants/enums'; +import { PROGRESS_HOOK } from '../../progress-hook/progress-hook.types'; +import { v6 } from '../contracts/v6'; +import { currentGeneration, resetAgenticGenerations } from '../deployments'; +import { AGENTIC_ERROR_CODE } from '../errors'; +import { createWallet } from '../management/create'; +import { assertLabel } from '../management/label'; +import { setLabel } from '../management/rules-write'; +import { decodeAgwErrorData } from '../revert'; +import { AgenticWalletHandle } from '../wallet'; +import { ADDR, FakeChain, registerFakeGeneration } from './fake-chain'; +import { mockRuntime } from './mock-runtime'; + +beforeEach(() => { + registerFakeGeneration(); +}); +afterEach(resetAgenticGenerations); +const gen = () => currentGeneration(PUSH_NETWORK.TESTNET_DONUT); + +describe('v5 wallet labels', () => { + it('allows empty, 64 ASCII bytes and sixteen four-byte emoji without altering the label', () => { + for (const label of ['', 'a'.repeat(64), '🙂'.repeat(16), ' label ']) { + expect(() => assertLabel(label)).not.toThrow(); + } + }); + + it('refuses non-strings and overlong UTF-8 labels before a create reads or signs', async () => { + const chain = new FakeChain(); + const rt = mockRuntime(chain, { signer: ADDR.owner }); + for (const label of [null, 123, 'a'.repeat(65), '🙂'.repeat(17)]) { + await expect( + createWallet(rt, label as never, { rules: [] }) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.INVALID_RULE }); + } + expect(rt.executeMock).not.toHaveBeenCalled(); + expect(chain.calls).toEqual([]); + }); + + it('encodes a direct reset and forwards the per-call progress hook', async () => { + const chain = new FakeChain(); + const w = chain.addWallet(ADDR.owner, 'custom'); + const rt = mockRuntime(chain, { signer: ADDR.owner }); + const hook = jest.fn(); + const tx = await new AgenticWalletHandle(rt, w.address).setLabel('', { + progressHook: hook, + }); + const sent = rt.executeMock.mock.calls[0][0]; + expect(sent).toMatchObject({ to: w.address, value: BigInt(0) }); + expect( + decodeFunctionData({ abi: v6.abis.wallet, data: sent.data }) + ).toMatchObject({ functionName: 'setLabel', args: [''] }); + expect(hook).toHaveBeenCalledWith( + expect.objectContaining({ id: PROGRESS_HOOK.AGENTIC_TX_106 }) + ); + expect(hook).toHaveBeenCalledWith( + expect.objectContaining({ id: PROGRESS_HOOK.AGENTIC_TX_199_01 }) + ); + expect(tx.hash).toBeTruthy(); + }); + + it('refuses non-owner and read-only renames before signing', async () => { + const chain = new FakeChain(); + const w = chain.addWallet(ADDR.owner, 'x'); + const stranger = mockRuntime(chain, { signer: ADDR.agent }); + await expect( + setLabel(stranger, gen(), w.address, 'y') + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.NOT_WALLET_OWNER }); + const readOnly = mockRuntime(chain, { signer: ADDR.owner, readOnly: true }); + await expect( + setLabel(readOnly, gen(), w.address, 'y') + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.READ_ONLY }); + expect(stranger.executeMock).not.toHaveBeenCalled(); + expect(readOnly.executeMock).not.toHaveBeenCalled(); + }); + + it('uses a direct label call for an external owner identity', async () => { + const chain = new FakeChain(); + const w = chain.addWallet(ADDR.owner, 'x'); + const rt = mockRuntime(chain, { + signer: ADDR.owner, + signerIsPushNative: () => false, + }); + await setLabel(rt, gen(), w.address, 'UEA label'); + expect( + decodeFunctionData({ + abi: v6.abis.wallet, + data: rt.executeMock.mock.calls[0][0].data, + }).functionName + ).toBe('setLabel'); + }); + + it('maps the new contract length error and emits a failed operation hook', async () => { + const chain = new FakeChain(); + const w = chain.addWallet(ADDR.owner, 'x'); + const data = encodeErrorResult({ + abi: v6.abis.wallet, + errorName: 'LabelTooLong', + args: [BigInt(65)], + }); + expect(decodeAgwErrorData(data)).toMatchObject({ + name: 'LabelTooLong', + decoded: '["65"]', + }); + const rt = mockRuntime(chain, { + signer: ADDR.owner, + execute: async () => { + throw new Error(`reverted ${data}`); + }, + }); + await expect(setLabel(rt, gen(), w.address, 'valid')).rejects.toMatchObject( + { decodedError: { name: 'LabelTooLong' } } + ); + expect(rt.events.at(-1)?.id).toBe(PROGRESS_HOOK.AGENTIC_TX_199_02); + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/management.spec.ts b/packages/core/src/lib/agentic/__tests__/management.spec.ts new file mode 100644 index 00000000..5982d691 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/management.spec.ts @@ -0,0 +1,597 @@ +import { + decodeFunctionData, + encodeErrorResult, + type Hex, + type Log, + type TransactionReceipt, +} from 'viem'; +import { PUSH_NETWORK } from '../../constants/enums'; +import { PushChainBatchExecutionError } from '../../orchestrator/internals/errors'; +import type { MultiCall } from '../../orchestrator/orchestrator.types'; +import { PROGRESS_HOOK } from '../../progress-hook/progress-hook.types'; +import { currentGeneration, resetAgenticGenerations } from '../deployments'; +import { + AGW_ABI, + AGW_FACTORY_ABI, + UNIVERSAL_RULES_POLICY_ABI, +} from '../contracts/abi/v6'; +import { v6 } from '../contracts/v6'; +import { deriveWallet, rulesId as computeRulesId } from '../codec/ids'; +import { AGENTIC_ERROR_CODE } from '../errors'; +import { createWallet } from '../management/create'; +import { addRules, revokeRules, updateRules } from '../management/rules-write'; +import type { NativeRule } from '../agentic.types'; +import { + ADDR, + FakeChain, + PUSH_NS, + log, + registerFakeGeneration, + ruleId, +} from './fake-chain'; +import { fakeResponse, mockRuntime } from './mock-runtime'; + +const NOW = 1_700_000_000; +const rule = (agent = ADDR.agent): NativeRule => ({ + agent, + target: ADDR.target, + selector: 'increment()', + validUntil: NOW + 100, +}); +const granted = (wallet: `0x${string}`, id: Hex, block = BigInt(101)) => + log( + wallet, + v6.events.rulesGranted, + { rulesId: id, chainHash: `0x${'00'.repeat(32)}` }, + { mode: 1, chainNamespace: PUSH_NS }, + block + ); +const revoked = (wallet: `0x${string}`, id: Hex) => + log(wallet, v6.events.rulesRevoked, { rulesId: id }, {}, BigInt(101)); + +function withLogs(logs: Log[], over = {}) { + const r = fakeResponse(over); + const base = r.wait; + r.wait = async () => ({ ...(await base()), logs }); + return r; +} + +beforeEach(() => registerFakeGeneration()); +afterEach(() => resetAgenticGenerations()); + +describe('agentic.create', () => { + const nextWallet = deriveWallet({ + factory: ADDR.factory, + walletImplementation: ADDR.impl, + owner: ADDR.owner, + index: 0, + }); + const ids = [ruleId(0), ruleId(1)].map((_, i) => + computeRulesId({ + validator: ADDR.validator, + agent: i === 0 ? ADDR.agent : ADDR.other, + grantNonce: BigInt(i), + }) + ); + + it('validates first, then sends deploy + grants in input order and returns receipt IDs', async () => { + const fake = new FakeChain(); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + execute: (async () => + withLogs([ + log( + ADDR.factory, + v6.events.walletDeployed, + { owner: ADDR.owner, index: BigInt(0), wallet: nextWallet }, + { label: 'ops' }, + BigInt(101) + ), + granted(nextWallet, ids[0]), + granted(nextWallet, ids[1]), + ])) as never, + }); + const execute = jest.spyOn(rt, 'execute'); + const perCall = jest.fn(); + const res = await createWallet(rt, 'ops', { + rules: [rule(), rule(ADDR.other)], + progressHook: perCall, + }); + expect(res).toMatchObject({ wallet: nextWallet, index: 0, rulesIds: ids }); + const sent = execute.mock.calls[0][0] as { to: string; data: Hex }; + expect(sent.to).toBe(ADDR.factory); + const decoded = decodeFunctionData({ + abi: AGW_FACTORY_ABI, + data: sent.data, + }); + expect(decoded.functionName).toBe('createWalletWithSig'); + expect(decoded.args[3]).toHaveLength(2); + expect(rt.events.map((e) => e.id)).toEqual([ + PROGRESS_HOOK.AGENTIC_TX_101, + PROGRESS_HOOK.AGENTIC_TX_102, + PROGRESS_HOOK.AGENTIC_TX_104, + PROGRESS_HOOK.AGENTIC_TX_199_01, + ]); + expect(rt.events.find((e) => e.id === 'AGENTIC-TX-103')).toBeUndefined(); + expect(perCall).toHaveBeenCalledTimes(4); + }); + + it('a bare wallet is one deployWallet call, no funding', async () => { + const fake = new FakeChain(); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + execute: (async (p: { to: string; data: Hex; value: bigint }) => { + expect(p.to).toBe(ADDR.factory); + expect(p.value).toBe(BigInt(0)); + return withLogs([ + log( + ADDR.factory, + v6.events.walletDeployed, + { owner: ADDR.owner, index: BigInt(0), wallet: nextWallet }, + { label: '' }, + BigInt(101) + ), + ]); + }) as never, + }); + expect((await createWallet(rt, '', { rules: [] })).rulesIds).toEqual([]); + }); + + it('invalid input never reaches the signer', async () => { + const fake = new FakeChain(); + const rt = mockRuntime(fake, { signer: ADDR.owner }); + await expect( + createWallet(rt, 'x', { rules: [rule(ADDR.owner)] }) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.AGENT_IS_OWNER }); + await expect( + createWallet(rt, 'x', undefined as never) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.INVALID_RULE }); + await expect( + createWallet( + mockRuntime(fake, { signer: ADDR.owner, readOnly: true }), + 'x', + { rules: [] } + ) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.READ_ONLY, + }); + expect(rt.executeMock).not.toHaveBeenCalled(); + }); + it('refuses a changed URP version before grant signing', async () => { + const fake = new FakeChain(); + fake.policyVersion = '3.2.0'; + const rt = mockRuntime(fake, { signer: ADDR.owner }); + await expect( + createWallet(rt, 'version', { rules: [rule()] }) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE, + }); + expect(rt.executeMock).not.toHaveBeenCalled(); + }); + + it('a different wallet in the receipt is RECEIPT_MISMATCH, not a safe-to-retry race', async () => { + const fake = new FakeChain(); + const elsewhere = deriveWallet({ + factory: ADDR.factory, + walletImplementation: ADDR.impl, + owner: ADDR.owner, + index: 1, + }); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + execute: (async () => + withLogs([ + log( + ADDR.factory, + v6.events.walletDeployed, + { owner: ADDR.owner, index: BigInt(1), wallet: elsewhere }, + { label: '' }, + BigInt(101) + ), + ])) as never, + }); + await expect(createWallet(rt, '', { rules: [] })).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.RECEIPT_MISMATCH, + }); + }); + + it('IDs that differ from the input order are a RECEIPT_MISMATCH, not a silent reorder', async () => { + const fake = new FakeChain(); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + execute: (async () => + withLogs([ + log( + ADDR.factory, + v6.events.walletDeployed, + { owner: ADDR.owner, index: BigInt(0), wallet: nextWallet }, + { label: '' }, + BigInt(101) + ), + granted(nextWallet, ids[1]), + granted(nextWallet, ids[0]), + ])) as never, + }); + await expect( + createWallet(rt, '', { rules: [rule(), rule(ADDR.other)] }) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.RECEIPT_MISMATCH, + }); + }); + + const receipt = (logs: Log[], status: 'success' | 'reverted' = 'success') => + ({ status, logs } as unknown as TransactionReceipt); + + it('creation never uses the batch transport or a sequential fallback', async () => { + const fake = new FakeChain(); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + execute: async () => { + throw new Error('simulation refused'); + }, + }); + await expect( + createWallet(rt, 'atomic', { rules: [rule()] }) + ).rejects.toThrow('simulation refused'); + expect(rt.atomicMock).not.toHaveBeenCalled(); + }); + + it('a receipt that cannot be read after submission keeps the hash and reports unknown state', async () => { + const fake = new FakeChain(); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + execute: (async () => { + const r = fakeResponse({ hash: `0x${'44'.repeat(32)}` }); + r.wait = async () => { + throw new Error('rpc down'); + }; + return r; + }) as never, + }); + const err = await createWallet(rt, 'x', { rules: [] }).catch((e) => e); + expect(err.code).toBe(AGENTIC_ERROR_CODE.RECEIPT_UNAVAILABLE); + expect(err.details).toMatchObject({ + txHash: `0x${'44'.repeat(32)}`, + }); + }); + + it('the deploy is index-bound: a raced slot reverts and is reported as INDEX_RACE with nothing committed', async () => { + const fake = new FakeChain(); + const raceData = encodeErrorResult({ + abi: AGW_FACTORY_ABI, + errorName: 'IndexMismatch', + args: [BigInt(1), BigInt(0)], + }); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + execute: (async (p: { data: Hex }) => { + const deploy = decodeFunctionData({ + abi: AGW_FACTORY_ABI, + data: p.data, + }); + expect(deploy.functionName).toBe('createWalletWithSig'); + expect( + (deploy.args[0] as { index: bigint; wallet: string }).index + ).toBe(BigInt(0)); + expect((deploy.args[0] as { wallet: string }).wallet).toBe(nextWallet); + throw new Error( + `Execution reverted with reason: custom error ${raceData.slice( + 0, + 10 + )}: ${raceData.slice(10)}.` + ); + }) as never, + }); + const err = await createWallet(rt, 'x', { rules: [rule()] }).catch( + (e) => e + ); + expect(err.code).toBe(AGENTIC_ERROR_CODE.INDEX_RACE); + expect(err.details).toMatchObject({ walletDeployed: false }); + }); + + it('a later rename alone does not establish a competing creation', async () => { + const fake = new FakeChain(); + const failure = new Error('opaque sender failure'); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + execute: (async () => { + const w = fake.addWallet(ADDR.owner, 'this-create'); + w.label = 'renamed-after-deploy'; + throw failure; + }) as never, + }); + await expect( + createWallet(rt, 'this-create', { rules: [rule()] }) + ).rejects.toBe(failure); + }); + + it('a slot that is already deployed is refused before signing', async () => { + const fake = new FakeChain(); + fake.predictOverride = (owner, index) => + deriveWallet({ + factory: ADDR.factory, + walletImplementation: ADDR.impl, + owner, + index, + }); + const w = fake.addWallet(ADDR.owner, 'a'); + fake.walletCounts.set(ADDR.owner.toLowerCase(), BigInt(0)); // stale count pointing at a deployed slot + void w; + const rt = mockRuntime(fake, { signer: ADDR.owner }); + await expect(createWallet(rt, '', { rules: [] })).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.INDEX_RACE, + }); + expect(rt.executeMock).not.toHaveBeenCalled(); + }); +}); + +describe('rules.add / rules.delete', () => { + const gen = () => currentGeneration(PUSH_NETWORK.TESTNET_DONUT); + + it('add: owner-only, duplicate agent/chain refused before signing', async () => { + const fake = new FakeChain(); + const w = fake.addWallet(ADDR.owner, 'w', [ + fake.nativeRule(ADDR.agent, ruleId(1)), + ]); + w.grantNonce = BigInt(4); + const expected = computeRulesId({ + validator: ADDR.validator, + agent: ADDR.agent, + grantNonce: BigInt(4), + }); + const stranger = mockRuntime(fake, { signer: ADDR.other }); + await expect( + addRules(stranger, gen(), w.address, [rule(ADDR.other)]) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.NOT_WALLET_OWNER, + }); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + execute: (async () => withLogs([granted(w.address, expected)])) as never, + }); + await expect( + addRules(rt, gen(), w.address, [rule(ADDR.agent)]) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.DUPLICATE_RULE }); + expect(rt.executeMock).not.toHaveBeenCalled(); + }); + + it('add: several rules are one atomic owner execute batch (one signature on any signer)', async () => { + const fake = new FakeChain(); + const w = fake.addWallet(ADDR.owner, 'w'); + const ids = [ADDR.agent, ADDR.other].map((agent, i) => + computeRulesId({ + validator: ADDR.validator, + agent, + grantNonce: BigInt(i), + }) + ); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + execute: (async () => + withLogs([ + granted(w.address, ids[0]), + granted(w.address, ids[1]), + ])) as never, + }); + const exec = jest.spyOn(rt, 'execute'); + expect( + (await addRules(rt, gen(), w.address, [rule(), rule(ADDR.other)])) + .rulesIds + ).toEqual(ids); + const sent = exec.mock.calls[0][0] as { to: string; data: Hex }; + expect(Array.isArray(sent.data)).toBe(false); + const outer = v6.decodeWalletCall(sent.data) as { + kind: string; + calls: { target: string; data: Hex }[]; + }; + expect(outer.kind).toBe('execute'); + expect( + outer.calls.map( + (c) => decodeFunctionData({ abi: AGW_ABI, data: c.data }).functionName + ) + ).toEqual(['grantRules', 'grantRules']); + }); + + it('revoke: bare and empty are refused; unknown IDs fail before signing; several IDs are one atomic owner execute', async () => { + const fake = new FakeChain(); + const w = fake.addWallet(ADDR.owner, 'w', [ + fake.nativeRule(ADDR.agent, ruleId(1)), + fake.nativeRule(ADDR.other, ruleId(2)), + ]); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + execute: (async () => + withLogs([ + revoked(w.address, ruleId(1)), + revoked(w.address, ruleId(2)), + ])) as never, + }); + const exec = jest.spyOn(rt, 'execute'); + for (const bad of [undefined, [], {}, { all: false }]) { + await expect( + revokeRules(rt, gen(), w.address, bad as never) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.DELETE_NEEDS_TARGET, + }); + } + await expect( + revokeRules(rt, gen(), w.address, [ruleId(9)]) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.RULE_NOT_FOUND }); + expect(exec).not.toHaveBeenCalled(); + await revokeRules(rt, gen(), w.address, [ruleId(1), ruleId(2)]); + const sent = exec.mock.calls[0][0] as { to: string; data: Hex }; + expect(sent.to).toBe(w.address); + const decoded = v6.decodeWalletCall(sent.data) as { + kind: string; + calls: { target: string; data: Hex }[]; + }; + expect(decoded.kind).toBe('execute'); + expect( + decoded.calls.map( + (c) => decodeFunctionData({ abi: AGW_ABI, data: c.data }).functionName + ) + ).toEqual(['revokeRules', 'revokeRules']); + await revokeRules(rt, gen(), w.address, { all: true }); + expect( + decodeFunctionData({ + abi: AGW_ABI, + data: (exec.mock.calls[1][0] as { data: Hex }).data, + }).functionName + ).toBe('revokeAllRules'); + }); +}); + +describe('rules.update — one owner batch: assert → revoke → grant', () => { + const gen = () => currentGeneration(PUSH_NETWORK.TESTNET_DONUT); + + it('builds exactly one execute(batch) with the observed spend asserted per pair', async () => { + const fake = new FakeChain(); + const w = fake.addWallet(ADDR.owner, 'w', [ + fake.nativeRule(ADDR.agent, ruleId(1), { + valueSpent: BigInt(3), + amountSpent: BigInt(4), + callsUsed: 5, + }), + ]); + w.grantNonce = BigInt(2); + const newId = computeRulesId({ + validator: ADDR.validator, + agent: ADDR.agent, + grantNonce: BigInt(2), + }); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + execute: (async () => + withLogs([ + revoked(w.address, ruleId(1)), + granted(w.address, newId), + ])) as never, + }); + const exec = jest.spyOn(rt, 'execute'); + const res = await updateRules(rt, gen(), w.address, { + rules: [{ rulesId: ruleId(1), rule: rule() }], + }); + expect(res.rules).toEqual([{ rulesId: newId, replaced: ruleId(1) }]); + expect(exec).toHaveBeenCalledTimes(1); + const sent = exec.mock.calls[0][0] as { to: string; data: Hex }; + expect(Array.isArray(sent.data)).toBe(false); // never a sequential multi-tx batch + const outer = v6.decodeWalletCall(sent.data) as { + kind: string; + mode: Hex; + calls: { target: string; data: Hex }[]; + }; + expect(outer.kind).toBe('execute'); + expect(outer.calls.map((c) => c.target)).toEqual([ + ADDR.policy, + w.address, + w.address, + ]); + const assertion = decodeFunctionData({ + abi: UNIVERSAL_RULES_POLICY_ABI, + data: outer.calls[0].data, + }); + expect(assertion.functionName).toBe('assertSpent'); + expect(assertion.args.slice(1)).toEqual([ + w.address, + BigInt(3), + BigInt(4), + 5, + ]); + expect( + outer.calls + .slice(1) + .map( + (c) => decodeFunctionData({ abi: AGW_ABI, data: c.data }).functionName + ) + ).toEqual(['revokeRules', 'grantRules']); + }); + + it('universal replacement asserts every asset in stored order before revoke/grant', async () => { + const fake = new FakeChain(); + const w = fake.addWallet(ADDR.owner, 'w', [ + { + ...fake.nativeRule(ADDR.agent, ruleId(1)), + mode: 0, + chain: 'eip155:11155111', + universal: { + expectedCEA: ADDR.other, + maxGasPerCall: BigInt(10), + assets: [ + { token: ADDR.target, spent: BigInt(4) }, + { token: ADDR.other, spent: BigInt(7) }, + ], + }, + }, + ]); + const next = computeRulesId({ + validator: ADDR.validator, + agent: ADDR.agent, + grantNonce: BigInt(1), + }); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + execute: (async () => + withLogs([ + revoked(w.address, ruleId(1)), + granted(w.address, next), + ])) as never, + }); + const exec = jest.spyOn(rt, 'execute'); + await updateRules(rt, gen(), w.address, { + rules: [{ rulesId: ruleId(1), rule: rule() }], + }); + const data = (exec.mock.calls[0][0] as { data: Hex }).data; + const outer = v6.decodeWalletCall(data) as { calls: { data: Hex }[] }; + const assertion = decodeFunctionData({ + abi: UNIVERSAL_RULES_POLICY_ABI, + data: outer.calls[0].data, + }); + expect(assertion.args.slice(1)).toEqual([ + w.address, + [BigInt(4), BigInt(7)], + ]); + expect( + outer.calls + .slice(1) + .map( + (c) => decodeFunctionData({ abi: AGW_ABI, data: c.data }).functionName + ) + ).toEqual(['revokeRules', 'grantRules']); + }); + + it('replacement may name another live agent, but may not repeat an old ID', async () => { + const fake = new FakeChain(); + const w = fake.addWallet(ADDR.owner, 'w', [ + fake.nativeRule(ADDR.agent, ruleId(1)), + fake.nativeRule(ADDR.other, ruleId(2)), + ]); + const next = computeRulesId({ + validator: ADDR.validator, + agent: ADDR.other, + grantNonce: BigInt(2), + }); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + execute: (async () => + withLogs([ + revoked(w.address, ruleId(1)), + granted(w.address, next), + ])) as never, + }); + expect( + ( + await updateRules(rt, gen(), w.address, { + rules: [{ rulesId: ruleId(1), rule: rule(ADDR.other) }], + }) + ).rules[0].rulesId + ).toBe(next); + await expect( + updateRules(rt, gen(), w.address, { + rules: [ + { rulesId: ruleId(1), rule: rule() }, + { rulesId: ruleId(1), rule: rule() }, + ], + }) + ).rejects.toThrow(/same old rule twice/); + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/mock-runtime.ts b/packages/core/src/lib/agentic/__tests__/mock-runtime.ts new file mode 100644 index 00000000..63dec705 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/mock-runtime.ts @@ -0,0 +1,102 @@ +import type { Address, Hex } from 'viem'; +import { CHAIN, PUSH_NETWORK } from '../../constants/enums'; +import type { UniversalTxResponse } from '../../orchestrator/orchestrator.types'; +import type { ProgressEvent } from '../../progress-hook/progress-hook.types'; +import type { AgenticRuntime } from '../runtime'; +import { ADDR, FakeChain, PUSH_NS } from './fake-chain'; + +export interface MockRuntime extends AgenticRuntime { + executeMock: jest.Mock; + atomicMock: jest.Mock; + events: ProgressEvent[]; + perCallEvents: ProgressEvent[]; + fake: FakeChain; +} + +/** A response shaped like core's R1 response for a call to `to`. */ +export function fakeResponse(over: Partial = {}): UniversalTxResponse { + const resp = { + hash: `0x${'aa'.repeat(32)}`, + origin: `eip155:42101:${ADDR.agent}`, + blockNumber: BigInt(101), + blockHash: '0x', + transactionIndex: 0, + chainId: '42101', + from: ADDR.agent, + to: ADDR.target, + nonce: 1, + data: '0x', + value: BigInt(0), + gasLimit: BigInt(21000), + accessList: [], + wait: async () => ({ + hash: resp.hash, + blockNumber: BigInt(101), + blockHash: '0x', + transactionIndex: 0, + from: resp.from, + to: resp.to, + contractAddress: null, + gasPrice: BigInt(0), + gasUsed: BigInt(0), + cumulativeGasUsed: BigInt(0), + logs: [], + logsBloom: '0x', + status: 1 as const, + raw: { from: resp.from, to: resp.to }, + }), + progressHook: () => undefined, + type: '2', + typeVerbose: 'eip1559', + atomic: true, + signature: { r: '0x', s: '0x', v: 0 }, + ...over, + } as unknown as UniversalTxResponse; + return resp; +} + +export function mockRuntime( + fake: FakeChain, + over: Partial & { signer?: Address; readOnly?: boolean } = {} +): MockRuntime { + const events: ProgressEvent[] = []; + const perCallEvents: ProgressEvent[] = []; + const executeMock = jest.fn(async (params: { to: string; data?: Hex }) => + fakeResponse({ to: params.to, data: (params.data as string) ?? '0x' }) + ); + const atomicMock = jest.fn(async (params: { to: string }) => fakeResponse({ to: params.to })); + const signer = over.signer ?? ADDR.agent; + const rt: MockRuntime = { + network: PUSH_NETWORK.TESTNET_DONUT, + pushChainNamespace: PUSH_NS, + reader: fake, + isReadOnly: over.readOnly ?? false, + signerPushAccount: () => signer, + signerOrigin: () => ({ chain: CHAIN.PUSH_TESTNET_DONUT, address: signer }), + signerIsPushNative: () => true, + execute: executeMock as unknown as AgenticRuntime['execute'], + executeAtomicBatch: atomicMock as unknown as AgenticRuntime['executeAtomicBatch'], + emit: (event, perCall) => { + events.push(event); + if (perCall) { + perCallEvents.push(event); + perCall(event); + } + }, + signerAccountDeployed: async () => true, + signerBalance: async () => BigInt(10) ** BigInt(20), + getGasPrice: async () => BigInt(1), + quoteOutbound: async () => ({ protocolFee: BigInt(100), nativeValueForGas: BigInt(1000), gasLimitUsed: BigInt(200_000) }), + resolveCEA: async () => ({ cea: '0x000000000000000000000000000000000000CeA1' as Address, isDeployed: true }), + resolvePrc20: () => '0x0000000000000000000000000000000000007070' as Address, + nowSeconds: () => 1_700_000_000, + ...over, + executeMock, + atomicMock, + events, + perCallEvents, + fake, + }; + if (over.execute) rt.execute = over.execute; + return rt; +} diff --git a/packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts b/packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts new file mode 100644 index 00000000..2ac5e249 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts @@ -0,0 +1,119 @@ +import { encodeAbiParameters, type Hex } from 'viem'; +import { CHAIN, PUSH_NETWORK } from '../../constants/enums'; +import { PUSH_BATCH_EXECUTOR_ADDRESS } from '../../constants/chain'; +import { convertExecutorToOrigin } from '../../universal/account/account'; +import { adaptTrackedResponse } from '../response'; +import { v6, UEA_MULTICALL_PREFIX } from '../contracts/v6'; +import { resetAgenticGenerations } from '../deployments'; +import { ADDR, FakeChain, registerFakeGeneration, ruleId } from './fake-chain'; +import { fakeResponse, mockRuntime } from './mock-runtime'; + +jest.mock('../../universal/account/account', () => ({ + convertExecutorToOrigin: jest.fn(), +})); +afterEach(() => { + resetAgenticGenerations(); + jest.clearAllMocks(); +}); + +function fixture() { + registerFakeGeneration(); + const fake = new FakeChain(); + const wallet = fake.addWallet(ADDR.owner, 'batch'); + const actions = [ + { target: ADDR.target, value: BigInt(0), data: '0xd09de08a' as Hex }, + { target: ADDR.target, value: BigInt(2), data: '0xd09de08a' as Hex }, + ]; + const outer = actions.map((c) => ({ + target: wallet.address, + value: BigInt(0), + data: v6.encodeExecuteAsAgent(ruleId(1), c), + })); + const runtime = mockRuntime(fake); + return { fake, wallet, actions, outer, runtime }; +} + +it('recognizes a verified 7702 self-call and retains every native agent action', async () => { + const { fake, wallet, actions, outer, runtime } = fixture(); + const getCode = fake.getCode.bind(fake); + fake.getCode = async (p) => + p.address === ADDR.agent + ? (`0xef0100${PUSH_BATCH_EXECUTOR_ADDRESS[ + CHAIN.PUSH_TESTNET_DONUT + ]!.slice(2)}` as Hex) + : getCode(p); + const result = await adaptTrackedResponse( + runtime, + fakeResponse({ + from: ADDR.agent, + to: ADDR.agent, + data: v6.encodeExecute(outer), + }) + ); + expect(result).toMatchObject({ + from: wallet.address, + to: actions[0].target, + agentic: { + door: 'agent', + rulesId: ruleId(1), + rawTo: ADDR.agent, + nativeCalls: actions.map((c) => ({ + to: c.target, + value: c.value, + data: c.data, + })), + }, + }); +}); + +it('recognizes a verified UEA multicall carrying single agent-door entries', async () => { + const { wallet, actions, outer, runtime } = fixture(); + (convertExecutorToOrigin as jest.Mock).mockResolvedValue({ + exists: true, + account: { chain: CHAIN.ETHEREUM_SEPOLIA, address: ADDR.owner }, + }); + const data = (UEA_MULTICALL_PREFIX + + encodeAbiParameters( + [ + { + type: 'tuple[]', + components: [ + { name: 'to', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'data', type: 'bytes' }, + ], + }, + ], + [outer.map((c) => ({ to: c.target, value: c.value, data: c.data }))] + ).slice(2)) as Hex; + const result = await adaptTrackedResponse( + runtime, + fakeResponse({ + from: ADDR.agent, + to: wallet.address, + data, + raw: { + from: ADDR.other, + to: ADDR.agent, + nonce: 0, + data, + value: BigInt(0), + }, + }) + ); + expect(result.from).toBe(wallet.address); + expect(result.agentic?.nativeCalls).toEqual( + actions.map((c) => ({ to: c.target, value: c.value, data: c.data })) + ); +}); + +it('does not label an arbitrary forwarding contract as a trusted sender batch', async () => { + const { outer, runtime } = fixture(); + const response = fakeResponse({ + from: ADDR.agent, + to: ADDR.other, + data: v6.encodeExecute(outer), + }); + expect(await adaptTrackedResponse(runtime, response)).toBe(response); + expect(response.agentic).toBeUndefined(); +}); diff --git a/packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts b/packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts new file mode 100644 index 00000000..967a14eb --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts @@ -0,0 +1,366 @@ +/** + * Multi-action native rules: one rule ID allowing 1..8 Push functions, each + * with its own limits (AGW _grantRules: MAX_NATIVE_ACTIONS, DuplicateAction, + * InconsistentChain). PENDING product sign-off — plan/agw/pending-items.md. + */ +import { getAddress, type Hex } from 'viem'; +import { PUSH_NETWORK } from '../../constants/enums'; +import { actionId } from '../codec/ids'; +import { + MAX_NATIVE_ACTIONS, + nativeActionTermsToRule, + nativeRuleToActionTerms, + nativeRuleToTerms, +} from '../codec/native'; +import { prepareRules } from '../codec/rules'; +import { decodeEnvelope, decodeSession } from '../codec/session'; +import { + currentGeneration, + resetAgenticGenerations, + V6_CAPABILITIES, +} from '../deployments'; +import { AGENTIC_ERROR_CODE } from '../errors'; +import { decodeActiveRule, readActiveRules } from '../reads/rules'; +import { Snapshot } from '../reads/snapshot'; +import { agenticUtils, internalAgenticUtils } from '../utils'; +import type { NativeMultiRule, NativeRule } from '../agentic.types'; +import { + ADDR, + FakeChain, + PUSH_NS, + registerFakeGeneration, + ruleId, +} from './fake-chain'; + +const NOW = 1_700_000_000; +const other = getAddress('0x0000000000000000000000000000000000007b7b'); + +const multi = (over: Partial = {}): NativeMultiRule => ({ + agent: ADDR.agent, + validUntil: NOW + 100, + actions: [ + { target: ADDR.target, selector: 'increment()', maxCalls: 5 }, + { + target: other, + selector: 'deposit(address,uint256)', + pins: [{ arg: 0, expected: ADDR.other }], + amount: { arg: 1, maxPerCall: BigInt(10) }, + maxValuePerCall: BigInt(3), + maxValueTotal: BigInt(9), + }, + ], + ...over, +}); + +const ctx = { + owner: ADDR.owner, + pushChainNamespace: PUSH_NS, + validator: ADDR.validator, + rulesPolicy: ADDR.policy, + gateway: ADDR.gateway, + capabilities: V6_CAPABILITIES, + nowSeconds: NOW, + forbiddenTargets: [ + ADDR.factory, + ADDR.engine, + ADDR.policy, + ADDR.validator, + ADDR.gateway, + ], +}; + +describe('native rule codec — multiple actions', () => { + it('encodes each action with its own limits, in input order, sharing the rule expiry', () => { + const out = nativeRuleToActionTerms(multi(), { nowSeconds: NOW }); + expect(out.map((o) => o.terms.target)).toEqual([ADDR.target, other]); + expect(out[0].terms).toMatchObject({ + maxCalls: 5, + validUntil: NOW + 100, + maxValuePerCall: BigInt(0), + }); + expect(out[1].terms).toMatchObject({ + maxValuePerCall: BigInt(3), + maxValueTotal: BigInt(9), + validUntil: NOW + 100, + }); + expect(out[1].terms.pins).toHaveLength(1); + expect(out[1].terms.amount).toMatchObject({ + enabled: true, + offset: 36, + maxPerCall: BigInt(10), + }); + }); + + it('the single-action shorthand is unchanged and equals a one-entry actions list', () => { + const single: NativeRule = { + agent: ADDR.agent, + target: ADDR.target, + selector: 'increment()', + validUntil: NOW + 100, + maxCalls: 2, + }; + const asList: NativeRule = { + agent: ADDR.agent, + validUntil: NOW + 100, + actions: [{ target: ADDR.target, selector: 'increment()', maxCalls: 2 }], + }; + expect( + nativeRuleToActionTerms(asList, { nowSeconds: NOW })[0].terms + ).toEqual(nativeRuleToTerms(single, { nowSeconds: NOW }).terms); + }); + + it('round-trips: stored terms decode to the actions form and re-encode identically', () => { + const terms = nativeRuleToActionTerms(multi(), { nowSeconds: NOW }).map( + (o) => o.terms + ); + const decoded = nativeActionTermsToRule(terms, ADDR.agent); + expect(decoded.actions).toHaveLength(2); + expect(decoded.validUntil).toBe(NOW + 100); + expect(decoded.actions?.[0]).not.toHaveProperty('validUntil'); + expect( + nativeRuleToActionTerms(decoded, { nowSeconds: NOW }).map((o) => o.terms) + ).toEqual(terms); + }); + + it('a single stored action decodes to the shorthand form', () => { + const terms = nativeRuleToActionTerms( + multi({ actions: [multi().actions[0]] }), + { nowSeconds: NOW } + ).map((o) => o.terms); + const decoded = nativeActionTermsToRule(terms, ADDR.agent); + expect(decoded.actions).toBeUndefined(); + expect(decoded).toMatchObject({ target: ADDR.target, maxCalls: 5 }); + }); + + it('per-action expiries are kept: the rule shows the earliest, later actions carry their own', () => { + const rule = multi({ + actions: [ + { ...multi().actions[0], validUntil: NOW + 500 }, + multi().actions[1], + ], + }); + const terms = nativeRuleToActionTerms(rule, { nowSeconds: NOW }).map( + (o) => o.terms + ); + expect(terms.map((t) => t.validUntil)).toEqual([NOW + 500, NOW + 100]); + const decoded = nativeActionTermsToRule(terms, ADDR.agent); + expect(decoded.validUntil).toBe(NOW + 100); + expect(decoded.actions?.[0].validUntil).toBe(NOW + 500); + expect( + nativeRuleToActionTerms(decoded, { nowSeconds: NOW }).map((o) => o.terms) + ).toEqual(terms); + }); + + it.each([ + [ + 'a null action', + { actions: [null] } as never, + /actions\[0\] must be an action object/, + ], + [ + 'a non-object action', + { actions: [42] } as never, + /actions\[0\] must be an action object/, + ], + [ + 'missing rule expiry despite overrides', + { + validUntil: undefined, + actions: [{ ...multi().actions[0], validUntil: NOW + 100 }], + } as never, + /rule validUntil/, + ], + [ + 'expired rule expiry despite overrides', + { + validUntil: NOW - 1, + actions: [{ ...multi().actions[0], validUntil: NOW + 100 }], + }, + /rule validUntil/, + ], + ['an empty actions list', { actions: [] }, /1\.\.8/], + [ + 'more than the contract limit', + { + actions: Array.from({ length: MAX_NATIVE_ACTIONS + 1 }, (_, i) => ({ + target: getAddress(`0x${(i + 16).toString(16).padStart(40, '0')}`), + selector: 'increment()' as const, + })), + }, + /1\.\.8/, + ], + [ + 'a repeated target and selector', + { + actions: [ + { target: ADDR.target, selector: 'increment()' as const }, + { target: ADDR.target, selector: '0xd09de08a' as const }, + ], + }, + /repeats the target and selector of actions\[0\]/, + ], + [ + 'top-level action fields mixed with actions', + { target: ADDR.target } as never, + /cannot be combined with top-level target/, + ], + [ + 'an invalid action, reported with its index', + { + actions: [ + multi().actions[0], + { + target: other, + selector: 'f(bytes)' as const, + pins: [{ arg: 0, expected: '0x01' as Hex }], + }, + ], + }, + /^actions\[1\]: /, + ], + ])('rejects %s before signing', (_name, patch, message) => { + expect(() => + nativeRuleToActionTerms(multi(patch as Partial), { + nowSeconds: NOW, + }) + ).toThrow( + expect.objectContaining({ + code: AGENTIC_ERROR_CODE.INVALID_RULE, + message: expect.stringMatching(message), + }) + ); + }); + + it('the same function on different targets is allowed (distinct action IDs)', () => { + expect(() => + nativeRuleToActionTerms( + multi({ + actions: [ + { target: ADDR.target, selector: 'increment()' }, + { target: other, selector: 'increment()' }, + ], + }), + { nowSeconds: NOW } + ) + ).not.toThrow(); + }); +}); + +describe('prepareRules — one session, one rule ID, several actions', () => { + it('builds one session action per native action, each with its own URP envelope on the Push chain', () => { + const [p] = prepareRules([multi()], ctx); + expect(p.session.actions.map((a) => a.actionTarget)).toEqual([ + ADDR.target, + other, + ]); + expect( + p.session.actions.every( + (a) => + a.actionPolicies.length === 1 && + a.actionPolicies[0].policy === ADDR.policy + ) + ).toBe(true); + expect( + p.session.actions.map( + (a) => decodeEnvelope(a.actionPolicies[0].initData).chainNamespace + ) + ).toEqual([PUSH_NS, PUSH_NS]); + expect(p.nativeTerms).toHaveLength(2); + }); + + it('refuses an infrastructure target in any action, naming it', () => { + expect(() => + prepareRules( + [ + multi({ + actions: [ + multi().actions[0], + { target: ADDR.gateway, selector: 'increment()' }, + ], + }), + ], + ctx + ) + ).toThrow(/rules\[0\]\.actions\[1\]\.target/); + }); + + it('one multi-action rule is one rule per agent on Push, so it never collides with itself', () => { + expect(prepareRules([multi()], ctx)).toHaveLength(1); + }); +}); + +describe('utils.agentic.decodeRules — several actions', () => { + it('decodes a multi-action session into the actions form', () => { + const [bytes] = internalAgenticUtils.encodeRules([multi()], { + pushChainNamespace: PUSH_NS, + validator: ADDR.validator, + rulesPolicy: ADDR.policy, + nowSeconds: NOW, + }); + expect(decodeSession(bytes).actions).toHaveLength(2); + const back = agenticUtils.decodeRules(bytes, { + pushChainNamespace: PUSH_NS, + }) as NativeMultiRule; + expect(back.actions.map((a) => a.target)).toEqual([ADDR.target, other]); + expect(back.actions[1]).toMatchObject({ + maxValuePerCall: BigInt(3), + amount: { offset: 36, maxPerCall: BigInt(10) }, + }); + }); +}); + +describe('rules.get / rules.list — reading several stored actions', () => { + afterEach(() => resetAgenticGenerations()); + + it('decodes every action in engine order at one block', async () => { + registerFakeGeneration(); + const fake = new FakeChain(); + const a0 = actionId(ADDR.target, '0xd09de08a'); + const a1 = actionId(other, '0x47e7ef24'); + const w = fake.addWallet(ADDR.owner, 'w', [ + { + ...fake.nativeRule(ADDR.agent, ruleId(1)), + actionIds: [a0, a1], + nativeByAction: { + [a0.toLowerCase()]: { + target: ADDR.target, + selector: '0xd09de08a', + maxCalls: 0xffffffff, + callsUsed: 5, + }, + [a1.toLowerCase()]: { + target: other, + selector: '0x47e7ef24', + maxValuePerCall: BigInt(3), + }, + }, + }, + ]); + const gen = currentGeneration(PUSH_NETWORK.TESTNET_DONUT); + const snap = await Snapshot.at(fake); + const [active] = await readActiveRules(snap, gen, w.address); + const record = await decodeActiveRule( + snap, + gen, + w.address, + active, + PUSH_NS + ); + const rule = record.rule as import('../agentic.types').Rule; + expect(rule.allowedCalls.map((a) => [a.target, a.selector])).toEqual([ + [ADDR.target, '0xd09de08a'], + [other, '0x47e7ef24'], + ]); + expect(record.spent).toMatchObject({ + kind: 'native', + actions: [ + expect.objectContaining({ callsUsed: 5 }), + expect.objectContaining({ callsUsed: 0 }), + ], + }); + expect(rule.allowedCalls[1].maxValue).toBe(BigInt(3)); + expect(new Set(fake.calls.map((c) => c.blockNumber))).toEqual( + new Set([fake.block]) + ); + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts b/packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts new file mode 100644 index 00000000..1a941af1 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts @@ -0,0 +1,300 @@ +import { encodeFunctionData, getAddress, type Hex } from 'viem'; +import { CHAIN, PUSH_NETWORK } from '../../constants/enums'; +import { ERC20_EVM } from '../../constants/abi'; +import { TransactionRoute } from '../../orchestrator/route-detector'; +import type { UniversalExecuteParams } from '../../orchestrator/orchestrator.types'; +import { transformToUniversalTxReceipt } from '../../orchestrator/internals/tx-transformer'; +import { transformToUniversalTxResponse } from '../../orchestrator/internals/response-builder'; +import { adaptTrackedResponse } from '../response'; +import { composeOutbound, type DestinationCall } from '../execution/outbound'; +import { agenticSend } from '../execution/send'; +import { v6 } from '../contracts/v6'; +import { currentGeneration, resetAgenticGenerations } from '../deployments'; +import type { AgenticExecutionContext } from '../context'; +import { ADDR, FakeChain, registerFakeGeneration, ruleId } from './fake-chain'; +import { mockRuntime, fakeResponse } from './mock-runtime'; + +jest.mock('../../universal/account/account', () => ({ + convertExecutorToOrigin: jest + .fn() + .mockResolvedValue({ account: null, exists: false }), +})); + +afterEach(() => resetAgenticGenerations()); + +const USDC = { + symbol: 'USDC', + decimals: 6, + address: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238' as Hex, + mechanism: 'approve' as const, +}; +const TRANSFER = encodeFunctionData({ + abi: ERC20_EVM, + functionName: 'transfer', + args: [ADDR.target, BigInt(10)], +}); +const TOKEN_CALL: DestinationCall = { + to: getAddress(USDC.address), + data: TRANSFER, + value: BigInt(0), +}; +const APP_CALL: DestinationCall = { + to: ADDR.target, + data: '0xd09de08a', + value: BigInt(0), +}; +const PRC20 = ADDR.other; +const PUSH_HASH = `0x${'ab'.repeat(32)}` as Hex; +const EXTERNAL_HASH = `0x${'ef'.repeat(32)}` as Hex; + +function fixture() { + registerFakeGeneration(); + const fake = new FakeChain(); + const wallet = fake.addWallet(ADDR.owner, 'outbound-review'); + const gen = currentGeneration(PUSH_NETWORK.TESTNET_DONUT); + const read = fake.readContract.bind(fake); + fake.readContract = async (args) => + args.functionName === 'SOURCE_CHAIN_NAMESPACE' + ? CHAIN.ETHEREUM_SEPOLIA + : read(args); + fake.balances.set(`pc:${wallet.address.toLowerCase()}`, BigInt(100000)); + fake.balances.set(`balanceOf:${PRC20.toLowerCase()}`, BigInt(1000)); + fake.balances.set(`allowance:${PRC20.toLowerCase()}`, BigInt(1000)); + const runtime = mockRuntime(fake, { + signer: ADDR.owner, + resolvePrc20: () => PRC20, + }); + runtime.executeMock.mockImplementation( + async (params: { to: string; data?: Hex }) => + fakeResponse({ + to: params.to, + data: params.data ?? '0x', + from: ADDR.owner, + origin: `eip155:42101:${ADDR.owner}`, + }) + ); + const context: AgenticExecutionContext = { + wallet: wallet.address, + generation: gen, + door: 'owner', + signerPushAccount: ADDR.owner, + signerOrigin: { chain: CHAIN.PUSH_TESTNET_DONUT, address: ADDR.owner }, + }; + return { fake, wallet, gen, runtime, context }; +} + +const cases: { + name: string; + params: UniversalExecuteParams; + calls: DestinationCall[]; +}[] = [ + { + name: 'explicit ERC20 transfer preserves its token target and calldata', + params: { + to: { address: USDC.address, chain: CHAIN.ETHEREUM_SEPOLIA }, + data: TRANSFER, + }, + calls: [TOKEN_CALL], + }, + { + name: 'funds-only transfer describes the actual generated token call', + params: { + to: { address: ADDR.target, chain: CHAIN.ETHEREUM_SEPOLIA }, + funds: { amount: BigInt(10), token: USDC }, + }, + calls: [TOKEN_CALL], + }, + { + name: 'funds plus app call keeps the generated transfer and app call in order', + params: { + to: { address: ADDR.target, chain: CHAIN.ETHEREUM_SEPOLIA }, + funds: { amount: BigInt(10), token: USDC }, + data: APP_CALL.data, + }, + calls: [TOKEN_CALL, APP_CALL], + }, + { + name: 'explicit call array retains all calls without guessing a primary action', + params: { + to: { address: ADDR.other, chain: CHAIN.ETHEREUM_SEPOLIA }, + data: [TOKEN_CALL, APP_CALL], + }, + calls: [TOKEN_CALL, APP_CALL], + }, + { + name: 'native transfer preserves the actual destination value', + params: { + to: { address: ADDR.target, chain: CHAIN.ETHEREUM_SEPOLIA }, + value: BigInt(7), + }, + calls: [{ to: ADDR.target, value: BigInt(7), data: '0x' }], + }, +]; + +describe('canonical outbound response on send and replay', () => { + it.each(cases)('$name', async ({ params, calls }) => { + const { wallet, runtime, context } = fixture(); + const live = await agenticSend(runtime, context, params); + const submitted = runtime.executeMock.mock.calls[0][0]; + const replay = await adaptTrackedResponse( + runtime, + fakeResponse({ + to: submitted.to, + data: submitted.data, + origin: live.origin, + from: ADDR.owner, + route: TransactionRoute.UOA_TO_PUSH, + }) + ); + const summary = calls[0]; + for (const response of [live, replay]) { + expect(response).toMatchObject({ + from: wallet.address, + origin: live.origin, + ...summary, + route: TransactionRoute.UOA_TO_CEA, + chain: CHAIN.ETHEREUM_SEPOLIA, + }); + expect(response.agentic?.destinationCalls).toEqual(calls); + expect(response.agentic).toMatchObject({ + rawTo: wallet.address, + rawData: submitted.data, + }); + expect(await response.wait()).toMatchObject({ + from: wallet.address, + to: summary.to, + }); + } + }); +}); + +describe.each(['owner', 'agent'] as const)( + 'outbound replay wait on the %s door', + (door) => { + it.each(['success', 'reverted'] as const)( + 'handles an early Push-only route with a %s Push receipt', + async (status) => { + const { wallet, gen, runtime } = fixture(); + const out = await composeOutbound( + runtime, + gen, + wallet.address, + { + to: { address: ADDR.target, chain: CHAIN.ETHEREUM_SEPOLIA }, + data: APP_CALL.data, + }, + { door } + ); + const input = + door === 'owner' + ? v6.encodeExecute([out.gatewayCall]) + : v6.encodeExecuteAsAgent(ruleId(1), out.gatewayCall); + const signer = door === 'owner' ? ADDR.owner : ADDR.agent; + const tx = { + hash: PUSH_HASH, + from: signer, + to: wallet.address, + input, + value: BigInt(0), + nonce: 1, + gas: BigInt(160000), + gasPrice: BigInt(1), + blockNumber: BigInt(100), + blockHash: `0x${'cd'.repeat(32)}`, + transactionIndex: 0, + type: 'eip1559', + accessList: [], + r: '0x1', + s: '0x2', + v: BigInt(0), + wait: jest.fn().mockResolvedValue({ + transactionHash: PUSH_HASH, + blockNumber: BigInt(100), + blockHash: `0x${'cd'.repeat(32)}`, + transactionIndex: 0, + from: signer, + to: wallet.address, + contractAddress: null, + gasUsed: BigInt(80000), + cumulativeGasUsed: BigInt(80000), + logs: [], + logsBloom: '0x', + status, + }), + }; + const waitForOutboundTx = jest.fn().mockResolvedValue({ + externalTxHash: EXTERNAL_HASH, + destinationChain: CHAIN.ETHEREUM_SEPOLIA, + recipient: ADDR.target, + amount: '0', + assetAddr: PRC20, + explorerUrl: 'https://example.test/tx', + }); + const initHook = jest.fn(); + const perCallHook = jest.fn(); + const response = await transformToUniversalTxResponse( + { + universalSigner: { + account: { chain: CHAIN.PUSH_TESTNET_DONUT, address: signer }, + }, + progressHook: initHook, + } as unknown as Parameters[0], + tx as unknown as Parameters[1], + [], + { + trackTransaction: jest.fn(), + waitForOutboundTx, + transformToUniversalTxReceipt, + printLog: jest.fn(), + outboundConstants: { + initialWaitMs: 0, + pollingIntervalMs: 1, + maxTimeoutMs: 100, + }, + inboundConstants: { + initialWaitMs: 0, + pollingIntervalMs: 1, + maxTimeoutMs: 100, + }, + } + ); + response.route = TransactionRoute.UOA_TO_PUSH; + response.chain = CHAIN.PUSH_TESTNET_DONUT; + await adaptTrackedResponse(runtime, response); + response.progressHook(perCallHook); + const receipt = await response.wait(); + expect(response).toMatchObject({ + from: wallet.address, + route: TransactionRoute.UOA_TO_CEA, + chain: CHAIN.ETHEREUM_SEPOLIA, + }); + expect(response.agentic).toMatchObject({ + door, + destinationCalls: [APP_CALL], + }); + expect(receipt.from).toBe(wallet.address); + if (status === 'success') { + expect(waitForOutboundTx).toHaveBeenCalledTimes(1); + expect(waitForOutboundTx.mock.calls[0][0]).toBe(PUSH_HASH); + expect(receipt).toMatchObject({ + status: 1, + externalStatus: 'success', + externalChain: CHAIN.ETHEREUM_SEPOLIA, + externalTxHash: EXTERNAL_HASH, + }); + } else { + expect(waitForOutboundTx).not.toHaveBeenCalled(); + expect(receipt.status).toBe(0); + expect(receipt.externalStatus).toBeUndefined(); + } + const terminal = + status === 'success' ? 'SEND-TX-299-01' : 'SEND-TX-299-02'; + for (const hook of [initHook, perCallHook]) { + expect( + hook.mock.calls.filter(([event]) => event.id === terminal) + ).toHaveLength(1); + } + } + ); + } +); diff --git a/packages/core/src/lib/agentic/__tests__/prc20-source-encoding.spec.ts b/packages/core/src/lib/agentic/__tests__/prc20-source-encoding.spec.ts new file mode 100644 index 00000000..61e1ba95 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/prc20-source-encoding.spec.ts @@ -0,0 +1,63 @@ +import { getAddress, zeroAddress } from 'viem'; +import { readOriginToken, CORE_ADDRESS } from '../contracts/prc20-metadata'; +import { Snapshot } from '../reads/snapshot'; +import type { ChainReader } from '../contracts/reader'; +import { ADDR } from './fake-chain'; + +it.each(['string', 'address'] as const)( + 'reads exact non-native source identity from the %s ABI', + async (encoding) => { + const readContract = jest.fn(async (request) => { + const output = request.abi.find( + (f: { name: string }) => f.name === request.functionName + ).outputs[0].type; + if (output !== encoding) throw new Error('different source ABI'); + return ADDR.target; + }); + const snap = new Snapshot( + { readContract } as unknown as ChainReader, + BigInt(123) + ); + expect(await readOriginToken(snap, ADDR.other, 'eip155:11155111')).toBe( + getAddress(ADDR.target) + ); + expect( + readContract.mock.calls.every(([r]) => r.blockNumber === BigInt(123)) + ).toBe(true); + } +); +it('accepts an address-word zero only for the registered native gas token', async () => { + const readContract = jest.fn(async (request) => { + if (request.address === CORE_ADDRESS) return ADDR.other; + const output = request.abi.find( + (f: { name: string }) => f.name === request.functionName + ).outputs[0].type; + if (output === 'string') throw new Error('address ABI'); + return zeroAddress; + }); + const snap = new Snapshot( + { readContract } as unknown as ChainReader, + BigInt(123) + ); + expect(await readOriginToken(snap, ADDR.other, 'eip155:11155111')).toBe( + zeroAddress + ); + await expect( + readOriginToken(snap, ADDR.target, 'eip155:11155111') + ).rejects.toThrow(/non-native.*empty source/); +}); +it('preserves a failed read when neither source encoding can be read', async () => { + const snap = new Snapshot( + { + readContract: async () => { + throw new Error('rpc offline'); + }, + } as unknown as ChainReader, + BigInt(123) + ); + await expect( + readOriginToken(snap, ADDR.other, 'eip155:11155111') + ).rejects.toMatchObject({ + details: { blockNumber: BigInt(123), functionName: 'SOURCE_TOKEN_ADDRESS' }, + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts b/packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts new file mode 100644 index 00000000..4c2ff330 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts @@ -0,0 +1,293 @@ +import { + encodeFunctionData, + parseAbi, + parseUnits, + getAddress, + zeroAddress, +} from 'viem'; +import { agenticPresets } from '../presets'; +import { AGENTIC } from '../constants'; +import { evmPinOffset, normalizePublicRule, publicRules } from '../public-rule'; +import { parseSelector } from '../codec/selectors'; +import type { Rule, UniversalRule } from '../agentic.types'; +import { FakeChain, ADDR } from './fake-chain'; +import { mockRuntime } from './mock-runtime'; + +const TESTNETS = ['eip155:11155111', 'eip155:84532', 'eip155:421614'] as const; +const DEX = { + 'eip155:11155111': { + router: '0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E', + weth: '0xfff9976782d46cc05630d1f6ebab18b2324d6b14', + usdc: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238', + }, + 'eip155:84532': { + router: '0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4', + weth: '0x4200000000000000000000000000000000000006', + usdc: '0x036CbD53842c5426634e7929541eC2318f3dCF7e', + }, + 'eip155:421614': { + router: '0x101F443B4d1b059569D643917553c771E1b9663E', + weth: '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73', + usdc: '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d', + }, +} as const; +const AAVE = { + 'eip155:11155111': { + pool: '0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951', + weth: '0xC558DBdd856501FCd9aaF1E62eae57A9F0629a3c', + }, + 'eip155:84532': { + pool: '0x8bAB6d1b75f19e9eD9fCe8b9BD338844fF79aE27', + weth: '0x4200000000000000000000000000000000000006', + }, + 'eip155:421614': { + pool: '0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff', + weth: '0x1dF462e2712496373A347f8ad10802a5E95f053D', + }, +} as const; +const cap = parseUnits('0.002', 18); +const input = (chainNamespace: (typeof TESTNETS)[number]) => ({ + chainNamespace, + agent: ADDR.agent, + validUntil: 2_000_000_000, + assets: [{ token: zeroAddress, maxPerCall: cap, maxTotal: cap * BigInt(5) }], +}); +const pinTotal = (r: { allowedCalls: { pins?: unknown[] }[] }) => + r.allowedCalls.reduce((n, c) => n + (c.pins?.length ?? 0), 0); + +it('ships only the testnet presets that ran live: Uniswap V3 and Aave V3 on three chains', () => { + expect(Object.values(AGENTIC.PRESETS.CATEGORY)).toEqual([ + 'DEXES', + 'LENDING', + 'STAKING', + ]); + expect( + agenticPresets.list().presets.map((p) => [p.constant, p.chains]) + ).toEqual([ + ['DEXES', [...TESTNETS]], + ['LENDING', [...TESTNETS]], + ['STAKING', []], + ]); + expect(agenticPresets.get('STAKING')).toEqual({ rules: [] }); + for (const category of ['DEXES', 'LENDING'] as const) + for (const rule of agenticPresets.get(category).rules) { + expect(rule.assets).toEqual([ + { + token: zeroAddress, + maxPerCall: parseUnits('0.001', 18), + maxTotal: parseUnits('0.01', 18), + }, + ]); + expect(rule.maxGasPerCall).toBe(parseUnits('20', 18)); + expect(rule).not.toHaveProperty('readiness'); + } +}); +it.each(TESTNETS)( + 'DEXES %s wraps ETH and swaps WETH and Circle USDC with wallet-pinned recipients', + (chainNamespace) => { + const { router, weth, usdc } = DEX[chainNamespace]; + const r = agenticPresets.get('DEXES', input(chainNamespace)).rules[0]; + const W = getAddress(weth), + U = getAddress(usdc), + R = getAddress(router); + expect( + r.allowedCalls.map((c) => [getAddress(c.target), c.selector]) + ).toEqual([ + [W, 'deposit()'], + [W, 'approve(address,uint256)'], + [R, expect.stringMatching(/^exactInputSingle\(/)], + [R, expect.stringMatching(/^exactOutputSingle\(/)], + [U, 'approve(address,uint256)'], + [R, expect.stringMatching(/^exactInputSingle\(/)], + [R, expect.stringMatching(/^exactOutputSingle\(/)], + [W, 'withdraw(uint256)'], + ]); + const [wrap, approveWeth, sellIn, sellOut, approveUsdc, buyIn, buyOut] = + r.allowedCalls; + expect(wrap.maxValue).toBe(cap); + expect(approveWeth.pins).toEqual([ + { arg: 0, expected: R }, + { arg: 1, max: cap }, + ]); + expect(sellIn.pins).toEqual([ + { arg: [0, 0], expected: W }, + { arg: [0, 1], expected: U }, + { arg: [0, 3], expected: AGENTIC.WALLET }, + { arg: [0, 4], max: cap }, + ]); + expect(sellOut.pins?.at(-1)).toEqual({ arg: [0, 5], max: cap }); + const usdcCap = parseUnits('10', 6); + expect(approveUsdc.pins).toEqual([ + { arg: 0, expected: R }, + { arg: 1, max: usdcCap }, + ]); + expect(buyIn.pins).toEqual([ + { arg: [0, 0], expected: U }, + { arg: [0, 1], expected: W }, + { arg: [0, 3], expected: AGENTIC.WALLET }, + { arg: [0, 4], max: usdcCap }, + ]); + expect(buyOut.pins?.at(-1)).toEqual({ arg: [0, 5], max: usdcCap }); + expect(r.allowedCalls.at(-1)?.pins).toEqual([{ arg: 0, max: cap }]); + expect(pinTotal(r)).toBeLessThanOrEqual(32); + } +); +it.each(TESTNETS)( + 'LENDING %s wraps ETH into the Aave WETH reserve and pins every position to the wallet', + (chainNamespace) => { + const { pool, weth } = AAVE[chainNamespace]; + const r = agenticPresets.get('LENDING', input(chainNamespace)).rules[0]; + const W = getAddress(weth), + P = getAddress(pool); + expect( + r.allowedCalls.map((c) => [getAddress(c.target), c.selector, c.pins]) + ).toEqual([ + [W, 'deposit()', undefined], + [ + W, + 'approve(address,uint256)', + [ + { arg: 0, expected: P }, + { arg: 1, max: cap }, + ], + ], + ...( + [ + ['supply(address,uint256,address,uint16)', 2], + ['withdraw(address,uint256,address)', 2], + ['borrow(address,uint256,uint256,uint16,address)', 4], + ['repay(address,uint256,uint256,address)', 3], + ] as const + ).map(([selector, beneficiary]) => [ + P, + selector, + [ + { arg: 0, expected: W }, + { arg: beneficiary, expected: AGENTIC.WALLET }, + { arg: 1, max: cap }, + ], + ]), + [W, 'withdraw(uint256)', [{ arg: 0, max: cap }]], + ]); + expect(r.allowedCalls[0].maxValue).toBe(cap); + } +); +it.each( + TESTNETS.flatMap((chain) => + (['DEXES', 'LENDING'] as const).map((p) => [p, chain] as const) + ) +)( + '%s %s compiles with the deployed v6 policy within its limits', + async (preset, chainNamespace) => { + const r = agenticPresets.get(preset, input(chainNamespace)).rules[0]; + const out = (await normalizePublicRule( + publicRules([r])[0], + ADDR.owner, + mockRuntime(new FakeChain()) + )) as UniversalRule; + expect(out.allowedCalls).toHaveLength(r.allowedCalls.length); + expect(out.allowedCalls[0].maxValue).toBe(cap); + expect(out.allowedCalls.slice(1).every((c) => !c.maxValue)).toBe(true); + } +); +it.each(TESTNETS)( + 'normalizes every DEX swap on %s to the exact ABI bytes', + async (chainNamespace) => { + const r = agenticPresets.get('DEXES', input(chainNamespace)).rules[0]; + const rt = mockRuntime(new FakeChain()); + const out = (await normalizePublicRule( + publicRules([r])[0], + ADDR.owner, + rt + )) as UniversalRule; + const cea = getAddress( + (await rt.resolveCEA(ADDR.owner, chainNamespace as never)).cea + ); + for (const call of out.allowedCalls.filter((c) => + String(c.selector).startsWith('exact') + )) { + const pins = call.pins!; + const values = [ + `0x${pins[0].value.slice(-40)}`, + `0x${pins[1].value.slice(-40)}`, + 3000, + cea, + BigInt(1), + BigInt(1), + BigInt(0), + ] as const; + const data = encodeFunctionData({ + abi: parseAbi([`function ${call.selector}`] as string[]), + functionName: String(call.selector).split('(')[0], + args: [values], + }); + for (const pin of pins.filter((p) => p.op === 0)) + expect( + `0x${data.slice( + 2 + pin.offset * 2, + 2 + (pin.offset + 32) * 2 + )}`.toLowerCase() + ).toBe(pin.value.toLowerCase()); + expect(pins.map((p) => p.offset)).toEqual([ + 4, + 36, + 100, + String(call.selector).startsWith('exactInput') ? 132 : 164, + ]); + } + } +); +it('supports tuple/fixed-array positions but never descends into dynamic storage', () => { + const sig = + 'exchange(address[11],uint256[5][5],uint256,uint256,address[5],address)' as const; + expect(evmPinOffset(sig, 5)).toBe(4 + 43 * 32); + expect(evmPinOffset(sig, [0, 0])).toBe(4); + expect(evmPinOffset(sig, [1, 2, 3])).toBe(4 + 24 * 32); + expect(evmPinOffset('f((address,address,uint256))', [0, 1])).toBe(36); + expect(() => evmPinOffset('f((bytes,address))', [0, 1])).toThrow(/dynamic/); + expect(() => evmPinOffset('f(address[])', [0, 0])).toThrow(/dynamic/); + expect(() => evmPinOffset('f((address,address))', [0, 2])).toThrow(/range/); + expect(() => evmPinOffset('0x12345678', [0, 1])).toThrow(/scalar/); +}); +it('tuple-authored pins re-encode using the raw-selector word indexes returned by reads', async () => { + const r = agenticPresets.get('DEXES', input('eip155:11155111')).rules[0]; + const rt = mockRuntime(new FakeChain()); + const first = (await normalizePublicRule( + publicRules([r])[0], + ADDR.owner, + rt + )) as UniversalRule; + const decoded: Rule = { + ...r, + allowedCalls: first.allowedCalls.map((c) => ({ + target: c.target, + selector: parseSelector(c.selector).selector, + maxValue: c.maxValue, + pins: c.pins?.map((p) => + p.op === 0 + ? { arg: (p.offset - 4) / 32, expected: p.value } + : { arg: (p.offset - 4) / 32, max: BigInt(p.value) } + ), + })), + }; + const second = (await normalizePublicRule( + publicRules([decoded])[0], + ADDR.owner, + rt + )) as UniversalRule; + expect(second.allowedCalls.map((c) => c.pins)).toEqual( + first.allowedCalls.map((c) => c.pins) + ); +}); +it('mutating a returned rule cannot change a later preset', () => { + const r = agenticPresets.get('DEXES', input('eip155:84532')).rules[0]; + (r.allowedCalls[2].pins![0].arg as number[])[1] = 99; + r.allowedCalls[0].maxValue = BigInt(0); + r.assets![0].maxPerCall = BigInt(0); + const again = agenticPresets.get('DEXES', { + chainNamespace: 'eip155:84532', + }).rules[0]; + expect(again.allowedCalls[2].pins![0].arg).toEqual([0, 0]); + expect(again.allowedCalls[0].maxValue).toBe(parseUnits('0.001', 18)); + expect(again.assets![0].maxPerCall).toBe(parseUnits('0.001', 18)); +}); diff --git a/packages/core/src/lib/agentic/__tests__/preset-default-policy.spec.ts b/packages/core/src/lib/agentic/__tests__/preset-default-policy.spec.ts new file mode 100644 index 00000000..f3bd9746 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/preset-default-policy.spec.ts @@ -0,0 +1,38 @@ +import { parseUnits, zeroAddress } from 'viem'; +import { agenticPresets } from '../presets'; +import { + defaultPresetAsset, + PRESET_GAS_BUDGETS, + PRESET_VALIDITY_SECONDS, +} from '../presets/default-policy'; + +const chainNamespace = 'eip155:84532' as const; +it('defaults to a small ETH budget, a 20 PC gas ceiling and seven days', () => { + const before = Math.floor(Date.now() / 1000); + const [rule] = agenticPresets.get('LENDING', { chainNamespace }).rules; + expect(rule.assets).toEqual([defaultPresetAsset()]); + expect(defaultPresetAsset()).toEqual({ + token: zeroAddress, + maxPerCall: parseUnits('0.001', 18), + maxTotal: parseUnits('0.01', 18), + }); + expect(rule.maxGasPerCall).toBe(PRESET_GAS_BUDGETS[chainNamespace]); + expect(PRESET_GAS_BUDGETS[chainNamespace]).toBe(parseUnits('20', 18)); + expect(rule.validUntil).toBeGreaterThanOrEqual( + before + PRESET_VALIDITY_SECONDS + ); +}); +it('preserves an explicit gas budget, including zero', () => { + for (const maxGasPerCall of [BigInt(0), parseUnits('5', 18)]) + expect( + agenticPresets.get('DEXES', { chainNamespace, maxGasPerCall }).rules[0] + .maxGasPerCall + ).toBe(maxGasPerCall); +}); +it('returns fresh default assets so callers cannot change the policy', () => { + const a = agenticPresets.get('DEXES', { chainNamespace }).rules[0]; + a.assets![0].maxTotal = BigInt(1); + expect( + agenticPresets.get('DEXES', { chainNamespace }).rules[0].assets![0].maxTotal + ).toBe(parseUnits('0.01', 18)); +}); diff --git a/packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts b/packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts new file mode 100644 index 00000000..2f2240aa --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts @@ -0,0 +1,58 @@ +import { getAddress, zeroAddress } from 'viem'; +import { applyOperationLimits, nativeAsset } from '../presets/operation-limits'; +import type { PresetCallDefinition } from '../presets/catalog'; +import { MOVEABLE_TOKEN_CONSTANTS } from '../../constants/tokens'; + +const target = getAddress('0x0000000000000000000000000000000000001234'); +it('maps the native cap onto maxValue and amount pins and leaves fixed calls unchanged', () => { + const definitions: PresetCallDefinition[] = [ + { target, selector: 'deposit()', budget: { kind: 'native-value' } }, + { + target, + selector: 'approve(address,uint256)', + pins: [{ arg: 0, expected: target }], + budget: { kind: 'native-amount', amountArg: 1 }, + }, + { + target, + selector: 'swap((address,uint256))', + budget: { kind: 'native-amount', amountArg: [0, 1] }, + }, + { + target, + selector: 'fixed(uint256)', + pins: [{ arg: 0, max: BigInt(9) }], + }, + ]; + const calls = applyOperationLimits(definitions, BigInt(7)); + expect(calls).toEqual([ + { target, selector: 'deposit()', maxValue: BigInt(7) }, + { + target, + selector: 'approve(address,uint256)', + pins: [ + { arg: 0, expected: target }, + { arg: 1, max: BigInt(7) }, + ], + }, + { + target, + selector: 'swap((address,uint256))', + pins: [{ arg: [0, 1], max: BigInt(7) }], + }, + { target, selector: 'fixed(uint256)', pins: [{ arg: 0, max: BigInt(9) }] }, + ]); + expect(calls.some((c) => 'budget' in c)).toBe(false); + expect(definitions[1].pins).toHaveLength(1); +}); +it('recognizes the zero address and native moveable tokens as ETH', () => { + const max = BigInt(1); + expect(nativeAsset({ token: zeroAddress, maxPerCall: max })).toBe(true); + expect( + nativeAsset({ + token: MOVEABLE_TOKEN_CONSTANTS.ARBITRUM_SEPOLIA.ETH, + maxPerCall: max, + }) + ).toBe(true); + expect(nativeAsset({ token: target, maxPerCall: max })).toBe(false); +}); diff --git a/packages/core/src/lib/agentic/__tests__/preset-routes.spec.ts b/packages/core/src/lib/agentic/__tests__/preset-routes.spec.ts new file mode 100644 index 00000000..73ff0e81 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/preset-routes.spec.ts @@ -0,0 +1,43 @@ +import { getAddress } from 'viem'; +import { agenticPresets } from '../presets'; +import { PUSH_NETWORK } from '../../constants/enums'; +import { SYNTHETIC_PUSH_ERC20 } from '../../constants/chain'; +import { resolveAgenticPrc20 } from '../token-routes'; +import { assetAddress } from '../presets/operation-limits'; + +// Presets ship only what Push can send today, so this offline check replaces +// the removed readiness report: every default asset resolves to a Push PRC20. +const GAS_PRC20 = { + 'eip155:11155111': 'pETH', + 'eip155:84532': 'pETH_BASE', + 'eip155:421614': 'pETH_ARB', +} as const; +it.each( + agenticPresets + .list() + .presets.flatMap((p) => p.chains.map((c) => [p.constant, c] as const)) +)('%s %s sends only ETH, routed as the chain gas PRC20', (preset, chain) => { + const { rules } = agenticPresets.get(preset, { chainNamespace: chain }); + expect(rules[0].assets).toHaveLength(1); + const prc20 = resolveAgenticPrc20( + { chain, address: assetAddress(rules[0].assets![0]) }, + PUSH_NETWORK.TESTNET_DONUT + ); + expect(prc20.address).toBe( + getAddress( + SYNTHETIC_PUSH_ERC20[PUSH_NETWORK.TESTNET_DONUT][ + GAS_PRC20[chain as keyof typeof GAS_PRC20] + ] + ) + ); +}); +it('rejects the removed funding option instead of silently changing permissions', () => { + for (const funding of ['push', 'destination', 'auto']) + expect(() => + agenticPresets.get('DEXES', { + chainNamespace: 'eip155:11155111', + // @ts-expect-error funding is not part of the public preset API + funding, + }) + ).toThrow(/funding option is no longer supported/); +}); diff --git a/packages/core/src/lib/agentic/__tests__/presets.spec.ts b/packages/core/src/lib/agentic/__tests__/presets.spec.ts new file mode 100644 index 00000000..d8bc29f2 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/presets.spec.ts @@ -0,0 +1,244 @@ +import { getAddress, zeroAddress } from 'viem'; +import { AGENTIC } from '../constants'; +import { buildPresetApi } from '../presets'; +import type { PresetDefinition } from '../presets/catalog'; +import type { Rule } from '../agentic.types'; +import { MOVEABLE_TOKEN_CONSTANTS } from '../../constants/tokens'; +import { normalizePublicRule, publicRules } from '../public-rule'; +import { FakeChain, ADDR } from './fake-chain'; +import { mockRuntime } from './mock-runtime'; +const chain = 'eip155:11155111' as const, + other = 'eip155:84532' as const; +const target = getAddress('0x0000000000000000000000000000000000001234'); +const token = getAddress('0x000000000000000000000000000000000000abcd'); +const agent = getAddress('0x000000000000000000000000000000000000a999'); +const until = () => Math.floor(Date.now() / 1000) + 3600; +const eth = (maxPerCall = BigInt(5), maxTotal = BigInt(10)) => ({ + token: zeroAddress, + maxPerCall, + maxTotal, +}); +function catalog(): PresetDefinition[] { + return [ + { + constant: 'DEXES', + name: 'Test-only DEX', + chains: [ + { + chainNamespace: chain, + allowedCalls: [ + { + target, + selector: 'deposit()', + budget: { kind: 'native-value' }, + }, + { + target, + selector: 'lend(address,uint256)', + pins: [{ arg: 0, expected: AGENTIC.WALLET }], + app: 'Fixture', + label: 'Lend', + budget: { kind: 'native-amount', amountArg: 1 }, + }, + ], + }, + { + chainNamespace: other, + allowedCalls: [ + { + target, + selector: 'withdraw(address)', + pins: [{ arg: 0, expected: AGENTIC.WALLET }], + }, + ], + }, + ], + }, + ]; +} +it('returns one editable template per chain with default ETH limits, expiry and no identity', () => { + const api = buildPresetApi(catalog()), + res = api.get('DEXES'); + expect(Object.keys(res)).toEqual(['rules']); + expect(res.rules.map((r) => r.chainNamespace)).toEqual([chain, other]); + for (const rule of res.rules) { + expect(rule).not.toHaveProperty('agent'); + expect(rule.assets).toHaveLength(1); + expect(rule.assets![0].token).toBe(zeroAddress); + expect(rule.validUntil).toBeGreaterThan(Math.floor(Date.now() / 1000)); + } + const max = res.rules[0].assets![0].maxPerCall; + expect(res.rules[0].allowedCalls[0].maxValue).toBe(max); + expect(res.rules[0].allowedCalls[1].pins).toEqual([ + { arg: 0, expected: AGENTIC.WALLET }, + { arg: 1, max }, + ]); + expect(api.list({ type: 'CATEGORY' }).presets[0].chains).toEqual([ + chain, + other, + ]); +}); +it('returns ready Rule types with identity and expiry and places each ETH asset on its chain', () => { + const { rules } = buildPresetApi(catalog()).get('DEXES', { + agent, + validUntil: until(), + assets: [ + { chainNamespace: chain, ...eth(BigInt(2), BigInt(3)) }, + { + chainNamespace: other, + token: MOVEABLE_TOKEN_CONSTANTS.BASE_SEPOLIA.ETH, + maxPerCall: BigInt(4), + maxTotal: BigInt(8), + }, + ], + }); + const typed: Rule[] = rules; + expect(typed[0].assets).toEqual([eth(BigInt(2), BigInt(3))]); + expect(typed[1].assets).toEqual([ + { + token: { ...MOVEABLE_TOKEN_CONSTANTS.BASE_SEPOLIA.ETH }, + maxPerCall: BigInt(4), + maxTotal: BigInt(8), + }, + ]); + expect(typed[0].allowedCalls[0].maxValue).toBe(BigInt(2)); + expect(typed.every((r) => r.agent === agent && r.validUntil > 0)).toBe(true); +}); +it('does not type an incomplete template as a ready rule', () => { + const { rules } = buildPresetApi(catalog()).get('DEXES'); + // @ts-expect-error callers must fill agent before create + const ready: Rule[] = rules; + expect(ready[0].agent).toBeUndefined(); +}); +it('does not mutate caller assets, returned records, or the bundled catalog', () => { + const data = catalog(); + const api = buildPresetApi(data); + const asset = { + token: { ...MOVEABLE_TOKEN_CONSTANTS.ETHEREUM_SEPOLIA.ETH }, + maxPerCall: BigInt(5), + maxTotal: BigInt(10), + }; + const first = api.get('DEXES', { chainNamespace: chain, assets: [asset] }); + first.rules[0].allowedCalls[1].pins![0] = { arg: 0, expected: zeroAddress }; + (first.rules[0].assets![0].token as { symbol: string }).symbol = 'X'; + api.list().presets[0].chains.length = 0; + data[0].chains[0].allowedCalls[1].target = zeroAddress; + expect(asset.token.symbol).toBe('ETH'); + expect(api.get('DEXES').rules[0].allowedCalls[1]).toMatchObject({ + target, + pins: [{ arg: 0, expected: AGENTIC.WALLET }, { arg: 1 }], + }); + expect(api.list().presets[0].chains).toHaveLength(2); +}); +it.each([ + [{ assets: [eth()] }, /needs chainNamespace/], + [ + { chainNamespace: chain, assets: [{ chainNamespace: other, ...eth() }] }, + /outside the selected preset/, + ], + [{ chainNamespace: chain, assets: [eth(), eth()] }, /duplicate/], + [ + { chainNamespace: chain, assets: [{ ...eth(), token }] }, + /only ETH from Push/, + ], + [{ chainNamespace: chain, assets: [{ token: zeroAddress }] }, /uint256/], + [ + { chainNamespace: chain, assets: [eth(BigInt(0), BigInt(1))] }, + /positive maxPerCall and maxTotal/, + ], + [ + { chainNamespace: chain, assets: [eth(BigInt(-1))] }, + /maxPerCall must be a uint256/, + ], + [ + { + chainNamespace: chain, + assets: [eth(BigInt(1), BigInt(1) << BigInt(256))], + }, + /maxTotal must be a uint256/, + ], + [{ chainNamespace: chain, assets: [] }, /Add an ETH asset/], + [{ assets: [{ chainNamespace: chain, ...eth() }] }, /Add an ETH asset/], + [{ agent: zeroAddress }, /nonzero Push address/], + [{ validUntil: 1 }, /future uint48/], + [{ validUntil: 1.5 }, /future uint48/], + [{ assets: [null] }, /must be an object/], +])( + 'rejects malformed or mismatched options before returning templates (case %#)', + (options, error) => { + expect(() => + buildPresetApi(catalog()).get('DEXES', options as never) + ).toThrow(error); + } +); +it('rejects unknown presets, unsupported list types and unsupported chain filters', () => { + const api = buildPresetApi(catalog()); + expect(() => api.get('UNKNOWN' as never)).toThrow(/unknown preset/); + expect(() => api.list({ type: 'APP' } as never)).toThrow(/only CATEGORY/); + expect(() => api.get('DEXES', { chainNamespace: 'eip155:999999' })).toThrow( + /no approved entry/ + ); +}); +it('enforces the 32-call ceiling', () => { + const data = catalog(); + data[0].chains[0].allowedCalls = Array.from({ length: 33 }, (_, i) => ({ + target, + selector: `fn${i}()`, + })); + expect(() => + buildPresetApi(data).get('DEXES', { chainNamespace: chain }) + ).toThrow(/1..32/); +}); +it('requires full signatures and rejects duplicate function entries', () => { + const data = catalog(); + data[0].chains[0].allowedCalls = [{ target, selector: 'deposit' as never }]; + expect(() => buildPresetApi(data).get('DEXES')).toThrow(/full signatures/); + data[0].chains[0].allowedCalls = [ + { target, selector: 'deposit()' }, + { target, selector: 'deposit()' }, + ]; + expect(() => buildPresetApi(data).get('DEXES')).toThrow( + /unpinned alternative/ + ); +}); +it('compiles preset value and amount caps with the deployed v6 policy', async () => { + const { rules } = buildPresetApi(catalog()).get('DEXES', { + chainNamespace: chain, + agent, + validUntil: until(), + assets: [eth()], + }); + const normalized = (await normalizePublicRule( + publicRules(rules)[0], + ADDR.other, + mockRuntime(new FakeChain()) + )) as import('../agentic.types').UniversalRule; + expect(normalized.allowedCalls[0].maxValue).toBe(BigInt(5)); + expect(normalized.allowedCalls[1].pins?.map((p) => p.op)).toEqual([0, 1]); +}); +it('keeps OR alternatives EVM-only: repeated Solana instructions are refused', () => { + const api = buildPresetApi([ + { + constant: 'DEXES', + name: 'fixture', + chains: [ + { + chainNamespace: 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1', + allowedCalls: [ + { + target: '11111111111111111111111111111111', + selector: 'deposit(u64)', + pins: [{ account: 0, expected: AGENTIC.WALLET }], + }, + { + target: '11111111111111111111111111111111', + selector: 'deposit(u64)', + pins: [{ arg: 0, max: BigInt(1) }], + }, + ], + }, + ], + }, + ]); + expect(() => api.get('DEXES')).toThrow(/Solana does not support alternative/); +}); diff --git a/packages/core/src/lib/agentic/__tests__/public-rule.spec.ts b/packages/core/src/lib/agentic/__tests__/public-rule.spec.ts new file mode 100644 index 00000000..684b6230 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/public-rule.spec.ts @@ -0,0 +1,235 @@ +import { getAddress } from 'viem'; +import { PublicKey } from '@solana/web3.js'; +import { normalizePublicRule, publicRules, WALLET } from '../public-rule'; +import { prepareWalletRules } from '../management/prepare'; +import { currentGeneration, resetAgenticGenerations } from '../deployments'; +import { PUSH_NETWORK } from '../../constants/enums'; +import { Snapshot } from '../reads/snapshot'; +import { UINT256_MAX } from '../codec/defaults'; +import type { + Rule, + NativeMultiRule, + UniversalRule, + SolanaRule, +} from '../agentic.types'; +import { ADDR, FakeChain, registerFakeGeneration } from './fake-chain'; +import { mockRuntime } from './mock-runtime'; +import { compileSvmIdlRule } from '../codec/svm-idl'; +const now = 1_700_000_000; +const wallet = getAddress('0x000000000000000000000000000000000000aaaa'); +const base = (): Rule => ({ + agent: ADDR.agent, + validUntil: now + 100, + allowedCalls: [ + { + target: ADDR.target, + selector: 'transfer(address,uint256)', + pins: [ + { arg: 0, expected: WALLET }, + { arg: 1, max: BigInt(5) }, + ], + }, + ], +}); +const fake = () => new FakeChain(); +async function normalize(rule: Rule) { + return normalizePublicRule( + publicRules([rule])[0], + wallet, + mockRuntime(fake()) + ); +} +beforeEach(registerFakeGeneration); +afterEach(resetAgenticGenerations); +it('normalizes unified native calls into exact EQ/MAX words with zero PC default', async () => { + const out = (await normalize(base())) as NativeMultiRule; + expect(out.actions).toEqual([ + expect.objectContaining({ + maxValuePerCall: BigInt(0), + maxValueTotal: UINT256_MAX, + maxCalls: 0xffffffff, + wirePins: [ + { offset: 4, op: 0, value: `0x${wallet.slice(2).padStart(64, '0')}` }, + { offset: 36, op: 1, value: `0x${'0'.repeat(63)}5` }, + ], + }), + ]); + const rt = mockRuntime(fake()); + const [p] = await prepareWalletRules( + rt, + currentGeneration(PUSH_NETWORK.TESTNET_DONUT), + ADDR.owner, + wallet, + publicRules([base()]), + await Snapshot.at(rt.reader) + ); + expect(p.nativeTerms?.[0].pins[1]).toMatchObject({ + op: 1, + value: `0x${'0'.repeat(63)}5`, + }); +}); +it.each(['actions', 'target', 'amount', 'maxCalls', 'maxValueTotal', 'ref'])( + 'rejects retired top-level %s before signing', + async (field) => { + await expect(normalize({ ...base(), [field]: null })).rejects.toMatchObject( + { code: 'INVALID_RULE' } + ); + } +); +it('supports multiple native MAX pins', async () => { + const r = base(); + r.allowedCalls[0].pins = [ + { arg: 0, max: BigInt(1) }, + { arg: 1, max: BigInt(2) }, + ]; + expect( + ((await normalize(r)) as NativeMultiRule).actions[0].wirePins + ).toHaveLength(2); +}); +it('compiles the existing EVM WALLET beneficiary and defaults asset total to zero', async () => { + const r = base(); + r.chainNamespace = 'eip155:11155111'; + r.assets = [{ token: ADDR.other, maxPerCall: BigInt(1) }]; + r.allowedCalls[0].pins = [{ arg: 0, expected: WALLET }]; + const out = (await normalize(r)) as UniversalRule; + expect(out.allowedCalls[0]).toMatchObject({ + pins: [expect.objectContaining({ offset: 4, op: 0 })], + maxValue: BigInt(0), + }); + expect(out.assets[0].maxTotal).toBe(BigInt(0)); +}); +it('supports general destination EQ/MAX pins', async () => { + const out = (await normalize({ + ...base(), + chainNamespace: 'eip155:11155111', + })) as UniversalRule; + expect(out.allowedCalls[0].pins?.map((p) => p.op)).toEqual([0, 1]); +}); +it('computes top-level offsets after static arrays and preserves a raw-word round trip', async () => { + const r = base(); + r.allowedCalls[0] = { + target: ADDR.target, + selector: 'f(uint256[2],uint256)', + pins: [{ arg: 1, max: BigInt(1) }], + }; + const out = (await normalize(r)) as NativeMultiRule; + expect(out.actions[0].wirePins?.[0].offset).toBe(68); +}); +it('compiles numeric Solana arg/account pins without a caller IDL', async () => { + const program = new PublicKey(Buffer.alloc(32, 3)).toBase58(); + const gateway = new PublicKey(Buffer.alloc(32, 4)).toBase58(); + const rt = mockRuntime(fake(), { + svmMetadata: { + gateway: async (chain) => ({ chainNamespace: chain, program: gateway }), + mint: async () => { + throw Error('unused'); + }, + }, + }); + const rule: Rule = { + agent: ADDR.agent, + chainNamespace: 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1', + validUntil: now + 100, + allowedCalls: [ + { + target: program, + selector: 'receive_sol(u64)', + pins: [ + { account: 0, expected: WALLET }, + { arg: 0, max: BigInt(5) }, + ], + }, + ], + }; + const out = (await normalizePublicRule( + publicRules([rule])[0], + wallet, + rt + )) as SolanaRule; + const cea = `0x${'01'.repeat(32)}` as const; + const terms = compileSvmIdlRule( + out, + { + expectedCEA: cea, + gatewayProgram: `0x${'04'.repeat(32)}`, + assets: [ + { token: ADDR.other, maxPerCall: BigInt(1), maxTotal: BigInt(1) }, + ], + ceaAccounts: [cea], + tokenAccounts: new Map(), + }, + now + ); + expect(terms.programs[0].maxAccounts).toBe(255); + expect(terms.pins).toEqual([ + { ruleIndex: 0, accountIndex: 0, expected: cea }, + ]); + expect(terms.dataPins[0]).toMatchObject({ offset: 8, len: 8, mode: 2 }); +}); + +it('public create rejects missing options asynchronously, and update rejects malformed pairs before reads', async () => { + const { AgenticNamespaceImpl } = await import('../agentic'); + const { AgenticWalletHandle } = await import('../wallet'); + const rt = mockRuntime(fake(), { signer: ADDR.owner }); + const ns = new AgenticNamespaceImpl(rt); + await expect(ns.create('invalid', undefined as never)).rejects.toMatchObject({ + code: 'INVALID_RULE', + }); + const handle = new AgenticWalletHandle(rt, wallet); + for (const params of [ + undefined, + {}, + { rules: [] }, + { rules: [null] }, + { rules: [{ rulesId: '0x', rule: base() }] }, + ]) { + await expect(handle.rules.update(params as never)).rejects.toMatchObject({ + code: 'INVALID_RULE', + }); + } + expect(rt.fake.calls).toEqual([]); + expect(rt.executeMock).not.toHaveBeenCalled(); +}); + +it('does not silently discard a token qualifier on an argument pin', async () => { + const r = base(); + r.allowedCalls[0].pins = [ + { arg: 0, expected: WALLET, token: ADDR.other } as never, + ]; + await expect(normalize(r)).rejects.toMatchObject({ code: 'INVALID_RULE' }); +}); + +it('reads native wallet equality as WALLET and re-encodes its exact word', async () => { + const { getRule } = await import('../reads/rules'); + const { ruleId } = await import('./fake-chain'); + const chain = fake(); + const w = chain.addWallet(ADDR.owner, 'wallet-pin'); + const word = `0x${w.address + .slice(2) + .toLowerCase() + .padStart(64, '0')}` as const; + w.rules.push( + chain.nativeRule(ADDR.agent, ruleId(1), { + pins: [{ offset: 4, op: 0, value: word }], + }) + ); + const rt = mockRuntime(chain); + const rec = await getRule( + await Snapshot.at(chain), + currentGeneration(PUSH_NETWORK.TESTNET_DONUT), + w.address, + ruleId(1), + rt.pushChainNamespace + ); + expect(rec.rule).toMatchObject({ + allowedCalls: [{ pins: [{ arg: 0, expected: WALLET }] }], + }); + const normalized = (await normalizePublicRule( + publicRules([rec.rule])[0], + w.address, + rt + )) as NativeMultiRule; + expect(normalized.actions[0].wirePins).toEqual([ + { offset: 4, op: 0, value: word }, + ]); +}); diff --git a/packages/core/src/lib/agentic/__tests__/reads-context.spec.ts b/packages/core/src/lib/agentic/__tests__/reads-context.spec.ts new file mode 100644 index 00000000..0babc61a --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/reads-context.spec.ts @@ -0,0 +1,604 @@ +import { getAddress } from 'viem'; +import { PUSH_NETWORK } from '../../constants/enums'; +import { resolveAgenticContext } from '../context'; +import { resetAgenticGenerations, currentGeneration } from '../deployments'; +import { AGENTIC_ERROR_CODE } from '../errors'; +import { readCheckpoints, validateSequence } from '../reads/checkpoints'; +import { getRule, listRules, selectRuleForSend } from '../reads/rules'; +import { Snapshot, scanLogs } from '../reads/snapshot'; +import { deriveForOwner, listForOwner, walletInfo } from '../reads/wallets'; +import { + ADDR, + FakeChain, + PUSH_NS, + SEPOLIA_NS, + checkpointLog, + log, + registerFakeGeneration, + ruleId, +} from './fake-chain'; +import { mockRuntime } from './mock-runtime'; +import { v6 } from '../contracts/v6'; +import { readOriginToken } from '../contracts/prc20-metadata'; + +describe('generation registry', () => { + afterEach(() => resetAgenticGenerations()); + + it('ships Donut v6 only; other networks are unsupported', () => { + resetAgenticGenerations(); + expect(currentGeneration(PUSH_NETWORK.TESTNET_DONUT)).toMatchObject({ + id: 'v6', + advertised: true, + }); + for (const n of Object.values(PUSH_NETWORK).filter( + (n) => n !== PUSH_NETWORK.TESTNET_DONUT + )) { + expect(() => currentGeneration(n)).toThrow( + expect.objectContaining({ + code: AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE, + }) + ); + } + }); + + it('initialize against any wallet fails before signing when no generation is registered', async () => { + resetAgenticGenerations(); + const fake = new FakeChain(); + await expect( + resolveAgenticContext( + mockRuntime(fake, { network: PUSH_NETWORK.MAINNET }), + ADDR.target + ) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE, + }); + }); +}); + +describe('Donut log-range limit', () => { + it('covers the full range in contiguous pages of at most 1,000 blocks', async () => { + const fake = new FakeChain(); + const getLogs = jest.spyOn(fake, 'getLogs'); + await scanLogs( + fake, + { address: ADDR.factory, event: v6.events.walletDeployed }, + BigInt(10), + BigInt(2010) + ); + expect(getLogs.mock.calls.map(([a]) => [a.fromBlock, a.toBlock])).toEqual([ + [BigInt(10), BigInt(1009)], + [BigInt(1010), BigInt(2009)], + [BigInt(2010), BigInt(2010)], + ]); + }); +}); + +describe('native PRC20 metadata', () => { + it('accepts a zero address word only for the registered gas token', async () => { + const fake = new FakeChain(), + gas = getAddress('0x0000000000000000000000000000000000007070'); + const original = fake.readContract.bind(fake); + jest.spyOn(fake, 'readContract').mockImplementation(async (args) => { + if (args.functionName === 'SOURCE_TOKEN_ADDRESS') { + const abi = args.abi as readonly { + outputs?: readonly { type: string }[]; + }[]; + if (abi[0].outputs?.[0].type === 'address') + return '0x0000000000000000000000000000000000000000'; + throw new Error('native precompile returns a static word'); + } + return original(args); + }); + const snap = await Snapshot.at(fake); + expect(await readOriginToken(snap, gas, SEPOLIA_NS)).toBe( + '0x0000000000000000000000000000000000000000' + ); + await expect( + readOriginToken(snap, ADDR.target, SEPOLIA_NS) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.RULE_READ_FAILED }); + }); +}); + +describe('initialize with agenticWallet — door resolution', () => { + let fake: FakeChain; + beforeEach(() => { + registerFakeGeneration(); + fake = new FakeChain(); + }); + afterEach(() => resetAgenticGenerations()); + + it('owner → owner door; universal account context keeps signer identity separate', async () => { + const w = fake.addWallet(ADDR.owner, 'w'); + const ctx = await resolveAgenticContext( + mockRuntime(fake, { signer: ADDR.owner }), + w.address + ); + expect(ctx).toMatchObject({ + wallet: w.address, + door: 'owner', + signerPushAccount: ADDR.owner, + }); + }); + + it('agent named in an enabled rule → agent door, even when that rule is expired', async () => { + const w = fake.addWallet(ADDR.owner, 'w', [ + fake.nativeRule(ADDR.agent, ruleId(1), { validUntil: 1 }), + ]); + const ctx = await resolveAgenticContext(mockRuntime(fake), w.address); + expect(ctx.door).toBe('agent'); + }); + + it('anyone else → NOT_OWNER_OR_AGENT', async () => { + const w = fake.addWallet(ADDR.owner, 'w', [ + fake.nativeRule(ADDR.agent, ruleId(1)), + ]); + await expect( + resolveAgenticContext( + mockRuntime(fake, { signer: ADDR.other }), + w.address + ) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.NOT_OWNER_OR_AGENT, + }); + }); + + it('no code → WALLET_NOT_DEPLOYED; a contract that is not an AGW → NOT_AGENTIC_WALLET', async () => { + await expect( + resolveAgenticContext(mockRuntime(fake), ADDR.target) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.WALLET_NOT_DEPLOYED, + }); + await expect( + resolveAgenticContext(mockRuntime(fake), 'not-an-address') + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.NOT_AGENTIC_WALLET, + }); + }); + + it('wiring that does not match the registered generation is refused', async () => { + const w = fake.addWallet(ADDR.owner, 'w'); + w.accountId = 'push.agentwallet.1.0.0'; + await expect( + resolveAgenticContext( + mockRuntime(fake, { signer: ADDR.owner }), + w.address + ) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE, + }); + }); +}); + +describe('per-send rule selection', () => { + let fake: FakeChain; + beforeEach(() => { + registerFakeGeneration(); + fake = new FakeChain(); + }); + afterEach(() => resetAgenticGenerations()); + const gen = () => currentGeneration(PUSH_NETWORK.TESTNET_DONUT); + + it('exactly one enabled (agent, chain) match is selected, at one block', async () => { + const w = fake.addWallet(ADDR.owner, 'w', [ + fake.nativeRule(ADDR.agent, ruleId(1)), + fake.nativeRule(ADDR.other, ruleId(2)), + { ...fake.nativeRule(ADDR.agent, ruleId(3)), mode: 0, chain: SEPOLIA_NS }, + ]); + const snap = await Snapshot.at(fake); + const r = await selectRuleForSend( + snap, + gen(), + w.address, + ADDR.agent, + PUSH_NS + ); + expect(r.rulesId).toBe(ruleId(1)); + const u = await selectRuleForSend( + snap, + gen(), + w.address, + ADDR.agent, + SEPOLIA_NS + ); + expect(u.rulesId).toBe(ruleId(3)); + expect(new Set(fake.calls.map((c) => c.blockNumber))).toEqual( + new Set([fake.block]) + ); + }); + + it('zero matches → NO_RULES_FOR_CHAIN', async () => { + const w = fake.addWallet(ADDR.owner, 'w', [ + fake.nativeRule(ADDR.other, ruleId(2)), + ]); + await expect( + selectRuleForSend( + await Snapshot.at(fake), + gen(), + w.address, + ADDR.agent, + PUSH_NS + ) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.NO_RULES_FOR_CHAIN }); + }); + + it('direct-grant duplicates → AMBIGUOUS_RULE listing every candidate, never an arbitrary pick', async () => { + const w = fake.addWallet(ADDR.owner, 'w', [ + fake.nativeRule(ADDR.agent, ruleId(1)), + fake.nativeRule(ADDR.agent, ruleId(2)), + ]); + await expect( + selectRuleForSend( + await Snapshot.at(fake), + gen(), + w.address, + ADDR.agent, + PUSH_NS + ) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.AMBIGUOUS_RULE, + details: { rulesIds: [ruleId(1), ruleId(2)] }, + }); + }); + + it('a revoked rule is not a candidate; lookups are not cached between sends', async () => { + const w = fake.addWallet(ADDR.owner, 'w', [ + fake.nativeRule(ADDR.agent, ruleId(1)), + ]); + expect( + ( + await selectRuleForSend( + await Snapshot.at(fake), + gen(), + w.address, + ADDR.agent, + PUSH_NS + ) + ).rulesId + ).toBe(ruleId(1)); + w.rules = []; + await expect( + selectRuleForSend( + await Snapshot.at(fake), + gen(), + w.address, + ADDR.agent, + PUSH_NS + ) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.NO_RULES_FOR_CHAIN }); + }); + + it('an RPC failure is an error, never an empty rule set', async () => { + const w = fake.addWallet(ADDR.owner, 'w', [ + fake.nativeRule(ADDR.agent, ruleId(1)), + ]); + fake.failOn.add('getPermissionIDs'); + await expect( + selectRuleForSend( + await Snapshot.at(fake), + gen(), + w.address, + ADDR.agent, + PUSH_NS + ) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.RULE_READ_FAILED }); + }); +}); + +describe('rules.list / rules.get', () => { + let fake: FakeChain; + beforeEach(() => { + registerFakeGeneration(); + fake = new FakeChain(); + }); + afterEach(() => resetAgenticGenerations()); + const gen = () => currentGeneration(PUSH_NETWORK.TESTNET_DONUT); + + it('decodes active native records with spend', async () => { + const w = fake.addWallet(ADDR.owner, 'w', [ + fake.nativeRule(ADDR.agent, ruleId(1), { + callsUsed: 3, + valueSpent: BigInt(5), + maxCalls: 0xffffffff, + }), + ]); + const rules = await listRules( + await Snapshot.at(fake), + gen(), + w.address, + PUSH_NS + ); + expect(rules).toEqual([ + expect.objectContaining({ + rulesId: ruleId(1), + enabled: true, + chainNamespace: PUSH_NS, + agent: ADDR.agent, + rule: expect.objectContaining({ + allowedCalls: [expect.objectContaining({ selector: '0xd09de08a' })], + }), + spent: expect.objectContaining({ valueSpent: BigInt(5) }), + }), + ]); + }); + + it('public records contain native spend', async () => { + const w = fake.addWallet(ADDR.owner, 'w', [ + fake.nativeRule(ADDR.agent, ruleId(1)), + ]); + const record = await getRule( + await Snapshot.at(fake), + gen(), + w.address, + ruleId(1), + PUSH_NS + ); + expect(record.spent).toMatchObject({ + kind: 'native', + valueSpent: BigInt(0), + amountSpent: BigInt(0), + callsUsed: 0, + }); + }); + + it('lists native and universal rules without truncating', async () => { + const w = fake.addWallet(ADDR.owner, 'w', [ + fake.nativeRule(ADDR.agent, ruleId(1)), + { ...fake.nativeRule(ADDR.other, ruleId(2)), mode: 0, chain: SEPOLIA_NS }, + ]); + const records = await listRules( + await Snapshot.at(fake), + gen(), + w.address, + PUSH_NS + ); + expect(records.map((r) => r.chainNamespace)).toEqual([PUSH_NS, SEPOLIA_NS]); + }); + it('an empty source-token address is native only for the chain registry gas token', async () => { + const token = getAddress('0x0000000000000000000000000000000000007070'); + fake.sourceTokens.set(token.toLowerCase(), ''); + const w = fake.addWallet(ADDR.owner, 'native-gas', [ + { + ...fake.nativeRule(ADDR.agent, ruleId(1)), + mode: 0, + chain: SEPOLIA_NS, + universal: { + expectedCEA: ADDR.other, + maxGasPerCall: BigInt(1), + assets: [{ token }], + }, + }, + ]); + const record = await getRule( + await Snapshot.at(fake), + gen(), + w.address, + ruleId(1), + PUSH_NS + ); + expect(record.rule).toMatchObject({ + assets: [{ token: '0x0000000000000000000000000000000000000000' }], + }); + fake.sourceTokens.set(ADDR.target.toLowerCase(), ''); + w.rules[0].universal!.assets = [{ token: ADDR.target }]; + await expect( + getRule(await Snapshot.at(fake), gen(), w.address, ruleId(1), PUSH_NS) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.RULE_READ_FAILED }); + }); + + it('unknown and revoked IDs both return RULE_NOT_FOUND without history reconstruction', async () => { + const w = fake.addWallet(ADDR.owner, 'w'); + const snap = await Snapshot.at(fake); + await expect( + getRule(snap, gen(), w.address, ruleId(9), PUSH_NS) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.RULE_NOT_FOUND, + }); + fake.extraLogs.push( + log( + w.address, + v6.events.rulesRevoked, + { rulesId: ruleId(9) }, + {}, + BigInt(50) + ) + ); + await expect( + getRule(snap, gen(), w.address, ruleId(9), PUSH_NS) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.RULE_NOT_FOUND, + }); + }); +}); + +describe('wallet reads', () => { + let fake: FakeChain; + beforeEach(() => { + registerFakeGeneration(); + fake = new FakeChain(); + }); + afterEach(() => resetAgenticGenerations()); + const gen = () => currentGeneration(PUSH_NETWORK.TESTNET_DONUT); + + it('derive defaults to the next unused index; beyond it is refused', async () => { + fake.addWallet(ADDR.owner, 'a'); + expect(await deriveForOwner(fake, gen(), ADDR.owner)).toMatchObject({ + index: 1, + deployed: false, + }); + expect(await deriveForOwner(fake, gen(), ADDR.owner, 0)).toMatchObject({ + index: 0, + deployed: true, + }); + await expect(deriveForOwner(fake, gen(), ADDR.owner, 2)).rejects.toThrow( + /beyond/ + ); + }); + + it('derivation drift between the factory and the SDK mirror is detected (obligation 13)', async () => { + fake.predictOverride = () => + getAddress('0x0000000000000000000000000000000000000bad'); + await expect(deriveForOwner(fake, gen(), ADDR.owner)).rejects.toMatchObject( + { + code: AGENTIC_ERROR_CODE.INCONSISTENT_READ, + } + ); + }); + + it('list returns deployed slots with labels and rule counts plus the next undeployed slot', async () => { + fake.addWallet(ADDR.owner, 'first', [ + fake.nativeRule(ADDR.agent, ruleId(1)), + ]); + fake.addWallet(ADDR.owner, ''); + const wallets = await listForOwner(fake, gen(), ADDR.owner); + expect( + wallets.map((w) => [w.index, w.label, w.deployed, w.rulesCount]) + ).toEqual([ + [0, 'first', true, 1], + [1, 'AGW 2', true, 0], + [2, '', false, 0], + ]); + }); + + it('an empty owner lists only slot 0, undeployed', async () => { + expect(await listForOwner(fake, gen(), ADDR.other)).toEqual([ + expect.objectContaining({ + index: 0, + deployed: false, + rulesCount: 0, + label: '', + }), + ]); + }); + + it('reads current labels without depending on deployment logs', async () => { + const w = fake.addWallet(ADDR.owner, 'original'); + w.label = 'renamed'; + fake.extraLogs = []; + expect(await walletInfo(fake, gen(), w.address)).toMatchObject({ + label: 'renamed', + }); + expect((await listForOwner(fake, gen(), ADDR.owner))[0].label).toBe( + 'renamed' + ); + expect(fake.calls.filter((c) => c.functionName === 'label')).toHaveLength( + 2 + ); + w.label = ''; + expect(await walletInfo(fake, gen(), w.address)).toMatchObject({ + label: 'AGW 1', + }); + }); + + it('info of the signer’s next slot describes it as undeployed; other undeployed addresses are refused', async () => { + const next = await deriveForOwner(fake, gen(), ADDR.owner); + expect( + await walletInfo(fake, gen(), next.address, ADDR.owner) + ).toMatchObject({ deployed: false, index: 0, owner: ADDR.owner }); + await expect( + walletInfo(fake, gen(), next.address, ADDR.other) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.WALLET_NOT_DEPLOYED, + }); + }); +}); + +describe('checkpoints', () => { + let fake: FakeChain; + beforeEach(() => { + registerFakeGeneration(); + fake = new FakeChain(); + }); + afterEach(() => resetAgenticGenerations()); + const gen = () => currentGeneration(PUSH_NETWORK.TESTNET_DONUT); + + it('orders by block, tx and log index and counts five ticks for a replacement in one block', async () => { + const w = fake.addWallet(ADDR.owner, 'w'); + // A grant (seq 1), then a replacement batch (seq 2..6) in one tx; logs arrive reversed. + fake.checkpointLogs = [1, 2, 3, 4, 5, 6] + .map((seq) => + checkpointLog( + w.address, + seq, + [1, 0, 0, 2, 0, 1][seq - 1], + seq === 1 ? BigInt(20) : BigInt(60) + ) + ) + .reverse(); + w.checkpointCount = BigInt(6); + const { checkpoints } = await readCheckpoints(fake, gen(), w.address); + expect(checkpoints.map((c) => c.seq)).toEqual([1, 2, 3, 4, 5, 6]); + expect(checkpoints.slice(1).map((c) => c.kind)).toEqual([ + 'OWNER_ACTION', + 'OWNER_ACTION', + 'RULES_REVOKED', + 'OWNER_ACTION', + 'RULES_GRANTED', + ]); + const since = await readCheckpoints(fake, gen(), w.address, BigInt(60)); + expect(since.checkpoints).toHaveLength(5); + expect(since.checkpoints.every((c) => c.blockNumber === BigInt(60))).toBe( + true + ); + }); + + it('a count/event mismatch is reported (after one retry) rather than returned', async () => { + const w = fake.addWallet(ADDR.owner, 'w'); + fake.checkpointLogs = [checkpointLog(w.address, 1, 1, BigInt(20))]; + w.checkpointCount = BigInt(2); + await expect(readCheckpoints(fake, gen(), w.address)).rejects.toMatchObject( + { + code: AGENTIC_ERROR_CODE.INCONSISTENT_READ, + } + ); + }); + + it('uses retained logs only when a complete sequence proves no checkpoint was pruned', async () => { + const w = fake.addWallet(ADDR.owner, 'fresh'); + w.checkpointCount = BigInt(2); + fake.checkpointLogs = [ + checkpointLog(w.address, 1, 1, BigInt(60)), + checkpointLog(w.address, 2, 2, BigInt(70)), + ]; + const original = fake.getLogs.bind(fake); + jest.spyOn(fake, 'getLogs').mockImplementation(async (args) => { + if (args.fromBlock < BigInt(50)) + throw new Error('height 10 is not available, lowest height is 50'); + return original(args); + }); + const result = await readCheckpoints(fake, gen(), w.address); + expect(result.checkpoints.map((c) => c.seq)).toEqual([1, 2]); + fake.checkpointLogs = [checkpointLog(w.address, 2, 2, BigInt(70))]; + await expect(readCheckpoints(fake, gen(), w.address)).rejects.toMatchObject( + { code: AGENTIC_ERROR_CODE.INCONSISTENT_READ } + ); + }); + + it('does not skip arbitrary RPC errors or a pruned explicit sinceBlock range', async () => { + const w = fake.addWallet(ADDR.owner, 'history'); + w.checkpointCount = BigInt(1); + const logs = jest + .spyOn(fake, 'getLogs') + .mockRejectedValue(new Error('temporary RPC failure')); + await expect(readCheckpoints(fake, gen(), w.address)).rejects.toMatchObject( + { code: AGENTIC_ERROR_CODE.RULE_READ_FAILED } + ); + expect(logs).toHaveBeenCalledTimes(1); + logs.mockRejectedValue( + new Error('height 10 is not available, lowest height is 50') + ); + await expect( + readCheckpoints(fake, gen(), w.address, BigInt(20)) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.RULE_READ_FAILED }); + expect(logs).toHaveBeenCalledTimes(2); + }); + + it('validateSequence checks contiguity and the count', () => { + expect(validateSequence([1, 2, 3], BigInt(3), true)).toBeNull(); + expect(validateSequence([1, 3], BigInt(3), true)).toMatch(/gap/); + expect(validateSequence([2, 3], BigInt(3), false)).toBeNull(); + expect(validateSequence([2, 3], BigInt(4), false)).toMatch( + /does not match/ + ); + expect(validateSequence([], BigInt(0), true)).toBeNull(); + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/response-surface.spec.ts b/packages/core/src/lib/agentic/__tests__/response-surface.spec.ts new file mode 100644 index 00000000..7cb5fceb --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/response-surface.spec.ts @@ -0,0 +1,259 @@ +import { + encodeErrorResult, + encodeFunctionData, + getAddress, + toFunctionSelector, + type Hex, +} from 'viem'; +import * as core from '../../index'; +import { CONSTANTS } from '../../constants'; +import { PUSH_NETWORK } from '../../constants/enums'; +import { UNIVERSAL_GATEWAY_PC } from '../../constants/abi'; +import { PushChainExecutionError } from '../../orchestrator/internals/errors'; +import { Utils } from '../../utils'; +import { AGW_ABI } from '../contracts/abi/v6'; +import { v6 } from '../contracts/v6'; +import { resetAgenticGenerations } from '../deployments'; +import { AgenticRevertError } from '../errors'; +import { adaptAgenticResponse, adaptTrackedResponse } from '../response'; +import { decodeAgenticRevert, decodeAgwErrorData } from '../revert'; +import { ADDR, FakeChain, registerFakeGeneration, ruleId } from './fake-chain'; +import { fakeResponse } from './mock-runtime'; + +afterEach(() => resetAgenticGenerations()); + +describe('response identity', () => { + it('live adaptation keeps origin/hash/raw and records the wrapped call', () => { + const resp = fakeResponse({ + to: ADDR.target, + data: '0xabcd', + from: ADDR.agent, + }); + const origin = resp.origin; + adaptAgenticResponse(resp, { + wallet: ADDR.owner, + door: 'agent', + rulesId: ruleId(1), + logical: { to: ADDR.other, data: '0x01', value: BigInt(2) }, + }); + expect(resp).toMatchObject({ + from: ADDR.owner, + to: ADDR.other, + data: '0x01', + value: BigInt(2), + origin, + }); + expect(resp.raw).toMatchObject({ + from: ADDR.agent, + to: ADDR.target, + data: '0xabcd', + }); + expect(resp.agentic).toMatchObject({ + rawTo: ADDR.target, + rawData: '0xabcd', + door: 'agent', + }); + }); + + it('replay: a tracked execute on a registered wallet is re-presented as the wallet’s call', async () => { + registerFakeGeneration(); + const fake = new FakeChain(); + const w = fake.addWallet(ADDR.owner, 'w'); + const data = v6.encodeExecuteAsAgent(ruleId(4), { + target: ADDR.target, + value: BigInt(0), + data: '0xd09de08a', + }); + const tracked = await adaptTrackedResponse( + { reader: fake, network: PUSH_NETWORK.TESTNET_DONUT }, + fakeResponse({ to: w.address, data, from: ADDR.agent }) + ); + expect(tracked).toMatchObject({ + from: w.address, + to: ADDR.target, + data: '0xd09de08a', + }); + expect(tracked.agentic).toMatchObject({ + door: 'agent', + rulesId: ruleId(4), + }); + }); + + it('replay: an outbound through the gateway restores the destination call and route', async () => { + registerFakeGeneration(); + const fake = new FakeChain(); + const w = fake.addWallet(ADDR.owner, 'w'); + const payload = ('0x2cc2842d' + + encodeFunctionData({ + abi: [ + { + type: 'function', + name: 'x', + inputs: [ + { + type: 'tuple[]', + components: [ + { name: 'to', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'data', type: 'bytes' }, + ], + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + ], + args: [[{ to: ADDR.target, value: BigInt(0), data: '0xd09de08a' }]], + }).slice(10)) as Hex; + const gatewayCall = encodeFunctionData({ + abi: UNIVERSAL_GATEWAY_PC, + functionName: 'sendUniversalTxOutbound', + args: [ + { + recipient: '0x', + token: ADDR.other, + amount: BigInt(1), + gasLimit: BigInt(1), + gasPrice: BigInt(0), + maxPCForGas: BigInt(1), + payload, + revertRecipient: w.address, + }, + ], + }); + const data = v6.encodeExecuteAsAgent(ruleId(4), { + target: ADDR.gateway, + value: BigInt(5), + data: gatewayCall, + }); + const tracked = await adaptTrackedResponse( + { reader: fake, network: PUSH_NETWORK.TESTNET_DONUT }, + fakeResponse({ to: w.address, data }) + ); + expect(tracked).toMatchObject({ + from: w.address, + to: ADDR.target, + data: '0xd09de08a', + route: 'UOA_TO_CEA', + }); + // A Push-only route inferred from an incomplete Cosmos record is replaced. + const early = await adaptTrackedResponse( + { reader: fake, network: PUSH_NETWORK.TESTNET_DONUT }, + fakeResponse({ to: w.address, data, route: 'UOA_TO_PUSH' }) + ); + expect(early.route).toBe('UOA_TO_CEA'); + }); + + it('replay: anything not provably an AGW call is left untouched', async () => { + const fake = new FakeChain(); + const plain = fakeResponse({ to: ADDR.target, data: '0xd09de08a' }); + expect( + await adaptTrackedResponse( + { reader: fake, network: PUSH_NETWORK.TESTNET_DONUT }, + plain + ) + ).toBe(plain); + registerFakeGeneration(); + const spoof = fakeResponse({ + to: ADDR.target, + data: v6.encodeExecute([ + { target: ADDR.other, value: BigInt(0), data: '0x' }, + ]), + }); + const out = await adaptTrackedResponse( + { reader: fake, network: PUSH_NETWORK.TESTNET_DONUT }, + spoof + ); + expect(out.from).toBe(spoof.from); + expect(out.agentic).toBeUndefined(); + }); +}); + +describe('revert decoding', () => { + it('decodes AGW errors with arguments', () => { + const data = encodeErrorResult({ + abi: AGW_ABI, + errorName: 'CallerIsNotAgent', + args: [ruleId(1), ADDR.other], + }); + expect(decodeAgwErrorData(data)).toMatchObject({ + name: 'CallerIsNotAgent', + }); + }); + + it('names a truncated PolicyCheckReverted by its inner selector', () => { + expect( + decodeAgwErrorData(`0xf4270752${'8bb88ba1'.padEnd(64, '0')}`) + ).toMatchObject({ + name: 'PolicyCheckReverted(CallLimitReached)', + selector: '0xf4270752', + }); + }); + + it.each([ + [ + 'InnerValueExceedsAllowance', + 'InnerValueExceedsAllowance(uint256,uint256,uint256)', + ], + ['BeneficiaryMismatch', 'BeneficiaryMismatch(address,address)'], + ])( + 'names %s, which URP encodes by selector and its ABI omits', + (name, signature) => { + const inner = toFunctionSelector(`function ${signature}`).slice(2); + expect( + decodeAgwErrorData(`0xf4270752${inner.padEnd(64, '0')}`) + ).toMatchObject({ name: `PolicyCheckReverted(${name})` }); + } + ); + + it('finds revert data through error causes and viem-style messages', () => { + const inner = new Error('outer', { + cause: { + data: encodeErrorResult({ + abi: AGW_ABI, + errorName: 'UnsupportedExecutionMode', + }), + }, + }); + expect(decodeAgenticRevert(inner)?.name).toBe('UnsupportedExecutionMode'); + expect(decodeAgenticRevert(new Error('nothing here'))).toBeUndefined(); + }); + it('decodes viem simulation errors whose full revert lives in raw', () => { + const raw = `0xf4270752${'8bb88ba1'.padEnd(64, '0')}` as Hex; + expect( + decodeAgenticRevert({ + message: 'Unknown signature 0xf4270752', + cause: { raw }, + })?.name + ).toBe('PolicyCheckReverted(CallLimitReached)'); + }); +}); + +describe('public surface', () => { + it('exports the AGW errors, and the base execution error for instanceof checks', () => { + expect(core.AgenticError).toBeDefined(); + expect(new core.AgenticRevertError('x')).toBeInstanceOf( + core.PushChainExecutionError + ); + expect(core.PushChainExecutionError).toBe(PushChainExecutionError); + expect(core.AGENTIC_ERROR_CODE.NO_RULES_FOR_CHAIN).toBe( + 'NO_RULES_FOR_CHAIN' + ); + expect(new AgenticRevertError('x', { cause: 'c' }).cause).toBe('c'); + }); + + it('exposes the wallet marker, preset API and ALL asset helper, keeping deployment wiring and codecs internal', () => { + expect(CONSTANTS.AGENTIC.WALLET).toBe('agentic:wallet'); + expect(Object.keys(CONSTANTS.AGENTIC).sort()).toEqual([ + 'JOB', + 'PRESETS', + 'PRINCIPAL', + 'WALLET', + ]); + expect(Object.isFrozen(CONSTANTS.AGENTIC)).toBe(true); + expect(Object.keys(Utils.agentic)).toEqual(['presets', 'assets']); + expect(Object.keys(Utils.agentic.presets).sort()).toEqual(['get', 'list']); + expect(Object.keys(Utils.agentic.assets)).toEqual(['all']); + expect(Object.isFrozen(Utils.agentic.assets)).toBe(true); + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/rule-inputs.spec.ts b/packages/core/src/lib/agentic/__tests__/rule-inputs.spec.ts new file mode 100644 index 00000000..45862996 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/rule-inputs.spec.ts @@ -0,0 +1,301 @@ +import { getAddress, parseUnits, zeroAddress } from 'viem'; +import { CHAIN } from '../../constants/enums'; +import { + MOVEABLE_TOKEN_CONSTANTS, + MOVEABLE_TOKENS, +} from '../../constants/tokens'; +import { Utils } from '../../utils'; +import { allRoutableAssets, prepareRuleInput } from '../management/rule-inputs'; +import { normalizePublicRule, publicRules } from '../public-rule'; +import type { AuthoredRule, RuleInput, UniversalRule } from '../agentic.types'; +import type { Snapshot } from '../reads/snapshot'; +import { ADDR, FakeChain } from './fake-chain'; +import { mockRuntime } from './mock-runtime'; + +const SEPOLIA = MOVEABLE_TOKEN_CONSTANTS.ETHEREUM_SEPOLIA; +const CIRCLE_SEPOLIA = getAddress('0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'); +const snap = {} as Snapshot; +const base = (over: Partial = {}): AuthoredRule => ({ + agent: ADDR.agent, + chainNamespace: 'eip155:11155111', + validUntil: 2_000_000_000, + maxGasPerCall: BigInt(1), + ...over, +}); +const prepare = ( + rule: RuleInput, + rt = mockRuntime(new FakeChain(), { signer: ADDR.owner }) +) => + prepareRuleInput( + publicRules([rule])[0], + rt, + ADDR.owner, + snap + ) as unknown as Promise; +const addressOf = (token: unknown) => + typeof token === 'string' ? token : (token as { address: string }).address; + +describe('MOVEABLE ALL', () => { + it('lists every token Push can send to Sepolia, .old Circle USDC separately', () => { + const assets = allRoutableAssets('eip155:11155111'); + expect(assets.map((a) => addressOf(a.token))).toEqual([ + zeroAddress, + SEPOLIA.USDT.address, + SEPOLIA.USDC.address, + SEPOLIA.WETH.address, + SEPOLIA.stETH.address, + CIRCLE_SEPOLIA, + ]); + expect(assets[0]).toMatchObject({ + maxPerCall: parseUnits('0.001', 18), + maxTotal: parseUnits('0.01', 18), + }); + expect(assets[5]).toEqual({ + token: CIRCLE_SEPOLIA, + maxPerCall: parseUnits('10', 6), + maxTotal: parseUnits('100', 6), + }); + }); + it.each( + Object.keys(MOVEABLE_TOKENS).filter( + (c) => c !== CHAIN.PUSH_TESTNET_DONUT && c !== CHAIN.ETHEREUM_MAINNET + ) + )('expands %s within eight routable tokens, each with a default', (chain) => { + const assets = allRoutableAssets(chain); + expect(assets.length).toBeGreaterThan(0); + expect(assets.length).toBeLessThanOrEqual(8); + expect( + assets.every((a) => a.maxPerCall > BigInt(0) && a.maxTotal! > BigInt(0)) + ).toBe(true); + }); + it('leaves out registry tokens without a Push route', () => { + const base = allRoutableAssets('eip155:84532').map((a) => + addressOf(a.token).toLowerCase() + ); + // Base Sepolia WETH is in the registry but has no PRC20. + expect(base).not.toContain('0x4200000000000000000000000000000000000006'); + expect(base).toHaveLength(4); + }); + it('is the public helper and the marker comes from the token constants', () => { + expect(Utils.agentic.assets.all('eip155:421614')).toEqual( + allRoutableAssets('eip155:421614') + ); + expect(SEPOLIA.ALL).toEqual({ kind: 'ALL', chain: CHAIN.ETHEREUM_SEPOLIA }); + expect(Object.isFrozen(SEPOLIA.ALL)).toBe(true); + }); + it('expands in a rule, and a listed token replaces its default', async () => { + const usdc = { + token: SEPOLIA.USDC, + maxPerCall: BigInt(3), + maxTotal: BigInt(9), + }; + const out = await prepare( + base({ + assets: [{ token: SEPOLIA.ALL }, usdc], + allowedCalls: [{ target: ADDR.target, selector: 'increment()' }], + }) + ); + expect(out.assets).toHaveLength(6); + expect(out.assets![2]).toBe(usdc); + expect(out.allowedCalls).toHaveLength(1); + }); + it.each([ + [ + { assets: [{ token: SEPOLIA.ALL, maxPerCall: BigInt(1) }] }, + { code: 'INVALID_RULE', details: { reason: 'ALL_WITH_LIMITS' } }, + ], + [ + { + chainNamespace: 'eip155:84532' as const, + assets: [{ token: SEPOLIA.ALL }], + }, + { code: 'ASSET_CHAIN_MISMATCH' }, + ], + ])( + 'refuses ALL with limits or for another chain (case %#)', + async (over, error) => { + await expect( + prepare(base({ allowedCalls: [], ...over } as never)) + ).rejects.toMatchObject(error); + } + ); + it('refuses an unexpanded marker if normalization is reached directly', async () => { + await expect( + normalizePublicRule( + publicRules([ + base({ + assets: [{ token: SEPOLIA.ALL }], + allowedCalls: [{ target: ADDR.target, selector: 'increment()' }], + }), + ])[0], + ADDR.other, + mockRuntime(new FakeChain()) + ) + ).rejects.toThrow(/expand MOVEABLE ALL/); + }); +}); + +describe('tokens-only rules', () => { + const usdc = { + token: SEPOLIA.USDC, + maxPerCall: BigInt(5), + maxTotal: BigInt(9), + }; + it('allows each ERC20 only back to the owner, capped per transfer', async () => { + for (const allowedCalls of [undefined, []]) { + const out = await prepare(base({ assets: [usdc], allowedCalls })); + expect(out.allowedCalls).toEqual([ + { + target: getAddress(SEPOLIA.USDC.address), + selector: 'transfer(address,uint256)', + pins: [ + { arg: 0, expected: ADDR.owner }, + { arg: 1, max: BigInt(5) }, + ], + app: 'Token transfer', + label: 'Transfer to owner', + }, + ]); + expect(out).not.toHaveProperty('transferTo'); + } + }); + it('adds named recipients as opt-in alternatives and compiles for the v6 policy', async () => { + const out = await prepare( + base({ + assets: [usdc, { token: CIRCLE_SEPOLIA, maxPerCall: BigInt(2) }], + transferTo: [ADDR.other, ADDR.owner.toLowerCase() as never], + }) + ); + expect( + out.allowedCalls!.map((c) => [c.target, c.pins![0].expected, c.label]) + ).toEqual([ + [getAddress(SEPOLIA.USDC.address), ADDR.owner, 'Transfer to owner'], + [ + getAddress(SEPOLIA.USDC.address), + ADDR.other, + 'Transfer to named recipient', + ], + [CIRCLE_SEPOLIA, ADDR.owner, 'Transfer to owner'], + [CIRCLE_SEPOLIA, ADDR.other, 'Transfer to named recipient'], + ]); + const wire = (await normalizePublicRule( + out as never, + ADDR.other, + mockRuntime(new FakeChain()) + )) as UniversalRule; + expect(wire.allowedCalls.map((c) => c.pins?.map((p) => p.op))).toEqual([ + [0, 1], + [0, 1], + [0, 1], + [0, 1], + ]); + }); + it('with ALL and no apps, every routable ERC20 can go back to the owner', async () => { + const out = await prepare(base({ assets: [{ token: SEPOLIA.ALL }] })); + // Native ETH cannot be moved by a transfer rule, so ALL leaves it out here. + expect(out.assets!.map((a) => addressOf(a.token))).toEqual([ + SEPOLIA.USDT.address, + SEPOLIA.USDC.address, + SEPOLIA.WETH.address, + SEPOLIA.stETH.address, + CIRCLE_SEPOLIA, + ]); + expect(out.allowedCalls!.map((c) => getAddress(c.target))).toEqual( + out.assets!.map((a) => getAddress(addressOf(a.token))) + ); + expect( + out.allowedCalls!.every((c) => c.pins![0].expected === ADDR.owner) + ).toBe(true); + }); + it('uses the UEA origin as the owner address, and needs a recipient for a Solana owner', async () => { + const origin = getAddress('0x00000000000000000000000000000000000000cc'); + const evm = mockRuntime(new FakeChain(), { + signer: ADDR.owner, + signerIsPushNative: () => false, + signerOrigin: () => ({ chain: CHAIN.ETHEREUM_SEPOLIA, address: origin }), + }); + expect( + (await prepare(base({ assets: [usdc] }), evm)).allowedCalls![0].pins![0] + ).toEqual({ arg: 0, expected: origin }); + const sol = mockRuntime(new FakeChain(), { + signer: ADDR.owner, + signerIsPushNative: () => false, + signerOrigin: () => ({ + chain: CHAIN.SOLANA_DEVNET, + address: '11111111111111111111111111111111', + }), + }); + await expect(prepare(base({ assets: [usdc] }), sol)).rejects.toMatchObject({ + details: { reason: 'TRANSFER_RECIPIENT_REQUIRED' }, + }); + const named = await prepare( + base({ assets: [usdc], transferTo: [ADDR.other] }), + sol + ); + expect(named.allowedCalls!.map((c) => c.label)).toEqual([ + 'Transfer to named recipient', + ]); + }); + it.each([ + [ + base({ assets: [{ token: zeroAddress, maxPerCall: BigInt(1) }] }), + 'TOKENS_ONLY_NATIVE', + ], + [ + base({ + assets: [usdc], + transferTo: [ADDR.other], + allowedCalls: [{ target: ADDR.target, selector: 'increment()' }], + }), + 'TRANSFER_TO_WITH_CALLS', + ], + [ + base({ assets: [usdc], transferTo: [zeroAddress] }), + 'TRANSFER_RECIPIENT_INVALID', + ], + [ + base({ + chainNamespace: 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1', + assets: [ + { + token: 'So11111111111111111111111111111111111111112', + maxPerCall: BigInt(1), + }, + ], + }), + 'TOKENS_ONLY_UNSUPPORTED', + ], + ])( + 'refuses what a transfer rule cannot express (case %#)', + async (rule, reason) => { + await expect(prepare(rule)).rejects.toMatchObject({ + code: 'INVALID_RULE', + details: { reason }, + }); + } + ); + it('only the connected owner can author one', async () => { + await expect( + prepare( + base({ assets: [usdc] }), + mockRuntime(new FakeChain(), { signer: ADDR.agent }) + ) + ).rejects.toMatchObject({ code: 'NOT_WALLET_OWNER' }); + }); + it('leaves rules with allowed functions and decoded rules unchanged', async () => { + const rule = publicRules([ + base({ + assets: [usdc], + allowedCalls: [{ target: ADDR.target, selector: 'increment()' }], + }), + ])[0]; + expect( + await prepareRuleInput( + rule, + mockRuntime(new FakeChain(), { signer: ADDR.owner }), + ADDR.owner, + snap + ) + ).toBe(rule); + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts b/packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts new file mode 100644 index 00000000..3826fe62 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts @@ -0,0 +1,364 @@ +import { getAddress, type Address } from 'viem'; +import { CHAIN, PUSH_NETWORK } from '../../constants/enums'; +import { MOVEABLE_TOKEN_CONSTANTS } from '../../constants/tokens'; +import { getPRC20Address } from '../../universal/prc20-address'; +import { encodeUniversalTerms } from '../codec/universal-terms'; +import { buildSession, encodeEnvelope, encodeSession } from '../codec/session'; +import { prepareRules } from '../codec/rules'; +import { validateUniversalRuleShape } from '../codec/universal'; +import { V6_CAPABILITIES } from '../deployments'; +import { AGENTIC_ERROR_CODE } from '../errors'; +import { internalAgenticUtils } from '../utils'; +import type { + NativeRule, + NativeSingleRule, + UniversalRule, +} from '../agentic.types'; +import { ADDR, PUSH_NS, SEPOLIA_NS } from './fake-chain'; + +const NOW = 1_700_000_000; +const ctx = { + owner: ADDR.owner, + pushChainNamespace: PUSH_NS, + validator: ADDR.validator, + rulesPolicy: ADDR.policy, + capabilities: V6_CAPABILITIES, + nowSeconds: NOW, + forbiddenTargets: [ + ADDR.factory, + ADDR.engine, + ADDR.policy, + ADDR.validator, + ADDR.gateway, + ], +}; +const native = (over: Partial = {}): NativeSingleRule => ({ + agent: ADDR.agent, + target: ADDR.target, + selector: 'increment()', + validUntil: NOW + 100, + ...over, +}); +const universal = (over: Partial = {}): UniversalRule => ({ + agent: ADDR.agent, + chainNamespace: SEPOLIA_NS, + assets: [ + { + token: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238', + maxPerCall: BigInt(100), + }, + ], + maxGasPerCall: BigInt(10) ** BigInt(18), + validUntil: NOW + 100, + allowedCalls: [ + { + target: ADDR.target, + selector: 'supply(address,uint256,address,uint16)', + beneficiary: 2, + }, + ], + ...over, +}); + +describe('prepareRules — spec 1.b checks before any signature', () => { + it('AGENT_IS_OWNER', () => { + expect(() => prepareRules([native({ agent: ADDR.owner })], ctx)).toThrow( + expect.objectContaining({ code: AGENTIC_ERROR_CODE.AGENT_IS_OWNER }) + ); + }); + + it('allows multiple rules for the same agent and chain', () => { + const prepared = prepareRules( + [native(), native({ target: ADDR.other })], + ctx + ); + expect(prepared).toHaveLength(2); + expect(prepared.map((p) => p.agent)).toEqual([ADDR.agent, ADDR.agent]); + expect(prepared.map((p) => p.nativeTerms?.[0].target)).toEqual([ + ADDR.target, + ADDR.other, + ]); + }); + + it('native and universal rules coexist for the same agent', () => { + const u = universal(); + const prepared = prepareRules([native(), u], { + ...ctx, + gateway: ADDR.gateway, + universal: new Map([ + [ + u, + { + expectedCEA: ADDR.other, + assets: [ + { + token: ADDR.target, + maxPerCall: BigInt(100), + maxTotal: BigInt(1000), + }, + ], + }, + ], + ]), + }); + expect(prepared.map((p) => p.chainNamespace)).toEqual([ + PUSH_NS, + SEPOLIA_NS, + ]); + }); + + it('removed ref inputs fail explicitly instead of being silently dropped', () => { + expect(() => + prepareRules([{ ...native(), ref: `0x${'99'.repeat(32)}` } as never], ctx) + ).toThrow( + expect.objectContaining({ code: AGENTIC_ERROR_CODE.INVALID_RULE }) + ); + }); + + it('refuses infrastructure targets the contracts would reject', () => { + for (const t of [ + ADDR.gateway, + ADDR.policy, + '0x0000000000000000000000000000000000000001' as Address, + ]) { + expect(() => prepareRules([native({ target: t })], ctx)).toThrow( + /infrastructure/ + ); + } + }); + + it('a universal rule naming the Push chain is rejected', () => { + expect(() => + prepareRules( + [universal({ chainNamespace: PUSH_NS as `eip155:${string}` })], + ctx + ) + ).toThrow(/omit chainNamespace/); + }); + + it('valid native rules produce one Session each, agent bound in the validator config', () => { + const [p] = prepareRules([native()], ctx); + expect(p.chainNamespace).toBe(PUSH_NS); + expect(p.session.sessionValidator).toBe(ADDR.validator); + expect(p.session.actions).toHaveLength(1); + expect(p.session.actions[0].actionPolicies[0].policy).toBe(ADDR.policy); + expect(p.session.permitERC4337Paymaster).toBe(false); + }); +}); + +describe('universal rules — validated, then capability-gated (A01, A05)', () => { + it('structural validation runs before the capability gate', () => { + expect(() => + validateUniversalRuleShape(universal({ allowedCalls: [] }), NOW) + ).toThrow(/1\.\.32/); + expect(() => + validateUniversalRuleShape(universal({ maxGasPerCall: BigInt(0) }), NOW) + ).toThrow(/maxGasPerCall/); + expect(() => + validateUniversalRuleShape( + universal({ chainNamespace: 'eip155:abc' as `eip155:${string}` }), + NOW + ) + ).toThrow(/CAIP-2/); + expect(() => + validateUniversalRuleShape( + universal({ + assets: Array.from({ length: 9 }, (_, i) => ({ + token: getAddress(`0x${(i + 1).toString(16).padStart(40, '0')}`), + maxPerCall: BigInt(1), + })), + }), + NOW + ) + ).toThrow(/at most 8/); + expect(() => + validateUniversalRuleShape( + universal({ + assets: [ + { token: ADDR.target, maxPerCall: BigInt(1) }, + { token: ADDR.target, maxPerCall: BigInt(2) }, + ], + }), + NOW + ) + ).toThrow(/duplicates/); + }); + + it('approval policy belongs to UI/marketplace; structurally valid approval calls are accepted', () => { + for (const selector of [ + 'approve(address,uint256)', + 'increaseAllowance(address,uint256)', + ] as const) { + expect(() => + validateUniversalRuleShape( + universal({ allowedCalls: [{ target: ADDR.target, selector }] }), + NOW + ) + ).not.toThrow(); + } + }); + + it('a beneficiary must be an address argument of a known signature', () => { + expect(() => + validateUniversalRuleShape( + universal({ + allowedCalls: [ + { + target: ADDR.target, + selector: 'supply(address,uint256,address,uint16)', + beneficiary: 1, + }, + ], + }), + NOW + ) + ).toThrow(/address argument/); + expect(() => + validateUniversalRuleShape( + universal({ + allowedCalls: [ + { + target: ADDR.target, + selector: '0x617ba037', + pins: [], + beneficiary: 2, + }, + ], + }), + NOW + ) + ).toThrow(/signature/); + }); + + it('requires resolved wallet/token context and named SVM IDL inputs', () => { + expect(() => prepareRules([universal()], ctx)).toThrow( + expect.objectContaining({ + code: AGENTIC_ERROR_CODE.INVALID_RULE, + }) + ); + expect(() => + prepareRules( + [ + universal({ + chainNamespace: 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1' as never, + }), + ], + ctx + ) + ).toThrow( + expect.objectContaining({ + code: AGENTIC_ERROR_CODE.INVALID_RULE, + }) + ); + }); +}); + +describe('internal generation codecs (pure)', () => { + const u = internalAgenticUtils; + + it('encodeRules → decodeRules round-trips a native rule', () => { + const rule = native({ + selector: 'deposit(address,uint256)', + pins: [{ arg: 0, expected: ADDR.other }], + maxCalls: 4, + }); + const [bytes] = u.encodeRules([rule], { + pushChainNamespace: PUSH_NS, + validator: ADDR.validator, + rulesPolicy: ADDR.policy, + nowSeconds: NOW, + }); + const back = u.decodeRules(bytes, { pushChainNamespace: PUSH_NS }); + expect(back).toMatchObject({ + agent: ADDR.agent, + target: ADDR.target, + maxCalls: 4, + validUntil: NOW + 100, + }); + expect( + (back as import('../agentic.types').NativeSingleRule).wirePins + ).toEqual([ + { + offset: 4, + op: 0, + value: `0x${'0'.repeat(24)}${ADDR.other.slice(2).toLowerCase()}`, + }, + ]); + }); + + it('decodeRules rejects a foreign-chain envelope carrying native terms', () => { + const [bytes] = u.encodeRules([native()], { + pushChainNamespace: SEPOLIA_NS, + validator: ADDR.validator, + rulesPolicy: ADDR.policy, + nowSeconds: NOW, + }); + expect(() => u.decodeRules(bytes, { pushChainNamespace: PUSH_NS })).toThrow( + expect.objectContaining({ + code: AGENTIC_ERROR_CODE.RULE_READ_FAILED, + }) + ); + }); + + it('pure decoding resolves known v5 assets and preserves the exact beneficiary offset', () => { + const inputToken = MOVEABLE_TOKEN_CONSTANTS.ETHEREUM_SEPOLIA.USDC; + const prc20 = getPRC20Address(inputToken, { + network: PUSH_NETWORK.TESTNET_DONUT, + }).address; + const bytes = encodeSession( + buildSession({ + validator: ADDR.validator, + agent: ADDR.agent, + rulesPolicy: ADDR.policy, + actions: [ + { + target: ADDR.gateway, + selector: '0x77b86bec', + initData: encodeEnvelope( + CHAIN.ETHEREUM_SEPOLIA, + encodeUniversalTerms({ + validUntil: NOW + 100, + expectedCEA: ADDR.other, + assets: [ + { + token: prc20, + maxPerCall: BigInt(10), + maxTotal: BigInt(100), + }, + ], + maxGasPerCall: BigInt(20), + allowedCalls: [ + { + target: ADDR.target, + selector: '0x617ba037', + pins: [], + beneficiaryOffset: 68, + hasBeneficiary: true, + maxValue: BigInt(0), + }, + ], + }) + ), + }, + ], + }) + ); + expect(u.decodeRules(bytes)).toMatchObject({ + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, + assets: [ + { + token: getAddress(inputToken.address), + maxPerCall: BigInt(10), + maxTotal: BigInt(100), + }, + ], + allowedCalls: [{ beneficiaryOffset: 68 }], + }); + }); + + it('actionId accepts signatures and hex alike', () => { + expect(u.actionId(ADDR.target, 'increment()')).toBe( + u.actionId(ADDR.target, '0xd09de08a') + ); + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts b/packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts new file mode 100644 index 00000000..aff9e9c9 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts @@ -0,0 +1,69 @@ +import { getAddress } from 'viem'; +import { createAgenticRuntime } from '../runtime'; +import { CHAIN, PUSH_NETWORK } from '../../constants/enums'; +import { SYNTHETIC_PUSH_ERC20 } from '../../constants/chain'; +import { + MOVEABLE_TOKEN_CONSTANTS, + type PushChainMoveableToken, +} from '../../constants/tokens'; +import type { Orchestrator } from '../../orchestrator/orchestrator'; +const runtime = () => + createAgenticRuntime( + { + getNetwork: () => PUSH_NETWORK.TESTNET_DONUT, + getRpcUrls: () => ({}), + } as unknown as Orchestrator, + false + ); +const addresses = SYNTHETIC_PUSH_ERC20[PUSH_NETWORK.TESTNET_DONUT]; +it.each([ + [ + CHAIN.ETHEREUM_SEPOLIA, + MOVEABLE_TOKEN_CONSTANTS.ETHEREUM_SEPOLIA.ETH, + addresses.pETH, + ], + [ + CHAIN.BASE_SEPOLIA, + MOVEABLE_TOKEN_CONSTANTS.BASE_SEPOLIA.ETH, + addresses.pETH_BASE, + ], + [ + CHAIN.ARBITRUM_SEPOLIA, + MOVEABLE_TOKEN_CONSTANTS.ARBITRUM_SEPOLIA.ETH, + addresses.pETH_ARB, + ], +] as const)( + 'resolves explicit native ETH on %s to the same burn token as omitted native funds', + (chain, token, expected) => { + const rt = runtime(); + expect(rt.resolvePrc20(token, chain)).toBe(getAddress(expected)); + expect(rt.resolvePrc20({ ...token }, chain)).toBe( + rt.resolvePrc20(undefined, chain) + ); + expect(rt.resolvePrc20(token.address, chain)).toBe(getAddress(expected)); + } +); +it('does not infer a token from a different destination chain', () => { + expect(() => + runtime().resolvePrc20( + MOVEABLE_TOKEN_CONSTANTS.BASE_SEPOLIA.USDC, + CHAIN.ARBITRUM_SEPOLIA + ) + ).toThrow(); +}); +it('preserves a matching explicit Push PRC20 reference and rejects a different destination', () => { + const token: PushChainMoveableToken = { + symbol: 'pETH_ARB', + decimals: 18, + mechanism: 'approve', + address: addresses.pETH_ARB, + prc20Address: addresses.pETH_ARB, + sourceChain: CHAIN.ARBITRUM_SEPOLIA, + }; + expect(runtime().resolvePrc20(token, CHAIN.ARBITRUM_SEPOLIA)).toBe( + getAddress(addresses.pETH_ARB) + ); + expect(() => runtime().resolvePrc20(token, CHAIN.BASE_SEPOLIA)).toThrow( + 'source chain must match' + ); +}); diff --git a/packages/core/src/lib/agentic/__tests__/send.spec.ts b/packages/core/src/lib/agentic/__tests__/send.spec.ts new file mode 100644 index 00000000..b59cbe59 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/send.spec.ts @@ -0,0 +1,742 @@ +import { + decodeAbiParameters, + decodeFunctionData, + encodeFunctionData, + getAddress, + maxUint256, + type Address, + type Hex, +} from 'viem'; +import { CHAIN, PUSH_NETWORK } from '../../constants/enums'; +import { UNIVERSAL_GATEWAY_PC, ERC20_EVM } from '../../constants/abi'; +import { PushChainExecutionError } from '../../orchestrator/internals/errors'; +import { PROGRESS_HOOK } from '../../progress-hook/progress-hook.types'; +import type { AgenticExecutionContext } from '../context'; +import { currentGeneration, resetAgenticGenerations } from '../deployments'; +import { v6 } from '../contracts/v6'; +import { actionId } from '../codec/ids'; +import { AGENTIC_ERROR_CODE, AgenticRevertError } from '../errors'; +import { agenticSend } from '../execution/send'; +import { + ADDR, + FakeChain, + SEPOLIA_NS, + registerFakeGeneration, + ruleId, +} from './fake-chain'; +import { mockRuntime } from './mock-runtime'; + +const data = '0xd09de08a' as Hex; + +function setup( + door: 'owner' | 'agent', + rules = (f: FakeChain) => [f.nativeRule(ADDR.agent, ruleId(1))] +) { + registerFakeGeneration(); + const fake = new FakeChain(); + const w = fake.addWallet(ADDR.owner, 'w', rules(fake)); + const gen = currentGeneration(PUSH_NETWORK.TESTNET_DONUT); + const signer = door === 'owner' ? ADDR.owner : ADDR.agent; + const ctx: AgenticExecutionContext = { + wallet: w.address, + door, + signerPushAccount: signer, + signerOrigin: { chain: CHAIN.PUSH_TESTNET_DONUT, address: signer }, + generation: gen, + }; + return { fake, w, gen, ctx, rt: mockRuntime(fake, { signer }) }; +} + +afterEach(() => resetAgenticGenerations()); + +describe('guards fail before the signer is ever invoked', () => { + it.each([ + [ + 'from (Routes 3/4)', + { to: ADDR.target, data, from: { chain: CHAIN.ETHEREUM_SEPOLIA } }, + AGENTIC_ERROR_CODE.FROM_NOT_ALLOWED, + ], + [ + 'payGasWith', + { to: ADDR.target, data, payGasWith: {} }, + AGENTIC_ERROR_CODE.NOT_ALLOWED_IN_AGENTIC_MODE, + ], + [ + 'migration', + { + to: { address: ADDR.target, chain: CHAIN.ETHEREUM_SEPOLIA }, + migration: true, + }, + AGENTIC_ERROR_CODE.NOT_ALLOWED_IN_AGENTIC_MODE, + ], + [ + 'funds on a Push send', + { to: ADDR.target, funds: { amount: BigInt(1) } }, + AGENTIC_ERROR_CODE.NOT_ALLOWED_IN_AGENTIC_MODE, + ], + ])('%s', async (_name, params, code) => { + const { rt, ctx } = setup('agent'); + await expect(agenticSend(rt, ctx, params as never)).rejects.toMatchObject({ + code, + }); + expect(rt.executeMock).not.toHaveBeenCalled(); + }); + + it('read-only clients never sign', async () => { + const { fake, ctx } = setup('owner'); + const rt = mockRuntime(fake, { signer: ADDR.owner, readOnly: true }); + await expect( + agenticSend(rt, ctx, { to: ADDR.target, data }) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.READ_ONLY, + }); + expect(rt.executeMock).not.toHaveBeenCalled(); + }); + + it.each([true, false])( + 'agent native arrays require an atomic sender-preserving transport (Push EOA=%s)', + async (native) => { + const { rt, ctx } = setup('agent'); + rt.signerIsPushNative = () => native; + const calls = [ + { to: ADDR.target, value: BigInt(0), data }, + { to: ADDR.target, value: BigInt(1), data }, + ]; + const tx = await agenticSend(rt, ctx, { to: ADDR.target, data: calls }); + expect(rt.executeMock).not.toHaveBeenCalled(); + expect(rt.atomicMock).toHaveBeenCalledTimes(1); + const batch = rt.atomicMock.mock.calls[0][0].data as { + to: Address; + value: bigint; + data: Hex; + }[]; + expect(batch.map((c) => c.to)).toEqual([ctx.wallet, ctx.wallet]); + expect(batch.map((c) => v6.decodeWalletCall(c.data))).toEqual( + calls.map((c) => ({ + kind: 'executeAsAgent', + rulesId: ruleId(1), + mode: `0x${'00'.repeat(32)}`, + calls: [{ target: c.to, value: c.value, data: c.data }], + })) + ); + expect(tx.agentic?.nativeCalls).toEqual(calls); + } + ); + + it('empty native arrays fail before any transport is called', async () => { + const { rt, ctx } = setup('agent'); + await expect( + agenticSend(rt, ctx, { to: ADDR.target, data: [] }) + ).rejects.toMatchObject({ code: AGENTIC_ERROR_CODE.INVALID_RULE }); + expect(rt.executeMock).not.toHaveBeenCalled(); + expect(rt.atomicMock).not.toHaveBeenCalled(); + }); + + it('NO_RULES_FOR_CHAIN and AMBIGUOUS_RULE are pre-signature', async () => { + const none = setup('agent', () => []); + await expect( + agenticSend(none.rt, none.ctx, { to: ADDR.target, data }) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.NO_RULES_FOR_CHAIN, + }); + const dup = setup('agent', (f) => [ + f.nativeRule(ADDR.agent, ruleId(1)), + f.nativeRule(ADDR.agent, ruleId(2)), + ]); + await expect( + agenticSend(dup.rt, dup.ctx, { to: ADDR.target, data }) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.AMBIGUOUS_RULE, + }); + expect(none.rt.executeMock).not.toHaveBeenCalled(); + expect(dup.rt.executeMock).not.toHaveBeenCalled(); + }); + + it('an external agent whose deployed UEA cannot pay Push gas fails loudly; an undeployed UEA takes the first-use path', async () => { + const { fake, ctx } = setup('agent'); + const poor = mockRuntime(fake, { + signer: ADDR.agent, + signerIsPushNative: () => false, + signerAccountDeployed: async () => true, + signerBalance: async () => BigInt(5), + getGasPrice: async () => BigInt(1), + }); + await expect( + agenticSend(poor, ctx, { to: ADDR.target, data }) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.AGENT_GAS_INSUFFICIENT, + }); + expect(poor.executeMock).not.toHaveBeenCalled(); + const firstUse = mockRuntime(fake, { + signer: ADDR.agent, + signerIsPushNative: () => false, + signerAccountDeployed: async () => false, + signerBalance: async () => BigInt(0), + }); + await agenticSend(firstUse, ctx, { to: ADDR.target, data }); + expect(firstUse.executeMock).toHaveBeenCalledTimes(1); + }); +}); + +describe('explicit Push destinations', () => { + it('a ChainTarget on the connected Push chain is a native send, same as a bare address', async () => { + const { rt, ctx } = setup('agent'); + const tx = await agenticSend(rt, ctx, { + to: { address: ADDR.target, chain: CHAIN.PUSH_TESTNET_DONUT }, + data, + }); + expect( + v6.decodeWalletCall(rt.executeMock.mock.calls[0][0].data) + ).toMatchObject({ kind: 'executeAsAgent', rulesId: ruleId(1) }); + expect(tx.route).not.toBe('UOA_TO_CEA'); + expect(tx.to).toBe(ADDR.target); + }); + + it('the owner door treats it the same way', async () => { + const { rt, ctx } = setup('owner'); + await agenticSend(rt, ctx, { + to: { address: ADDR.target, chain: CHAIN.PUSH_TESTNET }, + data, + }); + expect( + v6.decodeWalletCall(rt.executeMock.mock.calls[0][0].data) + ).toMatchObject({ kind: 'execute', calls: [{ target: ADDR.target }] }); + }); + + it('another Push network is refused, not routed outbound', async () => { + const { rt, ctx } = setup('owner'); + await expect( + agenticSend(rt, ctx, { + to: { address: ADDR.target, chain: CHAIN.PUSH_MAINNET }, + data, + }) + ).rejects.toThrow(/other than the connected network/); + expect(rt.executeMock).not.toHaveBeenCalled(); + }); +}); + +describe('native wrapping and logical identity', () => { + it('agent door: executeAsAgent(selected rule, exact call); response shows the wallet as from', async () => { + const { rt, ctx, w } = setup('agent'); + const perCall = jest.fn(); + const tx = await agenticSend( + rt, + ctx, + { to: ADDR.target, data, value: BigInt(3) }, + { progressHook: perCall } + ); + const sent = rt.executeMock.mock.calls[0][0]; + expect(sent.to).toBe(w.address); + expect(sent.value).toBe(BigInt(0)); + expect(v6.decodeWalletCall(sent.data)).toEqual({ + kind: 'executeAsAgent', + rulesId: ruleId(1), + mode: `0x${'00'.repeat(32)}`, + calls: [{ target: ADDR.target, value: BigInt(3), data }], + }); + expect(tx).toMatchObject({ + from: w.address, + to: ADDR.target, + data, + value: BigInt(3), + }); + expect(tx.origin).toContain(ADDR.agent); + expect(tx.agentic).toMatchObject({ + wallet: w.address, + door: 'agent', + rulesId: ruleId(1), + rawTo: w.address, + }); + const ids = rt.events.map((e) => e.id); + expect(ids).toEqual([ + PROGRESS_HOOK.AGENTIC_TX_107, + PROGRESS_HOOK.AGENTIC_TX_199_01, + ]); + expect(perCall).toHaveBeenCalledTimes(2); + expect(rt.executeMock.mock.calls[0][1]).toMatchObject({ + progressHook: perCall, + }); + }); + + it('owner door: arrays become one atomic execute(batch)', async () => { + const { rt, ctx } = setup('owner'); + await agenticSend(rt, ctx, { + to: ADDR.target, + data: [ + { to: ADDR.target, value: BigInt(0), data }, + { to: ADDR.other, value: BigInt(1), data: '0x' }, + ], + }); + const decoded = v6.decodeWalletCall(rt.executeMock.mock.calls[0][0].data); + expect(decoded).toMatchObject({ + kind: 'execute', + mode: `0x01${'00'.repeat(31)}`, + }); + expect((decoded as { calls: unknown[] }).calls).toHaveLength(2); + }); + + it('wallet waits report the wallet on the receipt too', async () => { + const { rt, ctx, w } = setup('agent'); + const tx = await agenticSend(rt, ctx, { to: ADDR.target, data }); + expect((await tx.wait()).from).toBe(w.address); + }); + + it('an on-chain policy revert becomes AgenticRevertError with the decoded gate and 199-02', async () => { + const { fake, ctx } = setup('agent'); + const rt = mockRuntime(fake, { + signer: ADDR.agent, + execute: async () => { + throw new PushChainExecutionError( + 'Execution reverted with reason: custom error 0xf4270752: 8bb88ba100000000000000000000000000000000000000000000000000000000.' + ); + }, + }); + const err = await agenticSend(rt, ctx, { to: ADDR.target, data }).catch( + (e) => e + ); + expect(err).toBeInstanceOf(AgenticRevertError); + expect(err).toBeInstanceOf(PushChainExecutionError); + expect(err.decodedError.name).toBe('PolicyCheckReverted(CallLimitReached)'); + const failed = rt.events.find( + (e) => e.id === PROGRESS_HOOK.AGENTIC_TX_199_02 + ); + expect(failed?.response).toMatchObject({ + decodedError: { name: 'PolicyCheckReverted(CallLimitReached)' }, + }); + }); +}); + +describe('EVM outbound composition from the wallet', () => { + const token = getAddress('0x0000000000000000000000000000000000007070'); + const universalSetup = () => { + const s = setup('agent', (f) => [ + { + ...f.nativeRule(ADDR.agent, ruleId(5)), + mode: 0, + chain: SEPOLIA_NS, + actionIds: [], + universal: { + assets: [{ token }], + expectedCEA: getAddress('0x000000000000000000000000000000000000cea1'), + maxGasPerCall: BigInt(5000), + }, + }, + ]); + // universal action id is (gateway, sendUniversalTxOutbound) + s.w.rules[0].actionIds = [actionId(ADDR.gateway, '0x77b86bec')]; + s.fake.balances.set( + `pc:${s.w.address.toLowerCase()}`, + BigInt(10) ** BigInt(18) + ); + s.fake.balances.set(`balanceOf:${token.toLowerCase()}`, BigInt(1000)); + s.fake.balances.set(`allowance:${token.toLowerCase()}`, BigInt(500)); + return s; + }; + const send = (amount?: bigint) => ({ + to: { address: ADDR.target, chain: CHAIN.ETHEREUM_SEPOLIA }, + data, + ...(amount + ? { + funds: { + amount, + token: { + symbol: 'USDC', + decimals: 6, + address: token, + mechanism: 'approve' as const, + }, + }, + } + : {}), + }); + + it.each([ + [false, undefined, BigInt(2_000_000)], + // Token export plus a call: transfer + call exceed the network base. + [true, undefined, BigInt(1_000_000)], + [false, BigInt(123456), BigInt(123456)], + [true, BigInt(123456), BigInt(123456)], + [false, BigInt(0), BigInt(0)], + ])( + 'destination gas: deployed=%s explicit=%s quotes %s', + async (isDeployed, gasLimit, expected) => { + const s = universalSetup(); + const quoteOutbound = jest.fn(async (_token: Address, _gas: bigint) => ({ + protocolFee: BigInt(100), + nativeValueForGas: BigInt(1000), + gasLimitUsed: BigInt(200_000), + })); + const rt = mockRuntime(s.fake, { + signer: ADDR.agent, + resolvePrc20: () => token, + resolveCEA: async () => ({ + cea: getAddress('0x000000000000000000000000000000000000cea1'), + isDeployed, + }), + quoteOutbound, + }); + await agenticSend(rt, s.ctx, { + ...send(BigInt(100)), + ...(gasLimit === undefined ? {} : { gasLimit }), + }); + expect(quoteOutbound.mock.calls[0][1]).toBe(expected); + } + ); + + it.each([ + ['a single call without a token export', undefined, BigInt(0)], + ['a native-value export with one call', BigInt(5), BigInt(0)], + ])( + 'destination gas on a deployed CEA keeps the network base for %s', + async (_label, value, expected) => { + const s = universalSetup(); + const native = getAddress('0x0000000000000000000000000000000000007171'); + s.fake.balances.set(`balanceOf:${native.toLowerCase()}`, BigInt(10)); + const quoteOutbound = jest.fn(async (_token: Address, _gas: bigint) => ({ + protocolFee: BigInt(100), + nativeValueForGas: BigInt(1000), + gasLimitUsed: BigInt(200_000), + })); + const rt = mockRuntime(s.fake, { + signer: ADDR.agent, + resolvePrc20: (t: unknown) => (t === undefined ? native : token), + resolveCEA: async () => ({ + cea: getAddress('0x000000000000000000000000000000000000cea1'), + isDeployed: true, + }), + quoteOutbound, + }); + await agenticSend(rt, s.ctx, { + ...send(), + ...(value === undefined ? {} : { value }), + }); + expect(quoteOutbound.mock.calls[0][1]).toBe(expected); + } + ); + + it('builds the policy-compatible request: empty recipient, wallet refund, nonzero gas cap, multicall payload, CEA of the wallet', async () => { + const s = universalSetup(); + const resolveCEA = jest.fn(async () => ({ + cea: getAddress('0x000000000000000000000000000000000000cea1'), + isDeployed: true, + })); + const rt = mockRuntime(s.fake, { + signer: ADDR.agent, + resolveCEA, + resolvePrc20: () => token, + }); + const tx = await agenticSend(rt, s.ctx, send(BigInt(100))); + expect(resolveCEA).toHaveBeenCalledWith( + s.w.address, + CHAIN.ETHEREUM_SEPOLIA + ); + const outer = v6.decodeWalletCall(rt.executeMock.mock.calls[0][0].data) as { + kind: string; + rulesId: Hex; + calls: { target: Address; value: bigint; data: Hex }[]; + }; + expect(outer.kind).toBe('executeAsAgent'); + expect(outer.rulesId).toBe(ruleId(5)); + expect(outer.calls[0].target).toBe(ADDR.gateway); + expect(outer.calls[0].value).toBe(BigInt(1100)); + const { args } = decodeFunctionData({ + abi: UNIVERSAL_GATEWAY_PC, + data: outer.calls[0].data, + }); + expect(args[0]).toMatchObject({ + recipient: '0x', + token, + amount: BigInt(100), + maxPCForGas: BigInt(1000), + revertRecipient: s.w.address, + }); + expect((args[0] as { payload: Hex }).payload.startsWith('0x2cc2842d')).toBe( + true + ); + expect(tx).toMatchObject({ + from: s.w.address, + to: token, + data: encodeFunctionData({ + abi: ERC20_EVM, + functionName: 'transfer', + args: [ADDR.target, BigInt(100)], + }), + route: 'UOA_TO_CEA', + chain: CHAIN.ETHEREUM_SEPOLIA, + }); + expect(tx.agentic?.destinationCalls).toHaveLength(2); + expect(tx.agentic?.destinationAccount).toBe( + getAddress('0x000000000000000000000000000000000000cea1') + ); + }); + + it('agent sends without a standing allowance; the wallet handles approval', async () => { + const s = universalSetup(); + s.fake.balances.set(`allowance:${token.toLowerCase()}`, BigInt(10)); + const rt = mockRuntime(s.fake, { + signer: ADDR.agent, + resolvePrc20: () => token, + }); + await agenticSend(rt, s.ctx, send(BigInt(100))); + expect(rt.executeMock).toHaveBeenCalledTimes(1); + expect(s.fake.calls.some((c) => c.functionName === 'allowance')).toBe( + false + ); + }); + + it('wallet funding is checked locally; rule PC limits are enforced by the contract', async () => { + const s = universalSetup(); + s.fake.balances.set(`pc:${s.w.address.toLowerCase()}`, BigInt(10)); + const rt = mockRuntime(s.fake, { + signer: ADDR.agent, + resolvePrc20: () => token, + }); + await expect(agenticSend(rt, s.ctx, send())).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.WALLET_BALANCE_INSUFFICIENT, + }); + const s2 = universalSetup(); + const pricey = mockRuntime(s2.fake, { + signer: ADDR.agent, + resolvePrc20: () => token, + quoteOutbound: async () => ({ + protocolFee: BigInt(100), + nativeValueForGas: BigInt(10_000), + gasLimitUsed: BigInt(1), + }), + }); + const response = await agenticSend(pricey, s2.ctx, send()); + expect(pricey.executeMock).toHaveBeenCalledTimes(1); + expect(response.agentic?.rulesId).toBe(ruleId(5)); + }); + + it('a committed destination account that no longer matches derivation is drift, not a send', async () => { + const s = universalSetup(); + const rt = mockRuntime(s.fake, { + signer: ADDR.agent, + resolvePrc20: () => token, + resolveCEA: async () => ({ + cea: getAddress('0x000000000000000000000000000000000000dead'), + isDeployed: true, + }), + }); + await expect(agenticSend(rt, s.ctx, send())).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.INCONSISTENT_READ, + }); + }); + + it('a zero gas quote is refused (URP rejects an uncapped gas swap)', async () => { + const s = universalSetup(); + const rt = mockRuntime(s.fake, { + signer: ADDR.agent, + resolvePrc20: () => token, + quoteOutbound: async () => ({ + protocolFee: BigInt(1), + nativeValueForGas: BigInt(0), + gasLimitUsed: BigInt(1), + }), + }); + await expect(agenticSend(rt, s.ctx, send())).rejects.toThrow( + /uncapped gas swap/ + ); + }); + + it('SVM destinations reject EVM-width program addresses', async () => { + const s = universalSetup(); + const rt = mockRuntime(s.fake, { signer: ADDR.agent }); + await expect( + agenticSend( + rt, + { ...s.ctx, door: 'owner' }, + { to: { address: ADDR.target, chain: CHAIN.SOLANA_DEVNET }, data } + ) + ).rejects.toMatchObject({ + code: AGENTIC_ERROR_CODE.INVALID_RULE, + }); + }); + + it('owner door never writes an allowance: it sends only the outbound and consumes the existing allowance', async () => { + const s = universalSetup(); + s.ctx.door = 'owner'; + s.ctx.signerPushAccount = ADDR.owner; + const rt = mockRuntime(s.fake, { + signer: ADDR.owner, + resolvePrc20: () => token, + }); + await agenticSend(rt, s.ctx, send(BigInt(100))); + const outer = v6.decodeWalletCall(rt.executeMock.mock.calls[0][0].data) as { + kind: string; + calls: { target: Address; data: Hex }[]; + }; + expect(outer.kind).toBe('execute'); + expect(outer.calls.map((c) => c.target)).toEqual([ADDR.gateway]); + }); + + it('owner sends without a standing allowance', async () => { + const s = universalSetup(); + s.ctx.door = 'owner'; + s.ctx.signerPushAccount = ADDR.owner; + s.fake.balances.set(`allowance:${token.toLowerCase()}`, BigInt(10)); + const rt = mockRuntime(s.fake, { + signer: ADDR.owner, + resolvePrc20: () => token, + }); + await agenticSend(rt, s.ctx, send(BigInt(100))); + expect(rt.executeMock).toHaveBeenCalledTimes(1); + expect(s.fake.calls.some((c) => c.functionName === 'allowance')).toBe( + false + ); + }); + + it('an existing unlimited allowance is consumed as-is', async () => { + const s = universalSetup(); + s.ctx.door = 'owner'; + s.ctx.signerPushAccount = ADDR.owner; + s.fake.balances.set(`allowance:${token.toLowerCase()}`, maxUint256); + const rt = mockRuntime(s.fake, { + signer: ADDR.owner, + resolvePrc20: () => token, + }); + await expect( + agenticSend(rt, s.ctx, send(BigInt(100))) + ).resolves.toBeDefined(); + }); + + it('a transfer-only ERC-20 outbound instructs a transfer to the requested recipient', async () => { + const s = universalSetup(); + s.ctx.door = 'owner'; + s.ctx.signerPushAccount = ADDR.owner; + const rt = mockRuntime(s.fake, { + signer: ADDR.owner, + resolvePrc20: () => token, + }); + const recipient = getAddress('0x00000000000000000000000000000000000ab0b0'); + const usdc = { + symbol: 'USDC', + decimals: 6, + address: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238', + mechanism: 'approve' as const, + }; + const tx = await agenticSend(rt, s.ctx, { + to: { address: recipient, chain: CHAIN.ETHEREUM_SEPOLIA }, + funds: { amount: BigInt(100), token: usdc }, + }); + const outer = v6.decodeWalletCall(rt.executeMock.mock.calls[0][0].data) as { + calls: { data: Hex }[]; + }; + const { args } = decodeFunctionData({ + abi: UNIVERSAL_GATEWAY_PC, + data: outer.calls[0].data, + }); + const payload = (args[0] as { payload: Hex }).payload; + const [calls] = decodeAbiParameters( + [ + { + type: 'tuple[]', + components: [ + { name: 'to', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'data', type: 'bytes' }, + ], + }, + ], + `0x${payload.slice(10)}` + ); + expect(calls).toHaveLength(1); + expect(getAddress(calls[0].to)).toBe(getAddress(usdc.address)); + expect( + decodeFunctionData({ abi: ERC20_EVM, data: calls[0].data }).args + ).toEqual([recipient, BigInt(100)]); + expect(tx.to).toBe(getAddress(usdc.address)); + expect(tx.data).toBe(calls[0].data); + expect(tx.agentic?.destinationCalls).toEqual( + calls.map((c) => ({ ...c, to: getAddress(c.to) })) + ); + }); + + it('a value-only outbound burns the native PRC20 for that value and forwards it to the recipient', async () => { + const s = universalSetup(); + s.ctx.door = 'owner'; + s.ctx.signerPushAccount = ADDR.owner; + const native = getAddress('0x0000000000000000000000000000000000000e7e'); + s.fake.balances.set(`balanceOf:${native.toLowerCase()}`, BigInt(1000)); + s.fake.balances.set(`allowance:${native.toLowerCase()}`, BigInt(1000)); + const rt = mockRuntime(s.fake, { + signer: ADDR.owner, + resolvePrc20: () => native, + }); + await agenticSend(rt, s.ctx, { + to: { address: ADDR.other, chain: CHAIN.ETHEREUM_SEPOLIA }, + value: BigInt(7), + }); + const outer = v6.decodeWalletCall(rt.executeMock.mock.calls[0][0].data) as { + calls: { data: Hex }[]; + }; + const req = decodeFunctionData({ + abi: UNIVERSAL_GATEWAY_PC, + data: outer.calls[0].data, + }).args[0] as { amount: bigint; payload: Hex }; + expect(req.amount).toBe(BigInt(7)); + expect(req.payload.toLowerCase()).toContain( + ADDR.other.slice(2).toLowerCase() + ); + }); + + it('an outbound with no destination call (parking in the CEA) is refused before signing', async () => { + const s = universalSetup(); + s.ctx.door = 'owner'; + s.ctx.signerPushAccount = ADDR.owner; + const cea = getAddress('0x000000000000000000000000000000000000cea1'); + const rt = mockRuntime(s.fake, { + signer: ADDR.owner, + resolvePrc20: () => token, + resolveCEA: async () => ({ cea, isDeployed: true }), + }); + await expect( + agenticSend(rt, s.ctx, { + to: { address: cea, chain: CHAIN.ETHEREUM_SEPOLIA }, + value: BigInt(1), + }) + ).rejects.toThrow(/no destination call/); + expect(rt.executeMock).not.toHaveBeenCalled(); + }); + + it('an agent value-only destination call is refused before signing (the policy admits only allow-listed calls)', async () => { + const s = universalSetup(); + const rt = mockRuntime(s.fake, { + signer: ADDR.agent, + resolvePrc20: () => token, + }); + await expect( + agenticSend(rt, s.ctx, { + to: { address: ADDR.other, chain: CHAIN.ETHEREUM_SEPOLIA }, + funds: { + amount: BigInt(1), + token: { + symbol: 'X', + decimals: 6, + address: token, + mechanism: 'native', + }, + }, + }) + ).rejects.toThrow(/no function selector/); + }); + + it('more than 10 destination calls are refused', async () => { + const s = universalSetup(); + const rt = mockRuntime(s.fake, { + signer: ADDR.agent, + resolvePrc20: () => token, + }); + await expect( + agenticSend(rt, s.ctx, { + to: { address: ADDR.target, chain: CHAIN.ETHEREUM_SEPOLIA }, + data: Array.from({ length: 11 }, () => ({ + to: ADDR.target, + value: BigInt(0), + data, + })), + }) + ).rejects.toThrow(/at most 10/); + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/svm-agent-send-defaults.spec.ts b/packages/core/src/lib/agentic/__tests__/svm-agent-send-defaults.spec.ts new file mode 100644 index 00000000..feeec976 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/svm-agent-send-defaults.spec.ts @@ -0,0 +1,77 @@ +import { PublicKey } from '@solana/web3.js'; +import { CHAIN } from '../../constants/enums'; +import { sendPublicSvm } from '../execution/svm-public'; +import { resetAgenticGenerations } from '../deployments'; +import { ADDR, FakeChain, registerFakeGeneration } from './fake-chain'; +import { mockRuntime } from './mock-runtime'; + +const mockPrepare = jest.fn(); +jest.mock('../execution/svm-send', () => ({ + ...jest.requireActual('../execution/svm-send'), + prepareSvmAgentExecution: (...args: unknown[]) => mockPrepare(...args), +})); +jest.mock('../reads/rules', () => ({ + ...jest.requireActual('../reads/rules'), + selectRuleForSend: async () => ({ rulesId: `0x${'ab'.repeat(32)}` }), +})); +jest.mock('../reads/svm', () => ({ + ...jest.requireActual('../reads/svm'), + readSvmConfig: async () => ({ + config: { expectedCEA: `0x${'cc'.repeat(32)}`, assets: [] }, + }), +})); + +afterEach(resetAgenticGenerations); +it.each([undefined, BigInt(0), BigInt(5000)])( + 'agent Solana sends pass gasLimit %s to route sizing unchanged, defaulting to 0', + async (gasLimit) => { + const gen = registerFakeGeneration(); + mockPrepare.mockReset().mockResolvedValue({ + data: '0x1234', + instruction: { + recipient: `0x${'22'.repeat(32)}`, + instructionData: new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]), + accounts: [], + }, + }); + const rt = mockRuntime(new FakeChain(), { + signer: ADDR.agent, + resolvePrc20: () => ADDR.target, + svmMetadata: { + gateway: async () => ({ + chainNamespace: CHAIN.SOLANA_DEVNET, + program: `0x${'22'.repeat(32)}`, + }), + mint: async () => { + throw new Error('No mint read in this send'); + }, + }, + }); + await sendPublicSvm( + rt, + { + wallet: ADDR.other, + door: 'agent', + signerPushAccount: ADDR.agent, + signerOrigin: { chain: CHAIN.PUSH_TESTNET_DONUT, address: ADDR.agent }, + generation: gen, + }, + { + to: { + address: PublicKey.default.toBase58(), + chain: CHAIN.SOLANA_DEVNET, + }, + data: '0x0102030405060708', + funds: { token: ADDR.target as never, amount: BigInt(1) }, + ...(gasLimit === undefined ? {} : { gasLimit }), + } + ); + expect(mockPrepare).toHaveBeenCalledTimes(1); + expect(mockPrepare.mock.calls[0][2]).toMatchObject({ + wallet: ADDR.other, + amount: BigInt(1), + gasLimit: gasLimit ?? BigInt(0), + }); + expect(rt.executeMock).toHaveBeenCalledTimes(1); + } +); diff --git a/packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts b/packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts new file mode 100644 index 00000000..28e76662 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts @@ -0,0 +1,323 @@ +import { PublicKey } from '@solana/web3.js'; +import { bytesToHex, type Hex } from 'viem'; +import { CHAIN } from '../../constants/enums'; +import { createSvmMetadataProvider } from '../management/svm-metadata'; +import { resolveSvmContext } from '../management/svm-context'; +import { Snapshot } from '../reads/snapshot'; +import { + registerIdl, + clearRegistry, +} from '../../orchestrator/svm-idl/registry'; +import { prepareAgwSvmInstruction } from '../execution/svm-instruction'; +import { + deriveAgwSvmValueAccounts, + deriveAgwSvmAta, +} from '../codec/svm-accounts'; +import { ADDR, FakeChain } from './fake-chain'; +import type { SvmTermsWire } from '../codec/svm-terms'; +const key = (b: string) => `0x${b.repeat(32)}` as Hex; +const SPL = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'; +const TOKEN2022 = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'; +const MINT = new PublicKey(Buffer.from(key('44').slice(2), 'hex')); +const PROGRAM = key('33'), + GATEWAY = key('22'); +const genesis = CHAIN.SOLANA_DEVNET.slice(7) + 'abcdefghijk'; +function rpc(owner = SPL, length = 82) { + const data = Buffer.alloc(length); + data[45] = 1; + if (length >= 166) data[165] = 1; + return { + getGenesisHash: jest.fn().mockResolvedValue(genesis), + getAccountInfo: jest.fn().mockResolvedValue({ + owner: new PublicKey(owner), + executable: false, + data, + lamports: 1, + rentEpoch: 0, + }), + }; +} +afterEach(clearRegistry); +describe('SVM metadata and resolved instruction backend', () => { + it.each(['dataless', 'non-anchor', 'wrong-account'])( + 'validates explicit wire accounts for %s instructions', + (kind) => { + const derived = deriveAgwSvmValueAccounts(ADDR.owner, GATEWAY, []); + const dataless = kind === 'dataless'; + const terms: SvmTermsWire = { + ...derived, + validUntil: 9999999999, + assets: [ + { token: ADDR.target, maxPerCall: BigInt(1), maxTotal: BigInt(2) }, + ], + maxGasPerCall: BigInt(10), + programs: [ + { + program: PROGRAM, + discriminator: '0x0100000000000000', + discriminatorLen: dataless ? 0 : 1, + dataless, + maxAccounts: 1, + }, + ], + pins: [ + { ruleIndex: 0, accountIndex: 0, expected: derived.expectedCEA }, + ], + dataPins: [], + }; + const build = () => + prepareAgwSvmInstruction( + { + wallet: ADDR.owner, + chain: CHAIN.SOLANA_DEVNET, + program: PROGRAM, + instructionData: dataless ? new Uint8Array() : new Uint8Array([1]), + accounts: [ + { + pubkey: + kind === 'wrong-account' ? key('66') : derived.expectedCEA, + isWritable: true, + }, + ], + }, + terms + ); + if (kind === 'wrong-account') + expect(build).toThrow('SvmAccountPinMismatch'); + else expect(build().recipient).toBe(PROGRAM); + } + ); + it.each([false, true])( + 'resolves output mint Token-2022 ownership, rejecting a wrong supplied program: %s', + async (wrong) => { + const fake = new FakeChain(); + fake.readContract = async ({ functionName }) => + functionName === 'gasTokenPRC20ByChainNamespace' + ? ADDR.other + : functionName === 'SOURCE_CHAIN_NAMESPACE' + ? CHAIN.SOLANA_DEVNET + : ''; + const mint = key('55'); + const metadata = { + gateway: async () => ({ + chainNamespace: CHAIN.SOLANA_DEVNET, + program: GATEWAY, + }), + mint: async () => ({ mint, tokenProgram: TOKEN2022 }), + }; + const promise = resolveSvmContext( + new Snapshot(fake, BigInt(1)), + ADDR.owner, + CHAIN.SOLANA_DEVNET, + [{ token: ADDR.other, maxPerCall: BigInt(1), maxTotal: BigInt(2) }], + metadata, + [{ mint, ...(wrong ? { tokenProgram: SPL } : {}) }] + ); + if (wrong) + await expect(promise).rejects.toThrow( + 'output mint/token-program mismatch' + ); + else { + const ctx = await promise; + expect(ctx.ceaAccounts).toEqual([ + ctx.expectedCEA, + deriveAgwSvmAta(ctx.expectedCEA, { mint, tokenProgram: TOKEN2022 }), + ]); + } + } + ); + it.each([ + [SPL, 82], + [TOKEN2022, 82], + [TOKEN2022, 166], + ])('reads initialized mint owner %s length %s', async (owner, length) => { + const r = rpc(owner, length); + const provider = createSvmMetadataProvider( + { + [CHAIN.SOLANA_DEVNET]: { + gatewayProgram: GATEWAY, + rpcUrls: ['http://fixture'], + }, + }, + () => r + ); + expect( + await provider.mint(CHAIN.SOLANA_DEVNET, bytesToHex(MINT.toBytes())) + ).toEqual({ mint: MINT.toBase58(), tokenProgram: owner }); + expect(await provider.gateway(CHAIN.SOLANA_DEVNET)).toEqual({ + chainNamespace: CHAIN.SOLANA_DEVNET, + program: GATEWAY, + }); + }); + it('rejects wrong cluster RPCs and falls back to the configured correct cluster', async () => { + const wrong = rpc(), + correct = rpc(); + wrong.getGenesisHash.mockResolvedValue('wrong-genesis'); + const provider = createSvmMetadataProvider( + { + [CHAIN.SOLANA_DEVNET]: { + gatewayProgram: GATEWAY, + rpcUrls: ['wrong', 'right'], + }, + }, + (url) => (url === 'wrong' ? wrong : correct) + ); + await provider.mint(CHAIN.SOLANA_DEVNET, bytesToHex(MINT.toBytes())); + expect(wrong.getAccountInfo).not.toHaveBeenCalled(); + expect(correct.getAccountInfo).toHaveBeenCalledTimes(1); + }); + it.each([ + 'missing', + 'executable', + 'token-account', + 'uninitialized', + 'wrong-owner', + ])('rejects %s as a mint', async (kind) => { + const r = rpc(), + info = await r.getAccountInfo(); + if (kind === 'missing') r.getAccountInfo.mockResolvedValue(null); + else { + if (kind === 'executable') info.executable = true; + if (kind === 'token-account') info.data = Buffer.alloc(165); + if (kind === 'uninitialized') info.data[45] = 0; + if (kind === 'wrong-owner') info.owner = PublicKey.default; + r.getAccountInfo.mockResolvedValue(info); + } + const p = createSvmMetadataProvider( + { + [CHAIN.SOLANA_DEVNET]: { + gatewayProgram: GATEWAY, + rpcUrls: ['fixture'], + }, + }, + () => r + ); + await expect( + p.mint(CHAIN.SOLANA_DEVNET, bytesToHex(MINT.toBytes())) + ).rejects.toMatchObject({ code: 'INVALID_RULE' }); + }); + it('requires a configured gateway/RPC, rather than choosing a devnet default', async () => { + await expect( + createSvmMetadataProvider({}).gateway(CHAIN.SOLANA_DEVNET) + ).rejects.toMatchObject({ code: 'INVALID_RULE' }); + }); + it('pins all PRC20 reads and rejects a source-chain mismatch', async () => { + const fake = new FakeChain(); + fake.readContract = jest.fn(async ({ functionName }) => + functionName === 'gasTokenPRC20ByChainNamespace' + ? ADDR.other + : CHAIN.ETHEREUM_SEPOLIA + ); + const snap = new Snapshot(fake, BigInt(123)); + const metadata = { + gateway: async () => ({ + chainNamespace: CHAIN.SOLANA_DEVNET, + program: GATEWAY, + }), + mint: jest.fn(), + }; + await expect( + resolveSvmContext( + snap, + ADDR.owner, + CHAIN.SOLANA_DEVNET, + [{ token: ADDR.target, maxPerCall: BigInt(1), maxTotal: BigInt(2) }], + metadata + ) + ).rejects.toMatchObject({ code: 'ASSET_CHAIN_MISMATCH' }); + expect( + (fake.readContract as jest.Mock).mock.calls.every( + ([arg]) => arg.blockNumber === BigInt(123) + ) + ).toBe(true); + }); + it('rejects registry and mint substitution', async () => { + const fake = new FakeChain(); + fake.readContract = async ({ functionName }) => + functionName === 'gasTokenPRC20ByChainNamespace' + ? ADDR.other + : functionName === 'SOURCE_CHAIN_NAMESPACE' + ? CHAIN.SOLANA_DEVNET + : MINT.toBase58(); + const snap = new Snapshot(fake, BigInt(1)), + caps = [ + { token: ADDR.target, maxPerCall: BigInt(1), maxTotal: BigInt(2) }, + ]; + await expect( + resolveSvmContext(snap, ADDR.owner, CHAIN.SOLANA_DEVNET, caps, { + gateway: async () => ({ + chainNamespace: CHAIN.SOLANA_TESTNET, + program: GATEWAY, + }), + mint: jest.fn(), + }) + ).rejects.toThrow('cluster mismatch'); + await expect( + resolveSvmContext(snap, ADDR.owner, CHAIN.SOLANA_DEVNET, caps, { + gateway: async () => ({ + chainNamespace: CHAIN.SOLANA_DEVNET, + program: GATEWAY, + }), + mint: async () => ({ mint: key('55'), tokenProgram: SPL }), + }) + ).rejects.toThrow('different mint'); + }); + it('derives the wallet authority for IDL accounts, not the signer/default gateway authority', () => { + const derived = deriveAgwSvmValueAccounts(ADDR.owner, GATEWAY, []); + const program = new PublicKey( + Buffer.from(PROGRAM.slice(2), 'hex') + ).toBase58(); + registerIdl({ + address: program, + metadata: { name: 'fixture', version: '1', spec: '0.1.0' }, + instructions: [ + { + name: 'go', + discriminator: [1, 2, 3, 4, 5, 6, 7, 8], + accounts: [{ name: 'cea_authority', writable: true }], + args: [], + }, + ], + }); + const t: SvmTermsWire = { + ...derived, + validUntil: 9999999999, + assets: [ + { token: ADDR.target, maxPerCall: BigInt(1), maxTotal: BigInt(2) }, + ], + maxGasPerCall: BigInt(10), + programs: [ + { + program: PROGRAM, + discriminator: '0x0102030405060708', + discriminatorLen: 8, + dataless: false, + maxAccounts: 1, + }, + ], + pins: [{ ruleIndex: 0, accountIndex: 0, expected: derived.expectedCEA }], + dataPins: [], + }; + const out = prepareAgwSvmInstruction( + { + wallet: ADDR.owner, + chain: CHAIN.SOLANA_DEVNET, + program, + instructionData: new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]), + }, + t + ); + expect(out.accounts[0].pubkey).toBe(derived.expectedCEA); + expect(() => + prepareAgwSvmInstruction( + { + wallet: ADDR.owner, + chain: CHAIN.SOLANA_DEVNET, + program, + instructionData: new Uint8Array([9, 2, 3, 4, 5, 6, 7, 8]), + }, + t + ) + ).toThrow(/discriminator/); + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts b/packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts new file mode 100644 index 00000000..e752336d --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts @@ -0,0 +1,177 @@ +import type { Idl } from '@coral-xyz/anchor'; +import { PublicKey } from '@solana/web3.js'; +import { encodeAnchorIxData } from '../../orchestrator/svm-idl/ix-encoder'; +import type { SolanaRule } from '../agentic.types'; +import { compileSvmIdlRule, type SvmResolvedContext } from '../codec/svm-idl'; +import { SvmDataPinMode } from '../codec/svm-terms'; +import { + encodeAgwSvmPayload, + validateAgwSvmPayload, +} from '../execution/svm-payload'; +import { ADDR } from './fake-chain'; +import type { Hex } from 'viem'; +const key = (c: string) => `0x${c.repeat(64)}` as Hex; +const program = key('3'), + cea = key('4'), + mint = key('5'), + ata = key('6'); +const idl: Idl = { + address: new PublicKey(Buffer.from(program.slice(2), 'hex')).toBase58(), + metadata: { name: 'test', version: '1', spec: '0.1.0' }, + instructions: [ + { + name: 'deposit', + discriminator: [1, 2, 3, 4, 5, 6, 7, 8], + accounts: [ + { name: 'cea', writable: true }, + { name: 'token', writable: true }, + ], + args: [ + { name: 'flag', type: 'u8' }, + { name: 'amount', type: 'u64' }, + { name: 'minimum', type: 'u64' }, + ], + }, + ], +}; +const ctx: SvmResolvedContext = { + expectedCEA: cea, + gatewayProgram: key('2'), + ceaAccounts: [cea, ata], + assets: [ + { token: ADDR.target, maxPerCall: BigInt(10), maxTotal: BigInt(100) }, + ], + tokenAccounts: new Map([[mint, ata]]), +}; +const input = (): SolanaRule => ({ + agent: ADDR.agent, + chainNamespace: 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1', + validUntil: 100, + assets: [], + maxGasPerCall: BigInt(10), + allowedInstructions: [ + { + program, + instruction: { idl, name: 'deposit' }, + accounts: [ + { name: 'cea', expected: { kind: 'walletCEA' } }, + { name: 'token', expected: { kind: 'walletATA', token: mint } }, + ], + fields: [ + { name: 'flag', equals: BigInt(1) }, + { name: 'amount', max: BigInt(10) }, + { + numerator: 'amount', + denominator: 'minimum', + minRatio: { num: BigInt(2), den: BigInt(1) }, + }, + ], + }, + ], +}); +describe('named SVM IDL rule compilation', () => { + it('enforces named constraints against independently Borsh-encoded data', () => { + const terms = compileSvmIdlRule(input(), ctx, 0); + expect(terms.pins.map((p) => p.expected)).toEqual([cea, ata]); + expect(terms.dataPins.map((p) => [p.offset, p.len, p.mode])).toEqual([ + [8, 1, SvmDataPinMode.EQ], + [9, 8, SvmDataPinMode.LTE_LE], + [9, 8, SvmDataPinMode.RATIO_GTE_LE], + ]); + const payload = (amount: bigint, minimum: bigint) => + encodeAgwSvmPayload( + program, + [ + { pubkey: cea, isWritable: true }, + { pubkey: ata, isWritable: true }, + ], + encodeAnchorIxData(idl, 'deposit', [1, amount, minimum]) + ); + expect( + validateAgwSvmPayload(terms, program, payload(BigInt(10), BigInt(5))) + ).toBe(0); + expect(() => + validateAgwSvmPayload(terms, program, payload(BigInt(11), BigInt(5))) + ).toThrow('SvmDataCeilingExceeded'); + expect(() => + validateAgwSvmPayload(terms, program, payload(BigInt(9), BigInt(5))) + ).toThrow('SvmDataRatioNotMet'); + }); + it.each([ + [ + 'unknown account', + (r: SolanaRule) => { + r.allowedInstructions[0].accounts[0].name = 'wrong'; + }, + ], + [ + 'unlisted ATA', + (r: SolanaRule) => { + r.allowedInstructions[0].accounts[1].expected = { + kind: 'walletATA', + token: key('7'), + }; + }, + ], + [ + 'unknown field', + (r: SolanaRule) => { + r.allowedInstructions[0].fields = [{ name: 'wrong', max: BigInt(2) }]; + }, + ], + [ + 'overflow', + (r: SolanaRule) => { + r.allowedInstructions[0].fields = [{ name: 'flag', max: BigInt(256) }]; + }, + ], + [ + 'duplicate instruction', + (r: SolanaRule) => { + r.allowedInstructions.push(r.allowedInstructions[0]); + }, + ], + [ + 'mismatched program', + (r: SolanaRule) => { + r.allowedInstructions[0].program = key('8'); + }, + ], + [ + 'conflicting comparison', + (r: SolanaRule) => { + r.allowedInstructions[0].fields = [ + { name: 'flag', min: BigInt(0), max: BigInt(1) } as never, + ]; + }, + ], + ])('rejects %s', (_name, mutate) => { + const r = input(); + mutate(r); + expect(() => compileSvmIdlRule(r, ctx, 0)).toThrow(); + }); + it.each(['bytes', 'string', { vec: 'u8' }, { defined: { name: 'Unknown' } }])( + 'refuses unsupported layouts %j', + (type) => { + const r = input(); + r.allowedInstructions[0].instruction.idl = { + ...idl, + instructions: [ + { + ...idl.instructions[0], + args: [ + { name: 'prefix', type: type as never }, + ...idl.instructions[0].args, + ], + }, + ], + }; + expect(() => compileSvmIdlRule(r, ctx, 0)).toThrow('layout'); + } + ); + it('does not mutate the caller IDL', () => { + const before = JSON.stringify(idl); + compileSvmIdlRule(input(), ctx, 0); + expect(JSON.stringify(idl)).toBe(before); + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts b/packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts new file mode 100644 index 00000000..bb7e3de2 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts @@ -0,0 +1,516 @@ +import { PublicKey } from '@solana/web3.js'; +import { bytesToHex, hexToBytes, numberToHex, type Hex } from 'viem'; +import { + decodeSvmTerms, + encodeSvmTerms, + refuseFromEndPins, + validateSvmTerms, + SvmDataPinMode, + type SvmTermsWire, +} from '../codec/svm-terms'; +import { + deriveAgwSvmAta, + deriveAgwSvmCea, + deriveAgwSvmValueAccounts, + svmKey, + resolveAgwSvmRuleContext, +} from '../codec/svm-accounts'; +import { + encodeAgwSvmPayload, + parseAgwSvmPayload, + validateAgwSvmPayload, +} from '../execution/svm-payload'; +import { composeAgwSvmAction } from '../execution/svm-outbound'; +import { decodeFunctionData } from 'viem'; +import { UNIVERSAL_GATEWAY_PC } from '../../constants/abi'; +import { encodeSvmExecutePayload } from '../../orchestrator/payload-builders'; +import { ADDR } from './fake-chain'; + +const key = (byte: string) => `0x${byte.repeat(32)}` as Hex; +const CEA = key('11'), + GATEWAY = key('22'), + PROGRAM = key('33'), + ATA = key('44'); +const NOW = 1_700_000_000; +const base = (): SvmTermsWire => ({ + validUntil: NOW + 60, + expectedCEA: CEA, + gatewayProgram: GATEWAY, + assets: [{ token: ADDR.target, maxPerCall: BigInt(5), maxTotal: BigInt(10) }], + maxGasPerCall: BigInt(20), + ceaAccounts: [CEA, ATA], + programs: [ + { + program: PROGRAM, + discriminator: '0x0100000000000000', + discriminatorLen: 1, + dataless: false, + maxAccounts: 2, + }, + ], + pins: [ + { ruleIndex: 0, accountIndex: 0, expected: CEA }, + { ruleIndex: 0, accountIndex: 1, expected: ATA }, + ], + dataPins: [], +}); +const accounts = [ + { pubkey: CEA, isWritable: true }, + { pubkey: ATA, isWritable: true }, +]; + +describe('v5 internal SVM wire codec', () => { + it('round-trips ordered per-token caps and all four data-pin modes', () => { + const t = base(); + t.dataPins = [ + { + ruleIndex: 0, + fromEnd: false, + offset: 0, + offsetB: 0, + len: 1, + mode: 0, + expected: key('00'), + num: BigInt(0), + den: BigInt(0), + }, + { + ruleIndex: 0, + fromEnd: true, + offset: 8, + offsetB: 0, + len: 8, + mode: 1, + expected: numberToHex(5, { size: 32 }), + num: BigInt(0), + den: BigInt(0), + }, + { + ruleIndex: 0, + fromEnd: false, + offset: 1, + offsetB: 0, + len: 2, + mode: 2, + expected: numberToHex(65535, { size: 32 }), + num: BigInt(0), + den: BigInt(0), + }, + { + ruleIndex: 0, + fromEnd: true, + offset: 16, + offsetB: 8, + len: 8, + mode: 3, + expected: key('00'), + num: BigInt(9), + den: BigInt(10), + }, + ]; + t.assets = [ + ...t.assets, + { token: ADDR.other, maxPerCall: BigInt(0), maxTotal: BigInt(0) }, + ]; + expect(decodeSvmTerms(encodeSvmTerms(t, NOW))).toEqual(t); + // Existing fromEnd rules stay readable, but new grants refuse them. + expect(() => refuseFromEndPins(t)).toThrow( + expect.objectContaining({ + code: 'INVALID_RULE', + details: { reason: 'FROM_END_PIN_UNSUPPORTED', field: 'dataPins' }, + }) + ); + expect(() => + refuseFromEndPins({ + ...t, + dataPins: t.dataPins.filter((p) => !p.fromEnd), + }) + ).not.toThrow(); + }); + it.each([ + [ + 'expired', + (t: SvmTermsWire) => { + t.validUntil = NOW; + }, + ], + [ + 'zero CEA', + (t: SvmTermsWire) => { + t.expectedCEA = key('00'); + }, + ], + [ + 'empty assets', + (t: SvmTermsWire) => { + t.assets = []; + }, + ], + [ + 'duplicate tokens', + (t: SvmTermsWire) => { + t.assets = [t.assets[0], t.assets[0]]; + }, + ], + [ + 'system program', + (t: SvmTermsWire) => { + t.programs = [{ ...t.programs[0], program: key('00') }]; + }, + ], + [ + 'ambiguous prefixes', + (t: SvmTermsWire) => { + t.programs = [ + ...t.programs, + { + ...t.programs[0], + discriminator: '0x0102000000000000', + discriminatorLen: 2, + }, + ]; + }, + ], + [ + 'missing pin', + (t: SvmTermsWire) => { + t.pins = []; + }, + ], + [ + 'duplicate pin', + (t: SvmTermsWire) => { + t.pins = [t.pins[0], t.pins[0]]; + }, + ], + [ + 'CEA absent', + (t: SvmTermsWire) => { + t.ceaAccounts = [ATA]; + }, + ], + [ + 'fixed count outside bound', + (t: SvmTermsWire) => { + t.programs = [{ ...t.programs[0], maxAccounts: 65 }]; + }, + ], + ])('rejects %s before encoding', (_name, change) => { + const t = base(); + change(t); + expect(() => encodeSvmTerms(t, NOW)).toThrow( + expect.objectContaining({ code: 'INVALID_RULE' }) + ); + }); + it('refuses misleading integer/raw alignment and zero ratio denominators', () => { + const t = base(); + const p = { + ruleIndex: 0, + fromEnd: false, + offset: 1, + offsetB: 3, + len: 2, + mode: SvmDataPinMode.EQ, + expected: numberToHex(5, { size: 32 }), + num: BigInt(0), + den: BigInt(0), + }; + t.dataPins = [p]; + expect(() => validateSvmTerms(t, NOW)).toThrow(/left-aligned/); + t.dataPins = [ + { + ...p, + mode: SvmDataPinMode.GTE_LE, + expected: numberToHex(65536, { size: 32 }), + }, + ]; + expect(() => validateSvmTerms(t, NOW)).toThrow(/width/); + t.dataPins = [ + { + ...p, + mode: SvmDataPinMode.RATIO_GTE_LE, + num: BigInt(1), + den: BigInt(0), + }, + ]; + expect(() => validateSvmTerms(t, NOW)).toThrow(/ratio/); + }); +}); + +describe('wallet-scoped SVM value accounts', () => { + it('derives the exact PDA from wallet20 and the selected gateway', () => { + const result = deriveAgwSvmCea(ADDR.owner, GATEWAY); + const [expected, bump] = PublicKey.findProgramAddressSync( + [Buffer.from('push_identity'), Buffer.from(hexToBytes(ADDR.owner))], + new PublicKey(hexToBytes(GATEWAY)) + ); + expect(result).toEqual({ address: bytesToHex(expected.toBytes()), bump }); + expect(deriveAgwSvmCea(ADDR.agent, GATEWAY).address).not.toBe( + result.address + ); + expect(deriveAgwSvmCea(ADDR.owner, PROGRAM).address).not.toBe( + result.address + ); + expect(PublicKey.isOnCurve(hexToBytes(result.address))).toBe(false); + }); + it('resolved token caps cannot omit their corresponding protected ATAs', () => { + const cap = { + token: ADDR.target, + maxPerCall: BigInt(1), + maxTotal: BigInt(2), + }; + const result = resolveAgwSvmRuleContext( + ADDR.owner, + GATEWAY, + [ + { kind: 'native', cap }, + { kind: 'spl', cap: { ...cap, token: ADDR.other }, mint: PROGRAM }, + ], + [{ mint: ATA }] + ); + expect(result.ceaAccounts).toHaveLength(3); + expect(result.assets.map((a) => a.token)).toEqual([ + ADDR.target, + ADDR.other, + ]); + expect(() => deriveAgwSvmCea(ADDR.owner, key('00'))).toThrow( + /gateway program/ + ); + }); + it('includes input/output ATAs, deduplicates, and separates Token-2022 accounts', () => { + const t = { mint: PROGRAM }, + output = { mint: ATA }; + const derived = deriveAgwSvmValueAccounts( + ADDR.owner, + GATEWAY, + [t, t], + [output] + ); + expect(derived.ceaAccounts).toEqual([ + derived.expectedCEA, + deriveAgwSvmAta(derived.expectedCEA, t), + deriveAgwSvmAta(derived.expectedCEA, output), + ]); + const legacy = deriveAgwSvmAta(derived.expectedCEA, t), + token2022 = deriveAgwSvmAta(derived.expectedCEA, { + ...t, + tokenProgram: 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', + }); + expect(token2022).not.toBe(legacy); + expect(svmKey(new PublicKey(hexToBytes(PROGRAM)).toBase58())).toBe(PROGRAM); + expect(() => + deriveAgwSvmAta(derived.expectedCEA, { mint: key('00') }) + ).toThrow(/native SOL/); + }); +}); + +describe('S12–S18 payload checks', () => { + it('matches the existing node encoder and parses every byte including writable flags', () => { + const payload = encodeAgwSvmPayload( + PROGRAM, + accounts, + new Uint8Array([1, 2, 3]) + ); + expect(payload).toBe( + encodeSvmExecutePayload({ + targetProgram: PROGRAM, + accounts, + ixData: new Uint8Array([1, 2, 3]), + instructionId: 2, + }) + ); + expect(parseAgwSvmPayload(payload)).toMatchObject({ + program: PROGRAM, + instructionData: new Uint8Array([1, 2, 3]), + accounts: [ + { pubkey: CEA, writableFlag: 1 }, + { pubkey: ATA, writableFlag: 1 }, + ], + }); + expect(validateAgwSvmPayload(base(), PROGRAM, payload)).toBe(0); + const raw = hexToBytes(payload); + raw[36] = 7; + expect(parseAgwSvmPayload(bytesToHex(raw)).accounts[0].writableFlag).toBe( + 7 + ); + expect(validateAgwSvmPayload(base(), PROGRAM, bytesToHex(raw))).toBe(0); // URP deliberately ignores flags. + }); + it.each([ + ['trailing data', (p: Hex) => `${p}00` as Hex, 'MalformedSvmPayload'], + ['truncated', (p: Hex) => p.slice(0, -2) as Hex, 'MalformedSvmPayload'], + [ + 'oversized count', + (p: Hex) => `0x00000041${p.slice(10)}` as Hex, + 'SvmAccountsOutOfRange', + ], + ])( + 'rejects %s with the corresponding contract error', + (_name, mutate, error) => { + const p = encodeAgwSvmPayload(PROGRAM, accounts, new Uint8Array([1])); + expect(() => parseAgwSvmPayload(mutate(p))).toThrow( + expect.objectContaining({ details: { contractError: error } }) + ); + } + ); + it('pins prevent key substitution and protected-account aliasing', () => { + const t = base(); + expect(() => + validateAgwSvmPayload( + t, + PROGRAM, + encodeAgwSvmPayload( + PROGRAM, + [{ ...accounts[0], pubkey: GATEWAY }, accounts[1]], + new Uint8Array([1]) + ) + ) + ).toThrow(/SvmAccountPinMismatch/); + t.programs = [{ ...t.programs[0], maxAccounts: 255 }]; + expect(() => + validateAgwSvmPayload( + t, + PROGRAM, + encodeAgwSvmPayload( + PROGRAM, + [...accounts, accounts[0]], + new Uint8Array([1]) + ) + ) + ).toThrow(/CeaAccountAtUnpinnedIndex/); + expect(() => + validateAgwSvmPayload( + t, + GATEWAY, + encodeAgwSvmPayload(PROGRAM, accounts, new Uint8Array([1])) + ) + ).toThrow(/RecipientTargetMismatch/); + }); + it('enforces little-endian floors/ceilings, from-end offsets, ratios and exact byte pins', () => { + const t = base(); + t.dataPins = [ + { + ruleIndex: 0, + fromEnd: true, + offset: 4, + offsetB: 2, + len: 2, + mode: 3, + expected: key('00'), + num: BigInt(9), + den: BigInt(10), + }, + ]; + const make = (out: number, input: number) => + encodeAgwSvmPayload( + PROGRAM, + accounts, + new Uint8Array([1, out & 255, out >> 8, input & 255, input >> 8]) + ); + expect(validateAgwSvmPayload(t, PROGRAM, make(90, 100))).toBe(0); + expect(() => validateAgwSvmPayload(t, PROGRAM, make(89, 100))).toThrow( + /SvmDataRatioNotMet/ + ); + t.dataPins = [ + { + ...t.dataPins[0], + fromEnd: false, + offset: 1, + mode: 1, + expected: numberToHex(90, { size: 32 }), + }, + ]; + expect(() => validateAgwSvmPayload(t, PROGRAM, make(89, 100))).toThrow( + /SvmDataFloorNotMet/ + ); + t.dataPins = [{ ...t.dataPins[0], mode: 2 }]; + expect(() => validateAgwSvmPayload(t, PROGRAM, make(91, 100))).toThrow( + /SvmDataCeilingExceeded/ + ); + t.dataPins = [ + { ...t.dataPins[0], mode: 0, expected: `0x5a00${'00'.repeat(30)}` }, + ]; + expect(validateAgwSvmPayload(t, PROGRAM, make(90, 100))).toBe(0); + expect(() => + validateAgwSvmPayload( + t, + PROGRAM, + encodeAgwSvmPayload(PROGRAM, accounts, new Uint8Array([1])) + ) + ).toThrow(/SvmDataTooShortForPin/); + }); +}); + +describe('internal SVM outbound action', () => { + const config = () => ({ + ...base(), + initialized: true, + maxGasPerCall: BigInt(100), + assets: [ + { + token: ADDR.target, + maxPerCall: BigInt(5), + maxTotal: BigInt(10), + spent: BigInt(2), + }, + ], + }); + const input = () => ({ + wallet: ADDR.owner, + gateway: ADDR.gateway, + token: ADDR.target, + amount: BigInt(3), + recipient: PROGRAM, + payload: encodeAgwSvmPayload(PROGRAM, accounts, new Uint8Array([1])), + gasLimit: BigInt(200000), + protocolFee: BigInt(2), + maxPCForGas: BigInt(3), + }); + it('uses the program recipient, wallet refund and quoted PC while preserving the exact payload', () => { + const i = input(), + result = composeAgwSvmAction(i, config(), NOW); + const request = decodeFunctionData({ + abi: UNIVERSAL_GATEWAY_PC, + data: result.data, + }).args![0]; + expect(result.target).toBe(ADDR.gateway); + expect(result.value).toBe(BigInt(5)); + expect(request).toMatchObject({ + recipient: PROGRAM, + revertRecipient: ADDR.owner, + amount: BigInt(3), + payload: i.payload, + gasPrice: BigInt(0), + }); + }); + it('rejects caps, zero gas and unknown assets before signing', () => { + expect(() => + composeAgwSvmAction({ ...input(), amount: BigInt(6) }, config(), NOW) + ).toThrow(/AmountExceedsCap/); + expect(() => + composeAgwSvmAction({ ...input(), token: ADDR.other }, config(), NOW) + ).toThrow(/AssetNotAllowed/); + expect(() => + composeAgwSvmAction({ ...input(), maxPCForGas: BigInt(0) }, config(), NOW) + ).toThrow(/UncappedGasSwapRejected/); + expect(() => + composeAgwSvmAction( + { ...input(), maxPCForGas: BigInt(100) }, + config(), + NOW + ) + ).toThrow(/PCValueExceedsCap/); + const c = config(); + c.assets[0].spent = BigInt(9); + expect(() => composeAgwSvmAction(input(), c, NOW)).toThrow( + /TotalSpendCapExceeded/ + ); + c.assets[0].maxPerCall = BigInt(2) ** BigInt(256) - BigInt(1); + expect(() => + composeAgwSvmAction( + { ...input(), amount: BigInt(2) ** BigInt(64) }, + c, + NOW + ) + ).toThrow(/AmountExceedsU64/); + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts b/packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts new file mode 100644 index 00000000..83e9bcd1 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts @@ -0,0 +1,264 @@ +import { + decodeFunctionResult, + encodeAbiParameters, + type Abi, + type Hex, +} from 'viem'; +import { preparePublicSvmRule } from '../management/svm-public'; +import { resolveSvmAssets } from '../management/svm-context'; +import { readSvmSourceToken } from '../contracts/prc20-metadata'; +import { PublicKey } from '@solana/web3.js'; +import { MOVEABLE_TOKEN_CONSTANTS } from '../../constants/tokens'; +import { getPRC20Address } from '../../universal/prc20-address'; +import { CHAIN } from '../../constants/enums'; +import { Snapshot } from '../reads/snapshot'; +import { quoteSvmRequest } from '../execution/svm-quote'; +import { ADDR, FakeChain } from './fake-chain'; +import { mockRuntime } from './mock-runtime'; +const mint = '0x' + '33'.repeat(32); +function fixture(chain = CHAIN.SOLANA_DEVNET) { + const fake = new FakeChain(); + fake.readContract = async ({ functionName }) => + functionName === 'gasTokenPRC20ByChainNamespace' + ? ADDR.other + : functionName === 'SOURCE_CHAIN_NAMESPACE' + ? chain + : mint; + const quoteOutbound = jest.fn().mockResolvedValue({ + protocolFee: BigInt(1), + nativeValueForGas: BigInt(10), + gasLimitUsed: BigInt(100), + }); + return { + snap: new Snapshot(fake, BigInt(1)), + rt: mockRuntime(fake, { quoteOutbound }), + quoteOutbound, + }; +} +describe('AGW Solana finalization quote context', () => { + it('uses the wallet identity and actual source mint for SPL rent budgeting', async () => { + const f = fixture(); + await quoteSvmRequest( + f.rt, + f.snap, + ADDR.owner, + ADDR.target, + CHAIN.SOLANA_DEVNET, + BigInt(0), + BigInt(5) + ); + expect(f.quoteOutbound).toHaveBeenCalledWith( + ADDR.target, + BigInt(0), + CHAIN.SOLANA_DEVNET, + { + wallet: ADDR.owner, + splMintBase58: new PublicKey( + Buffer.from(mint.slice(2), 'hex') + ).toBase58(), + burnAmount: BigInt(5), + } + ); + }); + it('native transfers carry no SPL mint or ATA requirement', async () => { + const f = fixture(); + const q = await quoteSvmRequest( + f.rt, + f.snap, + ADDR.owner, + ADDR.other, + CHAIN.SOLANA_DEVNET, + BigInt(0), + BigInt(5) + ); + expect(q.isNative).toBe(true); + expect(f.quoteOutbound.mock.calls[0][3].splMintBase58).toBeUndefined(); + }); + it('zero-burn instruction quotes do not add a transfer ATA requirement', async () => { + const f = fixture(); + await quoteSvmRequest( + f.rt, + f.snap, + ADDR.owner, + ADDR.target, + CHAIN.SOLANA_DEVNET, + BigInt(0), + BigInt(0) + ); + expect(f.quoteOutbound.mock.calls[0][3].splMintBase58).toBeUndefined(); + }); + it('an asset from another chain fails route validation without a quote', async () => { + const f = fixture(CHAIN.ETHEREUM_SEPOLIA); + await expect( + quoteSvmRequest( + f.rt, + f.snap, + ADDR.owner, + ADDR.target, + CHAIN.SOLANA_DEVNET, + BigInt(0), + BigInt(5) + ) + ).rejects.toMatchObject({ code: 'ASSET_CHAIN_MISMATCH' }); + expect(f.quoteOutbound).not.toHaveBeenCalled(); + }); + it('decodes the real precompile word when a Solidity string ABI cannot decode it', async () => { + const f = fixture(); + const read = f.snap.reader.readContract; + const outputTypes: string[] = []; + f.snap.reader.readContract = async (args) => { + if (args.functionName !== 'SOURCE_TOKEN_ADDRESS') return read(args); + const fn = (args.abi as Abi).find( + (entry) => entry.type === 'function' && entry.name === args.functionName + ); + if (fn?.type !== 'function') throw new Error('missing metadata ABI'); + outputTypes.push(fn.outputs[0].type); + return decodeFunctionResult({ + abi: args.abi as Abi, + functionName: args.functionName, + data: encodeAbiParameters([{ type: 'bytes32' }], [mint as Hex]), + }); + }; + await quoteSvmRequest( + f.rt, + f.snap, + ADDR.owner, + ADDR.target, + CHAIN.SOLANA_DEVNET, + BigInt(0), + BigInt(5) + ); + expect(outputTypes).toEqual(['string', 'bytes32']); + const expected = new PublicKey( + Buffer.from(mint.slice(2), 'hex') + ).toBase58(); + expect(f.quoteOutbound.mock.calls[0][3].splMintBase58).toBe(expected); + const metadata = { + gateway: jest.fn(), + mint: jest.fn().mockResolvedValue({ + mint: expected, + tokenProgram: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', + }), + }; + const assets = await resolveSvmAssets( + f.snap, + CHAIN.SOLANA_DEVNET, + [{ token: ADDR.target, maxPerCall: BigInt(5), maxTotal: BigInt(5) }], + metadata + ); + expect(assets[0]).toMatchObject({ kind: 'spl', mint: expected }); + expect(metadata.mint).toHaveBeenCalledWith(CHAIN.SOLANA_DEVNET, mint); + }); + + it('does not fabricate a mint when both metadata representations fail', async () => { + const f = fixture(); + f.snap.reader.readContract = async () => { + throw new Error('RPC unavailable'); + }; + await expect( + readSvmSourceToken(f.snap, ADDR.target, CHAIN.SOLANA_DEVNET) + ).rejects.toMatchObject({ + code: 'RULE_READ_FAILED', + cause: { message: 'RPC unavailable' }, + }); + expect(f.quoteOutbound).not.toHaveBeenCalled(); + }); + it('uses the current registered SPL mint when Donut metadata returns a zero word', async () => { + const f = fixture(); + const asset = MOVEABLE_TOKEN_CONSTANTS.SOLANA_DEVNET.USDT; + const token = getPRC20Address({ + chain: CHAIN.SOLANA_DEVNET, + address: asset.address, + }).address; + const read = f.snap.reader.readContract; + f.snap.reader.readContract = async (args) => { + if (args.functionName !== 'SOURCE_TOKEN_ADDRESS') return read(args); + return decodeFunctionResult({ + abi: args.abi as Abi, + functionName: args.functionName, + data: encodeAbiParameters( + [{ type: 'bytes32' }], + [`0x${'00'.repeat(32)}`] + ), + }); + }; + await quoteSvmRequest( + f.rt, + f.snap, + ADDR.owner, + token, + CHAIN.SOLANA_DEVNET, + BigInt(0), + BigInt(1000) + ); + expect(f.quoteOutbound.mock.calls[0][3].splMintBase58).toBe(asset.address); + await expect( + readSvmSourceToken(f.snap, ADDR.target, CHAIN.SOLANA_DEVNET) + ).rejects.toMatchObject({ code: 'INVALID_RULE' }); + }); + it('canonicalizes a decoded SPL mint before resolving its PRC20 mapping', async () => { + const f = fixture(); + const expected = new PublicKey( + Buffer.from(mint.slice(2), 'hex') + ).toBase58(); + const program = `0x${'44'.repeat(32)}` as Hex; + const rt = { + ...f.rt, + resolvePrc20: jest.fn().mockReturnValue(ADDR.target), + svmMetadata: { + gateway: async () => ({ + chainNamespace: CHAIN.SOLANA_DEVNET, + program: `0x${'22'.repeat(32)}`, + }), + mint: async () => ({ + mint: expected, + tokenProgram: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', + }), + }, + }; + await preparePublicSvmRule(rt, f.snap, ADDR.owner, { + agent: ADDR.agent, + chainNamespace: CHAIN.SOLANA_DEVNET, + assets: [{ token: mint, maxPerCall: BigInt(5), maxTotal: BigInt(5) }], + validUntil: f.rt.nowSeconds() + 3600, + maxGasPerCall: BigInt(10), + allowedInstructions: [ + { + program, + accounts: [{ name: 'authority', expected: { kind: 'walletCEA' } }], + instruction: { + name: 'ping', + idl: { + address: new PublicKey( + Buffer.from(program.slice(2), 'hex') + ).toBase58(), + metadata: { name: 'fixture', version: '1', spec: '0.1.0' }, + instructions: [ + { + name: 'ping', + discriminator: [1, 2, 3, 4, 5, 6, 7, 8], + accounts: [{ name: 'authority', signer: true }], + args: [], + }, + ], + }, + }, + }, + ], + }); + expect(rt.resolvePrc20).toHaveBeenCalledWith(expected, CHAIN.SOLANA_DEVNET); + }); +}); +it('refuses a zero Solana gas ceiling, which would reject every agent send', async () => { + const f = fixture(); + await expect( + preparePublicSvmRule(f.rt, f.snap, ADDR.owner, { + agent: ADDR.agent, + chainNamespace: CHAIN.SOLANA_DEVNET, + assets: [], + validUntil: f.rt.nowSeconds() + 3600, + maxGasPerCall: BigInt(0), + allowedInstructions: [], + }) + ).rejects.toThrow('maxGasPerCall must be positive'); +}); diff --git a/packages/core/src/lib/agentic/__tests__/svm-send-defaults.spec.ts b/packages/core/src/lib/agentic/__tests__/svm-send-defaults.spec.ts new file mode 100644 index 00000000..02d99937 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/svm-send-defaults.spec.ts @@ -0,0 +1,66 @@ +import { PublicKey } from '@solana/web3.js'; +import { CHAIN } from '../../constants/enums'; +import { sendPublicSvm } from '../execution/svm-public'; +import { resetAgenticGenerations } from '../deployments'; +import { ADDR, FakeChain, registerFakeGeneration } from './fake-chain'; +import { mockRuntime } from './mock-runtime'; + +afterEach(resetAgenticGenerations); +it.each([undefined, BigInt(0), BigInt(5000)])( + 'sizes a public SVM owner transfer through the route quote, preserving explicit gas: %s', + async (gasLimit) => { + const gen = registerFakeGeneration(); + const fake = new FakeChain(); + fake.getBalance = async () => BigInt(10) ** BigInt(20); + fake.readContract = async ({ functionName }) => { + if (functionName === 'SOURCE_CHAIN_NAMESPACE') return CHAIN.SOLANA_DEVNET; + if (functionName === 'gasTokenPRC20ByChainNamespace') return ADDR.target; + if (functionName === 'balanceOf') return BigInt(1000000); + throw new Error(`Unexpected read: ${functionName}`); + }; + const quoteOutbound = jest.fn(async (_token, budget) => ({ + protocolFee: BigInt(0), + nativeValueForGas: BigInt(10), + gasLimitUsed: budget || BigInt(1052), + })); + const rt = mockRuntime(fake, { + signer: ADDR.owner, + resolvePrc20: () => ADDR.target, + quoteOutbound, + svmMetadata: { + gateway: async () => ({ + chainNamespace: CHAIN.SOLANA_DEVNET, + program: `0x${'22'.repeat(32)}`, + }), + mint: async () => { + throw new Error('No mint read for native SOL'); + }, + }, + }); + await sendPublicSvm( + rt, + { + wallet: ADDR.other, + door: 'owner', + signerPushAccount: ADDR.owner, + signerOrigin: { chain: CHAIN.PUSH_TESTNET_DONUT, address: ADDR.owner }, + generation: gen, + }, + { + to: { + address: PublicKey.default.toBase58(), + chain: CHAIN.SOLANA_DEVNET, + }, + value: BigInt(1), + ...(gasLimit === undefined ? {} : { gasLimit }), + } + ); + expect(quoteOutbound).toHaveBeenCalledWith( + ADDR.target, + gasLimit ?? BigInt(0), + CHAIN.SOLANA_DEVNET, + { wallet: ADDR.other, splMintBase58: undefined, burnAmount: BigInt(1) } + ); + expect(rt.executeMock).toHaveBeenCalledTimes(1); + } +); diff --git a/packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts b/packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts new file mode 100644 index 00000000..cb2a2d6b --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts @@ -0,0 +1,59 @@ +import { Connection, PublicKey, type AccountInfo } from '@solana/web3.js'; +import { decodeWireCounter, inspectSvmWirePrograms, SVM_WIRE_COUNTER, SVM_WIRE_GATEWAY, SVM_WIRE_PROGRAM } from '../../../../__e2e__/shared/agw-svm-preflight'; + +const gateway = new PublicKey(SVM_WIRE_GATEWAY), program = new PublicKey(SVM_WIRE_PROGRAM); +const loader = new PublicKey('BPFLoaderUpgradeab1e11111111111111111111111'); +const config = PublicKey.findProgramAddressSync([Buffer.from('config')], gateway)[0]; +function fixture() { + const rows = new Map>(); + [gateway, program].forEach((key, i) => { + const programData = new PublicKey(Buffer.alloc(32, i + 1)); + const data = Buffer.alloc(36); data.writeUInt32LE(2); programData.toBuffer().copy(data, 4); + rows.set(key.toBase58(), { data, owner: loader, executable: true, lamports: 1, rentEpoch: 0 }); + const implementation = Buffer.alloc(49); implementation.writeUInt32LE(3); implementation.writeBigUInt64LE(BigInt(42), 4); + rows.set(programData.toBase58(), { data: implementation, owner: loader, executable: false, lamports: 1, rentEpoch: 0 }); + }); + const counter = Buffer.alloc(48); Buffer.from([255, 176, 4, 245, 188, 253, 124, 25]).copy(counter); counter.writeBigUInt64LE(BigInt(7), 8); + rows.set(SVM_WIRE_COUNTER.toBase58(), { data: counter, owner: program, executable: false, lamports: 1, rentEpoch: 0 }); + const data = Buffer.alloc(279); Buffer.from([155, 12, 170, 224, 30, 250, 204, 130]).copy(data); + rows.set(config.toBase58(), { data, owner: gateway, executable: false, lamports: 1, rentEpoch: 0 }); + const rpc = { + getGenesisHash: jest.fn().mockResolvedValue('EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG'), + getMultipleAccountsInfoAndContext: jest.fn(async (keys: PublicKey[]) => ({ context: { slot: 99 }, value: keys.map((k) => rows.get(k.toBase58()) ?? null) })), + }; + return { rows, rpc, connection: rpc as unknown as Connection }; +} + +describe('unfunded AGW SVM wire fixture gate', () => { + it('records program fingerprints, slot and the actual IDL-decoded counter/config', async () => { + const { connection } = fixture(); + const result = await inspectSvmWirePrograms(connection); + expect(result.counter.value).toBe('7'); expect(result.gatewayConfig.paused).toBe(false); + expect(result.programs).toHaveLength(2); expect(result.programs[0].lastUpgradeSlot).toBe('42'); + expect(result.programs[0].dataSha256).toMatch(/^[0-9a-f]{64}$/); expect(result.slot).toBe(99); + }); + it('rejects an RPC for another cluster before reading account state', async () => { + const { rpc, connection } = fixture(); rpc.getGenesisHash.mockResolvedValue('other-cluster'); + await expect(inspectSvmWirePrograms(connection)).rejects.toThrow('selected devnet'); + expect(rpc.getMultipleAccountsInfoAndContext).not.toHaveBeenCalled(); + }); + it('rejects a non-executable program before reading ProgramData', async () => { + const { rows, rpc, connection } = fixture(); rows.get(gateway.toBase58())!.executable = false; + await expect(inspectSvmWirePrograms(connection)).rejects.toThrow('executable upgradeable'); + expect(rpc.getMultipleAccountsInfoAndContext).toHaveBeenCalledTimes(1); + }); + it('rejects a paused gateway using the actual Config decoder', async () => { + const { rows, connection } = fixture(); rows.get(config.toBase58())!.data[136] = 1; + await expect(inspectSvmWirePrograms(connection)).rejects.toThrow('paused'); + }); + it('rejects a substituted counter owner and an incompatible discriminator', async () => { + const { rows, connection } = fixture(); rows.get(SVM_WIRE_COUNTER.toBase58())!.owner = gateway; + await expect(inspectSvmWirePrograms(connection)).rejects.toThrow('wrong owner'); + expect(() => decodeWireCounter(Buffer.alloc(48))).toThrow('selected IDL'); + expect(() => decodeWireCounter(Buffer.alloc(8))).toThrow('selected IDL'); + }); + it('rejects missing ProgramData rather than treating program metadata as delivery proof', async () => { + const { rows, connection } = fixture(); rows.delete(new PublicKey(Buffer.alloc(32, 1)).toBase58()); + await expect(inspectSvmWirePrograms(connection)).rejects.toThrow('ProgramData'); + }); +}); diff --git a/packages/core/src/lib/agentic/__tests__/token-routes.spec.ts b/packages/core/src/lib/agentic/__tests__/token-routes.spec.ts new file mode 100644 index 00000000..3a7d3795 --- /dev/null +++ b/packages/core/src/lib/agentic/__tests__/token-routes.spec.ts @@ -0,0 +1,81 @@ +import { getAddress } from 'viem'; +import { CHAIN, PUSH_NETWORK } from '../../constants/enums'; +import { SYNTHETIC_PUSH_ERC20 } from '../../constants/chain'; +import type { Orchestrator } from '../../orchestrator/orchestrator'; +import { createAgenticRuntime } from '../runtime'; +import { exactAgenticRoute, resolveAgenticPrc20 } from '../token-routes'; + +const CIRCLE = { + [CHAIN.ETHEREUM_SEPOLIA]: [ + '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238', + '0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E', + ], + [CHAIN.BASE_SEPOLIA]: [ + '0x036CbD53842c5426634e7929541eC2318f3dCF7e', + '0x84B62e44F667F692F7739Ca6040cD17DA02068A8', + ], + [CHAIN.ARBITRUM_SEPOLIA]: [ + '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d', + '0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6', + ], +} as const; +const runtime = () => + createAgenticRuntime( + { + getNetwork: () => PUSH_NETWORK.TESTNET_DONUT, + getRpcUrls: () => ({}), + } as unknown as Orchestrator, + false + ); + +it.each(Object.entries(CIRCLE))( + 'maps the exact node-registered Circle USDC on %s', + (chain, [source, prc20]) => { + expect( + resolveAgenticPrc20( + { chain, address: source.toLowerCase() }, + PUSH_NETWORK.TESTNET_DONUT + ) + ).toEqual({ address: getAddress(prc20), symbol: 'USDC', decimals: 6 }); + expect(runtime().resolvePrc20(source, chain as CHAIN)).toBe( + getAddress(prc20) + ); + expect(exactAgenticRoute(chain, source, PUSH_NETWORK.TESTNET)?.prc20).toBe( + prc20 + ); + } +); +it('never matches by symbol, by another chain or on another network', () => { + const donut = SYNTHETIC_PUSH_ERC20[PUSH_NETWORK.TESTNET_DONUT]; + // The SDK's routed Sepolia mock USDC keeps its own PRC20. + expect( + resolveAgenticPrc20( + { + chain: CHAIN.ETHEREUM_SEPOLIA, + address: '0x97F477B7f970D47a87B42869ceeace218106152a', + }, + PUSH_NETWORK.TESTNET_DONUT + ).address + ).toBe(getAddress(donut.USDC_ETH)); + const sepoliaCircle = CIRCLE[CHAIN.ETHEREUM_SEPOLIA][0]; + expect( + exactAgenticRoute( + CHAIN.BASE_SEPOLIA, + sepoliaCircle, + PUSH_NETWORK.TESTNET_DONUT + ) + ).toBeUndefined(); + expect(() => + runtime().resolvePrc20(sepoliaCircle, CHAIN.BASE_SEPOLIA) + ).toThrow(); + expect( + exactAgenticRoute( + CHAIN.ETHEREUM_SEPOLIA, + sepoliaCircle, + PUSH_NETWORK.MAINNET + ) + ).toBeUndefined(); + expect( + exactAgenticRoute(CHAIN.ETHEREUM_SEPOLIA, 'USDC', PUSH_NETWORK.TESTNET) + ).toBeUndefined(); +}); diff --git a/packages/core/src/lib/agentic/agentic.ts b/packages/core/src/lib/agentic/agentic.ts new file mode 100644 index 00000000..e0269924 --- /dev/null +++ b/packages/core/src/lib/agentic/agentic.ts @@ -0,0 +1,75 @@ +import { publicRules } from './public-rule'; +import { AgenticCapability, requireCapability } from './capabilities'; +import { currentGeneration } from './deployments'; +import { createWallet } from './management/create'; +import { emitAgentic } from './management/common'; +import { deriveForOwner, listForOwner } from './reads/wallets'; +import { AgenticWalletHandle } from './wallet'; +import { PROGRESS_HOOK } from '../progress-hook/progress-hook.types'; +import type { AgenticRuntime } from './runtime'; +import type { + AgenticAddress, + AgenticNamespace, + AgenticWallet, + CreateOptions, + CreateResult, + WalletSummary, +} from './agentic.types'; + +/** + * client.agentic — owner-side AGW management (spec section 1). Ownership is + * always the connected signer's Push identity (EOA, or the UEA for its origin + * chain), never the AGW an agentic client exposes as universal.account. + */ +export class AgenticNamespaceImpl implements AgenticNamespace { + constructor(private readonly runtime: AgenticRuntime) {} + + async derive(opts?: { + index?: number; + }): Promise<{ address: AgenticAddress; index: number; deployed: boolean }> { + const gen = currentGeneration(this.runtime.network); + requireCapability(gen.capabilities, AgenticCapability.WALLET_READS); + const owner = this.runtime.signerPushAccount(); + const r = await deriveForOwner( + this.runtime.reader, + gen, + owner, + opts?.index + ); + emitAgentic( + this.runtime, + undefined, + PROGRESS_HOOK.AGENTIC_TX_101, + r.address, + r.index, + r.deployed + ); + return { + address: r.address as AgenticAddress, + index: r.index, + deployed: r.deployed, + }; + } + + async create(label: string, options: CreateOptions): Promise { + return createWallet(this.runtime, label, { + ...options, + rules: publicRules(options?.rules), + }); + } + + async list(): Promise<{ wallets: WalletSummary[] }> { + const gen = currentGeneration(this.runtime.network); + requireCapability(gen.capabilities, AgenticCapability.WALLET_READS); + const wallets = await listForOwner( + this.runtime.reader, + gen, + this.runtime.signerPushAccount() + ); + return { wallets }; + } + + wallet(address: AgenticAddress): AgenticWallet { + return new AgenticWalletHandle(this.runtime, address); + } +} diff --git a/packages/core/src/lib/agentic/agentic.types.ts b/packages/core/src/lib/agentic/agentic.types.ts new file mode 100644 index 00000000..094a133d --- /dev/null +++ b/packages/core/src/lib/agentic/agentic.types.ts @@ -0,0 +1,402 @@ +import type { ArgPinWire } from './codec/pins'; +/** Public section-6 rules and internal adapters for the deployed v6 wire format. + * Source snapshot: October 12, 2026. Internal normalized types are not package exports. + */ +import type { Idl } from '@coral-xyz/anchor'; +import type { SvmTermsWire } from './codec/svm-terms'; +import type { MoveableToken, MoveableTokenSet } from '../constants/tokens'; +import type { UniversalTxResponse } from '../orchestrator/orchestrator.types'; +import type { ProgressEvent } from '../progress-hook/progress-hook.types'; + +export type AgenticAddress = `0x${string}`; +export type AgenticHex = `0x${string}`; +export type ForeignChainNamespace = `eip155:${string}` | `solana:${string}`; +export type AgenticProgressHook = (event: ProgressEvent) => void; + +/** '0x617ba037' or 'supply(address,uint256,address,uint16)'. */ +export type Selector = AgenticHex | `${string}(${string})`; + +/** One Push function a native rule allows, with its own limits and counters. */ +export interface NativeAction { + wirePins?: ArgPinWire[]; + target: AgenticAddress; + selector: Selector | 'value-only'; + /** Default 0: no native PC value allowance. */ + maxValuePerCall?: bigint; + /** Default 0: no native PC value allowance. */ + maxValueTotal?: bigint; + /** Default 0 (unlimited calls until expiry). */ + maxCalls?: number; + pins?: ArgPin[]; + /** `maxTotal` default uint256 max (unlimited total). */ + amount?: AmountLimit; + /** + * Overrides the rule's `validUntil` for this action. Decoded rules set it + * only when stored actions expire at different times. + */ + validUntil?: number; +} + +interface NativeRuleCommon { + /** Push address: an EOA, or the UEA of an external key. Never the owner. */ + agent: AgenticAddress; + /** Omitted = the connected Push chain. */ + chainNamespace?: never; + /** Unix seconds. */ + validUntil: number; +} + +/** A native rule allowing one function (shorthand for a one-entry `actions`). */ +export interface NativeSingleRule + extends NativeRuleCommon, + Omit { + actions?: never; +} + +/** + * A native rule allowing 1..8 functions under ONE rule ID. Each action keeps + * its own limits and counters on-chain; (target, selector) pairs must be + * unique. One rule per agent on Push keeps send-time selection unambiguous. + * Internal normalized representation; public callers use Rule.allowedCalls. + */ +export interface NativeMultiRule extends NativeRuleCommon { + actions: NativeAction[]; + target?: never; + selector?: never; + maxValuePerCall?: never; + maxValueTotal?: never; + maxCalls?: never; + pins?: never; + amount?: never; +} + +export type NativeRule = NativeSingleRule | NativeMultiRule; + +/** + * Where a pin or amount sits in the calldata. `arg` is the argument index in + * the selector signature (requires the signature form of `selector`). + * `offset` is the raw calldata byte offset, selector included — the form the + * contracts store; decoded rules (rules.get/list, decodeRules) always use it + * because stored terms carry no ABI. Advanced input form; ABI argument indexes are preferred for authoring. + */ +export type ArgPin = + | { + arg: number; + offset?: never; + expected: AgenticHex | AgenticAddress | bigint; + } + | { offset: number; arg?: never; expected: AgenticHex }; + +export type AmountLimit = ( + | { arg: number; offset?: never } + | { offset: number; arg?: never } +) & { + maxPerCall: bigint; + maxTotal?: bigint; +}; + +export interface AssetCap { + /** The destination chain's token (MOVEABLE constant) or native marker. */ + token: MoveableToken | AgenticAddress; + maxPerCall: bigint; + /** Omitted = zero. Explicit zero forbids movement. */ + maxTotal?: bigint; +} + +export interface AllowedCall { + pins?: ArgPinWire[]; + target: AgenticAddress; + selector: Selector; + /** Argument index whose address must be the wallet's destination account. */ + beneficiary?: number; + /** Exact stored calldata offset for lossless decoded rules; mutually exclusive with beneficiary. Approved advanced input form. */ + beneficiaryOffset?: number; + /** Default 0. */ + maxValue?: bigint; +} + +export interface UniversalRule { + agent: AgenticAddress; + chainNamespace: `eip155:${string}`; + assets: AssetCap[]; + /** PC (wei) per outbound for the destination leg. */ + maxGasPerCall: bigint; + validUntil: number; + /** 1..32, all on chainNamespace. */ + allowedCalls: AllowedCall[]; +} + +/** An address may be base58 or a 32-byte hex Solana public key. */ +export type SvmAccountRef = + | { kind: 'walletCEA' } + | { kind: 'walletATA'; token: string } + | { kind: 'address'; address: string }; +export type SvmFieldConstraint = + | { name: string; equals: AgenticHex | bigint | boolean } + | { name: string; min: bigint } + | { name: string; max: bigint } + | { + numerator: string; + denominator: string; + minRatio: { num: bigint; den: bigint }; + }; +export interface SvmInstructionRule { + /** Internal wire override: 0 means no exact account-count constraint. */ + maxAccounts?: number; + program: string; + instruction: { idl: Idl; name: string }; + /** Top-level account names from a supported Anchor IDL; optional/nested accounts are rejected. */ + accounts: { name: string; expected: SvmAccountRef }[]; + /** Fixed-width fields only; unsupported/variable layouts fail before signing. */ + fields?: SvmFieldConstraint[]; +} +export interface SolanaRule { + agent: AgenticAddress; + chainNamespace: `solana:${string}`; + validUntil: number; + assets: { + token: MoveableToken | string; + maxPerCall: bigint; + maxTotal?: bigint; + }[]; + maxGasPerCall: bigint; + /** Additional output mints whose wallet ATAs must be protected. */ + outputTokens?: string[]; + allowedInstructions: SvmInstructionRule[]; +} +/** Lossless stored Solana layout, accepted by update without an invented IDL. */ +export interface DecodedSolanaRule extends Omit { + format: 'decoded'; + agent: AgenticAddress; + chainNamespace: `solana:${string}`; + assets: { token: string; maxPerCall: bigint; maxTotal: bigint }[]; +} +export type InternalRule = NativeRule | UniversalRule | SolanaRule; + +export interface InternalRulesRecord { + rulesId: AgenticHex; + enabled: boolean; + chainNamespace: string; + agent: AgenticAddress; + validUntil: number; + rule: InternalRule | DecodedSolanaRule; +} + +/** Current SDK section 6 public rule shape; contract wire types above are internal. */ +export type WalletMarker = 'agentic:wallet'; +/** Top-level ABI argument, or a path through static tuple/fixed-array fields. */ +export type ArgumentPath = number | readonly number[]; +export type Pin = + | { + arg: ArgumentPath; + expected: AgenticHex | AgenticAddress | bigint | WalletMarker; + max?: never; + account?: never; + } + | { arg: ArgumentPath; max: bigint; expected?: never; account?: never } + | { + account: number; + expected: string | WalletMarker; + token?: MoveableToken | string; + arg?: never; + max?: never; + }; +export interface RuleCall { + target: string; + selector: Selector | 'value-only'; + pins?: Pin[]; + maxValue?: bigint; + app?: string; + label?: string; +} +export interface RuleAsset { + token: MoveableToken | string; + maxPerCall: bigint; + maxTotal?: bigint; +} +/** Authoring form of a rule asset: `CONSTANTS.MOVEABLE.TOKEN..ALL` + * expands to every routable token with its default limits, so it takes no caps. */ +export type RuleAssetInput = + | RuleAsset + | { token: MoveableTokenSet; maxPerCall?: never; maxTotal?: never }; +export interface Rule { + agent: AgenticAddress; + chainNamespace?: ForeignChainNamespace; + validUntil: number; + assets?: RuleAsset[]; + maxGasPerCall?: bigint; + allowedCalls: RuleCall[]; +} +/** What create, rules.add and rules.update accept. Every Rule is valid input. */ +export interface AuthoredRule extends Omit { + assets?: RuleAssetInput[]; + /** 1..8 for Push-chain rules, 1..32 for other chains. Omit (or leave empty) + * on an EVM rule with ERC20 assets to allow only transfers of those tokens + * back to the owner, plus any `transferTo` recipients. */ + allowedCalls?: RuleCall[]; + /** Tokens-only EVM rules: extra recipients the agent may transfer each asset + * to, besides the owner. Refused together with allowedCalls. */ + transferTo?: AgenticAddress[]; +} +export type RuleInput = AuthoredRule | DecodedSolanaRule; +export type Spent = + | { + kind: 'native'; + valueSpent: bigint; + amountSpent: bigint; + callsUsed: number; + } + | { + kind: 'native'; + actions: { + target: AgenticAddress; + selector: Selector | 'value-only'; + valueSpent: bigint; + amountSpent: bigint; + callsUsed: number; + }[]; + } + | { kind: 'universal'; assets: { token: string; spent: bigint }[] }; +export interface RulesRecord extends Omit { + rule: Rule | DecodedSolanaRule; + spent: Spent; +} +export interface InternalCreateOptions { + rules: InternalRule[]; + progressHook?: AgenticProgressHook; +} + +export interface CreateOptions { + rules: RuleInput[]; + progressHook?: AgenticProgressHook; +} + +export interface CreateResult { + wallet: AgenticAddress; + index: number; + rulesIds: AgenticHex[]; + tx: UniversalTxResponse; +} + +export interface WalletSummary { + address: AgenticAddress; + index: number; + label: string; + deployed: boolean; + rulesCount: number; +} + +export interface WalletInfo { + address: AgenticAddress; + label: string; + index: number; + owner: AgenticAddress; + deployed: boolean; + rulesCount: number; +} + +export type CheckpointKind = 'OWNER_ACTION' | 'RULES_GRANTED' | 'RULES_REVOKED'; + +export interface Checkpoint { + seq: number; + kind: CheckpointKind; + ref: AgenticHex; + blockNumber: bigint; + txHash: AgenticHex; +} + +export interface AgenticWallet { + address: AgenticAddress; + info(): Promise; + owner(): Promise<{ owner: AgenticAddress }>; + /** Owner-only rename, at most 64 UTF-8 bytes. Empty resets the default label. */ + setLabel( + label: string, + opts?: { progressHook?: AgenticProgressHook } + ): Promise; + checkpoints(opts?: { + sinceBlock?: bigint; + }): Promise<{ checkpoints: Checkpoint[] }>; + rules: { + /** Enabled rules only; expired-but-enabled rules remain visible. Includes policy spend counters. */ + list(): Promise<{ rules: RulesRecord[] }>; + /** Unknown and revoked IDs both return RULE_NOT_FOUND; v1 has no historical records. */ + get(rulesId: AgenticHex): Promise; + add( + rules: RuleInput[], + opts?: { progressHook?: AgenticProgressHook } + ): Promise<{ rulesIds: AgenticHex[]; tx: UniversalTxResponse }>; + update(params: { + rules: { rulesId: AgenticHex; rule: RuleInput }[]; + progressHook?: AgenticProgressHook; + }): Promise<{ + rules: { rulesId: AgenticHex; replaced: AgenticHex }[]; + tx: UniversalTxResponse; + }>; + delete( + rulesIds: AgenticHex[], + opts?: { progressHook?: AgenticProgressHook } + ): Promise; + delete(params: { + all: true; + progressHook?: AgenticProgressHook; + }): Promise; + }; +} + +export interface AgenticNamespace { + derive(opts?: { + index?: number; + }): Promise<{ address: AgenticAddress; index: number; deployed: boolean }>; + create(label: string, options: CreateOptions): Promise; + list(): Promise<{ wallets: WalletSummary[] }>; + wallet(address: AgenticAddress): AgenticWallet; +} + +/** Door the client uses in agenticWallet mode. */ +export type AgenticDoor = 'owner' | 'agent'; + +/** AGW metadata attached to responses produced by an agentic client. */ +export interface AgenticTxMetadata { + wallet: AgenticAddress; + door: AgenticDoor; + /** Rule selected for an agent-door send. */ + rulesId?: AgenticHex; + /** Destination CAIP-2 chain for the selected rule / outbound. */ + chainNamespace?: string; + /** The wallet's destination account (CEA) for an outbound. */ + destinationAccount?: AgenticAddress; + /** + * Ordered calls encoded for the destination CEA. Outbound response + * to/data/value summarize the first call, including an SDK-generated token + * transfer. Replay uses the same representation; it cannot recover which + * calls were supplied explicitly versus generated from funds. + */ + destinationCalls?: readonly { + to: AgenticAddress; + data: AgenticHex; + value: bigint; + }[]; + /** SVM instruction executed by the wallet's destination CEA. */ + destinationInstruction?: { + program: AgenticHex; + data: AgenticHex; + accounts: readonly { pubkey: AgenticHex; isWritable: boolean }[]; + }; + /** Funds-only Solana transfer. token is the burned PRC20 on Push. */ + destinationTransfer?: { + recipient: AgenticHex; + token: AgenticAddress; + amount: bigint; + }; + /** Ordered actions in a native agent batch; to/data/value summarize its first action. */ + nativeCalls?: readonly { + to: AgenticAddress; + data: AgenticHex; + value: bigint; + }[]; + /** Account the signer's transaction actually called (wallet or outer sender account). */ + rawTo: string; + /** Calldata the signer's transaction actually carried. */ + rawData: string; +} diff --git a/packages/core/src/lib/agentic/capabilities.ts b/packages/core/src/lib/agentic/capabilities.ts new file mode 100644 index 00000000..5cef0091 --- /dev/null +++ b/packages/core/src/lib/agentic/capabilities.ts @@ -0,0 +1,79 @@ +import { capabilityUnavailable } from './errors'; + +/** + * Internal capability flags for an AGW contract generation. A method whose + * capability is absent fails before any signature. Each unresolved target + * feature identifies the contract or product capability that must be verified + * before it can be advertised. + */ +export enum AgenticCapability { + /** Factory derive/list/deploy and wallet owner/info reads. */ + WALLET_READS = 'walletReads', + /** Active (enabled) rule enumeration and native-rule decoding. */ + ACTIVE_RULE_READS = 'activeRuleReads', + /** Owner door: execute(mode, executionCalldata). */ + OWNER_EXECUTE = 'ownerExecute', + /** Agent door: executeAsAgent(rulesId, mode, executionCalldata). */ + AGENT_EXECUTE = 'agentExecute', + /** Native (Push-chain) rule grants with NativeTerms encoding. */ + NATIVE_RULES = 'nativeRules', + /** Exact-equality native spend assertion used by rules.update. */ + ASSERT_SPENT_NATIVE = 'assertSpentNative', + /** checkpointCount + Checkpointed events. */ + CHECKPOINTS = 'checkpoints', + /** Agent-door EVM outbound composition against v6 per-token caps. */ + UNIVERSAL_EVM_OUTBOUND = 'universalEvmOutbound', + /** Target UniversalRule (assets[] / maxGasPerCall) encode/decode. A05/A07. */ + UNIVERSAL_EVM_RULES = 'universalEvmRules', + /** Per-token expected-spend assertion for universal replacement. A05. */ + ASSERT_SPENT_UNIVERSAL_MULTI = 'assertSpentUniversalMulti', + /** Numeric-pin Solana authoring, exact decoded reads and instruction execution. */ + UNIVERSAL_SVM_RULES = 'universalSvmRules', + /** Editable wallet label (setLabel / LabelSet). A07. */ + SET_LABEL = 'setLabel', +} + +/** Why each target capability is unavailable when a generation lacks it. */ +export const CAPABILITY_DEPENDENCY: Record = { + [AgenticCapability.WALLET_READS]: + 'no verified AGW deployment for this network (A07)', + [AgenticCapability.ACTIVE_RULE_READS]: + 'no verified AGW deployment for this network (A07)', + [AgenticCapability.OWNER_EXECUTE]: + 'no verified AGW deployment for this network (A07)', + [AgenticCapability.AGENT_EXECUTE]: + 'no verified AGW deployment for this network (A07)', + [AgenticCapability.NATIVE_RULES]: + 'no verified AGW deployment for this network (A07)', + [AgenticCapability.ASSERT_SPENT_NATIVE]: + 'no verified AGW deployment for this network (A07)', + [AgenticCapability.CHECKPOINTS]: + 'no verified AGW deployment for this network (A07)', + [AgenticCapability.UNIVERSAL_EVM_OUTBOUND]: + 'the selected generation has no verified multi-asset outbound token resolution (A05/A07)', + [AgenticCapability.UNIVERSAL_EVM_RULES]: + 'EVM universal rules are unavailable for the selected SDK configuration', + [AgenticCapability.ASSERT_SPENT_UNIVERSAL_MULTI]: + 'universal expected-spend assertions are unavailable for this configuration', + [AgenticCapability.UNIVERSAL_SVM_RULES]: + 'SVM rules are unavailable for this generation', + [AgenticCapability.SET_LABEL]: + 'the selected generation has no editable label (A07; labels are deploy-time only)', +}; + +export function hasCapability( + capabilities: ReadonlySet, + capability: AgenticCapability +): boolean { + return capabilities.has(capability); +} + +/** Throws CAPABILITY_UNAVAILABLE (before signing) when the flag is absent. */ +export function requireCapability( + capabilities: ReadonlySet | undefined, + capability: AgenticCapability +): void { + if (!capabilities || !capabilities.has(capability)) { + throw capabilityUnavailable(capability, CAPABILITY_DEPENDENCY[capability]); + } +} diff --git a/packages/core/src/lib/agentic/chain.ts b/packages/core/src/lib/agentic/chain.ts new file mode 100644 index 00000000..cac1f6e2 --- /dev/null +++ b/packages/core/src/lib/agentic/chain.ts @@ -0,0 +1,13 @@ +import { CHAIN_INFO } from '../constants/chain'; +import { CHAIN, PUSH_NETWORK } from '../constants/enums'; + +/** 'eip155:' of the Push chain for a network — the native rule chain. */ +export function pushChainNamespaceFor(network: PUSH_NETWORK): string { + const chain = + network === PUSH_NETWORK.MAINNET + ? CHAIN.PUSH_MAINNET + : network === PUSH_NETWORK.TESTNET_DONUT || network === PUSH_NETWORK.TESTNET + ? CHAIN.PUSH_TESTNET_DONUT + : CHAIN.PUSH_LOCALNET; + return `eip155:${CHAIN_INFO[chain].chainId}`; +} diff --git a/packages/core/src/lib/agentic/codec/abi-layout.ts b/packages/core/src/lib/agentic/codec/abi-layout.ts new file mode 100644 index 00000000..430ae3b3 --- /dev/null +++ b/packages/core/src/lib/agentic/codec/abi-layout.ts @@ -0,0 +1,212 @@ +import { + decodeAbiParameters, + encodeAbiParameters, + isAddress, + isHex, + type AbiParameter, +} from 'viem'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import type { AgenticHex } from '../agentic.types'; + +/** + * ABI head layout for argument-position terms (native pins/amount, universal + * beneficiary). Contracts take ABSOLUTE byte offsets into calldata with the + * 4-byte selector included and read exactly one 32-byte word there, so only a + * single-word static elementary argument can be addressed. Preceding + * arguments may be dynamic (one head word: the offset pointer) or static + * tuples / fixed arrays (several head words); both are accounted for here. + */ + +const UINT16_MAX = 0xffff; + +function components(p: AbiParameter): readonly AbiParameter[] { + return (p as { components?: readonly AbiParameter[] }).components ?? []; +} + +/** Parse a trailing fixed/dynamic array suffix: 'uint256[3]' → base 'uint256', length 3. */ +function arraySuffix( + type: string +): { base: string; length: number | null } | null { + const m = /^(.*)\[(\d*)\]$/.exec(type); + if (!m) return null; + return { base: m[1], length: m[2] === '' ? null : Number(m[2]) }; +} + +export function isDynamic(p: AbiParameter): boolean { + const arr = arraySuffix(p.type); + if (arr) { + if (arr.length === null) return true; + return isDynamic({ ...p, type: arr.base } as AbiParameter); + } + if (p.type === 'bytes' || p.type === 'string') return true; + if (p.type === 'tuple') return components(p).some(isDynamic); + return false; +} + +/** Bytes this parameter occupies in the head of an encoding. */ +export function headSize(p: AbiParameter): number { + if (isDynamic(p)) return 32; + const arr = arraySuffix(p.type); + if (arr && arr.length !== null) { + return arr.length * headSize({ ...p, type: arr.base } as AbiParameter); + } + if (p.type === 'tuple') { + return components(p).reduce((sum, c) => sum + headSize(c), 0); + } + return 32; +} + +const ELEMENTARY = + /^(address|bool|u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|bytes([1-9]|[12][0-9]|3[0-2]))$/; + +export function isSingleWordStatic(p: AbiParameter): boolean { + return ELEMENTARY.test(p.type); +} + +/** + * Absolute calldata byte offset (selector included) of argument `arg`. + * Rejects out-of-range indexes and any argument that is not one static word. + */ +export function argumentOffset( + inputs: readonly AbiParameter[] | undefined, + arg: number, + what: string +): number { + if (!inputs) { + throw invalid( + `${what} needs the function signature (e.g. 'supply(address,uint256,address,uint16)'), not a bare 4-byte selector` + ); + } + if (!Number.isInteger(arg) || arg < 0 || arg >= inputs.length) { + throw invalid( + `${what} argument index ${arg} is out of range (0..${inputs.length - 1})` + ); + } + const target = inputs[arg]; + if (!isSingleWordStatic(target)) { + throw invalid( + `${what} argument ${arg} has type ${target.type}; only single-word static arguments can be pinned` + ); + } + let offset = 4; + for (let i = 0; i < arg; i++) offset += headSize(inputs[i]); + if (offset + 32 > UINT16_MAX) { + throw invalid( + `${what} argument ${arg} lies beyond the uint16 offset range` + ); + } + return offset; +} + +/** Encode a pin's expected value as the exact 32-byte calldata word. */ +export function encodeArgWord( + param: AbiParameter, + expected: AgenticHex | bigint | string | boolean, + what: string +): AgenticHex { + try { + const isWord = + typeof expected === 'string' && isHex(expected) && expected.length === 66; + if (param.type === 'address' && !isWord) { + if ( + typeof expected !== 'string' || + !isAddress(expected, { strict: false }) + ) { + throw new Error('expected an address'); + } + } else if (param.type.startsWith('bytes') && !isWord) { + if (typeof expected !== 'string' || !isHex(expected)) + throw new Error('expected hex'); + } + // An already-encoded 32-byte word (as decoded rules return) is accepted + // when it is a canonical encoding of this argument type. + if ( + typeof expected === 'string' && + isHex(expected) && + expected.length === 66 && + param.type !== 'bytes32' + ) { + const [value] = decodeAbiParameters([param], expected as AgenticHex); + if ( + encodeAbiParameters([param], [value]).toLowerCase() !== + expected.toLowerCase() + ) { + throw new Error('word is not a canonical encoding'); + } + return expected.toLowerCase() as AgenticHex; + } + return encodeAbiParameters([param], [expected]) as AgenticHex; + } catch (cause) { + throw invalid( + `${what} expected value does not encode as ${param.type}: ${ + cause instanceof Error ? cause.message : String(cause) + }`, + cause + ); + } +} + +/** Validate a raw calldata offset given directly (offset form). */ +export function rawOffset(offset: number, what: string): number { + if (!Number.isInteger(offset) || offset < 4 || offset + 32 > UINT16_MAX) { + throw invalid( + `${what} offset ${offset} must be an integer in [4, ${ + UINT16_MAX - 32 + }] (selector included)` + ); + } + return offset; +} + +function invalid(message: string, cause?: unknown): AgenticError { + return new AgenticError(AGENTIC_ERROR_CODE.INVALID_RULE, message, { cause }); +} + +/** Absolute location of a scalar reached through static tuple/fixed-array indexes. */ +export function argumentLocation( + inputs: readonly AbiParameter[] | undefined, + arg: number | readonly number[], + what: string +): { offset: number; param: AbiParameter } { + if (!inputs) throw invalid(`${what} paths require a full function signature`); + const path = typeof arg === 'number' ? [arg] : arg; + if ( + !Array.isArray(path) || + path.length === 0 || + path.length > 16 || + path.some((i) => !Number.isSafeInteger(i) || i < 0) + ) + throw invalid(`${what} has an invalid argument path`); + if (path[0] >= inputs.length) + throw invalid(`${what} argument path is out of range`); + let offset = + 4 + inputs.slice(0, path[0]).reduce((n, p) => n + headSize(p), 0); + let param = inputs[path[0]]; + for (const index of path.slice(1)) { + if (isDynamic(param)) + throw invalid(`${what} cannot descend into a dynamic argument`); + const arr = arraySuffix(param.type); + if (arr && arr.length !== null) { + if (!Number.isSafeInteger(arr.length) || index >= arr.length) + throw invalid(`${what} fixed-array index is out of range`); + const child = { ...param, type: arr.base } as AbiParameter; + offset += index * headSize(child); + param = child; + } else if (param.type === 'tuple') { + const fields = components(param); + if (index >= fields.length) + throw invalid(`${what} tuple index is out of range`); + offset += fields.slice(0, index).reduce((n, p) => n + headSize(p), 0); + param = fields[index]; + } else throw invalid(`${what} path descends into a scalar`); + } + if ( + !isSingleWordStatic(param) || + !Number.isSafeInteger(offset) || + offset + 32 > UINT16_MAX + ) + throw invalid( + `${what} must identify one static ABI word within the uint16 offset range` + ); + return { offset, param }; +} diff --git a/packages/core/src/lib/agentic/codec/defaults.ts b/packages/core/src/lib/agentic/codec/defaults.ts new file mode 100644 index 00000000..4f1ba696 --- /dev/null +++ b/packages/core/src/lib/agentic/codec/defaults.ts @@ -0,0 +1,59 @@ +/** + * THE single home for omitted-limit defaults. Native PC defaults are zero as + * confirmed on October 7. Nothing else in the SDK may invent + * a fallback for these fields; update this table for future changes. + * + * Explicit zero always stays zero. In the native policy a zero value/amount + * cap forbids positive value/amount, while maxCalls = uint32 maximum means unlimited. + */ +export const UINT256_MAX = BigInt(2) ** BigInt(256) - BigInt(1); + +export interface DefaultRow { + value: bigint; + meaning: string; + source: 'product' | 'v6'; +} + +export const AGENTIC_DEFAULTS = { + native: { + maxValuePerCall: { + value: BigInt(0), + meaning: 'no native value transfer', + source: 'product', + }, + maxValueTotal: { + value: BigInt(0), + meaning: 'no native value transfer', + source: 'product', + }, + amountMaxTotal: { + value: UINT256_MAX, + meaning: 'unlimited metered total', + source: 'product', + }, + maxCalls: { + value: BigInt(0xffffffff), + meaning: 'unlimited calls until expiry', + source: 'product', + }, + }, + universal: { + assetMaxTotal: { + value: BigInt(0), + meaning: 'omitted or zero forbids token movement', + source: 'product', + }, + allowedCallMaxValue: { + value: BigInt(0), + meaning: 'no native value attached to the destination call', + source: 'product', + }, + }, +} as const satisfies Record>; + +export function withDefault( + value: bigint | undefined, + row: DefaultRow +): bigint { + return value === undefined ? row.value : value; +} diff --git a/packages/core/src/lib/agentic/codec/ids.ts b/packages/core/src/lib/agentic/codec/ids.ts new file mode 100644 index 00000000..6a4b0e99 --- /dev/null +++ b/packages/core/src/lib/agentic/codec/ids.ts @@ -0,0 +1,112 @@ +import { + concat, + encodeAbiParameters, + encodePacked, + getAddress, + getContractAddress, + keccak256, + numberToHex, + type Address, + type Hex, +} from 'viem'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; + +/** + * Pure identity helpers mirroring the pinned AGW generation (v6): + * smartsessions IdLib.toActionId / toConfigId / toPermissionId and + * AGWFactory._predict (OZ Clones immutable-args CREATE2). + * Every input that changes the result is explicit — validator, factory and + * implementation are internal generation context. + */ + +/** keccak256(abi.encodePacked(address target, bytes4 selector)). */ +export function actionId(target: Address, selector: Hex): Hex { + return keccak256(encodePacked(['address', 'bytes4'], [target, selector])); +} + +/** keccak256(abi.encodePacked(wallet, keccak256(abi.encodePacked(rulesId, actionId)))). */ +export function configId(wallet: Address, rulesId: Hex, action: Hex): Hex { + const inner = keccak256( + encodePacked(['bytes32', 'bytes32'], [rulesId, action]) + ); + return keccak256(encodePacked(['address', 'bytes32'], [wallet, inner])); +} + +/** sessionValidatorInitData for the agent validator: abi.encode(address agent). */ +export function agentConfig(agent: Address): Hex { + return encodeAbiParameters([{ type: 'address' }], [agent]); +} + +/** + * The rules ID a grant produces: + * keccak256(abi.encode(validator, bytes abi.encode(agent), bytes32(grantNonce))). + * Chain is NOT part of the hash; records are keyed by wallet + rulesId. + */ +export function rulesId(ctx: { + validator: Address; + agent: Address; + grantNonce: bigint; +}): Hex { + if (ctx.grantNonce < BigInt(0) || ctx.grantNonce >= BigInt(2) ** BigInt(64)) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'grantNonce must fit uint64' + ); + } + return keccak256( + encodeAbiParameters( + [{ type: 'address' }, { type: 'bytes' }, { type: 'bytes32' }], + [ + ctx.validator, + agentConfig(ctx.agent), + numberToHex(ctx.grantNonce, { size: 32 }), + ] + ) + ); +} + +const UINT96_MAX = BigInt(2) ** BigInt(96) - BigInt(1); + +/** + * Counterfactual wallet address: CREATE2 by the factory proxy of an OZ clone + * of `walletImplementation` with immutable args (owner ‖ factory), salt + * keccak256(abi.encode(owner, uint96 index)). + */ +export function deriveWallet(ctx: { + factory: Address; + walletImplementation: Address; + owner: Address; + index: bigint | number; +}): Address { + const index = BigInt(ctx.index); + if (index < BigInt(0) || index > UINT96_MAX) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'wallet index must fit uint96' + ); + } + const salt = keccak256( + encodeAbiParameters( + [{ type: 'address' }, { type: 'uint96' }], + [ctx.owner, index] + ) + ); + const args = encodePacked(['address', 'address'], [ctx.owner, ctx.factory]); + const argsLength = (args.length - 2) / 2; + const initCode = concat([ + '0x61', + numberToHex(argsLength + 0x2d, { size: 2 }), + '0x3d81600a3d39f3363d3d373d3d3d363d73', + ctx.walletImplementation, + '0x5af43d82803e903d91602b57fd5bf3', + args, + ]); + return getAddress( + getContractAddress({ + opcode: 'CREATE2', + from: ctx.factory, + salt, + bytecodeHash: keccak256(initCode), + }) + ); +} diff --git a/packages/core/src/lib/agentic/codec/native.ts b/packages/core/src/lib/agentic/codec/native.ts new file mode 100644 index 00000000..ae6012f3 --- /dev/null +++ b/packages/core/src/lib/agentic/codec/native.ts @@ -0,0 +1,456 @@ +import { ARG_PIN_COMPONENTS, validatePins, type ArgPinWire } from './pins'; +import { + decodeAbiParameters, + encodeAbiParameters, + getAddress, + isAddress, + isHex, + type AbiParameter, + type Address, + type Hex, +} from 'viem'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import type { + AgenticHex, + NativeAction, + NativeRule, + NativeSingleRule, +} from '../agentic.types'; +import { argumentOffset, encodeArgWord, rawOffset } from './abi-layout'; +import { AGENTIC_DEFAULTS, UINT256_MAX, withDefault } from './defaults'; +import { + parseSelector, + VALUE_ONLY_SELECTOR, + type ParsedSelector, +} from './selectors'; + +/** URP native limits at v6 (Types.sol MAX_PINS, AGW MAX_NATIVE_ACTIONS). */ +export const MAX_PINS = 8; +export const MAX_NATIVE_ACTIONS = 8; +const UINT32_MAX = 2 ** 32 - 1; +const UINT48_MAX = 2 ** 48 - 1; + +/** NativeTerms in the pinned v6 Types.sol. */ +export interface NativeTermsWire { + validUntil: number; + target: Address; + selector: Hex; + maxValuePerCall: bigint; + maxValueTotal: bigint; + amount: { + enabled: boolean; + offset: number; + maxPerCall: bigint; + maxTotal: bigint; + }; + maxCalls: number; + pins: readonly ArgPinWire[]; +} + +export const NATIVE_TERMS_PARAM: AbiParameter = { + type: 'tuple', + components: [ + { name: 'validUntil', type: 'uint48' }, + { name: 'target', type: 'address' }, + { name: 'selector', type: 'bytes4' }, + { name: 'maxValuePerCall', type: 'uint256' }, + { name: 'maxValueTotal', type: 'uint256' }, + { + name: 'amount', + type: 'tuple', + components: [ + { name: 'enabled', type: 'bool' }, + { name: 'offset', type: 'uint16' }, + { name: 'maxPerCall', type: 'uint256' }, + { name: 'maxTotal', type: 'uint256' }, + ], + }, + { name: 'maxCalls', type: 'uint32' }, + { + name: 'pins', + type: 'tuple[]', + components: ARG_PIN_COMPONENTS, + }, + ], +}; + +function invalid( + message: string, + details?: Record +): AgenticError { + return new AgenticError(AGENTIC_ERROR_CODE.INVALID_RULE, message, { + details, + }); +} + +function assertUint(value: bigint, bits: number, field: string): void { + if ( + typeof value !== 'bigint' || + value < BigInt(0) || + value >= BigInt(2) ** BigInt(bits) + ) { + throw invalid(`${field} must be a uint${bits} bigint`); + } +} + +export interface NativeEncodeContext { + /** Current unix time in seconds; grants with validUntil <= now are rejected. */ + nowSeconds: number; +} + +const SINGLE_ACTION_FIELDS = [ + 'target', + 'selector', + 'maxValuePerCall', + 'maxValueTotal', + 'maxCalls', + 'pins', + 'wirePins', + 'amount', +] as const; + +/** + * The actions a native rule allows: the single-action shorthand, or the + * explicit `actions` list (1..8). Each carries its effective `validUntil`. + */ +export function nativeActionsOf( + rule: NativeRule +): (NativeAction & { validUntil: number })[] { + if ( + !Number.isInteger(rule.validUntil) || + rule.validUntil < 1 || + rule.validUntil > UINT48_MAX + ) { + throw invalid( + 'rule validUntil must be a positive unix timestamp in seconds (uint48)' + ); + } + if (rule.actions !== undefined) { + if ( + !Array.isArray(rule.actions) || + rule.actions.length < 1 || + rule.actions.length > MAX_NATIVE_ACTIONS + ) { + throw invalid( + `actions must contain 1..${MAX_NATIVE_ACTIONS} entries (the AGW native action limit)` + ); + } + const mixed = SINGLE_ACTION_FIELDS.filter( + (f) => (rule as unknown as Record)[f] !== undefined + ); + if (mixed.length > 0) { + throw invalid( + `actions cannot be combined with top-level ${mixed.join( + ', ' + )}; put them inside each action` + ); + } + return rule.actions.map((a, i) => { + if (!a || typeof a !== 'object' || Array.isArray(a)) { + throw invalid(`actions[${i}] must be an action object`, { action: i }); + } + return { ...a, validUntil: a.validUntil ?? rule.validUntil }; + }); + } + const single = rule as NativeSingleRule; + return [ + { + target: single.target, + selector: single.selector, + maxValuePerCall: single.maxValuePerCall, + maxValueTotal: single.maxValueTotal, + maxCalls: single.maxCalls, + pins: single.pins, + wirePins: single.wirePins, + amount: single.amount, + validUntil: single.validUntil, + }, + ]; +} + +/** + * Normalize and validate every action of a native rule into wire terms, in + * input order. (target, selector) pairs must be unique — the wallet refuses + * duplicates (DuplicateAction) because they share one action ID. Pure. + */ +export function nativeRuleToActionTerms( + rule: NativeRule, + ctx: NativeEncodeContext +): { terms: NativeTermsWire; parsed: ParsedSelector }[] { + if (rule.validUntil <= ctx.nowSeconds) { + throw invalid( + 'rule validUntil must be a future unix timestamp in seconds (uint48)' + ); + } + const actions = nativeActionsOf(rule); + const multi = rule.actions !== undefined; + const out = actions.map((action, i) => { + try { + return nativeActionToTerms(action, ctx); + } catch (err) { + if (multi && err instanceof AgenticError) { + throw new AgenticError(err.code, `actions[${i}]: ${err.message}`, { + hint: err.hint, + details: { ...(err.details ?? {}), action: i }, + cause: err, + }); + } + throw err; + } + }); + const seen = new Map(); + out.forEach(({ terms }, i) => { + const key = `${terms.target.toLowerCase()}:${terms.selector}`; + const first = seen.get(key); + if (first !== undefined) { + throw invalid( + `actions[${i}] repeats the target and selector of actions[${first}]`, + { action: i } + ); + } + seen.set(key, i); + }); + return out; +} + +/** Single-action convenience; multi-action rules use nativeRuleToActionTerms. */ +export function nativeRuleToTerms( + rule: NativeRule, + ctx: NativeEncodeContext +): { terms: NativeTermsWire; parsed: ParsedSelector } { + const all = nativeRuleToActionTerms(rule, ctx); + if (all.length !== 1) { + throw invalid('nativeRuleToTerms takes a single-action rule'); + } + return all[0]; +} + +/** Normalize and validate one native action into wire terms. Pure. */ +export function nativeActionToTerms( + rule: NativeAction & { validUntil: number }, + ctx: NativeEncodeContext +): { terms: NativeTermsWire; parsed: ParsedSelector } { + if ( + !isAddress(rule.target, { strict: false }) || + /^0x0{40}$/i.test(rule.target) + ) { + throw invalid('native rule target must be a non-zero address'); + } + if ( + !Number.isInteger(rule.validUntil) || + rule.validUntil <= ctx.nowSeconds || + rule.validUntil > UINT48_MAX + ) { + throw invalid( + 'validUntil must be a future unix timestamp in seconds (uint48)', + { + validUntil: rule.validUntil, + } + ); + } + const parsed = parseSelector(rule.selector); + const pinsIn = rule.pins ?? []; + if ( + parsed.valueOnly && + (pinsIn.length > 0 || rule.wirePins?.length || rule.amount) + ) { + throw invalid('a value-only rule cannot carry pins or an amount rule'); + } + if (pinsIn.length > MAX_PINS) { + throw invalid(`at most ${MAX_PINS} pins are allowed`, { + pins: pinsIn.length, + }); + } + + const pins = pinsIn.map((p, i) => { + if (p.arg !== undefined && p.offset !== undefined) + throw invalid('pin arg and offset are mutually exclusive'); + if (p.offset !== undefined) { + if ( + typeof p.expected !== 'string' || + !isHex(p.expected) || + p.expected.length !== 66 + ) { + throw invalid( + `pins[${i}].expected must be the exact 32-byte calldata word in offset form` + ); + } + return { + offset: rawOffset(p.offset, `pins[${i}]`), + expected: p.expected.toLowerCase() as Hex, + }; + } + if (typeof p.arg !== 'number') throw invalid('pin requires arg or offset'); + const offset = argumentOffset(parsed.inputs, p.arg, `pins[${i}]`); + const param = (parsed.inputs as readonly AbiParameter[])[p.arg]; + return { offset, expected: encodeArgWord(param, p.expected, `pins[${i}]`) }; + }); + const offsets = new Set(pins.map((p) => p.offset)); + if (offsets.size !== pins.length) + throw invalid('two pins address the same argument'); + + let amount: NativeTermsWire['amount'] = { + enabled: false, + offset: 0, + maxPerCall: BigInt(0), + maxTotal: BigInt(0), + }; + if (rule.amount) { + let offset: number; + if (rule.amount.arg !== undefined && rule.amount.offset !== undefined) + throw invalid('amount arg and offset are mutually exclusive'); + if (rule.amount.offset !== undefined) { + offset = rawOffset(rule.amount.offset, 'amount'); + } else { + if (typeof rule.amount.arg !== 'number') + throw invalid('amount requires arg or offset'); + offset = argumentOffset(parsed.inputs, rule.amount.arg, 'amount'); + const param = (parsed.inputs as readonly AbiParameter[])[rule.amount.arg]; + if (!/^uint\d*$/.test(param.type)) { + throw invalid( + `amount argument must be an unsigned integer, got ${param.type}` + ); + } + } + if (offsets.has(offset)) throw invalid('amount argument is also pinned'); + assertUint(rule.amount.maxPerCall, 256, 'amount.maxPerCall'); + const maxTotal = withDefault( + rule.amount.maxTotal, + AGENTIC_DEFAULTS.native.amountMaxTotal + ); + assertUint(maxTotal, 256, 'amount.maxTotal'); + amount = { + enabled: true, + offset, + maxPerCall: rule.amount.maxPerCall, + maxTotal, + }; + } + + const maxValuePerCall = withDefault( + rule.maxValuePerCall, + AGENTIC_DEFAULTS.native.maxValuePerCall + ); + const maxValueTotal = withDefault( + rule.maxValueTotal, + AGENTIC_DEFAULTS.native.maxValueTotal + ); + assertUint(maxValuePerCall, 256, 'maxValuePerCall'); + assertUint(maxValueTotal, 256, 'maxValueTotal'); + const maxCalls = + rule.maxCalls === undefined + ? Number(AGENTIC_DEFAULTS.native.maxCalls.value) + : rule.maxCalls; + if (!Number.isInteger(maxCalls) || maxCalls <= 0 || maxCalls > UINT32_MAX) { + throw invalid('maxCalls must be a uint32 integer'); + } + + try { + validatePins( + rule.wirePins ?? + pins.map((p) => ({ + offset: p.offset, + op: 0 as const, + value: p.expected, + })) + ); + } catch (error) { + throw invalid((error as Error).message); + } + return { + parsed, + terms: { + validUntil: rule.validUntil, + target: getAddress(rule.target), + selector: parsed.selector, + maxValuePerCall, + maxValueTotal, + amount, + maxCalls, + pins: + rule.wirePins ?? + pins.map((p) => ({ + offset: p.offset, + op: 0 as const, + value: p.expected, + })), + }, + }; +} + +export function encodeNativeTerms(terms: NativeTermsWire): Hex { + return encodeAbiParameters([NATIVE_TERMS_PARAM], [terms]); +} + +export function decodeNativeTerms(body: Hex): NativeTermsWire { + const [terms] = decodeAbiParameters([NATIVE_TERMS_PARAM], body); + return terms as unknown as NativeTermsWire; +} + +/** + * Wire terms back to the public NativeRule shape. Stored terms carry calldata + * offsets and exact words but no ABI, so pins and amount are returned in the + * raw `offset` form (never a guessed argument index) and `selector` is the + * 4-byte hex. The result re-encodes to the same terms. + */ +export function nativeTermsToRule( + terms: NativeTermsWire, + agent: Address +): NativeSingleRule { + const rule: NativeSingleRule = { + agent: getAddress(agent), + target: getAddress(terms.target), + selector: + terms.selector.toLowerCase() === VALUE_ONLY_SELECTOR + ? 'value-only' + : (terms.selector.toLowerCase() as AgenticHex), + validUntil: Number(terms.validUntil), + maxValuePerCall: terms.maxValuePerCall, + maxValueTotal: terms.maxValueTotal, + maxCalls: Number(terms.maxCalls), + }; + if (terms.pins.length > 0) rule.wirePins = terms.pins.map((p) => ({ ...p })); + if (terms.amount.enabled) { + rule.amount = { + offset: Number(terms.amount.offset), + maxPerCall: terms.amount.maxPerCall, + maxTotal: terms.amount.maxTotal, + }; + } + return rule; +} + +/** + * Stored action terms back to a public NativeRule: the single-action + * shorthand for one action, otherwise `actions` in stored order. The rule's + * `validUntil` is the earliest action expiry; an action expiring later keeps + * its own `validUntil`, so the result re-encodes to identical terms. + */ +export function nativeActionTermsToRule( + termsList: readonly NativeTermsWire[], + agent: Address +): NativeRule { + if (termsList.length === 0) { + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + 'a native rule needs at least one action' + ); + } + if (termsList.length === 1) return nativeTermsToRule(termsList[0], agent); + const decoded = termsList.map((t) => nativeTermsToRule(t, agent)); + const validUntil = Math.min(...decoded.map((d) => d.validUntil)); + return { + agent: getAddress(agent), + validUntil, + actions: decoded.map( + ({ agent: _agent, validUntil: actionValidUntil, ...action }) => + actionValidUntil === validUntil + ? action + : { ...action, validUntil: actionValidUntil } + ), + }; +} + +export function isUnlimited(value: bigint): boolean { + return value === UINT256_MAX; +} diff --git a/packages/core/src/lib/agentic/codec/pins.ts b/packages/core/src/lib/agentic/codec/pins.ts new file mode 100644 index 00000000..4c81a522 --- /dev/null +++ b/packages/core/src/lib/agentic/codec/pins.ts @@ -0,0 +1,32 @@ +import type { Hex } from 'viem'; +export interface ArgPinWire { + offset: number; + op: 0 | 1; + value: Hex; +} +export const ARG_PIN_COMPONENTS = [ + { name: 'offset', type: 'uint16' }, + { name: 'op', type: 'uint8' }, + { name: 'value', type: 'bytes32' }, +] as const; +export const UNLIMITED_CALLS = 0xffffffff; +export const ANY_ACCOUNT_COUNT = 255; + +/** Validate every encoded constraint before signing. */ +export function validatePins(pins: readonly ArgPinWire[]): void { + if (!Array.isArray(pins) || pins.length > 8) + throw new Error('pins must contain at most eight constraints'); + const seen = new Set(); + for (const p of pins) { + if ( + !Number.isInteger(p.offset) || + p.offset < 4 || + p.offset + 32 > 65535 || + ![0, 1].includes(p.op) || + !/^0x[0-9a-fA-F]{64}$/.test(p.value) + ) + throw new Error('invalid argument pin'); + if (seen.has(p.offset)) throw new Error('duplicate pin offset'); + seen.add(p.offset); + } +} diff --git a/packages/core/src/lib/agentic/codec/rules.ts b/packages/core/src/lib/agentic/codec/rules.ts new file mode 100644 index 00000000..d3cf0b22 --- /dev/null +++ b/packages/core/src/lib/agentic/codec/rules.ts @@ -0,0 +1,216 @@ +import { + getAddress, + isAddress, + keccak256, + toBytes, + type Address, + type Hex, +} from 'viem'; +import { AgenticCapability, requireCapability } from '../capabilities'; +import { AGENTIC_ERROR_CODE, AgenticError, ruleErrorContext } from '../errors'; +import type { + NativeRule, + InternalRule, + UniversalRule, + SolanaRule, +} from '../agentic.types'; +import { + encodeNativeTerms, + nativeRuleToActionTerms, + type NativeTermsWire, +} from './native'; +import { buildSession, encodeEnvelope, type SessionWire } from './session'; +import { encodeUniversalRule, type ResolvedUniversalRule } from './universal'; +import { + encodeSvmTerms, + refuseFromEndPins, + type SvmTermsWire, +} from './svm-terms'; +import { SEND_OUTBOUND_SELECTOR } from '../contracts/v6'; +import type { UniversalTermsWire } from './universal-terms'; + +export function isSolanaRule(rule: InternalRule): rule is SolanaRule { + return ( + typeof (rule as SolanaRule).chainNamespace === 'string' && + (rule as SolanaRule).chainNamespace.startsWith('solana:') + ); +} + +export function isUniversalRule(rule: InternalRule): rule is UniversalRule { + return ( + (rule as UniversalRule).chainNamespace !== undefined && !isSolanaRule(rule) + ); +} + +/** CAIP-2 chain a rule governs: omitted = the connected Push chain. */ +export function ruleChain( + rule: InternalRule, + pushChainNamespace: string +): string { + return ( + (rule as UniversalRule | SolanaRule).chainNamespace ?? pushChainNamespace + ); +} + +export function chainHash(chainNamespace: string): Hex { + return keccak256(toBytes(chainNamespace)); +} + +export interface RuleEncodeContext { + /** 'eip155:' of the connected network. */ + pushChainNamespace: string; + validator: Address; + rulesPolicy: Address; + capabilities: ReadonlySet; + nowSeconds: number; + gateway?: Address; + universal?: ReadonlyMap; + svm?: ReadonlyMap; + /** + * Addresses a native rule may never target (AGW _requireGrantableTarget / + * URP NativeTargetIsGateway): wallet, engine, policy, validator, factory, + * gateway. 0x0 and 0x1 are always refused. + */ + forbiddenTargets?: readonly Address[]; +} + +export interface PreparedRule { + rule: InternalRule; + agent: Address; + chainNamespace: string; + session: SessionWire; + /** Native terms, one per action in input order, when the rule is native. */ + nativeTerms?: NativeTermsWire[]; + universalTerms?: UniversalTermsWire; + svmTerms?: SvmTermsWire; +} + +/** Validate before signing. V6 permits several grants for the same agent/chain. */ +export function prepareRules( + rules: readonly InternalRule[], + ctx: RuleEncodeContext & { + /** Wallet owner; when given, an agent equal to it is AGENT_IS_OWNER. */ + owner?: Address; + } +): PreparedRule[] { + if (!Array.isArray(rules)) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'rules must be an array' + ); + } + return rules.map((rule, i) => { + try { + if (!rule || typeof rule !== 'object') { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `rules[${i}] is not an object` + ); + } + if ( + !isAddress(rule.agent, { strict: false }) || + /^0x0{40}$/i.test(rule.agent) + ) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `rules[${i}].agent must be a non-zero Push address` + ); + } + const agent = getAddress(rule.agent); + if (ctx.owner && agent === getAddress(ctx.owner)) { + throw new AgenticError( + AGENTIC_ERROR_CODE.AGENT_IS_OWNER, + `rules[${i}].agent is the wallet owner; the owner uses the owner door` + ); + } + const chainNamespace = ruleChain(rule, ctx.pushChainNamespace); + if ( + isUniversalRule(rule) && + rule.chainNamespace === ctx.pushChainNamespace + ) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `rules[${i}] names the connected Push chain; omit chainNamespace for a native rule` + ); + } + if ('ref' in rule) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'InternalRule ref is not supported; remove it from the input' + ); + } + + if (isSolanaRule(rule)) { + requireCapability( + ctx.capabilities, + AgenticCapability.UNIVERSAL_SVM_RULES + ); + const terms = ctx.svm?.get(rule); + if (!terms || !ctx.gateway) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'SVM rules require resolved wallet context and validated instruction layouts' + ); + refuseFromEndPins(terms); + return { + rule, + agent, + chainNamespace, + svmTerms: terms, + session: buildSession({ + validator: ctx.validator, + rulesPolicy: ctx.rulesPolicy, + agent, + actions: [ + { + target: ctx.gateway, + selector: SEND_OUTBOUND_SELECTOR, + initData: encodeEnvelope( + chainNamespace, + encodeSvmTerms(terms, ctx.nowSeconds) + ), + }, + ], + }), + }; + } + if (isUniversalRule(rule)) { + return encodeUniversalRule(rule, ctx); + } + requireCapability(ctx.capabilities, AgenticCapability.NATIVE_RULES); + const actions = nativeRuleToActionTerms(rule as NativeRule, ctx).map( + (a) => a.terms + ); + const forbidden = [ + '0x0000000000000000000000000000000000000000', + '0x0000000000000000000000000000000000000001', + ...(ctx.forbiddenTargets ?? []), + ].map((a) => a.toLowerCase()); + actions.forEach((terms, j) => { + if (forbidden.includes(terms.target.toLowerCase())) { + const where = + actions.length > 1 ? `rules[${i}].actions[${j}]` : `rules[${i}]`; + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `${where}.target ${terms.target} is a wallet-infrastructure address the contracts refuse as a native target` + ); + } + }); + // One rule, one rule ID: every action is a separate (target, selector) + // entry of the same session, each with its own stored terms. + const session = buildSession({ + validator: ctx.validator, + agent, + rulesPolicy: ctx.rulesPolicy, + actions: actions.map((terms) => ({ + target: terms.target, + selector: terms.selector, + initData: encodeEnvelope(chainNamespace, encodeNativeTerms(terms)), + })), + }); + return { rule, agent, chainNamespace, session, nativeTerms: actions }; + } catch (error) { + throw ruleErrorContext(error, i, rule?.chainNamespace); + } + }); +} diff --git a/packages/core/src/lib/agentic/codec/selectors.ts b/packages/core/src/lib/agentic/codec/selectors.ts new file mode 100644 index 00000000..317575f7 --- /dev/null +++ b/packages/core/src/lib/agentic/codec/selectors.ts @@ -0,0 +1,77 @@ +import { + parseAbiItem, + toFunctionSelector, + type AbiFunction, + type AbiParameter, +} from 'viem'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import type { AgenticHex, Selector } from '../agentic.types'; + +/** Selector URP uses for a value-only native rule (empty calldata). */ +export const VALUE_ONLY_SELECTOR = '0xffffffff' as const; + +export interface ParsedSelector { + /** 4-byte selector, lowercase. */ + selector: AgenticHex; + /** Canonical signature when the caller supplied one. */ + signature?: string; + /** ABI inputs, only available when the caller supplied a signature. */ + inputs?: readonly AbiParameter[]; + valueOnly: boolean; +} + +const HEX_SELECTOR = /^0x[0-9a-fA-F]{8}$/; + +/** + * Parse a public selector (`'0x617ba037'`, `'supply(address,uint256,address,uint16)'` + * or `'value-only'`). A signature is required wherever pins, amounts or + * beneficiaries need argument positions; a bare hex selector carries none. + */ +export function parseSelector(input: Selector | 'value-only'): ParsedSelector { + if (input === 'value-only') { + return { selector: VALUE_ONLY_SELECTOR, valueOnly: true }; + } + if (typeof input !== 'string') { + throw invalid(`selector must be a string, got ${typeof input}`); + } + if (HEX_SELECTOR.test(input)) { + const selector = input.toLowerCase() as AgenticHex; + if (selector === VALUE_ONLY_SELECTOR) { + return { selector, valueOnly: true }; + } + return { selector, valueOnly: false }; + } + let item: AbiFunction; + try { + const parsed = parseAbiItem(`function ${input}`); + if (parsed.type !== 'function') throw new Error('not a function'); + item = parsed; + } catch (cause) { + throw invalid( + `selector "${input}" is neither a 4-byte hex selector nor a function signature`, + cause + ); + } + const selector = toFunctionSelector(item).toLowerCase() as AgenticHex; + if (selector === VALUE_ONLY_SELECTOR) { + throw invalid(`selector "${input}" collides with the reserved value-only selector`); + } + return { + selector, + signature: `${item.name}(${item.inputs.map(canonicalType).join(',')})`, + inputs: item.inputs, + valueOnly: false, + }; +} + +function canonicalType(p: AbiParameter): string { + if (p.type.startsWith('tuple')) { + const components = (p as { components?: readonly AbiParameter[] }).components ?? []; + return `(${components.map(canonicalType).join(',')})${p.type.slice(5)}`; + } + return p.type; +} + +function invalid(message: string, cause?: unknown): AgenticError { + return new AgenticError(AGENTIC_ERROR_CODE.INVALID_RULE, message, { cause }); +} diff --git a/packages/core/src/lib/agentic/codec/session.ts b/packages/core/src/lib/agentic/codec/session.ts new file mode 100644 index 00000000..1a7c839c --- /dev/null +++ b/packages/core/src/lib/agentic/codec/session.ts @@ -0,0 +1,116 @@ +import { + decodeAbiParameters, + encodeAbiParameters, + getAbiItem, + type AbiParameter, + type Address, + type Hex, +} from 'viem'; +import { AGW_ABI } from '../contracts/abi/v6'; +import { agentConfig } from './ids'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; + +/** + * The smartsessions `Session` a grant carries (DataTypes.sol:56-86, pinned + * v6). The wallet overwrites `salt` with its grant nonce, so the value + * sent is irrelevant; it is always zero here. + */ +export interface SessionWire { + sessionValidator: Address; + sessionValidatorInitData: Hex; + salt: Hex; + userOpPolicies: readonly { policy: Address; initData: Hex }[]; + erc7739Policies: { + allowedERC7739Content: readonly { + appDomainSeparator: Hex; + contentNames: readonly string[]; + }[]; + erc1271Policies: readonly { policy: Address; initData: Hex }[]; + }; + actions: readonly { + actionTargetSelector: Hex; + actionTarget: Address; + actionPolicies: readonly { policy: Address; initData: Hex }[]; + }[]; + permitERC4337Paymaster: boolean; +} + +export const SESSION_PARAM: AbiParameter = getAbiItem({ + abi: AGW_ABI, + name: 'grantRules', +}).inputs[0] as AbiParameter; + +const ZERO_SALT = `0x${'00'.repeat(32)}` as Hex; + +export const ENVELOPE_VERSION = 1; + +/** V6 URP envelope: abi.encode(uint16(1), string chainNamespace, bytes body). */ +export function encodeEnvelope(chainNamespace: string, body: Hex): Hex { + return encodeAbiParameters( + [{ type: 'uint16' }, { type: 'string' }, { type: 'bytes' }], + [ENVELOPE_VERSION, chainNamespace, body] + ); +} + +export function decodeEnvelope(initData: Hex): { + chainNamespace: string; + body: Hex; +} { + try { + const [version, chainNamespace, body] = decodeAbiParameters( + [{ type: 'uint16' }, { type: 'string' }, { type: 'bytes' }], + initData + ); + if (version !== ENVELOPE_VERSION) + throw new Error(`unsupported rules envelope version ${version}`); + return { chainNamespace, body }; + } catch (cause) { + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + 'malformed URP envelope', + { + cause, + } + ); + } +} + +export function buildSession(ctx: { + validator: Address; + agent: Address; + rulesPolicy: Address; + actions: { target: Address; selector: Hex; initData: Hex }[]; +}): SessionWire { + return { + sessionValidator: ctx.validator, + sessionValidatorInitData: agentConfig(ctx.agent), + salt: ZERO_SALT, + userOpPolicies: [], + erc7739Policies: { allowedERC7739Content: [], erc1271Policies: [] }, + actions: ctx.actions.map((a) => ({ + actionTargetSelector: a.selector, + actionTarget: a.target, + actionPolicies: [{ policy: ctx.rulesPolicy, initData: a.initData }], + })), + permitERC4337Paymaster: false, + }; +} + +export function encodeSession(session: SessionWire): Hex { + return encodeAbiParameters([SESSION_PARAM], [session]); +} + +export function decodeSession(bytes: Hex): SessionWire { + try { + const [session] = decodeAbiParameters([SESSION_PARAM], bytes); + return session as unknown as SessionWire; + } catch (cause) { + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + 'malformed Session encoding', + { + cause, + } + ); + } +} diff --git a/packages/core/src/lib/agentic/codec/svm-accounts.ts b/packages/core/src/lib/agentic/codec/svm-accounts.ts new file mode 100644 index 00000000..75452b96 --- /dev/null +++ b/packages/core/src/lib/agentic/codec/svm-accounts.ts @@ -0,0 +1,104 @@ +import { PublicKey } from '@solana/web3.js'; +import { + bytesToHex, + getAddress, + hexToBytes, + type Address, + type Hex, +} from 'viem'; +import { exactHex, SVM_LIMITS, svmInvalid } from './svm-terms'; +import type { AssetCapWire } from './universal-terms'; + +const SPL_TOKEN = new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'); +const TOKEN_2022 = new PublicKey('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'); +const ASSOCIATED_TOKEN = new PublicKey( + 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' +); + +export function svmKey(value: string): Hex { + try { + if (value.startsWith('0x')) { + exactHex(value, 32, 'pubkey'); + return bytesToHex(new PublicKey(hexToBytes(value)).toBytes()); + } + return bytesToHex(new PublicKey(value).toBytes()); + } catch { + throw svmInvalid('invalid Solana public key'); + } +} +function key(value: string) { + return new PublicKey(hexToBytes(svmKey(value))); +} + +/** Gateway is supplied by the selected cluster registry, never a global hard-coded program. */ +export function deriveAgwSvmCea( + wallet: Address, + gatewayProgram: string +): { address: Hex; bump: number } { + if (key(gatewayProgram).equals(PublicKey.default)) + throw svmInvalid('gateway program cannot be zero'); + const [pda, bump] = PublicKey.findProgramAddressSync( + [Buffer.from('push_identity'), Buffer.from(hexToBytes(getAddress(wallet)))], + key(gatewayProgram) + ); + return { address: bytesToHex(pda.toBytes()), bump }; +} +export interface SvmTokenAccountInput { + mint: string; + tokenProgram?: string; +} +export type ResolvedSvmAsset = + | { kind: 'native'; cap: AssetCapWire } + | { kind: 'spl'; cap: AssetCapWire; mint: string; tokenProgram?: string }; + +/** Every resolved SPL cap contributes an ATA; caller cannot omit a listed mint. */ +export function resolveAgwSvmRuleContext( + wallet: Address, + gatewayProgram: string, + assets: readonly ResolvedSvmAsset[], + outputs: readonly SvmTokenAccountInput[] = [] +) { + if (!assets.length || assets.length > SVM_LIMITS.assets) + throw svmInvalid('resolved assets must contain 1..8 entries'); + const tokens = assets.flatMap((a) => + a.kind === 'spl' ? [{ mint: a.mint, tokenProgram: a.tokenProgram }] : [] + ); + return { + ...deriveAgwSvmValueAccounts(wallet, gatewayProgram, tokens, outputs), + assets: assets.map((a) => a.cap), + }; +} +export function deriveAgwSvmAta( + owner: string, + token: SvmTokenAccountInput +): Hex { + const mint = key(token.mint), + program = token.tokenProgram ? key(token.tokenProgram) : SPL_TOKEN; + if (mint.equals(PublicKey.default)) + throw svmInvalid('native SOL uses the CEA, not an ATA'); + if (!program.equals(SPL_TOKEN) && !program.equals(TOKEN_2022)) + throw svmInvalid('unsupported token program'); + const [ata] = PublicKey.findProgramAddressSync( + [key(owner).toBuffer(), program.toBuffer(), mint.toBuffer()], + ASSOCIATED_TOKEN + ); + return bytesToHex(ata.toBytes()); +} +/** Includes every listed mint and swap-output mint. Native SOL is already covered by the CEA. */ +export function deriveAgwSvmValueAccounts( + wallet: Address, + gatewayProgram: string, + tokens: readonly SvmTokenAccountInput[], + outputs: readonly SvmTokenAccountInput[] = [] +): { expectedCEA: Hex; gatewayProgram: Hex; ceaAccounts: Hex[] } { + const expectedCEA = deriveAgwSvmCea(wallet, gatewayProgram).address; + const ceaAccounts = [ + ...new Set([ + expectedCEA, + ...[...tokens, ...outputs].map((t) => deriveAgwSvmAta(expectedCEA, t)), + ]), + ]; + if (ceaAccounts.length > SVM_LIMITS.ceaAccounts) + throw svmInvalid('derived CEA value-account set exceeds 16'); + return { expectedCEA, gatewayProgram: svmKey(gatewayProgram), ceaAccounts }; +} diff --git a/packages/core/src/lib/agentic/codec/svm-idl.ts b/packages/core/src/lib/agentic/codec/svm-idl.ts new file mode 100644 index 00000000..9ed41f35 --- /dev/null +++ b/packages/core/src/lib/agentic/codec/svm-idl.ts @@ -0,0 +1,269 @@ +/** Compile named Anchor IDL constraints. Unsupported layouts are never guessed. */ +import type { Idl } from '@coral-xyz/anchor'; +import { bytesToHex, hexToBytes, type Hex } from 'viem'; +import type { SolanaRule, SvmAccountRef } from '../agentic.types'; +import { svmKey } from './svm-accounts'; +import { + SvmDataPinMode, + svmInvalid, + validateSvmTerms, + type SvmTermsWire, + type SvmDataPinWire, +} from './svm-terms'; + +export type SvmResolvedContext = Pick< + SvmTermsWire, + 'assets' | 'expectedCEA' | 'gatewayProgram' | 'ceaAccounts' +> & { + /** Verified mint -> wallet ATA mapping, including output mints. */ + tokenAccounts: ReadonlyMap; +}; +type Field = { offset: number; len: number; type: unknown }; +const widths: Record = { + bool: 1, + u8: 1, + i8: 1, + u16: 2, + i16: 2, + u32: 4, + i32: 4, + f32: 4, + u64: 8, + i64: 8, + f64: 8, + u128: 16, + i128: 16, + u256: 32, + i256: 32, + pubkey: 32, +}; +function width(type: unknown): number { + if (typeof type === 'string' && widths[type]) return widths[type]; + if (type && typeof type === 'object' && 'array' in type) { + const a = (type as { array: unknown }).array; + if ( + Array.isArray(a) && + a.length === 2 && + Number.isSafeInteger(a[1]) && + a[1] > 0 + ) { + const size = width(a[0]) * a[1]; + if (size <= 1024) return size; + } + } + throw svmInvalid( + 'IDL field layout is not supported: use fixed-width primitives or fixed arrays' + ); +} +export function svmIdlInstruction(idl: Idl, name: string) { + if (!idl || !Array.isArray(idl.instructions) || typeof name !== 'string') + throw svmInvalid('instruction requires an Anchor IDL and name'); + const found = idl.instructions.filter((i) => i.name === name); + if (found.length !== 1) + throw svmInvalid(`IDL instruction ${name} must exist exactly once`); + const ix = found[0]; + if ( + !Array.isArray(ix.discriminator) || + ix.discriminator.length !== 8 || + ix.discriminator.some((b) => !Number.isInteger(b) || b < 0 || b > 255) + ) + throw svmInvalid('Anchor IDL discriminator must contain eight bytes'); + return ix; +} +function accountNames(accounts: unknown[], prefix = ''): string[] { + return accounts.flatMap((entry) => { + if ( + !entry || + typeof entry !== 'object' || + !('name' in entry) || + typeof entry.name !== 'string' + ) + throw svmInvalid('invalid IDL account'); + const name = prefix + entry.name; + if ('accounts' in entry) + throw svmInvalid( + 'nested IDL accounts are not supported by the instruction resolver' + ); + if ('optional' in entry && entry.optional) + throw svmInvalid('optional IDL accounts are not supported for rules'); + return [name]; + }); +} +function resolveAccount(ref: SvmAccountRef, ctx: SvmResolvedContext): Hex { + if (!ref || typeof ref !== 'object') + throw svmInvalid('invalid named account reference'); + if (ref.kind === 'walletCEA') return ctx.expectedCEA; + if (ref.kind === 'address') return svmKey(ref.address); + if (ref.kind === 'walletATA') { + const ata = ctx.tokenAccounts.get(svmKey(ref.token)); + if (!ata) + throw svmInvalid( + 'walletATA mint must be listed in assets or outputTokens' + ); + return ata; + } + throw svmInvalid('unknown named account reference'); +} +function unsigned(f: Field): void { + if (typeof f.type !== 'string' || !/^u(8|16|32|64)$/.test(f.type)) + throw svmInvalid( + 'range/ratio constraints require unsigned integer fields of at most eight bytes' + ); +} +function bound(v: bigint, len: number): Hex { + if ( + typeof v !== 'bigint' || + v < BigInt(0) || + v >= BigInt(1) << BigInt(len * 8) + ) + throw svmInvalid('field constraint exceeds its unsigned width'); + return `0x${v.toString(16).padStart(64, '0')}`; +} +export function compileSvmIdlRule( + rule: SolanaRule, + ctx: SvmResolvedContext, + now: number +): SvmTermsWire { + if ( + !Array.isArray(rule.allowedInstructions) || + !rule.allowedInstructions.length || + rule.allowedInstructions.length > 32 + ) + throw svmInvalid('allowedInstructions must contain 1..32 entries'); + const terms: SvmTermsWire = { + validUntil: rule.validUntil, + maxGasPerCall: rule.maxGasPerCall, + assets: ctx.assets, + expectedCEA: ctx.expectedCEA, + gatewayProgram: ctx.gatewayProgram, + ceaAccounts: ctx.ceaAccounts, + programs: [], + pins: [], + dataPins: [], + }; + const programs = [], + pins = [], + dataPins: SvmDataPinWire[] = []; + for (const [ruleIndex, entry] of rule.allowedInstructions.entries()) { + const ix = svmIdlInstruction( + entry.instruction?.idl, + entry.instruction?.name + ); + const program = svmKey(entry.program); + if (svmKey(entry.instruction.idl.address) !== program) + throw svmInvalid('IDL address differs from rule program'); + if (!Array.isArray(ix.accounts) || !Array.isArray(entry.accounts)) + throw svmInvalid('instruction accounts are required'); + const names = accountNames(ix.accounts); + if (new Set(names).size !== names.length) + throw svmInvalid('duplicate IDL account names'); + programs.push({ + program, + discriminator: bytesToHex( + Uint8Array.from([ + ...ix.discriminator, + ...Array(8 - ix.discriminator.length).fill(0), + ]) + ), + discriminatorLen: ix.discriminator.length, + dataless: false, + maxAccounts: entry.maxAccounts ?? names.length, + }); + for (const a of entry.accounts) { + const accountIndex = names.indexOf(a.name); + if (accountIndex < 0) throw svmInvalid(`unknown IDL account ${a.name}`); + pins.push({ + ruleIndex, + accountIndex, + expected: resolveAccount(a.expected, ctx), + }); + } + const fields = new Map(); + let offset = ix.discriminator.length; + // Reject variable/nested-defined layouts rather than claiming a reliable offset. + for (const arg of ix.args) { + if (fields.has(arg.name)) throw svmInvalid('duplicate IDL field name'); + const len = width(arg.type); + fields.set(arg.name, { offset, len, type: arg.type }); + offset += len; + } + if (offset > 1024) + throw svmInvalid('IDL instruction data exceeds the policy limit'); + const field = (name: string) => { + const f = fields.get(name); + if (!f) throw svmInvalid(`unknown IDL field ${name}`); + return f; + }; + if (entry.fields !== undefined && !Array.isArray(entry.fields)) + throw svmInvalid('fields must be an array'); + for (const constraint of entry.fields ?? []) { + const keys = ['equals', 'min', 'max', 'minRatio'].filter( + (k) => k in constraint + ); + if (keys.length !== 1) + throw svmInvalid( + 'each field constraint must specify exactly one comparison' + ); + const f = field( + 'numerator' in constraint ? constraint.numerator : constraint.name + ); + const p: SvmDataPinWire = { + ruleIndex, + fromEnd: false, + offset: f.offset, + offsetB: 0, + len: f.len, + mode: SvmDataPinMode.EQ, + expected: `0x${'00'.repeat(32)}`, + num: BigInt(0), + den: BigInt(0), + }; + if ('minRatio' in constraint) { + unsigned(f); + const b = field(constraint.denominator); + unsigned(b); + if (f.len !== b.len) + throw svmInvalid('ratio fields must have the same width'); + Object.assign(p, { + mode: SvmDataPinMode.RATIO_GTE_LE, + offsetB: b.offset, + num: constraint.minRatio.num, + den: constraint.minRatio.den, + }); + } else if ('min' in constraint || 'max' in constraint) { + unsigned(f); + const min = 'min' in constraint; + p.mode = min ? SvmDataPinMode.GTE_LE : SvmDataPinMode.LTE_LE; + p.expected = bound(min ? constraint.min : constraint.max, f.len); + } else { + let bytes: Uint8Array; + if (typeof constraint.equals === 'bigint') { + unsigned(f); + bound(constraint.equals, f.len); + bytes = Uint8Array.from({ length: f.len }, (_, i) => + Number( + ((constraint.equals as bigint) >> BigInt(8 * i)) & BigInt(255) + ) + ); + } else if (typeof constraint.equals === 'boolean') { + if (f.type !== 'bool') + throw svmInvalid('boolean equality requires a bool field'); + bytes = Uint8Array.of(constraint.equals ? 1 : 0); + } else { + if (!/^0x(?:[a-fA-F0-9]{2})*$/.test(constraint.equals)) + throw svmInvalid('equality requires exact hex bytes'); + bytes = hexToBytes(constraint.equals); + } + if (bytes.length !== f.len || f.len > 32) + throw svmInvalid( + 'equality value must match field width (at most 32 bytes)' + ); + p.expected = `0x${bytesToHex(bytes).slice(2).padEnd(64, '0')}`; + } + dataPins.push(p); + } + } + Object.assign(terms, { programs, pins, dataPins }); + validateSvmTerms(terms, now); + return terms; +} diff --git a/packages/core/src/lib/agentic/codec/svm-terms.ts b/packages/core/src/lib/agentic/codec/svm-terms.ts new file mode 100644 index 00000000..23e90929 --- /dev/null +++ b/packages/core/src/lib/agentic/codec/svm-terms.ts @@ -0,0 +1,320 @@ +/** Internal v6 SVM wire representation; not a proposed public Rule API. */ +import { + decodeAbiParameters, + encodeAbiParameters, + isAddress, + type Hex, +} from 'viem'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import { UINT256_MAX } from './defaults'; +import type { AssetCapWire } from './universal-terms'; + +export enum SvmDataPinMode { + EQ, + GTE_LE, + LTE_LE, + RATIO_GTE_LE, +} +export interface AllowedProgramWire { + program: Hex; + discriminator: Hex; + discriminatorLen: number; + dataless: boolean; + maxAccounts: number; +} +export interface SvmAccountPinWire { + ruleIndex: number; + accountIndex: number; + expected: Hex; +} +export interface SvmDataPinWire { + ruleIndex: number; + fromEnd: boolean; + offset: number; + offsetB: number; + len: number; + mode: SvmDataPinMode; + expected: Hex; + num: bigint; + den: bigint; +} +export interface SvmTermsWire { + validUntil: number; + expectedCEA: Hex; + gatewayProgram: Hex; + assets: readonly AssetCapWire[]; + maxGasPerCall: bigint; + ceaAccounts: readonly Hex[]; + programs: readonly AllowedProgramWire[]; + pins: readonly SvmAccountPinWire[]; + dataPins: readonly SvmDataPinWire[]; +} +export const SVM_LIMITS = { + assets: 8, + programs: 32, + pins: 16, + dataPins: 8, + ceaAccounts: 16, + accounts: 64, + ixData: 1024, +} as const; +export const UINT64_MAX = BigInt(2) ** BigInt(64) - BigInt(1); +export const FORBIDDEN_SVM_PROGRAMS: readonly Hex[] = [ + `0x${'00'.repeat(32)}`, + '0x06ddf6e1d765a193d9cbe146ceeb79ac1cb485ed5f5b37913a8cf5857eff00a9', + '0x06ddf6e1ee758fde18425dbce46ccddab61afc4d83b90d27febdf928d8a18bfc', + '0x06a1d8179137542a983437bdfe2a7ab2557f535c8a78722b68a49dc000000000', + '0x02a8f6914e88a1b0e210153ef763ae2b00c2b93d16c124d2c0537a1004800000', + '0x0277a6af97339b7ac88d1892c90446f50002309266f62e53c118244982000000', +]; +export const SVM_TERMS_PARAM = { + type: 'tuple', + components: [ + { name: 'validUntil', type: 'uint48' }, + { name: 'expectedCEA', type: 'bytes32' }, + { name: 'gatewayProgram', type: 'bytes32' }, + { + name: 'assets', + type: 'tuple[]', + components: [ + { name: 'token', type: 'address' }, + { name: 'maxPerCall', type: 'uint256' }, + { name: 'maxTotal', type: 'uint256' }, + ], + }, + { name: 'maxGasPerCall', type: 'uint256' }, + { name: 'ceaAccounts', type: 'bytes32[]' }, + { + name: 'programs', + type: 'tuple[]', + components: [ + { name: 'program', type: 'bytes32' }, + { name: 'discriminator', type: 'bytes8' }, + { name: 'discriminatorLen', type: 'uint8' }, + { name: 'dataless', type: 'bool' }, + { name: 'maxAccounts', type: 'uint8' }, + ], + }, + { + name: 'pins', + type: 'tuple[]', + components: [ + { name: 'ruleIndex', type: 'uint8' }, + { name: 'accountIndex', type: 'uint8' }, + { name: 'expected', type: 'bytes32' }, + ], + }, + { + name: 'dataPins', + type: 'tuple[]', + components: [ + { name: 'ruleIndex', type: 'uint8' }, + { name: 'fromEnd', type: 'bool' }, + { name: 'offset', type: 'uint16' }, + { name: 'offsetB', type: 'uint16' }, + { name: 'len', type: 'uint8' }, + { name: 'mode', type: 'uint8' }, + { name: 'expected', type: 'bytes32' }, + { name: 'num', type: 'uint64' }, + { name: 'den', type: 'uint64' }, + ], + }, + ], +} as const; + +export function svmInvalid(message: string): AgenticError { + return new AgenticError(AGENTIC_ERROR_CODE.INVALID_RULE, message); +} +export function exactHex( + value: unknown, + bytes: number, + field: string +): asserts value is Hex { + if ( + typeof value !== 'string' || + !new RegExp(`^0x[0-9a-fA-F]{${bytes * 2}}$`).test(value) + ) + throw svmInvalid(`${field} must contain exactly ${bytes} bytes`); +} +function integer(value: number, max: number, field: string) { + if (!Number.isInteger(value) || value < 0 || value > max) + throw svmInvalid(`${field} is out of range`); +} +function uint(value: bigint, max: bigint, field: string) { + if (typeof value !== 'bigint' || value < BigInt(0) || value > max) + throw svmInvalid(`${field} is out of range`); +} +export function isForbiddenSvmProgram( + program: Hex, + terms: Pick +): boolean { + return [ + ...FORBIDDEN_SVM_PROGRAMS, + terms.gatewayProgram, + terms.expectedCEA, + ].some((x) => x.toLowerCase() === program.toLowerCase()); +} +function offsetValid(fromEnd: boolean, offset: number, len: number): boolean { + return fromEnd + ? offset >= len && offset <= SVM_LIMITS.ixData + : offset + len <= SVM_LIMITS.ixData; +} + +/** Write-path only. The deployed SvmRulebook doesn't bind instruction-data + * length to a rule, so appended bytes can shift a `fromEnd` pin onto + * attacker-chosen data (Zaryab, 2026-10-23). Refused until the policy fix; + * decoding and reading existing rules still accept it. */ +export function refuseFromEndPins(t: SvmTermsWire): void { + if (t.dataPins.some((p) => p.fromEnd)) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'Solana data pins counted from the end of the instruction data are not supported yet', + { details: { reason: 'FROM_END_PIN_UNSUPPORTED', field: 'dataPins' } } + ); +} + +/** Grant-time structural rules. Chain/token/mint correctness requires resolved on-chain inputs. */ +export function validateSvmTerms(t: SvmTermsWire, nowSeconds: number): void { + integer(t.validUntil, 2 ** 48 - 1, 'validUntil'); + if (t.validUntil <= nowSeconds) + throw svmInvalid('validUntil must be in the future'); + exactHex(t.expectedCEA, 32, 'expectedCEA'); + exactHex(t.gatewayProgram, 32, 'gatewayProgram'); + if ( + BigInt(t.expectedCEA) === BigInt(0) || + BigInt(t.gatewayProgram) === BigInt(0) + ) + throw svmInvalid('CEA/gateway cannot be zero'); + uint(t.maxGasPerCall, UINT256_MAX, 'maxGasPerCall'); + if (!t.assets.length || t.assets.length > SVM_LIMITS.assets) + throw svmInvalid('assets must contain 1..8 entries'); + const tokens = new Set(); + for (const a of t.assets) { + if (!isAddress(a.token, { strict: false }) || BigInt(a.token) === BigInt(0)) + throw svmInvalid('asset token must be a non-zero PRC20'); + if (tokens.has(a.token.toLowerCase())) throw svmInvalid('duplicate asset'); + tokens.add(a.token.toLowerCase()); + uint(a.maxPerCall, UINT256_MAX, 'maxPerCall'); + uint(a.maxTotal, UINT256_MAX, 'maxTotal'); + } + if (!t.programs.length || t.programs.length > SVM_LIMITS.programs) + throw svmInvalid('programs must contain 1..32 entries'); + t.programs.forEach((r, i) => { + exactHex(r.program, 32, 'program'); + exactHex(r.discriminator, 8, 'discriminator'); + if (typeof r.dataless !== 'boolean') + throw svmInvalid('dataless must be boolean'); + integer(r.discriminatorLen, 8, 'discriminatorLen'); + if (r.maxAccounts !== 255) { + integer(r.maxAccounts, SVM_LIMITS.accounts, 'maxAccounts'); + if (r.maxAccounts === 0) + throw svmInvalid('maxAccounts must be 1..64 or 255'); + } + if (r.dataless !== (r.discriminatorLen === 0)) + throw svmInvalid('dataless and discriminator length disagree'); + if (isForbiddenSvmProgram(r.program, t)) + throw svmInvalid('forbidden program'); + for (const earlier of t.programs.slice(0, i)) { + if (earlier.program.toLowerCase() !== r.program.toLowerCase()) continue; + const overlap = + earlier.dataless || r.dataless + ? earlier.dataless && r.dataless + : earlier.discriminator + .slice( + 0, + 2 + 2 * Math.min(earlier.discriminatorLen, r.discriminatorLen) + ) + .toLowerCase() === + r.discriminator + .slice( + 0, + 2 + 2 * Math.min(earlier.discriminatorLen, r.discriminatorLen) + ) + .toLowerCase(); + if (overlap) + throw svmInvalid('ambiguous instruction discriminator prefixes'); + } + }); + if (t.pins.length > SVM_LIMITS.pins) + throw svmInvalid('too many account pins'); + const positions = new Set(), + covered = new Set(); + for (const p of t.pins) { + integer(p.ruleIndex, t.programs.length - 1, 'pin ruleIndex'); + integer(p.accountIndex, SVM_LIMITS.accounts - 1, 'accountIndex'); + exactHex(p.expected, 32, 'pin expected'); + const count = t.programs[p.ruleIndex].maxAccounts; + if (count !== 255 && p.accountIndex >= count) + throw svmInvalid('pin outside fixed account count'); + const key = `${p.ruleIndex}:${p.accountIndex}`; + if (positions.has(key)) throw svmInvalid('duplicate account pin'); + positions.add(key); + covered.add(p.ruleIndex); + } + if (covered.size !== t.programs.length) + throw svmInvalid('every program rule needs an account pin'); + if (t.dataPins.length > SVM_LIMITS.dataPins) + throw svmInvalid('too many data pins'); + for (const p of t.dataPins) { + integer(p.ruleIndex, t.programs.length - 1, 'data pin ruleIndex'); + integer(p.mode, 3, 'data pin mode'); + integer(p.len, p.mode === SvmDataPinMode.EQ ? 32 : 8, 'data pin len'); + integer(p.offset, 65535, 'offset'); + integer(p.offsetB, 65535, 'offsetB'); + exactHex(p.expected, 32, 'data pin expected'); + uint(p.num, UINT64_MAX, 'num'); + uint(p.den, UINT64_MAX, 'den'); + if ( + typeof p.fromEnd !== 'boolean' || + !p.len || + t.programs[p.ruleIndex].dataless || + !offsetValid(p.fromEnd, p.offset, p.len) + ) + throw svmInvalid('invalid data pin shape'); + if ( + p.mode === SvmDataPinMode.EQ && + !/^0*$/.test(p.expected.slice(2 + p.len * 2)) + ) + throw svmInvalid('EQ expected must be left-aligned'); + if ( + (p.mode === SvmDataPinMode.GTE_LE || p.mode === SvmDataPinMode.LTE_LE) && + BigInt(p.expected) >= BigInt(1) << BigInt(p.len * 8) + ) + throw svmInvalid('integer expected exceeds field width'); + if ( + p.mode === SvmDataPinMode.RATIO_GTE_LE && + (!p.num || !p.den || !offsetValid(p.fromEnd, p.offsetB, p.len)) + ) + throw svmInvalid('invalid ratio pin'); + } + if (t.ceaAccounts.length > SVM_LIMITS.ceaAccounts) + throw svmInvalid('too many CEA accounts'); + const accounts = new Set(); + for (const key of t.ceaAccounts) { + exactHex(key, 32, 'CEA account'); + if ( + BigInt(key) === BigInt(0) || + accounts.has(key.toLowerCase()) || + t.programs.some((p) => p.program.toLowerCase() === key.toLowerCase()) + ) + throw svmInvalid('invalid CEA account list'); + accounts.add(key.toLowerCase()); + } + if (!accounts.has(t.expectedCEA.toLowerCase())) + throw svmInvalid('CEA account list must include expectedCEA'); +} +export function encodeSvmTerms(terms: SvmTermsWire, nowSeconds: number): Hex { + validateSvmTerms(terms, nowSeconds); + return encodeAbiParameters([SVM_TERMS_PARAM], [terms]); +} +export function decodeSvmTerms(body: Hex): SvmTermsWire { + try { + return decodeAbiParameters([SVM_TERMS_PARAM], body)[0]; + } catch (cause) { + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + 'malformed SVM terms', + { cause } + ); + } +} diff --git a/packages/core/src/lib/agentic/codec/universal-terms.ts b/packages/core/src/lib/agentic/codec/universal-terms.ts new file mode 100644 index 00000000..21af4c21 --- /dev/null +++ b/packages/core/src/lib/agentic/codec/universal-terms.ts @@ -0,0 +1,66 @@ +import { ARG_PIN_COMPONENTS, type ArgPinWire } from './pins'; +import { + decodeAbiParameters, + encodeAbiParameters, + type Address, + type Hex, +} from 'viem'; + +export interface AssetCapWire { + token: Address; + maxPerCall: bigint; + maxTotal: bigint; +} +export interface AllowedCallWire { + pins: readonly ArgPinWire[]; + target: Address; + selector: Hex; + beneficiaryOffset: number; + hasBeneficiary: boolean; + maxValue: bigint; +} +export interface UniversalTermsWire { + validUntil: number; + expectedCEA: Address; + assets: readonly AssetCapWire[]; + maxGasPerCall: bigint; + allowedCalls: readonly AllowedCallWire[]; +} +export const UNIVERSAL_TERMS_PARAM = { + type: 'tuple', + components: [ + { name: 'validUntil', type: 'uint48' }, + { name: 'expectedCEA', type: 'address' }, + { + name: 'assets', + type: 'tuple[]', + components: [ + { name: 'token', type: 'address' }, + { name: 'maxPerCall', type: 'uint256' }, + { name: 'maxTotal', type: 'uint256' }, + ], + }, + { name: 'maxGasPerCall', type: 'uint256' }, + { + name: 'allowedCalls', + type: 'tuple[]', + components: [ + { name: 'target', type: 'address' }, + { name: 'selector', type: 'bytes4' }, + { name: 'beneficiaryOffset', type: 'uint16' }, + { name: 'hasBeneficiary', type: 'bool' }, + { name: 'maxValue', type: 'uint256' }, + { name: 'pins', type: 'tuple[]', components: ARG_PIN_COMPONENTS }, + ], + }, + ], +} as const; +export function encodeUniversalTerms(terms: UniversalTermsWire): Hex { + return encodeAbiParameters([UNIVERSAL_TERMS_PARAM], [terms]); +} +export function decodeUniversalTerms(body: Hex): UniversalTermsWire { + return decodeAbiParameters( + [UNIVERSAL_TERMS_PARAM], + body + )[0] as UniversalTermsWire; +} diff --git a/packages/core/src/lib/agentic/codec/universal.ts b/packages/core/src/lib/agentic/codec/universal.ts new file mode 100644 index 00000000..d91e5ff6 --- /dev/null +++ b/packages/core/src/lib/agentic/codec/universal.ts @@ -0,0 +1,261 @@ +import { validatePins } from './pins'; +import { getAddress, isAddress, type Address } from 'viem'; +import { AgenticCapability, requireCapability } from '../capabilities'; +import { + AGENTIC_ERROR_CODE, + AgenticError, + ruleConstraintLimit, +} from '../errors'; +import type { UniversalRule } from '../agentic.types'; +import type { RuleEncodeContext, PreparedRule } from './rules'; +import { argumentOffset, rawOffset } from './abi-layout'; +import { parseSelector } from './selectors'; +import { AGENTIC_DEFAULTS, UINT256_MAX, withDefault } from './defaults'; +import { buildSession, encodeEnvelope } from './session'; +import { SEND_OUTBOUND_SELECTOR } from '../contracts/v6'; +import { + encodeUniversalTerms, + type AssetCapWire, + type UniversalTermsWire, +} from './universal-terms'; + +export const MAX_ASSETS = 8; +export const MAX_ALLOWED_CALLS = 32; +export interface ResolvedUniversalRule { + expectedCEA: Address; + assets: readonly AssetCapWire[]; +} + +const CAIP2 = /^(eip155:[0-9]+|solana:[1-9A-HJ-NP-Za-km-z]{32,44})$/; +const UINT48_MAX = 2 ** 48 - 1; +function cap(value: unknown, what: string): asserts value is bigint { + if (typeof value !== 'bigint' || value < BigInt(0) || value > UINT256_MAX) + throw invalid(`${what} must be a uint256 bigint`); +} +export function validateUniversalRuleShape( + rule: UniversalRule, + nowSeconds: number +): void { + if ( + typeof rule.chainNamespace !== 'string' || + !CAIP2.test(rule.chainNamespace) + ) + throw invalid('chainNamespace must be a CAIP-2 eip155/solana chain'); + if ( + !Number.isSafeInteger(rule.validUntil) || + rule.validUntil <= nowSeconds || + rule.validUntil > UINT48_MAX + ) + throw invalid('validUntil must be a future uint48 unix timestamp'); + if (!Array.isArray(rule.assets) || rule.assets.length > MAX_ASSETS) + throw invalid(`assets must be an array of at most ${MAX_ASSETS} caps`); + cap(rule.maxGasPerCall, 'maxGasPerCall'); + if (rule.maxGasPerCall === BigInt(0)) + throw invalid('maxGasPerCall must be positive'); + if ( + !Array.isArray(rule.allowedCalls) || + rule.allowedCalls.length < 1 || + rule.allowedCalls.length > MAX_ALLOWED_CALLS + ) + throw invalid(`allowedCalls must contain 1..${MAX_ALLOWED_CALLS} entries`); + const seen = new Map(); + let pinCount = 0; + rule.allowedCalls.forEach((call, i) => { + if (!isAddress(call.target, { strict: false })) + throw invalid(`allowedCalls[${i}].target is not an EVM address`); + const parsed = parseSelector(call.selector); + if (parsed.valueOnly) + throw invalid(`allowedCalls[${i}] cannot be value-only`); + if (call.beneficiary !== undefined && call.beneficiaryOffset !== undefined) + throw invalid('beneficiary and beneficiaryOffset are mutually exclusive'); + if (call.beneficiary !== undefined) { + argumentOffset( + parsed.inputs, + call.beneficiary, + `allowedCalls[${i}].beneficiary` + ); + if (parsed.inputs?.[call.beneficiary]?.type !== 'address') + throw invalid( + `allowedCalls[${i}].beneficiary must be an address argument` + ); + } + if (call.beneficiaryOffset !== undefined) + rawOffset(call.beneficiaryOffset, `allowedCalls[${i}].beneficiary`); + cap( + call.maxValue ?? AGENTIC_DEFAULTS.universal.allowedCallMaxValue.value, + `allowedCalls[${i}].maxValue` + ); + try { + validatePins(call.pins ?? []); + } catch (error) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + (error as Error).message, + { + cause: error, + details: { + callIndex: i, + field: `allowedCalls[${i}].pins`, + chainNamespace: rule.chainNamespace, + }, + } + ); + } + pinCount += call.pins?.length ?? 0; + const key = `${call.target.toLowerCase()}:${parsed.selector}`; + const restricted = + !!call.pins?.length || + call.beneficiary !== undefined || + call.beneficiaryOffset !== undefined; + if (seen.has(key) && (!restricted || !seen.get(key))) + throw invalid( + 'an unpinned alternative would bypass restrictions for this target/selector' + ); + seen.set(key, restricted); + }); + if (pinCount > 32) + throw ruleConstraintLimit( + pinCount, + rule.allowedCalls.length, + rule.chainNamespace + ); + const tokens = new Set(); + rule.assets.forEach((a, i) => { + const address = typeof a.token === 'string' ? a.token : a.token?.address; + if (typeof address !== 'string') + throw invalid(`assets[${i}].token is missing an address`); + if (!isAddress(address, { strict: false })) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'The selected token has an invalid address.', + { + userMessage: + 'The selected token has an invalid address. Select the token again.', + details: { assetIndex: i, field: `assets[${i}].token` }, + } + ); + const key = address.toLowerCase(); + if (tokens.has(key)) + throw invalid(`assets[${i}] duplicates an earlier token`); + tokens.add(key); + cap(a.maxPerCall, `assets[${i}].maxPerCall`); + cap( + withDefault(a.maxTotal, AGENTIC_DEFAULTS.universal.assetMaxTotal), + `assets[${i}].maxTotal` + ); + }); +} + +export function encodeUniversalRule( + rule: UniversalRule, + ctx: RuleEncodeContext +): PreparedRule { + if (rule.chainNamespace.startsWith('solana:')) + requireCapability(ctx.capabilities, AgenticCapability.UNIVERSAL_SVM_RULES); + validateUniversalRuleShape(rule, ctx.nowSeconds); + requireCapability( + ctx.capabilities, + rule.chainNamespace.startsWith('solana:') + ? AgenticCapability.UNIVERSAL_SVM_RULES + : AgenticCapability.UNIVERSAL_EVM_RULES + ); + const resolved = ctx.universal?.get(rule); + if (!resolved || !ctx.gateway) + throw invalid( + 'universal encoding requires resolved wallet CEA, PRC20 assets and gateway context' + ); + if ( + resolved.assets.length < 1 || + resolved.assets.length > MAX_ASSETS || + new Set(resolved.assets.map((a) => a.token.toLowerCase())).size !== + resolved.assets.length + ) + throw invalid('resolved assets must be 1..8 distinct PRC20s'); + if ( + !isAddress(resolved.expectedCEA) || + /^0x0{40}$/i.test(resolved.expectedCEA) + ) + throw invalid('expectedCEA must be a non-zero wallet destination account'); + const terms: UniversalTermsWire = { + validUntil: rule.validUntil, + expectedCEA: getAddress(resolved.expectedCEA), + assets: resolved.assets, + maxGasPerCall: rule.maxGasPerCall, + allowedCalls: rule.allowedCalls.map((call) => ({ + pins: call.pins ?? [], + target: getAddress(call.target), + selector: parseSelector(call.selector).selector, + hasBeneficiary: + call.beneficiary !== undefined || call.beneficiaryOffset !== undefined, + beneficiaryOffset: + call.beneficiaryOffset ?? + (call.beneficiary === undefined + ? 0 + : argumentOffset( + parseSelector(call.selector).inputs, + call.beneficiary, + 'beneficiary' + )), + maxValue: withDefault( + call.maxValue, + AGENTIC_DEFAULTS.universal.allowedCallMaxValue + ), + })), + }; + const agent = getAddress(rule.agent); + return { + rule, + agent, + chainNamespace: rule.chainNamespace, + universalTerms: terms, + session: buildSession({ + validator: ctx.validator, + agent, + rulesPolicy: ctx.rulesPolicy, + actions: [ + { + target: ctx.gateway, + selector: SEND_OUTBOUND_SELECTOR, + initData: encodeEnvelope( + rule.chainNamespace, + encodeUniversalTerms(terms) + ), + }, + ], + }), + }; +} + +/** Source token addresses must be resolved from each PRC20 before calling this. */ +export function universalTermsToRule( + terms: UniversalTermsWire, + agent: Address, + chainNamespace: UniversalRule['chainNamespace'], + tokens: readonly Address[] +): UniversalRule { + if (tokens.length !== terms.assets.length) + throw invalid('origin-token list does not match stored asset order'); + return { + agent, + chainNamespace, + validUntil: Number(terms.validUntil), + maxGasPerCall: terms.maxGasPerCall, + assets: terms.assets.map((a, i) => ({ + token: tokens[i], + maxPerCall: a.maxPerCall, + maxTotal: a.maxTotal, + })), + allowedCalls: terms.allowedCalls.map((c) => ({ + pins: [...c.pins], + target: c.target, + selector: c.selector, + maxValue: c.maxValue, + ...(c.hasBeneficiary + ? { beneficiaryOffset: Number(c.beneficiaryOffset) } + : {}), + })), + }; +} +function invalid(message: string): AgenticError { + return new AgenticError(AGENTIC_ERROR_CODE.INVALID_RULE, message); +} diff --git a/packages/core/src/lib/agentic/constants.ts b/packages/core/src/lib/agentic/constants.ts new file mode 100644 index 00000000..5c5d2948 --- /dev/null +++ b/packages/core/src/lib/agentic/constants.ts @@ -0,0 +1,24 @@ +import { JOB_VOCABULARY, PRINCIPAL } from '../job-spec/constants'; +import { DONUT_MARKETPLACE } from '../market/deployment'; +/** Public vocabulary. JOB.ADDRESS is the explicit per-chain job integration surface. */ +export const AGENTIC = Object.freeze({ + WALLET: 'agentic:wallet' as const, + PRINCIPAL, + JOB: Object.freeze({ + ...JOB_VOCABULARY, + ADDRESS: Object.freeze({ + 'eip155:42101': Object.freeze({ + KERNEL: DONUT_MARKETPLACE.kernel, + HOOK: DONUT_MARKETPLACE.hook, + EVALUATOR: DONUT_MARKETPLACE.evaluator, + }), + }), + }), + PRESETS: Object.freeze({ + CATEGORY: Object.freeze({ + DEXES: 'DEXES' as const, + LENDING: 'LENDING' as const, + STAKING: 'STAKING' as const, + }), + }), +}); diff --git a/packages/core/src/lib/agentic/context.ts b/packages/core/src/lib/agentic/context.ts new file mode 100644 index 00000000..fc1f8203 --- /dev/null +++ b/packages/core/src/lib/agentic/context.ts @@ -0,0 +1,78 @@ +import { getAddress, type Address } from 'viem'; +import { CHAIN } from '../constants/enums'; +import { AgenticCapability, requireCapability } from './capabilities'; +import { resolveWalletGeneration, type AgenticGeneration } from './deployments'; +import { AGENTIC_ERROR_CODE, AgenticError } from './errors'; +import { readActiveRules } from './reads/rules'; +import { Snapshot } from './reads/snapshot'; +import type { AgenticRuntime } from './runtime'; +import type { AgenticDoor } from './agentic.types'; + +/** + * Identity of an agentic client. Three values stay separate: + * - signerOrigin: the key that signs (universal.origin) + * - signerPushAccount: its Push identity — EOA or UEA for its origin chain; + * pays Push gas and is the identity ownership checks use + * - wallet: the AGW, the execution account (universal.account) + */ +export interface AgenticExecutionContext { + wallet: Address; + door: AgenticDoor; + signerPushAccount: Address; + signerOrigin: { chain: CHAIN; address: string }; + generation: AgenticGeneration; +} + +/** + * Initialization-time resolution for `initialize(signer, { agenticWallet })`. + * Owner → owner door. Otherwise at least one ENABLED rule must name the + * signer's Push identity (expired-but-enabled still qualifies; expiry is an + * on-chain send check). Nothing here is cached for later sends. + */ +export async function resolveAgenticContext( + runtime: AgenticRuntime, + walletInput: string +): Promise { + let wallet: Address; + try { + wallet = getAddress(walletInput); + } catch (cause) { + throw new AgenticError(AGENTIC_ERROR_CODE.NOT_AGENTIC_WALLET, `"${walletInput}" is not an address`, { + cause, + }); + } + const generation = await resolveWalletGeneration(runtime.reader, runtime.network, wallet); + const signerPushAccount = runtime.signerPushAccount(); + const snap = await Snapshot.at(runtime.reader); + const owner = getAddress( + await snap.read
(wallet, generation.contracts.abis.wallet, 'owner') + ); + let door: AgenticDoor; + if (owner === signerPushAccount) { + requireCapability(generation.capabilities, AgenticCapability.OWNER_EXECUTE); + door = 'owner'; + } else { + requireCapability(generation.capabilities, AgenticCapability.AGENT_EXECUTE); + const active = await readActiveRules(snap, generation, wallet); + if (!active.some((r) => r.agent === signerPushAccount)) { + throw new AgenticError( + AGENTIC_ERROR_CODE.NOT_OWNER_OR_AGENT, + `${signerPushAccount} is neither the owner of ${wallet} nor the agent of an enabled rule`, + { + hint: runtime.signerIsPushNative() + ? 'Grant a rule to this Push address, or initialize with the owner signer.' + : 'An external key acts through its UEA for the chain it was initialized on; grant the rule to that UEA (PushChain.utils.account.deriveExecutorAccount).', + details: { wallet, signerPushAccount, owner }, + } + ); + } + door = 'agent'; + } + return { + wallet, + door, + signerPushAccount, + signerOrigin: runtime.signerOrigin(), + generation, + }; +} diff --git a/packages/core/src/lib/agentic/contracts/abi/v6/agent-validator.ts b/packages/core/src/lib/agentic/contracts/abi/v6/agent-validator.ts new file mode 100644 index 00000000..52e5ded3 --- /dev/null +++ b/packages/core/src/lib/agentic/contracts/abi/v6/agent-validator.ts @@ -0,0 +1,145 @@ +// GENERATED by packages/core/scripts/agw-local/gen-abi.mjs — do not edit. +// Source: packages/core/scripts/agw-local/abis/validator.json +// push-agentic-wallets@ffd567d3e49b2d27c6f50ad36093274dbac3090f +// sha256(AgentValidator.json) = a4570ddc373241580de8742cbb3d9f2c837094c65bfd1cdd52243ca0c38196fd +export const AGENT_VALIDATOR_ABI = [ + { + "type": "function", + "name": "isInitialized", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "isModuleType", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "onInstall", + "inputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "onUninstall", + "inputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "validateConfig", + "inputs": [ + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "validateSignatureWithData", + "inputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "validSig", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "error", + "name": "AlreadyInitialized", + "inputs": [ + { + "name": "smartAccount", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "MalformedConfig", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitialized", + "inputs": [ + { + "name": "smartAccount", + "type": "address", + "internalType": "address" + } + ] + } +] as const; diff --git a/packages/core/src/lib/agentic/contracts/abi/v6/agw-factory.ts b/packages/core/src/lib/agentic/contracts/abi/v6/agw-factory.ts new file mode 100644 index 00000000..215cf6b2 --- /dev/null +++ b/packages/core/src/lib/agentic/contracts/abi/v6/agw-factory.ts @@ -0,0 +1,1495 @@ +// GENERATED by packages/core/scripts/agw-local/gen-abi.mjs — do not edit. +// Source: packages/core/scripts/agw-local/abis/factory.json +// push-agentic-wallets@ffd567d3e49b2d27c6f50ad36093274dbac3090f +// sha256(AGWFactory.json) = 08588f8870335492c5abeee32eec6a9bb050f81e234fdd58bbf389c6e9074a12 +export const AGW_FACTORY_ABI = [ + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "OPERATOR_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "PAUSER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UPGRADE_INTERFACE_VERSION", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "acceptDefaultAdminTransfer", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "beginDefaultAdminTransfer", + "inputs": [ + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "cancelDefaultAdminTransfer", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "changeDefaultAdminDelay", + "inputs": [ + { + "name": "newDelay", + "type": "uint48", + "internalType": "uint48" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "createWallet", + "inputs": [ + { + "name": "label", + "type": "string", + "internalType": "string" + }, + { + "name": "rules", + "type": "tuple[]", + "internalType": "struct Session[]", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "rulesIds", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "createWalletWithSig", + "inputs": [ + { + "name": "intent", + "type": "tuple", + "internalType": "struct OwnerIntent", + "components": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "sessionHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "execCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "grantNonce", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "label", + "type": "string", + "internalType": "string" + }, + { + "name": "rules", + "type": "tuple[]", + "internalType": "struct Session[]", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "rulesIds", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "defaultAdmin", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultAdminDelay", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint48", + "internalType": "uint48" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultAdminDelayIncreaseWait", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint48", + "internalType": "uint48" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deployWallet", + "inputs": [ + { + "name": "label", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "deployWalletWithSig", + "inputs": [ + { + "name": "intent", + "type": "tuple", + "internalType": "struct OwnerIntent", + "components": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "sessionHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "execCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "grantNonce", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "label", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "domainSeparator", + "inputs": [ + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "indexOf", + "inputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "admin", + "type": "address", + "internalType": "address" + }, + { + "name": "walletImplementation_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isWallet", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "ownerOf", + "inputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pendingDefaultAdmin", + "inputs": [], + "outputs": [ + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + }, + { + "name": "schedule", + "type": "uint48", + "internalType": "uint48" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pendingDefaultAdminDelay", + "inputs": [], + "outputs": [ + { + "name": "newDelay", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "schedule", + "type": "uint48", + "internalType": "uint48" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "predictWallet", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "deployed", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "proxiableUUID", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rollbackDefaultAdminDelay", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeToAndCall", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "walletCount", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "walletImplementation", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "DefaultAdminDelayChangeCanceled", + "inputs": [], + "anonymous": false + }, + { + "type": "event", + "name": "DefaultAdminDelayChangeScheduled", + "inputs": [ + { + "name": "newDelay", + "type": "uint48", + "indexed": false, + "internalType": "uint48" + }, + { + "name": "effectSchedule", + "type": "uint48", + "indexed": false, + "internalType": "uint48" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DefaultAdminTransferCanceled", + "inputs": [], + "anonymous": false + }, + { + "type": "event", + "name": "DefaultAdminTransferScheduled", + "inputs": [ + { + "name": "newAdmin", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "acceptSchedule", + "type": "uint48", + "indexed": false, + "internalType": "uint48" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WalletDeployed", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "index", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "wallet", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "label", + "type": "string", + "indexed": false, + "internalType": "string" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AccessControlBadConfirmation", + "inputs": [] + }, + { + "type": "error", + "name": "AccessControlEnforcedDefaultAdminDelay", + "inputs": [ + { + "name": "schedule", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "AccessControlEnforcedDefaultAdminRules", + "inputs": [] + }, + { + "type": "error", + "name": "AccessControlInvalidDefaultAdmin", + "inputs": [ + { + "name": "defaultAdmin", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AccessControlUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "neededRole", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "AddressEmptyCode", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "CloneArgumentsTooLong", + "inputs": [] + }, + { + "type": "error", + "name": "Create2EmptyBytecode", + "inputs": [] + }, + { + "type": "error", + "name": "ERC1967InvalidImplementation", + "inputs": [ + { + "name": "implementation", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC1967NonPayable", + "inputs": [] + }, + { + "type": "error", + "name": "EnforcedPause", + "inputs": [] + }, + { + "type": "error", + "name": "ExecutorMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ExpectedPause", + "inputs": [] + }, + { + "type": "error", + "name": "FailedCall", + "inputs": [] + }, + { + "type": "error", + "name": "FailedDeployment", + "inputs": [] + }, + { + "type": "error", + "name": "ImplementationNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "IndexMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "provided", + "type": "uint96", + "internalType": "uint96" + } + ] + }, + { + "type": "error", + "name": "IndexOutOfRange", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "next", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "InsufficientBalance", + "inputs": [ + { + "name": "balance", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "needed", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "IntentGrantNonceNotZero", + "inputs": [ + { + "name": "provided", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "IntentRulesMismatch", + "inputs": [ + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "IntentWalletMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "provided", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidOwnerSignature", + "inputs": [] + }, + { + "type": "error", + "name": "NotAWallet", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "SafeCastOverflowedUintDowncast", + "inputs": [ + { + "name": "bits", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SignatureExpired", + "inputs": [ + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "TooManyInitialRules", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "UUPSUnauthorizedCallContext", + "inputs": [] + }, + { + "type": "error", + "name": "UUPSUnsupportedProxiableUUID", + "inputs": [ + { + "name": "slot", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ZeroAddress", + "inputs": [] + } +] as const; diff --git a/packages/core/src/lib/agentic/contracts/abi/v6/agw.ts b/packages/core/src/lib/agentic/contracts/abi/v6/agw.ts new file mode 100644 index 00000000..0ec09cc8 --- /dev/null +++ b/packages/core/src/lib/agentic/contracts/abi/v6/agw.ts @@ -0,0 +1,1709 @@ +// GENERATED by packages/core/scripts/agw-local/gen-abi.mjs — do not edit. +// Source: packages/core/scripts/agw-local/abis/wallet.json +// push-agentic-wallets@ffd567d3e49b2d27c6f50ad36093274dbac3090f +// sha256(AGW.json) = 76705e5a25b10d3a84f867f983c3e4f5adfc881fb0d65710fb8684df2ea7abd3 +export const AGW_ABI = [ + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "RULES_POLICY", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SESSION_ENGINE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SESSION_VALIDATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UNIVERSAL_GATEWAY_PC", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "accountId", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "agentOf", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "checkpointCount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "domainSeparator", + "inputs": [ + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "execute", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "executionCalldata", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "executeAsAgent", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "executionCalldata", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "executeWithSig", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "executionCalldata", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "intent", + "type": "tuple", + "internalType": "struct OwnerIntent", + "components": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "sessionHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "execCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "grantNonce", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "factory", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getNonce", + "inputs": [ + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + } + ], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantNonce", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRules", + "inputs": [ + { + "name": "session", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "grantRulesWithSig", + "inputs": [ + { + "name": "session", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + }, + { + "name": "intent", + "type": "tuple", + "internalType": "struct OwnerIntent", + "components": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "sessionHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "execCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "grantNonce", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initializeAccount", + "inputs": [ + { + "name": "label_", + "type": "string", + "internalType": "string" + }, + { + "name": "rules", + "type": "tuple[]", + "internalType": "struct Session[]", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "rulesIds", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "installModule", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isModuleInstalled", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isValidSignature", + "inputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "label", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "lastCheckpointBlock", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "onERC1155BatchReceived", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "onERC1155Received", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "onERC721Received", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "revokeAllRules", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRules", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setLabel", + "inputs": [ + { + "name": "label_", + "type": "string", + "internalType": "string" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsExecutionMode", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "supportsModule", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "uninstallModule", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "internalType": "address" + }, + { + "name": "deInitData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "AccountInitialized", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "engine", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Checkpointed", + "inputs": [ + { + "name": "seq", + "type": "uint64", + "indexed": true, + "internalType": "uint64" + }, + { + "name": "kind", + "type": "uint8", + "indexed": false, + "internalType": "enum CheckpointKind" + }, + { + "name": "ref", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "blockNumber", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LabelSet", + "inputs": [ + { + "name": "label", + "type": "string", + "indexed": false, + "internalType": "string" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ModuleInstalled", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ModuleUninstalled", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnerExecuted", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "executionCalldataHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnerExecutedWithSig", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "executionCalldataHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "indexed": false, + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulesActionAuthorized", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "agent", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "callsHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulesGranted", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "uint8", + "indexed": false, + "internalType": "enum RulesType" + }, + { + "name": "chainHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainNamespace", + "type": "string", + "indexed": false, + "internalType": "string" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulesRevoked", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "UninstallCallbackFailed", + "inputs": [ + { + "name": "module", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AlreadyInitialized", + "inputs": [] + }, + { + "type": "error", + "name": "CallerIsNotAgent", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "caller", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "CallerIsNotFactory", + "inputs": [] + }, + { + "type": "error", + "name": "CallerIsNotOwner", + "inputs": [] + }, + { + "type": "error", + "name": "DuplicateAction", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "EmptyChain", + "inputs": [] + }, + { + "type": "error", + "name": "EngineStillHoldsPermissions", + "inputs": [] + }, + { + "type": "error", + "name": "ExecutorMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ForbiddenActionSelector", + "inputs": [ + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ForbiddenActionTarget", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ForbiddenDispatchTarget", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InconsistentChain", + "inputs": [ + { + "name": "actionIndex", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "IntentExecMismatch", + "inputs": [ + { + "name": "actualCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "IntentGrantNonceMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "provided", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "IntentSessionMismatch", + "inputs": [ + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "IntentWalletMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "provided", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidModuleAddress", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidNonce", + "inputs": [ + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "expected", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "provided", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "InvalidOwnerSignature", + "inputs": [] + }, + { + "type": "error", + "name": "LabelTooLong", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "MalformedBatchCalldata", + "inputs": [] + }, + { + "type": "error", + "name": "MalformedSessionShape", + "inputs": [] + }, + { + "type": "error", + "name": "ModuleAlreadyInstalled", + "inputs": [ + { + "name": "module", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "OutsideTimeWindow", + "inputs": [ + { + "name": "validAfter", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "OwnerLaneRequired", + "inputs": [ + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + } + ] + }, + { + "type": "error", + "name": "OwnerSigExpired", + "inputs": [ + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "ReentrancyGuardReentrantCall", + "inputs": [] + }, + { + "type": "error", + "name": "RulesTypeMismatch", + "inputs": [ + { + "name": "derived", + "type": "uint8", + "internalType": "enum RulesType" + }, + { + "name": "actionIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "TooManyActions", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "UnknownPermission", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "UnsupportedExecutionMode", + "inputs": [] + }, + { + "type": "error", + "name": "UnsupportedModuleType", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ValidationFailed", + "inputs": [ + { + "name": "authorizer", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ValidatorNotInstalled", + "inputs": [ + { + "name": "validator", + "type": "address", + "internalType": "address" + } + ] + } +] as const; diff --git a/packages/core/src/lib/agentic/contracts/abi/v6/index.ts b/packages/core/src/lib/agentic/contracts/abi/v6/index.ts new file mode 100644 index 00000000..b0883d13 --- /dev/null +++ b/packages/core/src/lib/agentic/contracts/abi/v6/index.ts @@ -0,0 +1,8 @@ +// GENERATED by packages/core/scripts/agw-local/gen-abi.mjs — do not edit. +// Review generation v6: Donut v6 deployment; source ffd567d. +export const V6_SOURCE_COMMIT = 'ffd567d3e49b2d27c6f50ad36093274dbac3090f' as const; +export { AGW_ABI } from './agw'; +export { AGW_FACTORY_ABI } from './agw-factory'; +export { UNIVERSAL_RULES_POLICY_ABI } from './universal-rules-policy'; +export { SMART_SESSION_ABI } from './smart-session'; +export { AGENT_VALIDATOR_ABI } from './agent-validator'; diff --git a/packages/core/src/lib/agentic/contracts/abi/v6/smart-session.ts b/packages/core/src/lib/agentic/contracts/abi/v6/smart-session.ts new file mode 100644 index 00000000..3fe24ed2 --- /dev/null +++ b/packages/core/src/lib/agentic/contracts/abi/v6/smart-session.ts @@ -0,0 +1,1961 @@ +// GENERATED by packages/core/scripts/agw-local/gen-abi.mjs — do not edit. +// Source: packages/core/scripts/agw-local/abis/engine.json +// push-agentic-wallets@ffd567d3e49b2d27c6f50ad36093274dbac3090f +// sha256(SmartSession.json) = 6e5d9cea4dbed01f06af913c1e093743b86b7432195f4a4bf90fb94b282c51b2 +export const SMART_SESSION_ABI = [ + { + "type": "function", + "name": "areActionsEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areERC1271PoliciesEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areUserOpPoliciesEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "disableActionId", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "disableActionPolicies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + }, + { + "name": "policies", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "disableERC1271Policies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policies", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "contexts", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "disableUserOpPolicies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policies", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "enableActionPolicies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "enableERC1271Policies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "erc1271Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "enableSessions", + "inputs": [ + { + "name": "sessions", + "type": "tuple[]", + "internalType": "struct Session[]", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "permissionIds", + "type": "bytes32[]", + "internalType": "PermissionId[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "enableUserOpPolicies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getActionPolicies", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + } + ], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getERC1271Policies", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getEnabledActions", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getEnabledERC7739Content", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "enabledERC7739ContentHashes", + "type": "tuple[]", + "internalType": "struct ERC7739ContextHashes[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNameHashes", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getNonce", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPermissionIDs", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "permissionIds", + "type": "bytes32[]", + "internalType": "PermissionId[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPermissionId", + "inputs": [ + { + "name": "session", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "getSessionDigest", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + }, + { + "name": "mode", + "type": "uint8", + "internalType": "enum SmartSessionMode" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getSessionValidatorAndConfig", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "address" + }, + { + "name": "sessionValidatorData", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getUserOpPolicies", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isActionIdEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isActionPolicyEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + }, + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isERC1271PolicyEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isERC7739ContentEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "content", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isISessionValidatorSet", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isInitialized", + "inputs": [ + { + "name": "smartAccount", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isModuleType", + "inputs": [ + { + "name": "typeID", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "isPermissionEnabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isUserOpPolicyEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isValidSignatureWithSender", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "hash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "signature", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "result", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "onInstall", + "inputs": [ + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onUninstall", + "inputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "removeSession", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeEnableSignature", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setPermit4337Paymaster", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "enabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "validateUserOp", + "inputs": [ + { + "name": "userOp", + "type": "tuple", + "internalType": "struct PackedUserOperation", + "components": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "initCode", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "callData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "accountGasLimits", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "preVerificationGas", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "gasFees", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "paymasterAndData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "signature", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "userOpHash", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "vd", + "type": "uint256", + "internalType": "ValidationData" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ActionIdDisabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "indexed": false, + "internalType": "ActionId" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "NonceIterated", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newValue", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PermissionIdPermit4337Paymaster", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "enabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PolicyDisabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "policyType", + "type": "uint8", + "indexed": false, + "internalType": "enum PolicyType" + }, + { + "name": "policy", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PolicyEnabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "policyType", + "type": "uint8", + "indexed": false, + "internalType": "enum PolicyType" + }, + { + "name": "policy", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SessionCreated", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SessionRemoved", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SessionValidatorDisabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "sessionValidator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SessionValidatorEnabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "sessionValidator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AssociatedArray_OutOfBounds", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ChainIdMismatch", + "inputs": [ + { + "name": "providedChainId", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "ChainIdMismatch", + "inputs": [ + { + "name": "providedChainId", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "ForbiddenValidationData", + "inputs": [] + }, + { + "type": "error", + "name": "HashIndexOutOfBounds", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "HashMismatch", + "inputs": [ + { + "name": "providedHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "computedHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "HashMismatch", + "inputs": [ + { + "name": "providedHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "computedHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "InvalidActionId", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidCallTarget", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidData", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidEnableSignature", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "hash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "InvalidISessionValidator", + "inputs": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + } + ] + }, + { + "type": "error", + "name": "InvalidMode", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidPermissionId", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ] + }, + { + "type": "error", + "name": "InvalidSelfCall", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidSession", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ] + }, + { + "type": "error", + "name": "InvalidSessionKeySignature", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "sessionValidator", + "type": "address", + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "userOpHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "InvalidTarget", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidUserOpSender", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "NoExecutionsInBatch", + "inputs": [] + }, + { + "type": "error", + "name": "NoPoliciesSet", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ] + }, + { + "type": "error", + "name": "PartlyEnabledActions", + "inputs": [] + }, + { + "type": "error", + "name": "PartlyEnabledPolicies", + "inputs": [] + }, + { + "type": "error", + "name": "PaymasterValidationNotEnabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ] + }, + { + "type": "error", + "name": "PolicyViolation", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SignerNotFound", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SignerNotFound", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SmartSessionModuleAlreadyInstalled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "UnsupportedCallType", + "inputs": [ + { + "name": "callType", + "type": "bytes1", + "internalType": "CallType" + } + ] + }, + { + "type": "error", + "name": "UnsupportedExecutionType", + "inputs": [] + }, + { + "type": "error", + "name": "UnsupportedPolicy", + "inputs": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "UnsupportedSmartSessionMode", + "inputs": [ + { + "name": "mode", + "type": "uint8", + "internalType": "enum SmartSessionMode" + } + ] + } +] as const; diff --git a/packages/core/src/lib/agentic/contracts/abi/v6/universal-rules-policy.ts b/packages/core/src/lib/agentic/contracts/abi/v6/universal-rules-policy.ts new file mode 100644 index 00000000..089855b0 --- /dev/null +++ b/packages/core/src/lib/agentic/contracts/abi/v6/universal-rules-policy.ts @@ -0,0 +1,2183 @@ +// GENERATED by packages/core/scripts/agw-local/gen-abi.mjs — do not edit. +// Source: packages/core/scripts/agw-local/abis/policy.json +// push-agentic-wallets@ffd567d3e49b2d27c6f50ad36093274dbac3090f +// sha256(UniversalRulesPolicy.json) = a07661d19b19656afdea560275d45669a908cd96646817884295e0017560f299 +export const UNIVERSAL_RULES_POLICY_ABI = [ + { + "type": "function", + "name": "SEND_OUTBOUND_SELECTOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SESSION_ENGINE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UNIVERSAL_EXECUTOR_MODULE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UNIVERSAL_GATEWAY_PC", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "assertSpent", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "expectedValueSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expectedAmountSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expectedCalls", + "type": "uint32", + "internalType": "uint32" + } + ], + "outputs": [], + "stateMutability": "view" + }, + { + "type": "function", + "name": "assertSpent", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "expectedSpent", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "view" + }, + { + "type": "function", + "name": "checkAction", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "creditRevert", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "outboundTxId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getConfig", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct Config", + "components": [ + { + "name": "initialized", + "type": "bool", + "internalType": "bool" + }, + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "expectedCEA", + "type": "address", + "internalType": "address" + }, + { + "name": "maxGasPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "assets", + "type": "tuple[]", + "internalType": "struct AssetCapState[]", + "components": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "maxPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxTotal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "spent", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "allowedCalls", + "type": "tuple[]", + "internalType": "struct AllowedCall[]", + "components": [ + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "beneficiaryOffset", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "hasBeneficiary", + "type": "bool", + "internalType": "bool" + }, + { + "name": "maxValue", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pins", + "type": "tuple[]", + "internalType": "struct ArgPin[]", + "components": [ + { + "name": "offset", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "op", + "type": "uint8", + "internalType": "enum PinOp" + }, + { + "name": "value", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMode", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct ModeSlot", + "components": [ + { + "name": "initialized", + "type": "bool", + "internalType": "bool" + }, + { + "name": "mode", + "type": "uint8", + "internalType": "enum RulesType" + }, + { + "name": "vm", + "type": "uint8", + "internalType": "enum VmFamily" + }, + { + "name": "chainHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getNativeConfig", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct NativeConfig", + "components": [ + { + "name": "initialized", + "type": "bool", + "internalType": "bool" + }, + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "maxValuePerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxValueTotal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "valueSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amount", + "type": "tuple", + "internalType": "struct AmountRule", + "components": [ + { + "name": "enabled", + "type": "bool", + "internalType": "bool" + }, + { + "name": "offset", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "maxPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxTotal", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "amountSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxCalls", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "callsUsed", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "pins", + "type": "tuple[]", + "internalType": "struct ArgPin[]", + "components": [ + { + "name": "offset", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "op", + "type": "uint8", + "internalType": "enum PinOp" + }, + { + "name": "value", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getSvmConfig", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct SvmConfig", + "components": [ + { + "name": "initialized", + "type": "bool", + "internalType": "bool" + }, + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "expectedCEA", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "gatewayProgram", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "maxGasPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "assets", + "type": "tuple[]", + "internalType": "struct AssetCapState[]", + "components": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "maxPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxTotal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "spent", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "ceaAccounts", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { + "name": "programs", + "type": "tuple[]", + "internalType": "struct AllowedProgram[]", + "components": [ + { + "name": "program", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "discriminator", + "type": "bytes8", + "internalType": "bytes8" + }, + { + "name": "discriminatorLen", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dataless", + "type": "bool", + "internalType": "bool" + }, + { + "name": "maxAccounts", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "name": "pins", + "type": "tuple[]", + "internalType": "struct SvmAccountPin[]", + "components": [ + { + "name": "ruleIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "accountIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "name": "dataPins", + "type": "tuple[]", + "internalType": "struct SvmDataPin[]", + "components": [ + { + "name": "ruleIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "fromEnd", + "type": "bool", + "internalType": "bool" + }, + { + "name": "offset", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "offsetB", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "len", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "mode", + "type": "uint8", + "internalType": "enum SvmDataPinMode" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "num", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "den", + "type": "uint64", + "internalType": "uint64" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "universalGatewayPC", + "type": "address", + "internalType": "address" + }, + { + "name": "universalExecutorModule", + "type": "address", + "internalType": "address" + }, + { + "name": "sessionEngine", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initializeWithMultiplexer", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "configId", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isCredited", + "inputs": [ + { + "name": "outboundTxId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pushChainHash", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "iid", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "pure" + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "NativeCallMetered", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "indexed": true, + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OutboundMetered", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "indexed": true, + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PolicySet", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "indexed": false, + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RevertCredited", + "inputs": [ + { + "name": "outboundTxId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "id", + "type": "bytes32", + "indexed": true, + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amountApplied", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulesConfigured", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "indexed": true, + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mode", + "type": "uint8", + "indexed": false, + "internalType": "enum RulesType" + }, + { + "name": "vm", + "type": "uint8", + "indexed": false, + "internalType": "enum VmFamily" + }, + { + "name": "chainHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AllowListOutOfRange", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AlreadyCredited", + "inputs": [ + { + "name": "outboundTxId", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "AlreadyInitialized", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + } + ] + }, + { + "type": "error", + "name": "AmountExceedsCap", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ArgPinAboveMax", + "inputs": [ + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "max", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ArgPinMismatch", + "inputs": [ + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "AssetListOutOfRange", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AssetNotAllowed", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AssetSpentMismatch", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "BatchSizeOutOfRange", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CallLimitReached", + "inputs": [ + { + "name": "callsUsed", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "maxCalls", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "type": "error", + "name": "CallNotAllowed", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "CalldataTooShort", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CalldataTooShortForAmount", + "inputs": [ + { + "name": "actualLength", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "needed", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CalldataTooShortForPin", + "inputs": [ + { + "name": "actualLength", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "needed", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CallerIsNotUEModule", + "inputs": [ + { + "name": "caller", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ChainMismatch", + "inputs": [ + { + "name": "declared", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "assetChain", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "DuplicateAsset", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "EmptyChain", + "inputs": [] + }, + { + "type": "error", + "name": "ForbiddenInnerTarget", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidAsset", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidConfigField", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidExpiry", + "inputs": [ + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRevertRecipient", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidSelector", + "inputs": [ + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "InvalidTarget", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "MalformedInnerCalldata", + "inputs": [] + }, + { + "type": "error", + "name": "MalformedOutboundRequest", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "NativeAmountExceedsCap", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "NativeTargetIsGateway", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "NativeTargetZero", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitialized", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "PCValueExceedsCap", + "inputs": [ + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "PayloadNotMulticall", + "inputs": [] + }, + { + "type": "error", + "name": "PolicyNotInitialized", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "RecipientMustBeEmpty", + "inputs": [] + }, + { + "type": "error", + "name": "RulesExpired", + "inputs": [ + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "SelectorMismatch", + "inputs": [ + { + "name": "actual", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expected", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "SpentLengthMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SpentMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TargetMismatch", + "inputs": [ + { + "name": "actual", + "type": "address", + "internalType": "address" + }, + { + "name": "expected", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "TooManyAllowedCallPins", + "inputs": [ + { + "name": "total", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TooManyPins", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TotalNativeAmountExceeded", + "inputs": [ + { + "name": "newSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TotalSpendCapExceeded", + "inputs": [ + { + "name": "wouldBeTotal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TotalValueExceeded", + "inputs": [ + { + "name": "newSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "UncappedGasSwapRejected", + "inputs": [] + }, + { + "type": "error", + "name": "UnsupportedEnvelopeVersion", + "inputs": [ + { + "name": "version", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "UnsupportedNamespace", + "inputs": [ + { + "name": "chainHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ValueExceedsCap", + "inputs": [ + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ValueOnlyCalldataNotEmpty", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ValueOnlyWithAmountRule", + "inputs": [] + }, + { + "type": "error", + "name": "ValueOnlyWithPins", + "inputs": [] + }, + { + "type": "error", + "name": "WrongModeForCall", + "inputs": [ + { + "name": "actual", + "type": "uint8", + "internalType": "enum RulesType" + } + ] + }, + { + "type": "error", + "name": "WrongVmForCall", + "inputs": [ + { + "name": "actual", + "type": "uint8", + "internalType": "enum VmFamily" + } + ] + }, + { + "type": "error", + "name": "ZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "ZeroMaxCalls", + "inputs": [] + }, + { + "type": "error", + "name": "AmbiguousRule", + "inputs": [ + { + "name": "i", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "j", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AmountExceedsU64", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CeaAccountAtUnpinnedIndex", + "inputs": [ + { + "name": "accountIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "account", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "CeaAccountsMissExpectedCEA", + "inputs": [] + }, + { + "type": "error", + "name": "DiscriminatorLenOutOfRange", + "inputs": [ + { + "name": "rule", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "len", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "DuplicateSvmPin", + "inputs": [ + { + "name": "first", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "second", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ForbiddenProgramInAllowList", + "inputs": [ + { + "name": "rule", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "program", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ForbiddenTargetProgram", + "inputs": [ + { + "name": "program", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "InvalidCeaAccount", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "InvalidSvmConfigField", + "inputs": [] + }, + { + "type": "error", + "name": "MalformedSvmPayload", + "inputs": [ + { + "name": "code", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "ProgramListOutOfRange", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ProgramNotAllowed", + "inputs": [ + { + "name": "program", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "discriminator", + "type": "bytes8", + "internalType": "bytes8" + } + ] + }, + { + "type": "error", + "name": "RecipientNotPubkey", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "RecipientTargetMismatch", + "inputs": [ + { + "name": "recipient", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "target", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "RuleWithoutPin", + "inputs": [ + { + "name": "rule", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmAccountCountBelowPin", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "needed", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmAccountCountMismatch", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expected", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmAccountPinMismatch", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "accountIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "SvmAccountsOutOfRange", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmDataCeilingExceeded", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "ceiling", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmDataFloorNotMet", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "floor", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmDataPinInvalid", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmDataPinMismatch", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "SvmDataRatioNotMet", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "a", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "b", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "num", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "den", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "SvmDataTooShortForPin", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "ixLen", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmInstructionNotExecute", + "inputs": [ + { + "name": "instructionId", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmIxDataTooLong", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmMaxAccountsOutOfRange", + "inputs": [ + { + "name": "rule", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxAccounts", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmPayloadEmpty", + "inputs": [] + }, + { + "type": "error", + "name": "SvmPinIndexOutOfRange", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "accountIndex", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmPinRuleOutOfRange", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rule", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "TooManyCeaAccounts", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TooManySvmDataPins", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TooManySvmPins", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + } +] as const; diff --git a/packages/core/src/lib/agentic/contracts/donut-v6.ts b/packages/core/src/lib/agentic/contracts/donut-v6.ts new file mode 100644 index 00000000..b1899218 --- /dev/null +++ b/packages/core/src/lib/agentic/contracts/donut-v6.ts @@ -0,0 +1,13 @@ +import type { Address } from 'viem'; + +/** Source ffd567d; code sizes and wiring checked at Donut block 24244801. */ +export const V6_SOURCE_COMMIT = 'ffd567d3e49b2d27c6f50ad36093274dbac3090f'; +export const DONUT_V6_START_BLOCK = BigInt(24229957); +export const DONUT_V6_ADDRESSES = { + factory: '0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc', + walletImplementation: '0x536D3EA48219ff743ac663C6c224920e9eB476A5', + sessionEngine: '0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d', + rulesPolicy: '0xBA32e7A1500cb34311a31127bcD40CA52C8CFd36', + sessionValidator: '0xBf08d8335c1cE41a577DB70666816027814737dD', + gateway: '0x00000000000000000000000000000000000000C1', +} as const satisfies Record; diff --git a/packages/core/src/lib/agentic/contracts/prc20-metadata.ts b/packages/core/src/lib/agentic/contracts/prc20-metadata.ts new file mode 100644 index 00000000..e5eff6b3 --- /dev/null +++ b/packages/core/src/lib/agentic/contracts/prc20-metadata.ts @@ -0,0 +1,139 @@ +import { + getAddress, + isAddress, + parseAbi, + zeroAddress, + type Address, + type Hex, +} from 'viem'; +import { UNIVERSAL_CORE_EVM } from '../../constants/abi/prc20.evm'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import type { Snapshot } from '../reads/snapshot'; +import { CHAIN, PUSH_NETWORK } from '../../constants/enums'; +import { MOVEABLE_TOKENS } from '../../constants/tokens'; +import { getPRC20Address } from '../../universal/prc20-address'; +import { svmKey } from '../codec/svm-accounts'; + +export const PRC20_SOURCE_ABI = parseAbi([ + 'function SOURCE_CHAIN_NAMESPACE() view returns (string)', + 'function SOURCE_TOKEN_ADDRESS() view returns (string)', +]); +const NATIVE_SOURCE_ABI = parseAbi([ + 'function SOURCE_TOKEN_ADDRESS() view returns (address)', +]); +const SVM_SOURCE_WORD_ABI = parseAbi([ + 'function SOURCE_TOKEN_ADDRESS() view returns (bytes32)', +]); + +/** Resolve the SVM source mint from metadata or the current chain-specific token registry. */ +export async function readSvmSourceToken( + snap: Snapshot, + token: Address, + chain: string, + network: PUSH_NETWORK = PUSH_NETWORK.TESTNET_DONUT +): Promise { + let source: string; + try { + source = await snap.read( + token, + PRC20_SOURCE_ABI, + 'SOURCE_TOKEN_ADDRESS' + ); + } catch (cause) { + try { + source = await snap.read( + token, + SVM_SOURCE_WORD_ABI, + 'SOURCE_TOKEN_ADDRESS' + ); + } catch { + throw cause; + } + } + const zeroKey = `0x${'00'.repeat(32)}` as Hex; + if ( + source === '' || + source.toLowerCase() === zeroAddress || + source.toLowerCase() === zeroKey + ) { + if (getAddress(token) === (await readGasPrc20(snap, chain))) return zeroKey; + // Current Donut SVM synthetic metadata exposes a zero word for SPL assets. + // Ordinary Route 2 already resolves these through the same token registry. + // Match both full origin chain and exact PRC20; never infer an unknown mint. + for (const asset of MOVEABLE_TOKENS[chain as CHAIN] ?? []) { + if (asset.mechanism === 'native') continue; + try { + const resolved = getPRC20Address( + { chain, address: asset.address }, + { network } + ); + if (getAddress(resolved.address) === getAddress(token)) + return svmKey(asset.address); + } catch { + // A token without a deployment in this network is not a candidate. + } + } + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `source mint unavailable for PRC20 ${token} on ${chain}; no registered mapping matches` + ); + } + return svmKey(source); +} +export const CORE_ADDRESS = + '0x00000000000000000000000000000000000000C0' as Address; +export async function readGasPrc20( + snap: Snapshot, + chain: string +): Promise
{ + return getAddress( + await snap.read
( + CORE_ADDRESS, + UNIVERSAL_CORE_EVM, + 'gasTokenPRC20ByChainNamespace', + [chain] + ) + ); +} +/** Solidity PRC20s return a string; Donut precompiles can return an address word. */ +export async function readOriginToken( + snap: Snapshot, + token: Address, + chain: string +): Promise
{ + let source: string; + try { + source = await snap.read( + token, + PRC20_SOURCE_ABI, + 'SOURCE_TOKEN_ADDRESS' + ); + } catch (cause) { + let sourceWord: Address; + try { + sourceWord = getAddress( + await snap.read
( + token, + NATIVE_SOURCE_ABI, + 'SOURCE_TOKEN_ADDRESS' + ) + ); + } catch { + throw cause; + } + if (sourceWord !== zeroAddress) return sourceWord; + if ((await readGasPrc20(snap, chain)) === getAddress(token)) + return zeroAddress; + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + `non-native PRC20 ${token} has an empty source token address` + ); + } + if (isAddress(source, { strict: false })) return getAddress(source); + if (source === '' && (await readGasPrc20(snap, chain)) === getAddress(token)) + return zeroAddress; + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + `PRC20 ${token} has an invalid source token address` + ); +} diff --git a/packages/core/src/lib/agentic/contracts/reader.ts b/packages/core/src/lib/agentic/contracts/reader.ts new file mode 100644 index 00000000..2ea44743 --- /dev/null +++ b/packages/core/src/lib/agentic/contracts/reader.ts @@ -0,0 +1,49 @@ +import type { Abi, AbiEvent, Address, Hex, Log, PublicClient, TransactionReceipt } from 'viem'; + +/** + * The narrow chain-read surface the AGW module needs. Tests mock it; the SDK + * adapts the Push client's viem PublicClient. Every snapshot read passes an + * explicit `blockNumber` so dependent reads observe one state. + */ +export interface ChainReader { + readContract(args: { + address: Address; + abi: Abi | readonly unknown[]; + functionName: string; + args?: readonly unknown[]; + blockNumber?: bigint; + }): Promise; + getBlockNumber(): Promise; + getBlock?(args: { blockNumber: bigint }): Promise<{ timestamp: bigint; hash?: Hex | null }>; + getCode(args: { address: Address; blockNumber?: bigint }): Promise; + getBalance(args: { address: Address; blockNumber?: bigint }): Promise; + getLogs(args: { + address: Address; + event: AbiEvent; + args?: Record; + fromBlock: bigint; + toBlock: bigint; + }): Promise; + getTransactionReceipt(args: { hash: Hex }): Promise; + getTransaction?(args: { hash: Hex }): Promise<{ input: Hex; blockNumber: bigint | null }>; + /** Raw eth_call, used to verify complete signed marketplace requests before broadcast. */ + call?(args: { to: Address; data: Hex; account?: Address; blockNumber?: bigint }): Promise<{ data?: Hex }>; +} + +export function chainReaderFromPublicClient(client: PublicClient): ChainReader { + // viem's generics are narrower than this module's needs; the casts are + // confined to this adapter. + return { + readContract: (args) => + client.readContract(args as Parameters[0]), + getBlockNumber: () => client.getBlockNumber({ cacheTime: 0 }), + getBlock: (args) => client.getBlock(args), + getCode: (args) => client.getCode(args), + getBalance: (args) => client.getBalance(args), + getLogs: (args) => + client.getLogs(args as Parameters[0]) as Promise, + getTransactionReceipt: (args) => client.getTransactionReceipt(args), + getTransaction: (args) => client.getTransaction(args), + call: (args) => client.call(args), + }; +} diff --git a/packages/core/src/lib/agentic/contracts/v6.ts b/packages/core/src/lib/agentic/contracts/v6.ts new file mode 100644 index 00000000..6d9a3b97 --- /dev/null +++ b/packages/core/src/lib/agentic/contracts/v6.ts @@ -0,0 +1,455 @@ +import { + decodeAbiParameters, + decodeEventLog, + decodeFunctionData, + encodeAbiParameters, + encodeFunctionData, + encodePacked, + getAbiItem, + getAddress, + toEventSelector, + type AbiEvent, + type Address, + type Hex, + type Log, +} from 'viem'; +import { + AGW_ABI, + AGW_FACTORY_ABI, + SMART_SESSION_ABI, + UNIVERSAL_RULES_POLICY_ABI, +} from './abi/v6'; +import type { SessionWire } from '../codec/session'; +import type { CheckpointKind } from '../agentic.types'; +import type { NativeTermsWire } from '../codec/native'; +import type { UniversalTermsWire } from '../codec/universal-terms'; +import type { SvmTermsWire } from '../codec/svm-terms'; + +/** + * Contract adapter for the reviewed v6 ABI generation. All version- + * sensitive encoding, decoding and view names live here; callers never touch + * a raw ABI. A future generation gets its own adapter implementing the same + * interface. + */ + +export interface Call { + target: Address; + value: bigint; + data: Hex; +} + +export const MODE_SINGLE = `0x${'00'.repeat(32)}` as Hex; +export const MODE_BATCH = `0x01${'00'.repeat(31)}` as Hex; +export const SEND_OUTBOUND_SELECTOR = '0x77b86bec' as const; +export const UEA_MULTICALL_PREFIX = '0x2cc2842d' as const; + +const CHECKPOINT_KINDS: readonly CheckpointKind[] = [ + 'OWNER_ACTION', + 'RULES_GRANTED', + 'RULES_REVOKED', +]; + +export interface NativeConfigRead extends NativeTermsWire { + initialized: boolean; + valueSpent: bigint; + amountSpent: bigint; + callsUsed: number; +} + +export interface ModeRead { + initialized: boolean; + /** 0 = UNIVERSAL, 1 = NATIVE (RulesType). */ + mode: number; + /** 0 = EVM, 1 = SVM (VmFamily). */ + vm: number; + chainHash: Hex; +} + +export interface UniversalConfigRead + extends Omit { + initialized: boolean; + assets: readonly { + token: Address; + maxPerCall: bigint; + maxTotal: bigint; + spent: bigint; + }[]; +} + +export interface SvmConfigRead extends Omit { + initialized: boolean; + assets: readonly { + token: Address; + maxPerCall: bigint; + maxTotal: bigint; + spent: bigint; + }[]; +} + +export type DecodedWalletCall = + | { kind: 'execute'; mode: Hex; calls: Call[] } + | { kind: 'executeAsAgent'; rulesId: Hex; mode: Hex; calls: Call[] } + | { kind: 'grantRules'; session: SessionWire } + | { kind: 'revokeRules'; rulesId: Hex } + | { kind: 'revokeAllRules' }; + +const EXECUTION_TUPLE = [ + { + type: 'tuple[]', + components: [ + { name: 'target', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'callData', type: 'bytes' }, + ], + }, +] as const; + +export const v6 = { + id: 'v6', + abis: { + wallet: AGW_ABI, + factory: AGW_FACTORY_ABI, + engine: SMART_SESSION_ABI, + policy: UNIVERSAL_RULES_POLICY_ABI, + }, + events: { + walletDeployed: getAbiItem({ + abi: AGW_FACTORY_ABI, + name: 'WalletDeployed', + }) as AbiEvent, + checkpointed: getAbiItem({ + abi: AGW_ABI, + name: 'Checkpointed', + }) as AbiEvent, + rulesGranted: getAbiItem({ + abi: AGW_ABI, + name: 'RulesGranted', + }) as AbiEvent, + rulesRevoked: getAbiItem({ + abi: AGW_ABI, + name: 'RulesRevoked', + }) as AbiEvent, + }, + + // ---------------------------------------------------------------- encoders + encodeDeployWallet(label: string): Hex { + return encodeFunctionData({ + abi: AGW_FACTORY_ABI, + functionName: 'deployWallet', + args: [label], + }); + }, + /** + * Index-bound deployment for an owner calling the factory itself. + * deployWalletWithSig skips signature checks when msg.sender == intent.owner + * but still reverts IndexMismatch / IntentWalletMismatch unless the owner's + * next slot is exactly `index` and predicts to `wallet`. A concurrent + * creation therefore makes this call revert instead of deploying another + * slot while later calls in the batch target the predicted address. + */ + encodeDeployWalletAt( + owner: Address, + index: bigint, + wallet: Address, + label: string + ): Hex { + const zero32 = `0x${'00'.repeat(32)}` as Hex; + const zeroAddress = '0x0000000000000000000000000000000000000000' as Address; + return encodeFunctionData({ + abi: AGW_FACTORY_ABI, + functionName: 'deployWalletWithSig', + args: [ + { + owner, + wallet, + executor: zeroAddress, + index, + sessionHash: zero32, + mode: zero32, + execCalldataHash: zero32, + nonceKey: BigInt(0), + nonceSeq: BigInt(0), + grantNonce: BigInt(0), + deadline: 0, + signerChainId: BigInt(0), + }, + '0x', + label, + ], + }); + }, + encodeCreateWalletAt( + owner: Address, + index: bigint, + wallet: Address, + label: string, + rules: readonly SessionWire[] + ): Hex { + const zero32 = `0x${'00'.repeat(32)}` as Hex; + const zeroAddress = '0x0000000000000000000000000000000000000000' as Address; + return encodeFunctionData({ + abi: AGW_FACTORY_ABI, + functionName: 'createWalletWithSig', + args: [ + { + owner, + wallet, + executor: zeroAddress, + index, + sessionHash: zero32, + mode: zero32, + execCalldataHash: zero32, + nonceKey: BigInt(0), + nonceSeq: BigInt(0), + grantNonce: BigInt(0), + deadline: 0, + signerChainId: BigInt(0), + }, + '0x', + label, + rules as never, + ], + }); + }, + encodeGrantRules(session: SessionWire): Hex { + return encodeFunctionData({ + abi: AGW_ABI, + functionName: 'grantRules', + args: [session as never], + }); + }, + encodeRevokeRules(rulesId: Hex): Hex { + return encodeFunctionData({ + abi: AGW_ABI, + functionName: 'revokeRules', + args: [rulesId], + }); + }, + encodeRevokeAllRules(): Hex { + return encodeFunctionData({ + abi: AGW_ABI, + functionName: 'revokeAllRules', + args: [], + }); + }, + encodeSetLabel(label: string): Hex { + return encodeFunctionData({ + abi: AGW_ABI, + functionName: 'setLabel', + args: [label], + }); + }, + /** ERC-7579 single execution calldata: abi.encodePacked(target, value, callData). */ + packSingle(call: Call): Hex { + return encodePacked( + ['address', 'uint256', 'bytes'], + [call.target, call.value, call.data] + ); + }, + encodeExecute(calls: Call[]): Hex { + if (calls.length === 0) throw new Error('execute needs at least one call'); + if (calls.length === 1) { + return encodeFunctionData({ + abi: AGW_ABI, + functionName: 'execute', + args: [MODE_SINGLE, v6.packSingle(calls[0])], + }); + } + const batch = encodeAbiParameters(EXECUTION_TUPLE, [ + calls.map((c) => ({ + target: c.target, + value: c.value, + callData: c.data, + })), + ]); + return encodeFunctionData({ + abi: AGW_ABI, + functionName: 'execute', + args: [MODE_BATCH, batch], + }); + }, + encodeExecuteAsAgent(rulesId: Hex, call: Call): Hex { + return encodeFunctionData({ + abi: AGW_ABI, + functionName: 'executeAsAgent', + args: [rulesId, MODE_SINGLE, v6.packSingle(call)], + }); + }, + encodeAssertSpentNative( + configId: Hex, + wallet: Address, + expected: { valueSpent: bigint; amountSpent: bigint; callsUsed: number } + ): Hex { + return encodeFunctionData({ + abi: UNIVERSAL_RULES_POLICY_ABI, + functionName: 'assertSpent', + args: [ + configId, + wallet, + expected.valueSpent, + expected.amountSpent, + expected.callsUsed, + ], + }); + }, + encodeAssertSpentUniversal( + configId: Hex, + wallet: Address, + expectedSpent: readonly bigint[] + ): Hex { + return encodeFunctionData({ + abi: UNIVERSAL_RULES_POLICY_ABI, + functionName: 'assertSpent', + args: [configId, wallet, expectedSpent], + }); + }, + + // ---------------------------------------------------------------- decoders + decodeWalletCall(data: Hex): DecodedWalletCall | null { + let decoded; + try { + decoded = decodeFunctionData({ abi: AGW_ABI, data }); + } catch { + return null; + } + switch (decoded.functionName) { + case 'execute': { + const [mode, ecd] = decoded.args as readonly [Hex, Hex]; + return { kind: 'execute', mode, calls: unpackExecution(mode, ecd) }; + } + case 'executeAsAgent': { + const [rulesId, mode, ecd] = decoded.args as readonly [Hex, Hex, Hex]; + return { + kind: 'executeAsAgent', + rulesId, + mode, + calls: unpackExecution(mode, ecd), + }; + } + case 'grantRules': + return { + kind: 'grantRules', + session: decoded.args[0] as unknown as SessionWire, + }; + case 'revokeRules': + return { kind: 'revokeRules', rulesId: decoded.args[0] as Hex }; + case 'revokeAllRules': + return { kind: 'revokeAllRules' }; + default: + return null; + } + }, + decodeCheckpointKind(kind: number): CheckpointKind { + const k = CHECKPOINT_KINDS[kind]; + if (!k) throw new Error(`unknown checkpoint kind ${kind}`); + return k; + }, + parseWalletDeployed(logs: readonly Log[], factory: Address) { + return decodeMatching(logs, factory, v6.events.walletDeployed).map( + (args) => ({ + owner: getAddress(args['owner'] as Address), + index: BigInt(args['index'] as bigint), + wallet: getAddress(args['wallet'] as Address), + label: args['label'] as string, + }) + ); + }, + parseRulesGranted(logs: readonly Log[], wallet: Address) { + return decodeMatching(logs, wallet, v6.events.rulesGranted).map((args) => ({ + rulesId: args['rulesId'] as Hex, + mode: Number(args['mode']), + chainNamespace: args['chainNamespace'] as string, + })); + }, + parseRulesRevoked(logs: readonly Log[], wallet: Address) { + return decodeMatching(logs, wallet, v6.events.rulesRevoked).map((args) => ({ + rulesId: args['rulesId'] as Hex, + })); + }, + parseCheckpointed(logs: readonly Log[], wallet: Address) { + return logs + .filter( + (l) => + sameAddress(l.address, wallet) && + l.topics[0]?.toLowerCase() === + toEventSelector(v6.events.checkpointed).toLowerCase() + ) + .flatMap((log) => { + try { + const ev = decodeEventLog({ + abi: [v6.events.checkpointed], + ...log, + strict: true, + }); + return [{ log, args: ev.args as unknown as Record }]; + } catch { + return []; + } + }) + .map(({ log, args }) => ({ + seq: Number(args['seq']), + kind: v6.decodeCheckpointKind(Number(args['kind'])), + ref: args['ref'] as Hex, + blockNumber: BigInt(log.blockNumber ?? BigInt(0)), + txHash: log.transactionHash as Hex, + logIndex: Number(log.logIndex ?? 0), + transactionIndex: Number(log.transactionIndex ?? 0), + })); + }, +}; + +function unpackExecution(mode: Hex, ecd: Hex): Call[] { + const callType = mode.slice(2, 4); + if (callType === '00') { + const bytes = ecd.slice(2); + return [ + { + target: getAddress(`0x${bytes.slice(0, 40)}`), + value: BigInt(`0x${bytes.slice(40, 104) || '0'}`), + data: `0x${bytes.slice(104)}` as Hex, + }, + ]; + } + if (callType === '01') { + const [execs] = decodeAbiParameters(EXECUTION_TUPLE, ecd); + return execs.map((e) => ({ + target: getAddress(e.target), + value: e.value, + data: e.callData as Hex, + })); + } + return []; +} + +function sameAddress(a: string | null | undefined, b: string): boolean { + return !!a && a.toLowerCase() === b.toLowerCase(); +} + +function decodeMatching( + logs: readonly Log[], + emitter: Address, + event: AbiEvent +): Record[] { + // viem's decodeEventLog skips the topic0 check when given a one-event ABI, + // so the event signature is matched explicitly here. + const topic0 = toEventSelector(event).toLowerCase(); + const out: Record[] = []; + for (const log of logs) { + if (!sameAddress(log.address, emitter)) continue; + if (log.topics[0]?.toLowerCase() !== topic0) continue; + try { + const ev = decodeEventLog({ + abi: [event], + data: log.data, + topics: log.topics, + strict: true, + }); + out.push(ev.args as unknown as Record); + } catch { + // not this event + } + } + return out; +} + +export type AgwContracts = typeof v6; diff --git a/packages/core/src/lib/agentic/deployments.ts b/packages/core/src/lib/agentic/deployments.ts new file mode 100644 index 00000000..99e61eb1 --- /dev/null +++ b/packages/core/src/lib/agentic/deployments.ts @@ -0,0 +1,299 @@ +import { getAddress, type Address } from 'viem'; +import { PUSH_NETWORK } from '../constants/enums'; +import { AgenticCapability } from './capabilities'; +import { v6, type AgwContracts } from './contracts/v6'; +import type { ChainReader } from './contracts/reader'; +import { AGENTIC_ERROR_CODE, AgenticError } from './errors'; +import { + DONUT_V6_ADDRESSES, + DONUT_V6_START_BLOCK, + V6_SOURCE_COMMIT, +} from './contracts/donut-v6'; + +/** + * A verified AGW contract generation on one Push network. The registry is the + * ONLY source of AGW addresses in the SDK: no address is hard-coded anywhere + * else, and historical Donut deployments (generation 67929f2, grantMandate) + * are NOT registered because they do not implement this ABI. + */ +export interface AgenticGeneration { + /** Stable identifier, e.g. 'v6'. */ + id: string; + /** Contract source commit the ABI was generated from. */ + sourceCommit: string; + network: PUSH_NETWORK; + /** false = review fixture (local harness); never advertised as a release deployment. */ + advertised: boolean; + addresses: { + factory: Address; + walletImplementation: Address; + sessionEngine: Address; + rulesPolicy: Address; + sessionValidator: Address; + gateway: Address; + }; + /** First block to scan for factory/wallet events. */ + startBlock: bigint; + /** Expected wallet accountId(). */ + accountId: string; + capabilities: ReadonlySet; + contracts: AgwContracts; +} + +/** Capabilities the v6 ABI actually implements. Target-only features are absent. */ +export const V6_CAPABILITIES: ReadonlySet = new Set([ + AgenticCapability.WALLET_READS, + AgenticCapability.ACTIVE_RULE_READS, + AgenticCapability.OWNER_EXECUTE, + AgenticCapability.AGENT_EXECUTE, + AgenticCapability.NATIVE_RULES, + AgenticCapability.ASSERT_SPENT_NATIVE, + AgenticCapability.CHECKPOINTS, + AgenticCapability.UNIVERSAL_EVM_OUTBOUND, + AgenticCapability.UNIVERSAL_EVM_RULES, + AgenticCapability.UNIVERSAL_SVM_RULES, + AgenticCapability.ASSERT_SPENT_UNIVERSAL_MULTI, + AgenticCapability.SET_LABEL, +]); + +/** + * V6 only. Unsupported networks fail before signing; no legacy adapter fallback. + */ +const VERIFIED_DEPLOYMENTS: readonly AgenticGeneration[] = [ + { + id: 'v6', + sourceCommit: V6_SOURCE_COMMIT, + network: PUSH_NETWORK.TESTNET_DONUT, + advertised: true, + addresses: DONUT_V6_ADDRESSES, + startBlock: DONUT_V6_START_BLOCK, + accountId: 'push.agw.1.0.0', + capabilities: V6_CAPABILITIES, + contracts: v6, + }, +]; + +const registry: AgenticGeneration[] = [...VERIFIED_DEPLOYMENTS]; + +/** + * @internal Register a generation that is NOT a verified release deployment — + * the local contract harness and E2E manifest loader use this. Not exported + * from the package entry point. + */ +export function registerAgenticGeneration( + input: Omit & { + capabilities?: ReadonlySet; + } +): AgenticGeneration { + if (input.id !== v6.id || input.sourceCommit !== V6_SOURCE_COMMIT) { + throw new AgenticError( + AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE, + `no contract adapter for generation "${input.id}"` + ); + } + const gen: AgenticGeneration = { + ...input, + addresses: { + factory: getAddress(input.addresses.factory), + walletImplementation: getAddress(input.addresses.walletImplementation), + sessionEngine: getAddress(input.addresses.sessionEngine), + rulesPolicy: getAddress(input.addresses.rulesPolicy), + sessionValidator: getAddress(input.addresses.sessionValidator), + gateway: getAddress(input.addresses.gateway), + }, + capabilities: input.capabilities ?? V6_CAPABILITIES, + contracts: v6, + }; + const existing = registry.findIndex( + (g) => + g.network === gen.network && g.addresses.factory === gen.addresses.factory + ); + if (existing >= 0) registry.splice(existing, 1); + registry.push(gen); + verifiedWiring.clear(); + return gen; +} + +/** @internal Test/harness cleanup. Restores the checked Donut v6 registry. */ +export function resetAgenticGenerations(): void { + registry.splice(0, registry.length, ...VERIFIED_DEPLOYMENTS); + verifiedWiring.clear(); +} + +/** Grant compatibility check; the unrestricted owner door does not consult URP. */ +export async function verifyPolicyVersion( + reader: ChainReader, + gen: AgenticGeneration +): Promise { + const version = await reader.readContract({ + address: gen.addresses.rulesPolicy, + abi: gen.contracts.abis.policy, + functionName: 'version', + }); + if (version !== '3.1.0') + throw new AgenticError( + AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE, + `URP version ${String(version)} is not supported by the v6 adapter` + ); +} + +export function generationsFor( + network: PUSH_NETWORK +): readonly AgenticGeneration[] { + return registry.filter((g) => g.network === network); +} + +/** The generation new wallets are created on for this network. */ +export function currentGeneration(network: PUSH_NETWORK): AgenticGeneration { + const gens = generationsFor(network); + const gen = gens[gens.length - 1]; + if (!gen) { + throw new AgenticError( + AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE, + `no verified AGW deployment is registered for ${network}`, + { + hint: 'AGW v6 is configured on Donut only; this Push network has no registered v6 deployment.', + details: { network, assumption: 'A07' }, + } + ); + } + return gen; +} + +/** Generation infrastructure a native rule may not target (the wallet itself is added per call). */ +export function forbiddenTargets( + gen: AgenticGeneration, + wallet?: Address +): Address[] { + const a = gen.addresses; + return [ + a.factory, + a.sessionEngine, + a.rulesPolicy, + a.sessionValidator, + a.gateway, + ...(wallet ? [wallet] : []), + ]; +} + +const verifiedWiring = new Map>(); + +/** Confirms the factory still points at the registered implementation (cached per generation). */ +export function verifyFactoryWiring( + reader: ChainReader, + gen: AgenticGeneration +): Promise { + const key = `${gen.network}:${gen.addresses.factory}:${gen.addresses.walletImplementation}`; + let p = verifiedWiring.get(key); + if (!p) { + p = (async () => { + const impl = (await reader.readContract({ + address: gen.addresses.factory, + abi: gen.contracts.abis.factory, + functionName: 'walletImplementation', + })) as Address; + if (getAddress(impl) !== gen.addresses.walletImplementation) { + throw new AgenticError( + AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE, + `factory ${gen.addresses.factory} points at implementation ${impl}, not the registered ${gen.addresses.walletImplementation}` + ); + } + })(); + p.catch(() => verifiedWiring.delete(key)); + verifiedWiring.set(key, p); + } + return p; +} + +/** + * Resolve and verify the generation of a deployed wallet: + * code present → factory() is a registered factory → factory.isWallet(wallet) + * → immutable wiring and accountId match the registered generation. + */ +export async function resolveWalletGeneration( + reader: ChainReader, + network: PUSH_NETWORK, + wallet: Address +): Promise { + const gens = generationsFor(network); + if (gens.length === 0) currentGeneration(network); // throws CAPABILITY_UNAVAILABLE (A07) + + const code = await reader.getCode({ address: wallet }); + if (!code || code === '0x') { + throw new AgenticError( + AGENTIC_ERROR_CODE.WALLET_NOT_DEPLOYED, + `no contract is deployed at ${wallet}`, + { + hint: 'Deploy it with client.agentic.create, or check the address and network.', + } + ); + } + let factory: Address; + try { + factory = getAddress( + (await reader.readContract({ + address: wallet, + abi: v6.abis.wallet, + functionName: 'factory', + })) as Address + ); + } catch (cause) { + throw new AgenticError( + AGENTIC_ERROR_CODE.NOT_AGENTIC_WALLET, + `${wallet} does not expose an AGW factory()`, + { cause } + ); + } + const gen = gens.find((g) => g.addresses.factory === factory); + if (!gen) { + throw new AgenticError( + AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE, + `${wallet} was created by factory ${factory}, which is not a verified AGW generation on ${network}`, + { details: { factory, assumption: 'A07' } } + ); + } + const isWallet = (await reader.readContract({ + address: gen.addresses.factory, + abi: gen.contracts.abis.factory, + functionName: 'isWallet', + args: [wallet], + })) as boolean; + if (!isWallet) { + throw new AgenticError( + AGENTIC_ERROR_CODE.NOT_AGENTIC_WALLET, + `${wallet} is not a wallet of factory ${factory}` + ); + } + const [engine, policy, validator, gateway, accountId] = await Promise.all( + ( + [ + 'SESSION_ENGINE', + 'RULES_POLICY', + 'SESSION_VALIDATOR', + 'UNIVERSAL_GATEWAY_PC', + 'accountId', + ] as const + ).map((functionName) => + reader.readContract({ + address: wallet, + abi: gen.contracts.abis.wallet, + functionName, + }) + ) + ); + const mismatch = + getAddress(engine as Address) !== gen.addresses.sessionEngine || + getAddress(policy as Address) !== gen.addresses.rulesPolicy || + getAddress(validator as Address) !== gen.addresses.sessionValidator || + getAddress(gateway as Address) !== gen.addresses.gateway || + accountId !== gen.accountId; + if (mismatch) { + throw new AgenticError( + AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE, + `${wallet} wiring does not match registered generation ${gen.id}`, + { details: { engine, policy, validator, gateway, accountId } } + ); + } + await verifyFactoryWiring(reader, gen); + return gen; +} diff --git a/packages/core/src/lib/agentic/error-messages.ts b/packages/core/src/lib/agentic/error-messages.ts new file mode 100644 index 00000000..db3a529b --- /dev/null +++ b/packages/core/src/lib/agentic/error-messages.ts @@ -0,0 +1,188 @@ +import type { AgenticErrorCode } from './errors'; + +/** UI copy only. Codes, original messages, hints and causes remain diagnostic data. */ +const MESSAGES: Record = { + DUPLICATE_RULE: + 'Keep one rule per agent and network. Edit the existing rule or remove the duplicate.', + AGENT_IS_OWNER: 'Choose an agent address different from the wallet owner.', + AMBIGUOUS_RULE: + 'More than one rule matches this agent and network. Keep one active matching rule before sending.', + TARGET_NOT_ON_RULE_CHAIN: + 'Choose an app on the network selected for this rule.', + ASSET_CHAIN_MISMATCH: + 'The selected token belongs to a different network. Choose a token on this rule’s network.', + TOKEN_ROUTE_UNAVAILABLE: + 'This token cannot currently be transferred from Push to the selected network. Choose a token with a supported Push route.', + REQUEST_REJECTED: + 'The wallet request was cancelled. Check wallet activity before trying again.', + NOT_OWNER_OR_AGENT: + 'Connect the wallet owner or an agent authorized by its rules.', + WALLET_NOT_DEPLOYED: 'This agentic wallet has not been created yet.', + NOT_AGENTIC_WALLET: 'This address is not a supported agentic wallet.', + DELETE_NEEDS_TARGET: 'Choose which rules to remove.', + NO_RULES_FOR_CHAIN: 'This agent has no active rule for the selected network.', + FROM_NOT_ALLOWED: + 'The agentic wallet is the sender. Remove the custom sender selection.', + NOT_ALLOWED_IN_AGENTIC_MODE: + 'This action is unavailable while using an agentic wallet.', + INVALID_RULE: + 'Some rule settings are invalid. Review the rule and try again.', + CAPABILITY_UNAVAILABLE: + 'This feature is not available for this wallet or network yet.', + READ_ONLY: 'Connect a signing wallet to continue.', + NOT_WALLET_OWNER: 'Connect the owner wallet to change these permissions.', + RULE_NOT_FOUND: + 'This rule could not be found. Refresh the wallet’s rules and try again.', + RULE_READ_FAILED: + 'The wallet’s current state could not be loaded. Refresh and try again.', + INCONSISTENT_READ: + 'The wallet changed while it was being checked. Refresh before trying again.', + INDEX_RACE: + 'The expected wallet address changed. Refresh wallet information before trying again.', + RECEIPT_MISMATCH: + 'The transaction result needs verification. Check its status before retrying.', + RECEIPT_UNAVAILABLE: + 'The transaction was submitted, but its status could not be confirmed. Check its status before trying again.', + AGENT_GAS_INSUFFICIENT: + 'The agent needs more Push coins to pay transaction fees.', + WALLET_BALANCE_INSUFFICIENT: + 'The agentic wallet does not have enough funds for this action.', +}; + +/** Tokens-only rules and MOVEABLE ALL (management/rule-inputs). */ +const REASON_MESSAGES: Readonly> = { + TOKENS_ONLY_NATIVE: + 'Native ETH and BNB cannot be transferred by a rule. Remove them, or add an app.', + TOKENS_ONLY_UNSUPPORTED: + 'Tokens alone can only be allowed on EVM networks. Add an app for this network.', + TRANSFER_RECIPIENT_REQUIRED: + 'Name at least one recipient: the owner has no address on this network.', + TRANSFER_RECIPIENT_INVALID: 'Enter a valid recipient address.', + TRANSFER_TO_WITH_CALLS: + 'Recipients apply only to rules without apps. Add the transfer as an allowed function instead.', + ALL_WITH_LIMITS: + 'All tokens uses each token’s default limits. Remove the limits, or select the tokens individually.', + ALL_TOO_MANY: 'A rule can include at most eight tokens. Select fewer tokens.', + ALL_UNAVAILABLE: 'No token can be sent from Push to this network yet.', +}; + +export function agenticUserMessage( + code: AgenticErrorCode, + diagnostic: string, + details?: Readonly> +): string { + if (code === 'CAPABILITY_UNAVAILABLE') { + if (details?.['capability'] === 'nativeActions') + return 'A Push rule can allow at most eight functions. Select fewer functions.'; + if (details?.['capability'] === 'presetCalls') + return 'Choose a preset configuration with 1 to 32 allowed functions.'; + if ( + details?.['capability'] === 'presetChain' || + details?.['capability'] === 'presetCatalog' + ) + return 'This preset is unavailable for the selected network.'; + } + if (code !== 'INVALID_RULE') return MESSAGES[code]; + if (details?.['reason'] === 'ALLOWED_FUNCTION_REQUIRED') + return 'Add at least one allowed function, or select tokens on an EVM network to allow transfers back to the owner.'; + const reasonMessage = REASON_MESSAGES[String(details?.['reason'])]; + if (reasonMessage) return reasonMessage; + if (/validUntil|expiry|expired|future.*timestamp/i.test(diagnostic)) + return 'Choose an expiry date in the future.'; + if (/label.*(64|length|most)/i.test(diagnostic)) + return 'The wallet name is too long. Shorten it and try again.'; + if (/label/i.test(diagnostic)) return 'Enter a valid wallet name.'; + if (/maxGasPerCall.*positive/i.test(diagnostic)) + return 'Set a gas budget greater than zero for this rule.'; + if (/allowedCalls.*(1\.\.32|contain|array)/i.test(diagnostic)) + return 'Select between 1 and 32 allowed functions for this rule.'; + if (/rules.*(eight|8)|eight initial rules/i.test(diagnostic)) + return 'A wallet can be created with at most eight rules. Remove some rules before creating it.'; + if (/assets.*(eight|8)/i.test(diagnostic)) + return 'A rule can include at most eight tokens. Select fewer tokens.'; + if (/duplicate.*pin|pin.*duplicate/i.test(diagnostic)) + return 'The same function input has more than one condition. Keep one condition for each input.'; + if (/pins.*(eight|8)/i.test(diagnostic)) + return 'A function can have at most eight conditions. Choose a simpler function configuration.'; + if (/pins.*32|32.*pins/i.test(diagnostic)) + return 'This rule has too many conditions. Select fewer tokens or allowed functions.'; + if (/selector|function signature/i.test(diagnostic)) + return 'The selected function format is invalid. Select the function again or check its signature.'; + if (/dynamic|static|offset|argument.*range|tuple/i.test(diagnostic)) + return 'This function input cannot be constrained in that format. Choose a supported input or function.'; + if (/uint256|bigint|non-negative/i.test(diagnostic)) + return 'One of the spending limits is invalid. Review the amounts and try again.'; + if (/chainNamespace|unsupported.*chain/i.test(diagnostic)) + return 'Choose a supported network for this rule.'; + if (/address/i.test(diagnostic)) + return 'Enter a valid wallet, token or app address for this rule.'; + return MESSAGES.INVALID_RULE; +} + +export function agenticRevertUserMessage(name?: string): string { + if (!name) + return 'The transaction could not be completed. Check wallet activity before trying again.'; + if (/TooManyAllowedCallPins/.test(name)) + return 'This rule has more than 32 conditions. Select fewer tokens or allowed functions.'; + if (/TooMany.*Pins|PinRuleOutOfRange/.test(name)) + return 'This function has too many conditions. Choose a simpler rule configuration.'; + if (/TooManyActions|TooManyInitialRules|BatchSizeOutOfRange/.test(name)) + return 'Too many rules or functions are selected. Reduce the selection and try again.'; + if (/LabelTooLong/.test(name)) + return 'The wallet name is too long. Shorten it and try again.'; + if (/DuplicateAction|DuplicateAsset|DuplicateSvmPin/.test(name)) + return 'This rule contains duplicate functions, tokens or conditions. Remove the duplicate selection.'; + if ( + /SpentMismatch|SpentLengthMismatch|AssetSpentMismatch|IndexMismatch|InvalidNonce|IntentGrantNonceMismatch|IntentWalletMismatch/.test( + name + ) + ) + return 'The wallet changed while this action was being prepared. Refresh its state before trying again.'; + if (/EnforcedPause/.test(name)) + return 'This operation is temporarily paused. Try again later.'; + if (/OwnerSigExpired|SignatureExpired/.test(name)) + return 'The wallet approval has expired. Review and sign a new request.'; + if (/OutsideTimeWindow/.test(name)) + return 'This request is outside its valid time window. Refresh and approve a new request.'; + if (/InvalidExpiry/.test(name)) + return 'Choose a valid future expiry for this rule.'; + if (/Allowance|Approval/.test(name)) + return 'The token spending approval is missing or too small. Review the token approvals.'; + if ( + /RuleWithoutPin|CeaAccountsMissExpectedCEA|CeaAccountAtUnpinnedIndex/.test( + name + ) + ) + return 'The rule is missing a required wallet-recipient restriction. Review its recipient settings.'; + if (/Unsupported|WrongVmForCall|WrongModeForCall/.test(name)) + return 'This action is not supported on the selected network or wallet version.'; + if ( + /InvalidOwnerSignature|InvalidEnableSignature|InvalidSessionKeySignature|SignerNotFound/.test( + name + ) + ) + return 'The signature could not be verified. Reconnect the authorized wallet and try again.'; + if (/PCValueExceedsCap|Gas.*Cap/.test(name ?? '')) + return 'The required gas exceeds this rule’s gas budget. Review the budget before trying again.'; + if ( + /ArgPinAboveMax|AmountExceedsCap|TotalSpendCapExceeded|Value.*Cap|InnerValueExceedsAllowance|MaxCalls|CallLimitReached|TotalNativeAmountExceeded|TotalValueExceeded/.test( + name ?? '' + ) + ) + return 'This action exceeds a rule’s spending or usage limit. Reduce the amount or ask the owner to update the rule.'; + if (/Expired|Expiry/.test(name ?? '')) + return 'This rule has expired. Ask the owner to renew it.'; + if ( + /ArgPinMismatch|Beneficiary|NotAllowed|NotEnabled|Permission|RuleNot|RulesNot|RecipientTargetMismatch|TargetMismatch|SelectorMismatch|SvmAccountPinMismatch|SvmDataPinMismatch/.test( + name ?? '' + ) + ) + return 'This action does not match the wallet’s permissions. Check the token, recipient and allowed function.'; + if (/CallerIsNotOwner|UnauthorizedOwner|OwnerLaneRequired/.test(name ?? '')) + return 'Connect the owner wallet to make this change.'; + if (/CallerIsNotAgent/.test(name ?? '')) + return 'Connect the agent authorized by this rule.'; + if (/Insufficient|Balance/.test(name ?? '')) + return 'There are not enough funds for this action. Check the wallet balance and fees.'; + return 'The wallet contract rejected this transaction. Review the permissions and transaction details before trying again.'; +} diff --git a/packages/core/src/lib/agentic/errors.ts b/packages/core/src/lib/agentic/errors.ts new file mode 100644 index 00000000..41f66c0b --- /dev/null +++ b/packages/core/src/lib/agentic/errors.ts @@ -0,0 +1,205 @@ +import { + PushChainExecutionError, + type DecodedErrorPayload, +} from '../orchestrator/internals/errors'; +import { agenticUserMessage, agenticRevertUserMessage } from './error-messages'; + +/** + * Stable AGW error codes. The first groups are specified by the AGW SDK page + * (section 3.f); the remainder are SDK-owned codes that keep unsupported or + * unverified capabilities from being mistaken for success. + */ +export const AGENTIC_ERROR_CODE = { + // create / rule validation (spec 3.f) + DUPLICATE_RULE: 'DUPLICATE_RULE', + AGENT_IS_OWNER: 'AGENT_IS_OWNER', + AMBIGUOUS_RULE: 'AMBIGUOUS_RULE', + TARGET_NOT_ON_RULE_CHAIN: 'TARGET_NOT_ON_RULE_CHAIN', + ASSET_CHAIN_MISMATCH: 'ASSET_CHAIN_MISMATCH', + TOKEN_ROUTE_UNAVAILABLE: 'TOKEN_ROUTE_UNAVAILABLE', + REQUEST_REJECTED: 'REQUEST_REJECTED', + // initialize with agenticWallet (spec 3.f) + NOT_OWNER_OR_AGENT: 'NOT_OWNER_OR_AGENT', + WALLET_NOT_DEPLOYED: 'WALLET_NOT_DEPLOYED', + NOT_AGENTIC_WALLET: 'NOT_AGENTIC_WALLET', + // rules.delete (spec 3.f) + DELETE_NEEDS_TARGET: 'DELETE_NEEDS_TARGET', + // sendTransaction (spec 3.f) + NO_RULES_FOR_CHAIN: 'NO_RULES_FOR_CHAIN', + FROM_NOT_ALLOWED: 'FROM_NOT_ALLOWED', + NOT_ALLOWED_IN_AGENTIC_MODE: 'NOT_ALLOWED_IN_AGENTIC_MODE', + // SDK-owned + INVALID_RULE: 'INVALID_RULE', + CAPABILITY_UNAVAILABLE: 'CAPABILITY_UNAVAILABLE', + READ_ONLY: 'READ_ONLY', + NOT_WALLET_OWNER: 'NOT_WALLET_OWNER', + RULE_NOT_FOUND: 'RULE_NOT_FOUND', + RULE_READ_FAILED: 'RULE_READ_FAILED', + INCONSISTENT_READ: 'INCONSISTENT_READ', + INDEX_RACE: 'INDEX_RACE', + RECEIPT_MISMATCH: 'RECEIPT_MISMATCH', + RECEIPT_UNAVAILABLE: 'RECEIPT_UNAVAILABLE', + AGENT_GAS_INSUFFICIENT: 'AGENT_GAS_INSUFFICIENT', + WALLET_BALANCE_INSUFFICIENT: 'WALLET_BALANCE_INSUFFICIENT', +} as const; + +export type AgenticErrorCode = + (typeof AGENTIC_ERROR_CODE)[keyof typeof AGENTIC_ERROR_CODE]; + +/** + * Pre-signature AGW failure: invalid input, unsupported capability, failed + * eligibility or a read that cannot be trusted. Nothing was signed or sent + * except receipt errors, which retain the submitted transaction hash. + */ +export class AgenticError< + Code extends string = AgenticErrorCode +> extends Error { + readonly code: Code; + /** Safe end-user copy; message/cause retain technical diagnostics. */ + readonly userMessage: string; + readonly hint?: string; + readonly details?: Readonly>; + override readonly cause?: unknown; + + constructor( + code: Code, + message: string, + opts: { + hint?: string; + details?: Record; + cause?: unknown; + userMessage?: string; + } = {} + ) { + super(message); + this.name = 'AgenticError'; + this.code = code; + this.userMessage = + opts.userMessage ?? + (Object.prototype.hasOwnProperty.call(AGENTIC_ERROR_CODE, code) + ? agenticUserMessage(code as AgenticErrorCode, message, opts.details) + : message); + this.hint = opts.hint; + this.details = opts.details; + this.cause = opts.cause; + } +} + +/** + * On-chain AGW, URP, factory or engine revert surfaced from an agentic send. + * Extends core's structured execution error so `instanceof + * PushChainExecutionError` keeps working, and keeps the underlying cause plus + * any batch recovery hashes. + */ +export class AgenticRevertError extends PushChainExecutionError { + readonly agenticCode?: string; + readonly userMessage: string; + + constructor( + message: string, + opts: { + decodedError?: DecodedErrorPayload; + gatewayTxHash?: string; + agenticCode?: string; + cause?: unknown; + } = {} + ) { + super(message, { + decodedError: opts.decodedError, + gatewayTxHash: opts.gatewayTxHash, + cause: opts.cause, + }); + this.name = 'AgenticRevertError'; + this.agenticCode = opts.agenticCode; + this.userMessage = agenticRevertUserMessage( + opts.decodedError?.name ?? opts.agenticCode + ); + } +} + +export function ruleConstraintLimit( + actual: number, + callCount: number, + chainNamespace?: string +): AgenticError { + const message = `This rule has ${actual} conditions. The maximum is 32. Remove duplicate functions or select fewer tokens or functions.`; + return new AgenticError(AGENTIC_ERROR_CODE.INVALID_RULE, message, { + userMessage: message, + hint: 'Regenerate the preset after changing selections. Do not drop individual conditions or bypass the contract limit.', + details: { + reason: 'RULE_CONSTRAINT_LIMIT', + field: 'allowedCalls', + actual, + limit: 32, + callCount, + chainNamespace, + }, + }); +} + +export function ruleErrorContext( + error: unknown, + ruleIndex: number, + chainNamespace?: string +): unknown { + if (!(error instanceof AgenticError)) return error; + if (error.details?.['ruleIndex'] !== undefined) return error; + return new AgenticError(error.code, error.message, { + hint: error.hint, + userMessage: `Rule ${ruleIndex + 1}: ${error.userMessage}`, + cause: error.cause ?? error, + details: { + ...error.details, + ruleIndex, + ...(chainNamespace ? { chainNamespace } : {}), + }, + }); +} + +export function tokenRouteUnavailable( + cause: unknown, + token: string, + chainNamespace: string, + assetIndex: number +): AgenticError { + if (cause instanceof AgenticError) return cause; + const names: Record = { + 'eip155:1': 'Ethereum', + 'eip155:11155111': 'Ethereum Sepolia', + 'eip155:8453': 'Base', + 'eip155:84532': 'Base Sepolia', + 'eip155:42161': 'Arbitrum', + 'eip155:421614': 'Arbitrum Sepolia', + 'eip155:56': 'BNB Chain', + 'eip155:97': 'BNB Testnet', + }; + const network = + names[chainNamespace] ?? + (chainNamespace.startsWith('solana:') + ? 'the selected Solana network' + : 'the selected network'); + const message = `This token cannot be sent from Push to ${network}. Choose a token with a supported Push route.`; + return new AgenticError(AGENTIC_ERROR_CODE.TOKEN_ROUTE_UNAVAILABLE, message, { + userMessage: message, + hint: 'Choose a supported token on this network, or wait for a verified PRC20 route for this exact token address. The selected app must also support that exact token address; matching symbols are not sufficient.', + details: { + token, + chainNamespace, + assetIndex, + field: `assets[${assetIndex}].token`, + }, + cause, + }); +} + +export function capabilityUnavailable( + capability: string, + dependency: string, + hint?: string +): AgenticError { + return new AgenticError( + AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE, + `AGW capability "${capability}" is not available: ${dependency}`, + { hint, details: { capability, dependency } } + ); +} diff --git a/packages/core/src/lib/agentic/execution/gas-budget.ts b/packages/core/src/lib/agentic/execution/gas-budget.ts new file mode 100644 index 00000000..26b14e6c --- /dev/null +++ b/packages/core/src/lib/agentic/execution/gas-budget.ts @@ -0,0 +1,69 @@ +import { UNIVERSAL_CORE_EVM } from '../../constants/abi/prc20.evm'; +import type { OrchestratorContext } from '../../orchestrator/internals/context'; +import { CORE_ADDRESS } from '../contracts/prc20-metadata'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; + +/** Headroom over the pool quote; the gateway refunds whatever the swap leaves. */ +const POOL_HEADROOM_NUM = BigInt(12); +const POOL_HEADROOM_DEN = BigInt(10); + +/** + * PC gas budget (maxPCForGas) for an AGW outbound, excluding protocolFee. + * The gateway buys exactly `gasFee` of the gas token from the Donut WPC pool + * and reverts when the budget cannot. The shared USD sizer can attach less: + * its over-$10 overflow has no funds leg on this path, and its USD price can + * differ from the pool. Keep the larger of the sized budget and the pool cost. + */ +export function agwGasBudget( + quote: { + protocolFee: bigint; + nativeValueForGas: bigint; + sizing?: { category: string; overflowNativePc: bigint }; + }, + poolPcIn?: bigint +): bigint { + const sized = + (quote.nativeValueForGas > quote.protocolFee + ? quote.nativeValueForGas - quote.protocolFee + : BigInt(0)) + + (quote.sizing?.category === 'C' + ? quote.sizing.overflowNativePc + : BigInt(0)); + const pool = + poolPcIn === undefined + ? BigInt(0) + : (poolPcIn * POOL_HEADROOM_NUM + POOL_HEADROOM_DEN - BigInt(1)) / + POOL_HEADROOM_DEN; + return sized > pool ? sized : pool; +} + +/** Refuses an explicit gasLimit below the chain base before quoting, where core + * would otherwise revert. Omitted or zero gas uses the base. */ +export async function assertGasLimitAtLeastBase( + ctx: OrchestratorContext, + chain: string, + gasLimit: bigint +): Promise { + if (gasLimit <= BigInt(0)) return; + let base: bigint; + try { + base = await ctx.pushClient.readContract({ + address: CORE_ADDRESS, + abi: UNIVERSAL_CORE_EVM, + functionName: 'baseGasLimitByChainNamespace', + args: [chain], + }); + } catch { + return; // The quote itself reports any real failure. + } + if (gasLimit < base) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `gasLimit ${gasLimit} is below the ${chain} minimum of ${base}; omit it or pass 0 to use the network default`, + { + userMessage: + 'The gas limit is below this network’s minimum. Leave it empty to use the network default.', + details: { field: 'gasLimit', minimum: base }, + } + ); +} diff --git a/packages/core/src/lib/agentic/execution/guards.ts b/packages/core/src/lib/agentic/execution/guards.ts new file mode 100644 index 00000000..2aa5f68e --- /dev/null +++ b/packages/core/src/lib/agentic/execution/guards.ts @@ -0,0 +1,46 @@ +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; + +/** Methods the spec forbids on an agentic client (spec 2.a). */ +export type ForbiddenAgenticMethod = + | 'prepareTransaction' + | 'executeTransactions' + | 'migrateCEA' + | 'rescueFunds' + | 'payGasWith'; + +export function notAllowedInAgenticMode(method: ForbiddenAgenticMethod | string): AgenticError { + return new AgenticError( + AGENTIC_ERROR_CODE.NOT_ALLOWED_IN_AGENTIC_MODE, + `${method} is not available on a client initialized with agenticWallet`, + { + hint: + method === 'prepareTransaction' || method === 'executeTransactions' + ? 'Use sendTransaction; cascades would run from the signer, not the wallet.' + : 'Use a client initialized without agenticWallet for signer-level operations.', + } + ); +} + +/** + * Reject inputs that would execute from somewhere other than the wallet, or + * that agentic mode does not support, before any signature or RPC call. + */ +export function guardAgenticSendParams(params: unknown): void { + if (!params || typeof params !== 'object') { + throw new AgenticError(AGENTIC_ERROR_CODE.INVALID_RULE, 'sendTransaction needs a transaction object'); + } + const p = params as { + from?: unknown; + payGasWith?: unknown; + migration?: unknown; + }; + if (p.from !== undefined && p.from !== null) { + throw new AgenticError( + AGENTIC_ERROR_CODE.FROM_NOT_ALLOWED, + '`from` (Routes 3 and 4) is not allowed in agenticWallet mode', + { hint: 'A CEA-originated call makes msg.sender a CEA, so the wallet door check would fail.' } + ); + } + if (p.payGasWith !== undefined) throw notAllowedInAgenticMode('payGasWith'); + if (p.migration) throw notAllowedInAgenticMode('migrateCEA'); +} diff --git a/packages/core/src/lib/agentic/execution/outbound.ts b/packages/core/src/lib/agentic/execution/outbound.ts new file mode 100644 index 00000000..63b5beb0 --- /dev/null +++ b/packages/core/src/lib/agentic/execution/outbound.ts @@ -0,0 +1,279 @@ +import { + concat, + encodeAbiParameters, + encodeFunctionData, + getAddress, + type Address, + type Hex, +} from 'viem'; +import { CHAIN, VM } from '../../constants/enums'; +import { CHAIN_INFO } from '../../constants/chain'; +import type { MoveableToken } from '../../constants/tokens'; +import { ERC20_EVM, UNIVERSAL_GATEWAY_PC } from '../../constants/abi'; +import type { + UniversalExecuteParams, + UniversalOutboundTxRequest, +} from '../../orchestrator/orchestrator.types'; +import { isPC20Reference } from '../../orchestrator/orchestrator.types'; +import { resolveR2DestinationFundsToken } from '../../orchestrator/internals/route-handlers'; +import { AgenticCapability, requireCapability } from '../capabilities'; +import type { AgenticGeneration } from '../deployments'; +import type { Call } from '../contracts/v6'; +import { UEA_MULTICALL_PREFIX } from '../contracts/v6'; +import { + AGENTIC_ERROR_CODE, + AgenticError, + capabilityUnavailable, +} from '../errors'; +import type { AgenticRuntime } from '../runtime'; + +/** Includes first-use CEA deployment; explicit caller gas always takes precedence. */ +const FIRST_USE_EVM_GAS_LIMIT = BigInt(2_000_000); + +/** Token exports and multi-call payloads can exceed the 500k network base: a + * Sepolia Circle USDC export with approve + Uniswap swap ran out of gas on it. */ +const MULTI_STEP_EVM_GAS_LIMIT = BigInt(1_000_000); + +/** URP MAX_ACTIONS_PER_REQUEST at v6. */ +export const MAX_DESTINATION_CALLS = 10; + +const MULTICALL_TUPLE = [ + { + type: 'tuple[]', + components: [ + { name: 'to', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'data', type: 'bytes' }, + ], + }, +] as const; + +export interface DestinationCall { + to: Address; + value: bigint; + data: Hex; +} + +export interface ComposedOutbound { + chain: CHAIN; + destinationAccount: Address; + destinationAccountDeployed: boolean; + token: Address; + amount: bigint; + /** PC the wallet attaches: protocolFee + maxPCForGas. */ + value: bigint; + request: UniversalOutboundTxRequest; + /** The wallet's call into the gateway. */ + gatewayCall: Call; + destinationCalls: DestinationCall[]; +} + +/** + * The calls the wallet's destination account (CEA) executes, built exactly as + * core's Route 2 builds them for an ordinary account (buildR2CeaPayloadEvm): + * - explicit call arrays are used as given (the caller handles transfers); + * - with ERC-20 funds, a transfer(target, amount) is prepended to a single + * call, or is the whole payload for a transfer-only send; + * - native value (and native funds) goes to the target with the call, or as + * a value-only call; a value transfer to the CEA itself is skipped. + * Every encoded call names the requested target, so a response never reports + * a delivery the request does not instruct. + */ +export function destinationCalls( + params: UniversalExecuteParams, + ctx: { cea: Address; fundsToken?: MoveableToken } +): DestinationCall[] { + const target = getAddress((params.to as { address: string }).address); + if (Array.isArray(params.data)) { + return params.data.map((c) => ({ + to: getAddress(c.to), + value: c.value ?? BigInt(0), + data: c.data, + })); + } + const amount = params.funds?.amount ?? BigInt(0); + const token = ctx.fundsToken; + const erc20 = amount > BigInt(0) && token && token.mechanism !== 'native'; + const nativeFunds = + amount > BigInt(0) && token?.mechanism === 'native' ? amount : BigInt(0); + const value = params.value ?? BigInt(0); + const calls: DestinationCall[] = []; + if (erc20) { + calls.push({ + to: getAddress((token as MoveableToken).address), + value: BigInt(0), + data: encodeFunctionData({ + abi: ERC20_EVM, + functionName: 'transfer', + args: [target, amount], + }), + }); + } + const data = params.data && params.data !== '0x' ? params.data : undefined; + if (data) { + calls.push({ to: target, value: value + nativeFunds, data }); + } else { + const forward = value > BigInt(0) ? value : nativeFunds; + if (forward > BigInt(0) && target !== ctx.cea) { + calls.push({ to: target, value: forward, data: '0x' }); + } + } + return calls; +} + +/** + * Compose the AGW-originated EVM outbound (Route 2 shape, wallet context): + * - recipient = empty bytes, revertRecipient = the AGW, maxPCForGas > 0 + * - payload = UEA_MULTICALL ‖ abi.encode(Multicall[1..10]) executed by the AGW's CEA + * - value = protocolFee + maxPCForGas, paid from the AGW's PC + * The destination account is resolved from the AGW, never from the signer. + * The SDK does not add approval calls: the v6 wallet approves and clears + * the gateway allowance within its own outbound execution. + */ +export async function composeOutbound( + runtime: AgenticRuntime, + gen: AgenticGeneration, + wallet: Address, + params: UniversalExecuteParams, + opts: { ruleAssets?: readonly Address[]; door: 'owner' | 'agent' } +): Promise { + requireCapability(gen.capabilities, AgenticCapability.UNIVERSAL_EVM_OUTBOUND); + const target = params.to as { address: string; chain: CHAIN }; + const chain = target.chain; + const info = CHAIN_INFO[chain]; + if (!info) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `unknown destination chain ${String(chain)}` + ); + } + if (info.vm !== VM.EVM) { + throw capabilityUnavailable( + AgenticCapability.UNIVERSAL_SVM_RULES, + 'This composer accepts EVM destinations; use the Solana instruction route' + ); + } + const funds = params.funds; + if (funds && isPC20Reference(funds.token)) { + throw capabilityUnavailable( + 'pc20Outbound', + 'PC20 tokens are not supported through an agentic wallet' + ); + } + // An omitted funds.token means the destination chain's native token, as in Route 2. + const fundsToken: MoveableToken | undefined = funds?.amount + ? funds.token + ? resolveR2DestinationFundsToken( + funds.token as MoveableToken, + chain, + runtime.network + ) + : { + symbol: 'native', + decimals: 18, + address: '0x0000000000000000000000000000000000000000', + mechanism: 'native', + } + : undefined; + + // Burn token and amount, as Route 2 sizes them for an ordinary account. + let token: Address; + let amount = BigInt(0); + if (funds) { + token = runtime.resolvePrc20( + funds.token as MoveableToken | undefined, + chain + ); + amount = funds.amount; + } else if ((params.value ?? BigInt(0)) > BigInt(0)) { + token = runtime.resolvePrc20(undefined, chain); + amount = params.value as bigint; + } else if (opts.ruleAssets?.length) { + token = getAddress(opts.ruleAssets[0]); + } else { + token = runtime.resolvePrc20(undefined, chain); + } + const resolved = await runtime.resolveCEA(wallet, chain); + const cea = getAddress(resolved.cea); + const calls = destinationCalls(params, { cea, fundsToken }); + if (calls.length === 0) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'this outbound carries no destination call; parking funds in the wallet’s destination account is not supported', + { + hint: 'Name a recipient other than the wallet’s own destination account, or add calldata.', + } + ); + } + if (calls.length > MAX_DESTINATION_CALLS) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `at most ${MAX_DESTINATION_CALLS} destination calls per outbound` + ); + } + if (opts.door === 'agent') { + const bare = calls.findIndex((c) => (c.data.length - 2) / 2 < 4); + if (bare >= 0) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `destination call ${bare} has no function selector; the rules policy only admits allow-listed calls`, + { + hint: 'A value-only destination transfer is not representable in an agent rule.', + } + ); + } + } + + const multiStep = + calls.length > 1 || + (amount > BigInt(0) && + getAddress(token) !== getAddress(runtime.resolvePrc20(undefined, chain))); + const quote = await runtime.quoteOutbound( + token, + params.gasLimit ?? + (!resolved.isDeployed + ? FIRST_USE_EVM_GAS_LIMIT + : multiStep + ? MULTI_STEP_EVM_GAS_LIMIT + : BigInt(0)), + chain + ); + if (quote.nativeValueForGas <= BigInt(0)) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'outbound gas quote returned zero; URP rejects an uncapped gas swap' + ); + } + const maxPCForGas = quote.nativeValueForGas; + const value = quote.protocolFee + maxPCForGas; + const payload = concat([ + UEA_MULTICALL_PREFIX, + encodeAbiParameters(MULTICALL_TUPLE, [calls]), + ]); + const request: UniversalOutboundTxRequest = { + recipient: '0x', + token, + amount, + gasLimit: quote.gasLimitUsed, + gasPrice: BigInt(0), + maxPCForGas, + payload, + revertRecipient: wallet, + }; + const data = encodeFunctionData({ + abi: UNIVERSAL_GATEWAY_PC, + functionName: 'sendUniversalTxOutbound', + args: [request], + }); + return { + chain, + destinationAccount: cea, + destinationAccountDeployed: resolved.isDeployed, + token, + amount, + value, + request, + gatewayCall: { target: gen.addresses.gateway, value, data }, + destinationCalls: calls, + }; +} diff --git a/packages/core/src/lib/agentic/execution/send.ts b/packages/core/src/lib/agentic/execution/send.ts new file mode 100644 index 00000000..ca2b978f --- /dev/null +++ b/packages/core/src/lib/agentic/execution/send.ts @@ -0,0 +1,384 @@ +import { sendPublicSvm } from './svm-public'; +import { getAddress, type Address, type Hex } from 'viem'; +import type { CHAIN } from '../../constants/enums'; +import { ERC20_EVM } from '../../constants/abi'; +import { PROGRESS_HOOK } from '../../progress-hook/progress-hook.types'; +import type { + ExecuteParams, + MultiCall, + TransactionExecutionOptions, + UniversalExecuteParams, + UniversalTxResponse, +} from '../../orchestrator/orchestrator.types'; +import { isChainTarget } from '../../orchestrator/route-detector'; +import { + getPushChainForNetwork, + isPushChain, +} from '../../orchestrator/internals/helpers'; +import { AgenticCapability, requireCapability } from '../capabilities'; +import type { AgenticExecutionContext } from '../context'; +import type { Call, UniversalConfigRead } from '../contracts/v6'; +import { SEND_OUTBOUND_SELECTOR } from '../contracts/v6'; +import { actionId, configId } from '../codec/ids'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import { + assertCanSign, + emitAgentic, + wrapSendError, +} from '../management/common'; +import { selectRuleForSend } from '../reads/rules'; +import { Snapshot } from '../reads/snapshot'; +import { adaptAgenticResponse, outboundResponseCall } from '../response'; +import type { AgenticRuntime } from '../runtime'; +import type { AgenticHex, AgenticProgressHook } from '../agentic.types'; +import { guardAgenticSendParams } from './guards'; +import { composeOutbound, type DestinationCall } from './outbound'; + +const MODE_UNIVERSAL = 0; +const VM_EVM = 0; +/** R1's own required-funds estimate when no gasLimit is given (execute-standard). */ +const DEFAULT_GAS_ESTIMATE = BigInt(1e7); + +/** Signer-level fields that legitimately carry over to the wrapped Push tx. */ +function signerFields(p: UniversalExecuteParams): Partial { + const out: Partial = {}; + if (p.gasLimit !== undefined && !isChainTarget(p.to)) + out.gasLimit = p.gasLimit; + if (p.maxFeePerGas !== undefined) out.maxFeePerGas = p.maxFeePerGas; + if (p.maxPriorityFeePerGas !== undefined) + out.maxPriorityFeePerGas = p.maxPriorityFeePerGas; + if (p.nonce !== undefined) out.nonce = p.nonce; + if (p.deadline !== undefined) out.deadline = p.deadline; + if (p.feeLockTxHash !== undefined) out.feeLockTxHash = p.feeLockTxHash; + return out; +} + +/** + * Spec 2.a gas rule: in agenticWallet mode an external signer's UEA must + * already hold the PC for its Push gas, except for the very first action + * while that UEA is undeployed (which takes the one-time origin fee lock). + * Mirrors R1's fee-lock condition so an underfunded UEA fails loudly here + * instead of silently locking origin funds on every action. + */ +async function enforceSignerGas( + runtime: AgenticRuntime, + gasLimit: bigint | undefined +): Promise { + if (runtime.signerIsPushNative()) return; + if (!(await runtime.signerAccountDeployed())) return; + const [gasPrice, balance] = await Promise.all([ + runtime.getGasPrice(), + runtime.signerBalance(), + ]); + const required = (gasLimit ?? DEFAULT_GAS_ESTIMATE) * gasPrice; + if (balance < required) { + throw new AgenticError( + AGENTIC_ERROR_CODE.AGENT_GAS_INSUFFICIENT, + `the signer's UEA ${runtime.signerPushAccount()} holds ${balance} PC wei but needs ~${required} for Push gas`, + { + hint: "The wallet's PC pays outbound fees, not the signer's gas. Top up the signer's UEA (PushChain.utils.account.deriveExecutorAccount) from a client without agenticWallet.", + details: { required, balance }, + } + ); + } +} + +/** + * A ChainTarget naming the connected Push chain is a native send, exactly like + * a bare address (core's route detector treats it the same way). A ChainTarget + * naming a different Push network is refused rather than routed outbound. + */ +function normalizePushDestination( + p: UniversalExecuteParams, + runtime: AgenticRuntime +): UniversalExecuteParams { + if (!isChainTarget(p.to)) return p; + const chain = p.to.chain; + if (chain === getPushChainForNetwork(runtime.network)) { + return { ...p, to: getAddress(p.to.address) }; + } + if (isPushChain(chain)) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `destination ${chain} is a Push chain other than the connected network (${runtime.network})` + ); + } + return p; +} + +function toCalls(params: UniversalExecuteParams): Call[] { + if (Array.isArray(params.data)) { + return params.data.map((c) => ({ + target: getAddress(c.to), + value: c.value ?? BigInt(0), + data: c.data, + })); + } + return [ + { + target: getAddress(params.to as Address), + value: params.value ?? BigInt(0), + data: (params.data ?? '0x') as Hex, + }, + ]; +} + +/** + * sendTransaction in agenticWallet mode. Owner door → execute; agent door → + * executeAsAgent under the one enabled rule for (signer, destination), looked + * up on every send. Everything is validated before the signer is asked. + */ +export async function agenticSend( + runtime: AgenticRuntime, + actx: AgenticExecutionContext, + params: UniversalExecuteParams | ExecuteParams, + options?: TransactionExecutionOptions +): Promise { + assertCanSign(runtime, 'sendTransaction'); + guardAgenticSendParams(params); + const p = normalizePushDestination(params as UniversalExecuteParams, runtime); + const hook: AgenticProgressHook | undefined = + options?.progressHook ?? p.progressHook; + const gen = actx.generation; + const wallet = actx.wallet; + const outbound = isChainTarget(p.to); + const destination = outbound + ? (p.to as { chain: string }).chain + : runtime.pushChainNamespace; + + if (!outbound && p.funds) { + throw new AgenticError( + AGENTIC_ERROR_CODE.NOT_ALLOWED_IN_AGENTIC_MODE, + "`funds` on a Push-chain send would bridge from the signer; it does not move the wallet's tokens", + { + hint: "Transfer the wallet's PRC20 with a token transfer call in `data`.", + } + ); + } + + if (outbound && destination.startsWith('solana:')) { + await enforceSignerGas(runtime, undefined); + return sendPublicSvm(runtime, actx, p, options); + } + + let wrappedData: Hex; + let agentBatch: MultiCall[] | undefined; + let nativeCalls: Call[] | undefined; + let rulesId: AgenticHex | undefined; + let logical: { to: string; data: string; value: bigint }; + let meta: { route?: 'UOA_TO_CEA'; destinationAccount?: Address } = {}; + let outboundChain: CHAIN | undefined; + let destinationCalls: DestinationCall[] | undefined; + + if (actx.door === 'agent') { + requireCapability(gen.capabilities, AgenticCapability.AGENT_EXECUTE); + } else { + requireCapability(gen.capabilities, AgenticCapability.OWNER_EXECUTE); + } + + if (!outbound) { + const calls = toCalls(p); + if (calls.length === 0) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'an empty call array cannot execute' + ); + if (actx.door === 'owner') { + wrappedData = gen.contracts.encodeExecute(calls); + } else { + const snap = await Snapshot.at(runtime.reader); + const rule = await selectRuleForSend( + snap, + gen, + wallet, + actx.signerPushAccount, + destination + ); + rulesId = rule.rulesId as AgenticHex; + wrappedData = gen.contracts.encodeExecuteAsAgent(rule.rulesId, calls[0]); + if (calls.length > 1) { + agentBatch = calls.map((call) => ({ + to: wallet, + value: BigInt(0), + data: gen.contracts.encodeExecuteAsAgent(rule.rulesId, call), + })); + nativeCalls = calls; + } + } + logical = + calls.length === 1 + ? { to: calls[0].target, data: calls[0].data, value: calls[0].value } + : agentBatch + ? { to: calls[0].target, data: calls[0].data, value: calls[0].value } + : { to: wallet, data: wrappedData, value: BigInt(0) }; + } else { + let ruleAssets: readonly Address[] | undefined; + let expectedCEA: Address | undefined; + const snap = await Snapshot.at(runtime.reader); + if (actx.door === 'agent') { + const rule = await selectRuleForSend( + snap, + gen, + wallet, + actx.signerPushAccount, + destination + ); + if (rule.mode !== MODE_UNIVERSAL || rule.vm !== VM_EVM) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `rule ${rule.rulesId} is not an EVM universal rule` + ); + } + rulesId = rule.rulesId as AgenticHex; + const cfg = await snap.read( + gen.addresses.rulesPolicy, + gen.contracts.abis.policy, + 'getConfig', + [ + configId( + wallet, + rule.rulesId, + actionId(gen.addresses.gateway, SEND_OUTBOUND_SELECTOR) + ), + wallet, + ] + ); + ruleAssets = cfg.assets.map((a) => getAddress(a.token)); + expectedCEA = getAddress(cfg.expectedCEA); + } + const out = await composeOutbound(runtime, gen, wallet, p, { + ruleAssets, + door: actx.door, + }); + outboundChain = out.chain; + meta = { route: 'UOA_TO_CEA', destinationAccount: out.destinationAccount }; + const [walletPc, tokenBalance] = await Promise.all([ + runtime.reader.getBalance({ + address: wallet, + blockNumber: snap.blockNumber, + }), + out.amount > BigInt(0) + ? snap.read( + out.token, + ERC20_EVM as unknown as readonly unknown[], + 'balanceOf', + [wallet] + ) + : Promise.resolve(BigInt(0)), + ]); + if (walletPc < out.value) { + throw new AgenticError( + AGENTIC_ERROR_CODE.WALLET_BALANCE_INSUFFICIENT, + `wallet ${wallet} holds ${walletPc} PC wei; this outbound needs ${out.value} (protocol fee + gas cap)`, + { hint: "Fund the wallet's PC with an ordinary send to its address." } + ); + } + if (tokenBalance < out.amount) { + throw new AgenticError( + AGENTIC_ERROR_CODE.WALLET_BALANCE_INSUFFICIENT, + `wallet ${wallet} holds ${tokenBalance} of ${out.token}; this outbound burns ${out.amount}` + ); + } + if (actx.door === 'agent') { + if (expectedCEA && expectedCEA !== out.destinationAccount) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INCONSISTENT_READ, + `rule ${rulesId} committed destination account ${expectedCEA}, but the wallet's account on ${out.chain} now derives to ${out.destinationAccount}`, + { + hint: 'Destination-account derivation drift (obligation 13). The owner must regrant the rule.', + } + ); + } + wrappedData = gen.contracts.encodeExecuteAsAgent( + rulesId as Hex, + out.gatewayCall + ); + } else { + wrappedData = gen.contracts.encodeExecute([out.gatewayCall]); + } + destinationCalls = out.destinationCalls; + logical = outboundResponseCall(destinationCalls, { + to: out.gatewayCall.target, + data: out.gatewayCall.data, + value: out.gatewayCall.value, + }); + } + + await enforceSignerGas(runtime, signerFields(p).gasLimit); + emitAgentic( + runtime, + hook, + PROGRESS_HOOK.AGENTIC_TX_107, + rulesId, + outboundChain ?? destination, + actx.door + ); + + let resp: UniversalTxResponse; + try { + const sendOptions = hook ? { ...options, progressHook: hook } : options; + resp = agentBatch + ? await runtime.executeAtomicBatch( + { + ...signerFields(p), + to: wallet, + value: BigInt(0), + data: agentBatch, + }, + sendOptions + ) + : await runtime.execute( + { + ...signerFields(p), + to: wallet, + value: BigInt(0), + data: wrappedData, + }, + sendOptions + ); + } catch (err) { + const wrapped = wrapSendError(err) as { + code?: string; + message?: string; + decodedError?: unknown; + }; + emitAgentic( + runtime, + hook, + PROGRESS_HOOK.AGENTIC_TX_199_02, + 'sendTransaction', + wrapped?.code ?? 'UNKNOWN', + wrapped?.message ?? String(err), + wrapped?.decodedError + ); + throw wrapped; + } + adaptAgenticResponse(resp, { + wallet, + door: actx.door, + rulesId, + chainNamespace: outboundChain ?? destination, + destinationAccount: meta.destinationAccount as AgenticHex | undefined, + destinationCalls, + ...(nativeCalls + ? { + nativeCalls: nativeCalls.map((c) => ({ + to: c.target, + data: c.data, + value: c.value, + })), + } + : {}), + logical, + route: meta.route, + chain: outboundChain, + }); + emitAgentic( + runtime, + hook, + PROGRESS_HOOK.AGENTIC_TX_199_01, + 'sendTransaction', + resp.hash + ); + return resp; +} diff --git a/packages/core/src/lib/agentic/execution/svm-instruction.ts b/packages/core/src/lib/agentic/execution/svm-instruction.ts new file mode 100644 index 00000000..3d81bcd5 --- /dev/null +++ b/packages/core/src/lib/agentic/execution/svm-instruction.ts @@ -0,0 +1,67 @@ +import type { CHAIN } from '../../constants/enums'; +import { resolveSvmCallForCea } from '../../orchestrator/svm-idl/resolve'; +import type { SvmTermsWire } from '../codec/svm-terms'; +import { svmKey } from '../codec/svm-accounts'; +import { + encodeAgwSvmPayload, + validateAgwSvmPayload, + type SvmPayloadAccount, +} from './svm-payload'; +import type { Address } from 'viem'; + +/** Resolve IDL accounts with the wallet authority; granted permissions are checked by URP. */ +export function resolveAgwSvmInstruction( + input: { + wallet: Address; + chain: CHAIN; + program: string; + instructionData: Uint8Array; + accounts?: readonly SvmPayloadAccount[]; + }, + terms: SvmTermsWire +) { + const program = svmKey(input.program); + if (input.accounts) { + const payload = encodeAgwSvmPayload( + program, + input.accounts, + input.instructionData + ); + return { + recipient: program, + payload, + accounts: [...input.accounts], + instructionData: input.instructionData, + }; + } + const resolved = resolveSvmCallForCea( + { + programAddress: program, + data: input.instructionData, + senderUea: input.wallet, + targetChain: input.chain, + }, + terms.expectedCEA + ); + const payload = encodeAgwSvmPayload( + resolved.targetProgram, + resolved.accounts, + resolved.ixData + ); + return { + recipient: program, + payload, + accounts: resolved.accounts, + instructionData: resolved.ixData, + }; +} + +/** Diagnostic-only local policy preview. Sends use the resolver and contract enforcement. */ +export function prepareAgwSvmInstruction( + input: Parameters[0], + terms: SvmTermsWire +) { + const resolved = resolveAgwSvmInstruction(input, terms); + validateAgwSvmPayload(terms, resolved.recipient, resolved.payload); + return resolved; +} diff --git a/packages/core/src/lib/agentic/execution/svm-outbound.ts b/packages/core/src/lib/agentic/execution/svm-outbound.ts new file mode 100644 index 00000000..822e8f1a --- /dev/null +++ b/packages/core/src/lib/agentic/execution/svm-outbound.ts @@ -0,0 +1,102 @@ +/** Outbound encoding plus a diagnostic-only policy preview. */ +import { encodeFunctionData, getAddress, type Address, type Hex } from 'viem'; +import { UNIVERSAL_GATEWAY_PC } from '../../constants/abi'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import type { Call, SvmConfigRead } from '../contracts/v6'; +import { UINT256_MAX } from '../codec/defaults'; +import { UINT64_MAX } from '../codec/svm-terms'; +import { validateAgwSvmPayload } from './svm-payload'; + +export interface SvmOutboundInput { + wallet: Address; + gateway: Address; + token: Address; + amount: bigint; + recipient: Hex; + payload: Hex; + gasLimit: bigint; + protocolFee: bigint; + maxPCForGas: bigint; +} +/** Diagnostic-only local preview; production sends use buildAgwSvmAction. */ +export function composeAgwSvmAction( + input: SvmOutboundInput, + config: SvmConfigRead, + nowSeconds: number +): Call { + function fail(name: string): never { + throw new AgenticError(AGENTIC_ERROR_CODE.INVALID_RULE, name, { + details: { contractError: name }, + }); + } + if (!config.initialized) fail('NotInitialized'); + if (nowSeconds > config.validUntil) fail('RulesExpired'); + for (const [name, value] of Object.entries({ + amount: input.amount, + gasLimit: input.gasLimit, + protocolFee: input.protocolFee, + maxPCForGas: input.maxPCForGas, + })) { + if (typeof value !== 'bigint' || value < BigInt(0) || value > UINT256_MAX) + fail(`${name}OutOfRange`); + } + const token = getAddress(input.token), + cap = config.assets.find((a) => getAddress(a.token) === token); + if (!cap) fail('AssetNotAllowed'); + if (input.amount > UINT64_MAX) fail('AmountExceedsU64'); + if (input.amount > cap.maxPerCall) fail('AmountExceedsCap'); + if (cap.spent + input.amount > cap.maxTotal) fail('TotalSpendCapExceeded'); + const value = input.protocolFee + input.maxPCForGas; + if (value > UINT256_MAX || value > config.maxGasPerCall) + fail('PCValueExceedsCap'); + if (!input.maxPCForGas) fail('UncappedGasSwapRejected'); + validateAgwSvmPayload(config, input.recipient, input.payload); + return buildAgwSvmAction(input); +} + +/** Encode an outbound without evaluating the granted policy; the wallet/URP enforces it. */ +export function buildAgwSvmAction(input: SvmOutboundInput): Call { + for (const [name, value] of Object.entries({ + amount: input.amount, + gasLimit: input.gasLimit, + protocolFee: input.protocolFee, + maxPCForGas: input.maxPCForGas, + })) { + if (typeof value !== 'bigint' || value < BigInt(0) || value > UINT256_MAX) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `${name} must fit uint256` + ); + } + if (input.amount > UINT64_MAX) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'Solana amount must fit uint64' + ); + const value = input.protocolFee + input.maxPCForGas; + if (value > UINT256_MAX || input.maxPCForGas === BigInt(0)) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'invalid outbound gas quote' + ); + const token = getAddress(input.token); + const request = { + recipient: input.recipient, + token, + amount: input.amount, + gasLimit: input.gasLimit, + gasPrice: BigInt(0), + maxPCForGas: input.maxPCForGas, + payload: input.payload, + revertRecipient: getAddress(input.wallet), + }; + return { + target: getAddress(input.gateway), + value, + data: encodeFunctionData({ + abi: UNIVERSAL_GATEWAY_PC, + functionName: 'sendUniversalTxOutbound', + args: [request], + }), + }; +} diff --git a/packages/core/src/lib/agentic/execution/svm-payload.ts b/packages/core/src/lib/agentic/execution/svm-payload.ts new file mode 100644 index 00000000..c7f5208b --- /dev/null +++ b/packages/core/src/lib/agentic/execution/svm-payload.ts @@ -0,0 +1,147 @@ +/** Parser/validator for the deployed S12–S18 instruction grammar. */ +import { bytesToHex, hexToBytes, type Hex } from 'viem'; +import { encodeSvmExecutePayload } from '../../orchestrator/payload-builders'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import { + exactHex, + isForbiddenSvmProgram, + SVM_LIMITS, + SvmDataPinMode, + type SvmTermsWire, +} from '../codec/svm-terms'; + +export interface SvmPayloadAccount { + pubkey: Hex; + isWritable: boolean; +} +export interface ParsedSvmPayload { + program: Hex; + accounts: (SvmPayloadAccount & { writableFlag: number })[]; + instructionData: Uint8Array; +} +function fail(name: string): never { + throw new AgenticError(AGENTIC_ERROR_CODE.INVALID_RULE, name, { + details: { contractError: name }, + }); +} +export function parseAgwSvmPayload(payload: Hex): ParsedSvmPayload { + if (!/^0x(?:[0-9a-fA-F]{2})*$/.test(payload)) fail('MalformedSvmPayload'); + const bytes = hexToBytes(payload); + if (!bytes.length) fail('SvmPayloadEmpty'); + if (bytes.length < 41) fail('MalformedSvmPayload'); + const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength), + count = view.getUint32(0, false); + if (count > SVM_LIMITS.accounts) fail('SvmAccountsOutOfRange'); + const lenOffset = 4 + count * 33; + if (bytes.length < lenOffset + 4) fail('MalformedSvmPayload'); + const length = view.getUint32(lenOffset, false); + if (length > SVM_LIMITS.ixData) fail('SvmIxDataTooLong'); + const dataOffset = lenOffset + 4; + if (bytes.length !== dataOffset + length + 33) fail('MalformedSvmPayload'); + if (bytes[dataOffset + length] !== 2) fail('SvmInstructionNotExecute'); + const accounts = Array.from({ length: count }, (_, i) => { + const offset = 4 + i * 33, + writableFlag = bytes[offset + 32]; + // URP does not judge this flag. Preserve the raw value for diagnostics. + return { + pubkey: bytesToHex(bytes.slice(offset, offset + 32)), + isWritable: writableFlag === 1, + writableFlag, + }; + }); + return { + program: bytesToHex(bytes.slice(dataOffset + length + 1)), + accounts, + instructionData: bytes.slice(dataOffset, dataOffset + length), + }; +} +export function encodeAgwSvmPayload( + program: Hex, + accounts: readonly SvmPayloadAccount[], + instructionData: Uint8Array +): Hex { + exactHex(program, 32, 'target program'); + if (accounts.length > SVM_LIMITS.accounts) fail('SvmAccountsOutOfRange'); + if (instructionData.length > SVM_LIMITS.ixData) fail('SvmIxDataTooLong'); + accounts.forEach((a) => { + exactHex(a.pubkey, 32, 'account'); + if (typeof a.isWritable !== 'boolean') fail('MalformedSvmPayload'); + }); + return encodeSvmExecutePayload({ + targetProgram: program, + accounts: [...accounts], + ixData: instructionData, + instructionId: 2, + }); +} +function uintLE(data: Uint8Array): bigint { + return data.reduceRight((v, b) => (v << BigInt(8)) + BigInt(b), BigInt(0)); +} +/** Terms must have passed grant-shape validation. On-chain URP remains the enforcement authority. */ +export function validateAgwSvmPayload( + terms: SvmTermsWire, + recipient: Hex, + payload: Hex +): number { + exactHex(recipient, 32, 'recipient'); + if (BigInt(recipient) === BigInt(0)) fail('RecipientNotPubkey'); + const v = parseAgwSvmPayload(payload), + data = v.instructionData; + if (v.program.toLowerCase() !== recipient.toLowerCase()) + fail('RecipientTargetMismatch'); + if (isForbiddenSvmProgram(v.program, terms)) fail('ForbiddenTargetProgram'); + const rule = terms.programs.findIndex( + (p) => + p.program.toLowerCase() === v.program.toLowerCase() && + (p.dataless + ? data.length === 0 + : data.length >= p.discriminatorLen && + bytesToHex(data.slice(0, p.discriminatorLen)).toLowerCase() === + p.discriminator.slice(0, 2 + p.discriminatorLen * 2).toLowerCase()) + ); + if (rule < 0) fail('ProgramNotAllowed'); + const fixed = terms.programs[rule].maxAccounts; + if (fixed !== 255 && fixed !== v.accounts.length) + fail('SvmAccountCountMismatch'); + const pins = terms.pins.filter((p) => p.ruleIndex === rule); + for (const p of pins) { + if (p.accountIndex >= v.accounts.length) fail('SvmAccountCountBelowPin'); + if ( + v.accounts[p.accountIndex].pubkey.toLowerCase() !== + p.expected.toLowerCase() + ) + fail('SvmAccountPinMismatch'); + } + function field(fromEnd: boolean, offset: number, len: number): Uint8Array { + const start = fromEnd ? data.length - offset : offset; + if (start < 0 || start + len > data.length) fail('SvmDataTooShortForPin'); + return data.slice(start, start + len); + } + for (const p of terms.dataPins.filter((p) => p.ruleIndex === rule)) { + const a = field(p.fromEnd, p.offset, p.len); + if (p.mode === SvmDataPinMode.EQ) { + if ( + bytesToHex(a).toLowerCase() !== + p.expected.slice(0, 2 + p.len * 2).toLowerCase() + ) + fail('SvmDataPinMismatch'); + } else if (p.mode === SvmDataPinMode.GTE_LE) { + if (uintLE(a) < BigInt(p.expected)) fail('SvmDataFloorNotMet'); + } else if (p.mode === SvmDataPinMode.LTE_LE) { + if (uintLE(a) > BigInt(p.expected)) fail('SvmDataCeilingExceeded'); + } else if ( + uintLE(a) * p.den < + uintLE(field(p.fromEnd, p.offsetB, p.len)) * p.num + ) + fail('SvmDataRatioNotMet'); + } + const protectedKeys = new Set(terms.ceaAccounts.map((k) => k.toLowerCase())); + v.accounts.forEach((a, i) => { + if ( + protectedKeys.has(a.pubkey.toLowerCase()) && + !pins.some((p) => p.accountIndex === i) + ) + fail('CeaAccountAtUnpinnedIndex'); + }); + return rule; +} diff --git a/packages/core/src/lib/agentic/execution/svm-public.ts b/packages/core/src/lib/agentic/execution/svm-public.ts new file mode 100644 index 00000000..93d651b7 --- /dev/null +++ b/packages/core/src/lib/agentic/execution/svm-public.ts @@ -0,0 +1,272 @@ +import { PROGRESS_HOOK } from '../../progress-hook/progress-hook.types'; +import { emitAgentic } from '../management/common'; +import { bytesToHex, hexToBytes, erc20Abi, getAddress, type Hex } from 'viem'; +import type { CHAIN } from '../../constants/enums'; +import { + isPC20Reference, + type UniversalExecuteParams, + type TransactionExecutionOptions, +} from '../../orchestrator/orchestrator.types'; +import { resolveSvmCallForCea } from '../../orchestrator/svm-idl/resolve'; +import type { AgenticRuntime } from '../runtime'; +import type { AgenticExecutionContext } from '../context'; +import { AgenticCapability, requireCapability } from '../capabilities'; +import { selectRuleForSend } from '../reads/rules'; +import { readSvmConfig } from '../reads/svm'; +import { Snapshot } from '../reads/snapshot'; +import { svmMetadata } from '../management/svm-public'; +import { wrapSendError } from '../management/common'; +import type { MoveableToken } from '../../constants/tokens'; +import { svmKey, deriveAgwSvmCea } from '../codec/svm-accounts'; +import { svmInvalid, UINT64_MAX } from '../codec/svm-terms'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import { prepareSvmAgentExecution } from './svm-send'; +import { encodeAgwSvmPayload } from './svm-payload'; +import { quoteSvmRequest } from './svm-quote'; +import { buildAgwSvmAction } from './svm-outbound'; +import type { AgenticTxMetadata } from '../agentic.types'; +import { adaptAgenticResponse } from '../response'; + +/** Public single-instruction route; the contract enforces the supplied rule. */ +export async function sendPublicSvm( + runtime: AgenticRuntime, + actx: AgenticExecutionContext, + p: UniversalExecuteParams, + options?: TransactionExecutionOptions +) { + const gen = actx.generation, + wallet = actx.wallet; + requireCapability(gen.capabilities, AgenticCapability.UNIVERSAL_SVM_RULES); + requireCapability( + gen.capabilities, + actx.door === 'agent' + ? AgenticCapability.AGENT_EXECUTE + : AgenticCapability.OWNER_EXECUTE + ); + const to = p.to as { address: string; chain: CHAIN }; + const target = svmKey(to.address); + if (Array.isArray(p.data)) + throw svmInvalid('Solana AGW sends do not support instruction arrays'); + const hasInstruction = p.data !== undefined && p.data !== '0x'; + if ( + hasInstruction && + (typeof p.data !== 'string' || !/^0x(?:[0-9a-fA-F]{2})+$/.test(p.data)) + ) + throw svmInvalid('invalid Solana instruction bytes'); + if (!hasInstruction && actx.door === 'agent') + throw svmInvalid('Solana agent sends require an encoded instruction'); + if (p.funds && isPC20Reference(p.funds.token)) + throw svmInvalid('PC20 SVM outbound is not supported'); + if (p.funds && (p.value ?? BigInt(0)) !== BigInt(0)) + throw svmInvalid('use either funds or value for the bridged amount'); + const amount = p.funds?.amount ?? p.value ?? BigInt(0); + if (typeof amount !== 'bigint' || amount < BigInt(0) || amount > UINT64_MAX) + throw svmInvalid('Solana outbound amount must fit uint64'); + if (!hasInstruction && amount === BigInt(0)) + throw svmInvalid('a funds-only send requires a positive amount'); + const metadata = svmMetadata(runtime), + snap = await Snapshot.at(runtime.reader); + let rulesId: Hex | undefined, + data: Hex, + instruction: + | { + recipient: Hex; + instructionData: Uint8Array; + accounts: readonly { pubkey: Hex; isWritable: boolean }[]; + } + | undefined, + cea: Hex; + let destinationTransfer: AgenticTxMetadata['destinationTransfer']; + let transferValue = BigInt(0); + // SVM gateway gasLimit is a lamport-budget conversion input, not EVM gas + // units. Let the live route quote and finalize-rent floor size an omitted + // limit; copying an EVM-style million-unit fallback can overquote 100 PC. + const gasLimit = p.gasLimit ?? BigInt(0); + if (actx.door === 'agent') { + const active = await selectRuleForSend( + snap, + gen, + wallet, + actx.signerPushAccount, + to.chain + ); + const stored = await readSvmConfig( + snap, + gen, + wallet, + active, + runtime.pushChainNamespace + ); + const token = + p.funds || amount > BigInt(0) + ? runtime.resolvePrc20( + p.funds?.token as MoveableToken | undefined, + to.chain + ) + : getAddress(stored.config.assets[0].token); + const prepared = await prepareSvmAgentExecution( + runtime, + gen, + { + wallet, + rulesId: active.rulesId, + token, + amount, + gasLimit, + program: target, + instructionData: hexToBytes(p.data as Hex), + }, + metadata + ); + data = prepared.data; + instruction = prepared.instruction; + cea = stored.config.expectedCEA; + rulesId = active.rulesId; + } else { + const gateway = await metadata.gateway(to.chain as `solana:${string}`); + cea = deriveAgwSvmCea(wallet, gateway.program).address; + const resolved = hasInstruction + ? resolveSvmCallForCea( + { + programAddress: target, + data: hexToBytes(p.data as Hex), + senderUea: wallet, + targetChain: to.chain, + }, + cea + ) + : undefined; + if (resolved) + instruction = { + recipient: resolved.targetProgram, + instructionData: resolved.ixData, + accounts: resolved.accounts, + }; + const token = runtime.resolvePrc20( + p.funds?.token as MoveableToken | undefined, + to.chain + ); + const quote = await quoteSvmRequest( + runtime, + snap, + wallet, + token, + to.chain, + gasLimit, + amount + ); + if (!hasInstruction) { + destinationTransfer = { recipient: target, token, amount }; + transferValue = quote.isNative ? amount : BigInt(0); + } + const [pc, balance] = await Promise.all([ + runtime.reader.getBalance({ + address: wallet, + blockNumber: snap.blockNumber, + }), + snap.read(token, erc20Abi, 'balanceOf', [wallet]), + ]); + const value = quote.protocolFee + quote.nativeValueForGas; + if (pc < value || balance < amount) + throw new AgenticError( + AGENTIC_ERROR_CODE.WALLET_BALANCE_INSUFFICIENT, + 'wallet cannot cover Solana outbound' + ); + const call = buildAgwSvmAction({ + wallet, + gateway: gen.addresses.gateway, + token, + amount, + recipient: target, + payload: resolved + ? encodeAgwSvmPayload( + resolved.targetProgram, + resolved.accounts, + resolved.ixData + ) + : '0x', + gasLimit: quote.gasLimitUsed, + protocolFee: quote.protocolFee, + maxPCForGas: quote.nativeValueForGas, + }); + data = gen.contracts.encodeExecute([call]); + } + const hook = options?.progressHook ?? p.progressHook; + emitAgentic( + runtime, + hook, + PROGRESS_HOOK.AGENTIC_TX_107, + rulesId, + to.chain, + actx.door + ); + let response; + try { + response = await runtime.execute( + { + to: wallet, + value: BigInt(0), + data, + ...(p.nonce === undefined ? {} : { nonce: p.nonce }), + ...(p.maxFeePerGas === undefined + ? {} + : { maxFeePerGas: p.maxFeePerGas }), + ...(p.maxPriorityFeePerGas === undefined + ? {} + : { maxPriorityFeePerGas: p.maxPriorityFeePerGas }), + ...(p.deadline === undefined ? {} : { deadline: p.deadline }), + ...(p.feeLockTxHash === undefined + ? {} + : { feeLockTxHash: p.feeLockTxHash }), + }, + { ...options, progressHook: options?.progressHook ?? p.progressHook } + ); + } catch (error) { + const wrapped = wrapSendError(error) as AgenticError & { + decodedError?: unknown; + }; + emitAgentic( + runtime, + hook, + PROGRESS_HOOK.AGENTIC_TX_199_02, + 'sendTransaction', + wrapped.code ?? 'UNKNOWN', + wrapped.message, + wrapped.decodedError + ); + throw wrapped; + } + const result = adaptAgenticResponse(response, { + wallet, + door: actx.door, + rulesId, + chainNamespace: to.chain, + chain: to.chain, + route: 'UOA_TO_CEA', + ...(instruction + ? { + destinationAccount: cea, + destinationInstruction: { + program: instruction.recipient, + data: bytesToHex(instruction.instructionData), + accounts: instruction.accounts, + }, + } + : { destinationTransfer }), + logical: instruction + ? { + to: instruction.recipient, + data: bytesToHex(instruction.instructionData), + value: BigInt(0), + } + : { to: target, data: '0x', value: transferValue }, + }); + emitAgentic( + runtime, + hook, + PROGRESS_HOOK.AGENTIC_TX_199_01, + 'sendTransaction', + response.hash + ); + return result; +} diff --git a/packages/core/src/lib/agentic/execution/svm-quote.ts b/packages/core/src/lib/agentic/execution/svm-quote.ts new file mode 100644 index 00000000..f78fa563 --- /dev/null +++ b/packages/core/src/lib/agentic/execution/svm-quote.ts @@ -0,0 +1,51 @@ +import { PublicKey } from '@solana/web3.js'; +import { getAddress, hexToBytes, type Address } from 'viem'; +import type { CHAIN } from '../../constants/enums'; +import { + PRC20_SOURCE_ABI, + readGasPrc20, + readSvmSourceToken, +} from '../contracts/prc20-metadata'; +import type { AgenticRuntime } from '../runtime'; +import type { Snapshot } from '../reads/snapshot'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; + +/** Route/fee validation, independent of the selected rule's permissions. */ +export async function quoteSvmRequest( + runtime: AgenticRuntime, + snap: Snapshot, + wallet: Address, + token: Address, + chain: CHAIN, + gasLimit: bigint, + amount: bigint +) { + if ( + (await snap.read( + token, + PRC20_SOURCE_ABI, + 'SOURCE_CHAIN_NAMESPACE' + )) !== chain + ) { + throw new AgenticError( + AGENTIC_ERROR_CODE.ASSET_CHAIN_MISMATCH, + 'outbound asset belongs to another chain' + ); + } + const isNative = + getAddress(token) === getAddress(await readGasPrc20(snap, chain)); + const splMintBase58 = + !isNative && amount > BigInt(0) + ? new PublicKey( + hexToBytes( + await readSvmSourceToken(snap, token, chain, runtime.network) + ) + ).toBase58() + : undefined; + const quote = await runtime.quoteOutbound(token, gasLimit, chain, { + wallet, + splMintBase58, + burnAmount: amount, + }); + return { ...quote, isNative }; +} diff --git a/packages/core/src/lib/agentic/execution/svm-send.ts b/packages/core/src/lib/agentic/execution/svm-send.ts new file mode 100644 index 00000000..68b4be57 --- /dev/null +++ b/packages/core/src/lib/agentic/execution/svm-send.ts @@ -0,0 +1,167 @@ +import { quoteSvmRequest } from './svm-quote'; +/** Prepared-wire agent execution used by the public Solana route. */ +import { getAddress, erc20Abi, type Address, type Hex } from 'viem'; +import { CHAIN } from '../../constants/enums'; +import type { AgenticGeneration } from '../deployments'; +import type { AgenticRuntime } from '../runtime'; +import { assertCanSign, wrapSendError } from '../management/common'; +import { Snapshot } from '../reads/snapshot'; +import { readSvmRule } from '../reads/svm'; +import { + resolveSvmContext, + type SvmMetadataProvider, +} from '../management/svm-context'; +import { buildAgwSvmAction } from './svm-outbound'; +import { resolveAgwSvmInstruction } from './svm-instruction'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import { verifySvmWallet } from '../management/svm'; +import type { SvmPayloadAccount } from './svm-payload'; + +export interface PreparedSvmRequest { + wallet: Address; + rulesId: Hex; + token: Address; + amount: bigint; + gasLimit: bigint; + program: string; + instructionData: Uint8Array; + /** Already-resolved wire accounts for non-Anchor/dataless programs. */ + accounts?: readonly SvmPayloadAccount[]; +} + +export async function prepareSvmAgentExecution( + runtime: AgenticRuntime, + gen: AgenticGeneration, + input: PreparedSvmRequest, + metadata: SvmMetadataProvider +) { + assertCanSign(runtime, 'internal SVM send'); + await verifySvmWallet(runtime, gen, input.wallet); + const snap = await Snapshot.at(runtime.reader); + const stored = await readSvmRule( + snap, + gen, + input.wallet, + input.rulesId, + runtime.pushChainNamespace + ); + if (getAddress(stored.agent) !== getAddress(runtime.signerPushAccount())) + throw new AgenticError( + AGENTIC_ERROR_CODE.NOT_OWNER_OR_AGENT, + 'signer is not this SVM rule agent' + ); + const chain = stored.chainNamespace as CHAIN; + const resolved = await resolveSvmContext( + snap, + input.wallet, + stored.chainNamespace, + stored.config.assets, + metadata + ); + if ( + resolved.expectedCEA.toLowerCase() !== + stored.config.expectedCEA.toLowerCase() || + resolved.gatewayProgram.toLowerCase() !== + stored.config.gatewayProgram.toLowerCase() || + resolved.ceaAccounts.some( + (a) => + !stored.config.ceaAccounts.some( + (b) => a.toLowerCase() === b.toLowerCase() + ) + ) + ) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'stored SVM context does not cover the wallet and every asset' + ); + const instruction = resolveAgwSvmInstruction( + { + wallet: input.wallet, + chain, + program: input.program, + instructionData: input.instructionData, + accounts: input.accounts, + }, + stored.config + ); + const quote = await quoteSvmRequest( + runtime, + snap, + input.wallet, + getAddress(input.token), + chain, + input.gasLimit, + input.amount + ); + const call = buildAgwSvmAction({ + ...input, + gateway: gen.addresses.gateway, + recipient: instruction.recipient, + payload: instruction.payload, + gasLimit: quote.gasLimitUsed, + protocolFee: quote.protocolFee, + maxPCForGas: quote.nativeValueForGas, + }); + const walletPc = await runtime.reader.getBalance({ + address: input.wallet, + blockNumber: snap.blockNumber, + }); + if (walletPc < call.value) + throw new AgenticError( + AGENTIC_ERROR_CODE.WALLET_BALANCE_INSUFFICIENT, + 'wallet PC is below the SVM outbound quote' + ); + if (input.amount > BigInt(0)) { + const balance = await snap.read( + input.token, + erc20Abi, + 'balanceOf', + [input.wallet] + ); + if (balance < input.amount) + throw new AgenticError( + AGENTIC_ERROR_CODE.WALLET_BALANCE_INSUFFICIENT, + 'wallet token balance is below the SVM amount' + ); + } + const signerPc = await runtime.signerBalance(); + const gasReserve = (await runtime.getGasPrice()) * BigInt(10_000_000); + if ((await runtime.signerAccountDeployed()) && signerPc < gasReserve) + throw new AgenticError( + AGENTIC_ERROR_CODE.AGENT_GAS_INSUFFICIENT, + 'deployed SVM agent identity has no Push gas balance' + ); + return { + stored, + call, + instruction, + quote, + data: gen.contracts.encodeExecuteAsAgent(input.rulesId, call), + }; +} + +export async function sendSvmAgentWire( + runtime: AgenticRuntime, + gen: AgenticGeneration, + input: PreparedSvmRequest, + metadata: SvmMetadataProvider +) { + const prepared = await prepareSvmAgentExecution( + runtime, + gen, + input, + metadata + ); + try { + const tx = await runtime.execute({ + to: input.wallet, + value: BigInt(0), + data: prepared.data, + }); + // Return the ordinary signer response and explicit wire context internally. + // The public wrapper applies the response presentation. + return { tx, context: prepared.stored, instruction: prepared.instruction }; + } catch (error) { + throw wrapSendError(error); + } +} diff --git a/packages/core/src/lib/agentic/index.ts b/packages/core/src/lib/agentic/index.ts new file mode 100644 index 00000000..eb267734 --- /dev/null +++ b/packages/core/src/lib/agentic/index.ts @@ -0,0 +1,43 @@ +export type { + AgenticAddress, + AgenticHex, + AgenticDoor, + AgenticNamespace, + AgenticProgressHook, + AgenticTxMetadata, + AgenticWallet, + RuleCall as AllowedCall, + RuleAsset as AssetCap, + RuleAssetInput, + AuthoredRule, + Checkpoint, + CheckpointKind, + CreateOptions, + CreateResult, + ForeignChainNamespace, + DecodedSolanaRule, + Rule, + RuleInput, + Pin, + Spent, + WalletMarker, + ArgumentPath, + RulesRecord, + Selector, + WalletInfo, + WalletSummary, +} from './agentic.types'; +export { AGENTIC_ERROR_CODE, AgenticError, AgenticRevertError } from './errors'; +export type { AgenticErrorCode } from './errors'; +export { AGENTIC } from './constants'; + +export type { + Preset, + PresetCategory, + PresetAsset, + PresetOptions, + ReadyPresetOptions, + PresetRuleTemplate, + PresetResult, + AgenticPresets, +} from './presets/types'; diff --git a/packages/core/src/lib/agentic/management/common.ts b/packages/core/src/lib/agentic/management/common.ts new file mode 100644 index 00000000..1200109c --- /dev/null +++ b/packages/core/src/lib/agentic/management/common.ts @@ -0,0 +1,185 @@ +import { getAddress, type Address, type Hex, type Log } from 'viem'; +import type { + MultiCall, + UniversalTxResponse, +} from '../../orchestrator/orchestrator.types'; +import { + PushChainBatchExecutionError, + PushChainExecutionError, + type DecodedErrorPayload, +} from '../../orchestrator/internals/errors'; +import PROGRESS_HOOKS from '../../progress-hook/progress-hook'; +import { PROGRESS_HOOK } from '../../progress-hook/progress-hook.types'; +import type { AgenticGeneration } from '../deployments'; +import { + AGENTIC_ERROR_CODE, + AgenticError, + AgenticRevertError, +} from '../errors'; +import type { AgenticRuntime } from '../runtime'; +import type { AgenticProgressHook } from '../agentic.types'; +import { Snapshot } from '../reads/snapshot'; +import { decodeAgenticRevert } from '../revert'; + +export function emitAgentic( + runtime: AgenticRuntime, + perCall: AgenticProgressHook | undefined, + id: PROGRESS_HOOK, + ...args: unknown[] +): void { + runtime.emit(PROGRESS_HOOKS[id](...args), perCall); +} + +export function assertCanSign( + runtime: AgenticRuntime, + operation: string +): void { + if (runtime.isReadOnly) { + throw new AgenticError( + AGENTIC_ERROR_CODE.READ_ONLY, + `${operation} needs a signer; this client was initialized read-only` + ); + } +} + +/** Owner-only management writes: the connected signer's Push identity must be the stored owner. */ +export async function assertOwner( + runtime: AgenticRuntime, + gen: AgenticGeneration, + wallet: Address, + snap: Snapshot +): Promise
{ + const owner = getAddress( + await snap.read
(wallet, gen.contracts.abis.wallet, 'owner') + ); + const signer = runtime.signerPushAccount(); + if (owner !== signer) { + throw new AgenticError( + AGENTIC_ERROR_CODE.NOT_WALLET_OWNER, + `${signer} is not the owner of ${wallet} (owner is ${owner})`, + { + hint: 'Rule and label writes are owner-only. Initialize with the owner signer.', + } + ); + } + return owner; +} + +/** + * Send owner calls through the signer's ordinary transaction path: one call + * as a plain transaction, several as the signer's batch (UEA multicall, + * EIP-7702 atomic batch, or the documented sequential fallback for a Push EOA + * without 7702 — reported through `atomic` / `transactionHashes`). + */ +export async function sendOwnerCalls( + runtime: AgenticRuntime, + calls: MultiCall[], + progressHook: AgenticProgressHook | undefined +): Promise { + if (calls.length === 0) + throw new Error('sendOwnerCalls needs at least one call'); + const options = progressHook ? { progressHook } : undefined; + if (calls.length === 1) { + return runtime.execute( + { to: calls[0].to, value: calls[0].value, data: calls[0].data }, + options + ); + } + return runtime.execute( + { to: calls[0].to, value: BigInt(0), data: calls }, + options + ); +} + +/** + * Wait for every Push transaction the operation produced and return their + * logs in submission order. A reverted transaction raises AgenticRevertError + * carrying all hashes. + */ +export async function confirmedLogs( + runtime: AgenticRuntime, + tx: UniversalTxResponse +): Promise<{ logs: Log[]; hashes: Hex[] }> { + const hashes = (tx.transactionHashes ?? [tx.hash as Hex]) as Hex[]; + const unavailable = (cause: unknown) => + new AgenticError( + AGENTIC_ERROR_CODE.RECEIPT_UNAVAILABLE, + `submitted ${tx.hash} but could not read its receipt: ${ + cause instanceof Error ? cause.message : String(cause) + }`, + { + hint: 'The transaction may still land. Check these hashes before retrying.', + details: { txHash: tx.hash, transactionHashes: hashes }, + cause, + } + ); + let receipt; + try { + receipt = await tx.wait(); + } catch (cause) { + throw unavailable(cause); + } + if (hashes.length === 1) { + if (receipt.status !== 1) { + throw new AgenticRevertError(`Push transaction ${tx.hash} reverted`, { + cause: { txHash: tx.hash }, + }); + } + return { logs: receipt.logs as Log[], hashes }; + } + const logs: Log[] = []; + for (const hash of hashes) { + let r; + try { + r = await runtime.reader.getTransactionReceipt({ hash }); + } catch (cause) { + throw unavailable(cause); + } + if (r.status !== 'success') { + throw new AgenticRevertError(`Push transaction ${hash} reverted`, { + cause: { txHash: hash }, + }); + } + logs.push(...(r.logs as Log[])); + } + return { logs, hashes }; +} + +/** Normalize a send failure: keep batch hashes and decoded revert data. */ +export function wrapSendError(err: unknown): unknown { + if (err instanceof AgenticError || err instanceof AgenticRevertError) + return err; + const decoded = decodeAgenticRevert(err); + if (err instanceof PushChainBatchExecutionError) { + return new AgenticRevertError(err.message, { + decodedError: decoded ?? err.decodedError, + cause: err, + }); + } + if ( + err && + typeof err === 'object' && + (('code' in err && err.code === 4001) || + ('name' in err && err.name === 'UserRejectedRequestError')) + ) { + return new AgenticError( + AGENTIC_ERROR_CODE.REQUEST_REJECTED, + 'The wallet request was cancelled.', + { cause: err } + ); + } + if (decoded || err instanceof PushChainExecutionError) { + const e = err as { + message?: string; + gatewayTxHash?: string; + decodedError?: DecodedErrorPayload; + }; + return new AgenticRevertError(e?.message ?? decoded?.name ?? 'AGW revert', { + decodedError: decoded ?? e?.decodedError, + gatewayTxHash: e?.gatewayTxHash, + agenticCode: decoded?.name, + cause: err, + }); + } + return err; +} diff --git a/packages/core/src/lib/agentic/management/create.ts b/packages/core/src/lib/agentic/management/create.ts new file mode 100644 index 00000000..fbeb576f --- /dev/null +++ b/packages/core/src/lib/agentic/management/create.ts @@ -0,0 +1,237 @@ +import { assertNoDuplicateRules } from './duplicates'; +import { getAddress, type Address, type Hex } from 'viem'; +import { PROGRESS_HOOK } from '../../progress-hook/progress-hook.types'; +import type { MultiCall } from '../../orchestrator/orchestrator.types'; +import { AgenticCapability, requireCapability } from '../capabilities'; +import { currentGeneration, verifyFactoryWiring } from '../deployments'; +import { deriveWallet, rulesId as computeRulesId } from '../codec/ids'; +import { prepareWalletRules } from './prepare'; +import { assertLabel } from './label'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import type { AgenticRuntime } from '../runtime'; +import type { InternalCreateOptions, CreateResult } from '../agentic.types'; +import { Snapshot } from '../reads/snapshot'; +import { walletCount } from '../reads/wallets'; +import { + assertCanSign, + confirmedLogs, + emitAgentic, + sendOwnerCalls, + wrapSendError, +} from './common'; + +/** One index-bound v6 factory call deploys and grants atomically for EOA/UEA owners. */ +export async function createWallet( + runtime: AgenticRuntime, + label: string, + options: InternalCreateOptions +): Promise { + const hook = options?.progressHook; + assertLabel(label); + if (!options || !Array.isArray(options.rules)) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'options.rules is required (use [] for a bare wallet)' + ); + } + assertCanSign(runtime, 'agentic.create'); + const gen = currentGeneration(runtime.network); + requireCapability(gen.capabilities, AgenticCapability.WALLET_READS); + await verifyFactoryWiring(runtime.reader, gen); + + const owner = runtime.signerPushAccount(); + const snap = await Snapshot.at(runtime.reader); + const index = await walletCount(snap, gen, owner); + const [predicted, deployed] = await snap.read( + gen.addresses.factory, + gen.contracts.abis.factory, + 'predictWallet', + [owner, index] + ); + const wallet = getAddress(predicted); + const mirror = deriveWallet({ + factory: gen.addresses.factory, + walletImplementation: gen.addresses.walletImplementation, + owner, + index, + }); + if (wallet !== mirror || deployed || (await snap.code(wallet))) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INDEX_RACE, + `next wallet slot ${index} for ${owner} is not a fresh counterfactual address`, + { details: { wallet, mirror, deployed } } + ); + } + const prepared = await prepareWalletRules( + runtime, + gen, + owner, + wallet, + options.rules, + snap + ); + assertNoDuplicateRules(prepared); + const selfTarget = prepared.findIndex((p) => + p.nativeTerms?.some((t) => t.target === wallet) + ); + if (selfTarget >= 0) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `rules[${selfTarget}].target is the wallet being created; the contracts refuse it as a native target` + ); + } + emitAgentic( + runtime, + hook, + PROGRESS_HOOK.AGENTIC_TX_101, + wallet, + Number(index), + false + ); + + // A fresh wallet's grant nonce starts at 0 and increments per grant. + const predictedIds = prepared.map((p, i) => + computeRulesId({ + validator: gen.addresses.sessionValidator, + agent: p.agent, + grantNonce: BigInt(i), + }) + ); + if (prepared.length > 8) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'create accepts at most eight initial rules' + ); + const calls: MultiCall[] = [ + { + to: gen.addresses.factory, + value: BigInt(0), + data: gen.contracts.encodeCreateWalletAt( + owner, + index, + wallet, + label, + prepared.map((p) => p.session) + ), + }, + ]; + emitAgentic(runtime, hook, PROGRESS_HOOK.AGENTIC_TX_102, wallet, 'single'); + let tx; + try { + tx = await sendOwnerCalls(runtime, calls, hook); + } catch (err) { + const wrapped = atomicCreateFailure(err); + emitFailure(runtime, hook, wrapped); + throw wrapped; + } + + let logs; + try { + ({ logs } = await confirmedLogs(runtime, tx)); + } catch (err) { + const wrapped = atomicCreateFailure(err); + emitFailure(runtime, hook, wrapped); + throw wrapped; + } + const deployedEv = gen.contracts.parseWalletDeployed( + logs, + gen.addresses.factory + ); + const granted = gen.contracts + .parseRulesGranted(logs, wallet) + .map((g) => g.rulesId); + if ( + deployedEv.length !== 1 || + deployedEv[0].wallet !== wallet || + deployedEv[0].index !== index + ) { + const err = new AgenticError( + AGENTIC_ERROR_CODE.RECEIPT_MISMATCH, + `createWallet produced ${ + deployedEv.map((d) => `${d.wallet}#${d.index}`).join(', ') || + 'no wallet' + }, expected ${wallet}#${index}; grants targeted ${wallet}`, + { + hint: 'The receipt does not describe the requested atomic creation. Inspect the submitted hash before retrying.', + details: { + expected: wallet, + deployed: deployedEv, + grantedRulesIds: granted, + txHash: tx.hash, + }, + } + ); + emitFailure(runtime, hook, err); + throw err; + } + if (!sameIds(granted, predictedIds)) { + const err = new AgenticError( + AGENTIC_ERROR_CODE.RECEIPT_MISMATCH, + 'RulesGranted events do not match the requested rules in order', + { details: { granted, predicted: predictedIds, txHash: tx.hash } } + ); + emitFailure(runtime, hook, err); + throw err; + } + if (granted.length > 0) + emitAgentic(runtime, hook, PROGRESS_HOOK.AGENTIC_TX_104, granted); + emitAgentic( + runtime, + hook, + PROGRESS_HOOK.AGENTIC_TX_199_01, + 'create', + tx.hash + ); + return { + wallet, + index: Number(index), + rulesIds: granted as `0x${string}`[], + tx, + }; +} + +function sameIds(a: readonly Hex[], b: readonly Hex[]): boolean { + return ( + a.length === b.length && + a.every((x, i) => x.toLowerCase() === b[i].toLowerCase()) + ); +} + +function atomicCreateFailure(error: unknown): unknown { + const wrapped = wrapSendError(error) as { decodedError?: { name?: string } }; + if ( + ['IndexMismatch', 'IntentWalletMismatch'].includes( + wrapped?.decodedError?.name ?? '' + ) + ) + return new AgenticError( + AGENTIC_ERROR_CODE.INDEX_RACE, + 'the predicted wallet slot changed; atomic creation committed nothing', + { + cause: wrapped, + details: { + committed: false, + walletDeployed: false, + grantedRulesIds: [], + }, + } + ); + return wrapped; +} + +function emitFailure( + runtime: AgenticRuntime, + hook: InternalCreateOptions['progressHook'], + err: unknown +): void { + const e = err as { code?: string; message?: string; decodedError?: unknown }; + emitAgentic( + runtime, + hook, + PROGRESS_HOOK.AGENTIC_TX_199_02, + 'create', + e?.code ?? 'UNKNOWN', + e?.message ?? String(err), + e?.decodedError + ); +} diff --git a/packages/core/src/lib/agentic/management/destination.ts b/packages/core/src/lib/agentic/management/destination.ts new file mode 100644 index 00000000..d1dacf63 --- /dev/null +++ b/packages/core/src/lib/agentic/management/destination.ts @@ -0,0 +1,38 @@ +import { getAddress, type Address } from 'viem'; +import type { CHAIN } from '../../constants/enums'; +import type { AgenticRuntime } from '../runtime'; +import { AgenticError, AGENTIC_ERROR_CODE } from '../errors'; + +/** Preserve read failures as read failures; never report them as bad token routes. */ +export async function resolveRuleDestination( + runtime: AgenticRuntime, + wallet: Address, + chain: CHAIN +): Promise
{ + try { + return getAddress((await runtime.resolveCEA(wallet, chain)).cea); + } catch (cause) { + if (cause instanceof AgenticError) throw cause; + const unavailable = + cause instanceof Error && + cause.message.includes('CEAFactory not available on chain'); + const message = unavailable + ? 'Agentic wallets are not available on this destination network yet. Choose a supported network.' + : 'The wallet’s destination account could not be loaded. Try again shortly.'; + throw new AgenticError( + unavailable + ? AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE + : AGENTIC_ERROR_CODE.RULE_READ_FAILED, + message, + { + userMessage: message, + cause, + details: { + chainNamespace: chain, + field: 'chainNamespace', + stage: 'destinationAccount', + }, + } + ); + } +} diff --git a/packages/core/src/lib/agentic/management/duplicates.ts b/packages/core/src/lib/agentic/management/duplicates.ts new file mode 100644 index 00000000..68e1e02e --- /dev/null +++ b/packages/core/src/lib/agentic/management/duplicates.ts @@ -0,0 +1,28 @@ +import { getAddress } from 'viem'; +import type { PreparedRule } from '../codec/rules'; +import { chainHash } from '../codec/rules'; +import type { ActiveRule } from '../reads/rules'; +import { AgenticError, AGENTIC_ERROR_CODE } from '../errors'; + +/** SDK creation policy; existing contract overlaps still use AMBIGUOUS_RULE at send. */ +export function assertNoDuplicateRules( + prepared: readonly PreparedRule[], + existing: readonly ActiveRule[] = [] +): void { + const keys = new Set( + existing.map((r) => `${getAddress(r.agent)}:${r.chainHash}`) + ); + for (const rule of prepared) { + const key = `${getAddress(rule.agent)}:${chainHash(rule.chainNamespace)}`; + if (keys.has(key)) + throw new AgenticError( + AGENTIC_ERROR_CODE.DUPLICATE_RULE, + `an enabled rule already names ${rule.agent} for ${rule.chainNamespace}`, + { + hint: 'Put multiple allowed calls in one rule or update the existing rule.', + details: { agent: rule.agent, chainNamespace: rule.chainNamespace }, + } + ); + keys.add(key); + } +} diff --git a/packages/core/src/lib/agentic/management/label.ts b/packages/core/src/lib/agentic/management/label.ts new file mode 100644 index 00000000..a63e2b30 --- /dev/null +++ b/packages/core/src/lib/agentic/management/label.ts @@ -0,0 +1,21 @@ +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; + +/** AGW MAX_LABEL_BYTES. Empty resets the default; lengths count UTF-8 bytes. */ +export const MAX_LABEL_BYTES = 64; + +export function assertLabel(label: string): void { + if (typeof label !== 'string') { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'label must be a string' + ); + } + const length = new TextEncoder().encode(label).length; + if (length > MAX_LABEL_BYTES) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `label must be at most ${MAX_LABEL_BYTES} UTF-8 bytes (received ${length})`, + { details: { length, maxLength: MAX_LABEL_BYTES } } + ); + } +} diff --git a/packages/core/src/lib/agentic/management/prepare.ts b/packages/core/src/lib/agentic/management/prepare.ts new file mode 100644 index 00000000..32b60b0e --- /dev/null +++ b/packages/core/src/lib/agentic/management/prepare.ts @@ -0,0 +1,183 @@ +import { isPublicRule, normalizePublicRule } from '../public-rule'; +import { prepareRuleInput } from './rule-inputs'; +import { preparePublicSvmRule } from './svm-public'; +import type { SvmTermsWire } from '../codec/svm-terms'; +import { getAddress, zeroAddress, type Address } from 'viem'; +import { CHAIN, VM } from '../../constants/enums'; +import { CHAIN_INFO } from '../../constants/chain'; +import { AGENTIC_DEFAULTS, withDefault } from '../codec/defaults'; +import { isUniversalRule, isSolanaRule, prepareRules } from '../codec/rules'; +import { + validateUniversalRuleShape, + type ResolvedUniversalRule, +} from '../codec/universal'; +import { + forbiddenTargets, + verifyPolicyVersion, + type AgenticGeneration, +} from '../deployments'; +import { AgenticCapability, requireCapability } from '../capabilities'; +import { + AGENTIC_ERROR_CODE, + AgenticError, + tokenRouteUnavailable, + ruleErrorContext, +} from '../errors'; +import type { InternalRule, UniversalRule, SolanaRule } from '../agentic.types'; +import type { AgenticRuntime } from '../runtime'; +import { Snapshot } from '../reads/snapshot'; +import { resolveRuleDestination } from './destination'; + +import { + PRC20_SOURCE_ABI, + readGasPrc20, + readOriginToken, +} from '../contracts/prc20-metadata'; + +/** Resolve wallet-dependent wire inputs without signing or mutating authority. */ +export async function prepareWalletRules( + runtime: AgenticRuntime, + gen: AgenticGeneration, + owner: Address, + wallet: Address, + inputs: readonly InternalRule[], + snap: Snapshot +) { + const rules = await Promise.all( + inputs.map(async (rule, ruleIndex) => { + try { + return isPublicRule(rule) + ? await normalizePublicRule( + await prepareRuleInput(rule, runtime, owner, snap), + wallet, + runtime + ) + : rule; + } catch (error) { + throw ruleErrorContext(error, ruleIndex, rule?.chainNamespace); + } + }) + ); + if (rules.length) await verifyPolicyVersion(runtime.reader, gen); + const svm = new Map(); + const universal = new Map(); + for (const [ruleIndex, rule] of rules.entries()) { + try { + if (rule && isSolanaRule(rule)) { + requireCapability( + gen.capabilities, + AgenticCapability.UNIVERSAL_SVM_RULES + ); + svm.set(rule, await preparePublicSvmRule(runtime, snap, wallet, rule)); + continue; + } + if (!isUniversalRule(rule)) continue; + if (rule.chainNamespace.startsWith('solana:')) + requireCapability( + gen.capabilities, + AgenticCapability.UNIVERSAL_SVM_RULES + ); + validateUniversalRuleShape(rule, runtime.nowSeconds()); + requireCapability( + gen.capabilities, + rule.chainNamespace.startsWith('solana:') + ? AgenticCapability.UNIVERSAL_SVM_RULES + : AgenticCapability.UNIVERSAL_EVM_RULES + ); + const chain = rule.chainNamespace as CHAIN; + if (CHAIN_INFO[chain]?.vm !== VM.EVM) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `unsupported EVM rule chain ${chain}` + ); + const cea = await resolveRuleDestination(runtime, wallet, chain); + const assets = rule.assets.length + ? rule.assets.map((a) => ({ + token: + typeof a.token === 'string' && getAddress(a.token) === zeroAddress + ? undefined + : a.token, + maxPerCall: a.maxPerCall, + maxTotal: withDefault( + a.maxTotal, + AGENTIC_DEFAULTS.universal.assetMaxTotal + ), + })) + : [{ token: undefined, maxPerCall: BigInt(0), maxTotal: BigInt(0) }]; + const resolved = []; + for (const [assetIndex, asset] of assets.entries()) { + let token: Address; + if (asset.token === undefined) token = await readGasPrc20(snap, chain); + else { + try { + token = runtime.resolvePrc20(asset.token, chain); + } catch (cause) { + throw tokenRouteUnavailable( + cause, + typeof asset.token === 'string' + ? asset.token + : asset.token.address, + chain, + assetIndex + ); + } + } + if (token === zeroAddress) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `no gas PRC20 registered for ${chain}` + ); + const namespace = await snap.read( + token, + PRC20_SOURCE_ABI, + 'SOURCE_CHAIN_NAMESPACE' + ); + if (namespace !== chain) + throw new AgenticError( + AGENTIC_ERROR_CODE.ASSET_CHAIN_MISMATCH, + `PRC20 ${token} belongs to ${namespace}, not ${chain}` + ); + if (asset.token !== undefined) { + const expected = + typeof asset.token === 'string' + ? getAddress(asset.token) + : getAddress(asset.token.address); + if (expected === zeroAddress) { + if ((await readGasPrc20(snap, chain)) !== getAddress(token)) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'resolved token is not the registered native gas token' + ); + } else { + const source = await readOriginToken(snap, token, chain); + if (source !== expected) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `PRC20 ${token} represents ${source}, not requested token ${expected}` + ); + } + } + resolved.push({ + token: getAddress(token), + maxPerCall: asset.maxPerCall, + maxTotal: asset.maxTotal, + }); + } + universal.set(rule, { expectedCEA: getAddress(cea), assets: resolved }); + } catch (error) { + throw ruleErrorContext(error, ruleIndex, rule?.chainNamespace); + } + } + return prepareRules(rules, { + owner, + pushChainNamespace: runtime.pushChainNamespace, + validator: gen.addresses.sessionValidator, + rulesPolicy: gen.addresses.rulesPolicy, + gateway: gen.addresses.gateway, + capabilities: gen.capabilities, + nowSeconds: runtime.nowSeconds(), + forbiddenTargets: forbiddenTargets(gen, wallet), + universal, + svm, + }); +} diff --git a/packages/core/src/lib/agentic/management/rule-inputs.ts b/packages/core/src/lib/agentic/management/rule-inputs.ts new file mode 100644 index 00000000..4fd8a1a1 --- /dev/null +++ b/packages/core/src/lib/agentic/management/rule-inputs.ts @@ -0,0 +1,310 @@ +import { + getAddress, + isAddress, + parseUnits, + zeroAddress, + type Address, +} from 'viem'; +import { CHAIN, PUSH_NETWORK, VM } from '../../constants/enums'; +import { CHAIN_INFO } from '../../constants/chain'; +import { + MOVEABLE_TOKENS, + isMoveableTokenSet, + type MoveableToken, +} from '../../constants/tokens'; +import { exactAgenticRoutes, resolveAgenticPrc20 } from '../token-routes'; +import type { + AuthoredRule, + InternalRule, + RuleAsset, + RuleAssetInput, + RuleCall, +} from '../agentic.types'; +import type { AgenticRuntime } from '../runtime'; +import type { Snapshot } from '../reads/snapshot'; +import { readOriginToken } from '../contracts/prc20-metadata'; +import { AgenticError, AGENTIC_ERROR_CODE } from '../errors'; + +/** Contract limit: assets per universal rule. */ +const MAX_ASSETS = 8; +const refuse = (message: string, reason: string, field?: string) => + new AgenticError(AGENTIC_ERROR_CODE.INVALID_RULE, message, { + details: { reason, ...(field ? { field } : {}) }, + }); + +// Default limits for ALL, by the SDK registry's own symbol and decimals (never +// caller metadata). Amounts are token quantities, not USD valuations. +const DEFAULT_LIMITS: Readonly> = { + USDT: ['10', '100'], + USDC: ['10', '100'], + DAI: ['10', '100'], + ETH: ['0.001', '0.01'], + WETH: ['0.001', '0.01'], + stETH: ['0.001', '0.01'], + BNB: ['0.01', '0.1'], + SOL: ['0.01', '0.1'], +}; +function withDefaultLimits( + token: MoveableToken | string, + symbol: string, + decimals: number, + chain: string +): RuleAsset { + const limits = DEFAULT_LIMITS[symbol]; + if (!limits) + throw new AgenticError( + AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE, + `No default limit for ${symbol} on ${chain}`, + { details: { capability: 'allTokenDefaults', dependency: symbol } } + ); + return { + token, + maxPerCall: parseUnits(limits[0], decimals), + maxTotal: parseUnits(limits[1], decimals), + }; +} + +/** Every token Push can send to `chainNamespace`, each with its default limits: + * the SDK registry plus exact node routes (Circle USDC `.old` is listed + * separately from the routed mock USDC), deduplicated by Push PRC20. */ +export function allRoutableAssets( + chainNamespace: string, + options: { network?: PUSH_NETWORK } = {} +): RuleAsset[] { + const network = options.network ?? PUSH_NETWORK.TESTNET_DONUT; + const seen = new Set(); + const out: RuleAsset[] = []; + const add = ( + token: MoveableToken | string, + address: string, + symbol: string, + decimals: number + ) => { + let prc20: Address; + try { + prc20 = resolveAgenticPrc20( + { chain: chainNamespace, address }, + network + ).address; + } catch { + return; // listed in the registry but not routable from Push + } + if (seen.has(prc20)) return; + seen.add(prc20); + out.push(withDefaultLimits(token, symbol, decimals, chainNamespace)); + }; + for (const token of MOVEABLE_TOKENS[chainNamespace as CHAIN] ?? []) + add({ ...token }, token.address, token.symbol, token.decimals); + for (const route of exactAgenticRoutes(chainNamespace, network)) + add(getAddress(route.source), route.source, route.symbol, route.decimals); + if (!out.length) + throw refuse( + `No token can be sent from Push to ${chainNamespace}`, + 'ALL_UNAVAILABLE' + ); + if (out.length > MAX_ASSETS) + throw refuse( + `ALL expands to ${out.length} tokens on ${chainNamespace}; a rule holds at most eight assets`, + 'ALL_TOO_MANY' + ); + return out; +} + +const sourceKey = (token: MoveableToken | string): string => { + const address = typeof token === 'string' ? token : token.address; + if (typeof token !== 'string' && token.mechanism === 'native') + return zeroAddress; + return isAddress(address, { strict: false }) + ? address.toLowerCase() + : address; +}; +function expandAll( + rule: AuthoredRule, + network: PUSH_NETWORK, + transferable: boolean +): RuleAsset[] | undefined { + const assets = rule.assets ?? []; + const markers = assets.filter((a) => isMoveableTokenSet(a?.token)); + if (!markers.length) return undefined; + const chain = rule.chainNamespace; + for (const marker of markers) { + if ( + marker.maxPerCall !== undefined || + (marker as RuleAssetInput).maxTotal !== undefined + ) + throw refuse( + 'ALL uses each token’s default limits. Remove maxPerCall and maxTotal, or list the tokens individually.', + 'ALL_WITH_LIMITS', + 'assets' + ); + if (!chain || (marker.token as { chain: string }).chain !== chain) + throw new AgenticError( + AGENTIC_ERROR_CODE.ASSET_CHAIN_MISMATCH, + `ALL for ${ + (marker.token as { chain: string }).chain + } does not match the rule's chain ${chain ?? 'Push Chain'}`, + { details: { field: 'assets' } } + ); + } + // Without apps the rule can only transfer ERC20s, so ALL leaves native out. + const expanded = allRoutableAssets(chain as string, { network }).filter( + (a) => !transferable || sourceKey(a.token) !== zeroAddress + ); + // An explicitly listed token replaces its default entry. + for (const asset of assets) { + if (isMoveableTokenSet(asset.token)) continue; + const explicit = asset as RuleAsset; + const key = sourceKey(explicit.token); + const i = expanded.findIndex((a) => sourceKey(a.token) === key); + if (i >= 0) expanded[i] = explicit; + else expanded.push(explicit); + } + if (expanded.length > MAX_ASSETS) + throw refuse( + `ALL plus the listed tokens make ${expanded.length} assets; a rule holds at most eight`, + 'ALL_TOO_MANY', + 'assets' + ); + return expanded; +} + +/** The owner's own EVM address: the Push EOA, or the EVM origin of its UEA. */ +function ownerEvmAddress( + runtime: AgenticRuntime, + owner: Address +): Address | undefined { + if (getAddress(runtime.signerPushAccount()) !== getAddress(owner)) + throw new AgenticError( + AGENTIC_ERROR_CODE.NOT_WALLET_OWNER, + 'tokens-only rules pin transfers to the connected owner' + ); + if (runtime.signerIsPushNative()) return getAddress(owner); + const origin = runtime.signerOrigin(); + return CHAIN_INFO[origin.chain]?.vm === VM.EVM && + isAddress(origin.address, { strict: false }) + ? getAddress(origin.address) + : undefined; +} + +async function transferCalls( + rule: AuthoredRule, + assets: RuleAsset[], + runtime: AgenticRuntime, + owner: Address, + snap: Snapshot +): Promise { + const chain = rule.chainNamespace as string; + if (assets.some((a) => sourceKey(a.token) === zeroAddress)) + throw refuse( + 'Native ETH and BNB cannot be transferred by a rule. Remove them, or add an app.', + 'TOKENS_ONLY_NATIVE', + 'assets' + ); + const recipients: { address: Address; owner: boolean }[] = []; + const ownerAddress = ownerEvmAddress(runtime, owner); + if (ownerAddress) recipients.push({ address: ownerAddress, owner: true }); + for (const [i, to] of (rule.transferTo ?? []).entries()) { + if (!isAddress(to, { strict: false }) || getAddress(to) === zeroAddress) + throw refuse( + 'Enter a valid recipient address.', + 'TRANSFER_RECIPIENT_INVALID', + `transferTo[${i}]` + ); + if (!recipients.some((r) => r.address === getAddress(to))) + recipients.push({ address: getAddress(to), owner: false }); + } + if (!recipients.length) + throw refuse( + 'Name at least one recipient in transferTo: an owner from Solana has no address on this network.', + 'TRANSFER_RECIPIENT_REQUIRED', + 'transferTo' + ); + const calls: RuleCall[] = []; + for (const asset of assets) { + // The ERC20 lives on the destination chain; a Push token names its source. + const target = + typeof asset.token === 'object' && 'prc20Address' in asset.token + ? await readOriginToken( + snap, + getAddress( + (asset.token as MoveableToken & { prc20Address: string }) + .prc20Address + ), + chain + ) + : getAddress( + typeof asset.token === 'string' ? asset.token : asset.token.address + ); + for (const recipient of recipients) + calls.push({ + target, + selector: 'transfer(address,uint256)', + pins: [ + { arg: 0, expected: recipient.address }, + { arg: 1, max: asset.maxPerCall }, + ], + app: 'Token transfer', + label: recipient.owner + ? 'Transfer to owner' + : 'Transfer to named recipient', + }); + } + return calls; +} + +/** Authoring conveniences resolved before normalization, once the owner and + * network are known: MOVEABLE ALL markers, and tokens-only EVM rules, which + * become ERC20 transfers to the owner plus any `transferTo` recipients. */ +export async function prepareRuleInput( + input: InternalRule, + runtime: AgenticRuntime, + owner: Address, + snap: Snapshot +): Promise { + const rule = input as unknown as AuthoredRule; + if ('format' in rule) return input; + const noCalls = !rule.allowedCalls?.length; + const chain = rule.chainNamespace; + const expanded = expandAll( + rule, + runtime.network, + noCalls && !!chain?.startsWith('eip155:') + ); + const assets = (expanded ?? rule.assets ?? []) as RuleAsset[]; + if (rule.transferTo !== undefined) { + if (!Array.isArray(rule.transferTo)) + throw refuse('transferTo must be an array', 'TRANSFER_RECIPIENT_INVALID'); + if (!noCalls) + throw refuse( + 'transferTo applies only to rules without allowed functions. Add the transfer as an allowed function instead.', + 'TRANSFER_TO_WITH_CALLS', + 'transferTo' + ); + if (!chain?.startsWith('eip155:')) + throw refuse( + 'transferTo is only available on EVM networks.', + 'TOKENS_ONLY_UNSUPPORTED', + 'transferTo' + ); + } + let allowedCalls = rule.allowedCalls; + if (noCalls && assets.length && chain?.startsWith('solana:')) + throw refuse( + 'A Solana rule needs an app: tokens alone cannot be transferred there.', + 'TOKENS_ONLY_UNSUPPORTED', + 'allowedCalls' + ); + if (noCalls && assets.length && chain?.startsWith('eip155:')) + allowedCalls = await transferCalls(rule, assets, runtime, owner, snap); + if ( + !expanded && + allowedCalls === rule.allowedCalls && + !('transferTo' in rule) + ) + return input; + // Spread keeps the public-input marker symbol. + const out = { ...rule, ...(expanded ? { assets: expanded } : {}) }; + delete out.transferTo; + if (allowedCalls !== undefined) out.allowedCalls = allowedCalls; + return out as unknown as InternalRule; +} diff --git a/packages/core/src/lib/agentic/management/rules-write.ts b/packages/core/src/lib/agentic/management/rules-write.ts new file mode 100644 index 00000000..07c8f0ae --- /dev/null +++ b/packages/core/src/lib/agentic/management/rules-write.ts @@ -0,0 +1,452 @@ +import { assertNoDuplicateRules } from './duplicates'; +import type { Address, Hex } from 'viem'; +import { PROGRESS_HOOK } from '../../progress-hook/progress-hook.types'; +import type { + MultiCall, + UniversalTxResponse, +} from '../../orchestrator/orchestrator.types'; +import { AgenticCapability, requireCapability } from '../capabilities'; +import { type AgenticGeneration } from '../deployments'; +import { rulesId as computeRulesId } from '../codec/ids'; +import { prepareWalletRules } from './prepare'; +import { assertLabel } from './label'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import type { AgenticRuntime } from '../runtime'; +import type { + AgenticHex, + AgenticProgressHook, + InternalRule, +} from '../agentic.types'; +import { + readActiveRules, + readNativeSpend, + readUniversalSpend, +} from '../reads/rules'; +import { Snapshot } from '../reads/snapshot'; +import { + assertCanSign, + assertOwner, + confirmedLogs, + emitAgentic, + sendOwnerCalls, + wrapSendError, +} from './common'; + +const MODE_NATIVE = 1; + +async function finish( + runtime: AgenticRuntime, + hook: AgenticProgressHook | undefined, + operation: string, + run: () => Promise +): Promise { + try { + const result = await run(); + emitAgentic( + runtime, + hook, + PROGRESS_HOOK.AGENTIC_TX_199_01, + operation, + result.tx.hash + ); + return result; + } catch (err) { + const wrapped = wrapSendError(err) as { + code?: string; + message?: string; + decodedError?: unknown; + }; + emitAgentic( + runtime, + hook, + PROGRESS_HOOK.AGENTIC_TX_199_02, + operation, + wrapped?.code ?? 'UNKNOWN', + wrapped?.message ?? String(err), + wrapped?.decodedError + ); + throw wrapped; + } +} + +/** w.rules.add(rules): owner grants on an existing wallet, IDs in input order. */ +export async function addRules( + runtime: AgenticRuntime, + gen: AgenticGeneration, + wallet: Address, + rules: readonly InternalRule[], + hook?: AgenticProgressHook +): Promise<{ rulesIds: AgenticHex[]; tx: UniversalTxResponse }> { + assertCanSign(runtime, 'rules.add'); + if (!Array.isArray(rules) || rules.length === 0) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'rules.add needs at least one rule' + ); + } + const snap = await Snapshot.at(runtime.reader); + const owner = await assertOwner(runtime, gen, wallet, snap); + const prepared = await prepareWalletRules( + runtime, + gen, + owner, + wallet, + rules, + snap + ); + assertNoDuplicateRules(prepared, await readActiveRules(snap, gen, wallet)); + const nonce = BigInt( + await snap.read(wallet, gen.contracts.abis.wallet, 'grantNonce') + ); + const predicted = prepared.map((p, i) => + computeRulesId({ + validator: gen.addresses.sessionValidator, + agent: p.agent, + grantNonce: nonce + BigInt(i), + }) + ); + // One rule: a direct owner grant (one RULES_GRANTED tick). Several: one + // owner `execute` batch of self-calls, so the grants are atomic and need a + // single signature on every signer type (each grant then also ticks one + // OWNER_ACTION before its RULES_GRANTED). + const grants = prepared.map((p) => gen.contracts.encodeGrantRules(p.session)); + const calls: MultiCall[] = + grants.length === 1 + ? [{ to: wallet, value: BigInt(0), data: grants[0] }] + : [ + { + to: wallet, + value: BigInt(0), + data: gen.contracts.encodeExecute( + grants.map((data) => ({ target: wallet, value: BigInt(0), data })) + ), + }, + ]; + return finish(runtime, hook, 'rules.add', async () => { + const tx = await sendOwnerCalls(runtime, calls, hook); + const { logs } = await confirmedLogs(runtime, tx); + const granted = gen.contracts + .parseRulesGranted(logs, wallet) + .map((g) => g.rulesId as AgenticHex); + if (!sameIds(granted, predicted)) { + throw new AgenticError( + AGENTIC_ERROR_CODE.RECEIPT_MISMATCH, + 'RulesGranted events do not match the requested rules in order (a concurrent grant may have raced)', + { details: { granted, predicted, txHash: tx.hash } } + ); + } + emitAgentic(runtime, hook, PROGRESS_HOOK.AGENTIC_TX_104, granted); + return { rulesIds: granted, tx }; + }); +} + +/** Bare revoke (no IDs, empty list, or anything but { all: true }) is refused. */ +export function assertRevokeTarget(target: unknown): { + all: boolean; + ids?: AgenticHex[]; +} { + const all = + !!target && + !Array.isArray(target) && + (target as { all?: unknown }).all === true; + const ids = Array.isArray(target) ? (target as AgenticHex[]) : undefined; + if (!all && (!ids || ids.length === 0)) { + throw new AgenticError( + AGENTIC_ERROR_CODE.DELETE_NEEDS_TARGET, + 'rules.delete needs explicit rule IDs or { all: true }', + { + hint: 'A bare revoke that wipes every rule is too easy to make by mistake.', + } + ); + } + return { all, ids }; +} + +/** w.rules.delete(ids) / w.rules.delete({ all: true }). Bare revoke is refused. */ +export async function revokeRules( + runtime: AgenticRuntime, + gen: AgenticGeneration, + wallet: Address, + target: + | AgenticHex[] + | { all: true; progressHook?: AgenticProgressHook } + | undefined, + hook?: AgenticProgressHook +): Promise { + const { all, ids } = assertRevokeTarget(target); + if (all) + hook = + (target as { progressHook?: AgenticProgressHook }).progressHook ?? hook; + assertCanSign(runtime, 'rules.delete'); + const snap = await Snapshot.at(runtime.reader); + await assertOwner(runtime, gen, wallet, snap); + + let calls: MultiCall[]; + if (all) { + calls = [ + { + to: wallet, + value: BigInt(0), + data: gen.contracts.encodeRevokeAllRules(), + }, + ]; + } else { + const unique = new Set((ids as Hex[]).map((i) => i.toLowerCase())); + if (unique.size !== (ids as Hex[]).length) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'rules.delete got the same rule ID twice' + ); + } + for (const id of ids as Hex[]) { + const enabled = await snap.read( + gen.addresses.sessionEngine, + gen.contracts.abis.engine, + 'isPermissionEnabled', + [id, wallet] + ); + if (!enabled) { + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_NOT_FOUND, + `rule ${id} is not enabled on ${wallet}` + ); + } + } + // Several IDs go through one owner `execute` batch so revocation is atomic + // regardless of signer batching support. + calls = + (ids as Hex[]).length === 1 + ? [ + { + to: wallet, + value: BigInt(0), + data: gen.contracts.encodeRevokeRules((ids as Hex[])[0]), + }, + ] + : [ + { + to: wallet, + value: BigInt(0), + data: gen.contracts.encodeExecute( + (ids as Hex[]).map((id) => ({ + target: wallet, + value: BigInt(0), + data: gen.contracts.encodeRevokeRules(id), + })) + ), + }, + ]; + } + const result = await finish(runtime, hook, 'rules.delete', async () => { + const tx = await sendOwnerCalls(runtime, calls, hook); + const { logs } = await confirmedLogs(runtime, tx); + const revoked = gen.contracts + .parseRulesRevoked(logs, wallet) + .map((r) => r.rulesId); + emitAgentic( + runtime, + hook, + PROGRESS_HOOK.AGENTIC_TX_105, + all ? { all: true } : { rulesIds: revoked } + ); + return { tx }; + }); + return result.tx; +} + +/** + * w.rules.update({ rules: [{ rulesId, rule }] }): for every pair, inside ONE + * owner `execute` batch: assertSpent(expected) → revokeRules(old) → + * grantRules(new). Never falls back to sequential sends. An agent spending + * between the read and inclusion makes the whole batch revert; retry needs a + * fresh read and a new owner signature. New counters start at zero. + */ +export async function updateRules( + runtime: AgenticRuntime, + gen: AgenticGeneration, + wallet: Address, + params: { + rules: { rulesId: AgenticHex; rule: InternalRule }[]; + progressHook?: AgenticProgressHook; + } +): Promise<{ + rules: { rulesId: AgenticHex; replaced: AgenticHex }[]; + tx: UniversalTxResponse; +}> { + const hook = params?.progressHook; + assertCanSign(runtime, 'rules.update'); + if (!params || !Array.isArray(params.rules) || params.rules.length === 0) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'rules.update needs at least one { rulesId, rule } pair' + ); + } + requireCapability(gen.capabilities, AgenticCapability.OWNER_EXECUTE); + const oldIds = params.rules.map((p) => p.rulesId.toLowerCase()); + if (new Set(oldIds).size !== oldIds.length) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'rules.update names the same old rule twice' + ); + } + + const snap = await Snapshot.at(runtime.reader); + const owner = await assertOwner(runtime, gen, wallet, snap); + const active = await readActiveRules(snap, gen, wallet); + const byId = new Map(active.map((r) => [r.rulesId.toLowerCase(), r])); + + const assertions: { configId: Hex; data: Hex }[][] = []; + for (const pair of params.rules) { + const old = byId.get(pair.rulesId.toLowerCase()); + if (!old) + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_NOT_FOUND, + `rule ${pair.rulesId} is not enabled on ${wallet}` + ); + if (old.mode === MODE_NATIVE) { + requireCapability( + gen.capabilities, + AgenticCapability.ASSERT_SPENT_NATIVE + ); + const guards = []; + for (const action of old.actionIds) { + const spend = await readNativeSpend(snap, gen, wallet, old, action); + guards.push({ + configId: spend.configId, + data: gen.contracts.encodeAssertSpentNative( + spend.configId, + wallet, + spend + ), + }); + } + assertions.push(guards); + } else { + requireCapability( + gen.capabilities, + AgenticCapability.ASSERT_SPENT_UNIVERSAL_MULTI + ); + const spend = await readUniversalSpend(snap, gen, wallet, old); + assertions.push([ + { + configId: spend.configId, + data: gen.contracts.encodeAssertSpentUniversal( + spend.configId, + wallet, + spend.expectedSpent + ), + }, + ]); + } + } + const prepared = await prepareWalletRules( + runtime, + gen, + owner, + wallet, + params.rules.map((p) => p.rule), + snap + ); + const nonce = BigInt( + await snap.read(wallet, gen.contracts.abis.wallet, 'grantNonce') + ); + const predicted = prepared.map((p, i) => + computeRulesId({ + validator: gen.addresses.sessionValidator, + agent: p.agent, + grantNonce: nonce + BigInt(i), + }) + ); + + const batch = params.rules.flatMap((pair, i) => [ + ...assertions[i].map((a) => ({ + target: gen.addresses.rulesPolicy, + value: BigInt(0), + data: a.data, + })), + { + target: wallet, + value: BigInt(0), + data: gen.contracts.encodeRevokeRules(pair.rulesId), + }, + { + target: wallet, + value: BigInt(0), + data: gen.contracts.encodeGrantRules(prepared[i].session), + }, + ]); + const call: MultiCall = { + to: wallet, + value: BigInt(0), + data: gen.contracts.encodeExecute(batch), + }; + + return finish(runtime, hook, 'rules.update', async () => { + const tx = await sendOwnerCalls(runtime, [call], hook); + const { logs } = await confirmedLogs(runtime, tx); + const granted = gen.contracts + .parseRulesGranted(logs, wallet) + .map((g) => g.rulesId as AgenticHex); + const revoked = gen.contracts + .parseRulesRevoked(logs, wallet) + .map((r) => r.rulesId.toLowerCase()); + if ( + !sameIds(granted, predicted) || + !sameIds(revoked as Hex[], oldIds as Hex[]) + ) { + throw new AgenticError( + AGENTIC_ERROR_CODE.RECEIPT_MISMATCH, + 'rules.update receipt does not show the expected revoke/grant pairs', + { details: { granted, predicted, revoked, txHash: tx.hash } } + ); + } + emitAgentic(runtime, hook, PROGRESS_HOOK.AGENTIC_TX_105, { + rulesIds: params.rules.map((p) => p.rulesId), + }); + emitAgentic(runtime, hook, PROGRESS_HOOK.AGENTIC_TX_104, granted); + return { + tx, + rules: granted.map((id, i) => ({ + rulesId: id, + replaced: params.rules[i].rulesId, + })), + }; + }); +} + +function sameIds(a: readonly Hex[], b: readonly Hex[]): boolean { + return ( + a.length === b.length && + a.every((x, i) => x.toLowerCase() === b[i].toLowerCase()) + ); +} + +/** Direct owner rename; empty resets the default label without a checkpoint. */ +export async function setLabel( + runtime: AgenticRuntime, + gen: AgenticGeneration, + wallet: Address, + label: string, + hook?: AgenticProgressHook +): Promise { + assertLabel(label); + assertCanSign(runtime, 'setLabel'); + requireCapability(gen.capabilities, AgenticCapability.SET_LABEL); + return finish(runtime, hook, 'setLabel', async () => { + await assertOwner(runtime, gen, wallet, await Snapshot.at(runtime.reader)); + const tx = await sendOwnerCalls( + runtime, + [ + { + to: wallet, + value: BigInt(0), + data: gen.contracts.encodeSetLabel(label), + }, + ], + hook + ); + await confirmedLogs(runtime, tx); + emitAgentic(runtime, hook, PROGRESS_HOOK.AGENTIC_TX_106, label); + return { tx }; + }).then(({ tx }) => tx); +} diff --git a/packages/core/src/lib/agentic/management/svm-context.ts b/packages/core/src/lib/agentic/management/svm-context.ts new file mode 100644 index 00000000..2187712c --- /dev/null +++ b/packages/core/src/lib/agentic/management/svm-context.ts @@ -0,0 +1,115 @@ +/** Internal resolved context; no public Rule schema or cluster assumptions. */ +import { getAddress, type Address, type Hex } from 'viem'; +import { PUSH_NETWORK } from '../../constants/enums'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import { + PRC20_SOURCE_ABI, + readGasPrc20, + readSvmSourceToken, +} from '../contracts/prc20-metadata'; +import { + svmKey, + resolveAgwSvmRuleContext, + type SvmTokenAccountInput, + type ResolvedSvmAsset, +} from '../codec/svm-accounts'; +import type { AssetCapWire } from '../codec/universal-terms'; +import type { Snapshot } from '../reads/snapshot'; + +export interface SvmMetadataProvider { + /** Must identify the requested full CAIP-2 cluster; no global gateway default. */ + gateway( + chainNamespace: `solana:${string}` + ): Promise<{ chainNamespace: string; program: string }>; + /** RPC-backed mint owner (legacy SPL or Token-2022), not an assumed default. */ + mint( + chainNamespace: `solana:${string}`, + address: Hex + ): Promise<{ mint: string; tokenProgram: string }>; +} + +const ZERO_KEY = `0x${'00'.repeat(32)}` as Hex; + +export async function resolveSvmAssets( + snap: Snapshot, + chain: `solana:${string}`, + caps: readonly AssetCapWire[], + metadata: SvmMetadataProvider, + network: PUSH_NETWORK = PUSH_NETWORK.TESTNET_DONUT +): Promise { + const gas = await readGasPrc20(snap, chain); + const out: ResolvedSvmAsset[] = []; + for (const cap of caps) { + const token = getAddress(cap.token); + const namespace = await snap.read( + token, + PRC20_SOURCE_ABI, + 'SOURCE_CHAIN_NAMESPACE' + ); + if (namespace !== chain) + throw new AgenticError( + AGENTIC_ERROR_CODE.ASSET_CHAIN_MISMATCH, + `PRC20 ${token} belongs to ${namespace}, not ${chain}` + ); + const source = await readSvmSourceToken(snap, token, chain, network); + const native = source === ZERO_KEY; + if (native) { + if (token !== gas) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'native marker is not the registered gas PRC20' + ); + out.push({ kind: 'native', cap: { ...cap, token } }); + } else { + const key = svmKey(source); + const mint = await metadata.mint(chain, key); + if (svmKey(mint.mint) !== key) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'mint resolver returned a different mint' + ); + out.push({ kind: 'spl', cap: { ...cap, token }, ...mint }); + } + } + return out; +} + +export async function resolveSvmContext( + snap: Snapshot, + wallet: Address, + chain: `solana:${string}`, + caps: readonly AssetCapWire[], + metadata: SvmMetadataProvider, + outputs: readonly SvmTokenAccountInput[] = [], + network: PUSH_NETWORK = PUSH_NETWORK.TESTNET_DONUT +) { + const gateway = await metadata.gateway(chain); + if (gateway.chainNamespace !== chain) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'gateway registry cluster mismatch' + ); + const assets = await resolveSvmAssets(snap, chain, caps, metadata, network); + const resolvedOutputs = []; + for (const output of outputs) { + const key = svmKey(output.mint); + const resolved = await metadata.mint(chain, key); + if ( + svmKey(resolved.mint) !== key || + (output.tokenProgram && + svmKey(output.tokenProgram) !== svmKey(resolved.tokenProgram)) + ) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'output mint/token-program mismatch' + ); + resolvedOutputs.push(resolved); + } + // Derivation validates token programs and covers every mint/output. + return resolveAgwSvmRuleContext( + wallet, + gateway.program, + assets, + resolvedOutputs + ); +} diff --git a/packages/core/src/lib/agentic/management/svm-metadata.ts b/packages/core/src/lib/agentic/management/svm-metadata.ts new file mode 100644 index 00000000..82aa0bef --- /dev/null +++ b/packages/core/src/lib/agentic/management/svm-metadata.ts @@ -0,0 +1,75 @@ +import { Connection, PublicKey } from '@solana/web3.js'; +import { svmKey } from '../codec/svm-accounts'; +import { svmInvalid } from '../codec/svm-terms'; +import type { SvmMetadataProvider } from './svm-context'; +import { AgenticError, AGENTIC_ERROR_CODE } from '../errors'; + +export interface SvmClusterConfig { + gatewayProgram: string; + rpcUrls: readonly string[]; +} +type MintRpc = Pick; +const SPL = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'; +const TOKEN_2022 = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'; + +/** Explicit cluster configuration; HTTP reads only, no signing/subscriptions. */ +export function createSvmMetadataProvider( + clusters: Readonly>>, + connect: (url: string) => MintRpc = (url) => new Connection(url, 'confirmed') +): SvmMetadataProvider { + function config(chain: `solana:${string}`) { + const c = clusters[chain]; + if (!c || !c.rpcUrls.length) + throw svmInvalid(`no SVM registry/RPC configuration for ${chain}`); + svmKey(c.gatewayProgram); + return c; + } + async function read( + chain: `solana:${string}`, + fn: (rpc: MintRpc) => Promise + ): Promise { + const c = config(chain); + let last: unknown; + for (const url of c.rpcUrls) { + try { + const rpc = connect(url); + // CAIP-2 Solana references are the first 32 characters of genesisHash. + if (`solana:${(await rpc.getGenesisHash()).slice(0, 32)}` !== chain) + throw svmInvalid('SVM RPC genesis/cluster mismatch'); + return await fn(rpc); + } catch (error) { + last = error; + } + } + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `SVM metadata lookup failed for ${chain}`, + { cause: last } + ); + } + return { + gateway: async (chain) => + read(chain, async () => ({ + chainNamespace: chain, + program: config(chain).gatewayProgram, + })), + mint: async (chain, address) => + read(chain, async (rpc) => { + const mint = new PublicKey( + Buffer.from(svmKey(address).slice(2), 'hex') + ); + const info = await rpc.getAccountInfo(mint, 'confirmed'); + if (!info || info.executable) + throw svmInvalid('mint account missing or executable'); + const owner = info.owner.toBase58(), + data = info.data; + const legacy = owner === SPL && data.length === 82; + const extended = + owner === TOKEN_2022 && + (data.length === 82 || (data.length >= 166 && data[165] === 1)); + if ((!legacy && !extended) || data[45] !== 1) + throw svmInvalid('account is not an initialized supported SPL mint'); + return { mint: mint.toBase58(), tokenProgram: owner }; + }), + }; +} diff --git a/packages/core/src/lib/agentic/management/svm-public.ts b/packages/core/src/lib/agentic/management/svm-public.ts new file mode 100644 index 00000000..c15c323a --- /dev/null +++ b/packages/core/src/lib/agentic/management/svm-public.ts @@ -0,0 +1,151 @@ +import { PublicKey } from '@solana/web3.js'; +import { getAddress, hexToBytes, zeroAddress } from 'viem'; +import type { Address, Hex } from 'viem'; +import { CHAIN, VM } from '../../constants/enums'; +import { CHAIN_INFO } from '../../constants/chain'; +import type { SolanaRule, DecodedSolanaRule } from '../agentic.types'; +import type { AgenticRuntime } from '../runtime'; +import type { Snapshot } from '../reads/snapshot'; +import { readGasPrc20 } from '../contracts/prc20-metadata'; +import { resolveSvmContext } from './svm-context'; +import { createSvmMetadataProvider } from './svm-metadata'; +import { deriveAgwSvmAta, svmKey } from '../codec/svm-accounts'; +import { compileSvmIdlRule } from '../codec/svm-idl'; +import { svmInvalid } from '../codec/svm-terms'; +import { refuseFromEndPins, validateSvmTerms } from '../codec/svm-terms'; +import { tokenRouteUnavailable } from '../errors'; + +export function svmMetadata(runtime: AgenticRuntime) { + return ( + runtime.svmMetadata ?? + createSvmMetadataProvider({ + [CHAIN.SOLANA_DEVNET]: { + gatewayProgram: CHAIN_INFO[CHAIN.SOLANA_DEVNET].lockerContract ?? '', + rpcUrls: CHAIN_INFO[CHAIN.SOLANA_DEVNET].defaultRPC, + }, + }) + ); +} +export async function preparePublicSvmRule( + runtime: AgenticRuntime, + snap: Snapshot, + wallet: Address, + rule: SolanaRule | DecodedSolanaRule +) { + const chain = rule.chainNamespace as CHAIN; + if (CHAIN_INFO[chain]?.vm !== VM.SVM) + throw svmInvalid('unknown Solana chain'); + if (!Array.isArray(rule.assets) || rule.assets.length > 8) + throw svmInvalid('assets must contain at most eight entries'); + // URP compares the attached PC to this ceiling, so zero refuses every send. + if (rule.maxGasPerCall === BigInt(0)) + throw svmInvalid('maxGasPerCall must be positive'); + const raw = 'format' in rule && rule.format === 'decoded'; + const outputTokens = 'outputTokens' in rule ? rule.outputTokens : undefined; + if (outputTokens !== undefined && !Array.isArray(outputTokens)) + throw svmInvalid('outputTokens must be an array of mint addresses'); + const metadata = svmMetadata(runtime); + const requested = rule.assets.length + ? rule.assets + : [{ token: zeroAddress, maxPerCall: BigInt(0), maxTotal: BigInt(0) }]; + const caps: { token: Address; maxPerCall: bigint; maxTotal: bigint }[] = []; + const tokenAccounts = new Map(), + mints = new Set(); + const sources: { key?: Hex; token: Address }[] = []; + for (const [assetIndex, asset] of requested.entries()) { + const source = + typeof asset.token === 'string' ? asset.token : asset.token?.address; + if (typeof source !== 'string') + throw svmInvalid('asset token requires an address'); + if ( + typeof asset.token !== 'string' && + 'chain' in asset.token && + asset.token.chain !== chain + ) + throw svmInvalid('asset token belongs to another chain'); + const native = + source === zeroAddress || + /^0x0{64}$/.test(source) || + source === '11111111111111111111111111111111'; + const key = native ? undefined : svmKey(source); + const sourceToken = + typeof asset.token === 'string' && key + ? new PublicKey(hexToBytes(key)).toBase58() + : asset.token; + let token: Address; + if (native) token = await readGasPrc20(snap, chain); + else { + try { + token = runtime.resolvePrc20(sourceToken, chain); + } catch (cause) { + throw tokenRouteUnavailable(cause, source, chain, assetIndex); + } + } + if (caps.some((c) => c.token === getAddress(token))) + throw svmInvalid('duplicate SVM asset'); + caps.push({ + token: getAddress(token), + maxPerCall: asset.maxPerCall, + maxTotal: asset.maxTotal ?? BigInt(0), + }); + sources.push({ key, token }); + if (key) mints.add(key); + } + const outputs = (outputTokens ?? []).map((mint) => ({ mint })); + outputs.forEach((o) => mints.add(svmKey(o.mint))); + const ctx = await resolveSvmContext( + snap, + wallet, + rule.chainNamespace, + caps, + metadata, + outputs, + runtime.network + ); + // Validate the PRC20 actually represents the requested source mint, not merely its chain. + const { resolveSvmAssets } = await import('./svm-context'); + const resolved = await resolveSvmAssets( + snap, + rule.chainNamespace, + caps, + metadata, + runtime.network + ); + resolved.forEach((a, i) => { + if ( + sources[i].key + ? a.kind !== 'spl' || svmKey(a.mint) !== sources[i].key + : a.kind !== 'native' + ) + throw svmInvalid('PRC20 source does not match requested asset'); + }); + for (const mint of mints) { + const token = await metadata.mint(rule.chainNamespace, mint); + if (svmKey(token.mint) !== mint) + throw svmInvalid('mint resolver returned another mint'); + tokenAccounts.set(mint, deriveAgwSvmAta(ctx.expectedCEA, token)); + } + if (raw) { + const stored = rule as DecodedSolanaRule; + if ( + svmKey(stored.expectedCEA) !== ctx.expectedCEA || + svmKey(stored.gatewayProgram) !== ctx.gatewayProgram + ) + throw svmInvalid('decoded rule belongs to another wallet or gateway'); + if ( + ctx.ceaAccounts.some( + (a) => !stored.ceaAccounts.some((s) => svmKey(s) === a) + ) + ) + throw svmInvalid('decoded rule omits a required wallet value account'); + const terms = { ...stored, assets: caps }; + validateSvmTerms(terms, runtime.nowSeconds()); + refuseFromEndPins(terms); + return terms; + } + return compileSvmIdlRule( + rule as SolanaRule, + { ...ctx, tokenAccounts }, + runtime.nowSeconds() + ); +} diff --git a/packages/core/src/lib/agentic/management/svm.ts b/packages/core/src/lib/agentic/management/svm.ts new file mode 100644 index 00000000..d2f6b223 --- /dev/null +++ b/packages/core/src/lib/agentic/management/svm.ts @@ -0,0 +1,254 @@ +/** Internal explicit-wire operations. Not exported by the SDK entry point. */ +import { getAddress, type Address, type Hex } from 'viem'; +import type { AgenticRuntime } from '../runtime'; +import { + resolveWalletGeneration, + verifyPolicyVersion, + type AgenticGeneration, +} from '../deployments'; +import { Snapshot } from '../reads/snapshot'; +import { readSvmRule } from '../reads/svm'; +import { + assertCanSign, + assertOwner, + confirmedLogs, + wrapSendError, +} from './common'; +import { encodeSvmTerms, type SvmTermsWire } from '../codec/svm-terms'; +import { buildSession, encodeEnvelope } from '../codec/session'; +import { rulesId as predictRulesId } from '../codec/ids'; +import { SEND_OUTBOUND_SELECTOR } from '../contracts/v6'; +import { deriveAgwSvmCea } from '../codec/svm-accounts'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import { PRC20_SOURCE_ABI } from '../contracts/prc20-metadata'; + +async function verifyAssets(snap: Snapshot, input: SvmWireGrant) { + if (!/^solana:[1-9A-HJ-NP-Za-km-z]{32}$/.test(input.chainNamespace)) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'SVM chain must be a full Solana CAIP-2 namespace' + ); + for (const cap of input.terms.assets) { + if ( + (await snap.read( + cap.token, + PRC20_SOURCE_ABI, + 'SOURCE_CHAIN_NAMESPACE' + )) !== input.chainNamespace + ) + throw new AgenticError( + AGENTIC_ERROR_CODE.ASSET_CHAIN_MISMATCH, + 'SVM asset source-chain mismatch' + ); + } +} + +export interface SvmWireGrant { + agent: Address; + chainNamespace: `solana:${string}`; + terms: SvmTermsWire; +} + +export async function verifySvmWallet( + runtime: AgenticRuntime, + gen: AgenticGeneration, + wallet: Address +) { + const actual = await resolveWalletGeneration( + runtime.reader, + runtime.network, + wallet + ); + if (actual.addresses.factory !== gen.addresses.factory) + throw new AgenticError( + AGENTIC_ERROR_CODE.CAPABILITY_UNAVAILABLE, + 'SVM wallet generation mismatch' + ); + await verifyPolicyVersion(runtime.reader, gen); +} + +function session( + gen: AgenticGeneration, + wallet: Address, + owner: Address, + input: SvmWireGrant, + now: number +) { + const agent = getAddress(input.agent); + if (agent === owner) + throw new AgenticError( + AGENTIC_ERROR_CODE.AGENT_IS_OWNER, + 'agent must differ from owner' + ); + const cea = deriveAgwSvmCea(wallet, input.terms.gatewayProgram).address; + if (cea.toLowerCase() !== input.terms.expectedCEA.toLowerCase()) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'SVM expectedCEA does not belong to this wallet/gateway' + ); + return buildSession({ + validator: gen.addresses.sessionValidator, + rulesPolicy: gen.addresses.rulesPolicy, + agent, + actions: [ + { + target: gen.addresses.gateway, + selector: SEND_OUTBOUND_SELECTOR, + initData: encodeEnvelope( + input.chainNamespace, + encodeSvmTerms(input.terms, now) + ), + }, + ], + }); +} + +export async function grantSvmWire( + runtime: AgenticRuntime, + gen: AgenticGeneration, + wallet: Address, + input: SvmWireGrant +) { + assertCanSign(runtime, 'internal SVM grant'); + await verifySvmWallet(runtime, gen, wallet); + const snap = await Snapshot.at(runtime.reader); + const owner = await assertOwner(runtime, gen, wallet, snap); + await verifyAssets(snap, input); + const s = session(gen, wallet, owner, input, runtime.nowSeconds()); + const nonce = await snap.read( + wallet, + gen.contracts.abis.wallet, + 'grantNonce' + ); + const expected = predictRulesId({ + validator: gen.addresses.sessionValidator, + agent: getAddress(input.agent), + grantNonce: nonce, + }); + let tx; + try { + tx = await runtime.execute({ + to: wallet, + value: BigInt(0), + data: gen.contracts.encodeGrantRules(s), + }); + } catch (error) { + throw wrapSendError(error); + } + const { logs } = await confirmedLogs(runtime, tx); + const granted = gen.contracts.parseRulesGranted(logs, wallet); + if ( + granted.length !== 1 || + granted[0].mode !== 0 || + granted[0].chainNamespace !== input.chainNamespace + ) + throw new AgenticError( + AGENTIC_ERROR_CODE.RECEIPT_MISMATCH, + 'SVM grant receipt did not match this operation', + { details: { txHash: tx.hash, expected } } + ); + // Another owner grant can advance grantNonce between read and inclusion. + // The sole matching event from this receipt is the authoritative ID. + return { rulesId: granted[0].rulesId, tx }; +} + +/** Snapshot -> all-asset assertion -> revoke -> grant. No sequential fallback. */ +export async function prepareSvmReplacement( + runtime: AgenticRuntime, + gen: AgenticGeneration, + wallet: Address, + oldId: Hex, + input: SvmWireGrant +) { + assertCanSign(runtime, 'internal SVM replacement'); + await verifySvmWallet(runtime, gen, wallet); + const snap = await Snapshot.at(runtime.reader); + const owner = await assertOwner(runtime, gen, wallet, snap); + await verifyAssets(snap, input); + const old = await readSvmRule( + snap, + gen, + wallet, + oldId, + runtime.pushChainNamespace + ); + const s = session(gen, wallet, owner, input, runtime.nowSeconds()); + const nonce = await snap.read( + wallet, + gen.contracts.abis.wallet, + 'grantNonce' + ); + const rulesId = predictRulesId({ + validator: gen.addresses.sessionValidator, + agent: getAddress(input.agent), + grantNonce: nonce, + }); + const calls = [ + { + target: gen.addresses.rulesPolicy, + value: BigInt(0), + data: gen.contracts.encodeAssertSpentUniversal( + old.configId, + wallet, + old.config.assets.map((a) => a.spent) + ), + }, + { + target: wallet, + value: BigInt(0), + data: gen.contracts.encodeRevokeRules(oldId), + }, + { + target: wallet, + value: BigInt(0), + data: gen.contracts.encodeGrantRules(s), + }, + ]; + return { + rulesId, + oldId, + snapshotBlock: snap.blockNumber, + data: gen.contracts.encodeExecute(calls), + }; +} + +export async function replaceSvmWire( + runtime: AgenticRuntime, + gen: AgenticGeneration, + wallet: Address, + oldId: Hex, + input: SvmWireGrant +) { + const prepared = await prepareSvmReplacement( + runtime, + gen, + wallet, + oldId, + input + ); + let tx; + try { + tx = await runtime.execute({ + to: wallet, + value: BigInt(0), + data: prepared.data, + }); + } catch (error) { + throw wrapSendError(error); + } + const { logs } = await confirmedLogs(runtime, tx); + const grants = gen.contracts.parseRulesGranted(logs, wallet); + const revokes = gen.contracts.parseRulesRevoked(logs, wallet); + if ( + grants.length !== 1 || + grants[0].mode !== 0 || + grants[0].chainNamespace !== input.chainNamespace || + !revokes.some((r) => r.rulesId.toLowerCase() === oldId.toLowerCase()) + ) + throw new AgenticError( + AGENTIC_ERROR_CODE.RECEIPT_MISMATCH, + 'SVM replacement receipt mismatch', + { details: { txHash: tx.hash } } + ); + return { rulesId: grants[0].rulesId, replaced: oldId, tx }; +} diff --git a/packages/core/src/lib/agentic/presets/catalog.ts b/packages/core/src/lib/agentic/presets/catalog.ts new file mode 100644 index 00000000..c68a5d06 --- /dev/null +++ b/packages/core/src/lib/agentic/presets/catalog.ts @@ -0,0 +1,203 @@ +import { getAddress, parseUnits, type Address } from 'viem'; +import type { + ArgumentPath, + RuleCall, + ForeignChainNamespace, +} from '../agentic.types'; +import type { PresetCategory } from './types'; + +/** Caps filled from the preset's native ETH asset (its maxPerCall). */ +export type PresetBudget = + | { kind: 'native-value' } + | { kind: 'native-amount'; amountArg: ArgumentPath }; +export interface PresetCallDefinition extends RuleCall { + budget?: PresetBudget; +} + +/** Internal catalog: reviewed addresses and explicit calls only; never fetched at runtime. */ +export interface PresetChainDefinition { + chainNamespace: ForeignChainNamespace; + allowedCalls: readonly PresetCallDefinition[]; + maxGasPerCall?: bigint; +} +export interface PresetDefinition { + constant: PresetCategory; + name: string; + chains: readonly PresetChainDefinition[]; +} +/** Testnet entries that ran live on Donut. Every preset sends native ETH from Push + * and wraps it on arrival; no other token is moved from Push. Circle USDC is only + * the destination-side swap token (the only WETH pools with liquidity, checked + * read-only on October 24). Evidence: plan/agw/research/. + */ +const address = (value: string): Address => getAddress(value.toLowerCase()); +const wallet = 'agentic:wallet' as const; +/** Destination-held USDC per swap; editable in the returned rule. */ +const USDC_PER_SWAP = parseUnits('10', 6); +const SWAP_STRUCT = '(address,address,uint24,address,uint256,uint256,uint160)'; + +const wrap = (weth: Address): PresetCallDefinition => ({ + target: weth, + selector: 'deposit()', + app: 'WETH', + label: 'Wrap ETH', + budget: { kind: 'native-value' }, +}); +const unwrap = (weth: Address): PresetCallDefinition => ({ + target: weth, + selector: 'withdraw(uint256)', + app: 'WETH', + label: 'Unwrap WETH', + budget: { kind: 'native-amount', amountArg: 0 }, +}); +const approveWeth = ( + weth: Address, + spender: Address, + app: string +): PresetCallDefinition => ({ + target: weth, + selector: 'approve(address,uint256)', + pins: [{ arg: 0, expected: spender }], + app, + label: 'Approve WETH spending', + budget: { kind: 'native-amount', amountArg: 1 }, +}); + +const uniswap = ( + router: Address, + weth: Address, + usdc: Address +): PresetCallDefinition[] => { + const swap = ( + exactInput: boolean, + tokenIn: Address, + tokenOut: Address + ): PresetCallDefinition => { + const amountArg = [0, exactInput ? 4 : 5] as const; + return { + target: router, + selector: `${ + exactInput ? 'exactInputSingle' : 'exactOutputSingle' + }(${SWAP_STRUCT})`, + pins: [ + { arg: [0, 0], expected: tokenIn }, + { arg: [0, 1], expected: tokenOut }, + { arg: [0, 3], expected: wallet }, + ...(tokenIn === usdc ? [{ arg: amountArg, max: USDC_PER_SWAP }] : []), + ], + app: 'Uniswap V3', + label: `${exactInput ? 'Swap exact input' : 'Swap exact output'} (${ + tokenIn === weth ? 'WETH to USDC' : 'USDC to WETH' + })`, + ...(tokenIn === weth + ? { budget: { kind: 'native-amount' as const, amountArg } } + : {}), + }; + }; + return [ + wrap(weth), + approveWeth(weth, router, 'Uniswap V3'), + swap(true, weth, usdc), + swap(false, weth, usdc), + { + target: usdc, + selector: 'approve(address,uint256)', + pins: [ + { arg: 0, expected: router }, + { arg: 1, max: USDC_PER_SWAP }, + ], + app: 'Uniswap V3', + label: 'Approve USDC spending', + }, + swap(true, usdc, weth), + swap(false, usdc, weth), + unwrap(weth), + ]; +}; + +const aave = (pool: Address, weth: Address): PresetCallDefinition[] => [ + wrap(weth), + approveWeth(weth, pool, 'Aave V3'), + ...( + [ + ['supply(address,uint256,address,uint16)', 2, 'Supply'], + ['withdraw(address,uint256,address)', 2, 'Withdraw'], + ['borrow(address,uint256,uint256,uint16,address)', 4, 'Borrow'], + ['repay(address,uint256,uint256,address)', 3, 'Repay'], + ] as const + ).map( + ([selector, beneficiary, label]): PresetCallDefinition => ({ + target: pool, + selector, + pins: [ + { arg: 0, expected: weth }, + { arg: beneficiary, expected: wallet }, + ], + app: 'Aave V3', + label, + budget: { kind: 'native-amount', amountArg: 1 }, + }) + ), + unwrap(weth), +]; + +export const PRESET_CATALOG: readonly PresetDefinition[] = [ + { + constant: 'DEXES', + name: 'Popular DEXes', + chains: ( + [ + [ + 'eip155:11155111', + '0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E', + '0xfff9976782d46cc05630d1f6ebab18b2324d6b14', + '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238', + ], + [ + 'eip155:84532', + '0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4', + '0x4200000000000000000000000000000000000006', + '0x036CbD53842c5426634e7929541eC2318f3dCF7e', + ], + [ + 'eip155:421614', + '0x101F443B4d1b059569D643917553c771E1b9663E', + '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73', + '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d', + ], + ] as const + ).map(([chainNamespace, router, weth, usdc]) => ({ + chainNamespace, + allowedCalls: uniswap(address(router), address(weth), address(usdc)), + })), + }, + { + constant: 'LENDING', + name: 'Lending', + chains: ( + [ + [ + 'eip155:11155111', + '0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951', + // Aave's own Sepolia WETH reserve, not the canonical WETH. + '0xC558DBdd856501FCd9aaF1E62eae57A9F0629a3c', + ], + [ + 'eip155:84532', + '0x8bAB6d1b75f19e9eD9fCe8b9BD338844fF79aE27', + '0x4200000000000000000000000000000000000006', + ], + [ + 'eip155:421614', + '0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff', + // Aave's own Arbitrum Sepolia WETH reserve. + '0x1dF462e2712496373A347f8ad10802a5E95f053D', + ], + ] as const + ).map(([chainNamespace, pool, weth]) => ({ + chainNamespace, + allowedCalls: aave(address(pool), address(weth)), + })), + }, + { constant: 'STAKING', name: 'Staking', chains: [] }, +]; diff --git a/packages/core/src/lib/agentic/presets/default-policy.ts b/packages/core/src/lib/agentic/presets/default-policy.ts new file mode 100644 index 00000000..03ab4eac --- /dev/null +++ b/packages/core/src/lib/agentic/presets/default-policy.ts @@ -0,0 +1,26 @@ +import { parseUnits, zeroAddress } from 'viem'; +import type { RuleAsset } from '../agentic.types'; + +/** Preset-only permission policy. Ordinary rule authoring retains zero defaults. + * Amounts are ETH quantities sent from Push, not USD valuations or destination + * lifetime caps. + */ +export const PRESET_VALIDITY_SECONDS = 7 * 24 * 60 * 60; + +// Explicit profiles keep future chains from inheriting an unreviewed budget. +// 20 PC is a ceiling, not the amount charged: execution obtains a fresh quote. +export const PRESET_GAS_BUDGETS: Readonly> = + Object.fromEntries( + ['eip155:11155111', 'eip155:84532', 'eip155:421614'].map((chain) => [ + chain, + parseUnits('20', 18), + ]) + ); + +export function defaultPresetAsset(): RuleAsset { + return { + token: zeroAddress, + maxPerCall: parseUnits('0.001', 18), + maxTotal: parseUnits('0.01', 18), + }; +} diff --git a/packages/core/src/lib/agentic/presets/index.ts b/packages/core/src/lib/agentic/presets/index.ts new file mode 100644 index 00000000..7925edf3 --- /dev/null +++ b/packages/core/src/lib/agentic/presets/index.ts @@ -0,0 +1,253 @@ +import { getAddress, isAddress, zeroAddress } from 'viem'; +import { + AgenticError, + AGENTIC_ERROR_CODE, + capabilityUnavailable, + ruleConstraintLimit, +} from '../errors'; +import type { RuleAsset, RuleCall, Pin } from '../agentic.types'; +import type { + AgenticPresets, + PresetOptions, + PresetRuleTemplate, +} from './types'; +import { parseSelector } from '../codec/selectors'; +import { PRESET_CATALOG, type PresetDefinition } from './catalog'; +import { applyOperationLimits, nativeAsset } from './operation-limits'; +import { + defaultPresetAsset, + PRESET_GAS_BUDGETS, + PRESET_VALIDITY_SECONDS, +} from './default-policy'; + +const MAX_UINT256 = (BigInt(1) << BigInt(256)) - BigInt(1); +const invalid = (message: string) => + new AgenticError(AGENTIC_ERROR_CODE.INVALID_RULE, message); +function cap(value: unknown, name: string): bigint { + if (typeof value !== 'bigint' || value < BigInt(0) || value > MAX_UINT256) + throw invalid(`${name} must be a uint256 bigint`); + return value; +} +function copyCall(call: RuleCall): RuleCall { + return { + ...call, + ...(call.pins + ? { + pins: call.pins.map((pin): Pin => { + if (pin.account !== undefined) + return { + ...pin, + ...(pin.token && typeof pin.token === 'object' + ? { token: { ...pin.token } } + : {}), + }; + return { + ...pin, + arg: typeof pin.arg === 'number' ? pin.arg : [...pin.arg], + }; + }), + } + : {}), + }; +} +/** Not a public registration API. Tests inject fixtures; production uses the bundled catalog. */ +export function buildPresetApi( + catalog: readonly PresetDefinition[] +): AgenticPresets { + // Detach from the input so neither a returned template nor an input mutation changes the catalog. + const entries = catalog.map((p) => ({ + ...p, + chains: p.chains.map((c) => ({ + ...c, + allowedCalls: c.allowedCalls.map((call) => ({ + ...copyCall(call), + ...(call.budget + ? { + budget: + call.budget.kind === 'native-amount' && + typeof call.budget.amountArg !== 'number' + ? { ...call.budget, amountArg: [...call.budget.amountArg] } + : { ...call.budget }, + } + : {}), + })), + })), + })); + if ( + new Set(entries.map((e) => e.constant)).size !== entries.length || + entries.some( + (e) => + new Set(e.chains.map((c) => c.chainNamespace)).size !== e.chains.length + ) + ) + throw invalid('duplicate preset or chain in catalog'); + const api = { + list(options?: { type?: 'CATEGORY' }) { + if (options?.type !== undefined && options.type !== 'CATEGORY') + throw invalid('only CATEGORY presets are supported'); + return { + presets: entries.map((p) => ({ + type: 'CATEGORY' as const, + constant: p.constant, + name: p.name, + chains: p.chains.map((c) => c.chainNamespace), + })), + }; + }, + get(preset: string, options: PresetOptions = {}) { + const entry = entries.find((p) => p.constant === preset); + if (!entry) throw invalid(`unknown preset ${String(preset)}`); + if (!options || typeof options !== 'object' || Array.isArray(options)) + throw invalid('preset options must be an object'); + const now = Math.floor(Date.now() / 1000); + if ('funding' in options) + throw invalid( + 'The preset funding option is no longer supported. Remove it; preset assets and limits are always preserved.' + ); + if ( + options.agent !== undefined && + (!isAddress(options.agent, { strict: false }) || + getAddress(options.agent) === zeroAddress) + ) + throw invalid('preset agent must be a nonzero Push address'); + if ( + options.validUntil !== undefined && + (!Number.isSafeInteger(options.validUntil) || + options.validUntil <= now || + options.validUntil >= 2 ** 48) + ) + throw invalid('preset validUntil must be a future uint48 timestamp'); + const validUntil = options.validUntil ?? now + PRESET_VALIDITY_SECONDS; + if (options.maxGasPerCall !== undefined) + cap(options.maxGasPerCall, 'maxGasPerCall'); + if (options.assets !== undefined && !Array.isArray(options.assets)) + throw invalid('preset assets must be an array'); + const chains = + options.chainNamespace === undefined + ? entry.chains + : entry.chains.filter( + (c) => c.chainNamespace === options.chainNamespace + ); + if (options.chainNamespace !== undefined && !chains.length) + throw capabilityUnavailable( + 'presetChain', + `preset ${preset} has no approved entry for ${options.chainNamespace}` + ); + if (!chains.length && options.assets?.length) + throw capabilityUnavailable( + 'presetCatalog', + `preset ${preset} has no approved app entries` + ); + // Presets move native ETH from Push only; the app tokens are wrapped or + // swapped on the destination chain. + const assets = new Map(); + for (const asset of options.assets ?? []) { + if (!asset || typeof asset !== 'object') + throw invalid('preset asset must be an object'); + const chain = asset.chainNamespace ?? options.chainNamespace; + if (!chain) + throw invalid( + 'each asset needs chainNamespace when no chain filter is supplied' + ); + if (!chains.some((c) => c.chainNamespace === chain)) + throw invalid(`asset chain ${chain} is outside the selected preset`); + if ( + !asset.token || + !nativeAsset({ token: asset.token, maxPerCall: BigInt(0) }) + ) + throw invalid( + "Presets send only ETH from Push. Use the zero address or the chain's ETH moveable token." + ); + if (assets.has(chain)) + throw invalid('duplicate preset asset on the same chain'); + const maxPerCall = cap(asset.maxPerCall, 'maxPerCall'); + const maxTotal = cap(asset.maxTotal, 'maxTotal'); + if (maxPerCall === BigInt(0) || maxTotal === BigInt(0)) + throw invalid( + 'Set a positive maxPerCall and maxTotal for ETH. A missing or zero limit lets the agent spend nothing.' + ); + assets.set(chain, { + token: + typeof asset.token === 'string' ? asset.token : { ...asset.token }, + maxPerCall, + maxTotal, + }); + } + if (options.assets !== undefined) + for (const chain of chains) + if (!assets.has(chain.chainNamespace)) + throw invalid( + `Add an ETH asset for ${chain.chainNamespace}, or pass chainNamespace to configure one chain.` + ); + const rules: PresetRuleTemplate[] = chains.map((chain) => { + const asset = assets.get(chain.chainNamespace) ?? defaultPresetAsset(); + const maxGasPerCall = + options.maxGasPerCall ?? + chain.maxGasPerCall ?? + PRESET_GAS_BUDGETS[chain.chainNamespace]; + const calls = applyOperationLimits( + chain.allowedCalls.map((c) => ({ + ...copyCall(c), + ...(c.budget ? { budget: c.budget } : {}), + })), + asset.maxPerCall + ); + if (!calls.length || calls.length > 32) + throw capabilityUnavailable( + 'presetCalls', + 'preset must contain 1..32 allowed calls' + ); + const conditionCount = calls.reduce( + (n, c) => n + (c.pins?.length ?? 0), + 0 + ); + if (conditionCount > 32) + throw ruleConstraintLimit( + conditionCount, + calls.length, + chain.chainNamespace + ); + const pairs = new Map(); + for (const call of calls) { + if (!/^[A-Za-z_$][\w$]*\(.*\)$/.test(call.selector)) + throw invalid('preset selectors must be full signatures'); + const selector = chain.chainNamespace.startsWith('eip155:') + ? parseSelector(call.selector).selector + : call.selector; + const pair = `${ + chain.chainNamespace.startsWith('eip155:') + ? call.target.toLowerCase() + : call.target + }:${selector}`; + if (pairs.has(pair) && !chain.chainNamespace.startsWith('eip155:')) + throw capabilityUnavailable( + 'presetCalls', + 'Solana does not support alternative entries for one program/instruction' + ); + if (pairs.has(pair) && (!call.pins?.length || !pairs.get(pair))) + throw capabilityUnavailable( + 'presetCalls', + 'an unpinned alternative would bypass restrictions for this target/function' + ); + pairs.set(pair, !!call.pins?.length); + } + return { + chainNamespace: chain.chainNamespace, + allowedCalls: calls, + ...(options.agent !== undefined + ? { agent: getAddress(options.agent) } + : {}), + validUntil, + assets: [asset], + ...(maxGasPerCall !== undefined + ? { maxGasPerCall: cap(maxGasPerCall, 'maxGasPerCall') } + : {}), + }; + }); + return { rules }; + }, + }; + // Expiry is generated; the overload narrows templates when the agent is supplied. + return Object.freeze(api) as AgenticPresets; +} +export const agenticPresets = buildPresetApi(PRESET_CATALOG); diff --git a/packages/core/src/lib/agentic/presets/operation-limits.ts b/packages/core/src/lib/agentic/presets/operation-limits.ts new file mode 100644 index 00000000..9b8a2ce2 --- /dev/null +++ b/packages/core/src/lib/agentic/presets/operation-limits.ts @@ -0,0 +1,30 @@ +import { zeroAddress } from 'viem'; +import type { RuleAsset, RuleCall } from '../agentic.types'; +import type { PresetCallDefinition } from './catalog'; + +export const assetAddress = (asset: RuleAsset): string => + typeof asset.token === 'string' ? asset.token : asset.token.address; +export const nativeAsset = (asset: RuleAsset): boolean => + assetAddress(asset) === zeroAddress || + (typeof asset.token !== 'string' && asset.token.mechanism === 'native'); + +/** Fill the reviewed native-ETH caps: maxValue on the wrap, amount maxima on + * every call that spends the wrapped ETH. */ +export function applyOperationLimits( + definitions: readonly PresetCallDefinition[], + maxPerCall: bigint +): RuleCall[] { + return definitions.map(({ budget, ...call }) => { + if (budget?.kind === 'native-value') + return { ...call, maxValue: maxPerCall }; + if (budget?.kind === 'native-amount') + return { + ...call, + pins: [ + ...(call.pins ?? []), + { arg: budget.amountArg, max: maxPerCall }, + ], + }; + return call; + }); +} diff --git a/packages/core/src/lib/agentic/presets/types.ts b/packages/core/src/lib/agentic/presets/types.ts new file mode 100644 index 00000000..30bd5c0d --- /dev/null +++ b/packages/core/src/lib/agentic/presets/types.ts @@ -0,0 +1,51 @@ +import type { Address } from 'viem'; +import type { Rule, RuleAsset, ForeignChainNamespace } from '../agentic.types'; + +export type PresetCategory = 'DEXES' | 'LENDING' | 'STAKING'; +export interface Preset { + type: 'CATEGORY'; + constant: PresetCategory; + name: string; + chains: ForeignChainNamespace[]; +} +/** Presets generate expiry; optional fields retain editable-template compatibility. */ +export type PresetRuleTemplate = Omit & { + agent?: Address; + validUntil?: number; +}; +/** Presets send native ETH from Push only: the zero address, a native + * MoveableToken (for example CONSTANTS.MOVEABLE.TOKEN.BASE_SEPOLIA.ETH). */ +export interface PresetAsset { + chainNamespace?: ForeignChainNamespace; + token: RuleAsset['token']; + /** Per Push outbound and per allowed operation, in wei. Required and positive. + * Does not aggregate multiple destination calls in one transaction. */ + maxPerCall: bigint; + /** Cumulative Push-outbound amount, in wei. Required and positive. */ + maxTotal: bigint; +} +export interface PresetOptions { + /** Push-PC budget ceiling per outbound; omitted uses the catalog policy (20 PC). + * Explicit zero is preserved. This is not the fee charged. */ + maxGasPerCall?: bigint; + chainNamespace?: ForeignChainNamespace; + agent?: Address; + /** Omitted: seven days from generation time. Explicit expiry is preserved. */ + validUntil?: number; + /** Omitted: each chain gets the catalog's ETH limits. Supplied: exactly one + * native ETH asset for every selected chain. */ + assets?: PresetAsset[]; +} +export interface ReadyPresetOptions extends PresetOptions { + agent: Address; +} +export interface PresetResult< + T extends PresetRuleTemplate = PresetRuleTemplate +> { + rules: T[]; +} +export interface AgenticPresets { + list(options?: { type?: 'CATEGORY' }): { presets: Preset[] }; + get(preset: PresetCategory, options: ReadyPresetOptions): PresetResult; + get(preset: PresetCategory, options?: PresetOptions): PresetResult; +} diff --git a/packages/core/src/lib/agentic/public-rule.ts b/packages/core/src/lib/agentic/public-rule.ts new file mode 100644 index 00000000..9e1a4a80 --- /dev/null +++ b/packages/core/src/lib/agentic/public-rule.ts @@ -0,0 +1,454 @@ +import { + UNLIMITED_CALLS, + ANY_ACCOUNT_COUNT, + type ArgPinWire, +} from './codec/pins'; +/** Public section-6 rule normalization into the deployed v6 wire model. */ +import type { Idl } from '@coral-xyz/anchor'; +import { PublicKey } from '@solana/web3.js'; +import { + getAddress, + hexToBytes, + isAddress, + isHex, + numberToHex, + sha256, + toHex, + type Address, + type Hex, +} from 'viem'; +import type { + Rule, + RuleAsset, + RuleInput, + InternalRule, + NativeAction, + SolanaRule, + UniversalRule, + Pin, + ArgumentPath, +} from './agentic.types'; +import { + AGENTIC_ERROR_CODE, + AgenticError, + capabilityUnavailable, +} from './errors'; +import { parseSelector } from './codec/selectors'; +import { argumentLocation, encodeArgWord } from './codec/abi-layout'; +import { UINT256_MAX } from './codec/defaults'; +import { deriveAgwSvmCea, svmKey } from './codec/svm-accounts'; +import type { AgenticRuntime } from './runtime'; +import { CHAIN } from '../constants/enums'; +import { isMoveableTokenSet } from '../constants/tokens'; +import { resolveRuleDestination } from './management/destination'; + +export const WALLET = 'agentic:wallet' as const; +const PUBLIC_INPUT = Symbol('AGW public rule'); +/** Mark authored inputs for normalization after the wallet address is fixed. */ +export function publicRules(rules: readonly RuleInput[]): InternalRule[] { + if (!Array.isArray(rules)) throw invalid('rules must be an array'); + return rules.map((rule) => { + if (!rule || typeof rule !== 'object') + throw invalid('rule must be an object'); + return { ...rule, [PUBLIC_INPUT]: true } as unknown as InternalRule; + }); +} +export function isPublicRule(rule: InternalRule): boolean { + return !!rule && !!(rule as unknown as Record)[PUBLIC_INPUT]; +} +function invalid(message: string) { + return new AgenticError(AGENTIC_ERROR_CODE.INVALID_RULE, message); +} +function rejectFields(obj: object, fields: string[], where: string) { + for (const field of fields) + if (field in obj) + throw invalid( + `${where}.${field} is not supported by the current rule shape` + ); +} +/** Preparation expands MOVEABLE ALL markers before normalization. */ +function authoredAssets(rule: Rule): RuleAsset[] { + const assets = rule.assets ?? []; + if (assets.some((a) => isMoveableTokenSet(a?.token))) + throw invalid('expand MOVEABLE ALL assets before normalizing a rule'); + return assets; +} +function uint(value: unknown, name: string): bigint { + if (typeof value !== 'bigint' || value < BigInt(0) || value > UINT256_MAX) + throw invalid(`${name} must be a uint256 bigint`); + return value; +} +export function evmPinOffset( + selector: Rule['allowedCalls'][number]['selector'], + arg: ArgumentPath +): number { + const parsed = parseSelector(selector); + if (parsed.valueOnly) + throw invalid('value-only calls cannot have argument pins'); + if (parsed.inputs) return argumentLocation(parsed.inputs, arg, 'pin').offset; + if ( + typeof arg !== 'number' || + !Number.isSafeInteger(arg) || + arg < 0 || + 4 + 32 * arg + 32 > 65535 + ) + throw invalid('a raw selector needs a valid scalar ABI word index'); + return 4 + 32 * arg; +} +function expectedWord( + selector: Rule['allowedCalls'][number]['selector'], + arg: ArgumentPath, + value: unknown +): Hex { + const parsed = parseSelector(selector); + if (parsed.inputs) + return encodeArgWord( + argumentLocation(parsed.inputs, arg, 'pin').param, + value as Hex | bigint, + 'pin' + ); + if (typeof value === 'bigint') + return numberToHex(uint(value, 'pin.expected'), { size: 32 }); + if (typeof value === 'string' && isAddress(value, { strict: false })) + return `0x${value.slice(2).padStart(64, '0')}`.toLowerCase() as Hex; + if (typeof value === 'string' && isHex(value) && value.length === 66) + return value.toLowerCase() as Hex; + throw invalid( + 'a raw EVM selector needs an address, uint256 or exact 32-byte expected word' + ); +} +export async function normalizePublicRule( + input: InternalRule, + wallet: Address, + runtime: AgenticRuntime +): Promise { + const rule = input as unknown as RuleInput; + if ('format' in rule && rule.format === 'decoded') return input; + const r = rule as Rule; + if (!isAddress(r.agent, { strict: false }) || /^0x0{40}$/i.test(r.agent)) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'Enter a valid agent wallet address.', + { + userMessage: 'Enter a valid agent wallet address.', + details: { field: 'agent' }, + } + ); + rejectFields( + r, + [ + 'target', + 'selector', + 'actions', + 'pins', + 'amount', + 'maxCalls', + 'maxValuePerCall', + 'maxValueTotal', + 'ref', + 'allowedInstructions', + 'outputTokens', + // Expanded into transfer calls during preparation (management/rule-inputs). + 'transferTo', + ], + 'rule' + ); + if ( + !Number.isSafeInteger(r.validUntil) || + r.validUntil <= runtime.nowSeconds() || + r.validUntil >= 2 ** 48 + ) + throw invalid('validUntil must be a future uint48 timestamp'); + if ( + r.allowedCalls === undefined || + (Array.isArray(r.allowedCalls) && !r.allowedCalls.length) + ) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'Add at least one allowed function, or select tokens on an EVM network to allow transfers back to the owner.', + { + details: { reason: 'ALLOWED_FUNCTION_REQUIRED', field: 'allowedCalls' }, + } + ); + // Push-chain rules have the smaller limit; report it before the generic one. + if ( + r.chainNamespace === undefined && + Array.isArray(r.allowedCalls) && + r.allowedCalls.length > 8 + ) + throw capabilityUnavailable( + 'nativeActions', + 'the deployed v6 wallet permits at most eight native actions' + ); + if ( + !Array.isArray(r.allowedCalls) || + r.allowedCalls.length < 1 || + r.allowedCalls.length > 32 + ) + throw invalid('allowedCalls must contain 1..32 calls'); + for (const c of r.allowedCalls) { + if (!c || typeof c !== 'object') + throw invalid('allowedCall must be an object'); + rejectFields( + c, + [ + 'beneficiary', + 'beneficiaryOffset', + 'amount', + 'maxCalls', + 'maxValuePerCall', + 'maxValueTotal', + 'validUntil', + ], + 'allowedCall' + ); + uint(c.maxValue ?? BigInt(0), 'allowedCall.maxValue'); + if (c.pins !== undefined && !Array.isArray(c.pins)) + throw invalid('pins must be an array'); + for (const pin of c.pins ?? []) { + if (!pin || typeof pin !== 'object') + throw invalid('pin must be an object'); + rejectFields(pin, ['offset', 'min'], 'pin'); + if ('token' in pin && (!('account' in pin) || pin.expected !== WALLET)) + throw invalid('token is only valid on a WALLET account pin'); + if ('arg' in pin === 'account' in pin) + throw invalid('pin must identify exactly one arg or account'); + if ('expected' in pin === 'max' in pin) + throw invalid('pin must specify exactly one expected or max'); + } + } + if (r.chainNamespace?.startsWith('solana:')) { + const { svmMetadata } = await import('./management/svm-public'); + const gateway = await svmMetadata(runtime).gateway( + r.chainNamespace as `solana:${string}` + ); + if (gateway.chainNamespace !== r.chainNamespace) + throw invalid('gateway registry cluster mismatch'); + return svmRule(r, deriveAgwSvmCea(wallet, gateway.program).address); + } + const native = r.chainNamespace === undefined; + if (r.chainNamespace === runtime.pushChainNamespace) + throw invalid('omit chainNamespace for Push rules'); + if (native && (r.assets !== undefined || r.maxGasPerCall !== undefined)) + throw invalid('native rules do not carry assets or maxGasPerCall'); + const own = native + ? wallet + : await resolveRuleDestination(runtime, wallet, r.chainNamespace as CHAIN); + const nativeActions: NativeAction[] = []; + const calls: UniversalRule['allowedCalls'] = []; + for (const [callIndex, call] of r.allowedCalls.entries()) { + if (!isAddress(call.target, { strict: false })) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'An allowed function has an invalid app address.', + { + userMessage: + 'An allowed function has an invalid app address. Select the app again.', + details: { field: `allowedCalls[${callIndex}].target`, callIndex }, + } + ); + const pins = call.pins ?? []; + const wirePins: ArgPinWire[] = []; + const occupied = new Set(); + for (const pin of pins) { + if ('account' in pin) throw invalid('account pins only apply to Solana'); + const offset = evmPinOffset(call.selector, pin.arg); + if (occupied.has(offset)) throw invalid('duplicate pin argument'); + occupied.add(offset); + wirePins.push({ + offset, + op: 'max' in pin ? 1 : 0, + value: + 'max' in pin + ? numberToHex(uint(pin.max, 'pin.max'), { size: 32 }) + : expectedWord( + call.selector, + pin.arg, + pin.expected === WALLET ? own : pin.expected + ), + }); + } + if (native) + nativeActions.push({ + target: getAddress(call.target), + selector: call.selector, + wirePins, + maxValuePerCall: call.maxValue ?? BigInt(0), + maxValueTotal: UINT256_MAX, + maxCalls: UNLIMITED_CALLS, + }); + else + calls.push({ + target: getAddress(call.target), + selector: + call.selector as UniversalRule['allowedCalls'][number]['selector'], + pins: wirePins, + maxValue: call.maxValue ?? BigInt(0), + }); + } + if (native) + return { agent: r.agent, validUntil: r.validUntil, actions: nativeActions }; + return { + agent: r.agent, + validUntil: r.validUntil, + chainNamespace: r.chainNamespace as `eip155:${string}`, + assets: authoredAssets(r).map((a) => ({ + ...a, + token: a.token as Address, + maxTotal: a.maxTotal ?? BigInt(0), + })), + maxGasPerCall: r.maxGasPerCall ?? BigInt(0), + allowedCalls: calls, + }; +} + +function svmType( + text: string +): Idl['instructions'][number]['args'][number]['type'] { + const array = text.match(/^(.+)\[(\d+)\]$/); + if (array) { + const count = Number(array[2]); + if (!Number.isSafeInteger(count) || count < 1 || count > 128) + throw invalid('unsupported SVM fixed array size'); + return { array: [svmType(array[1]), count] }; + } + if ( + [ + 'u8', + 'u16', + 'u32', + 'u64', + 'i8', + 'i16', + 'i32', + 'i64', + 'bool', + 'pubkey', + ].includes(text) + ) + return text as 'u64'; + if (text === 'publicKey') return 'pubkey'; + throw capabilityUnavailable( + 'svmArgumentLayout', + `unsupported fixed-size Solana type ${text}` + ); +} +function svmRule(rule: Rule, cea: Hex): SolanaRule { + return { + agent: rule.agent, + validUntil: rule.validUntil, + chainNamespace: rule.chainNamespace as `solana:${string}`, + outputTokens: [ + ...new Set( + rule.allowedCalls.flatMap((c) => + (c.pins ?? []).flatMap((p) => + 'account' in p && 'token' in p && p.expected === WALLET && p.token + ? [typeof p.token === 'string' ? p.token : p.token.address] + : [] + ) + ) + ), + ], + assets: authoredAssets(rule).map((asset) => ({ + ...asset, + maxTotal: asset.maxTotal ?? BigInt(0), + })), + maxGasPerCall: rule.maxGasPerCall ?? BigInt(0), + allowedInstructions: rule.allowedCalls.map((call) => { + if ((call.maxValue ?? BigInt(0)) !== BigInt(0)) + throw capabilityUnavailable( + 'svmCallValue', + 'native Solana instruction value is governed by its transfer/pin, not an EVM call value' + ); + const full = String(call.selector).match( + /^([A-Za-z_][A-Za-z0-9_]*)\((.*)\)$/ + ); + const raw = /^0x[0-9a-fA-F]{16}$/.test(call.selector); + if (!full && !raw) + throw invalid( + 'Solana selector needs a fixed-width signature or eight-byte discriminator' + ); + const types = + full && full[2] ? full[2].split(',').map((s) => svmType(s.trim())) : []; + const name = full?.[1] ?? 'raw'; + const discriminator = raw + ? hexToBytes(call.selector as Hex) + : hexToBytes( + sha256( + toHex( + `global:${name + .replace(/([a-z0-9])([A-Z])/g, '$1_$2') + .toLowerCase()}` + ) + ) + ).slice(0, 8); + const pins = call.pins ?? []; + const accounts = pins.filter( + (p): p is Extract => 'account' in p + ); + if ( + accounts.some( + (p) => + !Number.isInteger(p.account) || p.account < 0 || p.account >= 64 + ) + ) + throw invalid('Solana account position must be 0..63'); + const accountCount = Math.max(0, ...accounts.map((p) => p.account + 1)); + const idl: Idl = { + address: new PublicKey(hexToBytes(svmKey(call.target))).toBase58(), + metadata: { name: 'rule_layout', version: '1', spec: '0.1.0' }, + instructions: [ + { + name, + discriminator: Array.from(discriminator), + accounts: Array.from({ length: accountCount }, (_, i) => ({ + name: `account${i}`, + })), + args: types.map((type, i) => ({ name: `arg${i}`, type })), + }, + ], + }; + return { + maxAccounts: ANY_ACCOUNT_COUNT, + program: call.target, + instruction: { idl, name }, + accounts: accounts.map((p) => ({ + name: `account${p.account}`, + expected: + p.expected === WALLET + ? p.token + ? { + kind: 'walletATA' as const, + token: + typeof p.token === 'string' ? p.token : p.token.address, + } + : { kind: 'walletCEA' as const } + : { kind: 'address' as const, address: p.expected }, + })), + fields: pins + .filter((p) => 'arg' in p) + .map((p) => { + const arg = (p as { arg: number }).arg; + if (!Number.isInteger(arg) || arg < 0 || arg >= types.length) + throw capabilityUnavailable( + 'svmArgumentLayout', + 'argument pins need a signature with the indexed argument type; use decoded raw constraints for stored rules' + ); + if ('max' in p) + return { name: `arg${arg}`, max: uint(p.max, 'pin.max') }; + const rawExpected = (p as { expected: string | bigint }).expected; + const eq = rawExpected === WALLET ? cea : rawExpected; + return { + name: `arg${arg}`, + equals: + typeof eq === 'bigint' + ? eq + : /^0x/.test(eq) + ? (eq as Hex) + : svmKey(eq), + }; + }), + }; + }), + }; +} diff --git a/packages/core/src/lib/agentic/reads/checkpoints.ts b/packages/core/src/lib/agentic/reads/checkpoints.ts new file mode 100644 index 00000000..93a3979c --- /dev/null +++ b/packages/core/src/lib/agentic/reads/checkpoints.ts @@ -0,0 +1,149 @@ +import type { Address, Log } from 'viem'; +import { AgenticCapability, requireCapability } from '../capabilities'; +import type { AgenticGeneration } from '../deployments'; +import type { ChainReader } from '../contracts/reader'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import type { Checkpoint } from '../agentic.types'; +import { Snapshot, scanLogs } from './snapshot'; + +const MAX_ATTEMPTS = 2; + +/** + * w.checkpoints(): Checkpointed events in (block, tx, log) order, checked + * against the wallet's checkpointCount() at the same snapshot block. + * `sinceBlock` is inclusive. Evaluators should compare counts — one block can + * hold several ticks, and allowance pulls change balances without any tick. + */ +export async function readCheckpoints( + reader: ChainReader, + gen: AgenticGeneration, + wallet: Address, + sinceBlock?: bigint +): Promise<{ checkpoints: Checkpoint[]; count: bigint; blockNumber: bigint }> { + requireCapability(gen.capabilities, AgenticCapability.CHECKPOINTS); + let lastError: AgenticError | undefined; + for (let attempt = 0; attempt < MAX_ATTEMPTS; attempt++) { + const snap = await Snapshot.at(reader); + const count = BigInt( + await snap.read( + wallet, + gen.contracts.abis.wallet, + 'checkpointCount' + ) + ); + const from = + sinceBlock !== undefined && sinceBlock > gen.startBlock + ? sinceBlock + : gen.startBlock; + const filter = { + address: wallet, + event: gen.contracts.events.checkpointed, + }; + let logs: Log[]; + try { + logs = await scanLogs(reader, filter, from, snap.blockNumber); + } catch (cause) { + const retained = lowestRetainedHeight(cause); + // A fresh wallet may have its entire history after the RPC retention + // floor. Never treat truncation as success: the FULL sequence/count + // validation below must still prove every checkpoint is present. + if ( + sinceBlock !== undefined || + retained === undefined || + retained <= from || + retained > snap.blockNumber + ) + throw cause; + logs = await scanLogs(reader, filter, retained, snap.blockNumber); + } + const decoded = gen.contracts + .parseCheckpointed(logs, wallet) + .sort((a, b) => + a.blockNumber !== b.blockNumber + ? a.blockNumber < b.blockNumber + ? -1 + : 1 + : a.transactionIndex !== b.transactionIndex + ? a.transactionIndex - b.transactionIndex + : a.logIndex - b.logIndex + ); + const problem = validateSequence( + decoded.map((c) => c.seq), + count, + sinceBlock === undefined || from === gen.startBlock + ); + if (!problem) { + return { + count, + blockNumber: snap.blockNumber, + checkpoints: decoded.map(({ seq, kind, ref, blockNumber, txHash }) => ({ + seq, + kind, + ref, + blockNumber, + txHash, + })), + }; + } + lastError = new AgenticError( + AGENTIC_ERROR_CODE.INCONSISTENT_READ, + problem, + { + details: { wallet, count, blockNumber: snap.blockNumber }, + } + ); + } + throw lastError as AgenticError; +} + +/** Sequence must be contiguous, end at `count`, and start at 1 for a full scan. */ +export function validateSequence( + seqs: number[], + count: bigint, + fullRange: boolean +): string | null { + for (let i = 1; i < seqs.length; i++) { + if (seqs[i] !== seqs[i - 1] + 1) + return `checkpoint sequence gap between ${seqs[i - 1]} and ${seqs[i]}`; + } + if (fullRange) { + if (BigInt(seqs.length) !== count) { + return `found ${seqs.length} Checkpointed events but checkpointCount() is ${count}`; + } + if (seqs.length > 0 && seqs[0] !== 1) + return `first checkpoint seq is ${seqs[0]}, expected 1`; + return null; + } + if (seqs.length > 0 && BigInt(seqs[seqs.length - 1]) !== count) { + return `last checkpoint seq ${ + seqs[seqs.length - 1] + } does not match checkpointCount() ${count}`; + } + return null; +} + +/** Recognize Donut/CometBFT's explicit pruning error, not arbitrary RPC failures. */ +function lowestRetainedHeight(error: unknown): bigint | undefined { + const visited = new Set(); + for ( + let depth = 0; + depth < 8 && error && typeof error === 'object' && !visited.has(error); + depth++ + ) { + visited.add(error); + const value = error as { + message?: unknown; + details?: unknown; + cause?: unknown; + }; + for (const text of [value.message, value.details]) { + if (typeof text !== 'string') continue; + const match = /height \d+ is not available, lowest height is (\d+)/.exec( + text + ); + if (match) return BigInt(match[1]); + } + error = value.cause; + } + return undefined; +} diff --git a/packages/core/src/lib/agentic/reads/rules.ts b/packages/core/src/lib/agentic/reads/rules.ts new file mode 100644 index 00000000..cceddd31 --- /dev/null +++ b/packages/core/src/lib/agentic/reads/rules.ts @@ -0,0 +1,507 @@ +import { readSvmConfig } from './svm'; +import { readGasPrc20, readSvmSourceToken } from '../contracts/prc20-metadata'; +import { getAddress, zeroAddress, type Address, type Hex } from 'viem'; +import { CHAIN } from '../../constants/enums'; +import { AgenticCapability, requireCapability } from '../capabilities'; +import type { AgenticGeneration } from '../deployments'; +import type { + NativeConfigRead, + ModeRead, + UniversalConfigRead, +} from '../contracts/v6'; +import { configId } from '../codec/ids'; +import { nativeActionTermsToRule } from '../codec/native'; +import { UINT256_MAX } from '../codec/defaults'; +import { WALLET } from '../public-rule'; +import { capabilityUnavailable } from '../errors'; +import { readOriginToken } from '../contracts/prc20-metadata'; +import { chainHash } from '../codec/rules'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import type { AgenticHex, RulesRecord } from '../agentic.types'; +import { Snapshot } from './snapshot'; + +const MODE_UNIVERSAL = 0; +const MODE_NATIVE = 1; + +export interface ActiveRule { + rulesId: Hex; + /** agentOf(rulesId); zero means the engine no longer resolves it. */ + agent: Address; + actionIds: readonly Hex[]; + mode: number; + vm: number; + chainHash: Hex; +} + +/** Enabled rule IDs with their agent and governed chain, all at one block. */ +export async function readActiveRules( + snap: Snapshot, + gen: AgenticGeneration, + wallet: Address +): Promise { + const ids = await snap.read( + gen.addresses.sessionEngine, + gen.contracts.abis.engine, + 'getPermissionIDs', + [wallet] + ); + return Promise.all(ids.map((id) => readActiveRule(snap, gen, wallet, id))); +} + +async function readActiveRule( + snap: Snapshot, + gen: AgenticGeneration, + wallet: Address, + rulesId: Hex +): Promise { + const [agent, actionIds] = await Promise.all([ + snap.read
(wallet, gen.contracts.abis.wallet, 'agentOf', [rulesId]), + snap.read( + gen.addresses.sessionEngine, + gen.contracts.abis.engine, + 'getEnabledActions', + [wallet, rulesId] + ), + ]); + if (actionIds.length === 0) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INCONSISTENT_READ, + `enabled rule ${rulesId} has no enabled actions` + ); + } + const modes = await Promise.all( + actionIds.map((a) => + snap.read( + gen.addresses.rulesPolicy, + gen.contracts.abis.policy, + 'getMode', + [configId(wallet, rulesId, a), wallet] + ) + ) + ); + const first = modes[0]; + if ( + !modes.every( + (m) => + m.initialized && + m.chainHash === first.chainHash && + m.mode === first.mode + ) + ) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INCONSISTENT_READ, + `rule ${rulesId} has uninitialized or mixed-chain policy configs` + ); + } + return { + rulesId, + agent: getAddress(agent), + actionIds, + mode: Number(first.mode), + vm: Number(first.vm), + chainHash: first.chainHash, + }; +} + +/** Map a stored chain hash back to its CAIP-2 string from known chains. */ +export function chainFromHash( + hash: Hex, + pushChainNamespace: string +): string | undefined { + const known = [pushChainNamespace, ...Object.values(CHAIN)]; + return known.find((c) => chainHash(c) === hash); +} + +/** + * Agent-door rule selection for one send (spec 2.a): enabled rules whose agent + * is the signer and whose chain is the destination, read uncached at one + * block. Expiry, caps and policy remain on-chain checks. + */ +export async function selectRuleForSend( + snap: Snapshot, + gen: AgenticGeneration, + wallet: Address, + agent: Address, + destinationChain: string +): Promise { + const active = await readActiveRules(snap, gen, wallet); + const want = chainHash(destinationChain); + const matches = active.filter( + (r) => r.agent === getAddress(agent) && r.chainHash === want + ); + if (matches.length === 0) { + throw new AgenticError( + AGENTIC_ERROR_CODE.NO_RULES_FOR_CHAIN, + `no enabled rule on ${wallet} names ${agent} for ${destinationChain}`, + { + details: { + wallet, + agent, + destinationChain, + blockNumber: snap.blockNumber, + }, + } + ); + } + if (matches.length > 1) { + throw new AgenticError( + AGENTIC_ERROR_CODE.AMBIGUOUS_RULE, + `${matches.length} enabled rules on ${wallet} name ${agent} for ${destinationChain}`, + { + hint: 'Multiple enabled rules match this agent and chain. Inspect details.rulesIds and ask the owner to resolve the overlap; no transaction was submitted.', + details: { rulesIds: matches.map((m) => m.rulesId) }, + } + ); + } + return matches[0]; +} + +/** Decode one active rule into the public record. */ +export async function decodeActiveRule( + snap: Snapshot, + gen: AgenticGeneration, + wallet: Address, + rule: ActiveRule, + pushChainNamespace: string +): Promise { + if (rule.mode === MODE_UNIVERSAL) { + if (rule.vm === 1) { + requireCapability( + gen.capabilities, + AgenticCapability.UNIVERSAL_SVM_RULES + ); + const stored = await readSvmConfig( + snap, + gen, + wallet, + rule, + pushChainNamespace + ); + const cfg = stored.config; + const gas = await readGasPrc20(snap, stored.chainNamespace); + const assets = await Promise.all( + cfg.assets.map(async (a) => ({ + token: + getAddress(a.token) === gas + ? zeroAddress + : await readSvmSourceToken( + snap, + a.token, + stored.chainNamespace, + gen.network + ), + maxPerCall: a.maxPerCall, + maxTotal: a.maxTotal, + })) + ); + return { + rulesId: rule.rulesId, + enabled: true, + agent: rule.agent, + chainNamespace: stored.chainNamespace, + validUntil: Number(cfg.validUntil), + spent: { + kind: 'universal', + assets: assets.map((a, i) => ({ + token: a.token, + spent: cfg.assets[i].spent, + })), + }, + rule: { + format: 'decoded', + agent: rule.agent, + chainNamespace: stored.chainNamespace, + validUntil: Number(cfg.validUntil), + expectedCEA: cfg.expectedCEA, + gatewayProgram: cfg.gatewayProgram, + maxGasPerCall: cfg.maxGasPerCall, + assets, + ceaAccounts: cfg.ceaAccounts, + programs: cfg.programs, + pins: cfg.pins, + dataPins: cfg.dataPins, + }, + }; + } + if (rule.vm !== 0) + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + 'unknown universal VM' + ); + requireCapability(gen.capabilities, AgenticCapability.UNIVERSAL_EVM_RULES); + const chain = chainFromHash(rule.chainHash, pushChainNamespace); + if (!chain || !chain.startsWith('eip155:')) + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + 'unknown EVM rule chain' + ); + const cfg = await snap.read( + gen.addresses.rulesPolicy, + gen.contracts.abis.policy, + 'getConfig', + [configId(wallet, rule.rulesId, rule.actionIds[0]), wallet] + ); + if (!cfg.initialized) + throw new AgenticError( + AGENTIC_ERROR_CODE.INCONSISTENT_READ, + 'uninitialized universal rule' + ); + if ( + !cfg.assets.length || + cfg.assets.length > 8 || + !cfg.allowedCalls.length || + cfg.allowedCalls.length > 32 || + cfg.expectedCEA === zeroAddress + ) + throw new AgenticError( + AGENTIC_ERROR_CODE.INCONSISTENT_READ, + 'invalid stored universal rule shape' + ); + const tokens = await Promise.all( + cfg.assets.map((a) => readOriginToken(snap, a.token, chain)) + ); + return { + rulesId: rule.rulesId, + enabled: true, + chainNamespace: chain, + agent: rule.agent, + validUntil: Number(cfg.validUntil), + spent: { + kind: 'universal', + assets: tokens.map((token, i) => ({ + token, + spent: cfg.assets[i].spent, + })), + }, + rule: { + agent: rule.agent, + chainNamespace: chain as `eip155:${string}`, + validUntil: Number(cfg.validUntil), + maxGasPerCall: cfg.maxGasPerCall, + assets: cfg.assets.map((a, i) => ({ + token: tokens[i], + maxPerCall: a.maxPerCall, + maxTotal: a.maxTotal, + })), + allowedCalls: cfg.allowedCalls.map((c) => ({ + target: c.target, + selector: c.selector, + maxValue: c.maxValue, + pins: [ + ...c.pins.map((p) => + p.op === 1 + ? { arg: storedArg(p.offset), max: BigInt(p.value) } + : { + arg: storedArg(p.offset), + expected: + p.value.toLowerCase() === + `0x${cfg.expectedCEA + .slice(2) + .toLowerCase() + .padStart(64, '0')}` + ? WALLET + : p.value, + } + ), + ...(c.hasBeneficiary + ? [{ arg: storedArg(c.beneficiaryOffset), expected: WALLET }] + : []), + ], + })), + }, + }; + } + if (rule.mode !== MODE_NATIVE) { + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + `rule ${rule.rulesId} has unknown mode ${rule.mode}` + ); + } + // One stored config per action, read at the same block, in engine order. + const configs = await Promise.all( + rule.actionIds.map((action) => + snap.read( + gen.addresses.rulesPolicy, + gen.contracts.abis.policy, + 'getNativeConfig', + [configId(wallet, rule.rulesId, action), wallet] + ) + ) + ); + if (configs.some((c) => !c.initialized)) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INCONSISTENT_READ, + `native config for ${rule.rulesId} is not initialized` + ); + } + const decoded = nativeActionTermsToRule(configs, rule.agent); + if ( + configs.some( + (c) => + c.maxValueTotal !== UINT256_MAX || + Number(c.maxCalls) !== 0xffffffff || + (c.amount.enabled && c.amount.maxTotal !== UINT256_MAX) || + Number(c.validUntil) !== decoded.validUntil + ) + ) { + throw capabilityUnavailable( + 'nativeRuleRead', + 'stored lifetime limits or differing action expiries cannot be represented by section-6 rules without losing constraints' + ); + } + const allowedCalls = configs.map((c) => ({ + target: getAddress(c.target), + selector: + c.selector === '0xffffffff' ? ('value-only' as const) : c.selector, + maxValue: c.maxValuePerCall, + pins: [ + ...c.pins.map((p) => + p.op === 1 + ? { arg: storedArg(p.offset), max: BigInt(p.value) } + : { + arg: storedArg(p.offset), + expected: + p.value.toLowerCase() === + `0x${wallet.slice(2).toLowerCase().padStart(64, '0')}` + ? WALLET + : p.value, + } + ), + ...(c.amount.enabled + ? [{ arg: storedArg(c.amount.offset), max: c.amount.maxPerCall }] + : []), + ], + })); + const counters = configs.map((c, i) => ({ + target: allowedCalls[i].target, + selector: allowedCalls[i].selector, + valueSpent: c.valueSpent, + amountSpent: c.amountSpent, + callsUsed: Number(c.callsUsed), + })); + if (rule.agent === getAddress(`0x${'00'.repeat(20)}`)) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INCONSISTENT_READ, + `enabled rule ${rule.rulesId} does not resolve to an agent` + ); + } + return { + rulesId: rule.rulesId as AgenticHex, + enabled: true, + chainNamespace: pushChainNamespace, + agent: rule.agent, + validUntil: decoded.validUntil, + rule: { agent: rule.agent, validUntil: decoded.validUntil, allowedCalls }, + spent: + counters.length === 1 + ? { + kind: 'native', + valueSpent: counters[0].valueSpent, + amountSpent: counters[0].amountSpent, + callsUsed: counters[0].callsUsed, + } + : { kind: 'native', actions: counters }, + }; +} + +/** Native spend counters for the update assertion. */ +export async function readNativeSpend( + snap: Snapshot, + gen: AgenticGeneration, + wallet: Address, + rule: ActiveRule, + action: Hex = rule.actionIds[0] +): Promise<{ + configId: Hex; + valueSpent: bigint; + amountSpent: bigint; + callsUsed: number; +}> { + const id = configId(wallet, rule.rulesId, action); + const cfg = await snap.read( + gen.addresses.rulesPolicy, + gen.contracts.abis.policy, + 'getNativeConfig', + [id, wallet] + ); + return { + configId: id, + valueSpent: cfg.valueSpent, + amountSpent: cfg.amountSpent, + callsUsed: Number(cfg.callsUsed), + }; +} + +export async function readUniversalSpend( + snap: Snapshot, + gen: AgenticGeneration, + wallet: Address, + rule: ActiveRule +): Promise<{ configId: Hex; expectedSpent: bigint[] }> { + const id = configId(wallet, rule.rulesId, rule.actionIds[0]); + const fn = rule.vm === 1 ? 'getSvmConfig' : 'getConfig'; + const cfg = await snap.read<{ + initialized: boolean; + assets: readonly { spent: bigint }[]; + }>(gen.addresses.rulesPolicy, gen.contracts.abis.policy, fn, [id, wallet]); + if (!cfg.initialized) + throw new AgenticError( + AGENTIC_ERROR_CODE.INCONSISTENT_READ, + 'uninitialized universal spend config' + ); + return { configId: id, expectedSpent: cfg.assets.map((a) => a.spent) }; +} + +export async function listRules( + snap: Snapshot, + gen: AgenticGeneration, + wallet: Address, + pushChainNamespace: string +): Promise { + requireCapability(gen.capabilities, AgenticCapability.ACTIVE_RULE_READS); + const active = await readActiveRules(snap, gen, wallet); + const records: RulesRecord[] = []; + for (const r of active) + records.push( + await decodeActiveRule(snap, gen, wallet, r, pushChainNamespace) + ); + return records; +} + +/** + * rules.get returns enabled records only. Unknown/revoked IDs are deliberately + * indistinguishable without historical reconstruction, which is outside v1. + */ +export async function getRule( + snap: Snapshot, + gen: AgenticGeneration, + wallet: Address, + rulesId: Hex, + pushChainNamespace: string +): Promise { + requireCapability(gen.capabilities, AgenticCapability.ACTIVE_RULE_READS); + const enabled = await snap.read( + gen.addresses.sessionEngine, + gen.contracts.abis.engine, + 'isPermissionEnabled', + [rulesId, wallet] + ); + if (enabled) { + const active = await readActiveRule(snap, gen, wallet, rulesId); + return decodeActiveRule(snap, gen, wallet, active, pushChainNamespace); + } + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_NOT_FOUND, + `rule ${rulesId} is not enabled on ${wallet} (unknown or revoked; v1 has no rule history)` + ); +} + +/** With a raw selector, arg denotes its ABI head-word position. */ +function storedArg(offset: number): number { + if (offset < 4 || (offset - 4) % 32 !== 0) + throw capabilityUnavailable( + 'argumentLayout', + 'stored pin is not aligned to an ABI argument word' + ); + return (offset - 4) / 32; +} diff --git a/packages/core/src/lib/agentic/reads/snapshot.ts b/packages/core/src/lib/agentic/reads/snapshot.ts new file mode 100644 index 00000000..a4fa6285 --- /dev/null +++ b/packages/core/src/lib/agentic/reads/snapshot.ts @@ -0,0 +1,112 @@ +import type { AbiEvent, Address, Log } from 'viem'; +import type { ChainReader } from '../contracts/reader'; +import { + AGENTIC_ERROR_CODE, + AgenticError, + type AgenticErrorCode, +} from '../errors'; + +/** + * All reads of one logical operation are pinned to a single block so dependent + * reads (enumerate IDs → per-ID config) observe one state. An RPC failure is + * surfaced as an error; it is never treated as "empty". + */ +export class Snapshot { + constructor( + readonly reader: ChainReader, + readonly blockNumber: bigint, + private readonly failCode: AgenticErrorCode = AGENTIC_ERROR_CODE.RULE_READ_FAILED + ) {} + + static async at( + reader: ChainReader, + failCode: AgenticErrorCode = AGENTIC_ERROR_CODE.RULE_READ_FAILED + ): Promise { + let block: bigint; + try { + block = await reader.getBlockNumber(); + } catch (cause) { + throw new AgenticError( + failCode, + 'could not read the current Push block number', + { cause } + ); + } + return new Snapshot(reader, block, failCode); + } + + async read( + address: Address, + abi: readonly unknown[], + functionName: string, + args: readonly unknown[] = [] + ): Promise { + try { + return (await this.reader.readContract({ + address, + abi, + functionName, + args, + blockNumber: this.blockNumber, + })) as T; + } catch (cause) { + throw new AgenticError( + this.failCode, + `${functionName} read on ${address} failed at block ${this.blockNumber}`, + { + cause, + details: { address, functionName, blockNumber: this.blockNumber }, + } + ); + } + } + + async code(address: Address): Promise { + try { + const code = await this.reader.getCode({ + address, + blockNumber: this.blockNumber, + }); + return !!code && code !== '0x'; + } catch (cause) { + throw new AgenticError(this.failCode, `getCode(${address}) failed`, { + cause, + }); + } + } +} + +/** Max block span per eth_getLogs request. */ +// Donut's public RPC limits eth_getLogs ranges to a distance of 1,000 blocks. +export const LOG_PAGE_BLOCKS = BigInt(1_000); + +/** + * Paginated log scan [fromBlock, toBlock] inclusive. A failed page fails the + * whole scan; partial results are never returned. + */ +export async function scanLogs( + reader: ChainReader, + args: { address: Address; event: AbiEvent; args?: Record }, + fromBlock: bigint, + toBlock: bigint, + page: bigint = LOG_PAGE_BLOCKS +): Promise { + const out: Log[] = []; + if (fromBlock > toBlock) return out; + for (let start = fromBlock; start <= toBlock; start += page) { + const end = + start + page - BigInt(1) > toBlock ? toBlock : start + page - BigInt(1); + try { + out.push( + ...(await reader.getLogs({ ...args, fromBlock: start, toBlock: end })) + ); + } catch (cause) { + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + `log scan for ${args.event.name} failed for blocks ${start}-${end}`, + { cause } + ); + } + } + return out; +} diff --git a/packages/core/src/lib/agentic/reads/svm.ts b/packages/core/src/lib/agentic/reads/svm.ts new file mode 100644 index 00000000..42c9535b --- /dev/null +++ b/packages/core/src/lib/agentic/reads/svm.ts @@ -0,0 +1,98 @@ +/** Internal lossless SVM state shared by public reads and execution. */ +import type { Address, Hex } from 'viem'; +import type { AgenticGeneration } from '../deployments'; +import type { SvmConfigRead } from '../contracts/v6'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import { actionId, configId } from '../codec/ids'; +import { SEND_OUTBOUND_SELECTOR } from '../contracts/v6'; +import { validateSvmTerms } from '../codec/svm-terms'; +import { chainFromHash, readActiveRules, type ActiveRule } from './rules'; +import type { Snapshot } from './snapshot'; + +export interface SvmRuleSnapshot { + wallet: Address; + rulesId: Hex; + agent: Address; + chainNamespace: `solana:${string}`; + configId: Hex; + config: SvmConfigRead; + blockNumber: bigint; +} + +export async function readSvmRule( + snap: Snapshot, + gen: AgenticGeneration, + wallet: Address, + rulesId: Hex, + pushChainNamespace: string +): Promise { + const active = (await readActiveRules(snap, gen, wallet)).find( + (r) => r.rulesId.toLowerCase() === rulesId.toLowerCase() + ); + if (!active) + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_NOT_FOUND, + `no enabled SVM rule ${rulesId} on ${wallet}` + ); + return readSvmConfig(snap, gen, wallet, active, pushChainNamespace); +} + +export async function readSvmConfig( + snap: Snapshot, + gen: AgenticGeneration, + wallet: Address, + active: ActiveRule, + pushChainNamespace: string +): Promise { + const chain = chainFromHash(active.chainHash, pushChainNamespace); + const expectedAction = actionId( + gen.addresses.gateway, + SEND_OUTBOUND_SELECTOR + ); + if ( + active.mode !== 0 || + active.vm !== 1 || + !chain?.startsWith('solana:') || + active.actionIds.length !== 1 || + active.actionIds[0].toLowerCase() !== expectedAction.toLowerCase() + ) + throw new AgenticError( + AGENTIC_ERROR_CODE.INCONSISTENT_READ, + 'rule is not a single gateway SVM action' + ); + const id = configId(wallet, active.rulesId, active.actionIds[0]); + const cfg = await snap.read( + gen.addresses.rulesPolicy, + gen.contracts.abis.policy, + 'getSvmConfig', + [id, wallet] + ); + try { + if (!cfg.initialized) throw new Error('uninitialized SVM config'); + // Stored expired rules remain readable. Grant-time validation still checks expiry. + validateSvmTerms(cfg, -1); + for (const cap of cfg.assets) { + if ( + typeof cap.spent !== 'bigint' || + cap.spent < BigInt(0) || + cap.spent > cap.maxTotal + ) + throw new Error('invalid stored asset counter'); + } + } catch (cause) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INCONSISTENT_READ, + 'malformed stored SVM config', + { cause } + ); + } + return { + wallet, + rulesId: active.rulesId, + agent: active.agent, + chainNamespace: chain as `solana:${string}`, + configId: id, + config: cfg, + blockNumber: snap.blockNumber, + }; +} diff --git a/packages/core/src/lib/agentic/reads/wallets.ts b/packages/core/src/lib/agentic/reads/wallets.ts new file mode 100644 index 00000000..fd0c33f1 --- /dev/null +++ b/packages/core/src/lib/agentic/reads/wallets.ts @@ -0,0 +1,198 @@ +import { getAddress, type Address } from 'viem'; +import type { AgenticGeneration } from '../deployments'; +import type { ChainReader } from '../contracts/reader'; +import { deriveWallet } from '../codec/ids'; +import { AGENTIC_ERROR_CODE, AgenticError } from '../errors'; +import type { WalletInfo, WalletSummary } from '../agentic.types'; +import { Snapshot } from './snapshot'; + +/** Factory-predicted address for (owner, index), cross-checked against the pure mirror. */ +async function predict( + snap: Snapshot, + gen: AgenticGeneration, + owner: Address, + index: bigint +): Promise<{ address: Address; deployed: boolean }> { + const [address, deployed] = await snap.read( + gen.addresses.factory, + gen.contracts.abis.factory, + 'predictWallet', + [owner, index] + ); + const mirror = deriveWallet({ + factory: gen.addresses.factory, + walletImplementation: gen.addresses.walletImplementation, + owner, + index, + }); + if (getAddress(address) !== mirror) { + // Derivation drift between the SDK mirror and the factory (obligation 13). + throw new AgenticError( + AGENTIC_ERROR_CODE.INCONSISTENT_READ, + `factory predicted ${address} for (${owner}, ${index}) but the SDK derives ${mirror}`, + { details: { generation: gen.id } } + ); + } + return { address: getAddress(address), deployed }; +} + +export async function walletCount( + snap: Snapshot, + gen: AgenticGeneration, + owner: Address +): Promise { + return BigInt( + await snap.read( + gen.addresses.factory, + gen.contracts.abis.factory, + 'walletCount', + [owner] + ) + ); +} + +/** client.agentic.derive: default index is the owner's next unused slot. */ +export async function deriveForOwner( + reader: ChainReader, + gen: AgenticGeneration, + owner: Address, + index?: number +): Promise<{ address: Address; index: number; deployed: boolean }> { + const snap = await Snapshot.at(reader); + const next = await walletCount(snap, gen, owner); + let target = next; + if (index !== undefined) { + if (!Number.isInteger(index) || index < 0) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'index must be a non-negative integer' + ); + } + target = BigInt(index); + if (target > next) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + `index ${index} is beyond the owner's next unused index ${next}; the factory only predicts up to the next slot` + ); + } + } + const p = await predict(snap, gen, owner, target); + return { address: p.address, index: Number(target), deployed: p.deployed }; +} + +export async function rulesCount( + snap: Snapshot, + gen: AgenticGeneration, + wallet: Address +): Promise { + const ids = await snap.read( + gen.addresses.sessionEngine, + gen.contracts.abis.engine, + 'getPermissionIDs', + [wallet] + ); + return ids.length; +} + +/** + * client.agentic.list: every deployed slot plus the next undeployed slot + * (deployed=false, rulesCount=0), as in the spec example. + */ +export async function listForOwner( + reader: ChainReader, + gen: AgenticGeneration, + owner: Address +): Promise { + const snap = await Snapshot.at(reader); + const count = await walletCount(snap, gen, owner); + const out: WalletSummary[] = []; + for (let i = BigInt(0); i <= count; i++) { + const p = await predict(snap, gen, owner, i); + const deployed = i < count; + if (deployed !== p.deployed) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INCONSISTENT_READ, + `factory reports slot ${i} deployed=${p.deployed} but walletCount is ${count}` + ); + } + const label = deployed + ? await snap.read(p.address, gen.contracts.abis.wallet, 'label') + : ''; + out.push({ + address: p.address, + index: Number(i), + label, + deployed, + rulesCount: deployed ? await rulesCount(snap, gen, p.address) : 0, + }); + } + return out; +} + +/** w.owner(): the owner as the wallet stores it. */ +export async function walletOwner( + reader: ChainReader, + gen: AgenticGeneration, + wallet: Address +): Promise
{ + const snap = await Snapshot.at(reader); + return getAddress( + await snap.read
(wallet, gen.contracts.abis.wallet, 'owner') + ); +} + +/** + * w.info(). A deployed wallet is read from chain. An undeployed address is + * only describable when it is `signerIdentity`'s next predicted slot. + */ +export async function walletInfo( + reader: ChainReader, + gen: AgenticGeneration, + wallet: Address, + signerIdentity?: Address +): Promise { + const snap = await Snapshot.at(reader); + const deployed = await snap.code(wallet); + if (!deployed) { + if (signerIdentity) { + const next = await walletCount(snap, gen, signerIdentity); + const p = await predict(snap, gen, signerIdentity, next); + if (p.address === getAddress(wallet)) { + return { + address: p.address, + label: '', + index: Number(next), + owner: getAddress(signerIdentity), + deployed: false, + rulesCount: 0, + }; + } + } + throw new AgenticError( + AGENTIC_ERROR_CODE.WALLET_NOT_DEPLOYED, + `${wallet} is not deployed and is not the connected owner's next wallet slot` + ); + } + const [owner, index] = await Promise.all([ + snap.read
(wallet, gen.contracts.abis.wallet, 'owner'), + snap.read( + gen.addresses.factory, + gen.contracts.abis.factory, + 'indexOf', + [wallet] + ), + ]); + const label = await snap.read( + wallet, + gen.contracts.abis.wallet, + 'label' + ); + return { + address: getAddress(wallet), + label, + index: Number(index), + owner: getAddress(owner), + deployed: true, + rulesCount: await rulesCount(snap, gen, wallet), + }; +} diff --git a/packages/core/src/lib/agentic/response.ts b/packages/core/src/lib/agentic/response.ts new file mode 100644 index 00000000..c9b2db19 --- /dev/null +++ b/packages/core/src/lib/agentic/response.ts @@ -0,0 +1,432 @@ +import { Snapshot } from './reads/snapshot'; +import { readGasPrc20 } from './contracts/prc20-metadata'; +import { parseAgwSvmPayload } from './execution/svm-payload'; +import { deriveAgwSvmCea } from './codec/svm-accounts'; +import { CHAIN_INFO } from '../constants/chain'; +import { bytesToHex } from 'viem'; +import { + decodeAbiParameters, + decodeFunctionData, + getAddress, + type Address, + type Hex, +} from 'viem'; +import { CHAIN } from '../constants/enums'; +import { getBatchExecutorAddress } from '../constants/chain'; +import { getPushChainForNetwork } from '../orchestrator/internals/helpers'; +import { convertExecutorToOrigin } from '../universal/account/account'; +import { pushChainNamespaceFor } from './chain'; +import { UNIVERSAL_GATEWAY_PC } from '../constants/abi'; +import type { + TransactionRouteType, + UniversalTxResponse, +} from '../orchestrator/orchestrator.types'; +import { + v6, + SEND_OUTBOUND_SELECTOR, + UEA_MULTICALL_PREFIX, + type Call, +} from './contracts/v6'; +import { generationsFor, resolveWalletGeneration } from './deployments'; +import type { AgenticRuntime } from './runtime'; +import type { + AgenticAddress, + AgenticHex, + AgenticTxMetadata, +} from './agentic.types'; + +export interface LogicalCall { + to: string; + data: string; + value: bigint; +} + +/** + * Present an AGW send as the wallet's own transaction: `from` is the AGW and + * `to`/`data`/`value` are the logical call. The signer's `origin`, hashes, + * nonce, gas and the on-chain `raw` fields are kept untouched; the wrapped + * call the signer actually sent is recorded in `agentic.rawTo/rawData`. + * Mutates in place so `wait()` (which reads these fields) reports the same + * identity on the receipt. + */ +export function adaptAgenticResponse( + resp: UniversalTxResponse, + meta: Omit & { + logical: LogicalCall; + route?: TransactionRouteType; + chain?: CHAIN; + } +): UniversalTxResponse { + const rawTo = resp.to; + const rawData = resp.data; + if (!resp.raw) { + resp.raw = { + from: resp.from, + to: resp.to, + nonce: resp.nonce, + data: resp.data, + value: resp.value, + }; + } + resp.from = getAddress(meta.wallet); + resp.to = meta.logical.to; + resp.data = meta.logical.data; + resp.value = meta.logical.value; + if (meta.route) resp.route = meta.route; + if (meta.chain) { + resp.chain = meta.chain; + resp.chainNamespace = meta.chain; + } + resp.agentic = { + wallet: getAddress(meta.wallet) as AgenticAddress, + door: meta.door, + ...(meta.rulesId ? { rulesId: meta.rulesId } : {}), + ...(meta.chainNamespace ? { chainNamespace: meta.chainNamespace } : {}), + ...(meta.destinationAccount + ? { destinationAccount: meta.destinationAccount } + : {}), + ...(meta.destinationCalls + ? { destinationCalls: meta.destinationCalls.map((call) => ({ ...call })) } + : {}), + ...(meta.destinationInstruction + ? { destinationInstruction: meta.destinationInstruction } + : {}), + ...(meta.destinationTransfer + ? { destinationTransfer: { ...meta.destinationTransfer } } + : {}), + ...(meta.nativeCalls + ? { nativeCalls: meta.nativeCalls.map((call) => ({ ...call })) } + : {}), + rawTo, + rawData, + }; + return resp; +} + +/** + * trackTransaction replay: if the tracked Push tx called execute/executeAsAgent + * on a wallet of a registered, verified generation, restore the same logical + * identity a live send reports. Anything unrecognised is returned unchanged. + */ +export async function adaptTrackedResponse( + runtime: Pick, + resp: UniversalTxResponse +): Promise { + if (resp.agentic || generationsFor(runtime.network).length === 0) return resp; + const batch = await adaptNativeAgentBatch(runtime, resp); + if (batch) return batch; + const decoded = v6.decodeWalletCall(resp.data as Hex); + if ( + !decoded || + (decoded.kind !== 'execute' && decoded.kind !== 'executeAsAgent') + ) + return resp; + let wallet: Address; + try { + wallet = getAddress(resp.to); + } catch { + return resp; + } + let gen; + try { + gen = await resolveWalletGeneration( + runtime.reader, + runtime.network, + wallet + ); + } catch { + return resp; + } + const door = decoded.kind === 'execute' ? 'owner' : 'agent'; + const rulesId = + decoded.kind === 'executeAsAgent' + ? (decoded.rulesId as AgenticHex) + : undefined; + const calls = decoded.calls; + const outbound = calls.find( + (c) => + getAddress(c.target) === gen.addresses.gateway && + c.data.toLowerCase().startsWith(SEND_OUTBOUND_SELECTOR) + ); + if (outbound) { + const out = decodeOutbound(outbound.data); + const chain = await tokenChain(runtime, out.token); + if (chain?.startsWith('solana:')) { + if ( + door === 'owner' && + out.payload === '0x' && + out.amount > BigInt(0) && + /^0x[0-9a-fA-F]{64}$/.test(out.recipient) + ) { + try { + const gas = await readGasPrc20( + new Snapshot(runtime.reader, resp.blockNumber), + chain + ); + return adaptAgenticResponse(resp, { + wallet, + door, + chainNamespace: chain, + chain: chain as CHAIN, + route: 'UOA_TO_CEA', + destinationTransfer: { + recipient: out.recipient, + token: out.token, + amount: out.amount, + }, + logical: { + to: out.recipient, + data: '0x', + value: getAddress(gas) === out.token ? out.amount : BigInt(0), + }, + }); + } catch { + // Preserve the actual gateway summary when historical token metadata + // cannot be read; destination polling below still uses the known chain. + } + } + try { + const instruction = parseAgwSvmPayload(out.payload); + const destinationInstruction = { + program: instruction.program, + accounts: instruction.accounts.map(({ pubkey, isWritable }) => ({ + pubkey, + isWritable, + })), + data: bytesToHex(instruction.instructionData), + }; + return adaptAgenticResponse(resp, { + wallet, + door, + rulesId, + chainNamespace: chain, + chain: chain as CHAIN, + route: 'UOA_TO_CEA', + destinationInstruction, + destinationAccount: deriveAgwSvmCea( + wallet, + CHAIN_INFO[chain as CHAIN].lockerContract ?? '' + ).address, + logical: { + to: instruction.program, + data: destinationInstruction.data, + value: BigInt(0), + }, + }); + } catch { + // Historical owner calls may use another payload format. Preserve the + // actual gateway call below instead of inventing instruction metadata. + } + } + // The decoded wallet call is authoritative: core may have inferred a + // Push-only route from an incomplete Cosmos record, which would stop + // wait() from polling the destination leg. + return adaptAgenticResponse(resp, { + wallet, + door, + rulesId, + chainNamespace: chain, + logical: outboundResponseCall(out.calls, { + to: outbound.target, + data: outbound.data, + value: outbound.value, + }), + ...(out.calls.length > 0 ? { destinationCalls: out.calls } : {}), + route: 'UOA_TO_CEA', + chain: (chain as CHAIN | undefined) ?? resp.chain, + }); + } + const single = calls.length === 1 ? calls[0] : undefined; + return adaptAgenticResponse(resp, { + wallet, + door, + rulesId, + chainNamespace: undefined, + logical: single + ? { to: single.target, data: single.data, value: single.value } + : { to: wallet, data: resp.data, value: BigInt(0) }, + }); +} + +/** Decode only supported sender-account batches, never an arbitrary forwarding helper. */ +async function adaptNativeAgentBatch( + runtime: Pick, + resp: UniversalTxResponse +): Promise { + let outer: Call[]; + const isUea = resp.data.toLowerCase().startsWith(UEA_MULTICALL_PREFIX); + try { + if (isUea) { + const [entries] = decodeAbiParameters( + [ + { + type: 'tuple[]', + components: [ + { name: 'to', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'data', type: 'bytes' }, + ], + }, + ], + `0x${resp.data.slice(10)}` + ); + outer = entries.map((c) => ({ + target: getAddress(c.to), + value: c.value, + data: c.data, + })); + } else { + const batch = v6.decodeWalletCall(resp.data as Hex); + if (batch?.kind !== 'execute' || batch.mode !== `0x01${'00'.repeat(31)}`) + return; + outer = batch.calls; + } + if ( + outer.length < 2 || + outer.some((c) => c.value !== BigInt(0) || c.target !== outer[0].target) + ) + return; + const inner = outer.map((c) => v6.decodeWalletCall(c.data)); + const first = inner[0]; + if (first?.kind !== 'executeAsAgent' || first.calls.length !== 1) return; + const nativeCalls: { to: Address; value: bigint; data: Hex }[] = []; + for (const c of inner) { + if ( + c?.kind !== 'executeAsAgent' || + c.calls.length !== 1 || + c.rulesId !== first.rulesId || + c.mode !== `0x${'00'.repeat(32)}` + ) + return; + const call = c.calls[0]; + nativeCalls.push({ to: call.target, value: call.value, data: call.data }); + } + const senderAccount = getAddress(resp.from); + if (isUea) { + if (getAddress(resp.raw?.to ?? resp.to) !== senderAccount) return; + const origin = await convertExecutorToOrigin(senderAccount, { + _internal: true, + }); + if (!origin.exists) return; + } else { + if (getAddress(resp.to) !== senderAccount) return; + const executor = getBatchExecutorAddress( + getPushChainForNetwork(runtime.network) + ); + if (!executor) return; + const code = await runtime.reader.getCode({ + address: senderAccount, + blockNumber: resp.blockNumber, + }); + if (code?.toLowerCase() !== `0xef0100${executor.slice(2).toLowerCase()}`) + return; + } + const wallet = outer[0].target; + const gen = await resolveWalletGeneration( + runtime.reader, + runtime.network, + wallet + ); + // This recognizer is only for native arrays; keep mixed/outbound batches raw. + if (nativeCalls.some((c) => c.to === gen.addresses.gateway)) return; + return adaptAgenticResponse(resp, { + wallet, + door: 'agent', + rulesId: first.rulesId as AgenticHex, + chainNamespace: pushChainNamespaceFor(runtime.network), + nativeCalls, + logical: { ...nativeCalls[0] }, + }); + } catch { + // Unsupported payload or unverified sender/wallet: preserve the original response. + return; + } +} + +/** + * Canonical outbound summary for both send and replay: the first actual + * destination call. The complete ordered calls live in agentic.destinationCalls. + * Identical calldata can come from explicit calls or generated transfers, so + * never infer the original input shape from a selector. For an unrecognized + * historical payload, retain the actual gateway call instead of inventing one. + */ +export function outboundResponseCall( + calls: readonly { to: Address; value: bigint; data: Hex }[], + fallback: LogicalCall +): LogicalCall { + const first = calls[0]; + return first + ? { to: first.to, data: first.data, value: first.value } + : fallback; +} + +function decodeOutbound(data: Hex): { + payload: Hex; + recipient: Hex; + amount: bigint; + token: Address; + calls: { to: Address; value: bigint; data: Hex }[]; +} { + const { args } = decodeFunctionData({ abi: UNIVERSAL_GATEWAY_PC, data }); + const req = args?.[0] as { + token: Address; + payload: Hex; + recipient: Hex; + amount: bigint; + }; + let calls: { to: Address; value: bigint; data: Hex }[] = []; + if (req.payload.toLowerCase().startsWith(UEA_MULTICALL_PREFIX)) { + try { + const [decodedCalls] = decodeAbiParameters( + [ + { + type: 'tuple[]', + components: [ + { name: 'to', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'data', type: 'bytes' }, + ], + }, + ], + `0x${req.payload.slice(10)}` + ); + calls = decodedCalls.map((c) => ({ + to: getAddress(c.to), + value: c.value, + data: c.data, + })); + } catch { + calls = []; + } + } + return { + token: getAddress(req.token), + payload: req.payload, + recipient: req.recipient, + amount: req.amount, + calls, + }; +} + +async function tokenChain( + runtime: Pick, + token: Address +): Promise { + try { + return (await runtime.reader.readContract({ + address: token, + abi: [ + { + type: 'function', + name: 'SOURCE_CHAIN_NAMESPACE', + inputs: [], + outputs: [{ type: 'string' }], + stateMutability: 'view', + }, + ], + functionName: 'SOURCE_CHAIN_NAMESPACE', + })) as string; + } catch { + return undefined; + } +} diff --git a/packages/core/src/lib/agentic/revert.ts b/packages/core/src/lib/agentic/revert.ts new file mode 100644 index 00000000..bedabd2f --- /dev/null +++ b/packages/core/src/lib/agentic/revert.ts @@ -0,0 +1,140 @@ +import { + decodeErrorResult, + parseAbi, + toFunctionSelector, + type Abi, + type Hex, +} from 'viem'; +import { formatAbiItem } from 'viem/utils'; +import type { DecodedErrorPayload } from '../orchestrator/internals/errors'; +import { + AGW_ABI, + AGW_FACTORY_ABI, + SMART_SESSION_ABI, + UNIVERSAL_RULES_POLICY_ABI, +} from './contracts/abi/v6'; + +/** URP reverts reached through the engine are truncated to this wrapper. */ +export const POLICY_CHECK_REVERTED_SELECTOR = '0xf4270752'; + +/** URP builds these with abi.encodeWithSelector (any-match over allowed calls), + * so the compiled ABI omits them. Signatures from src/libraries/Errors.sol at ffd567d. */ +const URP_ENCODED_ERRORS = parseAbi([ + 'error BeneficiaryMismatch(address expected, address actual)', + 'error InnerValueExceedsAllowance(uint256 index, uint256 value, uint256 maxValue)', +]); + +const ERROR_ABIS: readonly Abi[] = [ + AGW_ABI as unknown as Abi, + UNIVERSAL_RULES_POLICY_ABI as unknown as Abi, + URP_ENCODED_ERRORS, + AGW_FACTORY_ABI as unknown as Abi, + SMART_SESSION_ABI as unknown as Abi, +]; + +/** selector → error name across the AGW/URP/factory/engine ABIs. */ +const ERROR_NAMES: ReadonlyMap = new Map( + ERROR_ABIS.flatMap((abi) => + abi + .filter((item) => item.type === 'error') + .map((item) => { + const err = item as { + type: 'error'; + name: string; + inputs: readonly { type: string }[]; + }; + return [ + toFunctionSelector(formatAbiItem(err as never)).toLowerCase(), + err.name, + ] as const; + }) + ) +); + +const HEX_DATA = /0x[0-9a-fA-F]{8,}/g; +const CUSTOM_ERROR_TEXT = /custom error (0x[0-9a-fA-F]{8}):?\s*([0-9a-fA-F]*)/g; + +/** Pull candidate revert data out of an error (viem chains, nested causes, messages). */ +function revertDataCandidates(err: unknown, depth = 0): Hex[] { + if (!err || depth > 6) return []; + const out: Hex[] = []; + const e = err as { + data?: unknown; + raw?: unknown; + cause?: unknown; + message?: unknown; + details?: unknown; + }; + if (typeof e.raw === 'string' && /^0x[0-9a-fA-F]{8,}$/.test(e.raw)) + out.push(e.raw as Hex); + if (typeof e.data === 'string' && /^0x[0-9a-fA-F]{8,}$/.test(e.data)) + out.push(e.data as Hex); + if ( + e.data && + typeof e.data === 'object' && + typeof (e.data as { data?: unknown }).data === 'string' + ) { + out.push((e.data as { data: Hex }).data); + } + for (const text of [e.message, e.details]) { + if (typeof text !== 'string') continue; + // viem renders unknown custom errors as "custom error 0x: ". + for (const m of text.matchAll(CUSTOM_ERROR_TEXT)) + out.push(`${m[1]}${m[2] ?? ''}` as Hex); + out.push(...((text.match(HEX_DATA) ?? []) as Hex[])); + } + out.push(...revertDataCandidates(e.cause, depth + 1)); + return out; +} + +/** Decode raw revert data against the AGW/URP/factory/engine error ABIs. */ +export function decodeAgwErrorData(data: Hex): DecodedErrorPayload | undefined { + const selector = data.slice(0, 10).toLowerCase(); + if (selector === POLICY_CHECK_REVERTED_SELECTOR && data.length >= 10 + 64) { + // bytes32 = 4-byte policy error selector ‖ 28 bytes of its first argument. + // The arguments are truncated, so the inner error is named by selector only. + const word = `0x${data.slice(10, 74)}` as Hex; + const innerName = ERROR_NAMES.get(word.slice(0, 10).toLowerCase()); + return { + name: innerName + ? `PolicyCheckReverted(${innerName})` + : 'PolicyCheckReverted', + selector, + decoded: word, + hint: 'URP rejected the action (truncated through the session engine). The inner selector names the gate; arguments are truncated to 28 bytes.', + }; + } + for (const abi of ERROR_ABIS) { + try { + const r = decodeErrorResult({ abi, data }); + return { + name: r.errorName, + selector, + decoded: r.args && r.args.length ? stringifyArgs(r.args) : undefined, + }; + } catch { + // try the next ABI + } + } + // Arguments lost (e.g. a node rendered them as text): name the error by its selector. + const name = ERROR_NAMES.get(selector); + return name + ? { name, selector, hint: 'Error arguments were not available.' } + : undefined; +} + +export function decodeAgenticRevert( + err: unknown +): DecodedErrorPayload | undefined { + for (const data of revertDataCandidates(err)) { + const decoded = decodeAgwErrorData(data); + if (decoded) return decoded; + } + return undefined; +} + +function stringifyArgs(args: readonly unknown[]): string { + return JSON.stringify(args, (_k, v) => + typeof v === 'bigint' ? v.toString() : v + ); +} diff --git a/packages/core/src/lib/agentic/runtime.ts b/packages/core/src/lib/agentic/runtime.ts new file mode 100644 index 00000000..89af2571 --- /dev/null +++ b/packages/core/src/lib/agentic/runtime.ts @@ -0,0 +1,224 @@ +import { getAddress, type Address } from 'viem'; +import { CHAIN, PUSH_NETWORK } from '../constants/enums'; +import type { MoveableToken } from '../constants/tokens'; +import { AtomicBatchUnavailableError } from '../orchestrator/internals/errors'; +import { + AgenticError, + AGENTIC_ERROR_CODE, + capabilityUnavailable, +} from './errors'; +import type { Orchestrator } from '../orchestrator/orchestrator'; +import type { + ExecuteParams, + TransactionExecutionOptions, + UniversalExecuteParams, + UniversalTxResponse, +} from '../orchestrator/orchestrator.types'; +import type { ProgressEvent } from '../progress-hook/progress-hook.types'; +import { getCEAAddress } from '../orchestrator/cea-utils'; +import type { OrchestratorContext } from '../orchestrator/internals/context'; +import { computeUEAOffchain } from '../orchestrator/internals/uea-manager'; +import { ensureSvmFinalizeGasBudgetQuote } from '../orchestrator/internals/svm-rent'; +import { queryOutboundGasFee } from '../orchestrator/internals/gas-calculator'; +import { + getNativePRC20ForChain, + isPushChain, +} from '../orchestrator/internals/helpers'; +import { pushChainNamespaceFor } from './chain'; +import { getPRC20Address } from '../universal/prc20-address'; +import { resolveAgenticPrc20 } from './token-routes'; +import { + agwGasBudget, + assertGasLimitAtLeastBase, +} from './execution/gas-budget'; +import { quoteGasPoolCost } from '../orchestrator/internals/gas-pool-quote'; +import { + chainReaderFromPublicClient, + type ChainReader, +} from './contracts/reader'; +import type { SvmMetadataProvider } from './management/svm-context'; +import { createSvmMetadataProvider } from './management/svm-metadata'; +import { CHAIN_INFO } from '../constants/chain'; +import type { AgenticProgressHook } from './agentic.types'; + +/** + * Everything the AGW module needs from the surrounding client. Tests supply a + * mock; PushChain builds the real one from its orchestrator. Keeping this + * explicit is what separates the signer's identity (gas, account status, + * ownership derivation) from the AGW execution account. + */ +export interface AgenticRuntime { + readonly network: PUSH_NETWORK; + /** 'eip155:' of the connected Push chain — the native rule chain. */ + readonly pushChainNamespace: string; + readonly reader: ChainReader; + readonly isReadOnly: boolean; + readonly svmMetadata?: SvmMetadataProvider; + /** Connected signer's Push identity: its EOA, or its UEA for its actual origin chain. */ + signerPushAccount(): Address; + /** Connected signer's origin account (universal.origin). */ + signerOrigin(): { chain: CHAIN; address: string }; + signerIsPushNative(): boolean; + /** The signer's ordinary transaction path (orchestrator.execute). */ + execute( + params: ExecuteParams | UniversalExecuteParams, + options?: TransactionExecutionOptions + ): Promise; + /** Sender-preserving UEA/7702 transport; native sequential fallback is forbidden. */ + executeAtomicBatch( + params: ExecuteParams, + options?: TransactionExecutionOptions + ): Promise; + /** Emit to the init-time hook and, if different, the per-call hook. */ + emit(event: ProgressEvent, perCallHook?: AgenticProgressHook): void; + /** Whether the signer's own UEA is deployed (always true for a Push EOA). */ + signerAccountDeployed(): Promise; + signerBalance(): Promise; + getGasPrice(): Promise; + quoteOutbound( + prc20: Address, + gasLimit: bigint, + chain: CHAIN, + svm?: { wallet: Address; splMintBase58?: string; burnAmount: bigint } + ): Promise<{ + protocolFee: bigint; + /** PC gas budget sent as maxPCForGas; protocolFee is attached separately. */ + nativeValueForGas: bigint; + gasLimitUsed: bigint; + /** Diagnostics: gas-token fee and the pool's current PC cost for it. */ + gasFee?: bigint; + poolPcIn?: bigint; + }>; + resolveCEA( + account: Address, + chain: CHAIN + ): Promise<{ cea: Address; isDeployed: boolean }>; + resolvePrc20( + token: MoveableToken | string | undefined, + chain: CHAIN + ): Address; + nowSeconds(): number; +} + +/** Build the runtime over an orchestrator (the orchestrator IS the internal ctx). */ +export function createAgenticRuntime( + orchestrator: Orchestrator, + isReadOnly: boolean +): AgenticRuntime { + const ctx = orchestrator as unknown as OrchestratorContext; + const network = orchestrator.getNetwork(); + return { + network, + pushChainNamespace: pushChainNamespaceFor(network), + get reader() { + return chainReaderFromPublicClient(ctx.pushClient.publicClient); + }, + isReadOnly, + svmMetadata: createSvmMetadataProvider({ + [CHAIN.SOLANA_DEVNET]: { + gatewayProgram: CHAIN_INFO[CHAIN.SOLANA_DEVNET].lockerContract ?? '', + rpcUrls: + orchestrator.getRpcUrls()[CHAIN.SOLANA_DEVNET] ?? + CHAIN_INFO[CHAIN.SOLANA_DEVNET].defaultRPC, + }, + }), + signerPushAccount: () => getAddress(computeUEAOffchain(ctx)), + signerOrigin: () => orchestrator.getUOA(), + signerIsPushNative: () => isPushChain(ctx.universalSigner.account.chain), + execute: (params, options) => orchestrator.execute(params, options), + executeAtomicBatch: async (params, options) => { + try { + return await orchestrator.executeAtomicBatch(params, options); + } catch (error) { + if (error instanceof AtomicBatchUnavailableError) { + throw capabilityUnavailable('atomicNativeAgentBatch', error.message); + } + throw error; + } + }, + emit: (event, perCallHook) => { + const base = orchestrator.getProgressHook(); + base?.(event); + if (perCallHook && perCallHook !== base) perCallHook(event); + }, + signerAccountDeployed: async () => { + if (isPushChain(ctx.universalSigner.account.chain)) return true; + const status = await orchestrator.getAccountStatus(); + return status.uea.deployed; + }, + signerBalance: () => ctx.pushClient.getBalance(computeUEAOffchain(ctx)), + getGasPrice: () => ctx.pushClient.getGasPrice(), + quoteOutbound: async (prc20, gasLimit, chain, svm) => { + await assertGasLimitAtLeastBase(ctx, chain, gasLimit); + let q = await queryOutboundGasFee(ctx, prc20, gasLimit, chain); + if (svm) { + let minimum = BigInt(0); + const finalize = (quote: typeof q) => + ensureSvmFinalizeGasBudgetQuote({ + ctx, + ueaAddress: svm.wallet, + targetChain: chain, + prc20Token: prc20, + quote, + splMintBase58: svm.splMintBase58, + burnAmount: svm.burnAmount, + pathTag: 'AGW_SVM', + onMinimum: (m) => { + minimum = m; + }, + }); + q = await finalize(q); + // A gas-price change between quote and re-quote can leave the bump short. + if (q.gasFee < minimum) q = await finalize(q); + if (q.gasFee < minimum) + throw new AgenticError( + AGENTIC_ERROR_CODE.INCONSISTENT_READ, + `Solana finalize budget ${q.gasFee} is below the required ${minimum} lamports after re-quoting`, + { + userMessage: + 'Network gas prices changed while preparing this transaction. Try again.', + } + ); + } + const poolPcIn = await quoteGasPoolCost( + ctx, + q.universalCoreAddress, + q.gasToken, + q.gasFee + ); + return { + protocolFee: q.protocolFee, + nativeValueForGas: agwGasBudget(q, poolPcIn), + gasLimitUsed: q.gasLimitUsed, + gasFee: q.gasFee, + poolPcIn, + }; + }, + resolveCEA: async (account, chain) => { + const r = await getCEAAddress( + account, + chain, + orchestrator.getRpcUrls()[chain]?.[0] + ); + return { cea: getAddress(r.cea), isDeployed: r.isDeployed }; + }, + resolvePrc20: (token, chain) => { + if (!token) return getAddress(getNativePRC20ForChain(chain, network)); + // Native ETH shares a symbol/address across chains. A plain token must + // resolve within the known destination, never the first global match. + if (typeof token === 'object' && 'prc20Address' in token) { + if (!('sourceChain' in token) || token.sourceChain !== chain) + throw new AgenticError( + AGENTIC_ERROR_CODE.ASSET_CHAIN_MISMATCH, + 'Push token source chain must match the destination chain' + ); + return getAddress(getPRC20Address(token, { network }).address); + } + return resolveAgenticPrc20( + { chain, address: typeof token === 'string' ? token : token.address }, + network + ).address; + }, + nowSeconds: () => Math.floor(Date.now() / 1000), + }; +} diff --git a/packages/core/src/lib/agentic/token-routes.ts b/packages/core/src/lib/agentic/token-routes.ts new file mode 100644 index 00000000..ea3ce968 --- /dev/null +++ b/packages/core/src/lib/agentic/token-routes.ts @@ -0,0 +1,93 @@ +import { getAddress, isAddress, type Address } from 'viem'; +import { PUSH_NETWORK } from '../constants/enums'; +import { getPRC20Address } from '../universal/prc20-address'; + +export interface AgenticTokenRoute { + /** Exact destination-chain token address. */ + source: Address; + /** Push PRC20 the node registry maps that token to. */ + prc20: Address; + symbol: string; + decimals: number; +} + +/** Exact routes enabled in the node's uregistry that the shared symbol-keyed + * registry cannot hold (a second USDC on one chain). Snapshot: Donut uregistry + * height 24,457,377; SOURCE_* metadata, decimals and outbound quotes checked at + * block 24,457,398. Grant preparation still verifies the source on chain. + */ +const DONUT_EXACT_ROUTES: Readonly< + Record +> = { + 'eip155:11155111': [ + { + source: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238', + prc20: '0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E', + symbol: 'USDC', + decimals: 6, + }, + ], + 'eip155:84532': [ + { + source: '0x036CbD53842c5426634e7929541eC2318f3dCF7e', + prc20: '0x84B62e44F667F692F7739Ca6040cD17DA02068A8', + symbol: 'USDC', + decimals: 6, + }, + ], + 'eip155:421614': [ + { + source: '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d', + prc20: '0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6', + symbol: 'USDC', + decimals: 6, + }, + ], +}; + +const EXACT_ROUTES: Partial< + Record>> +> = { + [PUSH_NETWORK.TESTNET_DONUT]: DONUT_EXACT_ROUTES, + [PUSH_NETWORK.TESTNET]: DONUT_EXACT_ROUTES, +}; + +export function exactAgenticRoutes( + chain: string, + network: PUSH_NETWORK +): readonly AgenticTokenRoute[] { + return EXACT_ROUTES[network]?.[chain] ?? []; +} + +/** Match by chain AND exact address; never by symbol. */ +export function exactAgenticRoute( + chain: string, + source: string, + network: PUSH_NETWORK +): AgenticTokenRoute | undefined { + if (!isAddress(source, { strict: false })) return undefined; + const wanted = getAddress(source); + return exactAgenticRoutes(chain, network).find( + (route) => getAddress(route.source) === wanted + ); +} + +/** AGW source-token resolution: exact node routes first, then the shared registry. */ +export function resolveAgenticPrc20( + token: { chain: string; address: string }, + network: PUSH_NETWORK +): { address: Address; symbol: string; decimals: number } { + const exact = exactAgenticRoute(token.chain, token.address, network); + if (exact) + return { + address: getAddress(exact.prc20), + symbol: exact.symbol, + decimals: exact.decimals, + }; + const mapped = getPRC20Address(token, { network }); + return { + address: getAddress(mapped.address), + symbol: mapped.symbol, + decimals: mapped.decimals, + }; +} diff --git a/packages/core/src/lib/agentic/utils.ts b/packages/core/src/lib/agentic/utils.ts new file mode 100644 index 00000000..bbe20b41 --- /dev/null +++ b/packages/core/src/lib/agentic/utils.ts @@ -0,0 +1,275 @@ +import { decodeSvmTerms, validateSvmTerms } from './codec/svm-terms'; +import { svmKey } from './codec/svm-accounts'; +import { getAddress, isHex, zeroAddress, type Address, type Hex } from 'viem'; +import { CHAIN, PUSH_NETWORK } from '../constants/enums'; +import { MOVEABLE_TOKENS } from '../constants/tokens'; +import { getPRC20Address } from '../universal/prc20-address'; +import { AgenticCapability } from './capabilities'; +import { V6_CAPABILITIES } from './deployments'; +import { + actionId as actionIdRaw, + configId as configIdRaw, + deriveWallet as deriveWalletRaw, + rulesId as rulesIdRaw, +} from './codec/ids'; +import { decodeNativeTerms, nativeActionTermsToRule } from './codec/native'; +import { prepareRules } from './codec/rules'; +import { parseSelector } from './codec/selectors'; +import { decodeEnvelope, decodeSession, encodeSession } from './codec/session'; +import { + AGENTIC_ERROR_CODE, + AgenticError, + capabilityUnavailable, +} from './errors'; +import { pushChainNamespaceFor } from './chain'; +import { decodeUniversalTerms } from './codec/universal-terms'; +import { universalTermsToRule } from './codec/universal'; +import type { + AgenticHex, + InternalRule, + Selector, + DecodedSolanaRule, +} from './agentic.types'; +import type { UniversalRule } from './agentic.types'; +import type { ResolvedUniversalRule } from './codec/universal'; + +/** + * Internal generation context. Harsh H4.1 (October 4): deployment inputs + * are implementation details, not public helper parameters. + */ +export interface RulesEncodeContext { + /** Connected Push network, or an explicit 'eip155:' native chain. */ + network?: PUSH_NETWORK; + pushChainNamespace?: string; + validator: Address; + rulesPolicy: Address; + gateway?: Address; + universal?: ReadonlyMap; + /** Wallet owner, for the AGENT_IS_OWNER check. */ + owner?: Address; + /** Defaults to the current time. */ + nowSeconds?: number; +} + +function nativeNamespace(ctx: { + network?: PUSH_NETWORK; + pushChainNamespace?: string; +}): string { + if (ctx.pushChainNamespace) return ctx.pushChainNamespace; + return pushChainNamespaceFor(ctx.network ?? PUSH_NETWORK.TESTNET_DONUT); +} + +/** Internal codecs and identities — not exported from the package entry point. */ +export const internalAgenticUtils = { + /** The ID a grant with this grantNonce produces. Chain is not part of the hash. */ + rulesId( + agent: Address, + grantNonce: bigint | number, + ctx: { validator: Address } + ): AgenticHex { + return rulesIdRaw({ + validator: getAddress(ctx.validator), + agent: getAddress(agent), + grantNonce: BigInt(grantNonce), + }) as AgenticHex; + }, + + /** Hash of one allowed call: keccak256(target ‖ selector). */ + actionId(target: Address, selector: Selector | 'value-only'): AgenticHex { + return actionIdRaw( + getAddress(target), + parseSelector(selector).selector + ) as AgenticHex; + }, + + /** Key of one allowed call's stored config under one rule on one wallet. */ + configId(wallet: Address, rulesId: Hex, actionId: Hex): AgenticHex { + return configIdRaw(getAddress(wallet), rulesId, actionId) as AgenticHex; + }, + + /** Any-owner wallet address. */ + deriveWallet( + owner: Address, + index: bigint | number, + ctx: { factory: Address; walletImplementation: Address } + ): Address { + return deriveWalletRaw({ + factory: getAddress(ctx.factory), + walletImplementation: getAddress(ctx.walletImplementation), + owner: getAddress(owner), + index, + }); + }, + + /** + * Encode rules into the grant `Session` bytes, one per rule, in order. + * EVM universal rules require wallet/token resolution in the internal context. + */ + encodeRules( + rules: readonly InternalRule[], + ctx: RulesEncodeContext + ): AgenticHex[] { + return prepareRules(rules, { + owner: ctx.owner ? getAddress(ctx.owner) : undefined, + pushChainNamespace: nativeNamespace(ctx), + validator: getAddress(ctx.validator), + rulesPolicy: getAddress(ctx.rulesPolicy), + gateway: ctx.gateway, + universal: ctx.universal, + capabilities: V6_CAPABILITIES, + nowSeconds: ctx.nowSeconds ?? Math.floor(Date.now() / 1000), + }).map((p) => encodeSession(p.session) as AgenticHex); + }, + + /** Inverse of encodeRules for one Session encoding. */ + decodeRules( + bytes: Hex, + ctx: { network?: PUSH_NETWORK; pushChainNamespace?: string } = {} + ): InternalRule | DecodedSolanaRule { + if (!isHex(bytes)) + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'decodeRules expects hex bytes' + ); + const session = decodeSession(bytes); + if ( + session.actions.length === 0 || + session.actions.some((a) => a.actionPolicies.length !== 1) + ) { + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + 'every action needs exactly one URP policy to be representable as a public InternalRule' + ); + } + const agent = getAddress( + `0x${session.sessionValidatorInitData.slice(26, 66)}` + ); + const { chainNamespace, body } = decodeEnvelope( + session.actions[0].actionPolicies[0].initData + ); + if ( + chainNamespace !== nativeNamespace(ctx) && + session.actions.length !== 1 + ) { + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + 'only native rules carry more than one action' + ); + } + if (chainNamespace !== nativeNamespace(ctx)) { + if (chainNamespace.startsWith('solana:')) { + const terms = decodeSvmTerms(body); + validateSvmTerms(terms, -1); + const assets = terms.assets.map((a) => { + const chain = chainNamespace as CHAIN; + const token = (MOVEABLE_TOKENS[chain] ?? []).find((candidate) => { + try { + return ( + getAddress( + getPRC20Address( + { chain, address: candidate.address }, + { network: ctx.network ?? PUSH_NETWORK.TESTNET_DONUT } + ).address + ) === getAddress(a.token) + ); + } catch { + return false; + } + }); + if (!token) + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + 'SVM source token is absent from the static registry; use wallet.rules.get()' + ); + return { + token: + token.mechanism === 'native' + ? zeroAddress + : svmKey(token.address), + maxPerCall: a.maxPerCall, + maxTotal: a.maxTotal, + }; + }); + return { + ...terms, + format: 'decoded', + agent, + chainNamespace: chainNamespace as `solana:${string}`, + assets, + }; + } + if (!chainNamespace.startsWith('eip155:')) + throw capabilityUnavailable( + AgenticCapability.UNIVERSAL_SVM_RULES, + 'unsupported universal chain namespace' + ); + let terms; + try { + terms = decodeUniversalTerms(body); + } catch (cause) { + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + 'malformed universal terms', + { cause } + ); + } + const chain = chainNamespace as CHAIN; + const network = ctx.network ?? PUSH_NETWORK.TESTNET_DONUT; + const tokens = terms.assets.map((asset) => { + const token = (MOVEABLE_TOKENS[chain] ?? []).find((candidate) => { + try { + return ( + getAddress( + getPRC20Address( + { chain, address: candidate.address }, + { network } + ).address + ) === getAddress(asset.token) + ); + } catch { + return false; + } + }); + if (!token) + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + `PRC20 ${asset.token} is not in the static ${chain} token registry`, + { + hint: 'Use wallet.rules.get() for on-chain source-token resolution.', + } + ); + return token.mechanism === 'native' + ? zeroAddress + : getAddress(token.address); + }); + return universalTermsToRule( + terms, + agent, + chainNamespace as `eip155:${string}`, + tokens + ); + } + // Native: one stored terms body per action, all on the native chain. + const terms = session.actions.map((a, i) => { + const env = + i === 0 + ? { chainNamespace, body } + : decodeEnvelope(a.actionPolicies[0].initData); + if (env.chainNamespace !== chainNamespace) { + throw new AgenticError( + AGENTIC_ERROR_CODE.RULE_READ_FAILED, + `action ${i} names chain ${env.chainNamespace}, not ${chainNamespace}` + ); + } + return decodeNativeTerms(env.body); + }); + return nativeActionTermsToRule(terms, agent); + }, +}; + +/** Public helpers requiring no contract deployment context. */ +export const agenticUtils = { + actionId: internalAgenticUtils.actionId, + configId: internalAgenticUtils.configId, + decodeRules: internalAgenticUtils.decodeRules, +}; diff --git a/packages/core/src/lib/agentic/wallet.ts b/packages/core/src/lib/agentic/wallet.ts new file mode 100644 index 00000000..c891d4e5 --- /dev/null +++ b/packages/core/src/lib/agentic/wallet.ts @@ -0,0 +1,221 @@ +import { publicRules } from './public-rule'; +import { getAddress, type Address } from 'viem'; +import { AgenticCapability, requireCapability } from './capabilities'; +import { resolveWalletGeneration, type AgenticGeneration } from './deployments'; +import { AGENTIC_ERROR_CODE, AgenticError } from './errors'; +import { + addRules, + assertRevokeTarget, + revokeRules, + setLabel, + updateRules, +} from './management/rules-write'; +import { readCheckpoints } from './reads/checkpoints'; +import { getRule, listRules } from './reads/rules'; +import { Snapshot } from './reads/snapshot'; +import { walletInfo, walletOwner } from './reads/wallets'; +import type { AgenticRuntime } from './runtime'; +import type { + AgenticAddress, + AgenticHex, + AgenticProgressHook, + AgenticWallet, + Checkpoint, + RulesRecord, + WalletInfo, +} from './agentic.types'; +import type { UniversalTxResponse } from '../orchestrator/orchestrator.types'; +import { currentGeneration } from './deployments'; +import { assertLabel } from './management/label'; + +/** + * Management handle for one wallet (spec 1.d). Reads work for any wallet; + * writes require the connected signer to be the owner. It never sends AS the + * wallet — that is PushChain.initialize(signer, { agenticWallet }). + */ +export class AgenticWalletHandle implements AgenticWallet { + readonly address: AgenticAddress; + readonly rules: AgenticWallet['rules']; + private generation?: Promise; + + constructor(private readonly runtime: AgenticRuntime, address: string) { + try { + this.address = getAddress(address) as AgenticAddress; + } catch (cause) { + throw new AgenticError( + AGENTIC_ERROR_CODE.NOT_AGENTIC_WALLET, + `"${address}" is not an address`, + { cause } + ); + } + this.rules = { + list: () => this.listRules(), + get: (rulesId) => this.getRule(rulesId), + add: async (rules, opts) => + addRules( + this.runtime, + await this.gen(), + this.address, + publicRules(rules), + opts?.progressHook + ), + update: async (params) => { + if ( + !params || + !Array.isArray(params.rules) || + params.rules.length === 0 || + params.rules.some( + (p) => + !p || + typeof p.rulesId !== 'string' || + !/^0x[0-9a-fA-F]{64}$/.test(p.rulesId) + ) + ) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'rules.update needs { rulesId, rule } pairs with 32-byte rule IDs' + ); + } + const rules = params.rules.map((p) => ({ + ...p, + rule: publicRules([p.rule])[0], + })); + return updateRules(this.runtime, await this.gen(), this.address, { + ...params, + rules, + }); + }, + delete: (async ( + target: + | AgenticHex[] + | { all: true; progressHook?: AgenticProgressHook }, + opts?: { progressHook?: AgenticProgressHook } + ) => { + // Validate the target shape before any RPC so a bare revoke costs nothing. + assertRevokeTarget(target); + return revokeRules( + this.runtime, + await this.gen(), + this.address, + target, + opts?.progressHook + ); + }) as AgenticWallet['rules']['delete'], + }; + } + + /** Deployed wallets resolve their own generation; undeployed ones use the network's current one. */ + private gen(): Promise { + if (!this.generation) { + this.generation = resolveWalletGeneration( + this.runtime.reader, + this.runtime.network, + this.address + ); + this.generation.catch(() => { + this.generation = undefined; + }); + } + return this.generation; + } + + async info(): Promise { + let gen: AgenticGeneration; + try { + gen = await this.gen(); + } catch (err) { + if ( + err instanceof AgenticError && + err.code === AGENTIC_ERROR_CODE.WALLET_NOT_DEPLOYED + ) { + gen = currentGeneration(this.runtime.network); + } else { + throw err; + } + } + requireCapability(gen.capabilities, AgenticCapability.WALLET_READS); + return walletInfo( + this.runtime.reader, + gen, + this.address, + this.signerIdentity() + ); + } + + async owner(): Promise<{ owner: AgenticAddress }> { + const gen = await this.gen(); + return { + owner: (await walletOwner( + this.runtime.reader, + gen, + this.address + )) as AgenticAddress, + }; + } + + async setLabel( + label: string, + opts?: { progressHook?: AgenticProgressHook } + ): Promise { + assertLabel(label); + return setLabel( + this.runtime, + await this.gen(), + this.address, + label, + opts?.progressHook + ); + } + + async checkpoints(opts?: { + sinceBlock?: bigint; + }): Promise<{ checkpoints: Checkpoint[] }> { + const gen = await this.gen(); + const { checkpoints } = await readCheckpoints( + this.runtime.reader, + gen, + this.address, + opts?.sinceBlock + ); + return { checkpoints }; + } + + private async listRules(): Promise<{ rules: RulesRecord[] }> { + const gen = await this.gen(); + const snap = await Snapshot.at(this.runtime.reader); + return { + rules: await listRules( + snap, + gen, + this.address, + this.runtime.pushChainNamespace + ), + }; + } + + private async getRule(rulesId: AgenticHex): Promise { + if (typeof rulesId !== 'string' || !/^0x[0-9a-fA-F]{64}$/.test(rulesId)) { + throw new AgenticError( + AGENTIC_ERROR_CODE.INVALID_RULE, + 'rulesId must be a 32-byte hex string' + ); + } + const gen = await this.gen(); + const snap = await Snapshot.at(this.runtime.reader); + return getRule( + snap, + gen, + this.address, + rulesId, + this.runtime.pushChainNamespace + ); + } + + private signerIdentity(): Address | undefined { + try { + return this.runtime.signerPushAccount(); + } catch { + return undefined; + } + } +} diff --git a/packages/core/src/lib/constants/enums.ts b/packages/core/src/lib/constants/enums.ts index da52330a..31ef1c3e 100644 --- a/packages/core/src/lib/constants/enums.ts +++ b/packages/core/src/lib/constants/enums.ts @@ -34,12 +34,15 @@ export enum CHAIN { } /** - * Read-only destination exposed with the OG `CHAIN.WEB2` spelling without - * widening the blockchain enum type accepted by transaction APIs. + * Read-only Web2 source kept on `CHAIN` for compatibility without widening the + * blockchain enum type accepted by transaction APIs. + * + * @deprecated Use `PushChain.CONSTANTS.READ.CHAIN.WEB2`. Same value (`'web2'`); + * the legacy literal `'web2:https'` is still accepted as read input. */ // eslint-disable-next-line @typescript-eslint/no-namespace -- declaration merging keeps Web2 out of the transaction enum union export namespace CHAIN { - export const WEB2 = 'web2:https' as const; + export const WEB2 = 'web2' as const; } // Namespace properties are normally enumerable after TypeScript emits them. // Keep blockchain enumeration (`Object.values(CHAIN)`) blockchain-only. diff --git a/packages/core/src/lib/constants/index.ts b/packages/core/src/lib/constants/index.ts index dcc1523c..69060a3d 100644 --- a/packages/core/src/lib/constants/index.ts +++ b/packages/core/src/lib/constants/index.ts @@ -15,13 +15,27 @@ import { READ_NAMESPACE, WEB2_DEFAULT_TIMEOUT_MS, WEB2_MAX_EXTRACT_ENTRIES, + WEB2_READ_CHAIN, } from './read-state'; import { UNIVERSAL_READ_STATUS, READ_STATUS, READ_ERROR_CODE, READ_OUTCOME } from '../read-state/read-state.types'; +import { AGENTIC } from '../agentic/constants'; + +/** + * `PushChain.CONSTANTS.READ.CHAIN` — every read source: all of `CHAIN` (same + * string values) plus the enumerable Web2 source. A superset of CHAIN, so + * `read({ chain: CHAIN.X })` keeps compiling. + */ +export const READ_CHAIN = Object.freeze({ + ...CHAIN, + WEB2: WEB2_READ_CHAIN, +}) as Readonly<{ [K in keyof typeof CHAIN]: (typeof CHAIN)[K] }> & { readonly WEB2: typeof WEB2_READ_CHAIN }; /** `PushChain.CONSTANTS.READ` — cross-chain read state. Values verified against the deployed UniversalCallback. */ export const READ_CONSTANTS = { - /** Read-only Web2 destination. Equivalent to `CHAIN.WEB2`. */ - WEB2: CHAIN.WEB2, + /** Every read source, enumerable (spec page 5 §4). */ + CHAIN: READ_CHAIN, + /** @deprecated Use `READ.CHAIN.WEB2`. Same value (`'web2'`). */ + WEB2: WEB2_READ_CHAIN, NAMESPACE: READ_NAMESPACE, MAX_CALLBACK_GAS_LIMIT, MIN_CONFIRMATIONS_FLOOR, @@ -40,6 +54,7 @@ export const READ_CONSTANTS = { } as const; export type { MoveableToken, + MoveableTokenSet, PayableToken, PushChainMoveableToken, ChainSuffixAccessor, @@ -57,6 +72,8 @@ export const CONSTANTS = { MOVEABLE: { TOKEN: MOVEABLE_TOKEN_CONSTANTS }, PAYABLE: { TOKEN: PAYABLE_TOKEN_CONSTANTS }, READ: READ_CONSTANTS, + /** Checked v5 agentic wallet deployments by Push network (Donut only). */ + AGENTIC, }; export type { TypedDataDomain, TypedData }; diff --git a/packages/core/src/lib/constants/read-state.ts b/packages/core/src/lib/constants/read-state.ts index 03ac47b8..5e596644 100644 --- a/packages/core/src/lib/constants/read-state.ts +++ b/packages/core/src/lib/constants/read-state.ts @@ -42,6 +42,19 @@ export const WEB2_MAX_TIMEOUT_MS = 15_000; * Web2 is not a blockchain and is not a `CHAIN` enum member. Reads target it via * an explicit destination; the node routes on namespace `web2`, id `https`. */ +/** Public Web2 read source (`READ.CHAIN.WEB2`). */ +export const WEB2_READ_CHAIN = 'web2' as const; +/** + * Legacy public spelling, and the unchanged CAIP-2 wire identity validators + * route on. Still accepted as read input. + */ +export const LEGACY_WEB2_READ_CHAIN = 'web2:https' as const; + +/** True for either public Web2 spelling. */ +export function isWeb2ReadChain(chain: unknown): chain is typeof WEB2_READ_CHAIN | typeof LEGACY_WEB2_READ_CHAIN { + return chain === WEB2_READ_CHAIN || chain === LEGACY_WEB2_READ_CHAIN; +} + export const WEB2_DESTINATION = { chainNamespace: 'web2', chainId: 'https', diff --git a/packages/core/src/lib/constants/tokens.ts b/packages/core/src/lib/constants/tokens.ts index fc3dc1a2..ae463519 100644 --- a/packages/core/src/lib/constants/tokens.ts +++ b/packages/core/src/lib/constants/tokens.ts @@ -40,10 +40,26 @@ export type PayableTokenMap = Partial<{ DAI: PayableToken; }>; +/** Agentic rule assets only: every token Push can send to `chain`. The SDK + * expands it when a rule is prepared (at most eight, each with its default + * limits). It is not a token and cannot be sent or paid with. */ +export interface MoveableTokenSet { + readonly kind: 'ALL'; + readonly chain: CHAIN; +} + +export const isMoveableTokenSet = (token: unknown): token is MoveableTokenSet => + !!token && + typeof token === 'object' && + (token as { kind?: unknown }).kind === 'ALL'; + // Strongly-typed accessors that throw at runtime if a token is unavailable, // while providing non-undefined types at compile time. export class MoveableTokenAccessor { - constructor(private readonly tokens: Record) {} + constructor( + private readonly tokens: Record, + private readonly chain?: CHAIN + ) {} private require(name: keyof MoveableTokenMap): MoveableToken { const t = this.tokens[name as string]; @@ -76,6 +92,11 @@ export class MoveableTokenAccessor { get DAI(): MoveableToken { return this.require('DAI'); } + /** Every routable token on this chain, for agentic rule assets only. */ + get ALL(): MoveableTokenSet { + if (!this.chain) throw new Error('ALL is not available on this chain'); + return Object.freeze({ kind: 'ALL' as const, chain: this.chain }); + } } export class PayableTokenAccessor { @@ -235,7 +256,7 @@ const TOKEN_META: Partial>> = { WETH: { symbol: 'WETH', decimals: 18, - address: '0xfff9976782d46cc05630d1f6ebab18b2324d6b14', + address: '0x4200000000000000000000000000000000000006', mechanism: 'approve', }, }, @@ -549,37 +570,43 @@ function buildMoveableTokenConstants(): MoveableTokenConstantsMap { toSymbolMap(MOVEABLE_TOKENS[CHAIN.ETHEREUM_SEPOLIA]) as Record< string, MoveableToken - > + >, + CHAIN.ETHEREUM_SEPOLIA ), ETHEREUM_MAINNET: new MoveableTokenAccessor( toSymbolMap(MOVEABLE_TOKENS[CHAIN.ETHEREUM_MAINNET]) as Record< string, MoveableToken - > + >, + CHAIN.ETHEREUM_MAINNET ), ARBITRUM_SEPOLIA: new MoveableTokenAccessor( toSymbolMap(MOVEABLE_TOKENS[CHAIN.ARBITRUM_SEPOLIA]) as Record< string, MoveableToken - > + >, + CHAIN.ARBITRUM_SEPOLIA ), BASE_SEPOLIA: new MoveableTokenAccessor( toSymbolMap(MOVEABLE_TOKENS[CHAIN.BASE_SEPOLIA]) as Record< string, MoveableToken - > + >, + CHAIN.BASE_SEPOLIA ), BNB_TESTNET: new MoveableTokenAccessor( toSymbolMap(MOVEABLE_TOKENS[CHAIN.BNB_TESTNET]) as Record< string, MoveableToken - > + >, + CHAIN.BNB_TESTNET ), SOLANA_DEVNET: new MoveableTokenAccessor( toSymbolMap(MOVEABLE_TOKENS[CHAIN.SOLANA_DEVNET]) as Record< string, MoveableToken - > + >, + CHAIN.SOLANA_DEVNET ), PUSH_TESTNET_DONUT: buildPushChainMoveableTokenAccessor(), }; diff --git a/packages/core/src/lib/index.ts b/packages/core/src/lib/index.ts index e0906cfa..fb393765 100644 --- a/packages/core/src/lib/index.ts +++ b/packages/core/src/lib/index.ts @@ -1,4 +1,53 @@ import { PushChain } from './push-chain/push-chain'; +export { MarketError, JobError, JobSpecError } from './market'; +export type { + AgentCardRules, + MarketAssetToken, + MarketPin, + AgentCard, + AgentCardInput, + AgentCardSummary, + MarketNamespace, + MarketPreviewOptions, + MarketWriteOptions, + MarketOpenOptions, + MarketDepositOptions, + MarketDepositResult, + MarketDepositStep, + JobPlan, + OwnerIntent, +} from './market'; +export type { + JobNamespace, + Job, + JobStatus, + JobEvent, + JobWatchCursor, + JobWatchOptions, + CreateJobOptions, + FundJobOptions, +} from './job/types'; +export type { + JobSpec, + JobSpecTemplate, + JobRead, + PreparedJobRead, + JobReadInput, + JobCheck, + JobCheckTemplate, + LogicTree, + Evaluation, + Operation, + LogicKind, + AllowedMutability, + PrincipalMarker, + PrepareJobReadOptions, + ExecuteJobReadOptions, + BuildJobSpecOptions, + BuildJobSpecTemplateOptions, + JobSpecPreview, + PreviewJobSpecOptions, +} from './job-spec'; export { CHAIN } from './constants/enums'; export type { ConversionQuote } from './constants/tokens'; export type { @@ -71,7 +120,11 @@ export type { export { parseUEAVersion } from './orchestrator/orchestrator.types'; // Route detection utilities -export { TransactionRoute, detectRoute, isChainTarget } from './orchestrator/route-detector'; +export { + TransactionRoute, + detectRoute, + isChainTarget, +} from './orchestrator/route-detector'; // Outbound gas cap helpers export { @@ -137,7 +190,17 @@ export type { ReadResponseTuple, BatchReadResponse, } from './read-state/read-state.types'; -export type { ReadOptions, ReadPrepareOptions, ReadQueryOptions, ReadCallbackOptions, ReadValue, ValidateReadCall, ReadWeb2Options, ReadTrackOptions, ReadExecuteOptions } from './read-state/read-params'; +export type { + ReadOptions, + ReadPrepareOptions, + ReadQueryOptions, + ReadCallbackOptions, + ReadValue, + ValidateReadCall, + ReadWeb2Options, + ReadTrackOptions, + ReadExecuteOptions, +} from './read-state/read-params'; export { UNIVERSAL_READ_STATUS, READ_STATUS, @@ -175,4 +238,60 @@ export { export { UNIVERSAL_CALLBACK_EVM } from './constants/abi/universalCallback.evm'; export { UNIVERSAL_READ_REGISTRY_EVM } from './constants/abi/universalReadRegistry.evm'; +// Structured execution errors (base class of AgenticRevertError) +export { + PushChainExecutionError, + PushChainBatchExecutionError, +} from './orchestrator/internals/errors'; +export type { DecodedErrorPayload } from './orchestrator/internals/errors'; + +// Agentic wallet (AGW) +export type { PushChainInitializeOptions } from './push-chain/push-chain'; +export { + AGENTIC_ERROR_CODE, + AgenticError, + AgenticRevertError, +} from './agentic'; +export type { + AgenticAddress, + AgenticDoor, + AgenticErrorCode, + AgenticHex, + AgenticNamespace, + AgenticProgressHook, + AgenticTxMetadata, + AgenticWallet, + AllowedCall, + AssetCap, + RuleAssetInput, + AuthoredRule, + Checkpoint, + CheckpointKind, + CreateOptions, + CreateResult, + ForeignChainNamespace, + DecodedSolanaRule, + Rule, + RuleInput, + Pin, + Spent, + WalletMarker, + ArgumentPath, + RulesRecord, + Selector, + WalletInfo, + WalletSummary, +} from './agentic'; + export { PushChain }; + +export type { + Preset, + PresetCategory, + PresetAsset, + PresetOptions, + ReadyPresetOptions, + PresetRuleTemplate, + PresetResult, + AgenticPresets, +} from './agentic'; diff --git a/packages/core/src/lib/job-spec/__tests__/codec.spec.ts b/packages/core/src/lib/job-spec/__tests__/codec.spec.ts new file mode 100644 index 00000000..aac64c3d --- /dev/null +++ b/packages/core/src/lib/job-spec/__tests__/codec.spec.ts @@ -0,0 +1,190 @@ +import { + decodeAbiParameters, + encodeAbiParameters, + parseAbi, + parseAbiParameters, + zeroAddress, + zeroHash, +} from 'viem'; +import { + buildJobSpec, + buildJobSpecTemplate, + decodeJobSpec, + encodeJobSpec, +} from '../codec'; +import { prepareJobRead } from '../read'; +import { PRINCIPAL } from '../constants'; +import { JOB_SPEC_PARAM } from '../schema'; +import { resolveJobSpec, specOrigin } from '../helpers'; +import type { LogicTree } from '../types'; +const address = '0x1111111111111111111111111111111111111111'; +const abi = parseAbi(['function balanceOf(address) view returns (uint256)']); +const read = () => + prepareJobRead({ + chain: 'eip155:11155111', + target: address, + abi, + functionName: 'balanceOf', + args: [address], + }); +const check = { + read: 0, + evaluation: 'COMPARE' as const, + operation: 'GREATER_OR_EQUAL' as const, + target: BigInt(9), +}; +const spec = () => + buildJobSpec({ + reads: [read()], + checks: [check], + logic: 'ALL', + executeBy: 1800000000, + failFinalAt: 1800003600, + }); + +it('prepares exact selectors, binary output codes and literal zero arguments without inventing holes', () => { + const p = prepareJobRead({ + chain: 'eip155:11155111', + target: address, + abi, + functionName: 'balanceOf', + args: [zeroAddress], + }); + expect(p.selector).toBe('0x70a08231'); + expect(p.outputs).toBe('0x080101'); + expect(p.fills).toBeUndefined(); +}); +it('preserves WALLET/PARAM positions and resolves them independently of literal zeros', () => { + const r = prepareJobRead({ + chain: 'eip155:11155111', + target: address, + abi: parseAbi([ + 'function quote(address,uint256,uint256) view returns (uint256)', + ]), + functionName: 'quote', + args: ['agentic:wallet', { param: 0 }, BigInt(0)], + }); + expect(r.fills).toEqual([ + { word: 0, source: 'WALLET' }, + { word: 1, source: 'PARAM', param: 0 }, + ]); + const t = buildJobSpecTemplate({ + reads: [r], + checks: [{ ...check, target: PRINCIPAL }], + logic: 'ALL', + params: [{ min: BigInt(1), max: BigInt(20) }], + }); + const resolved = resolveJobSpec(t, { + principal: BigInt(50), + params: [BigInt(7)], + accounts: { 'eip155:11155111': address }, + origin: zeroHash, + executeBy: 1800000000, + settleWindow: 3600, + }); + expect( + decodeAbiParameters( + parseAbiParameters('address,uint256,uint256'), + resolved.reads[0].args + ) + ).toEqual([address, BigInt(7), BigInt(0)]); + expect(resolved.checks[0].target).toBe(BigInt(50)); + expect(t.reads[0].args).not.toBe(resolved.reads[0].args); +}); +it('encodes the deployed field and enum order and roundtrips a complete spec canonically', () => { + const bytes = encodeJobSpec(spec()); + const w = decodeAbiParameters([JOB_SPEC_PARAM], bytes)[0]; + expect(w.allowedMutability).toBe(0); + expect(w.logic[0].kind).toBe(0); + expect(w.origin).toBe(zeroHash); + expect(w.executeBy).toBe(BigInt(1800000000)); + expect(encodeJobSpec(decodeJobSpec(bytes))).toBe(bytes); +}); +it('roundtrips templates including principal-BPS targets and bounds', () => { + const t = buildJobSpecTemplate({ + reads: [read()], + checks: [{ ...check, target: { principalBps: BigInt(9999) } }], + logic: { kind: 'AT_LEAST', k: 1, of: [0] }, + }); + const bytes = encodeJobSpec(t); + expect(encodeJobSpec(decodeJobSpec(bytes, { format: 'template' }))).toBe( + bytes + ); +}); +it('keeps a valid non-DFS topological logic order when decoding unchanged signed bytes', () => { + const w = decodeAbiParameters([JOB_SPEC_PARAM], encodeJobSpec(spec()))[0]; + const bytes = encodeAbiParameters( + [JOB_SPEC_PARAM], + [ + { + ...w, + logic: [ + { kind: 0, checks: [], children: [2, 1], k: 0 }, + { kind: 1, checks: [0], children: [], k: 0 }, + { kind: 0, checks: [0], children: [], k: 0 }, + ], + }, + ] + ); + expect(encodeJobSpec(decodeJobSpec(bytes))).toBe(bytes); +}); +it('rejects cycles, invalid indexes and unsupported template holes before encoding', () => { + const tree: LogicTree = { kind: 'ALL', of: [] }; + tree.of.push(tree); + expect(() => + buildJobSpec({ + reads: [read()], + checks: [check], + logic: tree, + executeBy: 1, + failFinalAt: 2, + }) + ).toThrow(/cyclic/); + expect(() => + buildJobSpec({ + reads: [read()], + checks: [{ ...check, read: 2 }], + logic: 'ALL', + executeBy: 1, + failFinalAt: 2, + }) + ).toThrow(/index/); + expect(() => + prepareJobRead({ + chain: 'eip155:1', + target: address, + abi: parseAbi(['function x(address[]) view returns (uint256)']), + functionName: 'x', + args: [['agentic:wallet']], + }) + ).toThrow(); +}); +it('rejects malformed enums, trailing bytes, foreign wire and filled format ambiguity', () => { + const bytes = encodeJobSpec(spec()); + const w = decodeAbiParameters([JOB_SPEC_PARAM], bytes)[0]; + expect(() => decodeJobSpec((bytes + '00') as `0x${string}`)).toThrow( + /canonical/ + ); + expect(() => + decodeJobSpec( + encodeAbiParameters([JOB_SPEC_PARAM], [{ ...w, allowedMutability: 9 }]) + ) + ).toThrow(); + const foreign = encodeAbiParameters( + parseAbiParameters('(uint64,uint64,bytes[],bytes[],bytes[],uint8,bytes32)'), + [[BigInt(1), BigInt(2), [], [], [], 1, zeroHash]] + ); + expect(() => decodeJobSpec(foreign)).toThrow(); +}); +it('binds origin to marketplace, integer card version and principal with ABI words', () => { + const expected = + '0x' + + address.slice(2).padStart(64, '0') + + [BigInt(1), BigInt(2), BigInt(3)] + .map((n) => n.toString(16).padStart(64, '0')) + .join(''); + const { keccak256 } = jest.requireActual('viem'); + expect(specOrigin(address, BigInt(1), BigInt(2), BigInt(3))).toBe( + keccak256(expected) + ); +}); diff --git a/packages/core/src/lib/job-spec/__tests__/description.spec.ts b/packages/core/src/lib/job-spec/__tests__/description.spec.ts new file mode 100644 index 00000000..a3dda1f9 --- /dev/null +++ b/packages/core/src/lib/job-spec/__tests__/description.spec.ts @@ -0,0 +1,62 @@ +import { parseAbi } from 'viem'; +import { prepareJobRead, jobReadOptions } from '../read'; +import { buildJobSpec } from '../codec'; +import { describeJobSpec } from '../helpers'; +const token = '0x1111111111111111111111111111111111111111'; +const make = () => + buildJobSpec({ + reads: [ + prepareJobRead({ + chain: 'eip155:97', + target: token, + abi: parseAbi(['function totalSupply() view returns (uint256)']), + functionName: 'totalSupply', + }), + ], + checks: [ + { + read: 0, + evaluation: 'COMPARE', + operation: 'GREATER_OR_EQUAL', + target: BigInt(499950000), + }, + ], + logic: 'ALL', + executeBy: 1800000000, + failFinalAt: 1800000060, + }); +it('retains ABI names and formats decimal targets without hiding their raw units', () => { + expect( + describeJobSpec(make(), { decimals: { [token]: 6 } }).checks[0] + ).toContain('totalSupply'); + expect( + describeJobSpec(make(), { decimals: { [token]: 6 } }).checks[0] + ).toContain('499.95 (499950000 raw units; 6 decimals)'); + expect(() => + describeJobSpec(make(), { decimals: { [token]: -1 } }) + ).toThrow(); +}); +it('labels signed percentage targets in percentage and basis points', () => { + const spec = make(); + spec.checks[0].evaluation = 'PERCENTAGE'; + spec.checks[0].target = BigInt(-250); + expect(describeJobSpec(spec).checks[0]).toContain('-2.5% (-250 bps)'); +}); +it('maps a resolved prepared read to the paid call and refuses unfilled markers before sending', () => { + const read = make().reads[0]; + expect(jobReadOptions(read)).toMatchObject({ + chain: 'eip155:97', + callData: read.selector, + }); + const hole = prepareJobRead({ + chain: 'eip155:97', + target: token, + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: ['agentic:wallet'], + }); + expect(() => jobReadOptions(hole)).toThrow( + expect.objectContaining({ code: 'UNFILLED_PLACEHOLDER' }) + ); + expect(() => jobReadOptions({ ...read, outputs: '0x080101f' })).toThrow(); +}); diff --git a/packages/core/src/lib/job-spec/__tests__/preview.spec.ts b/packages/core/src/lib/job-spec/__tests__/preview.spec.ts new file mode 100644 index 00000000..f21653ef --- /dev/null +++ b/packages/core/src/lib/job-spec/__tests__/preview.spec.ts @@ -0,0 +1,320 @@ +import { + encodeAbiParameters, + keccak256, + parseAbi, + parseAbiParameters, + stringToHex, + toHex, + type Hex, +} from 'viem'; +import { buildJobSpec, buildJobSpecTemplate } from '../codec'; +import { prepareJobRead } from '../read'; +import { + bindJobPreviewAccounts, + decodeJobAnswer, + previewJobSpec, +} from '../preview'; +import { READ_OUTCOME } from '../../read-state/read-state.types'; +import { PRINCIPAL } from '../constants'; +import { encodeEvmQueryEnvelope } from '../../read-state/envelopes'; +import type { PreviewJobSpecOptions, JobSpec } from '../types'; +const target = '0x1111111111111111111111111111111111111111'; +const word = (n: bigint): Hex => encodeAbiParameters([{ type: 'int256' }], [n]); +const abi = parseAbi(['function value() view returns (uint256)']); +const read = prepareJobRead({ + chain: 'eip155:97', + target, + abi, + functionName: 'value', +}); +function spec( + evaluation: 'COMPARE' | 'NUMBER' | 'PERCENTAGE' = 'COMPARE' +): JobSpec { + return buildJobSpec({ + reads: [read], + checks: [ + { + read: 0, + evaluation, + operation: 'GREATER_OR_EQUAL', + target: evaluation === 'PERCENTAGE' ? BigInt(2500) : BigInt(5), + }, + ], + logic: 'ALL', + executeBy: 1800000000, + failFinalAt: 1800000060, + }); +} +function fixture(values: (Hex | null)[] = [word(BigInt(5))]) { + const prepareRead = jest.fn(async () => ({ value: BigInt(2) })); + const responses = values.map((resultData, i) => { + const response = { + requestId: toHex(BigInt(i + 1), { size: 32 }), + txHash: toHex(BigInt(99), { size: 32 }), + request: { + spec: { + account: { chainNamespace: 'eip155', chainId: '97' }, + minConfirmations: 1, + blockNumber: BigInt(1), + query: encodeEvmQueryEnvelope( + { type: 'contractCall', target, callData: read.selector }, + { blockNumber: BigInt(1) } + ).encoded, + }, + }, + outcome: + resultData === null ? READ_OUTCOME.SOURCE_ERROR : READ_OUTCOME.SUCCESS, + raw: resultData === null ? null : { resultData }, + fees: { paid: BigInt(2) }, + errorMsg: '', + wait: jest.fn(), + }; + response.wait.mockResolvedValue(response); + return response; + }); + const executeReads = jest.fn(async () => ({ reads: responses })); + const trackRead = jest.fn(async () => responses[0]); + const options = { + client: { universal: { prepareRead, executeReads, trackRead } }, + } as unknown as PreviewJobSpecOptions; + return { options, prepareRead, executeReads, responses, trackRead }; +} +it('prepares raw calls through universal reads, pays the batch and evaluates comparisons', async () => { + const f = fixture(); + const result = await previewJobSpec(spec(), { + ...f.options, + maxTotalFee: BigInt(2), + }); + expect(f.prepareRead).toHaveBeenCalledWith( + target, + expect.objectContaining({ + chain: 'eip155:97', + callData: read.selector, + minConfirmations: 1, + }) + ); + expect(f.executeReads).toHaveBeenCalledWith( + [{ value: BigInt(2) }], + expect.objectContaining({ waitForCompletion: false }) + ); + expect(result).toMatchObject({ + pass: true, + checks: [{ value: BigInt(5), pass: true }], + fees: { quoted: BigInt(2), paid: BigInt(2) }, + }); +}); +it('checks the total fee cap after preparation and before any paid request', async () => { + const f = fixture(); + await expect( + previewJobSpec(spec(), { ...f.options, maxTotalFee: BigInt(1) }) + ).rejects.toMatchObject({ code: 'PREVIEW_FEE_EXCEEDED' }); + expect(f.executeReads).not.toHaveBeenCalled(); +}); +it('retains all request IDs after a wait timeout and resumes with no additional payment', async () => { + const f = fixture(); + f.responses[0].wait.mockRejectedValueOnce(new Error('Polling timed out')); + await expect(previewJobSpec(spec(), f.options)).rejects.toMatchObject({ + code: 'PREVIEW_INCOMPLETE', + details: { requestIds: [f.responses[0].requestId] }, + }); + const result = await previewJobSpec(spec(), { + ...f.options, + resume: [f.responses[0].requestId], + maxTotalFee: BigInt(0), + }); + expect(result).toMatchObject({ + pass: true, + fees: { paid: BigInt(2), newlyPaid: BigInt(0) }, + }); + expect(f.executeReads).toHaveBeenCalledTimes(1); +}); +it('rejects a recorded request for a different call before evaluating its result', async () => { + const f = fixture(); + const changed = spec(); + changed.reads[0].target = '0x2222222222222222222222222222222222222222'; + await expect( + previewJobSpec(changed, { + ...f.options, + resume: [f.responses[0].requestId], + }) + ).rejects.toMatchObject({ code: 'PREVIEW_REQUEST_MISMATCH' }); + expect(f.prepareRead).not.toHaveBeenCalled(); + expect(f.executeReads).not.toHaveBeenCalled(); + expect(f.responses[0].wait).not.toHaveBeenCalled(); +}); +it('does not invent baselines or treat unavailable source reads as failures of the criteria', async () => { + const f = fixture(); + expect(await previewJobSpec(spec('NUMBER'), f.options)).toMatchObject({ + pass: null, + checks: [{ pass: null, value: null, reason: 'BASELINE_REQUIRED' }], + }); + const failed = fixture([null]); + expect(await previewJobSpec(spec(), failed.options)).toMatchObject({ + pass: null, + reads: [{ decoded: null }], + checks: [{ reason: 'READ_UNAVAILABLE' }], + }); +}); +it('uses explicit baseline values for signed changes and basis-point percentages', async () => { + const f = fixture([word(BigInt(125))]); + expect( + await previewJobSpec(spec('PERCENTAGE'), { + ...f.options, + baseline: [BigInt(100)], + }) + ).toMatchObject({ pass: true, checks: [{ value: BigInt(2500) }] }); + expect( + await previewJobSpec(spec('PERCENTAGE'), { + ...f.options, + baseline: [BigInt(0)], + }) + ).toMatchObject({ pass: null, checks: [{ reason: 'ZERO_BASELINE' }] }); + const falling = fixture([word(BigInt(5))]); + expect( + await previewJobSpec(spec('NUMBER'), { + ...falling.options, + baseline: [BigInt(10)], + }) + ).toMatchObject({ pass: false, checks: [{ value: BigInt(-5) }] }); +}); +it('propagates unknowns with ALL, ANY and AT_LEAST without hiding conclusive results', async () => { + const s = spec(); + s.reads.push({ ...s.reads[0] }); + s.checks.push({ ...s.checks[0], read: 1 }); + const f = fixture([word(BigInt(5)), null]); + s.logic = { kind: 'ANY', of: [0, 1] }; + expect((await previewJobSpec(s, f.options)).pass).toBe(true); + s.logic = { kind: 'ALL', of: [0, 1] }; + expect((await previewJobSpec(s, f.options)).pass).toBeNull(); + s.logic = { kind: 'AT_LEAST', k: 1, of: [0, 1] }; + expect((await previewJobSpec(s, f.options)).pass).toBe(true); + const no = fixture([word(BigInt(0)), null]); + s.logic = { kind: 'ALL', of: [0, 1] }; + expect((await previewJobSpec(s, no.options)).pass).toBe(false); +}); +it('resolves template accounts explicitly and refuses missing principal before preparing reads', async () => { + const hole = prepareJobRead({ + chain: 'eip155:97', + target, + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: ['agentic:wallet'], + }); + const template = buildJobSpecTemplate({ + reads: [hole], + checks: [ + { + read: 0, + evaluation: 'COMPARE', + operation: 'GREATER_OR_EQUAL', + target: PRINCIPAL, + }, + ], + logic: 'ALL', + }); + const f = fixture(); + await expect(previewJobSpec(template, f.options)).rejects.toMatchObject({ + code: 'UNFILLED_PLACEHOLDER', + }); + expect(f.prepareRead).not.toHaveBeenCalled(); + await expect( + previewJobSpec(template, { + ...f.options, + principal: BigInt(5), + wallet: target, + }) + ).rejects.toMatchObject({ code: 'UNFILLED_PLACEHOLDER' }); + const result = await previewJobSpec(template, { + ...f.options, + principal: BigInt(5), + accounts: { 'eip155:97': target }, + }); + expect(result.pass).toBe(true); + expect(f.prepareRead).toHaveBeenCalledWith( + target, + expect.objectContaining({ + callData: '0x70a08231' + target.slice(2).padStart(64, '0'), + }) + ); +}); +it('decodes ABI offsets across tuples, dynamic tuple arrays and fixed arrays', () => { + const complex = prepareJobRead({ + chain: 'eip155:97', + target, + abi: parseAbi([ + 'function result() view returns ((uint256,address)[],uint256[2],string)', + ]), + functionName: 'result', + }); + const data = encodeAbiParameters( + parseAbiParameters('(uint256,address)[],uint256[2],string'), + [ + [ + [BigInt(7), target], + [BigInt(9), target], + ], + [BigInt(4), BigInt(8)], + 'ok', + ] + ); + const decode = (field: number[]) => + decodeJobAnswer({ ...complex, field, minConfirmations: 1 }, data); + expect(decode([0])).toBe(BigInt(2)); + expect(decode([0, 1, 0])).toBe(BigInt(9)); + expect(decode([1, 1])).toBe(BigInt(8)); + expect(decode([2])).toBe( + BigInt.asIntN(256, BigInt(keccak256(stringToHex('ok')))) + ); +}); +it('rejects truncated return data, invalid bools, unsigned overflow and out-of-range dynamic fields', () => { + const r = { ...read, field: [0], minConfirmations: 1 }; + expect(() => decodeJobAnswer(r, '0x')).toThrow(); + expect(() => decodeJobAnswer(r, word(BigInt(-1)))).toThrow(); + expect(() => + decodeJobAnswer({ ...r, outputs: '0x080103' }, word(BigInt(2))) + ).toThrow(); + expect(decodeJobAnswer({ ...r, outputs: '0x080102' }, word(BigInt(-1)))).toBe( + BigInt(-1) + ); +}); +it('resolves template holes with the configured client and snapshots criteria before paid reads', async () => { + const f = fixture(); + const destination = '0x2222222222222222222222222222222222222222' as const; + const resolve = jest.fn(async () => destination); + bindJobPreviewAccounts(f.options.client.universal, resolve); + const hole = prepareJobRead({ + chain: 'eip155:97', + target, + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: ['agentic:wallet'], + }); + const template = buildJobSpecTemplate({ + reads: [hole], + checks: [ + { + read: 0, + evaluation: 'COMPARE', + operation: 'GREATER_OR_EQUAL', + target: BigInt(5), + }, + ], + logic: 'ALL', + }); + f.prepareRead.mockImplementation(async () => { + template.checks[0].target = BigInt(999); + return { value: BigInt(2) }; + }); + const result = await previewJobSpec(template, { + ...f.options, + wallet: target, + }); + expect(resolve).toHaveBeenCalledWith(target, 'eip155:97'); + expect(f.prepareRead).toHaveBeenCalledWith( + target, + expect.objectContaining({ + callData: '0x70a08231' + destination.slice(2).padStart(64, '0'), + }) + ); + expect(result.pass).toBe(true); +}); diff --git a/packages/core/src/lib/job-spec/codec.ts b/packages/core/src/lib/job-spec/codec.ts new file mode 100644 index 00000000..139945af --- /dev/null +++ b/packages/core/src/lib/job-spec/codec.ts @@ -0,0 +1,453 @@ +import { + decodeAbiParameters, + encodeAbiParameters, + isHex, + zeroHash, + type AbiParameter, + type Hex, +} from 'viem'; +import { JobSpecError } from '../market/errors'; +import { + EVALUATIONS, + OPERATIONS, + LOGIC_KINDS, + MUTABILITIES, + PRINCIPAL, +} from './constants'; +import { JOB_SPEC_PARAM, JOB_TEMPLATE_PARAM } from './schema'; +import { inheritReadLabel, validateJobRead } from './read'; +import type { + BuildJobSpecOptions, + BuildJobSpecTemplateOptions, + JobCheckTemplate, + JobRead, + JobReadInput, + JobSpec, + JobSpecTemplate, + LogicTree, +} from './types'; + +interface LogicWire { + kind: number; + checks: readonly number[]; + children: readonly number[]; + k: number; +} +interface CheckWire { + read: number; + evaluation: number; + operation: number; + target: bigint; +} +interface TemplateCheckWire { + read: number; + evaluation: number; + operation: number; + source: number; + value: bigint; +} +interface ReadWire extends Omit { + fills?: { word: number; source: number; param: number }[]; +} +interface SpecWire { + reads: ReadWire[]; + checks: CheckWire[]; + logic: LogicWire[]; + allowedMutability: number; + origin: Hex; + executeBy: bigint; + failFinalAt: bigint; +} +interface TemplateWire { + reads: ReadWire[]; + checks: TemplateCheckWire[]; + logic: LogicWire[]; + allowedMutability: number; + params: { min: bigint; max: bigint }[]; +} +const originalLogic = new WeakMap< + LogicTree, + { fingerprint: string; wire: LogicWire[] } +>(); +const fail = (message: string, code = 'INVALID_JOB_SPEC'): never => { + throw new JobSpecError(code, message); +}; +const fingerprint = (x: unknown): string => + JSON.stringify(x, (_, v) => (typeof v === 'bigint' ? v.toString() : v)); +export function int256(value: bigint, what = 'Target'): bigint { + if ( + typeof value !== 'bigint' || + value < -(BigInt(1) << BigInt(255)) || + value >= BigInt(1) << BigInt(255) + ) + fail(`${what} must fit int256.`); + return value; +} +function count( + values: readonly unknown[], + max: number, + what: string, + min = 1 +): void { + if (!Array.isArray(values) || values.length < min || values.length > max) + fail( + `${what} must contain ${min}..${max} entries.`, + `TOO_MANY_${what.toUpperCase()}` + ); +} +function timestamp(n: number): void { + if (!Number.isSafeInteger(n) || n < 0) + fail('Timestamps must be nonnegative safe integers.'); +} +function enumIndex(values: T[], value: T, name: string): number { + const i = values.indexOf(value); + if (i < 0) fail(`Unknown ${name}.`); + return i; +} +export function flattenLogic(tree: LogicTree, checkCount: number): LogicWire[] { + const nodes: LogicWire[] = []; + const active = new Set(); + function visit(t: LogicTree): number { + if (!t || active.has(t) || nodes.length >= 32) + fail('Logic is cyclic or exceeds 32 operators.', 'BAD_TREE'); + active.add(t); + const index = nodes.length; + const kind = enumIndex(LOGIC_KINDS, t.kind, 'logic kind'); + if (!Array.isArray(t.of) || !t.of.length || t.of.length > 255) + fail('Logic operators need 1..255 operands.', 'BAD_TREE'); + const k = t.kind === 'AT_LEAST' ? t.k ?? 0 : 0; + if ( + !Number.isInteger(k) || + (t.kind === 'AT_LEAST' && (k < 1 || k > t.of.length)) || + (t.kind !== 'AT_LEAST' && t.k !== undefined && t.k !== 0) + ) + fail('Invalid AT_LEAST threshold.', 'BAD_TREE'); + const n: LogicWire = { kind, checks: [], children: [], k: k }; + nodes.push(n); + for (const item of t.of) { + if (typeof item === 'number') { + if ( + !Number.isInteger(item) || + item < 0 || + item >= checkCount || + n.checks.includes(item) + ) + fail('Dangling or duplicated check index.', 'BAD_TREE'); + (n.checks as number[]).push(item); + } else (n.children as number[]).push(visit(item)); + } + active.delete(t); + return index; + } + visit(tree); + const saved = originalLogic.get(tree); + return saved?.fingerprint === fingerprint(tree) ? saved.wire : nodes; +} +function nestLogic(nodes: LogicWire[], checkCount: number): LogicTree { + count(nodes, 32, 'logic'); + const reached = new Set(); + let expanded = 0; + function visit(index: number, depth: number): LogicTree { + if (++expanded > 512 || depth > 32) + fail('Stored logic is too large to describe as a tree.', 'BAD_TREE'); + const n = nodes[index]; + if (!n || !LOGIC_KINDS[n.kind]) + fail('Unknown stored logic kind.', 'BAD_TREE'); + reached.add(index); + if ( + n.checks.some((i) => !Number.isInteger(i) || i < 0 || i >= checkCount) || + new Set(n.checks).size !== n.checks.length + ) + fail('Invalid stored check reference.', 'BAD_TREE'); + if ( + n.children.some((i) => i <= index || i >= nodes.length) || + new Set(n.children).size !== n.children.length + ) + fail('Invalid stored child reference.', 'BAD_TREE'); + const t: LogicTree = { + kind: LOGIC_KINDS[n.kind], + of: [...n.checks, ...n.children.map((i) => visit(i, depth + 1))], + ...(n.kind === 2 ? { k: n.k } : {}), + }; + if (n.kind !== 2 && n.k !== 0) + fail('Unexpected threshold on stored logic.', 'BAD_TREE'); + return t; + } + const tree = visit(0, 0); + if (reached.size !== nodes.length) + fail('Stored logic has unreachable operators.', 'BAD_TREE'); + // Preserve an unchanged, valid topological order instead of rewriting signed bytes. + originalLogic.set(tree, { fingerprint: fingerprint(tree), wire: nodes }); + flattenLogic(tree, checkCount); + return tree; +} +function normalizeReads(values: BuildJobSpecOptions['reads']): JobRead[] { + count(values, 16, 'reads'); + return values.map((input) => { + const wrapper = input as JobReadInput; + const source = 'read' in input ? wrapper.read : input; + const read: JobRead = { + ...source, + field: [...(wrapper.field ?? [0])], + minConfirmations: wrapper.minConfirmations ?? 1, + ...(source.fills ? { fills: source.fills.map((f) => ({ ...f })) } : {}), + }; + inheritReadLabel(source, read); + return read; + }); +} +function validate(spec: JobSpec | JobSpecTemplate): void { + count(spec.reads, 16, 'reads'); + count(spec.checks, 16, 'checks'); + enumIndex(MUTABILITIES, spec.allowedMutability, 'allowedMutability'); + const template = 'params' in spec; + if (template) { + count(spec.params, 16, 'params', 0); + for (const p of spec.params) + if (int256(p.min) > int256(p.max)) + fail('Parameter minimum exceeds its maximum.'); + } else { + timestamp(spec.executeBy); + timestamp(spec.failFinalAt); + if ( + spec.failFinalAt <= spec.executeBy || + !/^0x[\da-f]{64}$/i.test(spec.origin) + ) + fail('Invalid JobSpec timing or origin.'); + } + for (const r of spec.reads) { + validateJobRead(r); + if ( + !Number.isInteger(r.minConfirmations) || + r.minConfirmations < 1 || + r.minConfirmations > 65535 + ) + fail('Read confirmations must be 1..65535.'); + const words = new Set(); + for (const f of r.fills ?? []) { + if (!template) + fail( + 'A complete JobSpec cannot contain placeholders.', + 'UNFILLED_PLACEHOLDER' + ); + if ( + !Number.isInteger(f.word) || + f.word < 0 || + f.word > 255 || + f.word * 32 + 32 > (r.args.length - 2) / 2 || + words.has(f.word) + ) + fail('Invalid or duplicate fill word.'); + words.add(f.word); + if (!['WALLET', 'PARAM'].includes(f.source)) fail('Unknown fill source.'); + if ( + f.source === 'PARAM' && + (!Number.isInteger(f.param) || + (f.param ?? -1) < 0 || + (f.param ?? -1) >= (spec as JobSpecTemplate).params.length) + ) + fail('Fill parameter is out of range.'); + } + } + for (const c of spec.checks) { + if (!Number.isInteger(c.read) || c.read < 0 || c.read >= spec.reads.length) + fail('Check read index is out of range.'); + enumIndex(EVALUATIONS, c.evaluation, 'evaluation'); + enumIndex(OPERATIONS, c.operation, 'operation'); + if (c.evaluation === 'BOOLEAN' && c.operation !== 'EQUAL') + fail('BOOLEAN checks use EQUAL.'); + if (typeof c.target === 'bigint') int256(c.target); + else if (!template) + fail( + 'Complete JobSpec targets must be resolved integers.', + 'UNFILLED_PLACEHOLDER' + ); + else targetWire(c.target, (spec as JobSpecTemplate).params.length); + } + flattenLogic(spec.logic, spec.checks.length); +} +function targetWire( + target: JobCheckTemplate['target'], + params: number +): { source: number; value: bigint } { + if (typeof target === 'bigint') return { source: 0, value: int256(target) }; + if (target === PRINCIPAL) return { source: 1, value: BigInt(10000) }; + if (target === 'agentic:wallet') return { source: 3, value: BigInt(0) }; + if (target && typeof target === 'object' && 'principalBps' in target) { + if (int256(target.principalBps) <= BigInt(0)) + fail('principalBps must be positive.'); + return { source: 1, value: target.principalBps }; + } + if ( + target && + typeof target === 'object' && + 'param' in target && + Number.isInteger(target.param) && + target.param >= 0 && + target.param < params + ) + return { source: 2, value: BigInt(target.param) }; + return fail('Unknown or out-of-range template target.'); +} +export function buildJobSpec(options: BuildJobSpecOptions): JobSpec { + const spec: JobSpec = { + reads: normalizeReads(options.reads), + checks: options.checks.map((c) => ({ ...c })), + logic: + typeof options.logic === 'string' + ? { kind: options.logic, of: options.checks.map((_, i) => i) } + : options.logic, + allowedMutability: options.allowedMutability ?? 'NONE', + origin: options.origin ?? zeroHash, + executeBy: options.executeBy, + failFinalAt: options.failFinalAt, + }; + validate(spec); + if (options.expiredAt !== undefined) { + timestamp(options.expiredAt); + if (options.failFinalAt >= options.expiredAt) + fail('failFinalAt must precede job expiry.', 'FAIL_WINDOW_THIN'); + } + return spec; +} +export function buildJobSpecTemplate( + options: BuildJobSpecTemplateOptions +): JobSpecTemplate { + const t: JobSpecTemplate = { + reads: normalizeReads(options.reads), + checks: options.checks.map((c) => ({ ...c })), + logic: + typeof options.logic === 'string' + ? { kind: options.logic, of: options.checks.map((_, i) => i) } + : options.logic, + allowedMutability: options.allowedMutability ?? 'NONE', + params: (options.params ?? []).map((p) => ({ ...p })), + }; + validate(t); + return t; +} +export function encodeJobSpec(spec: JobSpec | JobSpecTemplate): Hex { + validate(spec); + const base = { + reads: spec.reads.map(({ fills, ...r }) => + 'params' in spec + ? { + ...r, + fills: (fills ?? []).map((f) => ({ + word: f.word, + source: f.source === 'WALLET' ? 0 : 1, + param: f.param ?? 0, + })), + } + : r + ), + logic: flattenLogic(spec.logic, spec.checks.length), + allowedMutability: MUTABILITIES.indexOf(spec.allowedMutability), + }; + const checks = spec.checks.map((c) => ({ + read: c.read, + evaluation: EVALUATIONS.indexOf(c.evaluation), + operation: OPERATIONS.indexOf(c.operation), + ...('params' in spec + ? targetWire(c.target, spec.params.length) + : { target: c.target }), + })); + const value = + 'params' in spec + ? { ...base, checks, params: spec.params } + : { + ...base, + checks, + origin: spec.origin, + executeBy: BigInt(spec.executeBy), + failFinalAt: BigInt(spec.failFinalAt), + }; + return encodeAbiParameters( + [('params' in spec ? JOB_TEMPLATE_PARAM : JOB_SPEC_PARAM) as AbiParameter], + [value] + ); +} +/** Known callers pass the format; inference requires one canonical validated decode. */ +export function decodeJobSpec( + bytes: Hex, + options?: { format?: 'spec' | 'template' } +): JobSpec | JobSpecTemplate { + if (!isHex(bytes) || bytes.length > 524290) + fail('Invalid or oversized JobSpec encoding.'); + const valid: (JobSpec | JobSpecTemplate)[] = []; + for (const template of options?.format + ? [options.format === 'template'] + : [false, true]) { + try { + const w = decodeAbiParameters( + [(template ? JOB_TEMPLATE_PARAM : JOB_SPEC_PARAM) as AbiParameter], + bytes + )[0] as SpecWire & TemplateWire; + const reads: JobRead[] = w.reads.map(({ fills: rawFills, ...r }) => ({ + ...r, + ...(template + ? { + fills: (rawFills ?? []).map((f) => { + if (f.source > 1 || (f.source === 0 && f.param !== 0)) + fail('Invalid stored fill.'); + return { + word: f.word, + source: + f.source === 0 ? ('WALLET' as const) : ('PARAM' as const), + ...(f.source === 1 ? { param: f.param } : {}), + }; + }), + } + : {}), + })); + const checks = w.checks.map((c) => { + const common = { + read: c.read, + evaluation: EVALUATIONS[c.evaluation], + operation: OPERATIONS[c.operation], + }; + if (!template) return { ...common, target: c.target }; + const t = c as unknown as TemplateCheckWire; + const target = + t.source === 0 + ? t.value + : t.source === 1 + ? t.value === BigInt(10000) + ? PRINCIPAL + : { principalBps: t.value } + : t.source === 2 + ? { param: Number(t.value) } + : t.source === 3 && t.value === BigInt(0) + ? ('agentic:wallet' as const) + : fail('Unknown template target.'); + return { ...common, target }; + }); + const common = { + reads, + checks, + logic: nestLogic(w.logic, checks.length), + allowedMutability: MUTABILITIES[w.allowedMutability], + }; + const spec = ( + template + ? { ...common, params: w.params } + : { + ...common, + origin: w.origin, + executeBy: Number(w.executeBy), + failFinalAt: Number(w.failFinalAt), + } + ) as JobSpec | JobSpecTemplate; + if (encodeJobSpec(spec).toLowerCase() === bytes.toLowerCase()) + valid.push(spec); + } catch { + /* Wrong shape, unsupported wire, malformed enums or noncanonical bytes. */ + } + } + if (valid.length !== 1) + fail( + 'The bytes do not identify one supported canonical deployed-v2 JobSpec format.', + 'UNSUPPORTED_JOB_SPEC' + ); + return valid[0]; +} diff --git a/packages/core/src/lib/job-spec/constants.ts b/packages/core/src/lib/job-spec/constants.ts new file mode 100644 index 00000000..fe6b4c16 --- /dev/null +++ b/packages/core/src/lib/job-spec/constants.ts @@ -0,0 +1,32 @@ +export const JOB_VOCABULARY = Object.freeze({ + EVALUATION: Object.freeze({ + BOOLEAN: 'BOOLEAN', + COMPARE: 'COMPARE', + NUMBER: 'NUMBER', + PERCENTAGE: 'PERCENTAGE', + } as const), + OPERATION: Object.freeze({ + EQUAL: 'EQUAL', + NOT_EQUAL: 'NOT_EQUAL', + GREATER_THAN: 'GREATER_THAN', + GREATER_OR_EQUAL: 'GREATER_OR_EQUAL', + LESS_THAN: 'LESS_THAN', + LESS_OR_EQUAL: 'LESS_OR_EQUAL', + } as const), + LOGIC: Object.freeze({ + ALL: 'ALL', + ANY: 'ANY', + AT_LEAST: 'AT_LEAST', + } as const), + ALLOWED_MUTABILITY: Object.freeze({ + NONE: 'NONE', + CLIENT: 'CLIENT', + PROVIDER: 'PROVIDER', + BOTH: 'BOTH', + } as const), +}); +export const PRINCIPAL = 'agentic:principal' as const; +export const EVALUATIONS = Object.values(JOB_VOCABULARY.EVALUATION); +export const OPERATIONS = Object.values(JOB_VOCABULARY.OPERATION); +export const LOGIC_KINDS = Object.values(JOB_VOCABULARY.LOGIC); +export const MUTABILITIES = Object.values(JOB_VOCABULARY.ALLOWED_MUTABILITY); diff --git a/packages/core/src/lib/job-spec/helpers.ts b/packages/core/src/lib/job-spec/helpers.ts new file mode 100644 index 00000000..31fd3ab5 --- /dev/null +++ b/packages/core/src/lib/job-spec/helpers.ts @@ -0,0 +1,205 @@ +import { + formatUnits, + getAddress, + keccak256, + toHex, + type Address, + type Hex, +} from 'viem'; +import { encodeJobSpec, int256 } from './codec'; +import { PRINCIPAL } from './constants'; +import { JobSpecError } from '../market/errors'; +import type { JobSpec, JobSpecTemplate, LogicTree } from './types'; +import { inheritReadLabel, jobReadLabel } from './read'; +export function resolveJobSpec( + template: JobSpecTemplate, + ctx: { + principal: bigint; + params: bigint[]; + accounts: Record; + origin: Hex; + executeBy: number; + settleWindow: number; + } +): JobSpec { + encodeJobSpec(template); + if ( + ctx.params.length !== template.params.length || + ctx.params.some( + (n, i) => int256(n) < template.params[i].min || n > template.params[i].max + ) + ) + throw new JobSpecError( + 'PARAM_OUT_OF_RANGE', + 'The job parameters do not match the template bounds.' + ); + const account = (read: number): Address => { + const r = template.reads[read]; + const a = ctx.accounts[`${r.chainNamespace}:${r.chainId}`]; + if (!a) + throw new JobSpecError( + 'UNFILLED_PLACEHOLDER', + 'Resolve the wallet account on every read chain.' + ); + return getAddress(a); + }; + const reads = template.reads.map((r, i) => { + let args = r.args; + for (const f of r.fills ?? []) { + const value = + f.source === 'WALLET' + ? BigInt(account(i)) + : BigInt.asUintN(256, ctx.params[f.param ?? 0]); + const at = 2 + f.word * 64; + args = (args.slice(0, at) + + toHex(value, { size: 32 }).slice(2) + + args.slice(at + 64)) as Hex; + } + const read = { ...r }; + delete read.fills; + const resolved = { ...read, args }; + inheritReadLabel(r, resolved); + return resolved; + }); + const checks = template.checks.map((c) => { + const t = c.target; + const target = + typeof t === 'bigint' + ? t + : t === PRINCIPAL + ? ctx.principal + : t === 'agentic:wallet' + ? BigInt(account(c.read)) + : 'param' in t + ? ctx.params[t.param] + : (() => { + const product = ctx.principal * t.principalBps; + if (product >= BigInt(1) << BigInt(256)) + throw new JobSpecError( + 'TARGET_OVERFLOW', + 'The principal-based target overflows uint256.' + ); + return product / BigInt(10000); + })(); + return { ...c, target: int256(target) }; + }); + const spec = { + reads, + checks, + logic: template.logic, + allowedMutability: template.allowedMutability, + origin: ctx.origin, + executeBy: ctx.executeBy, + failFinalAt: ctx.executeBy + ctx.settleWindow, + }; + encodeJobSpec(spec); + return spec; +} +const words = { + EQUAL: 'equals', + NOT_EQUAL: 'does not equal', + GREATER_THAN: 'is greater than', + GREATER_OR_EQUAL: 'is at least', + LESS_THAN: 'is less than', + LESS_OR_EQUAL: 'is at most', +}; +export function describeJobSpec( + spec: JobSpec | JobSpecTemplate, + options?: { principal?: bigint; decimals?: Record } +): { checks: string[]; logic: string; timing: string } { + encodeJobSpec(spec); + if (options?.principal !== undefined && int256(options.principal) < BigInt(0)) + throw new JobSpecError( + 'INVALID_DESCRIPTION_OPTIONS', + 'Principal must be nonnegative.' + ); + const decimals = new Map(); + for (const [address, value] of Object.entries(options?.decimals ?? {})) { + if (!Number.isInteger(value) || value < 0 || value > 255) + throw new JobSpecError( + 'INVALID_DESCRIPTION_OPTIONS', + 'Token decimals must be integers from 0 to 255.' + ); + try { + decimals.set(getAddress(address).toLowerCase(), value); + } catch (cause) { + throw new JobSpecError( + 'INVALID_DESCRIPTION_OPTIONS', + 'Decimals must be keyed by token address.', + undefined, + cause + ); + } + } + function logic(t: LogicTree): string { + return `${ + t.kind === 'ALL' ? 'All' : t.kind === 'ANY' ? 'Any' : `At least ${t.k}` + } of (${t.of + .map((x) => (typeof x === 'number' ? `check ${x + 1}` : logic(x))) + .join(', ')})`; + } + return { + checks: spec.checks.map((c) => { + const r = spec.reads[c.read]; + const t = c.target; + const resolvedTarget = + typeof t === 'bigint' + ? t + : t === PRINCIPAL + ? options?.principal ?? 'principal' + : t === 'agentic:wallet' + ? 'the wallet on this chain' + : 'param' in t + ? `parameter ${t.param + 1}` + : options?.principal !== undefined + ? (options.principal * t.principalBps) / BigInt(10000) + : `${t.principalBps} basis points of principal`; + const precision = decimals.get(r.target.toLowerCase()); + const target = + typeof resolvedTarget === 'bigint' + ? c.evaluation === 'PERCENTAGE' + ? `${formatUnits(resolvedTarget, 2)}% (${resolvedTarget} bps)` + : precision !== undefined && c.evaluation !== 'BOOLEAN' + ? `${formatUnits( + resolvedTarget, + precision + )} (${resolvedTarget} raw units; ${precision} decimals)` + : `${resolvedTarget} (raw units)` + : `${resolvedTarget}${ + c.evaluation === 'PERCENTAGE' ? ' bps' : ' (raw units)' + }`; + const name = jobReadLabel(r); + return `Read ${c.read + 1}: ${r.target} ${name ? name + ' ' : ''}${ + r.selector + } on ${r.chainNamespace}:${r.chainId}, field [${r.field.join(',')}], ${ + c.evaluation + } ${words[c.operation]} ${target}.`; + }), + logic: logic(spec.logic), + timing: + 'executeBy' in spec + ? `Execute by ${new Date( + spec.executeBy * 1000 + ).toISOString()}; failure is final after ${new Date( + spec.failFinalAt * 1000 + ).toISOString()}.` + : '', + }; +} +export function specOrigin( + marketplace: Address, + cardId: bigint, + version: bigint, + principal: bigint +): Hex { + // Imported here to keep the public helpers independent of client state. + return keccak256( + ('0x' + + [ + marketplace.slice(2).padStart(64, '0'), + ...[cardId, version, principal].map((n) => + toHex(n, { size: 32 }).slice(2) + ), + ].join('')) as Hex + ); +} diff --git a/packages/core/src/lib/job-spec/index.ts b/packages/core/src/lib/job-spec/index.ts new file mode 100644 index 00000000..8b181857 --- /dev/null +++ b/packages/core/src/lib/job-spec/index.ts @@ -0,0 +1,19 @@ +import { + buildJobSpec, + buildJobSpecTemplate, + encodeJobSpec, + decodeJobSpec, +} from './codec'; +import { describeJobSpec } from './helpers'; +import { prepareJobRead } from './read'; +import { previewJobSpec } from './preview'; +export const jobSpecUtils = Object.freeze({ + buildJobSpec, + buildJobSpecTemplate, + encodeJobSpec, + decodeJobSpec, + describeJobSpec, + prepareRead: prepareJobRead, + previewJobSpec, +}); +export type * from './types'; diff --git a/packages/core/src/lib/job-spec/preview.ts b/packages/core/src/lib/job-spec/preview.ts new file mode 100644 index 00000000..c409fe0f --- /dev/null +++ b/packages/core/src/lib/job-spec/preview.ts @@ -0,0 +1,396 @@ +import { + decodeAbiParameters, + getAddress, + keccak256, + zeroHash, + type Address, + type Hex, +} from 'viem'; +import type { CHAIN } from '../constants/enums'; +import { READ_OUTCOME } from '../read-state/read-state.types'; +import type { UniversalReadResponse } from '../read-state/read-state.types'; +import { decodeEvmQueryEnvelope } from '../read-state/envelopes'; +import type { ReadPrepareOptions } from '../read-state/read-params'; +import { JobSpecError } from '../market/errors'; +import { decodeJobSpec, encodeJobSpec, int256 } from './codec'; +import { resolveJobSpec } from './helpers'; +import { parseOutputs, type OutputNode } from './read'; +import { PRINCIPAL } from './constants'; +import type { + JobRead, + JobSpec, + JobSpecTemplate, + JobSpecPreview, + LogicTree, + Operation, + PreviewJobSpecOptions, +} from './types'; + +const resolvers = new WeakMap< + object, + (wallet: Address, chain: CHAIN) => Promise
+>(); +/** @internal Bind the real client's configured CEA resolver without exposing its runtime. */ +export function bindJobPreviewAccounts( + universal: object, + resolve: (wallet: Address, chain: CHAIN) => Promise
+): void { + resolvers.set(universal, resolve); +} + +/** Follow the deployed V2 type codes; uint values above int256.max cannot be compared. */ +export function decodeJobAnswer(read: JobRead, data: Hex): bigint { + const bytes = BigInt((data.length - 2) / 2); + const invalid = (): never => { + throw new JobSpecError( + 'INVALID_READ_RESULT', + 'The consensus bytes do not contain the selected JobSpec field.' + ); + }; + const word = (at: bigint): bigint => { + if (at < BigInt(0) || at + BigInt(32) > bytes) return invalid(); + return BigInt('0x' + data.slice(2 + Number(at) * 2, 66 + Number(at) * 2)); + }; + const dynamic = (n: OutputNode): boolean => + [6, 7, 9].includes(n.code) || n.children.some(dynamic); + const head = (n: OutputNode): bigint => + dynamic(n) + ? BigInt(1) + : n.code === 8 + ? n.children.reduce((sum, c) => sum + head(c), BigInt(0)) + : n.code === 10 + ? BigInt(n.size ?? 0) * head(n.children[0]) + : BigInt(1); + let node = parseOutputs(read.outputs); + let base = BigInt(0); + for (const index of read.field) { + let child: OutputNode; + let start = base; + let slot: bigint; + if (node.code === 8) { + child = node.children[index]; + if (!child) return invalid(); + slot = + base + + BigInt(32) * + node.children + .slice(0, index) + .reduce((sum, c) => sum + head(c), BigInt(0)); + } else if (node.code === 9 || node.code === 10) { + if ( + BigInt(index) >= (node.code === 9 ? word(base) : BigInt(node.size ?? 0)) + ) + return invalid(); + child = node.children[0]; + start += node.code === 9 ? BigInt(32) : BigInt(0); + slot = start + BigInt(32) * BigInt(index) * head(child); + } else return invalid(); + base = dynamic(child) ? start + word(slot) : slot; + if (base > bytes) return invalid(); + node = child; + } + const value = word(base); + if (node.code === 6 || node.code === 7) { + if (base + BigInt(32) + value > bytes) return invalid(); + return BigInt.asIntN( + 256, + BigInt( + keccak256( + ('0x' + + data.slice( + 2 + Number(base + BigInt(32)) * 2, + 2 + Number(base + BigInt(32) + value) * 2 + )) as Hex + ) + ) + ); + } + if (node.code === 9) return BigInt.asIntN(256, value); + if ( + (node.code === 1 && value >= BigInt(1) << BigInt(255)) || + (node.code === 3 && value > BigInt(1)) || + (node.code === 4 && value >= BigInt(1) << BigInt(160)) + ) + return invalid(); + return BigInt.asIntN(256, value); +} + +function compare(value: bigint, op: Operation, target: bigint): boolean { + switch (op) { + case 'EQUAL': + return value === target; + case 'NOT_EQUAL': + return value !== target; + case 'GREATER_THAN': + return value > target; + case 'GREATER_OR_EQUAL': + return value >= target; + case 'LESS_THAN': + return value < target; + case 'LESS_OR_EQUAL': + return value <= target; + } +} +function combine( + tree: LogicTree, + checks: JobSpecPreview['checks'] +): boolean | null { + const results = tree.of.map((x) => + typeof x === 'number' ? checks[x].pass : combine(x, checks) + ); + const yes = results.filter((v) => v === true).length; + const unknown = results.filter((v) => v === null).length; + const required = + tree.kind === 'ALL' + ? results.length + : tree.kind === 'ANY' + ? 1 + : tree.k ?? 0; + return yes >= required ? true : yes + unknown < required ? false : null; +} + +export async function previewJobSpec( + subject: JobSpec | JobSpecTemplate, + options: PreviewJobSpecOptions +): Promise { + // Validate and copy before asynchronous work; later caller mutations must not change paid criteria. + const input = decodeJobSpec(encodeJobSpec(subject), { + format: 'params' in subject ? 'template' : 'spec', + }); + options = { + ...options, + params: options.params && [...options.params], + baseline: options.baseline && [...options.baseline], + accounts: { ...options.accounts }, + resume: options.resume && [...options.resume], + }; + if ( + options.maxTotalFee !== undefined && + (typeof options.maxTotalFee !== 'bigint' || options.maxTotalFee < BigInt(0)) + ) + throw new JobSpecError( + 'INVALID_AMOUNT', + 'maxTotalFee must be a nonnegative bigint.' + ); + if (options.baseline) { + if (options.baseline.length !== input.reads.length) + throw new JobSpecError( + 'INVALID_BASELINE', + 'Provide one baseline entry per read; use null for unknown entries.' + ); + options.baseline.forEach((value) => { + if (value !== null) int256(value); + }); + } + let spec: JobSpec; + if ('params' in input) { + if ( + input.checks.some( + (c) => + c.target === PRINCIPAL || + (typeof c.target === 'object' && 'principalBps' in c.target) + ) && + options.principal === undefined + ) + throw new JobSpecError( + 'UNFILLED_PLACEHOLDER', + 'Supply principal to resolve principal-based preview targets.' + ); + const accounts = { ...options.accounts }; + const resolve = resolvers.get(options.client.universal); + for (const [index, read] of input.reads.entries()) { + const chain = `${read.chainNamespace}:${read.chainId}`; + const needed = + read.fills?.some((f) => f.source === 'WALLET') || + input.checks.some( + (c) => c.read === index && c.target === 'agentic:wallet' + ); + if (needed && !accounts[chain] && options.wallet && resolve) + accounts[chain] = await resolve( + getAddress(options.wallet), + chain as CHAIN + ); + } + spec = resolveJobSpec(input, { + principal: options.principal ?? BigInt(0), + params: options.params ?? [], + accounts, + origin: zeroHash, + executeBy: 0, + settleWindow: 1, + }); + } else spec = input; + const waitOptions = { + timeoutMs: options.advanced?.timeout, + pollingIntervalMs: options.advanced?.pollingIntervalMs, + resultShape: { kind: 'raw' as const }, + }; + let responses: UniversalReadResponse[]; + let quoted = BigInt(0); + let newlyPaid = BigInt(0); + if (options.resume) { + if ( + options.resume.length !== spec.reads.length || + options.resume.some((id) => !/^0x[\da-f]{64}$/i.test(id)) || + new Set(options.resume.map((x) => x.toLowerCase())).size !== + options.resume.length + ) + throw new JobSpecError( + 'INVALID_PREVIEW_RESUME', + 'Provide one distinct request ID per read, in read order.' + ); + responses = []; + for (const [i, id] of options.resume.entries()) { + const response = await options.client.universal.trackRead( + { requestId: id }, + { resultShape: { kind: 'raw' }, progressHook: options.progressHook } + ); + const read = spec.reads[i]; + let matched = false; + try { + const actual = response.request.spec; + const envelope = decodeEvmQueryEnvelope(actual.query); + const [target, calldata] = decodeAbiParameters( + [{ type: 'address' }, { type: 'bytes' }], + envelope.payload + ); + matched = + response.requestId.toLowerCase() === id.toLowerCase() && + actual.account.chainNamespace === read.chainNamespace && + actual.account.chainId === read.chainId && + actual.minConfirmations >= read.minConfirmations && + envelope.queryType === 1 && + envelope.refType === 0 && + envelope.blockNumber === actual.blockNumber && + getAddress(target) === getAddress(read.target) && + calldata.toLowerCase() === + (read.selector + read.args.slice(2)).toLowerCase(); + } catch { + /* A request from another schema/query cannot stand in for this logical read. */ + } + if (!matched) + throw new JobSpecError( + 'PREVIEW_REQUEST_MISMATCH', + 'The recorded request does not match this resolved JobSpec read.', + { read: i, requestId: id } + ); + responses.push(response); + } + quoted = responses.reduce( + (sum, response) => sum + response.fees.paid, + BigInt(0) + ); + } else { + const prepared = []; + for (const read of spec.reads) { + const readOptions: ReadPrepareOptions = { + chain: `${read.chainNamespace}:${read.chainId}` as Extract< + CHAIN, + `eip155:${string}` + >, + callData: (read.selector + read.args.slice(2)) as Hex, + minConfirmations: read.minConfirmations, + expiryBlocks: options.expiryBlocks, + refundTo: options.refundTo, + callback: options.callback as ReadPrepareOptions['callback'], + }; + prepared.push( + await options.client.universal.prepareRead(read.target, readOptions) + ); + } + quoted = prepared.reduce((sum, read) => sum + read.value, BigInt(0)); + if (options.maxTotalFee !== undefined && quoted > options.maxTotalFee) + throw new JobSpecError( + 'PREVIEW_FEE_EXCEEDED', + 'The prepared read fees exceed maxTotalFee. No read was submitted.', + { quoted, maxTotalFee: options.maxTotalFee } + ); + let batch; + try { + batch = await options.client.universal.executeReads(prepared, { + progressHook: options.progressHook, + advanced: options.advanced, + waitForCompletion: false, + }); + } catch (cause) { + const error = cause as { + txHash?: string; + transactionHashes?: readonly Hex[]; + pendingTransactionHash?: Hex; + }; + throw new JobSpecError( + 'PREVIEW_INCOMPLETE', + 'Read submission could not be confirmed. Track the recorded transactions before requesting more reads.', + { + txHash: error?.txHash, + transactionHashes: error?.transactionHashes, + pendingTransactionHash: error?.pendingTransactionHash, + }, + cause + ); + } + responses = batch.reads; + newlyPaid = quoted; + } + const requestIds = responses.map((r) => r.requestId); + try { + responses = await Promise.all(responses.map((r) => r.wait(waitOptions))); + } catch (cause) { + throw new JobSpecError( + 'PREVIEW_INCOMPLETE', + 'The paid reads are still recoverable. Resume with these request IDs instead of paying again.', + { requestIds, txHashes: responses.map((r) => r.txHash) }, + cause + ); + } + const reads: JobSpecPreview['reads'] = responses.map((response, i) => { + const value = response.raw?.resultData ?? null; + if (response.outcome !== READ_OUTCOME.SUCCESS || value === null) + return { + value, + decoded: null, + error: + response.errorMsg || 'The paid read did not complete successfully.', + response, + }; + try { + return { + value, + decoded: decodeJobAnswer(spec.reads[i], value), + response, + }; + } catch (e) { + return { value, decoded: null, error: (e as Error).message, response }; + } + }); + const checks: JobSpecPreview['checks'] = spec.checks.map((check) => { + let value = reads[check.read].decoded; + if (value === null) + return { pass: null, value, reason: 'READ_UNAVAILABLE' }; + if (check.evaluation === 'NUMBER' || check.evaluation === 'PERCENTAGE') { + const before = options.baseline?.[check.read]; + if (before === undefined || before === null) + return { pass: null, value: null, reason: 'BASELINE_REQUIRED' }; + if (check.evaluation === 'PERCENTAGE' && before === BigInt(0)) + return { pass: null, value: null, reason: 'ZERO_BASELINE' }; + try { + value = int256(value - before); + if (check.evaluation === 'PERCENTAGE') + value = int256(value * BigInt(10000)) / before; + } catch { + return { pass: null, value: null, reason: 'ARITHMETIC_OVERFLOW' }; + } + } + return { pass: compare(value, check.operation, check.target), value }; + }); + return { + reads, + checks, + pass: combine(spec.logic, checks), + fees: { + quoted, + paid: reads.reduce((sum, r) => sum + r.response.fees.paid, BigInt(0)), + newlyPaid, + }, + }; +} diff --git a/packages/core/src/lib/job-spec/read.ts b/packages/core/src/lib/job-spec/read.ts new file mode 100644 index 00000000..7dfedb5b --- /dev/null +++ b/packages/core/src/lib/job-spec/read.ts @@ -0,0 +1,341 @@ +import { + encodeAbiParameters, + getAddress, + isAddress, + isHex, + toFunctionSelector, + zeroAddress, + type AbiFunction, + type AbiParameter, + type Hex, +} from 'viem'; +import { argumentLocation } from '../agentic/codec/abi-layout'; +import { JobSpecError } from '../market/errors'; +import type { + JobFill, + PrepareJobReadOptions, + PreparedJobRead, + ExecuteJobReadOptions, +} from './types'; +import type { ReadOptions } from '../read-state/read-params'; +import type { CHAIN } from '../constants/enums'; + +const labels = new WeakMap< + PreparedJobRead, + { + selector: Hex; + outputs: Hex; + target: string; + name: string; + parameters: readonly AbiParameter[]; + } +>(); +export function inheritReadLabel( + source: PreparedJobRead, + target: PreparedJobRead +): void { + const value = labels.get(source); + if ( + value && + value.selector === source.selector && + value.outputs === source.outputs && + value.target === source.target.toLowerCase() + ) + labels.set(target, value); +} +export function jobReadLabel(read: PreparedJobRead): string | undefined { + const value = labels.get(read); + return value && + value.selector === read.selector && + value.outputs === read.outputs && + value.target === read.target.toLowerCase() + ? value.name + : undefined; +} +/** Same logical call as a JobSpec read, through the normal paid universal-read path. */ +export function jobReadOptions( + read: PreparedJobRead, + options: ExecuteJobReadOptions = {} +): ReadOptions { + validateJobRead(read); + if (read.fills?.length) + throw new JobSpecError( + 'UNFILLED_PLACEHOLDER', + 'Resolve WALLET/PARAM holes before sending a prepared read.' + ); + return { + ...options, + chain: `${read.chainNamespace}:${read.chainId}` as Extract< + CHAIN, + `eip155:${string}` + >, + callData: (read.selector + read.args.slice(2)) as Hex, + }; +} + +export function outputTypes(params: readonly AbiParameter[]): Hex { + function type(p: AbiParameter, depth: number): number[] { + if (depth > 16) + throw new JobSpecError('INVALID_READ', 'Output type nesting exceeds 16.'); + const a = /^(.*)\[(\d*)\]$/.exec(p.type); + if (a) { + const base = { ...p, type: a[1] } as AbiParameter; + if (!a[2]) return [9, ...type(base, depth + 1)]; + const n = Number(a[2]); + if (n < 1 || n > 255) + throw new JobSpecError( + 'INVALID_READ', + 'Fixed output arrays must contain 1..255 elements.' + ); + return [10, n, ...type(base, depth + 1)]; + } + if (p.type === 'tuple') + return tuple( + (p as { components: readonly AbiParameter[] }).components, + depth + 1 + ); + if (/^uint(\d+)?$/.test(p.type)) return [1]; + if (/^int(\d+)?$/.test(p.type)) return [2]; + if (p.type === 'bool') return [3]; + if (p.type === 'address') return [4]; + if (/^bytes([1-9]|[12]\d|3[0-2])$/.test(p.type)) return [5]; + if (p.type === 'bytes') return [6]; + if (p.type === 'string') return [7]; + throw new JobSpecError('INVALID_READ', `Unsupported ABI output ${p.type}.`); + } + function tuple(items: readonly AbiParameter[], depth: number): number[] { + if (items.length < 1 || items.length > 255) + throw new JobSpecError( + 'INVALID_READ', + 'An output tuple needs 1..255 fields.' + ); + return [8, items.length, ...items.flatMap((p) => type(p, depth))]; + } + return ('0x' + + tuple(params, 0) + .map((x) => x.toString(16).padStart(2, '0')) + .join('')) as Hex; +} + +/** Pure ABI preparation, independent of read fees, RPCs and the request preflight. */ +export function prepareJobRead( + options: PrepareJobReadOptions +): PreparedJobRead { + try { + if (!/^eip155:[1-9]\d*$/.test(options.chain)) + throw new JobSpecError( + 'CHAIN_UNSUPPORTED', + 'JobSpec reads currently support EVM chain identifiers only.' + ); + const candidates = options.abi.filter( + (x): x is AbiFunction => + x.type === 'function' && + x.name === options.functionName && + x.inputs.length === (options.args?.length ?? 0) + ); + if (candidates.length !== 1) + throw new JobSpecError( + 'INVALID_READ', + 'Select one exact function ABI for this read, including overloaded functions.' + ); + const fn = candidates[0]; + if (!['view', 'pure'].includes(fn.stateMutability)) + throw new JobSpecError( + 'INVALID_READ', + 'A JobSpec read must use a view or pure function.' + ); + const fills: JobFill[] = []; + const lower = ( + p: AbiParameter, + value: unknown, + indices: number[], + depth: number + ): unknown => { + if (depth > 16) + throw new JobSpecError( + 'INVALID_READ', + 'Read arguments are nested too deeply.' + ); + const marker = value === 'agentic:wallet'; + const param = + value && typeof value === 'object' && 'param' in value + ? (value as { param: unknown }).param + : undefined; + if (marker || param !== undefined) { + if (marker && p.type !== 'address') + throw new JobSpecError( + 'INVALID_READ', + 'WALLET read arguments must be addresses.' + ); + if (!marker && !/^u?int(\d+)?$/.test(p.type)) + throw new JobSpecError( + 'INVALID_READ', + 'PARAM read arguments must be static integers.' + ); + if ( + !marker && + (!Number.isInteger(param) || Number(param) < 0 || Number(param) > 255) + ) + throw new JobSpecError( + 'INVALID_READ', + 'Invalid template parameter index.' + ); + const word = + (argumentLocation(fn.inputs, indices, 'Read placeholder').offset - + 4) / + 32; + if (word > 255) + throw new JobSpecError( + 'INVALID_READ', + 'Read placeholder is outside the uint8 word range.' + ); + fills.push({ + word, + source: marker ? 'WALLET' : 'PARAM', + ...(!marker ? { param: Number(param) } : {}), + }); + return marker ? zeroAddress : BigInt(0); + } + const a = /^(.*)\[(\d*)\]$/.exec(p.type); + if (a) { + if (!Array.isArray(value)) + throw new JobSpecError( + 'INVALID_READ', + 'Array argument must be an array.' + ); + return value.map((v, i) => + lower( + { ...p, type: a[1] } as AbiParameter, + v, + [...indices, i], + depth + 1 + ) + ); + } + if (p.type === 'tuple') { + const fields = (p as { components: readonly AbiParameter[] }) + .components; + return fields.map((field, i) => + lower( + field, + Array.isArray(value) + ? value[i] + : (value as Record)?.[field.name ?? ''], + [...indices, i], + depth + 1 + ) + ); + } + return value; + }; + const values = fn.inputs.map((p, i) => lower(p, options.args?.[i], [i], 0)); + const [chainNamespace, chainId] = options.chain.split(':'); + const prepared = { + chainNamespace, + chainId, + target: getAddress(options.target), + selector: toFunctionSelector(fn), + args: encodeAbiParameters(fn.inputs, values), + outputs: outputTypes(fn.outputs), + ...(fills.length ? { fills } : {}), + }; + labels.set(prepared, { + selector: prepared.selector, + outputs: prepared.outputs, + target: prepared.target.toLowerCase(), + name: fn.name, + parameters: fn.outputs, + }); + return prepared; + } catch (cause) { + if (cause instanceof JobSpecError) throw cause; + throw new JobSpecError( + 'INVALID_READ', + 'The read arguments or ABI are invalid.', + undefined, + cause + ); + } +} + +export interface OutputNode { + code: number; + children: OutputNode[]; + size?: number; +} +export function parseOutputs(outputs: Hex): OutputNode { + if (!isHex(outputs) || outputs.length % 2 !== 0 || outputs.length > 8194) + throw new JobSpecError('INVALID_READ', 'Invalid output type layout.'); + const bytes = + outputs + .slice(2) + .match(/../g) + ?.map((x) => parseInt(x, 16)) ?? []; + let pos = 0; + function read(depth: number): OutputNode { + if (depth > 16 || pos >= bytes.length) + throw new JobSpecError('INVALID_READ', 'Invalid output type layout.'); + const code = bytes[pos++]; + const n: OutputNode = { code, children: [] }; + if (code === 8 || code === 10) { + n.size = bytes[pos++]; + if (!n.size) + throw new JobSpecError( + 'INVALID_READ', + 'An output tuple/array cannot be empty.' + ); + if (code === 8) + for (let i = 0; i < n.size; i++) n.children.push(read(depth + 1)); + else n.children.push(read(depth + 1)); + } else if (code === 9) n.children.push(read(depth + 1)); + else if (code < 1 || code > 7) + throw new JobSpecError('INVALID_READ', 'Unknown output type code.'); + return n; + } + const root = read(0); + if (root.code !== 8 || pos !== bytes.length) + throw new JobSpecError( + 'INVALID_READ', + 'Outputs must encode exactly one root tuple.' + ); + return root; +} +export function validateJobRead( + r: PreparedJobRead & { field?: number[]; minConfirmations?: number } +): void { + if ( + r.chainNamespace !== 'eip155' || + !/^[1-9]\d*$/.test(r.chainId) || + !isAddress(r.target) || + !/^0x[\da-f]{8}$/i.test(r.selector) || + !isHex(r.args) || + r.args.length % 2 + ) + throw new JobSpecError('INVALID_READ', 'Invalid EVM JobSpec read.'); + let node = parseOutputs(r.outputs); + const field = r.field ?? [0]; + if (field.length < 1 || field.length > 16) + throw new JobSpecError( + 'INVALID_READ', + 'Output field path must have 1..16 indexes.' + ); + for (const i of field) { + if ( + !Number.isInteger(i) || + i < 0 || + i > 255 || + ![8, 9, 10].includes(node.code) || + (node.code !== 9 && i >= (node.size ?? 0)) + ) + throw new JobSpecError( + 'INVALID_READ', + 'Output field path does not resolve.' + ); + node = node.children[node.code === 8 ? i : 0]; + } + if ([8, 10].includes(node.code)) + throw new JobSpecError( + 'INVALID_READ', + 'Choose a scalar or dynamic-length output field.' + ); +} diff --git a/packages/core/src/lib/job-spec/schema.ts b/packages/core/src/lib/job-spec/schema.ts new file mode 100644 index 00000000..93b7e794 --- /dev/null +++ b/packages/core/src/lib/job-spec/schema.ts @@ -0,0 +1,66 @@ +export const READ_FIELDS = [ + { name: 'chainNamespace', type: 'string' }, + { name: 'chainId', type: 'string' }, + { name: 'minConfirmations', type: 'uint16' }, + { name: 'target', type: 'address' }, + { name: 'selector', type: 'bytes4' }, + { name: 'args', type: 'bytes' }, + { name: 'outputs', type: 'bytes' }, + { name: 'field', type: 'uint8[]' }, +] as const; +export const FILL_FIELDS = [ + { name: 'word', type: 'uint8' }, + { name: 'source', type: 'uint8' }, + { name: 'param', type: 'uint8' }, +] as const; +export const TEMPLATE_READ_FIELDS = [ + ...READ_FIELDS.slice(0, 6), + { name: 'fills', type: 'tuple[]', components: FILL_FIELDS }, + ...READ_FIELDS.slice(6), +] as const; +export const CHECK_FIELDS = [ + { name: 'read', type: 'uint8' }, + { name: 'evaluation', type: 'uint8' }, + { name: 'operation', type: 'uint8' }, + { name: 'target', type: 'int256' }, +] as const; +export const TEMPLATE_CHECK_FIELDS = [ + ...CHECK_FIELDS.slice(0, 3), + { name: 'source', type: 'uint8' }, + { name: 'value', type: 'int256' }, +] as const; +export const LOGIC_FIELDS = [ + { name: 'kind', type: 'uint8' }, + { name: 'checks', type: 'uint8[]' }, + { name: 'children', type: 'uint8[]' }, + { name: 'k', type: 'uint8' }, +] as const; +export const JOB_SPEC_PARAM = { + type: 'tuple', + components: [ + { name: 'reads', type: 'tuple[]', components: READ_FIELDS }, + { name: 'checks', type: 'tuple[]', components: CHECK_FIELDS }, + { name: 'logic', type: 'tuple[]', components: LOGIC_FIELDS }, + { name: 'allowedMutability', type: 'uint8' }, + { name: 'origin', type: 'bytes32' }, + { name: 'executeBy', type: 'uint64' }, + { name: 'failFinalAt', type: 'uint64' }, + ], +} as const; +export const JOB_TEMPLATE_PARAM = { + type: 'tuple', + components: [ + { name: 'reads', type: 'tuple[]', components: TEMPLATE_READ_FIELDS }, + { name: 'checks', type: 'tuple[]', components: TEMPLATE_CHECK_FIELDS }, + { name: 'logic', type: 'tuple[]', components: LOGIC_FIELDS }, + { name: 'allowedMutability', type: 'uint8' }, + { + name: 'params', + type: 'tuple[]', + components: [ + { name: 'min', type: 'int256' }, + { name: 'max', type: 'int256' }, + ], + }, + ], +} as const; diff --git a/packages/core/src/lib/job-spec/types.ts b/packages/core/src/lib/job-spec/types.ts new file mode 100644 index 00000000..d80e70ab --- /dev/null +++ b/packages/core/src/lib/job-spec/types.ts @@ -0,0 +1,148 @@ +import type { Abi, Address, Hex } from 'viem'; +import type { ArgumentPath, WalletMarker } from '../agentic/agentic.types'; +import type { JOB_VOCABULARY, PRINCIPAL } from './constants'; +import type { PushChain } from '../push-chain/push-chain'; +import type { + ReadCallback, + UniversalReadResponse, +} from '../read-state/read-state.types'; +import type { ReadExecuteOptions } from '../read-state/read-params'; +import type { ReadOptions } from '../read-state/read-params'; +export type Evaluation = + (typeof JOB_VOCABULARY.EVALUATION)[keyof typeof JOB_VOCABULARY.EVALUATION]; +export type Operation = + (typeof JOB_VOCABULARY.OPERATION)[keyof typeof JOB_VOCABULARY.OPERATION]; +export type LogicKind = + (typeof JOB_VOCABULARY.LOGIC)[keyof typeof JOB_VOCABULARY.LOGIC]; +export type AllowedMutability = + (typeof JOB_VOCABULARY.ALLOWED_MUTABILITY)[keyof typeof JOB_VOCABULARY.ALLOWED_MUTABILITY]; +export type PrincipalMarker = typeof PRINCIPAL; +export interface JobFill { + word: number; + source: 'WALLET' | 'PARAM'; + param?: number; +} +export interface PreparedJobRead { + chainNamespace: string; + chainId: string; + target: Address; + selector: Hex; + args: Hex; + outputs: Hex; + /** Placeholder positions are explicit; zero argument values are never treated as holes. */ + fills?: JobFill[]; +} +export interface JobRead extends PreparedJobRead { + minConfirmations: number; + field: number[]; +} +export interface PrepareJobReadOptions { + chain: string; + target: Address; + abi: Abi; + functionName: string; + args?: readonly unknown[]; +} +export type ExecuteJobReadOptions = Pick< + ReadOptions, + | 'callback' + | 'minConfirmations' + | 'blockNumber' + | 'expiryBlocks' + | 'maxFee' + | 'refundTo' + | 'waitForCompletion' + | 'progressHook' + | 'advanced' +>; +export interface JobReadInput { + read: PreparedJobRead; + minConfirmations?: number; + field?: number[]; +} +export interface JobCheck { + read: number; + evaluation: Evaluation; + operation: Operation; + target: bigint; +} +export interface JobCheckTemplate extends Omit { + target: + | bigint + | PrincipalMarker + | WalletMarker + | { principalBps: bigint } + | { param: number }; +} +export interface LogicTree { + kind: LogicKind; + of: (number | LogicTree)[]; + k?: number; +} +export interface JobSpec { + reads: JobRead[]; + checks: JobCheck[]; + logic: LogicTree; + allowedMutability: AllowedMutability; + origin: Hex; + executeBy: number; + failFinalAt: number; +} +export interface JobSpecTemplate { + reads: JobRead[]; + checks: JobCheckTemplate[]; + logic: LogicTree; + allowedMutability: AllowedMutability; + params: { min: bigint; max: bigint }[]; +} +export interface BuildJobSpecOptions { + reads: (PreparedJobRead | JobReadInput)[]; + checks: JobCheck[]; + logic: 'ALL' | 'ANY' | LogicTree; + allowedMutability?: AllowedMutability; + executeBy: number; + failFinalAt: number; + expiredAt?: number; + origin?: Hex; +} +export interface BuildJobSpecTemplateOptions + extends Omit< + BuildJobSpecOptions, + 'checks' | 'executeBy' | 'failFinalAt' | 'expiredAt' | 'origin' + > { + checks: JobCheckTemplate[]; + params?: { min: bigint; max: bigint }[]; +} +export interface PreviewJobSpecOptions { + client: Pick; + wallet?: Address; + principal?: bigint; + params?: bigint[]; + /** Explicit destination accounts override CEA derivation from wallet on a real SDK client. */ + accounts?: Record; + /** Optional baseline per read for NUMBER/PERCENTAGE. Missing baselines remain unknown. */ + baseline?: readonly (bigint | null)[]; + /** Existing universal-read registry is used by default. */ + callback?: ReadCallback; + /** Maximum sum of prepared read request values, checked before any payment. */ + maxTotalFee?: bigint; + expiryBlocks?: bigint; + refundTo?: Address; + progressHook?: ReadExecuteOptions['progressHook']; + advanced?: ReadExecuteOptions['advanced']; + /** One existing request ID per read, in read order. Validated against the resolved call; no new fees. */ + resume?: readonly Hex[]; +} +export interface JobSpecPreview { + /** A preview is a paid observation, never an evaluator verdict. */ + reads: { + value: Hex | null; + decoded: bigint | null; + error?: string; + response: UniversalReadResponse; + }[]; + checks: { pass: boolean | null; value: bigint | null; reason?: string }[]; + pass: boolean | null; + fees: { quoted: bigint; paid: bigint; newlyPaid: bigint }; +} +export type JobArgumentPath = ArgumentPath; diff --git a/packages/core/src/lib/job/job.ts b/packages/core/src/lib/job/job.ts new file mode 100644 index 00000000..49865830 --- /dev/null +++ b/packages/core/src/lib/job/job.ts @@ -0,0 +1,600 @@ +import { + decodeEventLog, + encodeAbiParameters, + encodeFunctionData, + erc20Abi, + getAbiItem, + getAddress, + keccak256, + stringToHex, + zeroAddress, + zeroHash, + type Address, + type Hex, +} from 'viem'; +import { JOB_KERNEL_ABI as ABI } from '../market/contracts/AgenticCommerce'; +import { RULES_HOOK_ABI } from '../market/contracts/RulesBindingHook'; +import { MARKETPLACE_ABI } from '../market/contracts/UniversalMarketplace'; +import { KERNEL_READ_ABI, encodeCreateJob } from '../market/kernel-wire'; +import { + deployment, + eventArgs, + ownerBatch, + snapshot, + write, + type MarketSnapshot, + type StackRuntime, +} from '../market/runtime'; +import { JobError, unavailable } from '../market/errors'; +import { currentGeneration } from '../agentic/deployments'; +import { getRule } from '../agentic/reads/rules'; +import { Snapshot, scanLogs } from '../agentic/reads/snapshot'; +import { decodeJobSpec } from '../job-spec/codec'; +import type { JobSpec } from '../job-spec/types'; +import type { Call } from '../agentic/contracts/v6'; +import { watchJob } from './watch'; +import type { + CreateJobOptions, + FundJobOptions, + Job, + JobEvent, + JobNamespace, + JobStatus, + JobWriteOptions, + JobWatchOptions, +} from './types'; + +const STATES: JobStatus[] = [ + 'Open', + 'Funded', + 'Submitted', + 'Completed', + 'Rejected', + 'Expired', +]; +interface KernelJob { + client: Address; + status: number; + provider: Address; + expiredAt: number; + evaluator: Address; + hook: Address; + budget: bigint; + description: Hex; +} +function validId(jobId: bigint): void { + if (typeof jobId !== 'bigint' || jobId < BigInt(1)) + throw new JobError('INVALID_JOB_ID', 'Job IDs are positive bigint values.'); +} +function amount(n: bigint): void { + if (typeof n !== 'bigint' || n < BigInt(0) || n >= BigInt(1) << BigInt(256)) + throw new JobError('INVALID_AMOUNT', 'The amount must fit uint256.'); +} + +export class JobNamespaceImpl implements JobNamespace { + constructor(private readonly rt: StackRuntime) {} + private async raw(jobId: bigint, s: MarketSnapshot): Promise { + validId(jobId); + const j = await s.read( + deployment(this.rt).kernel, + KERNEL_READ_ABI, + 'getJob', + [jobId] + ); + if (getAddress(j.client) === zeroAddress || !STATES[j.status]) + throw new JobError('JOB_NOT_FOUND', 'This job does not exist.'); + return j; + } + private async jobAt(jobId: bigint, s: MarketSnapshot): Promise { + const d = deployment(this.rt); + const j = await this.raw(jobId, s); + const paymentToken = await s.read
(d.kernel, ABI, 'paymentToken'); + let spec: JobSpec | undefined; + let decodeError: string | undefined; + if (j.description !== '0x') { + try { + spec = decodeJobSpec(j.description, { format: 'spec' }) as JobSpec; + } catch (e) { + decodeError = (e as Error).message; + } + } + const rulesId = + getAddress(j.hook) === getAddress(d.hook) + ? await s.read(d.hook, RULES_HOOK_ABI, 'rulesOfJob', [jobId]) + : undefined; + let deliverable: Hex | undefined; + if (j.status >= 2) { + const logs = await scanLogs( + this.rt.agw.reader, + { + address: d.kernel, + event: getAbiItem({ abi: ABI, name: 'JobSubmitted' }), + args: { jobId }, + }, + this.rt.jobBlocks?.get(jobId) ?? d.startBlock, + s.blockNumber + ); + if (logs.length > 1) + throw new JobError( + 'INCONSISTENT_READ', + 'The job has multiple submission events.' + ); + if (logs.length === 1) { + const event = decodeEventLog({ + abi: ABI, + eventName: 'JobSubmitted', + data: logs[0].data, + topics: logs[0].topics, + }); + deliverable = event.args.deliverable; + } + } + return { + ...j, + jobId, + status: STATES[j.status], + paymentToken, + ...(deliverable ? { deliverable } : {}), + ...(rulesId && rulesId !== zeroHash ? { rulesId } : {}), + ...(spec ? { jobSpec: { spec, bytes: j.description } } : {}), + ...(decodeError ? { jobSpecDecodeError: decodeError } : {}), + evaluation: { + available: false, + reason: + getAddress(j.evaluator) === getAddress(d.evaluator) + ? 'MANUAL_EVALUATOR' + : 'UNVERIFIED_EVALUATOR', + }, + }; + } + async status(jobId: bigint): Promise { + return this.jobAt(jobId, await snapshot(this.rt)); + } + async list( + options: { + client?: Address; + provider?: Address; + status?: JobStatus; + fromJobId?: bigint; + } = {} + ): Promise<{ jobs: Job[] }> { + const s = await snapshot(this.rt); + const count = await s.read( + deployment(this.rt).kernel, + ABI, + 'jobCounter' + ); + const from = options.fromJobId ?? BigInt(1); + validId(from); + const jobs: Job[] = []; + for (let i = from; i <= count; i += BigInt(8)) { + const rows = await Promise.all( + Array.from( + { + length: Number( + count - i + BigInt(1) > BigInt(8) + ? BigInt(8) + : count - i + BigInt(1) + ), + }, + (_, n) => this.jobAt(i + BigInt(n), s) + ) + ); + jobs.push( + ...rows.filter( + (j) => + (!options.client || + getAddress(options.client) === getAddress(j.client)) && + (!options.provider || + getAddress(options.provider) === getAddress(j.provider)) && + (!options.status || options.status === j.status) + ) + ); + } + return { jobs }; + } + async create(options: CreateJobOptions) { + options = { ...options }; + const d = deployment(this.rt); + const s = await snapshot(this.rt); + const token = await s.read
(d.kernel, ABI, 'paymentToken'); + if (getAddress(options.paymentToken) !== getAddress(token)) + throw new JobError( + 'TOKEN_MISMATCH', + 'The job token must equal this kernel’s payment token.' + ); + if (options.jobSpec) { + const spec = decodeJobSpec(options.jobSpec, { + format: 'spec', + }) as JobSpec; + if (spec.allowedMutability !== 'NONE') + unavailable('Mutable job criteria'); + if (spec.origin !== zeroHash) + throw new JobError( + 'INVALID_JOB_SPEC', + 'A plain job must have a zero marketplace origin.' + ); + if (spec.failFinalAt >= options.expiredAt) + throw new JobError( + 'INVALID_JOB_SPEC', + 'The failure deadline must precede expiry.' + ); + } + const min = await s.read(d.kernel, ABI, 'MIN_EXPIRY_WINDOW'); + if ( + !Number.isSafeInteger(options.expiredAt) || + options.expiredAt <= s.timestamp + Number(min) || + options.expiredAt >= 2 ** 48 + ) + throw new JobError( + 'EXPIRY_TOO_SHORT', + 'Choose a future expiry beyond the kernel minimum window.' + ); + const call = { + target: d.kernel, + value: BigInt(0), + data: encodeCreateJob( + getAddress(options.provider), + getAddress(options.evaluator), + options.expiredAt, + options, + getAddress(options.hook) + ), + }; + const wallet = this.rt.wallet(); + const tx = wallet + ? await ownerBatch(this.rt, wallet, [call], options.progressHook) + : await write(this.rt, call, options.progressHook, 'JOB', true); + const e = await eventArgs(this.rt, tx, d.kernel, ABI, 'JobCreated'); + if (getAddress(e['client'] as Address) !== getAddress(this.rt.account())) + throw new JobError( + 'RECEIPT_MISMATCH', + 'The created job has a different client.', + { txHash: tx.hash } + ); + return { jobId: e['jobId'] as bigint, tx }; + } + private provider(j: KernelJob): void { + if (getAddress(j.provider) !== getAddress(this.rt.agw.signerPushAccount())) + throw new JobError('NOT_PROVIDER', 'Connect this job’s provider.'); + } + private open(j: KernelJob, now: number): void { + if (j.status !== 0 || j.expiredAt <= now) + throw new JobError('WRONG_STATUS', 'The job must be Open and unexpired.'); + } + async setBudget( + jobId: bigint, + budget: bigint, + options: JobWriteOptions & { jobSpec?: Hex } = {} + ) { + if (options.jobSpec !== undefined) + unavailable('Replacement JobSpec proposals'); + amount(budget); + const s = await snapshot(this.rt); + const j = await this.raw(jobId, s); + this.provider(j); + this.open(j, s.timestamp); + const d = deployment(this.rt); + return write( + this.rt, + { + target: d.kernel, + value: BigInt(0), + data: encodeFunctionData({ + abi: ABI, + functionName: 'setBudget', + args: [jobId, budget, '0x'], + }), + }, + options.progressHook, + 'JOB', + true + ); + } + async fund(jobId: bigint, options: FundJobOptions = {}) { + options = { ...options }; + const rt = this.rt; + const d = deployment(rt); + const s = await snapshot(rt); + const j = await this.raw(jobId, s); + this.open(j, s.timestamp); + const gen = currentGeneration(rt.agw.network); + const isWallet = await s.read( + gen.addresses.factory, + gen.contracts.abis.factory, + 'isWallet', + [j.client] + ); + if (isWallet) { + const owner = await s.read
( + j.client, + gen.contracts.abis.wallet, + 'owner' + ); + if (getAddress(owner) !== getAddress(rt.agw.signerPushAccount())) + throw new JobError('NOT_CLIENT', 'Connect the job wallet’s owner.'); + } else if (getAddress(j.client) !== getAddress(rt.agw.signerPushAccount())) + throw new JobError('NOT_CLIENT', 'Connect this job’s client.'); + let expected = options.expectedBudget; + const cardId = await s.read( + d.marketplace, + MARKETPLACE_ABI, + 'cardOfJob', + [jobId] + ); + let rulesId = options.rulesId; + if (cardId) { + const [version, view, recordedRules] = await Promise.all([ + s.read(d.marketplace, MARKETPLACE_ABI, 'cardVersionOfJob', [ + jobId, + ]), + s.read<{ version: bigint; card: { providerFee: bigint } }>( + d.marketplace, + MARKETPLACE_ABI, + 'getAgentCard', + [cardId] + ), + s.read(d.marketplace, MARKETPLACE_ABI, 'rulesOfJob', [jobId]), + ]); + if (rulesId && rulesId !== recordedRules) + throw new JobError( + 'RULES_MISMATCH', + 'Use the permission recorded when this job was opened.' + ); + rulesId = recordedRules; + if (expected === undefined && version === view.version) + expected = view.card.providerFee; + } + if (expected === undefined) + throw new JobError( + 'EXPECTED_BUDGET_REQUIRED', + 'Pass the exact budget you reviewed; this SDK does not silently accept the latest provider quote.' + ); + amount(expected); + if (expected !== j.budget) + throw new JobError( + 'BUDGET_MISMATCH', + 'The provider’s current price differs from the budget you reviewed.', + { expectedBudget: expected, currentBudget: j.budget } + ); + let optParams: Hex = '0x'; + if (getAddress(j.hook) === getAddress(d.hook)) { + if (!isWallet || !rulesId || !/^0x[\da-f]{64}$/i.test(rulesId)) + throw new JobError( + 'RULES_REQUIRED', + 'This rules hook needs an AGW client and its rulesId.' + ); + const record = await getRule( + new Snapshot(rt.agw.reader, s.blockNumber), + gen, + j.client, + rulesId, + rt.agw.pushChainNamespace + ); + if ( + getAddress(record.agent) !== getAddress(j.provider) || + record.validUntil < j.expiredAt + ) + throw new JobError( + 'RULES_MISMATCH', + 'The live rule must authorize this provider through the job expiry.' + ); + if ( + await s.read(d.hook, RULES_HOOK_ABI, 'activeJobOf', [j.client]) + ) + throw new JobError( + 'WALLET_HAS_ACTIVE_JOB', + 'This wallet already has a funded job under the rules hook.' + ); + optParams = encodeAbiParameters([{ type: 'bytes32' }], [rulesId]); + } else if (rulesId) + throw new JobError( + 'HOOK_MISMATCH', + 'A rulesId payload is supported only for the verified rules hook.' + ); + const token = await s.read
(d.kernel, ABI, 'paymentToken'); + const calls: Call[] = []; + if (expected > BigInt(0)) { + const [balance, allowance] = await Promise.all([ + s.read(token, erc20Abi, 'balanceOf', [j.client]), + s.read(token, erc20Abi, 'allowance', [j.client, d.kernel]), + ]); + if (balance < expected) + throw new JobError( + 'INSUFFICIENT_FUNDS', + 'The job client lacks the payment tokens required for escrow.' + ); + if (allowance < expected) { + if (allowance > BigInt(0)) + calls.push({ + target: token, + value: BigInt(0), + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'approve', + args: [d.kernel, BigInt(0)], + }), + }); + calls.push({ + target: token, + value: BigInt(0), + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'approve', + args: [d.kernel, expected], + }), + }); + } + } + calls.push({ + target: d.kernel, + value: BigInt(0), + data: encodeFunctionData({ + abi: ABI, + functionName: 'fund', + args: [jobId, expected, optParams], + }), + }); + if (isWallet) return ownerBatch(rt, j.client, calls, options.progressHook); + if (calls.length === 1) + return write(rt, calls[0], options.progressHook, 'JOB', true); + if (rt.agw.isReadOnly) + throw new JobError('READ_ONLY', 'Connect a signer to fund escrow.'); + // No sequential fallback: allowance and acceptance must belong to one atomic batch. + return rt.agw.executeAtomicBatch( + { + to: d.kernel, + value: BigInt(0), + data: calls.map((c) => ({ + to: c.target, + value: c.value, + data: c.data, + })), + }, + { progressHook: options.progressHook } + ); + } + async submit( + jobId: bigint, + options: JobWriteOptions & { deliverable: Hex | string } + ) { + options = { ...options }; + const s = await snapshot(this.rt); + const j = await this.raw(jobId, s); + this.provider(j); + if (j.status !== 1 || j.expiredAt <= s.timestamp) + throw new JobError( + 'WRONG_STATUS', + 'Only an unexpired Funded job can be submitted.' + ); + const deliverable = /^0x[\da-f]{64}$/i.test(options.deliverable) + ? (options.deliverable as Hex) + : keccak256(stringToHex(options.deliverable)); + return write( + this.rt, + { + target: deployment(this.rt).kernel, + value: BigInt(0), + data: encodeFunctionData({ + abi: ABI, + functionName: 'submit', + args: [jobId, deliverable, '0x'], + }), + }, + options.progressHook, + 'JOB', + true + ); + } + async cancel(jobId: bigint, options: JobWriteOptions = {}) { + const rt = this.rt; + const d = deployment(rt); + const s = await snapshot(rt); + const j = await this.raw(jobId, s); + if (j.status !== 0) + throw new JobError( + 'WRONG_STATUS', + 'Only an Open job can be cancelled by its client.' + ); + const gen = currentGeneration(rt.agw.network); + const isWallet = await s.read( + gen.addresses.factory, + gen.contracts.abis.factory, + 'isWallet', + [j.client] + ); + const calls: Call[] = [ + { + target: d.kernel, + value: BigInt(0), + data: encodeFunctionData({ + abi: ABI, + functionName: 'reject', + args: [jobId, zeroHash, '0x'], + }), + }, + ]; + if (isWallet) { + const wallet = await s.read
( + d.marketplace, + MARKETPLACE_ABI, + 'agwOfJob', + [jobId] + ); + const rulesId = await s.read( + d.marketplace, + MARKETPLACE_ABI, + 'rulesOfJob', + [jobId] + ); + if ( + getAddress(wallet) === getAddress(j.client) && + rulesId !== zeroHash && + (await s.read( + gen.addresses.sessionEngine, + gen.contracts.abis.engine, + 'isPermissionEnabled', + [rulesId, j.client] + )) + ) + calls.push({ + target: j.client, + value: BigInt(0), + data: gen.contracts.encodeRevokeRules(rulesId), + }); + return ownerBatch(rt, j.client, calls, options.progressHook); + } + if (getAddress(j.client) !== getAddress(rt.agw.signerPushAccount())) + throw new JobError( + 'NOT_CLIENT', + 'Only the client can use this cancellation method.' + ); + return write(rt, calls[0], options.progressHook, 'JOB', true); + } + async claimRefund(jobId: bigint, options: JobWriteOptions = {}) { + const s = await snapshot(this.rt); + const j = await this.raw(jobId, s); + const d = deployment(this.rt); + if (![0, 1, 2].includes(j.status)) + throw new JobError('WRONG_STATUS', 'This job is already terminal.'); + const grace = + j.status === 2 + ? Number(await s.read(d.kernel, ABI, 'EVALUATOR_GRACE_PERIOD')) + : 0; + if (s.timestamp < j.expiredAt + grace) + throw new JobError( + 'REFUND_NOT_READY', + 'The expiry or evaluator grace window has not elapsed.' + ); + return write( + this.rt, + { + target: d.kernel, + value: BigInt(0), + data: encodeFunctionData({ + abi: ABI, + functionName: 'claimRefund', + args: [jobId], + }), + }, + options.progressHook, + 'JOB', + true + ); + } + async verify(_jobId: bigint, _options?: JobWriteOptions): Promise { + void _jobId; + void _options; + return unavailable( + 'Automatic job verification; the configured evaluator is manual' + ); + } + watch( + jobId: bigint, + callback: (event: JobEvent) => void, + options: JobWatchOptions = {} + ): () => void { + validId(jobId); + return watchJob(this.rt, jobId, callback, { ...options }); + } +} diff --git a/packages/core/src/lib/job/types.ts b/packages/core/src/lib/job/types.ts new file mode 100644 index 00000000..cf810599 --- /dev/null +++ b/packages/core/src/lib/job/types.ts @@ -0,0 +1,110 @@ +import type { Address, Hex } from 'viem'; +import type { UniversalTxResponse } from '../orchestrator/orchestrator.types'; +import type { JobSpec } from '../job-spec/types'; +import type { StackProgressHook } from '../market/runtime'; +export type JobStatus = + | 'Open' + | 'Funded' + | 'Submitted' + | 'Completed' + | 'Rejected' + | 'Expired'; +export interface CreateJobOptions { + provider: Address; + evaluator: Address; + hook: Address; + expiredAt: number; + paymentToken: Address; + jobSpec?: Hex; + description?: string; + progressHook?: StackProgressHook; +} +export interface Job { + jobId: bigint; + client: Address; + provider: Address; + evaluator: Address; + hook: Address; + status: JobStatus; + expiredAt: number; + budget: bigint; + paymentToken: Address; + /** Raw Solidity string bytes, which may contain a binary JobSpec rather than UTF-8. */ + description: Hex; + deliverable?: Hex; + rulesId?: Hex; + jobSpec?: { + spec: JobSpec; + bytes: Hex; + /** Unavailable without a compatible evaluator. */ frozen?: boolean; + }; + jobSpecDecodeError?: string; + evaluation: { + available: false; + reason: 'MANUAL_EVALUATOR' | 'UNVERIFIED_EVALUATOR'; + }; +} +export interface JobWriteOptions { + progressHook?: StackProgressHook; +} +export interface FundJobOptions extends JobWriteOptions { + rulesId?: Hex; + /** The price the client reviewed. Required for plain jobs or an updated card version. */ + expectedBudget?: bigint; +} +export interface JobEvent { + jobId: bigint; + kind: string; + txHash?: Hex; + blockNumber?: bigint; + data?: unknown; + error?: unknown; + cursor?: JobWatchCursor; +} +/** Last delivered log; resume includes its block and excludes this log and earlier logs. */ +export interface JobWatchCursor { + blockNumber: bigint; + logIndex: number; + blockHash?: Hex; +} +export interface JobWatchOptions { + fromBlock?: bigint; + cursor?: JobWatchCursor; + pollIntervalMs?: number; +} +export interface JobNamespace { + create( + options: CreateJobOptions + ): Promise<{ jobId: bigint; tx: UniversalTxResponse }>; + setBudget( + jobId: bigint, + amount: bigint, + options?: JobWriteOptions & { jobSpec?: Hex } + ): Promise; + fund(jobId: bigint, options?: FundJobOptions): Promise; + submit( + jobId: bigint, + options: JobWriteOptions & { deliverable: Hex | string } + ): Promise; + cancel( + jobId: bigint, + options?: JobWriteOptions + ): Promise; + claimRefund( + jobId: bigint, + options?: JobWriteOptions + ): Promise; + verify(jobId: bigint, options?: JobWriteOptions): Promise; + status(jobId: bigint): Promise; + list(options?: { + client?: Address; + provider?: Address; + status?: JobStatus; + fromJobId?: bigint; + }): Promise<{ jobs: Job[] }>; + watch( + jobId: bigint, + callback: (event: JobEvent) => void, + options?: JobWatchOptions + ): () => void; +} diff --git a/packages/core/src/lib/job/watch.spec.ts b/packages/core/src/lib/job/watch.spec.ts new file mode 100644 index 00000000..fee0ebc4 --- /dev/null +++ b/packages/core/src/lib/job/watch.spec.ts @@ -0,0 +1,140 @@ +import { + encodeAbiParameters, + encodeEventTopics, + zeroHash, + type Log, +} from 'viem'; +import { watchJob } from './watch'; +import { JOB_KERNEL_ABI as ABI } from '../market/contracts/AgenticCommerce'; +import { DONUT_MARKETPLACE as D } from '../market/deployment'; +import { FakeChain } from '../agentic/__tests__/fake-chain'; +import { mockRuntime } from '../agentic/__tests__/mock-runtime'; +import type { StackRuntime } from '../market/runtime'; +import type { JobEvent } from './types'; +const makeLog = (logIndex: number): Log => + ({ + address: D.kernel, + blockNumber: BigInt(10), + blockHash: zeroHash, + logIndex, + transactionIndex: 0, + transactionHash: zeroHash, + removed: false, + topics: encodeEventTopics({ + abi: ABI, + eventName: 'BudgetSet', + args: { jobId: BigInt(1) }, + }), + data: encodeAbiParameters([{ type: 'uint256' }], [BigInt(logIndex)]), + } as Log); +const flush = async () => { + for (let i = 0; i < 20; i++) await Promise.resolve(); +}; +function fixture() { + const base = mockRuntime(new FakeChain()); + const state = { + failed: false, + logs: [makeLog(0), makeLog(1)], + blockHash: zeroHash as string, + }; + const getLogs = jest.fn(async ({ event }: { event: { name: string } }) => { + if (state.failed) throw new Error('RPC unavailable'); + return event.name === 'BudgetSet' ? state.logs : []; + }); + const rt: StackRuntime = { + agw: { + ...base, + reader: { + ...base.reader, + getBlockNumber: async () => BigInt(10), + getBlock: async () => ({ + timestamp: BigInt(1), + hash: state.blockHash as `0x${string}`, + }), + getLogs, + }, + }, + account: base.signerPushAccount, + wallet: () => undefined, + send: jest.fn(), + signTypedData: jest.fn(), + }; + return { rt, state, getLogs }; +} +beforeEach(() => jest.useFakeTimers()); +afterEach(() => jest.useRealTimers()); +it('deduplicates provider replay and resumes after an exact log within the same block', async () => { + const f = fixture(); + f.state.logs.push(makeLog(1)); + const events: JobEvent[] = []; + const stop = watchJob(f.rt, BigInt(1), (e) => events.push(e), { + cursor: { blockNumber: BigInt(10), logIndex: 0, blockHash: zeroHash }, + pollIntervalMs: 25, + }); + await flush(); + stop(); + expect(events.map((e) => e.cursor?.logIndex)).toEqual([1]); +}); +it('does not rewind a delivered event when the consumer callback throws', async () => { + const f = fixture(); + const events: JobEvent[] = []; + const stop = watchJob( + f.rt, + BigInt(1), + (e) => { + events.push(e); + if (e.kind !== 'Error') throw new Error('Consumer failed'); + }, + { fromBlock: BigInt(10), pollIntervalMs: 25 } + ); + await flush(); + jest.advanceTimersByTime(25); + await flush(); + stop(); + expect(events.filter((e) => e.kind === 'BudgetSet')).toHaveLength(2); + expect(events.filter((e) => e.kind === 'Error')).toHaveLength(2); +}); +it('retries RPC failures without skipping a range', async () => { + const f = fixture(); + f.state.failed = true; + const events: JobEvent[] = []; + const stop = watchJob(f.rt, BigInt(1), (e) => events.push(e), { + fromBlock: BigInt(10), + pollIntervalMs: 25, + }); + await flush(); + f.state.failed = false; + jest.advanceTimersByTime(25); + await flush(); + stop(); + expect(events.map((e) => e.kind)).toEqual([ + 'Error', + 'BudgetSet', + 'BudgetSet', + ]); +}); +it('stops on a changed canonical cursor and suppresses callbacks after unsubscribe', async () => { + const f = fixture(); + f.state.blockHash = '0x' + 'ab'.repeat(32); + const events: JobEvent[] = []; + const stop = watchJob(f.rt, BigInt(1), (e) => events.push(e), { + cursor: { blockNumber: BigInt(10), logIndex: 0, blockHash: zeroHash }, + pollIntervalMs: 25, + }); + await flush(); + expect(events[0]).toMatchObject({ + kind: 'Error', + error: { code: 'WATCH_REORG' }, + }); + jest.advanceTimersByTime(25); + await flush(); + expect(events).toHaveLength(1); + stop(); + const callbacks = jest.fn(); + const cancel = watchJob(f.rt, BigInt(1), callbacks, { + fromBlock: BigInt(10), + }); + cancel(); + await flush(); + expect(callbacks).not.toHaveBeenCalled(); +}); diff --git a/packages/core/src/lib/job/watch.ts b/packages/core/src/lib/job/watch.ts new file mode 100644 index 00000000..d9a67b01 --- /dev/null +++ b/packages/core/src/lib/job/watch.ts @@ -0,0 +1,209 @@ +import { decodeEventLog, getAbiItem, getAddress, type Log } from 'viem'; +import { JOB_KERNEL_ABI as ABI } from '../market/contracts/AgenticCommerce'; +import { deployment, type StackRuntime } from '../market/runtime'; +import { JobError } from '../market/errors'; +import { fingerprint } from '../market/data'; +import type { JobEvent, JobWatchOptions } from './types'; + +const names = [ + 'JobCreated', + 'BudgetSet', + 'JobFunded', + 'JobSubmitted', + 'JobCompleted', + 'JobRejected', + 'JobExpired', + 'Refunded', +] as const; +const kinds = [ + 'Created', + 'BudgetSet', + 'Funded', + 'Submitted', + 'Completed', + 'Rejected', + 'Expired', + 'Refunded', +]; + +export function watchJob( + rt: StackRuntime, + jobId: bigint, + callback: (event: JobEvent) => void, + options: JobWatchOptions +): () => void { + const d = deployment(rt); + let stopped = false; + let timer: ReturnType | undefined; + let cursor = options.cursor && { ...options.cursor }; + let next = cursor?.blockNumber ?? options.fromBlock; + const interval = options.pollIntervalMs ?? 3000; + if ( + !Number.isSafeInteger(interval) || + interval < 25 || + (next !== undefined && (typeof next !== 'bigint' || next < BigInt(0))) || + (cursor && + (!Number.isSafeInteger(cursor.logIndex) || + cursor.logIndex < 0 || + (cursor.blockHash && !/^0x[\da-f]{64}$/i.test(cursor.blockHash)))) || + (cursor && options.fromBlock !== undefined) + ) + throw new JobError( + 'INVALID_WATCH_OPTIONS', + 'Use a nonnegative block or a delivered-log cursor, and a polling interval of at least 25ms.' + ); + const notify = (event: JobEvent): void => { + try { + callback(event); + } catch (error) { + if (event.kind !== 'Error' && !stopped) { + try { + callback({ + jobId, + kind: 'Error', + error, + cursor: cursor && { ...cursor }, + }); + } catch { + /* A consumer exception must not rewind delivery or reject an unobserved promise. */ + } + } + } + }; + const poll = async () => { + try { + const head = await rt.agw.reader.getBlockNumber(); + if (stopped) return; + if (cursor) { + if (head < cursor.blockNumber) + throw new JobError( + 'WATCH_REORG', + 'The delivered cursor is ahead of the canonical head. Reload status before continuing.' + ); + const block = + rt.agw.reader.getBlock && + (await rt.agw.reader.getBlock({ blockNumber: cursor.blockNumber })); + if ( + head < cursor.blockNumber || + (cursor.blockHash && + block?.hash && + cursor.blockHash.toLowerCase() !== block.hash.toLowerCase()) + ) + throw new JobError( + 'WATCH_REORG', + 'The delivered cursor is no longer canonical. Reload job status and restart from a reviewed block.' + ); + } + if (next === undefined) next = head; + const end = next + BigInt(999) < head ? next + BigInt(999) : head; + if (next <= end) { + const start = next; + const groups = await Promise.all( + names.map((name) => + rt.agw.reader.getLogs({ + address: d.kernel, + event: getAbiItem({ abi: ABI, name }), + args: { jobId }, + fromBlock: start, + toBlock: end, + }) + ) + ); + if (stopped) return; + const unique = new Map< + string, + { log: Log; event: ReturnType } + >(); + for (const log of groups.flat()) { + if (log.removed) + throw new JobError( + 'WATCH_REORG', + 'The RPC returned a removed job log. Reload status before continuing.' + ); + if ( + getAddress(log.address) !== getAddress(d.kernel) || + log.blockNumber === null || + log.logIndex === null || + log.blockNumber < start || + log.blockNumber > end + ) + throw new JobError( + 'INCONSISTENT_READ', + 'The RPC returned an unmined or out-of-range job log.' + ); + const event = decodeEventLog({ + abi: ABI, + data: log.data, + topics: log.topics, + strict: true, + }); + if ( + (event.args as { jobId?: bigint }).jobId !== jobId || + !names.includes(event.eventName as (typeof names)[number]) + ) + throw new JobError( + 'INCONSISTENT_READ', + 'The RPC returned a different job or unsupported event.' + ); + const key = `${log.blockNumber}:${log.logIndex}`; + const previous = unique.get(key); + if (previous && fingerprint(previous.log) !== fingerprint(log)) + throw new JobError( + 'INCONSISTENT_READ', + 'Two different logs occupy the same job cursor.' + ); + unique.set(key, { log, event }); + } + const ordered = [...unique.values()].sort( + (a, b) => + Number( + (a.log.blockNumber as bigint) - (b.log.blockNumber as bigint) + ) || (a.log.logIndex as number) - (b.log.logIndex as number) + ); + for (const { log, event } of ordered) { + if (stopped) return; + const blockNumber = log.blockNumber as bigint; + const logIndex = log.logIndex as number; + if ( + cursor && + (blockNumber < cursor.blockNumber || + (blockNumber === cursor.blockNumber && + logIndex <= cursor.logIndex)) + ) + continue; + cursor = { + blockNumber, + logIndex, + ...(log.blockHash ? { blockHash: log.blockHash } : {}), + }; + notify({ + jobId, + kind: kinds[ + names.indexOf(event.eventName as (typeof names)[number]) + ], + txHash: log.transactionHash ?? undefined, + blockNumber, + data: event.args, + cursor: { ...cursor }, + }); + } + next = end + BigInt(1); + } + } catch (error) { + if (stopped) return; + if (error instanceof JobError && error.code === 'WATCH_REORG') + stopped = true; + notify({ jobId, kind: 'Error', error, cursor: cursor && { ...cursor } }); + } finally { + if (!stopped) + timer = setTimeout(() => { + void poll(); + }, interval); + } + }; + void poll(); + return () => { + stopped = true; + if (timer) clearTimeout(timer); + }; +} diff --git a/packages/core/src/lib/market/__tests__/ci-reporter.spec.ts b/packages/core/src/lib/market/__tests__/ci-reporter.spec.ts new file mode 100644 index 00000000..8fecaeaf --- /dev/null +++ b/packages/core/src/lib/market/__tests__/ci-reporter.spec.ts @@ -0,0 +1,38 @@ +const fs = require('node:fs'); +const CiReporter = require('../../../../__e2e__/ci/ci-reporter'); +export {}; +it('reports final counters without relying on the pre-final Jest success flag', () => { + const write = jest + .spyOn(fs, 'writeFileSync') + .mockImplementation(() => undefined); + const mkdir = jest.spyOn(fs, 'mkdirSync').mockImplementation(() => undefined); + try { + const report = (extra: object) => { + new CiReporter().onRunComplete(null, { + numTotalTests: 1, + numPassedTests: 1, + numFailedTests: 0, + numPendingTests: 0, + success: false, + testResults: [], + ...extra, + }); + return JSON.parse( + write.mock.calls[write.mock.calls.length - 1][1] as string + ); + }; + expect(report({})).toMatchObject({ + success: true, + jestReportedSuccess: false, + }); + expect(report({ numFailedTestSuites: 1 }).success).toBe(false); + expect(report({ numRuntimeErrorTestSuites: 1 }).success).toBe(false); + expect(report({ wasInterrupted: true }).success).toBe(false); + expect(report({ numPassedTests: 0, numPendingTests: 1 }).success).toBe( + false + ); + } finally { + write.mockRestore(); + mkdir.mockRestore(); + } +}); diff --git a/packages/core/src/lib/market/__tests__/deposit.spec.ts b/packages/core/src/lib/market/__tests__/deposit.spec.ts new file mode 100644 index 00000000..07008a85 --- /dev/null +++ b/packages/core/src/lib/market/__tests__/deposit.spec.ts @@ -0,0 +1,384 @@ +import { + decodeFunctionData, + encodeAbiParameters, + encodeEventTopics, + erc20Abi, + zeroHash, + type Address, + type Hex, +} from 'viem'; +import { depositJob, type DepositCheckpoint } from '../deposit'; +import { DONUT_MARKETPLACE as D } from '../deployment'; +import { MARKETPLACE_ABI } from '../contracts/UniversalMarketplace'; +import { encodeAgentCardRules } from '../rules'; +import { + fakeResponse, + mockRuntime, +} from '../../agentic/__tests__/mock-runtime'; +import { FakeChain } from '../../agentic/__tests__/fake-chain'; +import { buildJobSpec, encodeJobSpec } from '../../job-spec/codec'; +import { prepareJobRead } from '../../job-spec/read'; +import { specOrigin } from '../../job-spec/helpers'; +import { PRINCIPAL } from '../../job-spec/constants'; +import { CHAIN } from '../../constants/enums'; +import type { AgentCard } from '../types'; +import type { MarketSnapshot, StackRuntime } from '../runtime'; + +const sender = '0x1111111111111111111111111111111111111111' as Address; +const wallet = '0x2222222222222222222222222222222222222222' as Address; +const provider = '0x3333333333333333333333333333333333333333' as Address; +const principalToken = '0x4444444444444444444444444444444444444444' as Address; +function setup(sameToken = false) { + const base = mockRuntime(new FakeChain(), { signer: sender }); + const balances = new Map(); + const key = (token: string | undefined, a: string) => + `${token?.toLowerCase() ?? 'PC'}:${a.toLowerCase()}`; + const token = sameToken ? D.paymentToken : principalToken; + for (const t of [token, D.paymentToken, undefined]) + balances.set(key(t, sender), BigInt(1000)); + const state = { + status: 0, + spent: BigInt(0), + receiptUnavailable: false, + move: true, + }; + const description = encodeJobSpec( + buildJobSpec({ + reads: [ + prepareJobRead({ + chain: 'eip155:97', + target: token, + abi: erc20Abi, + functionName: 'balanceOf', + args: [wallet], + }), + ], + checks: [ + { + read: 0, + evaluation: 'COMPARE', + operation: 'GREATER_OR_EQUAL', + target: BigInt(1), + }, + ], + logic: 'ALL', + executeBy: 1700000010, + failFinalAt: 1700000020, + origin: specOrigin(D.marketplace, BigInt(1), BigInt(1), BigInt(10)), + }) + ); + const card = { + cardId: BigInt(1), + version: BigInt(1), + provider, + paymentToken: D.paymentToken, + providerFee: BigInt(5), + rules: { maxGasPerCall: BigInt(7) }, + rulesBytes: encodeAgentCardRules( + { + principalAsset: 0, + maxGasPerCall: BigInt(7), + assets: [ + { + token: { prc20: token }, + maxPerCall: PRINCIPAL, + maxTotal: PRINCIPAL, + }, + ], + allowedCalls: [{ target: token, selector: 'balanceOf(address)' }], + }, + { chain: 'eip155:97' } + ), + } as unknown as AgentCard; + const load = jest.fn(async (_id: bigint, _at: MarketSnapshot) => card); + const read = jest.fn( + async (r: { + functionName: string; + address: string; + args?: readonly unknown[]; + }) => { + switch (r.functionName) { + case 'cardOfJob': + case 'cardVersionOfJob': + return BigInt(1); + case 'agwOfJob': + return wallet; + case 'rulesOfJob': + return zeroHash; + case 'getJob': + return { + client: wallet, + provider, + status: state.status, + expiredAt: 1800000000, + description, + }; + case 'paymentToken': + return D.paymentToken; + case 'isPermissionEnabled': + return true; + case 'getEnabledActions': + return [zeroHash]; + case 'getConfig': + return { initialized: true, assets: [{ spent: state.spent }] }; + case 'balanceOf': + return balances.get(key(r.address, String(r.args?.[0]))) ?? BigInt(0); + default: + throw new Error(`Unexpected ${r.functionName}`); + } + } + ); + const rt: StackRuntime = { + agw: { + ...base, + reader: { + ...base.reader, + readContract: read, + getBlockNumber: async () => BigInt(20), + getBalance: async ({ address }) => + balances.get(key(undefined, address)) ?? BigInt(0), + getLogs: async () => + [ + { + address: D.marketplace, + blockNumber: BigInt(10), + data: encodeAbiParameters( + [ + { type: 'uint256' }, + { type: 'bytes32' }, + { type: 'uint256' }, + { type: 'uint256' }, + ], + [BigInt(1), zeroHash, BigInt(10), BigInt(1)] + ), + topics: encodeEventTopics({ + abi: MARKETPLACE_ABI, + eventName: 'JobOpened', + args: { cardId: BigInt(1), owner: sender, agw: wallet }, + }), + }, + ] as never, + }, + }, + account: () => sender, + wallet: () => undefined, + send: jest.fn(), + signTypedData: jest.fn(), + jobBlocks: new Map([[BigInt(1), BigInt(10)]]), + }; + base.executeMock.mockImplementation( + async (p: { + to: Address; + data?: Hex; + value?: bigint; + funds?: { amount: bigint }; + }) => { + let asset: Address | undefined; + let amount = p.value ?? BigInt(0); + if (p.funds) { + asset = D.paymentToken; + amount = p.funds.amount; + } else if (p.data && p.data !== '0x') { + const call = decodeFunctionData({ abi: erc20Abi, data: p.data }); + if (call.functionName !== 'transfer' || call.args[0] !== wallet) + throw new Error('Wrong transfer'); + asset = p.to; + amount = call.args[1]; + } + if (state.move) { + balances.set( + key(asset, wallet), + (balances.get(key(asset, wallet)) ?? BigInt(0)) + amount + ); + balances.set( + key(asset, sender), + (balances.get(key(asset, sender)) ?? BigInt(0)) - amount + ); + } + const tx = fakeResponse(); + const wait = tx.wait.bind(tx); + return { + ...tx, + wait: async () => { + if (state.receiptUnavailable) throw new Error('RPC timed out'); + return wait(); + }, + }; + } + ); + const checkpoints = new Map(); + const run = (options: Parameters[2] = {}) => + depositJob(rt, BigInt(1), options, load, checkpoints); + return { + run, + rt, + balances, + key, + token, + load, + card, + state, + execute: base.executeMock, + checkpoints, + }; +} +it('uses the opened version and original principal, not a newly updated card', async () => { + const f = setup(); + const result = await f.run(); + expect(f.load.mock.calls[0][1].blockNumber).toBe(BigInt(10)); + expect(result.cardVersion).toBe(BigInt(1)); + expect(result.txs.map((t) => [t.step, t.amount])).toEqual([ + ['PRINCIPAL', BigInt(10)], + ['PROVIDER_FEE', BigInt(5)], + ['PC', BigInt(7)], + ]); + expect((await f.run()).txs).toEqual([]); +}); +it('combines a shared principal/fee token before subtracting the existing balance', async () => { + const f = setup(true); + f.balances.set(f.key(f.token, wallet), BigInt(3)); + const result = await f.run({ pcAmount: BigInt(0) }); + expect(result.txs).toHaveLength(1); + expect(result.txs[0]).toMatchObject({ + step: 'PRINCIPAL_AND_FEE', + amount: BigInt(12), + }); +}); +it('preflights every asset before sending any partial deposit', async () => { + const f = setup(); + f.balances.set(f.key(D.paymentToken, sender), BigInt(0)); + await expect(f.run()).rejects.toMatchObject({ + code: 'DEPOSIT_INCOMPLETE', + details: { causeCode: 'INSUFFICIENT_FUNDS', txs: [] }, + }); + expect(f.execute).not.toHaveBeenCalled(); +}); +it('resumes an uncertain receipt without resending the committed principal', async () => { + const f = setup(); + f.state.receiptUnavailable = true; + await expect(f.run()).rejects.toMatchObject({ + code: 'DEPOSIT_INCOMPLETE', + details: { txs: [expect.objectContaining({ step: 'PRINCIPAL' })] }, + }); + expect(f.execute).toHaveBeenCalledTimes(1); + // An unresolved prior receipt must still prevent another transaction. + await expect(f.run()).rejects.toMatchObject({ code: 'DEPOSIT_INCOMPLETE' }); + expect(f.execute).toHaveBeenCalledTimes(1); + f.state.receiptUnavailable = false; + const resumed = await f.run(); + expect(resumed.txs.map((t) => t.step)).toEqual([ + 'PRINCIPAL', + 'PROVIDER_FEE', + 'PC', + ]); + expect(f.execute).toHaveBeenCalledTimes(3); +}); +it('refuses to replenish a resumed transfer that has since been consumed', async () => { + const f = setup(); + f.state.receiptUnavailable = true; + await expect(f.run()).rejects.toMatchObject({ code: 'DEPOSIT_INCOMPLETE' }); + f.state.receiptUnavailable = false; + f.balances.set(f.key(f.token, wallet), BigInt(0)); + await expect(f.run()).rejects.toMatchObject({ + details: { causeCode: 'DEPOSIT_BALANCE_CHANGED' }, + }); + expect(f.execute).toHaveBeenCalledTimes(1); +}); +it('fails closed if same-block updates hide the original card version', async () => { + const f = setup(); + f.card.version = BigInt(2); + await expect(f.run()).rejects.toMatchObject({ code: 'HISTORY_UNAVAILABLE' }); + expect(f.execute).not.toHaveBeenCalled(); +}); +it('refuses terminal jobs and permissions that have already moved assets', async () => { + const f = setup(); + f.state.status = 1; + await expect(f.run()).rejects.toMatchObject({ code: 'WRONG_STATUS' }); + f.state.status = 0; + f.state.spent = BigInt(1); + await expect(f.run()).rejects.toMatchObject({ + details: { causeCode: 'DEPOSIT_ALREADY_USED' }, + }); + expect(f.execute).not.toHaveBeenCalled(); +}); +it('retains a receipt when a token returns success without delivering the required balance', async () => { + const f = setup(); + f.state.move = false; + await expect(f.run()).rejects.toMatchObject({ + details: { causeCode: 'DEPOSIT_BALANCE_CHANGED', txs: [expect.anything()] }, + }); + expect(f.execute).toHaveBeenCalledTimes(1); +}); +it('uses an explicit registered origin route and keeps its recipient outside AGW execution', async () => { + const f = setup(true); + f.rt.agw.signerIsPushNative = () => false; + f.rt.agw.signerOrigin = () => ({ + chain: CHAIN.ETHEREUM_SEPOLIA, + address: sender, + }); + f.balances.set(f.key(D.paymentToken, sender), BigInt(0)); + const result = await f.run({ funding: 'origin', pcAmount: BigInt(0) }); + expect(result.txs[0]).toMatchObject({ + step: 'PRINCIPAL_AND_FEE', + amount: BigInt(15), + }); + expect(f.execute).toHaveBeenCalledWith( + { + to: wallet, + funds: { + token: expect.objectContaining({ symbol: 'USDC' }), + amount: BigInt(15), + }, + }, + expect.anything() + ); +}); +it('refuses an origin token mismatch before sending any leg', async () => { + const f = setup(); + f.rt.agw.signerIsPushNative = () => false; + f.rt.agw.signerOrigin = () => ({ + chain: CHAIN.ETHEREUM_SEPOLIA, + address: sender, + }); + await expect(f.run({ funding: 'origin' })).rejects.toMatchObject({ + details: { causeCode: 'TOKEN_ROUTE_UNAVAILABLE' }, + }); + expect(f.execute).not.toHaveBeenCalled(); +}); +it('blocks retries when the transport reports a broadcast hash without returning a response', async () => { + const f = setup(); + const hash = ('0x' + 'ab'.repeat(32)) as Hex; + f.execute.mockImplementationOnce(async () => { + f.balances.set(f.key(f.token, wallet), BigInt(10)); + throw Object.assign(new Error('Inbound confirmation unavailable'), { + gatewayTxHash: hash, + }); + }); + await expect(f.run()).rejects.toMatchObject({ + details: { + txs: [], + pending: { txHash: hash, token: f.token, amount: BigInt(10) }, + }, + }); + await expect(f.run()).rejects.toMatchObject({ + code: 'DEPOSIT_INCOMPLETE', + details: { pending: { txHash: hash } }, + }); + expect(f.execute).toHaveBeenCalledTimes(1); + const result = await f.run({ + resume: [ + { + step: 'PRINCIPAL', + token: f.token, + amount: BigInt(10), + tx: fakeResponse({ hash }), + }, + ], + }); + expect(result.txs.map((t) => t.step)).toEqual([ + 'PRINCIPAL', + 'PROVIDER_FEE', + 'PC', + ]); + expect(f.execute).toHaveBeenCalledTimes(3); +}); diff --git a/packages/core/src/lib/market/__tests__/history.spec.ts b/packages/core/src/lib/market/__tests__/history.spec.ts new file mode 100644 index 00000000..937baf47 --- /dev/null +++ b/packages/core/src/lib/market/__tests__/history.spec.ts @@ -0,0 +1,143 @@ +import { + encodeAbiParameters, + encodeEventTopics, + encodeFunctionData, + keccak256, + stringToHex, + zeroHash, + type Address, + type Hex, + type Log, +} from 'viem'; +import { historicalCard } from '../history'; +import { MARKETPLACE_ABI as ABI } from '../contracts/UniversalMarketplace'; +import { DONUT_MARKETPLACE as D } from '../deployment'; +import { encodeAgentCardRules } from '../rules'; +import { PRINCIPAL } from '../../job-spec/constants'; +import { FakeChain } from '../../agentic/__tests__/fake-chain'; +import { mockRuntime } from '../../agentic/__tests__/mock-runtime'; +import type { StackRuntime } from '../runtime'; +const provider = '0x1111111111111111111111111111111111111111' as Address; +const hash = ('0x' + 'ab'.repeat(32)) as Hex; +function fixture() { + const base = mockRuntime(new FakeChain()); + const rules = encodeAgentCardRules( + { + assets: [ + { + token: { prc20: D.paymentToken }, + maxPerCall: PRINCIPAL, + maxTotal: PRINCIPAL, + }, + ], + principalAsset: 0, + maxGasPerCall: BigInt(17), + allowedCalls: [{ target: provider, selector: 'balanceOf(address)' }], + }, + { chain: 'eip155:97' } + ); + const c = { + provider, + active: true, + jobType: keccak256(stringToHex('test')), + metadataURI: 'test', + metadataHash: zeroHash, + chainNamespace: 'eip155:97', + providerFee: BigInt(7), + paymentToken: D.paymentToken, + principalMin: BigInt(1), + principalMax: BigInt(20), + minDuration: 3600, + maxDuration: 86400, + minExecuteWindow: 0, + settleWindow: 60, + }; + const data = encodeFunctionData({ + abi: ABI, + functionName: 'registerAgentCard', + args: [c, rules, '0x1234'], + }); + const log = { + address: D.marketplace, + blockNumber: BigInt(24443653), + transactionHash: hash, + logIndex: 0, + blockHash: zeroHash, + transactionIndex: 0, + removed: false, + topics: encodeEventTopics({ + abi: ABI, + eventName: 'AgentCardRegistered', + args: { cardId: BigInt(1), provider, jobType: c.jobType }, + }), + data: encodeAbiParameters( + [ + { type: 'string' }, + { type: 'bytes32' }, + { type: 'bytes32' }, + { type: 'bytes32' }, + { type: 'uint256' }, + ], + [ + c.chainNamespace, + keccak256(rules), + keccak256('0x1234'), + zeroHash, + BigInt(7), + ] + ), + } as Log; + const state = { + input: ('0x12345678' + + encodeAbiParameters([{ type: 'bytes' }], [data]).slice(2)) as Hex, + blockNumber: log.blockNumber, + }; + const logs = jest.fn(async () => [log]); + const rt: StackRuntime = { + agw: { + ...base, + reader: { + ...base.reader, + getBlockNumber: async () => BigInt(24443654), + readContract: async () => ({ card: c }), + getLogs: logs, + getTransaction: async () => state, + }, + }, + account: () => provider, + wallet: () => undefined, + send: jest.fn(), + signTypedData: jest.fn(), + }; + const load = jest.fn(async () => { + throw new Error('Archive unavailable'); + }); + const run = () => + historicalCard(rt, BigInt(1), BigInt(1), BigInt(24443654), load); + return { run, load, rt, state, rules, data, log, logs }; +} +it('recovers an exact version from event hashes and wrapped transaction input without archive state', async () => { + const f = fixture(); + expect(await f.run()).toMatchObject({ + version: BigInt(1), + providerFee: BigInt(7), + rulesBytes: f.rules, + rules: { maxGasPerCall: BigInt(17) }, + }); +}); +it('uses matching historical state without scanning transaction history', async () => { + const f = fixture(); + f.load.mockImplementation(async () => ({ version: BigInt(1) } as never)); + expect(await f.run()).toEqual({ version: BigInt(1) }); + expect(f.logs).not.toHaveBeenCalled(); +}); +it('rejects a selector-shaped decoy whose content hashes do not match the emitted version', async () => { + const f = fixture(); + f.state.input = f.data.replace('1234', '4321') as Hex; + await expect(f.run()).rejects.toMatchObject({ code: 'HISTORY_UNAVAILABLE' }); +}); +it('rejects history whose transaction is no longer mined in the event block', async () => { + const f = fixture(); + f.state.blockNumber = BigInt(24443654); + await expect(f.run()).rejects.toMatchObject({ code: 'HISTORY_UNAVAILABLE' }); +}); diff --git a/packages/core/src/lib/market/__tests__/kernel-wire.spec.ts b/packages/core/src/lib/market/__tests__/kernel-wire.spec.ts new file mode 100644 index 00000000..8f1a1fc3 --- /dev/null +++ b/packages/core/src/lib/market/__tests__/kernel-wire.spec.ts @@ -0,0 +1,55 @@ +import { + decodeAbiParameters, + getAbiItem, + toFunctionSelector, + zeroAddress, +} from 'viem'; +import { JOB_KERNEL_ABI } from '../contracts/AgenticCommerce'; +import { decodeCreateJob, encodeCreateJob } from '../kernel-wire'; +it('preserves arbitrary binary JobSpec bytes in the Solidity string slot with its original selector', () => { + const bytes = '0xff00c0af8081'; + const data = encodeCreateJob( + zeroAddress, + zeroAddress, + 1900000000, + { jobSpec: bytes }, + zeroAddress + ); + expect(data.slice(0, 10)).toBe( + toFunctionSelector(getAbiItem({ abi: JOB_KERNEL_ABI, name: 'createJob' })) + ); + expect(decodeCreateJob(data).description).toBe(bytes); + const decoded = decodeAbiParameters( + [ + { type: 'address' }, + { type: 'address' }, + { type: 'uint256' }, + { type: 'bytes' }, + { type: 'address' }, + ], + ('0x' + data.slice(10)) as `0x${string}` + ); + expect(decoded[3]).toBe(bytes); +}); +it('supports plain UTF-8 descriptions but refuses conflicting carriers', () => { + expect( + decodeCreateJob( + encodeCreateJob( + zeroAddress, + zeroAddress, + 1, + { description: 'plain job' }, + zeroAddress + ) + ).description + ).toBe('0x706c61696e206a6f62'); + expect(() => + encodeCreateJob( + zeroAddress, + zeroAddress, + 1, + { jobSpec: '0x00', description: 'x' }, + zeroAddress + ) + ).toThrow(); +}); diff --git a/packages/core/src/lib/market/__tests__/namespace.spec.ts b/packages/core/src/lib/market/__tests__/namespace.spec.ts new file mode 100644 index 00000000..daf23427 --- /dev/null +++ b/packages/core/src/lib/market/__tests__/namespace.spec.ts @@ -0,0 +1,182 @@ +import { zeroAddress, zeroHash, type Address } from 'viem'; +import { MarketNamespaceImpl } from '../market'; +import { JobNamespaceImpl } from '../../job/job'; +import { mockRuntime } from '../../agentic/__tests__/mock-runtime'; +import { fakeResponse } from '../../agentic/__tests__/mock-runtime'; +import { FakeChain } from '../../agentic/__tests__/fake-chain'; +import type { StackRuntime } from '../runtime'; +import type { JobPlan } from '../types'; +const owner = '0x1111111111111111111111111111111111111111'; +const provider = '0x2222222222222222222222222222222222222222'; +function runtime(signer: Address = owner) { + const base = mockRuntime(new FakeChain(), { signer }); + const read = jest.fn(async (args: { functionName: string }) => { + switch (args.functionName) { + case 'getJob': + return { + client: owner, + provider, + hook: zeroAddress, + evaluator: provider, + status: 0, + expiredAt: 2000000000, + budget: BigInt(5), + description: '0x', + }; + case 'agentCardCount': + return BigInt(1); + case 'getAgentCard': + return { + card: { + provider, + chainNamespace: 'eip155:11155111', + jobType: zeroHash, + metadataURI: 'invalid template example', + metadataHash: zeroHash, + active: true, + providerFee: BigInt(5), + }, + version: BigInt(1), + verified: false, + disabled: false, + rules: '0xdead', + jobSpecTemplate: '0xdead', + }; + case 'getAgentRating': + return BigInt(0); + case 'cardOfJob': + return BigInt(0); + case 'isWallet': + return false; + default: + throw new Error(`unexpected read ${args.functionName}`); + } + }); + const rt: StackRuntime = { + agw: { + ...base, + reader: { + ...base.reader, + readContract: read, + getBlockNumber: async () => BigInt(10), + }, + }, + account: () => owner as Address, + wallet: () => undefined, + signTypedData: jest.fn(), + send: jest.fn(), + }; + return { rt, read, execute: base.executeMock }; +} +it('a provider’s malformed unverified template cannot break registry summary enumeration', async () => { + const { rt } = runtime(); + const market = new MarketNamespaceImpl(rt); + expect((await market.cards()).cards[0]).toMatchObject({ + provider, + cardId: BigInt(1), + verified: false, + }); + await expect(market.card(BigInt(1))).rejects.toMatchObject({ + code: 'INVALID_AGENT_CARD_RULES', + }); +}); +it('lets a provider deactivate a malformed card without decoding its broken template', async () => { + const { rt, execute } = runtime(provider); + await new MarketNamespaceImpl(rt).agent.setActive(BigInt(1), false); + expect(execute).toHaveBeenCalledTimes(1); +}); +it('delivers the correct terminal family to the per-call hook once when waiting repeatedly', async () => { + const { rt } = runtime(provider); + const events: string[] = []; + const tx = await new JobNamespaceImpl(rt).setBudget(BigInt(1), BigInt(5), { + progressHook: (e) => events.push(e.id), + }); + await tx.wait(); + await tx.wait(); + expect(events.filter((id) => id === 'JOB-TX-199-01')).toHaveLength(1); + expect(events).not.toContain('MARKET-TX-199-01'); +}); +it('plain jobs require an explicitly reviewed budget rather than silently adopting a re-quote', async () => { + const { rt, execute } = runtime(); + const job = new JobNamespaceImpl(rt); + await expect(job.fund(BigInt(1))).rejects.toMatchObject({ + code: 'EXPECTED_BUDGET_REQUIRED', + }); + await expect( + job.fund(BigInt(1), { expectedBudget: BigInt(4) }) + ).rejects.toMatchObject({ code: 'BUDGET_MISMATCH' }); + expect(execute).not.toHaveBeenCalled(); +}); +it('placeholder methods and replacement proposals fail before any reads or signatures', async () => { + const { rt, read } = runtime(); + const job = new JobNamespaceImpl(rt); + const market = new MarketNamespaceImpl(rt); + await expect(job.verify(BigInt(1))).rejects.toMatchObject({ + code: 'CAPABILITY_UNAVAILABLE', + }); + await expect( + job.setBudget(BigInt(1), BigInt(5), { jobSpec: '0x00' }) + ).rejects.toMatchObject({ code: 'CAPABILITY_UNAVAILABLE' }); + await expect( + market.openJob({} as never, { relay: true }) + ).rejects.toMatchObject({ code: 'CAPABILITY_UNAVAILABLE' }); + expect(read).not.toHaveBeenCalled(); + expect(rt.signTypedData).not.toHaveBeenCalled(); +}); +it('checks typed-data capability and external owner deployment before asking for a signature', async () => { + const { rt, read } = runtime(); + rt.canSignTypedData = () => false; + await expect( + new MarketNamespaceImpl(rt).openJob({} as JobPlan) + ).rejects.toMatchObject({ code: 'CAPABILITY_UNAVAILABLE' }); + expect(read).not.toHaveBeenCalled(); + rt.canSignTypedData = () => true; + rt.agw.reader.call = jest.fn(); + rt.agw.reader.getCode = async () => '0x'; + rt.agw.signerIsPushNative = () => false; + await expect( + new MarketNamespaceImpl(rt).openJob({} as JobPlan) + ).rejects.toMatchObject({ code: 'OWNER_NOT_DEPLOYED' }); + expect(rt.signTypedData).not.toHaveBeenCalled(); +}); +it('compares the factory signing domain before prompting the owner', async () => { + const { rt, read } = runtime(); + rt.agw.reader.call = jest.fn(); + rt.agw.reader.getCode = async () => '0x'; + read.mockResolvedValue(zeroHash as never); + const market = new MarketNamespaceImpl(rt); + const plan = { + cardId: BigInt(1), + intent: { + owner, + index: BigInt(0), + signerChainId: BigInt(42101), + deadline: 1800000000, + }, + label: 'test', + job: {}, + } as unknown as JobPlan; + jest.spyOn(market, 'preview').mockResolvedValue(plan); + await expect(market.openJob(plan)).rejects.toMatchObject({ + code: 'INTENT_MISMATCH', + }); + expect(rt.signTypedData).not.toHaveBeenCalled(); + expect(rt.agw.reader.call).not.toHaveBeenCalled(); +}); +it('retains the submitted opening hash when receipt recovery fails, without another signature or write', async () => { + const { rt, read, execute } = runtime(); + const tx = fakeResponse({ + wait: async () => { + throw new Error('Receipt unavailable'); + }, + }); + await expect( + new MarketNamespaceImpl(rt).openJob({} as JobPlan, { resume: tx }) + ).rejects.toMatchObject({ + code: 'OPEN_JOB_RECOVERY_REQUIRED', + details: { txHash: tx.hash }, + }); + expect(rt.signTypedData).not.toHaveBeenCalled(); + expect(execute).not.toHaveBeenCalled(); + expect(read).not.toHaveBeenCalled(); +}); diff --git a/packages/core/src/lib/market/__tests__/rules.spec.ts b/packages/core/src/lib/market/__tests__/rules.spec.ts new file mode 100644 index 00000000..6510768a --- /dev/null +++ b/packages/core/src/lib/market/__tests__/rules.spec.ts @@ -0,0 +1,115 @@ +import { decodeAbiParameters, encodeAbiParameters } from 'viem'; +import { PRINCIPAL } from '../../job-spec/constants'; +import { PUSH_NETWORK } from '../../constants/enums'; +import { SYNTHETIC_PUSH_ERC20 } from '../../constants/chain'; +import { + CARD_RULES_PARAM, + MARKER_PRINCIPAL, + decodeAgentCardRules, + encodeAgentCardRules, + validateAgentCardRules, + type AgentCardRules, +} from '../rules'; +const token = '0x1111111111111111111111111111111111111111'; +const spender = '0x2222222222222222222222222222222222222222'; +const options = { chain: 'eip155:11155111' }; +function rules(): AgentCardRules { + return { + assets: [ + { token: { prc20: token }, maxPerCall: PRINCIPAL, maxTotal: PRINCIPAL }, + ], + principalAsset: 0, + maxGasPerCall: BigInt(1), + allowedCalls: [ + { + target: token, + selector: 'approve(address,uint256)', + pins: [ + { arg: 0, expected: spender }, + { arg: 1, max: PRINCIPAL }, + ], + }, + { + target: token, + selector: 'transfer(address,uint256)', + pins: [ + { arg: 0, expected: 'agentic:wallet' }, + { arg: 1, max: PRINCIPAL }, + ], + }, + ], + }; +} +it('encodes v2’s four-field rules, accepts pinned approvals and fills published markers', () => { + const r = rules(); + validateAgentCardRules(r); + const bytes = encodeAgentCardRules(r, options); + const w = decodeAbiParameters([CARD_RULES_PARAM], bytes)[0]; + expect(w.assets[0].maxTotal).toBe(BigInt(MARKER_PRINCIPAL)); + expect(w.allowedCalls[0].pins[1].value).toBe(MARKER_PRINCIPAL); + expect(encodeAgentCardRules(decodeAgentCardRules(bytes), options)).toBe( + bytes + ); +}); +it('retains legacy beneficiary fields during an unchanged decode/encode', () => { + const w = decodeAbiParameters( + [CARD_RULES_PARAM], + encodeAgentCardRules(rules(), options) + )[0]; + const bytes = encodeAbiParameters( + [CARD_RULES_PARAM], + [ + { + ...w, + allowedCalls: [ + { + ...w.allowedCalls[1], + hasBeneficiary: true, + beneficiaryOffset: 4, + pins: [], + }, + ], + }, + ] + ); + expect(encodeAgentCardRules(decodeAgentCardRules(bytes), options)).toBe( + bytes + ); +}); +it('uses the explicit execution chain for native-token objects shared by several networks', () => { + const r = rules(); + r.assets[0].token = { + symbol: 'ETH', + decimals: 18, + mechanism: 'native', + address: '0x0000000000000000000000000000000000000000', + }; + const w = decodeAbiParameters( + [CARD_RULES_PARAM], + encodeAgentCardRules(r, options) + )[0]; + expect(w.assets[0].token.toLowerCase()).toBe( + SYNTHETIC_PUSH_ERC20[PUSH_NETWORK.TESTNET_DONUT].pETH.toLowerCase() + ); +}); +it.each(['spender', 'amount', 'recipient', 'increaseAllowance', 'oldArray'])( + 'refuses unsupported approval or transfer authority: %s', + (which) => { + const r = rules(); + if (which === 'spender') r.allowedCalls[0].pins!.shift(); + if (which === 'amount') r.allowedCalls[0].pins!.pop(); + if (which === 'recipient') r.allowedCalls[1].pins!.shift(); + if (which === 'increaseAllowance') + r.allowedCalls[0].selector = 'increaseAllowance(address,uint256)'; + if (which === 'oldArray') Object.assign(r, { approvals: [] }); + expect(() => encodeAgentCardRules(r, options)).toThrow(); + } +); +it('does not silently drop duplicate alternatives or caps off the principal asset', () => { + const r = rules(); + r.allowedCalls.push(r.allowedCalls[0]); + expect(() => encodeAgentCardRules(r, options)).toThrow(/Duplicate/); + r.allowedCalls.pop(); + r.assets.push({ token: { prc20: spender }, maxPerCall: PRINCIPAL }); + expect(() => encodeAgentCardRules(r, options)).toThrow(/principal asset/); +}); diff --git a/packages/core/src/lib/market/contracts/AgenticCommerce.ts b/packages/core/src/lib/market/contracts/AgenticCommerce.ts new file mode 100644 index 00000000..261909e6 --- /dev/null +++ b/packages/core/src/lib/market/contracts/AgenticCommerce.ts @@ -0,0 +1,1313 @@ +// Generated from sdk-iteration-v1@443b4e2; Donut marketplace v2. +export const JOB_KERNEL_ABI = [ + { + type: 'constructor', + inputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'ADMIN_ROLE', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'BPS_DENOMINATOR', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'DEFAULT_ADMIN_ROLE', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'EVALUATOR_GRACE_PERIOD', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'MIN_EXPIRY_WINDOW', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'batchDetachHook', + inputs: [ + { + name: 'jobIds', + type: 'uint256[]', + internalType: 'uint256[]', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'claimRefund', + inputs: [ + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'complete', + inputs: [ + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'reason', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'optParams', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'createJob', + inputs: [ + { + name: 'provider', + type: 'address', + internalType: 'address', + }, + { + name: 'evaluator', + type: 'address', + internalType: 'address', + }, + { + name: 'expiredAt', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'description', + type: 'string', + internalType: 'string', + }, + { + name: 'hook', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'emergencyWithdraw', + inputs: [ + { + name: 'token', + type: 'address', + internalType: 'address', + }, + { + name: 'to', + type: 'address', + internalType: 'address', + }, + { + name: 'amount', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'evaluatorFeeBP', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'fund', + inputs: [ + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'expectedBudget', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'optParams', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'getJob', + inputs: [ + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'tuple', + internalType: 'struct IAgenticCommerce.Job', + components: [ + { + name: 'client', + type: 'address', + internalType: 'address', + }, + { + name: 'status', + type: 'uint8', + internalType: 'enum IAgenticCommerce.JobStatus', + }, + { + name: 'provider', + type: 'address', + internalType: 'address', + }, + { + name: 'expiredAt', + type: 'uint48', + internalType: 'uint48', + }, + { + name: 'evaluator', + type: 'address', + internalType: 'address', + }, + { + name: 'hook', + type: 'address', + internalType: 'address', + }, + { + name: 'budget', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'description', + type: 'string', + internalType: 'string', + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRoleAdmin', + inputs: [ + { + name: 'role', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'grantRole', + inputs: [ + { + name: 'role', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'account', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'hasRole', + inputs: [ + { + name: 'role', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'account', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'initialize', + inputs: [ + { + name: 'paymentToken_', + type: 'address', + internalType: 'address', + }, + { + name: 'treasury_', + type: 'address', + internalType: 'address', + }, + { + name: 'admin_', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'jobCounter', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'pause', + inputs: [], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'paused', + inputs: [], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'paymentToken', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'contract IERC20', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'platformFeeBP', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'platformTreasury', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'reject', + inputs: [ + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'reason', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'optParams', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'renounceRole', + inputs: [ + { + name: 'role', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'callerConfirmation', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'revokeRole', + inputs: [ + { + name: 'role', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'account', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setBudget', + inputs: [ + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'amount', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'optParams', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setEvaluatorFee', + inputs: [ + { + name: 'feeBP', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setHookWhitelist', + inputs: [ + { + name: 'hook', + type: 'address', + internalType: 'address', + }, + { + name: 'status', + type: 'bool', + internalType: 'bool', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setPlatformFee', + inputs: [ + { + name: 'feeBP', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'treasury', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setProvider', + inputs: [ + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'provider', + type: 'address', + internalType: 'address', + }, + { + name: 'optParams', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'submit', + inputs: [ + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'deliverable', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'optParams', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'supportsInterface', + inputs: [ + { + name: 'interfaceId', + type: 'bytes4', + internalType: 'bytes4', + }, + ], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'totalEscrowed', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'unpause', + inputs: [], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'whitelistedHooks', + inputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'view', + }, + { + type: 'event', + name: 'BudgetSet', + inputs: [ + { + name: 'jobId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'amount', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'EmergencyWithdraw', + inputs: [ + { + name: 'token', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'to', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'amount', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'EvaluatorFeePaid', + inputs: [ + { + name: 'jobId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'evaluator', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'amount', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'EvaluatorFeeUpdated', + inputs: [ + { + name: 'feeBP', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'HookDetached', + inputs: [ + { + name: 'jobId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'hook', + type: 'address', + indexed: true, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'HookWhitelistUpdated', + inputs: [ + { + name: 'hook', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'status', + type: 'bool', + indexed: false, + internalType: 'bool', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Initialized', + inputs: [ + { + name: 'version', + type: 'uint64', + indexed: false, + internalType: 'uint64', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'JobCompleted', + inputs: [ + { + name: 'jobId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'evaluator', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'reason', + type: 'bytes32', + indexed: false, + internalType: 'bytes32', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'JobCreated', + inputs: [ + { + name: 'jobId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'client', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'provider', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'evaluator', + type: 'address', + indexed: false, + internalType: 'address', + }, + { + name: 'expiredAt', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'hook', + type: 'address', + indexed: false, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'JobExpired', + inputs: [ + { + name: 'jobId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'JobFunded', + inputs: [ + { + name: 'jobId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'client', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'amount', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'JobRejected', + inputs: [ + { + name: 'jobId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'rejector', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'reason', + type: 'bytes32', + indexed: false, + internalType: 'bytes32', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'JobSubmitted', + inputs: [ + { + name: 'jobId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'provider', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'deliverable', + type: 'bytes32', + indexed: false, + internalType: 'bytes32', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Paused', + inputs: [ + { + name: 'account', + type: 'address', + indexed: false, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'PaymentReleased', + inputs: [ + { + name: 'jobId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'provider', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'amount', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'PlatformFeePaid', + inputs: [ + { + name: 'jobId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'treasury', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'amount', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'PlatformFeeUpdated', + inputs: [ + { + name: 'feeBP', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'treasury', + type: 'address', + indexed: true, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'ProviderSet', + inputs: [ + { + name: 'jobId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'provider', + type: 'address', + indexed: true, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Refunded', + inputs: [ + { + name: 'jobId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'client', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'amount', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleAdminChanged', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'previousAdminRole', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'newAdminRole', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleGranted', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'account', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'sender', + type: 'address', + indexed: true, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleRevoked', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'account', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'sender', + type: 'address', + indexed: true, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Unpaused', + inputs: [ + { + name: 'account', + type: 'address', + indexed: false, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'error', + name: 'AccessControlBadConfirmation', + inputs: [], + }, + { + type: 'error', + name: 'AccessControlUnauthorizedAccount', + inputs: [ + { + name: 'account', + type: 'address', + internalType: 'address', + }, + { + name: 'neededRole', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'BudgetMismatch', + inputs: [], + }, + { + type: 'error', + name: 'ClientIsProvider', + inputs: [], + }, + { + type: 'error', + name: 'EnforcedPause', + inputs: [], + }, + { + type: 'error', + name: 'EvaluatorIsProvider', + inputs: [], + }, + { + type: 'error', + name: 'ExpectedPause', + inputs: [], + }, + { + type: 'error', + name: 'ExpiryTooShort', + inputs: [], + }, + { + type: 'error', + name: 'FeesTooHigh', + inputs: [], + }, + { + type: 'error', + name: 'GracePeriodActive', + inputs: [], + }, + { + type: 'error', + name: 'HookNotWhitelisted', + inputs: [], + }, + { + type: 'error', + name: 'InsufficientUnattributedBalance', + inputs: [ + { + name: 'requested', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'available', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'InvalidHook', + inputs: [], + }, + { + type: 'error', + name: 'InvalidInitialization', + inputs: [], + }, + { + type: 'error', + name: 'InvalidJob', + inputs: [], + }, + { + type: 'error', + name: 'NotInitializing', + inputs: [], + }, + { + type: 'error', + name: 'ProviderNotSet', + inputs: [], + }, + { + type: 'error', + name: 'ReentrancyGuardReentrantCall', + inputs: [], + }, + { + type: 'error', + name: 'SafeERC20FailedOperation', + inputs: [ + { + name: 'token', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'Unauthorized', + inputs: [], + }, + { + type: 'error', + name: 'WrongStatus', + inputs: [], + }, + { + type: 'error', + name: 'ZeroAddress', + inputs: [], + }, +] as const; diff --git a/packages/core/src/lib/market/contracts/RulesBindingHook.ts b/packages/core/src/lib/market/contracts/RulesBindingHook.ts new file mode 100644 index 00000000..6a8fc5d8 --- /dev/null +++ b/packages/core/src/lib/market/contracts/RulesBindingHook.ts @@ -0,0 +1,310 @@ +// Generated from sdk-iteration-v1@443b4e2; Donut marketplace v2. +export const RULES_HOOK_ABI = [ + { + type: 'constructor', + inputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'AGW_FACTORY', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'KERNEL', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'SESSION_ENGINE', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'activeJobOf', + inputs: [ + { + name: 'agw', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'afterAction', + inputs: [ + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'selector', + type: 'bytes4', + internalType: 'bytes4', + }, + { + name: 'data', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'agwOfJob', + inputs: [ + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'beforeAction', + inputs: [ + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'selector', + type: 'bytes4', + internalType: 'bytes4', + }, + { + name: 'data', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'initialize', + inputs: [ + { + name: 'kernel_', + type: 'address', + internalType: 'address', + }, + { + name: 'agwFactory_', + type: 'address', + internalType: 'address', + }, + { + name: 'sessionEngine_', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'rulesOfJob', + inputs: [ + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'supportsInterface', + inputs: [ + { + name: 'interfaceId', + type: 'bytes4', + internalType: 'bytes4', + }, + ], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'view', + }, + { + type: 'event', + name: 'Initialized', + inputs: [ + { + name: 'version', + type: 'uint64', + indexed: false, + internalType: 'uint64', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RulesBound', + inputs: [ + { + name: 'jobId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'agw', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'rulesId', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + ], + anonymous: false, + }, + { + type: 'error', + name: 'AGWHasLiveJob', + inputs: [ + { + name: 'agw', + type: 'address', + internalType: 'address', + }, + { + name: 'liveJobId', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'CallerIsNotAGW', + inputs: [ + { + name: 'caller', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'CallerIsNotKernel', + inputs: [ + { + name: 'caller', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'InvalidInitialization', + inputs: [], + }, + { + type: 'error', + name: 'InvalidOptParams', + inputs: [ + { + name: 'length', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'NotInitializing', + inputs: [], + }, + { + type: 'error', + name: 'RulesNotLive', + inputs: [ + { + name: 'agw', + type: 'address', + internalType: 'address', + }, + { + name: 'rulesId', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'ZeroAddress', + inputs: [], + }, +] as const; diff --git a/packages/core/src/lib/market/contracts/UniversalMarketplace.ts b/packages/core/src/lib/market/contracts/UniversalMarketplace.ts new file mode 100644 index 00000000..6cb8b3a3 --- /dev/null +++ b/packages/core/src/lib/market/contracts/UniversalMarketplace.ts @@ -0,0 +1,2291 @@ +// Generated from sdk-iteration-v1@443b4e2; Donut marketplace v2. +export const MARKETPLACE_ABI = [ + { + type: 'constructor', + inputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'ADMIN_ROLE', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'AGW_FACTORY', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'contract IAGWFactory', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'DEFAULT_ADMIN_ROLE', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'KERNEL', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'contract IAgenticCommerce', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'MODE_SINGLE', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'OPENJOB_LANE', + inputs: [], + outputs: [ + { + name: '', + type: 'uint192', + internalType: 'uint192', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'PUSH_CHAIN_HASH', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'RULES', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'contract IUniversalMarketplaceRules', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'activeJobOf', + inputs: [ + { + name: 'agw', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'agentCardCount', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'agentCardOf', + inputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'agentCardVersion', + inputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'agwOfJob', + inputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'buildCreateJobCalldata', + inputs: [ + { + name: 'cardId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + { + name: 'index', + type: 'uint96', + internalType: 'uint96', + }, + { + name: 'job', + type: 'tuple', + internalType: 'struct JobInputs', + components: [ + { + name: 'principal', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'expiredAt', + type: 'uint48', + internalType: 'uint48', + }, + { + name: 'executeBy', + type: 'uint48', + internalType: 'uint48', + }, + { + name: 'params', + type: 'int256[]', + internalType: 'int256[]', + }, + ], + }, + ], + outputs: [ + { + name: 'mode', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'executionCalldata', + type: 'bytes', + internalType: 'bytes', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'cardOfJob', + inputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'cardVersionOfJob', + inputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'ceaDeployment', + inputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + outputs: [ + { + name: 'ceaFactory', + type: 'address', + internalType: 'address', + }, + { + name: 'ceaProxyImpl', + type: 'address', + internalType: 'address', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'computeCEA', + inputs: [ + { + name: 'agw', + type: 'address', + internalType: 'address', + }, + { + name: 'chainHash', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + outputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'disableAgentCard', + inputs: [ + { + name: 'cardId', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'evaluator', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getAgentCard', + inputs: [ + { + name: 'cardId', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: 'v', + type: 'tuple', + internalType: 'struct AgentCardView', + components: [ + { + name: 'card', + type: 'tuple', + internalType: 'struct AgentCard', + components: [ + { + name: 'provider', + type: 'address', + internalType: 'address', + }, + { + name: 'jobType', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'metadataURI', + type: 'string', + internalType: 'string', + }, + { + name: 'metadataHash', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'chainNamespace', + type: 'string', + internalType: 'string', + }, + { + name: 'providerFee', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address', + }, + { + name: 'principalMin', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'principalMax', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'minDuration', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'maxDuration', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'minExecuteWindow', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'settleWindow', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'active', + type: 'bool', + internalType: 'bool', + }, + ], + }, + { + name: 'rules', + type: 'bytes', + internalType: 'bytes', + }, + { + name: 'jobSpecTemplate', + type: 'bytes', + internalType: 'bytes', + }, + { + name: 'version', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'verified', + type: 'bool', + internalType: 'bool', + }, + { + name: 'disabled', + type: 'bool', + internalType: 'bool', + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getAgentRating', + inputs: [ + { + name: 'agent', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRoleAdmin', + inputs: [ + { + name: 'role', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'grantRole', + inputs: [ + { + name: 'role', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'account', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'hasRole', + inputs: [ + { + name: 'role', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'account', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'hook', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'initialize', + inputs: [ + { + name: 'p', + type: 'tuple', + internalType: 'struct InitParams', + components: [ + { + name: 'agwFactory', + type: 'address', + internalType: 'address', + }, + { + name: 'kernel', + type: 'address', + internalType: 'address', + }, + { + name: 'hook', + type: 'address', + internalType: 'address', + }, + { + name: 'evaluator', + type: 'address', + internalType: 'address', + }, + { + name: 'rules', + type: 'address', + internalType: 'address', + }, + { + name: 'admin', + type: 'address', + internalType: 'address', + }, + ], + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'isAgentCardDisabled', + inputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'isAgentCardVerified', + inputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'openJob', + inputs: [ + { + name: 'p', + type: 'tuple', + internalType: 'struct OpenJobParams', + components: [ + { + name: 'cardId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'cardVersion', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'job', + type: 'tuple', + internalType: 'struct JobInputs', + components: [ + { + name: 'principal', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'expiredAt', + type: 'uint48', + internalType: 'uint48', + }, + { + name: 'executeBy', + type: 'uint48', + internalType: 'uint48', + }, + { + name: 'params', + type: 'int256[]', + internalType: 'int256[]', + }, + ], + }, + { + name: 'session', + type: 'tuple', + internalType: 'struct Session', + components: [ + { + name: 'sessionValidator', + type: 'address', + internalType: 'address', + }, + { + name: 'sessionValidatorInitData', + type: 'bytes', + internalType: 'bytes', + }, + { + name: 'salt', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'userOpPolicies', + type: 'tuple[]', + internalType: 'struct PolicyData[]', + components: [ + { + name: 'policy', + type: 'address', + internalType: 'address', + }, + { + name: 'initData', + type: 'bytes', + internalType: 'bytes', + }, + ], + }, + { + name: 'erc7739Policies', + type: 'tuple', + internalType: 'struct ERC7739Data', + components: [ + { + name: 'allowedERC7739Content', + type: 'tuple[]', + internalType: 'struct ERC7739Context[]', + components: [ + { + name: 'appDomainSeparator', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'contentNames', + type: 'string[]', + internalType: 'string[]', + }, + ], + }, + { + name: 'erc1271Policies', + type: 'tuple[]', + internalType: 'struct PolicyData[]', + components: [ + { + name: 'policy', + type: 'address', + internalType: 'address', + }, + { + name: 'initData', + type: 'bytes', + internalType: 'bytes', + }, + ], + }, + ], + }, + { + name: 'actions', + type: 'tuple[]', + internalType: 'struct ActionData[]', + components: [ + { + name: 'actionTargetSelector', + type: 'bytes4', + internalType: 'bytes4', + }, + { + name: 'actionTarget', + type: 'address', + internalType: 'address', + }, + { + name: 'actionPolicies', + type: 'tuple[]', + internalType: 'struct PolicyData[]', + components: [ + { + name: 'policy', + type: 'address', + internalType: 'address', + }, + { + name: 'initData', + type: 'bytes', + internalType: 'bytes', + }, + ], + }, + ], + }, + { + name: 'permitERC4337Paymaster', + type: 'bool', + internalType: 'bool', + }, + ], + }, + { + name: 'intent', + type: 'tuple', + internalType: 'struct OwnerIntent', + components: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + { + name: 'wallet', + type: 'address', + internalType: 'address', + }, + { + name: 'executor', + type: 'address', + internalType: 'address', + }, + { + name: 'index', + type: 'uint96', + internalType: 'uint96', + }, + { + name: 'sessionHash', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'mode', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'execCalldataHash', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'nonceKey', + type: 'uint192', + internalType: 'uint192', + }, + { + name: 'nonceSeq', + type: 'uint64', + internalType: 'uint64', + }, + { + name: 'grantNonce', + type: 'uint64', + internalType: 'uint64', + }, + { + name: 'deadline', + type: 'uint48', + internalType: 'uint48', + }, + { + name: 'signerChainId', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + name: 'sig', + type: 'bytes', + internalType: 'bytes', + }, + { + name: 'label', + type: 'string', + internalType: 'string', + }, + ], + }, + ], + outputs: [ + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'agw', + type: 'address', + internalType: 'address', + }, + { + name: 'rulesId', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'pause', + inputs: [], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'paused', + inputs: [], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'previewIntent', + inputs: [ + { + name: 'r', + type: 'tuple', + internalType: 'struct IntentRequest', + components: [ + { + name: 'cardId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + { + name: 'index', + type: 'uint96', + internalType: 'uint96', + }, + { + name: 'job', + type: 'tuple', + internalType: 'struct JobInputs', + components: [ + { + name: 'principal', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'expiredAt', + type: 'uint48', + internalType: 'uint48', + }, + { + name: 'executeBy', + type: 'uint48', + internalType: 'uint48', + }, + { + name: 'params', + type: 'int256[]', + internalType: 'int256[]', + }, + ], + }, + { + name: 'deadline', + type: 'uint48', + internalType: 'uint48', + }, + { + name: 'signerChainId', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + name: 's', + type: 'tuple', + internalType: 'struct Session', + components: [ + { + name: 'sessionValidator', + type: 'address', + internalType: 'address', + }, + { + name: 'sessionValidatorInitData', + type: 'bytes', + internalType: 'bytes', + }, + { + name: 'salt', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'userOpPolicies', + type: 'tuple[]', + internalType: 'struct PolicyData[]', + components: [ + { + name: 'policy', + type: 'address', + internalType: 'address', + }, + { + name: 'initData', + type: 'bytes', + internalType: 'bytes', + }, + ], + }, + { + name: 'erc7739Policies', + type: 'tuple', + internalType: 'struct ERC7739Data', + components: [ + { + name: 'allowedERC7739Content', + type: 'tuple[]', + internalType: 'struct ERC7739Context[]', + components: [ + { + name: 'appDomainSeparator', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'contentNames', + type: 'string[]', + internalType: 'string[]', + }, + ], + }, + { + name: 'erc1271Policies', + type: 'tuple[]', + internalType: 'struct PolicyData[]', + components: [ + { + name: 'policy', + type: 'address', + internalType: 'address', + }, + { + name: 'initData', + type: 'bytes', + internalType: 'bytes', + }, + ], + }, + ], + }, + { + name: 'actions', + type: 'tuple[]', + internalType: 'struct ActionData[]', + components: [ + { + name: 'actionTargetSelector', + type: 'bytes4', + internalType: 'bytes4', + }, + { + name: 'actionTarget', + type: 'address', + internalType: 'address', + }, + { + name: 'actionPolicies', + type: 'tuple[]', + internalType: 'struct PolicyData[]', + components: [ + { + name: 'policy', + type: 'address', + internalType: 'address', + }, + { + name: 'initData', + type: 'bytes', + internalType: 'bytes', + }, + ], + }, + ], + }, + { + name: 'permitERC4337Paymaster', + type: 'bool', + internalType: 'bool', + }, + ], + }, + ], + outputs: [ + { + name: 'i', + type: 'tuple', + internalType: 'struct OwnerIntent', + components: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + { + name: 'wallet', + type: 'address', + internalType: 'address', + }, + { + name: 'executor', + type: 'address', + internalType: 'address', + }, + { + name: 'index', + type: 'uint96', + internalType: 'uint96', + }, + { + name: 'sessionHash', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'mode', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'execCalldataHash', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'nonceKey', + type: 'uint192', + internalType: 'uint192', + }, + { + name: 'nonceSeq', + type: 'uint64', + internalType: 'uint64', + }, + { + name: 'grantNonce', + type: 'uint64', + internalType: 'uint64', + }, + { + name: 'deadline', + type: 'uint48', + internalType: 'uint48', + }, + { + name: 'signerChainId', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'registerAgentCard', + inputs: [ + { + name: 'c', + type: 'tuple', + internalType: 'struct AgentCard', + components: [ + { + name: 'provider', + type: 'address', + internalType: 'address', + }, + { + name: 'jobType', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'metadataURI', + type: 'string', + internalType: 'string', + }, + { + name: 'metadataHash', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'chainNamespace', + type: 'string', + internalType: 'string', + }, + { + name: 'providerFee', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address', + }, + { + name: 'principalMin', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'principalMax', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'minDuration', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'maxDuration', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'minExecuteWindow', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'settleWindow', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'active', + type: 'bool', + internalType: 'bool', + }, + ], + }, + { + name: 'rules', + type: 'bytes', + internalType: 'bytes', + }, + { + name: 'jobSpecTemplate', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [ + { + name: 'cardId', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'renounceRole', + inputs: [ + { + name: 'role', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'callerConfirmation', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'revokeAgentCardVerification', + inputs: [ + { + name: 'cardId', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'revokeRole', + inputs: [ + { + name: 'role', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'account', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'rulesOfJob', + inputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'setAgentCardActive', + inputs: [ + { + name: 'cardId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'active', + type: 'bool', + internalType: 'bool', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setAgentRating', + inputs: [ + { + name: 'agent', + type: 'address', + internalType: 'address', + }, + { + name: 'rating', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setCEADeployment', + inputs: [ + { + name: 'chainHash', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'ceaFactory', + type: 'address', + internalType: 'address', + }, + { + name: 'ceaProxyImpl', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setEvaluator', + inputs: [ + { + name: 'evaluator_', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setHook', + inputs: [ + { + name: 'hook_', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'supportsInterface', + inputs: [ + { + name: 'interfaceId', + type: 'bytes4', + internalType: 'bytes4', + }, + ], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'unpause', + inputs: [], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'updateAgentCard', + inputs: [ + { + name: 'cardId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'c', + type: 'tuple', + internalType: 'struct AgentCard', + components: [ + { + name: 'provider', + type: 'address', + internalType: 'address', + }, + { + name: 'jobType', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'metadataURI', + type: 'string', + internalType: 'string', + }, + { + name: 'metadataHash', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'chainNamespace', + type: 'string', + internalType: 'string', + }, + { + name: 'providerFee', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address', + }, + { + name: 'principalMin', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'principalMax', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'minDuration', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'maxDuration', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'minExecuteWindow', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'settleWindow', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'active', + type: 'bool', + internalType: 'bool', + }, + ], + }, + { + name: 'rules', + type: 'bytes', + internalType: 'bytes', + }, + { + name: 'jobSpecTemplate', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'verifyAgentCard', + inputs: [ + { + name: 'cardId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'cardVersion', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'version', + inputs: [], + outputs: [ + { + name: '', + type: 'string', + internalType: 'string', + }, + ], + stateMutability: 'pure', + }, + { + type: 'event', + name: 'AgentCardDisabled', + inputs: [ + { + name: 'cardId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'AgentCardRegistered', + inputs: [ + { + name: 'cardId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'provider', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'jobType', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'chainNamespace', + type: 'string', + indexed: false, + internalType: 'string', + }, + { + name: 'rulesHash', + type: 'bytes32', + indexed: false, + internalType: 'bytes32', + }, + { + name: 'jobSpecHash', + type: 'bytes32', + indexed: false, + internalType: 'bytes32', + }, + { + name: 'metadataHash', + type: 'bytes32', + indexed: false, + internalType: 'bytes32', + }, + { + name: 'providerFee', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'AgentCardStatusChanged', + inputs: [ + { + name: 'cardId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'active', + type: 'bool', + indexed: false, + internalType: 'bool', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'AgentCardUpdated', + inputs: [ + { + name: 'cardId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'version', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'rulesHash', + type: 'bytes32', + indexed: false, + internalType: 'bytes32', + }, + { + name: 'jobSpecHash', + type: 'bytes32', + indexed: false, + internalType: 'bytes32', + }, + { + name: 'metadataHash', + type: 'bytes32', + indexed: false, + internalType: 'bytes32', + }, + { + name: 'providerFee', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'AgentCardVerificationRevoked', + inputs: [ + { + name: 'cardId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'AgentCardVerified', + inputs: [ + { + name: 'cardId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'version', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'AgentRatingSet', + inputs: [ + { + name: 'agent', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'rating', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'CEADeploymentSet', + inputs: [ + { + name: 'chainHash', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'ceaFactory', + type: 'address', + indexed: false, + internalType: 'address', + }, + { + name: 'ceaProxyImpl', + type: 'address', + indexed: false, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'EvaluatorUpdated', + inputs: [ + { + name: 'evaluator', + type: 'address', + indexed: false, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'HookUpdated', + inputs: [ + { + name: 'hook', + type: 'address', + indexed: false, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Initialized', + inputs: [ + { + name: 'version', + type: 'uint64', + indexed: false, + internalType: 'uint64', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'JobOpened', + inputs: [ + { + name: 'cardId', + type: 'uint256', + indexed: true, + internalType: 'uint256', + }, + { + name: 'owner', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'agw', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'jobId', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'rulesId', + type: 'bytes32', + indexed: false, + internalType: 'bytes32', + }, + { + name: 'principal', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'cardVersion', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Paused', + inputs: [ + { + name: 'account', + type: 'address', + indexed: false, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleAdminChanged', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'previousAdminRole', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'newAdminRole', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleGranted', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'account', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'sender', + type: 'address', + indexed: true, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RoleRevoked', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32', + }, + { + name: 'account', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'sender', + type: 'address', + indexed: true, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Unpaused', + inputs: [ + { + name: 'account', + type: 'address', + indexed: false, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'error', + name: 'AGWMismatch', + inputs: [ + { + name: 'expected', + type: 'address', + internalType: 'address', + }, + { + name: 'actual', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'AccessControlBadConfirmation', + inputs: [], + }, + { + type: 'error', + name: 'AccessControlUnauthorizedAccount', + inputs: [ + { + name: 'account', + type: 'address', + internalType: 'address', + }, + { + name: 'neededRole', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'AgentCardAlreadyRegistered', + inputs: [ + { + name: 'provider', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'AgentCardDisabled', + inputs: [ + { + name: 'cardId', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'AgentCardIdentityImmutable', + inputs: [], + }, + { + type: 'error', + name: 'AgentCardInactive', + inputs: [], + }, + { + type: 'error', + name: 'AgentCardVersionMismatch', + inputs: [ + { + name: 'provided', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'current', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'CallerIsNotProvider', + inputs: [], + }, + { + type: 'error', + name: 'ChainNotSupported', + inputs: [ + { + name: 'chainHash', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'EnforcedPause', + inputs: [], + }, + { + type: 'error', + name: 'ExecuteByOutOfRange', + inputs: [], + }, + { + type: 'error', + name: 'ExecutorMismatch', + inputs: [ + { + name: 'expected', + type: 'address', + internalType: 'address', + }, + { + name: 'actual', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'ExpectedPause', + inputs: [], + }, + { + type: 'error', + name: 'ExpiryOutOfRange', + inputs: [], + }, + { + type: 'error', + name: 'HookNotWhitelisted', + inputs: [], + }, + { + type: 'error', + name: 'IntentExecMismatch', + inputs: [ + { + name: 'actualCalldataHash', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'IntentSessionMismatch', + inputs: [ + { + name: 'actual', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'IntentWalletMismatch', + inputs: [ + { + name: 'expected', + type: 'address', + internalType: 'address', + }, + { + name: 'provided', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'InvalidAgentCard', + inputs: [ + { + name: 'reason', + type: 'string', + internalType: 'string', + }, + ], + }, + { + type: 'error', + name: 'InvalidInitialization', + inputs: [], + }, + { + type: 'error', + name: 'JobMismatch', + inputs: [], + }, + { + type: 'error', + name: 'NotInitializing', + inputs: [], + }, + { + type: 'error', + name: 'PrincipalOutOfRange', + inputs: [], + }, + { + type: 'error', + name: 'ProviderIsEvaluator', + inputs: [], + }, + { + type: 'error', + name: 'ReentrancyGuardReentrantCall', + inputs: [], + }, + { + type: 'error', + name: 'UnexpectedJobCount', + inputs: [ + { + name: 'before', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'afterCount', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'WalletHasActiveJob', + inputs: [ + { + name: 'agw', + type: 'address', + internalType: 'address', + }, + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'WalletOwnerMismatch', + inputs: [ + { + name: 'expected', + type: 'address', + internalType: 'address', + }, + { + name: 'actual', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'ZeroAddress', + inputs: [], + }, +] as const; diff --git a/packages/core/src/lib/market/contracts/UniversalMarketplaceErrors.ts b/packages/core/src/lib/market/contracts/UniversalMarketplaceErrors.ts new file mode 100644 index 00000000..0d302d29 --- /dev/null +++ b/packages/core/src/lib/market/contracts/UniversalMarketplaceErrors.ts @@ -0,0 +1,412 @@ +// Generated from sdk-iteration-v1@443b4e2; Donut marketplace v2. +export const MARKET_ERRORS_ABI = [ + { + type: 'error', + name: 'AGWMismatch', + inputs: [ + { + name: 'expected', + type: 'address', + internalType: 'address', + }, + { + name: 'actual', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'ActionCount', + inputs: [], + }, + { + type: 'error', + name: 'ActionsMismatch', + inputs: [], + }, + { + type: 'error', + name: 'AgentCardAlreadyRegistered', + inputs: [ + { + name: 'provider', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'AgentCardDisabled', + inputs: [ + { + name: 'cardId', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'AgentCardIdentityImmutable', + inputs: [], + }, + { + type: 'error', + name: 'AgentCardInactive', + inputs: [], + }, + { + type: 'error', + name: 'AgentCardVersionMismatch', + inputs: [ + { + name: 'provided', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'current', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'AgentMismatch', + inputs: [], + }, + { + type: 'error', + name: 'AssetCountMismatch', + inputs: [ + { + name: 'expected', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'actual', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'AssetMismatch', + inputs: [ + { + name: 'index', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'CallerIsNotProvider', + inputs: [], + }, + { + type: 'error', + name: 'ChainMismatch', + inputs: [ + { + name: 'i', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'ChainNotSupported', + inputs: [ + { + name: 'chainHash', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'EnvelopeVersionMismatch', + inputs: [ + { + name: 'actual', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'ExecuteByOutOfRange', + inputs: [], + }, + { + type: 'error', + name: 'ExecutorMismatch', + inputs: [ + { + name: 'expected', + type: 'address', + internalType: 'address', + }, + { + name: 'actual', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'ExpectedCEAMismatch', + inputs: [ + { + name: 'expected', + type: 'address', + internalType: 'address', + }, + { + name: 'actual', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'ExpiryMismatch', + inputs: [], + }, + { + type: 'error', + name: 'ExpiryOutOfRange', + inputs: [], + }, + { + type: 'error', + name: 'FillOutOfBounds', + inputs: [ + { + name: 'read', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'fill', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'GasCapMismatch', + inputs: [], + }, + { + type: 'error', + name: 'HookNotWhitelisted', + inputs: [], + }, + { + type: 'error', + name: 'IntentExecMismatch', + inputs: [ + { + name: 'actualCalldataHash', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'IntentSessionMismatch', + inputs: [ + { + name: 'actual', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'IntentWalletMismatch', + inputs: [ + { + name: 'expected', + type: 'address', + internalType: 'address', + }, + { + name: 'provided', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'InvalidAgentCard', + inputs: [ + { + name: 'reason', + type: 'string', + internalType: 'string', + }, + ], + }, + { + type: 'error', + name: 'JobMismatch', + inputs: [], + }, + { + type: 'error', + name: 'ParamCountMismatch', + inputs: [ + { + name: 'expected', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'actual', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'ParamOutOfRange', + inputs: [ + { + name: 'index', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'value', + type: 'int256', + internalType: 'int256', + }, + ], + }, + { + type: 'error', + name: 'PinMismatch', + inputs: [ + { + name: 'call', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'pin', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'PolicyShape', + inputs: [ + { + name: 'i', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'PrincipalCapMismatch', + inputs: [], + }, + { + type: 'error', + name: 'PrincipalOutOfRange', + inputs: [], + }, + { + type: 'error', + name: 'ProviderIsEvaluator', + inputs: [], + }, + { + type: 'error', + name: 'TargetOverflow', + inputs: [ + { + name: 'check', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'UnexpectedJobCount', + inputs: [ + { + name: 'before', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'afterCount', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'WalletHasActiveJob', + inputs: [ + { + name: 'agw', + type: 'address', + internalType: 'address', + }, + { + name: 'jobId', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'WalletOwnerMismatch', + inputs: [ + { + name: 'expected', + type: 'address', + internalType: 'address', + }, + { + name: 'actual', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'ZeroAddress', + inputs: [], + }, +] as const; diff --git a/packages/core/src/lib/market/contracts/UniversalMarketplaceRules.ts b/packages/core/src/lib/market/contracts/UniversalMarketplaceRules.ts new file mode 100644 index 00000000..e8a669bd --- /dev/null +++ b/packages/core/src/lib/market/contracts/UniversalMarketplaceRules.ts @@ -0,0 +1,319 @@ +// Generated from sdk-iteration-v1@443b4e2; Donut marketplace v2. +export const MARKET_RULES_ABI = [ + { + type: 'function', + name: 'checkRulesMatchCard', + inputs: [ + { + name: 'cardRules', + type: 'bytes', + internalType: 'bytes', + }, + { + name: 'session', + type: 'tuple', + internalType: 'struct Session', + components: [ + { + name: 'sessionValidator', + type: 'address', + internalType: 'address', + }, + { + name: 'sessionValidatorInitData', + type: 'bytes', + internalType: 'bytes', + }, + { + name: 'salt', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'userOpPolicies', + type: 'tuple[]', + internalType: 'struct PolicyData[]', + components: [ + { + name: 'policy', + type: 'address', + internalType: 'address', + }, + { + name: 'initData', + type: 'bytes', + internalType: 'bytes', + }, + ], + }, + { + name: 'erc7739Policies', + type: 'tuple', + internalType: 'struct ERC7739Data', + components: [ + { + name: 'allowedERC7739Content', + type: 'tuple[]', + internalType: 'struct ERC7739Context[]', + components: [ + { + name: 'appDomainSeparator', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'contentNames', + type: 'string[]', + internalType: 'string[]', + }, + ], + }, + { + name: 'erc1271Policies', + type: 'tuple[]', + internalType: 'struct PolicyData[]', + components: [ + { + name: 'policy', + type: 'address', + internalType: 'address', + }, + { + name: 'initData', + type: 'bytes', + internalType: 'bytes', + }, + ], + }, + ], + }, + { + name: 'actions', + type: 'tuple[]', + internalType: 'struct ActionData[]', + components: [ + { + name: 'actionTargetSelector', + type: 'bytes4', + internalType: 'bytes4', + }, + { + name: 'actionTarget', + type: 'address', + internalType: 'address', + }, + { + name: 'actionPolicies', + type: 'tuple[]', + internalType: 'struct PolicyData[]', + components: [ + { + name: 'policy', + type: 'address', + internalType: 'address', + }, + { + name: 'initData', + type: 'bytes', + internalType: 'bytes', + }, + ], + }, + ], + }, + { + name: 'permitERC4337Paymaster', + type: 'bool', + internalType: 'bool', + }, + ], + }, + { + name: 'ctx', + type: 'tuple', + internalType: 'struct SessionContext', + components: [ + { + name: 'agent', + type: 'address', + internalType: 'address', + }, + { + name: 'chainHash', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'principal', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'expiredAt', + type: 'uint48', + internalType: 'uint48', + }, + { + name: 'expectedCEA', + type: 'address', + internalType: 'address', + }, + ], + }, + ], + outputs: [], + stateMutability: 'pure', + }, + { + type: 'function', + name: 'validateAgentCardRules', + inputs: [ + { + name: 'rules', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [ + { + name: 'tokens', + type: 'address[]', + internalType: 'address[]', + }, + ], + stateMutability: 'pure', + }, + { + type: 'error', + name: 'ActionCount', + inputs: [], + }, + { + type: 'error', + name: 'ActionsMismatch', + inputs: [], + }, + { + type: 'error', + name: 'AgentMismatch', + inputs: [], + }, + { + type: 'error', + name: 'AssetCountMismatch', + inputs: [ + { + name: 'expected', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'actual', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'AssetMismatch', + inputs: [ + { + name: 'index', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'ChainMismatch', + inputs: [ + { + name: 'i', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'EnvelopeVersionMismatch', + inputs: [ + { + name: 'actual', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'ExpectedCEAMismatch', + inputs: [ + { + name: 'expected', + type: 'address', + internalType: 'address', + }, + { + name: 'actual', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'ExpiryMismatch', + inputs: [], + }, + { + type: 'error', + name: 'GasCapMismatch', + inputs: [], + }, + { + type: 'error', + name: 'InvalidAgentCard', + inputs: [ + { + name: 'reason', + type: 'string', + internalType: 'string', + }, + ], + }, + { + type: 'error', + name: 'PinMismatch', + inputs: [ + { + name: 'call', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'pin', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'PolicyShape', + inputs: [ + { + name: 'i', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'PrincipalCapMismatch', + inputs: [], + }, +] as const; diff --git a/packages/core/src/lib/market/data.ts b/packages/core/src/lib/market/data.ts new file mode 100644 index 00000000..f3939145 --- /dev/null +++ b/packages/core/src/lib/market/data.ts @@ -0,0 +1,68 @@ +import { + decodeFunctionData, + encodeFunctionData, + getAbiItem, + toFunctionSelector, + type Abi, + type Hex, +} from 'viem'; + +/** Copy public data before awaiting RPCs or a wallet; BigInts and array order are retained. */ +export function copyData(value: T): T { + if (Array.isArray(value)) return value.map(copyData) as T; + if (value && typeof value === 'object') + return Object.fromEntries( + Object.entries(value).map(([k, v]) => [k, copyData(v)]) + ) as T; + return value; +} +export function fingerprint(value: unknown): string { + const sorted = (v: unknown): unknown => + Array.isArray(v) + ? v.map(sorted) + : v && typeof v === 'object' + ? Object.fromEntries( + Object.entries(v) + .sort(([a], [b]) => a.localeCompare(b)) + .map(([k, x]) => [k, sorted(x)]) + ) + : typeof v === 'bigint' + ? `${v}n` + : v; + return JSON.stringify(sorted(value)); +} + +/** Locate canonical ABI calls inside ordinary, UEA, AGW or multisig transaction inputs. + * Candidates are data, not proof of execution: callers must bind them to authenticated receipt events. + */ +export function embeddedCalls( + input: Hex, + abi: Abi, + name: string +): readonly unknown[][] { + const item = getAbiItem({ abi, name }); + if (!item || item.type !== 'function') return []; + const selector = toFunctionSelector(item).slice(2).toLowerCase(); + const hex = input.toLowerCase(); + const calls: unknown[][] = []; + let offset = 2; + while ((offset = hex.indexOf(selector, offset)) !== -1) { + const at = offset; + offset += 2; + if (at % 2 !== 0) continue; + try { + const data = ('0x' + input.slice(at)) as Hex; + const decoded = decodeFunctionData({ abi: [item], data }); + const encoded = encodeFunctionData({ + abi: [item], + functionName: name, + args: decoded.args, + }); + if (data.slice(0, encoded.length).toLowerCase() === encoded.toLowerCase()) + calls.push([...(decoded.args ?? [])]); + } catch { + /* A selector-shaped value inside unrelated calldata is not a candidate. */ + } + } + return calls; +} diff --git a/packages/core/src/lib/market/deployment.ts b/packages/core/src/lib/market/deployment.ts new file mode 100644 index 00000000..3c96131f --- /dev/null +++ b/packages/core/src/lib/market/deployment.ts @@ -0,0 +1,26 @@ +import { PUSH_NETWORK } from '../constants/enums'; +import { unavailable } from './errors'; +export const DONUT_MARKETPLACE = Object.freeze({ + sourceCommit: '443b4e2dd9ca5dd9ffc8efebdfcecd619dd66c47', + version: '2.0.0', + startBlock: BigInt(24443653), + marketplace: '0x9071ebE01B75123A91e88eB6ec4BF163F3fE9BF4', + kernel: '0x977cf1AC973E9eC4332791d531507575006157Ed', + hook: '0xDe7A94e510b6C571DE7880d441349689F73A32b3', + rules: '0x5b98A8E0df5b918DF76cD2BE84bA7995B39dfd44', + evaluator: '0x1afC81396f1bb36F91f74506284952b81e4bd47c', + paymentToken: '0x7A58048036206bB898008b5bBDA85697DB1e5d66', +} as const); +export type MarketDeployment = Omit< + typeof DONUT_MARKETPLACE, + 'marketplace' | 'kernel' | 'hook' | 'rules' | 'evaluator' | 'paymentToken' +> & + Record< + 'marketplace' | 'kernel' | 'hook' | 'rules' | 'evaluator' | 'paymentToken', + `0x${string}` + >; +export function marketplaceDeployment(network: PUSH_NETWORK): MarketDeployment { + if (network !== PUSH_NETWORK.TESTNET_DONUT) + unavailable('Marketplace on this Push network'); + return DONUT_MARKETPLACE; +} diff --git a/packages/core/src/lib/market/deposit.ts b/packages/core/src/lib/market/deposit.ts new file mode 100644 index 00000000..17c7fda5 --- /dev/null +++ b/packages/core/src/lib/market/deposit.ts @@ -0,0 +1,455 @@ +import { + decodeEventLog, + encodeFunctionData, + erc20Abi, + getAbiItem, + getAddress, + zeroAddress, + type Address, + type Hex, +} from 'viem'; +import { MARKETPLACE_ABI as ABI } from './contracts/UniversalMarketplace'; +import { JOB_KERNEL_ABI } from './contracts/AgenticCommerce'; +import { KERNEL_READ_ABI } from './kernel-wire'; +import { decodeJobSpec } from '../job-spec/codec'; +import { specOrigin } from '../job-spec/helpers'; +import { currentGeneration } from '../agentic/deployments'; +import { configId } from '../agentic/codec/ids'; +import { scanLogs } from '../agentic/reads/snapshot'; +import { confirmedLogs } from '../agentic/management/common'; +import { decodeCardRulesWire } from './rules'; +import { historicalCard } from './history'; +import { MOVEABLE_TOKENS, type MoveableToken } from '../constants/tokens'; +import { getPRC20Address } from '../universal/prc20-address'; +import { MarketError } from './errors'; +import { + deployment, + progress, + snapshot, + write, + type MarketSnapshot, + type StackRuntime, +} from './runtime'; +import type { + AgentCard, + MarketDepositOptions, + MarketDepositResult, + MarketDepositStep, +} from './types'; + +type LoadCard = (cardId: bigint, at: MarketSnapshot) => Promise; +export interface DepositCheckpoint { + txs: MarketDepositStep[]; + pending?: MarketDepositResult['pending']; +} +interface Asset { + step: MarketDepositStep['step']; + token?: Address; + required: bigint; + originToken?: MoveableToken; +} +const uint256 = (n: bigint): void => { + if (typeof n !== 'bigint' || n < BigInt(0) || n >= BigInt(1) << BigInt(256)) + throw new MarketError( + 'INVALID_AMOUNT', + 'Deposit amounts must fit uint256.' + ); +}; +function submittedHash( + cause: unknown, + seen = new Set() +): string | undefined { + if (!cause || typeof cause !== 'object' || seen.has(cause) || seen.size > 16) + return; + seen.add(cause); + const value = cause as Record; + for (const key of ['gatewayTxHash', 'pendingTransactionHash', 'txHash']) + if (typeof value[key] === 'string' && value[key]) + return value[key] as string; + for (const key of ['cause', 'error', 'details']) { + const found = submittedHash(value[key], seen); + if (found) return found; + } + return; +} +const sameAsset = (a?: Address, b?: Address): boolean => + a === undefined || b === undefined + ? a === b + : getAddress(a) === getAddress(b); + +/** Recover amounts from the block that opened the job, never today's mutable card. */ +export async function openedDeposit( + rt: StackRuntime, + jobId: bigint, + loadCard: LoadCard +): Promise<{ result: MarketDepositResult; assets: Asset[]; rulesId: Hex }> { + if (typeof jobId !== 'bigint' || jobId < BigInt(1)) + throw new MarketError( + 'INVALID_JOB_ID', + 'Job IDs are positive bigint values.' + ); + const s = await snapshot(rt); + const d = deployment(rt); + const [cardId, version, wallet, rulesId, kernel] = await Promise.all([ + s.read(d.marketplace, ABI, 'cardOfJob', [jobId]), + s.read(d.marketplace, ABI, 'cardVersionOfJob', [jobId]), + s.read
(d.marketplace, ABI, 'agwOfJob', [jobId]), + s.read(d.marketplace, ABI, 'rulesOfJob', [jobId]), + s.read<{ + client: Address; + status: number; + expiredAt: number; + provider: Address; + description: Hex; + }>(d.kernel, KERNEL_READ_ABI, 'getJob', [jobId]), + ]); + if (!cardId || getAddress(wallet) === zeroAddress) + throw new MarketError( + 'NOT_MARKETPLACE_JOB', + 'This job was not opened through this marketplace.' + ); + if (kernel.status !== 0 || kernel.expiredAt <= s.timestamp) + throw new MarketError( + 'WRONG_STATUS', + 'Deposit only while the job is Open and unexpired.' + ); + if (getAddress(kernel.client) !== getAddress(wallet)) + throw new MarketError( + 'INCONSISTENT_READ', + 'The marketplace wallet differs from the kernel client.' + ); + + let block = rt.jobBlocks?.get(jobId); + if (block === undefined) { + const created = await scanLogs( + rt.agw.reader, + { + address: d.kernel, + event: getAbiItem({ abi: JOB_KERNEL_ABI, name: 'JobCreated' }), + args: { jobId }, + }, + d.startBlock, + s.blockNumber + ); + if (created.length !== 1 || created[0].blockNumber === null) + throw new MarketError( + 'HISTORY_UNAVAILABLE', + 'Could not recover one creation block for this job.' + ); + block = created[0].blockNumber; + } + const logs = await scanLogs( + rt.agw.reader, + { + address: d.marketplace, + event: getAbiItem({ abi: ABI, name: 'JobOpened' }), + args: { cardId, agw: wallet }, + }, + block, + block + ); + const events = logs + .map( + (l) => + decodeEventLog({ + abi: ABI, + eventName: 'JobOpened', + data: l.data, + topics: l.topics, + strict: true, + }).args + ) + .filter((e) => e.jobId === jobId); + if (events.length !== 1) + throw new MarketError( + 'HISTORY_UNAVAILABLE', + 'Could not recover one marketplace opening for this job.' + ); + const opened = events[0]; + const card = await historicalCard(rt, cardId, version, block, loadCard); + if (opened.cardVersion !== version) + throw new MarketError( + 'HISTORY_UNAVAILABLE', + 'The opening event does not match the recorded card version.' + ); + const spec = decodeJobSpec(kernel.description, { format: 'spec' }); + if ( + !('origin' in spec) || + spec.origin !== + specOrigin(d.marketplace, cardId, version, opened.principal) || + opened.rulesId !== rulesId || + getAddress(opened.agw) !== getAddress(wallet) || + getAddress(card.provider) !== getAddress(kernel.provider) + ) + throw new MarketError( + 'INCONSISTENT_READ', + 'The historical opening does not match the stored job.' + ); + const token = await s.read
(d.kernel, JOB_KERNEL_ABI, 'paymentToken'); + if (getAddress(card.paymentToken) !== getAddress(token)) + throw new MarketError( + 'TOKEN_MISMATCH', + 'The opened card and kernel use different payment tokens.' + ); + rt.jobBlocks?.set(jobId, block); + const rules = decodeCardRulesWire(card.rulesBytes); + return { + result: { + jobId, + wallet: getAddress(wallet), + cardId, + cardVersion: version, + txs: [], + }, + assets: [ + { + step: 'PRINCIPAL', + token: getAddress(rules.assets[rules.principalAsset].token), + required: opened.principal, + }, + { + step: 'PROVIDER_FEE', + token: getAddress(token), + required: card.providerFee, + }, + { step: 'PC', required: card.rules.maxGasPerCall }, + ], + rulesId, + }; +} + +/** Separate, confirmed top-ups from the signer's Push identity. Does not fund kernel escrow. */ +export async function depositJob( + rt: StackRuntime, + jobId: bigint, + options: MarketDepositOptions, + loadCard: LoadCard, + checkpoints: Map +): Promise { + if (rt.agw.isReadOnly) + throw new MarketError('READ_ONLY', 'Connect a signing wallet to deposit.'); + if ('skipApprovals' in options) + throw new MarketError( + 'INVALID_DEPOSIT_OPTIONS', + 'V2 cards grant pinned approvals to the agent; deposit has no owner approval step.' + ); + if ( + options.funding !== undefined && + !['push', 'origin'].includes(options.funding) + ) + throw new MarketError( + 'INVALID_DEPOSIT_OPTIONS', + 'Choose push or origin deposit funding.' + ); + if (options.funding === 'origin' && rt.agw.signerIsPushNative()) + throw new MarketError( + 'INVALID_DEPOSIT_OPTIONS', + 'Use push funding for a Push-native signer.' + ); + if (options.pcAmount !== undefined) uint256(options.pcAmount); + if (options.providerFee !== undefined) uint256(options.providerFee); + const { result, assets, rulesId } = await openedDeposit(rt, jobId, loadCard); + const previous = checkpoints.get(jobId); + result.txs = [...(options.resume ?? previous?.txs ?? [])]; + if ( + previous?.pending && + !result.txs.some((t) => sameAsset(t.token, previous.pending?.token)) + ) + throw new MarketError( + 'DEPOSIT_INCOMPLETE', + 'A broadcast deposit still needs tracking. Rehydrate its response and pass it as a resume step before sending more.', + { ...result, pending: previous.pending } + ); + const fee = assets[1]; + fee.required = options.providerFee ?? fee.required; + assets[2].required = options.pcAmount ?? assets[2].required; + if (assets[0].token === fee.token) { + assets[0].step = 'PRINCIPAL_AND_FEE'; + assets[0].required += fee.required; + uint256(assets[0].required); + assets.splice(1, 1); + } + const balance = async (asset: Asset, account: Address): Promise => + asset.token + ? (await snapshot(rt)).read(asset.token, erc20Abi, 'balanceOf', [ + account, + ]) + : rt.agw.reader.getBalance({ address: account }); + const available = async (): Promise => { + const s = await snapshot(rt); + const d = deployment(rt); + const job = await s.read<{ status: number; expiredAt: number }>( + d.kernel, + KERNEL_READ_ABI, + 'getJob', + [jobId] + ); + if (job.status !== 0 || job.expiredAt <= s.timestamp) + throw new MarketError( + 'WRONG_STATUS', + 'The job is no longer Open and unexpired.' + ); + const gen = currentGeneration(rt.agw.network); + if ( + !(await s.read( + gen.addresses.sessionEngine, + gen.contracts.abis.engine, + 'isPermissionEnabled', + [rulesId, result.wallet] + )) + ) + throw new MarketError( + 'RULE_NOT_FOUND', + 'The job permission is no longer enabled.' + ); + const actions = await s.read( + gen.addresses.sessionEngine, + gen.contracts.abis.engine, + 'getEnabledActions', + [result.wallet, rulesId] + ); + if (actions.length !== 1) + throw new MarketError( + 'INCONSISTENT_READ', + 'The job permission has an unexpected action count.' + ); + const config = await s.read<{ + initialized: boolean; + assets: readonly { spent: bigint }[]; + }>(gen.addresses.rulesPolicy, gen.contracts.abis.policy, 'getConfig', [ + configId(result.wallet, rulesId, actions[0]), + result.wallet, + ]); + if (!config.initialized || config.assets.some((a) => a.spent > BigInt(0))) + throw new MarketError( + 'DEPOSIT_ALREADY_USED', + 'The job permission has already moved assets. Review funding manually before adding more.' + ); + }; + const checkpoint: DepositCheckpoint = { + txs: result.txs, + pending: previous?.pending, + }; + checkpoints.set(jobId, checkpoint); + let submitting: Omit | undefined; + try { + // Uncertain prior receipts must settle before balances can authorize another transfer. + for (const step of result.txs) await confirmedLogs(rt.agw, step.tx); + checkpoint.pending = undefined; + await available(); + for (const asset of assets) { + const held = await balance(asset, result.wallet); + if (held >= asset.required) continue; + if (result.txs.some((t) => sameAsset(t.token, asset.token))) + throw new MarketError( + 'DEPOSIT_BALANCE_CHANGED', + 'A confirmed deposit no longer covers its target balance. Review the wallet before sending more.' + ); + const needed = asset.required - held; + if (asset.token && options.funding === 'origin') { + const chain = rt.agw.signerOrigin().chain; + asset.originToken = (MOVEABLE_TOKENS[chain] ?? []).find((candidate) => { + try { + return ( + getAddress( + getPRC20Address( + { chain, address: candidate.address }, + { network: rt.agw.network } + ).address + ) === asset.token + ); + } catch { + return false; + } + }); + if (!asset.originToken) + throw new MarketError( + 'TOKEN_ROUTE_UNAVAILABLE', + 'This deposit token has no registered route from the connected origin chain. Prefund it on Push or connect its origin.', + { chain, token: asset.token } + ); + continue; + } + const source = getAddress(rt.agw.signerPushAccount()); + if (source === result.wallet || (await balance(asset, source)) < needed) + throw new MarketError( + 'INSUFFICIENT_FUNDS', + 'The connected signer’s Push account cannot cover this deposit.', + { token: asset.token, required: needed, account: source } + ); + } + for (const asset of assets) { + await available(); + const held = await balance(asset, result.wallet); + if (held >= asset.required) continue; + const amount = asset.required - held; + if (result.txs.some((t) => sameAsset(t.token, asset.token))) + throw new MarketError( + 'DEPOSIT_BALANCE_CHANGED', + 'A confirmed deposit balance changed before the next step. Review the wallet before sending more.' + ); + submitting = { step: asset.step, token: asset.token, amount }; + const tx = asset.originToken + ? await rt.agw.execute( + { to: result.wallet, funds: { token: asset.originToken, amount } }, + { progressHook: options.progressHook } + ) + : await write( + rt, + asset.token + ? { + target: asset.token, + value: BigInt(0), + data: encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [result.wallet, amount], + }), + } + : { target: result.wallet, value: amount, data: '0x' }, + options.progressHook, + 'MARKET', + true + ); + result.txs.push({ step: asset.step, token: asset.token, amount, tx }); + submitting = undefined; + progress( + rt, + options.progressHook, + 'MARKET-TX-111', + 'Deposit step submitted', + { step: asset.step, token: asset.token, amount, txHash: tx.hash } + ); + await confirmedLogs(rt.agw, tx); + if ((await balance(asset, result.wallet)) < asset.required) + throw new MarketError( + 'DEPOSIT_BALANCE_CHANGED', + 'The transfer did not establish the required wallet balance. Review the receipt before retrying.' + ); + } + checkpoints.delete(jobId); + return result; + } catch (cause) { + const txHash = submitting && submittedHash(cause); + if (submitting && txHash) { + checkpoint.pending = { + ...submitting, + txHash, + chain: + options.funding === 'origin' && submitting.token + ? rt.agw.signerOrigin().chain + : rt.agw.pushChainNamespace, + }; + } + throw new MarketError( + 'DEPOSIT_INCOMPLETE', + 'The deposit did not finish. Resume with the recorded transactions after resolving the cause.', + { + ...result, + ...(checkpoint.pending ? { pending: checkpoint.pending } : {}), + causeCode: cause instanceof MarketError ? cause.code : undefined, + }, + cause + ); + } +} diff --git a/packages/core/src/lib/market/errors.ts b/packages/core/src/lib/market/errors.ts new file mode 100644 index 00000000..3e329d33 --- /dev/null +++ b/packages/core/src/lib/market/errors.ts @@ -0,0 +1,103 @@ +import { decodeErrorResult, type Hex } from 'viem'; +import { AgenticError } from '../agentic/errors'; +import { MARKET_ERRORS_ABI } from './contracts/UniversalMarketplaceErrors'; +import { JOB_KERNEL_ABI } from './contracts/AgenticCommerce'; +import { RULES_HOOK_ABI } from './contracts/RulesBindingHook'; + +export class MarketError extends AgenticError { + constructor( + code: string, + message: string, + details?: Record, + cause?: unknown + ) { + super(code, message, { userMessage: message, details, cause }); + this.name = 'MarketError'; + } +} +export class JobError extends MarketError { + constructor( + code: string, + message: string, + details?: Record, + cause?: unknown + ) { + super(code, message, details, cause); + this.name = 'JobError'; + } +} +export class JobSpecError extends MarketError { + constructor( + code: string, + message: string, + details?: Record, + cause?: unknown + ) { + super(code, message, details, cause); + this.name = 'JobSpecError'; + } +} +export function unavailable(feature: string): never { + throw new MarketError( + 'CAPABILITY_UNAVAILABLE', + `${feature} is not available in the deployed marketplace v2 stack.`, + { feature } + ); +} +/** Inspect provider error chains without parsing human-readable revert messages. */ +export function stackError(error: unknown): unknown { + if (error instanceof AgenticError) return error; + const seen = new Set(); + const submitted = error as { + txHash?: string; + pendingTransactionHash?: string; + gatewayTxHash?: string; + } | null; + const recovery = { + ...(submitted?.txHash ? { txHash: submitted.txHash } : {}), + ...(submitted?.pendingTransactionHash + ? { pendingTransactionHash: submitted.pendingTransactionHash } + : {}), + ...(submitted?.gatewayTxHash + ? { gatewayTxHash: submitted.gatewayTxHash } + : {}), + }; + function visit(value: unknown, depth: number): MarketError | undefined { + if (!value || typeof value !== 'object' || seen.has(value) || depth > 8) + return; + seen.add(value); + const o = value as Record; + if (o['code'] === 4001 || o['name'] === 'UserRejectedRequestError') + return new MarketError( + 'REQUEST_REJECTED', + 'The wallet request was cancelled.', + undefined, + error + ); + if (typeof o['data'] === 'string' && /^0x[0-9a-f]+$/i.test(o['data'])) { + try { + const decoded = decodeErrorResult({ + abi: [...MARKET_ERRORS_ABI, ...JOB_KERNEL_ABI, ...RULES_HOOK_ABI], + data: o['data'] as Hex, + }); + const code = decoded.errorName + .replace(/([a-z0-9])([A-Z])/g, '$1_$2') + .toUpperCase(); + return new MarketError( + code, + `The contract rejected the request: ${decoded.errorName}.`, + { decodedError: decoded, ...recovery }, + error + ); + } catch { + /* This value is not a known stack revert; retain the provider cause. */ + } + } + for (const key of ['cause', 'error', 'data']) { + const found = visit(o[key], depth + 1); + if (found) return found; + } + return; + } + return visit(error, 0) ?? error; +} diff --git a/packages/core/src/lib/market/history.ts b/packages/core/src/lib/market/history.ts new file mode 100644 index 00000000..2acc1761 --- /dev/null +++ b/packages/core/src/lib/market/history.ts @@ -0,0 +1,123 @@ +import { + decodeEventLog, + getAbiItem, + getAddress, + keccak256, + type Address, + type Hex, +} from 'viem'; +import { scanLogs } from '../agentic/reads/snapshot'; +import { MARKETPLACE_ABI as ABI } from './contracts/UniversalMarketplace'; +import { decodeAgentCardRules } from './rules'; +import { embeddedCalls } from './data'; +import { MarketError } from './errors'; +import { + deployment, + snapshot, + type MarketSnapshot, + type StackRuntime, +} from './runtime'; +import type { AgentCard } from './types'; + +/** Exact deposit-critical fields from an emitted version, including same-block updates. + * Event content hashes, immutable provider/chain and the kernel token bind the recovered input. + */ +export async function historicalCard( + rt: StackRuntime, + cardId: bigint, + version: bigint, + openedAt: bigint, + load: (cardId: bigint, at: MarketSnapshot) => Promise +): Promise< + Pick< + AgentCard, + | 'version' + | 'provider' + | 'paymentToken' + | 'providerFee' + | 'rulesBytes' + | 'rules' + > +> { + let originalCause: unknown; + try { + const card = await load(cardId, await snapshot(rt, openedAt)); + if (card.version === version) return card; + } catch (cause) { + originalCause = cause; + } + const d = deployment(rt); + const fail = (cause?: unknown): never => { + throw new MarketError( + 'HISTORY_UNAVAILABLE', + 'Could not authenticate the exact opened card version from historical state or transaction input.', + { cardId, cardVersion: version, openedAt }, + cause ?? originalCause + ); + }; + if (!rt.agw.reader.getTransaction) return fail(); + const name = + version === BigInt(1) ? 'AgentCardRegistered' : 'AgentCardUpdated'; + const records = await scanLogs( + rt.agw.reader, + { + address: d.marketplace, + event: getAbiItem({ abi: ABI, name }), + args: { cardId }, + }, + d.startBlock, + openedAt + ); + const matches = records + .map((log) => ({ + log, + event: decodeEventLog({ + abi: ABI, + eventName: name, + data: log.data, + topics: log.topics, + strict: true, + }).args, + })) + .filter(({ event }) => !('version' in event) || event.version === version); + if (matches.length !== 1) return fail(); + const { log, event } = matches[0]; + if (!log.transactionHash || log.blockNumber === null) return fail(); + const tx = await rt.agw.reader.getTransaction({ hash: log.transactionHash }); + if (tx.blockNumber !== log.blockNumber) return fail(); + // The chain and provider cannot change on update. Do not decode today's potentially malformed template. + const current = await ( + await snapshot(rt) + ).read<{ + card: { provider: Address; chainNamespace: string; paymentToken: Address }; + }>(d.marketplace, ABI, 'getAgentCard', [cardId]); + const fn = version === BigInt(1) ? 'registerAgentCard' : 'updateAgentCard'; + const candidates = embeddedCalls(tx.input, ABI, fn).filter((args) => { + const i = version === BigInt(1) ? 0 : 1; + const c = args[i] as { + chainNamespace: string; + paymentToken: Address; + providerFee: bigint; + }; + return ( + (i === 0 || args[0] === cardId) && + c.chainNamespace === current.card.chainNamespace && + getAddress(c.paymentToken) === getAddress(current.card.paymentToken) && + c.providerFee === event.providerFee && + keccak256(args[i + 1] as Hex) === event.rulesHash && + keccak256(args[i + 2] as Hex) === event.jobSpecHash + ); + }); + // Identical byte sequences may appear more than once in a wrapper. Hash-bound content is identical. + if (!candidates.length) return fail(); + const i = version === BigInt(1) ? 0 : 1; + const rulesBytes = candidates[0][i + 1] as Hex; + return { + version, + provider: getAddress(current.card.provider), + paymentToken: getAddress(current.card.paymentToken), + providerFee: event.providerFee, + rulesBytes, + rules: decodeAgentCardRules(rulesBytes), + }; +} diff --git a/packages/core/src/lib/market/index.ts b/packages/core/src/lib/market/index.ts new file mode 100644 index 00000000..aeba7a97 --- /dev/null +++ b/packages/core/src/lib/market/index.ts @@ -0,0 +1,8 @@ +export { MarketError, JobError, JobSpecError } from './errors'; +export type * from './types'; +export type { AgentCardRules, MarketAssetToken, MarketPin } from './rules'; +export { + validateAgentCardRules, + encodeAgentCardRules, + decodeAgentCardRules, +} from './rules'; diff --git a/packages/core/src/lib/market/kernel-wire.ts b/packages/core/src/lib/market/kernel-wire.ts new file mode 100644 index 00000000..65494e0c --- /dev/null +++ b/packages/core/src/lib/market/kernel-wire.ts @@ -0,0 +1,73 @@ +import { + decodeAbiParameters, + encodeAbiParameters, + getAbiItem, + stringToHex, + toFunctionSelector, + type Abi, + type AbiParameter, + type Address, + type Hex, +} from 'viem'; +import { JOB_KERNEL_ABI } from './contracts/AgenticCommerce'; +import { JobError } from './errors'; +const create = getAbiItem({ abi: JOB_KERNEL_ABI, name: 'createJob' }); +export const CREATE_JOB_SELECTOR = toFunctionSelector(create); +const inputs = create.inputs.map((p) => + p.name === 'description' ? { ...p, type: 'bytes' } : p +) as readonly AbiParameter[]; +/** Solidity string(description) carries arbitrary ABI bytes, not UTF-8 text. */ +export const KERNEL_READ_ABI: Abi = JOB_KERNEL_ABI.map((item) => + item.type === 'function' && item.name === 'getJob' + ? { + ...item, + outputs: item.outputs.map((p) => ({ + ...p, + components: p.components.map((c) => + c.name === 'description' ? { ...c, type: 'bytes' as const } : c + ), + })), + } + : item +); +export function encodeCreateJob( + provider: Address, + evaluator: Address, + expiredAt: number, + payload: { jobSpec?: Hex; description?: string }, + hook: Address +): Hex { + if (payload.jobSpec && payload.description !== undefined) + throw new JobError('INVALID_JOB', 'Use jobSpec or description, not both.'); + const bytes = payload.jobSpec ?? stringToHex(payload.description ?? ''); + return (CREATE_JOB_SELECTOR + + encodeAbiParameters(inputs, [ + provider, + evaluator, + BigInt(expiredAt), + bytes, + hook, + ]).slice(2)) as Hex; +} +export function decodeCreateJob(data: Hex): { + provider: Address; + evaluator: Address; + expiredAt: bigint; + description: Hex; + hook: Address; +} { + if (data.slice(0, 10).toLowerCase() !== CREATE_JOB_SELECTOR) + throw new JobError( + 'INVALID_JOB', + 'Expected the deployed kernel createJob selector.' + ); + const [provider, evaluator, expiredAt, description, hook] = + decodeAbiParameters(inputs, ('0x' + data.slice(10)) as Hex) as [ + Address, + Address, + bigint, + Hex, + Address + ]; + return { provider, evaluator, expiredAt, description, hook }; +} diff --git a/packages/core/src/lib/market/market.ts b/packages/core/src/lib/market/market.ts new file mode 100644 index 00000000..71d61919 --- /dev/null +++ b/packages/core/src/lib/market/market.ts @@ -0,0 +1,979 @@ +import { + encodeFunctionData, + decodeAbiParameters, + getAddress, + domainSeparator, + keccak256, + stringToHex, + toHex, + zeroAddress, + type Address, + type Hex, +} from 'viem'; +import { MARKETPLACE_ABI as ABI } from './contracts/UniversalMarketplace'; +import { JOB_KERNEL_ABI } from './contracts/AgenticCommerce'; +import { MARKET_RULES_ABI } from './contracts/UniversalMarketplaceRules'; +import { currentGeneration } from '../agentic/deployments'; +import { rulesId as permissionId } from '../agentic/codec/ids'; +import { + buildSession, + encodeEnvelope, + encodeSession, +} from '../agentic/codec/session'; +import { encodeUniversalTerms } from '../agentic/codec/universal-terms'; +import { assertLabel } from '../agentic/management/label'; +import { decodeJobSpec, encodeJobSpec } from '../job-spec/codec'; +import { + resolveJobSpec, + describeJobSpec, + specOrigin, +} from '../job-spec/helpers'; +import type { JobSpecTemplate } from '../job-spec/types'; +import { + decodeAgentCardRules, + decodeCardRulesWire, + encodeAgentCardRules, + fillCardRules, +} from './rules'; +import { decodeCreateJob, KERNEL_READ_ABI } from './kernel-wire'; +import { copyData, embeddedCalls, fingerprint as fp } from './data'; +import { depositJob, type DepositCheckpoint } from './deposit'; +import { + deployment, + eventArgs, + progress, + snapshot, + write, + type MarketSnapshot, + type StackRuntime, +} from './runtime'; +import { MarketError, stackError, unavailable } from './errors'; +import type { + AgentCard, + AgentCardInput, + AgentCardSummary, + JobPlan, + MarketJobInputs, + MarketNamespace, + MarketPreviewOptions, + MarketWriteOptions, + MarketDepositOptions, + MarketOpenOptions, + OwnerIntent, +} from './types'; +import type { CHAIN } from '../constants/enums'; + +interface WireCard extends Omit { + provider: Address; + chainNamespace: string; + active: boolean; +} +interface WireView { + card: WireCard; + rules: Hex; + jobSpecTemplate: Hex; + version: bigint; + verified: boolean; + disabled: boolean; +} +const ownerIntentFields = [ + ['owner', 'address'], + ['wallet', 'address'], + ['executor', 'address'], + ['index', 'uint96'], + ['sessionHash', 'bytes32'], + ['mode', 'bytes32'], + ['execCalldataHash', 'bytes32'], + ['nonceKey', 'uint192'], + ['nonceSeq', 'uint64'], + ['grantNonce', 'uint64'], + ['deadline', 'uint48'], + ['signerChainId', 'uint256'], +].map(([name, type]) => ({ name, type })); +function id(n: bigint): void { + if (typeof n !== 'bigint' || n < BigInt(1)) + throw new MarketError( + 'INVALID_CARD_ID', + 'Card IDs are positive bigint values.' + ); +} + +export class MarketNamespaceImpl implements MarketNamespace { + constructor(private readonly rt: StackRuntime) {} + private readonly deposits = new Set(); + private readonly depositCheckpoints = new Map(); + private async viewAt(cardId: bigint, s: MarketSnapshot): Promise { + id(cardId); + const d = deployment(this.rt); + const v = await s.read(d.marketplace, ABI, 'getAgentCard', [ + cardId, + ]); + if (getAddress(v.card.provider) === zeroAddress) + throw new MarketError( + 'CARD_NOT_FOUND', + 'This agent card does not exist.' + ); + return v; + } + private async summaryAt( + cardId: bigint, + s: MarketSnapshot, + view?: WireView + ): Promise { + const v = view ?? (await this.viewAt(cardId, s)); + const d = deployment(this.rt); + const { chainNamespace, ...card } = v.card; + return { + ...card, + cardId, + chain: chainNamespace, + version: v.version, + verified: v.verified, + disabled: v.disabled, + rating: await s.read(d.marketplace, ABI, 'getAgentRating', [ + v.card.provider, + ]), + }; + } + private async cardAt(cardId: bigint, s: MarketSnapshot): Promise { + const v = await this.viewAt(cardId, s); + return { + ...(await this.summaryAt(cardId, s, v)), + rules: decodeAgentCardRules(v.rules), + jobSpecTemplate: decodeJobSpec(v.jobSpecTemplate, { + format: 'template', + }) as JobSpecTemplate, + rulesBytes: v.rules, + jobSpecTemplateBytes: v.jobSpecTemplate, + }; + } + async card(cardId: bigint): Promise { + return this.cardAt(cardId, await snapshot(this.rt)); + } + async cards( + options: { provider?: Address; chain?: string; active?: boolean } = {} + ): Promise<{ cards: AgentCardSummary[] }> { + const s = await snapshot(this.rt); + const d = deployment(this.rt); + const count = options.provider + ? await s.read(d.marketplace, ABI, 'agentCardOf', [ + getAddress(options.provider), + ]) + : await s.read(d.marketplace, ABI, 'agentCardCount'); + const cards: AgentCardSummary[] = []; + // Bounded requests. An indexer can replace the walk without changing the public result. + for ( + let start = options.provider ? count : BigInt(1); + start > BigInt(0) && start <= count; + + ) { + const batch = options.provider + ? [start] + : Array.from( + { + length: Number( + count - start + BigInt(1) > BigInt(8) + ? BigInt(8) + : count - start + BigInt(1) + ), + }, + (_, i) => start + BigInt(i) + ); + const rows = await Promise.all(batch.map((n) => this.summaryAt(n, s))); + for (const card of rows) + if ( + (!options.chain || card.chain === options.chain) && + (options.active === undefined || card.active === options.active) + ) { + cards.push(card); + } + if (options.provider) break; + start += BigInt(batch.length); + } + return { cards }; + } + async job(jobId: bigint): Promise<{ + cardId: bigint; + cardVersion: bigint; + wallet: Address; + rulesId: Hex; + }> { + const s = await snapshot(this.rt); + const d = deployment(this.rt); + const [cardId, cardVersion, wallet, rulesId] = await Promise.all([ + s.read(d.marketplace, ABI, 'cardOfJob', [jobId]), + s.read(d.marketplace, ABI, 'cardVersionOfJob', [jobId]), + s.read
(d.marketplace, ABI, 'agwOfJob', [jobId]), + s.read(d.marketplace, ABI, 'rulesOfJob', [jobId]), + ]); + return { cardId, cardVersion, wallet, rulesId }; + } + async activeJob(wallet: Address): Promise<{ jobId: bigint }> { + const d = deployment(this.rt); + return { + jobId: await ( + await snapshot(this.rt) + ).read(d.marketplace, ABI, 'activeJobOf', [getAddress(wallet)]), + }; + } + + async preview( + cardId: bigint, + options: MarketPreviewOptions + ): Promise { + options = { ...options, params: options.params && [...options.params] }; + const rt = this.rt; + const d = deployment(rt); + const s = await snapshot(rt); + const card = await this.cardAt(cardId, s); + const gen = currentGeneration(rt.agw.network); + const now = s.timestamp; + if (card.disabled || !card.active) + throw new MarketError( + 'AGENT_CARD_INACTIVE', + 'This agent card is inactive or disabled.' + ); + if (card.jobSpecTemplate.allowedMutability !== 'NONE') + unavailable('Mutable marketplace criteria'); + const [ + factory, + kernel, + paused, + evaluator, + hook, + rulesHelper, + kernelPaused, + ] = await Promise.all([ + s.read
(d.marketplace, ABI, 'AGW_FACTORY'), + s.read
(d.marketplace, ABI, 'KERNEL'), + s.read(d.marketplace, ABI, 'paused'), + s.read
(d.marketplace, ABI, 'evaluator'), + s.read
(d.marketplace, ABI, 'hook'), + s.read
(d.marketplace, ABI, 'RULES'), + s.read(d.kernel, JOB_KERNEL_ABI, 'paused'), + ]); + if ( + getAddress(factory) !== getAddress(gen.addresses.factory) || + getAddress(kernel) !== getAddress(d.kernel) || + getAddress(hook) !== getAddress(d.hook) || + getAddress(rulesHelper) !== getAddress(d.rules) || + getAddress(evaluator) !== getAddress(d.evaluator) + ) + throw new MarketError( + 'CAPABILITY_UNAVAILABLE', + 'The marketplace deployment wiring has changed.' + ); + if (paused || kernelPaused) + throw new MarketError('PAUSED', 'The marketplace or kernel is paused.'); + if (getAddress(card.provider) === getAddress(evaluator)) + throw new MarketError( + 'PROVIDER_IS_EVALUATOR', + 'The provider cannot be the evaluator.' + ); + const job: MarketJobInputs = { + principal: options.principal, + expiredAt: options.expiredAt, + executeBy: options.executeBy, + params: options.params ?? [], + }; + if ( + typeof job.principal !== 'bigint' || + job.principal < card.principalMin || + job.principal > card.principalMax + ) + throw new MarketError( + 'PRINCIPAL_OUT_OF_RANGE', + 'The principal is outside this card’s range.' + ); + if ( + !Number.isSafeInteger(job.expiredAt) || + job.expiredAt < now + card.minDuration || + job.expiredAt > now + card.maxDuration || + job.expiredAt >= 2 ** 48 + ) + throw new MarketError( + 'EXPIRY_OUT_OF_RANGE', + 'Choose an expiry inside the card’s duration window.' + ); + if ( + !Number.isSafeInteger(job.executeBy) || + job.executeBy < now + card.minExecuteWindow || + job.executeBy + card.settleWindow > job.expiredAt + ) + throw new MarketError( + 'EXECUTE_BY_OUT_OF_RANGE', + 'Choose an execution deadline that leaves the settlement window.' + ); + const owner = getAddress(rt.agw.signerPushAccount()); + if (owner === getAddress(card.provider)) + throw new MarketError( + 'CLIENT_IS_PROVIDER', + 'The wallet owner and provider must be different.' + ); + if ( + options.walletIndex !== undefined && + (!Number.isSafeInteger(options.walletIndex) || options.walletIndex < 0) + ) + throw new MarketError( + 'INVALID_WALLET_INDEX', + 'The wallet index must be a nonnegative safe integer.' + ); + const index = + options.walletIndex === undefined + ? await s.read( + factory, + gen.contracts.abis.factory, + 'walletCount', + [owner] + ) + : BigInt(options.walletIndex); + const [wallet, deployed] = await s.read<[Address, boolean]>( + factory, + gen.contracts.abis.factory, + 'predictWallet', + [owner, index] + ); + if ( + deployed && + getAddress( + await s.read
(factory, gen.contracts.abis.factory, 'ownerOf', [ + wallet, + ]) + ) !== owner + ) + throw new MarketError( + 'NOT_OWNER', + 'The connected account does not own this wallet.' + ); + if ( + (await s.read(d.marketplace, ABI, 'activeJobOf', [wallet])) !== + BigInt(0) + ) + throw new MarketError( + 'WALLET_HAS_ACTIVE_JOB', + 'This wallet already has an active marketplace job.' + ); + const accounts: Record = {}; + const chains = new Set([ + card.chain, + ...card.jobSpecTemplate.reads + .filter( + (r, i) => + r.fills?.some((f) => f.source === 'WALLET') || + card.jobSpecTemplate.checks.some( + (c) => c.read === i && c.target === 'agentic:wallet' + ) + ) + .map((r) => `${r.chainNamespace}:${r.chainId}`), + ]); + for (const chain of chains) { + const [independent, onchain] = await Promise.all([ + rt.agw.resolveCEA(wallet, chain as CHAIN), + s.read
(d.marketplace, ABI, 'computeCEA', [ + wallet, + keccak256(stringToHex(chain)), + ]), + ]); + if (getAddress(independent.cea) !== getAddress(onchain)) + throw new MarketError( + 'CEA_MISMATCH', + 'The independently derived destination wallet differs from the marketplace.', + { chain, wallet, expectedCEA: onchain, derivedCEA: independent.cea } + ); + accounts[chain] = getAddress(onchain); + } + const rules = decodeCardRulesWire(card.rulesBytes); + const terms = fillCardRules( + rules, + job.principal, + accounts[card.chain], + job.expiredAt + ); + const session = buildSession({ + validator: gen.addresses.sessionValidator, + agent: card.provider, + rulesPolicy: gen.addresses.rulesPolicy, + actions: [ + { + target: gen.addresses.gateway, + selector: '0x77b86bec', + initData: encodeEnvelope(card.chain, encodeUniversalTerms(terms)), + }, + ], + }); + const rawChain = rt.agw.signerOrigin().chain; + if (!/^eip155:[1-9]\d*$/.test(rawChain)) + unavailable('Non-EVM OwnerIntent signing'); + const deadline = options.deadline ?? Math.min(now + 3600, job.expiredAt); + if ( + !Number.isSafeInteger(deadline) || + deadline <= now || + deadline >= 2 ** 48 + ) + throw new MarketError( + 'INVALID_DEADLINE', + 'The intent deadline must be a future uint48 timestamp.' + ); + const request = { + cardId, + owner, + index, + job, + deadline, + signerChainId: BigInt(rawChain.split(':')[1]), + }; + const [intent, [mode, calldata]] = await Promise.all([ + s.read(d.marketplace, ABI, 'previewIntent', [ + request, + session, + ]), + s.read<[Hex, Hex]>(d.marketplace, ABI, 'buildCreateJobCalldata', [ + cardId, + owner, + index, + job, + ]), + ]); + const spec = resolveJobSpec(card.jobSpecTemplate, { + principal: job.principal, + params: job.params, + accounts, + origin: specOrigin(d.marketplace, cardId, card.version, job.principal), + executeBy: job.executeBy, + settleWindow: card.settleWindow, + }); + if ( + getAddress(intent.owner) !== owner || + intent.index !== index || + intent.deadline !== deadline || + intent.signerChainId !== request.signerChainId + ) + throw new MarketError( + 'INTENT_MISMATCH', + 'The preview intent names a different owner, wallet index, chain or deadline.' + ); + const bytes = encodeJobSpec(spec); + const packedTarget = getAddress(('0x' + calldata.slice(2, 42)) as Address); + const kernelCall = decodeCreateJob(('0x' + calldata.slice(106)) as Hex); + if ( + packedTarget !== getAddress(d.kernel) || + BigInt('0x' + calldata.slice(42, 106)) !== BigInt(0) || + kernelCall.description !== bytes || + getAddress(kernelCall.provider) !== getAddress(card.provider) || + getAddress(kernelCall.evaluator) !== getAddress(evaluator) || + getAddress(kernelCall.hook) !== getAddress(hook) || + kernelCall.expiredAt !== BigInt(job.expiredAt) || + intent.execCalldataHash !== keccak256(calldata) || + intent.sessionHash !== keccak256(encodeSession(session)) || + intent.mode !== mode || + getAddress(intent.wallet) !== getAddress(wallet) || + getAddress(intent.executor) !== getAddress(d.marketplace) + ) + throw new MarketError( + 'INTENT_MISMATCH', + 'The marketplace preview disagrees with the independently built job or permissions.' + ); + await s.read(d.rules, MARKET_RULES_ABI, 'checkRulesMatchCard', [ + card.rulesBytes, + session, + { + agent: card.provider, + chainHash: keccak256(stringToHex(card.chain)), + principal: job.principal, + expiredAt: job.expiredAt, + expectedCEA: accounts[card.chain], + }, + ]); + const label = options.label ?? 'Agent job'; + assertLabel(label); + const description = describeJobSpec(spec); + return { + cardId, + cardVersion: card.version, + wallet: getAddress(wallet), + walletDeployed: deployed, + session, + intent, + calldata, + jobSpec: { spec, bytes }, + job, + label, + deposit: { + principal: { + prc20: terms.assets[rules.principalAsset].token, + amount: job.principal, + }, + providerFee: { token: card.paymentToken, amount: card.providerFee }, + pc: card.rules.maxGasPerCall, + }, + preview: { + mayDo: terms.allowedCalls.map( + (c) => + `${card.chain}: ${c.target} ${c.selector}; ${c.pins.length} argument conditions; max value ${c.maxValue}.` + ), + mayMove: terms.assets.map( + (a) => + `${a.token}: up to ${a.maxPerCall} per outbound, ${a.maxTotal} total; gas budget ${terms.maxGasPerCall} PC wei.` + ), + judgedBy: [...description.checks, description.logic], + until: new Date(job.expiredAt * 1000).toISOString(), + }, + }; + } + async openJob(plan: JobPlan, options: MarketOpenOptions = {}) { + plan = copyData(plan); + options = { ...options }; + if (options.relay) unavailable('Marketplace relaying'); + if (options.resume) return this.openedResult(plan, options.resume, true); + if (this.rt.agw.isReadOnly) + throw new MarketError( + 'READ_ONLY', + 'Connect a signing wallet to open a job.' + ); + if (this.rt.canSignTypedData?.() === false) + unavailable('EIP-712 signing with this wallet'); + if (!this.rt.agw.reader.call) + unavailable('Signed marketplace transaction simulation with this reader'); + const ownerCode = await this.rt.agw.reader.getCode({ + address: this.rt.agw.signerPushAccount(), + }); + if (!this.rt.agw.signerIsPushNative() && (!ownerCode || ownerCode === '0x')) + throw new MarketError( + 'OWNER_NOT_DEPLOYED', + 'Deploy the connected signer’s UEA on Push before signing a marketplace intent.' + ); + const fresh = await this.preview(plan.cardId, { + ...plan.job, + walletIndex: Number(plan.intent.index), + deadline: plan.intent.deadline, + label: plan.label, + }); + if (fp(fresh) !== fp(plan)) + throw new MarketError( + 'STALE_PLAN', + 'The plan changed. Preview and review it again before signing.' + ); + const d = deployment(this.rt); + const gen = currentGeneration(this.rt.agw.network); + progress(this.rt, options.progressHook, 'MARKET-TX-101', 'Plan verified', { + cardId: plan.cardId, + wallet: plan.wallet, + }); + const domain = { + name: 'AGWFactory', + version: '1', + chainId: Number(plan.intent.signerChainId), + verifyingContract: gen.addresses.factory, + salt: toHex(BigInt(this.rt.agw.pushChainNamespace.split(':')[1]), { + size: 32, + }), + }; + const separator = await ( + await snapshot(this.rt) + ).read( + gen.addresses.factory, + gen.contracts.abis.factory, + 'domainSeparator', + [plan.intent.signerChainId] + ); + if (separator.toLowerCase() !== domainSeparator({ domain }).toLowerCase()) + throw new MarketError( + 'INTENT_MISMATCH', + 'The factory EIP-712 domain differs from the signing domain.' + ); + let sig: Hex; + try { + sig = (await this.rt.signTypedData({ + domain, + types: { OwnerIntent: ownerIntentFields }, + primaryType: 'OwnerIntent', + message: { ...plan.intent }, + })) as Hex; + } catch (error) { + throw stackError(error); + } + progress( + this.rt, + options.progressHook, + 'MARKET-TX-102', + 'Owner intent signed' + ); + const call = { + target: d.marketplace, + value: BigInt(0), + data: encodeFunctionData({ + abi: ABI, + functionName: 'openJob', + args: [ + { + cardId: plan.cardId, + cardVersion: plan.cardVersion, + job: plan.job, + session: plan.session, + intent: plan.intent, + sig, + label: plan.label, + }, + ], + }), + }; + try { + // Runs the actual factory, owner verifier (UEA / ERC-1271 / EOA), grant and kernel create. + // This catches unsupported 7702 delegates without spending gas or bypassing owner verification. + await this.rt.agw.reader.call({ + to: call.target, + data: call.data, + account: this.rt.agw.signerPushAccount(), + }); + } catch (cause) { + throw new MarketError( + 'OPEN_JOB_SIMULATION_FAILED', + 'The signed marketplace request failed simulation. No transaction was submitted.', + { contractError: stackError(cause) }, + cause + ); + } + const tx = await write(this.rt, call, options.progressHook, 'MARKET', true); + return this.openedResult(plan, tx); + } + private async openedResult( + plan: JobPlan, + tx: import('../orchestrator/orchestrator.types').UniversalTxResponse, + recover = false + ) { + try { + return await this.verifyOpening(plan, tx, recover); + } catch (cause) { + if (cause instanceof MarketError && cause.details?.['txHash']) + throw cause; + throw new MarketError( + 'OPEN_JOB_RECOVERY_REQUIRED', + 'The opening was submitted but could not be fully verified. Track this transaction and resume with the original plan before opening again.', + { txHash: tx.hash }, + cause + ); + } + } + private async verifyOpening( + plan: JobPlan, + tx: import('../orchestrator/orchestrator.types').UniversalTxResponse, + recover: boolean + ) { + const d = deployment(this.rt); + const gen = currentGeneration(this.rt.agw.network); + const e = await eventArgs(this.rt, tx, d.marketplace, ABI, 'JobOpened'); + const [agent] = decodeAbiParameters( + [{ type: 'address' }], + plan.session.sessionValidatorInitData + ); + const expectedRules = permissionId({ + validator: gen.addresses.sessionValidator, + agent, + grantNonce: plan.intent.grantNonce, + }); + if ( + e['cardId'] !== plan.cardId || + e['cardVersion'] !== plan.cardVersion || + getAddress(e['agw'] as Address) !== plan.wallet || + e['principal'] !== plan.job.principal || + getAddress(e['owner'] as Address) !== getAddress(plan.intent.owner) || + e['rulesId'] !== expectedRules || + getAddress(plan.session.sessionValidator) !== + getAddress(gen.addresses.sessionValidator) || + plan.intent.sessionHash !== keccak256(encodeSession(plan.session)) || + plan.intent.execCalldataHash !== keccak256(plan.calldata) + ) + throw new MarketError( + 'RECEIPT_MISMATCH', + 'The opened job does not match the signed plan.', + { txHash: tx.hash } + ); + const jobId = e['jobId'] as bigint; + const s = await snapshot(this.rt); + const [cardId, version, wallet, rules, job, owner] = await Promise.all([ + s.read(d.marketplace, ABI, 'cardOfJob', [jobId]), + s.read(d.marketplace, ABI, 'cardVersionOfJob', [jobId]), + s.read
(d.marketplace, ABI, 'agwOfJob', [jobId]), + s.read(d.marketplace, ABI, 'rulesOfJob', [jobId]), + s.read<{ + client: Address; + provider: Address; + evaluator: Address; + hook: Address; + expiredAt: number; + description: Hex; + }>(d.kernel, KERNEL_READ_ABI, 'getJob', [jobId]), + s.read
( + gen.addresses.factory, + gen.contracts.abis.factory, + 'ownerOf', + [plan.wallet] + ), + ]); + const creation = decodeCreateJob(('0x' + plan.calldata.slice(106)) as Hex); + if ( + cardId !== plan.cardId || + version !== plan.cardVersion || + getAddress(wallet) !== getAddress(plan.wallet) || + rules !== expectedRules || + getAddress(owner) !== getAddress(plan.intent.owner) || + getAddress(job.client) !== getAddress(plan.wallet) || + getAddress(job.provider) !== getAddress(agent) || + getAddress(job.evaluator) !== getAddress(creation.evaluator) || + getAddress(job.hook) !== getAddress(creation.hook) || + job.expiredAt !== plan.job.expiredAt || + job.description !== plan.jobSpec.bytes + ) + throw new MarketError( + 'RECEIPT_MISMATCH', + 'The kernel, wallet and marketplace mappings do not match the opening.', + { txHash: tx.hash, jobId } + ); + if (recover) { + if (!this.rt.agw.reader.getTransaction) + throw new MarketError( + 'HISTORY_UNAVAILABLE', + 'This reader cannot load the submitted opening input.', + { txHash: tx.hash } + ); + const transaction = await this.rt.agw.reader.getTransaction({ + hash: tx.hash as Hex, + }); + const matched = embeddedCalls(transaction.input, ABI, 'openJob').some( + ([value]) => { + const p = value as { + cardId: bigint; + cardVersion: bigint; + job: MarketJobInputs; + intent: OwnerIntent; + session: JobPlan['session']; + }; + return ( + p.cardId === plan.cardId && + p.cardVersion === plan.cardVersion && + fp(p.job) === fp(plan.job) && + fp(p.intent) === fp(plan.intent) && + encodeSession(p.session) === encodeSession(plan.session) + ); + } + ); + if (!matched) + throw new MarketError( + 'RECEIPT_MISMATCH', + 'The submitted input does not contain this reviewed opening.', + { txHash: tx.hash, jobId } + ); + } + return { + jobId, + wallet: getAddress(e['agw'] as Address), + rulesId: e['rulesId'] as Hex, + tx, + }; + } + async deposit(jobId: bigint, options: MarketDepositOptions = {}) { + options = { ...options, resume: options.resume && [...options.resume] }; + if (this.deposits.has(jobId)) + throw new MarketError( + 'DEPOSIT_IN_PROGRESS', + 'A deposit for this job is already running on this client.' + ); + this.deposits.add(jobId); + try { + return await depositJob( + this.rt, + jobId, + options, + (id, s) => this.cardAt(id, s), + this.depositCheckpoints + ); + } finally { + this.deposits.delete(jobId); + } + } + readonly agent = { + card: async (): Promise => { + const d = deployment(this.rt); + const s = await snapshot(this.rt); + const n = await s.read(d.marketplace, ABI, 'agentCardOf', [ + this.rt.agw.signerPushAccount(), + ]); + return n ? this.cardAt(n, s) : undefined; + }, + register: async ( + card: AgentCardInput, + options: Parameters[1] + ) => this.cardWrite(undefined, card, options), + update: async ( + cardId: bigint, + card: AgentCardInput, + options: Parameters[2] + ) => this.cardWrite(cardId, card, options), + setActive: async ( + cardId: bigint, + active: boolean, + options: MarketWriteOptions = {} + ) => { + const card = await this.summaryAt(cardId, await snapshot(this.rt)); + this.assertProvider(card); + const d = deployment(this.rt); + return write( + this.rt, + { + target: d.marketplace, + value: BigInt(0), + data: encodeFunctionData({ + abi: ABI, + functionName: 'setAgentCardActive', + args: [cardId, active], + }), + }, + options.progressHook, + 'MARKET', + true + ); + }, + }; + private assertProvider(card: Pick): void { + if ( + getAddress(card.provider) !== getAddress(this.rt.agw.signerPushAccount()) + ) + throw new MarketError( + 'NOT_CARD_PROVIDER', + 'Connect the provider that registered this card.' + ); + } + private async cardWrite( + cardId: bigint | undefined, + card: AgentCardInput, + options: Parameters[1] + ) { + const d = deployment(this.rt); + card = { ...card }; + options = { ...options }; + const rules = encodeAgentCardRules(options.rules, { + chain: card.chain, + network: this.rt.agw.network, + }); + const template = encodeJobSpec(options.jobSpecTemplate); + const mutability = options.jobSpecTemplate.allowedMutability; + const s = await snapshot(this.rt); + if ( + !card.jobType || + !/^eip155:[1-9]\d*$/.test(card.chain) || + !card.metadataURI || + !/^0x[\da-f]{64}$/i.test(card.metadataHash) || + /^0x0{64}$/i.test(card.metadataHash) + ) + throw new MarketError( + 'INVALID_AGENT_CARD', + 'Supply a job type, EVM execution chain, metadata URI and nonzero metadata hash.' + ); + for (const v of [card.providerFee, card.principalMin, card.principalMax]) + if ( + typeof v !== 'bigint' || + v < BigInt(0) || + v >= BigInt(1) << BigInt(256) + ) + throw new MarketError( + 'INVALID_AGENT_CARD', + 'Card amounts must fit uint256.' + ); + if ( + card.principalMax === BigInt(0) || + card.principalMin > card.principalMax || + [ + card.minDuration, + card.maxDuration, + card.minExecuteWindow, + card.settleWindow, + ].some((n) => !Number.isInteger(n) || n < 0 || n > 0xffffffff) || + card.minDuration < 3600 || + card.minDuration > card.maxDuration || + card.settleWindow < 1 || + card.minExecuteWindow + card.settleWindow > card.maxDuration + ) + throw new MarketError( + 'INVALID_AGENT_CARD', + 'The principal or duration ranges are invalid.' + ); + if (cardId !== undefined) { + const current = await this.summaryAt(cardId, s); + this.assertProvider(current); + if (current.chain !== card.chain) + throw new MarketError( + 'CARD_IDENTITY_IMMUTABLE', + 'An existing card cannot change its execution chain.' + ); + } + if (mutability !== 'NONE') unavailable('Mutable marketplace criteria'); + const token = await s.read
( + d.kernel, + JOB_KERNEL_ABI, + 'paymentToken' + ); + if (getAddress(card.paymentToken) !== getAddress(token)) + throw new MarketError( + 'TOKEN_MISMATCH', + 'This deployment accepts only the kernel payment token.' + ); + const { chain, ...input } = card; + const jobType = /^0x[\da-f]{64}$/i.test(card.jobType) + ? (card.jobType as Hex) + : keccak256(stringToHex(card.jobType)); + const c = { + ...input, + jobType, + chainNamespace: chain, + provider: this.rt.agw.signerPushAccount(), + active: true, + }; + const data = + cardId === undefined + ? encodeFunctionData({ + abi: ABI, + functionName: 'registerAgentCard', + args: [c, rules, template], + }) + : encodeFunctionData({ + abi: ABI, + functionName: 'updateAgentCard', + args: [cardId, c, rules, template], + }); + if (this.rt.agw.reader.call) { + try { + await this.rt.agw.reader.call({ + to: d.marketplace, + data, + account: this.rt.agw.signerPushAccount(), + }); + } catch (cause) { + throw new MarketError( + 'CARD_SIMULATION_FAILED', + 'The card write failed contract simulation. No transaction was submitted.', + { contractError: stackError(cause) }, + cause + ); + } + } + const tx = await write( + this.rt, + { target: d.marketplace, value: BigInt(0), data }, + options.progressHook, + 'MARKET', + true + ); + const e = await eventArgs( + this.rt, + tx, + d.marketplace, + ABI, + cardId === undefined ? 'AgentCardRegistered' : 'AgentCardUpdated' + ); + return { + cardId: e['cardId'] as bigint, + version: cardId === undefined ? BigInt(1) : (e['version'] as bigint), + tx, + }; + } +} diff --git a/packages/core/src/lib/market/rules.ts b/packages/core/src/lib/market/rules.ts new file mode 100644 index 00000000..8f0ae939 --- /dev/null +++ b/packages/core/src/lib/market/rules.ts @@ -0,0 +1,417 @@ +import { + decodeAbiParameters, + encodeAbiParameters, + getAddress, + isAddress, + keccak256, + stringToHex, + toHex, + type Address, + type Hex, +} from 'viem'; +import type { MoveableToken } from '../constants/tokens'; +import { CHAIN, PUSH_NETWORK } from '../constants/enums'; +import { getPRC20Address } from '../universal/prc20-address'; +import { argumentLocation, encodeArgWord } from '../agentic/codec/abi-layout'; +import { parseSelector } from '../agentic/codec/selectors'; +import { validatePins } from '../agentic/codec/pins'; +import { + UNIVERSAL_TERMS_PARAM, + type AssetCapWire, + type AllowedCallWire, + type UniversalTermsWire, +} from '../agentic/codec/universal-terms'; +import type { + ArgumentPath, + WalletMarker, + Selector, +} from '../agentic/agentic.types'; +import type { PrincipalMarker } from '../job-spec/types'; +import { PRINCIPAL } from '../job-spec/constants'; +import { MarketError } from './errors'; + +export type MarketAssetToken = MoveableToken | string | { prc20: Address }; +export type MarketPin = + | { + arg: ArgumentPath; + expected: + | Hex + | Address + | bigint + | boolean + | WalletMarker + | PrincipalMarker; + max?: never; + } + | { arg: ArgumentPath; max: bigint | PrincipalMarker; expected?: never }; +export interface AgentCardRules { + assets: { + token: MarketAssetToken; + maxPerCall: bigint | PrincipalMarker; + maxTotal?: bigint | PrincipalMarker; + }[]; + principalAsset: number; + maxGasPerCall: bigint; + allowedCalls: { + target: Address; + selector: string; + pins?: MarketPin[]; + maxValue?: bigint; + }[]; +} +export interface CardRulesWire { + assets: readonly AssetCapWire[]; + principalAsset: number; + maxGasPerCall: bigint; + allowedCalls: readonly AllowedCallWire[]; +} +export const MARKER_WALLET = keccak256( + stringToHex('push.marketplace.marker.WALLET') +); +export const MARKER_PRINCIPAL = keccak256( + stringToHex('push.marketplace.marker.PRINCIPAL') +); +const PRINCIPAL_WORD = BigInt(MARKER_PRINCIPAL); +const decodedRules = new WeakMap< + AgentCardRules, + { fingerprint: string; wire: CardRulesWire } +>(); +const fingerprint = (r: AgentCardRules) => + JSON.stringify(r, (_, v) => (typeof v === 'bigint' ? v.toString() : v)); +const fields = UNIVERSAL_TERMS_PARAM.components; +export const CARD_RULES_PARAM = { + type: 'tuple', + components: [ + fields[2], + { name: 'principalAsset', type: 'uint8' }, + fields[3], + fields[4], + ], +} as const; +const bad = (message: string): never => { + throw new MarketError('INVALID_AGENT_CARD_RULES', message); +}; +function cap(n: bigint | PrincipalMarker | undefined): bigint { + const v = n === PRINCIPAL ? PRINCIPAL_WORD : n ?? BigInt(0); + if (typeof v !== 'bigint' || v < BigInt(0) || v >= BigInt(1) << BigInt(256)) + bad('Spending caps must fit uint256.'); + return v; +} +function toWire( + input: AgentCardRules, + options?: { chain?: string; network?: PUSH_NETWORK; structural?: boolean } +): CardRulesWire { + if ( + !input || + !Array.isArray(input.assets) || + !Array.isArray(input.allowedCalls) + ) + bad('Card rules need assets and allowedCalls arrays.'); + const saved = decodedRules.get(input); + if (saved?.fingerprint === fingerprint(input)) return saved.wire; + if ('approvals' in input) + bad( + 'V2 approvals belong in allowedCalls with spender and amount pins; remove the retired approvals array.' + ); + if ( + input.assets.some( + (a) => + typeof a.token === 'object' && + 'prc20' in a.token && + /^0x0{40}$/i.test(a.token.prc20) + ) + ) + bad('An explicit PRC20 reference cannot be zero.'); + const assets = input.assets.map((a) => ({ + token: + typeof a.token === 'object' && 'prc20' in a.token + ? getAddress(a.token.prc20) + : (() => { + if (options?.structural) + return getAddress( + typeof a.token === 'string' ? a.token : a.token.address + ); + if (!options?.chain) + return bad( + 'Encoding destination tokens needs the card chain, or an explicit { prc20 } reference.' + ); + try { + return getPRC20Address( + { + chain: options.chain as CHAIN, + address: + typeof a.token === 'string' ? a.token : a.token.address, + }, + { network: options.network ?? PUSH_NETWORK.TESTNET_DONUT } + ).address as Address; + } catch (cause) { + throw new MarketError( + 'TOKEN_ROUTE_UNAVAILABLE', + 'This card token has no verified Push route for the selected chain.', + { chain: options.chain, token: a.token }, + cause + ); + } + })(), + maxPerCall: cap(a.maxPerCall), + maxTotal: cap(a.maxTotal), + })); + const allowedCalls: AllowedCallWire[] = input.allowedCalls.map((call) => { + const parsed = parseSelector(call.selector as Selector); + if (parsed.valueOnly) + bad( + 'Marketplace cards support EVM function calls, not Push value-only rules.' + ); + const pins = (call.pins ?? []).map((p) => { + const location = parsed.inputs + ? argumentLocation(parsed.inputs, p.arg, 'Card pin') + : { + offset: + typeof p.arg === 'number' && Number.isInteger(p.arg) && p.arg >= 0 + ? 4 + p.arg * 32 + : bad( + 'Raw selector pins need a nonnegative integer word index.' + ), + param: { type: 'uint256' } as const, + }; + const max = 'max' in p && p.max !== undefined; + const value = 'max' in p && p.max !== undefined ? p.max : p.expected; + if (value === undefined) return bad('A card pin needs expected or max.'); + if (value === 'agentic:wallet' && max) + bad('WALLET is supported only in equality pins.'); + const encoded = + value === 'agentic:wallet' + ? MARKER_WALLET + : value === PRINCIPAL + ? MARKER_PRINCIPAL + : max + ? toHex(cap(value as bigint), { size: 32 }) + : encodeArgWord(location.param, value, 'Card pin'); + return { + offset: location.offset, + op: max ? (1 as const) : (0 as const), + value: encoded, + }; + }); + return { + target: getAddress(call.target), + selector: parsed.selector, + beneficiaryOffset: 0, + hasBeneficiary: false, + maxValue: cap(call.maxValue), + pins, + }; + }); + const wire = { + assets, + principalAsset: input.principalAsset, + maxGasPerCall: cap(input.maxGasPerCall), + allowedCalls, + }; + validateWire(wire, !!options?.structural); + return wire; +} +function validateWire(r: CardRulesWire, structural = false): void { + if (!Array.isArray(r.assets) || r.assets.length < 1 || r.assets.length > 8) + bad('Cards need 1..8 assets.'); + if ( + !Number.isInteger(r.principalAsset) || + r.principalAsset < 0 || + r.principalAsset >= r.assets.length + ) + bad('principalAsset is outside the asset list.'); + const tokens = new Set(); + r.assets.forEach((a, i) => { + if ( + !isAddress(a.token) || + (!structural && /^0x0{40}$/i.test(a.token)) || + tokens.has(a.token.toLowerCase()) + ) + bad('Assets need distinct nonzero PRC20 addresses.'); + tokens.add(a.token.toLowerCase()); + cap(a.maxPerCall); + cap(a.maxTotal); + if (i === r.principalAsset) { + if (a.maxTotal !== PRINCIPAL_WORD || a.maxPerCall === BigInt(0)) + bad( + 'The principal total must be PRINCIPAL and its per-call cap must be positive or PRINCIPAL.' + ); + } else if (a.maxPerCall === PRINCIPAL_WORD || a.maxTotal === PRINCIPAL_WORD) + bad('PRINCIPAL asset-cap markers belong only on the principal asset.'); + }); + cap(r.maxGasPerCall); + if ( + !Array.isArray(r.allowedCalls) || + r.allowedCalls.length < 1 || + r.allowedCalls.length > 32 + ) + bad('Cards need 1..32 allowed calls.'); + if (r.allowedCalls.reduce((n, c) => n + c.pins.length, 0) > 32) + bad('A card rule supports at most 32 conditions.'); + const entries = new Set(); + const pairs = new Map(); + for (const c of r.allowedCalls) { + if ( + !isAddress(c.target) || + /^0x0{40}$/i.test(c.target) || + !/^0x[\da-f]{8}$/i.test(c.selector) + ) + bad('An allowed app or selector is invalid.'); + cap(c.maxValue); + try { + validatePins(c.pins); + } catch (cause) { + throw new MarketError( + 'INVALID_AGENT_CARD_RULES', + 'An allowed call has invalid argument conditions.', + undefined, + cause + ); + } + if ( + c.hasBeneficiary && + (c.beneficiaryOffset < 4 || (c.beneficiaryOffset - 4) % 32 !== 0) + ) + bad('Invalid recipient offset.'); + for (const p of c.pins) + if (p.value === MARKER_WALLET && p.op !== 0) + bad('WALLET pins must use equality.'); + const encoded = encodeAbiParameters([{ ...fields[4], type: 'tuple' }], [c]); + if (entries.has(encoded)) bad('Duplicate allowed call.'); + entries.add(encoded); + const key = `${c.target.toLowerCase()}:${c.selector.toLowerCase()}`; + if (pairs.has(key) && (!pairs.get(key) || !c.pins.length)) + bad('An unpinned alternative would bypass the pinned call.'); + pairs.set(key, c.pins.length > 0); + const pin = (offset: number, op: number) => + c.pins.find((p) => p.offset === offset && p.op === op); + const recipient = (offset: number) => + (c.hasBeneficiary && c.beneficiaryOffset === offset) || + pin(offset, 0)?.value === MARKER_WALLET; + if (c.selector === '0x39509351') + bad('increaseAllowance is not supported in cards.'); + if (c.selector === '0x095ea7b3') { + const spender = pin(4, 0)?.value; + if ( + !spender || + BigInt(spender) === BigInt(0) || + BigInt(spender) >> BigInt(160) !== BigInt(0) + ) + bad('approve needs an EQ pin to a nonzero literal spender.'); + if (!pin(36, 1)) bad('approve needs a MAX amount pin.'); + } + if (c.selector === '0xa9059cbb' && !recipient(4)) + bad('transfer must pin its recipient to WALLET.'); + if (c.selector === '0x23b872dd' && !recipient(36)) + bad('transferFrom must pin its recipient to WALLET.'); + } +} +export function validateAgentCardRules(rules: AgentCardRules): void { + toWire(rules, { structural: true }); +} +export function encodeAgentCardRules( + rules: AgentCardRules, + options: { chain: string; network?: PUSH_NETWORK } +): Hex { + return encodeAbiParameters([CARD_RULES_PARAM], [toWire(rules, options)]); +} +export function decodeCardRulesWire(bytes: Hex): CardRulesWire { + try { + const wire = decodeAbiParameters( + [CARD_RULES_PARAM], + bytes + )[0] as unknown as CardRulesWire; + validateWire(wire); + if ( + encodeAbiParameters([CARD_RULES_PARAM], [wire]).toLowerCase() !== + bytes.toLowerCase() + ) + bad('Noncanonical card rules.'); + return wire; + } catch (cause) { + if (cause instanceof MarketError) throw cause; + throw new MarketError( + 'INVALID_AGENT_CARD_RULES', + 'Unsupported or malformed v2 card-rule encoding.', + undefined, + cause + ); + } +} +export function decodeAgentCardRules( + bytes: Hex, + _options?: { chain?: string } +): AgentCardRules { + void _options; + const r = decodeCardRulesWire(bytes); + // Explicit PRC20 references make unknown/custom registry tokens lossless and unambiguous. + const result: AgentCardRules = { + ...r, + assets: r.assets.map((a) => ({ + token: { prc20: a.token }, + maxPerCall: a.maxPerCall === PRINCIPAL_WORD ? PRINCIPAL : a.maxPerCall, + maxTotal: a.maxTotal === PRINCIPAL_WORD ? PRINCIPAL : a.maxTotal, + })), + allowedCalls: r.allowedCalls.map((c) => ({ + target: c.target, + selector: c.selector, + maxValue: c.maxValue, + pins: [ + ...c.pins.map((p) => { + const value = + p.value === MARKER_WALLET + ? ('agentic:wallet' as const) + : p.value === MARKER_PRINCIPAL + ? PRINCIPAL + : p.value; + return p.op === 1 + ? { + arg: (p.offset - 4) / 32, + max: value === PRINCIPAL ? PRINCIPAL : BigInt(p.value), + } + : { arg: (p.offset - 4) / 32, expected: value }; + }), + ...(c.hasBeneficiary + ? [ + { + arg: (c.beneficiaryOffset - 4) / 32, + expected: 'agentic:wallet' as const, + }, + ] + : []), + ], + })), + }; + decodedRules.set(result, { fingerprint: fingerprint(result), wire: r }); + return result; +} +export function fillCardRules( + r: CardRulesWire, + principal: bigint, + wallet: Address, + expiredAt: number +): UniversalTermsWire { + const walletWord = toHex(BigInt(wallet), { size: 32 }); + return { + validUntil: expiredAt, + expectedCEA: wallet, + assets: r.assets.map((a, i) => ({ + ...a, + maxPerCall: a.maxPerCall === PRINCIPAL_WORD ? principal : a.maxPerCall, + maxTotal: i === r.principalAsset ? principal : a.maxTotal, + })), + maxGasPerCall: r.maxGasPerCall, + allowedCalls: r.allowedCalls.map((c) => ({ + ...c, + pins: c.pins.map((p) => ({ + ...p, + value: + p.value === MARKER_WALLET + ? walletWord + : p.value === MARKER_PRINCIPAL + ? toHex(principal, { size: 32 }) + : p.value, + })), + })), + }; +} diff --git a/packages/core/src/lib/market/runtime.ts b/packages/core/src/lib/market/runtime.ts new file mode 100644 index 00000000..4f429dd2 --- /dev/null +++ b/packages/core/src/lib/market/runtime.ts @@ -0,0 +1,236 @@ +import { + decodeEventLog, + getAddress, + type Abi, + type Address, + type Log, + type TypedData, + type TypedDataDomain, +} from 'viem'; +import type { AgenticRuntime } from '../agentic/runtime'; +import { confirmedLogs } from '../agentic/management/common'; +import { currentGeneration } from '../agentic/deployments'; +import type { Call } from '../agentic/contracts/v6'; +import type { + ExecuteParams, + TransactionExecutionOptions, + UniversalExecuteParams, + UniversalTxResponse, +} from '../orchestrator/orchestrator.types'; +import type { ProgressEvent } from '../progress-hook/progress-hook.types'; +import { MarketError, stackError } from './errors'; +import { marketplaceDeployment, type MarketDeployment } from './deployment'; + +export type StackProgressHook = (event: ProgressEvent) => void; +export interface StackRuntime { + agw: AgenticRuntime; + account(): Address; + wallet(): Address | undefined; + send( + params: ExecuteParams | UniversalExecuteParams, + options?: TransactionExecutionOptions + ): Promise; + signTypedData(data: { + domain: TypedDataDomain; + types: TypedData; + primaryType: string; + message: Record; + }): Promise; + canSignTypedData?(): boolean; + /** Internal fixture override; never a public initialization option. */ + deployment?: MarketDeployment; + /** Receipt-confirmed creation blocks accelerate bounded event recovery. */ + jobBlocks?: Map; +} +export function deployment(rt: StackRuntime): MarketDeployment { + return rt.deployment ?? marketplaceDeployment(rt.agw.network); +} +export interface MarketSnapshot { + blockNumber: bigint; + timestamp: number; + read( + address: Address, + abi: Abi, + name: string, + args?: readonly unknown[] + ): Promise; +} +export async function snapshot( + rt: StackRuntime, + atBlock?: bigint +): Promise { + const blockNumber = atBlock ?? (await rt.agw.reader.getBlockNumber()); + const timestamp = rt.agw.reader.getBlock + ? Number((await rt.agw.reader.getBlock({ blockNumber })).timestamp) + : rt.agw.nowSeconds(); + return { + blockNumber, + timestamp, + read: async ( + address: Address, + abi: Abi, + name: string, + args: readonly unknown[] = [] + ) => { + try { + return (await rt.agw.reader.readContract({ + address, + abi, + functionName: name, + args, + blockNumber, + })) as T; + } catch (cause) { + throw new MarketError( + 'READ_FAILED', + `Could not load ${name} at block ${blockNumber}.`, + { address, functionName: name, blockNumber }, + cause + ); + } + }, + }; +} +export function progress( + rt: StackRuntime, + hook: StackProgressHook | undefined, + id: string, + message: string, + response: object = {} +): void { + rt.agw.emit( + { + id, + title: message, + message, + level: id.endsWith('199-02') ? 'ERROR' : 'INFO', + response, + timestamp: new Date().toISOString(), + }, + hook + ); +} +export async function write( + rt: StackRuntime, + call: Call, + hook: StackProgressHook | undefined, + family: 'MARKET' | 'JOB', + signer = false +): Promise { + if (rt.agw.isReadOnly) + throw new MarketError('READ_ONLY', 'Connect a signing wallet to continue.'); + progress(rt, hook, `${family}-TX-103`, 'Submitting transaction'); + try { + const tx = await (signer + ? rt.agw.execute( + { to: call.target, value: call.value, data: call.data }, + { progressHook: hook } + ) + : rt.send( + { to: call.target, value: call.value, data: call.data }, + { progressHook: hook } + )); + const originalWait = tx.wait.bind(tx); + let terminalReported = false; + const wait: typeof tx.wait = async (...args) => { + try { + const receipt = await originalWait(...args); + if (!terminalReported) { + terminalReported = true; + progress( + rt, + hook, + `${family}-TX-199-${receipt.status === 1 ? '01' : '02'}`, + receipt.status === 1 + ? 'Transaction confirmed' + : 'Transaction reverted', + { txHash: tx.hash } + ); + } + return receipt; + } catch (error) { + progress( + rt, + hook, + `${family}-TX-199-02`, + 'Transaction confirmation unavailable', + { txHash: tx.hash } + ); + throw error; + } + }; + return { ...tx, wait }; + } catch (error) { + const wrapped = stackError(error); + progress(rt, hook, `${family}-TX-199-02`, 'Transaction failed', { + error: wrapped, + }); + throw wrapped; + } +} +export async function ownerBatch( + rt: StackRuntime, + wallet: Address, + calls: Call[], + hook?: StackProgressHook +): Promise { + const gen = currentGeneration(rt.agw.network); + const s = await snapshot(rt); + const owner = getAddress( + await s.read
(wallet, gen.contracts.abis.wallet, 'owner') + ); + if (owner !== getAddress(rt.agw.signerPushAccount())) + throw new MarketError('NOT_CLIENT', 'Connect the owner of the job wallet.'); + return write( + rt, + { + target: wallet, + value: BigInt(0), + data: gen.contracts.encodeExecute(calls), + }, + hook, + 'JOB', + true + ); +} +export async function eventArgs( + rt: StackRuntime, + tx: UniversalTxResponse, + address: Address, + abi: Abi, + name: string +): Promise> { + const result = await confirmedLogs(rt.agw, tx); + const found: Record[] = []; + for (const log of result.logs as Log[]) { + if (log.address.toLowerCase() !== address.toLowerCase()) continue; + try { + const e = decodeEventLog({ + abi, + eventName: name, + data: log.data, + topics: log.topics, + strict: true, + }); + if (e.eventName === name) { + found.push(e.args as unknown as Record); + const args = e.args as unknown as Record; + if ( + (name === 'JobCreated' || name === 'JobOpened') && + typeof args['jobId'] === 'bigint' && + log.blockNumber !== null + ) + rt.jobBlocks?.set(args['jobId'], log.blockNumber); + } + } catch { + /* Other contract events are expected in a receipt. */ + } + } + if (found.length !== 1) + throw new MarketError( + 'RECEIPT_MISMATCH', + `The submitted transaction did not produce one ${name} event.`, + { txHash: tx.hash } + ); + return found[0]; +} diff --git a/packages/core/src/lib/market/types.ts b/packages/core/src/lib/market/types.ts new file mode 100644 index 00000000..a181ee4a --- /dev/null +++ b/packages/core/src/lib/market/types.ts @@ -0,0 +1,177 @@ +import type { Address, Hex } from 'viem'; +import type { AgentCardRules } from './rules'; +import type { JobSpec, JobSpecTemplate } from '../job-spec/types'; +import type { SessionWire } from '../agentic/codec/session'; +import type { StackProgressHook } from './runtime'; +import type { UniversalTxResponse } from '../orchestrator/orchestrator.types'; + +export interface AgentCardInput { + /** A name is hashed on write; reads retain the canonical bytes32 jobType. */ + jobType: string; + metadataURI: string; + metadataHash: Hex; + chain: string; + providerFee: bigint; + paymentToken: Address; + principalMin: bigint; + principalMax: bigint; + minDuration: number; + maxDuration: number; + minExecuteWindow: number; + settleWindow: number; +} +export interface AgentCard extends AgentCardInput { + cardId: bigint; + provider: Address; + active: boolean; + version: bigint; + verified: boolean; + disabled: boolean; + rating: bigint; + rules: AgentCardRules; + jobSpecTemplate: JobSpecTemplate; + /** Canonical on-chain bytes retained for exact matching and unknown token metadata. */ + rulesBytes: Hex; + jobSpecTemplateBytes: Hex; +} +export type AgentCardSummary = Omit< + AgentCard, + 'rules' | 'jobSpecTemplate' | 'rulesBytes' | 'jobSpecTemplateBytes' +>; +export interface MarketJobInputs { + principal: bigint; + expiredAt: number; + executeBy: number; + params: bigint[]; +} +export interface OwnerIntent { + owner: Address; + wallet: Address; + executor: Address; + index: bigint; + sessionHash: Hex; + mode: Hex; + execCalldataHash: Hex; + nonceKey: bigint; + nonceSeq: bigint; + grantNonce: bigint; + deadline: number; + signerChainId: bigint; +} +export interface JobPlan { + cardId: bigint; + cardVersion: bigint; + wallet: Address; + walletDeployed: boolean; + session: SessionWire; + intent: OwnerIntent; + calldata: Hex; + jobSpec: { spec: JobSpec; bytes: Hex }; + job: MarketJobInputs; + label: string; + /** Reference deposit amounts; no principal or fee is moved by openJob. */ + deposit: { + principal: { prc20: Address; amount: bigint }; + providerFee: { token: Address; amount: bigint }; + pc: bigint; + }; + preview: { + mayDo: string[]; + mayMove: string[]; + judgedBy: string[]; + until: string; + }; +} +export interface MarketPreviewOptions extends Omit { + params?: bigint[]; + walletIndex?: number; + deadline?: number; + label?: string; +} +export interface MarketWriteOptions { + progressHook?: StackProgressHook; +} +export interface MarketOpenOptions extends MarketWriteOptions { + relay?: boolean; + /** Recover a submitted opening, without signing or sending again. Rehydrate a hash with trackTransaction. */ + resume?: UniversalTxResponse; +} +export interface MarketDepositStep { + /** PRINCIPAL_AND_FEE combines requirements when both use the same token. */ + step: 'PRINCIPAL' | 'PROVIDER_FEE' | 'PRINCIPAL_AND_FEE' | 'PC'; + token?: Address; + amount: bigint; + tx: UniversalTxResponse; +} +export interface MarketDepositOptions extends MarketWriteOptions { + /** Token transfers use Push holdings by default. Origin explicitly bridges matching registered assets; PC always uses Push holdings. */ + funding?: 'push' | 'origin'; + /** Wallet PC balance to reach. Defaults to the opened card's per-call gas cap. */ + pcAmount?: bigint; + /** Wallet fee reserve to reach. Defaults to the opened card's reference fee; does not accept a kernel price. */ + providerFee?: bigint; + /** Previously submitted steps. Their waits must settle before any further transfer. */ + resume?: readonly MarketDepositStep[]; +} +export interface MarketDepositResult { + jobId: bigint; + wallet: Address; + cardId: bigint; + cardVersion: bigint; + /** Includes resumed transactions, in submission order. */ + txs: MarketDepositStep[]; + /** A broadcast that failed before returning a response. Track it before resuming. */ + pending?: Omit & { txHash: string; chain: string }; +} +export interface MarketNamespace { + cards(options?: { + provider?: Address; + chain?: string; + active?: boolean; + }): Promise<{ cards: AgentCardSummary[] }>; + card(cardId: bigint): Promise; + preview(cardId: bigint, options: MarketPreviewOptions): Promise; + openJob( + plan: JobPlan, + options?: MarketOpenOptions + ): Promise<{ + jobId: bigint; + wallet: Address; + rulesId: Hex; + tx: UniversalTxResponse; + }>; + deposit( + jobId: bigint, + options?: MarketDepositOptions + ): Promise; + job(jobId: bigint): Promise<{ + cardId: bigint; + cardVersion: bigint; + wallet: Address; + rulesId: Hex; + }>; + activeJob(wallet: Address): Promise<{ jobId: bigint }>; + agent: { + register( + card: AgentCardInput, + options: MarketWriteOptions & { + rules: AgentCardRules; + jobSpecTemplate: JobSpecTemplate; + } + ): Promise<{ cardId: bigint; version: bigint; tx: UniversalTxResponse }>; + update( + cardId: bigint, + card: AgentCardInput, + options: MarketWriteOptions & { + rules: AgentCardRules; + jobSpecTemplate: JobSpecTemplate; + } + ): Promise<{ cardId: bigint; version: bigint; tx: UniversalTxResponse }>; + setActive( + cardId: bigint, + active: boolean, + options?: MarketWriteOptions + ): Promise; + card(): Promise; + }; +} diff --git a/packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts b/packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts index 8550f9f6..19afc287 100644 --- a/packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +++ b/packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts @@ -398,3 +398,62 @@ describe('sizeR1PushGas — R1 Push-chain gas sizing', () => { expect(decision.paddedDepositUsd).toBe(__THRESHOLDS.TEN_USD_8D); }); }); + +describe('sizeOutboundGas — BNB testnet gas is valued at the Push pool rate', () => { + const pool = { + universalCore: '0x0000000000000000000000000000000000001111', + gasToken: '0x0000000000000000000000000000000000005555', + } as const; + const PC = BigInt(10) ** BigInt(18); + // The BSC gateway feed reports ETH/USD; it must not price BNB gas. + const ethFeed = BigInt(2450_0000_0000); + function poolCtx(pcIn: bigint | Error) { + const ctx = makeCtx(); + const readContract = ctx.pushClient.readContract as unknown as jest.Mock; + const base = readContract.getMockImplementation()!; + readContract.mockImplementation(async (args: { functionName: string }) => { + if (args.functionName !== 'quoteExactOutputSingle') return base(args); + if (pcIn instanceof Error) throw pcIn; + return [pcIn, BigInt(0), 0, BigInt(0)]; + }); + return ctx; + } + + it('uses the exact-output pool cost instead of the ETH feed', async () => { + mockGetPrice.mockResolvedValue(ethFeed); + // 23.65 PC at $0.10/PC = $2.365 → Case B. + const pcIn = (PC * BigInt(2365)) / BigInt(100); + const r = await sizeOutboundGas(poolCtx(pcIn), { + gasFee: BigInt('2200000000000000'), + originChain: CHAIN.ETHEREUM_SEPOLIA, + destinationChain: CHAIN.BNB_TESTNET, + pool, + }); + expect(mockGetPrice).not.toHaveBeenCalled(); + expect(r.category).toBe('B'); + expect(r.gasUsd).toBe(BigInt(236_500_000)); + expect(r.gasLegNativePc).toBe(pcIn); + }); + + it('falls back to the feed when the pool cannot be quoted', async () => { + mockGetPrice.mockResolvedValue(ethFeed); + await sizeOutboundGas(poolCtx(new Error('no pool')), { + gasFee: BigInt('2200000000000000'), + originChain: CHAIN.ETHEREUM_SEPOLIA, + destinationChain: CHAIN.BNB_TESTNET, + pool, + }); + expect(mockGetPrice).toHaveBeenCalledWith(CHAIN.ETHEREUM_SEPOLIA); + }); + + it('keeps ETH destinations on the ETH feed', async () => { + mockGetPrice.mockResolvedValue(ethFeed); + await sizeOutboundGas(poolCtx(PC), { + gasFee: BigInt('2200000000000000'), + originChain: CHAIN.ETHEREUM_SEPOLIA, + destinationChain: CHAIN.BASE_SEPOLIA, + pool, + }); + expect(mockGetPrice).toHaveBeenCalledWith(CHAIN.ETHEREUM_SEPOLIA); + }); +}); diff --git a/packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts b/packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts new file mode 100644 index 00000000..11f50cc0 --- /dev/null +++ b/packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts @@ -0,0 +1,127 @@ +import { Connection } from '@solana/web3.js'; +import bs58 from 'bs58'; +import { CHAIN } from '../../constants/enums'; +import { + waitForOutboundTx, + OutboundFailedError, + OutboundTimeoutError, +} from '../internals/outbound-sync'; +import { OutboundStatus } from '../../generated/uexecutor/v2/types'; +import type { OrchestratorContext } from '../internals/context'; +jest.mock('@solana/web3.js', () => ({ + ...jest.requireActual('@solana/web3.js'), + Connection: jest.fn(), +})); +const bytes = Buffer.alloc(64, 12), + signature = bs58.encode(bytes), + hex = '0x' + bytes.toString('hex'); +const statuses = jest.fn(), + genesis = jest.fn(); +beforeEach(() => { + statuses.mockReset(); + genesis + .mockReset() + .mockResolvedValue(CHAIN.SOLANA_DEVNET.slice(7) + 'abcdefghijk'); + (Connection as unknown as jest.Mock).mockImplementation(() => ({ + getGenesisHash: genesis, + getSignatureStatuses: statuses, + })); +}); +function context(hash: string): OrchestratorContext { + return { + printTraces: false, + pushNetwork: 'TESTNET_DONUT', + rpcUrls: { [CHAIN.SOLANA_DEVNET]: ['http://fixture'] }, + pushClient: { + getCosmosTx: jest.fn().mockResolvedValue({ events: [] }), + getUniversalTxByIdV2: jest + .fn() + .mockResolvedValue({ + universalTx: { + universalStatus: 6, + pcTx: [], + outboundTx: [ + { + destinationChain: CHAIN.SOLANA_DEVNET, + outboundStatus: OutboundStatus.PENDING, + recipient: 'fixture', + amount: '0', + externalAssetAddr: '', + observedTx: { txHash: hash }, + }, + ], + }, + }), + }, + } as unknown as OrchestratorContext; +} +const opts = { initialWaitMs: 0, pollingIntervalMs: 1, timeout: 100 }; +it.each([signature, hex])( + 'confirms pending Cosmos signature %s through Solana RPC', + async (hash) => { + statuses.mockResolvedValue({ + value: [{ confirmationStatus: 'confirmed', err: null }], + }); + const out = await waitForOutboundTx(context(hash), '0xpush', opts); + expect(out.externalTxHash).toBe(hash); + expect(statuses).toHaveBeenCalledWith([signature], { + searchTransactionHistory: true, + }); + } +); +it('waits through processed status before finalization', async () => { + statuses + .mockResolvedValueOnce({ + value: [{ confirmationStatus: 'processed', err: null }], + }) + .mockResolvedValue({ + value: [{ confirmationStatus: 'finalized', err: null }], + }); + await waitForOutboundTx(context(signature), '0xpush', opts); + expect(statuses).toHaveBeenCalledTimes(2); +}); +it('reports a confirmed signature error as failure, preserving the hash', async () => { + statuses.mockResolvedValue({ + value: [ + { + confirmationStatus: 'confirmed', + err: { InstructionError: [0, 'Custom'] }, + }, + ], + }); + await expect( + waitForOutboundTx(context(hex), '0xpush', opts) + ).rejects.toMatchObject({ code: 'OUTBOUND_FAILED', externalTxHash: hex }); +}); +it.each([ + 'wrong-cluster', + 'missing', + 'processed-error', + 'rpc-error', + 'malformed-hash', +])('keeps %s pending until timeout', async (kind) => { + statuses.mockResolvedValue({ value: [null] }); + if (kind === 'wrong-cluster') genesis.mockResolvedValue('wrong'); + if (kind === 'processed-error') + statuses.mockResolvedValue({ + value: [{ confirmationStatus: 'processed', err: { failure: true } }], + }); + if (kind === 'rpc-error') + statuses.mockRejectedValue(new Error('RPC unavailable')); + const hash = kind === 'malformed-hash' ? '0x1234' : signature; + await expect( + waitForOutboundTx(context(hash), '0xpush', { ...opts, timeout: 20 }) + ).rejects.toBeInstanceOf(OutboundTimeoutError); + if (kind === 'wrong-cluster' || kind === 'malformed-hash') + expect(statuses).not.toHaveBeenCalled(); +}); +it('keeps an authoritative Cosmos revert ahead of the RPC tiebreaker', async () => { + const ctx = context(signature); + (ctx.pushClient.getUniversalTxByIdV2 as jest.Mock).mockResolvedValue({ + universalTx: { universalStatus: 8, pcTx: [], outboundTx: [] }, + }); + await expect(waitForOutboundTx(ctx, '0xpush', opts)).rejects.toBeInstanceOf( + OutboundFailedError + ); + expect(statuses).not.toHaveBeenCalled(); +}); diff --git a/packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts b/packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts index 626912dc..10f6d4e4 100644 --- a/packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +++ b/packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts @@ -1,5 +1,6 @@ import { CHAIN, PUSH_NETWORK } from '../../constants/enums'; import { construct, toUniversal } from '../../universal/signer/signer'; +import { AtomicBatchUnavailableError } from '../internals/errors'; import { EIP7702NotSupportedError } from '../../vm-client/evm-client'; import type { OrchestratorContext } from '../internals/context'; import { sendPushTx } from '../internals/push-chain-tx'; @@ -51,6 +52,7 @@ function makeContext(signer: OrchestratorContext['universalSigner']) { getTransactionCount: jest.fn().mockResolvedValue(41), waitForTransactionReceipt, call: jest.fn(), + getCode: jest.fn().mockResolvedValue('0x6000'), }, }; @@ -260,3 +262,60 @@ describe('sendPushTx native multicall routing', () => { expect(transformFn).not.toHaveBeenCalled(); }); }); + + +describe('atomic-only native batches (AGW sender-preserving arrays)', () => { + async function context(supportsAuthorization = true) { + const signer = await toUniversal(construct( + { chain: CHAIN.PUSH_TESTNET_DONUT, address: '0x3333333333333333333333333333333333333333' }, + { signMessage: async (data) => data, signAndSendTransaction: async (data) => data, + ...(supportsAuthorization ? { signAuthorization: jest.fn() } : {}) } + )); + return makeContext(signer); + } + + it('rejects missing signer capability without sending any sequential call', async () => { + const { ctx, pushClient } = await context(false); + await expect(sendPushTx(ctx, execute, [], transformFn, true)).rejects.toBeInstanceOf(AtomicBatchUnavailableError); + expect(pushClient.sendTransaction).not.toHaveBeenCalled(); + expect(pushClient.sendBatch7702).not.toHaveBeenCalled(); + }); + + it('refuses a missing executor before authorization or broadcast', async () => { + const { ctx, pushClient } = await context(); + pushClient.publicClient.getCode.mockResolvedValue('0x'); + await expect(sendPushTx(ctx, execute, [], transformFn, true)).rejects.toBeInstanceOf(AtomicBatchUnavailableError); + expect(pushClient.sendTransaction).not.toHaveBeenCalled(); + expect(pushClient.sendBatch7702).not.toHaveBeenCalled(); + }); + + it('does not fall back when authorization is exposed but unsupported at runtime', async () => { + const { ctx, pushClient } = await context(); + pushClient.sendBatch7702.mockRejectedValueOnce(new EIP7702NotSupportedError()); + await expect(sendPushTx(ctx, execute, [], transformFn, true)).rejects.toBeInstanceOf(AtomicBatchUnavailableError); + expect(pushClient.sendTransaction).not.toHaveBeenCalled(); + expect(pushClient.sendBatch7702).toHaveBeenCalledTimes(1); + }); + + it('uses the atomic transport when signer and executor are available', async () => { + const { ctx, pushClient } = await context(); + await sendPushTx(ctx, execute, [], transformFn, true); + expect(pushClient.sendBatch7702).toHaveBeenCalledTimes(1); + expect(pushClient.sendTransaction).not.toHaveBeenCalled(); + }); + it.each([false, true])('retains a broadcast hash when confirmation fails (atomic=%s)', async atomic => { + const { ctx, pushClient } = await context(); + const cause = new Error('Receipt RPC unavailable'); + pushClient.publicClient.waitForTransactionReceipt.mockRejectedValueOnce(cause); + const error = await sendPushTx(ctx, atomic ? execute : directExecute, [], transformFn, atomic).catch(e => e); + expect(error).toMatchObject({ txHash: atomic ? HASH_2 : HASH_1, pendingTransactionHash: atomic ? HASH_2 : HASH_1, cause }); + expect(pushClient.sendBatch7702).toHaveBeenCalledTimes(atomic ? 1 : 0); + expect(pushClient.sendTransaction).toHaveBeenCalledTimes(atomic ? 0 : 1); + }); + it('cannot fall back after a native atomic broadcast, even if later code throws an unsupported-signing error', async () => { + const { ctx, pushClient } = await context(); + pushClient.publicClient.waitForTransactionReceipt.mockRejectedValueOnce(new EIP7702NotSupportedError()); + await expect(sendPushTx(ctx, execute, [], transformFn)).rejects.toMatchObject({ txHash: HASH_2, pendingTransactionHash: HASH_2 }); + expect(pushClient.sendTransaction).not.toHaveBeenCalled(); + }); +}); diff --git a/packages/core/src/lib/orchestrator/internals/errors.ts b/packages/core/src/lib/orchestrator/internals/errors.ts index 58f3ec78..9137b28c 100644 --- a/packages/core/src/lib/orchestrator/internals/errors.ts +++ b/packages/core/src/lib/orchestrator/internals/errors.ts @@ -31,8 +31,10 @@ export interface DecodedErrorPayload { * discriminator lets callers classify via `instanceof PushChainExecutionError` * instead of sniffing error messages. * - * Carries the origin-chain gateway tx hash. There is no successful Push Chain - * tx to reference on this path — by definition the pcTx committed `FAILED`. + * A failed universal execution can carry its origin-chain gateway hash. Native + * confirmation/indexing errors retain the submitted Push hash instead; those + * errors do not prove that the transaction reverted. Track a retained hash + * before retrying an operation with side effects. * * `decodedError`: optional structured payload that flows through to terminal * failure hook payloads (199-02 / 299-02 / 399-02 / 999-02). Set by the @@ -42,22 +44,38 @@ export interface DecodedErrorPayload { export class PushChainExecutionError extends Error { readonly code = 'PUSH_CHAIN_EXECUTION_FAILED' as const; readonly gatewayTxHash?: string; + /** Native Push transaction already broadcast before confirmation/indexing failed. */ + readonly txHash?: `0x${string}`; + readonly pendingTransactionHash?: `0x${string}`; readonly decodedError?: DecodedErrorPayload; + /** Underlying transport/RPC error, kept so raw revert data is not lost. */ + override readonly cause?: unknown; constructor( message: string, - opts: { gatewayTxHash?: string; decodedError?: DecodedErrorPayload } = {} + opts: { gatewayTxHash?: string; txHash?: `0x${string}`; pendingTransactionHash?: `0x${string}`; decodedError?: DecodedErrorPayload; cause?: unknown } = {} ) { super(normalizePublicErrorMessage(message)); this.name = 'PushChainExecutionError'; this.gatewayTxHash = opts.gatewayTxHash; + this.txHash = opts.txHash; + this.pendingTransactionHash = opts.pendingTransactionHash; this.decodedError = opts.decodedError; + if (opts.cause !== undefined) this.cause = opts.cause; + } +} + +/** @internal A caller required an atomic native batch; sequential fallback is forbidden. */ +export class AtomicBatchUnavailableError extends PushChainExecutionError { + constructor(message: string, cause?: unknown) { + super(message, { cause }); + this.name = 'AtomicBatchUnavailableError'; } } /** Recovery metadata for a non-atomic Push batch. A pending hash is broadcast but unconfirmed. */ export class PushChainBatchExecutionError extends PushChainExecutionError { readonly transactionHashes: `0x${string}`[]; - readonly pendingTransactionHash?: `0x${string}`; + override readonly pendingTransactionHash?: `0x${string}`; constructor(message: string, transactionHashes: `0x${string}`[], pendingTransactionHash?: `0x${string}`) { super(message); diff --git a/packages/core/src/lib/orchestrator/internals/execute-standard.ts b/packages/core/src/lib/orchestrator/internals/execute-standard.ts index a0d0a026..9195afcf 100644 --- a/packages/core/src/lib/orchestrator/internals/execute-standard.ts +++ b/packages/core/src/lib/orchestrator/internals/execute-standard.ts @@ -136,7 +136,8 @@ export async function executeStandardPayload( ctx: OrchestratorContext, execute: ExecuteParams, eventBuffer: ProgressEvent[], - getResponseCallbacks: () => ResponseBuilderCallbacks + getResponseCallbacks: () => ResponseBuilderCallbacks, + policy?: { requireAtomicBatch: boolean } ): Promise { const transformFn = (tx: TxResponse, buf: ProgressEvent[] = []) => transformToUniversalTxResponse(ctx, tx, buf, getResponseCallbacks()); @@ -169,7 +170,7 @@ export async function executeStandardPayload( fireProgressHook(ctx, PROGRESS_HOOK.SEND_TX_107); let tx: UniversalTxResponse; try { - tx = await sendPushTx(ctx, execute, eventBuffer, transformFn); + tx = await sendPushTx(ctx, execute, eventBuffer, transformFn, policy?.requireAtomicBatch); } catch (err) { // Push Chain broadcast failed. Wallet rejection surfaces as 104-04; // everything else (RPC fail, on-chain revert) as 199-02. @@ -184,7 +185,7 @@ export async function executeStandardPayload( // outer orchestrator catch doesn't emit a second 199-02 on top. ctx._routeTerminalEmitted = true; if (!isUserDecline && !(err instanceof PushChainExecutionError)) { - throw new PushChainExecutionError(errMsg); + throw new PushChainExecutionError(errMsg, { cause: err }); } throw err; } diff --git a/packages/core/src/lib/orchestrator/internals/gas-calculator.ts b/packages/core/src/lib/orchestrator/internals/gas-calculator.ts index 3d1abbba..8d36c31d 100644 --- a/packages/core/src/lib/orchestrator/internals/gas-calculator.ts +++ b/packages/core/src/lib/orchestrator/internals/gas-calculator.ts @@ -28,6 +28,10 @@ import { SvmClient } from '../../vm-client/svm-client'; import type { OrchestratorContext } from './context'; import { printLog, fireProgressHook } from './context'; import { getUniversalGatewayPCAddress, getPushChainForNetwork } from './helpers'; +import { + UNISWAP_V3_QUOTER_EXACT_OUTPUT_ABI, + UNIVERSAL_CORE_SWAP_HELPERS_ABI, +} from './gas-pool-quote'; import { sizeOutboundGas, type GasSizingDecision, @@ -74,38 +78,6 @@ const UNISWAP_V3_FACTORY_ABI = [ }, ]; -const UNISWAP_V3_QUOTER_EXACT_OUTPUT_ABI = [ - { - type: 'function' as const, - name: 'quoteExactOutputSingle', - inputs: [ - { - type: 'tuple', - components: [ - { name: 'tokenIn', type: 'address' }, - { name: 'tokenOut', type: 'address' }, - { name: 'amount', type: 'uint256' }, - { name: 'fee', type: 'uint24' }, - { name: 'sqrtPriceLimitX96', type: 'uint160' }, - ], - }, - ], - outputs: [ - { name: 'amountIn', type: 'uint256' }, - { name: 'sqrtPriceX96After', type: 'uint160' }, - { name: 'initializedTicksCrossed', type: 'uint32' }, - { name: 'gasEstimate', type: 'uint256' }, - ], - stateMutability: 'view', - }, -]; - -const UNIVERSAL_CORE_SWAP_HELPERS_ABI = [ - { type: 'function' as const, name: 'WPC', inputs: [], outputs: [{ name: '', type: 'address', internalType: 'address' }], stateMutability: 'view' }, - { type: 'function' as const, name: 'uniswapV3Factory', inputs: [], outputs: [{ name: '', type: 'address', internalType: 'address' }], stateMutability: 'view' }, - { type: 'function' as const, name: 'defaultFeeTier', inputs: [{ name: '', type: 'address', internalType: 'address' }], outputs: [{ name: '', type: 'uint24', internalType: 'uint24' }], stateMutability: 'view' }, -]; - const ZERO_ADDR = '0x0000000000000000000000000000000000000000'; // ============================================================================ @@ -246,6 +218,7 @@ export async function queryOutboundGasFee( gasFee, originChain: ctx.universalSigner.account.chain, destinationChain, + pool: { universalCore: universalCoreAddress, gasToken }, }); // All categories — A, B, and C — return the sizer's calibrated gas leg. // R3 consumers additionally bump `nativeValueForGas` by `overflowNativePc` @@ -529,6 +502,7 @@ export async function queryRescueGasFee( gasFee, originChain: ctx.universalSigner.account.chain, destinationChain, + pool: { universalCore: universalCoreAddress, gasToken }, }); nativeValueForGas = sizing.gasLegNativePc; printLog( diff --git a/packages/core/src/lib/orchestrator/internals/gas-pool-quote.ts b/packages/core/src/lib/orchestrator/internals/gas-pool-quote.ts new file mode 100644 index 00000000..7ea320fb --- /dev/null +++ b/packages/core/src/lib/orchestrator/internals/gas-pool-quote.ts @@ -0,0 +1,114 @@ +/** + * Live Push-pool cost of an outbound gas fee. The gateway's swapAndBurnGas + * buys exactly `gasFee` of the gas token from the WPC pool (exact output), so + * this quote is what the swap will actually need at the current pool state. + */ +import { CHAIN_INFO } from '../../constants/chain'; +import type { OrchestratorContext } from './context'; +import { printLog } from './context'; +import { getPushChainForNetwork } from './helpers'; + +export const UNISWAP_V3_QUOTER_EXACT_OUTPUT_ABI = [ + { + type: 'function' as const, + name: 'quoteExactOutputSingle', + inputs: [ + { + type: 'tuple', + components: [ + { name: 'tokenIn', type: 'address' }, + { name: 'tokenOut', type: 'address' }, + { name: 'amount', type: 'uint256' }, + { name: 'fee', type: 'uint24' }, + { name: 'sqrtPriceLimitX96', type: 'uint160' }, + ], + }, + ], + outputs: [ + { name: 'amountIn', type: 'uint256' }, + { name: 'sqrtPriceX96After', type: 'uint160' }, + { name: 'initializedTicksCrossed', type: 'uint32' }, + { name: 'gasEstimate', type: 'uint256' }, + ], + stateMutability: 'view', + }, +]; + +export const UNIVERSAL_CORE_SWAP_HELPERS_ABI = [ + { + type: 'function' as const, + name: 'WPC', + inputs: [], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view', + }, + { + type: 'function' as const, + name: 'uniswapV3Factory', + inputs: [], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view', + }, + { + type: 'function' as const, + name: 'defaultFeeTier', + inputs: [{ name: '', type: 'address', internalType: 'address' }], + outputs: [{ name: '', type: 'uint24', internalType: 'uint24' }], + stateMutability: 'view', + }, +]; + +/** Exact PC (WPC wei) the gas swap needs now; undefined when it cannot be quoted. */ +export async function quoteGasPoolCost( + ctx: OrchestratorContext, + universalCore: `0x${string}`, + gasToken: `0x${string}`, + gasFee: bigint +): Promise { + if (gasFee <= BigInt(0)) return undefined; + const quoter = + CHAIN_INFO[getPushChainForNetwork(ctx.pushNetwork)]?.dex?.uniV3QuoterV2; + if (!quoter || quoter.startsWith('0xTBD')) return undefined; + try { + const [wpc, fee] = await Promise.all([ + ctx.pushClient.readContract<`0x${string}`>({ + address: universalCore, + abi: UNIVERSAL_CORE_SWAP_HELPERS_ABI, + functionName: 'WPC', + args: [], + }), + ctx.pushClient.readContract({ + address: universalCore, + abi: UNIVERSAL_CORE_SWAP_HELPERS_ABI, + functionName: 'defaultFeeTier', + args: [gasToken], + }), + ]); + if (!fee) return undefined; + const quote = await ctx.pushClient.readContract< + [bigint, bigint, number, bigint] + >({ + address: quoter as `0x${string}`, + abi: UNISWAP_V3_QUOTER_EXACT_OUTPUT_ABI, + functionName: 'quoteExactOutputSingle', + args: [ + { + tokenIn: wpc, + tokenOut: gasToken, + amount: gasFee, + fee, + sqrtPriceLimitX96: BigInt(0), + }, + ], + }); + return quote[0]; + } catch (err) { + printLog( + ctx, + `quoteGasPoolCost — unavailable (${ + err instanceof Error ? err.message : String(err) + })` + ); + return undefined; + } +} diff --git a/packages/core/src/lib/orchestrator/internals/gas-usd-sizer.ts b/packages/core/src/lib/orchestrator/internals/gas-usd-sizer.ts index e033b615..e14df555 100644 --- a/packages/core/src/lib/orchestrator/internals/gas-usd-sizer.ts +++ b/packages/core/src/lib/orchestrator/internals/gas-usd-sizer.ts @@ -16,7 +16,8 @@ import { CHAIN_INFO } from '../../constants/chain'; import { PriceFetch } from '../../price-fetch/price-fetch'; import type { OrchestratorContext } from './context'; import { printLog } from './context'; -import { getPcUsdPrice, usdToPc } from './pc-usd-oracle'; +import { getPcUsdPrice, pcToUsd, usdToPc } from './pc-usd-oracle'; +import { quoteGasPoolCost } from './gas-pool-quote'; // ============================================================================ // Thresholds (USD, 8 decimals) @@ -25,6 +26,11 @@ import { getPcUsdPrice, usdToPc } from './pc-usd-oracle'; const ONE_USD_8D = parseUnits('1', 8); // 100_000_000 const TEN_USD_8D = parseUnits('10', 8); // 1_000_000_000 +/** EVM destinations whose gas token is not ETH. No USD feed exists for them + * (the BSC gateway's feed is ETH/USD), so their gas is valued at the Push pool + * rate the gateway's swap actually pays. */ +const POOL_VALUED_GAS_CHAINS: ReadonlySet = new Set([CHAIN.BNB_TESTNET]); + // ============================================================================ // Types // ============================================================================ @@ -41,6 +47,8 @@ export interface GasSizingInput { * Used to price gasFee in USD via PriceFetch (Chainlink ETH/USD, Pyth SOL/USD). */ destinationChain: CHAIN; + /** UniversalCore and gas token, for pool-valued destinations. */ + pool?: { universalCore: `0x${string}`; gasToken: `0x${string}` }; } export interface GasSizingDecision { @@ -63,7 +71,7 @@ export async function sizeOutboundGas( ctx: OrchestratorContext, input: GasSizingInput ): Promise { - const { gasFee, originChain, destinationChain } = input; + const { gasFee, originChain, destinationChain, pool } = input; // 1) Price gasFee in USD (8 decimals). gasFee is denominated in the // destination native (pETH = ETH value, pSOL = SOL value). The price @@ -75,27 +83,41 @@ export async function sizeOutboundGas( destVm === VM.SVM ? CHAIN.SOLANA_DEVNET : CHAIN.ETHEREUM_SEPOLIA; const destDecimals = destVm === VM.SVM ? 9 : 18; - let destUsdPrice: bigint; - try { - destUsdPrice = await new PriceFetch(ctx.rpcUrls).getPrice(priceSourceChain); - } catch (err) { + const poolPcIn = + pool && POOL_VALUED_GAS_CHAINS.has(destinationChain) + ? await quoteGasPoolCost(ctx, pool.universalCore, pool.gasToken, gasFee) + : undefined; + let gasUsd: bigint; + if (poolPcIn !== undefined) { + gasUsd = await pcToUsd(ctx, poolPcIn, originChain); printLog( ctx, - `sizeOutboundGas — PriceFetch.getPrice failed (${err instanceof Error ? err.message : String(err)}); treating as Case B passthrough` + `sizeOutboundGas — gasFee=${gasFee.toString()} valued at the Push pool: ` + + `pcIn=${poolPcIn.toString()}, gasUsd=${gasUsd.toString()} (1e8)` ); - // Degrade gracefully: assume the raw gasFee is already a sane size and - // convert 1:1 to native PC. Callers keep their existing fallback logic. - return passthroughAsCaseB(ctx, gasFee, originChain); - } + } else { + let destUsdPrice: bigint; + try { + destUsdPrice = await new PriceFetch(ctx.rpcUrls).getPrice(priceSourceChain); + } catch (err) { + printLog( + ctx, + `sizeOutboundGas — PriceFetch.getPrice failed (${err instanceof Error ? err.message : String(err)}); treating as Case B passthrough` + ); + // Degrade gracefully: assume the raw gasFee is already a sane size and + // convert 1:1 to native PC. Callers keep their existing fallback logic. + return passthroughAsCaseB(ctx, gasFee, originChain); + } - const oneDestNativeUnit = parseUnits('1', destDecimals); - const gasUsd = (gasFee * destUsdPrice) / oneDestNativeUnit; + const oneDestNativeUnit = parseUnits('1', destDecimals); + gasUsd = (gasFee * destUsdPrice) / oneDestNativeUnit; - printLog( - ctx, - `sizeOutboundGas — gasFee=${gasFee.toString()} ${destVm === VM.SVM ? 'pSOL' : 'pETH'} (${destDecimals}d), ` + - `destUsdPrice=${destUsdPrice.toString()} (1e8), gasUsd=${gasUsd.toString()} (1e8)` - ); + printLog( + ctx, + `sizeOutboundGas — gasFee=${gasFee.toString()} ${destVm === VM.SVM ? 'pSOL' : 'gas token'} (${destDecimals}d), ` + + `destUsdPrice=${destUsdPrice.toString()} (1e8), gasUsd=${gasUsd.toString()} (1e8)` + ); + } // 2) Categorize and compute target USD for each leg. let category: GasSizingCategory; diff --git a/packages/core/src/lib/orchestrator/internals/outbound-sync.ts b/packages/core/src/lib/orchestrator/internals/outbound-sync.ts index 56089d9b..f9cb9831 100644 --- a/packages/core/src/lib/orchestrator/internals/outbound-sync.ts +++ b/packages/core/src/lib/orchestrator/internals/outbound-sync.ts @@ -7,6 +7,8 @@ import { resolvePC20WrapperForReceipt } from './pc20/tracking'; import { createPublicClient, fallback, http } from 'viem'; +import { Connection } from '@solana/web3.js'; +import bs58 from 'bs58'; import { CHAIN_INFO, VM_NAMESPACE } from '../../constants/chain'; import { CHAIN, VM } from '../../constants/enums'; import { UniversalTxStatus } from '../../generated/uexecutor/v1/types'; @@ -113,15 +115,15 @@ export class OutboundFailedError extends Error { * (preserves the silent-success bug fix); if no receipt yet or RPC failure, * we keep polling. * - * EVM-only — SVM tiebreaker would need a separate signature lookup path. + * EVM receipts and confirmed/finalized Solana signatures are supported. */ -async function verifyExternalEvmReceipt( +async function verifyExternalReceipt( ctx: OrchestratorContext, destinationChain: CHAIN, externalTxHash: string ): Promise<'success' | 'reverted' | 'pending' | 'unsupported'> { const chainInfo = CHAIN_INFO[destinationChain]; - if (!chainInfo || chainInfo.vm !== VM.EVM) { + if (!chainInfo || (chainInfo.vm !== VM.EVM && chainInfo.vm !== VM.SVM)) { return 'unsupported'; } // Guard against unit-test contexts that don't pass a real rpcUrls map — @@ -133,6 +135,52 @@ async function verifyExternalEvmReceipt( : chainInfo.defaultRPC; if (!rpcUrls?.length) return 'unsupported'; + if (chainInfo.vm === VM.SVM) { + let signature: string; + try { + const bytes = externalTxHash.startsWith('0x') + ? /^0x[0-9a-fA-F]{128}$/.test(externalTxHash) + ? Buffer.from(externalTxHash.slice(2), 'hex') + : new Uint8Array() + : bs58.decode(externalTxHash); + if (bytes.length !== 64) return 'pending'; + signature = bs58.encode(bytes); + } catch { + return 'pending'; + } + for (const url of rpcUrls) { + try { + const connection = new Connection(url, 'confirmed'); + if ( + `solana:${(await connection.getGenesisHash()).slice(0, 32)}` !== + destinationChain + ) + continue; + const result = await connection.getSignatureStatuses([signature], { + searchTransactionHistory: true, + }); + const status = result.value[0]; + // A processed vote can still disappear. Never report success/failure + // before the signature is confirmed or finalized on the right cluster. + if ( + !status || + (status.confirmationStatus !== 'confirmed' && + status.confirmationStatus !== 'finalized') + ) + return 'pending'; + return status.err ? 'reverted' : 'success'; + } catch (error) { + printLog( + ctx, + `[verifyExternalReceipt] SVM RPC unavailable: ${ + error instanceof Error ? error.name : 'unknown' + }` + ); + } + } + return 'pending'; + } + try { const client = createPublicClient({ transport: fallback(rpcUrls.map((url) => http(url))), @@ -153,7 +201,7 @@ async function verifyExternalEvmReceipt( } printLog( ctx, - `[verifyExternalEvmReceipt] RPC error for ${destinationChain} tx ${externalTxHash}: ${msg}` + `[verifyExternalReceipt] RPC error for ${destinationChain} tx ${externalTxHash}: ${msg}` ); return 'pending'; } @@ -397,7 +445,7 @@ export async function waitForOutboundTx( ob.outboundStatus === OutboundStatus.OBSERVED; if (!isCosmosObserved) { // Tiebreaker: ask the destination-chain RPC directly. - const verdict = await verifyExternalEvmReceipt( + const verdict = await verifyExternalReceipt( ctx, chain, ob.observedTx.txHash @@ -468,11 +516,10 @@ export async function waitForOutboundTx( // created, and a repeat export deploys no wrapper so nothing is // ever observed to backfill it. Resolve from UniversalCore instead, // keyed by the Push-native source token. - const pc20Wrapper = await resolvePC20WrapperForReceipt( - ctx, - ob, - { network: ctx.pushNetwork, rpcUrls: ctx.rpcUrls } - ); + const pc20Wrapper = await resolvePC20WrapperForReceipt(ctx, ob, { + network: ctx.pushNetwork, + rpcUrls: ctx.rpcUrls, + }); const details: OutboundTxDetails = { externalTxHash: ob.observedTx.txHash, destinationChain: chain, @@ -738,7 +785,7 @@ export async function waitForAllOutboundTxsV2( const isCosmosObserved = ob.outboundStatus === OutboundStatus.OBSERVED; if (!isCosmosObserved) { - const verdict = await verifyExternalEvmReceipt( + const verdict = await verifyExternalReceipt( ctx, chain, externalTxHash diff --git a/packages/core/src/lib/orchestrator/internals/push-chain-tx.ts b/packages/core/src/lib/orchestrator/internals/push-chain-tx.ts index 551ae237..b8f7bc6e 100644 --- a/packages/core/src/lib/orchestrator/internals/push-chain-tx.ts +++ b/packages/core/src/lib/orchestrator/internals/push-chain-tx.ts @@ -30,7 +30,7 @@ import type { import type { OrchestratorContext } from './context'; import { fireProgressHook, printLog } from './context'; import { decodeRevert, formatDecodedRevertForUser } from './error-decoder'; -import { PushChainExecutionError, PushChainBatchExecutionError } from './errors'; +import { PushChainExecutionError, PushChainBatchExecutionError, AtomicBatchUnavailableError } from './errors'; import { normalizePublicErrorMessage } from '../../formatters'; // ============================================================================ @@ -76,7 +76,7 @@ async function getIndexedPushTransaction( receiptWaited = true; if (receipt.status === 'reverted') { throw new PushChainExecutionError( - `${label} — Push Chain transaction ${txHash} reverted` + `${label} — Push Chain transaction ${txHash} reverted`, { txHash } ); } } @@ -115,7 +115,8 @@ export async function sendPushTx( ctx: OrchestratorContext, execute: ExecuteParams, eventBuffer: ProgressEvent[], - transformFn: TransformToResponseFn + transformFn: TransformToResponseFn, + requireAtomicBatch = false ): Promise { if (Array.isArray(execute.data)) { const calls = execute.data as MultiCall[]; @@ -138,7 +139,17 @@ export async function sendPushTx( const executor = getBatchExecutorAddress( ctx.universalSigner.account.chain ); + if (requireAtomicBatch) { + if (!executor || !ctx.universalSigner.signAuthorization) { + throw new AtomicBatchUnavailableError('This operation requires a sender-preserving atomic batch; the signer/network does not support EIP-7702.'); + } + const code = await ctx.pushClient.publicClient.getCode({ address: executor }); + if (!code || code === '0x') { + throw new AtomicBatchUnavailableError(`Atomic batch executor ${executor} is not deployed on the connected network.`); + } + } if (executor && ctx.universalSigner.signAuthorization) { + let submittedHash: `0x${string}` | undefined; try { printLog( ctx, @@ -149,6 +160,7 @@ export async function sendPushTx( calls, signer: ctx.universalSigner, }); + submittedHash = txHash; const txResponse = await getIndexedPushTransaction( ctx, txHash, @@ -156,11 +168,18 @@ export async function sendPushTx( ); return await transformFn(txResponse, eventBuffer); } catch (err) { + if (submittedHash) { + if (err instanceof PushChainExecutionError && err.txHash === submittedHash) throw err; + throw new PushChainExecutionError(normalizePublicErrorMessage(err), { txHash: submittedHash, pendingTransactionHash: submittedHash, cause: err }); + } // Only fall back when the wallet genuinely can't sign a 7702 // authorization. This is raised before any broadcast, so falling back // to sequential execution cannot double-execute. Any other error // (e.g. a real revert) must surface. if (!(err instanceof EIP7702NotSupportedError)) throw err; + if (requireAtomicBatch) { + throw new AtomicBatchUnavailableError('The signer could not authorize EIP-7702; no sequential transactions were sent.', err); + } printLog( ctx, `sendPushTx — wallet cannot sign EIP-7702 authorization; falling back to sequential execution` @@ -300,12 +319,17 @@ export async function sendPushTx( value: execute.value, signer: ctx.universalSigner, }); + try { const txResponse = await getIndexedPushTransaction( ctx, txHash, 'sendPushTx' ); return await transformFn(txResponse, eventBuffer); + } catch (cause) { + if (cause instanceof PushChainExecutionError && cause.txHash === txHash) throw cause; + throw new PushChainExecutionError(normalizePublicErrorMessage(cause), { txHash, pendingTransactionHash: txHash, cause }); + } } // ============================================================================ diff --git a/packages/core/src/lib/orchestrator/internals/svm-rent.ts b/packages/core/src/lib/orchestrator/internals/svm-rent.ts index 68515e3a..711b1efd 100644 --- a/packages/core/src/lib/orchestrator/internals/svm-rent.ts +++ b/packages/core/src/lib/orchestrator/internals/svm-rent.ts @@ -199,6 +199,7 @@ export async function ensureSvmFinalizeGasBudgetQuote({ pathTag, pc20, requoteFn, + onMinimum, }: { ctx: OrchestratorContext; ueaAddress: `0x${string}`; @@ -216,6 +217,8 @@ export async function ensureSvmFinalizeGasBudgetQuote({ * PC20 token, which has no PRC20 config. */ requoteFn?: (gasLimit: bigint) => Promise; + /** Receives the finalize minimum, so strict callers can refuse a short quote. */ + onMinimum?: (minGasFee: bigint) => void; }): Promise { const minGasFee = await getSvmFinalizeGasBudget({ ctx, @@ -225,6 +228,7 @@ export async function ensureSvmFinalizeGasBudgetQuote({ burnAmount, pc20, }); + onMinimum?.(minGasFee); if (quote.gasFee >= minGasFee) { const resolvedQuote = resolveSvmGasLimitUsed(quote); diff --git a/packages/core/src/lib/orchestrator/orchestrator.ts b/packages/core/src/lib/orchestrator/orchestrator.ts index 0943e429..f6084c31 100644 --- a/packages/core/src/lib/orchestrator/orchestrator.ts +++ b/packages/core/src/lib/orchestrator/orchestrator.ts @@ -247,6 +247,25 @@ export class Orchestrator { async execute( params: ExecuteParams | UniversalExecuteParams, options?: TransactionExecutionOptions + ): Promise { + return this.executeWithPolicy(params, options, false); + } + + /** @internal Sender-preserving batch. Never uses the native sequential fallback. */ + async executeAtomicBatch( + params: ExecuteParams, + options?: TransactionExecutionOptions + ): Promise { + if (typeof params.to !== 'string' || !Array.isArray(params.data) || params.data.length < 2 || params.funds) { + throw new Error('executeAtomicBatch requires multiple Push calls and no signer funds'); + } + return this.executeWithPolicy(params, options, true); + } + + private async executeWithPolicy( + params: ExecuteParams | UniversalExecuteParams, + options: TransactionExecutionOptions | undefined, + requireAtomicBatch: boolean ): Promise { const inlineProgressHook = params.progressHook; if (options || inlineProgressHook) { @@ -449,7 +468,9 @@ export class Orchestrator { ); } return attachPerCallHookForWait( - await _executeStandardPayload(this.ctx, execute, eventBuffer, rcb) + await (requireAtomicBatch + ? _executeStandardPayload(this.ctx, execute, eventBuffer, rcb, { requireAtomicBatch: true }) + : _executeStandardPayload(this.ctx, execute, eventBuffer, rcb)) ); } catch (err) { const errMessage = normalizePublicErrorMessage(err); diff --git a/packages/core/src/lib/orchestrator/orchestrator.types.ts b/packages/core/src/lib/orchestrator/orchestrator.types.ts index 86b190ec..3a5b9f53 100644 --- a/packages/core/src/lib/orchestrator/orchestrator.types.ts +++ b/packages/core/src/lib/orchestrator/orchestrator.types.ts @@ -471,6 +471,15 @@ export interface UniversalTxResponse { /** Transaction route (UOA_TO_PUSH, UOA_TO_CEA, CEA_TO_PUSH, CEA_TO_CEA) */ route?: TransactionRouteType; + /** + * Agentic wallet (AGW) context, present when the transaction executed + * through an AGW. `from` is then the wallet and `origin` stays the signer; + * `agentic.rawTo` / `rawData` hold the wrapped call the signer sent. + * Outbound to/data/value summarize the first encoded destination call; + * `agentic.destinationCalls` retains the complete ordered call list. + */ + agentic?: import('../agentic/agentic.types').AgenticTxMetadata; + // 12. Internal flags /** * @internal True when this response was produced by `trackTransaction` and diff --git a/packages/core/src/lib/orchestrator/route-detector.ts b/packages/core/src/lib/orchestrator/route-detector.ts index 21d543a8..2ed0b15c 100644 --- a/packages/core/src/lib/orchestrator/route-detector.ts +++ b/packages/core/src/lib/orchestrator/route-detector.ts @@ -9,6 +9,7 @@ */ import { CHAIN } from '../constants/enums'; +import { isWeb2ReadChain } from '../constants/read-state'; import { MOVEABLE_TOKENS, type MoveableToken } from '../constants/tokens'; import type { UniversalExecuteParams, @@ -238,8 +239,8 @@ export function validateRouteParams( context?: { clientChain?: CHAIN } ): void { const toChain = isChainTarget(params.to) ? String(params.to.chain) : undefined; - if (String(params.from?.chain ?? '') === CHAIN.WEB2 || toChain === CHAIN.WEB2) { - throw new RouteValidationError('CHAIN.WEB2 is a read-only destination and cannot be used with transaction APIs'); + if (isWeb2ReadChain(String(params.from?.chain ?? '')) || isWeb2ReadChain(toChain)) { + throw new RouteValidationError('READ.CHAIN.WEB2 is a read-only destination and cannot be used with transaction APIs'); } const route = detectRoute(params); diff --git a/packages/core/src/lib/orchestrator/svm-idl/resolve.ts b/packages/core/src/lib/orchestrator/svm-idl/resolve.ts index 444b7760..dbcc2792 100644 --- a/packages/core/src/lib/orchestrator/svm-idl/resolve.ts +++ b/packages/core/src/lib/orchestrator/svm-idl/resolve.ts @@ -43,6 +43,16 @@ const CEA_AUTHORITY_NAMES = new Set([ ]); export function resolveSvmCall(input: ResolveInput): ResolvedSvmCall { + return resolveCall(input); +} + +/** Internal AGW seam: use its registry-derived authority, not the signer's CEA. */ +export function resolveSvmCallForCea(input: ResolveInput, ceaAuthority: `0x${string}`): ResolvedSvmCall { + if (!/^0x[0-9a-fA-F]{64}$/.test(ceaAuthority)) throw new Error('SVM CEA authority must be 32 bytes'); + return resolveCall(input, ceaAuthority); +} + +function resolveCall(input: ResolveInput, authority?: `0x${string}`): ResolvedSvmCall { const idl = getIdl(input.programAddress); if (!idl) { throw new Error( @@ -74,11 +84,7 @@ export function resolveSvmCall(input: ResolveInput): ResolvedSvmCall { const programPk = new PublicKey( Buffer.from(input.programAddress.slice(2), 'hex') ); - const { address: ceaPdaHex } = deriveSvmCeaPda( - input.senderUea, - input.targetChain, - true - ); + const ceaPdaHex = authority ?? deriveSvmCeaPda(input.senderUea, input.targetChain, true).address; const accounts: SvmGatewayAccountMeta[] = []; for (const item of ix.accounts) { diff --git a/packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts b/packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts index b4d683ed..98feda7d 100644 --- a/packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +++ b/packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts @@ -170,6 +170,15 @@ const STUB_ARGS: Record = { [PROGRESS_HOOK.UEA_MIG_9901]: ['v2.0.0'], [PROGRESS_HOOK.UEA_MIG_9902]: [], [PROGRESS_HOOK.UEA_MIG_9903]: [], + // Agentic wallet + [PROGRESS_HOOK.AGENTIC_TX_101]: ['0xwallet', 0, false], + [PROGRESS_HOOK.AGENTIC_TX_102]: ['0xwallet', 'atomic'], + [PROGRESS_HOOK.AGENTIC_TX_104]: [['0xrule']], + [PROGRESS_HOOK.AGENTIC_TX_105]: [{ rulesIds: ['0xrule'] }], + [PROGRESS_HOOK.AGENTIC_TX_106]: ['label'], + [PROGRESS_HOOK.AGENTIC_TX_107]: ['0xrule', 'eip155:42101', 'agent'], + [PROGRESS_HOOK.AGENTIC_TX_199_01]: ['create', '0xhash'], + [PROGRESS_HOOK.AGENTIC_TX_199_02]: ['create', 'NO_RULES_FOR_CHAIN', 'no rule', { name: 'X' }], // Read state (READ-TX 101–199, 001/999) — positional args as in progress-hook.ts [PROGRESS_HOOK.READ_TX_101]: ['eip155:11155111', 'eip155', 0], [PROGRESS_HOOK.READ_TX_102_01]: ['eip155:11155111'], diff --git a/packages/core/src/lib/progress-hook/progress-hook.ts b/packages/core/src/lib/progress-hook/progress-hook.ts index ccc977fc..821950fb 100644 --- a/packages/core/src/lib/progress-hook/progress-hook.ts +++ b/packages/core/src/lib/progress-hook/progress-hook.ts @@ -8,6 +8,7 @@ import { formatPc, normalizePcInsufficientFundsError } from '../formatters'; import { Utils } from '../utils'; import { PROGRESS_HOOK, + PROGRESS_HOOK_AGENTIC, PROGRESS_HOOK_MIG, PROGRESS_HOOK_READ, PROGRESS_HOOK_MULTICHAIN, @@ -1593,6 +1594,79 @@ const RAW_HOOKS_READ: { }), }; +// ============================================================================= +// Agentic wallet (AGW) — AGENTIC-TX (spec 3.f, PROPOSED). No AGENTIC-TX-103. +// ============================================================================= + +type AgenticDecodedError = { name?: string; hint?: string; selector?: string; decoded?: string }; + +const RAW_HOOKS_AGENTIC: { + [K in PROGRESS_HOOK_AGENTIC]: ProgressEventFunctionWithoutTimestamp; +} = { + [PROGRESS_HOOK.AGENTIC_TX_101]: (address: string, index: number, deployed: boolean) => ({ + id: PROGRESS_HOOK.AGENTIC_TX_101, + title: 'Agentic Wallet Derived', + message: `Wallet ${address} at index ${index} (${deployed ? 'deployed' : 'not deployed'}).`, + response: { address, index, deployed }, + level: 'INFO', + }), + [PROGRESS_HOOK.AGENTIC_TX_102]: (address: string, strategy: string) => ({ + id: PROGRESS_HOOK.AGENTIC_TX_102, + title: 'Deploy Step Added', + message: `Deploying agentic wallet ${address} (${strategy}).`, + response: { address, strategy }, + level: 'INFO', + }), + [PROGRESS_HOOK.AGENTIC_TX_104]: (rulesIds: string[]) => ({ + id: PROGRESS_HOOK.AGENTIC_TX_104, + title: 'Rules Granted', + message: `Granted ${rulesIds.length} rule${rulesIds.length === 1 ? '' : 's'}.`, + response: { rulesIds }, + level: 'INFO', + }), + [PROGRESS_HOOK.AGENTIC_TX_105]: (target: { rulesIds: string[] } | { all: true }) => ({ + id: PROGRESS_HOOK.AGENTIC_TX_105, + title: 'Rules Revoked', + message: + 'all' in target + ? 'Revoked every rule on the wallet.' + : `Revoked ${target.rulesIds.length} rule${target.rulesIds.length === 1 ? '' : 's'}.`, + response: target, + level: 'INFO', + }), + [PROGRESS_HOOK.AGENTIC_TX_106]: (label: string) => ({ + id: PROGRESS_HOOK.AGENTIC_TX_106, + title: 'Label Set', + message: `Wallet label set to "${label}".`, + response: { label }, + level: 'INFO', + }), + [PROGRESS_HOOK.AGENTIC_TX_107]: (rulesId: string | undefined, chainNamespace: string, door: 'owner' | 'agent') => ({ + id: PROGRESS_HOOK.AGENTIC_TX_107, + title: 'Rule Resolved', + message: + door === 'owner' + ? `Owner door on ${chainNamespace}; no rule applies.` + : `Agent door on ${chainNamespace} under rule ${rulesId}.`, + response: { rulesId: rulesId ?? null, chainNamespace, door }, + level: 'INFO', + }), + [PROGRESS_HOOK.AGENTIC_TX_199_01]: (operation: string, txHash?: string) => ({ + id: PROGRESS_HOOK.AGENTIC_TX_199_01, + title: 'Agentic Operation Done', + message: `${operation} completed.`, + response: { operation, txHash: txHash ?? null }, + level: 'SUCCESS', + }), + [PROGRESS_HOOK.AGENTIC_TX_199_02]: (operation: string, code: string, message: string, decodedError?: AgenticDecodedError) => ({ + id: PROGRESS_HOOK.AGENTIC_TX_199_02, + title: 'Agentic Operation Failed', + message: `${operation} failed: ${message}`, + response: { operation, code, decodedError: decodedError ?? null }, + level: 'ERROR', + }), +}; + // Combine all routes into the master record const RAW_HOOKS: { [K in PROGRESS_HOOK]: ProgressEventFunctionWithoutTimestamp; @@ -1603,6 +1677,7 @@ const RAW_HOOKS: { ...RAW_HOOKS_MULTICHAIN, ...RAW_HOOKS_MIG, ...RAW_HOOKS_READ, + ...RAW_HOOKS_AGENTIC, }; // Build final hooks with timestamp injection diff --git a/packages/core/src/lib/progress-hook/progress-hook.types.ts b/packages/core/src/lib/progress-hook/progress-hook.types.ts index 94954b7e..4935d1cd 100644 --- a/packages/core/src/lib/progress-hook/progress-hook.types.ts +++ b/packages/core/src/lib/progress-hook/progress-hook.types.ts @@ -176,6 +176,17 @@ export enum PROGRESS_HOOK { UEA_MIG_9901 = 'UEA-MIG-9901', UEA_MIG_9902 = 'UEA-MIG-9902', UEA_MIG_9903 = 'UEA-MIG-9903', + + // Agentic wallet (AGW) — AGENTIC-TX (PROPOSED in the AGW SDK spec 3.f). + // AGENTIC-TX-103 was removed by the spec (create no longer funds). + AGENTIC_TX_101 = 'AGENTIC-TX-101', + AGENTIC_TX_102 = 'AGENTIC-TX-102', + AGENTIC_TX_104 = 'AGENTIC-TX-104', + AGENTIC_TX_105 = 'AGENTIC-TX-105', + AGENTIC_TX_106 = 'AGENTIC-TX-106', + AGENTIC_TX_107 = 'AGENTIC-TX-107', + AGENTIC_TX_199_01 = 'AGENTIC-TX-199-01', + AGENTIC_TX_199_02 = 'AGENTIC-TX-199-02', } // Route-scoped TYPE aliases — compile-time narrowing for new emission code. @@ -319,3 +330,13 @@ export type PROGRESS_HOOK_READ = | PROGRESS_HOOK.READ_TX_999_01 | PROGRESS_HOOK.READ_TX_999_02 | PROGRESS_HOOK.READ_TX_999_03; + +export type PROGRESS_HOOK_AGENTIC = + | PROGRESS_HOOK.AGENTIC_TX_101 + | PROGRESS_HOOK.AGENTIC_TX_102 + | PROGRESS_HOOK.AGENTIC_TX_104 + | PROGRESS_HOOK.AGENTIC_TX_105 + | PROGRESS_HOOK.AGENTIC_TX_106 + | PROGRESS_HOOK.AGENTIC_TX_107 + | PROGRESS_HOOK.AGENTIC_TX_199_01 + | PROGRESS_HOOK.AGENTIC_TX_199_02; diff --git a/packages/core/src/lib/push-chain/push-chain.ts b/packages/core/src/lib/push-chain/push-chain.ts index 9dc13208..4fe93214 100644 --- a/packages/core/src/lib/push-chain/push-chain.ts +++ b/packages/core/src/lib/push-chain/push-chain.ts @@ -47,7 +47,40 @@ import { type ReadTrackOptions, type ReadExecuteOptions, } from '../read-state/read-params'; -import { assertRequestEntrypoint, executeReads as executePreparedReads } from '../read-state/read-executor'; +import { assertRequestEntrypoint, executeReads as executePreparedReads, type ReadExecutorDeps } from '../read-state/read-executor'; +import { AgenticNamespaceImpl } from '../agentic/agentic'; +import { resolveAgenticContext, type AgenticExecutionContext } from '../agentic/context'; +import { agenticSend } from '../agentic/execution/send'; +import { notAllowedInAgenticMode } from '../agentic/execution/guards'; +import { adaptTrackedResponse } from '../agentic/response'; +import { createAgenticRuntime, type AgenticRuntime } from '../agentic/runtime'; +import type { AgenticNamespace } from '../agentic/agentic.types'; +import { MarketNamespaceImpl } from '../market/market'; +import { JobNamespaceImpl } from '../job/job'; +import type { MarketNamespace } from '../market/types'; +import type { JobNamespace } from '../job/types'; +import type { StackRuntime } from '../market/runtime'; +import { bindJobPreviewAccounts } from '../job-spec/preview'; +import { jobReadOptions, prepareJobRead } from '../job-spec/read'; +import type { ExecuteJobReadOptions, PreparedJobRead } from '../job-spec/types'; + +/** Options accepted by `PushChain.initialize` / `reinitialize`. */ +export interface PushChainInitializeOptions { + network: PUSH_NETWORK; + rpcUrls?: Partial>; + blockExplorers?: Partial>; + printTraces?: boolean; + progressHook?: (progress: ProgressEvent) => void; + /** + * Act as this agentic wallet (AGW). The signer decides the door: the owner + * sends through `execute`, an agent named in an enabled rule through + * `executeAsAgent`; anyone else fails with NOT_OWNER_OR_AGENT. + * `universal.account` becomes the wallet; `universal.origin`, + * `getAccountStatus()` and gas stay the signer's. Not inherited by + * `reinitialize` — pass it again to keep acting as the wallet. + */ + agenticWallet?: `0x${string}`; +} /** * @class PushChain @@ -169,7 +202,8 @@ export class PushChain { * Defaults to the canonical registry on Donut. For your own application receiver, * pass callback.target, gasLimit, abi and functionName, plus an optional args mapper. */ - read: (subject: string, options: O & ValidateReadCall) => Promise>>; + read: ((subject: string, options: O & ValidateReadCall) => Promise>>) & + ((read: PreparedJobRead, options?: ExecuteJobReadOptions) => Promise>) & { prepare: typeof prepareJobRead }; /** * Build a validated `ReadSpec` for `subject` on `options.chain`: preflight (oracle * height, protocol fee, gas price), envelope encoding, budget sizing, expiry math. @@ -258,6 +292,18 @@ export class PushChain { ) => Promise; }; + /** + * Agentic wallet management (AGW): derive, create, list and per-wallet + * handles. Ownership is the connected signer's Push identity. + */ + agentic: AgenticNamespace; + market: MarketNamespace; + job: JobNamespace; + + /** @internal AGW execution context when initialized with `agenticWallet`. */ + private agenticContext?: AgenticExecutionContext; + private readonly agenticRuntime: AgenticRuntime; + /** * Account status including UEA deployment state and version info. * Initially unloaded — call getAccountStatus() to populate. @@ -293,12 +339,47 @@ export class PushChain { // Default — overwritten in createInstance() with the background fetch this.accountStatusReady = Promise.resolve(); + this.agenticRuntime = createAgenticRuntime(orchestrator, isReadMode); + this.agentic = new AgenticNamespaceImpl(this.agenticRuntime); + const stackRuntime: StackRuntime = { + agw: this.agenticRuntime, + jobBlocks: new Map(), + account: () => this.universal.account as `0x${string}`, + wallet: () => this.agenticContext?.wallet, + send: (params, options) => this.universal.sendTransaction(params, options), + signTypedData: (data) => this.universal.signTypedData(data), + canSignTypedData: () => typeof this.universalSigner.signTypedData === 'function', + }; + this.market = new MarketNamespaceImpl(stackRuntime); + this.job = new JobNamespaceImpl(stackRuntime); + + // eslint-disable-next-line @typescript-eslint/no-this-alias -- getters below need the instance + const self = this; + // In agenticWallet mode, request transactions execute through the wallet + // and the wallet pays the request value, so its balance gates the read. + const readDeps = (): ReadExecutorDeps => { + const actx = self.agenticContext; + if (!actx) return orchestrator; + return { + execute: (params, options) => agenticSend(self.agenticRuntime, actx, params, options), + trackRead: orchestrator.trackRead.bind(orchestrator) as Orchestrator['trackRead'], + revalidateRead: orchestrator.revalidateRead.bind(orchestrator), + getProgressHook: orchestrator.getProgressHook.bind(orchestrator), + getReadBalance: () => self.agenticRuntime.reader.getBalance({ address: actx.wallet }), + }; + }; + // Unspent read budget returns to whoever paid it: the wallet in agentic mode. + const withReadRefund = (options: T): T => + self.agenticContext && options.refundTo === undefined + ? { ...options, refundTo: self.agenticContext.wallet } + : options; + this.universal = { get origin() { return orchestrator.getUOA(); }, get account() { - return orchestrator.computeUEAOffchain(); + return self.agenticContext?.wallet ?? orchestrator.computeUEAOffchain(); }, sendTransaction: (...args) => { if (this.isReadMode) { @@ -306,12 +387,16 @@ export class PushChain { 'Read only mode cannot call sendTransaction function' ); } + if (this.agenticContext) { + return agenticSend(this.agenticRuntime, this.agenticContext, ...args); + } return orchestrator.execute.bind(orchestrator)(...args); }, prepareTransaction: ( params: UniversalExecuteParams, options?: TransactionExecutionOptions ) => { + if (this.agenticContext) throw notAllowedInAgenticMode('prepareTransaction'); return orchestrator.prepareTransaction.bind(orchestrator)( params, options @@ -326,40 +411,46 @@ export class PushChain { 'Read only mode cannot call executeTransactions function' ); } + if (this.agenticContext) throw notAllowedInAgenticMode('executeTransactions'); return orchestrator.createCascadedBuilder(txs, options).send(); }, - trackTransaction: (txHash: string, options?: import('../orchestrator/orchestrator.types').TrackTransactionOptions) => { - return orchestrator.trackTransaction.bind(orchestrator)(txHash, options); + trackTransaction: async (txHash: string, options?: import('../orchestrator/orchestrator.types').TrackTransactionOptions) => { + const tracked = await orchestrator.trackTransaction.bind(orchestrator)(txHash, options); + return adaptTrackedResponse(this.agenticRuntime, tracked); }, migrateCEA: (chain: CHAIN) => { if (this.isReadMode) { throw new Error('Read only mode cannot call migrateCEA function'); } + if (this.agenticContext) throw notAllowedInAgenticMode('migrateCEA'); return orchestrator.migrateCEA.bind(orchestrator)(chain); }, rescueFunds: (params: RescueFundsParams) => { if (this.isReadMode) { throw new Error('Read only mode cannot call rescueFunds function'); } + if (this.agenticContext) throw notAllowedInAgenticMode('rescueFunds'); return orchestrator.rescueFunds.bind(orchestrator)(params); }, // Only read()/executeReads() send transactions; prepare/simulate/track remain read-only. - read: async (subject: string, options: O) => { - const params = await resolveReadSpecParams(subject, options, orchestrator.getNetwork(), orchestrator.getRpcUrls()); + read: Object.assign(async (subject: string | PreparedJobRead, input?: ReadOptions | ExecuteJobReadOptions) => { + const options = typeof subject === 'string' ? input as ReadOptions : jobReadOptions(subject, input as ExecuteJobReadOptions); + const target = typeof subject === 'string' ? subject : subject.target; + const params = await resolveReadSpecParams(target, withReadRefund(options), orchestrator.getNetwork(), orchestrator.getRpcUrls()); assertRequestEntrypoint(params.callback, 'read'); if (this.isReadMode) throw new Error('Read only mode cannot call read function'); const prepared = await orchestrator.prepareRead(params, options.progressHook); - const { reads: [response] } = await executePreparedReads(orchestrator, [prepared] as const, options); - return response as UniversalReadResponse>; - }, + const { reads: [response] } = await executePreparedReads(readDeps(), [prepared] as const, options); + return response; + }, { prepare: prepareJobRead }) as PushChain['universal']['read'], prepareRead: async (subject: string, options: O & ValidateReadCall) => { - const params = await resolveReadSpecParams(subject, options, orchestrator.getNetwork(), orchestrator.getRpcUrls()); + const params = await resolveReadSpecParams(subject, withReadRefund(options), orchestrator.getNetwork(), orchestrator.getRpcUrls()); return orchestrator.prepareRead(params) as Promise>>; }, executeReads: (async (reads: readonly PreparedRead[], options?: ReadExecuteOptions) => { reads.forEach((r) => assertRequestEntrypoint(r.callback)); if (this.isReadMode) throw new Error('Read only mode cannot call executeReads function'); - return executePreparedReads(orchestrator, reads, options); + return executePreparedReads(readDeps(), reads, options); }) as PushChain['universal']['executeReads'], trackRead: ((ref: { txHash: Hex } | { requestId: Hex | bigint }, options?: ReadTrackOptions & { progressHook?: (e: ProgressEvent) => void }) => { const opts = { ...toLifecycleOptions(options), progressHook: options?.progressHook }; @@ -389,6 +480,8 @@ export class PushChain { }, }; + bindJobPreviewAccounts(this.universal, async (wallet, chain) => (await this.agenticRuntime.resolveCEA(wallet, chain)).cea); + const network = orchestrator.getNetwork() === PUSH_NETWORK.MAINNET ? 'mainnet' @@ -702,13 +795,7 @@ export class PushChain { */ private static async createInstance( universalSigner: UniversalSigner | UniversalAccount, - options?: { - network: PUSH_NETWORK; - rpcUrls?: Partial>; - blockExplorers?: Partial>; - printTraces?: boolean; - progressHook?: (progress: ProgressEvent) => void; - } + options?: PushChainInitializeOptions ): Promise { const isReadOnly = PushChain.isUniversalAccount(universalSigner); @@ -773,6 +860,16 @@ export class PushChain { // Let execute() await the background fetch instead of re-fetching orchestrator.accountStatusReadyPromise = instance.accountStatusReady; + // Agentic mode: validate the wallet, its generation and the signer's door + // before returning a client. A read-only client may hold the context (so + // universal.account shows the wallet) but every signing path stays closed. + if (options?.agenticWallet !== undefined) { + instance.agenticContext = await resolveAgenticContext( + instance.agenticRuntime, + options.agenticWallet + ); + } + return instance; } @@ -790,13 +887,7 @@ export class PushChain { */ static initialize = async ( universalSigner: UniversalSigner | UniversalAccount, - options?: { - network: PUSH_NETWORK; - rpcUrls?: Partial>; - blockExplorers?: Partial>; - printTraces?: boolean; - progressHook?: (progress: ProgressEvent) => void; - } + options?: PushChainInitializeOptions ): Promise => { return PushChain.createInstance(universalSigner, options); }; @@ -815,27 +906,20 @@ export class PushChain { */ reinitialize = async ( universalSigner: UniversalSigner | UniversalAccount, - options?: { - network: PUSH_NETWORK; - rpcUrls?: Partial>; - blockExplorers?: Partial>; - printTraces?: boolean; - progressHook?: (progress: ProgressEvent) => void; - } + options?: PushChainInitializeOptions ): Promise => { - const mergedOptions = { + // agenticWallet is NOT inherited: an omitted value yields an ordinary + // client, and a supplied one reruns every wallet/role check. + const mergedOptions: PushChainInitializeOptions = { network: options?.network ?? this.orchestrator.getNetwork(), rpcUrls: options?.rpcUrls ?? this.orchestrator.getRpcUrls(), blockExplorers: options?.blockExplorers ?? this.blockExplorers, printTraces: options?.printTraces ?? this.orchestrator.getPrintTraces(), progressHook: options?.progressHook ?? this.orchestrator.getProgressHook(), - } as { - network: PUSH_NETWORK; - rpcUrls?: Partial>; - blockExplorers?: Partial>; - printTraces?: boolean; - progressHook?: (progress: ProgressEvent) => void; + ...(options?.agenticWallet !== undefined + ? { agenticWallet: options.agenticWallet } + : {}), }; return PushChain.createInstance(universalSigner, mergedOptions); }; diff --git a/packages/core/src/lib/read-state/__tests__/public-surface.spec.ts b/packages/core/src/lib/read-state/__tests__/public-surface.spec.ts index d55a2c22..1beef01e 100644 --- a/packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +++ b/packages/core/src/lib/read-state/__tests__/public-surface.spec.ts @@ -17,9 +17,10 @@ describe('read-state public surface', () => { ]) { expect(typeof (core as Record)[fn]).toBe('function'); } - expect(core.CHAIN.WEB2).toBe('web2:https'); - expect(PushChain.CONSTANTS.CHAIN.WEB2).toBe('web2:https'); - expect(Object.values(PushChain.CONSTANTS.CHAIN)).not.toContain('web2:https'); + // CHAIN.WEB2 is the deprecated alias of READ.CHAIN.WEB2 (AGW SDK page §4). + expect(core.CHAIN.WEB2).toBe('web2'); + expect(PushChain.CONSTANTS.CHAIN.WEB2).toBe(PushChain.CONSTANTS.READ.CHAIN.WEB2); + expect(Object.values(PushChain.CONSTANTS.CHAIN)).not.toContain('web2'); expect(core.UNIVERSAL_READ_STATUS.FULFILLED).toBe(3); expect(core.READ_STATUS.ERROR).toBe(2); expect(core.READ_ERROR_CODE.INVALID_QUERY).toBe(1); @@ -30,7 +31,8 @@ describe('read-state public surface', () => { it('PushChain.CONSTANTS.READ pins the contract-derived values', () => { const R = PushChain.CONSTANTS.READ; - expect(R.WEB2).toBe('web2:https'); + expect(R.WEB2).toBe('web2'); + expect(R.CHAIN.WEB2).toBe('web2'); expect(R.MAX_CALLBACK_GAS_LIMIT).toBe(1_000_000n); expect(R.MIN_CONFIRMATIONS_FLOOR).toBe(1); expect(R.DEFAULT_EXPIRY_BLOCKS).toBe(300n); diff --git a/packages/core/src/lib/read-state/__tests__/read-params.spec.ts b/packages/core/src/lib/read-state/__tests__/read-params.spec.ts index 6342edc1..05659ec3 100644 --- a/packages/core/src/lib/read-state/__tests__/read-params.spec.ts +++ b/packages/core/src/lib/read-state/__tests__/read-params.spec.ts @@ -37,6 +37,12 @@ describe('read(subject, options) grammar → ReadQuery', () => { it('EVM: storageSlot', () => { expect(toReadQuery(TOKEN, { chain: CHAIN.ETHEREUM_SEPOLIA, storageSlot: 2n })).toEqual({ type: 'storageSlot', target: TOKEN, slot: 2n }); }); + it('EVM: raw callData retains the exact selector and argument bytes', () => { + expect(toReadQuery(TOKEN, { chain: CHAIN.ETHEREUM_SEPOLIA, callData: '0x18160ddd' })).toEqual({ type: 'contractCall', target: TOKEN, callData: '0x18160ddd' }); + expect(() => toReadQuery(TOKEN, { chain: CHAIN.ETHEREUM_SEPOLIA, callData: '0x123' })).toThrow(InvalidReadQueryError); + expect(() => toReadQuery(TOKEN, { chain: CHAIN.ETHEREUM_SEPOLIA, callData: '0x18160ddd', abi: ABI, functionName: 'totalSupply' })).toThrow(InvalidReadQueryError); + expect(() => toReadQuery(SOL_OWNER, { chain: CHAIN.SOLANA_DEVNET, callData: '0x18160ddd' })).toThrow(InvalidReadQueryError); + }); it('SVM: native → lamports of subject; token → the ATA derived offline', () => { expect(toReadQuery(SOL_OWNER, { chain: CHAIN.SOLANA_DEVNET })).toEqual({ type: 'lamportBalance', account: SOL_OWNER }); const q = toReadQuery(SOL_OWNER, { chain: CHAIN.SOLANA_DEVNET, token: SOL_MINT }, TOKEN_PROGRAM_ID); diff --git a/packages/core/src/lib/read-state/__tests__/read-types.spec.ts b/packages/core/src/lib/read-state/__tests__/read-types.spec.ts index 4fcbfa1f..726ae72f 100644 --- a/packages/core/src/lib/read-state/__tests__/read-types.spec.ts +++ b/packages/core/src/lib/read-state/__tests__/read-types.spec.ts @@ -26,6 +26,15 @@ declare const counterIdl: CounterIdl; // Compiled by ts-jest; never executed or connected to a network. async function checkTypes(client: PushChain) { + const authored = client.universal.read.prepare({ chain: CHAIN.ETHEREUM_SEPOLIA, target: address, abi, functionName: 'balanceOf', args: [address] }); + const authoredResult: UniversalReadResponse<`0x${string}`> = await client.universal.read(authored, { maxFee: 100n }); + void authoredResult; + const raw: UniversalReadResponse<`0x${string}`> = await client.universal.read(address, { chain: CHAIN.ETHEREUM_SEPOLIA, callData: '0x18160ddd' }); + // @ts-expect-error raw calls and typed calls are mutually exclusive + const mixedRaw: ReadOptions = { chain: CHAIN.ETHEREUM_SEPOLIA, callData: '0x18160ddd', abi, functionName: 'quote' }; + // @ts-expect-error raw EVM calldata cannot be used on Solana + const svmRaw: ReadOptions = { chain: CHAIN.SOLANA_DEVNET, callData: '0x18160ddd' }; + void [raw, mixedRaw, svmRaw]; // @ts-expect-error token program is inferred from the mint const removed: ReadOptions = { chain: CHAIN.SOLANA_DEVNET, token: address, tokenProgram: 'token-2022' }; const accountIdl = { address, metadata: { name: 'counter', version: '1', spec: '0.1.0' }, instructions: [], accounts: [{ name: 'counter', discriminator: [1,2,3,4,5,6,7,8] }], types: [{ name: 'counter', type: { kind: 'struct', fields: [{ name: 'count', type: 'u64' }] } }] } satisfies import('@coral-xyz/anchor').Idl; diff --git a/packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts b/packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts new file mode 100644 index 00000000..e964bb7e --- /dev/null +++ b/packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts @@ -0,0 +1,69 @@ +/** + * READ.CHAIN / Web2 compatibility (AGW SDK page §4, confirmed 2026-09-28): + * new enumerable READ.CHAIN.WEB2 = 'web2'; CHAIN.WEB2 and READ.WEB2 stay as + * deprecated aliases; the legacy 'web2:https' literal is still accepted; the + * wire identity the node routes on stays web2:https. + */ +import { PushChain } from '../../index'; +import { CHAIN } from '../../constants/enums'; +import { validateRouteParams } from '../../orchestrator/route-detector'; +import { resolveDestination } from '../destination'; +import { toBuildReadSpecParams, toReadDestination, toReadQuery } from '../read-params'; +import type { ReadChain } from '../read-state.types'; + +const R = PushChain.CONSTANTS.READ; +const web2 = { web2: { extract: [{ path: '$.a', valueType: 'string' as const }] } }; + +describe('READ.CHAIN', () => { + it('is an enumerable superset of CHAIN with WEB2 = "web2"', () => { + const values = Object.values(R.CHAIN); + for (const c of Object.values(CHAIN)) expect(values).toContain(c); + expect(values).toContain('web2'); + expect(Object.keys(R.CHAIN)).toContain('WEB2'); + expect(R.CHAIN.ETHEREUM_SEPOLIA).toBe(CHAIN.ETHEREUM_SEPOLIA); + }); + + it('CHAIN itself still enumerates only blockchains', () => { + expect(Object.keys(CHAIN)).not.toContain('WEB2'); + expect(CHAIN.WEB2).toBe(R.CHAIN.WEB2); + expect(R.WEB2).toBe(R.CHAIN.WEB2); + }); +}); + +describe.each([ + ['READ.CHAIN.WEB2', R.CHAIN.WEB2], + ['deprecated CHAIN.WEB2', CHAIN.WEB2], + ['legacy literal', 'web2:https'], +] as const)('%s', (_name, chain) => { + it('normalizes to the unchanged wire identity', () => { + const dest = resolveDestination(toReadDestination(chain as ReadChain)); + expect(dest).toMatchObject({ chainNamespace: 'web2', chainId: 'https', caip2: 'web2:https', namespace: 'web2' }); + expect(resolveDestination({ chain: chain as ReadChain })).toMatchObject({ caip2: 'web2:https' }); + }); + + it('builds an http query and spec params', () => { + expect(toReadQuery('https://x.test/a', { chain: chain as ReadChain, ...web2 })).toMatchObject({ type: 'http', url: 'https://x.test/a' }); + expect(toBuildReadSpecParams('https://x.test/a', { chain: chain as ReadChain, ...web2 }).destination).toEqual({ + chainNamespace: 'web2', + chainId: 'https', + }); + }); + + it('is rejected by transaction routing', () => { + expect(() => validateRouteParams({ to: { address: '0x0000000000000000000000000000000000000001', chain: chain as never } })).toThrow( + /read-only destination/ + ); + }); +}); + +describe('type-level separation', () => { + it('compiles', () => { + const a: ReadChain = 'web2'; + const b: ReadChain = 'web2:https'; + const c: ReadChain = CHAIN.ETHEREUM_SEPOLIA; + const d: ReadChain = R.CHAIN.WEB2; + // @ts-expect-error — a transaction ChainTarget never accepts the Web2 read source + const t: import('../../orchestrator/orchestrator.types').ChainTarget = { address: '0x', chain: R.CHAIN.WEB2 }; + expect([a, b, c, d, t].length).toBe(5); + }); +}); diff --git a/packages/core/src/lib/read-state/destination.ts b/packages/core/src/lib/read-state/destination.ts index 51b3b7a2..d7b9c268 100644 --- a/packages/core/src/lib/read-state/destination.ts +++ b/packages/core/src/lib/read-state/destination.ts @@ -1,4 +1,4 @@ -import { READ_NAMESPACE, type ReadNamespace } from '../constants/read-state'; +import { READ_NAMESPACE, WEB2_DESTINATION, WEB2_READ_CHAIN, type ReadNamespace } from '../constants/read-state'; import { UnsupportedReadDestinationError } from './errors'; import type { ReadDestination, ResolvedDestination } from './read-state.types'; @@ -17,7 +17,11 @@ const KNOWN: ReadonlySet = new Set(Object.values(READ_NAMESPACE)); export function resolveDestination(dest: ReadDestination): ResolvedDestination { let chainNamespace: string; let chainId: string; - if ('chain' in dest) { + if ('chain' in dest && dest.chain === WEB2_READ_CHAIN) { + // The public 'web2' spelling has no ':'; its wire identity is web2:https. + chainNamespace = WEB2_DESTINATION.chainNamespace; + chainId = WEB2_DESTINATION.chainId; + } else if ('chain' in dest) { const idx = dest.chain.indexOf(':'); if (idx <= 0) { throw new UnsupportedReadDestinationError(`chain is not CAIP-2: ${dest.chain}`); diff --git a/packages/core/src/lib/read-state/read-params.ts b/packages/core/src/lib/read-state/read-params.ts index ca8e5b65..e1e6fca4 100644 --- a/packages/core/src/lib/read-state/read-params.ts +++ b/packages/core/src/lib/read-state/read-params.ts @@ -19,11 +19,11 @@ import { detectTokenProgram, resolveAccountName, validateIdl } from './svm-accou import { deriveIdlPda, isProgramSubject } from './svm-pda'; import { CHAIN, PUSH_NETWORK } from '../constants/enums'; import { computeReadQueryKey, resolveReadCallback } from './registry'; -import { READ_NAMESPACE, WEB2_DESTINATION } from '../constants/read-state'; +import { isWeb2ReadChain, READ_NAMESPACE, WEB2_DESTINATION } from '../constants/read-state'; import { resolveDestination } from './destination'; import { deriveAssociatedTokenAddress } from './envelopes/svm'; import { InvalidReadQueryError } from './errors'; -import type { BuildReadSpecParams, ReadChain, ReadDestination, ReadLifecycleOptions, ReadQuery, ReadResultShape, Web2Extract } from './read-state.types'; +import type { BuildReadSpecParams, ReadChain, ReadDestination, ReadLifecycleOptions, ReadQuery, ReadResultShape, Web2Extract, Web2ReadChain } from './read-state.types'; import type { ReadCallback } from './read-state.types'; import type { ProgressEvent } from '../progress-hook/progress-hook.types'; @@ -56,6 +56,8 @@ interface ReadOptionsInput { idl?: Idl; /** Typed contract call — encodes the call and decodes the result. */ abi?: Abi; + /** Encoded EVM view call. The result is returned as raw consensus bytes. */ + callData?: Hex; /** * With `abi`: the function to call (required). With `idl`: the account layout * (optional — inferred from the discriminator; snake_case or camelCase). @@ -94,7 +96,7 @@ interface ReadOptionsInput { }; } -type NoQuery = { token?: never; tokenProgram?: never; idl?: never; accountName?: never; abi?: never; functionName?: never; args?: never; storageSlot?: never; web2?: never }; +type NoQuery = { token?: never; tokenProgram?: never; idl?: never; accountName?: never; abi?: never; callData?: never; functionName?: never; args?: never; storageSlot?: never; web2?: never }; type Query = Omit & T; type EvmChain = Extract; type SvmChain = Extract; @@ -105,8 +107,9 @@ export type ReadQueryOptions = | ({ chain: SvmChain } & Query<'token', { token: string }>) | ({ chain: SvmChain } & Query<'idl' | 'functionName' | 'args', { idl: Idl; functionName?: string; args?: readonly unknown[] }>) | ({ chain: EvmChain } & Query<'abi' | 'functionName' | 'args', { abi: Abi; functionName: string; args?: readonly unknown[] }>) + | ({ chain: EvmChain } & Query<'callData', { callData: Hex }>) | ({ chain: EvmChain } & Query<'storageSlot', { storageSlot: Hex | bigint }>) - | ({ chain: typeof CHAIN.WEB2 } & Query<'web2', { web2: ReadWeb2Options }>); + | ({ chain: Web2ReadChain } & Query<'web2', { web2: ReadWeb2Options }>); export type ReadCallbackOptions = { callback?: @@ -122,7 +125,7 @@ type FinalizedDestinationOptions = { blockNumber?: never; minConfirmations?: nev /** EVM reads expose pinning; SVM and Web2 choose their finalized/heightless references internally. */ export type ReadPrepareOptions = SharedPrepareOptions & ( | (Extract & EvmPinningOptions) - | (Extract & FinalizedDestinationOptions) + | (Extract & FinalizedDestinationOptions) ); export type ReadExecuteOptions = Pick; type WithExecutionOptions = T extends unknown @@ -154,7 +157,7 @@ export type ReadValue = O extends { abi: infer A extends Abi; functionName: i ? number extends A['length'] ? unknown : ReadCallValue> : O extends { web2: { extract: infer E extends readonly Web2Extract[] } } ? { readonly [K in keyof E]: Web2Value } - : O extends { storageSlot: unknown } ? Hex + : O extends { storageSlot: unknown } | { callData: unknown } ? Hex : O extends { idl: infer I extends Idl } ? IdlReadValue : bigint; @@ -180,7 +183,7 @@ export const ERC20_BALANCE_OF_ABI = [ }, ] as const satisfies Abi; -const QUERY_KEYS = ['token', 'abi', 'idl', 'storageSlot', 'web2'] as const; +const QUERY_KEYS = ['token', 'abi', 'callData', 'idl', 'storageSlot', 'web2'] as const; function queryKind(o: ReadOptionsInput): (typeof QUERY_KEYS)[number] | 'native' { if ('tokenProgram' in o) throw new InvalidReadQueryError('tokenProgram is detected from the mint; remove options.tokenProgram'); @@ -196,7 +199,8 @@ function queryKind(o: ReadOptionsInput): (typeof QUERY_KEYS)[number] | 'native' } export function toReadDestination(chain: ReadChain): ReadDestination { - return chain === CHAIN.WEB2 ? WEB2_DESTINATION : { chain }; + // Both public spellings normalize to the unchanged wire identity web2:https. + return isWeb2ReadChain(chain) ? WEB2_DESTINATION : { chain }; } /** Build the internal query from the public grammar. Pure. */ @@ -209,7 +213,7 @@ export function toReadQuery(subject: string, o: ReadOptionsInput, resolvedTokenP if (!/^https:\/\//i.test(subject)) throw new InvalidReadQueryError('web2 subject must be an https:// URL'); return { type: 'http', url: subject, ...o.web2 }; } - if (kind === 'web2') throw new InvalidReadQueryError('`web2` is only valid with chain CHAIN.WEB2'); + if (kind === 'web2') throw new InvalidReadQueryError('`web2` is only valid with chain READ.CHAIN.WEB2'); if (dest.namespace === READ_NAMESPACE.EVM) { if (!isAddress(subject)) throw new InvalidReadQueryError(`EVM subject must be an address, got ${subject}`); @@ -224,6 +228,10 @@ export function toReadQuery(subject: string, o: ReadOptionsInput, resolvedTokenP case 'abi': if (!o.functionName) throw new InvalidReadQueryError('abi needs functionName'); return { type: 'contractCall', target: subject, abi: o.abi as Abi, functionName: o.functionName, args: o.args }; + case 'callData': + if (!/^0x(?:[\da-f]{2}){4,}$/i.test(o.callData ?? '')) + throw new InvalidReadQueryError('callData must contain a function selector and complete bytes'); + return { type: 'contractCall', target: subject, callData: o.callData as Hex }; case 'storageSlot': return { type: 'storageSlot', target: subject, slot: o.storageSlot as Hex | bigint }; default: diff --git a/packages/core/src/lib/read-state/read-state.types.ts b/packages/core/src/lib/read-state/read-state.types.ts index 6639c275..4f738085 100644 --- a/packages/core/src/lib/read-state/read-state.types.ts +++ b/packages/core/src/lib/read-state/read-state.types.ts @@ -11,7 +11,9 @@ import type { ReadNamespace } from '../constants/read-state'; * Where a read goes. `CHAIN` enum values are CAIP-2 and split cleanly; the * explicit form is the low-level escape hatch; the public API uses `CHAIN.WEB2`. */ -export type ReadChain = CHAIN | typeof CHAIN.WEB2; +/** Web2 read source: `READ.CHAIN.WEB2` (`'web2'`) or the legacy `'web2:https'` literal. */ +export type Web2ReadChain = 'web2' | 'web2:https'; +export type ReadChain = CHAIN | Web2ReadChain; export type ReadDestination = { chain: ReadChain } | { chainNamespace: string; chainId: string }; export type ResolvedDestination = { diff --git a/packages/core/src/lib/read-state/read-tracker.ts b/packages/core/src/lib/read-state/read-tracker.ts index 991c698d..79f891c0 100644 --- a/packages/core/src/lib/read-state/read-tracker.ts +++ b/packages/core/src/lib/read-state/read-tracker.ts @@ -26,6 +26,8 @@ import { READ_TRACK_MAX_TIMEOUT_MS, READ_TRACK_MIN_POLL_INTERVAL_MS, READ_TRACK_POLL_INTERVAL_MS, + WEB2_READ_CHAIN, + isWeb2ReadChain, } from '../constants/read-state'; import type { UniversalRead } from '../generated/ucallback/v1'; import { PROGRESS_HOOK } from '../progress-hook/progress-hook.types'; @@ -343,8 +345,8 @@ export function inferResultShape(namespace: string, query: Hex): ReadResultShape } } -function chainFromCaip2(caip2: string): CHAIN | typeof CHAIN.WEB2 | undefined { - if (caip2 === CHAIN.WEB2) return CHAIN.WEB2; +function chainFromCaip2(caip2: string): CHAIN | typeof WEB2_READ_CHAIN | undefined { + if (isWeb2ReadChain(caip2)) return WEB2_READ_CHAIN; return (Object.values(CHAIN) as string[]).includes(caip2) ? (caip2 as CHAIN) : undefined; } diff --git a/packages/core/src/lib/read-state/spec-builder.ts b/packages/core/src/lib/read-state/spec-builder.ts index 52641100..99b04efd 100644 --- a/packages/core/src/lib/read-state/spec-builder.ts +++ b/packages/core/src/lib/read-state/spec-builder.ts @@ -13,7 +13,7 @@ import { import { UNIVERSAL_CALLBACK_EVM } from '../constants/abi/universalCallback.evm'; import { UEA_FACTORY_ABI } from '../constants/abi/uea-factory'; import { UEA_FACTORY } from '../constants/chain'; -import { DEFAULT_EXPIRY_BLOCKS, MIN_CONFIRMATIONS_FLOOR, READ_NAMESPACE, READ_PREFLIGHT_STALE_MS } from '../constants/read-state'; +import { DEFAULT_EXPIRY_BLOCKS, MIN_CONFIRMATIONS_FLOOR, READ_NAMESPACE, READ_PREFLIGHT_STALE_MS, WEB2_READ_CHAIN } from '../constants/read-state'; import { sizeCallbackBudget } from './budget'; import { computeReadQueryKey } from './registry'; import { resolveDestination } from './destination'; @@ -137,7 +137,7 @@ export function buildReadSpecFromPreflight( return { callback: params.callback, queryKey: computeReadQueryKey(params.destination, params.query), - chain: dest.caip2 as ReadChain, + chain: (isWeb2 ? WEB2_READ_CHAIN : dest.caip2) as ReadChain, spec, specTuple: toTuple(spec), encodedSpec: encodeSpec(spec), diff --git a/packages/core/src/lib/universal/prc20-address.spec.ts b/packages/core/src/lib/universal/prc20-address.spec.ts new file mode 100644 index 00000000..42aa2f81 --- /dev/null +++ b/packages/core/src/lib/universal/prc20-address.spec.ts @@ -0,0 +1,65 @@ +import { getAddress } from 'viem'; +import { getPRC20Address } from './prc20-address'; +import { CHAIN, PUSH_NETWORK } from '../constants/enums'; +import { MOVEABLE_TOKEN_CONSTANTS } from '../constants/tokens'; +import { SYNTHETIC_PUSH_ERC20 } from '../constants/chain'; + +const addresses = SYNTHETIC_PUSH_ERC20[PUSH_NETWORK.TESTNET_DONUT]; +it.each([ + ['WETH', '0xfff9976782d46cc05630d1f6ebab18b2324d6b14', addresses.WETH_ETH], + ['stETH', '0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af', addresses.stETH_ETH], +] as const)( + 'resolves verified Sepolia %s for lowercase/checksummed address input', + (symbol, address, prc20) => { + for (const input of [address.toLowerCase(), getAddress(address)]) { + expect( + getPRC20Address({ chain: CHAIN.ETHEREUM_SEPOLIA, address: input }) + ).toMatchObject({ + chain: CHAIN.ETHEREUM_SEPOLIA, + symbol, + address: prc20, + decimals: 18, + }); + } + } +); +it('preserves case-sensitive Solana identities while accepting EVM casing variations', () => { + const token = MOVEABLE_TOKEN_CONSTANTS.BASE_SEPOLIA.USDC; + expect( + getPRC20Address({ + chain: CHAIN.BASE_SEPOLIA, + address: token.address.toLowerCase(), + }).address + ).toBe(addresses.USDC_BASE); + const mint = MOVEABLE_TOKEN_CONSTANTS.SOLANA_DEVNET.USDC; + expect(() => + getPRC20Address({ + chain: CHAIN.SOLANA_DEVNET, + address: mint.address.toLowerCase(), + }) + ).toThrow(/infer/); + expect( + getPRC20Address({ chain: CHAIN.SOLANA_DEVNET, address: mint.address }) + .address + ).toBe(addresses.USDC_SOL); +}); +it('never aliases mainnet ETH/WETH or a different chain WETH to Sepolia', () => { + expect(() => + getPRC20Address({ + chain: CHAIN.ETHEREUM_MAINNET, + address: MOVEABLE_TOKEN_CONSTANTS.ETHEREUM_MAINNET.ETH.address, + }) + ).toThrow(/Unsupported ETH origin/); + expect(() => + getPRC20Address({ + chain: CHAIN.ETHEREUM_MAINNET, + address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', + }) + ).toThrow(/Unsupported WETH origin/); + expect(() => + getPRC20Address({ + chain: CHAIN.ARBITRUM_SEPOLIA, + address: '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73', + }) + ).toThrow(/Unsupported WETH origin/); +}); diff --git a/packages/core/src/lib/universal/prc20-address.ts b/packages/core/src/lib/universal/prc20-address.ts new file mode 100644 index 00000000..db40f912 --- /dev/null +++ b/packages/core/src/lib/universal/prc20-address.ts @@ -0,0 +1,188 @@ +import { CHAIN, PUSH_NETWORK } from '../constants/enums'; +import { MOVEABLE_TOKENS, type MoveableToken } from '../constants/tokens'; +import { SYNTHETIC_PUSH_ERC20 } from '../constants/chain'; +import { isAddress } from 'viem'; + +const sameTokenAddress = (a: string, b: string) => + isAddress(a, { strict: false }) && isAddress(b, { strict: false }) + ? a.toLowerCase() === b.toLowerCase() + : a === b; + +/** Shared pure origin-to-PRC20 mapping; no signer or network reads. */ +export function getPRC20Address( + token: MoveableToken | { chain: string; address: string }, + options?: { network?: PUSH_NETWORK } +): { + address: `0x${string}`; + chain: CHAIN; + symbol: string; + decimals: number; + network: PUSH_NETWORK; +} { + const network = options?.network ?? PUSH_NETWORK.TESTNET_DONUT; + + const assertDeployed = ( + addr: string | undefined, + ctx: string + ): `0x${string}` => { + if (!addr || addr === '0xTBD') { + throw new Error( + `PRC20 address not available for ${ctx} on network ${network}` + ); + } + return addr as `0x${string}`; + }; + + // PushChainMoveableToken (pETH, pSOL, pUSDT(BNB), …) carries its PRC-20 address + // and origin `sourceChain` directly — no registry lookup needed. + const pcToken = token as Partial<{ + prc20Address: `0x${string}`; + sourceChain: CHAIN; + symbol: string; + decimals: number; + }>; + if (pcToken.prc20Address) { + return { + address: assertDeployed( + pcToken.prc20Address, + `${pcToken.symbol ?? 'token'} (${pcToken.sourceChain ?? 'unknown'})` + ), + chain: pcToken.sourceChain as CHAIN, + symbol: pcToken.symbol as string, + decimals: pcToken.decimals as number, + network, + }; + } + + // Infer origin chain, symbol, decimals by matching against MOVEABLE_TOKENS + let originChain: CHAIN | undefined; + let tokenSymbol: string | undefined; + let tokenDecimals: number | undefined; + + if ('symbol' in token) { + // MoveableToken path: infer chain by symbol + address + for (const [key, list] of Object.entries(MOVEABLE_TOKENS)) { + const k = key as CHAIN; + const match = (list ?? []).find( + (t) => + t.symbol === token.symbol && + sameTokenAddress(t.address, token.address) + ); + if (match) { + originChain = k; + tokenSymbol = match.symbol; + tokenDecimals = match.decimals; + break; + } + } + } else { + // { chain, address } path: trust the provided chain and resolve symbol via registry + originChain = token.chain as CHAIN; + const list = MOVEABLE_TOKENS[originChain] ?? []; + const match = list.find((t) => sameTokenAddress(t.address, token.address)); + if (match) { + tokenSymbol = match.symbol; + tokenDecimals = match.decimals; + } + } + + if (!originChain || !tokenSymbol || tokenDecimals === undefined) { + throw new Error('Unable to infer origin chain or token symbol for token'); + } + + const map = SYNTHETIC_PUSH_ERC20[network]; + if (!map) { + throw new Error(`No PRC20 address map configured for network: ${network}`); + } + + // Map token → synthetic key by origin chain family + // Current synthetic keys represent testnet sources. Mainnet assets must never + // resolve to a same-symbol Sepolia token on Donut. + const isEthFamily = originChain === CHAIN.ETHEREUM_SEPOLIA; + const isArbFamily = originChain === CHAIN.ARBITRUM_SEPOLIA; + const isBaseFamily = originChain === CHAIN.BASE_SEPOLIA; + const isBnbFamily = originChain === CHAIN.BNB_TESTNET; + const isSolFamily = originChain === CHAIN.SOLANA_DEVNET; + + let key: + | 'pETH' + | 'pETH_ARB' + | 'pETH_BASE' + | 'pBNB' + | 'pSOL' + | 'USDT_ETH' + | 'USDT_ARB' + | 'USDT_SOL' + | 'USDT_BSC' + | 'USDT_BASE' + | 'USDC_ETH' + | 'USDC_ARB' + | 'USDC_SOL' + | 'USDC_BSC' + | 'USDC_BASE' + | 'WETH_ETH' + | 'stETH_ETH'; + + switch (tokenSymbol) { + case 'WETH': + case 'stETH': { + // These deployments represent Sepolia tokens, not other chains' assets. + if (originChain !== CHAIN.ETHEREUM_SEPOLIA) + throw new Error( + `Unsupported ${tokenSymbol} origin chain for synthetic mapping` + ); + key = tokenSymbol === 'WETH' ? 'WETH_ETH' : 'stETH_ETH'; + break; + } + case 'ETH': { + if (isEthFamily) key = 'pETH'; + else if (isArbFamily) key = 'pETH_ARB'; + else if (isBaseFamily) key = 'pETH_BASE'; + else + throw new Error('Unsupported ETH origin chain for synthetic mapping'); + break; + } + case 'SOL': { + if (!isSolFamily) + throw new Error('SOL token provided but origin is not Solana'); + key = 'pSOL'; + break; + } + case 'BNB': { + if (!isBnbFamily) + throw new Error('BNB token provided but origin is not BNB Testnet'); + key = 'pBNB'; + break; + } + case 'USDT': { + if (isEthFamily) key = 'USDT_ETH'; + else if (isArbFamily) key = 'USDT_ARB'; + else if (isBaseFamily) key = 'USDT_BASE'; + else if (isBnbFamily) key = 'USDT_BSC'; + else if (isSolFamily) key = 'USDT_SOL'; + else + throw new Error('Unsupported USDT origin chain for synthetic mapping'); + break; + } + case 'USDC': { + if (isEthFamily) key = 'USDC_ETH'; + else if (isArbFamily) key = 'USDC_ARB'; + else if (isBaseFamily) key = 'USDC_BASE'; + else if (isBnbFamily) key = 'USDC_BSC'; + else if (isSolFamily) key = 'USDC_SOL'; + else + throw new Error('Unsupported USDC origin chain for synthetic mapping'); + break; + } + default: + throw new Error(`Unsupported token symbol: ${tokenSymbol}`); + } + + return { + address: assertDeployed(map[key], `${tokenSymbol} on ${originChain}`), + chain: originChain, + symbol: tokenSymbol, + decimals: tokenDecimals, + network, + }; +} diff --git a/packages/core/src/lib/utils.ts b/packages/core/src/lib/utils.ts index 7670f2c3..5f24d758 100644 --- a/packages/core/src/lib/utils.ts +++ b/packages/core/src/lib/utils.ts @@ -1,3 +1,7 @@ +import { agenticPresets } from './agentic/presets'; +import { allRoutableAssets } from './agentic/management/rule-inputs'; +import { jobSpecUtils } from './job-spec'; +import { validateAgentCardRules, encodeAgentCardRules, decodeAgentCardRules } from './market/rules'; import { convertOriginToExecutor, fromChainAgnostic, @@ -18,7 +22,7 @@ import { PAYABLE_TOKENS, type MoveableToken, } from './constants/tokens'; -import { SYNTHETIC_PUSH_ERC20 } from './constants/chain'; +import { getPRC20Address } from './universal/prc20-address'; import { UniversalAccount } from './universal/universal.types'; import type { PushChain } from './push-chain/push-chain'; import { encodeFunctionData, formatUnits, getAddress } from 'viem'; @@ -309,7 +313,8 @@ export class Utils { } // SVM path: explicit idl, or legacy abi-as-IDL for backward compat. - const svmIdl: Idl | undefined = idl ?? (isAnchorIdl(abi) ? abi : undefined); + const svmIdl: Idl | undefined = + idl ?? (isAnchorIdl(abi) ? abi : undefined); if (svmIdl) { registerSvmIdl(svmIdl); const bytes = encodeAnchorIxData(svmIdl, functionName, args); @@ -771,179 +776,7 @@ export class Utils { * }); * ``` */ - getPRC20Address( - token: MoveableToken | { chain: string; address: string }, - options?: { network?: PUSH_NETWORK } - ): { - address: `0x${string}`; - chain: CHAIN; - symbol: string; - decimals: number; - network: PUSH_NETWORK; - } { - const network = options?.network ?? PUSH_NETWORK.TESTNET_DONUT; - - const assertDeployed = ( - addr: string | undefined, - ctx: string - ): `0x${string}` => { - if (!addr || addr === '0xTBD') { - throw new Error( - `PRC20 address not available for ${ctx} on network ${network}` - ); - } - return addr as `0x${string}`; - }; - - // PushChainMoveableToken (pETH, pSOL, pUSDT(BNB), …) carries its PRC-20 address - // and origin `sourceChain` directly — no registry lookup needed. - const pcToken = token as Partial<{ - prc20Address: `0x${string}`; - sourceChain: CHAIN; - symbol: string; - decimals: number; - }>; - if (pcToken.prc20Address) { - return { - address: assertDeployed( - pcToken.prc20Address, - `${pcToken.symbol ?? 'token'} (${pcToken.sourceChain ?? 'unknown'})` - ), - chain: pcToken.sourceChain as CHAIN, - symbol: pcToken.symbol as string, - decimals: pcToken.decimals as number, - network, - }; - } - - // Infer origin chain, symbol, decimals by matching against MOVEABLE_TOKENS - let originChain: CHAIN | undefined; - let tokenSymbol: string | undefined; - let tokenDecimals: number | undefined; - - if ('symbol' in token) { - // MoveableToken path: infer chain by symbol + address - for (const [key, list] of Object.entries(MOVEABLE_TOKENS)) { - const k = key as CHAIN; - const match = (list ?? []).find( - (t) => t.symbol === token.symbol && t.address === token.address - ); - if (match) { - originChain = k; - tokenSymbol = match.symbol; - tokenDecimals = match.decimals; - break; - } - } - } else { - // { chain, address } path: trust the provided chain and resolve symbol via registry - originChain = token.chain as CHAIN; - const list = MOVEABLE_TOKENS[originChain] ?? []; - const match = list.find((t) => t.address === token.address); - if (match) { - tokenSymbol = match.symbol; - tokenDecimals = match.decimals; - } - } - - if (!originChain || !tokenSymbol || tokenDecimals === undefined) { - throw new Error( - 'Unable to infer origin chain or token symbol for token' - ); - } - - const map = SYNTHETIC_PUSH_ERC20[network]; - if (!map) { - throw new Error( - `No PRC20 address map configured for network: ${network}` - ); - } - - // Map token → synthetic key by origin chain family - const isEthFamily = - originChain === CHAIN.ETHEREUM_MAINNET || - originChain === CHAIN.ETHEREUM_SEPOLIA; - const isArbFamily = originChain === CHAIN.ARBITRUM_SEPOLIA; - const isBaseFamily = originChain === CHAIN.BASE_SEPOLIA; - const isBnbFamily = originChain === CHAIN.BNB_TESTNET; - const isSolFamily = originChain === CHAIN.SOLANA_DEVNET; - - let key: - | 'pETH' - | 'pETH_ARB' - | 'pETH_BASE' - | 'pBNB' - | 'pSOL' - | 'USDT_ETH' - | 'USDT_ARB' - | 'USDT_SOL' - | 'USDT_BSC' - | 'USDT_BASE' - | 'USDC_ETH' - | 'USDC_ARB' - | 'USDC_SOL' - | 'USDC_BSC' - | 'USDC_BASE'; - - switch (tokenSymbol) { - case 'ETH': { - if (isEthFamily) key = 'pETH'; - else if (isArbFamily) key = 'pETH_ARB'; - else if (isBaseFamily) key = 'pETH_BASE'; - else - throw new Error( - 'Unsupported ETH origin chain for synthetic mapping' - ); - break; - } - case 'SOL': { - if (!isSolFamily) - throw new Error('SOL token provided but origin is not Solana'); - key = 'pSOL'; - break; - } - case 'BNB': { - if (!isBnbFamily) - throw new Error('BNB token provided but origin is not BNB Testnet'); - key = 'pBNB'; - break; - } - case 'USDT': { - if (isEthFamily) key = 'USDT_ETH'; - else if (isArbFamily) key = 'USDT_ARB'; - else if (isBaseFamily) key = 'USDT_BASE'; - else if (isBnbFamily) key = 'USDT_BSC'; - else if (isSolFamily) key = 'USDT_SOL'; - else - throw new Error( - 'Unsupported USDT origin chain for synthetic mapping' - ); - break; - } - case 'USDC': { - if (isEthFamily) key = 'USDC_ETH'; - else if (isArbFamily) key = 'USDC_ARB'; - else if (isBaseFamily) key = 'USDC_BASE'; - else if (isBnbFamily) key = 'USDC_BSC'; - else if (isSolFamily) key = 'USDC_SOL'; - else - throw new Error( - 'Unsupported USDC origin chain for synthetic mapping' - ); - break; - } - default: - throw new Error(`Unsupported token symbol: ${tokenSymbol}`); - } - - return { - address: assertDeployed(map[key], `${tokenSymbol} on ${originChain}`), - chain: originChain, - symbol: tokenSymbol, - decimals: tokenDecimals, - network, - }; - }, + getPRC20Address, /** * Resolve a PC20 token against UniversalCore's on-chain registry, and list @@ -1042,6 +875,15 @@ export class Utils { }, }; + /** Pure preset discovery/templates; internal encoders and identifiers stay private. */ + static readonly agentic = Object.freeze({ + presets: agenticPresets, + /** Every token Push can send to a chain, with default limits (MOVEABLE ALL). */ + assets: Object.freeze({ all: allRoutableAssets }), + }); + static readonly job = jobSpecUtils; + static readonly market = Object.freeze({ validateAgentCardRules, encodeAgentCardRules, decodeAgentCardRules }); + /** * Internal: resolves a CHAIN enum from either a CHAIN value or a PushChain client instance. */ diff --git a/packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts b/packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts new file mode 100644 index 00000000..d117592e --- /dev/null +++ b/packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts @@ -0,0 +1,75 @@ +import { bytesToHex, parseTransaction } from 'viem'; +import { EvmClient } from './evm-client'; +import { CHAIN } from '../constants/enums'; +import type { UniversalSigner } from '../universal/universal.types'; +const account = '0x3333333333333333333333333333333333333333', + executor = '0x4444444444444444444444444444444444444444'; +function fixture() { + const client = new EvmClient({ rpcUrls: ['http://localhost:8545'] }); + const estimateGas = jest.fn(), + send = jest + .fn, [Uint8Array]>() + .mockResolvedValue(new Uint8Array(32)); + client.publicClient = { + estimateGas, + getCode: jest.fn().mockResolvedValue('0xef0100' + executor.slice(2)), + estimateFeesPerGas: jest.fn().mockResolvedValue({ + maxFeePerGas: BigInt(10), + maxPriorityFeePerGas: BigInt(1), + }), + getChainId: jest.fn().mockResolvedValue(42101), + getTransactionCount: jest.fn().mockResolvedValue(5), + } as never; + const signer: UniversalSigner = { + account: { chain: CHAIN.PUSH_TESTNET_DONUT, address: account }, + signMessage: async (x) => x, + signAuthorization: jest.fn().mockResolvedValue({ + address: executor, + chainId: 42101, + nonce: 6, + yParity: 0, + r: '0x' + '11'.repeat(32), + s: '0x' + '22'.repeat(32), + }), + signAndSendTransaction: send, + }; + const run = () => + client.sendBatch7702({ + executor, + signer, + calls: [ + { to: executor, value: BigInt(0), data: '0x12345678' }, + { to: executor, value: BigInt(0), data: '0x12345678' }, + ], + }); + return { client, estimateGas, send, run }; +} +describe('7702 estimation without guessed per-call ceilings', () => { + it('uses a real estimate for an already delegated account when authorization RPC support is absent', async () => { + const f = fixture(); + f.estimateGas + .mockRejectedValueOnce(new Error('unsupported auth list')) + .mockResolvedValueOnce(BigInt(1_400_000)); + await f.run(); + const tx = parseTransaction(bytesToHex(f.send.mock.calls[0][0])); + expect(tx.gas).toBe(BigInt(1_705_000)); + expect(f.estimateGas.mock.calls[1][0]).not.toHaveProperty('stateOverride'); + }); + it('uses a delegation override for a fresh account only when authorization estimation fails', async () => { + const f = fixture(); + (f.client.publicClient.getCode as jest.Mock).mockResolvedValue('0x'); + f.estimateGas + .mockRejectedValueOnce(new Error('unsupported')) + .mockResolvedValueOnce(BigInt(2_000_000)); + await f.run(); + expect(f.estimateGas.mock.calls[1][0].stateOverride[0].code).toBe( + '0xef0100' + executor.slice(2) + ); + }); + it('does not broadcast a guessed gas budget when all supported estimates fail', async () => { + const f = fixture(); + f.estimateGas.mockRejectedValue(new Error('execution rejected')); + await expect(f.run()).rejects.toThrow('execution rejected'); + expect(f.send).not.toHaveBeenCalled(); + }); +}); diff --git a/packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts b/packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts index 97ef53af..bfdf2191 100644 --- a/packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +++ b/packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts @@ -25,7 +25,7 @@ describe('EvmClient dynamic gas estimation', () => { .fn() .mockImplementation(async (unsignedTx: Uint8Array) => { const parsed = parseTransaction(bytesToHex(unsignedTx)); - expect(parsed.gas).toBe(estimatedGas); + expect(parsed.gas).toBe(BigInt(969_600)); expect(parsed.nonce).toBe(9); return Uint8Array.from(Buffer.from(TX_HASH.slice(2), 'hex')); }); @@ -57,9 +57,9 @@ describe('EvmClient dynamic gas estimation', () => { const estimatedGas = BigInt(21_062); const client = new EvmClient({ rpcUrls: ['http://localhost:8545'] }); client.publicClient = { - getCode: jest.fn().mockResolvedValue( - '0xef01000106bf2f9b02f32203a83a3bdad79fe8818f3796' - ), + getCode: jest + .fn() + .mockResolvedValue('0xef01000106bf2f9b02f32203a83a3bdad79fe8818f3796'), estimateGas: jest.fn().mockResolvedValue(estimatedGas), estimateFeesPerGas: jest.fn().mockResolvedValue({ maxFeePerGas: BigInt(10), @@ -73,7 +73,7 @@ describe('EvmClient dynamic gas estimation', () => { .fn() .mockImplementation(async (unsignedTx: Uint8Array) => { const parsed = parseTransaction(bytesToHex(unsignedTx)); - expect(parsed.gas).toBe(estimatedGas); + expect(parsed.gas).toBe(BigInt(25_275)); return Uint8Array.from(Buffer.from(TX_HASH.slice(2), 'hex')); }); const signer: UniversalSigner = { @@ -137,4 +137,45 @@ describe('EvmClient dynamic gas estimation', () => { expect(client.publicClient.estimateGas).not.toHaveBeenCalled(); }); + + it.each([ + { explicitGas: undefined, expectedGas: BigInt(579_802) }, + { explicitGas: BigInt(500_000), expectedGas: BigInt(500_000) }, + ])( + 'adds headroom for the observed AGW outbound estimate unless gas is explicit ($explicitGas)', + async ({ explicitGas, expectedGas }) => { + // At the same Donut block, this estimate reverted while 500,000 gas passed. + const client = new EvmClient({ rpcUrls: ['http://localhost:8545'] }); + client.publicClient = { + estimateGas: jest.fn().mockResolvedValue(BigInt(483_168)), + estimateFeesPerGas: jest.fn().mockResolvedValue({ + maxFeePerGas: BigInt(10), + maxPriorityFeePerGas: BigInt(1), + }), + getChainId: jest.fn().mockResolvedValue(42101), + } as unknown as typeof client.publicClient; + const signer: UniversalSigner = { + account: { chain: CHAIN.PUSH_TESTNET_DONUT, address: ACCOUNT }, + signMessage: async (data) => data, + signAndSendTransaction: jest.fn(async (unsignedTx: Uint8Array) => { + expect(parseTransaction(bytesToHex(unsignedTx)).gas).toBe( + expectedGas + ); + return Uint8Array.from(Buffer.from(TX_HASH.slice(2), 'hex')); + }), + }; + + await client.sendTransaction({ + to: TARGET, + data: '0x12345678', + signer, + nonce: 12, + gas: explicitGas, + }); + + expect(client.publicClient.estimateGas).toHaveBeenCalledTimes( + explicitGas ? 0 : 1 + ); + } + ); }); diff --git a/packages/core/src/lib/vm-client/evm-client.ts b/packages/core/src/lib/vm-client/evm-client.ts index 772fcbaa..88e365ea 100644 --- a/packages/core/src/lib/vm-client/evm-client.ts +++ b/packages/core/src/lib/vm-client/evm-client.ts @@ -275,13 +275,19 @@ export class EvmClient { const resolveGas = async (): Promise => { if (explicitGas) return explicitGas; - const estimate = () => - this.publicClient.estimateGas({ + const estimate = async () => { + const estimatedGas = await this.publicClient.estimateGas({ account: signer.account.address as `0x${string}`, to, data, value, }); + // Leave headroom for nested calls and state changes before inclusion, + // as on the EIP-7702 batch path. Donut can return an estimate that + // reverts inside an AGW -> gateway -> token call even at the same state. + // This is the Push execution limit, separate from destination gas. + return (estimatedGas * BigInt(120) + BigInt(99)) / BigInt(100); + }; if (data !== '0x') return estimate(); @@ -422,29 +428,35 @@ export class EvmClient { throw new EIP7702NotSupportedError(err); } - // Estimate gas against the delegated account: override the EOA's code with - // the 7702 delegation designator (0xef0100 || executor) so estimation runs - // the executor. Fall back to a safe ceiling if the node rejects overrides. + // Prefer authorization-aware estimation of the actual type-4 transaction. + // Some RPCs reject that format or state overrides. An ordinary estimate is + // valid only if the account is already delegated to this exact executor. + // Never guess a per-call ceiling: contract deployment/grants vary in cost. + const delegation = ('0xef0100' + executor.slice(2)) as Hex; let gas: bigint; try { gas = await this.publicClient.estimateGas({ account, to: account, data, - stateOverride: [ - { - address: account, - code: ('0xef0100' + executor.slice(2)) as Hex, - }, - ], + authorizationList: [authorization as never], }); - gas = (gas * BigInt(120)) / BigInt(100); // headroom for delegation + auth } catch { - // Estimation unavailable (e.g. node rejects state overrides). Scale the - // ceiling with the batch size so large batches don't OOG — the legacy - // per-call loop budgeted ~500k gas per call; mirror that plus overhead. - gas = BigInt(500_000) * BigInt(calls.length) + BigInt(100_000); + const code = await this.publicClient.getCode({ address: account }); + if (code?.toLowerCase() === delegation.toLowerCase()) { + gas = await this.publicClient.estimateGas({ account, to: account, data }); + } else { + gas = await this.publicClient.estimateGas({ + account, + to: account, + data, + stateOverride: [{ address: account, code: delegation }], + }); + } } + // The fallback estimates omit authorization processing (25k intrinsic). + // Include it conservatively on every path, plus 20% execution headroom. + gas = (gas * BigInt(120) + BigInt(99)) / BigInt(100) + BigInt(25_000); const unsignedTx = serializeTransaction({ chainId, diff --git a/packages/core/tsconfig.agw-local.json b/packages/core/tsconfig.agw-local.json new file mode 100644 index 00000000..e547653d --- /dev/null +++ b/packages/core/tsconfig.agw-local.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": ["__agw-local__/**/*.ts", "src/**/*.d.ts"] +} diff --git a/packages/core/tsconfig.marketplace-local.json b/packages/core/tsconfig.marketplace-local.json new file mode 100644 index 00000000..023b9ecd --- /dev/null +++ b/packages/core/tsconfig.marketplace-local.json @@ -0,0 +1,5 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { "module": "commonjs", "types": ["jest", "node"] }, + "include": ["__market-local__/**/*.ts", "src/**/*.d.ts"] +} diff --git a/plan/SDK-CHANGELOG.md b/plan/SDK-CHANGELOG.md new file mode 100644 index 00000000..02ee947f --- /dev/null +++ b/plan/SDK-CHANGELOG.md @@ -0,0 +1,83 @@ +# Agentic SDK development history + +Running history for work continued on `feat/agw-sdk-v4`, covering AGW, marketplace and job SDK delivery. This is a development record; package releases remain tracked in `packages/core/CHANGELOG.md`. + +For each meaningful checkpoint, add a dated entry with the change, decisions, validation, remaining work and relevant commit/evidence links. Keep earlier entries as history and mark superseded decisions explicitly. Distinguish implemented code, planning, local/fork checks, funded execution, Git delivery and package publication. Git history for this file records the exact commit introducing each checkpoint. + +## 2026-10-24 — team answers: working presets, tokens-only rules, ALL + +**Implemented:** +- Presets contain only the six testnet entries that work: Uniswap V3 and Aave V3 on Sepolia, Base Sepolia and Arbitrum Sepolia. They send native ETH, wrap it on arrival and return `{ rules }` without readiness. +- Tokens-only EVM rules become transfers back to the owner, plus `transferTo`. +- `MOVEABLE.TOKEN..ALL` and `utils.agentic.assets.all`. +- The 8-function Push limit is reported first. +- `fromEnd` Solana pins are refused on write. +- Two encode-only URP errors are now decoded. + +**Decisions:** recorded in `plan/agw/questions-{harsh,aman,zaryab}.md`. The `.old` Circle mapping stays for hand-written rules. + +**Validation:** +- Units, 108 local v6 contract tests, build, docs/package checks, read-only on-chain compatibility (6/6) and Donut preparation (6/6) pass. +- Live: all six presets pass with first and subsequent sends, and `agw-tokens-only` passes 2/2. +- The DEX acceptance now picks the Uniswap fee tier with QuoterV2, because Arbitrum Sepolia's 0.05% pool returns nothing for small swaps. +- One Base outbound stayed node-`PENDING` after delivering; a re-run passed. + +**Git delivery:** pending on `feat/agw-sdk-v4`. + +## 2026-10-20 — concise contracts-team handoff + +Reduced [pending questions](marketplace/questions.md) to the two current dependencies: canonical CEA deployments and the shared JobSpec/evaluator interface. Removed resolved and deferred discussions from the handoff; earlier context remains in Git history and the research docs. Documentation only; no SDK behavior changed. + +## 2026-10-20 — SDK-only completion before contract/deployment handoff + +**Implemented:** opening proof and mined-input recovery without re-signing; immutable reviewed inputs; event-hash/transaction-input recovery for same-block and archive-less card history; resumable paid previews with zero new payment, direct prepared-read sending and ABI-name/decimal descriptions; exact watcher cursors, deduplication, callback isolation and canonical-cursor reorg stop; provider write simulation. Native single/atomic sends now preserve broadcast hashes after receipt/index failures and cannot fall back after broadcast. Signature fixtures compile from repo-owned source; the CI reporter derives success from final counts instead of Jest's pre-final flag. + +**Validation:** 2,246 units pass (12 existing skips), 11 real-stack fork cases, six live cases across serial basic/funding runs. Real principal and BSC-origin bridging, native/AGW atomic pUSDC escrow, provider submission and controlled manual-evaluator payouts pass. Cards 4/5 are inactive; market jobs 4/7/8/9 are Rejected with grants revoked, plain jobs 5/6 Completed, and deposited/reserve/payout tokens returned. Real local ERC-1271/7702 variants and same-block history pass. Build/types, production lint, package/API checks and eight guide blocks pass. [Evidence and limits](marketplace/research/sdk-independent-2026-10-20/README.md). + +**Boundary:** [SDK-only checklist complete](marketplace/sdk-readiness.md). Current team dependencies are the three CEA rollout mismatches and a compatible automatic evaluator/shared schema/verify ABI. Older SDK placeholders and acceptance gaps above are superseded. Future product scope and package publication remain separate; no marketplace, hook, kernel or evaluator was deployed/upgraded. No team messages were sent. + +## 2026-10-20 — deposits, paid preview and external EVM owners + +**Implemented:** `market.deposit` recovers the opened card version and principal, combines shared-token requirements, tops up principal/fee/PC separately and retains receipts/pending hashes for recovery. Explicit registered-origin funding is available. Deployed v2 grants pinned approvals to the agent; deposit performs no retired owner-approval step. Paid `previewJobSpec` uses raw universal reads, total request-fee caps, ABI layout decoding, configured CEA resolution and unknown-aware logic/baselines. Opening checks the actual EIP-712 domain and simulates the complete signed request before broadcast; deployed external EVM UEAs are supported. + +**Validation:** 2,228 units pass (12 existing skips), eight real-stack fork E2Es, and three live cases: native open/cancel, paid validator-consensus preview, external-owner UEA open/cancel. Nonzero principal/fee deposits, escrow and payout remain fork-only; origin-bridge deposits are unit-tested. Live card 3 is inactive and jobs 2/3 are Rejected with permissions revoked. Build/types, production lint, package/API checks and six guide blocks pass. [Evidence and limits](marketplace/research/sdk-completion-2026-10-20/README.md). + +**Coverage:** 28 of the 29 named APIs on SDK pages 6/7 have implementations against deployed v2. This supersedes the first checkpoint's deposit, paid-preview and external-EVM placeholders. The remaining method placeholder is `job.verify`, awaiting a compatible evaluator/hook and shared wire. Three CEA destination rollouts, arbitrary ERC-1271 acceptance, full live principal/protocol execution and package publication remain separate work. Continue on `feat/agw-sdk-v4`; no marketplace/kernel/evaluator deployment or npm publication was performed. + +## 2026-10-20 — first marketplace SDK implementation + +**Implemented:** client.market discovery/provider management, exact preview and native plain-EOA open; client.job create/pricing/funding/submit/status/list/watch/cancel/refund; deployed v2 JobSpec/template/card-rule codecs, marker resolution and authoring helpers; additive universal.read.prepare; constants/types/errors and a [consumer guide](../packages/core/MARKETPLACE.md). Binary kernel description bytes survive encoding and reads. Default E2E selection stays unchanged. + +**Validation:** 2,205 units pass (12 existing skips); six real-stack SDK fork E2Es pass, including nonzero pUSDC escrow/payout and paused refunds; two read-only live cases and one funded register/open/cancel/revoke/deactivate smoke pass. Build/typechecks, new-production lint, source/built API equality and compiled guide/package checks pass. [Details](marketplace/research/sdk-implementation-2026-10-20/README.md). + +**New findings:** three destination CEA factory tables disagree, so preview fails closed there; BSC Testnet matches and passes live. The shared test master is delegated, so the passing live path uses a fresh native owner. Current open signing explicitly gates delegated/contract/external owners. An initial live attempt registered/deactivated card 1 without opening; the later fresh-owner run opened/cancelled job 1 and deactivated card 2. + +**Placeholders:** historical deposit orchestration, paid read preview, compatible automatic evaluation/retry, mutable criteria, relayer, external/delegated signing, recurring jobs and ratings. No successful dummy responses or deployment substitutions were added. No package or contract was published/deployed. Continue on feat/agw-sdk-v4; [status and next requirements](marketplace/implementation-status.md). + +## 2026-10-20 — marketplace research and implementation handoff + +**Planning delivered:** [plan/marketplace](marketplace/README.md) contains fresh exports of Notion pages 2/6/3/7/4/8, separately reviewed discussions, immutable contract/ABI snapshots, live Donut observations, a gap register, M4/K-12 analysis, the implementation sequence and draft team questions. This checkpoint adds no marketplace SDK runtime and sends no public-chain transactions or team comments. + +**Baseline:** deployed v2 from `sdk-iteration-v1@443b4e2dd9ca5dd9ffc8efebdfcecd619dd66c47`, AGW v6, pUSDC-only kernel and manual EOA evaluator. Work continues on `feat/agw-sdk-v4`. The latest AGW code checkpoint is `a542f303`. + +**Findings:** linked evaluator `8059817` has an incompatible JobSpec wire and enum ordinals; page 6's owner-approval array predates deployed pinned agent approvals; mutable criteria are inert; cancel frees occupancy but leaves AGW authority live; providerFee is a reference price. Recommendations and outstanding choices remain explicit in [questions](marketplace/questions.md), not silently treated as approved product changes. + +**Validation:** 248 ordinary contract tests, 2 separately run fork tests, 10 invariants at 64×64, and 4 independent review cases pass. All 5 executable runtime comparisons and all 4 CEA checks match. No funded live acceptance or automated evaluator execution is claimed. [Evidence and limits](marketplace/research/2026-10-20/validation.md). + +**Evidence handling:** the 45 MB invariant JSON log is retained losslessly as gzip with original/compressed checksums. Source exports remain byte-for-byte snapshots. Follow the implementation plan for the next SDK checkpoint and append its decisions, tests and remaining work here. + +## 2026-10-20 — AGW creation errors and UI messages + +**Implemented:** readable `userMessage` on SDK/revert errors; typed token-route and request-cancellation failures; rule/asset/call field context; complete per-rule constraint counts; destination read failures retain their classification and original causes. Updated the consumer guide and regression/contract assertions. + +**Validation:** the [creation-error review](agw/research/creation-error-review-2026-10-20/README.md) records 2,181 passing units, 12 skipped, 21 passing local v6 contract cases, build/type/package/API checks and changed-production lint. Before the Git checkpoint, all 72 tests across the three changed unit suites and the spec typecheck passed again; [exact checked-file hashes](agw/research/creation-error-review-2026-10-20/git-checkpoint-validation.json) are retained. No funded E2E or package publication was run for this change. + +**Remaining:** the DEX UI overflow trigger needs the installed SDK version and exact create payload. Stock presets have 20 conditions; duplicating generated calls reproduces 40. Do not remove permission conditions to fit the limit. + +**Git delivery:** `a542f303` (`fix(core): clarify agentic creation and rule errors`) on `feat/agw-sdk-v4`; a release-branch sync and npm publication are separate actions. + +## 2026-10-18 — starting AGW baseline + +AGW v6, bounded preset defaults, route-aware readiness and destination-funded preset grants were already implemented before this continued marketplace work. Lighter SDK-only PR checks were delivered in `6108348f`; the previous planning checkpoint is `4206fae6`. + +Recorded evidence: 2,142 full units, 107 local contract tests and 9/9 read-only factory simulations. Earlier v6 funded evidence covers 69 distinct cases across multiple runs, not one clean full invocation. Publication remained manual at that checkpoint. See [AGW status](agw/implementation-status.md) and [release-readiness evidence](agw/research/preset-release-readiness-2026-10-18/README.md). diff --git a/plan/agw/.gitattributes b/plan/agw/.gitattributes new file mode 100644 index 00000000..1ec16539 --- /dev/null +++ b/plan/agw/.gitattributes @@ -0,0 +1,5 @@ +# Preserve native exports and raw tool output, including original whitespace. +notion/** -whitespace +research/validation-e704d5b/*.log -whitespace +implementation-review/**/*.log -whitespace +research/product-alignment-2026-10-04/*.log -whitespace diff --git a/plan/agw/README.md b/plan/agw/README.md new file mode 100644 index 00000000..0342444c --- /dev/null +++ b/plan/agw/README.md @@ -0,0 +1,52 @@ +# AGW SDK planning + +**Current — October 14:** [v6 SDK migration and acceptance](research/v6-integration-2026-10-14/status.md) supersede the deployment-dependent statements below. Code is local on v4: 2,073 units, 99 contract-backed tests, and 69 distinct live cases have passing coverage. V6 code committed on v4 (`7dca3f2a`) and v5 (`700a52a7`); not pushed yet. + +**Current — October 12:** [downloaded sections 6/7, changes and deployment dependencies](section6-action-items.md). SDK-only migration and the [preset framework](section7-presets.md) are implemented locally; [open items](pending-items.md) supersede older decision summaries below. Notion pages 1/5 were refreshed; other ten snapshots retain October 7 timestamps. The new contract feedback is not deployed. + +This package contains planning, source snapshots and review evidence for `feat/agw-sdk-v4`. Current runtime uses Donut v5 source `2e61e13`; legacy runtime adapters have been removed. + +**October 7:** product decisions are settled. Public named-IDL Solana lifecycle/sends/reads/replay are implemented, rule `ref` is removed, zero native PC defaults are confirmed, and native/EVM raw-offset authoring is approved. Seven additional E2Es passed on Donut/devnet, bringing the opt-in AGW group to 46 scenarios at that checkpoint; the subsequent fixes extend it to 48 scenarios with selected-run live coverage. The final local/unit/build results are in [implementation status](implementation-status.md). + +Editable labels are now delivered and integrated through v5; no standalone contract delivery item remains. The existing agent door already validates the supplied rule; the SDK retains its ambiguity guard when several candidates match. [Zaryab delivery items](questions-zaryab.md); [confirmed decisions](questions-harsh.md). + +Consumer documentation lives in [packages/core/AGW.md](../../packages/core/AGW.md). Earlier dated reports below are historical evidence; their pending-capability statements describe those earlier revisions. + +Latest source check: [full October 7 Notion/contract refresh](research/source-refresh-2026-10-07/README.md). Only the create-example ref line changed in that Notion export; a later v5 deployment adds stored wallet labels. See [v5 migration](research/v5-implementation-2026-10-07/README.md). G27/G28 are now closed by [SDK alignment fixes](research/sdk-alignment-fixes-2026-10-07/README.md): contract-derived policy errors and public owner funds-only SOL/SPL requests. + +## Start here + +| Document | Purpose | +| --- | --- | +| [Consumer AGW guide](../../packages/core/AGW.md) | Public SDK examples for creation, funding, rules, execution and recovery | +| [Current baseline](current-baseline.md) | Source revisions, capabilities and remaining differences | +| [SDK design review](sdk-design-review.md) | Proposed internal architecture and execution flows | +| [Gap register](gaps.md) | Current G01–G28 findings and closure criteria | +| [SDK owned review](sdk-owned-review.md) | Internal decisions, existing-code evidence and 183 passing unit tests | +| [Implementation plan](implementation-plan.md) | Complete 17-step roadmap, module layout, assumptions, API coverage and PR sequence | +| [Implementation agent prompt](implementation-agent-prompt.md) | Handoff instructions, unit/E2E requirements and existing runner conventions | +| [Implementation status](implementation-status.md) | Per-step matrix (unit / local real-contract / live) and A01–A08 status | +| [Implementation review handoff](implementation-review-handoff.md) | Revisions, changed modules, commands and counts, real-vs-mock evidence, review hotspots | +| [Interactive tutorial](agw-tutorial.html) | Account, rule, funding and execution diagrams; open in a browser | +| [Integrator obligations](contract-integrator-obligations.md) | Contract-delegated SDK/product requirements | +| [Pending items](pending-items.md) | Open items with owners, including the multi-action native rule decision | +| [External blockers](external-blockers.md) | Remaining defaults/type clarification and contract/deployment dependencies | +| [Questions for Harsh](questions-harsh.md) | Product decisions and recommendations | +| [Questions for Zaryab](questions-zaryab.md) | Ref/label v1 scope and joint Solana review; fixture request closed | +| [Public API proposals](public-api-proposals.md) | Historical proposals with their final dispositions | +| [Review summary](review-summary.md) | Consequential independent-review corrections | + +## Sources and evidence + +- [Notion links and refresh instructions](SOURCES.md); [source manifest](source-manifest.json). +- Latest copies of all 12 registered pages under notion/. September references are labeled historical in the index. +- [October 3 refresh report](research/notion-refresh-2026-10-03.md): pages 1 and 5 changed; ten are unchanged. Latest raw exports and changed-page diffs are retained. +- [e704d5b validation](research/validation-e704d5b/README.md): build and revised source pin pass; 563 passed, 0 failed, 6 skipped, plus seven passing review tests. Generated ABIs describe that tested revision, not the new multi-asset target. + +Older planning revisions, duplicated exports, superseded validation runs and the full independent-review working package were archived locally outside this repository. The review summary preserves the key corrections. Historical paths in the retained prior manifest describe the earlier pull and may refer to pruned archives. + +Before sharing questions, refresh remote refs and Notion again, record exact revisions and remove questions answered by newer evidence. No team messages or contract deployments have been sent by this work. Authorized, bounded testnet transactions are recorded in the live acceptance evidence. + +Latest coverage: [five added v5 E2Es and metadata fix](research/extended-v5-e2e-2026-10-07/README.md). All five new scenarios have live passing evidence. The AGW group registers 58 cases; default `all` is unchanged. Fresh Sepolia CEA delivery currently uses an explicit destination-gas budget in tests/examples; the upstream default remains a follow-up. + +**October 12 native multi-action acceptance:** 10/10 new live cases passed; 68 AGW cases are registered. Full units: 2,034 passed; actual-contract harness: 97 passed. Input validation and checkpoint documentation fixes are local on `feat/agw-sdk-v4`, following the user’s v5 merge. [Evidence](research/native-multi-action-e2e-2026-10-12/README.md) · [Remaining items](pending-items.md). No commit or push was made for this work. diff --git a/plan/agw/SOURCES.md b/plan/agw/SOURCES.md new file mode 100644 index 00000000..dc0bce8f --- /dev/null +++ b/plan/agw/SOURCES.md @@ -0,0 +1,79 @@ +# AGW source links and refresh procedure + +**October 14 contract refresh:** deploy-agw head `e57998c`, deployment source `ffd567d`, fresh Donut v6 suite. [Change list](https://github.com/pushchain/push-agentic-wallets/blob/e57998c2d8ef9db15e69a68061ad3101120a6c6c/docs/6_Contract_Changes_v6.md) · [address book](https://github.com/pushchain/push-agentic-wallets/blob/e57998c2d8ef9db15e69a68061ad3101120a6c6c/deployments/address-book-v6/push_agw_contracts.json) · [SDK migration evidence](research/v6-integration-2026-10-14/status.md). No new Notion export is claimed by this contract-only refresh. + +**Latest focused refresh — October 12, 2026:** pages 1 and 5 re-exported with section 6 feedback and SDK section 7 presets. [Change list and deployment boundary](section6-action-items.md). Other ten pages retain their October 7 snapshots; this was not a contract deployment verification. + +**Latest full refresh — October 7, 2026:** all 12 Notion pages downloaded/imported (1 changed, 11 unchanged), current discussions inspected where exposed, and all three contract repositories fetched. AGW/gateway code is unchanged; core marketplace head `9479aef` adds docs only over `cb69e0b`. Donut code/wiring and Solana program fingerprints match prior probes. [Refresh report, evidence and SDK alignment findings](research/source-refresh-2026-10-07/README.md). + +The dated entries below preserve earlier observations and decisions; use the October 7 report and current decision documents for present status. + +October 6 contract refresh: fetched deploy-agw@10a24f101e2e6e0a9b76517b29f5cdb1aa967796; address book/owner guide report deployed source e8db74815cfbbf5389593805e464fe8d85f7f735, with no src difference between those commits. [GitHub snapshots/hashes, verified ABIs, Donut read-only evidence and SDK review](research/deployment-review-2026-10-06/README.md). This does not replace the Notion full-export manifest or imply SDK v4 support is already registered. + +Latest complete Notion export: October 7, 2026 at 15:57 IST. All 12 pages were imported; only page 5 changed (create-example ref removed). Page 5 defines the target public SDK API. Native exports omit comment threads. + +Focused October 4 recheck: page 5 was downloaded again; its body matches the saved snapshot after normalizing links. [Comparison evidence](research/notion-check-2026-10-04/comparison.json). This was not a full refresh and does not replace the full-import manifest. Harsh’s newer replies are recorded separately in [product decisions](product-decisions-2026-10-04.md). + +Focused October 5 comment review: live All discussions on pages 5 and 1, plus the overview’s visible page state, were inspected through Chrome. [Comment evidence and SDK impact](research/notion-comments-2026-10-05.md). Harsh’s new multiple-rules direction needs same-agent scope/send-selection clarification; token-independence wording needs a final definition. This was not a body export or contract refresh. Comments are recorded separately; snapshot hashes/pull timestamps remain unchanged. + +October 6 pre-sharing source recheck: all twelve saved Notion sources and relevant contract/SDK/sibling documents were searched; live pages 1/5 and All discussions were inspected again. All eight AGW remote branch heads were fetched; deploy-agw remains 10a24f1 and pushAgenticWallet_v3 remains e8db748. [Evidence and narrowed questions](research/question-source-recheck-2026-10-06/README.md). Same-agent capacity is now supplied; send selection remains open. Public Solana representation needs joint review, while a representative fixture is optional. No full Notion export, sibling fetch, new live deployment probe or snapshot hash change is claimed by this pass. + +Subsequent October 6 [live SVM wire validation](research/live-svm-wire-2026-10-06/README.md) re-verifies Donut wiring and devnet programs/configuration, records ProgramData fingerprints and proves actual wallet CEA delivery/replay. It closes the external fixture request. The rejected request first returned SDK timeout, later became REVERTED, and read-only replay confirmed failed with returned assets but unchanged policy spend. Public API agreement remains separate. No additional Notion export or contract-source change occurred. + +## Notion inventory + +| Document | Source | Local snapshot | Authority | +| --- | --- | --- | --- | +| AGW design overview | [Notion](https://app.notion.com/p/pushprotocol/AGW-UniversalMarketplace-8183-UniversalEvaluator-3e9188aea7f481c8b38ccba332b0afa2) | [Snapshot](notion/overview.md) | Supporting design | +| 1 AGW Contract Changes | [Notion](https://app.notion.com/p/pushprotocol/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d) | [Snapshot](notion/1-agw-contract-changes.md) | WIP contract target | +| 2 Universal Marketplace | [Notion](https://app.notion.com/p/pushprotocol/2-Universal-Marketplace-3e9188aea7f48118b90ac9b267496295) | [Snapshot](notion/2-universal-marketplace.md) | Supporting WIP design | +| 3 ERC-8183 job kernel and hook | [Notion](https://app.notion.com/p/pushprotocol/3-8183-job-kernel-and-hook-3e9188aea7f48188a838c3a740d8c858) | [Snapshot](notion/3-8183-job-kernel-and-hook.md) | Supporting WIP design | +| 4 Universal Evaluation | [Notion](https://app.notion.com/p/pushprotocol/4-Universal-Evaluation-3e9188aea7f4817bb03ef4c78c883f8b) | [Snapshot](notion/4-universal-evaluation.md) | Supporting WIP design | +| 5 SDK AGW | [Notion](https://app.notion.com/p/pushprotocol/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9) | [Snapshot](notion/5-sdk-agw.md) | Primary SDK API target | +| 6 SDK Universal Marketplace | [Notion](https://app.notion.com/p/pushprotocol/6-SDK-Universal-Marketplace-3ea188aea7f481e2961ed97129f3a4e6) | [Snapshot](notion/6-sdk-universal-marketplace.md) | Supporting WIP SDK | +| 7 SDK ERC-8183 Job | [Notion](https://app.notion.com/p/pushprotocol/7-SDK-8183-Job-3ea188aea7f481e0a137f5a896723376) | [Snapshot](notion/7-sdk-8183-job.md) | Supporting WIP SDK | +| 8 SDK Universal Evaluation | [Notion](https://app.notion.com/p/pushprotocol/8-SDK-Universal-Evaluation-3ea188aea7f48197a3b3cfdedfa74fee) | [Snapshot](notion/8-sdk-universal-evaluation.md) | Supporting WIP SDK | +| Legacy PUSH AGW SDK Doc v1 | [Notion](https://app.notion.com/p/pushprotocol/PUSH-AGW-SDK-Doc-v1-d2d188aea7f4825cbcea81ef86eca607) | [Snapshot](notion/legacy-agw-sdk-v1.md) | Historical encoding and deployment reference | +| AGW Address Book PC Donut | [Notion](https://app.notion.com/p/pushprotocol/AGW-Address-Book-PC-Donut-3d1188aea7f480ddbb4af6d0efb211e6) | [Snapshot](notion/agw-address-book-donut-2026-09-04.md) | Historical deployment | +| Agentic wallet flow updated | [Notion](https://app.notion.com/p/pushprotocol/agentic_wallet_flow-updated-3d1188aea7f4801f9cb3fbd9318ec536) | [Snapshot](notion/agentic-wallet-flow-2026-09-07.md) | Historical validator-based flow | + +The [manifest](source-manifest.json) stores stable page IDs, pull times and hashes. Latest raw ZIPs are under the timestamped notion/exports folder referenced by the manifest. The latest comparison, previous changed-page bodies and diffs are retained under notion/history. Older duplicate pulls were archived locally; paths inside manifest-before.json are historical metadata and may point to pruned archives. + +## Contract sources + +- **Current deployment source:** [AGW 2e61e13](https://github.com/pushchain/push-agentic-wallets/tree/2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb). +- **Current documentation:** [owner SDK guide](https://github.com/pushchain/push-agentic-wallets/blob/bd230d20dbf778d9994b1f1082f79b1a8829a10f/docs/5_SDK_Owner_Integration.md), [v5 Donut address book](https://github.com/pushchain/push-agentic-wallets/blob/bd230d20dbf778d9994b1f1082f79b1a8829a10f/docs/addresses/donut.md). Refreshable branch links: [guide](https://github.com/pushchain/push-agentic-wallets/blob/deploy-agw/docs/5_SDK_Owner_Integration.md), [addresses](https://github.com/pushchain/push-agentic-wallets/blob/deploy-agw/docs/addresses/donut.md). +- **Earlier SDK fixture source:** [AGW e704d5b](https://github.com/pushchain/push-agentic-wallets/tree/e704d5b58fd1d30ce02bc0ad74dccfbdb37804f9); nomenclature-changes was merged and deleted. +- [AGW design](https://github.com/pushchain/push-agentic-wallets/blob/e704d5b58fd1d30ce02bc0ad74dccfbdb37804f9/docs/1_AGW.md) and [policy design](https://github.com/pushchain/push-agentic-wallets/blob/e704d5b58fd1d30ce02bc0ad74dccfbdb37804f9/docs/2_UniversalRulesPolicy.md). +- [Core marketplace cb69e0b](https://github.com/pushchain/push-chain-core-contracts/tree/cb69e0ba101bef1bb4440e54b2c45396be3e92ce). +- [Gateway eight-field baseline bcbf7df](https://github.com/pushchain/push-chain-gateway-contracts/tree/bcbf7df42e8e6dd11088a43bcc0b056a54ea0a18). +- [Historical deployed AGW 67929f2](https://github.com/pushchain/push-agentic-wallets/tree/67929f208886187ec7bab5479d4036d45394cfb1). + +Source revisions describe inspected code, not a guarantee of current remote head or live deployment. Recheck before sharing questions. See [current baseline](current-baseline.md) and [review summary](review-summary.md). + +## Repeatable refresh + +1. Export the overview as Markdown and CSV with Include subpages enabled. Export the three historical references individually. +2. Supply all four downloaded ZIPs to the importer. Use --dry-run first to inspect the comparison. +3. Match pages by stable ID; retain raw exports, previous changed snapshots, diffs and manifest history. +4. Review changed requirements and update affected plans/questions; do not declare source features deployed without evidence. +5. Re-fetch contract refs and record exact SHAs before sharing. + +Also review **All discussions**, including resolved threads, on relevant live pages. Record author, displayed date/age, attached block and interpretation separately from exported bodies. A body-only comparison cannot establish that product decisions are unchanged. + +```sh +python3 plan/agw/scripts/import-notion-exports.py overview.zip legacy-sdk.zip address-book.zip flow.zip --dry-run +python3 plan/agw/scripts/import-notion-exports.py overview.zip legacy-sdk.zip address-book.zip flow.zip +``` + +Use actual ZIP paths. The script does not download or authenticate to Notion. It rejects conflicting inputs or locally edited snapshots, requires all registered pages unless --partial is explicitly used, and reports unexpected page IDs. Last-edited observations are not inferred from download time. No scheduled refresh is configured. + +The historical SDK refers to AGW-SDK-v1-agent.md, 05-universal-marketplace-startjob.md and SDK_HELPER.md. Their source URLs/files were not included in its export; those original unresolved references remain as written. + +October 7 v5 deployment: label contract dependency delivered. [New source snapshots and live read-only check](research/deployment-review-2026-10-07-v5/README.md); [SDK implementation and test evidence](research/v5-implementation-2026-10-07/README.md). Earlier dated deployment statements above are historical. + +October 15 focused import: [AGW Presets proposal and rules](https://app.notion.com/p/pushprotocol/AGW-Presets-proposal-and-rules-3f8188aea7f48020a9f0d10ea5325467), [snapshot](notion/agw-presets-proposal-and-rules.md), [catalog scope and verification](research/preset-catalog-2026-10-15/implementation-status.md). This was a single-page import, not a refresh of all sources. + +October 15 mainnet scope expansion: [official snapshots and pinned read-only verification](research/preset-mainnet-2026-10-15/README.md). [Separate live testnet acceptance](research/preset-live-2026-10-15/README.md). No mainnet transactions were broadcast. + +October 15 expanded testnet protocol acceptance and destination-aware token resolution: [fresh RPC probes, protocol interfaces, transactions and regression evidence](research/preset-expanded-live-2026-10-15/README.md). diff --git a/plan/agw/agw-tutorial.html b/plan/agw/agw-tutorial.html new file mode 100644 index 00000000..88bb9693 --- /dev/null +++ b/plan/agw/agw-tutorial.html @@ -0,0 +1,195 @@ + + + + + +How an Agentic Wallet works · Push Chain + + + +
+
Push Chain · AGW learning guide
+

How an Agentic Wallet works

+

Revision note: D3 sender authorization and stored checkpoints are implemented in source at pushAgenticWallet_v3@e704d5b. The documented Donut deployment is older. Editable labels, grant references, versioned envelopes and the new multi-asset terms remain target features. create no longer includes funding. Current baseline and corrections.

+

The owner funds a wallet and sets rules. An agent acts through that wallet. The contracts enforce what the agent can do, while the owner retains control.

+
Target SDK designContracts and integration are WIPReview · 3 October 2026
+ +
+
+
+
01 · Start with ownership

Three accounts, one control chain

+

An external owner, such as an Ethereum or Solana user, controls a Universal Executor Account (UEA) on Push. That account owns the AGW. When the AGW acts on another chain, its Chain Executor Account (CEA) performs the destination call. A native Push owner uses its EOA directly.

+
+
Identity on Push
Owner EOA or UEA

Creates the wallet, funds it separately and manages its rules.

+
owns
+
Wallet on Push
AGW

Holds assets and originates wallet actions. SmartSession and URP store the rules and policy state.

+
via gateway
+
Account on the destination
AGW’s CEA

Receives bridged assets and executes calls for this wallet.

+
+
+

The agent has its own identity

A native Push agent is an EOA. An agent with a key on another chain is represented by that key’s UEA on Push. Each rule names this Push address as its agent.

+

The destination account belongs to the AGW

The gateway sees the AGW as its caller and derives the AGW’s CEA. Keeping this identity intact is how the wallet holds the resulting destination position.

+
+
The same EVM key initialized against two different origin chains produces two different UEAs. Grant the rule to the UEA for the chain the agent will actually use.
+
+
+
02 · Follow the SDK flow

From wallet creation to a receipt

+

Step through the target flow. Switch between the owner and agent to see where authorization changes. These controls illustrate the design locally; they do not connect to a wallet or send transactions.

+
+
+
+
+
+ +
+
+

Derive the wallet before deploying it

STEP 01 / 06
+

The owner asks the SDK for the next wallet address. Within a fixed factory and implementation generation, owner and index determine the address.

+
+
+
+ +
+ + +
+
+
03 · Keep the balances straight

The agent and the wallet pay for different things

+
+

Signer’s PC balance

Pays for the transaction that invokes the AGW on Push. An external agent uses its UEA’s PC balance.

For an external agent’s first action, deployment and funding of an undeployed UEA can use an origin-chain fee lock. Later actions require PC in that deployed UEA, as specified by agentic-mode gas checks.

+

AGW’s assets and PC balance

PRC20 tokens are the wallet’s working funds. Its PC covers wallet-originated outbound fees and any applicable native value sent by the wallet.

PC in the AGW does not pay the separate transaction gas of the agent’s EOA or UEA. Rules cap PC per action, not over the rule lifetime. Repeated zero-amount actions can consume the funded PC balance without consuming token spend.

+
+
    +
  1. Owner funds the AGW

    For an external owner, assets can enter Push through the existing gateway and UEA flow before being transferred to the wallet.

  2. +
  3. Owner establishes gateway allowance

    The gateway pulls PRC20 from the AGW. An owner-authorized approval is needed before positive-amount outbound execution; the agent’s universal rule does not authorize Push-side approvals.

  4. +
  5. Agent invokes the wallet

    The agent’s Push identity pays invocation gas. URP checks the requested action against the selected rule.

  6. +
  7. AGW sends outbound

    For a cross-chain action, the AGW calls the gateway with its assets and PC. The destination CEA belongs to the AGW.

  8. +
  9. Destination CEA performs the work

    A protocol call executes from the CEA. Beneficiary checks constrain configured calldata arguments; they do not prove the protocol’s resulting outputs or asset movement.

  10. +
+
+
+
04 · Understand the two execution paths

Owner control and agent permission

+
+ + + + + +
QuestionOwnerAgent
Wallet entry pointexecuteexecuteAsAgent
Who is authorized?The wallet’s ownerThe Push address named by the rule
Are rules checked?Owner execution bypasses policyURP checks every call on-chain
What does the SDK select?The owner execution pathAn enabled rule for this agent and destination, on every send
What is recorded?Owner action checkpoints (implemented in current source)Rule authorization and relevant spending counters
+
+

A rule says what is allowed

Each rule names an agent, a destination and an expiry. Native rules constrain a target and selector; universal rules define an asset list with per-token caps, a per-outbound PC ceiling (maxGasPerCall) and allowed destination calls.

The target SDK rejects duplicate rules for an agent and chain; the contract itself can grant multiple active rules for the same pair. Lookup must handle that ambiguity explicitly. Rules for Push omit chainNamespace; external rules supply it.

+

Changing a rule creates a new rule

rules.update asserts the old spend, revokes the old rule and grants its replacement atomically. The new rule receives a new ID and fresh counters. A successful owner replacement batch adds five checkpoints. Evaluators compare snapshot counts, not only block numbers.

Revocation stops future authorization on Push. An outbound already dispatched may still complete on its destination.

+
+
Approval safety: a universal rule that allows destination approve(address,uint256) without a spender constraint can expose existing CEA balances. The newer marketplace rejects this configuration; use an agreed owner-controlled approval flow. The headline Notion example needs correction.
+
A destination failure does not currently have a guaranteed spend-credit path in the reviewed contract documents. Treat refunding funds, restoring spending allowance and paying gas as separate outcomes. See G07 in the gap register.
+
+
+
05 · Use the two SDK surfaces

Manage a wallet, or act through it

+

These examples show the planned API. Application signers, chain constants, rule definitions, token values and transaction calldata must be supplied by the application.

+
+

Manage as the owner

const owner = await PushChain.initialize(
+  ownerSigner, { network }
+);
+
+const { wallet, rulesIds } =
+  await owner.agentic.create('lending', {
+    rules: [ruleOnSepolia],
+  });
+
+// Fund tokens and PC separately with normal account tooling.
+// Establish required owner gateway allowances separately.
+const w = owner.agentic.wallet(wallet);
+const info = await w.info();
+const { rules } = await w.rules.list();
+

Send as the agent

const agent = await PushChain.initialize(
+  agentSigner,
+  { network, agenticWallet: wallet }
+);
+
+const tx = await agent.universal.sendTransaction({
+  to: { address: pool, chain: CHAIN.ETHEREUM_SEPOLIA },
+  data: supplyData,
+});
+
+const receipt = await tx.wait();
+// SDK from: AGW
+// SDK origin: agent's origin account
+
+
To execute as the owner, initialize with ownerSigner and the same agenticWallet option. The signer determines the execution path. The wallet handle itself is for management.
+

Agentic mode rejects any transaction from. The spec also disables payGasWith, migrateCEA, rescueFunds, prepareTransaction and executeTransactions in this mode.

+
+
+
06 · Where the other pieces fit

An AGW can work alone or participate in a job

+

The broader design adds discovery, escrow and evaluation around the wallet. These are separate namespaces and WIP components.

+
+
01 · client.market

Choose a card

A card describes the agent’s service, required access, fee and promised outcome. Compilation produces wallet rules and evaluation criteria.

+
02 · client.agentic

Authorize work

The owner creates or selects a wallet, funds it and grants rules. The agent executes within those rules.

+
03 · client.job

Bind and fund

The AGW is the job client. The job hook binds rules to a provider; the job kernel holds the fee in escrow.

+
04 · client.evaluation

Verify and settle

START reads establish a baseline. After work is submitted, END reads and criteria determine completion or rejection.

+
+

The intended lifecycle is select card → create and fund wallet/job → record baseline → agent works → submit → evaluate → settle. A passing evaluation pays the provider; rejection returns the fee to the client. Expiry provides a refund path under the job kernel’s conditions.

+
The design gives checkpoints a settlement consequence: an owner-side change after the baseline can cause the provider to be paid without END reads. Label changes are cosmetic and are excluded. The hook and evaluator implementation must match this rule. Checkpoints observe owner calls, not every balance change: pulling a pre-existing allowance can change balances without a new checkpoint.
+
+
+
07 · Before implementation

Follow the SDK spec and make the dependencies explicit

+

The target API is agreed. The contract and SDK gap register records the work needed to connect it to a compatible deployment.

+
    +
  • Contract entry and encoding: sender-gated execution, rule IDs, envelope encoding and compatible gateway versions need matched artifacts.
  • +
  • Atomicity: rule replacement must not inherit a non-atomic native fallback.
  • +
  • Shared definitions: rule expiry, job bindings and card identity need consistent definitions across SDK and contracts.
  • +
  • Compatibility: existing clients, Web2 reads, gas checks and transaction tracking need regression coverage.
  • +
+ +

Source priority: page 5 defines the target SDK behavior; source/spec conflicts are recorded for resolution, not silently overridden. September 4–22 documents describe historical UCEP/URP deployments and the earlier signature-key validation flow. The current engine retains a sender-checking adapter rather than validating an agent’s cryptographic session signature. The saved source index keeps these revisions distinct.

+
+
+
AGW planning workspace · Educational walkthrough of the target design · Reviewed 3 October 2026 · Contract source e704d5b · Saved Notion bodies 2 October
+ + + diff --git a/plan/agw/contract-integrator-obligations.md b/plan/agw/contract-integrator-obligations.md new file mode 100644 index 00000000..fd9d659b --- /dev/null +++ b/plan/agw/contract-integrator-obligations.md @@ -0,0 +1,31 @@ +# Contract-delegated SDK and product obligations + +Source: [AGW design chapter 10 at 0f279ca](https://github.com/pushchain/push-agentic-wallets/blob/0f279ca02242dfd8067ff716d24cad4b97bf29cb/docs/1_AGW.md#10--what-the-product-must-do-that-the-contracts-cannot). These requirements complement the public SDK spec. UI obligations need SDK metadata and examples even when the SDK itself owns no grant screen. + +| Source item | Required SDK/product acceptance work | +| --- | --- | +| 1 | Generate beneficiary positions from ABI information; reject layouts the encoder cannot represent safely. | +| 2 | For each supported protocol, test wrong beneficiary and oversized amount rejection. | +| 3 | Derive and display the wallet's destination account and deployment status. | +| 4 | Display expiry as prominently as the caps. | +| 5 | Expose destination idle balance so permission previews include existing exposure. | +| 6 | Render unlimited sentinels as unlimited, not huge numeric values. | +| 7 | Show old consumption before replacement. | +| 8 | Do not silently subtract prior spend from the user's replacement cap. | +| 9 | Explain that revocation cannot recall already-dispatched outbounds. | +| 10 | Document agent-address rotation, regrant and counter-reset consequences. | +| 11 | Expose the agent's separate PC gas balance and funding requirement. | +| 12 | Explain and support migration of balances across every destination when changing wallet generations. | +| 13 | Provide data for monitoring committed CEA versus current derivation; define the operational owner. | +| 14 | Show derived destination accounts during creation. Derivation is deployment-specific. | +| 15 | Show wallet PC funding and per-action ceiling; repeated zero-amount actions can spend the PC budget without consuming token spend. Any action-count estimate must state its assumptions. | +| 16 | Generate caller-requested native pins from ABI. Per Harsh H1 (October 4), approval screening and mandatory spender policy belong to UI/marketplace, not SDK rejection. | +| 17 | Preserve exact asset-reported chain strings; use connected Push chain identity for native rules. | +| 18 | Preview native actions, pins, value/amount/call limits; explain that any successful call consumes call count. | +| 19 | Compile SVM rules from the program interface, preserve interface hash, pin all relevant accounts/data, and reject unrepresentable layouts; revalidate after upgrades. | +| 20 | Restrict aggregator instruction variants and test substituted downstream programs. | +| 21 | Model SVM swap ratio floors, slippage, zero fees and regrant cadence. | +| 22 | Derive SVM CEA/token accounts from wallet and trusted registry gateway; no pasted gateway identity. | +| 23 | Arrange output token accounts before execution; constrain any permitted ATA creation to exact owner/mint/layout. | + +Items 19–23 apply when SVM destinations are enabled. They are not automatically deferred merely because the first SDK implementation may focus on EVM. Destination approval safety also needs the public decision described in the revised Harsh draft; native pinning rules alone do not solve universal approval hazards. diff --git a/plan/agw/current-baseline.md b/plan/agw/current-baseline.md new file mode 100644 index 00000000..ce98892a --- /dev/null +++ b/plan/agw/current-baseline.md @@ -0,0 +1,82 @@ +> October 14 update: v6 source `ffd567d` and its fresh Donut deployment supersede the v5 runtime baseline below. The SDK migration is implemented locally; 69 distinct live cases have passing coverage across the full run and focused follow-up. See [v6 evidence](research/v6-integration-2026-10-14/status.md). Older version-specific details below are historical. + +# Current validated AGW baseline + +Updated October 7, 2026 after confirmed product decisions, fresh contract refs, and public Solana/native acceptance. **The v5 deployment and native/EVM SDK adapter/codecs are integrated locally. The opt-in `agw` group now includes 58 scenarios with selected-run live coverage, including owner funds-only Solana transfers and mapped policy refusals.** [Extended E2E evidence](research/extended-e2e-2026-10-06/README.md); [full deployment review](research/deployment-review-2026-10-06/README.md). + +The public SDK target remains Notion page 5, qualified by Harsh's later replies/comments. The new owner guide establishes deployed wire behavior; the October 7 decisions remove rule ref, confirm defaults and existing ambiguity handling, and include the delivered v5 editable-label interface. [Prior October 3–5 baseline](research/deployment-review-2026-10-06/previous-current-baseline.md) is retained as historical evidence. + +## Pinned sources + +| Source | Revision and role | +| --- | --- | +| AGW deployment source | 2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb, reported by address book/owner guide | +| AGW documentation | deploy-agw@bd230d20dbf778d9994b1f1082f79b1a8829a10f; includes the v5 deployment and label docs | +| SDK contract adapter | V5 only (2e61e13); Donut registry populated; old runtime/test generation removed | +| Core marketplace | Refreshed universalMarketplace_v1@9479aeff5291bb06fa306f7efa98be9c45324cb0; docs-only advance over cb69e0b, source unchanged | +| Gateway source | Refreshed pc20-3rd-iteration@bcbf7df42e8e6dd11088a43bcc0b056a54ea0a18; code and live implementation slot unchanged | +| Notion | Full 12-page export October 7 at 15:57 IST; page 5 create-example ref removed; current primary discussions reviewed | + +[Saved GitHub sources and hashes](research/deployment-review-2026-10-06/source-manifest.json) are separate from the Notion manifest. [Verified ABIs](research/deployment-review-2026-10-06/abis/) came from the explorer. The earlier October 6 wire review is historical. [V5 SDK migration and acceptance](research/v5-implementation-2026-10-07/README.md) records the latest rebuild and test results. + +## Donut v5 deployment + +Chain 42101, RPC https://evm.donut.rpc.push.org/, pinned block **23991912**. [Probe](research/deployment-review-2026-10-07-v5/donut-probe.json). + +| Component | Address | +| --- | --- | +| Factory proxy | 0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5 | +| URP proxy | 0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af | +| Wallet implementation | 0x4D459Da499C14548aa16c46c57fD92880A88EBb4 | +| AgentValidator | 0x068EE2388475A98EE1f5a434C58bFF3444fffFe6 | +| SmartSession | 0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a | +| Gateway | 0x00000000000000000000000000000000000000C1 | + +Code sizes, factory/policy implementation slots, policy admin and wallet/policy wiring match the new book. Factory is unpaused; URP version is 3.1.0; pushChainHash matches eip155:42101. Wallet accountId remains push.agw.1.0.0 and is insufficient to distinguish envelope generations. Address book reports deployment blocks 23989983–23989987; release manifest should preserve deployment/log provenance. + +The earlier supplied historical addresses are superseded for new v5 integrations. Wallet clones remain generation-specific and do not migrate; prediction is stable within its factory context, not globally across factories. + +## Compatibility and remaining work + +| Surface | Deployed definition | SDK status/action | +| --- | --- | --- | +| Owner/agent doors | execute and sender-gated executeAsAgent; unchanged SmartSession | Preserve model, adapt/test selected generation; no engine fork | +| Session/IDs | abi.encode(agent), salt overwritten by grantNonce; rulesId wallet-scoped | Existing identity logic retained, new validator context | +| All policy envelopes | uint16 version=1, chainNamespace, body | Envelope 1 implemented; old envelope rejected by actual contracts | +| Universal EVM | 1–8 ordered AssetCaps, maxGasPerCall, address expectedCEA | Implemented, including source-chain/token identity validation and v5 reads | +| No-movement rules | One destination gas PRC20 cap at 0/0 when user assets empty | Implemented; actual-contract call-only case passes | +| Total ceilings | maxUint256 unlimited, zero hard zero | Universal max default/explicit zero and confirmed zero native PC defaults implemented | +| Internal replacement guard | assertSpent(configId,wallet,uint256[]) compares all totals in asset order | SDK implemented; second-token intervening spend rolls back replacement | +| Native terms | Same body layout, one config per action; envelope changed | V5 native tests pass; ABI offset validation retained | +| Multiple rules | Several same-agent/same-chain grants supported | Management permits multiplicity; ambiguous sends are refused by the SDK, and the contract enforces the supplied rule | +| Checkpoints | Stored count/last block, three event kinds, per-owner-call/lifecycle ticks | Local and registered live native/EVM lifecycle acceptance pass | +| Grant ref / label | Grant has no ref; label stored on wallet; owner/self setLabel, 64-byte cap, empty reset | Ref removed; v5 labels implemented. SDK owner-door rename adds one checkpoint | +| SVM | Full multi-asset terms/program/account/data pins supplied | Public named-IDL grants/reads/replacement/sends/revoke pass live, including destination CEA transfer and replay; unsupported IDL layouts are rejected explicitly. Prior internal rejection/terminal replay evidence remains valid. | +| Gateway request | Eight-field live implementation, selector 0x77b86bec | Dedicated context, listed-token choice and maxGasPerCall implemented | +| Allowance | Consume separate owner-established allowance | Keep existing race-safe behavior; Live allowance/token debit passes; remaining identity coverage explicit | +| Refund spend credit | creditRevert gains token; executor still does not call it | Known Push-core dependency; ordinary returns do not lower spent | +| Tracking/events | Metered/revert events include token | ABIs/imports updated; live call-only, positive-amount and external-failure tracking pass | + +The historical v3-to-v4 ABI comparison found changed policy getters, assertions, credit and events. [Comparison](research/deployment-review-2026-10-06/abi-comparison.json). V5 additionally changes the wallet initializer and adds label functions/event/error; those updated ABIs are generated from the isolated v5 build. + +## Focused verification + +Four checks passed: version-1 envelope round-trip/old first-word incompatibility; synthetic ordered two-asset tuple round-trip; live v4 getConfig decode with old-ABI rejection; array assertion encoding. [Results and limits](research/deployment-review-2026-10-06/wire-checks.json). This is not a rule-grant, stale-spend transaction or funded E2E proof. + +See [implementation status](implementation-status.md) for the final unit and actual-contract counts. All five explorer ABI sets match the isolated build. Donut is registered and all 48 registered AGW native/EVM/identity/management/policy/public-Solana cases have passing selected-run live coverage. The `agw` group remains opt-in; default `all` remains 76 scenarios. [Extended E2E evidence](research/extended-e2e-2026-10-06/README.md); [prior acceptance evidence](research/live-acceptance-2026-10-06/README.md). + +## Remaining delivery and acceptance + +The [full source refresh](research/source-refresh-2026-10-07/README.md) found SDK alignment follow-ups G27/G28: policy-preflight/error parity and Solana owner funds-only support. Both are now fixed and validated in the [follow-up report](research/sdk-alignment-fixes-2026-10-07/README.md). Contract/code deployment drift was not found. + +Product choices are settled: zero native PC defaults, current token budgets, named IDL Solana authoring, dual native/EVM argument-index/raw-offset inputs, and removal of rule ref. The implementation and seven new selected live cases cover these choices. + +Zaryab delivery is still needed for editable labels. The existing contract already enforces the supplied rule and rejects unauthorized actions. Keep AMBIGUOUS_RULE for multiple candidates; no automatic-selection interface or caller-facing selector is required. [Delivery items](questions-zaryab.md). + +Public Solana acceptance now passes. Source-authoring supports fixed Anchor layouts, one instruction per send, and configured devnet. See the [consumer guide](../../packages/core/AGW.md) for exact limits. The destination failure/retry and creditRevert platform limitations remain as recorded in the historical wire report. + +Checkpoint count semantics remain per action, not per transaction: assert/revoke/grant adds five ticks; failed transactions unwind ticks; agent calls do not tick. Pre-existing allowances may change balances without checkpoints. Preserve internal spend assertions even though public spent records are removed. + +The historical [October 6 source recheck](research/question-source-recheck-2026-10-06/README.md) records unchanged contract heads; the October 7 fetch confirmed the same refs. It records answered definitions separately from remaining public decisions and SDK-owned fixture validation; it does not claim a fresh live bytecode probe. + +Current v5 acceptance: 2,014 units and 90 actual-contract SDK cases pass. Expanded live evidence covers labels, native/lifecycle behavior, EVM, native SOL and SPL destinations; the full 58-case group has not run in one invocation. [Expanded results](research/extended-v5-e2e-2026-10-07/README.md). Fresh Sepolia CEA positive cases use an explicit 2m destination-gas budget; the current upstream 500k default was insufficient. SPL quoting/authoring/reads now handle absent source-mint metadata through the existing verified-chain token registry. diff --git a/plan/agw/external-blockers.md b/plan/agw/external-blockers.md new file mode 100644 index 00000000..8607cf16 --- /dev/null +++ b/plan/agw/external-blockers.md @@ -0,0 +1,13 @@ +# Remaining AGW external dependencies + +Updated October 7, 2026. Product decisions are settled: keep zero native PC defaults and the current token model; use named IDL inputs for Solana; retain dual native/EVM argument-index/raw-offset inputs; remove rule `ref`. + +| Dependency | Owner | Needed artifact | +| --- | --- | --- | +| Editable labels | Zaryab | Implemented owner-only label function/event ABI and compatible deployment | + +Fresh fetch still shows `deploy-agw@10a24f1` / source `e8db748`. Its agent door already enforces the supplied `rulesId`. The SDK retains AMBIGUOUS_RULE for multiple candidates and maps contract rejections. No automatic-selection interface is requested. Only setLabel needs a new AGW interface/deployment. + +Public Solana SDK integration is now implemented. Its supported IDL layouts and validation are documented in the [consumer guide](../../packages/core/AGW.md). See [implementation status](implementation-status.md) for test results. + +`creditRevert` remains a separate Push-core executor dependency. Returned funds do not restore policy spend. This does not require a new product decision or permit the SDK to decrement counters itself. diff --git a/plan/agw/gaps.md b/plan/agw/gaps.md new file mode 100644 index 00000000..09cf30e7 --- /dev/null +++ b/plan/agw/gaps.md @@ -0,0 +1,99 @@ +# AGW contract and SDK gap register + +**October 14 override:** G31–G33 contract delivery is received in v6 (`ffd567d`). SDK migration is implemented locally; 99 pinned-contract tests and 69 distinct live cases pass (full run plus focused follow-up). The older pending-deployment statements below are historical. Native ceiling 8, preset catalog/tuple convention and downstream refund credit remain open. [V6 migration evidence](research/v6-integration-2026-10-14/status.md). + +**Current override — October 12:** new sections 6/7 supersede the October 7 decisions below. [Feedback work list](section6-action-items.md); [only remaining items](pending-items.md). Unified allowedCalls, zero caps, spend reads, numeric Solana authoring/raw decoded updates, duplicate creation checks and direct label calls are implemented locally. Live acceptance of this changed API is in progress. + +| ID | Status | Current dependency | +| --- | --- | --- | +| G31 | Contract deployment pending | Exact per-outbound approval on both doors (§6.1); retain allowance guard until deployed | +| G32 | Contract deployment pending | Atomic createWallet and initial grants (§6.2); retain receipt-based partial recovery/index protection | +| G33 | Contract deployment pending | General EVM destination EQ/MAX pins (§6.3); one WALLET pin remains supported | +| G34 | Spec/policy mismatch | Public ceiling 32 calls versus deployed native ceiling 8 | +| G35 | Product/data open | Preset app catalog, missing caps and compound argument indexing (§7) | + +Native multi-action spend entries and Solana decoded raw form were approved by the user on October 12. Default first-use EVM gas is now an SDK change, not a core/gateway blocker. G07 revert credit remains downstream. The following dated register is historical where it conflicts with this override. + +**October 7 alignment:** all product choices are settled. Named-IDL Solana integration and removal of rule `ref` are implemented; raw-offset inputs remain supported. Editable labels are delivered and implemented against v5. Contract validation already exists; retain the SDK ambiguity guard. [Current delivery items](questions-zaryab.md). + +Updated October 7, 2026 following the clarified contract-enforcement decision, the [v4 deployment/owner-guide review](research/deployment-review-2026-10-06/README.md), [Harsh’s replies](product-decisions-2026-10-04.md), v4 implementation on feat/agw-sdk-v4, and [live Notion comments](research/notion-comments-2026-10-05.md). This register distinguishes unresolved dependencies, implemented SDK work, deferred scope and historical corrections. G01–G30 are tracking IDs, not a count of open defects. + +Evidence: [current baseline](current-baseline.md), [implementation status](implementation-status.md), [product alignment validation](research/product-alignment-2026-10-04/README.md), and [extended live E2Es](research/extended-e2e-2026-10-06/README.md). The final validation counts are in [implementation status](implementation-status.md). The opt-in AGW group now registers 58 cases; seven new cases passed on Donut/devnet. Default `all` remains unchanged. + +Current contract baseline: deployed source `2e61e13`, documentation head `deploy-agw@bd230d2`. Donut v5 code, wiring and the unchanged URP 3.1.0 were checked at block 23991912. The SDK uses v5 only; labels are read on-chain and owner renames are implemented. [Verification](research/deployment-review-2026-10-07-v5/README.md); [SDK migration](research/v5-implementation-2026-10-07/README.md). Core marketplace `9479aef` is a docs-only advance over `cb69e0b`; gateway `bcbf7df` is unchanged. All 12 Notion bodies were refreshed earlier on October 7; that export predates this label delivery. + +## Remaining standalone external dependencies + +None for the implemented standalone SDK surface. G08 is closed by the delivered v5 labels and SDK integration. Refund spend credit and retry/terminalization timing remain separate downstream dependencies. + +The [October 6 source recheck](research/question-source-recheck-2026-10-06/README.md) narrowed the questions. Subsequent [live wire validation](research/live-svm-wire-2026-10-06/README.md) supplies our own Solana fixture and successful delivery/replay, closing Z1.4. The rejected outbound initially timed out, then reached REVERTED and read-only replay classified it failed. [Concrete API proposals](public-api-proposals.md) are ready; retry/terminalization timing is an operational follow-up. + +Multi-asset wire/read/assertion ABI, EVM CEA width, envelope version and SVM wire layouts are now supplied. G23/G24 and the native/EVM adapter/registry migration are implemented locally; public SVM mapping and selected live acceptance are implemented; do not keep asking for those delivered definitions. + +Approval screening, public generation context, public spend shape, revoked-history reconstruction and compileCard are no longer unresolved standalone product questions. Native agent batching is implemented through a sender-preserving outer transport; it does not require a new batch-mode AGW agent entry point. + +## Current disposition + +P0 blocks agreed authorization/accounting or safe final integration. P1 affects correctness, compatibility or delivery. P2 covers optional scope or documentation. “Implemented locally” means source and local evidence exist; live acceptance is tracked separately. + +| ID | Priority | Status | Current finding or resolution | Remaining action | +| --- | --- | --- | --- | --- | +| G01 | P1 | V4 registered; live coverage passes | Checked new deployment and reproduced ABIs are integrated in the Donut-only registry; no legacy adapter fallback. | All 46 AGW scenarios have passing live coverage. Refresh wiring/source for future releases. | +| G02 | P0 | Source deployed; native/UEA acceptance passes | D3 executeAsAgent/agentOf and sender adapter exist in v4; documented wiring matches live reads. SmartSession is unchanged. | Sender-binding/alternate-path tests and live native/UEA/7702 acceptance pass; do not reopen the engine-fork proposal. | +| G03 | P1 | SDK question resolved and implemented | Validator/nonce ID calculation and generation-specific derivation are internal. Public generation-context helpers were removed per Harsh H4.1. IDs remain wallet-scoped and receipt-confirmed. | V4 vectors and receipt-confirmed IDs are verified; no public context-signature approval is needed. | +| G04 | P1 | ABI history corrected; release note | Six-field main is older; inspected current gateway and historical Donut dispatcher use eight fields. A hypothetical future field removal is not a present SDK blocker. | Encode the selected manifest’s gateway ABI and track any actual migration with that deployment. | +| G05 | P1 | Downstream marketplace alignment | Core cb69e0b requires rule/job expiry equality; supporting Notion pages have conflicting inequalities. | Align the marketplace/compiler track. Do not impose job equality on every standalone AGW rule. | +| G06 | P2 | Closed for v1 | Binder was never in the reviewed code and is dropped for v1. | No binder implementation or binder-dependent lifecycle requirement in standalone AGW. Preserve historical snapshots as evidence. | +| G07 | P1 | Known platform dependency | creditRevert depends on Push-core executor work. Until delivered, a far-side failure can leave spend inflated. | Track platform delivery and document/test the limitation. This is not an unanswered AGW redesign question. | +| G08 | P1 | Closed: v5 labels implemented; ref removed | Stored labels, empty reset and a 64 UTF-8 byte cap are delivered; SDK reads and owner writes are implemented. Checkpoint refs remain. | Unit/local and selected live v5 acceptance are recorded in the migration report. | +| G09 | P1 | Deferred from standalone AGW | Canonical card schema/encoding remains a marketplace issue. Harsh H5 removes compileCard from standalone AGW; its public stub was removed. | Resume schema/compiler vectors under the future marketplace scope, not as an AGW release blocker. | +| G10 | P1 | Downstream marketplace scope | Current marketplace binds one EVM chain and one rulesId; broader card binding remains unresolved downstream. | Align future marketplace/job cardinality. Standalone AGW does not invent multi-rule job bindings. | +| G11 | P1 | Downstream job dependency | Payment-token selection differs between the target job SDK and the one-token-per-deployment kernel. | Align selected K-12/deployment design in the job track. | +| G12 | P1 | Downstream evaluator/hook delivery | Current start/fund guards exist; evaluator baseline/submit integration is incomplete. | Verify lifecycle placement and bypasses in the separate marketplace/job/evaluator work. | +| G13 | P1 | SDK implemented locally; race classification verified live | Core supports native 7702 batching with a sequential fallback. Creation uses actual capability, index-bound deployment and receipt/recovery metadata. The extended live race test verifies no rules reach the competing wallet, reports `INDEX_RACE`, and retries at the next slot. | Correct the stale factory-batch requirement in source docs when maintained; native creation and UEA identity acceptance pass on the verified deployment. | +| G14 | P1 | V4 native/EVM update implemented locally | Ordered all-token assertions precede revoke/grant; actual second-token spend races roll back the entire update and checkpoints. Native per-action guards retained. | Native/EVM/SVM updates pass selected live coverage. | +| G15 | P2 | SDK implemented locally | create deploys/grants only; funding is separate. No required new createWallet factory method. Index binding prevents grants on a raced wallet; partial recovery preserves operation receipts and unknown state. | Final-generation events/native batching and UEA identities are verified; do not restore removed funding inputs. | +| G16 | P1 | Implemented; migration documentation supplied | READ.CHAIN.WEB2 is web2. Legacy web2:https input is normalized to unchanged wire identity. Deprecated aliases now use the new public value. | The consumer guide documents the alias/literal migration; Web2 normalization/read-source tests pass. | +| G17 | P1 | SDK decision implemented locally | Read-only write guards and explicit agenticWallet selection on reinitialize are implemented. Signer/network/wallet changes rebuild role/capability context. | Preserve compatibility coverage and verify with the release deployment. | +| G18 | P1 | SDK behavior confirmed and implemented | Initialization uses enabled-rule identity; sends perform uncached lookup without expiry filtering. Missing/ambiguous candidates fail before signing. A single selected rule is enforced by the contract. Public list is enabled-only; unknown/revoked get returns RULE_NOT_FOUND. | Preserve ambiguity, uncached lookup and contract-error mapping coverage; public history is deferred. | +| G19 | P1 | Product choice settled; SDK aligned | Omitted native PC limits are zero. Current assets model and independent token budgets remain. | New omission-default E2E passes; retain boundary tests. | +| G20 | P1 | V4 composer/response and live EVM acceptance pass | Uses selected listed token, maxGasPerCall, wallet CEA/refund context, separate allowance and signer gas. Local requests pass actual URP with fixture gateway. | Production token debit, node/TSS delivery, CEA execution attribution/balance, replay identity and destination-revert classification pass. Public SVM acceptance is recorded under G22. | +| G21 | P1 | Product direction resolved; batching implemented locally | NativeRule remains one action. Arrays use a sender-preserving UEA/7702 outer batch of single executeAsAgent calls, each checked by policy. Native sequential fallback is prohibited. Local real-type-4 tests prove sender identity, cumulative counters and mined rollback. | Release-deployment UEA identities and native 7702 batch/rollback cases pass. The local executor is a fixture; arbitrary forwarding helpers are not a substitute for the agent account. | +| G22 | P1 | Public IDL integration implemented | Named Anchor IDL authoring, exact stored reads, wallet context, sends and replay are wired. Unsupported layouts are explicitly rejected. | Four public Solana E2Es pass, including real destination transfer and replay. Maintain supported-layout limits. | +| G23 | P0 | V4 EVM integration verified locally and live | Multi-asset codecs/reads/outbound, envelope 1, source chain/token identity, hard-zero semantics and empty-input routing are implemented. Old adapter/ABIs/fixtures removed. | Registered EVM acceptance passes. Public SVM mapping/composition now passes local and selected live acceptance. | +| G24 | P1 | Internal per-token update verified locally and live | Reads/stores every expected counter in asset order; array assertion catches intervening second-token spend. Public spent stays absent. | Live EVM two-asset and public SVM replacement pass. | +| G25 | P1 | SDK choice approved and implemented | Native/EVM authoring accepts argument indexes or raw offsets; reads preserve exact values. Conflicting forms are rejected. | Decoded native rule re-grant E2E passes. | +| G26 | P1 | Closed: existing selection behavior retained | The SDK refuses multiple matching candidates with AMBIGUOUS_RULE. The contract validates the supplied rule and rejects unauthorized actions; errors are mapped. | Maintain ambiguity and rejection coverage. No selection ABI change is required. | + +The [October 7 full source refresh](research/source-refresh-2026-10-07/README.md) identified two SDK-owned alignment follow-ups. Both are now implemented and validated; see the [fix report](research/sdk-alignment-fixes-2026-10-07/README.md). They add no contract-delivery questions. + +| ID | Priority | Status | Finding | Action | +| --- | --- | --- | --- | --- | +| G27 | P1 | Closed: contract-derived policy errors | Production SVM sends build requests without evaluating granted policy. The contract/simulation enforces expiry, amounts and account/data constraints; refusals use AgenticRevertError and decodedError. EVM local PC-cap/asset-membership rejection was removed. | Maintain real-contract/live error-type and no-state-change coverage. Structural/context/funding guards remain SDK errors. | +| G28 | P2 | Closed: owner funds-only route | Owners can send SOL/SPL funds without an instruction/IDL, with separate allowance/balance guards, wallet-specific finalize/rent quote and destinationTransfer metadata. Agents still require an instruction. | SOL and SPL delivery, wallet debit, allowance consumption and replay pass live on v5. | + +The [expanded v5 acceptance](research/extended-v5-e2e-2026-10-07/README.md) added five scenarios and found these additional integration details: + +| ID | Priority | Status | Finding | Action | +| --- | --- | --- | --- | --- | +| G29 | P1 | SDK caller workaround verified; default gas remains upstream | The Core/relayer default of 500k destination gas failed fresh Sepolia CEA finalization; the identical call estimated ~1.3m. Positive cases with explicit 2m gas passed. | Keep the explicit destination budget in examples/tests. Core/gateway should revisit its fresh-CEA default; no new AGW interface is needed. One explicit-budget run also timed out before a later fresh-fixture pass; latency is not a confirmed SDK defect. | +| G30 | P1 | Closed: SVM source-mint resolution | The SPL precompile's mint getter returns a zero word, incompatible with string decoding. SDK metadata/quote/authoring/reads now resolve known mappings from the existing chain-specific registry and reject unknown mappings. Hex mint inputs normalize to base58 for PRC20 lookup. | Regression units, actual-contract suites and the funded SPL transfer/replay pass. No mint or token-program address is guessed. | + +## Validation and release boundaries + +The [existing acceptance evidence](research/live-acceptance-2026-10-06/README.md) records the original native/EVM coverage. The [extended report](research/extended-e2e-2026-10-06/README.md) records 1,982 passing unit tests, build/typechecks, and 14/14 additional funded tests; default all remains 76. Extended cases cover management races/batching and native policy pins, caps and rollback. Public Solana destination transfer, rule lifecycle, refusals and replay now pass selected live coverage. + +Local batch proof uses actual AGW/factory/engine/policy and real Anvil EIP-7702 transactions, with a small fixture executor. UEA shaping/replay is unit-tested and reuses the existing transport; all registered native/EVM/UEA acceptance scenarios now pass. Public Solana destination transfer, rule lifecycle, refusals and replay now pass selected live coverage. + +## Rules for closure + +- A product decision can close a question without completing a contract or deployment dependency. +- Implemented source/local behavior and live acceptance are separate statuses; do not count the same deployment dependency once per SDK method as independent defects. +- expectedCEA derives from AGW plus destination context. Signer CEA and arbitrary pasted addresses are not substitutes. +- Checkpoint consumers compare counts; allowance-driven balance changes are not always checkpointed. Current single replacement adds five ticks. +- Internal spend assertions remain required even when public spend records are removed. +- Zero native PC defaults, the current token model and dual raw-offset/index inputs are approved and covered by tests. Universal total semantics are now supplied; the old zero/unlimited row must not carry into v4. +- H6 is resolved: retain AMBIGUOUS_RULE and contract enforcement/error mapping. The earlier automatic-selection dependency was an assistant misinterpretation. +- Harsh’s replies have been received. The linked question documents now contain remaining follow-ups; no outbound team messages were sent by this agent. + +The October 5 historical table is superseded for new integrations by the October 6 v4 completion notice and address book. Contract delivery/code/wiring checks are recorded in the review; Native/EVM migration and registered funded acceptance pass. Delayed-index local acceptance and consumer documentation are complete; public SVM destination integration and selected acceptance now pass. diff --git a/plan/agw/implementation-agent-prompt.md b/plan/agw/implementation-agent-prompt.md new file mode 100644 index 00000000..45e8c7e5 --- /dev/null +++ b/plan/agw/implementation-agent-prompt.md @@ -0,0 +1,214 @@ +# AGW SDK implementation agent handoff + +Copy the prompt below into the implementation agent. It authorizes implementation and local validation of the settled work, plus E2E test development. Product/contract decisions remain tracked dependencies. Another agent will review the resulting implementation. + +--- + +You are implementing AGW support in the Push Chain SDK. Work through the implementation plan and complete as much verified, useful implementation as possible while product and contract answers are pending. Implement the code, add meaningful unit tests and E2E scenarios, run the appropriate available checks, and leave a precise review handoff. Do not stop after producing a plan or an empty namespace. + +## Workspace and starting point + +SDK repository: +`/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk` + +Sibling repositories: +- `/Users/shoaibmohammed/Desktop/work/PUSH/push-agentic-wallets` +- `/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-core-contracts` +- `/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-gateway-contracts` + +Planning branch: `feat/agw-sdk-planning`, last committed planning baseline `349635b2254823488603b37f4b44c4f5c929feb9`. This handoff file may be a subsequent local addition. Inspect status before changing branches. Preserve existing work and applicable repository instructions. Use a separate feature branch or isolated worktree based on the planning branch; do not reset or overwrite another agent's changes. Do not merge, publish packages or send team messages as part of this task. + +The sibling AGW working checkout may be on old main (`9ddd954`). Use the intended revision, not whatever happens to be checked out. Our reviewed AGW source is `pushAgenticWallet_v3@e704d5b58fd1d30ce02bc0ad74dccfbdb37804f9`; core marketplace is `cb69e0ba101bef1bb4440e54b2c45396be3e92ce`; gateway is `bcbf7df42e8e6dd11088a43bcc0b056a54ea0a18`. Recheck remote refs and record any drift. Read changed source before revising conclusions. Historical Donut addresses are not a deployment of the target ABI. + +## Read before coding + +Read these in order under `plan/agw/`: + +1. `README.md`, `current-baseline.md`, `SOURCES.md`. +2. `notion/5-sdk-agw.md` — authoritative target public SDK API. +3. `implementation-plan.md` — full 17-step plan, proposed modules and acceptance criteria. +4. `sdk-design-review.md`, `sdk-owned-review.md`. +5. `external-blockers.md`, `questions-harsh.md`, `questions-zaryab.md`. +6. `contract-integrator-obligations.md`, `gaps.md`. +7. `research/sdk-owned-review-2026-10-03/README.md` and `research/validation-e704d5b/README.md`. + +Read pinned AGW `docs/1_AGW.md`, `docs/2_UniversalRulesPolicy.md` and exact source when implementing a consequential contract interaction. The public target wins over historical behavior, but a target feature cannot be presented as usable against an incompatible ABI. + +Notion snapshots were exported October 3, 2026 at 13:23 IST. Later edits are not included. Check whether answers or refreshed snapshots have been added to the workspace; consume confirmed answers and record their source. Do not invent product approval. + +## Implementation objective and stopping boundary + +Start with namespace/types, signer-versus-wallet context, lifecycle/read-only guards, contract adapter interfaces and generation handling. Continue through wallet reads, settled identity utilities, creation/recovery structure, native/owner wrappers, response/error/hook adaptation and independent Web2 compatibility where inputs are available. Use the plan's dependency ordering. + +For each unresolved feature, isolate the dependency and continue independent work. Do not stop the entire implementation because deployment or multi-asset encoding is pending. Conversely, scaffolding that throws an unsupported-feature error is not a completed codec or live feature. + +A01–A08 are explicitly tracked in the plan: + +- Product policy/default/type assumptions remain provisional until confirmed. +- A05 needs final multi-asset terms, per-token read and expected-spend assertion ABIs/vectors. +- A06 needs agreed historical-rule scope and reliable metadata. +- A07 needs matching source/metadata capabilities and an actual verified deployment manifest. +- A08 needs canonical card schema/encoding and shared compiler vectors; it is separate from basic AGW execution. +- SVM destination scope and representable public rules require explicit matching capabilities; Solana-origin identity is a different concern. + +Use explicit internal capabilities and fail before signing for missing artifacts or unsupported behavior. Do not insert fake addresses, guessed envelope layouts, success-shaped placeholder results or `any` escapes into the published surface. Do not convert assets[] to a single asset silently. Keep historical single-asset code/vectors explicitly versioned and out of the advertised target path. + +Implement all currently unblocked work, then report exact remaining dependencies. Full-feature release is not required while external artifacts are unavailable. Production contract changes are outside this SDK task; review-only local fixtures are permitted. + +## Architecture and invariants + +Follow the proposed modules in the implementation plan and the existing SDK conventions. Keep AGW contract/version logic centralized, and preserve ordinary-client behavior. + +1. Keep signer origin, signer Push identity and AGW execution address distinct. `universal.account` becomes AGW in agentic mode; `universal.origin` and account-status/gas identity remain signer-scoped. +2. `client.agentic.wallet(address)` is a management handle. It does not silently change the execution account. +3. Derive/list/create owner wallets from the connected signer's Push identity. External EVM or Solana keys use the UEA for their actual origin chain. +4. The owner uses execute. An agent uses executeAsAgent under a matching enabled rule. Do not implement the retired session-key signature model or fork SmartSession. +5. Resolve rules on every send. Zero candidates fails before signing; multiple enabled candidates fail explicitly. Do not filter expiry and thereby move the specified on-chain failure into an invented SDK policy engine. +6. Read-only clients never sign. Reinitialize requires explicit AGW selection under our recorded design and reruns role/capability checks. Audit all transaction-producing entry points, not just sendTransaction. +7. Create deploys/grants only; funding and approvals are separate. Preserve atomic/sequential strategy, confirmed hashes, pending hash and recoverable partial state. Do not automatically deploy another wallet after a grant failure. +8. Existing-wallet replacement must be one owner-wallet batch: assert expected spend → revoke → grant. Never fall back to sequential execution. Preserve counter-reset semantics and verify stale-spend rollback with the final ABI. +9. Gateway allowance setup uses bounded owner execute calls, with replenishment/removal. Do not inject an approval into the universal agent path. +10. Compose AGW outbounds explicitly. Under the pinned policy: empty EVM recipient bytes, AGW refund recipient, nonzero maxPCForGas and policy-compatible multicall. Resolve CEA from AGW, not from the signer. Keep wallet PC separate from signer gas. +11. Generate beneficiary/pin offsets from representable ABI layouts. Resolve destination tokens/native markers with trusted context and exact source-chain checks. Pure helpers receive pre-resolved context; they perform no hidden RPC calls. +12. Record checkpoint counts/events accurately. A current assert/revoke/grant replacement emits five ticks; allowance pulls can change balances without ticks. Do not substitute a block-only comparison for count comparison. +13. Preserve logical AGW from and signer origin in both live and reconstructed responses. Management responses remain owner-scoped. Preserve raw transport metadata, error causes/decoded fields and partial-failure hashes. +14. Preserve init/per-call progress hooks through wait without duplicates. Follow refreshed event IDs, including removal of AGENTIC-TX-103. +15. Normalize new Web2 public input to the existing web2/https wire identity; keep legacy input compatibility and transaction/read type separation. +16. Document exact capability limits. Do not treat passing mocks, source compilation or a skipped live scenario as deployed integration success. + +## Existing test architecture you must use + +This handoff was prepared after reading the current test runners and representative suites. + +| Existing file or directory | What to reuse or preserve | +| --- | --- | +| `packages/core/jest.config.ts` | Unit configuration: src specs/tests, ts-jest, 30-second default; excludes live integration-style suites and __e2e__ | +| `packages/core/jest.e2e.config.ts` | Separate live E2E config: __e2e__ specs, 300-second default, shared setup and file reporter | +| `packages/core/__e2e__/ci/suite.ts` | Curated scenarios with stable ID, group, file, full-name regex, asset needs and optional environment flags | +| `packages/core/__e2e__/ci/run.ts` | Offline --list/--verify; serial live Jest execution; Ethereum Sepolia fixture restriction; custom reporting | +| `packages/core/__e2e__/ci/preflight.ts` | Master/UEA/CEA balance budget checks; normal mode can fund accounts; --dry-run is read-only | +| `.github/workflows/e2e.yml` | Manual workflow_dispatch only, serial funded-key concurrency, verify → preflight → tests, always-uploaded logs | +| `packages/core/__e2e__/shared/setup.ts` | Existing environment loading convention; do not print credentials | +| `shared/evm-client.ts`, `svm-client.ts`, `chain-fixtures.ts` | Signer/client and chain fixture conventions | +| `shared/progress-tracker.ts`, `validators.ts` | Progress capture and baseline response checks; extend with AGW-specific identity/state assertions | +| `shared/external-tx-verifier.ts` | Independent external receipt verification | +| `shared/outbound-helpers.ts`, `fresh-wallet.ts` | Funding and fresh-account patterns; audit assumptions because current helpers are signer/UEA-oriented | +| `shared/e2e-file-reporter.js`, `ci/ci-reporter.js` | Logs and BigInt-safe result serialization | + +Paths abbreviated as `shared/...` or `ci/...` above are under `packages/core/__e2e__/`. + +Representative suites to read: +- `packages/core/__e2e__/push/native.spec.ts` +- `packages/core/__e2e__/push/pushpay-native-multicall.spec.ts` +- `packages/core/__e2e__/push/track-transaction.spec.ts` +- `packages/core/__e2e__/evm/outbound/uea-to-cea.spec.ts` +- `packages/core/__e2e__/read/_shared.ts` and `read/evm/api-coverage.spec.ts` + +The existing offline manifest verification passed: 76 selected scenarios, 40 spec files, 81 distinct tests for group all. This verifies selection consistency, not live E2E execution. Ten existing SDK unit suites previously passed 183 tests; four additional Solidity allowance experiments passed separately. Those are baselines, not coverage of your new implementation. + +Some older live tests use `if (skipE2E) return` inside tests. Do not copy that pattern: it can produce a passing test that executed no assertions. Missing deployment/keys/capabilities must be reported explicitly as unavailable, and an intentionally selected strict AGW run must fail its prerequisite gate rather than report success. + +## Required unit and local integration coverage + +Add meaningful tests beside the new modules under `packages/core/src/lib/agentic/` and at the existing orchestrator/push-chain integration boundaries. Mock RPC/signing/broadcast boundaries. Unit runs must not depend on funded keys or contact live networks. + +Cover the behavior implemented in each increment: + +| Area | Required cases | +| --- | --- | +| Initialization/context | Owner/agent/unknown identity; undeployed or foreign wallet; unsupported generation; signer origin versus AGW account; read-only; reinitialize changes | +| Rule selection | No match, one match, direct-grant duplicates, revoked and expired rules, per-send refresh, RPC failure not treated as empty state | +| Guards | Forbidden from/methods rejected before signer invocation; native agent arrays under the chosen scope; auxiliary transaction entry points | +| Codecs | Contract-generated vectors, exact IDs, generation inputs, native pins, ABI offsets/dynamic layout rejection, wrong beneficiary, token chain/native marker, round trips | +| Multi-asset behavior | Per-token units/counters, caps, omission versus zero, duplicates and empty-assets routing, only after matching artifacts exist | +| Reads | Empty owner, next index, deployment labels, consistent block reads, pagination/reorg handling, checkpoint ordering, unknown/revoked/history scope | +| Creation | Empty/multiple rules, grant order and returned IDs, atomic and sequential capability, failed/pending step, committed hashes, nonce/index races and safe recovery | +| Rule writes | Wrong owner, bare revoke failure, selected/all revocation, replacement stale spend, failed grant rollback, reset counters and checkpoint deltas | +| Composition/gas | AGW CEA/refund identity, bytes-empty recipient, nonzero gas cap, separate funding/gas balances, first-use UEA exception, no injected agent approval | +| Responses | Logical from and origin on response/wait/replay; Push revert versus destination revert/timeout; exact error identity/decoded data; no duplicate progress | +| Compatibility | Ordinary routes and exports, read-only behavior, Web2 new/legacy inputs and unchanged wire identity | + +Use real pinned contract artifacts in an isolated local EVM/Foundry integration harness where available to verify authorization and atomicity beyond mocks. Keep ABI/vector provenance. Any Push precompile mocking or stub gateway must be explicitly documented as a limit. Local execution does not prove node/TSS/destination settlement. + +For blocked cases, document the missing artifact and add a clearly labeled pending test specification if useful. Do not fill a suite with trivial skipped tests or assertions that only repeat your own helper output and count that as coverage. + +## Required E2E additions + +Proposed location: `packages/core/__e2e__/agw/`, with a shared fixture file for owner, agent, deployment manifest, wallet creation, controlled funding and cleanup. Use public SDK methods for the behavior under test. Raw RPC is appropriate for independent verification; raw calls may set up a fixture but must not replace the SDK operation being tested. + +Add scenarios for: + +1. Create a bare wallet and a wallet with rules; verify factory ownership/index, returned IDs and no implicit funding. +2. Separate funding and bounded gateway allowance; verify setup/removal and distinguish owner/agent gas from AGW PC. +3. Native owner and agent success with independent target-state verification. +4. Unauthorized sender, missing/revoked rule, expiry and cap/beneficiary failures; assert exact failure and unchanged protected state. +5. Add/revoke/update lifecycle; verify old ID disabled, new ID usable, counter reset and atomic rollback when spend changes. +6. Checkpoint count/event behavior, including the current five-tick replacement and no claim that all allowance pulls tick. +7. Positive-amount EVM universal execution: real allowance consumption/pull/burn, expected AGW CEA, correct destination target effects, wallet refund identity, Push/destination receipts and replayed tracking. +8. Destination failure and timeout classification; document inactive creditRevert accounting where applicable. +9. External EVM-agent UEA identity and first-use/subsequent gas behavior. Add Solana-origin coverage separately from SVM destination coverage. +10. Init/per-call hooks through wait and AGW logical from/signer origin across both sends and reconstructed transactions. +11. New multi-asset enforcement and supported SVM destination scenarios once their compatible contracts exist. + +Integration into the current runner: + +- Add an explicit curated `agw` group in suite.ts and the manual workflow choice. Register unique scenario IDs and narrowly scoped regexes; run --verify to catch missing, overlapping and collateral matches. +- Keep execution serial (`--runInBand`) and existing workflow concurrency. Shared funded accounts must not race nonces. +- Extend preflight budgeting for actual payers: owner setup gas, agent gas, wallet PC/assets, destination prerequisites and any fresh-account funding. The existing UEA budget alone does not cover AGW execution. Validate compatible deployment/capabilities before funding. +- Use fresh per-run wallets/rule IDs where possible, make funding bounded and explicit, and avoid destructive cleanup of shared accounts. +- Keep --list and --verify offline and side-effect-free. Additions must not fund/deploy from module import or title collection. +- Prevent incomplete AGW scenarios from being silently added to default all. Define explicit selection/prerequisite behavior while the compatible deployment is pending; retain existing group semantics for other tests. +- Preserve the custom BigInt-safe CI reporter. Do not replace it with raw Jest JSON serialization for live tests. Distinguish filtered tests, missing prerequisites, deliberately deferred capabilities and actual failures in your handoff. +- Capture deployment/source pins, public account addresses, network/blocks, transaction IDs, expected versus observed state and test counts. Never log private keys, seed phrases or full credential-bearing URLs. + +## Commands and execution boundaries + +From repository root, unit checks use the current config, for example: + +```sh +node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand --runTestsByPath +yarn nx run core:build +yarn nx run core:lint +``` + +Use actual spec paths and inspect the current Nx targets before invoking them. Run relevant existing regression suites in addition to new tests. Report baseline failures separately rather than weakening assertions or fixing unrelated modules indiscriminately. + +From `packages/core`, after registering the proposed agw group: + +```sh +yarn e2e:list --group agw +yarn e2e:verify --group agw +yarn e2e:verify --group all +``` + +These are offline selection checks. `--verify` parses test titles; it does not type-check or execute your tests. Add a no-broadcast type-check/compile check for new E2E code and report pre-existing type failures separately. + +The following are live operations or require live configuration: + +```sh +yarn e2e:preflight --group agw --dry-run +yarn e2e:preflight --group agw +yarn e2e:ci --group agw +``` + +Dry-run performs balance/RPC checks. Normal preflight may transfer funds. Live E2Es broadcast testnet transactions. This handoff requests adding E2Es and running local/offline validation; it does not by itself authorize spending configured funds, deploying contracts or triggering live CI. Run live tests only with separately established authorization, a compatible verified deployment and a bounded test budget. Keep implementing and validating independent work if live prerequisites are unavailable; record the precise blocker. + +Never run an unfiltered live suite just to see what happens. Do not read or print .env contents; use the repository's environment-loading conventions when an authorized run needs configured secrets. + +## Deliverables for the review agent + +1. Focused implementation changes with stable internal boundaries and matching unit tests. +2. Real E2E scenario implementations, manifest/preflight/runner integration as needed, and explicit readiness status for each scenario. +3. `plan/agw/implementation-status.md` with a per-step matrix: implemented, unit/local-verified, live-verified or blocked. Record A01–A08 decisions and artifact dependencies individually. +4. `plan/agw/implementation-review-handoff.md` containing: + - Branch/base/source/spec revisions and files/modules changed. + - Public behavior/signature changes and their authority or assumption ID. + - Exact commands, pass/fail/skip counts, test-selection verification and limits. + - Which test assertions exercise real contracts versus mocks. + - Live results with transaction IDs, or an explicit statement that no live run occurred. + - Remaining external blockers, placeholders and areas most needing review. +5. Keep source snapshots intact and update plan/gap statuses only when evidence warrants closure. Do not turn assumed behavior into an approved decision. + +Before finishing, inspect the diff, run formatting/type/build/lint and relevant tests, check that unsupported paths fail before signing, and verify no secrets or generated dependency trees were added. Do not claim the whole AGW SDK is complete if advertised methods still depend on placeholders or unverified deployments. + +Begin with the foundation and continue through every safely implementable step. Leave the work concrete and reviewable so a separate agent can validate correctness, scope and test quality. diff --git a/plan/agw/implementation-plan.md b/plan/agw/implementation-plan.md new file mode 100644 index 00000000..1c7a993c --- /dev/null +++ b/plan/agw/implementation-plan.md @@ -0,0 +1,370 @@ +# AGW SDK implementation plan + +**Current implementation, October 7:** runtime and contract harness use v5 source `2e61e13`. Public named-IDL SVM, owner funds-only sends and contract error mapping are implemented. Stored wallet labels and `setLabel` are now implemented. Ref, compileCard and historical reads remain outside standalone v1. See [current status](implementation-status.md) and [v5 acceptance](research/v5-implementation-2026-10-07/README.md); older dated steps and validation counts below describe the original handoff. + +## Original handoff — October 6 (historical) + +Updated October 6, 2026. The v4-only native/EVM implementation uses deployed source e8db748 and the Donut manifest. Old runtime/test adapters and single-asset codecs are removed. The unfiltered unit suite passes 1,981 tests; all 75 actual-contract Anvil cases pass; build and four typechecks pass. All 25 registered AGW live scenarios pass across selected runs; remaining work is public SVM integration and release scope decisions. [Current acceptance and remaining coverage](research/live-acceptance-2026-10-06/README.md). + +SVM internal terms/accounts/payload/builder are implemented and validated. Public SVM mapping/dispatch remains gated. Remaining decisions are H3 native defaults, H4.5 raw-offset public shape, H6 send selection and ref/label v1 scope. Earlier plan recommendations below are qualified by those accepted decisions and the current implementation status. + +> October 5 comment update: [live review](research/notion-comments-2026-10-05.md) adds [H6](questions-harsh.md#h6) for same-agent multiple-rule scope and send selection. Any one-rule-per-agent/chain or DUPLICATE_RULE recommendation below describes the earlier implementation baseline and is provisional. Once clarified, revise steps 6–8 and 10–12 plus their tests together. Do not choose the first rule arbitrarily. Token-independence wording is included in H3/Z1.1; defaults remain unresolved. + +> October 4 update: [Harsh’s replies](product-decisions-2026-10-04.md) supersede earlier provisional approval/default/helper/history/compiler recommendations below. Use [remaining dependencies](external-blockers.md) for current blockers. The clear scope changes and sender-preserving native batching are now implemented; H3 defaults remain unchanged pending clarification. See [alignment evidence](research/product-alignment-2026-10-04/README.md). + +This is the step-by-step plan for the complete AGW surface in Notion page 5 inside `@pushchain/core`. It covers management, rules, execution, responses, helpers, compatibility, documentation and release validation. Marketplace, job and evaluator clients are separate projects; `compileCard` is deferred to their later delivery and is not exposed by standalone AGW. Settled implementation is recorded in [implementation status](implementation-status.md); remaining contract capabilities stay gated. + +Target: [SDK spec](notion/5-sdk-agw.md), exported October 3, 2026 at 13:23 IST. Tested contract source: AGW v4 `e8db748`. SDK production baseline: `167fdc6`. See [current baseline](current-baseline.md), [SDK design](sdk-design-review.md), [SDK-owned decisions](sdk-owned-review.md) and [external blockers](external-blockers.md). The October 6 deployment/owner guide and October 5 comment review qualify the older Notion snapshot; a newer full Notion export is not claimed. + +## How to execute this plan + +Proceed in numbered order, taking the independent Web2 work alongside the foundation if useful. A step marked **Start now** has settled internal boundaries. **Partial** means implementation can proceed behind a contract adapter or provisional type, but the listed dependency must be resolved before that feature is complete. **Waiting** identifies a feature whose final behavior cannot be honestly implemented from available artifacts. + +Implementation and verification are listed separately so development progress can be measured independently. A placeholder is scaffolding, not completed behavior. All new files listed below are proposed paths, not existing implementation. + +| Step | Deliverable | Start status | Depends on | +| --- | --- | --- | --- | +| 1 | Source and capability contract | Start now | Existing snapshots and evidence | +| 2 | Module skeleton, public types, exports and errors | Partial | 1; disputed types isolated under A04–A06 | +| 3 | Signer/wallet context, initialization and lifecycle | Start now | 2; final deployment validation in 14 | +| 4 | Generation registry and contract adapter | Partial | 1–3; A07 for real deployment entries | +| 5 | Wallet and checkpoint reads | Partial | 4; A06/A07 for full history/metadata | +| 6 | Rule normalization, identities and codecs | Partial | 4; A01/A03/A04/A05 | +| 7 | Create, add and revoke | Partial | 3–6; matching grant ABI | +| 8 | Atomic rule replacement | Partial | 6–7; A05 expected-spend assertion | +| 9 | Owner execution and allowance setup | Start now through pinned adapters | 3–4; 11 for destination approval transport | +| 10 | Agent rule selection and native execution | Partial | 3–6; A02 for array scope | +| 11 | EVM universal execution and gas handling | Partial | 6, 9–10; A05/A07 | +| 12 | SVM destination support | Partial | 6, 10; final schema and advertised capabilities (A05/A07) | +| 13 | Responses, tracking, progress and transaction-creating reads | Partial | 3, 9–12; final wire adapters | +| 14 | Deployment onboarding and full acceptance | Waiting for matching deployment | 4–13; A07 | +| 15 | Web2 compatibility | Start now; independent | Existing read-state modules | +| 16 | Card compiler and ecosystem boundary | Outside standalone AGW v1 | Future marketplace track | +| 17 | Documentation, examples and release | Draft now, finish after acceptance | 1–16 or explicit accepted feature scope | + +Do not interpret this table as an equal-effort percentage. Steps 6, 11–14 carry substantially more integration risk than namespace and export work. + +## Assumptions and placeholder rules + +These are working assumptions for development, not accepted product changes. Replace each with an owner decision and source reference when answered. + +| ID | Working assumption or placeholder | Confirmation | Replacement point | +| --- | --- | --- | --- | +| A01 | Approval policy is UI/marketplace-owned; SDK retains structural validation without selector deny-lists or mandatory spender policy | Harsh H1 resolved October 4; implemented | Native/universal validation | +| A02 | Multiple native actions use a sender-preserving UEA/7702 outer batch of single agent-door calls; never sequential fallback | Harsh H2 direction; implemented and locally validated | Atomic transport and batch response adapters | +| A03 | Exact revised default table remains open; existing defaults are unchanged until H3 is clarified | Harsh H3 / E03 | One defaults module | +| A04 | Generation-dependent IDs, derivation and encoding context remain internal; client.agentic.derive remains public | Harsh H4.1 resolved; implemented | Public utility exports and internal codecs | +| A05 | Spend stays internal. V4 supplies ordered per-token wire/read/assertion ABI, address EVM CEA and zero-cap gas-token routing for empty user assets | Native/EVM v4 integration and live outbound tests pass; public SVM pending | V4 accounting/codec/outbound adapter | +| A06 | V1 lists enabled rules only; unknown/revoked get returns RULE_NOT_FOUND. No historical record reconstruction | Harsh H4.3 deferred; implemented | Public read model | +| A07 | New v4 addresses/wiring/ABIs are supplied and checked; V4 adapter/manifest are implemented and verified. Envelope is version 1; grant ref/setLabel remain absent | Deployment delivered October 6; Z1.3 metadata scope remains | Deployment manifest, v4 migration and capability gates | +| A08 | No compileCard in standalone AGW; canonical cards belong to later marketplace work | Harsh H5: outside AGW v1 | No public compiler stub/export | + +### What closes each assumption + +- A01/A02/A04: clear product scope is implemented. A03 defaults still need exact agreed wording. +- A05: delivered v4 definitions unblock SDK codec/read/assertion work. Preserve internal accounting, correct zero semantics and prove all-asset replacement rollback. +- A06: revoked history is outside v1; active-only reads and explicit RULE_NOT_FOUND behavior are implemented. +- A07: deployment notice received; new addresses supersede the historical table. The v4 manifest/registry and native/EVM integration are verified; track remaining acceptance in the live report. Ref/label remain a scope/delivery question; no new address request is needed. +- A08: closed for standalone AGW by deferring compileCard to the marketplace track. + +Record design decisions and artifact/deployment readiness separately. All eight have an explicit question owner, but answers alone do not mean all eight are implemented or verified. + +Placeholder implementation rules: + +- Use explicit internal capabilities and typed failures. A missing codec or unsupported generation must fail before signature/broadcast; never return empty success records, zero addresses, fabricated IDs or dummy transactions. +- Keep historical source snapshots only as planning evidence. Runtime and tests use v4 artifacts; assets[] must never become an arbitrary first asset or unrelated split rules. +- Keep provisional wire types internal. Do not publish `any`, guessed envelope versions, guessed deployment addresses or fixed ABI tuples as the final SDK contract. +- Do not implement both sides of a product choice speculatively. Isolate the boundary and implement the selected behavior after confirmation. +- `setLabel`, full historical reads, SVM destination encoding and compileCard may be explicitly unsupported in development builds while their dependencies are incomplete. A complete release must implement the promised surface or record an approved scope change. + +## Proposed module layout + +All paths below are relative to `packages/core/src/lib/`. + +| Proposed location | Responsibility | +| --- | --- | +| `agentic/index.ts`, `agentic.types.ts`, `errors.ts` | Public namespace/types and error surface | +| `agentic/agentic.ts`, `wallet.ts`, `rules.ts` | derive/create/list/wallet and lifecycle coordination | +| `agentic/context.ts`, `deployments.ts` | Separate signer/execution identity; generation capabilities | +| `agentic/contracts/` | Verified ABIs, view/event adapters, owner-intent encoding | +| `agentic/codec/` | Native/universal/SVM terms, IDs, ABI argument positions, defaults and token resolution | +| `agentic/reads/` | Snapshot reads, wallet enumeration, checkpoints and historical reconstruction | +| `agentic/execution/` | Owner/agent wrappers, rule selection, native/universal composition | +| `agentic/response.ts` | Logical identity and AGW metadata adaptation over core responses | +| `agentic/card.ts` | Canonical card compiler once the shared schema is approved | + +Existing integration points: `push-chain/push-chain.ts`, `utils.ts`, `index.ts`, `constants/index.ts`, `orchestrator/orchestrator.ts`, `orchestrator/internals/context.ts`, `response-builder.ts`, `read-state.ts`, `errors.ts`, `progress-hook/*` and the `read-state/*` public parser/types. Keep generic core behavior generic; AGW-specific ABI logic belongs in the adapter. Avoid broad route rewrites merely to add this execution context. + +## Step 1 Pin the implementation contract + +Implementation: + +1. Record exact SDK, AGW, core, gateway and spec revisions in the development issue/PR. +2. Inventory every public page-5 method, its contract dependency and capability. Use the coverage table below. +3. Register A01–A08 with explicit unresolved status. Store contract-generated vectors with their originating revision. +4. Define supported-generation lookup by Push network and verified factory/implementation/wiring. AccountId is supporting evidence, not the sole discriminator. + +Verification: inspect source hashes and ABI selectors, including imported gateway request layout. Refresh sources again when an external answer arrives. Existing 183 SDK unit tests and four allowance experiments are the baseline, not tests of future SDK behavior. + +Done when: implementation has a pinned target and unresolved features cannot be mistaken for supported runtime capabilities. + +## Step 2 Add the namespace and type boundaries + +Implementation: + +1. Add client.agentic, the management handle, AGENTIC constants and public actionId/configId/decodeRules utilities. Keep generation-dependent utilities internal; no AGW compileCard. +2. Model create results, wallet summaries, checkpoint records, public rules without spend, internal counters, errors and progress. Separate internal wire terms from the public Rule input. +3. Add `agenticWallet` to the shared initialize/reinitialize option path without changing ordinary-client defaults. +4. Add AgenticError and AgenticRevertError using core's structured failure model. Preserve cause/decoded error data and batch-recovery hashes; expose the base execution error if required for public instanceof checks. +5. Isolate A04/A05/A06 in small interfaces. A registered method with no implementation throws a clear unsupported-capability error; the final public error names are documented before release. + +Verification: package type checks, import/export checks and consumer snippets for ordinary, agentic and read-only clients. Ensure the new namespace does not make market/job/evaluation appear implemented. + +Done when: the settled public surface compiles and incomplete features fail explicitly. + +## Step 3 Implement execution context and lifecycle + +Implementation: + +1. Resolve and store signer origin, signer Push identity, optional AGW execution account, Push network and selected generation separately. +2. Expose AGW as universal.account only in agentic execution mode. Keep universal.origin and getAccountStatus signer-scoped. +3. Validate deployed wallet and factory membership/capabilities. Determine owner versus agent from connected Push identity. External keys resolve to the UEA for their actual origin chain. +4. For agents, require an enabled rule naming that identity. Do not filter enabled rules by expiry at initialization or replace on-chain expiry checks. +5. Preserve read-only behavior across every signing entry point. A management handle remains a handle, never a hidden account switch. +6. On reinitialize, require explicit agenticWallet selection to retain/switch AGW mode, as our recorded SDK decision. Rebuild role/capability state; preserve inheritance of existing ordinary options. +7. Enforce FROM_NOT_ALLOWED and the spec's prohibited methods before signing. Audit auxiliary entry points, including transaction-creating reads, for bypasses. + +Verification: native owner/agent, EVM-origin agent, SVM-origin agent, unknown identity, changed signer/network/wallet, read-only writes and ordinary-client compatibility. Role checks must not grant signing authority to a read-only address. + +Done when: changing displayed account cannot change gas-payer or ownership derivation accidentally. + +## Step 4 Build the contract and deployment adapter + +Implementation: + +1. Centralize ABI selection, wiring reads, supported features, start blocks and cached immutable data per generation. +2. Add reads for owner, factory registry/count/prediction, enabled permission IDs, agent config, policy mode/config and checkpoints. +3. Add encoders for owner execute, agent executeAsAgent, grants/revokes and owner-authorized signature variants where used by the chosen transport. +4. Generate any OwnerIntent typed data from the exact contract ABI/domain/nonce scheme. Never copy the simplified signatures in a proposal over the delivered ABI; bind ref if the final signed-grant design includes it. +5. Validate proxy/implementation/wiring information supplied by the selected manifest. Include network, factory and implementation identity in caches; invalidate on incompatible configuration changes. +6. Leave A07 deployment entries absent until verified. Do not use old Donut addresses as placeholders for new capabilities. + +Verification: mocked mismatched wiring and unsupported generations, ABI encode/decode vectors, intent domain/nonce/deadline tests. Final artifact comparisons occur again in step 14. + +Done when: other modules can operate against a typed adapter without knowing contract-version details. + +## Step 5 Implement wallet and checkpoint reads + +Implementation: + +1. Implement client-bound derive from signer identity and factory next index; honor the contract's index range. Implement pure derive internally with explicit generation context pending A04 public signature. +2. Implement list using walletCount and predicted indices; include the next undeployed slot shown in the spec as our documented interpretation, with zero rules and deployed=false. +3. Implement wallet(address), owner and info with snapshot-consistent reads. Reconstruct current deployment label from the event when required by the selected generation. +4. Implement checkpoints from bounded/paginated logs, ordered by block/transaction/log index. Preserve seq, kind, ref, blockNumber and txHash. Account for reorgs and sinceBlock inclusion. +5. Implement active rules.get/list internals using enabled IDs followed by agent/action/policy reads at one block. Distinguish unknown, revoked, expired and zero-valued configurations. +6. V1 has no historical records: list returns enabled rules and get rejects unknown/revoked IDs. Do not claim info/rule lookup is one RPC request if it requires dependent reads. +7. Add setLabel only for a matching supported capability. Respect the chosen cosmetic/checkpoint semantics from the final contract. + +Verification: empty owner, next slot, index races, multiple wallets/generations, paginated logs, same-block changes, unknown IDs, revoked-history limits and RPC failures. + +Done when: supported management reads return honest, complete records for their declared capability. + +## Step 6 Implement rule normalization and codecs + +Implementation: + +1. Normalize destination: omitted chainNamespace means connected Push; foreign rules retain their verified CAIP-2 chain identity. Reject owner-as-agent and duplicate agent/chain grants as specified. +2. Resolve destination token/native marker to the intended Push PRC20 with trusted chain context and exact SOURCE_CHAIN_NAMESPACE checks. Treat token amounts in their own units; reject ambiguous/duplicate asset resolution. +3. Derive expectedCEA from AGW and destination deployment, not from the agent. Supply it to the encoder and preview data; document and detect derivation drift. Separate asynchronous registry/RPC resolution from pure encodeRules/decodeRules helpers: pure helpers receive pre-resolved token, ABI and deployment context and perform no hidden network calls. +4. Derive selectors, actionId/configId and rulesId against contract vectors. Wallet-scope record keys. Use explicit validator context internally; receipt-assigned IDs remain authoritative. +5. Generate native argument pins and beneficiary positions from ABI layout. Static tuples can occupy multiple words; dynamic arguments require layout-aware handling. Reject unsupported layouts or a bare selector with insufficient ABI context for required pins. +6. Implement native terms with explicit values first. Centralize provisional A03 defaults; approval policy is external to the SDK. +7. Add a versioned universal multi-asset codec only after A05 artifacts arrive. Keep encode/decode inverse behavior and validation for 0–8 assets, per-token limits and call lists. +8. Define empty-assets call routing, expectedCEA byte width, zero/unlimited semantics and envelope-version behavior from fixtures. Do not guess these to make a test pass. + +Verification: contract-generated round trips, wrong token chain, wrong beneficiary, oversized values, dynamic ABI layouts, duplicate assets, native marker, boundary values and generation mismatch. Existing pinned single-asset vectors remain explicitly historical. + +Done when: every supported public rule has a deterministic, verified wire representation and decode result. + +## Step 7 Implement create, add and revoke + +Implementation: + +1. create validates all inputs before signing, resolves the next wallet, then deploys and grants in input order. Empty rules are valid. It never adds funding or PC top-ups. +2. Select supported UEA batching, native EIP-7702 batching or the documented native sequential fallback. Return the actual atomicity and transaction history through existing core metadata. +3. Parse matching wallet/rule events, preserve input ordering and distinguish predicted from confirmed IDs. Return the specified wallet/index/rulesIds/tx. +4. If a sequential step fails, retain deployed wallet identity, confirmed hashes and any pending hash. Re-read chain state before retry; do not silently deploy another wallet or repeat successful grants. +5. rules.add batches grants through the existing owner wallet. Recheck owner, nonce and duplicate candidates before signing. +6. rules.revoke accepts explicit IDs or all=true; reject bare revoke. Use one owner-wallet batch where needed and preserve failure atomicity. +7. Use signature-authorized contract variants only with matching verified intent encoding from step 4; a native execution path is not permission to invent a relay flow. + +Verification: partial creation, pending transaction, nonce/index races, zero/multiple rules, ID ordering, wrong owner, mixed-success prevention and all-rules revocation. + +Done when: a failed operation tells the caller exactly what committed and what can safely be retried. + +## Step 8 Implement atomic rules.update + +Implementation: + +1. Read old rules and all relevant spend counters at a consistent block, and validate every replacement before signing. +2. Encode assert(expected spend) → revoke(old ID) → grant(new rule) for every pair inside one owner execute batch. +3. Require an adapter with A05 expected-value assertions. A getter returning current totals is not a substitute. Never use the core sequential fallback for this operation. +4. Return old/new ID pairs in input order. New counters start at zero; do not silently subtract prior consumption from new caps. +5. Surface stale-spend failures clearly. A retry requires refreshed state and a new owner authorization; do not loop signatures automatically. +6. Decode checkpoint effects using final generation semantics; current single replacement adds five ticks. + +Verification: intervening spend, failed new grant, multiple assets/pairs, complete rollback, unusable old rule, usable new rule and same-block checkpoints. + +Done when: replacement preserves all-or-nothing behavior and cannot accept stale budget assumptions. + +## Step 9 Implement owner execution and setup + +Implementation: + +1. Wrap normal owner sends through AGW execute with single/batch ERC-7579 encoding. Preserve owner authority without applying agent rules. +2. Document separate funding of AGW assets/outbound PC and signer gas balance. Creation remains deployment/grants only. +3. Support bounded per-token gateway approvals through ordinary owner sends to the token from AGW. Include explicit replenishment/removal and tokens requiring a zero-reset approval strategy where applicable. +4. Use the same owner execution client for destination approvals after universal composition exists. Keep its policy-free owner authority visible to callers. +5. Reflect checkpoint changes for owner operations; do not claim allowance-driven balance changes always produce checkpoints. + +Verification: owner identity, unauthorized caller, approval success/removal, failed token call, allowance consumption and checkpoint deltas. Four local allowance experiments already demonstrate the mechanism; production gateway validation is still step 14. + +Done when: existing owner operations suffice to prepare and manage wallet funds without a new approval-specific SDK API. + +## Step 10 Implement agent selection and native sends + +Implementation: + +1. Resolve the actual transaction destination and query matching enabled rules on every send at a consistent block. +2. Zero candidates: NO_RULES_FOR_CHAIN before signing. Multiple candidates: DUPLICATE_RULE with a clear hint. Do not choose the first result. +3. Encode executeAsAgent with the selected ID and exact native single call. Leave expiry, allowance, amount and policy execution to contracts; do not build a second authorization engine in the SDK. +4. Reuse the signer transport so a foreign key calls from its own UEA. Reject any from route override before transport selection. +5. For native arrays, encode one single-call executeAsAgent per item and use only an atomic sender-preserving UEA/7702 transport. A missing/deferred 7702 authorization must never trigger sequential fallback. Keep the one-action public rule; each action remains subject to that rule. + +Verification: revoked/expired rules, ambiguous direct grants, changed grants after lookup, native value/data calls, foreign-key identity and policy revert decoding. A rule can change after lookup; the contract remains authoritative. + +Done when: an agent's normal sendTransaction executes from AGW under the correct rule without stale authorization caching. + +## Step 11 Implement EVM universal sends + +Implementation: + +1. Build a dedicated AGW outbound composer using shared low-level payload/gas/token helpers. Do not call the signer-based Route 2 unchanged. +2. Resolve AGW destination CEA and construct the allowed destination multicall with its beneficiary context and destination-value fields. +3. Under the pinned policy, set empty recipient bytes, AGW revertRecipient and a nonzero maxPCForGas; adapt exact fields to the matched final gateway ABI. +4. Resolve the token moved by this outbound against the multi-asset rule; a list of permitted assets does not by itself mean one gateway request transfers all of them. Do not invent multi-token request batching. +5. Quote wallet outbound PC and validate the structural request. Keep signer Push gas and wallet outbound fees separate. Avoid silently adding approvals or swapping tokens in the agent path. +6. Preserve the specified first-use external UEA exception. Later agentic sends enforce signer gas balance rather than silently triggering a new origin lock. Unsupported gas helpers fail as specified. +7. Handle zero-amount/empty-assets calls only through the approved A05 routing. Use adapter capabilities for EVM multicall limits and supported token kinds. + +Verification: correct CEA/refund identity, empty bytes versus zero-address bytes, fee value/caps, positive/zero amount, token resolution, insufficient signer gas, first-use UEA path and policy rejection. + +Done when: the encoded outbound satisfies the matching policy and transport; live settlement remains an additional gate. + +## Step 12 Implement SVM destination support + +Implementation: + +1. Treat Solana-origin signers separately from Solana destination rulebooks. A Solana signer can use its UEA without implying SVM outbound support. +2. Add the supported SVM codec/adapter using final contract terms and gateway payload fixtures. Resolve 32-byte accounts, trusted gateway identity, program/discriminator allow-lists and asset mapping. +3. Compile account/data constraints from the program interface with explicit layout and interface-hash context; reject unrepresentable rules. +4. Cover intermediary/aggregator program substitutions, amount ratios/slippage and output-token-account setup. Expose limitations to callers rather than assuming arbitrary instructions are safe. +5. Implement obligations 19–23 before advertising SVM destination support. The current public Rule type may need an explicit approved extension to represent these constraints; record that dependency rather than improvising a public type. + +Verification: golden instruction payloads, wrong authority/beneficiary/mint/program, invalid layouts, missing token accounts and generation-specific enablement. + +Done when: the advertised SVM surface is representable and tested. Do not silently call this deferred if the agreed release promises it. + +## Step 13 Integrate responses, tracking and reads + +Implementation: + +1. Preserve logical AGW from and signer origin on sends and waited receipts. Keep raw transaction metadata/hashes available. Management writes retain the owner from specified by the API. +2. Extend wallet/UEA calldata reconstruction for trackTransaction; a correct live response alone does not prove replay correctness. +3. Reuse hash/event-based UTX tracking. Preserve Push failure versus destination failure and do not mark success merely because a destination hash exists. +4. Add AGENTIC progress events from the refreshed spec; no removed AGENTIC-TX-103. Emit core Push events plus the specified outbound wait events, without signer Route-2 setup events. +5. Carry init/per-call hooks through send and wait once per event. Decode AGW, factory, policy and engine errors while retaining structured core metadata. +6. Audit universal.read/executeReads: these submit transactions through the execution layer. Use explicit request-budget/refund/funding context, and preserve read-only restrictions. Management RPC reads remain non-signing. +7. Ensure prohibited prepareTransaction/executeTransactions routes cannot bypass AGW restrictions; keep supported pure preparation of read specs distinct from transaction execution. + +Verification: EOA/UEA owner and agent responses, replayed tracking, failed Push without outbound polling, destination failure/timeout, hook deduplication, read request/refund context and compatibility with ordinary routes. + +Done when: every execution path reports the right account, lifecycle state and error, including asynchronous completion. + +## Step 14 Onboard a matched deployment and run acceptance + +Implementation: + +1. Obtain A07 manifest and final artifact revisions. Verify factory/implementation/wiring, proxy details, policy/engine compatibility, capabilities and start blocks. +2. Replace provisional adapters and close A05/A07 only against verified artifacts. Detect any new spec/source changes before proceeding. +3. With separately authorized funding and broadcasts, exercise native/external owners and agents. Start universal acceptance with bounded allowance, positive token amount, empty recipient, AGW refund recipient and permitted multicall. +4. Confirm actual gateway token pull/burn, fee accounting, node/TSS acceptance, correct destination CEA, receipt hashes and tracking. +5. Exercise cap/expiry/beneficiary failures, revocation, atomic replacement, allowance exhaustion and destination failure. Document currently inert creditRevert behavior rather than assuming a refund restores spend. +6. Verify supported SVM paths and ordinary SDK routes. Record network, block, deployment and transaction IDs for reproducibility. + +Done when: supported capabilities have real acceptance evidence, unresolved failures are explained, and the release does not rely solely on mocked success. + +## Step 15 Complete Web2 compatibility + +Implementation: + +1. Add enumerable READ.CHAIN containing real chains plus WEB2='web2'. Keep the specified deprecated CHAIN.WEB2 alias and compatibility for the existing READ.WEB2 surface. +2. Accept both new and legacy literal inputs, normalize to internal web2/https, and preserve wire identity web2:https. +3. Update ReadChain types, query discrimination, public parsers, prepared specs and response/tracker normalization consistently. +4. Ensure transaction destinations never accept the Web2 read-only marker. + +Verification: both literal spellings, enum iteration, compile-time read/transaction distinctions, serialized wire vectors and tracked legacy results. + +Done when: new public syntax works without breaking the existing read wire protocol. + +## Step 16 Deferred marketplace integration + +Harsh H5 removes compileCard from standalone AGW. Do not expose a public stub or block AGW release on card schema decisions. Canonical schema/encoding and SDK/hook vectors remain future marketplace work, with a separate scope and acceptance plan. + +## Step 17 Finish examples, obligations and release + +Implementation: + +1. Publish examples for create with no funding, separate funding/allowance, native agent sends, EVM destination sends, lifecycle updates and recovery from partial creation. +2. Show signer gas, wallet PC, destination idle balances, expiry and unlimited caps distinctly. Explain cap reset, outstanding outbound execution after revoke, allowance checkpoint blind spots and generation migration. +3. Map all 23 [integrator obligations](contract-integrator-obligations.md) to implementation, documentation or UI responsibilities. EVM/native items 1–18 primarily map to steps 5–11 and 17; SVM items 19–23 map to step 12 and destination acceptance. +4. Document unsupported capabilities and approved scope decisions. Remove or close all A01–A08 placeholders for advertised features, including public helper and history types. +5. Run relevant package type/build/lint and regression checks. Prepare changeset/version notes for public additions and Web2 alias migration, using repository release conventions. +6. Review public examples against actual exported methods and the selected deployment. Update tutorial/design/gap records to describe delivered behavior. + +Done when: the package can be used from its published exports as documented, supported routes have acceptance evidence and remaining scope limits are explicit. + +## Public surface coverage + +| Public surface | Implementation steps | +| --- | --- | +| agentic.derive, agentic.list | 4–5 | +| agentic.create | 6–7 | +| agentic.wallet, info, owner, checkpoints | 2, 5 | +| setLabel | 4–5, 14; matching capability required | +| rules.list/get | 5–6; A05/A06 | +| rules.add/revoke | 6–7 | +| rules.update | 8 | +| initialize/reinitialize with agenticWallet | 3–4 | +| owner/agent sendTransaction | 9–12 | +| response.wait, trackTransaction, errors/hooks | 13 | +| Public utils.agentic actionId/configId/decodeRules; internal generation IDs/derivation/encoding | 4, 6 | +| Internal encoding and public native decoding | 6, 12 | +| compileCard | Outside standalone AGW; future marketplace | +| AGENTIC constants and READ.CHAIN | 2, 4, 15 | +| forbidden methods, gas behavior and transaction-creating reads | 3, 10–13 | + +## Suggested implementation increments + +Each increment can be a focused PR; incomplete runtime features stay capability-gated and are not advertised as released support. + +1. **Foundation:** steps 1–3, adapter interfaces and SDK lifecycle tests. Start here. +2. **Independent compatibility:** step 15 plus public error export cleanup where appropriate. +3. **Read and identity adapters:** steps 4–5 and settled ID/ABI utilities from 6. +4. **Management:** final rule codecs, create/add/revoke, atomic replacement and recovery (6–8), when their required answers arrive. +5. **Execution:** owner/native agent paths, then EVM universal composition and gas (9–11). +6. **Responses and SVM:** step 13 integrated as execution lands; step 12 when its schema/capabilities are confirmed. +7. **Matched-deployment acceptance:** step 14 and fixes driven by observed integration results. +8. **Card compiler and release:** step 16 when its downstream schema exists; step 17 for the explicitly approved release surface. + +Track each increment as not started, in progress, implemented, verified or externally blocked. “Implemented” excludes placeholders; “verified” includes the listed checks. The earlier 50–60% estimate is provisional and should be replaced with task-level effort estimates after the first implementation breakdown. diff --git a/plan/agw/implementation-review-handoff.md b/plan/agw/implementation-review-handoff.md new file mode 100644 index 00000000..328991f6 --- /dev/null +++ b/plan/agw/implementation-review-handoff.md @@ -0,0 +1,212 @@ +# AGW SDK implementation — review handoff + +> Latest: [selected hardening and exact live-E2E status](research/sdk-hardening-2026-10-06/README.md). Node 20/24 pass 1,975 units and 75 local cases; the seeded differential corpus has zero mismatches. No new SDK API, hosted CI, release or funded-run change in this batch. + +> Latest: [nine SDK-owned tasks completed](research/sdk-independent-completion-2026-10-06/README.md), including internal SVM integration and shared confirmation. 1,975 units and 68 actual-contract tests pass. Public SVM and pending product choices remain gated; automated API comparison is saved. + +> Latest SDK-owned follow-up: [six delayed-index contract cases, checked consumer examples and package documentation](research/sdk-independent-followup-2026-10-06/README.md). All 59 local actual-contract cases pass; the prior 25 live scenarios remain passing evidence. Public SDK APIs and pending decisions are unchanged by this follow-up. + +> Latest acceptance: [October 6 funded tests and fixes](research/live-acceptance-2026-10-06/README.md). Network restrictions are resolved; all 53 Anvil cases and the unfiltered unit suite pass. All 25 registered AGW scenarios have passing selected-run coverage; public SVM destination integration and scope decisions remain. Changes are on feat/agw-sdk-v4. Everything below the current banners describes historical implementation/review evidence. + +> Current implementation: [v4-only native/EVM migration and validation](research/v4-implementation-2026-10-06/README.md) supersede earlier missing-adapter/empty-registry statements below. Legacy runtime/test artifacts are removed. SVM mapping, H3/H4.5/H6, ref/label scope and funded acceptance remain. + +> October 6 update: [v4 deployment/wire review](research/deployment-review-2026-10-06/README.md) supersedes the deployment/artifact absence recorded below. Those definitions are supplied, but this implementation/review evidence still concerns e704d5b; v4 SDK migration and harness acceptance remain. No live transaction was sent. + +October 3, 2026. For the reviewing agent. The per-step status is in [implementation-status.md](implementation-status.md). + +## Revisions + +| Item | Revision | +| --- | --- | +| Branch | `feat/agw-sdk-impl` (local only, not pushed) | +| Base | `feat/agw-sdk-planning@349635b2254823488603b37f4b44c4f5c929feb9` | +| Commits | `07d8adc` adapter/registry/codecs · `e87c47b` management/execution/responses · `4488639` local harness + vectors · `00b62d4` unit tests · `ebc4167` READ.CHAIN / Web2 · `e63bcc9` E2E agw group · `fa90b2a` atomic multi-rule add | +| AGW source | `pushAgenticWallet_v3@e704d5b58fd1d30ce02bc0ad74dccfbdb37804f9` (remote ref rechecked, unchanged) | +| Core / gateway | `universalMarketplace_v1@cb69e0b` / `pc20-3rd-iteration@bcbf7df` (rechecked, unchanged) | +| Target spec | Notion page 5 export 2026-10-03 13:23 IST; no newer export or answers found | +| Toolchain | forge/anvil 1.5.1-stable (b0a9dd9), solc 0.8.26 via IR, viem 2.27.2 | + +The ABIs in `src/lib/agentic/contracts/abi/e704d5b` are generated from `plan/agw/research/validation-e704d5b/abi/*.json` (sha256 in each header). A fresh isolated build is ABI-identical to that evidence, and its runtime sizes match the validation report. + +## What changed + +New module `packages/core/src/lib/agentic/`: + +| Area | Files | +| --- | --- | +| Types, errors, capabilities, registry | `agentic.types.ts`, `errors.ts`, `capabilities.ts`, `deployments.ts`, `constants.ts`, `chain.ts`, `revert.ts` | +| Contract adapter | `contracts/e704d5b.ts`, `contracts/reader.ts`, generated `contracts/abi/e704d5b/*` | +| Codecs | `codec/{ids,selectors,abi-layout,defaults,policy,native,session,universal,rules}.ts`, `codec/historical/e704d5b-universal.ts` (internal) | +| Reads | `reads/{snapshot,wallets,rules,checkpoints}.ts` | +| Writes | `management/{common,create,rules-write}.ts` | +| Execution | `execution/{guards,outbound,send}.ts`, `context.ts`, `runtime.ts`, `response.ts` | +| Namespace | `agentic.ts`, `wallet.ts`, `utils.ts`, `index.ts` | + +Edited core files: +- `push-chain/push-chain.ts`: options type, `client.agentic`, agentic wiring, guards, reinitialize. +- `orchestrator/orchestrator.types.ts`: optional `agentic` response field. +- `orchestrator/internals/errors.ts` and `execute-standard.ts`: `cause` is kept. +- `progress-hook/*`: AGENTIC-TX family. +- `constants/{index,enums,read-state}.ts`, `read-state/{destination,read-params,read-state.types,read-tracker,spec-builder}.ts` and `orchestrator/route-detector.ts`: Web2. +- `utils.ts`, `lib/index.ts`: exports. + +Tooling and tests: +- `scripts/agw-local/` (prepare.sh, gen-abi.mjs, harness contracts) +- `__agw-local__/` and `jest.agw-local.config.ts`, `tsconfig.agw-local.json` +- `src/lib/agentic/__tests__/`, `__fixtures__/e704d5b-vectors.json` +- `read-state/__tests__/web2-compat.spec.ts` +- `__e2e__/agw/`, `__e2e__/ci/{suite,run,preflight}.ts` +- `.github/workflows/e2e.yml` + +## Public behaviour and its authority + +| Change | Authority / assumption | +| --- | --- | +| `PushChain.initialize(signer, { agenticWallet })`; `universal.account` = wallet, `origin`/`getAccountStatus`/gas signer-scoped | Spec 2.a | +| `reinitialize` does not inherit `agenticWallet` | SDK-owned decision (sdk-owned-review) | +| Read-only client with `agenticWallet` resolves the context but never signs | SDK-owned decision | +| `client.agentic.derive/create/list/wallet`; handle `info/owner/checkpoints/rules.*` | Spec 1.a–1.m | +| `list()` includes the next undeployed slot | SDK interpretation of the spec example | +| `setLabel`, revoked `rules.get`, universal rule encode/decode/update, SVM, `compileCard` throw `CAPABILITY_UNAVAILABLE` | A07, A06, A05, H4.4, A08 | +| `ref` on a rule is refused unless the generation supports it (never dropped) | A07 | +| Omitted-limit defaults | A03 (provisional) | +| Approval selectors refused in universal agent rules; native approvals need a pinned spender | A01 (provisional), obligation 16 | +| Native agent arrays refused | A02 (provisional) | +| `DUPLICATE_RULE` used for ambiguous send-time candidates | sdk-owned-review | +| Extra codes: `CAPABILITY_UNAVAILABLE`, `GENERATION_UNSUPPORTED`, `READ_ONLY`, `NOT_WALLET_OWNER`, `RULE_NOT_FOUND`, `RULE_READ_FAILED`, `INCONSISTENT_READ`, `INDEX_RACE`, `CREATE_PARTIAL`, `RECEIPT_MISMATCH`, `AGENT_GAS_INSUFFICIENT`, `WALLET_BALANCE_INSUFFICIENT`, `GATEWAY_ALLOWANCE_INSUFFICIENT`, `RULE_LIMIT_EXCEEDED`, `INVALID_RULE` | SDK-owned; names not final until reviewed | +| `utils.agentic.rulesId(agent, nonce, {validator})`, `deriveWallet(owner, index, {factory, walletImplementation})` | A04 (provisional signatures) | +| `CONSTANTS.AGENTIC` is `{}`; `ENVELOPE_VERSION` omitted | A07 | +| `READ.CHAIN` (enumerable, `WEB2 = 'web2'`); `CHAIN.WEB2`/`READ.WEB2` now `'web2'`; `'web2:https'` accepted | Spec §4; legacy compatibility per G16 | +| `PushChainExecutionError` and `PushChainBatchExecutionError` exported; error keeps `cause` | Spec 3.f (`AgenticRevertError extends PushChainExecutionError`) | +| AGENTIC-TX 101/102/104/105/106/107/199-01/199-02, no 103 | Spec 3.f (PROPOSED) | + +## Commands and results + +Run from the repository root unless noted. + +| Command | Result | +| --- | --- | +| `npx tsc -p packages/core/tsconfig.lib.json --noEmit` | clean | +| `npx tsc -p packages/core/tsconfig.spec.json --noEmit` (includes `__e2e__` and `ci/*.ts`) | clean | +| `yarn nx run core:build --skip-nx-cache` | success | +| `yarn nx run core:lint --skip-nx-cache` | 7 errors, 831 warnings; **all 7 errors pre-existing** in untouched files (`pc20/tracking.ts`, `pc20/__tests__/svm.spec.ts`, `__e2e__/docs-examples/13-read-state/*`); new code has warnings only (non-null assertions in tests) | +| `node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand` | 110 suites passed, 1 skipped (pre-existing); **1883 passed, 12 skipped, 0 failed** | +| …same, `packages/core/src/lib/agentic` | 6 suites, **123 passed** | +| …same, `read-state/__tests__/web2-compat.spec.ts` | **12 passed** | +| …the ten baseline suites from `research/sdk-owned-review-2026-10-03/test-summary.json` | **183 passed** (unchanged baseline) | +| `AGW_LOCAL_DIR=$(packages/core/scripts/agw-local/prepare.sh \| tail -1) node node_modules/jest/bin/jest.js --config packages/core/jest.agw-local.config.ts --runInBand --forceExit` | 3 suites, **32 passed** | +| `AGW_WRITE_VECTORS=1` + the vectors spec, then without it | vectors regenerated deterministically and re-verified | +| `cd packages/core && yarn e2e:list --group agw` | 21 scenarios, 7 spec files | +| `yarn e2e:verify --group agw` | 21 scenarios, 7 files, 21 distinct tests, consistent | +| `yarn e2e:verify --group all` | **76 scenarios, 40 files, 81 tests: unchanged** (agw excluded) | +| `AGW_E2E=1 AGW_DEPLOYMENT_MANIFEST= npx jest -c jest.e2e.config.ts --runTestsByPath __e2e__/agw/create.spec.ts` | 2 failed with `AgwPrerequisiteError` (strict gate, intended); no RPC or broadcast | +| Same spec without `AGW_E2E` | skipped (not reported as passed) | +| `multi-asset-svm.spec.ts` | 7 todo | + +Not run: `yarn e2e:preflight --group agw [--dry-run]` and `yarn e2e:ci --group agw`. Both need configured keys and a deployment manifest; no live run was authorized and no compatible deployment exists. + +## Real contracts versus mocks + +**Real contracts (local harness, pinned e704d5b on anvil chainId 9000).** SmartSession, AgentValidator, UniversalRulesPolicy (proxy), the AGW implementation and AGWFactory (proxy) decide every assertion about: +- authorization (owner door, agent door, stranger, `CallerIsNotAgent` path) +- policy enforcement: `CallLimitReached`, `ArgPinMismatch`, amount caps, `RulesExpired`, URP outbound gates 9–11 and the multicall allow-list +- IDs, wallet prediction and checkpoint sequencing (the five-tick replacement; OWNER_ACTION + RULES_GRANTED per batched grant) +- atomic `rules.update` and its rollback after an intervening agent spend +- revoke-all, sequential create partial failure and recovery +- allowance set/remove through the owner door, and allowance consumption + +Committed vectors are contract-computed (`getPermissionId`, `predictWallet`, a real grant). + +**Stubbed in the harness:** +- The gateway at `0x…C1`: models only pull + burn + fee arithmetic. +- The fee quote. +- The destination CEA address, for the outbound case. +- Only Push-EOA signers run; there is no UEA, precompile, Cosmos module, TSS, relay or destination execution. + +**Mocks (unit).** Chain reads (`__tests__/fake-chain.ts`, an in-memory model of the views) and the signer transport (`mock-runtime.ts`). These test SDK logic only: selection, error mapping, call shapes, ordering, consistency checks and pre-signature guards. + +**Live.** None. No transaction was broadcast to any testnet. No compatible deployment has been verified or registered; that is evidence of unavailable support, not proof that none exists anywhere. + +## Blockers and placeholders + +- **A07 — no compatible deployment has been verified or registered.** Every AGW call on a real network fails with `GENERATION_UNSUPPORTED`. The E2E group fails its gate, and preflight refuses to fund. To onboard: + 1. Write a manifest per `__e2e__/agw/_manifest.ts`. + 2. Add a verified entry to `VERIFIED_DEPLOYMENTS` in `deployments.ts`, and populate `CONSTANTS.AGENTIC` from it. + 3. Pass `AGW_DEPLOYMENT_MANIFEST` in `.github/workflows/e2e.yml`. It is not wired there yet. +- **A05.** Universal rules through the public `UniversalRule` (assets[]), universal `rules.update`, multi-asset `Spent`, and universal decoding in `rules.list`. That last one makes `list` fail outright on a wallet holding a universal rule, rather than truncate. +- **Universal E2E scenario 7.** It grants with the internal historical single-asset codec as fixture setup. This is valid only for an e704d5b-ABI deployment. +- **A06.** Revoked-rule history. +- **A08.** `compileCard`. +- **SVM destinations.** H4.4 and obligations 19–23. +- **A01–A04.** Implemented as provisional behaviour behind single modules (`codec/policy.ts`, `codec/defaults.ts`, `utils.ts`). +- **Step 17.** Release documentation, examples and a changeset are not written. + +## Areas most needing review + +1. **`CHAIN.WEB2` / `READ.WEB2` value change** from `'web2:https'` to `'web2'`. Spec alias semantics require it, and comparisons against the constants still work. Code comparing against the old literal would break. +2. **No SDK allowance writes.** Neither door approves the gateway; both consume an allowance the owner set with an ordinary owner-door send, and fail with `GATEWAY_ALLOWANCE_INSUFFICIENT` before signing otherwise (review R4). +3. **Checkpoint semantics of batched writes.** + - Multi-ID revoke and multi-rule add use one owner `execute` batch, for atomicity and one signature. + - This adds one OWNER_ACTION tick per call on top of RULES_REVOKED / RULES_GRANTED. + - Single-ID revoke and single-rule add stay direct (one tick). + - `create` uses the signer's batch, which is sequential on a 7702-less Push EOA, reported as `CREATE_PARTIAL`. +4. **`create` index race.** It is detected after the fact (`INDEX_RACE`). Concurrent creates by the same owner can land grants on the raced wallet, and the error details say so. +5. **Decoded native pins/amount use the raw `{ offset, expected }` form.** Stored terms carry no ABI, so decoding never invents an argument index; the encoder accepts that form, so decoded rules re-encode exactly. This extends the page-5 `NativeRule` type and needs product sign-off (review R5). +6. **Agent gas guard.** + - It mirrors R1's fee-lock condition, using R1's default 1e7 gas estimate when no `gasLimit` is given. + - Formula: `balance < (gasLimit ?? 1e7) * gasPrice`. + - It applies to every agentic send by an external signer whose UEA is deployed. +7. **`universal.read`/`executeReads` in agentic mode.** They execute through the wallet, check the wallet's balance, and default `refundTo` to the wallet. An agent needs a native rule for the read registry entrypoint. +8. **`trackTransaction` replay adaptation.** It runs only for wallets of a registered generation. Otherwise the response is unchanged. One extra RPC per tracked AGW call. +9. **`PolicyCheckReverted` decoding.** The inner error is named by selector only, because its arguments are truncated by the engine. The SDK also extracts revert data from viem's "custom error 0x…: …" text, because the R1 path previously discarded the cause. +10. **viem `decodeEventLog` pitfall.** With a single-event ABI, viem skips the topic0 check. All AGW log parsers match topic0 explicitly. Other SDK modules were not audited for this. +11. **Pre-existing inconsistency.** `CHAIN.PUSH_LOCALNET` is `eip155:9001` but `CHAIN_INFO[PUSH_LOCALNET].chainId` is `9000`. The harness follows `CHAIN_INFO`, and native rule chains derive from `CHAIN_INFO`. +12. **E2E specs have never executed live.** Expect adjustment on first run: budgets, fee sizing (`AGW_E2E_MAX_PC_PER_CALL`), destination-revert classification text, and first-use event IDs. + +## Reproducing the local harness + +```sh +OUT=$(packages/core/scripts/agw-local/prepare.sh | tail -1) # isolated git archive + pinned submodules + forge build +AGW_LOCAL_DIR=$OUT node node_modules/jest/bin/jest.js --config packages/core/jest.agw-local.config.ts --runInBand --forceExit +``` + +`prepare.sh` reads the AGW repo with `git archive`/`ls-tree` only, and never touches its working tree. The harness uses anvil's public development keys and broadcasts only to the local anvil it spawns. + +## Review response (2026-10-03) + +The independent review in [implementation-review/review.md](implementation-review/review.md) reported seven issues against `3008497`. All seven were confirmed and fixed. Its two real-contract races pass unmodified against the fix (R1), or with the throw expected (R4); both are ported into `__agw-local__/agw-local-races.spec.ts`. Its SDK-boundary regressions are ported into the unit suites, adapted where the fix changed the API (`ownerOutboundCalls` removed, composer options, offset-form pins). + +| Finding | Resolution | Evidence | +| --- | --- | --- | +| R1 create race grants on the wrong wallet | The deploy call is `deployWalletWithSig(intent{owner, index, wallet}, 0x, label)` sent by the owner itself: no signature, but the factory reverts `IndexMismatch`/`IntentWalletMismatch` if the slot moved, so a batch that would grant on a raced address reverts first. Mapped to `INDEX_RACE` with `committed: false` | Real contracts (sequential path): no permissions on either wallet, retry succeeds. Unit: deploy call shape, race mapping. Atomic 7702/UEA paths rely on the same contract check; not locally exercised | +| R4 owner outbound restores revoked allowance; uint256.max overflow | Removed the read-modify-write approval. Both doors only consume an existing allowance | Real contracts: an allowance revoked after the read stays 0 and the pull reverts `LowAllowance`. Unit: no approve call, insufficient allowance refused, unlimited allowance accepted | +| R2 explicit Push ChainTarget routed outbound | A ChainTarget on the connected Push chain is normalized to the native path. Another Push network is refused | Unit: agent and owner, `PUSH_TESTNET_DONUT`/`PUSH_TESTNET` alias, `PUSH_MAINNET` refusal | +| R3 transfer-only outbound drops the recipient | Destination calls are built as core Route 2 builds them: ERC-20 `transfer(target)`, native value to the target, explicit arrays as given, and the burn sized from `value` when there are no funds. A request with no destination call (CEA parking) is refused, and the agent door refuses selector-less destination calls before signing | Unit: ERC-20 transfer payload names the recipient; value-only burn and forward; parking refused. Recipient-balance acceptance still needs a live run | +| R5 decoded pins misrepresented | Decoder returns `{ offset, expected }`. Encoder accepts it, plus canonical 32-byte words in argument form | Unit: static-array round trip, address-pin re-encode, offset validation; harness decode assertion updated | +| R6 replay keeps a Push-only route | A decoded AGW outbound sets `UOA_TO_CEA` and its chain authoritatively | Unit at the adapter boundary. The delayed-Cosmos path through response-builder/`wait()` is not exercised (needs a live or deeper mocked run) | +| R7 recovery reports unknown as not deployed | Committed state is derived from this call's own receipts. `walletDeployed` is `true`, `false` or `'unknown'` (pending hash or failed recovery reads, with `recoveryError`). A post-submit receipt failure keeps the hash (`RECEIPT_UNAVAILABLE`, surfaced inside `CREATE_PARTIAL`) | Unit: receipts-derived recovery, pending hash, failed recovery read, lost receipt | + +Also from this pass: +- Revert decoding now names an error by selector when its arguments were lost in a node's text rendering. That is how the R1 `IndexMismatch` is recognized on the sequential path. +- An omitted `funds.token` on an outbound means the destination's native token, as in Route 2. +- The E2E positive outbound uses the explicit call-array form and independently checks the wallet CEA's Sepolia balance. Caller/event correlation for the executing CEA is still to be added before a funded run. + +Counts after the fixes: unit **1,899 passed, 12 skipped** (110 suites passed, 1 skipped; agentic 139); local harness **34 passed in 4 suites**. Library/spec typecheck and build pass. Lint has no errors in changed code (7 pre-existing errors elsewhere). E2E manifests are unchanged (agw 21, all 76). + + +## Outbound response follow-up + +F1 from the follow-up review is fixed. Live and replayed outbound response `to/data/value` now describe the first encoded destination call, with the full ordered list in `agentic.destinationCalls`. This avoids guessing whether a token transfer was explicit or generated from funds. Wrapped raw metadata and signer origin are preserved. + +R6 now has regular tests through the real response-builder/wait closure with mocked RPC/polling, covering owner and agent doors, successful and reverted roots, and init/per-call terminal-hook counts. Live Cosmos/TSS/destination acceptance remains pending. + +Validation: 1,908 unit tests and 34 local-contract tests pass; library/spec typechecks and build pass. Lint retains seven errors in unchanged files. See [resolution and coverage](implementation-review/outbound-response-resolution.md). Product sign-off on raw-offset types and deployment gates are unchanged. + + +## Harsh scope alignment October 4 + +The clear product replies are now implemented. No SDK approval-selector or mandatory-spender policy remains; caller-requested pins are still encoded/validated. RulesRecord no longer exposes spent; update assertions still read internal counters. Active-only reads return RULE_NOT_FOUND for unknown/revoked IDs. Public generation-context helpers and compileCard are removed; the remaining public utils are actionId/configId/decodeRules, and client.agentic.derive remains available. + +Native agent arrays wrap each action in a single-call executeAsAgent and use an internal atomic-only orchestrator path. UEA uses existing multicall; Push EOA requires a deployed 7702 executor and usable authorization. Lack of capability or authorization never falls back to separate calls. Replay recognizes verified UEA/delegated-EOA batches and exposes the ordered actions in agentic.nativeCalls. A local real-type-4 test with actual AGW/engine/policy and a fixture ERC-7821 executor proves sender preservation, cumulative limits and full rollback. Live native batch scenarios are registered but not run. + +H3 defaults remain byte-for-byte unchanged. Raw-offset API approval and final multi-asset/SVM/deployment artifacts remain pending. [Evidence](research/product-alignment-2026-10-04/README.md). diff --git a/plan/agw/implementation-review/README.md b/plan/agw/implementation-review/README.md new file mode 100644 index 00000000..d23da937 --- /dev/null +++ b/plan/agw/implementation-review/README.md @@ -0,0 +1,9 @@ +# AGW implementation review evidence + +The original [review](review.md), tests and logs in this directory describe implementation revision `3008497`. They are historical evidence, including deliberately failing regression assertions. Several tested helpers changed or were removed in the fixes, so the original regression file is not expected to compile against the current implementation. Reproduce it against its recorded revision. + +The [follow-up review at 9e16b23](followup-9e16b23/review.md) verifies fixes in `880e7ae`, reproduces 1,899 unit tests and 34 local-contract tests, adds a passing response-builder/wait check, and identifies the remaining explicit-transfer replay inconsistency. + +Normal acceptance tests live under `packages/core/src/lib/agentic/__tests__/` and `packages/core/__agw-local__/`. Review-specific configurations stay outside their discovery patterns. No review test here authorizes or performs a live-network broadcast. + +The [outbound response resolution](outbound-response-resolution.md) records the subsequent F1 fix and promoted R6 coverage. Current acceptance cases are in the regular SDK suite; historical logs in the follow-up folder still show the earlier failure by design. diff --git a/plan/agw/implementation-review/build.log b/plan/agw/implementation-review/build.log new file mode 100644 index 00000000..cbb0d301 --- /dev/null +++ b/plan/agw/implementation-review/build.log @@ -0,0 +1,13 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:62204) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core + + diff --git a/plan/agw/implementation-review/e2e-agw-manifest.log b/plan/agw/implementation-review/e2e-agw-manifest.log new file mode 100644 index 00000000..f173a92d --- /dev/null +++ b/plan/agw/implementation-review/e2e-agw-manifest.log @@ -0,0 +1,24 @@ +✓ agw-create-bare 1 test +✓ agw-create-rules 1 test +✓ agw-funding-pc 1 test +✓ agw-funding-allowance 1 test +✓ agw-native-agent 1 test +✓ agw-native-owner 1 test +✓ agw-native-over-cap 1 test +✓ agw-native-stranger 1 test +✓ agw-native-revoked 1 test +✓ agw-native-expired 1 test +✓ agw-lifecycle-add 1 test +✓ agw-lifecycle-update 1 test +✓ agw-lifecycle-checkpoints 1 test +✓ agw-lifecycle-revoke-all 1 test +✓ agw-universal-outbound 1 test +✓ agw-universal-dest-revert 1 test +✓ agw-identity-evm 1 test +✓ agw-identity-first-use 1 test +✓ agw-identity-solana 1 test +✓ agw-responses-hooks 1 test +✓ agw-responses-replay 1 test + +21 scenarios, 7 spec files, 21 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/implementation-review/e2e-all-manifest.log b/plan/agw/implementation-review/e2e-all-manifest.log new file mode 100644 index 00000000..dfa5f250 --- /dev/null +++ b/plan/agw/implementation-review/e2e-all-manifest.log @@ -0,0 +1,79 @@ +✓ smoke-uea-derive-evm 1 test +✓ smoke-read-track-lookup 1 test +✓ smoke-cea-derive-evm 1 test +✓ smoke-roundtrip-evm 1 test +✓ smoke-roundtrip-svm 1 test +✓ smoke-cea-pda-svm 1 test +✓ smoke-gasfee-reads 2 tests +✓ smoke-gas-sizer 2 tests +✓ smoke-pc20-registry 2 tests +✓ smoke-pc20-resolve 1 test +✓ evm-r1-transfer 1 test +✓ evm-r1-funds-usdt 1 test +✓ evm-r1-funds-native 1 test +✓ evm-r1-value-funds-data 1 test +✓ evm-r1-bridge-multicall 1 test +✓ evm-r1-fresh-value-native 1 test +✓ evm-r2-funds-erc20 1 test +✓ evm-r2-payload 1 test +✓ evm-r2-multicall 1 test +✓ evm-r2-funds-payload 1 test +✓ evm-r2-native-funds 1 test +✓ evm-r2-native-funds-payload 1 test +✓ evm-r3-funds-erc20 1 test +✓ evm-r3-payload 1 test +✓ evm-r3-multicall 1 test +✓ evm-r3-funds-payload 1 test +✓ evm-r3-native-funds 1 test +✓ evm-r3-eoa-native-funds 1 test +✓ svm-r1-transfer 1 test +✓ svm-r1-funds-sol-self 1 test +✓ svm-r1-value-self 1 test +✓ svm-r1-data-contract 1 test +✓ svm-r1-fresh-key-repro 1 test +✓ svm-r2-funds-sol 1 test +✓ svm-r2-funds-spl 1 test +✓ svm-r2-payload-cpi 1 test +✓ svm-r2-sol-cpi 1 test +✓ svm-r3-drain-sol 1 test +✓ svm-r3-drain-spl 1 test +✓ pc20-export-deployed-wrapper 1 test +✓ pc20-export-predicts-wrapper 1 test +✓ pc20-inbound-burn-unlock 1 test +✓ pc20-r3-cea-burn 1 test +✓ pc20-svm-r1-direct-burn 1 test +✓ pc20-svm-r3-cea-ata-burn 1 test +✓ push-send-transaction 1 test +✓ push-value-own-uea 1 test +✓ push-multicall-no-funds 1 test +✓ push-track-r1-sepolia-parity 1 test +✓ push-track-r3-funds-roundtrip 1 test +✓ push-track-source-leg-hashes 2 tests +✓ xc-multi-child-r3 1 test +✓ xc-fresh-wallet-r3 1 test +✓ xc-peth-bridge-back 1 test +✓ xc-cascade-6hop 1 test +✓ read-evm-balance-eoa 1 test +✓ read-canonical-registry 1 test +✓ read-evm-balance-uea 1 test +✓ read-evm-contract-call 1 test +✓ read-evm-callback-reverts 1 test +✓ read-expiry 1 test +✓ read-svm-lamports 1 test +✓ read-web2-json 1 test +✓ read-docs-example 1 test +✓ read-docs-evm-balance 1 test +✓ read-docs-batch 1 test +✓ read-docs-resume 2 tests +✓ read-app-batch-eoa 1 test +✓ read-app-batch-uea 1 test +✓ read-app-batch-recovery 1 test +✓ read-api-token 1 test +✓ read-api-mixed-outcomes 1 test +✓ read-svm-token-auto 1 test +✓ read-svm-idl 1 test +✓ read-evm-any-mutability 1 test +✓ read-svm-raw 1 test + +76 scenarios, 40 spec files, 81 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/implementation-review/evidence.json b/plan/agw/implementation-review/evidence.json new file mode 100644 index 00000000..b520883e --- /dev/null +++ b/plan/agw/implementation-review/evidence.json @@ -0,0 +1,97 @@ +{ + "reviewed_commit": "3008497b2492a6be78300011d4572076414505bf", + "base": "349635b2254823488603b37f4b44c4f5c929feb9", + "date": "2026-10-03", + "commands": [ + { + "command": "node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand", + "result": "1883 passed; 12 skipped" + }, + { + "command": "packages/core/scripts/agw-local/prepare.sh; then AGW_LOCAL_DIR= node node_modules/jest/bin/jest.js --config packages/core/jest.agw-local.config.ts --runInBand --forceExit", + "result": "32 passed; local Anvil only" + }, + { + "command": "node node_modules/typescript/bin/tsc -p packages/core/tsconfig.lib.json --noEmit", + "result": "passed" + }, + { + "command": "node node_modules/typescript/bin/tsc -p packages/core/tsconfig.spec.json --noEmit", + "result": "passed" + }, + { + "command": "yarn nx run core:build --skip-nx-cache", + "result": "passed" + }, + { + "command": "yarn nx run core:lint --skip-nx-cache", + "result": "7 errors in unchanged files" + }, + { + "command": "cd packages/core; node ../../node_modules/ts-node/dist/bin.js --transpile-only __e2e__/ci/run.ts --verify --group agw; repeat --group all", + "result": "21 and 76 scenarios respectively; manifest checks passed" + }, + { + "command": "node node_modules/jest/bin/jest.js --config plan/agw/implementation-review/reviewer.config.cjs --runInBand --runTestsByPath plan/agw/implementation-review/regressions.spec.ts", + "result": "7 expected regression failures" + }, + { + "command": "AGW_LOCAL_DIR= node node_modules/jest/bin/jest.js --config plan/agw/implementation-review/reviewer.config.cjs --runInBand --runTestsByPath plan/agw/implementation-review/local-races.spec.ts --forceExit", + "result": "2 expected regression failures; local Anvil only" + } + ], + "lint_errors": [ + { + "file": "packages/core/__e2e__/docs-examples/13-read-state/fixtures/universal_read_batch.js", + "diagnostic": "4:1 error Projects should use relative imports to import from other files within the same project. Use \"./path/to/file\" instead of import from \"@pushchain/core\" @nx/enforce-module-boundaries", + "changed_in_implementation": false + }, + { + "file": "packages/core/__e2e__/docs-examples/13-read-state/fixtures/universal_read_evm_balance.js", + "diagnostic": "4:1 error Projects should use relative imports to import from other files within the same project. Use \"./path/to/file\" instead of import from \"@pushchain/core\" @nx/enforce-module-boundaries", + "changed_in_implementation": false + }, + { + "file": "packages/core/__e2e__/docs-examples/13-read-state/fixtures/universal_read_resume.js", + "diagnostic": "4:1 error Projects should use relative imports to import from other files within the same project. Use \"./path/to/file\" instead of import from \"@pushchain/core\" @nx/enforce-module-boundaries", + "changed_in_implementation": false + }, + { + "file": "packages/core/__e2e__/docs-examples/13-read-state/playgrounds.spec.ts", + "diagnostic": "20:63 error Unexpected empty async function @typescript-eslint/no-empty-function", + "changed_in_implementation": false + }, + { + "file": "packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts", + "diagnostic": "286:28 error Require statement not part of import statement @typescript-eslint/no-var-requires", + "changed_in_implementation": false + }, + { + "file": "packages/core/src/lib/orchestrator/internals/pc20/tracking.ts", + "diagnostic": "128:40 error Require statement not part of import statement @typescript-eslint/no-var-requires", + "changed_in_implementation": false + }, + { + "file": "packages/core/src/lib/orchestrator/internals/pc20/tracking.ts", + "diagnostic": "131:28 error Require statement not part of import statement @typescript-eslint/no-var-requires", + "changed_in_implementation": false + } + ], + "limits": "No production source changed; no live-network broadcasts; local gateway/fee/CEA fixtures do not prove settlement.", + "sha256": { + "build.log": "ad1d0eb1a71fcdcf4169d571fbc3ba2e140eb6cc576d9c06de45499e65d97a78", + "e2e-agw-manifest.log": "547b3068ab4276f9c4e0bbacdff3e6e635a5e812c86ee18dcdc235cf3dca6052", + "e2e-all-manifest.log": "3d1649d660267693725f167772c8cfc6b0c51a385e1043d203efe1459798f6ff", + "lint.log": "f6ff5a01078bc1c97bb3157e0a2e31a48d2670191ee9e78bbbddbf0fbcd8bba0", + "local-races.log": "bdf2ff4ca17d9c6301359990a8259e19fe45bb4d155fa72194b031c23ab76edf", + "local-races.spec.ts": "19620c71a8c2c8699634ba080f19b673aabb87437858517a2fae1b662adabdb1", + "local-suite.log": "d4d40e9780a070949ab3a04e60ed8f8f43fc2839b831ca520d182994c61c0b71", + "regressions.log": "ffc8e1161c60177eac2c71843c68f4e5473d7585563923431d44753755d434a5", + "regressions.spec.ts": "41a4dd650950d647b7c5c4dbbb2074078283346ad0468743da6cf742c1b2f432", + "review.md": "a592ed63be12b556606fbf3fcf682175a7099020b5ef5f32e719190a34e649d2", + "reviewer.config.cjs": "77cf419682ced6b430f89997f2664622f14b1ba32488a284c3ce39c7b30195be", + "types-lib.log": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "types-spec.log": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "unit-suite.log": "f157b97943506508225f66bb858f822208c248d5d5b22d7391046f50eee8ee78" + } +} diff --git a/plan/agw/implementation-review/followup-9e16b23/build.log b/plan/agw/implementation-review/followup-9e16b23/build.log new file mode 100644 index 00000000..71af062d --- /dev/null +++ b/plan/agw/implementation-review/followup-9e16b23/build.log @@ -0,0 +1,13 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:11617) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core + + diff --git a/plan/agw/implementation-review/followup-9e16b23/e2e-agw.log b/plan/agw/implementation-review/followup-9e16b23/e2e-agw.log new file mode 100644 index 00000000..f173a92d --- /dev/null +++ b/plan/agw/implementation-review/followup-9e16b23/e2e-agw.log @@ -0,0 +1,24 @@ +✓ agw-create-bare 1 test +✓ agw-create-rules 1 test +✓ agw-funding-pc 1 test +✓ agw-funding-allowance 1 test +✓ agw-native-agent 1 test +✓ agw-native-owner 1 test +✓ agw-native-over-cap 1 test +✓ agw-native-stranger 1 test +✓ agw-native-revoked 1 test +✓ agw-native-expired 1 test +✓ agw-lifecycle-add 1 test +✓ agw-lifecycle-update 1 test +✓ agw-lifecycle-checkpoints 1 test +✓ agw-lifecycle-revoke-all 1 test +✓ agw-universal-outbound 1 test +✓ agw-universal-dest-revert 1 test +✓ agw-identity-evm 1 test +✓ agw-identity-first-use 1 test +✓ agw-identity-solana 1 test +✓ agw-responses-hooks 1 test +✓ agw-responses-replay 1 test + +21 scenarios, 7 spec files, 21 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/implementation-review/followup-9e16b23/e2e-all.log b/plan/agw/implementation-review/followup-9e16b23/e2e-all.log new file mode 100644 index 00000000..dfa5f250 --- /dev/null +++ b/plan/agw/implementation-review/followup-9e16b23/e2e-all.log @@ -0,0 +1,79 @@ +✓ smoke-uea-derive-evm 1 test +✓ smoke-read-track-lookup 1 test +✓ smoke-cea-derive-evm 1 test +✓ smoke-roundtrip-evm 1 test +✓ smoke-roundtrip-svm 1 test +✓ smoke-cea-pda-svm 1 test +✓ smoke-gasfee-reads 2 tests +✓ smoke-gas-sizer 2 tests +✓ smoke-pc20-registry 2 tests +✓ smoke-pc20-resolve 1 test +✓ evm-r1-transfer 1 test +✓ evm-r1-funds-usdt 1 test +✓ evm-r1-funds-native 1 test +✓ evm-r1-value-funds-data 1 test +✓ evm-r1-bridge-multicall 1 test +✓ evm-r1-fresh-value-native 1 test +✓ evm-r2-funds-erc20 1 test +✓ evm-r2-payload 1 test +✓ evm-r2-multicall 1 test +✓ evm-r2-funds-payload 1 test +✓ evm-r2-native-funds 1 test +✓ evm-r2-native-funds-payload 1 test +✓ evm-r3-funds-erc20 1 test +✓ evm-r3-payload 1 test +✓ evm-r3-multicall 1 test +✓ evm-r3-funds-payload 1 test +✓ evm-r3-native-funds 1 test +✓ evm-r3-eoa-native-funds 1 test +✓ svm-r1-transfer 1 test +✓ svm-r1-funds-sol-self 1 test +✓ svm-r1-value-self 1 test +✓ svm-r1-data-contract 1 test +✓ svm-r1-fresh-key-repro 1 test +✓ svm-r2-funds-sol 1 test +✓ svm-r2-funds-spl 1 test +✓ svm-r2-payload-cpi 1 test +✓ svm-r2-sol-cpi 1 test +✓ svm-r3-drain-sol 1 test +✓ svm-r3-drain-spl 1 test +✓ pc20-export-deployed-wrapper 1 test +✓ pc20-export-predicts-wrapper 1 test +✓ pc20-inbound-burn-unlock 1 test +✓ pc20-r3-cea-burn 1 test +✓ pc20-svm-r1-direct-burn 1 test +✓ pc20-svm-r3-cea-ata-burn 1 test +✓ push-send-transaction 1 test +✓ push-value-own-uea 1 test +✓ push-multicall-no-funds 1 test +✓ push-track-r1-sepolia-parity 1 test +✓ push-track-r3-funds-roundtrip 1 test +✓ push-track-source-leg-hashes 2 tests +✓ xc-multi-child-r3 1 test +✓ xc-fresh-wallet-r3 1 test +✓ xc-peth-bridge-back 1 test +✓ xc-cascade-6hop 1 test +✓ read-evm-balance-eoa 1 test +✓ read-canonical-registry 1 test +✓ read-evm-balance-uea 1 test +✓ read-evm-contract-call 1 test +✓ read-evm-callback-reverts 1 test +✓ read-expiry 1 test +✓ read-svm-lamports 1 test +✓ read-web2-json 1 test +✓ read-docs-example 1 test +✓ read-docs-evm-balance 1 test +✓ read-docs-batch 1 test +✓ read-docs-resume 2 tests +✓ read-app-batch-eoa 1 test +✓ read-app-batch-uea 1 test +✓ read-app-batch-recovery 1 test +✓ read-api-token 1 test +✓ read-api-mixed-outcomes 1 test +✓ read-svm-token-auto 1 test +✓ read-svm-idl 1 test +✓ read-evm-any-mutability 1 test +✓ read-svm-raw 1 test + +76 scenarios, 40 spec files, 81 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/implementation-review/followup-9e16b23/evidence.json b/plan/agw/implementation-review/followup-9e16b23/evidence.json new file mode 100644 index 00000000..acc2be07 --- /dev/null +++ b/plan/agw/implementation-review/followup-9e16b23/evidence.json @@ -0,0 +1,50 @@ +{ + "reviewed_commit": "9e16b23a76816176dca20793d74df5a5548a497e", + "fix_commit": "880e7ae", + "original_review_commit": "3008497", + "commands": [ + { + "command": "node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand", + "result": "1899 passed, 12 skipped" + }, + { + "command": "AGW_LOCAL_DIR= node node_modules/jest/bin/jest.js --config packages/core/jest.agw-local.config.ts --runInBand --forceExit", + "result": "34 passed; local Anvil only" + }, + { + "command": "node node_modules/typescript/bin/tsc -p packages/core/tsconfig.lib.json --noEmit", + "result": "passed" + }, + { + "command": "node node_modules/typescript/bin/tsc -p packages/core/tsconfig.spec.json --noEmit", + "result": "passed" + }, + { + "command": "yarn nx run core:build --skip-nx-cache", + "result": "passed" + }, + { + "command": "cd packages/core; node ../../node_modules/ts-node/dist/bin.js --transpile-only __e2e__/ci/run.ts --verify --group agw; repeat for --group all", + "result": "21 and 76 scenarios; consistent" + }, + { + "command": "node node_modules/jest/bin/jest.js --config plan/agw/implementation-review/followup-9e16b23/reviewer.config.cjs --runInBand", + "result": "1 passed R6 wait path; 1 failed F1 replay metadata" + } + ], + "live_broadcasts": false, + "lint_rerun": false, + "sha256": { + "build.log": "09bf04fbbfdd931522cc613563d0b50228db346468e6b12d8bd3b0d8f0e83a39", + "e2e-agw.log": "547b3068ab4276f9c4e0bbacdff3e6e635a5e812c86ee18dcdc235cf3dca6052", + "e2e-all.log": "3d1649d660267693725f167772c8cfc6b0c51a385e1043d203efe1459798f6ff", + "local.log": "6943d541bc5a51a35088cc21e7b73a1421f649c4f7b499fa6f03f95300c77e4a", + "replay.log": "d529a83860759ef19a53219b174266295b1d1cf32a266de68c048d2be039a09e", + "replay.spec.ts": "a183d9cc10d66c088fa9831a581505e6d229bcbb7fe7496b9017b2fd05c82541", + "review.md": "7eda3e6aa95e6121bd21f41afd13045b5ee1a20b045f30f3e793ac7c78398d17", + "reviewer.config.cjs": "54ec14331588c36c0bd18582eb5be52a5d34f96d18474a9a54f67a9168ff0324", + "types-lib.log": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "types-spec.log": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "unit.log": "62e8f81038a8dd45bb0a681de215281e44c1901dc1c120894bc7ba6f8985dfbf" + } +} diff --git a/plan/agw/implementation-review/followup-9e16b23/local.log b/plan/agw/implementation-review/followup-9e16b23/local.log new file mode 100644 index 00000000..8c3f9656 --- /dev/null +++ b/plan/agw/implementation-review/followup-9e16b23/local.log @@ -0,0 +1,11 @@ +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts (5.222 s) +PASS core-agw-local packages/core/__agw-local__/agw-local-races.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts + +Test Suites: 4 passed, 4 total +Tests: 34 passed, 34 total +Snapshots: 0 total +Time: 9.159 s, estimated 10 s +Ran all test suites. +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/implementation-review/followup-9e16b23/replay.log b/plan/agw/implementation-review/followup-9e16b23/replay.log new file mode 100644 index 00000000..d87f4c4c --- /dev/null +++ b/plan/agw/implementation-review/followup-9e16b23/replay.log @@ -0,0 +1,32 @@ +FAIL plan/agw/implementation-review/followup-9e16b23/replay.spec.ts (9.298 s) + ✓ R6 recognized outbound triggers real response-builder wait after an early Push-only route (8 ms) + ✕ F1 replay of an explicitly supplied ERC20 transfer retains the token target and calldata (5 ms) + + ● F1 replay of an explicitly supplied ERC20 transfer retains the token target and calldata + + expect(received).toMatchObject(expected) + + - Expected - 2 + + Received + 2 + + Object { + - "data": "0xa9059cbb00000000000000000000000000000000000000000000000000000000000000b9000000000000000000000000000000000000000000000000000000000000000a", + - "to": "0x0000000000000000000000000000000000007a76", + + "data": "0x", + + "to": "0x00000000000000000000000000000000000000b9", + } + + 59 | const response = fakeResponse({ to: w.address, data: e704d5b.encodeExecute([out.gatewayCall]) }); + 60 | await adaptTrackedResponse(rt, response); + > 61 | expect(response).toMatchObject({ to: ADDR.target, data }); + | ^ + 62 | }); + 63 | + + at Object. (plan/agw/implementation-review/followup-9e16b23/replay.spec.ts:61:20) + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 1 passed, 2 total +Snapshots: 0 total +Time: 9.419 s +Ran all test suites. diff --git a/plan/agw/implementation-review/followup-9e16b23/replay.spec.ts b/plan/agw/implementation-review/followup-9e16b23/replay.spec.ts new file mode 100644 index 00000000..bd90608d --- /dev/null +++ b/plan/agw/implementation-review/followup-9e16b23/replay.spec.ts @@ -0,0 +1,62 @@ +import { encodeFunctionData, type Hex } from 'viem'; +import { CHAIN, PUSH_NETWORK } from '../../../../packages/core/src/lib/constants/enums'; +import { ERC20_EVM } from '../../../../packages/core/src/lib/constants/abi'; +import { TransactionRoute } from '../../../../packages/core/src/lib/orchestrator/route-detector'; +import { transformToUniversalTxReceipt } from '../../../../packages/core/src/lib/orchestrator/internals/tx-transformer'; +import { transformToUniversalTxResponse } from '../../../../packages/core/src/lib/orchestrator/internals/response-builder'; +import { adaptTrackedResponse } from '../../../../packages/core/src/lib/agentic/response'; +import { composeOutbound } from '../../../../packages/core/src/lib/agentic/execution/outbound'; +import { e704d5b } from '../../../../packages/core/src/lib/agentic/contracts/e704d5b'; +import { currentGeneration, resetAgenticGenerations } from '../../../../packages/core/src/lib/agentic/deployments'; +import { ADDR, FakeChain, registerFakeGeneration } from '../../../../packages/core/src/lib/agentic/__tests__/fake-chain'; +import { mockRuntime, fakeResponse } from '../../../../packages/core/src/lib/agentic/__tests__/mock-runtime'; + +jest.mock('../../../../packages/core/src/lib/universal/account/account', () => ({ + convertExecutorToOrigin: jest.fn().mockResolvedValue({ account: null, exists: false }), +})); +afterEach(() => resetAgenticGenerations()); + +function fixture() { + registerFakeGeneration(); + const fake = new FakeChain(); + const w = fake.addWallet(ADDR.owner, 'followup'); + const gen = currentGeneration(PUSH_NETWORK.TESTNET_DONUT); + const read = fake.readContract.bind(fake); + fake.readContract = async (args) => args.functionName === 'SOURCE_CHAIN_NAMESPACE' ? CHAIN.ETHEREUM_SEPOLIA : read(args); + return { fake, w, gen, rt: mockRuntime(fake, { signer: ADDR.owner }) }; +} + +it('R6 recognized outbound triggers real response-builder wait after an early Push-only route', async () => { + const { w, gen, rt } = fixture(); + const out = await composeOutbound(rt, gen, w.address, { to: { address: ADDR.target, chain: CHAIN.ETHEREUM_SEPOLIA }, data: '0xd09de08a' }, { door: 'owner' }); + const hash = `0x${'ab'.repeat(32)}` as Hex; + const tx = { + hash, from: ADDR.owner, to: w.address, input: e704d5b.encodeExecute([out.gatewayCall]), value: BigInt(0), nonce: 1, + gas: BigInt(160000), gasPrice: BigInt(1), blockNumber: BigInt(100), blockHash: `0x${'cd'.repeat(32)}`, transactionIndex: 0, + type: 'eip1559', accessList: [], r: '0x1', s: '0x2', v: BigInt(0), + wait: jest.fn().mockResolvedValue({ transactionHash: hash, blockNumber: BigInt(100), blockHash: `0x${'cd'.repeat(32)}`, transactionIndex: 0, from: ADDR.owner, to: w.address, contractAddress: null, gasUsed: BigInt(80000), cumulativeGasUsed: BigInt(80000), logs: [], logsBloom: '0x', status: 'success' }), + }; + const waitForOutboundTx = jest.fn().mockResolvedValue({ externalTxHash: `0x${'ef'.repeat(32)}`, destinationChain: CHAIN.ETHEREUM_SEPOLIA, recipient: ADDR.target, amount: '0', assetAddr: ADDR.other, explorerUrl: 'https://example.test/tx' }); + const progressHook = jest.fn(); + const response = await transformToUniversalTxResponse({ universalSigner: { account: { chain: CHAIN.PUSH_TESTNET_DONUT, address: ADDR.owner } }, progressHook } as any, tx as any, [], { + trackTransaction: jest.fn(), waitForOutboundTx, transformToUniversalTxReceipt, printLog: jest.fn(), + outboundConstants: { initialWaitMs: 0, pollingIntervalMs: 1, maxTimeoutMs: 100 }, + inboundConstants: { initialWaitMs: 0, pollingIntervalMs: 1, maxTimeoutMs: 100 }, + }); + response.route = TransactionRoute.UOA_TO_PUSH; + response.chain = CHAIN.PUSH_TESTNET_DONUT; + await adaptTrackedResponse(rt, response); + const receipt = await response.wait(); + expect(waitForOutboundTx).toHaveBeenCalledTimes(1); + expect(response.chain).toBe(CHAIN.ETHEREUM_SEPOLIA); + expect(receipt).toMatchObject({ from: w.address, externalStatus: 'success', externalChain: CHAIN.ETHEREUM_SEPOLIA }); +}); + +it('F1 replay of an explicitly supplied ERC20 transfer retains the token target and calldata', async () => { + const { w, gen, rt } = fixture(); + const data = encodeFunctionData({ abi: ERC20_EVM, functionName: 'transfer', args: [ADDR.other, BigInt(10)] }); + const out = await composeOutbound(rt, gen, w.address, { to: { address: ADDR.target, chain: CHAIN.ETHEREUM_SEPOLIA }, data }, { door: 'owner' }); + const response = fakeResponse({ to: w.address, data: e704d5b.encodeExecute([out.gatewayCall]) }); + await adaptTrackedResponse(rt, response); + expect(response).toMatchObject({ to: ADDR.target, data }); +}); diff --git a/plan/agw/implementation-review/followup-9e16b23/review.md b/plan/agw/implementation-review/followup-9e16b23/review.md new file mode 100644 index 00000000..6fac7fee --- /dev/null +++ b/plan/agw/implementation-review/followup-9e16b23/review.md @@ -0,0 +1,65 @@ +# Follow-up review of the R1 through R7 fixes + +Reviewed `9e16b23a76816176dca20793d74df5a5548a497e`, including fixes in `880e7ae`, against the original `3008497` review. The two authorization races are addressed. The other original mechanisms have been corrected, with R5 still requiring public API approval and outbound settlement still requiring live acceptance. One new medium-priority replay inconsistency remains before merge. + +## F1 Explicit ERC20 calls are reinterpreted during replay + +**Priority:** medium. **Source:** [response.ts](../../../../packages/core/src/lib/agentic/response.ts#L138). + +`logicalOutboundCall` treats every one-call payload with selector `0xa9059cbb` and the expected length as an automatically generated funds-only transfer. But a user can explicitly call `transfer(recipient, amount)` on a destination token using `to = token` and `data = transferCalldata`, with no funds input. The live send reports the token and calldata; replay changes them to `to = recipient` and `data = 0x`. + +The serialized call does not distinguish a generated transfer from identical explicit calldata. The current heuristic therefore invents an original input shape and breaks send/track consistency. Amount-bearing receipt interpretation and display of what was actually called can be misleading even though wallet `from` remains correct. + +**Reproduced:** [replay.spec.ts](replay.spec.ts), F1. Expected the explicit token target/calldata; received the transfer beneficiary and empty data. [Output](replay.log). + +**Fix direction:** preserve the actual call representation or define a common canonical representation for both live and replayed responses. Do not infer whether calldata was generated from the selector alone. If requested-recipient conveniences are retained, keep them separate from authoritative execution data. Cover explicit transfer, funds-only transfer, transfer plus contract call, and explicit multicall arrays. + +## Original finding disposition + +| Finding | Follow-up result | Remaining work | +| --- | --- | --- | +| R1 create race | Fixed by index/address-bound factory call. Pinned AGWFactory.sol checks index and prediction before deploying, and skips signature verification only when msg.sender equals owner. Local race/retry coverage passes. | External-owner/UEA and atomic transport acceptance remain part of the existing coverage scope. | +| R2 explicit Push destination | Fixed by normalization of the connected Push chain and rejection of another Push network. | Keep alias/localnet coverage. | +| R3 lost outbound recipient | Composer now encodes transfer/native-value instructions or rejects unsupported empty-call shapes. Explicit call arrays remain caller-authored. | Actual recipient effects and executing CEA correlation still need a verified live deployment. | +| R4 revoked/unlimited allowance | Fixed by removing allowance writes on both paths. A concurrent revocation makes the pull fail; it is not restored. | Production token/gateway acceptance; retain the separate approval setup flow. | +| R5 misleading decode | Raw offsets and exact words now round-trip without pretending to recover ABI indexes. | This extends both input and output types. Product must approve the representation and whether raw authoring is permitted. | +| R6 wrong replay route | Route correction works. The deeper reviewer check below confirms response-builder wait enters outbound polling. | F1 is a separate logical-call reconstruction defect. Live indexing is still untested. | +| R7 false partial-create state | Recovery uses this operation's receipts, keeps unknown state explicit, and preserves submitted hashes when receipt retrieval fails. Updated unit cases pass. | Maintain distinct confirmed/pending/unknown states as recovery evolves. | + +Pinned contract check for R1: [AGWFactory at e704d5b](https://github.com/pushchain/push-agentic-wallets/blob/e704d5b58fd1d30ce02bc0ad74dccfbdb37804f9/src/AGWFactory.sol#L164). Empty signature/deadline is valid on this direct-owner path because only the non-owner branch checks executor, deadline and signature; index and predicted-wallet checks always execute first. + +## Additional R6 verification + +The reviewer constructed a real `transformToUniversalTxResponse` result with an early UOA_TO_PUSH route and Push chain, applied the AGW adapter, then invoked the real `wait()` closure. Destination polling was mocked at the RPC boundary. The test confirms: + +- Route/chain change to the outbound context. +- Destination polling executes exactly once. +- The waited receipt retains AGW from and reports the destination result. + +This closes the previously untested adapter-to-wait linkage locally. It does not exercise the entire trackTransaction acquisition path, real Cosmos timing, node/TSS behavior or live settlement. Keep that limitation separate from the now-tested wait branch. + +## Verification reproduced + +| Check | Result | +| --- | --- | +| Full unit suite | 1,899 passed; 12 skipped; 110 suites passed and 1 skipped | +| Local real-contract harness | 34 passed in 4 suites, including create and allowance races | +| Library typecheck | Passed | +| Spec/E2E typecheck | Passed | +| Core build with cache bypassed | Passed | +| AGW E2E manifest verification | 21 scenarios, 7 files, 21 selected tests | +| Existing all manifest verification | 76 scenarios, 40 files, 81 selected tests | +| Additional replay follow-up | R6 wait-branch test passed; F1 explicit-transfer regression failed | +| Live E2E | Not run | + +Lint was not rerun in this follow-up; the earlier seven-error baseline remains recorded separately. No production file or original review evidence was edited. Only the new follow-up report, tests and logs were added. [Evidence and checksums](evidence.json). + +## Next steps + +1. Fix F1 and add the canonical live/replay cases to the regular suite. Promote the passing R6 response-builder/wait test into regular coverage as well. +2. Add the R5 public type question to the product decision list: should decoded rules expose `{ offset, expected }`, should that raw form be accepted for new grants, or should decoded wire records remain separate from ABI-based authoring? The contract-delegated ABI-position generation obligation needs an explicit answer if raw authoring is exposed. +3. Keep the current registry/capability gates while the existing product and contract answers are pending. Do not replace them with historical Donut addresses to obtain a green live test. +4. Before a funded run, complete destination caller/event correlation, verify exact deployment artifacts/capabilities and network, and check funding budgets and setup. Shared-counter growth plus a computed CEA address is not by itself proof of the actual executor. +5. After F1 and focused regression checks pass, prepare a draft PR for the gated implementation with A01–A08 and the raw-offset API decision clearly identified. Release/live enablement remains a separate gate. + +Keep the original review folder on the branch: it explains the fixes and preserves reproducible evidence. Its tests are tied to the old API and are not the current acceptance suite. The parent README now makes the revision boundaries explicit. diff --git a/plan/agw/implementation-review/followup-9e16b23/reviewer.config.cjs b/plan/agw/implementation-review/followup-9e16b23/reviewer.config.cjs new file mode 100644 index 00000000..235318ac --- /dev/null +++ b/plan/agw/implementation-review/followup-9e16b23/reviewer.config.cjs @@ -0,0 +1,12 @@ +const path = require('path'); +const root = path.resolve(__dirname, '../../../..'); +module.exports = { + ...require(path.join(root, 'jest.preset.js')), + rootDir: root, + testEnvironment: 'node', + modulePathIgnorePatterns: ['/dist/'], + transform: { '^.+\\.[tj]s$': ['ts-jest', { tsconfig: path.join(root, 'packages/core/tsconfig.agw-local.json') }] }, + moduleFileExtensions: ['ts', 'js', 'json'], + testMatch: ['/plan/agw/implementation-review/followup-9e16b23/*.spec.ts'], + testTimeout: 30000, +}; diff --git a/plan/agw/implementation-review/followup-9e16b23/types-lib.log b/plan/agw/implementation-review/followup-9e16b23/types-lib.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/implementation-review/followup-9e16b23/types-spec.log b/plan/agw/implementation-review/followup-9e16b23/types-spec.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/implementation-review/followup-9e16b23/unit.log b/plan/agw/implementation-review/followup-9e16b23/unit.log new file mode 100644 index 00000000..509aa2c8 --- /dev/null +++ b/plan/agw/implementation-review/followup-9e16b23/unit.log @@ -0,0 +1,163 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts + +Test Suites: 1 skipped, 110 passed, 110 of 111 total +Tests: 12 skipped, 1899 passed, 1911 total +Snapshots: 0 total +Time: 26.405 s, estimated 32 s +Ran all test suites. diff --git a/plan/agw/implementation-review/lint.log b/plan/agw/implementation-review/lint.log new file mode 100644 index 00000000..fd1936c8 --- /dev/null +++ b/plan/agw/implementation-review/lint.log @@ -0,0 +1,1157 @@ + +> nx run core:lint + +> eslint . + + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local-advanced.spec.ts + 60:54 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 70:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 211:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 222:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 238:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 291:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local.spec.ts + 35:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 36:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/harness.ts + 152:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 171:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 179:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 251:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/vectors.spec.ts + 38:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 39:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 63:32 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 153:25 warning '_a' is assigned a value but never used @typescript-eslint/no-unused-vars + 154:25 warning '_b' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/identity-gas.spec.ts + 62:123 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/universal-evm.spec.ts + 31:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/cross-chain/cascade-amm.spec.ts + 1715:41 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 1897:41 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 2003:41 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 2096:41 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 2167:41 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 2256:41 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/cross-chain/cea-to-push-erc20.spec.ts + 92:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 95:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 102:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/cross-chain/forced-sizer.spec.ts + 36:17 warning 'PUSH_NETWORK' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/cross-chain/fresh-wallet.spec.ts + 92:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/cross-chain/multi-child-r3-sepolia.spec.ts + 83:7 warning 'VALUE_RECEIVER' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/cross-chain/peth-bridge.spec.ts + 114:77 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 132:76 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 149:42 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 165:35 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 174:50 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 218:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 241:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 261:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 271:28 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 295:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/cross-chain/uoa-multi-hop.spec.ts + 43:7 warning 'SOL_COUNTER_PDA' is assigned a value but never used @typescript-eslint/no-unused-vars + 44:7 warning 'SOL_TARGET' is assigned a value but never used @typescript-eslint/no-unused-vars + 45:7 warning 'SOL_ZERO_ADDRESS' is assigned a value but never used @typescript-eslint/no-unused-vars + 51:7 warning 'bscPublicClient' is assigned a value but never used @typescript-eslint/no-unused-vars + 52:7 warning 'pushPublicClient' is assigned a value but never used @typescript-eslint/no-unused-vars + 68:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/07-transaction-scenarios/route1.spec.ts + 357:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 357:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 360:46 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 364:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 389:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/07-transaction-scenarios/route2.spec.ts + 297:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 386:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 389:46 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 412:60 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/07-transaction-scenarios/route3.spec.ts + 375:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 375:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 378:46 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 384:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 404:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/08-multichain-transactions/multichain-transactions.spec.ts + 218:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 232:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 398:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 455:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 523:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 536:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/13-read-state/fixtures/universal_read_batch.js + 4:1 error Projects should use relative imports to import from other files within the same project. Use "./path/to/file" instead of import from "@pushchain/core" @nx/enforce-module-boundaries + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/13-read-state/fixtures/universal_read_evm_balance.js + 4:1 error Projects should use relative imports to import from other files within the same project. Use "./path/to/file" instead of import from "@pushchain/core" @nx/enforce-module-boundaries + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/13-read-state/fixtures/universal_read_resume.js + 4:1 error Projects should use relative imports to import from other files within the same project. Use "./path/to/file" instead of import from "@pushchain/core" @nx/enforce-module-boundaries + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/13-read-state/playgrounds.spec.ts + 20:63 error Unexpected empty async function @typescript-eslint/no-empty-function + 69:43 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 74:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 102:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 104:30 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 115:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 116:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 132:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 146:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 149:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 174:43 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 180:36 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 184:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 184:69 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/13-read-state/read-state.spec.ts + 56:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 56:32 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/_helpers/docs-fund.ts + 95:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/evm/inbound/rescue-funds.spec.ts + 165:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 227:15 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/evm/outbound/cea-to-smart-contracts.spec.ts + 48:3 warning 'UGPC_PRECOMPILE' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/evm/outbound/cea-to-uea.spec.ts + 1411:15 warning 'tx' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/evm/outbound/uea-to-cea.spec.ts + 2277:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2330:43 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-(node:62151) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) +sdk/packages/core/__e2e__/evm/pc20/pc20-inbound.spec.ts + 15:10 warning 'PUSH_NETWORK' is defined but never used @typescript-eslint/no-unused-vars + 21:3 warning 'waitToleratingFeeCreditBug' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/evm/pc20/pc20-roundtrip.spec.ts + 17:3 warning 'waitToleratingFeeCreditBug' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/push/account-conversion/eth.spec.ts + 176:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 177:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 181:55 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 181:80 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 192:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 193:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 244:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 245:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 246:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 250:50 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 250:75 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 277:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 278:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 314:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 315:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 320:108 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 350:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 351:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 352:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 355:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 356:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 378:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 379:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 380:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 408:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 409:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 410:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 411:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 415:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 416:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 417:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 420:50 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 420:76 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 420:97 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 442:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 443:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 470:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 471:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 474:73 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 474:99 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/push/account-conversion/solana.spec.ts + 78:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 79:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 81:58 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 81:83 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 92:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 93:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 121:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 122:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 136:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 137:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 138:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 139:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 140:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 160:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 161:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 162:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 183:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 184:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/push/fee-lock-cap-raise.spec.ts + 60:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 170:38 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/push/native.spec.ts + 389:7 warning 'mainPushClient' is assigned a value but never used @typescript-eslint/no-unused-vars + 428:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 517:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/push/pool-depth-diagnostic.spec.ts + 27:24 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/push/progress-hooks.spec.ts + 383:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 594:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/push/utilities.spec.ts + 128:79 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/_shared.ts + 54:70 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/any-mutability.spec.ts + 34:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/api-coverage.spec.ts + 18:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 30:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 53:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 53:31 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/app-batch.spec.ts + 38:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 38:29 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 46:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 67:67 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 71:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 71:32 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 76:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 81:107 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/balance-eoa.spec.ts + 23:57 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 59:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 59:32 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/balance-uea.spec.ts + 25:116 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 52:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 52:32 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/callback-reverts.spec.ts + 22:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 36:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 36:32 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/contract-call.spec.ts + 28:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/registry.spec.ts + 14:57 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 40:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 40:36 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/lifecycle/expiry.spec.ts + 25:57 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/lifecycle/track-lookup.spec.ts + 21:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/svm/account-idl.spec.ts + 20:53 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 25:59 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 27:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 45:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 62:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 62:31 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 63:102 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 70:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 70:52 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 79:44 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/svm/lamports.spec.ts + 19:53 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 22:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/svm/raw-account.spec.ts + 13:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/tools/live-read-uea.ts + 57:15 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 57:63 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 57:101 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 103:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 106:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 107:143 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/web2/json.spec.ts + 15:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/scripts/e2e-7702-multicall.ts + 93:44 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 132:28 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/shared/evm-client.ts + 14:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/shared/svm-client.ts + 10:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/svm/inbound/uea-to-push.spec.ts + 16:10 warning 'MOVEABLE_TOKENS' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/svm/outbound/cea-to-eoa.spec.ts + 15:61 warning 'encodeFunctionData' is defined but never used @typescript-eslint/no-unused-vars + 24:3 warning 'COUNTER_ADDRESS_PAYABLE' is defined but never used @typescript-eslint/no-unused-vars + 25:3 warning 'COUNTER_ABI_PAYABLE' is defined but never used @typescript-eslint/no-unused-vars + 27:10 warning 'COUNTER_ABI' is defined but never used @typescript-eslint/no-unused-vars + 37:7 warning 'pushPublicClient' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/svm/outbound/cea-to-uea.spec.ts + 39:3 warning 'buildReceiveSolAccounts' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/svm/outbound/eoa-to-cea.spec.ts + 23:3 warning 'SOL_ZERO_ADDRESS' is defined but never used @typescript-eslint/no-unused-vars + 25:3 warning 'COUNTER_PDA' is defined but never used @typescript-eslint/no-unused-vars + 28:3 warning 'buildReceiveSolAccounts' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/svm/outbound/eoa-to-smart-contracts.spec.ts + 86:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/svm/outbound/uea-to-cea.spec.ts + 43:3 warning 'buildReceiveSolAccounts' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/scripts/poll-outbound.ts + 24:3 warning 'UniversalTxStatus' is defined but never used @typescript-eslint/no-unused-vars + 25:3 warning 'OutboundStatus' is defined but never used @typescript-eslint/no-unused-vars + 236:19 warning 'intervalMs' is assigned a value but never used @typescript-eslint/no-unused-vars + 236:31 warning 'timeoutMs' is assigned a value but never used @typescript-eslint/no-unused-vars + 260:30 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 292:29 warning 'childUtxIds' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/scripts/probe-multihop-track.ts + 36:40 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 40:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 41:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 42:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 55:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/scripts/test-uea-migration.ts + 80:122 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 165:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 166:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 168:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 169:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 191:17 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/codec.spec.ts + 171:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/utils.ts + 108:15 warning '_card' is defined but never used @typescript-eslint/no-unused-vars + 108:31 warning '_userInput' is defined but never used @typescript-eslint/no-unused-vars + 108:52 warning '_ctx' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/wallet.ts + 92:33 warning '_opts' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/cache/cache.ts + 4:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 38:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 56:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts + 13:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/internal/buffer.ts + 4:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/internal/global-buffer-polyfill.ts + 3:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts + 274:15 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 286:15 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts + 363:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 431:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 447:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 480:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 552:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 618:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 686:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 758:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 774:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 811:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 887:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts + 36:47 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 39:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 167:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts + 26:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 32:7 warning 'PC_USD_1E8' is assigned a value but never used @typescript-eslint/no-unused-vars + 35:44 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 41:57 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 65:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 71:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 215:59 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 231:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 243:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 252:65 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 281:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 297:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts + 9:10 warning 'CHAIN_INFO' is defined but never used @typescript-eslint/no-unused-vars + 14:3 warning 'AccountStatus' is defined but never used @typescript-eslint/no-unused-vars + 62:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 68:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 86:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 223:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 231:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 243:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 251:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 264:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 441:11 warning 'first' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts + 11:44 warning 'MULTICALL_SELECTOR' is defined but never used @typescript-eslint/no-unused-vars + 152:24 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 152:24 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 175:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 176:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 325:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 326:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 365:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 373:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 374:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 516:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 517:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 575:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 576:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 577:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 578:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 599:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 600:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 620:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts + 54:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 72:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 73:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 93:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 94:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 97:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 156:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 158:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 179:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 199:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 200:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 297:33 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 394:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 394:33 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 423:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 424:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 440:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 456:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts + 12:31 warning 'VM' is defined but never used @typescript-eslint/no-unused-vars + 49:85 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 102:72 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 239:64 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 261:72 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts + 13:10 warning 'bytesToHex' is defined but never used @typescript-eslint/no-unused-vars + 13:22 warning 'hexToBytes' is defined but never used @typescript-eslint/no-unused-vars + 15:10 warning 'VM' is defined but never used @typescript-eslint/no-unused-vars + 29:33 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 30:26 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 34:43 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 39:32 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 43:7 warning 'mockEvmConfirmations' is assigned a value but never used @typescript-eslint/no-unused-vars + 44:7 warning 'mockSvmConfirmations' is assigned a value but never used @typescript-eslint/no-unused-vars + 148:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 154:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 155:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 167:36 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 188:49 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 194:48 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 203:55 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 209:47 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 218:81 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 227:56 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 231:51 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 255:54 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 263:61 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 347:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 349:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 351:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 356:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 357:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 367:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 368:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 375:52 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 435:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 566:43 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 612:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 702:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 705:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 706:39 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 751:13 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 751:61 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 765:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 794:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 816:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 819:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 820:39 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 835:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 838:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 839:39 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 852:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts + 64:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 66:70 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts + 79:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 199:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts + 19:3 warning 'encodeAbiParameters' is defined but never used @typescript-eslint/no-unused-vars + 20:3 warning 'encodePacked' is defined but never used @typescript-eslint/no-unused-vars + 25:31 warning 'VM' is defined but never used @typescript-eslint/no-unused-vars + 144:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 148:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 157:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 161:49 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 232:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 239:51 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 248:48 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 252:54 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 261:78 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 265:83 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 606:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 619:58 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 651:48 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 659:54 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 666:59 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 677:51 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 690:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 711:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 740:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 750:51 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 767:68 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 772:82 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 922:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 932:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 941:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 950:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts + 24:8 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 34:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 58:70 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 74:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 91:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts + 26:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 27:28 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 28:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts + 21:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 23:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 30:40 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 38:69 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 44:64 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts + 10:15 warning 'UniversalTxReceipt' is defined but never used @typescript-eslint/no-unused-vars + 22:32 warning 'PayableToken' is defined but never used @typescript-eslint/no-unused-vars + 22:46 warning 'MoveableToken' is defined but never used @typescript-eslint/no-unused-vars + 28:52 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 44:60 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 65:47 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 110:64 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 115:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 121:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 122:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 144:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 165:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 174:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 183:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 193:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 202:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 215:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 224:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 505:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 529:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 614:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 663:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 693:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 709:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 839:58 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 850:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 850:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 866:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 866:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 880:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 880:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 955:87 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 994:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 994:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 1015:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 1015:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 1028:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 1028:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts + 10:10 warning 'encodeAbiParameters' is defined but never used @typescript-eslint/no-unused-vars + 15:10 warning 'UEA_MULTICALL_SELECTOR' is defined but never used @typescript-eslint/no-unused-vars + 15:34 warning 'ZERO_ADDRESS' is defined but never used @typescript-eslint/no-unused-vars + 107:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 108:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 128:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 149:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 168:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 241:15 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 279:15 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/account-manager.ts + 113:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 205:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/cascade.ts + 18:22 warning 'UNIVERSAL_GATEWAY_ADDRESSES' is defined but never used @typescript-eslint/no-unused-vars + 123:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 136:11 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 180:3 warning 'callbacks' is defined but never used @typescript-eslint/no-unused-vars + 613:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 636:15 warning 'gatewayProgramHex' is assigned a value but never used @typescript-eslint/no-unused-vars + 668:11 warning 'amount' is assigned a value but never used @typescript-eslint/no-unused-vars + 741:13 warning 'tokenAddress' is assigned a value but never used @typescript-eslint/no-unused-vars + 746:9 warning 'amount' is assigned a value but never used @typescript-eslint/no-unused-vars + 747:9 warning 'nativeValue' is assigned a value but never used @typescript-eslint/no-unused-vars + 802:11 warning 'chain' is assigned a value but never used @typescript-eslint/no-unused-vars + 1711:29 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 2678:45 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/confirmation.ts + 134:38 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 135:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/context.ts + 135:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/execute-funds-only.ts + 18:10 warning 'EvmClient' is defined but never used @typescript-eslint/no-unused-vars + 82:8 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 92:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 95:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 96:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 123:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 123:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 124:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 124:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 137:20 warning 'universalPayload' is assigned a value but never used @typescript-eslint/no-unused-vars + 262:55 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 262:78 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 262:78 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 270:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 270:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 271:75 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 272:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 272:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 297:77 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 297:77 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 326:69 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 326:69 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 365:11 warning 'nonce' is assigned a value but never used @typescript-eslint/no-unused-vars + 370:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 370:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 390:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 390:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 391:34 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 391:34 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 419:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 419:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 436:34 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 436:34 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 465:82 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 465:82 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 487:69 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 487:69 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/execute-funds-payload.ts + 77:8 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 88:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 91:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 105:45 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 210:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 236:24 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 237:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 239:69 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 242:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 255:13 warning 'tokenAddr' is assigned a value but never used @typescript-eslint/no-unused-vars + 255:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 261:13 warning 'payloadBytes' is assigned a value but never used @typescript-eslint/no-unused-vars + 277:62 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 319:77 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 372:69 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/gas-calculator.ts + 596:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/helpers.ts + 16:10 warning 'EvmClient' is defined but never used @typescript-eslint/no-unused-vars + 152:53 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 152:59 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 220:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/outbound-sync.ts + 131:40 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 132:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/payload-builder.ts + 75:43 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts + 107:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 107:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 116:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 116:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 117:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts + 286:28 error Require statement not part of import statement @typescript-eslint/no-var-requires + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/tracking.ts + 128:40 error Require statement not part of import statement @typescript-eslint/no-var-requires + 131:28 error Require statement not part of import statement @typescript-eslint/no-var-requires + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/push-chain-tx.ts + 84:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 214:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 251:28 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 395:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 454:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 455:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 457:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 458:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 518:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 519:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 521:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 522:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 570:39 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/response-builder.ts + 30:10 warning 'PushChain' is defined but never used @typescript-eslint/no-unused-vars + 64:43 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 65:44 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 65:60 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 66:44 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 66:59 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 180:13 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 185:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 191:55 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 195:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 222:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 248:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/route-handlers.ts + 1154:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 2094:5 warning 'ueaBalance' is assigned a value but never used @typescript-eslint/no-unused-vars + 2404:3 warning 'ctx' is defined but never used @typescript-eslint/no-unused-vars + 2405:3 warning 'params' is defined but never used @typescript-eslint/no-unused-vars + 2406:3 warning 'executeFn' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/signing.ts + 427:32 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/svm-bridge.ts + 41:77 warning 'req' is assigned a value but never used @typescript-eslint/no-unused-vars + 212:34 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 212:34 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/svm-helpers.ts + 107:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 107:53 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 115:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 188:11 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/tx-transformer.ts + 97:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/orchestrator.spec.ts + 87:50 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 134:50 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 162:28 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 182:28 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/orchestrator.ts + 3:31 warning 'VM' is defined but never used @typescript-eslint/no-unused-vars + 37:76 warning '_transformToUniversalTxResponse' is defined but never used @typescript-eslint/no-unused-vars + 76:41 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 92:48 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 103:50 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 104:74 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 105:77 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/orchestrator.types.ts + 387:15 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 564:9 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/payload-builders.ts + 7:44 warning 'MULTICALL_SELECTOR' is defined but never used @typescript-eslint/no-unused-vars + 14:3 warning 'ChainTarget' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/route-detector.ts + 17:3 warning 'TransactionRouteType' is defined but never used @typescript-eslint/no-unused-vars + 378:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 378:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts + 51:55 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 72:55 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 90:55 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/svm-idl/resolve.ts + 10:6 warning 'AccountItem' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-chain/push-chain.explorer.spec.ts + 192:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 199:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-chain/push-chain.reinitialize.spec.ts + 198:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 199:39 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-chain/push-chain.signing.spec.ts + 21:7 warning 'pushChainSVM' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-chain/push-chain.spec.ts + 12:3 warning 'isAddress' is defined but never used @typescript-eslint/no-unused-vars + 13:3 warning 'verifyMessage' is defined but never used @typescript-eslint/no-unused-vars + 452:9 warning 'pushPublicClient' is assigned a value but never used @typescript-eslint/no-unused-vars + 1199:9 warning 'beforeCounterPCBalance' is assigned a value but never used @typescript-eslint/no-unused-vars + 1222:9 warning 'afterCounterPCBalance' is assigned a value but never used @typescript-eslint/no-unused-vars + 1317:9 warning 'balanceBeforePC_UEA' is assigned a value but never used @typescript-eslint/no-unused-vars + 1353:9 warning 'balanceAfterPC_UEA' is assigned a value but never used @typescript-eslint/no-unused-vars + 1434:9 warning 'balanceBeforePC_UEA' is assigned a value but never used @typescript-eslint/no-unused-vars + 1470:9 warning 'balanceAfterPC_UEA' is assigned a value but never used @typescript-eslint/no-unused-vars + 1682:9 warning 'balanceBeforePC_COUNTER' is assigned a value but never used @typescript-eslint/no-unused-vars + 1685:9 warning 'balanceBeforePC_UEA' is assigned a value but never used @typescript-eslint/no-unused-vars + 1717:9 warning 'balanceAfterPC_COUNTER' is assigned a value but never used @typescript-eslint/no-unused-vars + 1720:9 warning 'balanceAfterPC_UEA' is assigned a value but never used @typescript-eslint/no-unused-vars + 1879:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1894:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1910:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1940:9 warning 'pushClientEVM' is assigned a value but never used @typescript-eslint/no-unused-vars + 2145:9 warning 'pcBeforeRecipient' is assigned a value but never used @typescript-eslint/no-unused-vars + 2170:9 warning 'pcAfterRecipient' is assigned a value but never used @typescript-eslint/no-unused-vars + 2487:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2504:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2523:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2533:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2556:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2571:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2592:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2602:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2612:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2649:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 3328:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 3330:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 3537:15 warning 'recipient' is assigned a value but never used @typescript-eslint/no-unused-vars + 3832:13 warning 'WETH9' is assigned a value but never used @typescript-eslint/no-unused-vars + 3863:13 warning 'WETH9' is assigned a value but never used @typescript-eslint/no-unused-vars + 3865:13 warning 'USDC' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-chain/push-chain.ts + 33:3 warning 'UniversalTxResponse' is defined but never used @typescript-eslint/no-unused-vars + 244:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts + 30:3 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 127:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 133:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 148:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 155:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 162:40 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-client/push-client.ts + 359:42 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__integration__/read-state.integration.spec.ts + 45:38 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 45:38 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 45:77 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 45:77 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 45:117 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 48:68 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 225:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 225:29 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/read-events.spec.ts + 95:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 95:24 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts + 26:3 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 104:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 104:29 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 274:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 282:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 385:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/read-types.spec.ts + 30:9 warning 'removed' is assigned a value but never used @typescript-eslint/no-unused-vars + 48:8 warning '_typed' is defined but never used @typescript-eslint/no-unused-vars + 61:9 warning 'missingEntrypoint' is assigned a value but never used @typescript-eslint/no-unused-vars + 63:9 warning 'registryAbi' is assigned a value but never used @typescript-eslint/no-unused-vars + 65:9 warning 'legacy' is assigned a value but never used @typescript-eslint/no-unused-vars + 86:8 warning '_loose' is defined but never used @typescript-eslint/no-unused-vars + 135:6 warning 'ExportChecks' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/registry.spec.ts + 91:94 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 97:46 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts + 55:62 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/svm-account.spec.ts + 101:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 101:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 102:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 102:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 103:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 103:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 104:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 104:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts + 35:15 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 51:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 84:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 87:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 88:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 91:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 116:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/read-params.ts + 254:15 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 295:46 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts + 319:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 322:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 325:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 325:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 357:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts + 90:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/detector.live.spec.ts + 180:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 317:29 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 317:29 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 324:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 326:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 328:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 329:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 333:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 357:33 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 357:33 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts + 154:49 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 248:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 254:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/cascade.ts + 16:51 warning 'PublicClient' is defined but never used @typescript-eslint/no-unused-vars + 23:3 warning 'deriveChildUniversalTxId' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/detector-svm.ts + 242:30 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 243:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/detector.ts + 88:30 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 89:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/svm-events.ts + 30:11 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal/account/account.spec.ts + 12:3 warning 'resolveControllerAccount' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal/signer/signer.spec.ts + 38:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 68:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 82:38 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 136:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 200:49 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 334:7 warning 'domain' is defined but never used @typescript-eslint/no-unused-vars + 335:7 warning 'types' is defined but never used @typescript-eslint/no-unused-vars + 336:7 warning 'primaryType' is defined but never used @typescript-eslint/no-unused-vars + 337:7 warning 'message' is defined but never used @typescript-eslint/no-unused-vars + 339:15 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 340:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 342:16 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal/signer/signer.ts + 47:16 warning 'type' is assigned a value but never used @typescript-eslint/no-unused-vars + 49:5 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 54:58 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 73:11 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 102:11 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 213:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 228:36 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 229:36 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 230:36 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 265:47 warning 'primaryType' is defined but never used @typescript-eslint/no-unused-vars + 268:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 422:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 516:44 warning 'primaryType' is defined but never used @typescript-eslint/no-unused-vars + 519:44 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 552:44 warning 'primaryType' is defined but never used @typescript-eslint/no-unused-vars + 555:44 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 569:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 570:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal/universal.types.ts + 22:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 23:13 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 24:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 25:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 26:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 30:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 31:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 32:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 34:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 35:34 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 35:50 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 36:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 42:33 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 43:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 47:34 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 47:50 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 48:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 54:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 54:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 57:33 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 58:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 60:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 130:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 167:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/utils.spec.ts + 172:72 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 419:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 425:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 436:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 487:28 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 571:16 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 648:62 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 652:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 657:57 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 663:57 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 669:57 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 878:71 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 882:71 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 893:66 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 898:68 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 904:57 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 910:62 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1215:54 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1219:55 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1223:60 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1227:53 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1233:62 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1239:62 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1245:67 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1251:60 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1554:65 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1563:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/utils.ts + 24:43 warning 'getAddress' is defined but never used @typescript-eslint/no-unused-vars + 292:13 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 295:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 325:40 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts + 64:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/vm-client/svm-client.ts + 92:34 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 152:51 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 184:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 215:45 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 216:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 286:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 287:47 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/vm-client/vm-client.types.ts + 29:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 40:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +✖ 839 problems (7 errors, 832 warnings) + 3 errors and 0 warnings potentially fixable with the `--fix` option. + +Warning: command "eslint ." exited with non-zero status code + + + NX Running target lint for project core failed + +Failed tasks: + +- core:lint + +Hint: run the command with --verbose for more details. + diff --git a/plan/agw/implementation-review/local-races.log b/plan/agw/implementation-review/local-races.log new file mode 100644 index 00000000..53e61429 --- /dev/null +++ b/plan/agw/implementation-review/local-races.log @@ -0,0 +1,44 @@ +FAIL plan/agw/implementation-review/local-races.spec.ts (5.984 s) + ✕ R1 a raced creation must not grant permissions on the concurrently created wallet (618 ms) + ✕ R4 owner outbound must not restore an allowance revoked after composition (773 ms) + + ● R1 a raced creation must not grant permissions on the concurrently created wallet + + expect(received).toHaveLength(expected) + + Expected length: 0 + Received length: 1 + Received array: ["0xed16789aedd36446aa851df227d231dfdaab75ab95d022e251d179e27fdcee59"] + + 32 | const ids = await h.publicClient.readContract({ address: h.addresses.engine, abi: h.generation.contracts.abis.engine, functionName: 'getPermissionIDs', args: [expected.address] }); + 33 | // The SDK threw, but the old predicted wallet must not acquire the new permission. + > 34 | expect(ids).toHaveLength(0); + | ^ + 35 | }); + 36 | + 37 | it('R4 owner outbound must not restore an allowance revoked after composition', async () => { + + at Object. (plan/agw/implementation-review/local-races.spec.ts:34:15) + + ● R4 owner outbound must not restore an allowance revoked after composition + + expect(received).toBe(expected) // Object.is equality + + Expected: 0n + Received: 50n + + 61 | } finally { rt.execute = execute; } + 62 | const remaining = await h.publicClient.readContract({ address: token, abi: TOKEN, functionName: 'allowance', args: [wallet, h.addresses.gateway] }); + > 63 | expect(remaining).toBe(BigInt(0)); + | ^ + 64 | }); + 65 | + + at Object. (plan/agw/implementation-review/local-races.spec.ts:63:21) + +Test Suites: 1 failed, 1 total +Tests: 2 failed, 2 total +Snapshots: 0 total +Time: 6.111 s +Ran all test suites within paths "plan/agw/implementation-review/local-races.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/implementation-review/local-races.spec.ts b/plan/agw/implementation-review/local-races.spec.ts new file mode 100644 index 00000000..4627b366 --- /dev/null +++ b/plan/agw/implementation-review/local-races.spec.ts @@ -0,0 +1,64 @@ +// Reviewer regressions against real e704d5b contracts on local Anvil only. +import { encodeFunctionData, parseAbi, type Address } from 'viem'; +import { startHarness, type Harness } from '../../../packages/core/__agw-local__/harness'; +import type { AgenticRuntime } from '../../../packages/core/src/lib/agentic/runtime'; +import { CHAIN, type PushChain } from '../../../packages/core/src'; +import { e704d5b } from '../../../packages/core/src/lib/agentic/contracts/e704d5b'; + +const TOKEN = parseAbi(['function mint(address,uint256)', 'function approve(address,uint256) returns (bool)', 'function allowance(address,address) view returns (uint256)']); +let h: Harness; +let owner: PushChain; +beforeAll(async () => { h = await startHarness(); owner = await h.client(0); }); +afterAll(async () => { await h?.stop(); }); + +it('R1 a raced creation must not grant permissions on the concurrently created wallet', async () => { + const expected = await owner.agentic.derive(); + const rt = (owner as unknown as { agenticRuntime: AgenticRuntime }).agenticRuntime; + const execute = rt.execute; + let raced = false; + rt.execute = async (params, options) => { + if (!raced) { + raced = true; + await h.write(0, h.addresses.factory, h.generation.contracts.abis.factory, 'deployWallet', ['other-purpose-wallet']); + } + return execute(params, options); + }; + let error: unknown; + try { + await owner.agentic.create('intended-agent-wallet', { rules: [{ agent: h.wallets[1].account!.address, target: h.addresses.target, selector: 'increment()', validUntil: Number((await h.publicClient.getBlock()).timestamp) + 3600 }] }); + } catch (e) { error = e; } + finally { rt.execute = execute; } + expect(error).toMatchObject({ code: 'INDEX_RACE' }); + const ids = await h.publicClient.readContract({ address: h.addresses.engine, abi: h.generation.contracts.abis.engine, functionName: 'getPermissionIDs', args: [expected.address] }); + // The SDK threw, but the old predicted wallet must not acquire the new permission. + expect(ids).toHaveLength(0); +}); + +it('R4 owner outbound must not restore an allowance revoked after composition', async () => { + const { wallet } = await owner.agentic.create('allowance-race', { rules: [] }); + const token = await h.deploy(0, 'HarnessPRC20', 'HarnessFixtures.sol', [CHAIN.ETHEREUM_SEPOLIA, 6]); + await h.write(0, token, TOKEN, 'mint', [wallet, BigInt(1000)]); + const fundingHash = await h.wallets[0].sendTransaction({ to: wallet, value: BigInt(10) ** BigInt(17), account: h.wallets[0].account!, chain: h.wallets[0].chain }); + await h.publicClient.waitForTransactionReceipt({ hash: fundingHash }); + const c = await h.client(0, { agenticWallet: wallet }); + await c.universal.sendTransaction({ to: token, data: encodeFunctionData({ abi: TOKEN, functionName: 'approve', args: [h.addresses.gateway, BigInt(50)] }) }); + const rt = (c as unknown as { agenticRuntime: AgenticRuntime }).agenticRuntime; + rt.resolvePrc20 = () => token; + rt.resolveCEA = async () => ({ cea: h.wallets[2].account!.address, isDeployed: true }); + rt.quoteOutbound = async () => ({ protocolFee: BigInt(10) ** BigInt(14), nativeValueForGas: BigInt(10) ** BigInt(15), gasLimitUsed: BigInt(200000) }); + const execute = rt.execute; + let raced = false; + rt.execute = async (params, options) => { + if (!raced) { + raced = true; + const revoke = e704d5b.encodeExecute([{ target: token, value: BigInt(0), data: encodeFunctionData({ abi: TOKEN, functionName: 'approve', args: [h.addresses.gateway, BigInt(0)] }) }]); + await execute({ to: wallet, data: revoke }); + } + return execute(params, options); + }; + try { + await c.universal.sendTransaction({ to: { address: h.wallets[2].account!.address as Address, chain: CHAIN.ETHEREUM_SEPOLIA }, data: '0xd09de08a', funds: { amount: BigInt(10) } }); + } finally { rt.execute = execute; } + const remaining = await h.publicClient.readContract({ address: token, abi: TOKEN, functionName: 'allowance', args: [wallet, h.addresses.gateway] }); + expect(remaining).toBe(BigInt(0)); +}); diff --git a/plan/agw/implementation-review/local-suite.log b/plan/agw/implementation-review/local-suite.log new file mode 100644 index 00000000..dbced151 --- /dev/null +++ b/plan/agw/implementation-review/local-suite.log @@ -0,0 +1,10 @@ +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts (5.378 s) +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts + +Test Suites: 3 passed, 3 total +Tests: 32 passed, 32 total +Snapshots: 0 total +Time: 7.575 s, estimated 17 s +Ran all test suites. +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/implementation-review/outbound-response-resolution.md b/plan/agw/implementation-review/outbound-response-resolution.md new file mode 100644 index 00000000..81378b44 --- /dev/null +++ b/plan/agw/implementation-review/outbound-response-resolution.md @@ -0,0 +1,35 @@ +# Outbound response consistency and wait regression resolution + +This change resolves F1 from the [follow-up review](followup-9e16b23/review.md) and promotes R6 wait-path coverage into the regular SDK unit suite. The earlier review evidence remains unchanged and identifies the revisions it tested. + +## Response convention + +Live sends and tracked AGW outbounds now share one canonical summary: `to`, `data` and `value` describe the first actual destination call. `agentic.destinationCalls` contains the complete ordered destination call list. `from` remains the AGW, `origin` remains the signer, and `agentic.rawTo/rawData` retain the wrapped Push call. + +An explicit token transfer therefore keeps the token target and transfer calldata. A funds-only ERC20 send has the same canonical representation: the actual generated token transfer, including its recipient and amount in calldata. A transfer followed by an app call reports the transfer first and preserves both calls in order. Arrays are not reduced to a guessed last or primary action. Native transfers retain their encoded destination value. + +Identical wire calls cannot reveal whether they came from explicit calldata or funds convenience inputs. The adapter no longer attempts that inference. Unrecognized historical destination payloads retain the actual gateway call rather than inventing an empty destination call. + +This is an additive response-metadata field and a correction to the unreleased AGW response summary. Receipts continue using the standard core shape; the full call list is attached to the response. + +## Regular regression coverage + +[Outbound response tests](../../../packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts) add nine cases: + +- Explicit ERC20 call, funds-only ERC20 transfer, transfer plus app call, explicit call array and native-value transfer: verify canonical fields and complete calls match on live send and replay. +- Owner and agent replay, with successful and reverted Push receipts: use the real response builder and wait closure. An early Push-only route becomes outbound; successful roots poll once; reverted roots never poll. Init and per-call terminal hooks each fire once. + +RPC/account lookup and the destination poller are mocked. This exercises the real SDK response/wait branch, not live Cosmos or TSS settlement. The separate historical F1/R6 reviewer tests also pass against the fix. + +## Validation + +- Focused response/send suites: 48 passed. +- Full unit suite: 1,908 passed, 12 skipped; 111 suites passed and 1 skipped. +- Local pinned-contract harness: 34 passed in 4 suites. +- Library/spec typechecks and core build: passed. +- Core lint: seven errors in unchanged files; no new errors from this change. +- No live-network transactions were sent. + +Commands: standard core Jest config with --runInBand, the local AGW Jest config with AGW_LOCAL_DIR set to the prepared e704d5b build, both core tsc --noEmit configs, and the separate commands `yarn nx run core:build --skip-nx-cache` and `yarn nx run core:lint --skip-nx-cache`. + +Raw-offset public types still require product agreement. Compatible deployment, live recipient/executor correlation, and the existing A01–A08 decisions remain separate gates. diff --git a/plan/agw/implementation-review/regressions.log b/plan/agw/implementation-review/regressions.log new file mode 100644 index 00000000..e6cee32c --- /dev/null +++ b/plan/agw/implementation-review/regressions.log @@ -0,0 +1,151 @@ +FAIL plan/agw/implementation-review/regressions.spec.ts + ✕ R2 explicit connected Push destination behaves like the bare native address (5 ms) + ✕ R3 owner funds-only outbound encodes the requested destination address (1 ms) + ✕ R4 owner outbound accepts an existing unlimited gateway allowance (10 ms) + ✕ R5 decoded static-array pin keeps its argument index (1 ms) + ✕ R5 a decoded simple address-pin rule can be re-encoded after restoring its known signature (2 ms) + ✕ R6 replayed outbound must replace a preexisting Push route instead of preserving it (2 ms) + ✕ R7 failed recovery RPC must not claim that a confirmed deployment did not happen (3 ms) + + ● R2 explicit connected Push destination behaves like the bare native address + + expect(received).resolves.toBeDefined() + + Received promise rejected instead of resolved + Rejected to value: [AgenticError: rule 0x0000000000000000000000000000000000000000000000000000000000000001 is not an EVM universal rule] + + 27 | it('R2 explicit connected Push destination behaves like the bare native address', async () => { + 28 | const { rt, ctx } = setup(); + > 29 | await expect(agenticSend(rt, ctx, { to: { address: ADDR.target, chain: CHAIN.PUSH_TESTNET_DONUT }, data: '0xd09de08a' })).resolves.toBeDefined(); + | ^ + 30 | }); + 31 | + 32 | it('R3 owner funds-only outbound encodes the requested destination address', async () => { + + at expect (node_modules/expect/build/index.js:113:15) + at Object. (plan/agw/implementation-review/regressions.spec.ts:29:9) + + ● R3 owner funds-only outbound encodes the requested destination address + + expect(received).toContain(expected) // indexOf + + Expected substring: "0000000000000000000000000000000000007a76" + Received string: "0x77b86bec000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000007070000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000030d40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000120000000000000000000000000366e166f4c847a874ad54068e64d3cef77c8c02600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + + 33 | const { rt, gen, wallet } = setup('owner'); + 34 | const out = await composeOutbound(rt, gen, wallet.address, { to: { address: ADDR.target, chain: CHAIN.ETHEREUM_SEPOLIA }, funds: { amount: BigInt(10) } }, { requireCalls: false }); + > 35 | expect(out.gatewayCall.data.toLowerCase()).toContain(ADDR.target.slice(2).toLowerCase()); + | ^ + 36 | }); + 37 | + 38 | it('R4 owner outbound accepts an existing unlimited gateway allowance', async () => { + + at Object. (plan/agw/implementation-review/regressions.spec.ts:35:46) + + ● R4 owner outbound accepts an existing unlimited gateway allowance + + expect(received).not.toThrow() + + Error name: "IntegerOutOfRangeError" + Error message: "Number \"115792089237316195423570985008687907853269984665640564039457584007913129639945\" is not in safe 256-bit unsigned integer range (0 to 115792089237316195423570985008687907853269984665640564039457584007913129639935)· + Version: viem@2.27.2" + + 182 | target: out.token, + 183 | value: BigInt(0), + > 184 | data: encodeFunctionData({ + | ^ + 185 | abi: ERC20_EVM, + 186 | functionName: 'approve', + 187 | args: [gen.addresses.gateway, currentAllowance + out.amount], + + at encodeNumber (node_modules/viem/utils/abi/encodeAbiParameters.ts:340:13) + at prepareParam (node_modules/viem/utils/abi/encodeAbiParameters.ts:169:12) + at prepareParams (node_modules/viem/utils/abi/encodeAbiParameters.ts:126:25) + at encodeAbiParameters (node_modules/viem/utils/abi/encodeAbiParameters.ts:99:26) + at encodeFunctionData (node_modules/viem/utils/abi/encodeFunctionData.ts:93:28) + at ownerOutboundCalls (packages/core/src/lib/agentic/execution/outbound.ts:184:31) + at plan/agw/implementation-review/regressions.spec.ts:41:34 + at Object. (node_modules/expect/build/toThrowMatchers.js:74:11) + at Object.throwingMatcher [as toThrow] (node_modules/expect/build/index.js:320:21) + at Object. (plan/agw/implementation-review/regressions.spec.ts:41:62) + at Object. (plan/agw/implementation-review/regressions.spec.ts:41:62) + + ● R5 decoded static-array pin keeps its argument index + + expect(received).toBe(expected) // Object.is equality + + Expected: 1 + Received: 2 + + 46 | const { terms } = nativeRuleToTerms(input, { nowSeconds: 1700000000 }); + 47 | const decoded = nativeTermsToRule(terms, ADDR.agent, `0x${'00'.repeat(32)}`); + > 48 | expect(decoded.pins?.[0].arg).toBe(1); + | ^ + 49 | }); + 50 | + 51 | it('R5 a decoded simple address-pin rule can be re-encoded after restoring its known signature', () => { + + at Object. (plan/agw/implementation-review/regressions.spec.ts:48:33) + + ● R5 a decoded simple address-pin rule can be re-encoded after restoring its known signature + + expect(received).not.toThrow() + + Error name: "AgenticError" + Error message: "pins[0] expected value does not encode as address: expected an address" + + 128 | + 129 | function invalid(message: string, cause?: unknown): AgenticError { + > 130 | return new AgenticError(AGENTIC_ERROR_CODE.INVALID_RULE, message, { cause }); + | ^ + 131 | } + 132 | + + at invalid (packages/core/src/lib/agentic/codec/abi-layout.ts:130:10) + at encodeArgWord (packages/core/src/lib/agentic/codec/abi-layout.ts:109:11) + at packages/core/src/lib/agentic/codec/native.ts:121:45 + at Array.map () + at nativeRuleToTerms (packages/core/src/lib/agentic/codec/native.ts:118:23) + at plan/agw/implementation-review/regressions.spec.ts:55:33 + at Object. (node_modules/expect/build/toThrowMatchers.js:74:11) + at Object.throwingMatcher [as toThrow] (node_modules/expect/build/index.js:320:21) + at Object. (plan/agw/implementation-review/regressions.spec.ts:55:109) + at Object. (plan/agw/implementation-review/regressions.spec.ts:55:109) + + ● R6 replayed outbound must replace a preexisting Push route instead of preserving it + + expect(received).toBe(expected) // Object.is equality + + Expected: "UOA_TO_CEA" + Received: "UOA_TO_PUSH" + + 61 | const resp = fakeResponse({ to: wallet.address, data: e704d5b.encodeExecute([out.gatewayCall]), route: 'UOA_TO_PUSH' }); + 62 | const adapted = await adaptTrackedResponse(rt, resp); + > 63 | expect(adapted.route).toBe('UOA_TO_CEA'); + | ^ + 64 | }); + 65 | + 66 | it('R7 failed recovery RPC must not claim that a confirmed deployment did not happen', async () => { + + at Object. (plan/agw/implementation-review/regressions.spec.ts:63:25) + + ● R7 failed recovery RPC must not claim that a confirmed deployment did not happen + + expect(received).not.toBe(expected) // Object.is equality + + Expected: not false + + 79 | const err = await createWallet(rt, 'review', { rules: [{ agent: ADDR.agent, target: ADDR.target, selector: 'increment()', validUntil: 1800000000 }] }).catch(e => e); + 80 | expect(err.code).toBe('CREATE_PARTIAL'); + > 81 | expect(err.details.walletDeployed).not.toBe(false); + | ^ + 82 | }); + 83 | + + at Object. (plan/agw/implementation-review/regressions.spec.ts:81:42) + +Test Suites: 1 failed, 1 total +Tests: 7 failed, 7 total +Snapshots: 0 total +Time: 2.654 s, estimated 7 s +Ran all test suites within paths "plan/agw/implementation-review/regressions.spec.ts". diff --git a/plan/agw/implementation-review/regressions.spec.ts b/plan/agw/implementation-review/regressions.spec.ts new file mode 100644 index 00000000..43da3c45 --- /dev/null +++ b/plan/agw/implementation-review/regressions.spec.ts @@ -0,0 +1,82 @@ +// Reviewer-authored regressions: desired behavior, expected to fail at 3008497. +import { decodeFunctionData, getAddress, maxUint256, type Address, type Hex } from 'viem'; +import { CHAIN, PUSH_NETWORK } from '../../../packages/core/src/lib/constants/enums'; +import { ERC20_EVM } from '../../../packages/core/src/lib/constants/abi'; +import { currentGeneration, resetAgenticGenerations } from '../../../packages/core/src/lib/agentic/deployments'; +import { ADDR, FakeChain, registerFakeGeneration, ruleId } from '../../../packages/core/src/lib/agentic/__tests__/fake-chain'; +import { mockRuntime, fakeResponse } from '../../../packages/core/src/lib/agentic/__tests__/mock-runtime'; +import { agenticSend } from '../../../packages/core/src/lib/agentic/execution/send'; +import { composeOutbound, ownerOutboundCalls } from '../../../packages/core/src/lib/agentic/execution/outbound'; +import { nativeRuleToTerms, nativeTermsToRule } from '../../../packages/core/src/lib/agentic/codec/native'; +import { adaptTrackedResponse } from '../../../packages/core/src/lib/agentic/response'; +import { e704d5b } from '../../../packages/core/src/lib/agentic/contracts/e704d5b'; +import type { AgenticExecutionContext } from '../../../packages/core/src/lib/agentic/context'; + +function setup(door: 'owner' | 'agent' = 'agent') { + registerFakeGeneration(); + const fake = new FakeChain(); + const wallet = fake.addWallet(ADDR.owner, 'review', [fake.nativeRule(ADDR.agent, ruleId(1))]); + const gen = currentGeneration(PUSH_NETWORK.TESTNET_DONUT); + const signer = door === 'owner' ? ADDR.owner : ADDR.agent; + const rt = mockRuntime(fake, { signer }); + const ctx: AgenticExecutionContext = { wallet: wallet.address, door, signerPushAccount: signer, signerOrigin: { chain: CHAIN.PUSH_TESTNET_DONUT, address: signer }, generation: gen }; + return { fake, wallet, gen, rt, ctx }; +} +afterEach(() => resetAgenticGenerations()); + +it('R2 explicit connected Push destination behaves like the bare native address', async () => { + const { rt, ctx } = setup(); + await expect(agenticSend(rt, ctx, { to: { address: ADDR.target, chain: CHAIN.PUSH_TESTNET_DONUT }, data: '0xd09de08a' })).resolves.toBeDefined(); +}); + +it('R3 owner funds-only outbound encodes the requested destination address', async () => { + const { rt, gen, wallet } = setup('owner'); + const out = await composeOutbound(rt, gen, wallet.address, { to: { address: ADDR.target, chain: CHAIN.ETHEREUM_SEPOLIA }, funds: { amount: BigInt(10) } }, { requireCalls: false }); + expect(out.gatewayCall.data.toLowerCase()).toContain(ADDR.target.slice(2).toLowerCase()); +}); + +it('R4 owner outbound accepts an existing unlimited gateway allowance', async () => { + const { rt, gen, wallet } = setup('owner'); + const out = await composeOutbound(rt, gen, wallet.address, { to: { address: ADDR.target, chain: CHAIN.ETHEREUM_SEPOLIA }, data: '0xd09de08a', funds: { amount: BigInt(10) } }, { requireCalls: false }); + expect(() => ownerOutboundCalls(gen, out, maxUint256)).not.toThrow(); +}); + +it('R5 decoded static-array pin keeps its argument index', () => { + const input = { agent: ADDR.agent, target: ADDR.target, selector: 'deposit(uint256[2],address)' as const, validUntil: 1800000000, pins: [{ arg: 1, expected: ADDR.other }] }; + const { terms } = nativeRuleToTerms(input, { nowSeconds: 1700000000 }); + const decoded = nativeTermsToRule(terms, ADDR.agent, `0x${'00'.repeat(32)}`); + expect(decoded.pins?.[0].arg).toBe(1); +}); + +it('R5 a decoded simple address-pin rule can be re-encoded after restoring its known signature', () => { + const input = { agent: ADDR.agent, target: ADDR.target, selector: 'deposit(address,uint256)' as const, validUntil: 1800000000, pins: [{ arg: 0, expected: ADDR.other }] }; + const { terms } = nativeRuleToTerms(input, { nowSeconds: 1700000000 }); + const decoded = nativeTermsToRule(terms, ADDR.agent, `0x${'00'.repeat(32)}`); + expect(() => nativeRuleToTerms({ ...decoded, selector: input.selector }, { nowSeconds: 1700000000 })).not.toThrow(); +}); + +it('R6 replayed outbound must replace a preexisting Push route instead of preserving it', async () => { + const { rt, gen, wallet } = setup('owner'); + const out = await composeOutbound(rt, gen, wallet.address, { to: { address: ADDR.target, chain: CHAIN.ETHEREUM_SEPOLIA }, data: '0xd09de08a' }, { requireCalls: false }); + const resp = fakeResponse({ to: wallet.address, data: e704d5b.encodeExecute([out.gatewayCall]), route: 'UOA_TO_PUSH' }); + const adapted = await adaptTrackedResponse(rt, resp); + expect(adapted.route).toBe('UOA_TO_CEA'); +}); + +it('R7 failed recovery RPC must not claim that a confirmed deployment did not happen', async () => { + registerFakeGeneration(); + const fake = new FakeChain(); + const getCode = fake.getCode.bind(fake); + let rpcUnavailable = false; + fake.getCode = async (args) => { if (rpcUnavailable) throw new Error('RPC unavailable'); return getCode(args); }; + const { PushChainBatchExecutionError } = await import('../../../packages/core/src/lib/orchestrator/internals/errors'); + const { createWallet } = await import('../../../packages/core/src/lib/agentic/management/create'); + const rt = mockRuntime(fake, { signer: ADDR.owner, execute: async () => { + fake.addWallet(ADDR.owner, 'committed'); + rpcUnavailable = true; + throw new PushChainBatchExecutionError('grant failed', [`0x${'11'.repeat(32)}`]); + } }); + const err = await createWallet(rt, 'review', { rules: [{ agent: ADDR.agent, target: ADDR.target, selector: 'increment()', validUntil: 1800000000 }] }).catch(e => e); + expect(err.code).toBe('CREATE_PARTIAL'); + expect(err.details.walletDeployed).not.toBe(false); +}); diff --git a/plan/agw/implementation-review/review.md b/plan/agw/implementation-review/review.md new file mode 100644 index 00000000..914424b3 --- /dev/null +++ b/plan/agw/implementation-review/review.md @@ -0,0 +1,113 @@ +# AGW implementation review + +**Verdict: changes requested before merging or enabling a deployment.** The implementation has useful boundaries and its reported passing suites reproduce, but additional tests expose seven correctness issues. Two reproduce with the actual pinned contracts on local Anvil and affect which permissions survive a transaction. + +Reviewed `feat/agw-sdk-impl@3008497b2492a6be78300011d4572076414505bf` against planning base `349635b2254823488603b37f4b44c4f5c929feb9`. Production files and existing tests were not edited. New review files are confined to this directory. No live-network transaction was sent. The generation registry is empty, so these findings concern implementation readiness rather than a currently enabled public deployment. + +## Findings + +### R1 High priority Granting on the wrong wallet after a create race + +**Source:** [create.ts](../../../packages/core/src/lib/agentic/management/create.ts#L98), construction of deploy/grant calls; the index mismatch is checked only after confirmation at line 129. + +The SDK predicts wallet N, encodes `deployWallet(label)` without binding the expected index, and encodes all grants against wallet N. If another creation for the same owner lands before this operation, the factory deploys N+1 while the grant calls still target N. The SDK then throws INDEX_RACE, but the grants on the other-purpose wallet are already committed. This is more than an inconvenient return value: the agent receives authority on a wallet this creation did not deploy. + +**Reproduced against real contracts:** inserted one owner deployment after composition and before the SDK transport executes. The SDK threw INDEX_RACE, and `getPermissionIDs(predictedWallet)` returned one enabled rule instead of zero. See [local test](local-races.spec.ts), test R1, and [output](local-races.log). + +**Required change:** for sequential creation, confirm the deployed wallet/event before building and signing grants for that actual wallet, revalidating inputs as needed. An atomic creation path needs a contract-enforced expected-index/address condition, such as a verified index-bound deployment intent, or must be gated until safe. An extra RPC read or per-process mutex alone cannot prevent cross-client races. Add a regression asserting that neither another wallet nor the wrong creation receives grants. + +### R2 Medium priority Explicit Push destinations are treated as outbound + +**Source:** [send.ts](../../../packages/core/src/lib/agentic/execution/send.ts#L100). + +`outbound = isChainTarget(p.to)` checks the input shape, not the chain. Therefore `{ to: { address: target, chain: CHAIN.PUSH_TESTNET_DONUT } }` enters the universal path. With a valid native rule it throws “not an EVM universal rule”; owner calls instead attempt destination CEA/outbound composition. The equivalent bare address succeeds. + +**Reproduced:** the explicit connected-Push agent call fails before sending in [regressions.spec.ts](regressions.spec.ts), R2. Core's ordinary [route detector](../../../packages/core/src/lib/orchestrator/route-detector.ts#L186) already distinguishes a Push ChainTarget from a foreign destination. + +**Required change:** normalize the connected Push destination before selecting rulebook, gas fields and call address. Reject incompatible Push network targets explicitly. Cover owner and agent, string and ChainTarget forms, and chain aliases/localnet identity. + +### R3 High priority Transfer-only owner outbounds discard the recipient + +**Source:** [outbound.ts](../../../packages/core/src/lib/agentic/execution/outbound.ts#L50), destinationCalls; [request construction](../../../packages/core/src/lib/agentic/execution/outbound.ts#L137). + +For an owner send with `to: { address: recipient, chain }`, `funds.amount > 0` and no data, the composer creates no destination calls, uses `payload = 0x`, and forces `recipient = 0x`. The requested address is absent from the encoded gateway call. Nevertheless, the response path reports that requested address as the logical `to`. An outbound without any encoded recipient/transfer instruction cannot perform the requested delivery; depending on the gateway/node path it parks value in the wallet's CEA or fails. + +The same empty-call branch ignores a transfer-only `value` request. This is not covered by the successful payload-bearing historical universal experiment. + +**Reproduced:** a positive-amount owner transfer-only request contains no bytes of the intended recipient in the encoded gateway call; R3 in [regressions.spec.ts](regressions.spec.ts). + +**Required change:** preserve owner transfer semantics using the appropriate request recipient or destination transfer payload, including native value behavior. If a shape is not supported yet, reject it explicitly before signing. Do not report a logical delivery that the encoded request never instructs. Add recipient-balance/target-effect acceptance tests when a deployment exists. + +### R4 High priority Automatic owner approval can restore revoked authority + +**Source:** [outbound.ts](../../../packages/core/src/lib/agentic/execution/outbound.ts#L170), ownerOutboundCalls; allowance is read earlier in [send.ts](../../../packages/core/src/lib/agentic/execution/send.ts#L168). + +The owner composer automatically approves `snapshotAllowance + outboundAmount`. That is an unconditional write based on stale state. If an owner revokes the standing allowance after the read but before this send, the batch restores the previous allowance. Likewise, agent spending in the interval can be replenished unintentionally. Atomic approval plus burn does not make the preceding off-chain snapshot atomic. + +**Reproduced against real contracts:** started with allowance 50, composed an outbound of 10, then mined an owner approval of zero before executing the outbound batch. The final allowance was 50, restoring the revoked permission. See R4 in [local-races.spec.ts](local-races.spec.ts) and [output](local-races.log). + +There is also a deterministic boundary failure: an existing `uint256.max` allowance plus any positive amount overflows ABI encoding. R4 in [regressions.spec.ts](regressions.spec.ts) fails before signing with IntegerOutOfRangeError. + +**Required change:** remove the implicit read-modify-write allowance preservation. Prefer the already planned separate bounded owner approval flow, consuming an existing sufficient allowance. If automated approval remains supported, define its explicit authorization and concurrency semantics without reinstating revoked/consumed authority. Handle unlimited and zero-reset token behavior deliberately. Retest both races and maximum allowance. + +### R5 Medium priority Decoded native rules contain misleading argument data + +**Source:** [native.ts](../../../packages/core/src/lib/agentic/codec/native.ts#L196). + +`nativeTermsToRule` converts calldata offsets into public `arg` indexes using `(offset - 4) / 32`, although the encoder supports preceding fixed arrays and static tuples occupying multiple words. For `deposit(uint256[2],address)` the correct pin argument is 1; the returned public record says 2. The on-chain terms do not carry enough ABI information to justify that conversion. + +It also returns every pin's expected word as raw bytes32. A simple address pin cannot be re-encoded even after the caller restores the known function signature: `encodeArgWord(address, bytes32)` rejects the returned expected value. Without restoring the signature, any pinned rule fails because the returned selector is only four bytes. + +**Reproduced:** both static-array indexing and simple address-pin re-encoding fail in R5's two tests in [regressions.spec.ts](regressions.spec.ts). + +**Required change:** recover/require verified ABI context for a faithful public NativeRule, or return an explicitly distinct raw representation/capability error while that metadata is unavailable. Do not label a wire-word index as an argument index. This needs an explicit read/codec contract if the public shape changes. Add encode → read/decode → edit/re-encode tests across addresses, integers, arrays and tuples. + +### R6 Medium priority Replay can retain a non-outbound route after decoding an outbound + +**Source:** [response.ts](../../../packages/core/src/lib/agentic/response.ts#L109). + +After successfully recognizing an AGW gateway outbound, replay uses `resp.route ?? 'UOA_TO_CEA'`. Core can already have assigned UOA_TO_PUSH when the Cosmos record exists but has not yet exposed an outbound leg/status; see [route inference](../../../packages/core/src/lib/orchestrator/internals/tx-transformer.ts#L565). The adapter keeps that route even though it has decoded the outbound calldata. `wait()` then sees a non-outbound route and does not enter destination polling. + +**Reproduced:** a valid decoded AGW outbound carrying a preexisting UOA_TO_PUSH route remains UOA_TO_PUSH in R6 of [regressions.spec.ts](regressions.spec.ts). This covers the adapter boundary; the delayed Cosmos scenario was not exercised live. + +**Required change:** make known AGW execution context authoritative for the route and destination when reconstructing a supported outbound. Test delayed/incomplete Cosmos data through the real response-builder/wait boundary, not only response objects without an existing route. + +### R7 Medium priority Partial-create recovery reports unknown state as absent + +**Source:** [create.ts](../../../packages/core/src/lib/agentic/management/create.ts#L173). + +Recovery starts with `walletDeployed = false` and an empty granted-ID list, then suppresses RPC errors. If deployment committed but the recovery getCode/read fails, CREATE_PARTIAL reports `walletDeployed: false` with the hint “No wallet was deployed.” That can cause an unsafe retry and contradicts the stated exact partial-commit reporting. + +**Reproduced:** simulate a confirmed deployment followed by a grant failure, then make recovery getCode unavailable. R7 returns CREATE_PARTIAL with walletDeployed=false. See [regression](regressions.spec.ts) and [output](regressions.log). + +**Required change:** represent unknown recovery state explicitly, preserve confirmed and pending hashes, and require receipt/state reconciliation before a retry. Derive committed grants from this operation's receipts rather than treating a later active-rule list as its exact outcome. Also preserve the known transaction hash when post-send receipt retrieval fails, instead of returning an unannotated transport error. + +## Verification reproduced + +| Check | Reviewer result | +| --- | --- | +| Full existing unit config | 1,883 passed, 12 skipped; 110 passed suites and 1 skipped | +| Existing local contract harness | 32 passed across 3 suites | +| Library type check | Passed | +| Spec/E2E type check | Passed | +| Core build, cache bypassed | Passed | +| Core lint, cache bypassed | 7 errors in files unchanged from the planning base; not a clean lint run | +| E2E agw manifest | 21 scenarios / 7 files / 21 distinct selected tests; consistent | +| E2E all manifest | 76 scenarios / 40 files / 81 selected tests; unchanged | +| New reviewer regressions | 7 failing SDK/helper-boundary cases and 2 failing real-contract race cases; failures reproduce the findings above | +| Live E2E | Not run | + +Commands and artifact checksums are in [evidence.json](evidence.json). Existing suite results support the implementation's covered behavior; they do not invalidate missing-case failures. Review tests deliberately assert the desired safety/behavior and fail on this revision. They are separate from production test discovery, and may need API-aware adaptation when fixes change the representation rather than preserving it. + +## Notes on the highlighted design choices + +- **Web2 aliases:** the new public alias value follows the saved spec. The old literal is accepted as input and wire identity remains web2:https. This does not preserve every caller's literal equality comparison against returned values. Document that observable migration and obtain the planned public review; it is not counted as a newly discovered algorithmic defect here. +- **Batched-write checkpoints:** extra OWNER_ACTION ticks follow the contract's actual execute semantics. Keep them documented and covered; do not change contracts simply to make batched and direct counts equal. +- **Error export/cause:** preserving the underlying error and exporting the base type is useful and compatible with the intended error hierarchy. +- **Source/deployment claims:** say “no compatible deployment has been verified or registered.” Empty registry and missing manifest are evidence of unavailable support, not proof that no deployment exists anywhere. +- **Active-only list:** A06 remains unresolved. The status matrix acknowledges active-only list behavior, but the public target still says every rule. Keep that restriction clearly provisional and prevent a release from advertising complete historical reads. +- **Live E2E assertions:** the positive outbound checks a shared counter increasing and the SDK-computed CEA metadata. That is not yet independent proof of the actual executing CEA. Strengthen destination caller/event correlation, and harden deployment verification with exact artifacts/capabilities before enabling/funding a live run. Manifest title verification does not exercise those checks. + +## Recommended next implementation pass + +Fix R1 and R4 first, then R2/R3, then the decoder, replay and recovery reporting. Move these regressions into the appropriate normal suites after fixes. Preserve the existing 1,883/32 passing coverage and rerun relevant tests plus the new cases. Continue tracking product/ABI/deployment dependencies separately; they do not explain the reproducible SDK bugs in this report. diff --git a/plan/agw/implementation-review/reviewer.config.cjs b/plan/agw/implementation-review/reviewer.config.cjs new file mode 100644 index 00000000..e826cedf --- /dev/null +++ b/plan/agw/implementation-review/reviewer.config.cjs @@ -0,0 +1,11 @@ +const path = require('path'); +const root = path.resolve(__dirname, '../../..'); +module.exports = { + rootDir: root, + ...require(path.join(root, 'jest.preset.js')), + testEnvironment: 'node', + transform: { '^.+\\.[tj]s$': ['ts-jest', { tsconfig: path.join(root, 'packages/core/tsconfig.agw-local.json') }] }, + moduleFileExtensions: ['ts', 'js', 'json'], + testMatch: ['/plan/agw/implementation-review/*.spec.ts'], + testTimeout: 120000, +}; diff --git a/plan/agw/implementation-review/types-lib.log b/plan/agw/implementation-review/types-lib.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/implementation-review/types-spec.log b/plan/agw/implementation-review/types-spec.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/implementation-review/unit-suite.log b/plan/agw/implementation-review/unit-suite.log new file mode 100644 index 00000000..d3075bdb --- /dev/null +++ b/plan/agw/implementation-review/unit-suite.log @@ -0,0 +1,163 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts + +Test Suites: 1 skipped, 110 passed, 110 of 111 total +Tests: 12 skipped, 1883 passed, 1895 total +Snapshots: 0 total +Time: 25.014 s +Ran all test suites. diff --git a/plan/agw/implementation-status.md b/plan/agw/implementation-status.md new file mode 100644 index 00000000..4522b43b --- /dev/null +++ b/plan/agw/implementation-status.md @@ -0,0 +1,135 @@ +# AGW SDK implementation status + +**October 24 — team answers implemented (local v4, uncommitted):** decisions are recorded in the [Harsh](questions-harsh.md), [Aman](questions-aman.md) and [Zaryab](questions-zaryab.md) files. +- **Presets ship only what works:** Uniswap V3 and Aave V3 on Sepolia, Base Sepolia and Arbitrum Sepolia. Each sends only native ETH from Push and wraps it on arrival (`WETH.deposit()` capped by `maxValue`). DEX swaps WETH and Circle USDC on the destination chain only. STAKING has no chains; PREDICTION, mainnet templates and the other apps are removed. `get` returns `{ rules }`; `readiness` and the `network` option are gone (this supersedes the October 16–21 readiness entries). Supplied assets must be one ETH asset per chain with positive limits. +- **Tokens-only EVM rules:** ERC20 assets without `allowedCalls` become transfers to the owner's EVM address, plus opt-in `transferTo` recipients; native assets and Solana are refused. +- **`MOVEABLE.TOKEN..ALL`:** expands to every routable token (Sepolia 6, including Circle `.old`) with default limits; `PushChain.utils.agentic.assets.all(chain)` exposes the list. +- **Smaller fixes:** the 8-function Push limit is reported first; decoded Solana rules with `fromEnd` pins are refused on write; URP's `InnerValueExceedsAllowance` and `BeneficiaryMismatch` are now decoded (they are missing from the compiled ABI). +- **Validation:** full units, 108 local v6 contract tests, docs/package checks, build, read-only compatibility (6/6: WETH accepts native ETH, routers wrap into it, pools have liquidity, Aave lists the reserve), Donut preparation and factory simulation (6/6), and the registry drift check (0 mismatches). +- **Live, October 24:** all six presets pass `agw-presets-acceptance`, each as the unchanged preset with a first and a subsequent agent send of 1e12 wei ETH. + - First-use destination gas is up to 1.66M (Sepolia Lending) under the 2M default; later sends use up to 0.41M. + - The new `agw-tokens-only` group passes 2/2: + - Circle USDC goes back to the owner on Sepolia (`0xdbf6d780…`), and another recipient is refused before broadcast; + - `ALL` reads back six tokens with their defaults. + - Three DEX failures on the first run were test-side or node-side: + - Sepolia: a dropped RPC receipt read. + - Arbitrum: the test took the first tier with liquidity, and its 0.05% pool returns 0 USDC for small swaps. The spec and the compatibility script now choose the tier by Uniswap QuoterV2. + - Base: the swap landed on Base 37 s after submission, but the node kept that outbound `PENDING` for 50+ minutes. The re-run observed normally; core team, if it recurs. + +**October 20 — SDK fixes from the independent review (local v4, uncommitted):** +- **Routes:** exact node-registered Circle USDC routes on Sepolia, Base Sepolia and Arbitrum Sepolia are now resolved by address for AGW only. DEXES Sepolia and LENDING Arbitrum Sepolia are route-ready; the other seven presets remain blocked. +- **Gas:** the AGW gas budget never attaches less than the current Push pool cost plus 20%, keeps the over-$10 share, and no longer counts protocolFee twice. +- **Validation:** Solana rules reject a zero gas ceiling. +- **Data fix:** the Base Sepolia WETH address is corrected. +- **Tests:** the live preset suite funds the agent only after its prerequisites pass. A new opt-in `agw-presets-routed` group covers the two ready presets. The scripts record pool cost and signer origin. +- **Validation results:** 2,267 units pass, 9/9 local v6 preset cases, lib/spec/local typechecks and the core build. +- **Not yet done:** core confirmation of the `.old` routes and funded runs. [Review](independent-review-creation-flow-2026-10-20/review.md). +- **Follow-up:** + - An explicit gasLimit below the chain base is refused before quoting. + - A Solana budget still short after one re-quote is refused before signing. + - BNB testnet gas is valued at the Push pool rate, because no BNB/USD feed exists. Route 2 and Route 3 already floor at the pool cost. + - New `check-agw-route-registry.js` drift check against uregistry: 20 routes match, 0 mismatches. It found the SDK cannot resolve DAI.sol. + - Tests: the agent-door omitted-gas unit; the local suite checks the stored destination; the SPL live test compares every pin and rejects a wrong recipient. That rejection was confirmed read-only at block 24,456,030. + - Question drafts and the October 20 README corrections are updated. +- **Live, 21 October:** the funded `agw-svm-agent-spl` (1/1, with the tightened assertions) and `agw-gas` (4/4, eight deliveries) runs pass on the changed code. `agw-presets-routed`: both route-ready presets pass live. DEXES Sepolia needed a new 1,000,000 multi-step default gas limit, because its subsequent swap ran out of gas at the 500,000 base; LENDING Arbitrum passed. This is the first live outbound over the Circle USDC `.old` routes. +- **Pre-question findings, 21 October** ([findings](research/pre-question-findings-2026-10-21/README.md)): + - Deployed sources identified: node `testnet/donut` `ca3b8d4e`, UniversalCore `core-testnet` `8bc60ae`, Solana gateway built from `pc20-3rd-iteration`. + - Live: all three Circle USDC routes deliver (new `agw-exact-routes`, 3/3); SPL Memo v2 works by owner and agent door (new `agw-svm-memo`, 2/2). + - Unused destination gas is refunded to the wallet (verified on-chain). + - `creditRevert` is not wired anywhere. + - The 8-action Push limit is deliberate. + - The `fromEnd` pin gap is confirmed. +- **Question drafts** are split four ways: `questions-harsh.md` (product only, no recommendations), `questions-aman.md` (presets), `questions-zaryab.md` (AGW contracts) and `questions-core-gateway.md` (core and Solana gateway). + +**October 20 — exact preset acceptance and Solana gas:** 9 unchanged default payloads pass real-contract creation/readback with local provisioned routes; all 9 live preset cases are explicitly blocked before funding. No compatible routed-token replacements were found in the queried protocols. Fixed omitted Solana gas sizing (legacy million-unit fallback quoted 100 PC); public agent SPL first/subsequent delivery with omitted gas passes on devnet, including ATA/cap refusals. 405 AGW units pass; four EVM first/subsequent scenarios also pass (eight destination deliveries), making ten fresh deliveries including SPL. [Current evidence and limits](research/preset-acceptance-2026-10-20/README.md). + +**October 20 — creation error fixes:** typed token-route failures and per-rule details, actual constraint counts, UI-safe userMessage on SDK/revert errors, preserved diagnostics and clearer receipt/cancellation handling. **2,181 units**, **21 local v6 tests**, build/type/package checks pass. DEX UI overflow source remains pending the actual create payload; stock presets stay at 20 conditions. [Review and UI handoff](research/creation-error-review-2026-10-20/README.md). [Git delivery and continuing history](../SDK-CHANGELOG.md); package publication is separate. + +**October 18 — lighter CI requested:** PR checks now run SDK-only validation (421 focused units, spec types, build and package checks); contract checkout/Foundry/full API checks are manual opt-in. Local fast checks pass. Release branch v5 `b291b873` is pushed; package publication remains manual. **2,142 full units**, **107 local contract tests** and **9/9 read-only factory simulations** remain the release evidence. The optional fresh-run full CI preparation failure is documented, not reported as passing. + +**October 18 — final CI repairs:** invalid runner context and stale contract checkout pin are corrected; two incompatible merged dependency ranges were regenerated with Yarn hardened mode. Clean hardened immutable install passes on v5 `66dc81f8`. The full unfunded verifier passes locally, including **107 local contract tests**, in addition to **2,142 full units** and **9/9 Donut factory simulations**. [Final evidence](research/preset-release-readiness-2026-10-18/README.md). + +**October 18 — alpha release readiness:** automatic token/permission defaults, route-aware readiness and explicit destination-funded grants are committed on v4 `2d16bfe0` / v5 `83f9a713`. Sepolia WETH/stETH mappings and address-word metadata are fixed. **2,142 units**, **21 local contract tests**, **9/9 read-only Donut factory simulations**, package checks and isolated v5 immutable install pass. No funded live run or publication was triggered. [Release evidence and limits](research/preset-release-readiness-2026-10-18/README.md). Earlier same-day entries are intermediate states. + +**October 18 — preset permission defaults:** user-approved explicit preset policy now supplies token caps, 20 PC outbound ceilings and seven-day expiries. An agent alone returns Rule[] and complete configuration; general-rule/explicit-asset zero defaults remain. **2,129 unit tests**, **18 local contract tests**, build/typechecks/package checks pass. Existing PRC20 availability still limits unmodified default-asset grants. [Preset policy evidence](research/preset-permission-policy-2026-10-18/README.md). + +**October 18 — automatic preset tokens:** omitted `assets` now includes curated destination tokens per chain; explicit arrays replace defaults, including `[]`. DEX pairs and lending/staking constraints are generated within v6 size ceilings. This token-only stage is superseded by the preset permission defaults above. **2,119 unit tests**, **18 local v6 contract tests**, build/typechecks/package checks pass. See [evidence](research/preset-default-tokens-2026-10-18/README.md). + +**October 16 — preset operation limits and UI readiness:** Implemented token/amount pins, underlying-unit redemption, explicit excluded-call metadata and additive get().readiness. Regenerate then rules.update is documented and contract-tested. **2,111 unit tests**, **54 focused tests**, build/typechecks/package checks pass. **Fresh live acceptance:** Aave passed; EigenLayer and BNB/Venus completed their scenario assertions. Stopped the expanded process at the user’s request during Base setup, so fresh Base/Moonwell acceptance remains incomplete and there is no expanded-suite pass summary. [Changes and evidence](research/preset-configuration-2026-10-16/README.md). + +**October 15 — expanded preset live acceptance:** Five additional scenarios passed across focused runs, covering every shipped testnet protocol/chain combination together with the earlier two Sepolia scenarios. Found and fixed AGW explicit ETH token resolution on Base/Arbitrum; no public signature changed. **2,101 unit tests**, **16 local contract tests**, build/typechecks/package checks pass. [Evidence, initial failures and scope limits](research/preset-expanded-live-2026-10-15/README.md). + +**October 15 — presets:** Verified mainnet/testnet templates, static tuple paths and the approved zero-cap review/regenerate flow are implemented. Full unit suite: **2,096 passed**, 12 skipped. Preset-focused tests: **44 passed**; review-flow local contract suite: **16 passed**. [Current scope and remaining work](section7-presets.md). Dated entries below are historical where they differ. **Two real Donut→Sepolia protocol scenarios passed** (Uniswap swap and Aave LINK supply/withdraw, separate runs). Mainnet templates are read-only verified. Live app coverage is tracked in [preset acceptance](research/preset-live-2026-10-15/README.md). + +**October 14 — v6 integration complete locally:** source `ffd567d`; v6-only deployment/ABIs, atomic indexed creation, automatic outbound approvals, native/EVM EQ/MAX pins, new unlimited sentinels and linked Solana error decoding are integrated. + +- **2,073 unit tests passed**, 12 skipped; **99 local contract tests passed**. +- **69 distinct live scenarios pass across the full run and focused follow-up.** The original run was 67 passed/1 failed (stale allowance assertion), followed by 2/2 passing focused cases, including the new EVM pin alternative proof. Not one clean full invocation. +- Build, lib/spec/local typechecks, guide examples, package imports/declarations and API comparison pass. +- V6 code and preset review fixes are now pushed on v4/v5. Native eight-call ceiling clarification and downstream revert credit remain separate items. + +[Detailed evidence and commands](research/v6-integration-2026-10-14/status.md). + +**Historical — October 12 sections 6/7:** SDK-only feedback and the preset framework are implemented locally. [Section 6 work list](section6-action-items.md) · [Preset scope/decisions](section7-presets.md) · [Open items](pending-items.md). + +- Full unit run: **2,075 passed, 0 failed, 12 skipped**. An earlier 100ms timing-test failure passed both on retry and in this final full run. +- Section-6 real-contract coverage: all 97 cases pass across the suite and focused correction run. Presets add one fixture integration; its complete 11-case multi-asset suite passes. +- Live section-6 coverage: **65/68 passed initially, then all 3 corrected cases passed**. All 68 cases have passing coverage; this is not one clean full invocation. No app-preset live claim is made with an empty approved catalog. +- Build, library/spec/local typechecks, guide examples, compiled package imports/declarations and source-versus-built API comparison pass. New preset code has no lint errors. +- Preset categories are enumerable; production chains remain empty pending catalog approval. Missing preset caps default to zero per the user. Templates omit identity/expiry until supplied. No encoder/ID utilities were re-exposed. +- SDK changes are grouped in commit `6bd8ad50`; planning is tracked separately on v4 and excluded from the v5 sync. New contract feedback remains undeployed; automatic approvals, atomic factory create and general EVM pins remain gated. + +The dated entries below describe earlier checkpoints and are superseded where they conflict with the current summary. + +**October 12:** ten native multi-action live E2Es passed in one Donut invocation; malformed-action/required-expiry guards and the N + 4 checkpoint description are fixed. [Acceptance and evidence](research/native-multi-action-e2e-2026-10-12/README.md). Work remains local on `feat/agw-sdk-v4`; public multi-action shape still awaits product sign-off. + +**Latest v5 integration:** the new factory, source/artifacts, stored label reads and owner-only rename/reset are integrated. [V5 validation](research/v5-implementation-2026-10-07/README.md) distinguishes current tests from earlier v4 evidence. + +**Fresh alignment review:** [October 7 source refresh](research/source-refresh-2026-10-07/README.md) confirms stable deployed code and identified SDK follow-ups G27 (policy-preflight/error parity) and G28 (Solana owner funds-only support). Both are now fixed; [follow-up validation](research/sdk-alignment-fixes-2026-10-07/README.md) records contract-derived errors and actual SOL transfer/replay. + +> October 7: [decision alignment and acceptance](research/decision-alignment-2026-10-07/README.md). All settled SDK choices are implemented. Editable labels are now delivered and implemented against v5; no standalone contract delivery item remains. + +## Validation + +| Level | Current evidence | +| --- | --- | +| Unit | 2,034 passed, 0 failed; 12 skipped (includes 20 multi-action native tests) | +| Actual contracts | 97 passed, 0 failed across 13 Anvil suites (includes 7 multi-action native tests) | +| New funded tests | Expanded v5 labels, native/lifecycle, EVM, SOL and SPL cases pass across selected runs; [new report](research/extended-v5-e2e-2026-10-07/README.md) records individual runs and the gas-default issue | +| Build/typechecks | Build and lib/spec/local/AGW-E2E checks pass | +| Consumer checks | Package imports, compiled declarations, API comparison and guide examples pass | +| E2E selection | AGW: 68 scenarios/15 files/68 tests; default all remains 76/40/81 | + +These are selected live runs. Latest expansion verified 20 distinct labels/EVM/multi-asset/SOL/SPL scenarios across selected runs; earlier v5 native/lifecycle evidence adds ten distinct cases. This is not a full 58-case invocation. Older v4 evidence includes 39 prior cases plus seven additions. See the linked report for the initial 7702 gas failure and verified fix, public API changes, IDL-layout limits and test evidence. + +## Per-step matrix + +| Step | Deliverable | Current status | Remaining work | +| --- | --- | --- | --- | +| 1 | Source/capability contract | V5 deployed source/ABIs pinned and reproduced | Refresh for future releases | +| 2 | Namespace/types/errors | Implemented; AMBIGUOUS_RULE replaces duplicate-authoring rejection | Approved dual input forms; no pending type decision | +| 3 | Signer/wallet context | Owner/agent/read-only/identity guards retained | Release review; UEA identity cases pass | +| 4 | Registry/adapter | Donut v5 registered; unsupported networks fail | Release review; no legacy fallback | +| 5 | Wallet/checkpoint/rule reads | Native and EVM reads implemented; source tokens/beneficiary offsets reconstructed | Stored label reads and owner rename/reset implemented; ref removed | +| 6 | Normalization/codecs | Native/EVM envelope 1, ordered caps, hard-zero/max total, empty-list routing | Confirmed defaults; named-IDL compiler implemented | +| 7 | Create/add/revoke | Index-bound create, partial recovery, atomic writes; same-agent multiples allowed | Release review; deployed create/identity/batching paths verified | +| 8 | Atomic update | Native per-action and universal all-token assertions before revoke/grant | Public native/EVM/SVM lifecycle implemented | +| 9 | Owner/allowance | Owner path unrestricted; explicit separate allowance retained | Release review; production allowance/token debit and delivery verified | +| 10 | Native agent sends | Sender-preserving atomic batches retained | Existing ambiguity guard retained; contract validation/error mapping verified | +| 11 | EVM outbound | V5 asset membership, maxGasPerCall, wallet CEA/refunds, signer gas and responses | Release review; Sepolia success/failure and UEA cases verified | +| 12 | SVM destinations | Public named-IDL lifecycle, send and replay implemented; four new public cases pass live | Maintain documented supported-layout limits; prior failure retry timing remains operational follow-up | +| 13 | Responses/progress/errors | V5 ABIs and prior canonical replay/wait fixes retained | Delayed-index replay/polling tested with real contracts/receipts; no remaining SDK-owned response gap | +| 14 | E2E | 48 opt-in scenarios registered; selected coverage includes public owner transfers and mapped simulation errors | Selected native/EVM/SVM acceptance complete | +| 15 | Web2 | Prior implementation retained and included in full unit run | Consumer migration notes supplied; existing Web2 unit acceptance passes | +| 16 | compileCard | Outside standalone AGW; absent public export | Future marketplace scope | +| 17 | Documentation/release | Current status/gaps/handoff updated | Label delivery and release review | + +## Remaining dependencies + +Open items, owners and the multi-action native rule decision: [pending items](pending-items.md). + +Product choices are settled. Rule ref is removed; zero native PC defaults and the current token model are retained; dual native/EVM raw/index inputs are approved; named IDL Solana authoring is implemented. Contract validation is authoritative; AMBIGUOUS_RULE remains the SDK response to multiple candidates. No selection interface change is required. + +Freshly fetched contracts already validate explicit rulesIds and reject unauthorized actions. V5 supplies stored labels and setLabel, now enabled by the SDK. [Contract delivery items](questions-zaryab.md). `creditRevert` remains a separate Push-core executor dependency; ordinary returned funds do not lower policy spend. + +Latest coverage expansion: five additional registered E2Es, wallet-isolation and UEA intermediate-read assertions, live independent token budgets and SPL recipient credit. The source-mint resolver fix adds four regression units; no caller-facing API changed. [Evidence and gas-default follow-up](research/extended-v5-e2e-2026-10-07/README.md). diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/dest-probe.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/dest-probe.json new file mode 100644 index 00000000..f2f2ba5b --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/dest-probe.json @@ -0,0 +1,565 @@ +{ + "at": "2026-10-20T16:32:02.266Z", + "readOnly": true, + "chains": { + "eip155:11155111": { + "rpc": "https://ethereum-sepolia-rpc.publicnode.com", + "chainId": 11155111, + "block": "11956507", + "vaultNativeBalance": "0", + "tokens": { + "WETH(dex)": { + "address": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "hasCode": true, + "codeBytes": 3124, + "hasDepositSelector": true, + "hasWithdrawSelector": true, + "symbol": "WETH", + "decimals": 18, + "vaultBalance": "17931859384055400", + "gatewayInboundSupported": true + }, + "USDC(circle,dex)": { + "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "hasCode": true, + "codeBytes": 1798, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "USDC", + "decimals": 6, + "vaultBalance": "120464406768", + "gatewayInboundSupported": true + }, + "LINK(aave,lending)": { + "address": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "hasCode": true, + "codeBytes": 5462, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "LINK", + "decimals": 18, + "vaultBalance": "0", + "gatewayInboundSupported": false + }, + "WETH(eigen,staking)": { + "address": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "hasCode": true, + "codeBytes": 1786, + "hasDepositSelector": true, + "hasWithdrawSelector": true, + "symbol": "WETH", + "decimals": 18, + "vaultBalance": "0", + "gatewayInboundSupported": false + }, + "USDT(routed mock)": { + "address": "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876", + "hasCode": true, + "codeBytes": 212, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "USDT", + "decimals": 6, + "vaultBalance": "6868887672141", + "gatewayInboundSupported": true + }, + "USDC(routed mock)": { + "address": "0x97F477B7f970D47a87B42869ceeace218106152a", + "hasCode": true, + "codeBytes": 7006, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "USDC", + "decimals": 6, + "vaultBalance": "6923434414182", + "gatewayInboundSupported": true + }, + "stETH(routed)": { + "address": "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af", + "hasCode": true, + "codeBytes": 1007, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "stETH", + "decimals": 18, + "vaultBalance": "0", + "gatewayInboundSupported": true + } + }, + "factory": "0x0227628f3F023bb0B980b67D528571c95c6DaC1c", + "pools": [ + { + "pair": [ + "WETH(dex)", + "USDC(circle,dex)" + ], + "fee": 100, + "pool": "0xFeEd501c2B21D315F04946F85fC6416B640240b5", + "liquidity": "621313943474064" + }, + { + "pair": [ + "WETH(dex)", + "USDC(circle,dex)" + ], + "fee": 500, + "pool": "0x3289680dD4d6C10bb19b899729cda5eEF58AEfF1", + "liquidity": "13023204526049250" + }, + { + "pair": [ + "WETH(dex)", + "USDC(circle,dex)" + ], + "fee": 3000, + "pool": "0x6Ce0896eAE6D4BD668fDe41BB784548fb8F59b50", + "liquidity": "8789602361849593" + }, + { + "pair": [ + "WETH(dex)", + "USDC(circle,dex)" + ], + "fee": 10000, + "pool": "0x6418EEC70f50913ff0d756B48d32Ce7C02b47C47", + "liquidity": "107641036005842238" + } + ], + "aaveReserves": [ + { + "reserve": "0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357", + "symbol": "DAI", + "decimals": 18, + "hasDepositSelector": false + }, + { + "reserve": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "symbol": "LINK", + "decimals": 18, + "hasDepositSelector": false + }, + { + "reserve": "0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8", + "symbol": "USDC", + "decimals": 6, + "hasDepositSelector": false + }, + { + "reserve": "0x29f2D40B0605204364af54EC677bD022dA425d03", + "symbol": "WBTC", + "decimals": 8, + "hasDepositSelector": false + }, + { + "reserve": "0xC558DBdd856501FCd9aaF1E62eae57A9F0629a3c", + "symbol": "WETH", + "decimals": 18, + "hasDepositSelector": true + }, + { + "reserve": "0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0", + "symbol": "USDT", + "decimals": 6, + "hasDepositSelector": false + }, + { + "reserve": "0x88541670E55cC00bEEFD87eB59EDd1b7C511AC9a", + "symbol": "AAVE", + "decimals": 18, + "hasDepositSelector": false + }, + { + "reserve": "0x6d906e526a4e2Ca02097BA9d0caA3c382F52278E", + "symbol": "EURS", + "decimals": 2, + "hasDepositSelector": false + }, + { + "reserve": "0xc4bF5CbDaBE595361438F8c6a187bDc330539c60", + "symbol": "GHO", + "decimals": 18, + "hasDepositSelector": false + } + ], + "eigenUnderlying": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "ethUsd1e18": "2432000000000000000000", + "ethUsdFeedDecimals": 8 + }, + "eip155:84532": { + "rpc": "https://base-sepolia-rpc.publicnode.com", + "chainId": 84532, + "block": "48372829", + "vaultNativeBalance": "0", + "tokens": { + "WETH(dex,canonical)": { + "address": "0x4200000000000000000000000000000000000006", + "hasCode": true, + "codeBytes": 2041, + "hasDepositSelector": true, + "hasWithdrawSelector": true, + "symbol": "WETH", + "decimals": 18, + "vaultBalance": "0", + "gatewayInboundSupported": true + }, + "USDC(circle,dex)": { + "address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "hasCode": true, + "codeBytes": 1798, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "USDC", + "decimals": 6, + "vaultBalance": "1126991000", + "gatewayInboundSupported": true + }, + "LINK(aave,lending)": { + "address": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "hasCode": true, + "codeBytes": 3981, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "LINK", + "decimals": 18, + "vaultBalance": "0", + "gatewayInboundSupported": false + }, + "USDbC(moonwell)": { + "address": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "hasCode": true, + "codeBytes": 4552, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "USDBC", + "decimals": 6, + "vaultBalance": "0", + "gatewayInboundSupported": false + }, + "WETH(moonwell)": { + "address": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "hasCode": true, + "codeBytes": 3096, + "hasDepositSelector": true, + "hasWithdrawSelector": true, + "symbol": "WETH", + "decimals": 18, + "vaultBalance": "0", + "gatewayInboundSupported": false + }, + "USDT(routed mock)": { + "address": "0x4D7646B9eE3D68F4b0F135B5cbc66B00819F6b61", + "hasCode": true, + "codeBytes": 212, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "USDT", + "decimals": 6, + "vaultBalance": "250046831993", + "gatewayInboundSupported": true + }, + "USDC(routed mock)": { + "address": "0x5c3504F0E3bA28FDc1F74234fE936518276AaBB8", + "hasCode": true, + "codeBytes": 7006, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "USDC", + "decimals": 6, + "vaultBalance": "1043749802312", + "gatewayInboundSupported": true + }, + "SDK BASE WETH entry (Sepolia addr)": { + "address": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "hasCode": false, + "codeBytes": 0, + "hasDepositSelector": false, + "hasWithdrawSelector": false + } + }, + "factory": "0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24", + "pools": [ + { + "pair": [ + "WETH(dex,canonical)", + "USDC(circle,dex)" + ], + "fee": 100, + "pool": "0x57183717A087d2fe3Ad890873877244c3B96156c", + "liquidity": "2890001491047" + }, + { + "pair": [ + "WETH(dex,canonical)", + "USDC(circle,dex)" + ], + "fee": 500, + "pool": "0x94bfc0574FF48E92cE43d495376C477B1d0EEeC0", + "liquidity": "448098251397" + }, + { + "pair": [ + "WETH(dex,canonical)", + "USDC(circle,dex)" + ], + "fee": 3000, + "pool": "0x46880b404CD35c165EDdefF7421019F8dD25F4Ad", + "liquidity": "541083441415564" + }, + { + "pair": [ + "WETH(dex,canonical)", + "USDC(circle,dex)" + ], + "fee": 10000, + "pool": "0x4664755562152EDDa3a3073850FB62835451926a", + "liquidity": "57734017049" + } + ], + "aaveReserves": [ + { + "reserve": "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f", + "symbol": "USDC", + "decimals": 6, + "hasDepositSelector": false + }, + { + "reserve": "0x0a215D8ba66387DCA84B284D18c3B4ec3de6E54a", + "symbol": "USDT", + "decimals": 6, + "hasDepositSelector": false + }, + { + "reserve": "0x54114591963CF60EF3aA63bEfD6eC263D98145a4", + "symbol": "WBTC", + "decimals": 8, + "hasDepositSelector": false + }, + { + "reserve": "0x4200000000000000000000000000000000000006", + "symbol": "WETH", + "decimals": 18, + "hasDepositSelector": true + }, + { + "reserve": "0xD171b9694f7A2597Ed006D41f7509aaD4B485c4B", + "symbol": "cbETH", + "decimals": 18, + "hasDepositSelector": false + }, + { + "reserve": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "symbol": "LINK", + "decimals": 18, + "hasDepositSelector": false + } + ] + }, + "eip155:421614": { + "rpc": "https://arbitrum-sepolia-rpc.publicnode.com", + "chainId": 421614, + "block": "321115011", + "vaultNativeBalance": "0", + "tokens": { + "WETH(dex)": { + "address": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "hasCode": true, + "codeBytes": 2147, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "WETH", + "decimals": 18, + "vaultBalance": "0", + "gatewayInboundSupported": true + }, + "USDC(circle,dex,lending)": { + "address": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "hasCode": true, + "codeBytes": 1798, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "USDC", + "decimals": 6, + "vaultBalance": "157300000", + "gatewayInboundSupported": true + }, + "USDT(routed mock)": { + "address": "0xE30928528f52CAEeB75fB07837e22d77D47e9c07", + "hasCode": true, + "codeBytes": 212, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "USDT", + "decimals": 6, + "vaultBalance": "245087879327", + "gatewayInboundSupported": true + }, + "USDC(routed mock)": { + "address": "0x5dd39b0b3610F666F631a6506b7713EF83e1Ac5C", + "hasCode": true, + "codeBytes": 7006, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "USDC", + "decimals": 6, + "vaultBalance": "1044729424179", + "gatewayInboundSupported": true + } + }, + "factory": "0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e", + "pools": [ + { + "pair": [ + "WETH(dex)", + "USDC(circle,dex,lending)" + ], + "fee": 100, + "pool": "0x152c469626C706E201721F13eb470691E4E81c5D", + "liquidity": "0" + }, + { + "pair": [ + "WETH(dex)", + "USDC(circle,dex,lending)" + ], + "fee": 500, + "pool": "0x6F112d524DC998381C09b4e53C7e5e2cc260f877", + "liquidity": "122" + }, + { + "pair": [ + "WETH(dex)", + "USDC(circle,dex,lending)" + ], + "fee": 3000, + "pool": "0x66EEAB70aC52459Dd74C6AD50D578Ef76a441bbf", + "liquidity": "10070937193695" + }, + { + "pair": [ + "WETH(dex)", + "USDC(circle,dex,lending)" + ], + "fee": 10000, + "pool": "0x3eCedaB7E9479E29B694d8590dc34e0Ce6059868", + "liquidity": "3225673603183" + } + ], + "aaveReserves": [ + { + "reserve": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "symbol": "USDC", + "decimals": 6, + "hasDepositSelector": false + }, + { + "reserve": "0x1dF462e2712496373A347f8ad10802a5E95f053D", + "symbol": "WETH", + "decimals": 18, + "hasDepositSelector": true + } + ] + }, + "eip155:97": { + "rpc": "https://bsc-testnet-rpc.publicnode.com", + "chainId": 97, + "block": "137918895", + "vaultNativeBalance": "0", + "tokens": { + "WBNB(dex)": { + "address": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "hasCode": true, + "codeBytes": 3124, + "hasDepositSelector": true, + "hasWithdrawSelector": true, + "symbol": "WBNB", + "decimals": 18, + "vaultBalance": "0", + "gatewayInboundSupported": false + }, + "USDT(venus,dex,lending)": { + "address": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "hasCode": true, + "codeBytes": 2095, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "USDT", + "decimals": 6, + "vaultBalance": "0", + "gatewayInboundSupported": false + }, + "USDC(venus,lending)": { + "address": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "hasCode": true, + "codeBytes": 2095, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "USDC", + "decimals": 6, + "vaultBalance": "0", + "gatewayInboundSupported": false + }, + "USDT(routed mock)": { + "address": "0xE935d9c9C24D02E61186c640cc01d713C876d40F", + "hasCode": true, + "codeBytes": 212, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "USDT", + "decimals": 6, + "vaultBalance": "219017594761", + "gatewayInboundSupported": true + }, + "USDC(routed mock)": { + "address": "0xA8802F96cAd0d45343d9bc660B6f7d80050A660b", + "hasCode": true, + "codeBytes": 212, + "hasDepositSelector": false, + "hasWithdrawSelector": false, + "symbol": "USDC", + "decimals": 6, + "vaultBalance": "216926047736", + "gatewayInboundSupported": true + } + }, + "factory": "0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865", + "pools": [ + { + "pair": [ + "WBNB(dex)", + "USDT(venus,dex,lending)" + ], + "fee": 100, + "pool": "0xCed0844e421F856D2de472F9e7037f873987887C", + "liquidity": "229529662705916" + }, + { + "pair": [ + "WBNB(dex)", + "USDT(venus,dex,lending)" + ], + "fee": 500, + "pool": "0xc2F0629Dd29AB0EcfF7476560bc8FD5c0c4D19Cd", + "liquidity": "0" + }, + { + "pair": [ + "WBNB(dex)", + "USDT(venus,dex,lending)" + ], + "fee": 2500, + "pool": "0x917aB0c0f32452e1403eBD68B222C0B59bAaa2C3", + "liquidity": "0" + }, + { + "pair": [ + "WBNB(dex)", + "USDT(venus,dex,lending)" + ], + "fee": 10000, + "pool": "0xa5316a3418e0643BB977A97689E584a3b6c35080", + "liquidity": "0" + } + ] + } + } +} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/dest-receipts.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/dest-receipts.json new file mode 100644 index 00000000..6b1cc51d --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/dest-receipts.json @@ -0,0 +1,189 @@ +{ + "at": "2026-10-20T16:40:39.547Z", + "dest": [ + { + "ns": "eip155:11155111", + "hash": "0xf3ed17fa05f700543ec10930d078c6fb793624e44e8ec8fe3f14fbb7cee5cf19", + "status": "success", + "block": "11956206", + "from": "0x9fed6f778a956244c06a3b905ba45bdb2ec3afea", + "to": "0xd019eb12d0d6ef8d299661f22b4b7d262ed4b965", + "value": "1000000000000", + "gasUsed": "1265722", + "ceaExecuted": [ + { + "emitter": "0xddc0c8e35863f1478c0485144d2fae959242ce43", + "originCaller": "0xD847ca2462405a70c32ff5776e70fE25EA7B26ca", + "target": "0xF1552eD5ac48C273570500bD10b10C00E1C418bB", + "data": "0xd09de08a" + } + ], + "ceaMatches": true + }, + { + "ns": "eip155:11155111", + "hash": "0x15f49a09b3879f3cc1ea4c3accddc7431b279da59033f5eb9842a0d4994df50a", + "status": "success", + "block": "11956213", + "from": "0x9fed6f778a956244c06a3b905ba45bdb2ec3afea", + "to": "0xd019eb12d0d6ef8d299661f22b4b7d262ed4b965", + "value": "1000000000000", + "gasUsed": "223683", + "ceaExecuted": [ + { + "emitter": "0xddc0c8e35863f1478c0485144d2fae959242ce43", + "originCaller": "0xD847ca2462405a70c32ff5776e70fE25EA7B26ca", + "target": "0xF1552eD5ac48C273570500bD10b10C00E1C418bB", + "data": "0xd09de08a" + } + ], + "ceaMatches": true + }, + { + "ns": "eip155:11155111", + "ceaCodeBytes": 45, + "ceaNativeBalanceNow": "2000000000000" + }, + { + "ns": "eip155:84532", + "hash": "0x89337900340a39fd1725657e72f146fe5b4b917a58d5db150f052b2222724d6d", + "status": "success", + "block": "48371096", + "from": "0x9fed6f778a956244c06a3b905ba45bdb2ec3afea", + "to": "0xb4ba4d5542d1dd48bd3589543660b265b41f16cb", + "value": "1000000000000", + "gasUsed": "325448", + "ceaExecuted": [ + { + "emitter": "0xb0d8079eef1553d3e975947f087eeeb05f02ab1a", + "originCaller": "0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58", + "target": "0x25a62134B57C42b1733BDF577E48C91d13053138", + "data": "0xd09de08a" + } + ], + "ceaMatches": true + }, + { + "ns": "eip155:84532", + "hash": "0xe81704385810c74cef8d16cb7fe3e2a98805aff9a9f63aaf5008d3d9288a4781", + "status": "success", + "block": "48371126", + "from": "0x9fed6f778a956244c06a3b905ba45bdb2ec3afea", + "to": "0xb4ba4d5542d1dd48bd3589543660b265b41f16cb", + "value": "1000000000000", + "gasUsed": "123187", + "ceaExecuted": [ + { + "emitter": "0xb0d8079eef1553d3e975947f087eeeb05f02ab1a", + "originCaller": "0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58", + "target": "0x25a62134B57C42b1733BDF577E48C91d13053138", + "data": "0xd09de08a" + } + ], + "ceaMatches": true + }, + { + "ns": "eip155:84532", + "ceaCodeBytes": 45, + "ceaNativeBalanceNow": "2000000000000" + }, + { + "ns": "eip155:421614", + "hash": "0x059011ed41d6409e48b70ab47dd02a16eca292e01e68eb721d78df5813f46c98", + "status": "success", + "block": "321102083", + "from": "0x9fed6f778a956244c06a3b905ba45bdb2ec3afea", + "to": "0x233b1b1b378eb0aa723097634025a47c4b73a8f7", + "value": "1000000000000", + "gasUsed": "325424", + "ceaExecuted": [ + { + "emitter": "0x97b91433af804877cd11ec522c910c54e04624b5", + "originCaller": "0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb", + "target": "0x7F0936bB90e7dcF3eDB47199C2005e7184E44Cf8", + "data": "0xd09de08a" + } + ], + "ceaMatches": true + }, + { + "ns": "eip155:421614", + "hash": "0x54f382ed25d895893f6cd3042ff7ee43e63bc392397c9a9572c424a3589d9df8", + "status": "success", + "block": "321102318", + "from": "0x9fed6f778a956244c06a3b905ba45bdb2ec3afea", + "to": "0x233b1b1b378eb0aa723097634025a47c4b73a8f7", + "value": "1000000000000", + "gasUsed": "123163", + "ceaExecuted": [ + { + "emitter": "0x97b91433af804877cd11ec522c910c54e04624b5", + "originCaller": "0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb", + "target": "0x7F0936bB90e7dcF3eDB47199C2005e7184E44Cf8", + "data": "0xd09de08a" + } + ], + "ceaMatches": true + }, + { + "ns": "eip155:421614", + "ceaCodeBytes": 45, + "ceaNativeBalanceNow": "2000000000000" + }, + { + "ns": "eip155:97", + "hash": "0x6b5cfb84699948c2b626e2a244b9ff8354d070093d6f8ecb42a228914adfdaa5", + "status": "success", + "block": "137911931", + "from": "0x9fed6f778a956244c06a3b905ba45bdb2ec3afea", + "to": "0xe52ac4f8dd3e0263bdf748f3390cdfa1f02be881", + "value": "1000000000000", + "gasUsed": "325919", + "ceaExecuted": [ + { + "emitter": "0xa7384f2b00463e548426cd9c8979dda78ecf60c4", + "originCaller": "0x0140403283bB76C1890501067754d1c376189b5D", + "target": "0xf4bd8c13DA0F5831D7B6dd3275a39F14eC7dDaA6", + "data": "0xd09de08a" + } + ], + "ceaMatches": true + }, + { + "ns": "eip155:97", + "hash": "0x42adb9167d8f25a81ff01e143cb43e676818d8ce144a08444c890caecd08029a", + "status": "success", + "block": "137912063", + "from": "0x9fed6f778a956244c06a3b905ba45bdb2ec3afea", + "to": "0xe52ac4f8dd3e0263bdf748f3390cdfa1f02be881", + "value": "1000000000000", + "gasUsed": "123637", + "ceaExecuted": [ + { + "emitter": "0xa7384f2b00463e548426cd9c8979dda78ecf60c4", + "originCaller": "0x0140403283bB76C1890501067754d1c376189b5D", + "target": "0xf4bd8c13DA0F5831D7B6dd3275a39F14eC7dDaA6", + "data": "0xd09de08a" + } + ], + "ceaMatches": true + }, + { + "ns": "eip155:97", + "ceaCodeBytes": 45, + "ceaNativeBalanceNow": "2000000000000" + } + ], + "walletDelta": { + "spl:first-use": { + "before": "41000000000000000000", + "after": "38930349124935516270", + "deltaPC": -2.0696508750644838 + }, + "spl:subsequent": { + "before": "39021448806523059654", + "after": "38151923666016831746", + "deltaPC": -0.869525140506228 + } + } +} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/gasprice-history.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/gasprice-history.json new file mode 100644 index 00000000..c50f99d7 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/gasprice-history.json @@ -0,0 +1,119 @@ +[ + { + "block": "24457472", + "time": "2026-10-20T16:38:50.000Z", + "eip155:11155111": "1100018", + "eip155:84532": "6600000", + "eip155:421614": "22204600", + "eip155:97": "55000000", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "1000" + }, + { + "block": "24457272", + "time": "2026-10-20T16:30:42.000Z", + "eip155:11155111": "1100018", + "eip155:84532": "6600000", + "eip155:421614": "22143000", + "eip155:97": "110000000", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "1000" + }, + { + "block": "24457072", + "time": "2026-10-20T16:22:35.000Z", + "eip155:11155111": "1100018", + "eip155:84532": "6600000", + "eip155:421614": "22103400", + "eip155:97": "55000000", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "1000" + }, + { + "block": "24456872", + "time": "2026-10-20T16:14:26.000Z", + "eip155:11155111": "1100017", + "eip155:84532": "6600000", + "eip155:421614": "22191400", + "eip155:97": "55000000", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "1000" + }, + { + "block": "24456672", + "time": "2026-10-20T16:06:18.000Z", + "eip155:11155111": "1100017", + "eip155:84532": "6600000", + "eip155:421614": "22074800", + "eip155:97": "55000000", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "1000" + }, + { + "block": "24456472", + "time": "2026-10-20T15:58:10.000Z", + "eip155:11155111": "1100017", + "eip155:84532": "6600000", + "eip155:421614": "22024200", + "eip155:97": "110000000", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "1000" + }, + { + "block": "24456272", + "time": "2026-10-20T15:50:01.000Z", + "eip155:11155111": "1100017", + "eip155:84532": "6600000", + "eip155:421614": "22264000", + "eip155:97": "55000000", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "1000" + }, + { + "block": "24456072", + "time": "2026-10-20T15:41:59.000Z", + "eip155:11155111": "1100017", + "eip155:84532": "6600000", + "eip155:421614": "22596200", + "eip155:97": "1100000000", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "1000" + }, + { + "block": "24455872", + "time": "2026-10-20T15:33:51.000Z", + "eip155:11155111": "1100016", + "eip155:84532": "6600000", + "eip155:421614": "22477400", + "eip155:97": "110000000", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "1000" + }, + { + "block": "24455672", + "time": "2026-10-20T15:25:43.000Z", + "eip155:11155111": "1100016", + "eip155:84532": "6600000", + "eip155:421614": "22499400", + "eip155:97": "110000000", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "1000" + }, + { + "block": "24455472", + "time": "2026-10-20T15:17:35.000Z", + "eip155:11155111": "1100016", + "eip155:84532": "6600000", + "eip155:421614": "22545600", + "eip155:97": "110000000", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "1000" + }, + { + "block": "24455272", + "time": "2026-10-20T15:09:27.000Z", + "eip155:11155111": "1100016", + "eip155:84532": "6600000", + "eip155:421614": "22409200", + "eip155:97": "110000000", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "1000" + }, + { + "block": "24455072", + "time": "2026-10-20T15:01:19.000Z", + "eip155:11155111": "1100016", + "eip155:84532": "6600000", + "eip155:421614": "22299200", + "eip155:97": "110000000", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": "1000" + } +] \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/live-2026-10-21-evidence.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/live-2026-10-21-evidence.json new file mode 100644 index 00000000..2b73f53c --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/live-2026-10-21-evidence.json @@ -0,0 +1,531 @@ +{ + "note": "Funded live runs after the SDK changes: agw-svm-agent-spl (1 passed) and agw-gas (4 passed). Public hashes and quotes only.", + "entries": [ + { + "name": "agw-gas-quote", + "at": "2026-10-21T02:25:39.442Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "agent-spl:first-use", + "token": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34", + "requestedGasLimit": "0", + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "2285", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "2285000", + "poolPcInRequired": "2069651270263405412" + }, + { + "name": "agent-spl-submitted", + "at": "2026-10-21T02:25:44.016Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "first-use", + "wallet": "0x794d9FcdbC98e1AedA46B50B1A7dCeB4E2A4f5C8", + "cea": "2e6zcSRHdsZ6wQsrukKGsWE4pdQyy9FcDHoqBzB2nTUt", + "ceaATA": "EdtjZZBBw7AnP5p69jKitxf1MybEurG39ihHUiyCpfqH", + "hash": "0xf9ed22085ba92bb5da919cb6d623c139f17d88f559ae9b1d3feacb32c011b05a" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T02:26:37.890Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "agent-spl:first-use", + "hash": "0xf9ed22085ba92bb5da919cb6d623c139f17d88f559ae9b1d3feacb32c011b05a", + "block": "24471877", + "gasUsed": "467992", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "526491000000000" + }, + { + "name": "agent-spl-delivered", + "at": "2026-10-21T02:26:37.892Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "first-use", + "wallet": "0x794d9FcdbC98e1AedA46B50B1A7dCeB4E2A4f5C8", + "hash": "0xf9ed22085ba92bb5da919cb6d623c139f17d88f559ae9b1d3feacb32c011b05a", + "destinationHash": "zrGSbp8ryyHEfDRUpqAqf19rcSimmedF1ihssmQrLUu2yKEBUm7R5kEPrmu5g7gT36DpCitpjQECDj9vRse8ReV", + "destinationFeeLamports": 5000, + "computeUnitsConsumed": 125402 + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T02:26:48.936Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "agent-spl:subsequent", + "token": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34", + "requestedGasLimit": "0", + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "960", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "960000", + "poolPcInRequired": "869525306541673833" + }, + { + "name": "agent-spl-submitted", + "at": "2026-10-21T02:26:54.145Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "subsequent", + "wallet": "0x794d9FcdbC98e1AedA46B50B1A7dCeB4E2A4f5C8", + "cea": "2e6zcSRHdsZ6wQsrukKGsWE4pdQyy9FcDHoqBzB2nTUt", + "ceaATA": "EdtjZZBBw7AnP5p69jKitxf1MybEurG39ihHUiyCpfqH", + "hash": "0xd302f5298195d083e1f1bcc99f56238e1ba31954c1040ecc7adc1393f1af20c5" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T02:27:53.421Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "agent-spl:subsequent", + "hash": "0xd302f5298195d083e1f1bcc99f56238e1ba31954c1040ecc7adc1393f1af20c5", + "block": "24471906", + "gasUsed": "447034", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "502913250000000" + }, + { + "name": "agent-spl-delivered", + "at": "2026-10-21T02:27:53.422Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "subsequent", + "wallet": "0x794d9FcdbC98e1AedA46B50B1A7dCeB4E2A4f5C8", + "hash": "0xd302f5298195d083e1f1bcc99f56238e1ba31954c1040ecc7adc1393f1af20c5", + "destinationHash": "2qSdorisfULDw9XXUjBgMDiCrSZ9rTv8tQWCcehTgRphV5chvkkyDbdXKMJsfobxiAsTyk199cKXrudCzkgAzsyz", + "destinationFeeLamports": 5000, + "computeUnitsConsumed": 102801 + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T02:29:01.693Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:11155111:first-use", + "token": "0x2971824Db68229D087931155C2b8bB820B275809", + "requestedGasLimit": "2000000", + "chain": "eip155:11155111", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "440052000000", + "poolPcInRequired": "643471955090073" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-21T02:29:11.283Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:11155111", + "stage": "first-use", + "wallet": "0x74C744022E0C708277b6192de02FB294A05eEdee", + "cea": "0x5946f4371F1bffECbc6B22fac1aFA8A0cbE93ABd", + "hash": "0xc4f63d536ea9d4fe08d1a014ff5d2f0ba88b1c4389487157486bdcb73e92e27b" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T02:30:22.850Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:11155111:first-use", + "hash": "0xc4f63d536ea9d4fe08d1a014ff5d2f0ba88b1c4389487157486bdcb73e92e27b", + "block": "24471961", + "gasUsed": "397808", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "447534000000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-21T02:30:22.852Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:11155111", + "stage": "first-use", + "wallet": "0x74C744022E0C708277b6192de02FB294A05eEdee", + "hash": "0xc4f63d536ea9d4fe08d1a014ff5d2f0ba88b1c4389487157486bdcb73e92e27b", + "destinationHash": "0x66fe3a8acaadf71b36699ba0ee9fb34da0d990aaf2630dbcc3fb9755b4233df0", + "destinationBlock": "11959452", + "destinationGasUsed": "1265746", + "destinationGasPaidWei": "278497029396" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T02:30:26.923Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:11155111:subsequent", + "token": "0x2971824Db68229D087931155C2b8bB820B275809", + "requestedGasLimit": "0", + "chain": "eip155:11155111", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "110013000000", + "poolPcInRequired": "160867989543460" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-21T02:30:29.813Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:11155111", + "stage": "subsequent", + "wallet": "0x74C744022E0C708277b6192de02FB294A05eEdee", + "cea": "0x5946f4371F1bffECbc6B22fac1aFA8A0cbE93ABd", + "hash": "0xe3c84049e011c82353ae8152b8d67e27b4c946945272973f0003da299906a8b1" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T02:31:29.674Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:11155111:subsequent", + "hash": "0xe3c84049e011c82353ae8152b8d67e27b4c946945272973f0003da299906a8b1", + "block": "24471994", + "gasUsed": "377207", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "424357875000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-21T02:31:29.676Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:11155111", + "stage": "subsequent", + "wallet": "0x74C744022E0C708277b6192de02FB294A05eEdee", + "hash": "0xe3c84049e011c82353ae8152b8d67e27b4c946945272973f0003da299906a8b1", + "destinationHash": "0x8b997c34e5a8dd6ea74506d9505e8671d59bab17ce5dbeadb62e631a684877df", + "destinationBlock": "11959459", + "destinationGasUsed": "223683", + "destinationGasPaidWei": "49216075758" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T02:32:26.854Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:84532:first-use", + "token": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "requestedGasLimit": "2000000", + "chain": "eip155:84532", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "13200000000000", + "poolPcInRequired": "591544122865719910" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-21T02:32:30.094Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:84532", + "stage": "first-use", + "wallet": "0x18B1eC7957053FFD831889760ADF5620851052D1", + "cea": "0x16582837cF894d7CF7724a70aaCBd4F3A6d8826e", + "hash": "0xc5a90e64ca3aed1222894031319ea016a87b43bbb91d0f4dfeae7d05d6443ef2" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T02:33:30.038Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:84532:first-use", + "hash": "0xc5a90e64ca3aed1222894031319ea016a87b43bbb91d0f4dfeae7d05d6443ef2", + "block": "24472044", + "gasUsed": "396773", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "446369625000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-21T02:33:30.040Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:84532", + "stage": "first-use", + "wallet": "0x18B1eC7957053FFD831889760ADF5620851052D1", + "hash": "0xc5a90e64ca3aed1222894031319ea016a87b43bbb91d0f4dfeae7d05d6443ef2", + "destinationHash": "0x970e56548c72c35d8063626e84ceaae83bd1844cf2ca90027c0589bb5a86b74f", + "destinationBlock": "48390851", + "destinationGasUsed": "325448", + "destinationGasPaidWei": "2147956800000" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T02:33:34.090Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:84532:subsequent", + "token": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "requestedGasLimit": "0", + "chain": "eip155:84532", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "3300000000000", + "poolPcInRequired": "147885991133196862" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-21T02:33:37.091Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:84532", + "stage": "subsequent", + "wallet": "0x18B1eC7957053FFD831889760ADF5620851052D1", + "cea": "0x16582837cF894d7CF7724a70aaCBd4F3A6d8826e", + "hash": "0xf73e62a5f93c78708637b9d53f13e52d8155817fe2a69eee565e5bc1fa2f8dc9" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T02:34:44.195Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:84532:subsequent", + "hash": "0xf73e62a5f93c78708637b9d53f13e52d8155817fe2a69eee565e5bc1fa2f8dc9", + "block": "24472071", + "gasUsed": "376379", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "423426375000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-21T02:34:44.196Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:84532", + "stage": "subsequent", + "wallet": "0x18B1eC7957053FFD831889760ADF5620851052D1", + "hash": "0xf73e62a5f93c78708637b9d53f13e52d8155817fe2a69eee565e5bc1fa2f8dc9", + "destinationHash": "0x60b0947f30d2ddb8cc5b874adfa1f62fdc9321224fba862249b325b67e8a9abf", + "destinationBlock": "48390888", + "destinationGasUsed": "123187", + "destinationGasPaidWei": "813034200000" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T02:35:31.505Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:421614:first-use", + "token": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "requestedGasLimit": "2000000", + "chain": "eip155:421614", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "44655600000000", + "poolPcInRequired": "1907011850299212513" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-21T02:35:34.795Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:421614", + "stage": "first-use", + "wallet": "0xc056f78CDc6D9d0540055AF7b168342C89cFea7B", + "cea": "0x712FCd604e5329BBA527c2104EfdfE7200028919", + "hash": "0x5a9e17b1e8fc09d443ad27372bb9a04f4a46352a95de86bcecb2ddbbf8abb91d" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T02:36:38.121Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:421614:first-use", + "hash": "0x5a9e17b1e8fc09d443ad27372bb9a04f4a46352a95de86bcecb2ddbbf8abb91d", + "block": "24472119", + "gasUsed": "409838", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "461067750000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-21T02:36:38.122Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:421614", + "stage": "first-use", + "wallet": "0xc056f78CDc6D9d0540055AF7b168342C89cFea7B", + "hash": "0x5a9e17b1e8fc09d443ad27372bb9a04f4a46352a95de86bcecb2ddbbf8abb91d", + "destinationHash": "0x134c264f6f4d6b5177e7c28c50fe830058d018dc94762a306eac7353a66f7f66", + "destinationBlock": "321254949", + "destinationGasUsed": "325436", + "destinationGasPaidWei": "7266269920800" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T02:36:42.093Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:421614:subsequent", + "token": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "requestedGasLimit": "0", + "chain": "eip155:421614", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "11192500000000", + "poolPcInRequired": "477973578898284522" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-21T02:36:45.784Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:421614", + "stage": "subsequent", + "wallet": "0xc056f78CDc6D9d0540055AF7b168342C89cFea7B", + "cea": "0x712FCd604e5329BBA527c2104EfdfE7200028919", + "hash": "0xa45ba64229437f56f9110f9070fa83f0b7de8169263fc8923583928770440838" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T02:37:38.071Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:421614:subsequent", + "hash": "0xa45ba64229437f56f9110f9070fa83f0b7de8169263fc8923583928770440838", + "block": "24472149", + "gasUsed": "390828", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "439681500000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-21T02:37:38.072Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:421614", + "stage": "subsequent", + "wallet": "0xc056f78CDc6D9d0540055AF7b168342C89cFea7B", + "hash": "0xa45ba64229437f56f9110f9070fa83f0b7de8169263fc8923583928770440838", + "destinationHash": "0x9f57377b34beb59e450d7494604dc97f383e12808a71a24e1acf8dc073fb85b0", + "destinationBlock": "321255184", + "destinationGasUsed": "123175", + "destinationGasPaidWei": "2757272375000" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T02:38:31.058Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:97:first-use", + "token": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "requestedGasLimit": "2000000", + "chain": "eip155:97", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "110000000000000", + "poolPcInRequired": "1182694436440979711" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-21T02:38:40.665Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:97", + "stage": "first-use", + "wallet": "0x3aC06E9358d305950cAfac8D8a58B63Af7DD94c7", + "cea": "0xB6493f431b87285Ce3e4Eb9f3D4bBeb49878BFF5", + "hash": "0xad1a169c434f37fae2d283e8963c1cafc35278af0e73eaaaedd6f3dd120c5556" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T02:39:43.347Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:97:first-use", + "hash": "0xad1a169c434f37fae2d283e8963c1cafc35278af0e73eaaaedd6f3dd120c5556", + "block": "24472194", + "gasUsed": "404595", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "455169375000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-21T02:39:43.349Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:97", + "stage": "first-use", + "wallet": "0x3aC06E9358d305950cAfac8D8a58B63Af7DD94c7", + "hash": "0xad1a169c434f37fae2d283e8963c1cafc35278af0e73eaaaedd6f3dd120c5556", + "destinationHash": "0x282e61982fb85d579bdad52bca6553aad5f84e2b1fbef79909fc5f6944b6a052", + "destinationBlock": "137999640", + "destinationGasUsed": "325919", + "destinationGasPaidWei": "17925545000000" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T02:39:48.024Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:97:subsequent", + "token": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "requestedGasLimit": "0", + "chain": "eip155:97", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "55000000000000", + "poolPcInRequired": "591346891813133954" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-21T02:39:51.606Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:97", + "stage": "subsequent", + "wallet": "0x3aC06E9358d305950cAfac8D8a58B63Af7DD94c7", + "cea": "0xB6493f431b87285Ce3e4Eb9f3D4bBeb49878BFF5", + "hash": "0x7acf0085c38efe98990445aeec7b1b7d563fcd4def7d70783038fb7e23dd8164" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T02:40:40.248Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:97:subsequent", + "hash": "0x7acf0085c38efe98990445aeec7b1b7d563fcd4def7d70783038fb7e23dd8164", + "block": "24472225", + "gasUsed": "390915", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "439779375000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-21T02:40:40.251Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:97", + "stage": "subsequent", + "wallet": "0x3aC06E9358d305950cAfac8D8a58B63Af7DD94c7", + "hash": "0x7acf0085c38efe98990445aeec7b1b7d563fcd4def7d70783038fb7e23dd8164", + "destinationHash": "0x3ab1688c3df2a271f796945632fb015f504c59bb821310cea95c0f419d28d470", + "destinationBlock": "137999767", + "destinationGasUsed": "123637", + "destinationGasPaidWei": "13600070000000" + } + ] +} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/live-2026-10-21-results.log b/plan/agw/independent-review-creation-flow-2026-10-20/data/live-2026-10-21-results.log new file mode 100644 index 00000000..4bfe02f6 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/live-2026-10-21-results.log @@ -0,0 +1,16 @@ +2026-10-21T02:23:41Z +│ Push master (Donut) │ PC │ 58.2500 │ 967421.5716 │ ✓ │ +│ Push master (Donut) │ pUSDT.sol │ 0.002500 │ 10006.8109 │ ✓ │ +PASS core-e2e __e2e__/agw/svm-agent-spl.spec.ts (241.627 s) + ✓ 1. exact wallet ATA and amount constraints survive create and two omitted-gas deliveries (237025 ms) +Tests: 1 passed, 1 total +2026-10-21T02:27:58Z +2026-10-21T02:27:58Z +│ Push master (Donut) │ PC │ 132.0000 │ 967380.0700 │ ✓ │ +PASS core-e2e __e2e__/agw/gas-live.spec.ts (752.143 s) + ✓ 1. Sepolia first-use and subsequent execution (200864 ms) + ✓ 2. Base Sepolia first-use and subsequent execution (194183 ms) + ✓ 3. Arbitrum Sepolia first-use and subsequent execution (173553 ms) + ✓ 4. BNB testnet first-use and subsequent execution (182185 ms) +Tests: 4 passed, 4 total +2026-10-21T02:40:43Z diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/live-2026-10-21-routed-presets.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/live-2026-10-21-routed-presets.json new file mode 100644 index 00000000..b1afd664 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/live-2026-10-21-routed-presets.json @@ -0,0 +1,831 @@ +{ + "note": "Routed preset live runs, 21 Oct: LENDING Arbitrum passed; DEXES Sepolia subsequent failed out of gas at the 500k base (trace in sepolia-dex-subsequent-oog-trace.json); re-run with the 1,000,000 multi-step default passed. Public hashes only.", + "entries": [ + { + "name": "unchanged-preset-created", + "at": "2026-10-21T02:49:04.740Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "category": "DEXES", + "chainNamespace": "eip155:11155111", + "wallet": "0x5c788fca118Bf06cDb7AB679fFBbD9007B5375E7", + "hash": "0x17a58f61b934c0eee3ba83120eba9d338c6de5defbe031aff961dfc3d68b71fb", + "rules": [ + { + "chainNamespace": "eip155:11155111", + "allowedCalls": [ + { + "target": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E", + "selector": "exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))", + "pins": [ + { + "arg": [ + 0, + 0 + ], + "expected": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14" + }, + { + "arg": [ + 0, + 1 + ], + "expected": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + }, + { + "arg": [ + 0, + 3 + ], + "expected": "agentic:wallet" + }, + { + "arg": [ + 0, + 4 + ], + "max": "1000000000000000" + } + ], + "app": "Uniswap V3", + "label": "Swap exact input" + }, + { + "target": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E", + "selector": "exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))", + "pins": [ + { + "arg": [ + 0, + 0 + ], + "expected": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14" + }, + { + "arg": [ + 0, + 1 + ], + "expected": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + }, + { + "arg": [ + 0, + 3 + ], + "expected": "agentic:wallet" + }, + { + "arg": [ + 0, + 5 + ], + "max": "1000000000000000" + } + ], + "app": "Uniswap V3", + "label": "Swap exact output" + }, + { + "target": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E", + "selector": "exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))", + "pins": [ + { + "arg": [ + 0, + 0 + ], + "expected": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + }, + { + "arg": [ + 0, + 1 + ], + "expected": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14" + }, + { + "arg": [ + 0, + 3 + ], + "expected": "agentic:wallet" + }, + { + "arg": [ + 0, + 4 + ], + "max": "10000000" + } + ], + "app": "Uniswap V3", + "label": "Swap exact input" + }, + { + "target": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E", + "selector": "exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))", + "pins": [ + { + "arg": [ + 0, + 0 + ], + "expected": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + }, + { + "arg": [ + 0, + 1 + ], + "expected": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14" + }, + { + "arg": [ + 0, + 3 + ], + "expected": "agentic:wallet" + }, + { + "arg": [ + 0, + 5 + ], + "max": "10000000" + } + ], + "app": "Uniswap V3", + "label": "Swap exact output" + }, + { + "target": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "selector": "approve(address,uint256)", + "pins": [ + { + "arg": 0, + "expected": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E" + }, + { + "arg": 1, + "max": "1000000000000000" + } + ], + "app": "Uniswap V3", + "label": "Approve token spending" + }, + { + "target": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "selector": "approve(address,uint256)", + "pins": [ + { + "arg": 0, + "expected": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E" + }, + { + "arg": 1, + "max": "10000000" + } + ], + "app": "Uniswap V3", + "label": "Approve token spending" + } + ], + "agent": "0xAdbc7E575Fba1D03B11E22bE396d06EB873625ab", + "validUntil": 1793155723, + "assets": [ + { + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "maxGasPerCall": "20000000000000000000" + } + ] + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T02:49:27.568Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "DEXES:eip155:11155111:first-use", + "token": "0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E", + "requestedGasLimit": "2000000", + "chain": "eip155:11155111", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "440054000000", + "poolPcInRequired": "643474888519368" + }, + { + "name": "unchanged-preset-submitted", + "at": "2026-10-21T02:49:30.758Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "category": "DEXES", + "chainNamespace": "eip155:11155111", + "stage": "first-use", + "wallet": "0x5c788fca118Bf06cDb7AB679fFBbD9007B5375E7", + "hash": "0x05bb69c5cd001c74e558ba77607c24ec7f80fa2963d9414bf3a48023499a9dbb" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T02:50:33.793Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "first-use", + "hash": "0x05bb69c5cd001c74e558ba77607c24ec7f80fa2963d9414bf3a48023499a9dbb", + "block": "24472461", + "gasUsed": "479802", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "539777250000000" + }, + { + "name": "unchanged-preset-delivered", + "at": "2026-10-21T02:50:33.795Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "category": "DEXES", + "chainNamespace": "eip155:11155111", + "stage": "first-use", + "hash": "0x05bb69c5cd001c74e558ba77607c24ec7f80fa2963d9414bf3a48023499a9dbb", + "destinationHash": "0xa0324bcacb5cc32cba020e10f873c92aee9321d694e4c742ceef74d770debc2c", + "destinationGasUsed": "1502039", + "destinationGasPaidWei": "330489135053" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T02:50:41.106Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "DEXES:eip155:11155111:subsequent", + "token": "0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E", + "requestedGasLimit": "0", + "chain": "eip155:11155111", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "110013000000", + "poolPcInRequired": "160867992121838" + }, + { + "name": "unchanged-preset-submitted", + "at": "2026-10-21T02:50:45.549Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "category": "DEXES", + "chainNamespace": "eip155:11155111", + "stage": "subsequent", + "wallet": "0x5c788fca118Bf06cDb7AB679fFBbD9007B5375E7", + "hash": "0x03ce92d8ae375b221fe157e42be472abc693308dac7b5c2e87fc4c58ea037421" + }, + { + "name": "unchanged-preset-created", + "at": "2026-10-21T02:52:38.840Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "category": "LENDING", + "chainNamespace": "eip155:421614", + "wallet": "0xD60F3aAbA0b86c607a140093E7A7c61668f56773", + "hash": "0xe068ff9d9afe2c3b5a918a03a73be461fe305b7913b50293ff8b3c09bcb255f0", + "rules": [ + { + "chainNamespace": "eip155:421614", + "allowedCalls": [ + { + "target": "0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff", + "selector": "supply(address,uint256,address,uint16)", + "pins": [ + { + "arg": 2, + "expected": "agentic:wallet" + }, + { + "arg": 0, + "expected": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d" + }, + { + "arg": 1, + "max": "10000000" + } + ], + "app": "Aave V3", + "label": "Supply" + }, + { + "target": "0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff", + "selector": "withdraw(address,uint256,address)", + "pins": [ + { + "arg": 2, + "expected": "agentic:wallet" + }, + { + "arg": 0, + "expected": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d" + }, + { + "arg": 1, + "max": "10000000" + } + ], + "app": "Aave V3", + "label": "Withdraw" + }, + { + "target": "0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff", + "selector": "borrow(address,uint256,uint256,uint16,address)", + "pins": [ + { + "arg": 4, + "expected": "agentic:wallet" + }, + { + "arg": 0, + "expected": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d" + }, + { + "arg": 1, + "max": "10000000" + } + ], + "app": "Aave V3", + "label": "Borrow" + }, + { + "target": "0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff", + "selector": "repay(address,uint256,uint256,address)", + "pins": [ + { + "arg": 3, + "expected": "agentic:wallet" + }, + { + "arg": 0, + "expected": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d" + }, + { + "arg": 1, + "max": "10000000" + } + ], + "app": "Aave V3", + "label": "Repay" + }, + { + "target": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "selector": "approve(address,uint256)", + "pins": [ + { + "arg": 0, + "expected": "0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff" + }, + { + "arg": 1, + "max": "10000000" + } + ], + "app": "Aave V3", + "label": "Approve token spending" + } + ], + "agent": "0xb28855f6525E0F01cB018E5802C62cd98A4452fA", + "validUntil": 1793155937, + "assets": [ + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "maxGasPerCall": "20000000000000000000" + } + ] + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T02:53:02.340Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "LENDING:eip155:421614:first-use", + "token": "0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6", + "requestedGasLimit": "2000000", + "chain": "eip155:421614", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "44374000000000", + "poolPcInRequired": "1894989313621377835" + }, + { + "name": "unchanged-preset-submitted", + "at": "2026-10-21T02:53:06.305Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "category": "LENDING", + "chainNamespace": "eip155:421614", + "stage": "first-use", + "wallet": "0xD60F3aAbA0b86c607a140093E7A7c61668f56773", + "hash": "0x0bd3a109e20fd85e54a89b48538a778497ee3664061ef09edb2a66f08faa86f8" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T02:54:06.062Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "first-use", + "hash": "0x0bd3a109e20fd85e54a89b48538a778497ee3664061ef09edb2a66f08faa86f8", + "block": "24472549", + "gasUsed": "464154", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "522173250000000" + }, + { + "name": "unchanged-preset-delivered", + "at": "2026-10-21T02:54:06.064Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "category": "LENDING", + "chainNamespace": "eip155:421614", + "stage": "first-use", + "hash": "0x0bd3a109e20fd85e54a89b48538a778497ee3664061ef09edb2a66f08faa86f8", + "destinationHash": "0x4073d97ada3d7f150c109faca5364aa3be95ca1f082fed0e6db5f3c177f9d32f", + "destinationGasUsed": "536341", + "destinationGasPaidWei": "11899797767000" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T02:54:13.762Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "LENDING:eip155:421614:subsequent", + "token": "0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6", + "requestedGasLimit": "0", + "chain": "eip155:421614", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "11029700000000", + "poolPcInRequired": "471022386761574893" + }, + { + "name": "unchanged-preset-submitted", + "at": "2026-10-21T02:54:23.128Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "category": "LENDING", + "chainNamespace": "eip155:421614", + "stage": "subsequent", + "wallet": "0xD60F3aAbA0b86c607a140093E7A7c61668f56773", + "hash": "0xda9775321a1733b53c794e2da1660a454701d1994ff508d3dfb5a7744bc87f65" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T02:55:11.891Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "subsequent", + "hash": "0xda9775321a1733b53c794e2da1660a454701d1994ff508d3dfb5a7744bc87f65", + "block": "24472578", + "gasUsed": "438634", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "493463250000000" + }, + { + "name": "unchanged-preset-delivered", + "at": "2026-10-21T02:55:11.892Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "category": "LENDING", + "chainNamespace": "eip155:421614", + "stage": "subsequent", + "hash": "0xda9775321a1733b53c794e2da1660a454701d1994ff508d3dfb5a7744bc87f65", + "destinationHash": "0x441bd0069c2b08cf84f5bdbf52c36aa6c9d3f6902bb3910c77953dbd85beb24c", + "destinationGasUsed": "292561", + "destinationGasPaidWei": "6453720123400" + }, + { + "name": "unchanged-preset-created", + "at": "2026-10-21T03:00:20.251Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "category": "DEXES", + "chainNamespace": "eip155:11155111", + "wallet": "0x7369894641360aF9AA464E6E07886eA0a670bdE3", + "hash": "0x41627803cc881cd6bd4f4f38bfa6adb5f5321b3af80dd40e5425ef4b8b1e7c85", + "rules": [ + { + "chainNamespace": "eip155:11155111", + "allowedCalls": [ + { + "target": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E", + "selector": "exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))", + "pins": [ + { + "arg": [ + 0, + 0 + ], + "expected": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14" + }, + { + "arg": [ + 0, + 1 + ], + "expected": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + }, + { + "arg": [ + 0, + 3 + ], + "expected": "agentic:wallet" + }, + { + "arg": [ + 0, + 4 + ], + "max": "1000000000000000" + } + ], + "app": "Uniswap V3", + "label": "Swap exact input" + }, + { + "target": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E", + "selector": "exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))", + "pins": [ + { + "arg": [ + 0, + 0 + ], + "expected": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14" + }, + { + "arg": [ + 0, + 1 + ], + "expected": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + }, + { + "arg": [ + 0, + 3 + ], + "expected": "agentic:wallet" + }, + { + "arg": [ + 0, + 5 + ], + "max": "1000000000000000" + } + ], + "app": "Uniswap V3", + "label": "Swap exact output" + }, + { + "target": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E", + "selector": "exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))", + "pins": [ + { + "arg": [ + 0, + 0 + ], + "expected": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + }, + { + "arg": [ + 0, + 1 + ], + "expected": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14" + }, + { + "arg": [ + 0, + 3 + ], + "expected": "agentic:wallet" + }, + { + "arg": [ + 0, + 4 + ], + "max": "10000000" + } + ], + "app": "Uniswap V3", + "label": "Swap exact input" + }, + { + "target": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E", + "selector": "exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))", + "pins": [ + { + "arg": [ + 0, + 0 + ], + "expected": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + }, + { + "arg": [ + 0, + 1 + ], + "expected": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14" + }, + { + "arg": [ + 0, + 3 + ], + "expected": "agentic:wallet" + }, + { + "arg": [ + 0, + 5 + ], + "max": "10000000" + } + ], + "app": "Uniswap V3", + "label": "Swap exact output" + }, + { + "target": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "selector": "approve(address,uint256)", + "pins": [ + { + "arg": 0, + "expected": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E" + }, + { + "arg": 1, + "max": "1000000000000000" + } + ], + "app": "Uniswap V3", + "label": "Approve token spending" + }, + { + "target": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "selector": "approve(address,uint256)", + "pins": [ + { + "arg": 0, + "expected": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E" + }, + { + "arg": 1, + "max": "10000000" + } + ], + "app": "Uniswap V3", + "label": "Approve token spending" + } + ], + "agent": "0x21659BcC0FfD83aed079db13EBD01C4a90da3a1C", + "validUntil": 1793156397, + "assets": [ + { + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "maxGasPerCall": "20000000000000000000" + } + ] + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T03:00:44.663Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "DEXES:eip155:11155111:first-use", + "token": "0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E", + "requestedGasLimit": "2000000", + "chain": "eip155:11155111", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "440052000000", + "poolPcInRequired": "643471974079470" + }, + { + "name": "unchanged-preset-submitted", + "at": "2026-10-21T03:00:48.504Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "category": "DEXES", + "chainNamespace": "eip155:11155111", + "stage": "first-use", + "wallet": "0x7369894641360aF9AA464E6E07886eA0a670bdE3", + "hash": "0x64d9df75b7d4a8b6169d57629bb10cd48bd9961d7011471ec2eede36f2cd2b6e" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T03:01:48.324Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "first-use", + "hash": "0x64d9df75b7d4a8b6169d57629bb10cd48bd9961d7011471ec2eede36f2cd2b6e", + "block": "24472738", + "gasUsed": "479814", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "539790750000000" + }, + { + "name": "unchanged-preset-delivered", + "at": "2026-10-21T03:01:48.326Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "category": "DEXES", + "chainNamespace": "eip155:11155111", + "stage": "first-use", + "hash": "0x64d9df75b7d4a8b6169d57629bb10cd48bd9961d7011471ec2eede36f2cd2b6e", + "destinationHash": "0xe97ab6a3e658aacd8f61fe72bd6c55241c0195a67e9ab8fca6c091a7c51aaee7", + "destinationGasUsed": "1502063", + "destinationGasPaidWei": "330492913638" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-21T03:02:00.399Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "DEXES:eip155:11155111:subsequent", + "token": "0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E", + "requestedGasLimit": "1000000", + "chain": "eip155:11155111", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "1000000", + "attachedPCWei": "10000000000000000000", + "gasTokenFee": "220027000000", + "poolPcInRequired": "321737452297646" + }, + { + "name": "unchanged-preset-submitted", + "at": "2026-10-21T03:02:05.422Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "category": "DEXES", + "chainNamespace": "eip155:11155111", + "stage": "subsequent", + "wallet": "0x7369894641360aF9AA464E6E07886eA0a670bdE3", + "hash": "0x06bd9dd403535b0e9603e36bedaf4f178bb9b46a2f1c33834b7fc387ae59c97c" + }, + { + "name": "agw-push-gas", + "at": "2026-10-21T03:03:18.212Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "subsequent", + "hash": "0x06bd9dd403535b0e9603e36bedaf4f178bb9b46a2f1c33834b7fc387ae59c97c", + "block": "24472768", + "gasUsed": "457914", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "515153250000000" + }, + { + "name": "unchanged-preset-delivered", + "at": "2026-10-21T03:03:18.215Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "category": "DEXES", + "chainNamespace": "eip155:11155111", + "stage": "subsequent", + "hash": "0x06bd9dd403535b0e9603e36bedaf4f178bb9b46a2f1c33834b7fc387ae59c97c", + "destinationHash": "0x07f46919b08d36aefc2a0ca25c1d7a2fd4573ad1993a1bc98a981774d71fe79a", + "destinationGasUsed": "362079", + "destinationGasPaidWei": "79667156133" + } + ] +} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/old-prc20.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/old-prc20.json new file mode 100644 index 00000000..e76f335a --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/old-prc20.json @@ -0,0 +1,118 @@ +{ + "at": "2026-10-20T16:35:54.980Z", + "block": "24457398", + "tokens": { + "USDC.eth.old": { + "address": "0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E", + "SOURCE_CHAIN_NAMESPACE": "eip155:11155111", + "decimals": "6", + "symbol": "USDC.eth.old", + "name": "USDC.eth.old", + "totalSupply": "1320454406768", + "sourceWord": "0x0000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238", + "outboundQuote": { + "gasToken": "0x2971824Db68229D087931155C2b8bB820B275809", + "gasFee": "550009000000", + "protocolFee": "0", + "chain": "eip155:11155111", + "gasLimitUsed": "500000" + } + }, + "USDC.base.old": { + "address": "0x84B62e44F667F692F7739Ca6040cD17DA02068A8", + "SOURCE_CHAIN_NAMESPACE": "eip155:84532", + "decimals": "6", + "symbol": "USDC.base.old", + "name": "USDC.base.old", + "totalSupply": "1201126991000", + "sourceString": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "outboundQuote": { + "gasToken": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "gasFee": "3300000000000", + "protocolFee": "0", + "chain": "eip155:84532", + "gasLimitUsed": "500000" + } + }, + "USDC.arb.old": { + "address": "0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6", + "SOURCE_CHAIN_NAMESPACE": "eip155:421614", + "decimals": "6", + "symbol": "USDC.arb.old", + "name": "USDC.arb.old", + "totalSupply": "1200157300000", + "sourceString": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "outboundQuote": { + "gasToken": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "gasFee": "11025300000000", + "protocolFee": "0", + "chain": "eip155:421614", + "gasLimitUsed": "500000" + } + }, + "USDT.eth.old": { + "address": "0xCA0C5E6F002A389E1580F0DB7cd06e4549B5F9d3", + "SOURCE_CHAIN_NAMESPACE": "eip155:11155111", + "decimals": "6", + "symbol": "USDT.eth", + "name": "USDT.eth", + "totalSupply": "11788104181748262940", + "sourceWord": "0x0000000000000000000000007169d38820dfd117c3fa1f22a697dba58d90ba06", + "outboundQuote": { + "gasToken": "0x2971824Db68229D087931155C2b8bB820B275809", + "gasFee": "550009000000", + "protocolFee": "0", + "chain": "eip155:11155111", + "gasLimitUsed": "500000" + } + }, + "USDT.arb.old": { + "address": "0x76Ad08339dF606BeEDe06f90e3FaF82c5b2fb2E9", + "SOURCE_CHAIN_NAMESPACE": "eip155:421614", + "decimals": "6", + "symbol": "USDT.arb", + "name": "USDT.arb", + "totalSupply": "1299969202105", + "sourceString": "0x1419d7C74D234fA6B73E06A2ce7822C1d37922f0", + "outboundQuote": { + "gasToken": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "gasFee": "11025300000000", + "protocolFee": "0", + "chain": "eip155:421614", + "gasLimitUsed": "500000" + } + }, + "USDT.base.old": { + "address": "0x2C455189D2af6643B924A981a9080CcC63d5a567", + "SOURCE_CHAIN_NAMESPACE": "eip155:84532", + "decimals": "6", + "symbol": "USDT.base", + "name": "USDT.base", + "totalSupply": "1200000000003199951237442", + "sourceString": "0x9FF5a186f53F6E6964B00320Da1D2024DE11E0cB", + "outboundQuote": { + "gasToken": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "gasFee": "3300000000000", + "protocolFee": "0", + "chain": "eip155:84532", + "gasLimitUsed": "500000" + } + }, + "USDT.bsc.old": { + "address": "0x2f98B4235FD2BA0173a2B056D722879360B12E7b", + "SOURCE_CHAIN_NAMESPACE": "eip155:97", + "decimals": "6", + "symbol": "USDT.bsc", + "name": "USDT.bsc", + "totalSupply": "1999997960033", + "sourceString": "0xBC14F348BC9667be46b35Edc9B68653d86013DC5", + "outboundQuote": { + "gasToken": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "gasFee": "27500000000000", + "protocolFee": "0", + "chain": "eip155:97", + "gasLimitUsed": "500000" + } + } + } +} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/post-change-compatibility.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/post-change-compatibility.json new file mode 100644 index 00000000..177fbd56 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/post-change-compatibility.json @@ -0,0 +1,1094 @@ +{ + "at": "2026-10-20T17:39:03.799Z", + "readOnly": true, + "chains": [ + { + "chain": "eip155:11155111", + "candidates": [ + { + "token": "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876", + "symbol": "USDT", + "prc20": "0x0f97A213207703923F5f0C613C9827f7C9A0f96B", + "identityVerified": true + }, + { + "token": "0x97F477B7f970D47a87B42869ceeace218106152a", + "symbol": "USDC", + "prc20": "0x7A58048036206bB898008b5bBDA85697DB1e5d66", + "identityVerified": true + }, + { + "token": "0xfff9976782d46cc05630d1f6ebab18b2324d6b14", + "symbol": "WETH", + "prc20": "0x0d0dF7E8807430A81104EA84d926139816eC7586", + "identityVerified": true + }, + { + "token": "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af", + "symbol": "stETH", + "prc20": "0xaf89E805949c628ebde3262e91dc4ab9eA12668E", + "identityVerified": true + }, + { + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "symbol": "USDC", + "prc20": "0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E", + "identityVerified": true + } + ], + "protocols": [ + { + "app": "Uniswap V3", + "kind": "dex", + "router": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E", + "pairs": [ + { + "tokens": [ + "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876", + "0x97F477B7f970D47a87B42869ceeace218106152a" + ], + "pools": [] + }, + { + "tokens": [ + "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876", + "0xfff9976782d46cc05630d1f6ebab18b2324d6b14" + ], + "pools": [] + }, + { + "tokens": [ + "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876", + "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af" + ], + "pools": [] + }, + { + "tokens": [ + "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876", + "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + ], + "pools": [] + }, + { + "tokens": [ + "0x97F477B7f970D47a87B42869ceeace218106152a", + "0xfff9976782d46cc05630d1f6ebab18b2324d6b14" + ], + "pools": [] + }, + { + "tokens": [ + "0x97F477B7f970D47a87B42869ceeace218106152a", + "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af" + ], + "pools": [] + }, + { + "tokens": [ + "0x97F477B7f970D47a87B42869ceeace218106152a", + "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + ], + "pools": [] + }, + { + "tokens": [ + "0xfff9976782d46cc05630d1f6ebab18b2324d6b14", + "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af" + ], + "pools": [] + }, + { + "tokens": [ + "0xfff9976782d46cc05630d1f6ebab18b2324d6b14", + "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + ], + "pools": [ + { + "fee": 100, + "pool": "0xFeEd501c2B21D315F04946F85fC6416B640240b5", + "liquidity": "621313943474064" + }, + { + "fee": 500, + "pool": "0x3289680dD4d6C10bb19b899729cda5eEF58AEfF1", + "liquidity": "13025255931102115" + }, + { + "fee": 3000, + "pool": "0x6Ce0896eAE6D4BD668fDe41BB784548fb8F59b50", + "liquidity": "8791221715427077" + }, + { + "fee": 10000, + "pool": "0x6418EEC70f50913ff0d756B48d32Ce7C02b47C47", + "liquidity": "107641416313884184" + } + ] + }, + { + "tokens": [ + "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af", + "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + ], + "pools": [] + } + ], + "factory": "0x0227628f3F023bb0B980b67D528571c95c6DaC1c", + "defaultPair": { + "tokens": [ + "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + ], + "routed": [ + true, + true + ], + "pools": [ + { + "fee": 100, + "pool": "0xFeEd501c2B21D315F04946F85fC6416B640240b5", + "liquidity": "621313943474064" + }, + { + "fee": 500, + "pool": "0x3289680dD4d6C10bb19b899729cda5eEF58AEfF1", + "liquidity": "13025255931102115" + }, + { + "fee": 3000, + "pool": "0x6Ce0896eAE6D4BD668fDe41BB784548fb8F59b50", + "liquidity": "8791221715427077" + }, + { + "fee": 10000, + "pool": "0x6418EEC70f50913ff0d756B48d32Ce7C02b47C47", + "liquidity": "107641416313884184" + } + ] + } + }, + { + "app": "Aave V3", + "kind": "lending", + "pool": "0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951", + "reserves": [ + "0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357", + "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8", + "0x29f2D40B0605204364af54EC677bD022dA425d03", + "0xC558DBdd856501FCd9aaF1E62eae57A9F0629a3c", + "0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0", + "0x88541670E55cC00bEEFD87eB59EDd1b7C511AC9a", + "0x6d906e526a4e2Ca02097BA9d0caA3c382F52278E", + "0xc4bF5CbDaBE595361438F8c6a187bDc330539c60" + ], + "routedReserves": [] + }, + { + "app": "EigenLayer", + "kind": "strategy", + "strategy": "0x424246eF71b01ee33aA33aC590fd9a0855F5eFbc", + "underlying": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "routed": false + } + ], + "presets": [ + { + "category": "DEXES", + "readiness": { + "ready": true, + "chains": [ + { + "chainNamespace": "eip155:11155111", + "ready": true, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "prc20": "0x0d0dF7E8807430A81104EA84d926139816eC7586", + "status": "registered" + }, + { + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "prc20": "0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E", + "status": "registered" + } + ], + "issues": [], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ] + }, + { + "category": "LENDING", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:11155111", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "maxPerCall": "1000000000000000000", + "maxTotal": "10000000000000000000" + } + ], + "bridgeAssets": [ + { + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "message": "No SDK PRC20 mapping for eip155:11155111:0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357", + "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8", + "0x29f2D40B0605204364af54EC677bD022dA425d03", + "0xC558DBdd856501FCd9aaF1E62eae57A9F0629a3c", + "0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0", + "0x88541670E55cC00bEEFD87eB59EDd1b7C511AC9a", + "0x6d906e526a4e2Ca02097BA9d0caA3c382F52278E", + "0xc4bF5CbDaBE595361438F8c6a187bDc330539c60" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "maxPerCall": "1000000000000000000", + "maxTotal": "10000000000000000000" + } + ] + }, + { + "category": "STAKING", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:11155111", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + } + ], + "bridgeAssets": [ + { + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "message": "No SDK PRC20 mapping for eip155:11155111:0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + } + ] + } + ], + "block": "11956837" + }, + { + "chain": "eip155:84532", + "candidates": [ + { + "token": "0x4D7646B9eE3D68F4b0F135B5cbc66B00819F6b61", + "symbol": "USDT", + "prc20": "0x148823809B853e1db187BC09A9ac909BC42F971a", + "identityVerified": true + }, + { + "token": "0x5c3504F0E3bA28FDc1F74234fE936518276AaBB8", + "symbol": "USDC", + "prc20": "0xD7C6cA1e2c0CE260BE0c0AD39C1540de460e3Be1", + "identityVerified": true + }, + { + "token": "0x4200000000000000000000000000000000000006", + "symbol": "WETH", + "unavailable": "Unsupported WETH origin chain for synthetic mapping" + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "symbol": "USDC", + "prc20": "0x84B62e44F667F692F7739Ca6040cD17DA02068A8", + "identityVerified": true + } + ], + "protocols": [ + { + "app": "Uniswap V3", + "kind": "dex", + "router": "0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4", + "pairs": [ + { + "tokens": [ + "0x4D7646B9eE3D68F4b0F135B5cbc66B00819F6b61", + "0x5c3504F0E3bA28FDc1F74234fE936518276AaBB8" + ], + "pools": [] + }, + { + "tokens": [ + "0x4D7646B9eE3D68F4b0F135B5cbc66B00819F6b61", + "0x036CbD53842c5426634e7929541eC2318f3dCF7e" + ], + "pools": [] + }, + { + "tokens": [ + "0x5c3504F0E3bA28FDc1F74234fE936518276AaBB8", + "0x036CbD53842c5426634e7929541eC2318f3dCF7e" + ], + "pools": [] + } + ], + "factory": "0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24", + "defaultPair": { + "tokens": [ + "0x4200000000000000000000000000000000000006", + "0x036CbD53842c5426634e7929541eC2318f3dCF7e" + ], + "routed": [ + false, + true + ], + "pools": [ + { + "fee": 100, + "pool": "0x57183717A087d2fe3Ad890873877244c3B96156c", + "liquidity": "2890001491047" + }, + { + "fee": 500, + "pool": "0x94bfc0574FF48E92cE43d495376C477B1d0EEeC0", + "liquidity": "448098251397" + }, + { + "fee": 3000, + "pool": "0x46880b404CD35c165EDdefF7421019F8dD25F4Ad", + "liquidity": "541083441415564" + }, + { + "fee": 10000, + "pool": "0x4664755562152EDDa3a3073850FB62835451926a", + "liquidity": "57734017049" + } + ] + } + }, + { + "app": "Aave V3", + "kind": "lending", + "pool": "0x8bAB6d1b75f19e9eD9fCe8b9BD338844fF79aE27", + "reserves": [ + "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f", + "0x0a215D8ba66387DCA84B284D18c3B4ec3de6E54a", + "0x54114591963CF60EF3aA63bEfD6eC263D98145a4", + "0x4200000000000000000000000000000000000006", + "0xD171b9694f7A2597Ed006D41f7509aaD4B485c4B", + "0x810D46F9a9027E28F9B01F75E2bdde839dA61115" + ], + "routedReserves": [] + }, + { + "app": "Moonwell mUSDbC", + "kind": "market", + "market": "0x876852425331a113d8E432eFFB3aC5BEf38f033a", + "underlying": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "routed": false + }, + { + "app": "Moonwell mWETH", + "kind": "market", + "market": "0x2F39a349A79492a70E152760ce7123A1933eCf28", + "underlying": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "routed": false + } + ], + "presets": [ + { + "category": "DEXES", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:84532", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0x4200000000000000000000000000000000000006", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0x4200000000000000000000000000000000000006", + "status": "unavailable" + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "prc20": "0x84B62e44F667F692F7739Ca6040cD17DA02068A8", + "status": "registered" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x4200000000000000000000000000000000000006", + "message": "No SDK PRC20 mapping for eip155:84532:0x4200000000000000000000000000000000000006 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0x4200000000000000000000000000000000000006", + "0x036CbD53842c5426634e7929541eC2318f3dCF7e" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0x4200000000000000000000000000000000000006", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ] + }, + { + "category": "LENDING", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:84532", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "maxPerCall": "1000000000000000000", + "maxTotal": "10000000000000000000" + }, + { + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "maxPerCall": "10000000", + "maxTotal": "100000000" + }, + { + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + } + ], + "bridgeAssets": [ + { + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "status": "unavailable" + }, + { + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "status": "unavailable" + }, + { + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "message": "No SDK PRC20 mapping for eip155:84532:0x810D46F9a9027E28F9B01F75E2bdde839dA61115 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "message": "No SDK PRC20 mapping for eip155:84532:0x4616975f7E6045FD9737e95bC527e9e14c727BD2 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "message": "No SDK PRC20 mapping for eip155:84532:0x663A6F02d547dFd639BF689FED298712f2FB69Fb on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [ + { + "target": "0x876852425331a113d8E432eFFB3aC5BEf38f033a", + "selector": "redeem(uint256)", + "app": "Moonwell mUSDbC", + "reason": "SHARE_AMOUNT", + "alternative": "redeemUnderlying(uint256)" + }, + { + "target": "0x2F39a349A79492a70E152760ce7123A1933eCf28", + "selector": "redeem(uint256)", + "app": "Moonwell mWETH", + "reason": "SHARE_AMOUNT", + "alternative": "redeemUnderlying(uint256)" + } + ], + "knownTokens": [ + "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f", + "0x0a215D8ba66387DCA84B284D18c3B4ec3de6E54a", + "0x54114591963CF60EF3aA63bEfD6eC263D98145a4", + "0x4200000000000000000000000000000000000006", + "0xD171b9694f7A2597Ed006D41f7509aaD4B485c4B", + "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "0x663A6F02d547dFd639BF689FED298712f2FB69Fb" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "maxPerCall": "1000000000000000000", + "maxTotal": "10000000000000000000" + }, + { + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "maxPerCall": "10000000", + "maxTotal": "100000000" + }, + { + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + } + ] + } + ], + "block": "48374837" + }, + { + "chain": "eip155:421614", + "candidates": [ + { + "token": "0xE30928528f52CAEeB75fB07837e22d77D47e9c07", + "symbol": "USDT", + "prc20": "0xFE6E9DF2BbC9ce05D98b83B1365df6DcA9951891", + "identityVerified": true + }, + { + "token": "0x5dd39b0b3610F666F631a6506b7713EF83e1Ac5C", + "symbol": "USDC", + "prc20": "0x1091cCBA2FF8d2A131AE4B35e34cf3308C48572C", + "identityVerified": true + }, + { + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "symbol": "WETH", + "unavailable": "Unsupported WETH origin chain for synthetic mapping" + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "symbol": "USDC", + "prc20": "0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6", + "identityVerified": true + } + ], + "protocols": [ + { + "app": "Uniswap V3", + "kind": "dex", + "router": "0x101F443B4d1b059569D643917553c771E1b9663E", + "pairs": [ + { + "tokens": [ + "0xE30928528f52CAEeB75fB07837e22d77D47e9c07", + "0x5dd39b0b3610F666F631a6506b7713EF83e1Ac5C" + ], + "pools": [] + }, + { + "tokens": [ + "0xE30928528f52CAEeB75fB07837e22d77D47e9c07", + "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d" + ], + "pools": [] + }, + { + "tokens": [ + "0x5dd39b0b3610F666F631a6506b7713EF83e1Ac5C", + "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d" + ], + "pools": [] + } + ], + "factory": "0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e", + "defaultPair": { + "tokens": [ + "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d" + ], + "routed": [ + false, + true + ], + "pools": [ + { + "fee": 100, + "pool": "0x152c469626C706E201721F13eb470691E4E81c5D", + "liquidity": "0" + }, + { + "fee": 500, + "pool": "0x6F112d524DC998381C09b4e53C7e5e2cc260f877", + "liquidity": "122" + }, + { + "fee": 3000, + "pool": "0x66EEAB70aC52459Dd74C6AD50D578Ef76a441bbf", + "liquidity": "10070937193695" + }, + { + "fee": 10000, + "pool": "0x3eCedaB7E9479E29B694d8590dc34e0Ce6059868", + "liquidity": "3225673603183" + } + ] + } + }, + { + "app": "Aave V3", + "kind": "lending", + "pool": "0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff", + "reserves": [ + "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "0x1dF462e2712496373A347f8ad10802a5E95f053D" + ], + "routedReserves": [ + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "symbol": "USDC", + "prc20": "0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6", + "identityVerified": true + } + ] + } + ], + "presets": [ + { + "category": "DEXES", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:421614", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "status": "unavailable" + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "prc20": "0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6", + "status": "registered" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "message": "No SDK PRC20 mapping for eip155:421614:0x980B62Da83eFf3D4576C647993b0c1D7faf17c73 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ] + }, + { + "category": "LENDING", + "readiness": { + "ready": true, + "chains": [ + { + "chainNamespace": "eip155:421614", + "ready": true, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "prc20": "0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6", + "status": "registered" + } + ], + "issues": [], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "0x1dF462e2712496373A347f8ad10802a5E95f053D" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ] + } + ], + "block": "321130556" + }, + { + "chain": "eip155:97", + "candidates": [ + { + "token": "0xE935d9c9C24D02E61186c640cc01d713C876d40F", + "symbol": "USDT", + "prc20": "0x731aF1Da5365259d27528557EE4aFBA4baC90ef2", + "identityVerified": true + }, + { + "token": "0xA8802F96cAd0d45343d9bc660B6f7d80050A660b", + "symbol": "USDC", + "prc20": "0x120EBf25Dad7D6a09Ad2316f23f9Be95DBb90639", + "identityVerified": true + } + ], + "protocols": [ + { + "app": "PancakeSwap V3", + "kind": "dex", + "router": "0x9a489505a00cE272eAa5e07Dba6491314CaE3796", + "pairs": [ + { + "tokens": [ + "0xE935d9c9C24D02E61186c640cc01d713C876d40F", + "0xA8802F96cAd0d45343d9bc660B6f7d80050A660b" + ], + "pools": [] + } + ], + "factory": "0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865", + "defaultPair": { + "tokens": [ + "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c" + ], + "routed": [ + false, + false + ], + "pools": [ + { + "fee": 100, + "pool": "0xCed0844e421F856D2de472F9e7037f873987887C", + "liquidity": "229529662705916" + }, + { + "fee": 500, + "pool": "0xc2F0629Dd29AB0EcfF7476560bc8FD5c0c4D19Cd", + "liquidity": "0" + }, + { + "fee": 2500, + "pool": "0x917aB0c0f32452e1403eBD68B222C0B59bAaa2C3", + "liquidity": "0" + }, + { + "fee": 10000, + "pool": "0xa5316a3418e0643BB977A97689E584a3b6c35080", + "liquidity": "0" + } + ] + } + }, + { + "app": "Venus vUSDT", + "kind": "market", + "market": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A", + "underlying": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "routed": false + }, + { + "app": "Venus vUSDC", + "kind": "market", + "market": "0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7", + "underlying": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "routed": false + } + ], + "presets": [ + { + "category": "DEXES", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:97", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "maxPerCall": "10000000000000000", + "maxTotal": "100000000000000000" + }, + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "status": "unavailable" + }, + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "message": "No SDK PRC20 mapping for eip155:97:0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "message": "No SDK PRC20 mapping for eip155:97:0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "maxPerCall": "10000000000000000", + "maxTotal": "100000000000000000" + }, + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ] + }, + { + "category": "LENDING", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:97", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "maxPerCall": "10000000", + "maxTotal": "100000000" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "status": "unavailable" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "message": "No SDK PRC20 mapping for eip155:97:0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "message": "No SDK PRC20 mapping for eip155:97:0x16227D60f7a0e586C66B005219dfc887D13C9531 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [ + { + "target": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A", + "selector": "redeem(uint256)", + "app": "Venus vUSDT", + "reason": "SHARE_AMOUNT", + "alternative": "redeemUnderlying(uint256)" + }, + { + "target": "0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7", + "selector": "redeem(uint256)", + "app": "Venus vUSDC", + "reason": "SHARE_AMOUNT", + "alternative": "redeemUnderlying(uint256)" + } + ], + "knownTokens": [ + "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "0x16227D60f7a0e586C66B005219dfc887D13C9531" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "maxPerCall": "10000000", + "maxTotal": "100000000" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ] + } + ], + "block": "137927715" + } + ], + "pushBlock": "24458953" +} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/post-change-gas-quotes.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/post-change-gas-quotes.json new file mode 100644 index 00000000..7f60e420 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/post-change-gas-quotes.json @@ -0,0 +1,286 @@ +{ + "at": "2026-10-20T17:37:26.676Z", + "readOnly": true, + "network": "TESTNET_DONUT", + "note": "Current quotes only; first-use and subsequent labels describe gas-limit inputs, not executed transactions.", + "origins": [ + { + "signerOrigin": "eip155:42101", + "pushBlockBefore": "24458913", + "cases": [ + { + "chain": "eip155:11155111", + "stage": "default-new-account", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "2000000", + "gasFee": "2200036000000", + "poolPcIn": "3218360887313289", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "eip155:11155111", + "stage": "route-default-zero-input", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "500000", + "gasFee": "550009000000", + "poolPcIn": "804590193808946", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "eip155:84532", + "stage": "default-new-account", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "2000000", + "gasFee": "13200000000000", + "poolPcIn": "591543988922286942", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "eip155:84532", + "stage": "route-default-zero-input", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "500000", + "gasFee": "3300000000000", + "poolPcIn": "147885927165951477", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "eip155:421614", + "stage": "default-new-account", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "2000000", + "gasFee": "44180400000000", + "poolPcIn": "1886829389526846363", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "eip155:421614", + "stage": "route-default-zero-input", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "500000", + "gasFee": "11045100000000", + "poolPcIn": "471706048271902683", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "eip155:97", + "stage": "default-new-account", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "2000000", + "gasFee": "220000000000000", + "poolPcIn": "2365226106240649448", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "eip155:97", + "stage": "route-default-zero-input", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "500000", + "gasFee": "55000000000000", + "poolPcIn": "591303700728691582", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "stage": "legacy-million-unit-fallback", + "inputGasLimit": "1000000", + "protocolFee": "0", + "nativeValueForGas": "1086925525682799370979", + "gasLimitUsed": "1000000", + "gasFee": "1000000000", + "poolPcIn": "905771271402332809149", + "attachedPCWei": "1086925525682799370979", + "fits20PCCeiling": false + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "stage": "sdk-default-route-sizing", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "1052", + "gasFee": "1052000", + "poolPcIn": "952854694072291801", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "stage": "spl-first-use-route-sizing", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "2285", + "gasFee": "2285000", + "poolPcIn": "2069651162555018878", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + } + ], + "pushBlockAfter": "24458922" + }, + { + "signerOrigin": "eip155:11155111", + "pushBlockBefore": "24458922", + "cases": [ + { + "chain": "eip155:11155111", + "stage": "default-new-account", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "4298634753602255924", + "gasLimitUsed": "2000000", + "gasFee": "2200036000000", + "poolPcIn": "3218360887313289", + "attachedPCWei": "4298634753602255924", + "fits20PCCeiling": true + }, + { + "chain": "eip155:11155111", + "stage": "route-default-zero-input", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "4298634753602255924", + "gasLimitUsed": "500000", + "gasFee": "550009000000", + "poolPcIn": "804590193808946", + "attachedPCWei": "4298634753602255924", + "fits20PCCeiling": true + }, + { + "chain": "eip155:84532", + "stage": "default-new-account", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "4298634753602255924", + "gasLimitUsed": "2000000", + "gasFee": "13200000000000", + "poolPcIn": "591543988922286942", + "attachedPCWei": "4298634753602255924", + "fits20PCCeiling": true + }, + { + "chain": "eip155:84532", + "stage": "route-default-zero-input", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "4298634753602255924", + "gasLimitUsed": "500000", + "gasFee": "3300000000000", + "poolPcIn": "147885927165951477", + "attachedPCWei": "4298634753602255924", + "fits20PCCeiling": true + }, + { + "chain": "eip155:421614", + "stage": "default-new-account", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "4298634753602255924", + "gasLimitUsed": "2000000", + "gasFee": "44030800000000", + "poolPcIn": "1880440341223012638", + "attachedPCWei": "4298634753602255924", + "fits20PCCeiling": true + }, + { + "chain": "eip155:421614", + "stage": "route-default-zero-input", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "4298634753602255924", + "gasLimitUsed": "500000", + "gasFee": "11007700000000", + "poolPcIn": "470108794978944401", + "attachedPCWei": "4298634753602255924", + "fits20PCCeiling": true + }, + { + "chain": "eip155:97", + "stage": "default-new-account", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "4298634753602255924", + "gasLimitUsed": "2000000", + "gasFee": "110000000000000", + "poolPcIn": "1182609285339028323", + "attachedPCWei": "4298634753602255924", + "fits20PCCeiling": true + }, + { + "chain": "eip155:97", + "stage": "route-default-zero-input", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "4298634753602255924", + "gasLimitUsed": "500000", + "gasFee": "27500000000000", + "poolPcIn": "295651614879702834", + "attachedPCWei": "4298634753602255924", + "fits20PCCeiling": true + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "stage": "legacy-million-unit-fallback", + "inputGasLimit": "1000000", + "protocolFee": "0", + "nativeValueForGas": "1086925525682799370979", + "gasLimitUsed": "1000000", + "gasFee": "1000000000", + "poolPcIn": "905771271402332809149", + "attachedPCWei": "1086925525682799370979", + "fits20PCCeiling": false + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "stage": "sdk-default-route-sizing", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "4298634753602255924", + "gasLimitUsed": "1052", + "gasFee": "1052000", + "poolPcIn": "952854694072291801", + "attachedPCWei": "4298634753602255924", + "fits20PCCeiling": true + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "stage": "spl-first-use-route-sizing", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "4298634753602255924", + "gasLimitUsed": "2285", + "gasFee": "2285000", + "poolPcIn": "2069651162555018878", + "attachedPCWei": "4298634753602255924", + "fits20PCCeiling": true + } + ], + "pushBlockAfter": "24458952" + } + ] +} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/post-change-route-registry.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/post-change-route-registry.json new file mode 100644 index 00000000..85b65611 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/post-change-route-registry.json @@ -0,0 +1,311 @@ +{ + "at": "2026-10-20T17:39:03.493Z", + "readOnly": true, + "rpc": "https://donut.rpc.push.org:443", + "node": "v0.0.49", + "height": "24458953", + "matched": [ + { + "chain": "eip155:11155111", + "address": "0x0000000000000000000000000000000000000000", + "symbol": "pETH", + "decimals": 18, + "nodePrc20": "0x2971824Db68229D087931155C2b8bB820B275809", + "sdkPrc20": "0x2971824Db68229D087931155C2b8bB820B275809" + }, + { + "chain": "eip155:11155111", + "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "symbol": "USDC.eth.old", + "decimals": 6, + "nodePrc20": "0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E", + "sdkPrc20": "0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E" + }, + { + "chain": "eip155:11155111", + "address": "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af", + "symbol": "stETH.eth", + "decimals": 18, + "nodePrc20": "0xaf89E805949c628ebde3262e91dc4ab9eA12668E", + "sdkPrc20": "0xaf89E805949c628ebde3262e91dc4ab9eA12668E" + }, + { + "chain": "eip155:11155111", + "address": "0x97F477B7f970D47a87B42869ceeace218106152a", + "symbol": "USDC.eth", + "decimals": 6, + "nodePrc20": "0x7A58048036206bB898008b5bBDA85697DB1e5d66", + "sdkPrc20": "0x7A58048036206bB898008b5bBDA85697DB1e5d66" + }, + { + "chain": "eip155:11155111", + "address": "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876", + "symbol": "USDT.eth", + "decimals": 6, + "nodePrc20": "0x0f97A213207703923F5f0C613C9827f7C9A0f96B", + "sdkPrc20": "0x0f97A213207703923F5f0C613C9827f7C9A0f96B" + }, + { + "chain": "eip155:11155111", + "address": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "symbol": "WETH.eth", + "decimals": 18, + "nodePrc20": "0x0d0dF7E8807430A81104EA84d926139816eC7586", + "sdkPrc20": "0x0d0dF7E8807430A81104EA84d926139816eC7586" + }, + { + "chain": "eip155:421614", + "address": "0x0000000000000000000000000000000000000000", + "symbol": "pETH.arb", + "decimals": 18, + "nodePrc20": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "sdkPrc20": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e" + }, + { + "chain": "eip155:421614", + "address": "0x5dd39b0b3610F666F631a6506b7713EF83e1Ac5C", + "symbol": "USDC.arb", + "decimals": 6, + "nodePrc20": "0x1091cCBA2FF8d2A131AE4B35e34cf3308C48572C", + "sdkPrc20": "0x1091cCBA2FF8d2A131AE4B35e34cf3308C48572C" + }, + { + "chain": "eip155:421614", + "address": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "symbol": "USDC.arb.old", + "decimals": 6, + "nodePrc20": "0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6", + "sdkPrc20": "0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6" + }, + { + "chain": "eip155:421614", + "address": "0xE30928528f52CAEeB75fB07837e22d77D47e9c07", + "symbol": "USDT.arb", + "decimals": 6, + "nodePrc20": "0xFE6E9DF2BbC9ce05D98b83B1365df6DcA9951891", + "sdkPrc20": "0xFE6E9DF2BbC9ce05D98b83B1365df6DcA9951891" + }, + { + "chain": "eip155:84532", + "address": "0x0000000000000000000000000000000000000000", + "symbol": "pETH.base", + "decimals": 18, + "nodePrc20": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "sdkPrc20": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21" + }, + { + "chain": "eip155:84532", + "address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "symbol": "USDC.base.old", + "decimals": 6, + "nodePrc20": "0x84B62e44F667F692F7739Ca6040cD17DA02068A8", + "sdkPrc20": "0x84B62e44F667F692F7739Ca6040cD17DA02068A8" + }, + { + "chain": "eip155:84532", + "address": "0x4D7646B9eE3D68F4b0F135B5cbc66B00819F6b61", + "symbol": "USDT.base", + "decimals": 6, + "nodePrc20": "0x148823809B853e1db187BC09A9ac909BC42F971a", + "sdkPrc20": "0x148823809B853e1db187BC09A9ac909BC42F971a" + }, + { + "chain": "eip155:84532", + "address": "0x5c3504F0E3bA28FDc1F74234fE936518276AaBB8", + "symbol": "USDC.base", + "decimals": 6, + "nodePrc20": "0xD7C6cA1e2c0CE260BE0c0AD39C1540de460e3Be1", + "sdkPrc20": "0xD7C6cA1e2c0CE260BE0c0AD39C1540de460e3Be1" + }, + { + "chain": "eip155:97", + "address": "0x0000000000000000000000000000000000000000", + "symbol": "pBNB", + "decimals": 18, + "nodePrc20": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "sdkPrc20": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36" + }, + { + "chain": "eip155:97", + "address": "0xA8802F96cAd0d45343d9bc660B6f7d80050A660b", + "symbol": "USDC.bsc", + "decimals": 6, + "nodePrc20": "0x120EBf25Dad7D6a09Ad2316f23f9Be95DBb90639", + "sdkPrc20": "0x120EBf25Dad7D6a09Ad2316f23f9Be95DBb90639" + }, + { + "chain": "eip155:97", + "address": "0xE935d9c9C24D02E61186c640cc01d713C876d40F", + "symbol": "USDT.bsc", + "decimals": 6, + "nodePrc20": "0x731aF1Da5365259d27528557EE4aFBA4baC90ef2", + "sdkPrc20": "0x731aF1Da5365259d27528557EE4aFBA4baC90ef2" + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "address": "11111111111111111111111111111111", + "symbol": "pSOL", + "decimals": 9, + "nodePrc20": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "sdkPrc20": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed" + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "address": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU", + "symbol": "USDC.sol", + "decimals": 6, + "nodePrc20": "0x04B8F634ABC7C879763F623e0f0550a4b5c4426F", + "sdkPrc20": "0x04B8F634ABC7C879763F623e0f0550a4b5c4426F" + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "address": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "symbol": "USDT.sol", + "decimals": 6, + "nodePrc20": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34", + "sdkPrc20": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34" + } + ], + "mismatch": [], + "nodeOnly": [ + { + "chain": "eip155:11155111", + "address": "0x7169D38820dfd117C3FA1f22a697dBA58d90BA06", + "symbol": "USDT.eth.old", + "decimals": 6, + "nodePrc20": "0xCA0C5E6F002A389E1580F0DB7cd06e4549B5F9d3", + "sdk": "Unable to infer origin chain or token symbol for token" + }, + { + "chain": "eip155:421614", + "address": "0x1419d7C74D234fA6B73E06A2ce7822C1d37922f0", + "symbol": "USDT.arb.old", + "decimals": 6, + "nodePrc20": "0x76Ad08339dF606BeEDe06f90e3FaF82c5b2fb2E9", + "sdk": "Unable to infer origin chain or token symbol for token" + }, + { + "chain": "eip155:84532", + "address": "0x9FF5a186f53F6E6964B00320Da1D2024DE11E0cB", + "symbol": "USDT.base.old", + "decimals": 6, + "nodePrc20": "0x2C455189D2af6643B924A981a9080CcC63d5a567", + "sdk": "Unable to infer origin chain or token symbol for token" + }, + { + "chain": "eip155:97", + "address": "0xBC14F348BC9667be46b35Edc9B68653d86013DC5", + "symbol": "USDT.bsc.old", + "decimals": 6, + "nodePrc20": "0x2f98B4235FD2BA0173a2B056D722879360B12E7b", + "sdk": "Unable to infer origin chain or token symbol for token" + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "address": "G2ZLaRhpohW23KTEX3fBjZXtNTFFwemqCaWWnWVTj4TB", + "symbol": "DAI.sol", + "decimals": 6, + "nodePrc20": "0x5861f56A556c990358cc9cccd8B5baa3767982A8", + "sdk": "Unsupported token symbol: DAI" + } + ], + "sdkOnly": [], + "presetTokens": [ + { + "preset": "DEXES", + "chain": "eip155:11155111", + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "nodePrc20": "0x0d0dF7E8807430A81104EA84d926139816eC7586" + }, + { + "preset": "DEXES", + "chain": "eip155:11155111", + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "nodePrc20": "0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E" + }, + { + "preset": "DEXES", + "chain": "eip155:84532", + "token": "0x4200000000000000000000000000000000000006", + "nodePrc20": null + }, + { + "preset": "DEXES", + "chain": "eip155:84532", + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "nodePrc20": "0x84B62e44F667F692F7739Ca6040cD17DA02068A8" + }, + { + "preset": "DEXES", + "chain": "eip155:421614", + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "nodePrc20": null + }, + { + "preset": "DEXES", + "chain": "eip155:421614", + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "nodePrc20": "0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6" + }, + { + "preset": "DEXES", + "chain": "eip155:97", + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "nodePrc20": null + }, + { + "preset": "DEXES", + "chain": "eip155:97", + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "nodePrc20": null + }, + { + "preset": "LENDING", + "chain": "eip155:11155111", + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "nodePrc20": null + }, + { + "preset": "LENDING", + "chain": "eip155:421614", + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "nodePrc20": "0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6" + }, + { + "preset": "LENDING", + "chain": "eip155:84532", + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "nodePrc20": null + }, + { + "preset": "LENDING", + "chain": "eip155:84532", + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "nodePrc20": null + }, + { + "preset": "LENDING", + "chain": "eip155:84532", + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "nodePrc20": null + }, + { + "preset": "LENDING", + "chain": "eip155:97", + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "nodePrc20": null + }, + { + "preset": "LENDING", + "chain": "eip155:97", + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "nodePrc20": null + }, + { + "preset": "STAKING", + "chain": "eip155:11155111", + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "nodePrc20": null + } + ] +} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/push-probe.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/push-probe.json new file mode 100644 index 00000000..3d14b338 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/push-probe.json @@ -0,0 +1,895 @@ +{ + "at": "2026-10-20T16:25:35.190Z", + "rpc": "https://evm.donut.rpc.push.org/", + "readOnly": true, + "chainId": 42101, + "block": "24457144", + "blockTimestamp": "2026-10-20T16:25:31.000Z", + "sends": { + "spl:first-use": { + "hash": "0x119c89e9ff7c7cccdfc8c071fade2488aa28b0eff7d9b71f7f0cf247c958bbf5", + "status": "success", + "block": "24455663", + "from": "0x8fb1cf80a014af564bdc12e557a3e52432f4657b", + "to": "0xed6bfe825b8d84a1e6f4f7c9067398f8985cc372", + "txValue": "0", + "gasUsed": "468004", + "effectiveGasPrice": "1125000000", + "pushFeePaid": "526504500000000", + "events": [ + { + "ev": "OutboundMetered", + "emitter": "0xba32e7a1500cb34311a31127bcd40ca52c8cfd36", + "id": "0x16be7e479fcee17b79ed4ed7a6ff75c6cf954c08dad16c9a59b876be242c9ea8", + "engine": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "account": "0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372", + "token": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34", + "amount": "1000" + }, + { + "ev": "SwapAndBurnGas", + "emitter": "0x00000000000000000000000000000000000000c0", + "gasToken": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "caller": "0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372", + "pcIn": "2069650875064483730", + "gasFee": "2285000", + "fee": 500 + }, + { + "ev": "UniversalTxOutbound", + "emitter": "0x00000000000000000000000000000000000000c1", + "sender": "0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372", + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "token": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34", + "amount": "1000", + "gasToken": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "gasFee": "2285000", + "gasLimit": "2285", + "protocolFee": "0", + "gasPrice": "1000", + "txType": 3, + "revertRecipient": "0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372", + "recipientLen": 32, + "payloadLen": 222 + } + ] + }, + "spl:subsequent": { + "hash": "0x7980032bb748889f44d9a58e4030dc1338575d03fa78da23531dcf96d6c23e57", + "status": "success", + "block": "24455695", + "from": "0x8fb1cf80a014af564bdc12e557a3e52432f4657b", + "to": "0xed6bfe825b8d84a1e6f4f7c9067398f8985cc372", + "txValue": "0", + "gasUsed": "447044", + "effectiveGasPrice": "1125000000", + "pushFeePaid": "502924500000000", + "events": [ + { + "ev": "OutboundMetered", + "emitter": "0xba32e7a1500cb34311a31127bcd40ca52c8cfd36", + "id": "0x16be7e479fcee17b79ed4ed7a6ff75c6cf954c08dad16c9a59b876be242c9ea8", + "engine": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "account": "0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372", + "token": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34", + "amount": "1000" + }, + { + "ev": "SwapAndBurnGas", + "emitter": "0x00000000000000000000000000000000000000c0", + "gasToken": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "caller": "0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372", + "pcIn": "869525140506227908", + "gasFee": "960000", + "fee": 500 + }, + { + "ev": "UniversalTxOutbound", + "emitter": "0x00000000000000000000000000000000000000c1", + "sender": "0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372", + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "token": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34", + "amount": "1000", + "gasToken": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "gasFee": "960000", + "gasLimit": "960", + "protocolFee": "0", + "gasPrice": "1000", + "txType": 3, + "revertRecipient": "0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372", + "recipientLen": 32, + "payloadLen": 222 + } + ] + }, + "sepolia:first-use": { + "hash": "0xb968f71a2f8deb17a194632744e0e256b7703e229e0a0d35461751e580debce6", + "status": "success", + "block": "24455794", + "from": "0xd8285271c399597674ca4064c398b07c98d0f1f2", + "to": "0xd847ca2462405a70c32ff5776e70fe25ea7b26ca", + "txValue": "0", + "gasUsed": "397778", + "effectiveGasPrice": "1125000000", + "pushFeePaid": "447500250000000", + "events": [ + { + "ev": "OutboundMetered", + "emitter": "0xba32e7a1500cb34311a31127bcd40ca52c8cfd36", + "id": "0xe68a9fa1956e67a8763ace47d51e3d25e2dc1e9be6642f8f24f0aa256589396d", + "engine": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "account": "0xD847ca2462405a70c32ff5776e70fE25EA7B26ca", + "token": "0x2971824Db68229D087931155C2b8bB820B275809", + "amount": "1000000000000" + }, + { + "ev": "SwapAndBurnGas", + "emitter": "0x00000000000000000000000000000000000000c0", + "gasToken": "0x2971824Db68229D087931155C2b8bB820B275809", + "caller": "0xD847ca2462405a70c32ff5776e70fE25EA7B26ca", + "pcIn": "3218632638119703", + "gasFee": "2200032000000", + "fee": 500 + }, + { + "ev": "UniversalTxOutbound", + "emitter": "0x00000000000000000000000000000000000000c1", + "sender": "0xD847ca2462405a70c32ff5776e70fE25EA7B26ca", + "chain": "eip155:11155111", + "token": "0x2971824Db68229D087931155C2b8bB820B275809", + "amount": "1000000000000", + "gasToken": "0x2971824Db68229D087931155C2b8bB820B275809", + "gasFee": "2200032000000", + "gasLimit": "2000000", + "protocolFee": "0", + "gasPrice": "1100016", + "txType": 3, + "revertRecipient": "0xD847ca2462405a70c32ff5776e70fE25EA7B26ca", + "recipientLen": 0, + "payloadLen": 260 + } + ] + }, + "sepolia:subsequent": { + "hash": "0xc3b021815bcfd26269ddcdbaed813aa91fb0c03a36dbf2cbc5678f84b157c7cf", + "status": "success", + "block": "24455824", + "from": "0xd8285271c399597674ca4064c398b07c98d0f1f2", + "to": "0xd847ca2462405a70c32ff5776e70fe25ea7b26ca", + "txValue": "0", + "gasUsed": "377183", + "effectiveGasPrice": "1125000000", + "pushFeePaid": "424330875000000", + "events": [ + { + "ev": "OutboundMetered", + "emitter": "0xba32e7a1500cb34311a31127bcd40ca52c8cfd36", + "id": "0xe68a9fa1956e67a8763ace47d51e3d25e2dc1e9be6642f8f24f0aa256589396d", + "engine": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "account": "0xD847ca2462405a70c32ff5776e70fE25EA7B26ca", + "token": "0x2971824Db68229D087931155C2b8bB820B275809", + "amount": "1000000000000" + }, + { + "ev": "SwapAndBurnGas", + "emitter": "0x00000000000000000000000000000000000000c0", + "gasToken": "0x2971824Db68229D087931155C2b8bB820B275809", + "caller": "0xD847ca2462405a70c32ff5776e70fE25EA7B26ca", + "pcIn": "804658178813013", + "gasFee": "550008000000", + "fee": 500 + }, + { + "ev": "UniversalTxOutbound", + "emitter": "0x00000000000000000000000000000000000000c1", + "sender": "0xD847ca2462405a70c32ff5776e70fE25EA7B26ca", + "chain": "eip155:11155111", + "token": "0x2971824Db68229D087931155C2b8bB820B275809", + "amount": "1000000000000", + "gasToken": "0x2971824Db68229D087931155C2b8bB820B275809", + "gasFee": "550008000000", + "gasLimit": "500000", + "protocolFee": "0", + "gasPrice": "1100016", + "txType": 3, + "revertRecipient": "0xD847ca2462405a70c32ff5776e70fE25EA7B26ca", + "recipientLen": 0, + "payloadLen": 260 + } + ] + }, + "base:first-use": { + "hash": "0xb9fd4a64a2fd9b68193ac3aef1177f054dc591cfc3917968d3cfc9ee1fc35153", + "status": "success", + "block": "24455871", + "from": "0x79cf3b5cb2a58e008c583cc80a51cf35d4dbda37", + "to": "0xb07a90329a3ef6b20ac80a458069a7d8dae93d58", + "txValue": "0", + "gasUsed": "396773", + "effectiveGasPrice": "1125000000", + "pushFeePaid": "446369625000000", + "events": [ + { + "ev": "OutboundMetered", + "emitter": "0xba32e7a1500cb34311a31127bcd40ca52c8cfd36", + "id": "0x1a2f8bc59cedf775f64c3b665c2177118a1d3efbba08191d61fe4ec84b00b71b", + "engine": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "account": "0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58", + "token": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "amount": "1000000000000" + }, + { + "ev": "SwapAndBurnGas", + "emitter": "0x00000000000000000000000000000000000000c0", + "gasToken": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "caller": "0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58", + "pcIn": "591543820894050827", + "gasFee": "13200000000000", + "fee": 500 + }, + { + "ev": "UniversalTxOutbound", + "emitter": "0x00000000000000000000000000000000000000c1", + "sender": "0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58", + "chain": "eip155:84532", + "token": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "amount": "1000000000000", + "gasToken": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "gasFee": "13200000000000", + "gasLimit": "2000000", + "protocolFee": "0", + "gasPrice": "6600000", + "txType": 3, + "revertRecipient": "0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58", + "recipientLen": 0, + "payloadLen": 260 + } + ] + }, + "base:subsequent": { + "hash": "0xc0aa504633d7e0fe66e4aa2abaf994e4b8ff09c992b8712e3a8879fe33c9026d", + "status": "success", + "block": "24455903", + "from": "0x79cf3b5cb2a58e008c583cc80a51cf35d4dbda37", + "to": "0xb07a90329a3ef6b20ac80a458069a7d8dae93d58", + "txValue": "0", + "gasUsed": "376379", + "effectiveGasPrice": "1125000000", + "pushFeePaid": "423426375000000", + "events": [ + { + "ev": "OutboundMetered", + "emitter": "0xba32e7a1500cb34311a31127bcd40ca52c8cfd36", + "id": "0x1a2f8bc59cedf775f64c3b665c2177118a1d3efbba08191d61fe4ec84b00b71b", + "engine": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "account": "0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58", + "token": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "amount": "1000000000000" + }, + { + "ev": "SwapAndBurnGas", + "emitter": "0x00000000000000000000000000000000000000c0", + "gasToken": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "caller": "0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58", + "pcIn": "147885915640293260", + "gasFee": "3300000000000", + "fee": 500 + }, + { + "ev": "UniversalTxOutbound", + "emitter": "0x00000000000000000000000000000000000000c1", + "sender": "0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58", + "chain": "eip155:84532", + "token": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "amount": "1000000000000", + "gasToken": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "gasFee": "3300000000000", + "gasLimit": "500000", + "protocolFee": "0", + "gasPrice": "6600000", + "txType": 3, + "revertRecipient": "0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58", + "recipientLen": 0, + "payloadLen": 260 + } + ] + }, + "arb:first-use": { + "hash": "0x21ce19a3780fee8cbcc006b3197163166402da30557ef1eff8556c97d793846c", + "status": "success", + "block": "24455949", + "from": "0x664f2276733474e942f3f155be2da18a63fb0491", + "to": "0x3130f7f8b10c94a54ec012a4d0e6dac963f200eb", + "txValue": "0", + "gasUsed": "404486", + "effectiveGasPrice": "1125000000", + "pushFeePaid": "455046750000000", + "events": [ + { + "ev": "OutboundMetered", + "emitter": "0xba32e7a1500cb34311a31127bcd40ca52c8cfd36", + "id": "0x788f414e3cfd301a942889ae2c55dd725fbd00fb2b69cafeea0ff94d62cf81e1", + "engine": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "account": "0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb", + "token": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "amount": "1000000000000" + }, + { + "ev": "SwapAndBurnGas", + "emitter": "0x00000000000000000000000000000000000000c0", + "gasToken": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "caller": "0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb", + "pcIn": "1929669492247985112", + "gasFee": "45183600000000", + "fee": 3000 + }, + { + "ev": "UniversalTxOutbound", + "emitter": "0x00000000000000000000000000000000000000c1", + "sender": "0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb", + "chain": "eip155:421614", + "token": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "amount": "1000000000000", + "gasToken": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "gasFee": "45183600000000", + "gasLimit": "2000000", + "protocolFee": "0", + "gasPrice": "22591800", + "txType": 3, + "revertRecipient": "0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb", + "recipientLen": 0, + "payloadLen": 260 + } + ] + }, + "arb:subsequent": { + "hash": "0xba1c063ab2e261f0d1af0833975fd1344daa390ae80336c45a45d49759ebecad", + "status": "success", + "block": "24455976", + "from": "0x664f2276733474e942f3f155be2da18a63fb0491", + "to": "0x3130f7f8b10c94a54ec012a4d0e6dac963f200eb", + "txValue": "0", + "gasUsed": "390806", + "effectiveGasPrice": "1125000000", + "pushFeePaid": "439656750000000", + "events": [ + { + "ev": "OutboundMetered", + "emitter": "0xba32e7a1500cb34311a31127bcd40ca52c8cfd36", + "id": "0x788f414e3cfd301a942889ae2c55dd725fbd00fb2b69cafeea0ff94d62cf81e1", + "engine": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "account": "0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb", + "token": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "amount": "1000000000000" + }, + { + "ev": "SwapAndBurnGas", + "emitter": "0x00000000000000000000000000000000000000c0", + "gasToken": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "caller": "0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb", + "pcIn": "481993810973352572", + "gasFee": "11286000000000", + "fee": 3000 + }, + { + "ev": "UniversalTxOutbound", + "emitter": "0x00000000000000000000000000000000000000c1", + "sender": "0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb", + "chain": "eip155:421614", + "token": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "amount": "1000000000000", + "gasToken": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "gasFee": "11286000000000", + "gasLimit": "500000", + "protocolFee": "0", + "gasPrice": "22572000", + "txType": 3, + "revertRecipient": "0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb", + "recipientLen": 0, + "payloadLen": 260 + } + ] + }, + "bnb:first-use": { + "hash": "0x6e4bf8a92eb569fb4aa34a5d5eab4799ab86f6aa40fe405d59cba6498c669f7d", + "status": "success", + "block": "24456018", + "from": "0x74a85bd8928090920463ce05aba48985b3875700", + "to": "0x0140403283bb76c1890501067754d1c376189b5d", + "txValue": "0", + "gasUsed": "404574", + "effectiveGasPrice": "1125000000", + "pushFeePaid": "455145750000000", + "events": [ + { + "ev": "OutboundMetered", + "emitter": "0xba32e7a1500cb34311a31127bcd40ca52c8cfd36", + "id": "0x45e274612b5b71b11056991709d8d5ac0b3d5a6c415dfa0f9bbcd5fc7122778b", + "engine": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "account": "0x0140403283bB76C1890501067754d1c376189b5D", + "token": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "amount": "1000000000000" + }, + { + "ev": "SwapAndBurnGas", + "emitter": "0x00000000000000000000000000000000000000c0", + "gasToken": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "caller": "0x0140403283bB76C1890501067754d1c376189b5D", + "pcIn": "2365215882563406640", + "gasFee": "220000000000000", + "fee": 500 + }, + { + "ev": "UniversalTxOutbound", + "emitter": "0x00000000000000000000000000000000000000c1", + "sender": "0x0140403283bB76C1890501067754d1c376189b5D", + "chain": "eip155:97", + "token": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "amount": "1000000000000", + "gasToken": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "gasFee": "220000000000000", + "gasLimit": "2000000", + "protocolFee": "0", + "gasPrice": "110000000", + "txType": 3, + "revertRecipient": "0x0140403283bB76C1890501067754d1c376189b5D", + "recipientLen": 0, + "payloadLen": 260 + } + ] + }, + "bnb:subsequent": { + "hash": "0x82f343dcd100715d5693d68fbdcccdaf1467c3c5626391501d1f7b579d279047", + "status": "success", + "block": "24456042", + "from": "0x74a85bd8928090920463ce05aba48985b3875700", + "to": "0x0140403283bb76c1890501067754d1c376189b5d", + "txValue": "0", + "gasUsed": "390894", + "effectiveGasPrice": "1125000000", + "pushFeePaid": "439755750000000", + "events": [ + { + "ev": "OutboundMetered", + "emitter": "0xba32e7a1500cb34311a31127bcd40ca52c8cfd36", + "id": "0x45e274612b5b71b11056991709d8d5ac0b3d5a6c415dfa0f9bbcd5fc7122778b", + "engine": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "account": "0x0140403283bB76C1890501067754d1c376189b5D", + "token": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "amount": "1000000000000" + }, + { + "ev": "SwapAndBurnGas", + "emitter": "0x00000000000000000000000000000000000000c0", + "gasToken": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "caller": "0x0140403283bB76C1890501067754d1c376189b5D", + "pcIn": "591302375958115445", + "gasFee": "55000000000000", + "fee": 500 + }, + { + "ev": "UniversalTxOutbound", + "emitter": "0x00000000000000000000000000000000000000c1", + "sender": "0x0140403283bB76C1890501067754d1c376189b5D", + "chain": "eip155:97", + "token": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "amount": "1000000000000", + "gasToken": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "gasFee": "55000000000000", + "gasLimit": "500000", + "protocolFee": "0", + "gasPrice": "110000000", + "txType": 3, + "revertRecipient": "0x0140403283bB76C1890501067754d1c376189b5D", + "recipientLen": 0, + "payloadLen": 260 + } + ] + } + }, + "wpc": "0xE17DD2E0509f99E9ee9469Cf6634048Ec5a3ADe9", + "chains": { + "eip155:11155111": { + "gasPrc20": "0x2971824Db68229D087931155C2b8bB820B275809", + "registeredGasToken": "0x2971824Db68229D087931155C2b8bB820B275809", + "baseGasLimit": "500000", + "gasPrice": "1100018", + "defaultFeeTier": 500, + "protocolFee": "0", + "quotes": [ + { + "inputGasLimit": "0", + "gasFee": "550009000000", + "protocolFee": "0", + "gasPrice": "1100018", + "gasLimitUsed": "500000", + "swapPcInRequired": "804590193808946" + }, + { + "inputGasLimit": "500000", + "gasFee": "550009000000", + "protocolFee": "0", + "gasPrice": "1100018", + "gasLimitUsed": "500000", + "swapPcInRequired": "804590193808946" + }, + { + "inputGasLimit": "2000000", + "gasFee": "2200036000000", + "protocolFee": "0", + "gasPrice": "1100018", + "gasLimitUsed": "2000000", + "swapPcInRequired": "3218360887313289" + } + ] + }, + "eip155:84532": { + "gasPrc20": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "registeredGasToken": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "baseGasLimit": "500000", + "gasPrice": "6600000", + "defaultFeeTier": 500, + "protocolFee": "0", + "quotes": [ + { + "inputGasLimit": "0", + "gasFee": "3300000000000", + "protocolFee": "0", + "gasPrice": "6600000", + "gasLimitUsed": "500000", + "swapPcInRequired": "147885927165951477" + }, + { + "inputGasLimit": "500000", + "gasFee": "3300000000000", + "protocolFee": "0", + "gasPrice": "6600000", + "gasLimitUsed": "500000", + "swapPcInRequired": "147885927165951477" + }, + { + "inputGasLimit": "2000000", + "gasFee": "13200000000000", + "protocolFee": "0", + "gasPrice": "6600000", + "gasLimitUsed": "2000000", + "swapPcInRequired": "591543988922286942" + } + ] + }, + "eip155:421614": { + "gasPrc20": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "registeredGasToken": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "baseGasLimit": "500000", + "gasPrice": "22193600", + "defaultFeeTier": 3000, + "protocolFee": "0", + "quotes": [ + { + "inputGasLimit": "0", + "gasFee": "11096800000000", + "protocolFee": "0", + "gasPrice": "22193600", + "gasLimitUsed": "500000", + "swapPcInRequired": "473913876146294352" + }, + { + "inputGasLimit": "500000", + "gasFee": "11096800000000", + "protocolFee": "0", + "gasPrice": "22193600", + "gasLimitUsed": "500000", + "swapPcInRequired": "473913876146294352" + }, + { + "inputGasLimit": "2000000", + "gasFee": "44387200000000", + "protocolFee": "0", + "gasPrice": "22193600", + "gasLimitUsed": "2000000", + "swapPcInRequired": "1895660749783132294" + } + ] + }, + "eip155:97": { + "gasPrc20": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "registeredGasToken": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "baseGasLimit": "500000", + "gasPrice": "1100000000", + "defaultFeeTier": 500, + "protocolFee": "0", + "quotes": [ + { + "inputGasLimit": "0", + "gasFee": "550000000000000", + "protocolFee": "0", + "gasPrice": "1100000000", + "gasLimitUsed": "500000", + "swapPcInRequired": "5913121783041323339" + }, + { + "inputGasLimit": "500000", + "gasFee": "550000000000000", + "protocolFee": "0", + "gasPrice": "1100000000", + "gasLimitUsed": "500000", + "swapPcInRequired": "5913121783041323339" + }, + { + "inputGasLimit": "2000000", + "gasFee": "2200000000000000", + "protocolFee": "0", + "gasPrice": "1100000000", + "gasLimitUsed": "2000000", + "swapPcInRequired": "23653617545786043528" + } + ] + }, + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": { + "gasPrc20": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "registeredGasToken": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "baseGasLimit": "960", + "gasPrice": "1000", + "defaultFeeTier": 500, + "protocolFee": "0", + "quotes": [ + { + "inputGasLimit": "0", + "gasFee": "960000", + "protocolFee": "0", + "gasPrice": "1000", + "gasLimitUsed": "960", + "swapPcInRequired": "869525161720981845" + }, + { + "inputGasLimit": "960", + "gasFee": "960000", + "protocolFee": "0", + "gasPrice": "1000", + "gasLimitUsed": "960", + "swapPcInRequired": "869525161720981845" + }, + { + "inputGasLimit": "1052", + "gasFee": "1052000", + "protocolFee": "0", + "gasPrice": "1000", + "gasLimitUsed": "1052", + "swapPcInRequired": "952854657922375424" + }, + { + "inputGasLimit": "2285", + "gasFee": "2285000", + "protocolFee": "0", + "gasPrice": "1000", + "gasLimitUsed": "2285", + "swapPcInRequired": "2069651084035473630" + }, + { + "inputGasLimit": "1000000", + "gasFee": "1000000000", + "protocolFee": "0", + "gasPrice": "1000", + "gasLimitUsed": "1000000", + "swapPcInRequired": "905771237038391933369" + } + ] + } + }, + "pcUsd": { + "eip155:11155111": { + "stable": "0x0f97A213207703923F5f0C613C9827f7C9A0f96B", + "fee": 500, + "oneWpcInStableRaw": "232639" + }, + "eip155:421614": { + "stable": "0xFE6E9DF2BbC9ce05D98b83B1365df6DcA9951891", + "fee": 500, + "oneWpcInStableRaw": "98797" + }, + "eip155:84532": { + "stable": "0x148823809B853e1db187BC09A9ac909BC42F971a", + "fee": 500, + "oneWpcInStableRaw": "99308" + }, + "eip155:97": { + "stable": "0x731aF1Da5365259d27528557EE4aFBA4baC90ef2", + "fee": 500, + "oneWpcInStableRaw": "103138" + }, + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1": { + "stable": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34", + "fee": 500, + "oneWpcInStableRaw": "91009" + } + }, + "prc20": { + "pETH": { + "address": "0x2971824Db68229D087931155C2b8bB820B275809", + "namespace": "eip155:11155111", + "decimals": 18, + "symbol": "pETH", + "totalSupply": "1202118573863805311917314", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 32, + "sourceTokenWord": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + "pETH_ARB": { + "address": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "namespace": "eip155:421614", + "decimals": 18, + "symbol": "pETH.arb", + "totalSupply": "1200026561709007795673623", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 128, + "sourceTokenString": "0x0000000000000000000000000000000000000000" + }, + "pETH_BASE": { + "address": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "namespace": "eip155:84532", + "decimals": 18, + "symbol": "pETH.base", + "totalSupply": "1200042897987270851496065", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 128, + "sourceTokenString": "0x0000000000000000000000000000000000000000" + }, + "pBNB": { + "address": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "namespace": "eip155:97", + "decimals": 18, + "symbol": "pBNB", + "totalSupply": "1200307744919829858760483", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 128, + "sourceTokenString": "0x0000000000000000000000000000000000000000" + }, + "pSOL": { + "address": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "namespace": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "decimals": 9, + "symbol": "pSOL", + "totalSupply": "3001201403240700062", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 32, + "sourceTokenWord": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + "USDT_ETH": { + "address": "0x0f97A213207703923F5f0C613C9827f7C9A0f96B", + "namespace": "eip155:11155111", + "decimals": 6, + "symbol": "USDT.eth", + "totalSupply": "6856359154143", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 128, + "sourceTokenString": "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876" + }, + "USDC_ETH": { + "address": "0x7A58048036206bB898008b5bBDA85697DB1e5d66", + "namespace": "eip155:11155111", + "decimals": 6, + "symbol": "USDC.eth", + "totalSupply": "6912480294955", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 128, + "sourceTokenString": "0x97F477B7f970D47a87B42869ceeace218106152a" + }, + "USDT_ARB": { + "address": "0xFE6E9DF2BbC9ce05D98b83B1365df6DcA9951891", + "namespace": "eip155:421614", + "decimals": 6, + "symbol": "USDT.arb", + "totalSupply": "145063516199", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 128, + "sourceTokenString": "0xE30928528f52CAEeB75fB07837e22d77D47e9c07" + }, + "USDC_ARB": { + "address": "0x1091cCBA2FF8d2A131AE4B35e34cf3308C48572C", + "namespace": "eip155:421614", + "decimals": 6, + "symbol": "USDC.arb", + "totalSupply": "1044684603377", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 128, + "sourceTokenString": "0x5dd39b0b3610F666F631a6506b7713EF83e1Ac5C" + }, + "USDT_SOL": { + "address": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34", + "namespace": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "decimals": 6, + "symbol": "USDT.sol", + "totalSupply": "2133492520683", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 32, + "sourceTokenWord": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + "USDC_SOL": { + "address": "0x04B8F634ABC7C879763F623e0f0550a4b5c4426F", + "namespace": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "decimals": 6, + "symbol": "USDC.sol", + "totalSupply": "1205737049651", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 32, + "sourceTokenWord": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + "USDT_BSC": { + "address": "0x731aF1Da5365259d27528557EE4aFBA4baC90ef2", + "namespace": "eip155:97", + "decimals": 6, + "symbol": "USDT.bnb", + "totalSupply": "119017594761", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 128, + "sourceTokenString": "0xE935d9c9C24D02E61186c640cc01d713C876d40F" + }, + "USDC_BSC": { + "address": "0x120EBf25Dad7D6a09Ad2316f23f9Be95DBb90639", + "namespace": "eip155:97", + "decimals": 6, + "symbol": "USDC.bnb", + "totalSupply": "116876047736", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 128, + "sourceTokenString": "0xA8802F96cAd0d45343d9bc660B6f7d80050A660b" + }, + "USDT_BASE": { + "address": "0x148823809B853e1db187BC09A9ac909BC42F971a", + "namespace": "eip155:84532", + "decimals": 6, + "symbol": "USDT.base", + "totalSupply": "150022201753", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 128, + "sourceTokenString": "0x4D7646B9eE3D68F4b0F135B5cbc66B00819F6b61" + }, + "USDC_BASE": { + "address": "0xD7C6cA1e2c0CE260BE0c0AD39C1540de460e3Be1", + "namespace": "eip155:84532", + "decimals": 6, + "symbol": "USDC.base", + "totalSupply": "1043687802312", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 128, + "sourceTokenString": "0x5c3504F0E3bA28FDc1F74234fE936518276AaBB8" + }, + "WETH_ETH": { + "address": "0x0d0dF7E8807430A81104EA84d926139816eC7586", + "namespace": "eip155:11155111", + "decimals": 18, + "symbol": "WETH", + "totalSupply": "1200000017895253217961350", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 32, + "sourceTokenWord": "0x000000000000000000000000fff9976782d46cc05630d1f6ebab18b2324d6b14" + }, + "stETH_ETH": { + "address": "0xaf89E805949c628ebde3262e91dc4ab9eA12668E", + "namespace": "eip155:11155111", + "decimals": 18, + "symbol": "stETH.eth", + "totalSupply": "1200000000000000000000000", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 32, + "sourceTokenWord": "0x0000000000000000000000003e3fe7dbc6b4c189e7128855dd526361c49b40af" + }, + "DAI_SOL": { + "address": "0x5861f56A556c990358cc9cccd8B5baa3767982A8", + "namespace": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "decimals": 6, + "symbol": "DAI.sol", + "totalSupply": "2000000000000", + "isSupportedError": "Execution reverted for an unknown reason.", + "sourceTokenRawLen": 32, + "sourceTokenWord": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "coreEvents": { + "supported": [], + "gasTokens": [], + "error": "Missing or invalid parameters.\nDouble check you have provided the correct parameters." + }, + "unregistered": [], + "blockAfter": "24457170" +} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/sdk-quotes.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/sdk-quotes.json new file mode 100644 index 00000000..2f1cbd2f --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/sdk-quotes.json @@ -0,0 +1,369 @@ +{ + "at": "2026-10-20T16:37:15.813Z", + "readOnly": true, + "origins": { + "pushNative": { + "signerChain": "eip155:42101", + "pushBlock": "24457436", + "cases": [ + { + "chain": "eip155:11155111", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPC": 10 + }, + { + "chain": "eip155:11155111", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPC": 10 + }, + { + "chain": "eip155:84532", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPC": 10 + }, + { + "chain": "eip155:84532", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPC": 10 + }, + { + "chain": "eip155:421614", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPC": 10 + }, + { + "chain": "eip155:421614", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPC": 10 + }, + { + "chain": "eip155:97", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPC": 10 + }, + { + "chain": "eip155:97", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPC": 10 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "native-sol omitted", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "1052", + "attachedPC": 10 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "spl fresh CEA ATA omitted", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "2285", + "attachedPC": 10 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "spl existing CEA ATA omitted", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "960", + "attachedPC": 10 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "spl existing explicit 5000", + "inputGasLimit": "5000", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "5000", + "attachedPC": 10 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "legacy 1,000,000", + "inputGasLimit": "1000000", + "protocolFee": "0", + "nativeValueForGas": "100000000000000000000", + "gasLimitUsed": "1000000", + "attachedPC": 100 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "explicit 500 (< base 960)", + "inputGasLimit": "500", + "error": "The contract function \"getOutboundTxGasAndFees\" reverted." + } + ] + }, + "sepoliaUEA": { + "signerChain": "eip155:11155111", + "pushBlock": "24457442", + "cases": [ + { + "chain": "eip155:11155111", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "4298505409669058069", + "gasLimitUsed": "2000000", + "attachedPC": 4.298505409669058 + }, + { + "chain": "eip155:11155111", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "4298505409669058069", + "gasLimitUsed": "500000", + "attachedPC": 4.298505409669058 + }, + { + "chain": "eip155:84532", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "4298505409669058069", + "gasLimitUsed": "2000000", + "attachedPC": 4.298505409669058 + }, + { + "chain": "eip155:84532", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "4298505409669058069", + "gasLimitUsed": "500000", + "attachedPC": 4.298505409669058 + }, + { + "chain": "eip155:421614", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "4298505409669058069", + "gasLimitUsed": "2000000", + "attachedPC": 4.298505409669058 + }, + { + "chain": "eip155:421614", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "4298505409669058069", + "gasLimitUsed": "500000", + "attachedPC": 4.298505409669058 + }, + { + "chain": "eip155:97", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "22998723343893328290", + "gasLimitUsed": "2000000", + "attachedPC": 22.998723343893328 + }, + { + "chain": "eip155:97", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "5749680835973332073", + "gasLimitUsed": "500000", + "attachedPC": 5.749680835973332 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "native-sol omitted", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "4298505409669058069", + "gasLimitUsed": "1052", + "attachedPC": 4.298505409669058 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "spl fresh CEA ATA omitted", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "4298505409669058069", + "gasLimitUsed": "2285", + "attachedPC": 4.298505409669058 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "spl existing CEA ATA omitted", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "4298505409669058069", + "gasLimitUsed": "960", + "attachedPC": 4.298505409669058 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "spl existing explicit 5000", + "inputGasLimit": "5000", + "protocolFee": "0", + "nativeValueForGas": "4298505409669058069", + "gasLimitUsed": "5000", + "attachedPC": 4.298505409669058 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "legacy 1,000,000", + "inputGasLimit": "1000000", + "protocolFee": "0", + "nativeValueForGas": "42985054096690580686", + "gasLimitUsed": "1000000", + "attachedPC": 42.985054096690575 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "explicit 500 (< base 960)", + "inputGasLimit": "500", + "error": "The contract function \"getOutboundTxGasAndFees\" reverted." + } + ] + }, + "solanaUEA": { + "signerChain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "pushBlock": "24457448", + "cases": [ + { + "chain": "eip155:11155111", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10987924271225922711", + "gasLimitUsed": "2000000", + "attachedPC": 10.987924271225923 + }, + { + "chain": "eip155:11155111", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10987924271225922711", + "gasLimitUsed": "500000", + "attachedPC": 10.987924271225923 + }, + { + "chain": "eip155:84532", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10987924271225922711", + "gasLimitUsed": "2000000", + "attachedPC": 10.987924271225923 + }, + { + "chain": "eip155:84532", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10987924271225922711", + "gasLimitUsed": "500000", + "attachedPC": 10.987924271225923 + }, + { + "chain": "eip155:421614", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10987924271225922711", + "gasLimitUsed": "2000000", + "attachedPC": 10.987924271225923 + }, + { + "chain": "eip155:421614", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10987924271225922711", + "gasLimitUsed": "500000", + "attachedPC": 10.987924271225923 + }, + { + "chain": "eip155:97", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "58789790020767176873", + "gasLimitUsed": "2000000", + "attachedPC": 58.78979002076718 + }, + { + "chain": "eip155:97", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "14697447505191794219", + "gasLimitUsed": "500000", + "attachedPC": 14.697447505191795 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "native-sol omitted", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10987924271225922711", + "gasLimitUsed": "1052", + "attachedPC": 10.987924271225923 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "spl fresh CEA ATA omitted", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10987924271225922711", + "gasLimitUsed": "2285", + "attachedPC": 10.987924271225923 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "spl existing CEA ATA omitted", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10987924271225922711", + "gasLimitUsed": "960", + "attachedPC": 10.987924271225923 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "spl existing explicit 5000", + "inputGasLimit": "5000", + "protocolFee": "0", + "nativeValueForGas": "10987924271225922711", + "gasLimitUsed": "5000", + "attachedPC": 10.987924271225923 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "legacy 1,000,000", + "inputGasLimit": "1000000", + "protocolFee": "0", + "nativeValueForGas": "109879242712259227110", + "gasLimitUsed": "1000000", + "attachedPC": 109.87924271225923 + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "label": "explicit 500 (< base 960)", + "inputGasLimit": "500", + "error": "The contract function \"getOutboundTxGasAndFees\" reverted." + } + ] + } + } +} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/sepolia-dex-subsequent-oog-trace.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/sepolia-dex-subsequent-oog-trace.json new file mode 100644 index 00000000..13e1b627 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/sepolia-dex-subsequent-oog-trace.json @@ -0,0 +1 @@ +{"id":1,"jsonrpc":"2.0","result":{"from":"0x9fed6f778a956244c06a3b905ba45bdb2ec3afea","gas":"0x7a120","gasUsed":"0x2d5a5","executionGasUsed":"0x2d5a5","stateGasUsed":"0x0","gasRefund":"0x0","to":"0xd019eb12d0d6ef8d299661f22b4b7d262ed4b965","input":"0x40a31fe239e7d867cbea784422ecd5fb6382e5eb0b7400cdaa8e5fd70cfb43bfdd3a6913700aa6b1f514be92accb6434cea26b01aa01e16a0b173d00c89662f01b134c060000000000000000000000005c788fca118bf06cdb7ab679ffbbd9007b5375e700000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000002e42cc2842d00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001200000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000003bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e0000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000003bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e404e45aaf0000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238000000000000000000000000fff9976782d46cc05630d1f6ebab18b2324d6b140000000000000000000000000000000000000000000000000000000000000064000000000000000000000000c128bb0e172baed9a6f575bb07c954ef0ebeddac0000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","output":"0xacfdb444","error":"execution reverted","calls":[{"from":"0xd019eb12d0d6ef8d299661f22b4b7d262ed4b965","gas":"0x7189b","gasUsed":"0x3e853","to":"0xfb6daef9c72a08800e09b1c8e971565920077360","input":"0x40a31fe239e7d867cbea784422ecd5fb6382e5eb0b7400cdaa8e5fd70cfb43bfdd3a6913700aa6b1f514be92accb6434cea26b01aa01e16a0b173d00c89662f01b134c060000000000000000000000005c788fca118bf06cdb7ab679ffbbd9007b5375e700000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000002e42cc2842d00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001200000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000003bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e0000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000003bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e404e45aaf0000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238000000000000000000000000fff9976782d46cc05630d1f6ebab18b2324d6b140000000000000000000000000000000000000000000000000000000000000064000000000000000000000000c128bb0e172baed9a6f575bb07c954ef0ebeddac0000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","output":"0xacfdb444","error":"execution reverted","calls":[{"from":"0xd019eb12d0d6ef8d299661f22b4b7d262ed4b965","gas":"0x6a4d9","gasUsed":"0x2b9c","to":"0x5e191fbbe22f8866c5e4250557664fce760e8870","input":"0x4be73c5b0000000000000000000000005c788fca118bf06cdb7ab679ffbbd9007b5375e7","output":"0x000000000000000000000000c128bb0e172baed9a6f575bb07c954ef0ebeddac0000000000000000000000000000000000000000000000000000000000000001","calls":[{"from":"0x5e191fbbe22f8866c5e4250557664fce760e8870","gas":"0x67654","gasUsed":"0x1735","to":"0x7103465b8fa1ea34ea30731a8fd2ad5ddb10a872","input":"0x4be73c5b0000000000000000000000005c788fca118bf06cdb7ab679ffbbd9007b5375e7","output":"0x000000000000000000000000c128bb0e172baed9a6f575bb07c954ef0ebeddac0000000000000000000000000000000000000000000000000000000000000001","value":"0x0","type":"DELEGATECALL"}],"type":"STATICCALL"},{"from":"0xd019eb12d0d6ef8d299661f22b4b7d262ed4b965","gas":"0x66c2c","gasUsed":"0x27a6","to":"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238","input":"0x70a08231000000000000000000000000d019eb12d0d6ef8d299661f22b4b7d262ed4b965","output":"0x0000000000000000000000000000000000000000000000000000001c0c3cd1e0","calls":[{"from":"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238","gas":"0x6356e","gasUsed":"0x9f9","to":"0xda317c1d3e835dd5f1be459006471acaa1289068","input":"0x70a08231000000000000000000000000d019eb12d0d6ef8d299661f22b4b7d262ed4b965","output":"0x0000000000000000000000000000000000000000000000000000001c0c3cd1e0","value":"0x0","type":"DELEGATECALL"}],"type":"STATICCALL"},{"from":"0xd019eb12d0d6ef8d299661f22b4b7d262ed4b965","gas":"0x642e8","gasUsed":"0x1f133","to":"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238","input":"0xa9059cbb000000000000000000000000c128bb0e172baed9a6f575bb07c954ef0ebeddac0000000000000000000000000000000000000000000000000000000000002710","output":"0x0000000000000000000000000000000000000000000000000000000000000001","calls":[{"from":"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238","gas":"0x62754","gasUsed":"0x1ee77","to":"0xda317c1d3e835dd5f1be459006471acaa1289068","input":"0xa9059cbb000000000000000000000000c128bb0e172baed9a6f575bb07c954ef0ebeddac0000000000000000000000000000000000000000000000000000000000002710","output":"0x0000000000000000000000000000000000000000000000000000000000000001","value":"0x0","type":"DELEGATECALL"}],"value":"0x0","type":"CALL"},{"from":"0xd019eb12d0d6ef8d299661f22b4b7d262ed4b965","gas":"0x45608","gasUsed":"0x13731","to":"0xc128bb0e172baed9a6f575bb07c954ef0ebeddac","input":"0xc9ced48039e7d867cbea784422ecd5fb6382e5eb0b7400cdaa8e5fd70cfb43bfdd3a6913700aa6b1f514be92accb6434cea26b01aa01e16a0b173d00c89662f01b134c060000000000000000000000005c788fca118bf06cdb7ab679ffbbd9007b5375e7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002e42cc2842d00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001200000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000003bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e0000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000003bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e404e45aaf0000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238000000000000000000000000fff9976782d46cc05630d1f6ebab18b2324d6b140000000000000000000000000000000000000000000000000000000000000064000000000000000000000000c128bb0e172baed9a6f575bb07c954ef0ebeddac0000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","output":"0xacfdb444","error":"execution reverted","calls":[{"from":"0xc128bb0e172baed9a6f575bb07c954ef0ebeddac","gas":"0x43858","gasUsed":"0x12a83","to":"0x425291f35ba1a94bd2dcc2dc097c2b55700a1fb6","input":"0xc9ced48039e7d867cbea784422ecd5fb6382e5eb0b7400cdaa8e5fd70cfb43bfdd3a6913700aa6b1f514be92accb6434cea26b01aa01e16a0b173d00c89662f01b134c060000000000000000000000005c788fca118bf06cdb7ab679ffbbd9007b5375e7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002e42cc2842d00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001200000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000003bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e0000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000003bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e404e45aaf0000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238000000000000000000000000fff9976782d46cc05630d1f6ebab18b2324d6b140000000000000000000000000000000000000000000000000000000000000064000000000000000000000000c128bb0e172baed9a6f575bb07c954ef0ebeddac0000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","output":"0xacfdb444","error":"execution reverted","calls":[{"from":"0xc128bb0e172baed9a6f575bb07c954ef0ebeddac","gas":"0x41299","gasUsed":"0x4122e","to":"0x1972646e4208c5fe20914c3e09ba339df43d9cb0","input":"0xc9ced48039e7d867cbea784422ecd5fb6382e5eb0b7400cdaa8e5fd70cfb43bfdd3a6913700aa6b1f514be92accb6434cea26b01aa01e16a0b173d00c89662f01b134c060000000000000000000000005c788fca118bf06cdb7ab679ffbbd9007b5375e7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002e42cc2842d00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001200000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000003bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e0000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000003bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e404e45aaf0000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238000000000000000000000000fff9976782d46cc05630d1f6ebab18b2324d6b140000000000000000000000000000000000000000000000000000000000000064000000000000000000000000c128bb0e172baed9a6f575bb07c954ef0ebeddac0000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","output":"0xacfdb444","error":"execution reverted","calls":[{"from":"0xc128bb0e172baed9a6f575bb07c954ef0ebeddac","gas":"0x3f79b","gasUsed":"0xb6e","to":"0x5e191fbbe22f8866c5e4250557664fce760e8870","input":"0x411557d1","output":"0x000000000000000000000000d019eb12d0d6ef8d299661f22b4b7d262ed4b965","calls":[{"from":"0x5e191fbbe22f8866c5e4250557664fce760e8870","gas":"0x3e6a6","gasUsed":"0xa31","to":"0x7103465b8fa1ea34ea30731a8fd2ad5ddb10a872","input":"0x411557d1","output":"0x000000000000000000000000d019eb12d0d6ef8d299661f22b4b7d262ed4b965","value":"0x0","type":"DELEGATECALL"}],"type":"STATICCALL"},{"from":"0xc128bb0e172baed9a6f575bb07c954ef0ebeddac","gas":"0x2002c","gasUsed":"0x1ba6d","to":"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238","input":"0x095ea7b30000000000000000000000003bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e0000000000000000000000000000000000000000000000000000000000002710","output":"0x0000000000000000000000000000000000000000000000000000000000000001","calls":[{"from":"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238","gas":"0x1f5c3","gasUsed":"0x1b7d1","to":"0xda317c1d3e835dd5f1be459006471acaa1289068","input":"0x095ea7b30000000000000000000000003bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e0000000000000000000000000000000000000000000000000000000000002710","output":"0x0000000000000000000000000000000000000000000000000000000000000001","value":"0x0","type":"DELEGATECALL"}],"value":"0x0","type":"CALL"},{"from":"0xc128bb0e172baed9a6f575bb07c954ef0ebeddac","gas":"0x2dac","gasUsed":"0x2d91","to":"0x3bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e","input":"0x04e45aaf0000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c7238000000000000000000000000fff9976782d46cc05630d1f6ebab18b2324d6b140000000000000000000000000000000000000000000000000000000000000064000000000000000000000000c128bb0e172baed9a6f575bb07c954ef0ebeddac000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000","error":"execution reverted","calls":[{"from":"0x3bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e","gas":"0x101e","gasUsed":"0x101e","to":"0xfeed501c2b21d315f04946f85fc6416b640240b5","input":"0x128acb08000000000000000000000000c128bb0e172baed9a6f575bb07c954ef0ebeddac0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000001000276a400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000c128bb0e172baed9a6f575bb07c954ef0ebeddac000000000000000000000000000000000000000000000000000000000000002b1c7d4b196cb0c7b01d743fbc6116a902379c7238000064fff9976782d46cc05630d1f6ebab18b2324d6b14000000000000000000000000000000000000000000","error":"out of gas: not enough gas for reentrancy sentry","value":"0x0","type":"CALL"}],"value":"0x0","type":"CALL"}],"value":"0x0","type":"DELEGATECALL"}],"value":"0x0","type":"DELEGATECALL"}],"value":"0x0","type":"CALL"}],"value":"0x0","type":"DELEGATECALL"}],"value":"0x0","type":"CALL"}} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/sol-probe.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/sol-probe.json new file mode 100644 index 00000000..bb6eacee --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/sol-probe.json @@ -0,0 +1,378 @@ +{ + "at": "2026-10-20T16:29:02.017Z", + "rpc": "https://api.devnet.solana.com", + "readOnly": true, + "slot": 513220877, + "genesisHash": "EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG", + "rent": { + "0": 650240, + "8": 690880, + "82": 1066800, + "165": 1488440 + }, + "ceaDerived": "DKbAi4YmS5EfdvKHzS2zHKSSPfgiffu3ZddXoY4N2VuX", + "ceaMatchesEvidence": true, + "programs": { + "gatewayCFVS": { + "id": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "executable": true, + "owner": "BPFLoaderUpgradeab1e11111111111111111111111", + "dataLen": 36 + }, + "gatewayDJoF_pinnedSource": { + "id": "DJoFYDpgbTfxbXBv1QYhYGc9FK4J5FUKpYXAfSkHryXp", + "executable": true, + "owner": "BPFLoaderUpgradeab1e11111111111111111111111", + "dataLen": 36 + }, + "testCounter_sdkFixture": { + "id": "8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx", + "executable": true, + "owner": "BPFLoaderUpgradeab1e11111111111111111111111", + "dataLen": 36 + }, + "testCounter_sourceDeclareId": { + "id": "4mpHkerNsaJPp35fyT5bkoXxuEBczGq6HUKTtrzFcptx", + "executable": true, + "owner": "BPFLoaderUpgradeab1e11111111111111111111111", + "dataLen": 36 + }, + "testCounter_anchorToml": { + "id": "9LfpvcY2CYcNWEc2ip2ZwwKivEALbF3knwimXrbLubT2", + "executable": true, + "owner": "BPFLoaderUpgradeab1e11111111111111111111111", + "dataLen": 36 + }, + "splMemoV2": { + "id": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr", + "executable": true, + "owner": "BPFLoader2111111111111111111111111111111111", + "dataLen": 74800 + }, + "splMemoV1": { + "id": "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo", + "executable": true, + "owner": "BPFLoader1111111111111111111111111111111111", + "dataLen": 17072 + }, + "associatedToken": { + "id": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", + "executable": true, + "owner": "BPFLoader2111111111111111111111111111111111", + "dataLen": 105032 + } + }, + "ceaAta": { + "parsed": { + "info": { + "isNative": false, + "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "owner": "DKbAi4YmS5EfdvKHzS2zHKSSPfgiffu3ZddXoY4N2VuX", + "state": "initialized", + "tokenAmount": { + "amount": "0", + "decimals": 6, + "uiAmount": 0, + "uiAmountString": "0" + } + }, + "type": "account" + }, + "program": "spl-token", + "space": 165 + }, + "txs": { + "spl:first-use": { + "sig": "y8hK7xQWVs4mRupJAJDRBkbt1EnVmtQNxAhPhTbvJbfULrwARFimjvygaDskPawH44dntUaq5Tq6ubDDp7592q1", + "slot": 513205039, + "blockTime": "2026-10-20T15:26:08.000Z", + "err": null, + "fee": 5000, + "computeUnitsConsumed": 116402, + "signers": [ + "Bo5aMaGTHpTLQkF1b41wUiWKKDFWc9v6UsYdqouGz2uF" + ], + "programsInvoked": [ + "ComputeBudget111111111111111111111111111111", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "11111111111111111111111111111111", + "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", + "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx" + ], + "preTokenBalances": [ + { + "account": "oVL4eb7hqoq4iJEZ4mPf9Hgd5ys3EzaXuCpZ434aRRt", + "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "owner": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb", + "amount": "9995962000", + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + }, + { + "account": "9dzJzSyqmgYKLZwwP5FEzHv9gU72MXwsi6nL4oBrtWxd", + "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "owner": "89q1AUFb7YREHtjc1aYaPywovPq6tb3GYNPyDUJ3rshi", + "amount": "2131694221683", + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + } + ], + "postTokenBalances": [ + { + "account": "GuKBtW2xo53yMyj915CMCziHyyz1LaGxnfZBUDRJPd9K", + "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "owner": "DKbAi4YmS5EfdvKHzS2zHKSSPfgiffu3ZddXoY4N2VuX", + "amount": "0", + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + }, + { + "account": "oVL4eb7hqoq4iJEZ4mPf9Hgd5ys3EzaXuCpZ434aRRt", + "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "owner": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb", + "amount": "9995963000", + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + }, + { + "account": "9dzJzSyqmgYKLZwwP5FEzHv9gU72MXwsi6nL4oBrtWxd", + "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "owner": "89q1AUFb7YREHtjc1aYaPywovPq6tb3GYNPyDUJ3rshi", + "amount": "2131694220683", + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + } + ], + "innerTransfers": [ + { + "program": "11111111111111111111111111111111", + "type": "createAccount", + "info": { + "lamports": 690880, + "newAccount": "C1DGbew7Ypmw8acT54RiWrhEiMKfjnkbKfNrgqU7A3Lo", + "owner": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "source": "Bo5aMaGTHpTLQkF1b41wUiWKKDFWc9v6UsYdqouGz2uF", + "space": 8 + } + }, + { + "program": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", + "type": "create", + "info": { + "account": "GuKBtW2xo53yMyj915CMCziHyyz1LaGxnfZBUDRJPd9K", + "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "source": "Bo5aMaGTHpTLQkF1b41wUiWKKDFWc9v6UsYdqouGz2uF", + "systemProgram": "11111111111111111111111111111111", + "tokenProgram": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "wallet": "DKbAi4YmS5EfdvKHzS2zHKSSPfgiffu3ZddXoY4N2VuX" + } + }, + { + "program": "11111111111111111111111111111111", + "type": "createAccount", + "info": { + "lamports": 1488440, + "newAccount": "GuKBtW2xo53yMyj915CMCziHyyz1LaGxnfZBUDRJPd9K", + "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "source": "Bo5aMaGTHpTLQkF1b41wUiWKKDFWc9v6UsYdqouGz2uF", + "space": 165 + } + }, + { + "program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "type": "initializeAccount3", + "info": { + "account": "GuKBtW2xo53yMyj915CMCziHyyz1LaGxnfZBUDRJPd9K", + "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "owner": "DKbAi4YmS5EfdvKHzS2zHKSSPfgiffu3ZddXoY4N2VuX" + } + }, + { + "program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "type": "transfer", + "info": { + "amount": "1000", + "authority": "89q1AUFb7YREHtjc1aYaPywovPq6tb3GYNPyDUJ3rshi", + "destination": "GuKBtW2xo53yMyj915CMCziHyyz1LaGxnfZBUDRJPd9K", + "source": "9dzJzSyqmgYKLZwwP5FEzHv9gU72MXwsi6nL4oBrtWxd" + } + }, + { + "program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "type": "transfer", + "info": { + "amount": "1000", + "authority": "DKbAi4YmS5EfdvKHzS2zHKSSPfgiffu3ZddXoY4N2VuX", + "destination": "oVL4eb7hqoq4iJEZ4mPf9Hgd5ys3EzaXuCpZ434aRRt", + "source": "GuKBtW2xo53yMyj915CMCziHyyz1LaGxnfZBUDRJPd9K" + } + }, + { + "program": "11111111111111111111111111111111", + "type": "transfer", + "info": { + "destination": "Bo5aMaGTHpTLQkF1b41wUiWKKDFWc9v6UsYdqouGz2uF", + "lamports": 2184320, + "source": "89q1AUFb7YREHtjc1aYaPywovPq6tb3GYNPyDUJ3rshi" + } + } + ], + "logTail": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS invoke [1]", + "Program log: Instruction: FinalizeUniversalTx", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL invoke [2]", + "Program log: Create", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success", + "Program 11111111111111111111111111111111 invoke [3]", + "Program 11111111111111111111111111111111 success", + "Program log: Initialize the associated token account", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success", + "Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL success", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success", + "Program 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx invoke [2]", + "Program log: Instruction: ReceiveSpl", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success", + "Program log: Received 1000 tokens, counter incremented to: 201960018", + "Program 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx success", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS invoke [2]", + "Program CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS success", + "Program CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS success" + ] + }, + "spl:subsequent": { + "sig": "3G782PfUtqv3THZGt7vH5J9xoscMMFvKwUo215J2Hoh4APYHEHMGDcKBjix6je5y3M2DhoeuENkmqWEFrJgUjmLe", + "slot": 513205352, + "blockTime": "2026-10-20T15:27:22.000Z", + "err": null, + "fee": 5000, + "computeUnitsConsumed": 98301, + "signers": [ + "FkXGfYVbXT5euXjYabvZn4e6Ygc8aCYpFv9j1hKstw2H" + ], + "programsInvoked": [ + "ComputeBudget111111111111111111111111111111", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "11111111111111111111111111111111", + "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx" + ], + "preTokenBalances": [ + { + "account": "GuKBtW2xo53yMyj915CMCziHyyz1LaGxnfZBUDRJPd9K", + "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "owner": "DKbAi4YmS5EfdvKHzS2zHKSSPfgiffu3ZddXoY4N2VuX", + "amount": "0", + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + }, + { + "account": "oVL4eb7hqoq4iJEZ4mPf9Hgd5ys3EzaXuCpZ434aRRt", + "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "owner": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb", + "amount": "9995963000", + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + }, + { + "account": "9dzJzSyqmgYKLZwwP5FEzHv9gU72MXwsi6nL4oBrtWxd", + "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "owner": "89q1AUFb7YREHtjc1aYaPywovPq6tb3GYNPyDUJ3rshi", + "amount": "2131694220683", + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + } + ], + "postTokenBalances": [ + { + "account": "GuKBtW2xo53yMyj915CMCziHyyz1LaGxnfZBUDRJPd9K", + "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "owner": "DKbAi4YmS5EfdvKHzS2zHKSSPfgiffu3ZddXoY4N2VuX", + "amount": "0", + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + }, + { + "account": "oVL4eb7hqoq4iJEZ4mPf9Hgd5ys3EzaXuCpZ434aRRt", + "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "owner": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb", + "amount": "9995964000", + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + }, + { + "account": "9dzJzSyqmgYKLZwwP5FEzHv9gU72MXwsi6nL4oBrtWxd", + "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "owner": "89q1AUFb7YREHtjc1aYaPywovPq6tb3GYNPyDUJ3rshi", + "amount": "2131694219683", + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + } + ], + "innerTransfers": [ + { + "program": "11111111111111111111111111111111", + "type": "createAccount", + "info": { + "lamports": 690880, + "newAccount": "GUb4aohCTdbQZPSWb8FiT3rGebgh3EYU8v16nyfWU5Zy", + "owner": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "source": "FkXGfYVbXT5euXjYabvZn4e6Ygc8aCYpFv9j1hKstw2H", + "space": 8 + } + }, + { + "program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "type": "transfer", + "info": { + "amount": "1000", + "authority": "89q1AUFb7YREHtjc1aYaPywovPq6tb3GYNPyDUJ3rshi", + "destination": "GuKBtW2xo53yMyj915CMCziHyyz1LaGxnfZBUDRJPd9K", + "source": "9dzJzSyqmgYKLZwwP5FEzHv9gU72MXwsi6nL4oBrtWxd" + } + }, + { + "program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "type": "transfer", + "info": { + "amount": "1000", + "authority": "DKbAi4YmS5EfdvKHzS2zHKSSPfgiffu3ZddXoY4N2VuX", + "destination": "oVL4eb7hqoq4iJEZ4mPf9Hgd5ys3EzaXuCpZ434aRRt", + "source": "GuKBtW2xo53yMyj915CMCziHyyz1LaGxnfZBUDRJPd9K" + } + }, + { + "program": "11111111111111111111111111111111", + "type": "transfer", + "info": { + "destination": "FkXGfYVbXT5euXjYabvZn4e6Ygc8aCYpFv9j1hKstw2H", + "lamports": 695880, + "source": "89q1AUFb7YREHtjc1aYaPywovPq6tb3GYNPyDUJ3rshi" + } + } + ], + "logTail": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS invoke [1]", + "Program log: Instruction: FinalizeUniversalTx", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success", + "Program 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx invoke [2]", + "Program log: Instruction: ReceiveSpl", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3]", + "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success", + "Program log: Received 1000 tokens, counter incremented to: 201961018", + "Program 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx success", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS invoke [2]", + "Program CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS success", + "Program CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS success" + ] + } + } +} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/spl-rule-readback.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/spl-rule-readback.json new file mode 100644 index 00000000..07fa9e65 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/spl-rule-readback.json @@ -0,0 +1,128 @@ +{ + "at": "2026-10-20T17:32:25.720Z", + "readOnly": true, + "block": "24458787", + "wallet": "0xed6bfe825b8d84a1e6f4f7c9067398f8985cc372", + "rulesId": "0x91ca4f52a5e7f8a27146232cd7cc1f5d957009d1c6763c473b5d1e74b729e248", + "originalAccounts": [ + { + "pubkey": "0x4f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af", + "isWritable": true, + "writableFlag": 1 + }, + { + "pubkey": "0xec461225ee62f450765de61547c5aed0b4edb46c70da56afc5ea7cb1a2fe1ff2", + "isWritable": true, + "writableFlag": 1 + }, + { + "pubkey": "0x0be8bfa0ceae1ac81eaf3a39d5e3a144251d7eba559ac4a080d019cb2822725b", + "isWritable": true, + "writableFlag": 1 + }, + { + "pubkey": "0xb70f54b3150c7f8b8bb27e808a3b2bc7ced1bd64656bd4a5b392fd0cd27bc3ee", + "isWritable": false, + "writableFlag": 0 + }, + { + "pubkey": "0x06ddf6e1d765a193d9cbe146ceeb79ac1cb485ed5f5b37913a8cf5857eff00a9", + "isWritable": false, + "writableFlag": 0 + } + ], + "record": { + "rulesId": "0x91ca4f52a5e7f8a27146232cd7cc1f5d957009d1c6763c473b5d1e74b729e248", + "enabled": true, + "agent": "0x8FB1CF80a014af564bDC12E557a3E52432F4657b", + "chainNamespace": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "validUntil": 1792513451, + "spent": { + "kind": "universal", + "assets": [ + { + "token": "0xcbcae9e66452fe98abcf0fa51e557fc8d671c7fc6ce83c05f92992a3d2bf1932", + "spent": "2000" + } + ] + }, + "rule": { + "format": "decoded", + "agent": "0x8FB1CF80a014af564bDC12E557a3E52432F4657b", + "chainNamespace": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "validUntil": 1792513451, + "expectedCEA": "0xb70f54b3150c7f8b8bb27e808a3b2bc7ced1bd64656bd4a5b392fd0cd27bc3ee", + "gatewayProgram": "0xa726d940296890606ae77be948a7726799b7e19076ced8c14c6ed43e98b7a6e5", + "maxGasPerCall": "20000000000000000000", + "assets": [ + { + "token": "0xcbcae9e66452fe98abcf0fa51e557fc8d671c7fc6ce83c05f92992a3d2bf1932", + "maxPerCall": "1000", + "maxTotal": "2000" + } + ], + "ceaAccounts": [ + "0xb70f54b3150c7f8b8bb27e808a3b2bc7ced1bd64656bd4a5b392fd0cd27bc3ee", + "0xec461225ee62f450765de61547c5aed0b4edb46c70da56afc5ea7cb1a2fe1ff2" + ], + "programs": [ + { + "program": "0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", + "discriminator": "0xb654fa2e8aa449c4", + "discriminatorLen": 8, + "dataless": false, + "maxAccounts": 255 + } + ], + "pins": [ + { + "ruleIndex": 0, + "accountIndex": 0, + "expected": "0x4f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af" + }, + { + "ruleIndex": 0, + "accountIndex": 1, + "expected": "0xec461225ee62f450765de61547c5aed0b4edb46c70da56afc5ea7cb1a2fe1ff2" + }, + { + "ruleIndex": 0, + "accountIndex": 2, + "expected": "0x0be8bfa0ceae1ac81eaf3a39d5e3a144251d7eba559ac4a080d019cb2822725b" + }, + { + "ruleIndex": 0, + "accountIndex": 3, + "expected": "0xb70f54b3150c7f8b8bb27e808a3b2bc7ced1bd64656bd4a5b392fd0cd27bc3ee" + }, + { + "ruleIndex": 0, + "accountIndex": 4, + "expected": "0x06ddf6e1d765a193d9cbe146ceeb79ac1cb485ed5f5b37913a8cf5857eff00a9" + } + ], + "dataPins": [ + { + "ruleIndex": 0, + "fromEnd": false, + "offset": 8, + "offsetB": 0, + "len": 8, + "mode": 2, + "expected": "0x00000000000000000000000000000000000000000000000000000000000003e8", + "num": "0", + "den": "0" + } + ] + } + }, + "wrongRecipient": { + "ata": "7PKuD1YUQxRuEE3qZVxUL8D1vaifMzWFSAeRhZ7dtFK6", + "refusal": { + "name": "PolicyCheckReverted(RulesExpired)", + "selector": "0xf4270752", + "decoded": "0x435b324e00000000000000000000000000000000000000000000000000000000", + "hint": "URP rejected the action (truncated through the session engine). The inner selector names the gate; arguments are truncated to 28 bytes." + } + } +} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/spl-wrong-recipient-24456030.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/spl-wrong-recipient-24456030.json new file mode 100644 index 00000000..053ab012 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/spl-wrong-recipient-24456030.json @@ -0,0 +1,128 @@ +{ + "at": "2026-10-20T17:33:05.619Z", + "readOnly": true, + "block": "24456030", + "wallet": "0xed6bfe825b8d84a1e6f4f7c9067398f8985cc372", + "rulesId": "0x91ca4f52a5e7f8a27146232cd7cc1f5d957009d1c6763c473b5d1e74b729e248", + "originalAccounts": [ + { + "pubkey": "0x4f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af", + "isWritable": true, + "writableFlag": 1 + }, + { + "pubkey": "0xec461225ee62f450765de61547c5aed0b4edb46c70da56afc5ea7cb1a2fe1ff2", + "isWritable": true, + "writableFlag": 1 + }, + { + "pubkey": "0x0be8bfa0ceae1ac81eaf3a39d5e3a144251d7eba559ac4a080d019cb2822725b", + "isWritable": true, + "writableFlag": 1 + }, + { + "pubkey": "0xb70f54b3150c7f8b8bb27e808a3b2bc7ced1bd64656bd4a5b392fd0cd27bc3ee", + "isWritable": false, + "writableFlag": 0 + }, + { + "pubkey": "0x06ddf6e1d765a193d9cbe146ceeb79ac1cb485ed5f5b37913a8cf5857eff00a9", + "isWritable": false, + "writableFlag": 0 + } + ], + "record": { + "rulesId": "0x91ca4f52a5e7f8a27146232cd7cc1f5d957009d1c6763c473b5d1e74b729e248", + "enabled": true, + "agent": "0x8FB1CF80a014af564bDC12E557a3E52432F4657b", + "chainNamespace": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "validUntil": 1792513451, + "spent": { + "kind": "universal", + "assets": [ + { + "token": "0xcbcae9e66452fe98abcf0fa51e557fc8d671c7fc6ce83c05f92992a3d2bf1932", + "spent": "2000" + } + ] + }, + "rule": { + "format": "decoded", + "agent": "0x8FB1CF80a014af564bDC12E557a3E52432F4657b", + "chainNamespace": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "validUntil": 1792513451, + "expectedCEA": "0xb70f54b3150c7f8b8bb27e808a3b2bc7ced1bd64656bd4a5b392fd0cd27bc3ee", + "gatewayProgram": "0xa726d940296890606ae77be948a7726799b7e19076ced8c14c6ed43e98b7a6e5", + "maxGasPerCall": "20000000000000000000", + "assets": [ + { + "token": "0xcbcae9e66452fe98abcf0fa51e557fc8d671c7fc6ce83c05f92992a3d2bf1932", + "maxPerCall": "1000", + "maxTotal": "2000" + } + ], + "ceaAccounts": [ + "0xb70f54b3150c7f8b8bb27e808a3b2bc7ced1bd64656bd4a5b392fd0cd27bc3ee", + "0xec461225ee62f450765de61547c5aed0b4edb46c70da56afc5ea7cb1a2fe1ff2" + ], + "programs": [ + { + "program": "0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", + "discriminator": "0xb654fa2e8aa449c4", + "discriminatorLen": 8, + "dataless": false, + "maxAccounts": 255 + } + ], + "pins": [ + { + "ruleIndex": 0, + "accountIndex": 0, + "expected": "0x4f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af" + }, + { + "ruleIndex": 0, + "accountIndex": 1, + "expected": "0xec461225ee62f450765de61547c5aed0b4edb46c70da56afc5ea7cb1a2fe1ff2" + }, + { + "ruleIndex": 0, + "accountIndex": 2, + "expected": "0x0be8bfa0ceae1ac81eaf3a39d5e3a144251d7eba559ac4a080d019cb2822725b" + }, + { + "ruleIndex": 0, + "accountIndex": 3, + "expected": "0xb70f54b3150c7f8b8bb27e808a3b2bc7ced1bd64656bd4a5b392fd0cd27bc3ee" + }, + { + "ruleIndex": 0, + "accountIndex": 4, + "expected": "0x06ddf6e1d765a193d9cbe146ceeb79ac1cb485ed5f5b37913a8cf5857eff00a9" + } + ], + "dataPins": [ + { + "ruleIndex": 0, + "fromEnd": false, + "offset": 8, + "offsetB": 0, + "len": 8, + "mode": 2, + "expected": "0x00000000000000000000000000000000000000000000000000000000000003e8", + "num": "0", + "den": "0" + } + ] + } + }, + "wrongRecipient": { + "ata": "7PKuD1YUQxRuEE3qZVxUL8D1vaifMzWFSAeRhZ7dtFK6", + "refusal": { + "name": "PolicyCheckReverted(SvmAccountPinMismatch)", + "selector": "0xf4270752", + "decoded": "0xff3dafe500000000000000000000000000000000000000000000000000000000", + "hint": "URP rejected the action (truncated through the session engine). The inner selector names the gate; arguments are truncated to 28 bytes." + } + } +} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/data/uregistry.json b/plan/agw/independent-review-creation-flow-2026-10-20/data/uregistry.json new file mode 100644 index 00000000..e5355542 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/data/uregistry.json @@ -0,0 +1,359 @@ +{ + "at": "2026-10-20T16:35:03.420Z", + "rpc": "https://donut.rpc.push.org:443", + "readOnly": true, + "node": { + "data": "pchain", + "version": "v0.0.49", + "last_block_height": "24457376", + "last_block_app_hash": "wr8bURwcbmXqV9hZSYbskjYHGZLiJnYcr+BSsd0lc1w=" + }, + "height": "24457377", + "tokenConfigs": [ + { + "chain": "eip155:11155111", + "address": "0x0000000000000000000000000000000000000000", + "name": "pETH", + "symbol": "pETH", + "decimals": 18, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0x2971824Db68229D087931155C2b8bB820B275809" + } + }, + { + "chain": "eip155:11155111", + "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "name": "USDC.eth.old", + "symbol": "USDC.eth.old", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E" + } + }, + { + "chain": "eip155:11155111", + "address": "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af", + "name": "stETH.eth", + "symbol": "stETH.eth", + "decimals": 18, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0xaf89E805949c628ebde3262e91dc4ab9eA12668E" + } + }, + { + "chain": "eip155:11155111", + "address": "0x7169D38820dfd117C3FA1f22a697dBA58d90BA06", + "name": "USDT.eth.old", + "symbol": "USDT.eth.old", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0xCA0C5E6F002A389E1580F0DB7cd06e4549B5F9d3" + } + }, + { + "chain": "eip155:11155111", + "address": "0x97F477B7f970D47a87B42869ceeace218106152a", + "name": "USDC.eth", + "symbol": "USDC.eth", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0x7A58048036206bB898008b5bBDA85697DB1e5d66" + } + }, + { + "chain": "eip155:11155111", + "address": "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876", + "name": "USDT.eth", + "symbol": "USDT.eth", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0x0f97A213207703923F5f0C613C9827f7C9A0f96B" + } + }, + { + "chain": "eip155:11155111", + "address": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "name": "WETH.eth", + "symbol": "WETH.eth", + "decimals": 18, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0x0d0dF7E8807430A81104EA84d926139816eC7586" + } + }, + { + "chain": "eip155:421614", + "address": "0x0000000000000000000000000000000000000000", + "name": "pETH.arb", + "symbol": "pETH.arb", + "decimals": 18, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e" + } + }, + { + "chain": "eip155:421614", + "address": "0x1419d7C74D234fA6B73E06A2ce7822C1d37922f0", + "name": "USDT.arb.old", + "symbol": "USDT.arb.old", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0x76Ad08339dF606BeEDe06f90e3FaF82c5b2fb2E9" + } + }, + { + "chain": "eip155:421614", + "address": "0x5dd39b0b3610F666F631a6506b7713EF83e1Ac5C", + "name": "USDC.arb", + "symbol": "USDC.arb", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0x1091cCBA2FF8d2A131AE4B35e34cf3308C48572C" + } + }, + { + "chain": "eip155:421614", + "address": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "name": "USDC.arb.old", + "symbol": "USDC.arb.old", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6" + } + }, + { + "chain": "eip155:421614", + "address": "0xE30928528f52CAEeB75fB07837e22d77D47e9c07", + "name": "USDT.arb", + "symbol": "USDT.arb", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0xFE6E9DF2BbC9ce05D98b83B1365df6DcA9951891" + } + }, + { + "chain": "eip155:84532", + "address": "0x0000000000000000000000000000000000000000", + "name": "pETH.base", + "symbol": "pETH.base", + "decimals": 18, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21" + } + }, + { + "chain": "eip155:84532", + "address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "name": "USDC.base.old", + "symbol": "USDC.base.old", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0x84B62e44F667F692F7739Ca6040cD17DA02068A8" + } + }, + { + "chain": "eip155:84532", + "address": "0x4D7646B9eE3D68F4b0F135B5cbc66B00819F6b61", + "name": "USDT.base", + "symbol": "USDT.base", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0x148823809B853e1db187BC09A9ac909BC42F971a" + } + }, + { + "chain": "eip155:84532", + "address": "0x5c3504F0E3bA28FDc1F74234fE936518276AaBB8", + "name": "USDC.base", + "symbol": "USDC.base", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0xD7C6cA1e2c0CE260BE0c0AD39C1540de460e3Be1" + } + }, + { + "chain": "eip155:84532", + "address": "0x9FF5a186f53F6E6964B00320Da1D2024DE11E0cB", + "name": "USDT.base.old", + "symbol": "USDT.base.old", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0x2C455189D2af6643B924A981a9080CcC63d5a567" + } + }, + { + "chain": "eip155:97", + "address": "0x0000000000000000000000000000000000000000", + "name": "pBNB", + "symbol": "pBNB", + "decimals": 18, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36" + } + }, + { + "chain": "eip155:97", + "address": "0xA8802F96cAd0d45343d9bc660B6f7d80050A660b", + "name": "USDC.bsc", + "symbol": "USDC.bsc", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0x120EBf25Dad7D6a09Ad2316f23f9Be95DBb90639" + } + }, + { + "chain": "eip155:97", + "address": "0xBC14F348BC9667be46b35Edc9B68653d86013DC5", + "name": "USDT.bsc.old", + "symbol": "USDT.bsc.old", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0x2f98B4235FD2BA0173a2B056D722879360B12E7b" + } + }, + { + "chain": "eip155:97", + "address": "0xE935d9c9C24D02E61186c640cc01d713C876d40F", + "name": "USDT.bsc", + "symbol": "USDT.bsc", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 1, + "native": { + "contractAddress": "0x731aF1Da5365259d27528557EE4aFBA4baC90ef2" + } + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "address": "0x0000000000000000000000000000000000000000", + "name": "pSOL", + "symbol": "pSOL", + "decimals": 9, + "liquidityCap": "1000000000000000000000000", + "tokenType": 4, + "native": { + "contractAddress": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed" + } + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "address": "11111111111111111111111111111111", + "name": "pSOL", + "symbol": "pSOL", + "decimals": 9, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 4, + "native": { + "contractAddress": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed" + } + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "address": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU", + "name": "USDC.sol", + "symbol": "USDC.sol", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 4, + "native": { + "contractAddress": "0x04B8F634ABC7C879763F623e0f0550a4b5c4426F" + } + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "address": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", + "name": "USDT.sol", + "symbol": "USDT.sol", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 4, + "native": { + "contractAddress": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34" + } + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "address": "G2ZLaRhpohW23KTEX3fBjZXtNTFFwemqCaWWnWVTj4TB", + "name": "DAI.sol", + "symbol": "DAI.sol", + "decimals": 6, + "enabled": true, + "liquidityCap": "1000000000000000000000000", + "tokenType": 4, + "native": { + "contractAddress": "0x5861f56A556c990358cc9cccd8B5baa3767982A8" + } + } + ], + "chainConfigCount": 5, + "chainConfigsRaw": [ + "eip155:11155111", + "eip155:421614", + "eip155:84532", + "eip155:97", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1" + ] +} \ No newline at end of file diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/decision-matrix.md b/plan/agw/independent-review-creation-flow-2026-10-20/decision-matrix.md new file mode 100644 index 00000000..ac83a453 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/decision-matrix.md @@ -0,0 +1,151 @@ +# Decision matrix: AGW creation flow, 20 October 2026 + +"Today" means what works with the deployed v6 contracts and the current public SDK API, with no code changes. Findings (F#) refer to [review.md](review.md). + +## A. Preset routes and default tokens + +| Option | Supported today | Requires SDK work | Requires contract / infra work | +|---|---|---|---| +| A1. Keep the exact protocol tokens and add **node-registered** routes the SDK is missing (Circle USDC on Sepolia, Base and Arbitrum → `0x387b…`, `0x84B6…`, `0xa261…`) | The routes are on-chain, enabled and Vault-backed | An address-keyed AGW route table (the symbol registry cannot hold two USDCs on one chain), then readiness, preparation and a funded E2E | Core/node confirms the `.old` routes are supported for outbound | +| A2. Keep the exact tokens; provision missing routes (LINK ×2, EigenLayer WETH, Base/Arbitrum WETH, WBNB, Venus USDT/USDC, Moonwell ×2) | No | Register them once supplied | Per token: a uregistry `TokenConfig` with PRC20 `native_representation`, PRC20 deploy/init, UniversalCore gas config, inbound gateway threshold, and Vault liquidity from inbound deposits | +| A3. Native export plus destination wrap for the WETH/WBNB legs and EigenLayer WETH | Authorable today as a *custom* rule (`maxValue` on `deposit()`) | `presets.get` refuses native markers in DEX presets and builds swap pairs only from export assets. Needs catalog/generation changes and a check of each router's WETH9 | None (native routes are live) | +| A4. Replace protocol tokens with same-symbol routed mocks | Possible, but unusable | — | No Aave/Venus/Moonwell market or protocol pools exist for the mocks | +| A5. "Partial" presets: export only the routed tokens, and still allow swaps or supplies of a destination-held token | No (swap pins are built from export assets) | Separate "operation tokens" from "export assets" in preset generation | None | + +**Recommendation:** do A1 now, gated on the core confirmation. This turns DEXES Sepolia and LENDING Arbitrum Sepolia ready, and covers the USDC leg of DEXES Base/Arbitrum. + +- Ask product to choose between A3 and A2 for the WETH/WBNB legs and EigenLayer. +- Ask core for A2 on the LINK, Moonwell and Venus tokens. +- Reject A4. +- A5 is optional and needs product sign-off, because it changes what "selected token" means. + +**Change from our recommendation:** "keep actual protocol tokens and obtain PRC20 routes" remains right. However, three of those routes do not need to be "obtained": they already exist in the node registry. The ask to core shrinks from 13 tokens to 10, plus one confirmation. + +## B. Apps optional / transfer-only + +What the contracts require: + +- Universal rules: at least one allowed call, and at least one destination call per request. +- `req.recipient` must be empty, so funds always land in the wallet's CEA. +- Value-only inner calls are refused. +- Solana's System and Token programs are forbidden targets. + +| Option | Today | SDK work | Contract work | What it permits | +|---|---|---|---|---| +| B1. Named recipient allow-list (EVM ERC20) | **Yes, as an explicit rule**: `transfer(address,uint256)` with `arg 0 = R` and `arg 1 ≤ X` | An optional UI/SDK helper that synthesizes the entries (≤32 entries / ≤32 pins; 2 pins each) | None | Exported *and* CEA-held units of each listed token go only to R. Each transfer is ≤ X; there are ≤10 per request and unlimited requests until expiry. Exports are also capped by `maxPerCall`/`maxTotal` | +| B2. Any recipient | Yes (no pin on `to`) | Helper | None | Full custody of CEA-held balances of those tokens. Exports are still capped. **Not recommended** without explicit security sign-off | +| B3. Wallet-owned destination only | `to = CEA` is a self-transfer and does nothing. "Owner's own address on that chain" is B1 with R = owner | The SDK can prefill R when the owner's origin chain equals the destination | None | Same as B1 | +| B4. Keep requiring explicit app functions | Yes (current behavior; `ALLOWED_FUNCTION_REQUIRED`) | Better UI copy only | None | — | +| Native coins on EVM (ETH/BNB) | No agent value-only call. Possible as wrap-then-transfer WETH (two entries) | Helper; the label must say "WETH" | A value-transfer primitive would be contract work | The recipient receives WETH, not ETH | +| Solana SOL/SPL | **No** | — | Allow a constrained transfer path, or deploy a reviewed transfer-router program | — | +| Push native (PC / Push tokens) | Value-only actions to ≤8 fixed recipients; ERC20 `transfer` per token with one pinned recipient (duplicates are refused) | Exposing native `maxValueTotal`, `maxCalls` and `AmountRule` needs a spec/SDK change | None (the contract supports totals) | Per-call caps today; totals are possible with SDK work | + +**Recommendation:** ship B4 now. After product agrees the semantics, build B1 as the "apps optional" option for EVM ERC20 only, with explicit recipients and **per-transfer** caps. Example scope: + +```ts +{ + agent, chainNamespace: 'eip155:11155111', validUntil, maxGasPerCall: parseEther('20'), + assets: [{ token: WETH, maxPerCall: parseEther('0.001'), maxTotal: parseEther('0.01') }], + allowedCalls: [{ target: WETH, selector: 'transfer(address,uint256)', + pins: [{ arg: 0, expected: RECIPIENT }, { arg: 1, max: parseEther('0.001') }] }], +} +``` + +This allows at most 0.001 WETH exported per send and 0.01 WETH exported over the rule's lifetime. It also allows WETH already in the Sepolia CEA to go to `RECIPIENT`, at most 0.001 per transfer, an unlimited number of times until expiry. + +Exclude native coins and Solana from the first version. + +**Change from our recommendation:** the direction is correct. Add three things: +- this needs no contract change for EVM ERC20; +- Solana is contract work, not just "representability limits"; +- B3 is meaningless unless it means the owner's own address. + +## C. No tokens selected / all tokens + +Facts: + +| Topic | Fact | +|---|---| +| General rules | `assets` omitted or `[]` becomes `[{gas PRC20, 0, 0}]` on EVM (`prepare.ts:89-101`) and on Solana (`management/svm-public.ts:45-47`). Nothing can be exported; allowed calls can still use balances the CEA already holds | +| Presets | Omitted means curated defaults with reviewed caps. `[]` means no assets, and readiness reports `ASSETS_REQUIRED` and `TOKEN_PAIR_REQUIRED` | +| Contract | 1..8 explicit assets (`Types.sol:199`; `RulesLib.sol:39`). No wildcard: `address(0)` and `0xEeee…` fail `InvalidAsset`. Future tokens are never implicitly authorized | + +| Option | Today | SDK work | Contract work | +|---|---|---|---| +| C1. `[]` = no export authority (current) | Yes | Wording | None | +| C2. "All supported tokens (N)", expanded to an explicit list ≤8 per chain with per-token caps. Routed counts today: Sepolia 7, Base 5, Arbitrum 5, BNB 4, Solana 4 | Yes for assets and transfer rules. Not for DEX presets (N(N−1)×2 swap entries exceed 32 when N≥5) | Expansion from uregistry or the registry; read decimals on-chain; a reviewed per-token cap table; regenerate when the registry changes | None | +| C3. True wildcard (any current or future PRC20, aggregate cap) | No | — | New asset model, and possibly an oracle for value-based caps | + +**Recommendation:** keep C1. Offer C2 only with caps the user enters or that come from a reviewed table, never implicit maximums, and show the expanded list before signing. C3 needs product and contract design. + +**Change from our recommendation:** none; confirmed. Add that "empty" restricts exports only, not activity with balances the destination already holds. + +## D. Spending-limit scope + +Ship now, with these labels: + +- **"Max per send from Push"** → `assets[i].maxPerCall` +- **"Total sendable from Push with this rule"** → `maxTotal`. Help text: "Counts tokens sent from Push, including sends that later fail on {chain}. Funds already in the wallet's {chain} account are not counted." +- **"Max per action"** → pin `max` / `maxValue`. Help text: "Each action is limited separately. The agent can repeat actions until the rule expires." +- **"Gas budget per transaction (PC)"** → `maxGasPerCall`. Help text: "The most PC attached for gas on one transaction. Unused gas is refunded. There is no total gas limit; the wallet's PC balance is the only limit." +- For DEX presets: "Limits amounts, not price. Swaps can execute at a poor price." +- For lending: "Borrowing is limited per action, not total debt." + +| Want | Requires | +|---|---| +| Sum of calls within one request | Contract | +| Cumulative destination spend per token | Contract (destination accounting) | +| Refund of `maxTotal` after a failed send | Push-core executor calling `creditRevert` | +| Cumulative native (Push) totals | **SDK/spec only** (the contract supports `maxValueTotal`, `maxCalls`, `AmountRule`) | +| Slippage bounds | SDK catalog work (pin `amountOutMinimum` relative to the amount where the protocol allows it) or product acceptance of the risk | + +**Change from our recommendation:** confirmed, with two corrections. `maxTotal` also counts sends that fail on the destination, and native rules *can* enforce totals today at contract level. + +## E. Gas: what each quantity means, and the guidance + +| Quantity | Meaning | Observed | +|---|---|---| +| 1. `maxGasPerCall` | Owner ceiling on the PC `value` attached per request (URP:593) | Preset 20 PC | +| 2. `gasLimit` | Multiplier for the chain's gas price. EVM: gas units. Solana: units × 1000 lamports. 0 means the core base (500,000 EVM; 960 Solana). Below the base reverts | EVM first use 2,000,000 (SDK); subsequent 500,000. Solana 2,285 / 960 | +| 3. Attached PC | The SDK budget: max($1, gas USD), capped at $10, plus protocolFee, converted at the agent-origin rate | 10 PC (Push-native at fixed $0.10) | +| 4. Push signer gas | The agent EOA's own Push transaction fee | 0.00042–0.00053 PC | +| 5. Destination fee | EVM gas used × price; Solana relayer reimbursement | EVM 123k–1.27M gas. Solana 2,184,320 / 695,880 lamports | +| 6. Net consumed / refunded | `SwapAndBurnGas.pcIn` consumed; the remainder refunded in the same transaction (balances confirmed) | 0.0008–2.37 PC consumed; 7.6–10 PC refunded | + +| Option | Today | SDK work | Contract work | +|---|---|---|---| +| E1. Keep 20 PC for presets | Works for Sepolia, Base, Arbitrum and Solana at current prices. **Fails BNB first use** when Donut's BNB gas price is 1.1 gwei | Per-chain caveat | None | +| E2. Per-chain preset ceilings (for example BNB 60 PC) | Yes | Constants | None | +| E3. Quote-driven UI prefill (`max(20 PC, 2 × current first-use attached quote)` for the agent's origin) | No public quote helper | A public read-only `quoteGasBudget(chain, {agentOrigin, firstUse})` (spec addition) | None | +| E4. Size the gas budget from the Donut pool, not USD; fix BNB pricing; stop dropping the over-$10 overflow (F5) | — | Yes | None | +| E5. A cumulative gas cap | — | — | Contract | + +**Recommendation:** + +- Keep the Solana fix. +- Keep 20 PC only as a ceiling, never as an expected fee, and add a BNB-testnet caveat or move to E2 now. +- Do E4 before mainnet. +- The custom-rule prefill of 0.1 PC can never work: the SDK's minimum attached amount is 4.3–11 PC depending on agent origin. **Do not change the SDK's custom-rule default** (zero is rejected for EVM, which is intended). Have the UI prefill with the preset per-chain values, or with E3 once it exists. +- Also reject zero `maxGasPerCall` on Solana (F11). + +**Change from our recommendation:** "20 PC covers the checked quote profiles" must become "covered the runs at these blocks; BNB first use exceeds it at Donut's current BNB gas price". The 10 PC figure must be described as the SDK's floor. + +## F. Solana program coverage + +| Option | Today | SDK work | Contract / infra | +|---|---|---|---| +| F1. Keep `test_counter.receive_spl` | Verified (SPL credit, ATA pin, data ceiling) | Add a wrong-recipient case and full-pin readback | None | +| F2. SPL Memo v2 `MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr` (executable on devnet, not forbidden) | Rule: raw 8-byte prefix plus CEA account pin. Send: synthetic IDL through `utils.svm.registerIdl` | Local URP acceptance and a funded run | Gateway owners confirm a CEA-signed non-Anchor CPI works | +| F3. A third-party devnet protocol | Mostly no (dynamic args, optional accounts and non-Anchor are unsupported in the public API) | Large | — | +| F4. A team-deployed reviewed program with fixed-width args | — | Register the IDL | Program ID, IDL, deployment | + +**Recommendation:** F1 plus F2 for UI E2E. Memo proves a second, non-test-counter program executes under the CEA's signature. It does not test token movement. If token movement through a second program is required, request F4. + +## G. Native function count + +| Option | Today | Work | +|---|---|---| +| G1. Spec says 1..32 for EVM/Solana and 1..8 distinct (target, function) for Push | SDK enforces 8 | Spec/doc only | +| G2. Raise the native ceiling | No | Contract (`MAX_NATIVE_ACTIONS`) and redeploy | + +**Recommendation:** G1, unless product shows a real need for more than 8 Push functions in one rule. Users can also create several rules for the same agent. This is not a delivery blocker. diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/evidence.md b/plan/agw/independent-review-creation-flow-2026-10-20/evidence.md new file mode 100644 index 00000000..f7bd3caf --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/evidence.md @@ -0,0 +1,106 @@ +# Evidence: independent review, 20 October 2026 + +Review window: 16:00Z–16:45Z on 20 October 2026. + +I made no changes to production code, made no commits or pushes, published nothing, deployed nothing and broadcast no transactions. I did not load `.env` files or keys. + +## 1. Revisions and working tree + +### SDK `push-chain-sdk`, branch `feat/agw-sdk-v4` + +- HEAD `525c7186795b43ce1d9c9436701080826b049e22`, which matches `origin/feat/agw-sdk-v4`. +- Working tree at the start and the end of the review was the same 17 entries (`git status --porcelain` md5 `292be838177608c819a080d17cc388ca`). +- Modified, tracked: `packages/core/AGW.md`, `__e2e__/ci/preflight.ts`, `__e2e__/ci/suite.ts`, `src/lib/agentic/execution/svm-public.ts`, `plan/agw/implementation-status.md`, `plan/agw/questions-harsh.md`, `plan/agw/questions-zaryab.md`. +- Untracked: + - `__agw-local__/preset-acceptance.spec.ts` + - `__e2e__/agw/{gas-live,presets-acceptance,svm-agent-spl}.spec.ts` + - `__e2e__/shared/{agw-gas-evidence,agw-preset-acceptance}.ts` + - `scripts/check-agw-{gas-quotes,preset-compatibility}.js` + - `src/lib/agentic/__tests__/svm-send-defaults.spec.ts` + - `plan/agw/research/preset-acceptance-2026-10-20/` +- Every file above was read in full. The raw working-tree diff was taken with `rtk proxy git diff`. + +### Release worktree `push-chain-sdk-agw-v5`, branch `feat/agw-sdk-v5` + +- HEAD `71d556b60f987f8579ef4d639034b86e8dbbb90f`, clean. +- `origin/feat/agw-sdk-v5` = `fa50f367…`, the version-bump commit. +- `git diff 525c7186 71d556b6 -- packages/core/src packages/core/AGW.md` shows only the `package.json` version, so `packages/core/src` is identical at both HEADs. + +### npm + +- `latest` = 6.0.26; `alpha` = 6.0.27-alpha.5, with `gitHead` `71d556b6`. +- Tarball sha256 `fd5b6c0f93da1c87e16e3e16560d683f44fd080278f82bbcafc967fe2695d621`. It contains `const gasLimit = p.gasLimit ?? BigInt(1_000_000);` (`src/lib/agentic/execution/svm-public.js:53`). **The Solana fix is not published.** + +### Contracts, pinned as extracted copies; no checkout was modified + +| Repo | Local HEAD | Pinned for review | Notes | +|---|---|---|---| +| push-agentic-wallets | `main` `9ddd954` (4 September, older design) | `deploy-agw` `e57998c2d8ef` | Its `src/` is identical to the deployed source `ffd567d3e49b` (empty `git diff ffd567d e57998c -- src`). The local harness `/tmp/agw-preset-defaults-v6/.agw-pin` = `ffd567d…` | +| push-chain-core-contracts | `8183-v1` `01439d1` | `main` `b2f22241` | Same commit the earlier route validation used. Deployed UniversalCore differs: it returns 6 values | +| push-chain-gateway-contracts | `pc20-3rd-iteration` `bcbf7df` | `gateway-testnet` `b205770f` | The SVM source declares `DJoF…`; the live gateway is `CFVS…` | +| push-chain (node) | `develop` `cfe8952c` | as-is | Used only for `uregistry` proto definitions | + +Remote heads were read with `git ls-remote`, without fetching. Extraction used `git archive | tar -x` into the session scratchpad. + +**Credential note:** while running `git remote -v` I saw that the three contract repos' `origin` URLs embed a GitHub personal access token in plaintext. I did not record or use it. Consider rotating it and switching to a credential helper. + +## 2. Commands and results + +All runs were from the SDK root unless stated. + +| Check | Result | +|---|---| +| `node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand --testPathPattern=agentic/__tests__` (16:39:57Z) | **26 suites, 405 tests passed** | +| `tsc -p packages/core/tsconfig.spec.json --noEmit` | exit 0 | +| `tsc -p packages/core/tsconfig.agw-local.json --noEmit` | exit 0 | +| `AGW_LOCAL_DIR=/tmp/agw-preset-defaults-v6 … jest.agw-local.config.ts --runTestsByPath packages/core/__agw-local__/preset-acceptance.spec.ts` (16:41:05Z, anvil 1.5.1) | **9/9 passed** | +| `eslint` on the 10 changed or new files | 0 errors, 19 warnings (non-null assertions) | +| Core build, package/guide checks | **Not re-run.** I used the existing `dist/` (built 15:25:56Z, after the `svm-public.ts` edit at 15:22:29Z; `dist/…/svm-public.js:56` has `?? BigInt(0)`) | +| Funded live suites | Not run (out of scope) | + +Read-only probes (scripts in `scripts/`, outputs in `data/`): + +| Script | What it does | Endpoint | Pinned block or slot | Time (UTC) | +|---|---|---|---|---| +| `push-probe.cjs` | 10 live Push receipts with `SwapAndBurnGas`, `UniversalTxOutbound` and `OutboundMetered` decoded; UniversalCore fee inputs and quotes; QuoterV2 exact-output gas cost; PC/USD per origin; 18 registry PRC20 metadata | `evm.donut.rpc.push.org` (chain 42101) | 24,457,144 (block time 16:25:31) | 16:25 | +| `uregistry-probe.cjs` | `abci_query /uregistry.v1.Query/AllTokenConfigs` (26 configs, 5 chains), node `pchain v0.0.49` | `donut.rpc.push.org:443` | height 24,457,377 | 16:34 | +| `old-prc20.cjs` | Metadata, supply and outbound quote for the 7 `.old` PRC20s | Donut EVM | 24,457,398 | 16:35:54 | +| `sol-probe.cjs` | Devnet rent; CEA derivation; program accounts; both SPL transactions parsed | `api.devnet.solana.com` (genesis `EtWTRABZ…`) | slot 513,220,877 | 16:29:02 | +| `dest-probe.cjs` | Preset-token code, decimals, Vault balances, inbound support; pools; Aave reserves; EigenLayer underlying; ETH/USD | publicnode Sepolia / Base Sepolia / Arbitrum Sepolia / BSC testnet | 11,956,507 / 48,372,829 / 321,115,011 / 137,918,895 | 16:32:02 | +| `dest-receipts.cjs` | 8 destination receipts with `UniversalTxExecuted`; CEA code and balance; SPL wallet PC deltas at Push 24,455,662→663 and 24,455,694→695 | same | as found | 16:3x | +| `sdk-quotes.cjs` | The SDK's own `agenticRuntime.quoteOutbound` for Push-native, Sepolia-UEA and Solana-UEA signers (read-only clients) | Donut | 24,457,436–24,457,448 | 16:37 | +| `trace-bnb.cjs` | The same quote with `printTraces`, for the BNB first-use case | Donut | ≈24,457,460 | 16:38 | +| `gasprice-history.cjs` | `gasPriceByChainNamespace` every 200 blocks | Donut | 24,455,072–24,457,472 | 16:39 | +| Inline checks | Arbitrum WETH EIP-1967 implementation; explicit EVM gasLimit 100,000 / 499,999 (revert) and 500,001 (ok) | Arbitrum Sepolia, Donut | latest | 16:4x | + +Key values are summarised in [review.md](review.md). The full data is in `data/*.json`. + +## 3. Verifying the existing evidence + +| Claim in the existing evidence | Independent result | +|---|---| +| Ten live destination deliveries | **Confirmed.**
EVM: all 8 receipts succeeded, sent by relayer `0x9fed…` to the chain's Vault, each with `UniversalTxExecuted` from the expected CEA where `originCaller` = wallet and the target is the counter. Each CEA now holds exactly 2×10¹² wei.
Solana: both transactions succeeded; vault → CEA ATA → recipient `oVL4…` moved exactly 1000 raw units each, with CEA authority `DKbAi…`; the mint is `EiXD…` on the classic Token program | +| SPL stored spend of 2,000 | `OutboundMetered` amounts 1000 and 1000 in the Push receipts (amounts only) | +| "Each charged a 5,000-lamport fee" | True of the signature fee only. The relayer was reimbursed 2,184,320 and 695,880 lamports | +| Quote figures | `gasLimit` 2,285 / 960 and 2,000,000 / 500,000 reproduced from the `UniversalTxOutbound` events | +| "No claim about net consumption" | Now measured from `SwapAndBurnGas.pcIn` and wallet deltas: 0.0008–2.37 PC consumed, the rest refunded | +| `spl-rejections.json` | Not re-executed; its block and decoded selectors are consistent with the source error names | +| Blocked preset log | Same outcome reproduced through local readiness. The log came from an earlier revision of the spec file (stack lines 200/331 against 211/356 now). The file was modified at 15:43:00Z, after the log at 15:31:51Z | +| Run timing | `gas-live.spec.ts` was modified at 15:33:11Z, during its run (≈15:29:45Z–15:41:40Z), as the README says. `svm-agent-spl.spec.ts` was modified at 15:41:32Z, after the funded run (15:25–15:27Z) | + +## 4. Limitations + +- I ran no funded or live transactions, so F1's routes and F2's native-wrap alternative are unproven end to end. Outbound for the `.old` USDC routes is inferred from registry, metadata, quote and Vault-backing evidence only. +- The node registry was read through `abci_query` with my own protobuf decoder, not an official client. +- The PC/USD, gas-price and BNB-attached figures are point-in-time testnet values that changed during the review window. +- Solana pricing used Donut pools and the SDK's sizing, not an independent SOL/USD feed. +- `isSupportedToken` was read on the external gateways only; the deployed UniversalCore has no such function (it reverted). +- The contract-source analysis is of pinned source, and the deployed core and SVM gateway differ from the pinned commits (F16). Live behaviour was checked empirically wherever it mattered. +- I could not access Harsh's Notion page. Spec text was taken from `plan/agw/research/section6-feedback-2026-10-12/sdk-latest.md` (for example §6.h `allowedCalls: AllowedCall[]; // 1..32`). +- Not re-run: build, package and guide checks, API comparison, and the full 2,181-unit suite. + +## 5. Source changes during the review + +None to production code, tests or existing evidence. The only files I added are under `plan/agw/independent-review-creation-flow-2026-10-20/`: `review.md`, `decision-matrix.md`, `team-questions.md`, `evidence.md`, `data/*.json` and `scripts/*.cjs`. The scripts are read-only probes with no keys; they run from any directory and use the SDK's `node_modules`. + +`npm pack` of 6.0.27-alpha.5 was extracted only inside the session scratchpad. No other process wrote to `dist/`, `e2e-logs/` or the contract checkouts. diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/review.md b/plan/agw/independent-review-creation-flow-2026-10-20/review.md new file mode 100644 index 00000000..6e518e7c --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/review.md @@ -0,0 +1,402 @@ +# Independent review: AGW creation flow, 20 October 2026 + +This is an engineering review, not a full security audit. Baseline, commands, block numbers and limitations are in [evidence.md](evidence.md). Raw results are in `data/` and the read-only scripts that produced them are in `scripts/`. + +References use these roots: + +- `sdk/` = `packages/core/src/lib/` +- `URP` = the deployed AGW source at `ffd567d` (`src/policies/UniversalRulesPolicy.sol`). It was extracted from `deploy-agw@e57998c`, whose `src/` is byte-identical. + +## Overall verdict + +1. **The Solana omitted-gas change is correct, and strictly better than before. Ship it.** + - The old `1,000,000` input could never succeed. The SDK capped the gas budget at $10 (100 PC with a Push-native agent), but the gas swap needed about 906 PC at Donut block 24,457,144, so the swap would revert. With a ceiling under 100 PC, the policy refused the send first. + - The new path (input 0) behaves as follows: + - Core substitutes its base limit of 960. + - The SDK raises the gas budget to cover finalization rent. + - This was verified live for a first SPL send (gas limit 2,285) and a later one (960), and re-derived independently from Solana transactions. + - The fix is uncommitted on v4. Published `6.0.27-alpha.5` still uses `BigInt(1_000_000)`. + +2. **Our preset-route conclusion is partly wrong.** Three default tokens that we report as having no route are Circle USDC on Sepolia, Base Sepolia and Arbitrum Sepolia. All three have **enabled, inbound-backed node routes** that the SDK registry simply omits (F1). + - With SDK registry work alone, plus a core confirmation, **DEXES Sepolia** and **LENDING Arbitrum Sepolia** can become route-ready. + - DEXES on Base and Arbitrum would still lack their WETH leg. + - The other five presets need external provisioning, or a product-approved change of asset. + +3. **Apps-optional, all-tokens and spending limits** are constrained by contract facts we have now verified (Findings F7, F10, F11). + - The contracts require at least one allowed function and at least one destination call per request. + - There is no asset wildcard; a rule holds 1 to 8 explicit assets. + - Every destination-side limit applies per call. + - EVM transfer-only rules can already be written with the public API today. + - Solana transfer-only rules are impossible without contract work, because the System and SPL Token programs are forbidden targets. + +4. **Gas guidance must change.** + - The uniform "10 PC" observations come from the SDK: a $1 minimum budget, converted at a hardcoded $0.10 per PC for Push-native signers. + - Measured consumption was 0.0008–2.37 PC per send. The remainder was refunded in the same transaction (confirmed from wallet balances). + - 20 PC is not robust: BNB-testnet first use exceeded it during this review (F4). + - Two existing SDK gas-sizing bugs affect AGW (F5). + +5. **The tests are better than average** and do what they say. The gaps are listed in F8. Nothing hides a skip or passes unconditionally. The nine live preset cases are blocked, not passing. + +## Findings, by severity + +Classification for each finding: + +- **Type:** bug / evidence correction / ambiguity / product decision / external dependency. +- **Blocks:** publication / preset usability / extension only. + +### F1 — High: Circle USDC routes exist on the node but are missing from the SDK registry +**Type:** evidence correction and SDK registry omission. **Blocks:** preset usability (four of the nine presets depend on it). + +The node's `uregistry` `AllTokenConfigs` (read via `abci_query` at height 24,457,377; `data/uregistry.json`) lists: + +| Source chain | Exact token (Circle USDC) | Node PRC20 | Node label | +|---|---|---|---| +| eip155:11155111 | `0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238` | `0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E` | USDC.eth.old, enabled | +| eip155:84532 | `0x036CbD53842c5426634e7929541eC2318f3dCF7e` | `0x84B62e44F667F692F7739Ca6040cD17DA02068A8` | USDC.base.old, enabled | +| eip155:421614 | `0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d` | `0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6` | USDC.arb.old, enabled | + +On-chain checks at Donut block 24,457,398 (`data/old-prc20.json`): + +- `SOURCE_CHAIN_NAMESPACE` and `SOURCE_TOKEN_ADDRESS` match exactly. Sepolia returns an address word; Base and Arbitrum return strings. +- `decimals = 6`, which matches the preset `stable6` budget. +- `getOutboundTxGasAndFees` succeeds. +- Total supply minus a 1,200,000 premint equals the destination Vault balance: + - exactly 1,126.991 on Base; + - exactly 157.3 on Arbitrum; + - 120,454.41 against a Vault holding 120,464.41 on Sepolia. + + So these are inbound-backed, settled routes (`data/dest-probe.json`). + +The registry also has `.old` USDT routes for all four EVM chains, but those are not preset tokens. + +Two earlier statements are wrong: + +- [token-route-validation README](../research/token-route-validation-2026-10-20/README.md) says: "Existing USDC PRC20 metadata points at different mock token addresses". That is true only for the PRC20s the SDK registers. +- [questions-zaryab.md](../questions-zaryab.md) asks the team for mappings that can be read from the node. + +The reason they were missed: the SDK registry is keyed by symbol. `sdk/universal/prc20-address.ts:126-179` maps (chain, symbol) to one `SYNTHETIC_PUSH_ERC20` key, so it cannot hold two USDCs on one chain. Both the compatibility script and the probe searched only that registry. + +What becomes possible: + +| Preset | Before | With F1 | +|---|---|---| +| DEXES Sepolia | WETH routed, USDC missing | **both routed**. A WETH/USDC pool has liquidity (fee 500: L=1.30e16; `data/dest-probe.json`) | +| LENDING Arbitrum Sepolia | USDC missing | **routed**. The Aave reserve is this exact Circle USDC | +| DEXES Base / Arbitrum | both missing | USDC routed; WETH still missing (F2) | + +Recommendation: + +1. Ask core/node to confirm the `.old` routes are supported for outbound and are not being retired. +2. Then add an **address-keyed** AGW route table (chain + exact source address → PRC20) that `presetRoutes` (`sdk/agentic/presets/routes.ts:34-52`) and `resolvePrc20` (`sdk/agentic/runtime.ts:169-187`) consult before the symbol path. Keep the on-chain source check in `prepare.ts:135-154`. +3. Run a funded E2E before calling these presets usable. + +### F2 — High: the remaining preset tokens need provisioning, or a product-approved native-wrap variant +**Type:** external dependency or product decision. **Blocks:** preset usability. + +None of these tokens appears in `uregistry`: + +| Chain | Token | Preset(s) | Vault balance | WETH9 `deposit()` | +|---|---|---|---|---| +| Sepolia | Aave LINK `0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5` | LENDING | 0 | n/a | +| Sepolia | EigenLayer WETH `0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9` | STAKING | 0 | yes | +| Base Sepolia | WETH `0x4200000000000000000000000000000000000006` | DEXES | 0 | yes | +| Base Sepolia | Aave LINK `0x810D46F9a9027E28F9B01F75E2bdde839dA61115` | LENDING | 0 | n/a | +| Base Sepolia | Moonwell USDbC `0x4616975f7E6045FD9737e95bC527e9e14c727BD2`, Moonwell WETH `0x663A6F02d547dFd639BF689FED298712f2FB69Fb` | LENDING | 0 | WETH: yes | +| Arbitrum Sepolia | WETH `0x980B62Da83eFf3D4576C647993b0c1D7faf17c73` | DEXES | 0 | yes (proxy implementation `0x3031a6d5…`) | +| BNB testnet | WBNB `0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd` | DEXES | 0 | yes | +| BNB testnet | USDT `0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c`, USDC `0x16227D60f7a0e586C66B005219dfc887D13C9531` | DEXES / LENDING | 0 | n/a | + +**An alternative we had not considered: native export plus wrap.** + +- The native PRC20 routes (pETH, pETH.base, pETH.arb, pBNB) are live. `gas-live.spec.ts` proved native export into the CEA on all four testnets. +- The CEA multicall can call `WETH.deposit{value}`. A universal rule can authorize that, because `maxValue` is a per-entry value cap (URP:902-906). +- Uniswap's SwapRouter02 can also wrap when `msg.value` is sent with `tokenIn = WETH9`. That needs the router's WETH9 to be verified first. + +This covers the wrapped-native leg of DEXES on Base, Arbitrum and BNB, and the Sepolia EigenLayer WETH. Aave's Base WETH reserve is `0x4200…06` itself. + +It is **not** reachable through `presets.get` today: + +- DEX presets refuse native markers (`sdk/agentic/presets/index.ts:233-243`). +- Swap pairs are generated only from export assets (`:268-296`). + +It changes the preset's export asset (ETH instead of WETH) and adds a wrap permission, so it needs product approval and SDK catalog work. No contract change is required. + +**What stays blocked even then:** LENDING Sepolia (LINK), LENDING Base (LINK, Moonwell), LENDING BNB and the DEXES BNB USDT leg (Venus tokens). These need provisioning, or a different reviewed protocol asset. + +### F3 — High: "10 PC" is an SDK floor, not a fee; attached, consumed and refunded amounts are now measured +**Type:** evidence correction. **Blocks:** publication of gas guidance. + +How the SDK sizes the gas budget: + +- `sdk/orchestrator/internals/gas-usd-sizer.ts:105-117` puts the budget in one of three bands: + - below $1: raised to $1; + - $1 to $10: passed through; + - above $10: capped at $10. +- `pc-usd-oracle.ts:42-48` has no Push Chain origin, so a Push-native signer falls back to `usdcToPush` at a fixed $0.10 (`pc-usd-oracle.ts:322-333`). That makes $1 exactly 10 PC. +- The E2E agents and `check-agw-gas-quotes.js` all sign as Push-native, so every observation was this floor. + +A signer from another chain is priced through the Donut WPC/USDT pool for its origin. At the review blocks (`data/push-probe.json`, `data/sdk-quotes.json`): + +| Signer origin | PC/USD | $1 minimum attached | +|---|---|---| +| Push-native (fixed fallback) | $0.10 | 10 PC | +| Ethereum Sepolia UEA | $0.2326 | 4.30 PC | +| Arbitrum Sepolia | $0.0988 | ≈10.1 PC | +| Base Sepolia | $0.0993 | ≈10.1 PC | +| BNB testnet | $0.1031 | ≈9.7 PC | +| Solana UEA | $0.0910 | 10.99 PC | + +Measured from the live receipts (`SwapAndBurnGas.pcIn`; `data/push-probe.json`). Each send attached 10 PC: + +| Send | gasLimit used | gasFee | PC consumed by gas swap | Refunded | +|---|---:|---:|---:|---:| +| SPL first use | 2,285 | 2,285,000 lamports | 2.0697 | 7.93 | +| SPL subsequent | 960 | 960,000 lamports | 0.8695 | 9.13 | +| Sepolia first / subsequent | 2,000,000 / 500,000 | 2.20e12 / 5.50e11 wei | 0.0032 / 0.0008 | ≈10 | +| Base first / subsequent | 2,000,000 / 500,000 | 1.32e13 / 3.30e12 | 0.5915 / 0.1479 | 9.41 / 9.85 | +| Arbitrum first / subsequent | 2,000,000 / 500,000 | 4.52e13 / 1.13e13 | 1.9297 / 0.4820 | 8.07 / 9.52 | +| BNB first / subsequent | 2,000,000 / 500,000 | 2.20e14 / 5.50e13 | 2.3652 / 0.5913 | 7.63 / 9.41 | + +The refund is confirmed: + +- The SPL wallet's PC balance fell by exactly `pcIn` at Push blocks 24,455,663 and 24,455,695: −2.06965 and −0.86953 PC (`data/dest-receipts.json`). +- `swapAndBurnGas` refunds `msg.value − amountInUsed` to the caller. + +Separately, the agent's own Push gas was 0.00042–0.00053 PC per send. + +Recommendation: report all six quantities separately (see the decision matrix, E). Remove "10 PC quoted" as a fee claim. + +### F4 — High: a 20 PC ceiling fails BNB-testnet first use at current Donut gas prices +**Type:** confirmed risk. **Blocks:** preset usability on BNB; the 20 PC guidance. + +- Donut's BNB `gasPriceByChainNamespace` read 55,000,000 / 110,000,000 / 1,100,000,000 wei across blocks 24,455,072–24,457,472, roughly 100 minutes (`data/gasprice-history.json`). The live BNB test ran at 0.11 gwei. Other chains were stable. +- At 1.1 gwei, a first BNB send (2,000,000 gas, 0.0022 BNB) attaches: + - 53.5 PC for a Push-native signer (traced; `scripts/trace-bnb.cjs`); + - 23.0 PC for a Sepolia UEA; + - 58.8 PC for a Solana UEA. + + Every one is above 20 PC, so URP refuses with `PCValueExceedsCap` (URP:593). The refusal is safe: it is decoded before broadcast into "The required gas exceeds this rule's gas budget" (`sdk/agentic/error-messages.ts:146`). +- Subsequent BNB sends still fit: 13.4 / 5.75 / 14.7 PC. +- Part of the excess is F5(a). + +### F5 — High (existing SDK bugs, not caused by this change): gas sizing does not match what the gateway charges +**Type:** confirmed bugs. **Blocks:** none on these testnets except the cases noted; they block mainnet use and explicit large gas limits. + +**(a) BNB gas is priced with ETH/USD.** +- `gas-usd-sizer.ts:74-77` uses Sepolia for every EVM destination, and its log labels BNB gas as "pETH". +- At ETH $2,432 this inflates BNB budgets by about the ETH/BNB price ratio. + +**(b) The over-$10 overflow is dropped on the AGW path.** +- `gas-calculator.ts:253` returns `gasLegNativePc + protocolFee`, and `sdk/agentic/runtime.ts:141-159` passes only that value on. +- The gateway does an exact-output swap for the full `gasFee` (core `UniversalCore.sol:224-246`), so it reverts. +- Example: the legacy 1,000,000 Solana input attaches 100 / 43.0 / 109.9 PC, depending on origin, against 905.8 PC required. + +**(c) The SDK sizes by dollars, but the contract pays the Donut pool rate.** +- A Sepolia-UEA BNB first send attaches 23.00 PC, but the pool quote needs 23.65 PC. The swap would revert even under a high ceiling. + +Recommendation (SDK-only): +- Size the gas budget from Donut QuoterV2 `quoteExactOutputSingle(WPC → gasToken, gasFee)` plus headroom. +- Fail before signing when the result exceeds the rule's `maxGasPerCall`, using a typed error. +- Fix the BNB price source. + +### F6 — Medium: the compatibility method was narrower than our conclusions +**Type:** evidence correction. + +What `scripts/check-agw-preset-compatibility.js` actually covers: + +- Candidates are only the SDK `MOVEABLE_TOKENS` entries that map through the symbol registry (`:61-104`). +- Native routes are skipped (`:65`). +- DEX pools are searched only between pairs where *both* tokens are routed (`:133-150`). That misses the useful case of one routed token traded against a destination-held token. +- The script does treat RPC errors correctly as failures, both per pool and per protocol, with a non-zero exit. One gap: a candidate whose Push `SOURCE_*` read fails is silently recorded as `unavailable`, with no exit-code impact (`:101-107`). + +The external gateway's `isSupportedToken` is an **inbound** allow-list: + +- `UniversalGateway.sol:770`: `tokenToLimitThreshold[token] != 0`, used only in `_handleDeposits`. +- Outbound ERC20 settlement needs Vault liquidity (`Vault.sol:417-423`). Native outbound is funded from the TSS balance. + +So "allow-listed" never proved route availability. The Vault balances above are the relevant check. + +Our "no substitution" recommendation still stands, now for the right reason: same-symbol mocks have no Aave, Moonwell or Venus market and no protocol pools. + +### F7 — Medium: spending limits are narrower than "spending limit" suggests +**Type:** product decision and wording. **Blocks:** UI copy for publication. + +Verified in source: + +- `assets[i].maxPerCall` and `maxTotal` meter only `req.amount` exported from Push. The check is at URP:584-591; spend is written at :605-608, only when `amount > 0`. +- `creditRevert` is inactive (URP:1052-1054), so **a send that later fails on the destination still consumes `maxTotal`**. +- Destination pins (`EQ`/`MAX`) and `maxValue` are checked per inner call (URP:775-791, 879-938). There is no sum within a request (up to 10 calls, URP:81, 770) and none across requests. +- Balances already held in the CEA can be redeployed until the rule expires. The contract docs say so: `docs/1_AGW.md:454`, `docs/5_SDK_Owner_Integration.md:226`. +- `maxGasPerCall` bounds the PC attached to each request (URP:593). There is no gas counter (URP:1055-1056); only the wallet's PC balance bounds cumulative gas. +- Preset DEX swap pins fix tokenIn, tokenOut, recipient and the input amount. They do not fix the fee tier, `amountOutMinimum` or the price limit (`presets/index.ts:283-296`). The value lost to slippage or a manipulated pool is bounded only per call. +- Lending `borrow` is capped per call; cumulative debt is not. +- `approve` caps each allowance, not cumulative pulls. +- Native Push rules differ: + - The contract supports `maxValueTotal`, `maxCalls` and a cumulative `AmountRule` (URP:672-735). + - The public SDK shape hard-codes unlimited totals and calls (`sdk/agentic/public-rule.ts:255-263`) and rejects `amount` / `maxValueTotal` / `maxCalls` (`:128-144, 171-183`). + + So stronger native totals need SDK and spec work only, not contract work. + +### F8 — Medium: test gaps (no false passes found) +**Type:** test quality. **Blocks:** none, but some claims should be narrowed. + +1. `expectStoredPreset` (`__e2e__/shared/agw-preset-acceptance.ts:55-108`) does not assert `expectedCEA`, and the local suite mocks the CEA (`__agw-local__/preset-acceptance.spec.ts:27-30`). The live suite does assert it (`presets-acceptance.spec.ts:252-265`). So for the local suite, "destination identity is compared" is not true. +2. The SPL readback uses `toMatchObject` with `arrayContaining`, which checks the assets and only the account-1 pin (`svm-agent-spl.spec.ts:121-137`). The counter, recipient-ATA, CEA and token-program pins, and the data ceiling, are not compared. There is no wrong-recipient rejection case. The data ceiling and the account-1 pin are proven by the decoded rejections. +3. The live preset suite funds the fresh agent 0.5 PC in `setupAgw()` (`_fixture.ts`) before the pool, protocol and owner-PRC20 prerequisite checks (`presets-acceptance.spec.ts:216-247`). Only the route-readiness check is truly before funding. +4. `live-presets-blocked.log` cites spec lines 200 and 331. The current file throws at line 211 with case 1 at line 356, and it was edited at 15:43:00Z, after the 15:31Z log. The blocked outcome is determined by unchanged `src` readiness code, but the current spec revision has never run. +5. `svm-send-defaults.spec.ts` covers only the owner funds-only native-SOL path, and mocks `quoteOutbound`, so the finalize floor is not exercised. The agent door's omitted gas is covered only by the live run. +6. `check-agw-gas-quotes.js` cannot observe anything but the floor (F3). It omits gasFee, gasPrice, USD band, pool cost and the SPL first-use ATA case. +7. The live preset operation builders were reviewed and are consistent: + - token and market order (Venus vUSDT first, Base LINK supply first); + - `approve` before the call; + - recipient pinned to the CEA; + - spend metered at 1× then 2×. + + They test one swap direction only, and use `amountOutMinimum: 1`. + +What is right: the EVM gas test proves the CEA had no code before first use, exact native credit, `UniversalTxExecuted` from the CEA with `originCaller` = wallet, and spend. I re-verified all eight destination receipts myself (`data/dest-receipts.json`). The SPL test proves delivery with exact amounts; I re-verified the Solana transactions, the CEA derivation, the ATA owner, the mint and the token program. + +### F9 — Medium: Solana destination cost is misreported +**Type:** evidence correction. + +- The README says each Solana send "charged a 5,000-lamport transaction fee". That is the relayer's signature fee only. +- The gateway reimbursed the relayer **2,184,320** lamports (first use: 5,000 + 690,880 `ExecutedSubTx` rent + 1,488,440 CEA-ATA rent) and **695,880** lamports (subsequent), out of `gas_fee` budgets of 2,285,000 and 960,000 (`data/sol-probe.json`). +- Devnet rent is now 690,880 lamports for 8 bytes and 1,488,440 for 165 bytes. The SDK's fallback constants (946,560 and 2,039,280; `svm-rent.ts:37-40`) are higher. That is safe, because they over-budget. + +### F10 — Medium: Solana transfer-only rules are impossible under the current contracts +**Type:** contract constraint. **Blocks:** extension only. + +`SvmRulebook.sol:30-41` forbids the System, SPL Token, Token-2022, Stake, BPF-loader and lookup-table programs, as well as the gateway and the CEA. Agents also cannot send funds without an instruction (`SvmPayloadEmpty`, :525). So SOL or SPL can reach a third party only through an allow-listed program's CPI, as `test_counter.receive_spl` does. + +### F11 — Medium: public Solana authoring is narrower than the contract +**Type:** ambiguity / capability gap. **Blocks:** extension only. + +| | Contract (`SvmRulebook`) | Public API | +|---|---|---| +| Discriminators | 1–8 bytes, or dataless (:176) | 8 bytes only: Anchor-derived or raw 16-hex (`public-rule.ts:347-368`) | +| Data pins | EQ / GTE / LTE / RATIO, with `fromEnd` | equals or max on fixed-width named args | +| Send-time accounts | — | Resolved from a registered Anchor-style IDL: fixed address, const-seed PDA, or `cea_authority` (`sdk/orchestrator/svm-idl/resolve.ts:55-128`) | + +Unsupported in the public API: short or non-Anchor discriminators, dataless instructions, dynamic args (vec / string / option), optional accounts and nested account groups. The contract cannot parse dynamic args either; it offers only `fromEnd` scalars. + +Related: a Solana rule with `maxGasPerCall = 0` is accepted by the SDK (`codec/svm-terms.ts:175`), while EVM rejects it (`codec/universal.ts:53-54`). Every agent send would then fail. + +### F12 — Medium: Solana SPL PRC20s do not identify their mint on-chain +**Type:** ambiguity. + +- `SOURCE_TOKEN_ADDRESS` returns a zero word for USDT.sol, USDC.sol, DAI.sol and pSOL (`data/push-probe.json`). +- `readSvmSourceToken` then falls back to the SDK's own registry (`sdk/agentic/contracts/prc20-metadata.ts:51-72`), so the mint is not verified on-chain. +- `uregistry` has the authoritative mapping. For USDT it is `EiXDnrAg…` → `0x4f1A…`, which matches the SDK. + +Recommendation: verify against `uregistry`, or snapshot it in tests. + +### F13 — Low: Base Sepolia WETH registry entry is wrong (existing bug) +**Type:** data bug. + +`sdk/constants/tokens.ts:234-239` lists Base Sepolia WETH at `0xfff9976782d46cc05630d1f6ebab18b2324d6b14`, which is the Ethereum Sepolia address. That address has no code on Base Sepolia (`data/dest-probe.json`). AGW is currently unaffected, because the symbol switch refuses non-Sepolia WETH. + +### F14 — Low: `protocolFee` is counted twice in attached value (latent) +**Type:** latent bug. + +`nativeValueForGas` already includes `protocolFee` (`gas-calculator.ts:253`). `outbound.ts:235-236` and `svm-public.ts:169, 188-190` add it again to `value` and also pass it as `maxPCForGas`. With a non-zero fee, a send would over-attach and use more of the `maxGasPerCall` ceiling. `protocolFee` is 0 on every PRC20 checked. + +### F15 — Low: Solana finalize margin and gas-limit inputs +**Type:** robustness and documentation. + +- The finalize floor's only margin is the 100,000-lamport buffer, about 4.6% of the first-use budget. A drop in Donut's Solana gasPrice between quote and execution larger than that would underfund the send (`InsufficientGasBudget` on Solana). The gasPrice was a constant 1000 across the sample. +- A re-quote that is still insufficient only logs a warning (`svm-rent.ts:253-258`). +- An explicit `gasLimit` below the chain base (960 on Solana devnet, 500,000 on the EVM testnets) reverts at quote time on deployed core (`data/sdk-quotes.json`; 500,001 is accepted). Document that inputs must be 0 or at least the base. + +### F16 — Info: baseline drift and other notes + +- The local contract checkout is on stale `main` (`9ddd954`, 4 September, a different design). The deployed source is `deploy-agw` / `ffd567d`. +- Core `main` (`b2f22241`) returns 5 values from `getOutboundTxGasAndFees`; deployed core returns 6. The pinned SVM gateway source declares `DJoF…`; the SDK and the live transactions use `CFVS…`. Live behaviour was therefore verified empirically. +- The EigenLayer `depositIntoStrategy` strategy argument is unpinned. Deposits credit the CEA, and only whitelisted strategies are accepted. + +## Specific answers + +**A.** +- Omissions in the SDK registry: the three Circle USDC routes (F1). +- Routes that need provisioning: the table in F2. +- The external allow-list does not establish route availability (F6). +- Metadata handling: string and address-word metadata are handled. Solana mints are not identified on-chain (F12). +- The compatibility scope was too narrow (F6). RPC errors were not turned into "unsupported", except the candidate-read gap noted in F6. +- The native-wrap alternative is viable but needs product approval (F2). + +**B.** +- At least one call is required, by both contracts and both doors. +- EVM ERC20 transfer rules are fully SDK-side, and already expressible with the public API. +- Native coins are not expressible as value-only agent calls (URP:784; `outbound.ts:210-221`). +- Solana is impossible (F10). +- On Push, value-only `VALUE_SELECTOR` actions go to up to 8 fixed recipients. +- See the decision matrix for the comparison of options. + +**C.** `[]` (or omitted assets, in general rules) means one zero-cap gas-PRC20 entry on both EVM and Solana (`prepare.ts:89-101`; `management/svm-public.ts:45-47`), so nothing can be exported from Push. Calls the rule allows can still use balances the CEA already holds. + +**D.** See F7. + +**E.** See F3, F4, F5, F9 and F15. The decision matrix gives the recommendation. + +**F.** The SPL test proves what it claims (F8). Candidate extra program: SPL Memo v2 `MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr`, verified executable on devnet (`data/sol-probe.json`) and not forbidden. It needs: + +- a raw 8-byte memo-prefix discriminator; +- a CEA account pin; +- a synthetic IDL registered through `PushChain.utils.svm.registerIdl`. + +It has not been verified through the gateway and URP. It moves no tokens. + +**G.** +- Deployed: `MAX_NATIVE_ACTIONS = 8` distinct (target, selector) pairs. Pins do not count; duplicates are refused with `DuplicateAction` (AGW.sol:86, 738, 765). +- Universal EVM rules allow 1–32 entries (URP:84, 347-350); Solana allows 1–32 programs. +- The SDK enforces 8 for native rules (`public-rule.ts:211-215`). + +This is a spec clarification, unless product needs more than 8 native functions. + +## Addendum, 21 October 2026: SDK changes made after the review + +All changes are local, uncommitted, on v4. Results are in `data/post-change-*.json`. + +| Finding | Status | Change | +|---|---|---| +| F1 | SDK side done; core confirmation pending | `agentic/token-routes.ts` resolves the three node-registered Circle USDC routes by exact address, for AGW only. DEXES Sepolia and LENDING Arbitrum Sepolia are route-ready | +| F5(a) | Fixed | BNB testnet gas is valued at the Push pool rate in `gas-usd-sizer.ts`, because no BNB/USD feed exists (the BSC gateway feed is ETH/USD). Route 2 and Route 3 already floored at the pool cost | +| F5(b)(c) | Fixed for AGW | `agwGasBudget` keeps the over-$10 share and never attaches less than the pool cost plus 20% | +| F6 | Fixed | The compatibility script includes exact routes, separates read errors from missing routes, and searches each DEX preset's own pair. The new `check-agw-route-registry.js` compares the SDK with uregistry: 20 match, 0 mismatch | +| F8(1) | Fixed | The local suite asserts the stored `expectedCEA` | +| F8(2) | Fixed | The SPL readback compares every pin, the data ceiling and the program exactly; the wrong-recipient refusal is added. Both were checked read-only against the Oct 20 rule (`data/spl-*.json`) | +| F8(3) | Fixed | The live preset suite funds the agent only after its prerequisites pass. The new opt-in group `agw-presets-routed` covers the two ready presets | +| F8(5) | Fixed | Agent-door omitted-gas unit test added | +| F8(6) | Fixed | The quote script records signer origin, gas fee, pool cost and the SPL first-use case | +| F11 (Solana zero gas) | Fixed | `preparePublicSvmRule` rejects `maxGasPerCall = 0` | +| F13 | Fixed | Base Sepolia WETH address corrected | +| F14 | Fixed (latent) | AGW's `nativeValueForGas` excludes protocolFee | +| F15 | Fixed | An explicit gasLimit below the chain base is refused before quoting with `INVALID_RULE` and `details.minimum`. A Solana budget still short after one re-quote is refused before signing (`INCONSISTENT_READ`) | + +New finding from the drift check: the SDK cannot resolve DAI.sol. Its PRC20 is registered, but `getPRC20Address` has no `DAI` case. Not preset-relevant; left unchanged. + +Validation: 2,276 units passed and 12 skipped; 9/9 local v6 preset cases pass; lib, spec, agw-local and marketplace-local typechecks and the core build pass; ESLint reports 0 errors. + +### Live validation of the changes, 21 October (02:23–02:40Z) + +These runs used the post-change working tree. + +- **`agw-svm-agent-spl`: 1/1 passed.** This included the new exact-pin readback, the data ceiling and program checks, and the wrong-recipient refusal. Both omitted-gas SPL sends were delivered (Push blocks 24,471,877 and 24,471,906). +- **`agw-gas`: 4/4 passed.** Sepolia, Base Sepolia, Arbitrum Sepolia and BNB testnet each had a first and a subsequent send: eight destination deliveries, checked against the CEA. +- **Gas.** Every send attached 10 PC. The pool cost recorded for each was 0.0002–2.07 PC. +- **Not exercised.** BNB's Donut gas price was 0.055 gwei during the run, so the high-gas BNB case, where the pool floor exceeds the sized budget, was not hit live. It is covered by unit tests only. + +Evidence: `data/live-2026-10-21-evidence.json` and `data/live-2026-10-21-results.log`. Still not run: `agw-presets-routed`. It needs the owner to hold WETH.eth and Circle USDC (Arbitrum) PRC20s, and core still has to confirm the routes. + +### Routed presets live, 21 October (02:48–03:03Z) + +The owner bought 0.199606 USDC.eth.old and 0.197913 USDC.arb.old on Donut's Uniswap pools for 2 PC each (txs `0x9de1…6dbc` and `0xab55…7138`). + +- **LENDING Arbitrum Sepolia: passed.** Two agent sends exported Circle USDC through the `.old` route and supplied it to Aave. Destination gas used: 536,341 and 292,561. This is the first live proof that a node-registered Circle USDC route settles outbound. +- **DEXES Sepolia: the first run failed on the subsequent send.** + - The first send passed: 1,502,039 gas at the 2,000,000 first-use limit. + - The subsequent send ran at the 500,000 network base and reverted on Sepolia with CEA `ExecutionFailed` (`0xacfdb444`, tx `0xe480…e336`). + - The call trace (`data/sepolia-dex-subsequent-oog-trace.json`) shows `pool.swap` out of gas. The vault's Circle USDC transfer and the approve took most of the budget, and nested calls forward only part of the remaining gas. +- **SDK fix.** Agent EVM sends without an explicit gasLimit now use 1,000,000 when they export a non-native token or make more than one call; first use stays at 2,000,000. The swap direction followed the owner's holdings: the test now starts from the held default asset, here USDC→WETH. +- **DEXES Sepolia re-run: passed.** Destination gas used: 1,502,063 and 362,079. + +Both route-ready presets have now passed unchanged-preset live acceptance (`data/live-2026-10-21-routed-presets.json`). Full unit suite after the fix: 2,278 passed, 12 skipped. diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/scripts/dest-probe.cjs b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/dest-probe.cjs new file mode 100644 index 00000000..a39a1887 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/dest-probe.cjs @@ -0,0 +1,132 @@ +// Independent read-only destination probe (EVM testnets). No keys, no signing. +const fs = require('node:fs'); +const SDK = '/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk'; +const { createPublicClient, http, parseAbi, getAddress, zeroAddress } = require(SDK + '/node_modules/viem'); +const err = (e) => (e && (e.shortMessage || e.message) || String(e)).slice(0, 200); +const big = (_k, v) => (typeof v === 'bigint' ? v.toString() : v); +const abi = parseAbi([ + 'function symbol() view returns (string)', + 'function decimals() view returns (uint8)', + 'function balanceOf(address) view returns (uint256)', + 'function factory() view returns (address)', + 'function getPool(address,address,uint24) view returns (address)', + 'function liquidity() view returns (uint128)', + 'function getReservesList() view returns (address[])', + 'function underlyingToken() view returns (address)', + 'function getEthUsdPrice() view returns (uint256,uint8)', + 'function isSupportedToken(address) view returns (bool)', +]); +const C = { + 'eip155:11155111': { + rpc: 'https://ethereum-sepolia-rpc.publicnode.com', vault: '0xD019Eb12D0d6eF8D299661f22B4B7d262eD4b965', + gateway: '0x05bD7a3D18324c1F7e216f7fBF2b15985aE5281A', router: '0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E', + aave: '0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951', eigenStrategy: '0x424246eF71b01ee33aA33aC590fd9a0855F5eFbc', + tokens: { + 'WETH(dex)': '0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14', 'USDC(circle,dex)': '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238', + 'LINK(aave,lending)': '0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5', 'WETH(eigen,staking)': '0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9', + 'USDT(routed mock)': '0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876', 'USDC(routed mock)': '0x97F477B7f970D47a87B42869ceeace218106152a', + 'stETH(routed)': '0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af', + }, + pairs: [['WETH(dex)', 'USDC(circle,dex)'], ['WETH(dex)', 'USDC(routed mock)'], ['WETH(dex)', 'USDT(routed mock)']], + }, + 'eip155:84532': { + rpc: 'https://base-sepolia-rpc.publicnode.com', vault: '0xb4Ba4D5542D1dD48BD3589543660B265B41f16CB', + gateway: '0xFD4fef1F43aFEc8b5bcdEEc47f35a1431479aC16', router: '0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4', + aave: '0x8bAB6d1b75f19e9eD9fCe8b9BD338844fF79aE27', + tokens: { + 'WETH(dex,canonical)': '0x4200000000000000000000000000000000000006', 'USDC(circle,dex)': '0x036CbD53842c5426634e7929541eC2318f3dCF7e', + 'LINK(aave,lending)': '0x810D46F9a9027E28F9B01F75E2bdde839dA61115', 'USDbC(moonwell)': '0x4616975f7E6045FD9737e95bC527e9e14c727BD2', + 'WETH(moonwell)': '0x663A6F02d547dFd639BF689FED298712f2FB69Fb', 'USDT(routed mock)': '0x4D7646B9eE3D68F4b0F135B5cbc66B00819F6b61', + 'USDC(routed mock)': '0x5c3504F0E3bA28FDc1F74234fE936518276AaBB8', 'SDK BASE WETH entry (Sepolia addr)': '0xfff9976782d46cc05630d1f6ebab18b2324d6b14', + }, + pairs: [['WETH(dex,canonical)', 'USDC(circle,dex)'], ['WETH(dex,canonical)', 'USDC(routed mock)'], ['WETH(dex,canonical)', 'USDT(routed mock)']], + }, + 'eip155:421614': { + rpc: 'https://arbitrum-sepolia-rpc.publicnode.com', vault: '0x233B1B1B378eb0Aa723097634025A47C4b73A8F7', + gateway: '0x2cd870e0166Ba458dEC615168Fd659AacD795f34', router: '0x101F443B4d1b059569D643917553c771E1b9663E', + aave: '0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff', + tokens: { + 'WETH(dex)': '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73', 'USDC(circle,dex,lending)': '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d', + 'USDT(routed mock)': '0xE30928528f52CAEeB75fB07837e22d77D47e9c07', 'USDC(routed mock)': '0x5dd39b0b3610F666F631a6506b7713EF83e1Ac5C', + }, + pairs: [['WETH(dex)', 'USDC(circle,dex,lending)'], ['WETH(dex)', 'USDC(routed mock)'], ['WETH(dex)', 'USDT(routed mock)']], + }, + 'eip155:97': { + rpc: 'https://bsc-testnet-rpc.publicnode.com', vault: '0xE52AC4f8DD3e0263bDF748F3390cdFA1f02be881', + gateway: '0x44aFFC61983F4348DdddB886349eb992C061EaC0', router: '0x9a489505a00cE272eAa5e07Dba6491314CaE3796', + tokens: { + 'WBNB(dex)': '0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd', 'USDT(venus,dex,lending)': '0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c', + 'USDC(venus,lending)': '0x16227D60f7a0e586C66B005219dfc887D13C9531', 'USDT(routed mock)': '0xE935d9c9C24D02E61186c640cc01d713C876d40F', + 'USDC(routed mock)': '0xA8802F96cAd0d45343d9bc660B6f7d80050A660b', + }, + pairs: [['WBNB(dex)', 'USDT(venus,dex,lending)'], ['WBNB(dex)', 'USDT(routed mock)'], ['WBNB(dex)', 'USDC(routed mock)']], + }, +}; +async function main() { + const out = { at: new Date().toISOString(), readOnly: true, chains: {} }; + for (const [ns, cfg] of Object.entries(C)) { + const c = createPublicClient({ transport: http(cfg.rpc, { timeout: 15000, retryCount: 2 }) }); + const e = { rpc: cfg.rpc }; + out.chains[ns] = e; + try { + e.chainId = await c.getChainId(); + if (e.chainId !== Number(ns.split(':')[1])) throw new Error('chain mismatch'); + const bn = await c.getBlockNumber(); e.block = bn; + const read = (address, functionName, args = []) => c.readContract({ address, abi, functionName, args, blockNumber: bn }); + e.vaultNativeBalance = await c.getBalance({ address: cfg.vault, blockNumber: bn }); + e.tokens = {}; + for (const [label, t] of Object.entries(cfg.tokens)) { + const r = { address: getAddress(t) }; + try { + const code = await c.getCode({ address: t, blockNumber: bn }); + r.hasCode = !!code && code !== '0x'; + r.codeBytes = code ? (code.length - 2) / 2 : 0; + r.hasDepositSelector = !!code && code.toLowerCase().includes('d0e30db0'); + r.hasWithdrawSelector = !!code && code.toLowerCase().includes('2e1a7d4d'); + } catch (x) { r.codeError = err(x); } + if (r.hasCode) { + try { r.symbol = await read(t, 'symbol'); } catch (x) { r.symbolError = err(x); } + try { r.decimals = await read(t, 'decimals'); } catch (x) { r.decimalsError = err(x); } + try { r.vaultBalance = await read(t, 'balanceOf', [cfg.vault]); } catch (x) { r.vaultBalanceError = err(x); } + try { r.gatewayInboundSupported = await read(cfg.gateway, 'isSupportedToken', [t]); } catch (x) { r.gatewayError = err(x); } + } + e.tokens[label] = r; + } + try { + e.factory = await read(cfg.router, 'factory'); + e.pools = []; + for (const [a, b] of cfg.pairs) { + for (const fee of [100, 500, 2500, 3000, 10000]) { + try { + const pool = await read(e.factory, 'getPool', [cfg.tokens[a], cfg.tokens[b], fee]); + if (pool === zeroAddress) continue; + e.pools.push({ pair: [a, b], fee, pool, liquidity: await read(pool, 'liquidity') }); + } catch (x) { e.pools.push({ pair: [a, b], fee, error: err(x) }); } + } + } + } catch (x) { e.factoryError = err(x); } + if (cfg.aave) { + try { + const reserves = await read(cfg.aave, 'getReservesList'); + e.aaveReserves = []; + for (const r of reserves) { + let symbol, decimals, dep; + try { symbol = await read(r, 'symbol'); } catch { symbol = '?'; } + try { decimals = await read(r, 'decimals'); } catch { decimals = '?'; } + try { const code = await c.getCode({ address: r, blockNumber: bn }); dep = code.toLowerCase().includes('d0e30db0'); } catch { dep = '?'; } + e.aaveReserves.push({ reserve: r, symbol, decimals, hasDepositSelector: dep }); + } + } catch (x) { e.aaveError = err(x); } + } + if (cfg.eigenStrategy) { + try { e.eigenUnderlying = await read(cfg.eigenStrategy, 'underlyingToken'); } catch (x) { e.eigenError = err(x); } + } + if (ns === 'eip155:11155111') { + try { const [p, d] = await read(cfg.gateway, 'getEthUsdPrice'); e.ethUsd1e18 = p; e.ethUsdFeedDecimals = d; } catch (x) { e.ethUsdError = err(x); } + } + } catch (x) { e.error = err(x); } + } + fs.writeFileSync(process.argv[2], JSON.stringify(out, big, 2)); + console.log('ok'); +} +main().catch((e) => { console.error(err(e)); process.exitCode = 1; }); diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/scripts/dest-receipts.cjs b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/dest-receipts.cjs new file mode 100644 index 00000000..3058792f --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/dest-receipts.cjs @@ -0,0 +1,22 @@ +const {createPublicClient,http,parseAbi,parseEventLogs}=require('/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem'); +const fs=require('node:fs'); +const EXEC=parseAbi(['event UniversalTxExecuted(bytes32 indexed subTxId, bytes32 indexed universalTxId, address indexed originCaller, address target, bytes data)']); +const D=[ + ['eip155:11155111','https://ethereum-sepolia-rpc.publicnode.com','0xD847ca2462405a70c32ff5776e70fE25EA7B26ca','0xDdc0C8e35863f1478c0485144d2Fae959242Ce43',['0xf3ed17fa05f700543ec10930d078c6fb793624e44e8ec8fe3f14fbb7cee5cf19','0x15f49a09b3879f3cc1ea4c3accddc7431b279da59033f5eb9842a0d4994df50a']], + ['eip155:84532','https://base-sepolia-rpc.publicnode.com','0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58','0xB0d8079eEF1553d3e975947f087eEeB05f02ab1A',['0x89337900340a39fd1725657e72f146fe5b4b917a58d5db150f052b2222724d6d','0xe81704385810c74cef8d16cb7fe3e2a98805aff9a9f63aaf5008d3d9288a4781']], + ['eip155:421614','https://arbitrum-sepolia-rpc.publicnode.com','0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb','0x97B91433aF804877cd11EC522C910c54E04624b5',['0x059011ed41d6409e48b70ab47dd02a16eca292e01e68eb721d78df5813f46c98','0x54f382ed25d895893f6cd3042ff7ee43e63bc392397c9a9572c424a3589d9df8']], + ['eip155:97','https://bsc-testnet-rpc.publicnode.com','0x0140403283bB76C1890501067754d1c376189b5D','0xA7384f2b00463E548426Cd9C8979dDa78ECf60c4',['0x6b5cfb84699948c2b626e2a244b9ff8354d070093d6f8ecb42a228914adfdaa5','0x42adb9167d8f25a81ff01e143cb43e676818d8ce144a08444c890caecd08029a']], +]; +(async()=>{const out=[]; +for(const [ns,rpc,wallet,cea,hashes] of D){const c=createPublicClient({transport:http(rpc,{timeout:20000,retryCount:2})}); + for(const h of hashes){const r={ns,hash:h};try{const rc=await c.getTransactionReceipt({hash:h});const tx=await c.getTransaction({hash:h}); + Object.assign(r,{status:rc.status,block:String(rc.blockNumber),from:rc.from,to:rc.to,value:String(tx.value),gasUsed:String(rc.gasUsed)}); + const ev=parseEventLogs({abi:EXEC,logs:rc.logs});r.ceaExecuted=ev.map(e=>({emitter:e.address,originCaller:e.args.originCaller,target:e.args.target,data:e.args.data})); + r.ceaMatches=ev.some(e=>e.address.toLowerCase()===cea.toLowerCase()&&e.args.originCaller.toLowerCase()===wallet.toLowerCase());}catch(e){r.error=(e.shortMessage||e.message).slice(0,160)}out.push(r);} + try{out.push({ns,ceaCodeBytes:((await c.getCode({address:cea}))||'0x').length/2-1,ceaNativeBalanceNow:String(await c.getBalance({address:cea}))})}catch(e){}} +// Push-side wallet balance deltas around the SPL first-use send (refund check) +const p=createPublicClient({transport:http('https://evm.donut.rpc.push.org/',{timeout:20000,retryCount:1})}); +const W='0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372';const refund={}; +for(const [k,b] of [['spl:first-use',24455663n],['spl:subsequent',24455695n]]){try{const before=await p.getBalance({address:W,blockNumber:b-1n});const after=await p.getBalance({address:W,blockNumber:b});refund[k]={before:String(before),after:String(after),deltaPC:Number(after-before)/1e18}}catch(e){refund[k]={error:(e.shortMessage||e.message).slice(0,160)}}} +fs.writeFileSync(process.argv[2],JSON.stringify({at:new Date().toISOString(),dest:out,walletDelta:refund},null,1)); +for(const r of out)console.log(JSON.stringify(r));console.log('walletDelta',JSON.stringify(refund));})().catch(e=>{console.error(e.message);process.exitCode=1}); diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/scripts/gasprice-history.cjs b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/gasprice-history.cjs new file mode 100644 index 00000000..f94695c3 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/gasprice-history.cjs @@ -0,0 +1,11 @@ +const {createPublicClient,http,parseAbi}=require('/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem'); +const fs=require('node:fs'); +const c=createPublicClient({transport:http('https://evm.donut.rpc.push.org/',{timeout:20000,retryCount:1})}); +const abi=parseAbi(['function gasPriceByChainNamespace(string) view returns (uint256)']); +const NS=['eip155:11155111','eip155:84532','eip155:421614','eip155:97','solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1']; +(async()=>{const head=await c.getBlockNumber();const rows=[]; +for(let back=0n;back<=2400n;back+=200n){const bn=head-back;const row={block:String(bn)}; + try{const b=await c.getBlock({blockNumber:bn});row.time=new Date(Number(b.timestamp)*1000).toISOString();}catch(e){row.timeError=e.shortMessage} + for(const ns of NS){try{row[ns]=String(await c.readContract({address:'0x00000000000000000000000000000000000000C0',abi,functionName:'gasPriceByChainNamespace',args:[ns],blockNumber:bn}))}catch(e){row[ns]='ERR '+(e.shortMessage||e.message).slice(0,60)}} + rows.push(row);} +fs.writeFileSync(process.argv[2],JSON.stringify(rows,null,1));for(const r of rows)console.log(r.block,r.time,NS.map(n=>r[n]).join(' | '));})().catch(e=>{console.error(e.message);process.exitCode=1}); diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/scripts/old-prc20.cjs b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/old-prc20.cjs new file mode 100644 index 00000000..a2f5b939 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/old-prc20.cjs @@ -0,0 +1,14 @@ +const SDK='/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk'; +const {createPublicClient,http,parseAbi,hexToString,keccak256,toHex}=require(SDK+'/node_modules/viem'); +const fs=require('node:fs'); +const c=createPublicClient({transport:http('https://evm.donut.rpc.push.org/',{timeout:20000,retryCount:2})}); +const abi=parseAbi(['function SOURCE_CHAIN_NAMESPACE() view returns (string)','function decimals() view returns (uint8)','function symbol() view returns (string)','function name() view returns (string)','function totalSupply() view returns (uint256)','function getOutboundTxGasAndFees(address,uint256) view returns (address,uint256,uint256,uint256,string,uint256)']); +const T={ 'USDC.eth.old':'0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E','USDC.base.old':'0x84B62e44F667F692F7739Ca6040cD17DA02068A8','USDC.arb.old':'0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6','USDT.eth.old':'0xCA0C5E6F002A389E1580F0DB7cd06e4549B5F9d3','USDT.arb.old':'0x76Ad08339dF606BeEDe06f90e3FaF82c5b2fb2E9','USDT.base.old':'0x2C455189D2af6643B924A981a9080CcC63d5a567','USDT.bsc.old':'0x2f98B4235FD2BA0173a2B056D722879360B12E7b'}; +const sel=keccak256(toHex('SOURCE_TOKEN_ADDRESS()')).slice(0,10); +(async()=>{const bn=await c.getBlockNumber();const out={at:new Date().toISOString(),block:bn.toString(),tokens:{}}; +for(const [k,a] of Object.entries(T)){const m={address:a}; + for(const f of ['SOURCE_CHAIN_NAMESPACE','decimals','symbol','name','totalSupply']){try{m[f]=String(await c.readContract({address:a,abi,functionName:f,blockNumber:bn}))}catch(e){m[f+'Error']=(e.shortMessage||e.message).slice(0,120)}} + try{const raw=(await c.call({to:a,data:sel,blockNumber:bn})).data; if(raw.length===66)m.sourceWord=raw; else {const len=Number(BigInt('0x'+raw.slice(66,130)));m.sourceString=hexToString('0x'+raw.slice(130,130+len*2));}}catch(e){m.sourceError=(e.shortMessage||e.message).slice(0,120)} + try{const r=await c.readContract({address:'0x00000000000000000000000000000000000000C0',abi,functionName:'getOutboundTxGasAndFees',args:[a,0n],blockNumber:bn});m.outboundQuote={gasToken:r[0],gasFee:String(r[1]),protocolFee:String(r[2]),chain:r[4],gasLimitUsed:String(r[5])}}catch(e){m.outboundQuoteError=(e.shortMessage||e.message).slice(0,160)} + out.tokens[k]=m;} +fs.writeFileSync(process.argv[2],JSON.stringify(out,null,2));console.log(JSON.stringify(out,null,1));})().catch(e=>{console.error(e.message);process.exitCode=1}); diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/scripts/push-probe.cjs b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/push-probe.cjs new file mode 100644 index 00000000..e29bf5d0 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/push-probe.cjs @@ -0,0 +1,234 @@ +// Independent read-only Donut probe. No keys, no signing, no transactions. +// Usage: node push-probe.cjs +const fs = require('node:fs'); +const SDK = '/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk'; +const { + createPublicClient, http, parseAbi, decodeEventLog, encodeFunctionData, + decodeFunctionResult, getAddress, hexToString, +} = require(SDK + '/node_modules/viem'); + +const RPC = 'https://evm.donut.rpc.push.org/'; +const CORE = '0x00000000000000000000000000000000000000C0'; +const UGPC = '0x00000000000000000000000000000000000000C1'; +const QUOTER = '0x83316275f7C2F79BC4E26f089333e88E89093037'; +const PRC20 = { + pETH: '0x2971824Db68229D087931155C2b8bB820B275809', + pETH_ARB: '0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e', + pETH_BASE: '0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21', + pBNB: '0x7a9082dA308f3fa005beA7dB0d203b3b86664E36', + pSOL: '0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed', + USDT_ETH: '0x0f97A213207703923F5f0C613C9827f7C9A0f96B', + USDC_ETH: '0x7A58048036206bB898008b5bBDA85697DB1e5d66', + USDT_ARB: '0xFE6E9DF2BbC9ce05D98b83B1365df6DcA9951891', + USDC_ARB: '0x1091cCBA2FF8d2A131AE4B35e34cf3308C48572C', + USDT_SOL: '0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34', + USDC_SOL: '0x04B8F634ABC7C879763F623e0f0550a4b5c4426F', + USDT_BSC: '0x731aF1Da5365259d27528557EE4aFBA4baC90ef2', + USDC_BSC: '0x120EBf25Dad7D6a09Ad2316f23f9Be95DBb90639', + USDT_BASE: '0x148823809B853e1db187BC09A9ac909BC42F971a', + USDC_BASE: '0xD7C6cA1e2c0CE260BE0c0AD39C1540de460e3Be1', + WETH_ETH: '0x0d0dF7E8807430A81104EA84d926139816eC7586', + stETH_ETH: '0xaf89E805949c628ebde3262e91dc4ab9eA12668E', + DAI_SOL: '0x5861f56A556c990358cc9cccd8B5baa3767982A8', +}; +const GAS = { + 'eip155:11155111': PRC20.pETH, 'eip155:84532': PRC20.pETH_BASE, + 'eip155:421614': PRC20.pETH_ARB, 'eip155:97': PRC20.pBNB, + 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1': PRC20.pSOL, +}; +const STABLE_FOR_ORIGIN = { + 'eip155:11155111': PRC20.USDT_ETH, 'eip155:421614': PRC20.USDT_ARB, + 'eip155:84532': PRC20.USDT_BASE, 'eip155:97': PRC20.USDT_BSC, + 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1': PRC20.USDT_SOL, +}; +const PUSH_TXS = { + 'spl:first-use': '0x119c89e9ff7c7cccdfc8c071fade2488aa28b0eff7d9b71f7f0cf247c958bbf5', + 'spl:subsequent': '0x7980032bb748889f44d9a58e4030dc1338575d03fa78da23531dcf96d6c23e57', + 'sepolia:first-use': '0xb968f71a2f8deb17a194632744e0e256b7703e229e0a0d35461751e580debce6', + 'sepolia:subsequent': '0xc3b021815bcfd26269ddcdbaed813aa91fb0c03a36dbf2cbc5678f84b157c7cf', + 'base:first-use': '0xb9fd4a64a2fd9b68193ac3aef1177f054dc591cfc3917968d3cfc9ee1fc35153', + 'base:subsequent': '0xc0aa504633d7e0fe66e4aa2abaf994e4b8ff09c992b8712e3a8879fe33c9026d', + 'arb:first-use': '0x21ce19a3780fee8cbcc006b3197163166402da30557ef1eff8556c97d793846c', + 'arb:subsequent': '0xba1c063ab2e261f0d1af0833975fd1344daa390ae80336c45a45d49759ebecad', + 'bnb:first-use': '0x6e4bf8a92eb569fb4aa34a5d5eab4799ab86f6aa40fe405d59cba6498c669f7d', + 'bnb:subsequent': '0x82f343dcd100715d5693d68fbdcccdaf1467c3c5626391501d1f7b579d279047', +}; +const coreAbi = parseAbi([ + 'function getOutboundTxGasAndFees(address,uint256) view returns (address gasToken,uint256 gasFee,uint256 protocolFee,uint256 gasPrice,string chainNamespace,uint256 gasLimitUsed)', + 'function baseGasLimitByChainNamespace(string) view returns (uint256)', + 'function gasPriceByChainNamespace(string) view returns (uint256)', + 'function gasTokenPRC20ByChainNamespace(string) view returns (address)', + 'function defaultFeeTier(address) view returns (uint24)', + 'function WPC() view returns (address)', + 'function isSupportedToken(address) view returns (bool)', + 'function protocolFeeByToken(address) view returns (uint256)', +]); +const evAbi = parseAbi([ + 'event SwapAndBurnGas(address indexed gasToken, uint256 pcIn, uint256 gasFee, uint24 fee, address indexed caller)', + 'event UniversalTxOutbound(bytes32 indexed subTxId, address indexed sender, string chainNamespace, address indexed token, bytes recipient, uint256 amount, address gasToken, uint256 gasFee, uint256 gasLimit, bytes payload, uint256 protocolFee, address revertRecipient, uint8 txType, uint256 gasPrice)', + 'event OutboundMetered(bytes32 indexed id, address indexed engine, address indexed account, address token, uint256 amount)', + 'event SetSupportedToken(address indexed prc20, bool supported)', + 'event SetGasToken(string chainNamespace, address prc20)', + 'event Transfer(address indexed from, address indexed to, uint256 value)', +]); +const quoterAbi = parseAbi([ + 'function quoteExactOutputSingle((address tokenIn,address tokenOut,uint256 amount,uint24 fee,uint160 sqrtPriceLimitX96)) returns (uint256 amountIn,uint160 sqrtPriceX96After,uint32 initializedTicksCrossed,uint256 gasEstimate)', + 'function quoteExactInputSingle((address tokenIn,address tokenOut,uint256 amountIn,uint24 fee,uint160 sqrtPriceLimitX96)) returns (uint256 amountOut,uint160 sqrtPriceX96After,uint32 initializedTicksCrossed,uint256 gasEstimate)', +]); +const prcAbi = parseAbi([ + 'function SOURCE_CHAIN_NAMESPACE() view returns (string)', + 'function decimals() view returns (uint8)', + 'function symbol() view returns (string)', + 'function totalSupply() view returns (uint256)', +]); +const big = (_k, v) => (typeof v === 'bigint' ? v.toString() : v); +const err = (e) => (e && (e.shortMessage || e.message) || String(e)).slice(0, 300); + +async function main() { + const c = createPublicClient({ transport: http(RPC, { timeout: 20000, retryCount: 2 }) }); + const out = { at: new Date().toISOString(), rpc: RPC, readOnly: true }; + out.chainId = await c.getChainId(); + const block = await c.getBlock(); + out.block = block.number; out.blockTimestamp = new Date(Number(block.timestamp) * 1000).toISOString(); + const bn = block.number; + const read = (address, abi, functionName, args = []) => + c.readContract({ address, abi, functionName, args, blockNumber: bn }); + + // 1. Live sends: receipts + gas swap evidence. + out.sends = {}; + for (const [k, h] of Object.entries(PUSH_TXS)) { + const r = { hash: h }; + try { + const [tx, rc] = await Promise.all([c.getTransaction({ hash: h }), c.getTransactionReceipt({ hash: h })]); + Object.assign(r, { status: rc.status, block: rc.blockNumber, from: rc.from, to: rc.to, txValue: tx.value, + gasUsed: rc.gasUsed, effectiveGasPrice: rc.effectiveGasPrice, pushFeePaid: rc.gasUsed * rc.effectiveGasPrice }); + r.events = []; + for (const l of rc.logs) { + try { + const d = decodeEventLog({ abi: evAbi, data: l.data, topics: l.topics }); + if (d.eventName === 'Transfer') continue; + const a = d.args; + if (d.eventName === 'UniversalTxOutbound') + r.events.push({ ev: d.eventName, emitter: l.address, sender: a.sender, chain: a.chainNamespace, token: a.token, + amount: a.amount, gasToken: a.gasToken, gasFee: a.gasFee, gasLimit: a.gasLimit, protocolFee: a.protocolFee, + gasPrice: a.gasPrice, txType: a.txType, revertRecipient: a.revertRecipient, recipientLen: (a.recipient.length - 2) / 2, + payloadLen: (a.payload.length - 2) / 2 }); + else r.events.push({ ev: d.eventName, emitter: l.address, ...a }); + } catch { /* not one of ours */ } + } + } catch (e) { r.error = err(e); } + out.sends[k] = r; + } + + // 2. Fee model inputs per chain and raw quotes. + out.wpc = await read(CORE, coreAbi, 'WPC'); + out.chains = {}; + for (const [ns, gas] of Object.entries(GAS)) { + const e = { gasPrc20: gas }; + try { + e.registeredGasToken = await read(CORE, coreAbi, 'gasTokenPRC20ByChainNamespace', [ns]); + e.baseGasLimit = await read(CORE, coreAbi, 'baseGasLimitByChainNamespace', [ns]); + e.gasPrice = await read(CORE, coreAbi, 'gasPriceByChainNamespace', [ns]); + e.defaultFeeTier = await read(CORE, coreAbi, 'defaultFeeTier', [gas]); + e.protocolFee = await read(CORE, coreAbi, 'protocolFeeByToken', [gas]); + } catch (x) { e.error = err(x); } + const limits = ns.startsWith('solana') ? [0n, 960n, 1052n, 2285n, 1000000n] : [0n, 500000n, 2000000n]; + e.quotes = []; + for (const gl of limits) { + const q = { inputGasLimit: gl }; + try { + const res = await read(CORE, coreAbi, 'getOutboundTxGasAndFees', [gas, gl]); + Object.assign(q, { gasFee: res[1], protocolFee: res[2], gasPrice: res[3], gasLimitUsed: res[5] }); + // Exact PC the gas swap needs at this block (WPC -> gas token exact output). + try { + const data = encodeFunctionData({ abi: quoterAbi, functionName: 'quoteExactOutputSingle', + args: [{ tokenIn: out.wpc, tokenOut: gas, amount: res[1], fee: e.defaultFeeTier, sqrtPriceLimitX96: 0n }] }); + const raw = await c.call({ to: QUOTER, data, blockNumber: bn }); + q.swapPcInRequired = decodeFunctionResult({ abi: quoterAbi, functionName: 'quoteExactOutputSingle', data: raw.data })[0]; + } catch (x) { q.swapQuoteError = err(x); } + } catch (x) { q.error = err(x); } + e.quotes.push(q); + } + out.chains[ns] = e; + } + + // 3. PC/USD as the SDK oracle would see it for UEA signers from each origin. + out.pcUsd = {}; + for (const [origin, stable] of Object.entries(STABLE_FOR_ORIGIN)) { + const p = { stable }; + for (const fee of [500, 3000, 100, 10000]) { + try { + const data = encodeFunctionData({ abi: quoterAbi, functionName: 'quoteExactInputSingle', + args: [{ tokenIn: out.wpc, tokenOut: stable, amountIn: 10n ** 18n, fee, sqrtPriceLimitX96: 0n }] }); + const raw = await c.call({ to: QUOTER, data, blockNumber: bn }); + p.fee = fee; + p.oneWpcInStableRaw = decodeFunctionResult({ abi: quoterAbi, functionName: 'quoteExactInputSingle', data: raw.data })[0]; + break; + } catch (x) { p['err' + fee] = err(x); } + } + out.pcUsd[origin] = p; + } + + // 4. PRC20 metadata (raw SOURCE_TOKEN_ADDRESS return bytes; type-agnostic). + out.prc20 = {}; + const sel = '0x' + require(SDK + '/node_modules/viem').keccak256(require(SDK + '/node_modules/viem').toHex('SOURCE_TOKEN_ADDRESS()')).slice(2, 10); + for (const [name, address] of Object.entries(PRC20)) { + const m = { address }; + try { m.namespace = await read(address, prcAbi, 'SOURCE_CHAIN_NAMESPACE'); } catch (x) { m.namespaceError = err(x); } + try { m.decimals = await read(address, prcAbi, 'decimals'); } catch (x) { m.decimalsError = err(x); } + try { m.symbol = await read(address, prcAbi, 'symbol'); } catch (x) { m.symbolError = err(x); } + try { m.totalSupply = await read(address, prcAbi, 'totalSupply'); } catch (x) { m.totalSupplyError = err(x); } + try { m.isSupportedToken = await read(CORE, coreAbi, 'isSupportedToken', [address]); } catch (x) { m.isSupportedError = err(x); } + try { + const raw = (await c.call({ to: address, data: sel, blockNumber: bn })).data; + m.sourceTokenRawLen = raw ? (raw.length - 2) / 2 : 0; + if (raw && raw.length === 66) m.sourceTokenWord = raw; + else if (raw && raw.length > 130) { + const len = Number(BigInt('0x' + raw.slice(66, 130))); + m.sourceTokenString = hexToString('0x' + raw.slice(130, 130 + len * 2)); + } + } catch (x) { m.sourceTokenError = err(x); } + out.prc20[name] = m; + } + + // 5. Enumerate PRC20s announced by UniversalCore events (incomplete by construction). + out.coreEvents = { supported: [], gasTokens: [] }; + const topicSupported = '0x' + require(SDK + '/node_modules/viem').keccak256(require(SDK + '/node_modules/viem').toHex('SetSupportedToken(address,bool)')).slice(2); + const topicGas = '0x' + require(SDK + '/node_modules/viem').keccak256(require(SDK + '/node_modules/viem').toHex('SetGasToken(string,address)')).slice(2); + try { + for (const [kind, topic] of [['supported', topicSupported], ['gasTokens', topicGas]]) { + const logs = await c.request({ method: 'eth_getLogs', params: [{ address: CORE, fromBlock: '0x0', toBlock: '0x' + bn.toString(16), topics: [topic] }] }); + for (const l of logs) { + const d = decodeEventLog({ abi: evAbi, data: l.data, topics: l.topics }); + out.coreEvents[kind].push({ block: BigInt(l.blockNumber), ...d.args }); + } + } + } catch (x) { out.coreEvents.error = err(x); } + // Metadata for every announced PRC20 not already in the SDK registry. + const known = new Set(Object.values(PRC20).map((a) => a.toLowerCase())); + out.unregistered = []; + const seen = new Set(); + for (const e of [...out.coreEvents.supported, ...out.coreEvents.gasTokens]) { + const a = (e.prc20 || '').toLowerCase(); + if (!a || known.has(a) || seen.has(a)) continue; + seen.add(a); + const m = { address: getAddress(a), lastEvent: e }; + try { m.namespace = await read(a, prcAbi, 'SOURCE_CHAIN_NAMESPACE'); } catch (x) { m.namespaceError = err(x); } + try { m.symbol = await read(a, prcAbi, 'symbol'); } catch (x) { m.symbolError = err(x); } + try { m.decimals = await read(a, prcAbi, 'decimals'); } catch (x) { m.decimalsError = err(x); } + try { + const raw = (await c.call({ to: a, data: sel, blockNumber: bn })).data; + if (raw && raw.length === 66) m.sourceTokenWord = raw; + else if (raw && raw.length > 130) { + const len = Number(BigInt('0x' + raw.slice(66, 130))); + m.sourceTokenString = hexToString('0x' + raw.slice(130, 130 + len * 2)); + } + } catch (x) { m.sourceTokenError = err(x); } + try { m.isSupportedToken = await read(CORE, coreAbi, 'isSupportedToken', [a]); } catch (x) { m.isSupportedError = err(x); } + out.unregistered.push(m); + } + out.blockAfter = await c.getBlockNumber(); + fs.writeFileSync(process.argv[2], JSON.stringify(out, big, 2)); + console.log('ok', out.block, out.blockTimestamp); +} +main().catch((e) => { console.error(err(e)); process.exitCode = 1; }); diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/scripts/sdk-quotes.cjs b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/sdk-quotes.cjs new file mode 100644 index 00000000..f2ea0e01 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/sdk-quotes.cjs @@ -0,0 +1,61 @@ +// Read-only: the SDK's own AGW quote path (runtime.quoteOutbound) for different signer origins. +// Uses the locally built dist of the reviewed working tree. No keys, no signing. +const fs = require('node:fs'); +const path = require('node:path'); +const built = '/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/dist/packages/core/src'; +const { PushChain } = require(built); +const { CHAIN, PUSH_NETWORK } = PushChain.CONSTANTS; +const { getNativePRC20ForChain } = require(path.join(built, 'lib/orchestrator/internals/helpers')); +const USDT_SOL = '0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34'; +const USDT_SOL_MINT = 'EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF'; +const big = (_k, v) => (typeof v === 'bigint' ? v.toString() : v); +async function main() { + const out = { at: new Date().toISOString(), readOnly: true, origins: {} }; + const origins = { + pushNative: { address: '0x0000000000000000000000000000000000005678', chain: CHAIN.PUSH_TESTNET_DONUT }, + sepoliaUEA: { address: '0x0000000000000000000000000000000000005678', chain: CHAIN.ETHEREUM_SEPOLIA }, + solanaUEA: { address: '11111111111111111111111111111112', chain: CHAIN.SOLANA_DEVNET }, + }; + // Fresh wallet (no CEA/ATA anywhere) and the reviewed SPL wallet (CEA ATA exists). + const freshWallet = '0x00000000000000000000000000000000000a6e01'; + const splWallet = '0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372'; + for (const [name, signer] of Object.entries(origins)) { + const client = await PushChain.initialize(signer, { network: PUSH_NETWORK.TESTNET_DONUT }); + const rt = client.agenticRuntime; + if (!rt.isReadOnly) throw new Error('must be read-only'); + const cases = []; + for (const chain of [CHAIN.ETHEREUM_SEPOLIA, CHAIN.BASE_SEPOLIA, CHAIN.ARBITRUM_SEPOLIA, CHAIN.BNB_TESTNET]) { + for (const gl of [BigInt(2000000), BigInt(0)]) { + const c = { chain, inputGasLimit: gl }; + try { + const q = await rt.quoteOutbound(getNativePRC20ForChain(chain, rt.network), gl, chain); + Object.assign(c, q, { attachedPC: Number(q.protocolFee + q.nativeValueForGas) / 1e18 }); + } catch (e) { c.error = (e.shortMessage || e.message).slice(0, 200); } + cases.push(c); + } + } + const sol = CHAIN.SOLANA_DEVNET; + for (const [label, token, gl, svm] of [ + ['native-sol omitted', getNativePRC20ForChain(sol, rt.network), BigInt(0), { wallet: freshWallet, burnAmount: BigInt(10000) }], + ['spl fresh CEA ATA omitted', USDT_SOL, BigInt(0), { wallet: freshWallet, splMintBase58: USDT_SOL_MINT, burnAmount: BigInt(1000) }], + ['spl existing CEA ATA omitted', USDT_SOL, BigInt(0), { wallet: splWallet, splMintBase58: USDT_SOL_MINT, burnAmount: BigInt(1000) }], + ['spl existing explicit 5000', USDT_SOL, BigInt(5000), { wallet: splWallet, splMintBase58: USDT_SOL_MINT, burnAmount: BigInt(1000) }], + ['legacy 1,000,000', USDT_SOL, BigInt(1000000), { wallet: splWallet, splMintBase58: USDT_SOL_MINT, burnAmount: BigInt(1000) }], + ['explicit 500 (< base 960)', USDT_SOL, BigInt(500), { wallet: splWallet, splMintBase58: USDT_SOL_MINT, burnAmount: BigInt(1000) }], + ]) { + const c = { chain: sol, label, inputGasLimit: gl }; + try { + const q = await rt.quoteOutbound(token, gl, sol, svm); + Object.assign(c, q, { attachedPC: Number(q.protocolFee + q.nativeValueForGas) / 1e18 }); + } catch (e) { c.error = (e.shortMessage || e.message).slice(0, 200); } + cases.push(c); + } + out.origins[name] = { signerChain: signer.chain, pushBlock: String(await rt.reader.getBlockNumber()), cases }; + } + fs.writeFileSync(process.argv[2], JSON.stringify(out, big, 2)); + for (const [n, o] of Object.entries(out.origins)) { + console.log('==', n, o.signerChain, 'block', o.pushBlock); + for (const c of o.cases) console.log(' ', c.chain, c.label || '', 'in', String(c.inputGasLimit), 'used', String(c.gasLimitUsed), 'attachedPC', c.attachedPC, c.error || ''); + } +} +main().catch((e) => { console.error(e.shortMessage || e.message); process.exitCode = 1; }); diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/scripts/sol-probe.cjs b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/sol-probe.cjs new file mode 100644 index 00000000..58db55ee --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/sol-probe.cjs @@ -0,0 +1,77 @@ +// Independent read-only Solana devnet probe. No keys, no signing. +const fs = require('node:fs'); +const SDK = '/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk'; +const { Connection, PublicKey } = require(SDK + '/node_modules/@solana/web3.js'); +const RPC = 'https://api.devnet.solana.com'; +const SIGS = { + 'spl:first-use': 'y8hK7xQWVs4mRupJAJDRBkbt1EnVmtQNxAhPhTbvJbfULrwARFimjvygaDskPawH44dntUaq5Tq6ubDDp7592q1', + 'spl:subsequent': '3G782PfUtqv3THZGt7vH5J9xoscMMFvKwUo215J2Hoh4APYHEHMGDcKBjix6je5y3M2DhoeuENkmqWEFrJgUjmLe', +}; +const PROGRAMS = { + gatewayCFVS: 'CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS', + gatewayDJoF_pinnedSource: 'DJoFYDpgbTfxbXBv1QYhYGc9FK4J5FUKpYXAfSkHryXp', + testCounter_sdkFixture: '8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx', + testCounter_sourceDeclareId: '4mpHkerNsaJPp35fyT5bkoXxuEBczGq6HUKTtrzFcptx', + testCounter_anchorToml: '9LfpvcY2CYcNWEc2ip2ZwwKivEALbF3knwimXrbLubT2', + splMemoV2: 'MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr', + splMemoV1: 'Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo', + associatedToken: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', +}; +const CEA = 'DKbAi4YmS5EfdvKHzS2zHKSSPfgiffu3ZddXoY4N2VuX'; +const CEA_ATA = 'GuKBtW2xo53yMyj915CMCziHyyz1LaGxnfZBUDRJPd9K'; +const WALLET = '0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372'; +const err = (e) => (e && e.message || String(e)).slice(0, 300); + +async function main() { + const c = new Connection(RPC, 'confirmed'); + const out = { at: new Date().toISOString(), rpc: RPC, readOnly: true }; + out.slot = await c.getSlot(); + out.genesisHash = await c.getGenesisHash(); + out.rent = {}; + for (const n of [0, 8, 165, 82]) out.rent[n] = await c.getMinimumBalanceForRentExemption(n); + // CEA derivation as the gateway does it: ["push_identity", wallet20] under CFVS. + const [cea] = PublicKey.findProgramAddressSync( + [Buffer.from('push_identity'), Buffer.from(WALLET.slice(2), 'hex')], + new PublicKey(PROGRAMS.gatewayCFVS) + ); + out.ceaDerived = cea.toBase58(); + out.ceaMatchesEvidence = cea.toBase58() === CEA; + out.programs = {}; + for (const [k, id] of Object.entries(PROGRAMS)) { + try { + const info = await c.getAccountInfo(new PublicKey(id)); + out.programs[k] = info ? { id, executable: info.executable, owner: info.owner.toBase58(), dataLen: info.data.length } : { id, exists: false }; + } catch (e) { out.programs[k] = { id, error: err(e) }; } + } + out.ceaAta = {}; + try { + const info = await c.getParsedAccountInfo(new PublicKey(CEA_ATA)); + out.ceaAta = info.value ? info.value.data : { exists: false }; + } catch (e) { out.ceaAta.error = err(e); } + out.txs = {}; + for (const [k, sig] of Object.entries(SIGS)) { + const r = { sig }; + try { + const tx = await c.getParsedTransaction(sig, { maxSupportedTransactionVersion: 0, commitment: 'confirmed' }); + if (!tx) { r.missing = true; out.txs[k] = r; continue; } + r.slot = tx.slot; r.blockTime = tx.blockTime && new Date(tx.blockTime * 1000).toISOString(); + r.err = tx.meta.err; r.fee = tx.meta.fee; r.computeUnitsConsumed = tx.meta.computeUnitsConsumed; + r.signers = tx.transaction.message.accountKeys.filter((a) => a.signer).map((a) => a.pubkey.toBase58()); + r.programsInvoked = [...new Set([ + ...tx.transaction.message.instructions.map((i) => i.programId.toBase58()), + ...(tx.meta.innerInstructions || []).flatMap((x) => x.instructions.map((i) => i.programId.toBase58())), + ])]; + const tb = (arr) => (arr || []).map((b) => ({ account: tx.transaction.message.accountKeys[b.accountIndex].pubkey.toBase58(), mint: b.mint, owner: b.owner, amount: b.uiTokenAmount.amount, programId: b.programId })); + r.preTokenBalances = tb(tx.meta.preTokenBalances); + r.postTokenBalances = tb(tx.meta.postTokenBalances); + r.innerTransfers = (tx.meta.innerInstructions || []).flatMap((x) => x.instructions) + .filter((i) => i.parsed && /transfer|create|initializeAccount/i.test(i.parsed.type || '')) + .map((i) => ({ program: i.programId.toBase58(), type: i.parsed.type, info: i.parsed.info })); + r.logTail = (tx.meta.logMessages || []).filter((l) => /Program log|invoke|success|failed/i.test(l)).slice(0, 40); + } catch (e) { r.error = err(e); } + out.txs[k] = r; + } + fs.writeFileSync(process.argv[2], JSON.stringify(out, null, 2)); + console.log('ok slot', out.slot); +} +main().catch((e) => { console.error(err(e)); process.exitCode = 1; }); diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/scripts/spl-readback-probe-historical.cjs b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/spl-readback-probe-historical.cjs new file mode 100644 index 00000000..0e0a5f35 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/spl-readback-probe-historical.cjs @@ -0,0 +1,31 @@ +// Read-only: stored SPL rule readback + wrong-recipient refusal via eth_call. No keys. +const root='/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk',fs=require('node:fs'); +const {createPublicClient,http,decodeFunctionData,encodeFunctionData}=require(root+'/node_modules/viem'); +const built=root+'/dist/packages/core/src'; +const {PushChain}=require(built); +const {v6}=require(built+'/lib/agentic/contracts/v6'); +const {UNIVERSAL_GATEWAY_PC}=require(built+'/lib/constants/abi'); +const {parseAgwSvmPayload,encodeAgwSvmPayload}=require(built+'/lib/agentic/execution/svm-payload'); +const {decodeAgenticRevert}=require(built+'/lib/agentic/revert'); +const {PublicKey}=require(root+'/node_modules/@solana/web3.js'); +const big=(_k,v)=>typeof v==='bigint'?String(v):v; +(async()=>{ + const rpc=createPublicClient({transport:http('https://archive.evm.donut.rpc.push.org/',{timeout:15000,retryCount:1})}); + const hash='0x119c89e9ff7c7cccdfc8c071fade2488aa28b0eff7d9b71f7f0cf247c958bbf5'; + const tx=await rpc.getTransaction({hash}),w=v6.decodeWalletCall(tx.input); + const call=w.calls[0],{args}=decodeFunctionData({abi:UNIVERSAL_GATEWAY_PC,data:call.data}),req=args[0]; + const original=parseAgwSvmPayload(req.payload),block=BigInt(process.argv[3]); + const client=await PushChain.initialize({address:'0x0000000000000000000000000000000000005678',chain:PushChain.CONSTANTS.CHAIN.PUSH_TESTNET_DONUT},{network:PushChain.CONSTANTS.PUSH_NETWORK.TESTNET_DONUT}); + const record=await client.agentic.wallet(tx.to).rules.get(w.rulesId); + // Wrong recipient: swap the recipient ATA (account 2) for an ATA owned by someone else. + const other=PublicKey.findProgramAddressSync([new PublicKey('11111111111111111111111111111112').toBuffer(),new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA').toBuffer(),new PublicKey('EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF').toBuffer()],new PublicKey('ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'))[0]; + const payload={...original,accounts:original.accounts.map(a=>({...a})),instructionData:Uint8Array.from(original.instructionData)}; + payload.accounts[2].pubkey='0x'+other.toBuffer().toString('hex'); + const next={...req,amount:0n,payload:encodeAgwSvmPayload(payload.program,payload.accounts,payload.instructionData)}; + const data=v6.encodeExecuteAsAgent(w.rulesId,{...call,data:encodeFunctionData({abi:UNIVERSAL_GATEWAY_PC,functionName:'sendUniversalTxOutbound',args:[next]})}); + let refusal; + try{await rpc.call({account:tx.from,to:tx.to,data,blockNumber:block});refusal='NOT REFUSED';}catch(e){refusal=decodeAgenticRevert(e)||String(e.shortMessage||e.message);} + const out={at:new Date().toISOString(),readOnly:true,block:String(block),wallet:tx.to,rulesId:w.rulesId,originalAccounts:original.accounts,record,wrongRecipient:{ata:other.toBase58(),refusal}}; + fs.writeFileSync(process.argv[2],JSON.stringify(out,big,2)); + console.log(JSON.stringify({block:out.block,rule:record.rule,wrongRecipient:out.wrongRecipient,originalAccounts:original.accounts},big,1)); +})().catch(e=>{console.error(e.shortMessage||e.message);process.exitCode=1}); diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/scripts/spl-readback-probe.cjs b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/spl-readback-probe.cjs new file mode 100644 index 00000000..828e683a --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/spl-readback-probe.cjs @@ -0,0 +1,31 @@ +// Read-only: stored SPL rule readback + wrong-recipient refusal via eth_call. No keys. +const root='/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk',fs=require('node:fs'); +const {createPublicClient,http,decodeFunctionData,encodeFunctionData}=require(root+'/node_modules/viem'); +const built=root+'/dist/packages/core/src'; +const {PushChain}=require(built); +const {v6}=require(built+'/lib/agentic/contracts/v6'); +const {UNIVERSAL_GATEWAY_PC}=require(built+'/lib/constants/abi'); +const {parseAgwSvmPayload,encodeAgwSvmPayload}=require(built+'/lib/agentic/execution/svm-payload'); +const {decodeAgenticRevert}=require(built+'/lib/agentic/revert'); +const {PublicKey}=require(root+'/node_modules/@solana/web3.js'); +const big=(_k,v)=>typeof v==='bigint'?String(v):v; +(async()=>{ + const rpc=createPublicClient({transport:http('https://evm.donut.rpc.push.org/',{timeout:15000,retryCount:1})}); + const hash='0x119c89e9ff7c7cccdfc8c071fade2488aa28b0eff7d9b71f7f0cf247c958bbf5'; + const tx=await rpc.getTransaction({hash}),w=v6.decodeWalletCall(tx.input); + const call=w.calls[0],{args}=decodeFunctionData({abi:UNIVERSAL_GATEWAY_PC,data:call.data}),req=args[0]; + const original=parseAgwSvmPayload(req.payload),block=await rpc.getBlockNumber(); + const client=await PushChain.initialize({address:'0x0000000000000000000000000000000000005678',chain:PushChain.CONSTANTS.CHAIN.PUSH_TESTNET_DONUT},{network:PushChain.CONSTANTS.PUSH_NETWORK.TESTNET_DONUT}); + const record=await client.agentic.wallet(tx.to).rules.get(w.rulesId); + // Wrong recipient: swap the recipient ATA (account 2) for an ATA owned by someone else. + const other=PublicKey.findProgramAddressSync([new PublicKey('11111111111111111111111111111112').toBuffer(),new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA').toBuffer(),new PublicKey('EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF').toBuffer()],new PublicKey('ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'))[0]; + const payload={...original,accounts:original.accounts.map(a=>({...a})),instructionData:Uint8Array.from(original.instructionData)}; + payload.accounts[2].pubkey='0x'+other.toBuffer().toString('hex'); + const next={...req,amount:0n,payload:encodeAgwSvmPayload(payload.program,payload.accounts,payload.instructionData)}; + const data=v6.encodeExecuteAsAgent(w.rulesId,{...call,data:encodeFunctionData({abi:UNIVERSAL_GATEWAY_PC,functionName:'sendUniversalTxOutbound',args:[next]})}); + let refusal; + try{await rpc.call({account:tx.from,to:tx.to,data,blockNumber:block});refusal='NOT REFUSED';}catch(e){refusal=decodeAgenticRevert(e)||String(e.shortMessage||e.message);} + const out={at:new Date().toISOString(),readOnly:true,block:String(block),wallet:tx.to,rulesId:w.rulesId,originalAccounts:original.accounts,record,wrongRecipient:{ata:other.toBase58(),refusal}}; + fs.writeFileSync(process.argv[2],JSON.stringify(out,big,2)); + console.log(JSON.stringify({block:out.block,rule:record.rule,wrongRecipient:out.wrongRecipient,originalAccounts:original.accounts},big,1)); +})().catch(e=>{console.error(e.shortMessage||e.message);process.exitCode=1}); diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/scripts/trace-bnb.cjs b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/trace-bnb.cjs new file mode 100644 index 00000000..31d6129d --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/trace-bnb.cjs @@ -0,0 +1,8 @@ +const path=require('node:path');const built='/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/dist/packages/core/src'; +const {PushChain}=require(built);const {CHAIN,PUSH_NETWORK}=PushChain.CONSTANTS; +const {getNativePRC20ForChain}=require(path.join(built,'lib/orchestrator/internals/helpers')); +(async()=>{for (const chain of [CHAIN.PUSH_TESTNET_DONUT, CHAIN.ETHEREUM_SEPOLIA]) { + const client=await PushChain.initialize({address:'0x0000000000000000000000000000000000005678',chain},{network:PUSH_NETWORK.TESTNET_DONUT,printTraces:true}); + const rt=client.agenticRuntime; console.log('#### origin',chain); + const q=await rt.quoteOutbound(getNativePRC20ForChain(CHAIN.BNB_TESTNET,rt.network),BigInt(2000000),CHAIN.BNB_TESTNET); + console.log('#### result',chain,String(q.nativeValueForGas));}})().catch(e=>{console.error('ERR',e.message);process.exitCode=1}); diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/scripts/uregistry-probe.cjs b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/uregistry-probe.cjs new file mode 100644 index 00000000..12e01d54 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/scripts/uregistry-probe.cjs @@ -0,0 +1,50 @@ +// Read-only abci_query of the node's uregistry token configs (canonical route registry). +const fs = require('node:fs'); +const RPC = 'https://donut.rpc.push.org:443'; +function varint(buf, i) { let x = 0n, s = 0n; for (;;) { const b = buf[i++]; x |= BigInt(b & 0x7f) << s; if (!(b & 0x80)) break; s += 7n; } return [x, i]; } +function fields(buf) { + const out = []; let i = 0; + while (i < buf.length) { + let key; [key, i] = varint(buf, i); + const no = Number(key >> 3n), wt = Number(key & 7n); + if (wt === 0) { let v; [v, i] = varint(buf, i); out.push([no, v]); } + else if (wt === 2) { let l; [l, i] = varint(buf, i); out.push([no, buf.subarray(i, i + Number(l))]); i += Number(l); } + else if (wt === 5) { out.push([no, buf.subarray(i, i + 4)]); i += 4; } + else if (wt === 1) { out.push([no, buf.subarray(i, i + 8)]); i += 8; } + else throw new Error('wire type ' + wt); + } + return out; +} +const str = (b) => Buffer.from(b).toString('utf8'); +function tokenConfig(buf) { + const t = {}; + for (const [no, v] of fields(buf)) { + if (no === 1) t.chain = str(v); else if (no === 2) t.address = str(v); else if (no === 3) t.name = str(v); + else if (no === 4) t.symbol = str(v); else if (no === 5) t.decimals = Number(v); else if (no === 6) t.enabled = v === 1n; + else if (no === 7) t.liquidityCap = str(v); else if (no === 8) t.tokenType = Number(v); + else if (no === 9) { t.native = {}; for (const [n2, v2] of fields(v)) { if (n2 === 1) t.native.denom = str(v2); if (n2 === 2) t.native.contractAddress = str(v2); } } + } + return t; +} +async function abci(path, dataHex) { + const url = `${RPC}/abci_query?path=%22${encodeURIComponent(path)}%22&data=0x${dataHex}`; + const r = await (await fetch(url)).json(); + if (!r.result || r.result.response.code) throw new Error(JSON.stringify(r).slice(0, 400)); + return { height: r.result.response.height, value: Buffer.from(r.result.response.value || '', 'base64') }; +} +async function main() { + const out = { at: new Date().toISOString(), rpc: RPC, readOnly: true }; + const info = await (await fetch(`${RPC}/abci_info`)).json(); + out.node = info.result.response; + // pagination { limit: 1000 } + const req = Buffer.from([0x0a, 0x03, 0x18, 0xe8, 0x07]); + const r = await abci('/uregistry.v1.Query/AllTokenConfigs', req.toString('hex')); + out.height = r.height; + out.tokenConfigs = fields(r.value).filter(([no]) => no === 1).map(([, v]) => tokenConfig(v)); + const rc = await abci('/uregistry.v1.Query/AllChainConfigs', req.toString('hex')); + out.chainConfigCount = fields(rc.value).filter(([no]) => no === 1).length; + out.chainConfigsRaw = fields(rc.value).filter(([no]) => no === 1).map(([, v]) => fields(v).filter(([n]) => n === 1).map(([, s]) => str(s))[0]); + fs.writeFileSync(process.argv[2], JSON.stringify(out, (_k, v) => (typeof v === 'bigint' ? v.toString() : v), 2)); + console.log('ok height', out.height, 'tokens', out.tokenConfigs.length); +} +main().catch((e) => { console.error(e.message); process.exitCode = 1; }); diff --git a/plan/agw/independent-review-creation-flow-2026-10-20/team-questions.md b/plan/agw/independent-review-creation-flow-2026-10-20/team-questions.md new file mode 100644 index 00000000..ffc8f8f9 --- /dev/null +++ b/plan/agw/independent-review-creation-flow-2026-10-20/team-questions.md @@ -0,0 +1,82 @@ +# Team questions (draft only; nothing has been sent) + +> **Superseded on 21 October** by [questions-harsh.md](../questions-harsh.md) (product decisions, no recommendations, gas ceiling removed as UI work), [questions-aman.md](../questions-aman.md) (presets: tokens, routes, native ETH/BNB wrap), [questions-zaryab.md](../questions-zaryab.md) (AGW contract only) and [questions-core-gateway.md](../questions-core-gateway.md) (gas price, registry endpoint, deployed sources, Solana gateway). This file is the review-time snapshot. + +These are the smallest set of open questions after the review. Questions already answered by source, chain state or evidence are listed at the end, with their answers, so they can be dropped from our existing drafts. + +## Harsh (product / SDK spec) + +1. **Apps optional.** For "tokens only" rules, may the UI generate EVM ERC20 `transfer(to, amount)` permissions with **named recipients** and a **per-transfer** cap? + - That permission also lets the agent move tokens already in the wallet's destination account to those recipients, an unlimited number of times until expiry. + - Native coins (ETH/BNB) and Solana are excluded from this first version. + - Alternatives: any recipient (not recommended), or only the owner's own address on that chain. +2. **All tokens.** Should "no tokens selected" stay as "no tokens sent from Push" (current behaviour)? Should an explicit **"All supported tokens (N)"** choice expand into a visible list of at most 8 tokens per chain, each with its own cap? Only a new contract model could cover future tokens. +3. **Limit wording.** Can we ship the labels in [decision-matrix.md §D](decision-matrix.md)? They say per-send, per-action and per-transaction gas; that the total counts sends that later fail; that wallet-held funds are not counted; and that DEX price and slippage are not limited. + - Is a combined per-request limit, or a cumulative destination limit, required? Both need contract work. + - For Push-native rules, should the public shape expose total caps (`maxValueTotal`, call counts, cumulative token amount)? The contract already supports them; this is SDK and spec work only. +4. **Wrapped-native presets.** For the WETH/WBNB legs (DEX on Base, Arbitrum and BNB) and Sepolia EigenLayer WETH, may a preset export the native coin (pETH / pBNB) and wrap it on the destination, instead of exporting the wrapped ERC20? Caps would stay in the same units. This works with deployed contracts; it is SDK catalog work. +5. **Gas ceiling policy.** Which should we adopt? + - (a) A fixed 20 PC with a BNB-testnet caveat. + - (b) Per-chain ceilings, for example BNB 60 PC. + - (c) A public read-only gas-budget quote helper that the UI uses to prefill: at least 20 PC, or 2× the current first-send quote. + + Please also confirm that a per-transaction ceiling with no total gas limit is acceptable. +6. **Native function count.** Spec §6.h says 1..32 allowed calls for every chain. Deployed Push-native rules allow 8 distinct (target, function) pairs. Can the spec say 1..8 for Push rules, or is more than 8 a real requirement (contract change)? + +## Core / node owners (uregistry, UniversalCore) + +1. **Confirm the three Circle USDC routes** below support **outbound** delivery and are not being retired, despite the `.old` label: + + | Chain | Token | Push token | + |---|---|---| + | eip155:11155111 | `0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238` | `0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E` | + | eip155:84532 | `0x036CbD53842c5426634e7929541eC2318f3dCF7e` | `0x84B62e44F667F692F7739Ca6040cD17DA02068A8` | + | eip155:421614 | `0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d` | `0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6` | + + - What we checked: they are enabled in the node's token registry at height 24,457,377; their on-chain source address, decimals (6) and outbound quotes are correct; and their supply is backed by the destination Vault. + - **What the SDK does next:** add address-keyed mappings, then run a funded test of creation and delivery. That makes DEXES Sepolia and LENDING Arbitrum route-ready. + +2. **Provision these routes, or say they won't be supported.** For each token we need: a uregistry `TokenConfig` (chain, address, decimals, enabled, and the Push token address); the Push token deployed and initialised with the matching source chain and address; UniversalCore gas config; an inbound gateway threshold; and Vault liquidity. + + | Token | Address | + |---|---| + | Sepolia Aave LINK | `0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5` | + | Sepolia WETH9 (EigenLayer strategy underlying) | `0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9` | + | Base Sepolia WETH | `0x4200000000000000000000000000000000000006` | + | Base Sepolia Aave LINK | `0x810D46F9a9027E28F9B01F75E2bdde839dA61115` | + | Base Sepolia Moonwell USDbC | `0x4616975f7E6045FD9737e95bC527e9e14c727BD2` | + | Base Sepolia Moonwell WETH | `0x663A6F02d547dFd639BF689FED298712f2FB69Fb` | + | Arbitrum Sepolia WETH | `0x980B62Da83eFf3D4576C647993b0c1D7faf17c73` | + | BNB testnet WBNB | `0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd` | + | BNB testnet USDT (Venus) | `0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c` | + | BNB testnet USDC (Venus) | `0x16227D60f7a0e586C66B005219dfc887D13C9531` | + + The WETH and WBNB legs can drop off this list if product approves the wrapped-native alternative (Harsh 4). + +3. **BNB testnet gas price.** Donut's `gasPriceByChainNamespace("eip155:97")` moved between 0.055, 0.11 and 1.1 gwei within about 100 minutes (blocks 24,455,072–24,457,472). Is that expected oracle behaviour? It decides whether a 20 PC ceiling covers a first BNB send. +4. **Supported registry endpoint.** Can the SDK rely on `abci_query /uregistry.v1.Query/AllTokenConfigs` (or a public REST/gRPC endpoint) as the canonical route source, or should it ship a snapshot? +5. **Deployed UniversalCore source.** Which commit is deployed? It returns 6 values (with `gasLimitUsed`) and reverts below the base limit; core `main` (`b2f22241`) returns 5. + +## Gateway owners (Solana) + +1. **Which source is deployed at `CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS`?** The pinned `gateway-testnet@b205770f` declares `DJoF…`. + - Please confirm the finalize gas formula is "signature fee + `ExecutedSubTx` rent + first-use CEA ATA rent". Live reimbursements matched it: 2,184,320 and 695,880 lamports. + - Is the unused `gas_fee` refunded to the wallet on Push? +2. **A second E2E program.** Can the gateway run a CEA-signed CPI into SPL Memo v2 (`MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr`, non-Anchor, data only)? If not, please give us a devnet program ID and IDL for a reviewed program with fixed-width arguments that moves SPL tokens. + +## AGW contract owners (Zaryab) + +1. **Native ceiling.** Confirm 8 native actions is intentional for v6. Ask only if Harsh's answer to question 6 is "more than 8". +2. **`fromEnd` data pins (information only).** Rules do not limit instruction-data length. Can an agent append trailing bytes that a `fromEnd` pin would read, while the program ignores them? The SDK does not expose `fromEnd` today. + +## Already answered: remove from our drafts + +| Old question | Answer | +|---|---| +| "Canonical PRC20s for the preset tokens?" (questions-zaryab) | Partly answered by the node registry: the three Circle USDC routes exist. Only the list in Core question 2 remains | +| "Does gateway allow-listing establish a route?" | No. `isSupportedToken` is an inbound threshold only (`UniversalGateway.sol:770`). Outbound needs Vault liquidity (`Vault.sol:417-423`) or the TSS balance for native coins | +| "Do Solana pins enforce wallet token accounts in every case?" (questions-zaryab 2) | Answered by source. URP cannot check which account belongs to whom (`Types.sol:585-587`); the owner pins positions, and the SDK pins the wallet's token account. Pins compare exact keys; writable and signer flags are not checked | +| "Are allowed functions required?" | Yes. EVM: `AllowListOutOfRange(0)` (URP:347). Solana: at least one program rule, each with an account pin (`SvmRulebook.sol:132, 251`). Every request needs at least one call | +| "Is there an asset wildcard?" | No. 1..8 explicit Push tokens on the chain; no sentinel (`RulesLib.sol:39`, `:64-71`) | +| "What does the total cap count?" | Only the amount sent from Push per request, over the rule's lifetime. Never decremented; `creditRevert` is inactive (URP:584-608, 1052) | +| "What does the 10 PC quote mean?" | The SDK's $1 minimum at the fixed $0.10 rate for Push-native signers. Gas actually spent was 0.0008–2.37 PC | diff --git a/plan/agw/latest-refresh.json b/plan/agw/latest-refresh.json new file mode 100644 index 00000000..2d177337 --- /dev/null +++ b/plan/agw/latest-refresh.json @@ -0,0 +1,31 @@ +{ + "run_id": "20261012T145327Z", + "pulled_at": "2026-10-12T14:53:27.075673+00:00", + "scope": "pages 1 and 5 requested by user", + "complete": false, + "requested_pages_complete": true, + "notes": "Focused refresh of two pages, not a new twelve-page export. Other ten pages retain their individual source-manifest timestamps. Discussions inspected separately; native exports omit comments.", + "previous_full_refresh": "research/section6-feedback-2026-10-12/previous-latest-refresh.json", + "archives": [ + "research/section6-feedback-2026-10-12/sdk-export.zip", + "research/section6-feedback-2026-10-12/contracts-export.zip" + ], + "pages": [ + { + "page": "sdk", + "export_entry": "Private & Shared/5 SDK AGW 3e9188aea7f481cf8e8de324956549b9.md", + "sha256": "7f8e6e892686fc298bd0a40d66d7e21cb457711e18a272e563322403bc0380ec", + "exported_at": "2026-10-12T14:53:27.075673+00:00", + "local_file": "plan/agw/notion/5-sdk-agw.md", + "native_export_includes_comments": false + }, + { + "page": "contracts", + "export_entry": "Private & Shared/1 AGW Contract Changes (nomenclature standard + ch 3e9188aea7f4813aa31fc95ceb4e684d.md", + "sha256": "7d1690747f52a32a2e3c9eac64422db8dbc673729f370156da2c83c06634bac4", + "exported_at": "2026-10-12T14:53:27.077622+00:00", + "local_file": "plan/agw/notion/1-agw-contract-changes.md", + "native_export_includes_comments": false + } + ] +} diff --git a/plan/agw/notion/1-agw-contract-changes.md b/plan/agw/notion/1-agw-contract-changes.md new file mode 100644 index 00000000..0db4e6a6 --- /dev/null +++ b/plan/agw/notion/1-agw-contract-changes.md @@ -0,0 +1,502 @@ +# 1. AGW Contract Changes (nomenclature standard + change set) + + + +# 0. Before the naming: AGW will break when the gateway is upgraded + +**What happened.** The gateway team changed the outbound request struct on GitHub main. Two fields are gone (`gasPrice`, `maxPCForGas`). AGW copied the old struct into its own repo and URP checks one of the removed fields (gate 9: `maxPCForGas` must be non-zero). + +**Why it still works today.** Donut is still running the old gateway (implementation `0x1e41...a659` has the old eight fields). + +**What breaks.** The day the new gateway is deployed on Donut, every cross-chain rule set stops working: URP rejects every request. + +**Fix, two rules.** + +1. AGW never copies a gateway or core struct. It imports them from the gateway and core packages, so a change upstream fails the build instead of failing on-chain. +2. The URP upgrade and the gateway upgrade go out together, not separately. + +Same rule for the selector: derive `sendUniversalTxOutbound.selector` from the interface, do not hardcode `0x77b86bec`. + +# 1. How core and gateway name things (the standard AGW follows) + +These conventions already exist in `push-chain-core-contracts` and `push-chain-gateway-contracts`. AGW adopts them as is. Where the two repos disagree, the AGW column says which one wins. + +| Area | Convention | Example | AGW | +| --- | --- | --- | --- | +| Contract names | Chain-agnostic components spell out Universal. Push-side variants add PC. Accounts are 3-letter acronyms. | `UniversalCore`, `UniversalGatewayPC`, `UEA`, `CEAFactory` | `AGW`, `AGWFactory`, `UniversalRulesPolicy` | +| Errors | One `libraries/Errors.sol` per repo, one error library per contract, PascalCase, arguments only when the caller needs them. Caller checks are `CallerIsNotX`. | `UEAErrors.InvalidCall()`, `CommonErrors.ZeroAddress()`, `CallerIsNotUEModule()` | `AGWErrors`, `AGWFactoryErrors`, `UniversalRulesPolicyErrors` | +| Types and constants | One `libraries/Types.sol`, plain file-level structs, `UPPER_SNAKE` constants, selectors derived not hardcoded. | `struct Multicall`, `MULTICALL_SELECTOR = bytes4(keccak256("UEA_MULTICALL"))` | `libraries/Types.sol`; gateway and core structs imported, never copied | +| Request shape | One `XRequest` struct as the single argument; the contract infers the kind. Users never state a type. | `sendUniversalTxOutbound(UniversalOutboundTxRequest req)` infers `TX_TYPE` | `grantRules(Session)` infers `NATIVE` vs `UNIVERSAL` from `chainNamespace` | +| Interface sections | Tag plus number banners, events first, NatSpec on everything. | `UGPC_1: EVENTS`, `UGPC_2: OUTBOUND TX`, `UGPC_3: VIEW FUNCTIONS` | `AGW_1: EVENTS` ... `AGW_5: VIEWS`, `URP_1` ... `URP_3` | +| Functions | `setX`, `getX`, `isX`. Set-once wiring is read through `UPPER_CASE()` getters. | `isSupportedToken()`, `UNIVERSAL_CORE()` | `SESSION_ENGINE()`, `RULES_POLICY()`, `UNIVERSAL_GATEWAY_PC()` | +| Storage | Internal state is underscore-prefixed. | `_walletCount` | `_` everywhere; drop URP's `$` prefix | +| Roles | `UPPER_SNAKE_ROLE`. | `DEFAULT_ADMIN_ROLE`, `PAUSER_ROLE`, `TSS_ROLE` | same; `PAUSER` and `OPERATOR` split kept, documented | +| Chain identity | Full CAIP-2 string, field named `chainNamespace`. | `"eip155:1"` | envelope field renamed `chain` to `chainNamespace` | +| Events | No consistent rule upstream. | `SetChainMeta` (imperative), `VaultPCUpdated` (past) | past tense: `RulesGranted`, `WalletDeployed` | +| Layout | `src/` with `interfaces/` and `libraries/`; numbered docs and tests; addresses per network; `CLAUDE.md` in every package. | `docs/1_PUSH_CHAIN.md`, `test/gateway/1_adminActions.t.sol`, `docs/addresses/sepolia.md` | same, see rename map | + +#### Where each convention was seen (open only if you want the receipts) + +Core repo, folder layout: + +``` +src/ + Interfaces/ IUniversalCore.sol, IUEA.sol, ICEA.sol + libraries/ Errors.sol, Types.sol, Utils.sol + uea/ UEAFactory.sol, UEA_EVM.sol, UEA_SVM.sol + cea/ CEAFactory.sol, CEA.sol + UniversalCore.sol, PRC20.sol, WPC.sol +``` + +Gateway repo, folder layout: + +``` +contracts/evm-gateway/ + src/ UniversalGateway.sol, UniversalGatewayPC.sol, Vault.sol, VaultPC.sol + src/interfaces/ IUniversalGatewayPC.sol, IVault.sol + src/libraries/ Errors.sol, Types.sol, TypesUG.sol, TypesUGPC.sol + docs/ 1_PUSH_CHAIN.md, 2_UniversalGateway.md, 3_UniversalGatewayPC.md + docs/addresses/ sepolia.md, bsc-testnet.md + test/gateway/ 1_adminActions.t.sol ... 14_gatewayPC.t.sol + script/ 1_DeployGatewayWithProxy.sol, 3_UpgradeGatewayNewImpl.sol + CLAUDE.md +``` + +Errors (core, `libraries/Errors.sol`): + +```solidity +library CommonErrors { error ZeroAddress(); error Unauthorized(); error InvalidInput(); } +library UniversalCoreErrors { error CallerIsNotUEModule(); error GasLimitBelowBase(uint256 provided, uint256 minimum); } +library UEAErrors { error InvalidCall(); error ExecutionFailed(); } +``` + +Types (core, `libraries/Types.sol`): + +```solidity +struct UniversalAccountId { string chainNamespace; string chainId; bytes owner; } +struct Multicall { address to; uint256 value; bytes data; } +bytes4 constant MULTICALL_SELECTOR = bytes4(keccak256("UEA_MULTICALL")); +``` + +Request shape (gateway, `TypesUGPC.sol` and `IUniversalGatewayPC.sol`): + +```solidity +struct UniversalOutboundTxRequest { bytes recipient; address token; uint256 amount; uint256 gasLimit; bytes payload; address revertRecipient; } +function sendUniversalTxOutbound(UniversalOutboundTxRequest calldata req) external payable; // TX_TYPE inferred inside +``` + +Interface sections and wiring getters (gateway, `IUniversalGatewayPC.sol`): + +```solidity +// UGPC_1: EVENTS +// UGPC_2: OUTBOUND TX +// UGPC_3: VIEW FUNCTIONS +function UNIVERSAL_CORE() external view returns (address); +``` + +Events (both repos, no single rule): + +```solidity +event SetChainMeta(...); // core, imperative +event PauserRoleGranted(...); // core, past tense +event UniversalTxOutbound(...); // gateway, noun +event VaultPCUpdated(...); // gateway, past tense +``` + +Chain identity, the same field name with two meanings: + +```solidity +gasPriceByChainNamespace("eip155:1") // UniversalCore: full CAIP-2 string +UniversalAccountId({ chainNamespace: "eip155", chainId: "1" }) // Read State: split +``` + +# 2. Decisions + +| # | Decision | Outcome | +| --- | --- | --- | +| D1 | Wallet contract name | **AGW.sol** (account acronym like UEA, CEA). Full form "Agentic Wallet" in the NatSpec title only. Factory stays `AGWFactory.sol`. | +| D2 | Policy contract name | **UniversalRulesPolicy.sol**. `URP` stays as the short form in comments, events and the SDK constant, the way `UGPC` stands for `UniversalGatewayPC`. | +| D3 | Validator contract name | PROPOSED 2026-09-29: **no validator.** The agent is a Push address: a native key is its own EOA, any external key (EVM, Solana, anything) is its UEA, deterministic from (chain, owner). Cross-VM signature verification already happens inside the UEA, so the agent door checks `msg.sender == rules.agent` and hands the calls to URP. `PushSessionValidator.sol` is removed rather than renamed. Pending one check against the v3 branch: how deep SmartSession's signature path is wired into the engine calls URP relies on, and whether the policy engine can be driven from a sender check without forking it. | +| D4 | Vocabulary for the granted object | **rules, one word everywhere.** On-chain: `grantRules`, `revokeRules`, `revokeAllRules`, `rulesId`, `RulesGranted`, `RulesRevoked`, `RulesActionAuthorized`. Layer: Universal Rules. SDK: `client.agentic.rules`. `permissionId` remains the SmartSession-internal name and is exposed as `rulesId`. `mandate` is retired from code, docs and copy. +**Rename boundary (2026-09-29).** Three vocabularies live in the fork; only ours is renamed. ERC-7579 names stay (`execute(mode, executionCalldata)`, `ModeCode`, module types, `installModule`). SmartSession names stay inside the engine and on the interfaces URP implements (`Session`, `permissionId`, `PolicyData`, `ActionData`, `ConfigId`, `enableSessions`, `isPermissionEnabled`, `IPolicy.checkAction`, `initializeWithMultiplexer`): audit history and upstream diffs attach to those names. Push's own words (`mandate`, `PushAgentWallet`, our events, envelope, docs, SDK) become rules. The seam is the AGW ABI: `rulesId` is computed by the engine's `getPermissionId(Session)` and the NatSpec states `rulesId == permissionId`. If the engine is vendored with edits, it lives in `src/vendor/smartsession/` with a note naming the upstream commit and every local change. If D3 ends with the engine dropped, SmartSession vocabulary leaves with it. | +| D5 | Door functions | Keep `execute` (owner door). Agent door becomes `executeAsAgent(bytes32 rulesId, bytes32 mode, bytes executionCalldata)`, gated on `msg.sender == rules.agent`, replacing `executeWithSession` and its signature blob (follows D3). "Owner door" and "agent door" stay as NatSpec language. | +| D6 | Chain field in the envelope | Rename `chain` to `chainNamespace`, full CAIP-2 string, matching `UniversalCore` and gateway events. Read State keeps its split fields; the SDK converts. | +| D7 | Mode names | `NATIVE` and `UNIVERSAL` stay. The SVM rulebook is selected by the `solana` namespace inside `UNIVERSAL`; no new mode name. | + +# 3. Rename map (current to proposed) + +| Area | Today | Proposed | +| --- | --- | --- | +| Inherited names (7579, SmartSession) | `execute(mode, executionCalldata)`, `Session`, `permissionId`, `PolicyData`, `ActionData`, `ConfigId`, `checkAction`, `initializeWithMultiplexer` | unchanged (see D4 rename boundary) | +| Wallet | `PushAgentWallet.sol` | `AGW.sol` | +| Factory | `AGWFactory.sol` | `AGWFactory.sol` (unchanged) | +| Policy | `policies/URP.sol` | `UniversalRulesPolicy.sol` | +| Validator | `validators/PushSessionValidator.sol` | removed (D3): agent identity is a Push address, verification lives in the UEA | +| Interfaces | `IPushAgentWallet`, `IURP`, `IPushSessionValidator`, local `IUniversalGatewayPC`, `IPRC20Source` | `IAGW`, `IUniversalRulesPolicy`; gateway and core interfaces imported (`IUEAFactory` for `computeUEA` in tests and tooling) | +| Errors | `libraries/PushWalletErrors.sol` plus errors declared in `IURP` and `IAGWFactory` | `libraries/Errors.sol` with `AGWErrors`, `AGWFactoryErrors`, `UniversalRulesPolicyErrors`; reuse `CommonErrors` names (`ZeroAddress`, `Unauthorized`, `AlreadyInitialized`); `AGWErrors.CallerIsNotAgent()` | +| Types | `libraries/PushWalletTypes.sol` re-declares `UniversalOutboundTxRequest`, `Multicall` | `libraries/Types.sol` with AGW-owned structs only (`RulesEnvelope`, `NativeTerms`, `UniversalTerms`, `AllowedCall`, `ArgPin`, `AmountRule`); gateway and core types imported | +| Grant / revoke | `grantMandate`, `stopMandate`, `stopAll` | `grantRules`, `revokeRules`, `revokeAllRules` | +| Events | `MandateGranted`, `MandateRevoked`, `MandateActionAuthorized`, `URPPolicySet` | `RulesGranted`, `RulesRevoked`, `RulesActionAuthorized`, `RulesConfigured` | +| Ids | `permissionId` in wallet ABI | `rulesId` in wallet ABI (engine keeps `permissionId` internally) | +| Wiring getters | `sessionEngine()`, `urp()`, `sessionValidator()`, `universalGateway()` | `SESSION_ENGINE()`, `RULES_POLICY()`, `UNIVERSAL_GATEWAY_PC()` (no validator getter, D3) | +| Storage prefix | `_` in wallet and factory, `$` in URP | `_` everywhere | +| Envelope | `abi.encode(string chain, bytes body)` | `abi.encode(uint16 version, string chainNamespace, bytes body)` | +| Interface banners | none | `AGW_1: EVENTS`, `AGW_2: OWNER DOOR`, `AGW_3: AGENT DOOR`, `AGW_4: RULES LIFECYCLE`, `AGW_5: VIEWS`; `URP_1: EVENTS`, `URP_2: POLICY`, `URP_3: VIEWS`; `AGWF_1: EVENTS`, `AGWF_2: DEPLOY`, `AGWF_3: VIEWS` | +| Selector constant | `SEND_OUTBOUND_SELECTOR = 0x77b86bec` | derived from `IUniversalGatewayPC` | +| Roles | `PAUSER_ROLE` pauses, `OPERATOR_ROLE` unpauses | keep the split, document it as a deliberate deviation from gateway | +| Event tense | past tense | past tense, written down as the rule | +| Docs | `docs/v3-architecture.md`, `agentic_wallet_flow.md`, `push_native_agentic_wallet_flow.md` | `docs/1_AGW.md`, `2_UniversalRulesPolicy.md`, `3_Universal_Flow.md`, `4_Native_Flow.md` | +| Addresses | `deployments/address-book-v3/ADDRESSES.md` | `docs/addresses/donut.md` | +| Tests | `test/unit/*.t.sol`, `test/integration/*.t.sol` | numbered by area: `1_factory`, `2_ownerDoor`, `3_rulesLifecycle`, `4_agentDoor`, `5_universalRulebook`, `6_nativeRulebook`, `7_externalAgentViaUEA`, `8_e2e` | + +# 4. Structural changes that ride along with the rename + +Agreed on 2026-09-28. Listed here so the rename and the additions land in one change set and one audit, before the permanent deployment. + +1. **Signature-authorized variants**: `deployWalletWithSig`, `grantRulesWithSig`, `executeWithSig`. One EIP-712 domain per contract. Digest includes chainid, contract, nonce (the wallet's grant nonce for grants; a per-owner nonce on the factory), deadline. Verify ECDSA, and ERC-1271 when the owner has code (a UEA). +2. **Checkpoints**: the wallet records owner-side changes an evaluator needs: principal moved out (owner-door value or token transfer out, and every outbound), rules granted, revoked or replaced, key changed. Per-wallet monotonic counter plus `Checkpointed(kind, ref, blockNumber)`, so an evaluator can ask "any checkpoint after block N" with one read. +3. **`bytes32 ref` on `grantRules`**, emitted in `RulesGranted`, so a job binds to a rules id and an indexer goes rules to job without the hook. +4. **Stop-only role: dropped for v1** (2026-10-01). A binder address that could call `revokeRules` and nothing else was considered so a job hook could end rules at job end. Not needed: rules expire by `validUntil`, which the fund hook requires to be at or after the job's `expiredAt`, caps bound the gap, and the hook keeps its own one-live-job slot. Additive to bring back later. +5. **Envelope version word**: `abi.encode(uint16 version, string chainNamespace, bytes body)`. +6. **`creditRevert` reachability**: wire the real executor module or replace the credit path. Today spend never decreases on Donut. +7. **SVM rulebook** in the policy, keyed by the `solana` namespace: 32-byte `expectedCEA` and targets, program plus instruction discriminator allow-list, beneficiary check over the accounts array, SVM payload gate. +8. **Import gateway and core types**, derive the outbound selector, sequence the URP upgrade with the gateway's struct change. +9. **Agent identity is a Push address** (2026-09-29). The rules name an address: an EOA, or the UEA of an external key. The agent door checks the sender instead of verifying a session signature; the validator contract goes. One identity for rules, card and 8183 provider, so the fund hook matches by equality. Sizing against the v3 branch pending (D3). +10. **Editable label** (2026-10-01). `setLabel(string label)` on AGW, owner only, emits `LabelSet(string label)`. Today the label is only passed at `deployWallet` and emitted in `WalletDeployed`. Not a checkpoint kind: cosmetic metadata, evaluators ignore it. SDK: `w.setLabel(label)` on page 5. + +# 4b. Contract surface, as a diff + +Read `+` as added, `-` as removed, `~` as changed in place, `=` as unchanged. Names are the post-rename names. Storage slots never move; renames are labels only. + +**AGWFactory** + +```diff += deployWallet(string label) returns (address wallet) // caller is the owner ++ deployWalletWithSig(address owner, uint96 index, string label, ++ uint48 deadline, bytes ownerSig) returns (address) // EIP-712; index must equal walletCount(owner) ++ // ownerSig: ECDSA, or ERC-1271 when owner has code (UEA) ++ DOMAIN_SEPARATOR() view returns (bytes32) += predictWallet(address owner, uint256 index) view returns (address, bool deployed) += walletCount / ownerOf / isWallet / indexOf / walletImplementation += pause() PAUSER_ROLE, unpause() OPERATOR_ROLE += event WalletDeployed(owner, index, wallet, label) +``` + +**AGW** (was PushAgentWallet) + +```diff +// owner door += execute(bytes32 mode, bytes executionCalldata) payable // owner only, no policy +~ execute now emits Checkpointed(seq, OWNER_ACTION, keccak(calldata), block) ++ executeWithSig(bytes32 mode, bytes executionCalldata, ++ uint64 ownerNonce, uint48 deadline, bytes ownerSig) // owner door by signature, same effects as execute ++ ownerNonce() view returns (uint64) ++ setLabel(string label) // owner only; emits LabelSet; not a checkpoint + +// rules lifecycle +- grantMandate(Session) returns (bytes32 permissionId) ++ grantRules(Session session, bytes32 ref) returns (bytes32 rulesId) // ref: job or card reference, emitted, not interpreted ++ grantRulesWithSig(Session session, bytes32 ref, uint48 deadline, bytes ownerSig) returns (bytes32 rulesId) ++ // digest includes grantNonce, so a signed grant cannot replay +- stopMandate(bytes32 permissionId) ++ revokeRules(bytes32 rulesId) // owner or self +- stopAll() ++ revokeAllRules() // owner or self + +// agent door (D3, D5) +- executeWithSession(address validator, bytes32 mode, bytes executionCalldata, +- bytes signature, uint192 nonceKey, uint64 nonceSeq, uint48 requestExpiry) ++ executeAsAgent(bytes32 rulesId, bytes32 mode, bytes executionCalldata) ++ requires msg.sender == agentOf(rulesId); replay and expiry come from the sender's own tx (EOA nonce, or the UEA's) ++ URP checks every call exactly as before; no signature blob, no validator address ++ agentOf(bytes32 rulesId) view returns (address) + +// checkpoints ++ checkpointCount() view returns (uint64) ++ lastCheckpointBlock() view returns (uint64) ++ event Checkpointed(uint64 indexed seq, uint8 kind, bytes32 ref, uint64 blockNumber) ++ kind: 0 OWNER_ACTION (any owner-door execute), 1 RULES_GRANTED, 2 RULES_REVOKED ++ emitted from execute, executeWithSig, grantRules*, revokeRules, revokeAllRules + +// views (wiring, renamed to UPPER_CASE) +- sessionEngine() urp() sessionValidator() universalGateway() ++ SESSION_ENGINE() RULES_POLICY() UNIVERSAL_GATEWAY_PC() += owner() factory() grantNonce() getNonce(uint192) accountId() ++ DOMAIN_SEPARATOR() view returns (bytes32) + +// events +- MandateGranted(permissionId, mandateType, chainHash, chain) ++ RulesGranted(bytes32 indexed rulesId, uint8 mode, bytes32 indexed chainHash, string chainNamespace, bytes32 ref) +- MandateRevoked(permissionId) ++ RulesRevoked(bytes32 indexed rulesId, address by) +- MandateActionAuthorized(permissionId, nonceKey, nonceSeq, opHash) ++ RulesActionAuthorized(bytes32 indexed rulesId, address indexed agent, bytes32 callsHash) ++ event LabelSet(string label) +``` + +**UniversalRulesPolicy** (was URP) + +```diff +~ initializeWithMultiplexer(address account, ConfigId id, bytes initData) +~ initData = abi.encode(uint16 version, string chainNamespace, bytes body) // was (string chain, bytes body) +~ rulebook chosen by namespace: this chain => native; eip155:* => universal EVM; solana:* => universal SVM ++ SVM rulebook ++ struct SvmTerms { uint48 validUntil; bytes32 expectedCEA; address asset; uint256 maxAmountPerCall; ++ uint256 maxAmountTotal; uint256 maxPCPerCall; SvmAllowedCall[] allowedCalls; } ++ struct SvmAllowedCall { bytes32 program; bytes8 discriminator; uint8 beneficiaryAccountIndex; bool hasBeneficiary; uint64 maxLamports; } ++ gates mirror the EVM list; beneficiary checked in the accounts array, payload gate for the SVM outbound format +~ checkAction: UniversalOutboundTxRequest imported from the gateway package +~ gate 4c MIN_OUTBOUND_BODY_LEN recomputed from the imported struct +~ gate 9 (maxPCForGas != 0) removed when the six-field gateway struct lands; deploy in the same window +~ creditRevert(id, account, outboundTxId, amount): caller is the real executor module, set at initialize += or removed if the credit path is replaced (decision pending) += assertSpent (both overloads), getConfig, getNativeConfig, getMode, pushChainHash, isCredited ++ getSvmConfig(ConfigId, address) view +- event URPPolicySet(...) ++ event RulesConfigured(bytes32 indexed configId, address indexed multiplexer, address indexed account, uint8 mode, bytes32 chainHash) += OutboundMetered, NativeCallMetered, RevertCredited +~ storage variables renamed $configs, $credited, $mode, $native to _configs, _credited, _mode, _native (labels only, slots unchanged) ++ _svm mapping appended after _native; __gap shrinks by one +~ version() returns "2.0.0" +``` + +**PushSessionValidator** + +```diff +- validateConfig(bytes keyConfig) +- validateSignatureWithData(bytes32 hash, bytes sig, bytes keyConfig) +- contract removed (D3). Session.sessionValidator and keyConfig are replaced by a single address in the rules: the agent. +``` + +**Not in this change set** (belongs to 8183, listed so nobody looks for it here): the fund hook's key-match and expiry checks, the marketplace, the evaluator. + +# 4c. What the SDK rule shape changes in the contracts (PROPOSED 2026-10-02) + +Page 5 (SDK: AGW) settled the shape of a cross-chain rule in `client.agentic.create`. Three of those SDK changes touch the contracts. Nothing else on page 5 does. Names are the post-rename names from section 3; struct changes are to the universal terms URP decodes from the rules envelope. + +**1. One rule can move several tokens: `assets: AssetCap[]` replaces `asset`, `maxAmountPerCall`, `maxAmountTotal`.** + +The SDK takes each asset as the token's address on the rule's chain (`MOVEABLE.TOKEN..` or the native marker) and resolves it to the PRC20 on Push before encoding, so the contract keeps storing PRC20 addresses. The spend counter becomes per asset. + +```diff +// universal EVM terms (and SvmTerms, same change) +- address asset; uint256 maxAmountPerCall; uint256 maxAmountTotal; ++ AssetCap[] assets; // 0..MAX_ASSETS; empty = call contracts, move nothing ++ struct AssetCap { address token; uint256 maxPerCall; uint256 maxTotal; } // token: PRC20 on Push; maxTotal 0 = no total cap ++ uint8 constant MAX_ASSETS = 8; + +// metering +~ amount gate: the token being moved must be one of assets[]; per-call and running total checked against that entry +~ _spent[configId] becomes per token: mapping(address token => uint256 spent) +~ assertSpent(configId, account) returns the per-token totals; the existing single-amount overload goes +~ OutboundMetered carries the token +``` + +**2. `maxGasPerCall` replaces `maxPCPerCall`.** + +Rename only. Same meaning: the PC (wei) the wallet may pass as `msg.value` on one outbound for the destination leg. The gate that checks it does not change. + +```diff +- uint256 maxPCPerCall; ++ uint256 maxGasPerCall; +``` + +**3. The struct, as it ends up.** + +SDK side, what `create` takes per rule (page 5, 3.b). `agent` and `ref` go to `grantRules`, the rest is encoded into the rules envelope. + +```tsx +interface UniversalRule { + agent: Address; // Push address: EOA, or the UEA of an external key + ref?: Hex; // emitted in RulesGranted, not interpreted + chainNamespace: ForeignChainNamespace; + assets: AssetCap[]; // tokens the agent may move on chainNamespace; 0..8 + maxGasPerCall: bigint; // PC (wei) per outbound for the destination leg + validUntil: number; + allowedCalls: AllowedCall[]; +} + +interface AssetCap { + token: MoveableToken | Address; // the other chain's token address (MOVEABLE.TOKEN..) or the native marker + maxPerCall: bigint; + maxTotal?: bigint; +} +``` + +Contract side, what URP decodes from the envelope body for an `eip155` namespace (`SvmTerms` takes the same `assets` and `maxGasPerCall` fields). + +```solidity +struct AssetCap { + address token; // PRC20 on Push, resolved by the SDK from the other chain's address + uint256 maxPerCall; + uint256 maxTotal; // 0 = no running cap +} + +struct UniversalTerms { + uint48 validUntil; + bytes32 expectedCEA; + AssetCap[] assets; // 0..MAX_ASSETS; empty = call contracts, move nothing + uint256 maxGasPerCall; // PC (wei) per outbound + AllowedCall[] allowedCalls; // unchanged +} + +uint8 constant MAX_ASSETS = 8; +``` + +# 5. Open for review on this page + +1. D3: removing the validator. Needs the v3 branch check on how SmartSession's engine is entered (signature path vs a sender-gated call into the same policy checks). If the engine cannot be entered without a signature, the fallback is a validator that accepts a trivial signature from the sender, which keeps the identity model and loses nothing but elegance. +2. Checkpoint kinds, since they are the evaluator's contract with the wallet. +3. `creditRevert`: wire the executor module, or replace the credit path. +4. Anything in the rename map or the diff that should stay as is. + +The SDK surface lives on page 5 (SDK: AGW). + +# 6. Changes proposed on 12 Oct 2026 + +These come from the review of the first SDK implementation, [push-chain-sdk PR #291](https://github.com/pushchain/push-chain-sdk/pull/291), which runs against the v5 contracts on Donut. Sections 0 to 5 above are left exactly as they were. Where an entry here differs from them, the entry here is the current one. The SDK side of each change is on [5. SDK: AGW](https://app.notion.com/p/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9?pvs=21) (page 5), section 6. + +Struct and field names below are shown by meaning. Where the v5 source names a field differently, the source name wins. + +| # | Change | Contract | Replaces above | SDK side (page 5) | +| --- | --- | --- | --- | --- | +| 6.1 | The wallet approves the gateway itself, for the exact amount, inside each outbound | AGW | new | 6.g | +| 6.2 | One factory call deploys the wallet and grants its rules | AGWFactory, AGW | new (page 5 called this "item 11") | 6.b | +| 6.3 | Pins on EVM destination calls | UniversalRulesPolicy | new | 6.a | +| 6.4 | `ref` removed from `grantRules` | AGW | section 4 item 3, and the `ref` lines in 4b and 4c | 6.b, 6.c, 6.d | +| 6.5 | A cap of 0 means nothing moves | UniversalRulesPolicy | "0 = no total cap" in 4c | 6.b | + +### 6.1 The wallet approves the gateway itself, for the exact amount, inside each outbound + +**What happens today.** When the wallet sends a token to another chain, `UniversalGatewayPC` takes the token out of the wallet. That needs an ERC20 approval from the wallet to the gateway. Nothing in the wallet sets it, so the owner has to send `approve(gateway, amount)` through the owner door before the agent's first cross-chain send. If the owner skips it, the agent's send fails. + +**Why that is wrong.** + +- Granting a rule with an asset cap already says how much the agent may move. A second, separate permission is a step no user expects. +- The approval goes through the owner door, so it records an `OWNER_ACTION` checkpoint. An owner who raises the allowance during a job is treated as having changed something mid-job. +- `revokeRules` and `revokeAllRules` do not clear the allowance. It stays on the wallet. +- When the allowance runs out, the agent stops until the owner returns. + +**Change.** The wallet sets the approval itself, for the exact amount of the outbound, in the same transaction, on both doors. + +```diff +// AGW, owner door and agent door +~ execute / executeWithSig / executeAsAgent +~ when a call's target is UNIVERSAL_GATEWAY_PC and its selector is sendUniversalTxOutbound(req): ++ before the call: approve req.token to UNIVERSAL_GATEWAY_PC for req.amount ++ after the call: allowance is 0 again (the gateway took exactly req.amount; reset it if anything is left) +~ agent door order: the rules policy checks req against the rules first, then the approval, then the gateway call += a native-coin outbound (no token pulled) is untouched +``` + +No standing allowance exists at any point outside the call. There is nothing to top up, nothing left after a revoke, and no checkpoint, because the owner did nothing. + +To confirm while implementing: whether the gateway takes anything from the wallet beyond `req.amount` (a fee in the token). If it does, the approval must cover that amount as well. + +### 6.2 One factory call deploys the wallet and grants its rules + +**What happens today.** An external owner sends deploy and grants as one UEA multicall. A Push EOA owner cannot (core rejects a multicall from a Push-native sender), so the SDK sends the deploy and then each grant as its own transaction. If a later grant fails, the wallet exists with only some of its rules. + +**Change.** A factory entry that does both in one transaction, for any owner. Either the wallet exists with every rule passed, or the transaction reverts as a whole. + +```diff +// AGWFactory ++ createWallet(string label, Session[] rules) returns (address wallet, bytes32[] rulesIds) ++ caller is the owner ++ deploys the wallet, then grants every rule, in order; reverts as a whole if any grant fails ++ rules may be empty, in which case it behaves as deployWallet ++ rulesIds are the same ids grantRules would have returned, in the order passed += deployWallet(string label) // unchanged += deployWalletWithSig(...) // unchanged + +// AGW ++ the wallet accepts its first rules from the factory, and only during its own deployment +~ each rule granted this way emits RulesGranted and records a RULES_GRANTED checkpoint, exactly as grantRules does +``` + +To decide: whether a signed variant (`createWalletWithSig`, same digest rules as `deployWalletWithSig` with the rules hashed in) lands in the same change. The marketplace's `startJob` deploys a wallet with rules for the user, so it would use that variant. + +### 6.3 Pins on EVM destination calls + +**What happens today.** All rule checks run on Push, in the rules policy, before the wallet is allowed to call the gateway. For an outbound to an EVM chain the policy unpacks the payload and checks each destination call's target, selector, beneficiary and value. It has no field for a general pin. A rule cannot say "argument 0 of `supply` must be USDC", so an agent allowed to call `supply` can pass any asset the wallet's CEA holds. The Push rulebook has argument pins, and the Solana rulebook has account and data pins. The EVM destination rulebook is the only one without them. + +**Change.** The EVM allowed call gains a list of pins, read from the destination call's calldata the same way the beneficiary already is. A pin either requires an argument to equal a value or to not exceed a value. + +```diff +// libraries/Types.sol + struct ArgPin { += offset; // byte position of the argument in the call's calldata ++ uint8 op; // 0 = EQ: the 32 bytes at offset must equal value ++ // 1 = MAX: the 32 bytes at offset, read as uint256, must not exceed value += bytes32 value; + } + +// universal EVM terms + struct AllowedCall { += target; selector; beneficiary offset and flag; maxValue; ++ ArgPin[] pins; // 0..MAX_PINS (8) + } + +// UniversalRulesPolicy, EVM rulebook +~ checkAction: for each destination call in the payload, after the target, selector, beneficiary and value checks, ++ check every pin of the matching allowed call against that call's calldata ++ reverts reuse the Push rulebook's pin error (ArgPinMismatch) for EQ, and add one for MAX + +// UniversalRulesPolicy, Push rulebook ++ the same op on its pins, so a MAX pin is an ordinary pin there too += the metered argument and the call counter stay in the contract; the SDK no longer exposes them +``` + +The SDK now has one rule shape for every chain, with pins inside each allowed call (page 5, 6.a). Until this lands, the SDK rejects a pin on an EVM destination call before signing, and compiles a `max` pin on a Push call to the existing metered argument (one per call). + +The SDK also folds `beneficiary` into pins: it is written as a pin whose expected value is the wallet itself (page 5, 6.a). Until this change lands, the SDK compiles that pin to the existing beneficiary check, one per call. Once pins exist on EVM destination calls, the same check is an ordinary EQ pin against the wallet's CEA, and the dedicated beneficiary offset and flag on `AllowedCall` can be retired. To decide: retire them in this change, or keep them. + +### 6.4 `ref` removed from `grantRules` + +Section 4 item 3 added a `bytes32 ref` to `grantRules` so a job could bind to a rules id. It is not needed: `rulesId` is generated at grant, and that id is what a job, a card or an indexer latches on to. The v5 contracts on Donut already grant without it. + +```diff +// AGW +- grantRules(Session session, bytes32 ref) returns (bytes32 rulesId) ++ grantRules(Session session) returns (bytes32 rulesId) +- grantRulesWithSig(Session session, bytes32 ref, uint48 deadline, bytes ownerSig) returns (bytes32 rulesId) ++ grantRulesWithSig(Session session, uint48 deadline, bytes ownerSig) returns (bytes32 rulesId) +- RulesGranted(bytes32 indexed rulesId, uint8 mode, bytes32 indexed chainHash, string chainNamespace, bytes32 ref) ++ RulesGranted(bytes32 indexed rulesId, uint8 mode, bytes32 indexed chainHash, string chainNamespace) += Checkpointed(uint64 indexed seq, uint8 kind, bytes32 ref, uint64 blockNumber) // keeps its ref: the checkpoint's own reference +``` + +The `ref?: Hex` field on the SDK struct in 4c goes with it. + +### 6.5 A cap of 0 means nothing moves + +4c says `maxTotal: 0` means no total cap. That is reversed. A wallet whose purpose is to limit an agent must not hand out an unlimited budget because a field was left empty. + +```diff +// universal terms (EVM and SVM) + struct AssetCap { += address token; += uint256 maxPerCall; +- uint256 maxTotal; // 0 = no running cap ++ uint256 maxTotal; // 0 = the agent cannot move this token + } +// same reading for the native coin caps on a Push call: 0 = no native coin may be sent +``` + +The v5 contracts on Donut already treat an explicit zero as "cannot move". The gap was in the SDK, which sent the largest possible number when `maxTotal` was left out. It now sends 0 (page 5, 6.b). + +### 6.6 Checked, no contract change needed + +- **`setLabel` is not a checkpoint.** Item 10 in section 4 already says so and the v5 contract behaves that way. The first SDK implementation routed the rename through the owner door, which does record a checkpoint. The fix is in the SDK: it calls `setLabel` on the wallet directly (page 5, 6.f). +- **First-use destination gas.** The 500,000 default that fails when a CEA is deployed on first use is an SDK default. No contract change (page 5, 6.g). +- **`spent` on rule records.** The counters are already readable from the policy. The SDK puts them back on the record (page 5, 6.c and 6.d). +- **Deleting a rule.** The SDK renames `rules.revoke` to `rules.delete` (page 5, 6.m). `revokeRules` and `revokeAllRules` already remove the rule from the session engine for good, so the contract does what the new name says. The contract names stay as they are. \ No newline at end of file diff --git a/plan/agw/notion/2-universal-marketplace.md b/plan/agw/notion/2-universal-marketplace.md new file mode 100644 index 00000000..7bd55c00 --- /dev/null +++ b/plan/agw/notion/2-universal-marketplace.md @@ -0,0 +1,90 @@ +# 2. Universal Marketplace + + + +Status: DESIGN. No contract, no repo, no owner assigned. Blocking Zaryab since 2026-09-17 on one decision (section 3). + +# What it is + +The discovery layer. Agents list what they do and what access they need. Users pick a card and start a job in one signature. It is also the place a human-verified badge lives, so unverified cards are shown with a caution. + +Phase 2 (not now): users post a job and agents bid. Every design choice below must not block it, but nothing is built for it. + +# What it does, in four responsibilities + +| Responsibility | What it means | On-chain or off-chain | +| --- | --- | --- | +| Registry | Stores agent cards, signed by the agent's execution key. Versioned. Carries the verified badge. | On-chain hash plus signature; card content on-chain or off-chain (open) | +| Compiler | `compile(card, userInput)` turns a card plus the user's principal, duration and choices into: the rules for the AGW, the evaluation criteria for the job, and a `criteriaHash`. Pure and deterministic. | On-chain pure view, so the SDK, the preview and the 8183 hook all get the same answer | +| Start job | Deploy or reuse the AGW, fund it, grant the compiled rules, create the 8183 job with the criteria in the description. One signature. | See section 3 | +| Preview | Shows the user, in words, exactly what the agent may do (every contract, function, pinned argument, cap, expiry) and what the evaluator will check. | Off-chain, from the compiler's output | + +# The agent card + +What the agent publishes. Field names follow the O9 draft; the criteria block is new (2026-09-28). + +```json +{ + "cardVersion": 1, + "provider": { "account": "0xProviderUEA", "executionKey": { "scheme": 0, "key": "0xAgentKey" }, "signature": "0x..." }, + "offer": { + "title": "Aave v3 yield optimiser", + "fee": { "asset": "0xPaymentToken", "amount": "5000000" }, + "principal": { "min": "100000000", "max": "50000000000" }, + "durationDays": { "min": 7, "max": 90, "default": 30 } + }, + "rulesTemplate": { + "chainNamespace": "eip155:11155111", + "asset": "0xUsdcOnPush", + "actions": [ { "contract": "0xAavePool", "function": "supply(address,uint256,address,uint16)", + "args": { "asset": { "role": "fixed", "value": "0xUSDC" }, "amount": { "role": "amount" }, + "onBehalfOf": { "role": "beneficiary" }, "referralCode": { "role": "fixed", "value": 0 } } } ], + "gas": { "pcPerAction": "4000000000000000000", "expectedActions": 12 } + }, + "criteriaTemplate": { + "minDuration": 2592000, + "conditions": [ { "read": { "chainNamespace": "eip155:11155111", "target": "0xaUSDC", "call": "balanceOf(ACCOUNT)" }, + "sample": "START_AND_END", "compare": { "op": "GTE", "basis": "PCT", "value": 400 } } ] + } +} +``` + +Roles on arguments: `beneficiary` (the user's account, filled by the compiler), `amount` (metered against the user's principal), `fixed` (a constant the provider requires), `userChoice` (picked by the user from a list), `free` (the agent decides at run time). Placeholders `ACCOUNT` and `PRINCIPAL` in the criteria are filled by the compiler. + +The user supplies only: principal, duration, any `userChoice` values, and which AGW (new or existing). + +# The decision that unblocks everything: where startJob runs + +The facts (from the code): `deployWallet` makes the caller the owner; `grantRules` is owner-only; `execute` drops return data so a jobId cannot feed a later call in the same batch; `fund` needs `setBudget` from the provider first. + +| | A. SDK-orchestrated | B. Marketplace-orchestrated | +| --- | --- | --- | +| How | The user's UEA signs one multicall: deployWallet, fund, grantRules, execute(createJob). The marketplace is registry, compiler and preview only. | `UniversalMarketplace.startJob(auth, cardId, userInput)` verifies one EIP-712 authorization from the owner and calls the WithSig variants on factory and wallet. | +| Contract changes | None on the AGW | Needs `deployWalletWithSig`, `grantRulesWithSig`, `executeWithSig` (page 1, section 4b) | +| Push-native users | Several transactions (no UEA to batch) | One signature | +| External-origin users | One signature | One signature; the WithSig variants must accept ERC-1271 because the UEA is a contract | +| Audit surface | Smaller now | One canonical path, one place for the one-live-job-per-AGW check | + +Recommendation: B is the end state and Harsh's stated requirement. A is the faster first ship if the demo user is external-origin. If the demo user is Push-native, go straight to B. + +# Provider acceptance + +With a fixed fee there is no moment where the provider says yes to a specific job. Rule: the provider accepts by signing the card, which carries the criteria template and the bounds on principal and duration. At fund, the 8183 hook recomputes `compile(card, userInput)` and refuses the job if the `criteriaHash` in the description does not match. This is why `compile` must be an on-chain view. Vanilla jobs without a card use `setBudget` as the acceptance step. + +# Open + +1. Start job: A first or B from day one (depends on the demo user). +2. Card storage: fully on-chain, or hash on-chain with content off-chain. +3. Canonical encoding of the card for hashing and signing (ABI vs JSON). SDK, marketplace and hook must agree. +4. Vetting: curated list of contracts and functions, warning tier, or badge only. +5. Bid mode in v1 at all. If not, `setProvider` leaves the flow. +6. Which repo, which owner. \ No newline at end of file diff --git a/plan/agw/notion/3-8183-job-kernel-and-hook.md b/plan/agw/notion/3-8183-job-kernel-and-hook.md new file mode 100644 index 00000000..eb401de5 --- /dev/null +++ b/plan/agw/notion/3-8183-job-kernel-and-hook.md @@ -0,0 +1,59 @@ +# 3. 8183 (job kernel and hook) + + + +Status: BUILT on `push-chain-core-contracts` branch `8183-v1` (commit 01439d1) with tests. Not deployed. Hook is PARTIAL. + +# What exists (verified in source) + +**Kernel `AgenticCommerce.sol`**: Base V3 shape with the K-01 to K-11 changes. + +- Transparent proxy. One payment token, set at initialize. Platform fee and evaluator fee in bps, start at 0. +- Hooks fire on setProvider, setBudget, fund, submit, complete, reject. Not on createJob, not on claimRefund. +- claimRefund is never pausable. 1-hour grace after expiry for Submitted jobs. 5-minute minimum expiry window. +- Evaluator may equal the client. Evaluator fee is paid to whoever calls complete. + +**Hook `MandateBindingHook.sol`**: acts only in `beforeAction(fund)`. `optParams` must be exactly 32 bytes (the rules id). Checks three things: the client is a factory wallet, the rules are enabled on the engine, the AGW has no Funded or Submitted job. Stores `mandateOf[jobId]` and `liveJobOf[agw]`. + +# What the hook must also do (not implemented yet) + +| Check | Why | Where | +| --- | --- | --- | +| Rules key equals the provider's registered execution key | Otherwise a different agent works while the job's provider is paid. Harsh: the one hard restriction for using 8183 with AGW. | beforeAction(fund) | +| Rules `validUntil` at or before job `expiredAt` | Rules must outlive the job. | beforeAction(fund) | +| Rules chain matches the criteria's execution chain | A job on Base cannot run under Sepolia rules. | beforeAction(fund) | +| Criteria hash matches `compile(card, userInput)` for card jobs | Provider acceptance (page 2). | beforeAction(fund) | +| Register criteria with the evaluator and fire START reads | Job start is fund. | afterAction(fund) | +| Refuse submit before START reads landed and before `minDuration` | No baseline, no grade. Blocks early-submit gaming. | beforeAction(submit) | +| Free the rules when the job ends | Needs the binder role on the AGW (page 1). | afterAction(complete or reject) | + +The hook uses exactly these kernel touchpoints: afterAction(fund), beforeAction(submit), afterAction(complete or reject). Nothing else. + +# Flow decisions (2026-09-28) + +- Job start is fund, not createJob. Provider may be zero at createJob. +- Criteria travel in the kernel's `description` as the hex of `abi.encode(Criteria)`. One carrier. The hook reads `getJob(jobId).description` at fund, decodes, validates, registers. Portable to Base and any other 8183 kernel. +- Started is an evaluator fact, not a kernel state: the evaluator emits `PreRecorded(jobId)` when the last START read lands. The hook refuses submit until then. The agent SDK waits for the event. +- Checkpoint rule: before any END read, the evaluator checks the AGW's checkpoints. Any owner-side change after PreRecorded (principal moved, rules changed, key changed) means complete, provider paid, no reads. This is also the answer to "rules changed mid-job": no rebind, the fee ends in the agent's favour. +- setProvider is only for bid mode. In direct mode createJob carries the provider. +- Reputation writes only for jobs judged by the UniversalEvaluator from a registered card. + +# Fits the standard + +Push implements the Evaluator role in ERC-8183. The kernel ABI is Base V3's with the K changes. Nothing here changes the standard's function signatures. + +# Open + +1. Fee token: PUSD by default (gas is always PC). The kernel is single-token per deployment; USDC.eth or others mean a second kernel deployment or a multi-token kernel change. Decide which. +2. Fixed fee on the card (no setBudget) or provider quote after createJob. If quote: pre-signed quote inside the user's signature, or fundIfQuoted. +3. Who pays reads and whether the evaluator takes a fee (parked, not needed for the POC). +4. Portability constraint for Base later: the evaluator keys jobs by (chainNamespace, kernel, jobId), not local jobId, and its entry points are callable by a wrapper contract through the universal gateway. \ No newline at end of file diff --git a/plan/agw/notion/4-universal-evaluation.md b/plan/agw/notion/4-universal-evaluation.md new file mode 100644 index 00000000..c4949edb --- /dev/null +++ b/plan/agw/notion/4-universal-evaluation.md @@ -0,0 +1,86 @@ +# 4. Universal Evaluation + + + +Status: DESIGN. Converged on 2026-09-28 to one generic evaluator. No code. Supersedes UniversalEvaluator 1st and 2nd Architecture and the Hook Design where they differ. + +# In one paragraph + +The evaluator is dumb on purpose. A job's success test is data: an array of conditions, each one "read this value, at these points, and compare it like this". Reads come from Read State (validators attest at a pinned block). The evaluator compares and calls complete or reject. A new job type is new data, never a new contract. In v1 this is the deterministic lane only: validator-attested facts plus on-chain comparison. No committee, no staking, no commit-reveal. Say so externally. + +# The schema (draft v0) + +```solidity +struct Criteria { + uint16 version; // 1 + uint32 minDuration; // seconds after fund before submit is accepted + Condition[] conditions; // 1..8, all must hold +} +struct Condition { Read read; Sample sample; Compare cmp; } + +struct Read { + string chainNamespace; // "eip155:1" | "solana:..." | "push" (local, no fee) | "web2" + uint8 queryType; // 0 ACCOUNT_BALANCE, 1 CONTRACT_CALL, 2 STORAGE_SLOT + bytes target; // 20 bytes EVM, 32 bytes SVM + bytes callData; // CONTRACT_CALL only; ACCOUNT and PRINCIPAL placeholders resolved at compile + uint16 word; // which 32-byte word of the return to keep + uint8 resultType; // 0 UINT, 1 INT, 2 BOOL, 3 ADDRESS, 4 BYTES32 +} +enum Sample { END, START_AND_END, PERIODIC } // PERIODIC reserved, refused in v1 + +struct Compare { + uint8 op; // EQ NEQ GT GTE LT LTE IS_TRUE IS_FALSE + uint8 basis; // ABSOLUTE (end vs value) | DELTA (end - start vs value) | PCT (bps of start) | REF (vs another condition) + int256 value; + uint8 ref; + uint32 period; // reserved for PERIODIC + uint16 minPassBps; // reserved for PERIODIC +} +``` + +# The four families named, as data + +| Family | Example | Condition | +| --- | --- | --- | +| True or false | Position is in range | read tick or state, sample END, op IS_TRUE (or REF between two reads) | +| Greater or less than | At least 1 WETH out | read WETH.balanceOf(ACCOUNT), START_AND_END, basis DELTA, op GTE, value 1e18 | +| Percentage | 4% on principal | read position balance, START_AND_END, basis PCT, op GTE, value 400 (bps, for the job's duration) | +| Absolute number | Deliver 100 USDC | read USDC.balanceOf(ACCOUNT), START_AND_END, basis DELTA, op GTE, value 100e6 | + +# Rules of evaluation + +- START reads fire at fund. The job is started when the last one lands (`PreRecorded`). END reads fire at submit. The verdict runs in the last END callback. +- The card author picks where each sample is taken. A PCT condition whose START value is zero fails; it does not revert. That is the author's mistake, not the evaluator's. +- Percentages are for the job's duration, not annualised. `minDuration` blocks early submit. +- END reads take three consecutive blocks, and the condition must hold at all three (from the 2nd Architecture). Cheap protection against one-block manipulation of protocol state. +- Before any END read: check the AGW's checkpoints. Any owner-side change after PreRecorded means complete, no reads. +- Push-local reads (`push` namespace) are direct staticcalls, no fee, no callback. +- A START read that errors or expires can be refired by anyone, paying the fee. If START never completes, the job cannot be submitted and expires to claimRefund. + +# Not in v1, reserved + +- PERIODIC sampling (rebalanced every day, true 90% of the time). Needs a scheduler. Fields are reserved so it slots in without a schema break. +- Solana reads that need `RAW_ACCOUNT_DATA` (fields inside program-owned accounts). Needs a slice query type in Read State. `LAMPORT_BALANCE` and `SPL_TOKEN_ACCOUNT` work today. +- Judging causation or quality. The evaluator proves numbers, not work. A prompt-based read in Universal Callback is the future path. + +# Depends on + +- Read State answers: archive depth validators serve (U1), gas cap on contract-call reads (U2), how often tracked heights update (U3). Block-pinned reads cannot be specified without them. +- Kernel deployment and the hook (page 3). +- Checkpoints on the AGW (page 1). + +# Open + +1. Where the registered criteria live: evaluator (default, one address holds all job state) or hook. +2. Read budget: who pays, how much, refund of unused (parked). +3. Evaluator fee (parked). +4. The evaluator entry points must be callable through a gateway wrapper later (Base). Job key = (chainNamespace, kernel, jobId). \ No newline at end of file diff --git a/plan/agw/notion/5-sdk-agw.md b/plan/agw/notion/5-sdk-agw.md new file mode 100644 index 00000000..cca2260d --- /dev/null +++ b/plan/agw/notion/5-sdk-agw.md @@ -0,0 +1,1352 @@ +# 5. SDK: AGW + + + +# List of changes + +New + +- `client.agentic.derive` +- `client.agentic.create` +- `client.agentic.list` +- `client.agentic.wallet`, + - a management handle with + - `info`, + - `owner`, + - `setLabel` (PROPOSED), + - `checkpoints`, + - `rules.list`, + - `rules.get`, + - `rules.add`, + - `rules.update`, + - `rules.revoke` +- `PushChain.CONSTANTS.AGENTIC` +- `~~PushChain.utils.agentic~~` (dropped 12 Oct 2026, see 6.h) + +Updated + +- `PushChain.initialize`, new option `agenticWallet` +- `PushChain.CONSTANTS.READ.CHAIN`, outside change confirmed 2026-09-28 + +Initialize is unchanged on the owner side: + +```tsx +const client = await PushChain.initialize(universalSigner, { network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET }); +``` + +| Signer | Door | Rules checked | +| --- | --- | --- | +| The wallet's owner | Owner door (`execute`) | No. Every send is recorded as a checkpoint | +| An address named as `agent` in one of the wallet's rules | Agent door (`executeAsAgent`) | Yes, by URP (UniversalRulesPolicy, the on-chain rule checker) | +| Anyone else | None | Never reached: `initialize` throws `NOT_OWNER_OR_AGENT` | + +An agentic wallet involves three parties, and it helps to have them straight before reading the functions. + +The **owner** is whoever created the wallet. When the owner sends through the wallet, no rules are checked; this is called the owner door, and the contract records every such action as a checkpoint so that an evaluator can later tell whether the owner touched anything mid-job. + +The **agent** is the address the owner allows to act on its behalf. It is always a Push address. If the agent's key is a Push EOA, that EOA is the agent. If the key lives on another chain (an EVM key on Ethereum, a Solana key, anything else), the agent is that key's UEA on Push, which exists deterministically for every external key. The SDK never asks for a curve, a chain or a key type. When the agent sends through the wallet, the rules are checked; this is the agent door. + +The **rules** say what an agent may do. Each rule names its agent and its destination chain, and there is one rule per chain per agent, so a wallet can have one agent for Ethereum and a different one for Solana. The `chainNamespace` on a rule decides which rulebook applies: leave it out and the rule governs calls on Push itself; set it to an `eip155` or `solana` chain and the rule governs cross-chain calls to that chain. + +Two ways to touch a wallet from the SDK. `PushChain.initialize(signer, { agenticWallet })` returns a client that acts as the wallet, and whether it goes through the owner door or the agent door depends on who the signer is. `client.agentic.wallet(address)` returns a handle for managing the wallet (rules, label, checkpoints) and never sends as it. + +# 1. Owner side, by example + +The owner side is everything the person who owns the wallet does: create it, fund it, write and revoke the rules, look at what happened. The agent side (section 2) is what the agent does: act through the wallet within those rules. + +### 1.a Derive an agentic wallet address - `client.agentic.derive` + +Gives you the address a wallet will have before it is deployed. The address depends only on the owner and an index. + +```tsx +// Function +const first = await client.agentic.derive({ options? }) + +// Usage and Params +const next = await client.agentic.derive(); // the owner's next wallet +const first = await client.agentic.derive({ index: 0 }); // a specific slot +// options.index number, optional which wallet slot to derive; default is the owner's next unused index + +// Returns +// { address, index, deployed } +{ + address: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + index: 0, + deployed: false +} +``` + +Because the address depends only on the owner and an index, it is the same whether you deploy first or later. That lets you send funds to it first (from any chain) and deploy afterwards, or show the address in a UI before anything is on-chain. Same idea as `deriveExecutorAccount` for a UEA. + +### 1.b Create an agentic wallet - `client.agentic.create` + +Deploys the wallet and grants the rules. The label is the only wallet-level input; the agent and an optional `ref` are named on each rule, because that is where the contract binds them. + +```tsx +// Function +const created = await client.agentic.create(label, { options }) + +// Usage and Params +const created = await client.agentic.create('aave-optimiser', { // wallet with one cross-chain rule + rules: [{ // one entry per chain per agent + agent: '0xAgentOnPush', // a Push address: the agent's EOA, or its UEA if the key lives on another chain. Never the owner + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, // foreign chain => universal rulebook + assets: [ + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, maxPerCall: parseUnits('100', 6), maxTotal: parseUnits('1000', 6) }, + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.WETH, maxPerCall: parseUnits('0.5', 18) }, + ], + maxGasPerCall: parseUnits('1', 18), // PC (wei) per outbound for the destination leg + validUntil: now + 30 * 86400, + allowedCalls: [ + { target: aavePool, selector: 'supply(address,uint256,address,uint16)', beneficiary: 2 }, // arg index, not offset: onBehalfOf must be the AGW's CEA + { target: usdcSepolia, selector: 'approve(address,uint256)' }, + ], + }], + progressHook: (p) => console.log(p.id, p.message), // AGENTIC-TX-1xx +}); +const bare = await client.agentic.create('scratch', { rules: [] }); // wallet first, rules later with rules.add +// label string, required shown in list() and info(); the contract stores it +// options.rules Rule[], required one per chain per agent, may be empty; each rule carries its own agent and optional ref +// options.progressHook function, optional progress events, AGENTIC-TX-1xx; default none +// rules[].agent Address, required the Push address allowed to act under this rule; never the owner +// rules[].ref Hex, optional emitted in RulesGranted, not interpreted; default zero +// rules[].assets AssetCap[], required on a universal rule tokens the agent may move, as the other chain's address (MOVEABLE constants); the SDK resolves each to its PRC20 on Push; each cap is { token, maxPerCall, maxTotal? } +// rules[].maxGasPerCall bigint, required on a universal rule PC (wei) the wallet may spend per outbound for the destination leg + +// Returns +// { wallet, index, rulesIds, tx } +{ + wallet: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + index: 0, + rulesIds: ['0x9c1e...'], // in the order of the rules you passed; empty for rules: [] + tx: { // UniversalTxResponse + hash: '0xb527...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + blockNumber: 1290n, + wait // await tx.wait() for the receipt; status lives on the receipt + } +} +``` + +One rule per chain per agent. A wallet may have different agents on different chains. If an agent needs to act on two chains, `rules` has two entries with the same `agent`; two agents on one chain are two entries with the same `chainNamespace`. Nobody states a rule type; the SDK reads it from `chainNamespace`. `rules: []` is allowed: create the wallet first and grant rules later with `rules.add` (1.k). + +Before asking for a signature the SDK checks that no rule's agent is the owner (`AGENT_IS_OWNER`), that no two rules share both agent and chain (`DUPLICATE_RULE`), that every `allowedCalls[].target` is on the rule's chain (`TARGET_NOT_ON_RULE_CHAIN`), and that every `assets[].token` resolves to a PRC20 whose `SOURCE_CHAIN_NAMESPACE` matches the rule's chain (`ASSET_CHAIN_MISMATCH`). + +Under the hood this is `deployWallet` (or reuse of a derived address) and one `grantRules` per rule. For an external owner they go as one UEA multicall under one signature. Funding is not part of `create`: the wallet is a normal Push account, so send tokens and PC to its address the way you would to any account (1.a shows the address before deployment). + +For a Push EOA owner the same thing needs a batching entry on the factory, because core rejects multicall from a Push-native sender: [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) item 11, **PROPOSED** (`createWallet(label, rules[])` on the factory). Until it lands the SDK sends deploy and grant as separate transactions and says so through progress events (AGENTIC-TX-102 and 104); `tx` is then the last of them. + +A `progressHook` passed to `PushChain.initialize` receives the same events alongside the per-call one, as in core. + +Warning for an agent whose key lives on another chain: the same EVM key initialized against two chains yields two UEAs, because a UEA is derived from namespace, chainId and owner. Grant the rule to the UEA of the chain the agent will run against. `PushChain.utils.account.deriveExecutorAccount(PushChain.utils.account.toUniversal(address, { chain }))` gives it. + +### 1.c List an owner's wallets - `client.agentic.list` + +Lists the wallets owned by the connected signer. It takes no arguments and only reads the connected account. + +```tsx +// Function +const res = await client.agentic.list() + +// Usage and Params +const { wallets } = await client.agentic.list(); // the connected signer's wallets +// no params + +// Returns +// { wallets: Array<{ address, index, label, deployed, rulesCount }> } +{ + wallets: [ + { address: '0x2Fd9...', index: 0, label: 'aave-optimiser', deployed: true, rulesCount: 1 }, + { address: '0x81aB...', index: 1, label: '', deployed: false, rulesCount: 0 }, + ] +} +``` + +Client methods act on the connected account; reads about any other account live in `PushChain.utils`. If a read-only view is needed later (a marketplace or explorer page showing the wallets of an address with no signer), it becomes `PushChain.utils.agentic.wallets(owner: Address)` taking a Push address; an external owner passes its UEA. Not in v1. + +### 1.d Get a wallet handle - `client.agentic.wallet` + +Returns a handle for one wallet: the reads that are specific to an agentic wallet, plus the rule writes only an owner can do. It is not a client and never sends as the wallet. + +```tsx +// Function +const w = client.agentic.wallet(address) + +// Usage and Params +const w = client.agentic.wallet('0xWallet'); // handle for one wallet; nothing is sent +// address Address, required the AGW to manage, a Push address + +// Returns +// { address, info(), owner(), setLabel(), checkpoints(), rules.* } +{ + address: '0xWallet', + info, owner, setLabel, checkpoints, // 1.e to 1.h + rules: { list, get, add, update, revoke } // 1.i to 1.m +} +``` + +There is one way to send as the wallet: `PushChain.initialize(signer, { agenticWallet })` (section 2). The handle only manages. To send as the wallet, move funds, reach the wallet's CEA on another chain, or read balances, initialize with `agenticWallet` and use the normal account tooling: `sendTransaction`, `universal.read`, or viem and ethers against `client.universal.account`. That gives the owner the full `sendTransaction` with every route the SDK already has, the same receipts, and the wallet's CEA reachable exactly as it is for any other account. + +Balance reads are deliberately not on the handle: they are not agentic, and every account is read the same way. There is no `w.execute` for the same reason. The handle stays what its name says: management. + +### 1.e Read wallet info - `w.info` + +Returns the wallet's summary in one read: the fields `list()` shows for each wallet, plus the owner. It is how you read the label from the handle. + +```tsx +// Function +const info = await w.info() + +// Usage and Params +const { label, deployed } = await w.info(); // one wallet's summary +// no params + +// Returns +// { address, label, index, owner, deployed, rulesCount } +{ + address: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + label: 'aave-optimiser', + index: 0, + owner: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + deployed: true, + rulesCount: 1 +} +``` + +### 1.f Read the owner - `w.owner` + +Returns the owner's Push address, as the contract stores it. + +```tsx +// Function +const res = await w.owner() + +// Usage and Params +const { owner } = await w.owner(); // the Push address stored as owner +// no params + +// Returns +// { owner } +{ + owner: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9' +} +``` + +If the owner is a UEA and you need the controlling origin behind it (the chain and the external key), use `resolveControllerAccount` on the returned address. + +Page rule: identities going in and out of the agentic namespace are Push addresses (owner, agent, wallet). + +### 1.g Set the wallet label - `w.setLabel` + +**PROPOSED**, contract change, see [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) item 10. Changes the label shown in `list()` and `info()`; owner only. + +```tsx +// Function +const tx = await w.setLabel(label, { options? }) + +// Usage and Params +const tx = await w.setLabel('aave-optimiser-v2'); // rename the wallet +const tracked = await w.setLabel('aave-optimiser-v2', { progressHook: (p) => console.log(p.id) }); // with progress events +// label string, required the new label; stored by the contract and emitted in LabelSet +// options.progressHook function, optional progress events, AGENTIC-TX-106; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +{ + hash: '0x3b8d...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet + blockNumber: 1488n, + wait // await tx.wait() for the receipt; status lives on the receipt +} +``` + +Emits `LabelSet(string label)`. It is not a checkpoint: the label is cosmetic metadata and evaluators ignore it. Today the label can only be set once, at `deployWallet`, and is emitted in `WalletDeployed`. + +### 1.h Read checkpoints - `w.checkpoints` + +Every owner-side change the wallet has recorded: owner-door sends, rules granted, rules revoked. An evaluator reads these to know whether the owner changed anything after a job started (page 4). + +```tsx +// Function +const res = await w.checkpoints({ options? }) + +// Usage and Params +const all = await w.checkpoints(); // every checkpoint +const recent = await w.checkpoints({ sinceBlock: 1234n }); // from a block onward +// options.sinceBlock bigint, optional only checkpoints at or after this block; default all + +// Returns +// { checkpoints: Array<{ seq, kind, ref, blockNumber, txHash }> } +{ + checkpoints: [ + { seq: 3, kind: 'RULES_GRANTED', ref: '0x9c1e...', blockNumber: 1290n, txHash: '0x...' }, + { seq: 4, kind: 'OWNER_ACTION', ref: '0x5a7b...', blockNumber: 1402n, txHash: '0x...' }, + ] +} +``` + +### 1.i List rules - `w.rules.list` + +Returns every rule on the wallet as a decoded record, including what each rule has spent so far. + +```tsx +// Function +const res = await w.rules.list() + +// Usage and Params +const { rules } = await w.rules.list(); // the wallet's rules +// no params + +// Returns +// { rules: RulesRecord[] } +{ + rules: [ + { + rulesId: '0x9c1e...', + enabled: true, + chainNamespace: 'eip155:11155111', + agent: '0xAgentOnPush', + validUntil: 1767225600, + ref: '0x4a2f...', + rule: { /* decoded UniversalRule, as passed to create */ }, + spent: { kind: 'universal', amountSpent: 25000000n } // shape PROPOSED, see 3.b + } + ] +} +``` + +### 1.j Get one rule - `w.rules.get` + +Returns one rule by id, decoded, with what it has spent. + +```tsx +// Function +const record = await w.rules.get(rulesId) + +// Usage and Params +const record = await w.rules.get('0x9c1e...'); // one rule by id +// rulesId Hex, required the id returned by create or rules.add + +// Returns +// RulesRecord +{ + rulesId: '0x9c1e...', + enabled: true, + chainNamespace: 'eip155:11155111', + agent: '0xAgentOnPush', + validUntil: 1767225600, + ref: '0x4a2f...', + rule: { /* decoded UniversalRule */ }, + spent: { kind: 'universal', amountSpent: 25000000n } // shape PROPOSED, see 3.b +} +``` + +`spent` is a field on the record, so `get` and `list` both carry it. There is no separate spent call. + +### 1.k Add rules - `w.rules.add` + +Grants new rules on an existing wallet under one signature. The rules array comes first; `agent` and `ref` live on each rule. + +```tsx +// Function +const res = await w.rules.add(rules, { options? }) + +// Usage and Params +const one = await w.rules.add([nativeRule]); // one rule +const many = await w.rules.add([ruleOnSepolia, ruleOnPush]); // several rules, one signature +const tracked = await w.rules.add([nativeRule], { progressHook: (p) => console.log(p.id, p.message) }); // with progress events +// rules Rule[], required one per chain per agent; each rule carries its own agent and optional ref +// options.progressHook function, optional progress events, AGENTIC-TX-104; default none + +// Returns +// { rulesIds, tx } +{ + rulesIds: ['0x7d3a...'], // in the order of the rules you passed + tx: { // UniversalTxResponse + hash: '0x4c19...', + origin: 'eip155:11155111:0x31dC...', + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + blockNumber: 1501n, + wait + } +} +``` + +Records a `RULES_GRANTED` checkpoint. + +### 1.l Update rules - `w.rules.update` + +Replaces rules in a batch: each pair names one old rule and the one new rule that takes its place. + +```tsx +// Function +const res = await w.rules.update({ rules, progressHook? }) + +// Usage and Params +const one = await w.rules.update({ rules: [{ rulesId: '0x9c1e...', rule: newRule }] }); // replace one rule +const many = await w.rules.update({ rules: [{ rulesId: idA, rule: ruleA }, { rulesId: idB, rule: ruleB }] }); // replace several, one signature +const tracked = await w.rules.update({ rules: [{ rulesId: idA, rule: ruleA }], progressHook: (p) => console.log(p.id) }); // with progress events +// rules Array<{ rulesId, rule }>, required one old rule to one new rule per pair +// rules[].rulesId Hex, required the rule being replaced +// rules[].rule Rule, required the replacement; one rule per agent per chain still applies +// progressHook function, optional progress events, AGENTIC-TX-105 and 104; default none + +// Returns +// { rules: Array<{ rulesId, replaced }>, tx } +{ + rules: [ + { rulesId: '0x51c0...', replaced: '0x9c1e...' }, // new id, old id + ], + tx: { // UniversalTxResponse + hash: '0x7a02...', + origin: 'eip155:11155111:0x31dC...', + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + blockNumber: 1507n, + wait + } +} +``` + +Rules are immutable on-chain, so an update is a revoke plus a grant: for each pair the SDK asserts the old rule's spend, revokes it and grants the new one, all pairs in one multicall. The result is a new `rulesId` per pair, and the spend counters reset on the new rule: what the old rule had spent does not carry over. This is accepted for v1 (open item 1); an in-place update would be a contract change and there is no demand for it yet. + +### 1.m Revoke rules - `w.rules.revoke` + +Revokes some rules by id, or all of them in one atomic call. + +```tsx +// Function +const tx = await w.rules.revoke(rulesIds, { options? }) +const tx = await w.rules.revoke({ all, progressHook? }) + +// Usage and Params +const some = await w.rules.revoke(['0x9c1e...', '0x7d3a...']); // revoke these rules +const all = await w.rules.revoke({ all: true }); // revoke every rule, on-chain revokeAllRules +const tracked = await w.rules.revoke(['0x9c1e...'], { progressHook: (p) => console.log(p.id) }); // with progress events +// rulesIds Hex[], required unless all is set the rules to revoke +// options.progressHook function, optional progress events, AGENTIC-TX-105; default none +// all true, required unless rulesIds given revoke every rule on the wallet in one atomic call +// progressHook function, optional same events, in the { all: true } form; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +{ + hash: '0x8e01...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet + blockNumber: 1512n, + wait // await tx.wait() for the receipt; status lives on the receipt +} +``` + +A bare `revoke()` is not allowed and throws `REVOKE_NEEDS_TARGET`: a call with no argument that wipes every rule is too easy to make by mistake. Records `RULES_REVOKED` checkpoints. + +# 2. Agent side, by example + +There is no new method on the agent side. The agent uses its own signer and tells `initialize` which wallet to act through. It does not name a rule: which rule applies is decided per transaction, from the destination chain. + +### 2.a Act as the wallet - `PushChain.initialize` with `agenticWallet` (updated) + +Returns a client whose account is the wallet. Whether its sends go through the owner door or the agent door depends on who the signer is. + +```tsx +// Function +const client = await PushChain.initialize(signer, { options }) + +// Usage and Params +const agentClient = await PushChain.initialize(agentSigner, { // agent door: the signer is named as agent in a rule + network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET, + agenticWallet: '0xWallet', +}); +const ownerClient = await PushChain.initialize(ownerSigner, { // owner door: the signer owns the wallet + network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET, + agenticWallet: '0xWallet', +}); +``` + +`agentSigner` is any signer `initialize` accepts today. If the key lives on another chain, the SDK derives its UEA and everything goes through that, as it does for every external user. + +Which door the client uses depends on who the signer is. If the signer is the wallet's owner, sends go through the owner door: no rules, and every send is recorded as a checkpoint. If the signer is an address named as agent in one of the wallet's rules, sends go through the agent door and the rules apply. If it is neither, `initialize` throws `NOT_OWNER_OR_AGENT`. If the address has no wallet deployed yet it throws `WALLET_NOT_DEPLOYED`, and if the address is not an agentic wallet it throws `NOT_AGENTIC_WALLET`. This is also how an owner acts as the wallet with the full client: `PushChain.initialize(ownerSigner, { agenticWallet })`. There is one way to send as a wallet and the signer decides the door. + +On the agent door the SDK sends; URP on-chain is the only rule checker. Before sending, the SDK only looks up the `rulesId` for the destination chain: the rule that is enabled, whose `agent` equals the signer, and whose `chainNamespace` equals the destination. The lookup is one read on every send, not cached at initialize. If none is found it throws `NO_RULES_FOR_CHAIN` before any signature, so it costs nothing; otherwise it calls `executeAsAgent(rulesId, ...)` on the wallet. That is the agent door from D3 on [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21): there is no session validator, and the wallet only checks that `msg.sender` is the rule's agent. There is one rule per (agent, chain), so a signer and a destination match at most one rule. If the action breaks a rule, it reverts on-chain and the agent pays that gas. `sendTransaction` then throws `AgenticRevertError`, which extends core's `PushChainExecutionError` and carries URP's custom error in `decodedError`, so the agent sees which gate failed (3.f). + +From an external key, the call arrives through the agent's UEA. If the agent's UEA is not yet deployed, the first action takes the origin-chain fee lock once (minimum $1), which deploys the UEA and funds it with PC. Every later action requires PC in the UEA and is a direct Push transaction paid from that balance, with no origin transaction and no cross-chain wait. + +Two things for whoever runs the agent. The agent's UEA is a second balance to keep funded: the AGW's PC covers the wallet's outbound fees, not the agent's gas. And in `agenticWallet` mode the SDK turns `enforceGasCheck` on for every action except that one first action while the agent's UEA is not yet deployed, so an empty UEA fails loudly instead of silently falling back to a $1 origin lock and a confirmation wait on every action. + +Routing. In `agenticWallet` mode every send is wrapped as `executeAsAgent` (agent door) or `execute` (owner door), and for cross-chain legs the AGW itself calls the gateway. So the AGW's CEA executes on the destination and the AGW's PC pays as `msg.value`. The SDK never uses the signer's own Route 2, which would run through the agent's CEA instead of the wallet's. Any `from` (Routes 3 and 4) is rejected in `agenticWallet` mode with `FROM_NOT_ALLOWED`: it makes `msg.sender` a CEA, and the agent door check fails. + +What changes on the client in this mode: + +- `universal.account` is the wallet address string, so receipts show the AGW as `from`. `universal.origin` stays the signer's origin account. +- `getAccountStatus()` reports the signer's own UEA, not the wallet. +- The signer is whatever was passed to `initialize`. To top up the agent's UEA, find it with `PushChain.utils.account.deriveExecutorAccount(signer.account)` and send PC to it from a client initialized without `agenticWallet`. +- A Solana-keyed agent can act on Push and `eip155` destinations now, and on `solana:` destinations once the SVM rulebook ships. +- Agents read their own rules through `client.agentic.wallet(addr).rules.list()`. +- `tx.data` arrays and `tx.funds` (moving the AGW's PRC20) work as they do for any account. +- `payGasWith`, `migrateCEA`, `rescueFunds`, `prepareTransaction` and `executeTransactions` throw `NOT_ALLOWED_IN_AGENTIC_MODE`. + +```tsx +const tx = await agentClient.universal.sendTransaction({ // agent door, rule picked by the destination chain + to: { address: aavePool, chain: CHAIN.ETHEREUM_SEPOLIA }, + data: supplyData, +}); + +// tx: UniversalTxResponse +{ + hash: '0x6f2a...', + origin: 'eip155:11155111:0x7Be1...', // the agent's key, CAIP-10 + from: '0xWallet', // the AGW, not the signer + blockNumber: 1530n, + wait +} + +const receipt = await tx.wait(); +// receipt: UniversalTxReceipt +{ + status: 1, + hash: '0x6f2a...', + from: '0xWallet', + blockNumber: 1530n, + externalTxHash: '0x91c4...' // the leg executed by the AGW's CEA on Sepolia +} +``` + +The same EVM key initialized against two chains yields two UEAs (derived from namespace, chainId and owner), so the rule must name the UEA of the chain this client initializes against (see 1.b). + +# 3. Types + +### 3.a Client, options and namespace + +```tsx +type Address = `0x${string}`; +type Hex = `0x${string}`; +type ForeignChainNamespace = `eip155:${string}` | `solana:${string}`; +type ProgressHook = (p: ProgressEvent) => void; // ProgressEvent is core's shape: { id, title, message, level, response, timestamp } + +interface PushChainClient { + universal: UniversalNamespace; // in agenticWallet mode: account is the wallet + agentic: AgenticNamespace; // this page + market: MarketNamespace; // page 6 + job: JobNamespace; // page 7 + evaluation: EvaluationNamespace; // page 8 +} + +interface InitializeOptions { + network?: PUSH_NETWORK; + rpcUrls?: Partial>; + agenticWallet?: Address; // NEW: act as the wallet; door chosen by the signer's Push address + // enforceGasCheck is on when agenticWallet is set, except for the first action while the agent's UEA is not yet deployed (2.a) +} + +interface AgenticNamespace { + derive(opts?: { index?: number }): Promise<{ address: Address; index: number; deployed: boolean }>; + create(label: string, options: CreateOptions): Promise; + list(): Promise<{ wallets: WalletSummary[] }>; // connected signer only + wallet(address: Address): AgenticWallet; +} + +interface CreateOptions { + rules: Rule[]; // one entry per chain per agent, may be empty; each rule names its agent and optional ref + progressHook?: ProgressHook; // AGENTIC-TX-1xx +} + +// No AgentKey type, no curve, no chain. The agent is a Push address. A native key is its own EOA; any external key +// (EVM, Solana, anything) is its UEA, deterministic from (chain, owner), deployed lazily on first use. The AGW's agent +// door checks msg.sender == rules.agent; cross-VM signature verification already happened inside the UEA (page 1, D3). + +interface CreateResult { wallet: Address; index: number; rulesIds: Hex[]; tx: UniversalTxResponse } +interface WalletSummary { address: Address; index: number; label: string; deployed: boolean; rulesCount: number } +``` + +### 3.b Rules + +```tsx +type Rule = NativeRule | UniversalRule; // chainNamespace decides the rulebook: omitted = native, foreign = universal + +interface NativeRule { + agent: Address; // Push address: EOA, or the UEA of an external key (PushChain.utils.account.deriveExecutorAccount) + ref?: Hex; // emitted in RulesGranted, not interpreted + chainNamespace?: never; // omitted = the connected Push chain + target: Address; + selector: Selector | 'value-only'; + validUntil: number; + maxValuePerCall?: bigint; maxValueTotal?: bigint; maxCalls?: number; + pins?: { arg: number; expected: Hex | Address | bigint }[]; + amount?: { arg: number; maxPerCall: bigint; maxTotal?: bigint }; +} + +interface UniversalRule { + agent: Address; // same as NativeRule.agent + ref?: Hex; // same as NativeRule.ref + chainNamespace: ForeignChainNamespace; // "eip155:..." now; "solana:..." once the SVM rulebook ships + assets: AssetCap[]; // tokens the agent may move on chainNamespace; SDK resolves each to its PRC20 and asserts SOURCE_CHAIN_NAMESPACE + maxGasPerCall: bigint; // PC (wei) per outbound for the destination leg + validUntil: number; + allowedCalls: AllowedCall[]; // 1..32, all on chainNamespace +} + +interface AssetCap { + token: MoveableToken | Address; // the other chain's token address (MOVEABLE.TOKEN..) or the native marker; the contract stores the PRC20 + maxPerCall: bigint; + maxTotal?: bigint; +} + +type Selector = Hex | `${string}(${string})`; // '0x617ba037' or 'supply(address,uint256,address,uint16)' + +interface AllowedCall { target: Address; selector: Selector; beneficiary?: number; maxValue?: bigint } // beneficiary = arg index + +interface RulesRecord { + rulesId: Hex; + enabled: boolean; + chainNamespace: string; + agent: Address; // the Push address granted + validUntil: number; + ref: Hex; + rule: Rule; // decoded terms; NativeRule or UniversalRule + spent: Spent; // carried by rules.get and rules.list; no separate call +} + +type Spent = { kind: 'universal'; amountSpent: bigint } | { kind: 'native'; valueSpent: bigint; amountSpent: bigint; callsUsed: number }; // PROPOSED: one self-describing object, readable without knowing the rulebook +``` + +### 3.c Wallet handle and checkpoints + +```tsx +interface AgenticWallet { + address: Address; + info(): Promise; + owner(): Promise<{ owner: Address }>; // Push address as stored + setLabel(label: string, opts?: { progressHook?: ProgressHook }): Promise; // PROPOSED, page 1 item 10 + checkpoints(opts?: { sinceBlock?: bigint }): Promise<{ checkpoints: Checkpoint[] }>; + rules: { + list(): Promise<{ rules: RulesRecord[] }>; + get(rulesId: Hex): Promise; + add(rules: Rule[], opts?: { progressHook?: ProgressHook }): Promise<{ rulesIds: Hex[]; tx: UniversalTxResponse }>; + update(params: { rules: { rulesId: Hex; rule: Rule }[]; progressHook?: ProgressHook }): Promise<{ rules: { rulesId: Hex; replaced: Hex }[]; tx: UniversalTxResponse }>; // revoke plus grant; spend counters reset + revoke(rulesIds: Hex[], opts?: { progressHook?: ProgressHook }): Promise; + revoke(params: { all: true; progressHook?: ProgressHook }): Promise; + }; +} + +interface WalletInfo { address: Address; label: string; index: number; owner: Address; deployed: boolean; rulesCount: number } + +interface Checkpoint { seq: number; kind: 'OWNER_ACTION' | 'RULES_GRANTED' | 'RULES_REVOKED'; ref: Hex; blockNumber: bigint; txHash: Hex } +``` + +### ~~3.d Constants, PushChain.CONSTANTS.AGENTIC (new)~~ + +Dropped on 12 Oct 2026, except `WALLET`. See 6.h. + +```tsx +PushChain.CONSTANTS.AGENTIC[PUSH_NETWORK.TESTNET_DONUT] = { + FACTORY, RULES_POLICY, // RULES_POLICY is URP; no validator address (page 1, D3) + MAX_PINS: 8, MAX_ALLOWED_CALLS: 32, ENVELOPE_VERSION: 1, +}; +``` + +### ~~3.e Helpers, PushChain.utils.agentic (new)~~ + +Dropped on 12 Oct 2026. See 6.h. + +~~Pure functions with the same output as the on-chain views.~~ + +```tsx +PushChain.utils.agentic = { + rulesId(agent, chainNamespace, grantNonce), // the id a grant produces, same as the contract assigns + actionId(target, selector), // id of one allowed call: hash of its target and selector + configId(wallet, rulesId, actionId), // key of one allowed call's stored config, under one rule on one wallet + encodeRules(rules, ctx), // ctx = wallet and chain context needed to resolve beneficiary offsets + decodeRules(bytes), + deriveWallet(owner, index), // any-owner variant of client.agentic.derive + compileCard(card, userInput, ctx), // used by page 6; lives here because it produces Rule[] +}; +``` + +### 3.f Errors and progress + +```tsx +class AgenticError extends Error { code: string; hint?: string } +class AgenticRevertError extends PushChainExecutionError {} +// decoded custom error from the AGW, URP or the factory; uses core's fields: +// code string +// decodedError { name, hint, selector, decoded } + +// codes +// create: AGENT_IS_OWNER, DUPLICATE_RULE, TARGET_NOT_ON_RULE_CHAIN, ASSET_CHAIN_MISMATCH +// initialize (agenticWallet): NOT_OWNER_OR_AGENT, WALLET_NOT_DEPLOYED, NOT_AGENTIC_WALLET +// rules.revoke: REVOKE_NEEDS_TARGET (bare revoke) +// sendTransaction: NO_RULES_FOR_CHAIN, FROM_NOT_ALLOWED (any from, Routes 3 and 4) +// agentic mode: NOT_ALLOWED_IN_AGENTIC_MODE (prepareTransaction, executeTransactions, payGasWith, migrateCEA, rescueFunds) + +// progress events, AGENTIC-TX (PROPOSED) +// AGENTIC-TX-101 wallet derived { address, index, deployed } +// AGENTIC-TX-102 deploy step added +// AGENTIC-TX-104 rules granted { rulesIds } +// AGENTIC-TX-105 rules revoked { rulesIds | all } +// AGENTIC-TX-106 label set +// AGENTIC-TX-107 rule resolved for a send { rulesId, chainNamespace, door } +// AGENTIC-TX-199-01 done +// AGENTIC-TX-199-02 failed { code, decodedError } +// The Push leg of any agentic send also emits core's SEND-TX-1xx events. +// A cross-chain leg sent by the AGW emits 209-xx and 299-xx, never 201 to 204 (the signer's own Route 2 is never used). +``` + +**PROPOSED:** the AGENTIC-TX event list. Every write (`create`, `setLabel`, `rules.add`, `rules.update`, `rules.revoke`) takes a per-call `progressHook`; a `progressHook` passed to `PushChain.initialize` runs alongside it, as in core. + +`NO_RULES_FOR_CHAIN` is thrown before any signature and costs nothing. The rules lookup is one read on every send, not cached at initialize. A URP revert is thrown from `sendTransaction` as `AgenticRevertError` and also lands as `decodedError` on AGENTIC-TX-199-02. A destination-chain revert after URP passed still counts the spend, because the spend is counted when the outbound leaves Push; whether it is credited back depends on [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) item 6 (`creditRevert`). + +# 4. Outside change: [PushChain.CONSTANTS.READ](http://PushChain.CONSTANTS.READ).CHAIN (confirmed 2026-09-28) + +Problem: `read()` takes `chain: PushChain.CONSTANTS.CHAIN.X`, but `CHAIN` is the set of blockchains the SDK signs for and routes to. Web2 is not one, so `CHAIN.WEB2` exists as a hidden (non-enumerable) member: it works if you know it is there and never appears in any listing. Reads have a wider domain than transactions: anything validators can observe. + +Change: a read-specific constant that is a superset of `CHAIN`. The field name stays `chain`, so nothing breaks, and `CHAIN` values remain valid because the strings are identical. + +```tsx +PushChain.CONSTANTS.READ.CHAIN = { + ...PushChain.CONSTANTS.CHAIN, // every real chain, same string values + WEB2: 'web2', // non-chain source, first-class here, enumerable +}; +type ReadChain = CHAIN | 'web2'; // ReadParams.chain: ReadChain + +read({ chain: PushChain.CONSTANTS.READ.CHAIN.WEB2, ... }) +read({ chain: PushChain.CONSTANTS.CHAIN.ETHEREUM_SEPOLIA, ... }) // still compiles +``` + +- `CHAIN.WEB2` becomes a deprecated alias of `READ.CHAIN.WEB2` for one release (the docs listed it on 2026-09-22), then goes. +- Anything that iterates `CHAIN` stops seeing a fake chain; anything that iterates `READ.CHAIN` sees every read source. +- The evaluator's `Read.chain` (page 8) takes the same values, so `READ.CHAIN` is the one constant the read SDK and the criteria compiler share. + +# 5. Open for review + +1. `rules.update` resets spend counters because it is revoke plus grant. Accepted for v1 and stated in 1.l; an in-place update is a contract change with no demand yet. +2. `setLabel` assumes [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) item 10 lands. Pointer for the team. + +# 6. Changes proposed on 12 Oct 2026 + +These come from the review of the first SDK implementation, [push-chain-sdk PR #291](https://github.com/pushchain/push-chain-sdk/pull/291). Sections 1 to 5 above are left exactly as they were. Where an entry here differs from them, the entry here is the current one. Every function whose call or result changes is written out again in full, so the change can be read without scrolling up. + +Contract changes are written on [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) (page 1), section 6, and are referenced from here by item number. + +| # | Change | Replaces above | Contract change (page 1) | +| --- | --- | --- | --- | +| 6.a | One rule shape for every chain, pins inside `allowedCalls`, `beneficiary` folded into pins | 3.b `NativeRule`, `UniversalRule` | 6.3 | +| 6.b | `create` is one transaction for every owner; `ref` removed; omitted caps are 0 | 1.b | 6.2, 6.4, 6.5 | +| 6.c, 6.d | `rules.list` and `rules.get`: `spent` per asset, no `ref`, arguments read back as `arg` | 1.i, 1.j | none | +| 6.e | `rules.add` and `rules.update`: call unchanged, new rule shape | 1.k, 1.l | none | +| 6.f | `setLabel` is never a checkpoint | 1.g | none | +| 6.g | Sending as the wallet: no gateway approval step, first-use gas default | 2.a | 6.1 | +| 6.h | Types, as they end up | 3.b, `RulesRecord`, `Spent`, 3.d, 3.e | none | +| 6.i | Solana: same rule shape, pins on arguments and on accounts, no IDL in a rule | new | none | +| 6.l | Response fields and error codes added by the first implementation: accepted, with four codes removed | 3.f | none | +| 6.m | `rules.revoke` is renamed `rules.delete` | 1.m | none | + +### 6.a One rule shape for every chain + +There is one rule shape. A rule for calls on Push is the same object as a cross-chain rule with `chainNamespace` left out. What the agent may call is always a list of `allowedCalls`, and restrictions on a function's arguments sit inside each allowed call as `pins`. + +A pin restricts one argument of the allowed function. It is either `expected` (the argument must equal this constant) or `max` (the argument must not exceed this number). To require that an argument is the wallet itself, the expected value is `PushChain.CONSTANTS.AGENTIC.WALLET`. A minimum on an argument (for example a minimum amount out on a swap) is not part of v1 and is deferred to the next version. + +```tsx +// a rule on Push: chainNamespace left out +{ + agent: '0xAgentOnPush', + validUntil: now + 30 * 86400, + allowedCalls: [ + { target: vault, selector: 'deposit(address,uint256)', + pins: [ + { arg: 0, expected: beneficiary }, // argument 0 must be this address + { arg: 1, max: parseUnits('10', 18) }, // argument 1 must not exceed this, per call + ] }, + ], +} + +// a rule on Ethereum Sepolia: same shape, plus the tokens the agent may move +{ + agent: '0xAgentOnPush', + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, + assets: [ + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, maxPerCall: parseUnits('100', 6), maxTotal: parseUnits('1000', 6) }, + ], + maxGasPerCall: parseUnits('1', 18), + validUntil: now + 30 * 86400, + allowedCalls: [ + { target: aavePool, selector: 'supply(address,uint256,address,uint16)', + pins: [ + { arg: 0, expected: usdcSepolia }, // asset must be USDC + { arg: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }, // onBehalfOf must be this wallet + ] }, + { target: usdcSepolia, selector: 'approve(address,uint256)' }, + ], +} +``` + +What is gone from the shape: the separate `NativeRule` type with `target`, `selector`, `pins` and `amount` at the top of the rule, and the fields `amount.maxTotal`, `maxValueTotal` and `maxCalls`. A `max` pin limits each call only. The SDK has no per-argument lifetime total and no call counter. On a cross-chain rule the lifetime limit on a token is the asset's `maxTotal`. On a Push call the lifetime limit is what the owner funds the wallet with, plus `validUntil`. + +`beneficiary` is now a pin. On page sections above, `beneficiary: 2` meant that argument 2 must be the wallet's own account. That is a pin whose expected value is the wallet, so it is written as `{ arg: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }` and the separate field is removed. `WALLET` stands for the wallet's own account on the rule's chain: the AGW address for a call on Push, and the wallet's CEA for a call on another chain. The SDK fills in the real address when the rule is granted, so nobody has to look up a CEA. It is a marker and not an address (its value is the string `'agentic:wallet'`), because an agent card lists its rules before any wallet exists. On read, a pin whose stored value is the wallet's own account comes back as `WALLET`. + +Where each part is checked. Every check runs on Push, in the rules policy, before the wallet is allowed to make the call or hand it to the gateway. + +| On an allowed call | Call on Push | Call on an EVM destination | +| --- | --- | --- | +| `target`, `selector`, `maxValue` | Checked | Checked | +| A pin with `expected: WALLET` | Checked | Checked. One per call until page 1, 6.3 lands | +| Any other pin | Checked. Up to 8 `expected` pins and one `max` pin per call | Needs page 1, 6.3. Until it lands the SDK rejects it before signing | + +### 6.b Create an agentic wallet - `client.agentic.create` (changed) + +Deploys the wallet and grants the rules in one transaction, for every kind of owner. Either the wallet exists with every rule that was passed, or nothing happened. + +```tsx +// Function +const created = await client.agentic.create(label, { options }) + +// Usage and Params +const created = await client.agentic.create('aave-optimiser', { // wallet with one cross-chain rule + rules: [{ // one entry per chain per agent + agent: '0xAgentOnPush', // a Push address: the agent's EOA, or its UEA if the key lives on another chain. Never the owner + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, // left out = a rule for calls on Push + assets: [ + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, maxPerCall: parseUnits('100', 6), maxTotal: parseUnits('1000', 6) }, + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.WETH, maxPerCall: parseUnits('0.5', 18), maxTotal: parseUnits('2', 18) }, + ], + maxGasPerCall: parseUnits('1', 18), // PC (wei) per outbound for the destination leg + validUntil: now + 30 * 86400, + allowedCalls: [ + { target: aavePool, selector: 'supply(address,uint256,address,uint16)', + pins: [{ arg: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }] }, // onBehalfOf must be this wallet (its CEA on Sepolia) + { target: usdcSepolia, selector: 'approve(address,uint256)' }, + ], + }], + progressHook: (p) => console.log(p.id, p.message), // AGENTIC-TX-1xx +}); +const bare = await client.agentic.create('scratch', { rules: [] }); // wallet first, rules later with rules.add +// label string, required shown in list() and info(); the contract stores it +// options.rules Rule[], required one per chain per agent, may be empty; shape in 6.a +// options.progressHook function, optional progress events, AGENTIC-TX-1xx; default none +// rules[].agent Address, required the Push address allowed to act under this rule; never the owner +// rules[].chainNamespace string, optional the chain the rule governs; left out = Push +// rules[].assets AssetCap[], cross-chain rules tokens the agent may move; each cap is { token, maxPerCall, maxTotal } +// rules[].assets[].maxTotal bigint, optional lifetime cap for that token; left out = 0, and 0 means the agent cannot move it +// rules[].maxGasPerCall bigint, cross-chain rules PC (wei) the wallet may spend per outbound for the destination leg +// rules[].allowedCalls AllowedCall[], required what the agent may call; each is { target, selector, pins?, maxValue? } +// rules[].allowedCalls[].maxValue bigint, optional native coin per call; left out = 0 +// rules[].allowedCalls[].pins Pin[], optional { arg, expected } or { arg, max }; expected may be PushChain.CONSTANTS.AGENTIC.WALLET; see 6.a + +// Returns +// { wallet, index, rulesIds, tx } +{ + wallet: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + index: 0, + rulesIds: ['0x9c1e...'], // in the order of the rules you passed; empty for rules: [] + tx: { // UniversalTxResponse, always a single transaction + hash: '0xb527...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + blockNumber: 1290n, + wait // await tx.wait() for the receipt; status lives on the receipt + } +} +``` + +What changed from 1.b: + +- **One transaction for every owner.** 1.b said a Push EOA owner gets separate deploy and grant transactions until a factory entry lands. That fallback is removed. The factory entry is page 1, 6.2. There is no partial result to reconcile. +- **`ref` is removed** from every rule. The `rulesId` the grant returns is what a job, a card or an indexer latches on to. Page 1, 6.4. +- **A cap that is left out is 0, never unlimited.** That covers `assets[].maxTotal` and `allowedCalls[].maxValue`. A forgotten cap means the agent cannot move that asset, which shows up on the first send. Page 1, 6.5. Note that the WETH line in 1.b had no `maxTotal`; under this rule it would move nothing, so the example here sets one. +- **Rules use the single shape from 6.a.** +- **The beneficiary field is a pin.** `beneficiary: 2` is written as a pin on argument 2 whose expected value is `PushChain.CONSTANTS.AGENTIC.WALLET` (6.a). + +### 6.c List rules - `w.rules.list` (changed) + +Returns every enabled rule on the wallet as a decoded record, including what each rule has spent so far. + +```tsx +// Function +const res = await w.rules.list() + +// Usage and Params +const { rules } = await w.rules.list(); // the wallet's rules +// no params + +// Returns +// { rules: RulesRecord[] } +{ + rules: [ + { + rulesId: '0x9c1e...', + enabled: true, + chainNamespace: 'eip155:11155111', + agent: '0xAgentOnPush', + validUntil: 1767225600, + rule: { /* the rule in the 6.a shape, accepted as is by rules.update */ }, + spent: { // one entry per asset, same order as rule.assets + kind: 'universal', + assets: [ + { token: '0x1c7D...7238', spent: 25000000n }, // USDC + { token: '0xfFf9...6B14', spent: 0n }, // WETH + ] + } + } + ] +} +``` + +### 6.d Get one rule - `w.rules.get` (changed) + +Returns one rule by id, decoded, with what it has spent. + +```tsx +// Function +const record = await w.rules.get(rulesId) + +// Usage and Params +const record = await w.rules.get('0x9c1e...'); // one rule by id +// rulesId Hex, required the id returned by create or rules.add + +// Returns +// RulesRecord +{ + rulesId: '0x51c0...', + enabled: true, + chainNamespace: 'eip155:42101', // a rule on Push + agent: '0xAgentOnPush', + validUntil: 1767225600, + rule: { + agent: '0xAgentOnPush', + validUntil: 1767225600, + allowedCalls: [ + { target: '0xVault', selector: 'deposit(address,uint256)', + pins: [ + { arg: 0, expected: '0x00000000000000000000000000000000000000000000000000000000000b0b0b' }, + { arg: 1, max: 10000000000000000000n }, + ] }, + ], + }, + spent: { kind: 'native', valueSpent: 0n, amountSpent: 5000000000000000000n, callsUsed: 1 } +} +``` + +What changed from 1.i and 1.j: + +- **`spent` is on every record**, as 1.i and 1.j already said. The first implementation dropped it; it goes back. For a cross-chain rule it is now a list with one entry per asset, because each asset has its own budget. 1.i showed a single `amountSpent`, which predates per-asset budgets. +- **`ref` is removed** from the record, following 6.b. +- **Arguments read back as `arg`, never as a byte offset.** The contract stores a pin and a beneficiary as a byte position in the calldata (argument 0 is byte 4, argument 1 is byte 36). The SDK converts that back, so a developer who wrote `arg: 0` reads `arg: 0`. A pin on the wallet itself reads back as `WALLET`. +- **The record is accepted by `rules.update` without edits.** The test is: read a rule, change `validUntil`, pass it back. An `expected` value reads back as 32-byte hex, because the contract keeps the function selector and not the argument types; it is accepted as input in that form. + +### 6.e Add and update rules - `w.rules.add`, `w.rules.update` (call unchanged) + +The calls and results in 1.k and 1.l stay as they are. Two things change through the rule itself: rules are in the 6.a shape, and they carry no `ref`. + +### 6.f Set the wallet label - `w.setLabel` (changed) + +Changes the label shown in `list()` and `info()`. Owner only. + +```tsx +// Function +const tx = await w.setLabel(label, { options? }) + +// Usage and Params +const tx = await w.setLabel('aave-optimiser-v2'); // rename the wallet +const reset = await w.setLabel(''); // back to the default label +const tracked = await w.setLabel('aave-optimiser-v2', { progressHook: (p) => console.log(p.id) }); // with progress events +// label string, required the new label, at most 64 bytes of UTF-8; an empty string resets it to the default "AGW " +// options.progressHook function, optional progress events, AGENTIC-TX-106; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +{ + hash: '0x3b8d...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet + blockNumber: 1488n, + wait // await tx.wait() for the receipt; status lives on the receipt +} +``` + +What changed from 1.g: the function is live in the contract, so it is no longer proposed. The rule that a rename is not a checkpoint now binds the SDK too. The first implementation sent the rename through the owner door, and every owner door call records an `OWNER_ACTION` checkpoint. With the checkpoint rule for 8183 jobs, a user who renamed a wallet during a job would hand the fee to the agent over a label. The SDK must call the wallet's `setLabel` directly, for a Push EOA owner and for a UEA owner, so that the checkpoint count is the same before and after a rename. + +### 6.g Send as the wallet - `sendTransaction` with `agenticWallet` (changed) + +The call is the one in 2.a. Two things around it change. + +```tsx +// Function +const tx = await client.universal.sendTransaction({ options }) + +// Usage and Params +const agentClient = await PushChain.initialize(agentSigner, { // agent door: the signer is named as agent in a rule + network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET, + agenticWallet: '0xWallet', +}); +const tx = await agentClient.universal.sendTransaction({ // rule picked by the destination chain + to: { address: aavePool, chain: CHAIN.ETHEREUM_SEPOLIA }, + data: [ + { to: usdcSepolia, value: 0n, data: approveData }, + { to: aavePool, value: 0n, data: supplyData }, + ], + funds: { amount: parseUnits('100', 6), token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC }, +}); +// to { address, chain }, required the destination call and its chain +// data Hex or call array, optional the destination call data +// funds { amount, token }, optional the token the wallet moves with this send +// gasLimit bigint, optional destination gas; left out = the SDK default, which covers first use on a chain (see below) + +// Returns +// { hash, origin, from, blockNumber, wait() } +{ + hash: '0x6f2a...', + origin: 'eip155:11155111:0x7Be1...', // the agent's key, CAIP-10 + from: '0xWallet', // the AGW, not the signer + blockNumber: 1530n, + wait +} +``` + +What changed from 2.a: + +- **No gateway approval step.** When the wallet sends a token to another chain, the gateway on Push takes the token out of the wallet, which needs an ERC20 approval from the wallet. The first implementation left that to the owner as a separate transaction through the owner door before the agent's first send. That step is removed: the wallet approves the exact amount inside its own outbound call (page 1, 6.1). Funding a wallet is two plain transfers to its address, PC and the token. The SDK has no allowance check and no allowance error. +- **The default destination gas covers first use on a chain.** The first time a wallet sends to a chain, its account there (the CEA) is deployed as part of the call, which took about 1.3 million gas on Sepolia against a core default of 500,000. When the CEA is not deployed yet and the caller gave no `gasLimit`, the SDK uses a first-use default large enough for the deployment. When the CEA exists, the normal default applies. A `gasLimit` from the caller always wins, and `maxGasPerCall` on the rule still bounds what the agent can spend. + +### 6.h Types, as they end up + +These replace `NativeRule`, `UniversalRule`, `AllowedCall`, `RulesRecord` and `Spent` in 3.b. Everything else in section 3 stands. + +```tsx +interface Rule { + agent: Address; // Push address: EOA, or the UEA of an external key + chainNamespace?: ChainNamespace; // left out = the connected Push chain + validUntil: number; + assets?: AssetCap[]; // cross-chain rules: tokens the agent may move on chainNamespace + maxGasPerCall?: bigint; // cross-chain rules: PC (wei) per outbound for the destination leg + allowedCalls: AllowedCall[]; // 1..8 for Push-chain rules, 1..32 for other chains (Harsh, Oct 23) +} + +interface AssetCap { + token: MoveableToken | Address; // the other chain's token address, or the native marker + maxPerCall: bigint; + maxTotal?: bigint; // left out = 0; 0 means the agent cannot move this token +} + +interface AllowedCall { + target: Address | string; // a contract; on Solana, the program address + selector: Selector | 'value-only'; // on Solana, the instruction name with its argument types + pins?: Pin[]; + maxValue?: bigint; // native coin per call; left out = 0 +} + +type Pin = + | { arg: number; expected: Hex | Address | bigint | WalletMarker } // the argument must equal this constant, or be the wallet itself + | { arg: number; max: bigint } // the argument must not exceed this + | { account: number; expected: string | WalletMarker; token?: MoveableToken | string }; // Solana only: the account at this position must be this address, or the wallet itself; with token, the wallet's token account for that token + +type WalletMarker = typeof PushChain.CONSTANTS.AGENTIC.WALLET; // 'agentic:wallet': the wallet's own account on the rule's chain + +interface RulesRecord { + rulesId: Hex; + enabled: boolean; + chainNamespace: string; + agent: Address; + validUntil: number; + rule: Rule; // accepted as is by rules.update + spent: Spent; +} + +type Spent = + | { kind: 'native'; valueSpent: bigint; amountSpent: bigint; callsUsed: number } + | { kind: 'universal'; assets: { token: Address; spent: bigint }[] }; // one entry per asset, same order as rule.assets +``` + +`Checkpoint` in 3.c keeps its `ref` field. That one is the checkpoint's own reference (a rules id or a call hash) and has nothing to do with the rule `ref` removed in 6.b. + +`PushChain.CONSTANTS.AGENTIC` has one member, `WALLET` (6.a). The rest of 3.d (`FACTORY`, `RULES_POLICY`, `MAX_PINS`, `MAX_ALLOWED_CALLS`, `ENVELOPE_VERSION`) is dropped. Contract addresses and limits stay inside the SDK and are not exposed. The first implementation exposes all five on `PushChain.CONSTANTS.AGENTIC`; they are removed. + +`PushChain.utils.agentic` (3.e) is dropped. The ids and the encoders stay inside the SDK, `client.agentic.derive` covers deriving a wallet address, and `compileCard` is left to the marketplace page (page 6). The first implementation exposes `actionId`, `configId` and `decodeRules` on `PushChain.utils.agentic`; they are removed. + +### 6.i Solana, decided for v1 + +A Solana rule uses the same `allowedCalls` and `pins` shape as every other chain (6.a). The separate `allowedInstructions` shape of the first implementation, with an IDL and named accounts and fields, is replaced. + +```tsx +// a rule on Solana devnet +{ + agent: '0xAgentOnPush', + chainNamespace: CHAIN.SOLANA_DEVNET, + assets: [ + { token: '0x0000000000000000000000000000000000000000', maxPerCall: 10_000n, maxTotal: 20_000n }, // native SOL, in lamports + ], + maxGasPerCall: parseUnits('1', 18), + validUntil: now + 30 * 86400, + allowedCalls: [ + { target: program, // the program address + selector: 'receive_sol(u64)', // instruction name and argument types + pins: [ + { arg: 0, max: 10_000n }, // the amount + { account: 1, expected: recipient }, // account 1 must be this address + { account: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }, // account 2 must be this wallet (its CEA on Solana) + ] }, + ], +} +``` + +The selector is the instruction's name with its argument types, the same idea as an EVM function signature. It is enough to identify the instruction and to locate each argument, so a rule carries no IDL. A program that does not follow the Anchor naming is written with a raw hex selector, as on EVM. + +A Solana instruction carries two separate lists: its arguments (the values in the instruction data) and its accounts (the addresses it touches, passed beside the data). A pin says which list it means: `arg` is a position in the arguments and `account` is a position in the accounts list, both counted from 0. EVM rules only use `arg`, because an EVM call carries its addresses as arguments. + +Tokens on Solana are not held at the wallet's own address. For each token it holds, the wallet has a separate token account, whose address is derived from the wallet and the token. To require that an account is the wallet's token account for a given token, the pin names the token as well: + +```tsx +{ account: 1, expected: PushChain.CONSTANTS.AGENTIC.WALLET, token: MOVEABLE.TOKEN.SOLANA_DEVNET.USDT } // account 1 must be this wallet's USDT token account +``` + +Without `token`, `WALLET` on an account means the wallet's CEA itself, which is where native SOL sits. + +The IDL is still used where it is used today: when the call data for a send is built with `PushChain.utils.helpers.encodeTxData`, where it is passed in place of an ABI. + +Accepted for v1: + +- **A Solana rule reads back in the form it was written.** Positions go in and positions come out, so the read, change, pass back test of 6.d holds for Solana too. +- **An agent sends one Solana instruction per transaction.** Arrays of instructions are not supported on the agent door. +- **Only instructions with fixed-size arguments can be put under a rule.** Numbers up to u64, public keys, booleans and fixed-length arrays work, with top-level, non-optional accounts. Lists, strings, optional values and nested structs are rejected before signing. A deposit of an amount works; a routed swap that takes a list of hops does not. + +### 6.j Contract changes these depend on + +All on [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21), section 6. + +| Page 1 item | Contract change | Needed by | +| --- | --- | --- | +| 6.1 | The wallet approves the gateway for the exact amount inside each outbound | 6.g | +| 6.2 | One factory call that deploys the wallet and grants its rules | 6.b | +| 6.3 | Pins on EVM destination calls in the rules policy | 6.a | +| 6.4 | `ref` removed from `grantRules` | 6.b, 6.c, 6.d | +| 6.5 | A cap of 0 means nothing moves | 6.b | + +### 6.k Still open + +1. Whether the rules policy can enforce the wallet token account pin of 6.i in every case. To confirm with the contracts owner. + +### 6.l Response fields and error codes added by the first implementation + +The first implementation adds response fields and error codes that are not in 3.f. They are accepted as listed here. Four codes are removed, each for the reason given below. + +**The `agentic` object on a response.** Every send made as the wallet carries an `agentic` object on its response, so the caller can see which wallet, which door and which rule the send used. Only the fields that apply to that send are present. + +```tsx +// tx.agentic, on the UniversalTxResponse of a send made as the wallet +{ + wallet: '0xWallet', // the AGW + door: 'agent', // 'owner' or 'agent' + rulesId: '0x9c1e...', // the rule used; agent door only + chainNamespace: 'eip155:11155111', // destination chain of a cross-chain send + destinationAccount: '0xCEA...', // the wallet's CEA on that chain + destinationCalls: [{ to, data, value }], // the ordered calls run on an EVM destination + destinationInstruction: { program, data, accounts }, // the instruction run on Solana + destinationTransfer: { recipient, token, amount }, // a plain transfer of SOL or a token on Solana + nativeCalls: [{ to, data, value }], // the ordered calls of a batch on Push + rawTo: '0xWallet', // what the signer's transaction actually called + rawData: '0x...' // the calldata it actually carried +} +``` + +**Error codes that stay.** All are thrown before anything is signed, unless the row says otherwise. + +| Code | Thrown when | +| --- | --- | +| `INDEX_RACE` | Another `create` took the wallet slot first. Nothing was committed; call `create` again | +| `NOT_WALLET_OWNER` | The signer tries to change a wallet it does not own | +| `READ_ONLY` | A client with no signer tries to write | +| `RULE_NOT_FOUND` | The rule id is not an enabled rule on the wallet | +| `INVALID_RULE` | A rule or a label is malformed, for example a label over 64 bytes | +| `AMBIGUOUS_RULE` | More than one enabled rule matches the agent and the destination chain. The SDK does not pick one | +| `RULE_READ_FAILED` | The rules could not be read from the chain, so the SDK does not send | +| `INCONSISTENT_READ` | Two reads from the chain disagree with each other, so the SDK does not act on them | +| `AGENT_GAS_INSUFFICIENT` | The agent's own Push account has no PC for gas. The wallet's PC pays for the outbound, not for the agent's gas | +| `WALLET_BALANCE_INSUFFICIENT` | The wallet does not hold enough PC or enough of the token for the send | +| `CAPABILITY_UNAVAILABLE` | The network cannot do what was asked, for example a batch as the agent where no atomic batch is available | +| `RECEIPT_UNAVAILABLE` | After sending: the transaction was submitted but its receipt could not be read. It may still land | +| `RECEIPT_MISMATCH` | After sending: the receipt does not match what was sent, for example rule ids in a different order | + +**Error codes that are removed.** + +| Code | Why it goes | +| --- | --- | +| `CREATE_PARTIAL` | `create` is one transaction (6.b), so it cannot end half done | +| `GATEWAY_ALLOWANCE_INSUFFICIENT` | The wallet approves the gateway itself (6.g, page 1 item 6.1) | +| `GENERATION_UNSUPPORTED` | There are no earlier wallet versions to support | +| `RULE_LIMIT_EXCEEDED` | Only raised by a local preview of a Solana send. The on-chain rules policy is the only rule checker (2.a), so this is not a public code | + +**`DUPLICATE_RULE` is restored.** 3.f lists `DUPLICATE_RULE`: two rules for the same agent and chain are rejected before signing. The first implementation does not have it and only notices the overlap later, when the agent sends (`AMBIGUOUS_RULE`). The check goes back into `create` and `rules.add`. `AMBIGUOUS_RULE` stays for a wallet that already has overlapping rules. + +**Fields on the error classes.** `AgenticError` also carries `details` and `cause`, and both stay. `AgenticRevertError` carries `transactionHashes` and `pendingTransactionHash`, and a returned `tx` carries an `atomic` flag. These three report a write that was split across several transactions. They are removed once every write is a single transaction (6.b). + +The progress events of the first implementation are the ones in 3.f, with nothing added. + +### 6.m Delete rules - `w.rules.delete` (renamed from `w.rules.revoke`) + +Removes some rules by id, or all of them in one atomic call. This is 1.m under a new name. The call shape and the result are unchanged. + +```tsx +// Function +const tx = await w.rules.delete(rulesIds, { options? }) +const tx = await w.rules.delete({ all, progressHook? }) + +// Usage and Params +const some = await w.rules.delete(['0x9c1e...', '0x7d3a...']); // delete these rules +const all = await w.rules.delete({ all: true }); // delete every rule on the wallet +const tracked = await w.rules.delete(['0x9c1e...'], { progressHook: (p) => console.log(p.id) }); // with progress events +// rulesIds Hex[], required unless all is set the rules to delete +// options.progressHook function, optional progress events, AGENTIC-TX-105; default none +// all true, required unless rulesIds given delete every rule on the wallet in one atomic call +// progressHook function, optional same events, in the { all: true } form; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +{ + hash: '0x8e01...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet + blockNumber: 1512n, + wait // await tx.wait() for the receipt; status lives on the receipt +} +``` + +What changed from 1.m: + +- **The method is delete, not revoke.** The handle now reads `rules.add`, `rules.update`, `rules.delete`. Delete is also what happens on-chain: the wallet removes the rule from the session engine for good. A deleted rule cannot be switched back on, and granting the same rule again produces a new `rulesId`. +- **The bare-call error is renamed.** A bare `delete()` still throws. The code is `DELETE_NEEDS_TARGET` (was `REVOKE_NEEDS_TARGET`). +- **Contract names do not change.** The wallet functions stay `revokeRules` and `revokeAllRules`, the event stays `RulesRevoked`, and the checkpoint kind stays `RULES_REVOKED`. `w.checkpoints()` returns that kind as the contract records it. + +# 7. Changes proposed on 12 Oct 2026: Presets + +A preset is a ready-made set of rules for a common use case, such as trading on popular DEXes. The wallet UI and developers both read presets from the SDK, so there is one source for them. A preset only produces rules. The rules are then passed to `client.agentic.create` in the normal way, and can be edited before that. App ABIs are not part of presets and stay in the wallet UI, because the UI can update them without an SDK release. + +List of changes: + +- New constants: `PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY` with `DEXES`, `LENDING` and `PREDICTION`. An app level (`PushChain.CONSTANTS.AGENTIC.PRESETS.APP`) can be added later without changing the functions. +- New function: `PushChain.utils.agentic.presets.list`, which lists every preset the SDK ships. +- New function: `PushChain.utils.agentic.presets.get`, which returns the rules for one preset. +- This brings back `PushChain.CONSTANTS.AGENTIC` members beyond `WALLET` and the `PushChain.utils.agentic` namespace, for presets only. Both were dropped earlier on this page (6.h). + +### 7.a Preset constants - `PushChain.CONSTANTS.AGENTIC.PRESETS` + +```tsx +PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.DEXES +PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.LENDING +PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.PREDICTION +// later: PushChain.CONSTANTS.AGENTIC.PRESETS.APP. +``` + +The constants object must be enumerable so that tools which iterate constants can list it. + +### 7.b List available presets - `PushChain.utils.agentic.presets.list` + +Returns every preset the SDK ships, so a UI can show them as cards and a developer can discover them. + +```tsx +// Function +const res = PushChain.utils.agentic.presets.list({ options? }) + +// Usage and Params +const { presets } = PushChain.utils.agentic.presets.list(); // every preset the SDK ships +// options.type string, optional 'CATEGORY' today, 'APP' later; omit to list everything + +// Returns +// { presets: Preset[] } +{ + presets: [ + { + type: 'CATEGORY', // later 'APP' + constant: PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.DEXES, + name: 'Popular DEXes', + chains: ['eip155:11155111', 'eip155:84532'] // chains this preset has rules for (Ethereum Sepolia, Base Sepolia) + } + ] +} +``` + +A preset with an empty `chains` list has nothing behind it yet (`PREDICTION` today, since its main apps are on a chain Push does not support yet), and the wallet UI should hide it. + +### 7.c Get the rules of a preset - `PushChain.utils.agentic.presets.get` + +Returns one rule per chain for the chosen preset. Each rule already contains the allowed contracts, the allowed calls with their full signatures, and the pins that keep funds going back to the wallet. The agent, assets and expiry are optional: pass them to get rules that are ready for `create`, or leave them out to pre-fill a review screen and add them later. + +```tsx +// Function +const res = PushChain.utils.agentic.presets.get(preset, { options? }) + +// Usage and Params +const { rules } = PushChain.utils.agentic.presets.get( + PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.DEXES, // a category constant now, an app constant later + { + chainNamespace: PushChain.CONSTANTS.CHAIN.ETHEREUM_SEPOLIA, // optional, omit to get every chain of the preset + agent: '0xAgentOnPush', // optional, the agent's Push address, applied to every rule + assets: [{ chainNamespace, token, maxPerCall, maxTotal }], // optional, each asset is placed on the rule of its chain + validUntil: now + 30 * 86400, // optional, applied to every rule; omit to set it later + } +); + +await client.agentic.create('My DEX agent', { rules }); + +// Returns +// { rules: Rule[] }, one rule per chain, in the same shape client.agentic.create takes +{ + rules: [ + { + agent: '0xAgentOnPush', + chainNamespace: 'eip155:11155111', + assets: [{ token: '0x1c7D...7238', maxPerCall: 100000000n, maxTotal: 1000000000n }], // from options.assets, without its chainNamespace + validUntil: 1767225600, + allowedCalls: [ + { + target: '0x...', + selector: 'exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))', + pins: [{ arg: 3, expected: PushChain.CONSTANTS.AGENTIC.WALLET }], + app: 'Uniswap V3', // display only, ignored by create + label: 'Swap exact input' // display only, ignored by create + } + // plus one approve(address,uint256) per asset, spender pinned to the app's contract (see Behaviour) + ] + } + ] +} +``` + +**Behaviour** + +| Case | What happens | +| --- | --- | +| `chainNamespace` omitted | One rule is returned for every chain the preset covers. | +| `agent`, `assets` or `validUntil` omitted | The rule is returned without that field. The caller adds it before `create`, and `create` rejects a rule with no agent as it already does. | +| `assets` passed | Each asset is placed on the rule of its chain. If `chainNamespace` is set in the options, the `chainNamespace` on each asset can be left out. For each asset, an approve call is added to that rule, with the spender pinned to the app's contract on that chain, because a swap or deposit fails without it. | +| Asset passed without a cap | Proposed: `get` throws. An omitted cap means 0 in the rules policy, so the rule would allow nothing, and a preset should never silently produce a rule that cannot act. | +| Selectors | Always the full signature, never the bare name, because apps overload function names (for example two different execute functions on the same router). | +| Grouping | One rule per chain per category, not one rule per app. Each category stays at two or three apps per chain so the rule stays inside the 32 allowed calls limit of a universal rule. | +| Display fields | `app` and `label` on each allowed call are for showing names in a UI. `create` ignores them. | + +### 7.d Notes for the wallet UI + +- Call `get` with only the preset to pre-fill the review screen, then let the user add the agent, tokens, limits and expiry. +- A blank limit shown as infinity in the UI must be sent as an explicit maximum value. Leaving the cap out means 0, not unlimited. +- The preset data (contract addresses, calls and pins) ships inside the SDK. An app upgrade becomes a new app entry, and the old one keeps working because the older contract still exists. + +### 7.e Open questions + +- Can a pin's arg index reach a field inside a struct argument? The Uniswap `exactInputSingle` example depends on it, because the recipient sits inside a struct. (Rules policy contract owner) +- Routers that hide the recipient inside encoded bytes, such as Uniswap Universal Router `execute`, cannot be pinned, so they should not be preset targets. Confirm the list of apps and functions per chain with this in mind. (SDK owner with the rules policy contract owner) +- Is the agent one Push address for every chain, including Solana rules? If not, `agent` becomes a per-chain map. (SDK owner) +- Should `get` throw when an asset has no cap, as proposed above? (Page owner) +- First preset list for testnet: which apps on which chains for `DEXES` and `LENDING`. (SDK owner with the rules policy contract owner) \ No newline at end of file diff --git a/plan/agw/notion/6-sdk-universal-marketplace.md b/plan/agw/notion/6-sdk-universal-marketplace.md new file mode 100644 index 00000000..b19e5207 --- /dev/null +++ b/plan/agw/notion/6-sdk-universal-marketplace.md @@ -0,0 +1,146 @@ +# 6. SDK: Universal Marketplace + + + +# 1. User side, by example + +Browse and compile. Nothing is sent until `start`. + +```tsx +const cards = await client.market.cards({ skill: 'yield', chain: CHAIN.ETHEREUM_SEPOLIA }); +const card = await client.market.card(cards[0].id); + +const plan = await client.market.compile(card, { + principal: { amount: parseUnits('1000', 6), token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC }, + duration: 30 * 86400, + choices: { pool: aavePool }, // card-declared choices, validated against the card +}); + +plan.wallet; // derived AGW address (client.agentic.derive under the hood) +plan.rules; // Rule[] the card requires, placeholders resolved (beneficiary = the AGW's account on that chain) +plan.criteria; // encoded Criteria bytes + hash, placeholders resolved (ACCOUNT, PRINCIPAL) +plan.fee; // { amount, token } from the card (PROPOSED: fixed fee on the card) +plan.calls; // MultiCall[]: deployWallet, fund, grantRules, createJob, approve, fund(job) +plan.preview; // human-readable: what the agent may do, what it may not, what "done" means +``` + +Start: one signature. + +```tsx +const { wallet, rulesId, jobId, txHash } = await client.market.start(plan, { + progressHook: (p) => console.log(p.id, p.message), // MARKET-TX-1xx +}); +// External user: UEA multicall. Push-native user: one tx from the EOA. Same call either way. (PROPOSED: path A) +``` + +After start, everything is on the primitives: + +```tsx +await client.job.status(jobId); // page 7 +await client.evaluation.status(jobId); // page 8 +client.agentic.wallet(wallet).rules.list(); // page 5 +``` + +# 2. Provider side, by example + +A card is a signed document. The signature is over the card hash, by the provider's agent key, so `compile` and the fund hook can both recompute it. + +```tsx +const card = await client.market.publish({ + skill: 'yield', + title: 'Aave USDC optimiser', + version: '1.0.0', + chains: [CHAIN.ETHEREUM_SEPOLIA], + agent: '0xAgentOnPush', // the Push address that will act: an EOA, or the UEA of an external key + requiredCalls: [ + { chain: CHAIN.ETHEREUM_SEPOLIA, target: aavePool, selector: 'supply(address,uint256,address,uint16)', beneficiary: 2 }, + { chain: CHAIN.ETHEREUM_SEPOLIA, target: usdcSepolia, selector: 'approve(address,uint256)' }, + ], + limits: { maxAmountPerCall: 'PRINCIPAL', maxAmountTotal: 'PRINCIPAL', maxPCPerCall: parseUnits('0.5', 18) }, + fee: { amount: parseUnits('5', 6), tokens: [USDC_ETH, USDT_ETH] }, // fixed (PROPOSED); tokens the provider accepts, client picks one at start + duration: { min: 7 * 86400, max: 90 * 86400 }, + criteriaTemplate, // page 8: Criteria with placeholders, unresolved + choices: [{ key: 'pool', type: 'address', allowed: [aavePool] }], +}); +// signs with the connected signer (must be the agent or the provider's owner key), stores, returns { id, hash, signature } + +await client.market.mine(); // cards published by this signer +await client.market.retire(card.id); // stops new starts; live jobs unaffected +``` + +# 3. Types + +```tsx +interface MarketNamespace { + cards(filter?: CardFilter): Promise; + card(id: string): Promise; + compile(card: AgentCard, input: UserInput): Promise; + start(plan: StartJobPlan, opts?: { progressHook? }): Promise; + publish(card: AgentCardDraft): Promise; // provider side + mine(): Promise; + retire(id: string): Promise; + prepare: { start(plan: StartJobPlan): Promise }; // the calls without sending, to add your own +} + +interface AgentCard { + id: string; // keccak of the canonical card, hex + provider: Address; // who signed the card, as a Push address + agent: Address; // the Push address that will act: becomes rules.agent and the kernel's provider + skill: string; title: string; version: string; + chains: CHAIN[]; + requiredCalls: RequiredCall[]; // become AllowedCall[] per chain + limits: { maxAmountPerCall: bigint | 'PRINCIPAL'; maxAmountTotal?: bigint | 'PRINCIPAL'; maxPCPerCall: bigint }; + fee: { amount: bigint; tokens: Address[] }; // PROPOSED fixed; tokens the provider accepts; client chooses one in UserInput + duration: { min: number; max: number }; + criteriaTemplate: Criteria; // page 8, unresolved placeholders + choices?: Choice[]; + signature: Hex; +} + +interface RequiredCall { chain: CHAIN; target: Address; selector: Selector; beneficiary?: number; maxValue?: bigint } +interface Choice { key: string; type: 'address' | 'uint' | 'enum'; allowed?: unknown[]; default?: unknown } + +interface UserInput { + principal: { amount: bigint; token: MoveableToken | Address }; + feeToken: Address; // one of card.fee.tokens; becomes Job.paymentToken (K-12) + duration: number; + choices?: Record; + pc?: bigint; // native PC for outbound fees, default from card + walletIndex?: number; // reuse a derived slot, default next +} + +interface StartJobPlan { + card: AgentCard; + wallet: Address; + rules: Rule[]; + criteria: { bytes: Hex; hash: Hex; resolved: Criteria }; + fee: { amount: bigint; token: Address }; + expiredAt: number; + calls: MultiCall[]; + preview: PlanPreview; +} + +interface StartResult { wallet: Address; rulesId: Hex; jobId: bigint; txHash: Hex } + +class MarketError extends AgenticError {} // CARD_SIGNATURE, CHOICE_INVALID, DURATION_OUT_OF_RANGE, CHAIN_UNSUPPORTED +// progress family: MARKET-TX-1xx +``` + +# 4. Open for review + +1. Path A vs B. On A (PROPOSED) `start` is an SDK multicall and `prepare.start` exists. On B `start` is one call to an on-chain `startJob` with the WithSig variants from page 1; the surface stays identical, only what is under `start` changes. +2. Fixed fee vs quote. Fixed (PROPOSED) keeps the provider out of the user's signature. Quote means `start` splits into `start` (create, no fund) and `fundQuoted(jobId)` after `setBudget`, and the user signs twice. +3. Card storage. Off-chain index signed by the provider (fast, POC) vs on-chain registry (slow, verifiable). `publish` hides the choice; `id` is the card hash in both. +4. Card versioning. A new version is a new card and a new id; live jobs keep the hash they funded with. +5. Who may `publish`. Provider owner key vs agent key vs either. Fund hook recomputes the card hash and checks the signature against `card.provider`. \ No newline at end of file diff --git a/plan/agw/notion/7-sdk-8183-job.md b/plan/agw/notion/7-sdk-8183-job.md new file mode 100644 index 00000000..731f7765 --- /dev/null +++ b/plan/agw/notion/7-sdk-8183-job.md @@ -0,0 +1,120 @@ +# 7. SDK: 8183 Job + + + +# 1. Client side (AGW owner), by example + +Without the marketplace: the owner creates and funds a job from an AGW that already exists. + +```tsx +const owner = await PushChain.initialize(ownerSigner, { network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET }); +const w = owner.agentic.wallet('0xWallet'); + +const { jobId, txHash } = await owner.job.create({ + client: w.address, // the AGW is the client on the kernel + provider: '0xAgentOnPush', // same Push address as rules.agent: an EOA, or the UEA of an external key + evaluator: PushChain.CONSTANTS.EVALUATION[TESTNET_DONUT].UNIVERSAL_EVALUATOR, + expiredAt: now + 30 * 86400, + hook: PushChain.CONSTANTS.JOB[TESTNET_DONUT].RULES_BINDING_HOOK, + criteria: criteriaBytes, // page 8; carried in description as hex (single carrier) +}); +// goes through w.execute: the AGW calls createJob + +await owner.job.fund(jobId, { amount: parseUnits('5', 6), token: USDC_ETH }, { rulesId }); // token chosen by the client at createJob (K-12) +// approve(kernel) + fund(jobId, amount, optParams = rulesId) in one execute; the hook binds rulesId to jobId + +await owner.job.status(jobId); // Job +owner.job.watch(jobId, (e) => console.log(e.status)); // Funded, Started (from evaluation), Submitted, Completed, Rejected +await owner.job.claimRefund(jobId); // after expiredAt + grace, never pausable +``` + +# 2. Provider side, by example + +No AGW, no rules: the provider is an ordinary signer talking to the kernel. + +```tsx +const provider = await PushChain.initialize(agentSigner, { network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET }); + +await provider.job.list({ provider: provider.universal.account, status: 'Funded' }); // the signer's Push address, UEA for an external key +await provider.evaluation.waitForStart(jobId); // page 8: PreRecorded exists, START reads landed + +// ... do the work through the AGW as the agent (page 5, section 2) ... + +await provider.job.submit(jobId, { deliverable: 'ipfs://...' }); +// hook afterAction(submit) fires END reads; the verdict lands via evaluation.watch (page 8) + +// quote path only (open on page 3): await provider.job.setBudget(jobId, parseUnits('5', 6)); +``` + +# 3. Types + +```tsx +interface JobNamespace { + create(params: CreateJobParams): Promise<{ jobId: bigint; txHash: Hex }>; + fund(jobId: bigint, fee: { amount: bigint; token: Address }, opts: { rulesId: Hex; progressHook? }): Promise; + submit(jobId: bigint, params: { deliverable: Hex | string; optParams?: Hex }): Promise; // string is hashed to bytes32 + claimRefund(jobId: bigint): Promise; + setBudget?(jobId: bigint, amount: bigint): Promise; // only if the quote path wins + status(jobId: bigint): Promise; + list(filter: { client?: Address; provider?: Address; status?: JobStatus }): Promise; + watch(jobId: bigint, cb: (e: JobEvent) => void): () => void; + evaluatorOnly: { // escape hatch for non-card jobs where the evaluator is a signer + complete(jobId: bigint, reason: string): Promise; + reject(jobId: bigint, reason: string): Promise; + }; + prepare: { + create(params: CreateJobParams): Promise; + fund(jobId: bigint, fee, opts): Promise; + }; +} + +interface CreateJobParams { + client: Address; // AGW address; the SDK routes through its execute door + provider: Address; // must equal rules.agent; the hook checks equality + evaluator: Address; + expiredAt: number; + hook: Address; + paymentToken: Address; // K-12: client's choice, any PRC20 + criteria?: Hex; // encoded Criteria; written to description as hex + description?: string; // only when criteria is absent (plain 8183 job, no evaluator) + progressHook?: (p: ProgressEvent) => void; +} + +type JobStatus = 'Open' | 'Funded' | 'Submitted' | 'Completed' | 'Rejected' | 'Expired'; + +interface Job { + id: bigint; client: Address; provider: Address; evaluator: Address; + status: JobStatus; budget: bigint; paymentToken: Address; + expiredAt: number; hook: Address; + criteria?: { bytes: Hex; hash: Hex }; // decoded from description when present + paymentToken: Address; // K-12 + deliverable?: Hex; // bytes32 on the kernel: hash or digest of the deliverable + rulesId?: Hex; // from the binding hook +} + +interface JobEvent { jobId: bigint; status: JobStatus | 'Started'; txHash: Hex; blockNumber: bigint; reason?: string } + +PushChain.CONSTANTS.JOB[PUSH_NETWORK.TESTNET_DONUT] = { KERNEL, RULES_BINDING_HOOK, GRACE: 3600 }; // no payment token constant: the client picks it per job + +class JobError extends AgenticError {} // TOKEN_MISMATCH (kernel is single-token), NOT_STARTED, RULES_NOT_BOUND, EXPIRED +// progress family: JOB-TX-1xx +``` + +# 4. Open for review + +1. Payment token is chosen by the client per job (USDC, USDT.eth, USDT.sol, any PRC20). The kernel on the branch is single-token (`paymentToken` set in `initialize`), so this needs K-12: `createJob(..., address paymentToken)`, `Job.paymentToken`, `totalEscrowed` per token, fees paid in the job's token. `fund` then takes no token argument; the SDK reads it from the job and throws `TOKEN_MISMATCH` if the caller passes a different one. +2. `evaluatorOnly.complete/reject`: keep as a named escape hatch or leave out of the SDK entirely (call the kernel raw). Leaving it in makes plain 8183 jobs usable without the evaluator. +3. `setBudget` exists only on the quote path. Decide with page 2 open item 2. +4. `watch` emits `Started` from the evaluator's `PreRecorded`, not from the kernel. One stream for the reader, two sources underneath. +5. `create` from an EOA client (no AGW) for plain 8183 jobs: allow, or require an AGW always. Allowing it keeps the namespace honest to the standard. \ No newline at end of file diff --git a/plan/agw/notion/8-sdk-universal-evaluation.md b/plan/agw/notion/8-sdk-universal-evaluation.md new file mode 100644 index 00000000..a047946c --- /dev/null +++ b/plan/agw/notion/8-sdk-universal-evaluation.md @@ -0,0 +1,127 @@ +# 8. SDK: Universal Evaluation + + + +# 1. Card author side, by example + +A template with placeholders. `ACCOUNT` is the user's account on the read's chain (the AGW's CEA on EVM); `PRINCIPAL` is the funded amount. + +```tsx +const { criteria } = PushChain.CONSTANTS.EVALUATION; + +const template = client.evaluation.criteria.build({ + minDuration: 7 * 86400, + conditions: [ + // 4% on principal over the job, measured on the aToken balance + { read: { chain: READ.CHAIN.ETHEREUM_SEPOLIA, type: 'CONTRACT_CALL', target: aUSDC, call: 'balanceOf(address)', args: ['ACCOUNT'], result: 'UINT' }, + sample: 'START_AND_END', + cmp: { op: 'GTE', basis: 'PCT', value: 400n } }, + // nothing left idle on the destination chain + { read: { chain: READ.CHAIN.ETHEREUM_SEPOLIA, type: 'CONTRACT_CALL', target: usdcSepolia, call: 'balanceOf(address)', args: ['ACCOUNT'], result: 'UINT' }, + sample: 'END', + cmp: { op: 'LTE', basis: 'ABSOLUTE', value: parseUnits('1', 6) } }, + ], +}); + +client.evaluation.criteria.validate(template); // limits: 8 conditions, 512 bytes calldata, PERIODIC refused, solana result types +client.evaluation.criteria.encode(resolved); // Hex, abi.encode(Criteria) +client.evaluation.criteria.hash(resolved); // keccak of the encoding +client.evaluation.criteria.decode(bytes); // Criteria, from a job's description +``` + +Preview before anyone signs: resolve placeholders and dry-run the reads today, locally, so the author sees what the evaluator will see. + +```tsx +const resolved = client.evaluation.criteria.resolve(template, { account: ceaOnSepolia, principal: parseUnits('1000', 6) }); +const dry = await client.evaluation.criteria.simulate(resolved); // uses universal.readState now; not the verdict, a sanity check +dry.conditions[0]; // { start?: value, end: value, pass: boolean, note?: 'PCT with zero START fails' } +``` + +# 2. Job side, by example + +```tsx +const s = await client.evaluation.status(jobId); +// { registered: true, started: true, startValues: [...], endValues?: [...], verdict?: 'PASS' | 'FAIL', reason? } + +await client.evaluation.waitForStart(jobId, { timeoutMs }); // resolves on PreRecorded(jobId) +const stop = client.evaluation.watch(jobId, (e) => { /* StartRead, PreRecorded, EndRead, Verdict */ }); + +await client.evaluation.refireStart(jobId, { condition: 0 }); // a START read errored or expired; caller pays the read fee +await client.evaluation.verdict(jobId); // { result, reason, txHash } once complete or reject landed +``` + +# 3. Types + +```tsx +interface EvaluationNamespace { + criteria: { + build(input: CriteriaInput): Criteria; // typed sugar over the raw struct; selectors as signature strings, args by name + validate(c: Criteria): void; // throws EvaluationError with the offending condition index + resolve(c: Criteria, ctx: { account: Address | Hex; principal: bigint }): Criteria; + encode(c: Criteria): Hex; + decode(bytes: Hex): Criteria; + hash(c: Criteria): Hex; + simulate(c: Criteria, opts?: { atBlock? }): Promise; + }; + status(jobId: bigint): Promise; + verdict(jobId: bigint): Promise; + waitForStart(jobId: bigint, opts?: { timeoutMs?: number }): Promise; + refireStart(jobId: bigint, opts: { condition: number }): Promise; + watch(jobId: bigint, cb: (e: EvaluationEvent) => void): () => void; +} + +// mirrors page 4 one to one +interface Criteria { version: 1; minDuration: number; conditions: Condition[] } +interface Condition { read: Read; sample: Sample; cmp: Compare } +interface Read { + chain: ReadChain; // READ.CHAIN.*: eip155 chains, solana chains, PUSH (local, no fee), WEB2 + type: 'ACCOUNT_BALANCE' | 'CONTRACT_CALL' | 'STORAGE_SLOT'; + target: Address | Hex; // 20 bytes EVM, 32 bytes SVM + callData?: Hex; // CONTRACT_CALL; placeholders resolved at compile + word?: number; // which 32-byte word of the return + result: 'UINT' | 'INT' | 'BOOL' | 'ADDRESS' | 'BYTES32'; +} +type Sample = 'END' | 'START_AND_END' | 'PERIODIC'; // PERIODIC refused by the v1 evaluator +interface Compare { + op: 'EQ' | 'NEQ' | 'GT' | 'GTE' | 'LT' | 'LTE' | 'IS_TRUE' | 'IS_FALSE'; + basis: 'ABSOLUTE' | 'DELTA' | 'PCT' | 'REF'; + value: bigint; // bps when basis is PCT + ref?: number; // condition index when basis is REF +} + +type Placeholder = 'ACCOUNT' | 'PRINCIPAL'; + +interface EvaluationStatus { + registered: boolean; started: boolean; + startValues?: (bigint | boolean)[]; endValues?: (bigint | boolean)[]; + verdict?: 'PASS' | 'FAIL'; reason?: string; +} +interface Verdict { result: 'PASS' | 'FAIL'; reason: string; txHash: Hex; perCondition: { pass: boolean; start?: bigint; end: bigint }[] } +interface SimulationResult { conditions: { start?: bigint | boolean; end: bigint | boolean; pass: boolean; note?: string }[]; pass: boolean } +interface EvaluationEvent { jobId: bigint; kind: 'StartRead' | 'PreRecorded' | 'EndRead' | 'Verdict'; condition?: number; txHash: Hex } + +PushChain.CONSTANTS.EVALUATION[PUSH_NETWORK.TESTNET_DONUT] = { + UNIVERSAL_EVALUATOR, MAX_CONDITIONS: 8, MAX_CALLDATA: 512, MAX_CHAIN_STRING: 32, SCHEMA_VERSION: 1, +}; + +class EvaluationError extends AgenticError { condition?: number } // PERIODIC_UNSUPPORTED, TOO_MANY_CONDITIONS, UNRESOLVED_PLACEHOLDER, SOLANA_RESULT_TYPE +``` + +# 4. Open for review + +1. `simulate` runs the reads through `universal.readState` today. That is the real read path, so it costs read fees unless we add a free local eth_call fallback for the preview. Decide: paid but faithful, or free but approximate. +2. `refireStart` pays the read fee from the caller. Who should be allowed: anyone (page 4 says anyone) or client and provider only. +3. `build` sugar (named args, signature strings) means the SDK carries ABI encoding for criteria the same way it does for rules. Same dependency, one implementation. +4. `status.started` reads the evaluator's `PreRecorded`; if storage moves to the hook (page 4 open item 1) the read target changes, the surface does not. +5. Annualisation of PCT is a card-level convention in v1. If the evaluator learns to annualise later, `Compare` gains a flag; `build` can accept `annualised: true` now and refuse until then. \ No newline at end of file diff --git a/plan/agw/notion/agentic-wallet-flow-2026-09-07.md b/plan/agw/notion/agentic-wallet-flow-2026-09-07.md new file mode 100644 index 00000000..6fdcdd36 --- /dev/null +++ b/plan/agw/notion/agentic-wallet-flow-2026-09-07.md @@ -0,0 +1,362 @@ +# agentic_wallet_flow ( updated ) + +# Bob Lends 100 USDC — End-to-End Flow on Push Chain (Architecture v3) + +**Bob’s intent:** *“Find the best-yielding stablecoin lending vault and deploy 100 USDC into it.”* + +--- + +## Cast + +| Handle | What it is | Where | +| --- | --- | --- | +| `0xbob` | Bob’s EOA — holds USDC | Ethereum | +| `0xbobuea` | Bob’s Universal Executor Account — his identity | Push Chain | +| `0xbobagw` | Bob’s **agent wallet** — holds the budgeted funds, owned by `0xbobuea`. **One of several Bob may own** | Push Chain | +| `0xbobagwcea` | `0xbobagw`’s Chain Executor Account — the execution hand | Ethereum | +| `0xagentkey` | The agent’s signing key (ECDSA **or** Ed25519) — **a key, not an account** | off-chain | +| `AGWFactory` | Deploys agent wallets at predictable addresses; the registry of record | Push Chain | +| `SmartSession` | The adopted permission engine — the wallet’s only installed module | Push Chain | +| `UCEP` | Universal CrossChain Execution Policy — **the only contract that inspects what the agent really does on the far chain** | Push Chain | +| `PushSessionValidator` | Stateless signature checker (secp256k1 / Ed25519). **Never installed** — named inside each permission | Push Chain | +| `UniversalGatewayPC` | The frozen outbound gateway — the only thing an agent action may call | Push Chain | + +All of Bob’s addresses are **deterministic and computable before anything is deployed.** + +**Not in v3, and deliberately absent from this flow:** any executor module (module type 2 is refused by the wallet), any hook or fallback module, any job/escrow/evaluator layer, any fee split. Those are separate product concerns with no contract in the v3 set. + +--- + +## STAGE 1 — Intent capture *(off-chain, zero transactions)* + +- Bob types his intent. The tooling resolves `0xbobuea`, and — critically — **asks Bob a v3-specific question**: + + > *“Put this in a **new** agent wallet, or add it as another mandate on an **existing** one?”* + > + + A new wallet is a new blast-radius boundary and a new account on every external chain. An extra mandate on an existing wallet shares the pool and the accounts. **This choice is Bob’s, and it exists only in v3** (Rule 1). + +- Bob chooses a new wallet. The tooling derives `0xbobagw` from `(owner, index)` via `AGWFactory.predictWallet`, then derives `0xbobagwcea` from it — **before either exists**. +- The tooling composes the mandate. Every line below becomes an on-chain policy parameter inside UCEP: + + + | Capital | 100 USDC into a wallet only Bob can withdraw from | + | --- | --- | + | Agent may call | `supply()` on Aave v3 / Morpho Blue / Spark — Ethereum only | + | Ceiling | 100 USDC lifetime, 100 USDC per action | + | Gas ceiling | a bounded amount of PC per action | + | Expires | 60 minutes — **an explicit, non-zero value**; UCEP rejects a zero or past expiry at grant | + | Beneficiary | forced to `0xbobagwcea` — derived, never typed | + | Revoke | instantly, one signature, unblockable | +- **Argument offsets are generated from each protocol’s ABI by tooling, never hand-typed** — a wrong offset silently disarms the beneficiary check. +- The tooling calls `PushSessionValidator.validateConfig` on the key config, and shows Bob the resolved `0xbobagwcea` and whether it is deployed yet. +- Bob reviews and approves. **This is the last human decision point.** + +--- + +## STAGE 2 — One signature on Ethereum + +**💰 FUND MOVEMENT #1 — USDC leaves Bob’s wallet** + +- Bob signs a single EIP-712 payload in his own wallet. +- `UniversalGateway.sendUniversalTx()` on Ethereum locks **100 USDC** into the Vault, takes a small extra amount auto-swapped to $PC for gas, and carries the Push Chain payload. + +``` +0xbob ──100 USDC──▶ UniversalGateway (Ethereum) [LOCKED] +``` + +- **Bob needs no $PC, never visits Push Chain, and signs exactly once.** + +--- + +## STAGE 3 — Inbound: identity, wallet, mandate — one atomic multicall + +- Universal Validators observe the Ethereum event → ballot reaches quorum → `x/uexecutor` dispatches: + - `UEAFactory.deployUEA()` → **`0xbobuea` created** (first time only) + - gas auto-swapped to $PC, UEA credited + - **100 pUSDC minted to `0xbobuea`** + - `0xbobuea.executeUniversalTx(payload, sig)` → signature verified → multicall runs + +**💰 FUND MOVEMENT #2 — 100 USDC arrives as 100 pUSDC** + +### The multicall, step by step + +| # | Call | Effect | +| --- | --- | --- | +| 1 | `AGWFactory.deployWallet("lending")` | **`0xbobagw` deployed** at the predicted address; owner = `0xbobuea`, baked into bytecode. **Inside the same call the factory invokes `initializeAccount()`, which installs SmartSession** — atomic, no uninitialised state | +| 2 | `0xbobagw.grantMandate(session)` | 🔑 **MANDATE GRANTED** — see below | +| 3 | `pUSDC.transfer(0xbobagw, 100e6)` | 💰 funds → the agent wallet | +| 4 | `PC.transfer(0xbobagw, …)` | ⛽ the wallet needs its own PC — it pays for the outbound gas swap | + +**There is no `installModule(2, OutboundExecutor)` step.** v3 supports **module type 1 only**. The wallet calls the gateway itself; nothing else is installed, ever. + +### 🔑 The mandate grant (step 2) in detail + +`grantMandate` does exactly two things: it **overwrites the salt** with the wallet’s own monotonic `grantNonce`, and it **enforces the canonical session shape**. Anything else reverts `MalformedSessionShape`. + +``` +sessionValidator = PushSessionValidator +sessionValidatorInitData = abi.encode(scheme, 0xagentkey) ← ECDSA or Ed25519 +salt = bytes32(grantNonce++) ← WALLET-SUPPLIED, never the caller's + +userOpPolicies: [ ] ← ALWAYS EMPTY (that class has a floor of zero) +erc7739Policies: [ ] ← ALWAYS EMPTY +permitERC4337Paymaster: false ← ALWAYS FALSE + +actions: [ EXACTLY ONE ] + actionTarget = UniversalGatewayPC + actionTargetSelector = sendUniversalTxOutbound.selector + actionPolicies: [ UCEP AND ONLY UCEP ] + validUntil = now + 60 min ← THE EXPIRY LIVES INSIDE UCEP + asset = PRC20_USDC ← pins the destination chain transitively + expectedCEA = 0xbobagwcea ← DERIVED at grant, committed forever + maxAmountPerCall = 100e6 + maxAmountTotal = 100e6 + maxPCPerCall = + allowedCalls = { Aave v3, Morpho Blue, Spark } × { supply } + beneficiary offsets +``` + +**Why UCEP is the *only* action policy.** The engine requires at least one action policy per action. With UCEP as the only one, **removing UCEP leaves zero policies and every request dies**. Add a second policy — a separate time-window policy, say — and that property is gone: stripping UCEP would leave one policy standing and the request would pass. **This is why the expiry lives inside UCEP and not in a policy of its own.** + +**The mandate identity.** `permissionId = keccak256(sessionValidator, initData, salt)`. Because the wallet supplies the salt, granting byte-identical terms twice yields two independent mandates. Because the signer config is in the hash, **the agent key cannot be swapped inside a mandate — a different key is a different mandate** (Rule 4). + +**What the agent key can do:** exactly one function, on exactly one Push contract, for one asset, up to two ceilings, into three possible pools, until the expiry, with the beneficiary forced to Bob’s own CEA. + +**What it cannot do:** move funds anywhere else · call any other contract · redirect the position · exceed either cap · act after expiry · install or remove modules · call the wallet, UCEP, the gateway, **or `0xbobagwcea` itself** · touch `0xbobuea` · grant or extend anything. + +### State after Stage 3 + +``` +0xbobuea : 0 pUSDC ← identity only, clean +0xbobagw : 100 pUSDC + PC ← owned by 0xbobuea; one mandate live +UCEP.spent : 0 +``` + +**Bob signed once. He has an identity, an agent wallet, a bounded mandate, and zero exposure beyond 100 USDC.** + +--- + +## STAGE 4 — The agent works *(off-chain, no funds move)* + +- The agent’s runtime researches yields off-chain → **Morpho Blue USDC vault, 5.2% APY**. +- It composes the request as **four nested layers**, innermost first: + +``` +Layer 4 the far-chain call supply(USDC, 100e6, 0xbobagwcea, 0) +Layer 3 the instruction list Multicall[] — 1 to 10 entries, mandatory envelope +Layer 2 the gateway request token, amount, EMPTY recipient, revertRecipient = 0xbobagw, + non-zero maxPCForGas, payload = layer 3 +Layer 1 the wallet operation mode, executionCalldata, lane + position, requestExpiry +``` + +- It signs the **ten-field operation hash**. **It composes instructions; it does not move money.** + +--- + +## STAGE 5 — Execution via the agent door + +**🔑 THE AGENT KEY IS USED — the only time it is used in the entire lifecycle** + +- The agent **cannot** call `UniversalGatewayPC` itself. If it did, `msg.sender` would be the agent, the Vault would derive the *agent’s* CEA, and the agent would hold Bob’s position. Structurally blocked. +- Instead it calls **Bob’s wallet** — or hands the signed request to any relayer. + +> **The caller does not matter — the signature does.**`executeWithSession` has no caller check. **Anyone can submit.** Authorisation lives inside the function: the transaction is inert without a signature over the op hash from the key Bob named. In practice the agent service relays its own requests and pays the Push gas from its own PC balance — a separate balance from the wallet’s. +> + +``` +0xagentkey signs opHash (10 bound fields) + └─▶ 0xbobagw.executeWithSession(validator, mode, execCalldata, sig, nonceKey, nonceSeq, requestExpiry) + │ + │ ── THE WALLET DOES THE ENTRYPOINT'S JOBS ITSELF (Push Chain has none) ── + ├─ 1. requestExpiry passed? revert (0 = no expiry; no ceiling either) + ├─ 2. validator installed? ✓ + ├─ 3. consume nonce lane BEFORE validation — nothing can run twice + ├─ 4. recompute the ten-field opHash from what arrived + ├─ 5. build PackedUserOperation in memory (ABI shape only) + │ sender = address(this) · paymasterAndData = "" · gas fields zeroed + │ + └─▶ SmartSession.validateUserOp + ├─ permission enabled? + ├─ UCEP.checkAction ── the 16-gate gauntlet, in order ── + │ 1 configured · 2 NOT EXPIRED · 3 gateway only · 4 send selector + │ 5 token == USDC · 6 per-call cap · 7 lifetime cap · 8 PC value cap + │ 9 maxPCForGas != 0 · 10 revertRecipient == wallet · 11 recipient EMPTY + │ 12 multicall envelope · 13 1..10 entries + │ per entry: 14 not wallet/UCEP/gateway/CEA ← beats the allow-list + │ 15 (target, selector) allow-listed + beneficiary == 0xbobagwcea + │ 16 per-entry value cap + │ EFFECTS LAST: spent += amount · emit OutboundMetered + │ + └─ PushSessionValidator.validateSignatureWithData ← LAST, after every policy + ECDSA: ecrecover Ed25519: raw staticcall to the USV precompile + │ + ├─ 6. the wallet enforces the verdict itself (authorizer, validAfter/validUntil) + └─▶ 7. dispatch THE EXACT VALIDATED BYTES ──▶ UniversalGatewayPC.sendUniversalTxOutbound + ▲ + msg.sender == 0xbobagw + ← decides which CEA executes +``` + +- **Any single gate failing reverts the whole transaction** — nonce, counters, everything. A failed action costs the relayer gas and changes nothing else. The agent’s runtime is never trusted; UCEP is the trust boundary. +- **Ordering note that looks wrong and is not:** the signature is verified **after** the policies. Policies therefore run on calldata that has not yet been authenticated — so every policy, forever, must be safe against arbitrary calldata from any caller. UCEP is safe by construction: no external calls, effects last, revert on every failure. + +### 💰 FUND MOVEMENT #3 — 100 pUSDC burns on Push Chain + +``` +0xbobagw [100 pUSDC] ──BURN──▶ ∅ emit UniversalTxOutbound(sender = 0xbobagw, …) +UCEP.spent: 0 → 100e6 emit OutboundMetered(...) ← the correlation record +``` + +--- + +## STAGE 6 — Cross-chain settlement + +- `PostTxProcessing` creates a pending outbound; Universal Validators produce a **DKLS23 threshold signature**; TSS calls `Vault.finalizeUniversalTx(pushAccount = 0xbobagw, …)` on Ethereum. + +### 💰 FUND MOVEMENT #4 — 100 USDC released to the wallet’s CEA + +- Vault: `getCEAForPushAccount(0xbobagw)` → not deployed → **deploys `0xbobagwcea`** (first contact) +- Vault: `USDC.safeTransfer(0xbobagwcea, 100e6)` +- Vault: `CEA.executeUniversalTx(..., originCaller = 0xbobagw, payload)` → checks `originCaller == pushAccount` ✓ → runs the instruction list: + +| # | Call | Result | +| --- | --- | --- | +| 1 | `USDC.approve(MORPHO_BLUE, 100e6)` | allowance set | +| 2 | `MORPHO_BLUE.supply(USDC, 100e6, 0xbobagwcea, 0)` | **deposit executed** | + +### 🎯 What Morpho sees + +``` +msg.sender = 0xbobagwcea · onBehalfOf = 0xbobagwcea · shares → 0xbobagwcea +``` + +**The agent appears nowhere.** It never held a cent, never appeared as depositor, and cannot withdraw. + +### If the far side fails + +- Funds return to `0xbobagw` — because UCEP pinned `revertRecipient` to the wallet, gate 10. +- Push’s Universal Executor Module then calls `UCEP.creditRevert(...)`, which reduces `spent` — **module-only, once per outbound id, saturating**. +- **STATUS: designed and shipped, NOT YET FUNCTIONAL** — the Push-core callback has not landed. Until it does, a failed far leg leaves `spent` inflated and the remedy is revoke-and-regrant. **Gas is never credited back; it was genuinely consumed.** + +--- + +## STAGE 7 — After the action + +### The control chain — transitive, and single-parent at every hop + +``` +0xbobuea ──owns──▶ 0xbobagw ──is pushAccount of──▶ 0xbobagwcea + (identity) (agent wallet) (Ethereum hand) +``` + +- **The UEA cannot command the CEA directly.** To withdraw from Morpho, `0xbobuea` calls `0xbobagw.execute(...)`, which originates an outbound, which the TSS routes to `0xbobagwcea`. Always two hops. +- **The agent key cannot withdraw** — `withdraw()` is not in the allow-list, so the owner path is the only exit by construction. +- **The CEA has no independent security.** It is a projection of the agent wallet, not a second line of defence. + +| Actor | Can do | Cannot do | +| --- | --- | --- | +| **`0xbobuea`** (Bob) | anything, unconditionally — withdraw anywhere, revoke, replace a mandate, install/uninstall a validator | — | +| **`0xagentkey`** | exactly what the mandate permits, until expiry | everything else | +| **Push governance** | — | reach `0xbobagwcea`; the only path in is a TSS outbound originating from `0xbobagw` | + +### The owner’s three operations, in full + +- **Withdraw** — `execute([...])`. **There is no `withdraw()` function**; the owner path *is* withdrawal, with no destination restriction and no policy in the path. It must succeed in every degraded state — zero mandates, engine uninstalled, hostile validator installed. +- **Revoke** — `stopMandate(pid)` (existence-checked, so a typo reverts loudly instead of silently “succeeding”) or `stopAll()`. Immediate on Push, unblockable, no callbacks on the path. **One honest limit:** an instruction already dispatched across the bridge still completes. +- **Change a mandate** — **it cannot be edited.** A change is one owner transaction batching: `UCEP.assertSpent(expected)` → `stopMandate(old)` → `grantMandate(new)`. If the agent spent in the composition window, the assertion reverts the whole change. **Counters restart at zero on the new mandate**, and any request the agent signed against the old id is dead, because the op hash binds the permission id. + +### STAGE 7b — the second action, and why it may carry zero USDC + +- Bob’s agent later wants to move the position from Morpho into Aave. **No new USDC is bridged** — the capital is already at `0xbobagwcea`. +- So the outbound carries `amount == 0` with a payload of allow-listed instructions. **v3 permits this**; `spent` does not move, because the lifetime cap counts what is **bridged**, not what is **redeployed**. +- The exposure is bounded elsewhere: the per-call PC ceiling, the requirement that every instruction be allow-listed, and the wallet’s own small PC balance. + +--- + +## Fund movement — the whole ledger + +| # | Stage | Movement | Amount | +| --- | --- | --- | --- | +| 1 | 2 | `0xbob` → UniversalGateway (Ethereum) | 100 USDC locked | +| 2 | 3 | mint on Push Chain → `0xbobuea` | 100 pUSDC | +| 3 | 3 | `0xbobuea` → `0xbobagw` | 100 pUSDC + PC for gas | +| 4 | 5 | `0xbobagw` burn | −100 pUSDC | +| 5 | 6 | Ethereum Vault → `0xbobagwcea` | 100 USDC | +| 6 | 6 | `0xbobagwcea` → Morpho Blue | 100 USDC → vault shares | + +**The agent never appears as a holder in any row.** + +--- + +## Diagram + +``` + ┌─────────────────────────────────────────┐ + STAGE 1 intent │ Bob: "best stablecoin yield, 100 USDC" │ + (off-chain) └──────────────────┬──────────────────────┘ + │ NEW wallet or EXISTING? ← v3 choice + │ derive addresses · compose mandate + ▼ + ┌───────────────────┐ + │ Bob approves │ ← last human decision + │ ONE SIGNATURE │ + └─────────┬─────────┘ +═══════ ETHEREUM ═══════════════════════════════════════│═══════════════════════════════ + STAGE 2 ▼ + 0xbob ──────100 USDC──────▶ UniversalGateway ────[LOCKED in Vault] + │ emit UniversalTx +═══════ PUSH CHAIN ═════════════════════│═══════════════════════════════════════════════ + STAGE 3 ▼ + Universal Validators ──vote──▶ quorum ──▶ x/uexecutor + │ + ┌─────────────────────────────────────┘ + ▼ + deploy 0xbobuea + mint 100 pUSDC + credit gas + │ + │ ONE ATOMIC MULTICALL + ├──1─▶ AGWFactory.deployWallet → 0xbobagw (owner baked in) + │ └─ factory calls initializeAccount() → SmartSession installed + │ NO executor module · NO hook · NO fallback + ├──2─▶ 🔑 grantMandate — salt from grantNonce, shape enforced + │ UCEP: expiry · asset · caps · allow-list · expectedCEA + ├──3─▶ 💰 100 pUSDC ──▶ 0xbobagw + └──4─▶ ⛽ PC ──▶ 0xbobagw (pays its own outbound gas swap) + + STAGE 4 agent researches off-chain · composes 4 nested layers · signs opHash + │ + STAGE 5 ▼ + anyone relays ──▶ 0xbobagw.executeWithSession(...) + │ + ┌───────────┴────────────────────────┐ + │ WALLET: expiry · validator · nonce │ + │ · opHash · build userOp │ + ├────────────────────────────────────┤ + │ UCEP: 16 gates, fail closed │ + │ gateway only · asset · caps │ + │ recipient EMPTY · refund → wallet │ + │ ≤10 entries · NOT the CEA │ + │ allow-list · beneficiary == CEA │ + ├────────────────────────────────────┤ + │ SIGNATURE CHECKED LAST │ + └───────────┬────────────────────────┘ + ▼ + UniversalGatewayPC.sendUniversalTxOutbound + 💰 BURN 100 pUSDC (msg.sender = 0xbobagw) + │ + Universal Validators ──▶ DKLS23 TSS signature +═══════ ETHEREUM ═══════════════│═══════════════════════════════════════════════════════ + STAGE 6 ▼ + Vault.finalizeUniversalTx(pushAccount = 0xbobagw) + ├─▶ deploy 0xbobagwcea (first contact) + ├─▶ 💰 100 USDC ──▶ 0xbobagwcea + └─▶ CEA multicall: approve + supply + │ + ┌───────────────▼────────────────┐ + │ MORPHO BLUE │ + │ msg.sender = 0xbobagwcea │ + │ shares → 0xbobagwcea │ + │ the agent appears NOWHERE │ + └────────────────────────────────┘ +``` + +--- \ No newline at end of file diff --git a/plan/agw/notion/agw-address-book-donut-2026-09-04.md b/plan/agw/notion/agw-address-book-donut-2026-09-04.md new file mode 100644 index 00000000..8ef60404 --- /dev/null +++ b/plan/agw/notion/agw-address-book-donut-2026-09-04.md @@ -0,0 +1,30 @@ +# AGW Address Book - PC Donut + +## Contracts we deploy + +| Contract | Address | Size | Verified | +| --- | --- | --- | --- | +| **`factoryProxy`** — **use this one** | [`0xF1A131571f89fD06890576e6cD0154114ACBBc8b`](https://donut.push.network/address/0xF1A131571f89fD06890576e6cD0154114ACBBc8b) | — | ✅ | +| `factoryLogic` (AGWFactory) | [`0x4b1dC2bcF9de73d60e7c38E864730866439A368F`](https://donut.push.network/address/0x4b1dC2bcF9de73d60e7c38E864730866439A368F) | 8,300 | ✅ | +| `walletImplementation` (PushAgentWallet) | [`0x959ED7f6943bdd56B3a359BAE0115fef4aa07e17`](https://donut.push.network/address/0x959ED7f6943bdd56B3a359BAE0115fef4aa07e17) | 10,515 | ✅ | +| `ucep` (UCEP) | [`0x79F07D379BdC26468E48025a61bC955909522c1D`](https://donut.push.network/address/0x79F07D379BdC26468E48025a61bC955909522c1D) | 6,833 | ✅ | +| `sessionValidator` (PushSessionValidator) | [`0x5A59a5Ac94d5190553821307F98e4673BF3c4a1D`](https://donut.push.network/address/0x5A59a5Ac94d5190553821307F98e4673BF3c4a1D) | 1,720 | ✅ | +| `sessionEngine` (SmartSession, fork `7dc20e4`) | [`0x7540f9a59693d51CFB4A3727141eAE4836F96749`](https://donut.push.network/address/0x7540f9a59693d51CFB4A3727141eAE4836F96749) | 22,581 | ✅ | + +## External dependencies — not deployed by this repo + +| Dependency | Address | Used by | Verified | +| --- | --- | --- | --- | +| `universalGateway` | [`0x00000000000000000000000000000000000000C1`](https://donut.push.network/address/0x00000000000000000000000000000000000000C1) | UCEP, wallet | ✅ | +| `universalExecutorModule` | [`0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7`](https://donut.push.network/address/0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7) | UCEP | ⚠️ no code | +| `ed25519Precompile` | `0xEC00000000000000000000000000000000000001` | validator | ✅ | + +## Admin + +| Deployer | `0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7` | +| --- | --- | +| Factory default admin | `0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7` (deployer) | +| Admin transfer delay | 172,800 s (2 days) | +| Paused | no | + +## \ No newline at end of file diff --git a/plan/agw/notion/agw-presets-proposal-and-rules.md b/plan/agw/notion/agw-presets-proposal-and-rules.md new file mode 100644 index 00000000..711941e6 --- /dev/null +++ b/plan/agw/notion/agw-presets-proposal-and-rules.md @@ -0,0 +1,291 @@ +# AGW Presets: proposal and rules + +Presets are ready-made rule sets for `client.agentic.create`: pick a category, add an agent, a token budget and an expiry, and get one `Rule` per chain that already names the right contracts, calls and pins. The wallet UI and developers read the same presets from `PushChain.utils.agentic.presets`. + +This doc proposes the first preset list, the allowed calls and pins per app, and the contract and SDK changes the rest depends on. It extends page 5 (SDK: AGW), section 7. + +- Addresses: read from each protocol's deployment files or docs on 2026-10-13 (Sources at the end). Three carry caveats, listed in section 11, item 12. + +# Prerequisites + +> +> +> +> [7. Changes proposed on 12 Oct 2026: Presets](https://app.notion.com/p/7-Changes-proposed-on-12-Oct-2026-Presets-07ce163677ef44dfae03a38ea4c16da0?pvs=21) +> +> Contract source, what the rules policy checks today: [push-agentic-wallets, branch demo-v2](https://github.com/pushchain/push-agentic-wallets/tree/demo-v2/src), `src/libraries/Types.sol` (the rule shapes) and `src/policies/UniversalRulesPolicy.sol` (the gates); URP 3.1.0, the version on Donut +> +> [https://www.figma.com/design/FvJL0JWHlsVohsHTERB1Lh/Push-Design-Foundations?node-id=50458-26112&t=GpO3AVzquTow00Gj-0](https://www.figma.com/design/FvJL0JWHlsVohsHTERB1Lh/Push-Design-Foundations?node-id=50458-26112&t=GpO3AVzquTow00Gj-0) +> + +![image.png](AGW%20Presets%20proposal%20and%20rules/image.png) + +# Categories + +Custom is always open: a user can write any rule by hand in `client.agentic.create`, so a category left out here is not blocked, only not pre-filled. Presets are shortcuts for the common cases. + +**Factors a category must pass to be a preset** + +1. **Fixed strategy, user fills the blanks.** The preset picks the contracts and functions. The user picks the agent, fn params. If the user would have to pick the contracts too, it is Custom. +2. **The receiver can be locked to the wallet.** Every call that moves funds has a "to" argument we can pin. Aggregators, order books and Universal Router hide it inside a bytes blob, so they are out. +3. **Popular.** Top apps by volume or TVL. + +| Category | In v1? | Why | +| --- | --- | --- | +| DEXES | Yes | Swaps on routers with the recipient at a fixed position, 2 to 3 routers. The user names the tokens, the preset pins them (section 7) | +| LENDING | Yes | Supply, withdraw, borrow, repay on 2 to 3 money markets, with the position owner pinned to the wallet | +| STAKING | Yes | Liquid staking and restaking. Pins well: the receipt token goes to `msg.sender`, and the native coin sent is capped per call by `maxValue` | +| VAULTS | No, next | ERC-4626 `deposit`, `withdraw`, `redeem` with the receiver pinned; the most pinnable category. Needs the vault list first | +| PREDICTION | No | The live venues (Polymarket, Kalshi, Limitless) are order books: the user signs an order off-chain and an operator fills it, and a rule allows contract calls, not signed orders. The on-chain AMM-style markets have no volume. Constant ships empty, hidden by the UI | +| PERPS | No | Dynamic order structs (GMX, Drift), so the receiver cannot be pinned; leverage makes the loss case worse | +| AGGREGATORS | No | 1inch, 0x, Paraswap: dynamic calldata by design, nothing to pin. Jupiter `route` on Solana is the exception (user accounts at fixed positions, amounts pinnable from the end of the data) and sits in DEXES as a candidate | +| NFT MARKETS | No | Dynamic order structs (Seaport, Magic Eden) | +| BRIDGES | No | The recipient is on another chain; the AGW already moves funds across chains through Push | +| LAUNCHPADS | No | pump.fun pins fine, but it is the DEXES risk with worse odds | +| PAYMENTS | No, later | ERC-20 `transfer(address,uint256)` and SPL transfer with the recipient pinned to addresses the user passes as a parameter. Pins well and loss is bounded; left out of v1 only because agent payments (vendors, subscriptions) are not a demo case yet. GOVERNANCE (`castVote`, `delegate`) is the same shape with no funds moving and little demand | + +# Chains in scope + + + +| Chain | Mainnet | Testnet | +| --- | --- | --- | +| Ethereum | eip155:1 | Sepolia, eip155:11155111 | +| Base | eip155:8453 | Base Sepolia, eip155:84532 | +| Arbitrum | eip155:42161 | Arbitrum Sepolia, eip155:421614 | +| BNB Chain | eip155:56 | BSC testnet, eip155:97 | +| Solana | mainnet-beta | devnet | + +# DEXES + +One rule per chain, two or three routers per chain, single-hop and `address[]`-path swaps only. Every swap pins its recipient to the wallet. An app's calls are the same on every chain it is listed for; addresses are in section 6. + +| App | Chains | Allowed call | Pin | +| --- | --- | --- | --- | +| Uniswap V3 SwapRouter02 | Ethereum, Base, Arbitrum, BNB | `exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))` | `[0,3]` = WALLET (word 3); `[0,0]` = tokenIn, `[0,1]` = tokenOut from the user's list (after page 1, 6.3) | +| Uniswap V3 SwapRouter02 | same | `exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))` | `[0,3]` = WALLET; `[0,0]` and `[0,1]` = the user's tokens (after 6.3) | +| Uniswap V3 SwapRouter02 | same | `swapExactTokensForTokens(uint256,uint256,address[],address)` (V2 pools through the same router) | `3` = WALLET (word 3); tokens sit inside `path`, not pinnable | +| Uniswap V2 Router02 | Ethereum | `swapExactTokensForTokens(uint256,uint256,address[],address,uint256)` | `3` = WALLET (word 3); tokens not pinnable | +| Uniswap V2 Router02 | Ethereum | `swapTokensForExactTokens(uint256,uint256,address[],address,uint256)` | `3` = WALLET (word 3); tokens not pinnable | +| Curve Router NG | Ethereum | `exchange(address[11],uint256[5][5],uint256,uint256,address[5],address)` | `5` = WALLET (word 43, fixed arrays inlined); `[0,0]` = tokenIn pinnable, tokenOut sits at a variable position in `route`, not pinnable | +| Aerodrome Router | Base | `swapExactTokensForTokens(uint256,uint256,(address,address,bool,address)[],address,uint256)` | `3` = WALLET (word 3); tokens sit inside `routes`, not pinnable | +| Aerodrome Slipstream SwapRouter | Base | `exactInputSingle((address,address,int24,address,uint256,uint256,uint256,uint160))` | `[0,3]` = WALLET; `[0,0]` and `[0,1]` = the user's tokens (after 6.3) | +| Aerodrome Slipstream SwapRouter | Base | `exactOutputSingle((address,address,int24,address,uint256,uint256,uint256,uint160))` | `[0,3]` = WALLET; `[0,0]` and `[0,1]` = the user's tokens (after 6.3) | +| PancakeSwap V3 SmartRouter | Arbitrum, BNB | `exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))` | `[0,3]` = WALLET; `[0,0]` and `[0,1]` = the user's tokens (after 6.3) | +| PancakeSwap V3 SmartRouter | same | `exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))` | `[0,3]` = WALLET; `[0,0]` and `[0,1]` = the user's tokens (after 6.3) | +| PancakeSwap V3 SmartRouter | same | `swapExactTokensForTokens(uint256,uint256,address[],address)` | `3` = WALLET (word 3); tokens not pinnable | +| PancakeSwap V2 Router02 | BNB | `swapExactTokensForTokens(uint256,uint256,address[],address,uint256)` | `3` = WALLET (word 3); tokens not pinnable | +| PancakeSwap V2 Router02 | BNB | `swapTokensForExactTokens(uint256,uint256,address[],address,uint256)` | `3` = WALLET (word 3); tokens not pinnable | +| Camelot V3 SwapRouter | Arbitrum | `exactInputSingle((address,address,address,uint256,uint256,uint256,uint160))` (Algebra: recipient is field 2) | `[0,2]` = WALLET (word 2); `[0,0]` and `[0,1]` = the user's tokens (after 6.3) | +| Camelot V3 SwapRouter | Arbitrum | `exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))` | `[0,3]` = WALLET (word 3); `[0,0]` and `[0,1]` = the user's tokens (after 6.3) | +| Raydium CPMM | Solana | `swap_base_input(u64,u64)`, discriminator `8fbe5adac41e33de`; 13 accounts, `maxAccounts` 13 | account 0 = WALLET; account 5 = WALLET ATA(output mint); data pin: min-out ratio on `(amount_in, minimum_amount_out)` | +| Raydium CPMM | Solana | `swap_base_output(u64,u64)`, discriminator `37d96256a34ab4ad` | same | +| Orca Whirlpool | Solana | `swap(u64,u64,u128,bool,bool)`, discriminator `f8c69e91e17587c8`; 11 accounts plus trailing, `maxAccounts` 0 | account 1 = WALLET; accounts 3 and 5 = WALLET ATA(mint A), WALLET ATA(mint B); data pin: `a_to_b` EQ and the min-out ratio | +| Raydium AMM V4 | Solana | `swapBaseIn(u64,u64)`, 1-byte tag 9; `maxAccounts` 17 | account 16 = WALLET; account 15 = WALLET ATA(output mint); min-out ratio | +| Jupiter v6 (candidate) | Solana | `route(Vec,u64,u64,u16,u8)`, discriminator `e517cb977ae3ad2a`; pools as trailing accounts, `maxAccounts` 0 | account 1 = WALLET; account 3 = WALLET ATA(output mint); amounts pinned from the end of `ix_data` (`fromEnd`), since Borsh writes the vector first | +- Token pins: only the struct-based single-hop calls (`exactInputSingle`, `exactOutputSingle`) can carry them, since `tokenIn` and `tokenOut` are static fields at words 0 and 1. The path-based calls keep the tokens inside a dynamic array, so once 6.3 lands and the user's token list is enforced, the path rows should be dropped or kept with the warning in section 7. Until 6.3 none of the EVM token pins is checked. +- Out on EVM: `exactInput` and `exactOutput` (recipient inside a struct with `bytes path`), Universal Router `execute`, `multicall`, Curve's four- and five-argument `exchange` overloads. +- Solana: the SVM rulebook already exists in the demo-v2 source. An account pin names one key from `ceaAccounts`, so a swap rule allows one output mint; `maxAccounts` 0 admits the trailing tick, bin and pool accounts Orca, Meteora and Jupiter need; the `RATIO_GTE_LE` data pin enforces a minimum output relative to the input. Jupiter `route` is therefore a candidate, to confirm against the program (`shared_accounts_route` uses program-owned intermediates and stays out). Orca, Raydium CLMM and Meteora share the `swap` discriminator `f8c69e91e17587c8`; a rule keys on program and discriminator. + +# LENDING + +Supply, withdraw, borrow and repay on two or three money markets per chain. Every position is the wallet's: the call acts on `msg.sender` (Compound-style markets, where the CEA is the sender) or pins `onBehalfOf` on the way in and `to` or `receiver` on the way out. Solana is supply and withdraw only. + +| App | Chains | Allowed call | Pin | +| --- | --- | --- | --- | +| Aave V3 Pool | Ethereum, Base, Arbitrum, BNB | `supply(address,uint256,address,uint16)` | `2` = WALLET (onBehalfOf, word 2) | +| Aave V3 Pool | same | `withdraw(address,uint256,address)` | `2` = WALLET (to, word 2) | +| Aave V3 Pool | same | `borrow(address,uint256,uint256,uint16,address)` | `4` = WALLET (onBehalfOf, word 4) | +| Aave V3 Pool | same | `repay(address,uint256,uint256,address)` | `3` = WALLET (onBehalfOf, word 3) | +| Compound V3 Comet (cUSDCv3, cWETHv3) | Ethereum, Arbitrum | `supply(address,uint256)` | none; credits `msg.sender` | +| Compound V3 Comet | same | `withdraw(address,uint256)` | none; pays `msg.sender`. Withdrawing the base asset beyond the balance opens a borrow | +| Morpho Blue | Ethereum, Base, Arbitrum | `supply((address,address,address,address,uint256),uint256,uint256,address,bytes)` | `3` = WALLET (onBehalf, word 7) | +| Morpho Blue | same | `supplyCollateral((address,address,address,address,uint256),uint256,address,bytes)` | `2` = WALLET (onBehalf, word 6) | +| Morpho Blue | same | `withdraw((address,address,address,address,uint256),uint256,uint256,address,address)` | `4` = WALLET (receiver, word 8) | +| Morpho Blue | same | `withdrawCollateral((address,address,address,address,uint256),uint256,address,address)` | `3` = WALLET (receiver, word 7) | +| Morpho Blue | same | `borrow((address,address,address,address,uint256),uint256,uint256,address,address)` | `4` = WALLET (receiver, word 8) | +| Morpho Blue | same | `repay((address,address,address,address,uint256),uint256,uint256,address,bytes)` | `3` = WALLET (onBehalf, word 7) | +| Lista Moolah | BNB | the six Morpho Blue calls, same signatures and selectors | as Morpho Blue | +| Moonwell (mUSDC, mWETH) | Base | `mint(uint256)`, `redeem(uint256)`, `redeemUnderlying(uint256)`, `borrow(uint256)`, `repayBorrow(uint256)` | none; every call acts on `msg.sender` | +| Moonwell Comptroller | Base | `enterMarkets(address[])` | none; needed once before borrowing against a market | +| Venus (vUSDT, vUSDC) | BNB | the same five calls as Moonwell | none | +| Venus Unitroller | BNB | `enterMarkets(address[])` | none | +| Kamino Lend | Solana | `deposit_reserve_liquidity(u64)`, discriminator `a9c91e7e06cd6644`; owner 0, reserve liquidity mint 4, reserve collateral mint 6, user source 7, user destination 8 | account 0 = WALLET; account 8 = WALLET ATA(collateral mint at account 6); `maxAccounts` 12 | +| Kamino Lend | Solana | `redeem_reserve_collateral(u64)`, discriminator `ea75b57db98edc1d`; user source 7, user destination 8 | account 0 = WALLET; account 8 = WALLET ATA(liquidity mint at account 4) | +| Jupiter Lend (Earn) | Solana | `deposit(u64)`, discriminator `f223c68952e1f2b6`; signer 0, depositor token account 1, recipient token account 2 | account 0 = WALLET; account 2 = WALLET ATA(fToken mint); `maxAccounts` 17 | +| Jupiter Lend (Earn) | Solana | `withdraw(u64)`, discriminator `b712469c946da122`; signer 0, owner token account 1, recipient 2 | account 0 = WALLET; account 2 = WALLET ATA(underlying mint); `maxAccounts` 18 | + +# PREDICTION, venue by venue + +Every live venue on the five chains, plus Polymarket for reference. "Signed order" means the user signs an EIP-712 order off-chain and an operator-only `matchOrders` settles it: nothing for a rule to allow. + +| Venue | Chain | How a trade happens | Fits a rule? | 30-day volume | +| --- | --- | --- | --- | --- | +| PancakeSwap Prediction | BNB (BNB, BTC, ETH markets), Arbitrum (ETH) | Direct call: `betBull(uint256)` and `betBear(uint256)` payable, stake is the value, `claim(uint256[])`; position = `msg.sender` | Yes: one static argument, stake capped by `maxValue` | $7.8M | +| Predict.fun (absorbed Probable, March 2026) | BNB | Signed order, operator `matchOrders`; CTF `splitPosition`, `mergePositions`, `redeemPositions` are direct | No for trading; mint and redeem only | $314M | +| Opinion | BNB | Signed order ("OPINION CTF Exchange"), positions held in a Safe; CTF `0xAD1a38cEc043e70E83a3eC30443dB285ED10D774` | No for trading | $274M | +| Limitless | Base | Order book for new markets; legacy Gnosis FPMM markets still live: `buy(uint256,uint256,uint256)`, `sell(uint256,uint256,uint256)`, buyer = `msg.sender`; CTF `0xC9c98965297Bc527861c898329Ee280632B76e18` | Partial: the AMM calls fit, but each market is its own contract and the volume is in the order book | $4.9M | +| Overtime (Thales) SportsAMMV2 | Arbitrum, Base, Optimism | Direct call `trade(TradeData[],uint256,uint256,uint256,address,address,bool)`, ticket to `msg.sender` | Weak: the bet is a dynamic `TradeData[]` (odds, merkle proofs) a rule cannot read; only the stake at word 1 and the collateral at word 5 are pinnable | $7.6M (Arbitrum $2.3M, Base $1.4M) | +| Azuro | Base (Arbitrum dead since 2023) | v3: bettor signature plus oracle signature, relayer calls `betFor`; v2 `bet` carries `bytes data` | No | $2.8M (Base $96k) | +| Polymarket (reference) | Polygon only; the Jupiter tie-up is a front end | Signed order, `CTFExchangeV2.matchOrders` is `onlyOperator`; NegRiskAdapter split, merge, redeem are direct | No, and not on a chain in scope | $5.2B | +| Jupiter Predict (Polymarket and Kalshi liquidity) | Solana | Jupiter's API returns an unsigned transaction; a keeper fills on the underlying market; program id not published | No: keeper front end, program unverified | not listed | +| Drift BET | Solana | Perp orders: `place_perp_order(OrderParams)` with Borsh `Option` fields, many remaining accounts | No: variable-length arguments | not broken out | +| Augur, Gnosis v1 and every Ethereum L1 market | Ethereum | AMM-style, direct calls | Would fit, but dead | $0 | + +Out of scope by chain: Myriad (Abstract, Linea), XO Market (own rollup), Kalshi (off-chain). Sport.fun on Base ($4.8M) publishes no contracts. To open the big venues, the wallet's CEA would have to sign orders under a rule (ERC-1271, with maker, assets and amounts pinned): + +# STAKING + +| App | Chains | Allowed call | Pin | +| --- | --- | --- | --- | +| Lido stETH | Ethereum | `submit(address)` payable | none; stETH to `msg.sender` (the referral may be pinned to 0) | +| Lido wstETH | Ethereum | `wrap(uint256)`, `unwrap(uint256)` | none | +| Lido WithdrawalQueue | Ethereum | `requestWithdrawals(uint256[],address)` | `1` = WALLET (owner, word 1) | +| Lido WithdrawalQueue | Ethereum | `claimWithdrawals(uint256[],uint256[])`, `claimWithdrawal(uint256)` | none; owner must be `msg.sender`, ETH paid to `msg.sender` | +| Rocket Pool DepositPool | Ethereum | `deposit()` payable | none; rETH to `msg.sender` | +| Rocket Pool rETH | Ethereum | `burn(uint256)` | none; ETH to `msg.sender` | +| ether.fi LiquidityPool | Ethereum | `deposit()` payable, `deposit(address)` payable | none; eETH to `msg.sender` | +| ether.fi weETH | Ethereum | `wrap(uint256)`, `unwrap(uint256)` | none | +| ether.fi LiquidityPool | Ethereum | `requestWithdraw(address,uint256)` | `0` = WALLET (recipient, word 0) | +| ether.fi WithdrawRequestNFT | Ethereum | `claimWithdraw(uint256)` | none; ETH to the NFT's owner | +| EigenLayer StrategyManager | Ethereum | `depositIntoStrategy(address,address,uint256)` | none needed (shares to `msg.sender`); optional `0` = strategy and `1` = token to lock the pair | +| EigenLayer DelegationManager | Ethereum | `queueWithdrawals(...)`, `completeQueuedWithdrawal(...)` | none; withdrawer is forced to `msg.sender`, assets go to the staker | +| Lista StakeManager | BNB | `deposit()` payable | none; slisBNB to `msg.sender` | +| Lista StakeManager | BNB | `requestWithdraw(uint256)`, `claimWithdraw(uint256)` | none; BNB to `msg.sender` | +| BNB StakeHub (native) | BNB | `delegate(address,bool)` payable | `0` = validator, a user parameter; credit to `msg.sender` | +| BNB StakeHub (native) | BNB | `undelegate(address,uint256)`, `claim(address,uint256)` | `0` = the same validator | +| Jito (SPL stake pool) | Solana | `DepositSol(u64)`, tag 14; 10 accounts | 0 = Jito pool; 3 (lamports source) = WALLET; 4 = WALLET ATA(JitoSOL); 6 (referrer fee) = the same account; `maxAccounts` 10 | +| Jito (SPL stake pool) | Solana | `WithdrawSol(u64)`, tag 16; 12 accounts | 0 = Jito pool; 2 (authority) = WALLET; 3 = WALLET ATA(JitoSOL); 5 (SOL destination) = WALLET; `maxAccounts` 12 | +| Marinade | Solana | `deposit(u64)`, discriminator `f223c68952e1f2b6`; 11 accounts, none remaining | 6 (transfer_from) = WALLET; 7 (mint_to) = WALLET ATA(mSOL); `maxAccounts` 11 | +| Marinade | Solana | `liquid_unstake(u64)`, discriminator `1e1e77f0bfe30c10`; 10 accounts | 5 = WALLET ATA(mSOL); 6 (authority) = WALLET; 7 (transfer_sol_to) = WALLET; `maxAccounts` 10 | +- Out: Lido `claimWithdrawalsTo(uint256[],uint256[],address)` (names another recipient); Stader BNBx (deposits disabled 29 Jan 2026, protocol sunset); Marinade `order_unstake` (needs a fresh ticket account per call); Jito restaking `mint_to` (takes an SPL token in, so it belongs with VAULTS). +- Approvals: `wrap`, `requestWithdrawals`, `requestWithdraw`, `depositIntoStrategy` and Lista `requestWithdraw` pull a token from the wallet. Covered by scoped approval (section 8, item 3). +- Rocket Pool's deposit pool address changes on upgrades (the Saturn release deployed a new one in 2026 and the old one reverts on `deposit()`). The SDK should resolve it from `RocketStorage.getAddress(keccak256("contract.addressrocketDepositPool"))` at release time rather than hard-code it. +- `deposit()` has the same selector on Rocket Pool, ether.fi and WETH, and `wrap` and `unwrap` the same on wstETH and weETH; rules key on target plus selector, so no clash. +- Jito's `DepositSol` requires the pool to have been updated this epoch. BlazeStake, vSOL and the Sanctum pools use the same program and instruction, so adding one is a pool address. The StakeHub validator is a user parameter (categories, factor 1). + +# Addresses + +Read from each protocol's deployment files or docs. + +"none" means no official testnet deployment was found. + + + +### DEXES + +| App | Chain | Mainnet | Testnet | +| --- | --- | --- | --- | +| Uniswap V3 SwapRouter02 | Ethereum | `0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45` | `0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E` | +| Uniswap V3 SwapRouter02 | Base | `0x2626664c2603336E57B271c5C0b26F421741e481` | `0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4` | +| Uniswap V3 SwapRouter02 | Arbitrum | `0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45` | `0x101F443B4d1b059569D643917553c771E1b9663E` | +| Uniswap V3 SwapRouter02 | BNB | `0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2` | none | +| Uniswap V2 Router02 | Ethereum | `0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D` | `0xeE567Fe1712Faf6149d80dA1E6934E354124CfE3` | +| Curve Router NG v1.2 | Ethereum | `0x45312ea0eFf7E09C83CBE249fa1d7598c4C8cd4e` | none | +| Aerodrome Router | Base | `0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43` | none | +| Aerodrome Slipstream SwapRouter | Base | `0x698Cb2b6dd822994581fEa6eA4Fc755d1363A92F` | none | +| PancakeSwap V3 SmartRouter | Arbitrum | `0x32226588378236Fd0c7c4053999F88aC0e5cAc77` | none | +| PancakeSwap V3 SmartRouter | BNB | `0x13f4EA83D0bd40E75C8222255bc855a974568Dd4` | `0x9a489505a00cE272eAa5e07Dba6491314CaE3796` | +| PancakeSwap V2 Router02 | BNB | `0x10ED43C718714eb63d5aA57B78B54704E256024E` | `0xD99D1c33F9fC3444f8101754aBC46c52416550D1` | +| Camelot V3 SwapRouter | Arbitrum | `0x1F721E2E82F6676FCE4eA07A5958cF098D339e18` | none | +| Raydium CPMM | Solana | `CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C` | `DRaycpLY18LhpbydsBWbVJtxpNv9oXPgjRSfpF2bWpYb` | +| Orca Whirlpool | Solana | `whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc` | same id | +| Raydium AMM V4 | Solana | `675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8` | `DRaya7Kj3aMWQSy19kSjvmuwq9docCHofyP9kanQGaav` | + +### LENDING + +| App | Chain | Mainnet | Testnet | +| --- | --- | --- | --- | +| Aave V3 Pool | Ethereum | `0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2` | `0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951` | +| Aave V3 Pool | Base | `0xA238Dd80C259a72e81d7e4664a9801593F98d1c5` | `0x8bAB6d1b75f19e9eD9fCe8b9BD338844fF79aE27` | +| Aave V3 Pool | Arbitrum | `0x794a61358D6845594F94dc1DB02A252b5b4814aD` | `0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff` | +| Aave V3 Pool | BNB | `0x6807dc923806fE8Fd134338EABCA509979a7e0cB` | none | +| Compound V3 cUSDCv3 | Ethereum | `0xc3d688B66703497DAA19211EEdff47f25384cdc3` | `0xAec1F48e02Cfb822Be958B68C7957156EB3F0b6e`, unmaintained since June 2026 | +| Compound V3 cWETHv3 | Ethereum | `0xA17581A9E3356d9A858b789D68B4d866e593aE94` | none | +| Compound V3 cUSDCv3 | Arbitrum | `0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf` | none | +| Compound V3 cWETHv3 | Arbitrum | `0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486` | none | +| Morpho Blue | Ethereum | `0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb` | none | +| Morpho Blue | Base | `0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb` | unconfirmed by Morpho's own sources | +| Morpho Blue | Arbitrum | `0x6c247b1F6182318877311737BaC0844bAa518F5e` | none | +| Lista Moolah | BNB | `0x8F73b65B4caAf64FBA2aF91cC5D4a2A1318E5D8C` | none | +| Moonwell mUSDC | Base | `0xEdc817A28E8B93B03976FBd4a3dDBc9f7D176c22` | mUSDbC `0x876852425331a113d8E432eFFB3aC5BEf38f033a` | +| Moonwell mWETH | Base | `0x628ff693426583D9a7FB391E54366292F509D457` | `0x2F39a349A79492a70E152760ce7123A1933eCf28` | +| Moonwell Comptroller | Base | `0xfBb21d0380beE3312B33c4353c8936a0F13EF26C` | `0xC72ba45f2Ae134F21DAEb2b7B5fd5De0064Ee9bB` | +| Venus vUSDT | BNB | `0xfD5840Cd36d94D7229439859C0112a4185BC0255` | `0xb7526572FFE56AB9D7489838Bf2E18e3323b441A` | +| Venus vUSDC | BNB | `0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8` | `0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7` | +| Venus Unitroller | BNB | `0xfD36E2c2a6789Db23113685031d7F16329158384` | `0x94d1820b2D1c7c7452A163983Dc888CEC546b77D` | +| Kamino Lend | Solana | `KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD` | same id | +| Jupiter Lend (Earn) | Solana | `jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9` | `7tjE28izRUjzmxC1QNXnNwcc4N82CNYCexf3k8mw67s3`, stale since May 2025, do not use | + +### STAKING + +Testnets: Hoodi (eip155:560048) for Lido, Rocket Pool and EigenLayer; EigenLayer is also on Sepolia. ether.fi and Lista have no official testnet deployment. + + + +| App | Chain | Mainnet | Testnet | +| --- | --- | --- | --- | +| Lido stETH | Ethereum | `0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84` | Hoodi `0x3508A952176b3c15387C97BE809eaffB1982176a` | +| Lido wstETH | Ethereum | `0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0` | Hoodi `0x7E99eE3C66636DE415D2d7C880938F2f40f94De4` | +| Lido WithdrawalQueue | Ethereum | `0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1` | Hoodi `0xfe56573178f1bcdf53F01A6E9977670dcBBD9186` | +| Rocket Pool RocketStorage | Ethereum | `0x1d8f8f00cfa6758d7bE78336684788Fb0ee0Fa46` | Hoodi `0x594Fb75D3dc2DFa0150Ad03F99F97817747dd4E1` | +| Rocket Pool DepositPool (current) | Ethereum | `0xCE15294273CFb9D9b628F4D61636623decDF4fdC` | Hoodi `0x425E6f83e27f1676AD78BC39dA79C2C7b33d3Fd8` | +| Rocket Pool rETH | Ethereum | `0xae78736Cd615f374D3085123A210448E74Fc6393` | Hoodi `0x7322c24752f79c05FFD1E2a6FCB97020C1C264F1` | +| ether.fi LiquidityPool | Ethereum | `0x308861A430be4cce5502d0A12724771Fc6DaF216` | none | +| ether.fi weETH | Ethereum | `0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee` | none | +| ether.fi WithdrawRequestNFT | Ethereum | `0x7d5706f6ef3F89B3951E23e557CDFBC3239D4E2c` | none | +| EigenLayer StrategyManager | Ethereum | `0x858646372CC42E1A627fcE94aa7A7033e7CF075A` | Hoodi `0xeE45e76ddbEDdA2918b8C7E3035cd37Eab3b5D41`; Sepolia `0x2E3D6c0744b10eb0A4e6F679F71554a39Ec47a5D` | +| EigenLayer DelegationManager | Ethereum | `0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A` | Hoodi `0x867837a9722C512e0862d8c2E15b8bE220E8b87d`; Sepolia `0xD4A7E1Bd8015057293f0D0A557088c286942e84b` | +| EigenLayer stETH strategy | Ethereum | `0x93c4b944D05dfe6df7645A86cd2206016c51564D` | Hoodi `0xf8a1a66130d614c7360e868576d5e59203475fe0` | +| Lista StakeManager | BNB | `0x1adB950d8bB3dA4bE104211D5AB038628e477fE6` | none published | +| Lista slisBNB | BNB | `0xB0b84D294e0C75A6abe60171b70edEb2EFd14A1B` | unverified | +| BNB StakeHub | BNB | `0x0000000000000000000000000000000000002002` | same (system contract) | +| SPL stake pool program (Jito) | Solana | `SPoo1Ku8WFXoNDMHPsrGSTSG1Y47rzgn41SLUNakuHy` | devnet build `DPoo15wWDqpPJJtS2MUZ49aRxqz5ZaaJCJP4z8bLuib` | +| Jito pool, JitoSOL mint | Solana | `Jito4APyf642JPZPx3hGc6WWJ8zPKtRbRs4P815Awbb`, `J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn` | `JitoY5pcAxWX6iyP2QdFwTznGb8A99PRCUCVVxB46WZ`, `J1tos8mqbhdGcF3pgj4PCKyVjzWSURcpLZU7pPGHxSYi` | +| Marinade program | Solana | `MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD` | same id | +| Marinade state, mSOL mint | Solana | `8szGkuLTAux9XMgZ2vtY39jVSowEcpBfFfD8hXSEqdGC`, `mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So` | state not documented for devnet; mint the same | + +# Open questions and decisions needed + +1. **Approvals.** Scoped approval in URP, or one spender per token per rule for v1, which means one app per chain per preset and an allowance that outlives the rule? (Rules policy owner) +2. **Output tokens.** Until page 1, 6.3 lands no token pin is checked on EVM, and a pin holds one value. Ship DEXES with one output token per rule, or ship LENDING first and DEXES after the set pin +3. **One instruction per transaction on Solana.** Blocks every borrow flow (Kamino, Save, MarginFi need refresh instructions in the same transaction) and creating the output token account before a first swap. Relax to one allowed instruction plus instructions from a fixed list (refresh, create token account, compute budget)? (Rules policy owner) +4. **Missing cap.** Should `presets.get` throw when an asset has no `maxTotal`, since a missing cap means zero and the rule would move nothing? + +# Sources + +Deployment files and interfaces opened on 2026-10-13. Where a docs site was unreachable, the protocol's GitHub deployment file or published npm package was used instead. + +- Uniswap: [V3 Ethereum deployments](https://github.com/Uniswap/docs/blob/main/docs/content/protocols/v3/deployments/v3-ethereum-deployments.mdx), [V3 Base deployments](https://developers.uniswap.org/docs/protocols/v3/deployments/v3-base-deployments), [V3 Arbitrum deployments](https://developers.uniswap.org/docs/protocols/v3/deployments/v3-arbitrum-deployments.md), [sdk-core addresses](https://raw.githubusercontent.com/Uniswap/sdks/main/sdks/sdk-core/src/addresses.ts), [IV3SwapRouter](https://raw.githubusercontent.com/Uniswap/swap-router-contracts/main/contracts/interfaces/IV3SwapRouter.sol), [IV2SwapRouter](https://raw.githubusercontent.com/Uniswap/swap-router-contracts/main/contracts/interfaces/IV2SwapRouter.sol), [IUniswapV2Router02](https://raw.githubusercontent.com/Uniswap/v2-periphery/master/contracts/interfaces/IUniswapV2Router02.sol) +- Curve: [curve-router-ng](https://raw.githubusercontent.com/curvefi/curve-router-ng/master/README.md), [deployed contracts](https://raw.githubusercontent.com/CurveDocs/curve-docs/master/docs/references/deployed-contracts.md) +- Aerodrome: [contracts README](https://raw.githubusercontent.com/aerodrome-finance/contracts/main/README.md), [IRouter](https://raw.githubusercontent.com/aerodrome-finance/contracts/main/contracts/interfaces/IRouter.sol), [Slipstream README](https://raw.githubusercontent.com/aerodrome-finance/slipstream/main/README.md), [Slipstream ISwapRouter](https://raw.githubusercontent.com/aerodrome-finance/slipstream/main/contracts/periphery/interfaces/ISwapRouter.sol) +- PancakeSwap: [v3 addresses](https://raw.githubusercontent.com/pancakeswap/pancake-developer/master/docs/pages/contracts/v3/addresses.md), [v3-periphery deployments](https://raw.githubusercontent.com/pancakeswap/pancake-v3-contracts/main/projects/v3-periphery/deployments/bscMainnet.json), [IPancakeRouter02](https://raw.githubusercontent.com/pancakeswap/pancake-swap-periphery/master/contracts/interfaces/IPancakeRouter02.sol), npm `@pancakeswap/smart-router@7.8.0` +- Camelot: [Algebra V1.9 ISwapRouter](https://raw.githubusercontent.com/cryptoalgebra/AlgebraV1.9/main/src/periphery/contracts/interfaces/ISwapRouter.sol), [verified source mirror, Router v3](https://www.codeslaw.app/contracts/arbitrum/0x1f721e2e82f6676fce4ea07a5958cf098d339e18) +- Aave: [address book, Ethereum](https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3Ethereum.sol), [Sepolia](https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3Sepolia.sol), [Base](https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3Base.sol), [Base Sepolia](https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3BaseSepolia.sol), [Arbitrum](https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3Arbitrum.sol), [Arbitrum Sepolia](https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3ArbitrumSepolia.sol), [BNB](https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3BNB.sol), [IPool](https://raw.githubusercontent.com/aave-dao/aave-v3-origin/main/src/contracts/interfaces/IPool.sol) +- Compound V3: [mainnet USDC roots](https://raw.githubusercontent.com/compound-finance/comet/main/deployments/mainnet/usdc/roots.json), [Arbitrum USDC roots](https://raw.githubusercontent.com/compound-finance/comet/main/deployments/arbitrum/usdc/roots.json), [CometMainInterface](https://raw.githubusercontent.com/compound-finance/comet/main/contracts/CometMainInterface.sol) +- Morpho: [IMorpho](https://raw.githubusercontent.com/morpho-org/morpho-blue/main/src/interfaces/IMorpho.sol), [SDK addresses](https://raw.githubusercontent.com/morpho-org/sdks/main/packages/morpho-ts/src/addresses.ts), [docs addresses](https://docs.morpho.org/get-started/resources/addresses/) +- Moonwell: [Base addresses](https://raw.githubusercontent.com/moonwell-fi/moonwell-contracts-v2/main/chains/8453.json), [Base Sepolia addresses](https://raw.githubusercontent.com/moonwell-fi/moonwell-contracts-v2/main/chains/84532.json), [MToken](https://raw.githubusercontent.com/moonwell-fi/moonwell-contracts-v2/main/src/MToken.sol) +- Venus: [mainnet addresses](https://raw.githubusercontent.com/VenusProtocol/venus-protocol/develop/deployments/bscmainnet_addresses.json), [testnet addresses](https://raw.githubusercontent.com/VenusProtocol/venus-protocol/develop/deployments/bsctestnet_addresses.json), [VBep20](https://raw.githubusercontent.com/VenusProtocol/venus-protocol/develop/contracts/Tokens/VTokens/VBep20.sol) +- Lista: [lista-skills](https://raw.githubusercontent.com/lista-dao/lista-skills/main/skills/lista-lending/SKILL.md), npm `@lista-dao/moolah-sdk-core@1.0.12` +- Raydium: [program addresses](https://docs.raydium.io/reference/program-addresses.md), [CPMM IDL](https://github.com/raydium-io/raydium-idl), [AMM V4 instruction.rs](https://raw.githubusercontent.com/raydium-io/raydium-amm/master/program/src/instruction.rs) +- Orca: [whirlpools](https://github.com/orca-so/whirlpools) +- Meteora: [DLMM overview](https://docs.meteora.ag/developer-guide/guides/dlmm/overview), [dlmm-sdk](https://github.com/MeteoraAg/dlmm-sdk) +- Jupiter: [jupiter-cpi IDL](https://raw.githubusercontent.com/jup-ag/jupiter-cpi/main/idl.json), [development basics](https://developers.jup.ag/docs/get-started/development-basics.md), [Lend program addresses](https://developers.jup.ag/docs/lend/program-addresses.md), [jupiter-lend](https://github.com/jup-ag/jupiter-lend) +- Kamino: [klend](https://github.com/Kamino-Finance/klend), [klend-sdk](https://github.com/Kamino-Finance/klend-sdk) +- MarginFi: [marginfi-v2](https://github.com/mrgnlabs/marginfi-v2) +- Save: [token-lending instruction.rs](https://raw.githubusercontent.com/solendprotocol/solana-program-library/master/token-lending/program/src/instruction.rs) +- Volume and TVL: [DefiLlama DEXes, Ethereum](https://defillama.com/dexs/chains/Ethereum), [Base](https://defillama.com/dexs/chains/base), [Arbitrum](https://defillama.com/dexs/chain/arbitrum), [Arbitrum lending](https://defillama.com/protocols/lending/arbitrum), [prediction markets, Ethereum](https://defillama.com/protocols/prediction-market/ethereum), [Polymarket](https://defillama.com/protocol/polymarket) +- Prediction markets: [Drift BET launch](https://www.theblock.co/post/311888/solana-based-drift-protocol-launches-prediction-market), [Jupiter and Polymarket](https://www.coindesk.com/markets/2026/02/02/jupiter-brings-polymarket-to-solana-and-lands-usd35-million-investment-deal), [Jupiter Forecast](https://solanacompass.com/news/jupiter-launches-forecast-solanas-first-native-prediction-market-with-multi-market-maker-quoting) +- Staking: [Lido deployed contracts](https://raw.githubusercontent.com/lidofinance/docs/main/docs/deployed-contracts/index.md), [Lido Hoodi](https://raw.githubusercontent.com/lidofinance/docs/main/docs/deployed-contracts/hoodi.md), [WithdrawalQueue.sol](https://raw.githubusercontent.com/lidofinance/core/master/contracts/0.8.9/WithdrawalQueue.sol), [Rocket Pool contracts](https://raw.githubusercontent.com/rocket-pool/docs.rocketpool.net/main/docs/en/protocol/contracts-integrations.md), [RocketDepositPool.sol](https://raw.githubusercontent.com/rocket-pool/rocketpool/master/contracts/contract/deposit/RocketDepositPool.sol), [ether.fi deployed contracts](https://etherfi.gitbook.io/etherfi/developers/contracts-and-integrations/deployed-contracts), [LiquidityPool.sol](https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/master/src/core/LiquidityPool.sol), [eigenlayer-contracts README](https://raw.githubusercontent.com/Layr-Labs/eigenlayer-contracts/main/README.md), [Lista smart contracts](https://docs.bsc.lista.org/for-developer/liquid-staking-slisbnb/smart-contract.md), [ListaStakeManager.sol](https://raw.githubusercontent.com/lista-dao/synclub-contracts/master/contracts/ListaStakeManager.sol), [BNB staking developer guide](https://docs.bnbchain.org/bnb-smart-chain/staking/developer-guide/), [StakeHub.sol](https://raw.githubusercontent.com/bnb-chain/bsc-genesis-contract/master/contracts/StakeHub.sol), [Stader BNBx sunset](https://www.staderlabs.com/blogs/sunsetting-bnbx-focusing-stader-on-high-impact-ecosystems/), [SPL stake pool instruction.rs](https://raw.githubusercontent.com/solana-program/stake-pool/main/program/src/instruction.rs), [Jito deployed programs](https://www.jito.network/docs/jitosol/jitosol-liquid-staking/security/deployed-programs/), [Marinade contract addresses](https://docs.marinade.finance/developers/contract-addresses), [Marinade deposit.rs](https://raw.githubusercontent.com/marinade-finance/liquid-staking-program/main/programs/marinade-finance/src/instructions/user/deposit.rs), [BlazeStake addresses](https://stake-docs.solblaze.org/developers/addresses.md) \ No newline at end of file diff --git a/plan/agw/notion/exports/20261003T075310278902Z/export-1.zip b/plan/agw/notion/exports/20261003T075310278902Z/export-1.zip new file mode 100644 index 00000000..d8b55a13 Binary files /dev/null and b/plan/agw/notion/exports/20261003T075310278902Z/export-1.zip differ diff --git a/plan/agw/notion/exports/20261003T075310278902Z/export-2.zip b/plan/agw/notion/exports/20261003T075310278902Z/export-2.zip new file mode 100644 index 00000000..d52a1df5 Binary files /dev/null and b/plan/agw/notion/exports/20261003T075310278902Z/export-2.zip differ diff --git a/plan/agw/notion/exports/20261003T075310278902Z/export-3.zip b/plan/agw/notion/exports/20261003T075310278902Z/export-3.zip new file mode 100644 index 00000000..bc2a007d Binary files /dev/null and b/plan/agw/notion/exports/20261003T075310278902Z/export-3.zip differ diff --git a/plan/agw/notion/exports/20261003T075310278902Z/export-4.zip b/plan/agw/notion/exports/20261003T075310278902Z/export-4.zip new file mode 100644 index 00000000..7a01de3b Binary files /dev/null and b/plan/agw/notion/exports/20261003T075310278902Z/export-4.zip differ diff --git a/plan/agw/notion/exports/20261007T102718466408Z/export-1.zip b/plan/agw/notion/exports/20261007T102718466408Z/export-1.zip new file mode 100644 index 00000000..29a25ac0 Binary files /dev/null and b/plan/agw/notion/exports/20261007T102718466408Z/export-1.zip differ diff --git a/plan/agw/notion/exports/20261007T102718466408Z/export-2.zip b/plan/agw/notion/exports/20261007T102718466408Z/export-2.zip new file mode 100644 index 00000000..6377c37e Binary files /dev/null and b/plan/agw/notion/exports/20261007T102718466408Z/export-2.zip differ diff --git a/plan/agw/notion/exports/20261007T102718466408Z/export-3.zip b/plan/agw/notion/exports/20261007T102718466408Z/export-3.zip new file mode 100644 index 00000000..d24179af Binary files /dev/null and b/plan/agw/notion/exports/20261007T102718466408Z/export-3.zip differ diff --git a/plan/agw/notion/exports/20261007T102718466408Z/export-4.zip b/plan/agw/notion/exports/20261007T102718466408Z/export-4.zip new file mode 100644 index 00000000..538ca012 Binary files /dev/null and b/plan/agw/notion/exports/20261007T102718466408Z/export-4.zip differ diff --git a/plan/agw/notion/history/20261003T075310278902Z/1-agw-contract-changes.diff b/plan/agw/notion/history/20261003T075310278902Z/1-agw-contract-changes.diff new file mode 100644 index 00000000..bd387e6a --- /dev/null +++ b/plan/agw/notion/history/20261003T075310278902Z/1-agw-contract-changes.diff @@ -0,0 +1,82 @@ +--- notion/1-agw-contract-changes.md (previous) ++++ notion/1-agw-contract-changes.md (refreshed) +@@ -279,6 +279,79 @@ + + **Not in this change set** (belongs to 8183, listed so nobody looks for it here): the fund hook's key-match and expiry checks, the marketplace, the evaluator. + ++# 4c. What the SDK rule shape changes in the contracts (PROPOSED 2026-10-02) ++ ++Page 5 (SDK: AGW) settled the shape of a cross-chain rule in `client.agentic.create`. Three of those SDK changes touch the contracts. Nothing else on page 5 does. Names are the post-rename names from section 3; struct changes are to the universal terms URP decodes from the rules envelope. ++ ++**1. One rule can move several tokens: `assets: AssetCap[]` replaces `asset`, `maxAmountPerCall`, `maxAmountTotal`.** ++ ++The SDK takes each asset as the token's address on the rule's chain (`MOVEABLE.TOKEN..` or the native marker) and resolves it to the PRC20 on Push before encoding, so the contract keeps storing PRC20 addresses. The spend counter becomes per asset. ++ ++```diff ++// universal EVM terms (and SvmTerms, same change) ++- address asset; uint256 maxAmountPerCall; uint256 maxAmountTotal; +++ AssetCap[] assets; // 0..MAX_ASSETS; empty = call contracts, move nothing +++ struct AssetCap { address token; uint256 maxPerCall; uint256 maxTotal; } // token: PRC20 on Push; maxTotal 0 = no total cap +++ uint8 constant MAX_ASSETS = 8; ++ ++// metering ++~ amount gate: the token being moved must be one of assets[]; per-call and running total checked against that entry ++~ _spent[configId] becomes per token: mapping(address token => uint256 spent) ++~ assertSpent(configId, account) returns the per-token totals; the existing single-amount overload goes ++~ OutboundMetered carries the token ++``` ++ ++**2. `maxGasPerCall` replaces `maxPCPerCall`.** ++ ++Rename only. Same meaning: the PC (wei) the wallet may pass as `msg.value` on one outbound for the destination leg. The gate that checks it does not change. ++ ++```diff ++- uint256 maxPCPerCall; +++ uint256 maxGasPerCall; ++``` ++ ++**3. The struct, as it ends up.** ++ ++SDK side, what `create` takes per rule (page 5, 3.b). `agent` and `ref` go to `grantRules`, the rest is encoded into the rules envelope. ++ ++```tsx ++interface UniversalRule { ++ agent: Address; // Push address: EOA, or the UEA of an external key ++ ref?: Hex; // emitted in RulesGranted, not interpreted ++ chainNamespace: ForeignChainNamespace; ++ assets: AssetCap[]; // tokens the agent may move on chainNamespace; 0..8 ++ maxGasPerCall: bigint; // PC (wei) per outbound for the destination leg ++ validUntil: number; ++ allowedCalls: AllowedCall[]; ++} ++ ++interface AssetCap { ++ token: MoveableToken | Address; // the other chain's token address (MOVEABLE.TOKEN..) or the native marker ++ maxPerCall: bigint; ++ maxTotal?: bigint; ++} ++``` ++ ++Contract side, what URP decodes from the envelope body for an `eip155` namespace (`SvmTerms` takes the same `assets` and `maxGasPerCall` fields). ++ ++```solidity ++struct AssetCap { ++ address token; // PRC20 on Push, resolved by the SDK from the other chain's address ++ uint256 maxPerCall; ++ uint256 maxTotal; // 0 = no running cap ++} ++ ++struct UniversalTerms { ++ uint48 validUntil; ++ bytes32 expectedCEA; ++ AssetCap[] assets; // 0..MAX_ASSETS; empty = call contracts, move nothing ++ uint256 maxGasPerCall; // PC (wei) per outbound ++ AllowedCall[] allowedCalls; // unchanged ++} ++ ++uint8 constant MAX_ASSETS = 8; ++``` ++ + # 5. Open for review on this page + + 1. D3: removing the validator. Needs the v3 branch check on how SmartSession's engine is entered (signature path vs a sender-gated call into the same policy checks). If the engine cannot be entered without a signature, the fallback is a validator that accepts a trivial signature from the sender, which keeps the identity model and loses nothing but elegance. diff --git a/plan/agw/notion/history/20261003T075310278902Z/1-agw-contract-changes.md b/plan/agw/notion/history/20261003T075310278902Z/1-agw-contract-changes.md new file mode 100644 index 00000000..e27029e8 --- /dev/null +++ b/plan/agw/notion/history/20261003T075310278902Z/1-agw-contract-changes.md @@ -0,0 +1,289 @@ +# 1. AGW Contract Changes (nomenclature standard + change set) + + + +# 0. Before the naming: AGW will break when the gateway is upgraded + +**What happened.** The gateway team changed the outbound request struct on GitHub main. Two fields are gone (`gasPrice`, `maxPCForGas`). AGW copied the old struct into its own repo and URP checks one of the removed fields (gate 9: `maxPCForGas` must be non-zero). + +**Why it still works today.** Donut is still running the old gateway (implementation `0x1e41...a659` has the old eight fields). + +**What breaks.** The day the new gateway is deployed on Donut, every cross-chain rule set stops working: URP rejects every request. + +**Fix, two rules.** + +1. AGW never copies a gateway or core struct. It imports them from the gateway and core packages, so a change upstream fails the build instead of failing on-chain. +2. The URP upgrade and the gateway upgrade go out together, not separately. + +Same rule for the selector: derive `sendUniversalTxOutbound.selector` from the interface, do not hardcode `0x77b86bec`. + +# 1. How core and gateway name things (the standard AGW follows) + +These conventions already exist in `push-chain-core-contracts` and `push-chain-gateway-contracts`. AGW adopts them as is. Where the two repos disagree, the AGW column says which one wins. + +| Area | Convention | Example | AGW | +| --- | --- | --- | --- | +| Contract names | Chain-agnostic components spell out Universal. Push-side variants add PC. Accounts are 3-letter acronyms. | `UniversalCore`, `UniversalGatewayPC`, `UEA`, `CEAFactory` | `AGW`, `AGWFactory`, `UniversalRulesPolicy` | +| Errors | One `libraries/Errors.sol` per repo, one error library per contract, PascalCase, arguments only when the caller needs them. Caller checks are `CallerIsNotX`. | `UEAErrors.InvalidCall()`, `CommonErrors.ZeroAddress()`, `CallerIsNotUEModule()` | `AGWErrors`, `AGWFactoryErrors`, `UniversalRulesPolicyErrors` | +| Types and constants | One `libraries/Types.sol`, plain file-level structs, `UPPER_SNAKE` constants, selectors derived not hardcoded. | `struct Multicall`, `MULTICALL_SELECTOR = bytes4(keccak256("UEA_MULTICALL"))` | `libraries/Types.sol`; gateway and core structs imported, never copied | +| Request shape | One `XRequest` struct as the single argument; the contract infers the kind. Users never state a type. | `sendUniversalTxOutbound(UniversalOutboundTxRequest req)` infers `TX_TYPE` | `grantRules(Session)` infers `NATIVE` vs `UNIVERSAL` from `chainNamespace` | +| Interface sections | Tag plus number banners, events first, NatSpec on everything. | `UGPC_1: EVENTS`, `UGPC_2: OUTBOUND TX`, `UGPC_3: VIEW FUNCTIONS` | `AGW_1: EVENTS` ... `AGW_5: VIEWS`, `URP_1` ... `URP_3` | +| Functions | `setX`, `getX`, `isX`. Set-once wiring is read through `UPPER_CASE()` getters. | `isSupportedToken()`, `UNIVERSAL_CORE()` | `SESSION_ENGINE()`, `RULES_POLICY()`, `UNIVERSAL_GATEWAY_PC()` | +| Storage | Internal state is underscore-prefixed. | `_walletCount` | `_` everywhere; drop URP's `$` prefix | +| Roles | `UPPER_SNAKE_ROLE`. | `DEFAULT_ADMIN_ROLE`, `PAUSER_ROLE`, `TSS_ROLE` | same; `PAUSER` and `OPERATOR` split kept, documented | +| Chain identity | Full CAIP-2 string, field named `chainNamespace`. | `"eip155:1"` | envelope field renamed `chain` to `chainNamespace` | +| Events | No consistent rule upstream. | `SetChainMeta` (imperative), `VaultPCUpdated` (past) | past tense: `RulesGranted`, `WalletDeployed` | +| Layout | `src/` with `interfaces/` and `libraries/`; numbered docs and tests; addresses per network; `CLAUDE.md` in every package. | `docs/1_PUSH_CHAIN.md`, `test/gateway/1_adminActions.t.sol`, `docs/addresses/sepolia.md` | same, see rename map | + +#### Where each convention was seen (open only if you want the receipts) + +Core repo, folder layout: + +``` +src/ + Interfaces/ IUniversalCore.sol, IUEA.sol, ICEA.sol + libraries/ Errors.sol, Types.sol, Utils.sol + uea/ UEAFactory.sol, UEA_EVM.sol, UEA_SVM.sol + cea/ CEAFactory.sol, CEA.sol + UniversalCore.sol, PRC20.sol, WPC.sol +``` + +Gateway repo, folder layout: + +``` +contracts/evm-gateway/ + src/ UniversalGateway.sol, UniversalGatewayPC.sol, Vault.sol, VaultPC.sol + src/interfaces/ IUniversalGatewayPC.sol, IVault.sol + src/libraries/ Errors.sol, Types.sol, TypesUG.sol, TypesUGPC.sol + docs/ 1_PUSH_CHAIN.md, 2_UniversalGateway.md, 3_UniversalGatewayPC.md + docs/addresses/ sepolia.md, bsc-testnet.md + test/gateway/ 1_adminActions.t.sol ... 14_gatewayPC.t.sol + script/ 1_DeployGatewayWithProxy.sol, 3_UpgradeGatewayNewImpl.sol + CLAUDE.md +``` + +Errors (core, `libraries/Errors.sol`): + +```solidity +library CommonErrors { error ZeroAddress(); error Unauthorized(); error InvalidInput(); } +library UniversalCoreErrors { error CallerIsNotUEModule(); error GasLimitBelowBase(uint256 provided, uint256 minimum); } +library UEAErrors { error InvalidCall(); error ExecutionFailed(); } +``` + +Types (core, `libraries/Types.sol`): + +```solidity +struct UniversalAccountId { string chainNamespace; string chainId; bytes owner; } +struct Multicall { address to; uint256 value; bytes data; } +bytes4 constant MULTICALL_SELECTOR = bytes4(keccak256("UEA_MULTICALL")); +``` + +Request shape (gateway, `TypesUGPC.sol` and `IUniversalGatewayPC.sol`): + +```solidity +struct UniversalOutboundTxRequest { bytes recipient; address token; uint256 amount; uint256 gasLimit; bytes payload; address revertRecipient; } +function sendUniversalTxOutbound(UniversalOutboundTxRequest calldata req) external payable; // TX_TYPE inferred inside +``` + +Interface sections and wiring getters (gateway, `IUniversalGatewayPC.sol`): + +```solidity +// UGPC_1: EVENTS +// UGPC_2: OUTBOUND TX +// UGPC_3: VIEW FUNCTIONS +function UNIVERSAL_CORE() external view returns (address); +``` + +Events (both repos, no single rule): + +```solidity +event SetChainMeta(...); // core, imperative +event PauserRoleGranted(...); // core, past tense +event UniversalTxOutbound(...); // gateway, noun +event VaultPCUpdated(...); // gateway, past tense +``` + +Chain identity, the same field name with two meanings: + +```solidity +gasPriceByChainNamespace("eip155:1") // UniversalCore: full CAIP-2 string +UniversalAccountId({ chainNamespace: "eip155", chainId: "1" }) // Read State: split +``` + +# 2. Decisions + +| # | Decision | Outcome | +| --- | --- | --- | +| D1 | Wallet contract name | **AGW.sol** (account acronym like UEA, CEA). Full form "Agentic Wallet" in the NatSpec title only. Factory stays `AGWFactory.sol`. | +| D2 | Policy contract name | **UniversalRulesPolicy.sol**. `URP` stays as the short form in comments, events and the SDK constant, the way `UGPC` stands for `UniversalGatewayPC`. | +| D3 | Validator contract name | PROPOSED 2026-09-29: **no validator.** The agent is a Push address: a native key is its own EOA, any external key (EVM, Solana, anything) is its UEA, deterministic from (chain, owner). Cross-VM signature verification already happens inside the UEA, so the agent door checks `msg.sender == rules.agent` and hands the calls to URP. `PushSessionValidator.sol` is removed rather than renamed. Pending one check against the v3 branch: how deep SmartSession's signature path is wired into the engine calls URP relies on, and whether the policy engine can be driven from a sender check without forking it. | +| D4 | Vocabulary for the granted object | **rules, one word everywhere.** On-chain: `grantRules`, `revokeRules`, `revokeAllRules`, `rulesId`, `RulesGranted`, `RulesRevoked`, `RulesActionAuthorized`. Layer: Universal Rules. SDK: `client.agentic.rules`. `permissionId` remains the SmartSession-internal name and is exposed as `rulesId`. `mandate` is retired from code, docs and copy. +**Rename boundary (2026-09-29).** Three vocabularies live in the fork; only ours is renamed. ERC-7579 names stay (`execute(mode, executionCalldata)`, `ModeCode`, module types, `installModule`). SmartSession names stay inside the engine and on the interfaces URP implements (`Session`, `permissionId`, `PolicyData`, `ActionData`, `ConfigId`, `enableSessions`, `isPermissionEnabled`, `IPolicy.checkAction`, `initializeWithMultiplexer`): audit history and upstream diffs attach to those names. Push's own words (`mandate`, `PushAgentWallet`, our events, envelope, docs, SDK) become rules. The seam is the AGW ABI: `rulesId` is computed by the engine's `getPermissionId(Session)` and the NatSpec states `rulesId == permissionId`. If the engine is vendored with edits, it lives in `src/vendor/smartsession/` with a note naming the upstream commit and every local change. If D3 ends with the engine dropped, SmartSession vocabulary leaves with it. | +| D5 | Door functions | Keep `execute` (owner door). Agent door becomes `executeAsAgent(bytes32 rulesId, bytes32 mode, bytes executionCalldata)`, gated on `msg.sender == rules.agent`, replacing `executeWithSession` and its signature blob (follows D3). "Owner door" and "agent door" stay as NatSpec language. | +| D6 | Chain field in the envelope | Rename `chain` to `chainNamespace`, full CAIP-2 string, matching `UniversalCore` and gateway events. Read State keeps its split fields; the SDK converts. | +| D7 | Mode names | `NATIVE` and `UNIVERSAL` stay. The SVM rulebook is selected by the `solana` namespace inside `UNIVERSAL`; no new mode name. | + +# 3. Rename map (current to proposed) + +| Area | Today | Proposed | +| --- | --- | --- | +| Inherited names (7579, SmartSession) | `execute(mode, executionCalldata)`, `Session`, `permissionId`, `PolicyData`, `ActionData`, `ConfigId`, `checkAction`, `initializeWithMultiplexer` | unchanged (see D4 rename boundary) | +| Wallet | `PushAgentWallet.sol` | `AGW.sol` | +| Factory | `AGWFactory.sol` | `AGWFactory.sol` (unchanged) | +| Policy | `policies/URP.sol` | `UniversalRulesPolicy.sol` | +| Validator | `validators/PushSessionValidator.sol` | removed (D3): agent identity is a Push address, verification lives in the UEA | +| Interfaces | `IPushAgentWallet`, `IURP`, `IPushSessionValidator`, local `IUniversalGatewayPC`, `IPRC20Source` | `IAGW`, `IUniversalRulesPolicy`; gateway and core interfaces imported (`IUEAFactory` for `computeUEA` in tests and tooling) | +| Errors | `libraries/PushWalletErrors.sol` plus errors declared in `IURP` and `IAGWFactory` | `libraries/Errors.sol` with `AGWErrors`, `AGWFactoryErrors`, `UniversalRulesPolicyErrors`; reuse `CommonErrors` names (`ZeroAddress`, `Unauthorized`, `AlreadyInitialized`); `AGWErrors.CallerIsNotAgent()` | +| Types | `libraries/PushWalletTypes.sol` re-declares `UniversalOutboundTxRequest`, `Multicall` | `libraries/Types.sol` with AGW-owned structs only (`RulesEnvelope`, `NativeTerms`, `UniversalTerms`, `AllowedCall`, `ArgPin`, `AmountRule`); gateway and core types imported | +| Grant / revoke | `grantMandate`, `stopMandate`, `stopAll` | `grantRules`, `revokeRules`, `revokeAllRules` | +| Events | `MandateGranted`, `MandateRevoked`, `MandateActionAuthorized`, `URPPolicySet` | `RulesGranted`, `RulesRevoked`, `RulesActionAuthorized`, `RulesConfigured` | +| Ids | `permissionId` in wallet ABI | `rulesId` in wallet ABI (engine keeps `permissionId` internally) | +| Wiring getters | `sessionEngine()`, `urp()`, `sessionValidator()`, `universalGateway()` | `SESSION_ENGINE()`, `RULES_POLICY()`, `UNIVERSAL_GATEWAY_PC()` (no validator getter, D3) | +| Storage prefix | `_` in wallet and factory, `$` in URP | `_` everywhere | +| Envelope | `abi.encode(string chain, bytes body)` | `abi.encode(uint16 version, string chainNamespace, bytes body)` | +| Interface banners | none | `AGW_1: EVENTS`, `AGW_2: OWNER DOOR`, `AGW_3: AGENT DOOR`, `AGW_4: RULES LIFECYCLE`, `AGW_5: VIEWS`; `URP_1: EVENTS`, `URP_2: POLICY`, `URP_3: VIEWS`; `AGWF_1: EVENTS`, `AGWF_2: DEPLOY`, `AGWF_3: VIEWS` | +| Selector constant | `SEND_OUTBOUND_SELECTOR = 0x77b86bec` | derived from `IUniversalGatewayPC` | +| Roles | `PAUSER_ROLE` pauses, `OPERATOR_ROLE` unpauses | keep the split, document it as a deliberate deviation from gateway | +| Event tense | past tense | past tense, written down as the rule | +| Docs | `docs/v3-architecture.md`, `agentic_wallet_flow.md`, `push_native_agentic_wallet_flow.md` | `docs/1_AGW.md`, `2_UniversalRulesPolicy.md`, `3_Universal_Flow.md`, `4_Native_Flow.md` | +| Addresses | `deployments/address-book-v3/ADDRESSES.md` | `docs/addresses/donut.md` | +| Tests | `test/unit/*.t.sol`, `test/integration/*.t.sol` | numbered by area: `1_factory`, `2_ownerDoor`, `3_rulesLifecycle`, `4_agentDoor`, `5_universalRulebook`, `6_nativeRulebook`, `7_externalAgentViaUEA`, `8_e2e` | + +# 4. Structural changes that ride along with the rename + +Agreed on 2026-09-28. Listed here so the rename and the additions land in one change set and one audit, before the permanent deployment. + +1. **Signature-authorized variants**: `deployWalletWithSig`, `grantRulesWithSig`, `executeWithSig`. One EIP-712 domain per contract. Digest includes chainid, contract, nonce (the wallet's grant nonce for grants; a per-owner nonce on the factory), deadline. Verify ECDSA, and ERC-1271 when the owner has code (a UEA). +2. **Checkpoints**: the wallet records owner-side changes an evaluator needs: principal moved out (owner-door value or token transfer out, and every outbound), rules granted, revoked or replaced, key changed. Per-wallet monotonic counter plus `Checkpointed(kind, ref, blockNumber)`, so an evaluator can ask "any checkpoint after block N" with one read. +3. **`bytes32 ref` on `grantRules`**, emitted in `RulesGranted`, so a job binds to a rules id and an indexer goes rules to job without the hook. +4. **Stop-only role: dropped for v1** (2026-10-01). A binder address that could call `revokeRules` and nothing else was considered so a job hook could end rules at job end. Not needed: rules expire by `validUntil`, which the fund hook requires to be at or after the job's `expiredAt`, caps bound the gap, and the hook keeps its own one-live-job slot. Additive to bring back later. +5. **Envelope version word**: `abi.encode(uint16 version, string chainNamespace, bytes body)`. +6. **`creditRevert` reachability**: wire the real executor module or replace the credit path. Today spend never decreases on Donut. +7. **SVM rulebook** in the policy, keyed by the `solana` namespace: 32-byte `expectedCEA` and targets, program plus instruction discriminator allow-list, beneficiary check over the accounts array, SVM payload gate. +8. **Import gateway and core types**, derive the outbound selector, sequence the URP upgrade with the gateway's struct change. +9. **Agent identity is a Push address** (2026-09-29). The rules name an address: an EOA, or the UEA of an external key. The agent door checks the sender instead of verifying a session signature; the validator contract goes. One identity for rules, card and 8183 provider, so the fund hook matches by equality. Sizing against the v3 branch pending (D3). +10. **Editable label** (2026-10-01). `setLabel(string label)` on AGW, owner only, emits `LabelSet(string label)`. Today the label is only passed at `deployWallet` and emitted in `WalletDeployed`. Not a checkpoint kind: cosmetic metadata, evaluators ignore it. SDK: `w.setLabel(label)` on page 5. + +# 4b. Contract surface, as a diff + +Read `+` as added, `-` as removed, `~` as changed in place, `=` as unchanged. Names are the post-rename names. Storage slots never move; renames are labels only. + +**AGWFactory** + +```diff += deployWallet(string label) returns (address wallet) // caller is the owner ++ deployWalletWithSig(address owner, uint96 index, string label, ++ uint48 deadline, bytes ownerSig) returns (address) // EIP-712; index must equal walletCount(owner) ++ // ownerSig: ECDSA, or ERC-1271 when owner has code (UEA) ++ DOMAIN_SEPARATOR() view returns (bytes32) += predictWallet(address owner, uint256 index) view returns (address, bool deployed) += walletCount / ownerOf / isWallet / indexOf / walletImplementation += pause() PAUSER_ROLE, unpause() OPERATOR_ROLE += event WalletDeployed(owner, index, wallet, label) +``` + +**AGW** (was PushAgentWallet) + +```diff +// owner door += execute(bytes32 mode, bytes executionCalldata) payable // owner only, no policy +~ execute now emits Checkpointed(seq, OWNER_ACTION, keccak(calldata), block) ++ executeWithSig(bytes32 mode, bytes executionCalldata, ++ uint64 ownerNonce, uint48 deadline, bytes ownerSig) // owner door by signature, same effects as execute ++ ownerNonce() view returns (uint64) ++ setLabel(string label) // owner only; emits LabelSet; not a checkpoint + +// rules lifecycle +- grantMandate(Session) returns (bytes32 permissionId) ++ grantRules(Session session, bytes32 ref) returns (bytes32 rulesId) // ref: job or card reference, emitted, not interpreted ++ grantRulesWithSig(Session session, bytes32 ref, uint48 deadline, bytes ownerSig) returns (bytes32 rulesId) ++ // digest includes grantNonce, so a signed grant cannot replay +- stopMandate(bytes32 permissionId) ++ revokeRules(bytes32 rulesId) // owner or self +- stopAll() ++ revokeAllRules() // owner or self + +// agent door (D3, D5) +- executeWithSession(address validator, bytes32 mode, bytes executionCalldata, +- bytes signature, uint192 nonceKey, uint64 nonceSeq, uint48 requestExpiry) ++ executeAsAgent(bytes32 rulesId, bytes32 mode, bytes executionCalldata) ++ requires msg.sender == agentOf(rulesId); replay and expiry come from the sender's own tx (EOA nonce, or the UEA's) ++ URP checks every call exactly as before; no signature blob, no validator address ++ agentOf(bytes32 rulesId) view returns (address) + +// checkpoints ++ checkpointCount() view returns (uint64) ++ lastCheckpointBlock() view returns (uint64) ++ event Checkpointed(uint64 indexed seq, uint8 kind, bytes32 ref, uint64 blockNumber) ++ kind: 0 OWNER_ACTION (any owner-door execute), 1 RULES_GRANTED, 2 RULES_REVOKED ++ emitted from execute, executeWithSig, grantRules*, revokeRules, revokeAllRules + +// views (wiring, renamed to UPPER_CASE) +- sessionEngine() urp() sessionValidator() universalGateway() ++ SESSION_ENGINE() RULES_POLICY() UNIVERSAL_GATEWAY_PC() += owner() factory() grantNonce() getNonce(uint192) accountId() ++ DOMAIN_SEPARATOR() view returns (bytes32) + +// events +- MandateGranted(permissionId, mandateType, chainHash, chain) ++ RulesGranted(bytes32 indexed rulesId, uint8 mode, bytes32 indexed chainHash, string chainNamespace, bytes32 ref) +- MandateRevoked(permissionId) ++ RulesRevoked(bytes32 indexed rulesId, address by) +- MandateActionAuthorized(permissionId, nonceKey, nonceSeq, opHash) ++ RulesActionAuthorized(bytes32 indexed rulesId, address indexed agent, bytes32 callsHash) ++ event LabelSet(string label) +``` + +**UniversalRulesPolicy** (was URP) + +```diff +~ initializeWithMultiplexer(address account, ConfigId id, bytes initData) +~ initData = abi.encode(uint16 version, string chainNamespace, bytes body) // was (string chain, bytes body) +~ rulebook chosen by namespace: this chain => native; eip155:* => universal EVM; solana:* => universal SVM ++ SVM rulebook ++ struct SvmTerms { uint48 validUntil; bytes32 expectedCEA; address asset; uint256 maxAmountPerCall; ++ uint256 maxAmountTotal; uint256 maxPCPerCall; SvmAllowedCall[] allowedCalls; } ++ struct SvmAllowedCall { bytes32 program; bytes8 discriminator; uint8 beneficiaryAccountIndex; bool hasBeneficiary; uint64 maxLamports; } ++ gates mirror the EVM list; beneficiary checked in the accounts array, payload gate for the SVM outbound format +~ checkAction: UniversalOutboundTxRequest imported from the gateway package +~ gate 4c MIN_OUTBOUND_BODY_LEN recomputed from the imported struct +~ gate 9 (maxPCForGas != 0) removed when the six-field gateway struct lands; deploy in the same window +~ creditRevert(id, account, outboundTxId, amount): caller is the real executor module, set at initialize += or removed if the credit path is replaced (decision pending) += assertSpent (both overloads), getConfig, getNativeConfig, getMode, pushChainHash, isCredited ++ getSvmConfig(ConfigId, address) view +- event URPPolicySet(...) ++ event RulesConfigured(bytes32 indexed configId, address indexed multiplexer, address indexed account, uint8 mode, bytes32 chainHash) += OutboundMetered, NativeCallMetered, RevertCredited +~ storage variables renamed $configs, $credited, $mode, $native to _configs, _credited, _mode, _native (labels only, slots unchanged) ++ _svm mapping appended after _native; __gap shrinks by one +~ version() returns "2.0.0" +``` + +**PushSessionValidator** + +```diff +- validateConfig(bytes keyConfig) +- validateSignatureWithData(bytes32 hash, bytes sig, bytes keyConfig) +- contract removed (D3). Session.sessionValidator and keyConfig are replaced by a single address in the rules: the agent. +``` + +**Not in this change set** (belongs to 8183, listed so nobody looks for it here): the fund hook's key-match and expiry checks, the marketplace, the evaluator. + +# 5. Open for review on this page + +1. D3: removing the validator. Needs the v3 branch check on how SmartSession's engine is entered (signature path vs a sender-gated call into the same policy checks). If the engine cannot be entered without a signature, the fallback is a validator that accepts a trivial signature from the sender, which keeps the identity model and loses nothing but elegance. +2. Checkpoint kinds, since they are the evaluator's contract with the wallet. +3. `creditRevert`: wire the executor module, or replace the credit path. +4. Anything in the rename map or the diff that should stay as is. + +The SDK surface lives on page 5 (SDK: AGW). \ No newline at end of file diff --git a/plan/agw/notion/history/20261003T075310278902Z/5-sdk-agw.diff b/plan/agw/notion/history/20261003T075310278902Z/5-sdk-agw.diff new file mode 100644 index 00000000..47ab2a2e --- /dev/null +++ b/plan/agw/notion/history/20261003T075310278902Z/5-sdk-agw.diff @@ -0,0 +1,106 @@ +--- notion/5-sdk-agw.md (previous) ++++ notion/5-sdk-agw.md (refreshed) +@@ -89,40 +89,39 @@ + + ### 1.b Create an agentic wallet - `client.agentic.create` + +-Deploys the wallet, moves funds into it and grants the rules. The label is the only wallet-level input; the agent and an optional `ref` are named on each rule, because that is where the contract binds them. ++Deploys the wallet and grants the rules. The label is the only wallet-level input; the agent and an optional `ref` are named on each rule, because that is where the contract binds them. + + ```tsx + // Function + const created = await client.agentic.create(label, { options }) + + // Usage and Params +-const created = await client.agentic.create('aave-optimiser', { // wallet with one cross-chain rule, funded ++const created = await client.agentic.create('aave-optimiser', { // wallet with one cross-chain rule + rules: [{ // one entry per chain per agent + agent: '0xAgentOnPush', // a Push address: the agent's EOA, or its UEA if the key lives on another chain. Never the owner + ref: jobRef, // emitted in RulesGranted, not interpreted + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, // foreign chain => universal rulebook +- asset: usdcOnPush, +- maxAmountPerCall: parseUnits('100', 6), +- maxAmountTotal: parseUnits('100', 6), +- maxPCPerCall: parseUnits('0.5', 18), ++ assets: [ ++ { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, maxPerCall: parseUnits('100', 6), maxTotal: parseUnits('1000', 6) }, ++ { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.WETH, maxPerCall: parseUnits('0.5', 18) }, ++ ], ++ maxGasPerCall: parseUnits('1', 18), // PC (wei) per outbound for the destination leg + validUntil: now + 30 * 86400, + allowedCalls: [ +- { target: aavePool, selector: 'supply(address,uint256,address,uint16)', beneficiary: 2 }, // arg index, not offset ++ { target: aavePool, selector: 'supply(address,uint256,address,uint16)', beneficiary: 2 }, // arg index, not offset: onBehalfOf must be the AGW's CEA + { target: usdcSepolia, selector: 'approve(address,uint256)' }, + ], + }], +- funds: [{ amount: parseUnits('100', 6), token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC }], +- pc: parseUnits('5', 18), // native PC for outbound fees + progressHook: (p) => console.log(p.id, p.message), // AGENTIC-TX-1xx + }); + const bare = await client.agentic.create('scratch', { rules: [] }); // wallet first, rules later with rules.add + // label string, required shown in list() and info(); the contract stores it + // options.rules Rule[], required one per chain per agent, may be empty; each rule carries its own agent and optional ref +-// options.funds Array<{ amount, token }>, optional same shape as tx.funds, always an array; default none +-// options.pc bigint, optional native PC for outbound fees; default none + // options.progressHook function, optional progress events, AGENTIC-TX-1xx; default none + // rules[].agent Address, required the Push address allowed to act under this rule; never the owner + // rules[].ref Hex, optional emitted in RulesGranted, not interpreted; default zero ++// rules[].assets AssetCap[], required on a universal rule tokens the agent may move, as the other chain's address (MOVEABLE constants); the SDK resolves each to its PRC20 on Push; each cap is { token, maxPerCall, maxTotal? } ++// rules[].maxGasPerCall bigint, required on a universal rule PC (wei) the wallet may spend per outbound for the destination leg + + // Returns + // { wallet, index, rulesIds, tx } +@@ -142,11 +141,11 @@ + + One rule per chain per agent. A wallet may have different agents on different chains. If an agent needs to act on two chains, `rules` has two entries with the same `agent`; two agents on one chain are two entries with the same `chainNamespace`. Nobody states a rule type; the SDK reads it from `chainNamespace`. `rules: []` is allowed: create the wallet first and grant rules later with `rules.add` (1.k). + +-Before asking for a signature the SDK checks that no rule's agent is the owner (`AGENT_IS_OWNER`), that no two rules share both agent and chain (`DUPLICATE_RULE`), that every `allowedCalls[].target` is on the rule's chain (`TARGET_NOT_ON_RULE_CHAIN`), and that the asset is a PRC20 whose `SOURCE_CHAIN_NAMESPACE` matches the rule's chain (`ASSET_CHAIN_MISMATCH`). +- +-Under the hood this is `deployWallet` (or reuse of a derived address), the funds moved in, and one `grantRules` per rule. For an external owner they go as one UEA multicall under one signature. `funds` stays an array; an external owner moving several tokens may need one signature per token, and the SDK sequences them and reports each through progress events. +- +-For a Push EOA owner the same thing needs a batching entry on the factory, because core rejects multicall from a Push-native sender: [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 11, **PROPOSED** (`createWallet(label, rules[], funds)` on the factory). Until it lands the SDK sends deploy, fund and grant as separate transactions and says so through progress events (AGENTIC-TX-102 to 104); `tx` is then the last of them. ++Before asking for a signature the SDK checks that no rule's agent is the owner (`AGENT_IS_OWNER`), that no two rules share both agent and chain (`DUPLICATE_RULE`), that every `allowedCalls[].target` is on the rule's chain (`TARGET_NOT_ON_RULE_CHAIN`), and that every `assets[].token` resolves to a PRC20 whose `SOURCE_CHAIN_NAMESPACE` matches the rule's chain (`ASSET_CHAIN_MISMATCH`). ++ ++Under the hood this is `deployWallet` (or reuse of a derived address) and one `grantRules` per rule. For an external owner they go as one UEA multicall under one signature. Funding is not part of `create`: the wallet is a normal Push account, so send tokens and PC to its address the way you would to any account (1.a shows the address before deployment). ++ ++For a Push EOA owner the same thing needs a batching entry on the factory, because core rejects multicall from a Push-native sender: [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 11, **PROPOSED** (`createWallet(label, rules[])` on the factory). Until it lands the SDK sends deploy and grant as separate transactions and says so through progress events (AGENTIC-TX-102 and 104); `tx` is then the last of them. + + A `progressHook` passed to `PushChain.initialize` receives the same events alongside the per-call one, as in core. + +@@ -562,8 +561,6 @@ + + interface CreateOptions { + rules: Rule[]; // one entry per chain per agent, may be empty; each rule names its agent and optional ref +- funds?: { amount: bigint; token: MoveableToken | Address }[]; // same shape as tx.funds, always an array +- pc?: bigint; // native PC for outbound fees + progressHook?: ProgressHook; // AGENTIC-TX-1xx + } + +@@ -596,10 +593,16 @@ + agent: Address; // same as NativeRule.agent + ref?: Hex; // same as NativeRule.ref + chainNamespace: ForeignChainNamespace; // "eip155:..." now; "solana:..." once the SVM rulebook ships +- asset: Address; // PRC20 on Push; SDK asserts its SOURCE_CHAIN_NAMESPACE ++ assets: AssetCap[]; // tokens the agent may move on chainNamespace; SDK resolves each to its PRC20 and asserts SOURCE_CHAIN_NAMESPACE ++ maxGasPerCall: bigint; // PC (wei) per outbound for the destination leg + validUntil: number; +- maxAmountPerCall: bigint; maxAmountTotal?: bigint; maxPCPerCall: bigint; + allowedCalls: AllowedCall[]; // 1..32, all on chainNamespace ++} ++ ++interface AssetCap { ++ token: MoveableToken | Address; // the other chain's token address (MOVEABLE.TOKEN..) or the native marker; the contract stores the PRC20 ++ maxPerCall: bigint; ++ maxTotal?: bigint; + } + + type Selector = Hex | `${string}(${string})`; // '0x617ba037' or 'supply(address,uint256,address,uint16)' +@@ -688,7 +691,6 @@ + // progress events, AGENTIC-TX (PROPOSED) + // AGENTIC-TX-101 wallet derived { address, index, deployed } + // AGENTIC-TX-102 deploy step added +-// AGENTIC-TX-103 funds and PC step added + // AGENTIC-TX-104 rules granted { rulesIds } + // AGENTIC-TX-105 rules revoked { rulesIds | all } + // AGENTIC-TX-106 label set diff --git a/plan/agw/notion/history/20261003T075310278902Z/5-sdk-agw.md b/plan/agw/notion/history/20261003T075310278902Z/5-sdk-agw.md new file mode 100644 index 00000000..2de6c4de --- /dev/null +++ b/plan/agw/notion/history/20261003T075310278902Z/5-sdk-agw.md @@ -0,0 +1,730 @@ +# 5. SDK: AGW + + + +# List of changes + +New + +- `client.agentic.derive` +- `client.agentic.create` +- `client.agentic.list` +- `client.agentic.wallet`, + - a management handle with + - `info`, + - `owner`, + - `setLabel` (PROPOSED), + - `checkpoints`, + - `rules.list`, + - `rules.get`, + - `rules.add`, + - `rules.update`, + - `rules.revoke` +- `PushChain.CONSTANTS.AGENTIC` +- `PushChain.utils.agentic` + +Updated + +- `PushChain.initialize`, new option `agenticWallet` +- `PushChain.CONSTANTS.READ.CHAIN`, outside change confirmed 2026-09-28 + +Initialize is unchanged on the owner side: + +```tsx +const client = await PushChain.initialize(universalSigner, { network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET }); +``` + +| Signer | Door | Rules checked | +| --- | --- | --- | +| The wallet's owner | Owner door (`execute`) | No. Every send is recorded as a checkpoint | +| An address named as `agent` in one of the wallet's rules | Agent door (`executeAsAgent`) | Yes, by URP (UniversalRulesPolicy, the on-chain rule checker) | +| Anyone else | None | Never reached: `initialize` throws `NOT_OWNER_OR_AGENT` | + +An agentic wallet involves three parties, and it helps to have them straight before reading the functions. + +The **owner** is whoever created the wallet. When the owner sends through the wallet, no rules are checked; this is called the owner door, and the contract records every such action as a checkpoint so that an evaluator can later tell whether the owner touched anything mid-job. + +The **agent** is the address the owner allows to act on its behalf. It is always a Push address. If the agent's key is a Push EOA, that EOA is the agent. If the key lives on another chain (an EVM key on Ethereum, a Solana key, anything else), the agent is that key's UEA on Push, which exists deterministically for every external key. The SDK never asks for a curve, a chain or a key type. When the agent sends through the wallet, the rules are checked; this is the agent door. + +The **rules** say what an agent may do. Each rule names its agent and its destination chain, and there is one rule per chain per agent, so a wallet can have one agent for Ethereum and a different one for Solana. The `chainNamespace` on a rule decides which rulebook applies: leave it out and the rule governs calls on Push itself; set it to an `eip155` or `solana` chain and the rule governs cross-chain calls to that chain. + +Two ways to touch a wallet from the SDK. `PushChain.initialize(signer, { agenticWallet })` returns a client that acts as the wallet, and whether it goes through the owner door or the agent door depends on who the signer is. `client.agentic.wallet(address)` returns a handle for managing the wallet (rules, label, checkpoints) and never sends as it. + +# 1. Owner side, by example + +The owner side is everything the person who owns the wallet does: create it, fund it, write and revoke the rules, look at what happened. The agent side (section 2) is what the agent does: act through the wallet within those rules. + +### 1.a Derive an agentic wallet address - `client.agentic.derive` + +Gives you the address a wallet will have before it is deployed. The address depends only on the owner and an index. + +```tsx +// Function +const first = await client.agentic.derive({ options? }) + +// Usage and Params +const next = await client.agentic.derive(); // the owner's next wallet +const first = await client.agentic.derive({ index: 0 }); // a specific slot +// options.index number, optional which wallet slot to derive; default is the owner's next unused index + +// Returns +// { address, index, deployed } +{ + address: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + index: 0, + deployed: false +} +``` + +Because the address depends only on the owner and an index, it is the same whether you deploy first or later. That lets you send funds to it first (from any chain) and deploy afterwards, or show the address in a UI before anything is on-chain. Same idea as `deriveExecutorAccount` for a UEA. + +### 1.b Create an agentic wallet - `client.agentic.create` + +Deploys the wallet, moves funds into it and grants the rules. The label is the only wallet-level input; the agent and an optional `ref` are named on each rule, because that is where the contract binds them. + +```tsx +// Function +const created = await client.agentic.create(label, { options }) + +// Usage and Params +const created = await client.agentic.create('aave-optimiser', { // wallet with one cross-chain rule, funded + rules: [{ // one entry per chain per agent + agent: '0xAgentOnPush', // a Push address: the agent's EOA, or its UEA if the key lives on another chain. Never the owner + ref: jobRef, // emitted in RulesGranted, not interpreted + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, // foreign chain => universal rulebook + asset: usdcOnPush, + maxAmountPerCall: parseUnits('100', 6), + maxAmountTotal: parseUnits('100', 6), + maxPCPerCall: parseUnits('0.5', 18), + validUntil: now + 30 * 86400, + allowedCalls: [ + { target: aavePool, selector: 'supply(address,uint256,address,uint16)', beneficiary: 2 }, // arg index, not offset + { target: usdcSepolia, selector: 'approve(address,uint256)' }, + ], + }], + funds: [{ amount: parseUnits('100', 6), token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC }], + pc: parseUnits('5', 18), // native PC for outbound fees + progressHook: (p) => console.log(p.id, p.message), // AGENTIC-TX-1xx +}); +const bare = await client.agentic.create('scratch', { rules: [] }); // wallet first, rules later with rules.add +// label string, required shown in list() and info(); the contract stores it +// options.rules Rule[], required one per chain per agent, may be empty; each rule carries its own agent and optional ref +// options.funds Array<{ amount, token }>, optional same shape as tx.funds, always an array; default none +// options.pc bigint, optional native PC for outbound fees; default none +// options.progressHook function, optional progress events, AGENTIC-TX-1xx; default none +// rules[].agent Address, required the Push address allowed to act under this rule; never the owner +// rules[].ref Hex, optional emitted in RulesGranted, not interpreted; default zero + +// Returns +// { wallet, index, rulesIds, tx } +{ + wallet: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + index: 0, + rulesIds: ['0x9c1e...'], // in the order of the rules you passed; empty for rules: [] + tx: { // UniversalTxResponse + hash: '0xb527...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + blockNumber: 1290n, + wait // await tx.wait() for the receipt; status lives on the receipt + } +} +``` + +One rule per chain per agent. A wallet may have different agents on different chains. If an agent needs to act on two chains, `rules` has two entries with the same `agent`; two agents on one chain are two entries with the same `chainNamespace`. Nobody states a rule type; the SDK reads it from `chainNamespace`. `rules: []` is allowed: create the wallet first and grant rules later with `rules.add` (1.k). + +Before asking for a signature the SDK checks that no rule's agent is the owner (`AGENT_IS_OWNER`), that no two rules share both agent and chain (`DUPLICATE_RULE`), that every `allowedCalls[].target` is on the rule's chain (`TARGET_NOT_ON_RULE_CHAIN`), and that the asset is a PRC20 whose `SOURCE_CHAIN_NAMESPACE` matches the rule's chain (`ASSET_CHAIN_MISMATCH`). + +Under the hood this is `deployWallet` (or reuse of a derived address), the funds moved in, and one `grantRules` per rule. For an external owner they go as one UEA multicall under one signature. `funds` stays an array; an external owner moving several tokens may need one signature per token, and the SDK sequences them and reports each through progress events. + +For a Push EOA owner the same thing needs a batching entry on the factory, because core rejects multicall from a Push-native sender: [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 11, **PROPOSED** (`createWallet(label, rules[], funds)` on the factory). Until it lands the SDK sends deploy, fund and grant as separate transactions and says so through progress events (AGENTIC-TX-102 to 104); `tx` is then the last of them. + +A `progressHook` passed to `PushChain.initialize` receives the same events alongside the per-call one, as in core. + +Warning for an agent whose key lives on another chain: the same EVM key initialized against two chains yields two UEAs, because a UEA is derived from namespace, chainId and owner. Grant the rule to the UEA of the chain the agent will run against. `PushChain.utils.account.deriveExecutorAccount(PushChain.utils.account.toUniversal(address, { chain }))` gives it. + +### 1.c List an owner's wallets - `client.agentic.list` + +Lists the wallets owned by the connected signer. It takes no arguments and only reads the connected account. + +```tsx +// Function +const res = await client.agentic.list() + +// Usage and Params +const { wallets } = await client.agentic.list(); // the connected signer's wallets +// no params + +// Returns +// { wallets: Array<{ address, index, label, deployed, rulesCount }> } +{ + wallets: [ + { address: '0x2Fd9...', index: 0, label: 'aave-optimiser', deployed: true, rulesCount: 1 }, + { address: '0x81aB...', index: 1, label: '', deployed: false, rulesCount: 0 }, + ] +} +``` + +Client methods act on the connected account; reads about any other account live in `PushChain.utils`. If a read-only view is needed later (a marketplace or explorer page showing the wallets of an address with no signer), it becomes `PushChain.utils.agentic.wallets(owner: Address)` taking a Push address; an external owner passes its UEA. Not in v1. + +### 1.d Get a wallet handle - `client.agentic.wallet` + +Returns a handle for one wallet: the reads that are specific to an agentic wallet, plus the rule writes only an owner can do. It is not a client and never sends as the wallet. + +```tsx +// Function +const w = client.agentic.wallet(address) + +// Usage and Params +const w = client.agentic.wallet('0xWallet'); // handle for one wallet; nothing is sent +// address Address, required the AGW to manage, a Push address + +// Returns +// { address, info(), owner(), setLabel(), checkpoints(), rules.* } +{ + address: '0xWallet', + info, owner, setLabel, checkpoints, // 1.e to 1.h + rules: { list, get, add, update, revoke } // 1.i to 1.m +} +``` + +There is one way to send as the wallet: `PushChain.initialize(signer, { agenticWallet })` (section 2). The handle only manages. To send as the wallet, move funds, reach the wallet's CEA on another chain, or read balances, initialize with `agenticWallet` and use the normal account tooling: `sendTransaction`, `universal.read`, or viem and ethers against `client.universal.account`. That gives the owner the full `sendTransaction` with every route the SDK already has, the same receipts, and the wallet's CEA reachable exactly as it is for any other account. + +Balance reads are deliberately not on the handle: they are not agentic, and every account is read the same way. There is no `w.execute` for the same reason. The handle stays what its name says: management. + +### 1.e Read wallet info - `w.info` + +Returns the wallet's summary in one read: the fields `list()` shows for each wallet, plus the owner. It is how you read the label from the handle. + +```tsx +// Function +const info = await w.info() + +// Usage and Params +const { label, deployed } = await w.info(); // one wallet's summary +// no params + +// Returns +// { address, label, index, owner, deployed, rulesCount } +{ + address: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + label: 'aave-optimiser', + index: 0, + owner: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + deployed: true, + rulesCount: 1 +} +``` + +### 1.f Read the owner - `w.owner` + +Returns the owner's Push address, as the contract stores it. + +```tsx +// Function +const res = await w.owner() + +// Usage and Params +const { owner } = await w.owner(); // the Push address stored as owner +// no params + +// Returns +// { owner } +{ + owner: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9' +} +``` + +If the owner is a UEA and you need the controlling origin behind it (the chain and the external key), use `resolveControllerAccount` on the returned address. + +Page rule: identities going in and out of the agentic namespace are Push addresses (owner, agent, wallet). + +### 1.g Set the wallet label - `w.setLabel` + +**PROPOSED**, contract change, see [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 10. Changes the label shown in `list()` and `info()`; owner only. + +```tsx +// Function +const tx = await w.setLabel(label, { options? }) + +// Usage and Params +const tx = await w.setLabel('aave-optimiser-v2'); // rename the wallet +const tracked = await w.setLabel('aave-optimiser-v2', { progressHook: (p) => console.log(p.id) }); // with progress events +// label string, required the new label; stored by the contract and emitted in LabelSet +// options.progressHook function, optional progress events, AGENTIC-TX-106; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +{ + hash: '0x3b8d...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet + blockNumber: 1488n, + wait // await tx.wait() for the receipt; status lives on the receipt +} +``` + +Emits `LabelSet(string label)`. It is not a checkpoint: the label is cosmetic metadata and evaluators ignore it. Today the label can only be set once, at `deployWallet`, and is emitted in `WalletDeployed`. + +### 1.h Read checkpoints - `w.checkpoints` + +Every owner-side change the wallet has recorded: owner-door sends, rules granted, rules revoked. An evaluator reads these to know whether the owner changed anything after a job started (page 4). + +```tsx +// Function +const res = await w.checkpoints({ options? }) + +// Usage and Params +const all = await w.checkpoints(); // every checkpoint +const recent = await w.checkpoints({ sinceBlock: 1234n }); // from a block onward +// options.sinceBlock bigint, optional only checkpoints at or after this block; default all + +// Returns +// { checkpoints: Array<{ seq, kind, ref, blockNumber, txHash }> } +{ + checkpoints: [ + { seq: 3, kind: 'RULES_GRANTED', ref: '0x9c1e...', blockNumber: 1290n, txHash: '0x...' }, + { seq: 4, kind: 'OWNER_ACTION', ref: '0x5a7b...', blockNumber: 1402n, txHash: '0x...' }, + ] +} +``` + +### 1.i List rules - `w.rules.list` + +Returns every rule on the wallet as a decoded record, including what each rule has spent so far. + +```tsx +// Function +const res = await w.rules.list() + +// Usage and Params +const { rules } = await w.rules.list(); // the wallet's rules +// no params + +// Returns +// { rules: RulesRecord[] } +{ + rules: [ + { + rulesId: '0x9c1e...', + enabled: true, + chainNamespace: 'eip155:11155111', + agent: '0xAgentOnPush', + validUntil: 1767225600, + ref: '0x4a2f...', + rule: { /* decoded UniversalRule, as passed to create */ }, + spent: { kind: 'universal', amountSpent: 25000000n } // shape PROPOSED, see 3.b + } + ] +} +``` + +### 1.j Get one rule - `w.rules.get` + +Returns one rule by id, decoded, with what it has spent. + +```tsx +// Function +const record = await w.rules.get(rulesId) + +// Usage and Params +const record = await w.rules.get('0x9c1e...'); // one rule by id +// rulesId Hex, required the id returned by create or rules.add + +// Returns +// RulesRecord +{ + rulesId: '0x9c1e...', + enabled: true, + chainNamespace: 'eip155:11155111', + agent: '0xAgentOnPush', + validUntil: 1767225600, + ref: '0x4a2f...', + rule: { /* decoded UniversalRule */ }, + spent: { kind: 'universal', amountSpent: 25000000n } // shape PROPOSED, see 3.b +} +``` + +`spent` is a field on the record, so `get` and `list` both carry it. There is no separate spent call. + +### 1.k Add rules - `w.rules.add` + +Grants new rules on an existing wallet under one signature. The rules array comes first; `agent` and `ref` live on each rule. + +```tsx +// Function +const res = await w.rules.add(rules, { options? }) + +// Usage and Params +const one = await w.rules.add([nativeRule]); // one rule +const many = await w.rules.add([ruleOnSepolia, ruleOnPush]); // several rules, one signature +const tracked = await w.rules.add([nativeRule], { progressHook: (p) => console.log(p.id, p.message) }); // with progress events +// rules Rule[], required one per chain per agent; each rule carries its own agent and optional ref +// options.progressHook function, optional progress events, AGENTIC-TX-104; default none + +// Returns +// { rulesIds, tx } +{ + rulesIds: ['0x7d3a...'], // in the order of the rules you passed + tx: { // UniversalTxResponse + hash: '0x4c19...', + origin: 'eip155:11155111:0x31dC...', + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + blockNumber: 1501n, + wait + } +} +``` + +Records a `RULES_GRANTED` checkpoint. + +### 1.l Update rules - `w.rules.update` + +Replaces rules in a batch: each pair names one old rule and the one new rule that takes its place. + +```tsx +// Function +const res = await w.rules.update({ rules, progressHook? }) + +// Usage and Params +const one = await w.rules.update({ rules: [{ rulesId: '0x9c1e...', rule: newRule }] }); // replace one rule +const many = await w.rules.update({ rules: [{ rulesId: idA, rule: ruleA }, { rulesId: idB, rule: ruleB }] }); // replace several, one signature +const tracked = await w.rules.update({ rules: [{ rulesId: idA, rule: ruleA }], progressHook: (p) => console.log(p.id) }); // with progress events +// rules Array<{ rulesId, rule }>, required one old rule to one new rule per pair +// rules[].rulesId Hex, required the rule being replaced +// rules[].rule Rule, required the replacement; one rule per agent per chain still applies +// progressHook function, optional progress events, AGENTIC-TX-105 and 104; default none + +// Returns +// { rules: Array<{ rulesId, replaced }>, tx } +{ + rules: [ + { rulesId: '0x51c0...', replaced: '0x9c1e...' }, // new id, old id + ], + tx: { // UniversalTxResponse + hash: '0x7a02...', + origin: 'eip155:11155111:0x31dC...', + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + blockNumber: 1507n, + wait + } +} +``` + +Rules are immutable on-chain, so an update is a revoke plus a grant: for each pair the SDK asserts the old rule's spend, revokes it and grants the new one, all pairs in one multicall. The result is a new `rulesId` per pair, and the spend counters reset on the new rule: what the old rule had spent does not carry over. This is accepted for v1 (open item 1); an in-place update would be a contract change and there is no demand for it yet. + +### 1.m Revoke rules - `w.rules.revoke` + +Revokes some rules by id, or all of them in one atomic call. + +```tsx +// Function +const tx = await w.rules.revoke(rulesIds, { options? }) +const tx = await w.rules.revoke({ all, progressHook? }) + +// Usage and Params +const some = await w.rules.revoke(['0x9c1e...', '0x7d3a...']); // revoke these rules +const all = await w.rules.revoke({ all: true }); // revoke every rule, on-chain revokeAllRules +const tracked = await w.rules.revoke(['0x9c1e...'], { progressHook: (p) => console.log(p.id) }); // with progress events +// rulesIds Hex[], required unless all is set the rules to revoke +// options.progressHook function, optional progress events, AGENTIC-TX-105; default none +// all true, required unless rulesIds given revoke every rule on the wallet in one atomic call +// progressHook function, optional same events, in the { all: true } form; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +{ + hash: '0x8e01...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet + blockNumber: 1512n, + wait // await tx.wait() for the receipt; status lives on the receipt +} +``` + +A bare `revoke()` is not allowed and throws `REVOKE_NEEDS_TARGET`: a call with no argument that wipes every rule is too easy to make by mistake. Records `RULES_REVOKED` checkpoints. + +# 2. Agent side, by example + +There is no new method on the agent side. The agent uses its own signer and tells `initialize` which wallet to act through. It does not name a rule: which rule applies is decided per transaction, from the destination chain. + +### 2.a Act as the wallet - `PushChain.initialize` with `agenticWallet` (updated) + +Returns a client whose account is the wallet. Whether its sends go through the owner door or the agent door depends on who the signer is. + +```tsx +// Function +const client = await PushChain.initialize(signer, { options }) + +// Usage and Params +const agentClient = await PushChain.initialize(agentSigner, { // agent door: the signer is named as agent in a rule + network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET, + agenticWallet: '0xWallet', +}); +const ownerClient = await PushChain.initialize(ownerSigner, { // owner door: the signer owns the wallet + network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET, + agenticWallet: '0xWallet', +}); +``` + +`agentSigner` is any signer `initialize` accepts today. If the key lives on another chain, the SDK derives its UEA and everything goes through that, as it does for every external user. + +Which door the client uses depends on who the signer is. If the signer is the wallet's owner, sends go through the owner door: no rules, and every send is recorded as a checkpoint. If the signer is an address named as agent in one of the wallet's rules, sends go through the agent door and the rules apply. If it is neither, `initialize` throws `NOT_OWNER_OR_AGENT`. If the address has no wallet deployed yet it throws `WALLET_NOT_DEPLOYED`, and if the address is not an agentic wallet it throws `NOT_AGENTIC_WALLET`. This is also how an owner acts as the wallet with the full client: `PushChain.initialize(ownerSigner, { agenticWallet })`. There is one way to send as a wallet and the signer decides the door. + +On the agent door the SDK sends; URP on-chain is the only rule checker. Before sending, the SDK only looks up the `rulesId` for the destination chain: the rule that is enabled, whose `agent` equals the signer, and whose `chainNamespace` equals the destination. The lookup is one read on every send, not cached at initialize. If none is found it throws `NO_RULES_FOR_CHAIN` before any signature, so it costs nothing; otherwise it calls `executeAsAgent(rulesId, ...)` on the wallet. That is the agent door from D3 on [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md): there is no session validator, and the wallet only checks that `msg.sender` is the rule's agent. There is one rule per (agent, chain), so a signer and a destination match at most one rule. If the action breaks a rule, it reverts on-chain and the agent pays that gas. `sendTransaction` then throws `AgenticRevertError`, which extends core's `PushChainExecutionError` and carries URP's custom error in `decodedError`, so the agent sees which gate failed (3.f). + +From an external key, the call arrives through the agent's UEA. If the agent's UEA is not yet deployed, the first action takes the origin-chain fee lock once (minimum $1), which deploys the UEA and funds it with PC. Every later action requires PC in the UEA and is a direct Push transaction paid from that balance, with no origin transaction and no cross-chain wait. + +Two things for whoever runs the agent. The agent's UEA is a second balance to keep funded: the AGW's PC covers the wallet's outbound fees, not the agent's gas. And in `agenticWallet` mode the SDK turns `enforceGasCheck` on for every action except that one first action while the agent's UEA is not yet deployed, so an empty UEA fails loudly instead of silently falling back to a $1 origin lock and a confirmation wait on every action. + +Routing. In `agenticWallet` mode every send is wrapped as `executeAsAgent` (agent door) or `execute` (owner door), and for cross-chain legs the AGW itself calls the gateway. So the AGW's CEA executes on the destination and the AGW's PC pays as `msg.value`. The SDK never uses the signer's own Route 2, which would run through the agent's CEA instead of the wallet's. Any `from` (Routes 3 and 4) is rejected in `agenticWallet` mode with `FROM_NOT_ALLOWED`: it makes `msg.sender` a CEA, and the agent door check fails. + +What changes on the client in this mode: + +- `universal.account` is the wallet address string, so receipts show the AGW as `from`. `universal.origin` stays the signer's origin account. +- `getAccountStatus()` reports the signer's own UEA, not the wallet. +- The signer is whatever was passed to `initialize`. To top up the agent's UEA, find it with `PushChain.utils.account.deriveExecutorAccount(signer.account)` and send PC to it from a client initialized without `agenticWallet`. +- A Solana-keyed agent can act on Push and `eip155` destinations now, and on `solana:` destinations once the SVM rulebook ships. +- Agents read their own rules through `client.agentic.wallet(addr).rules.list()`. +- `tx.data` arrays and `tx.funds` (moving the AGW's PRC20) work as they do for any account. +- `payGasWith`, `migrateCEA`, `rescueFunds`, `prepareTransaction` and `executeTransactions` throw `NOT_ALLOWED_IN_AGENTIC_MODE`. + +```tsx +const tx = await agentClient.universal.sendTransaction({ // agent door, rule picked by the destination chain + to: { address: aavePool, chain: CHAIN.ETHEREUM_SEPOLIA }, + data: supplyData, +}); + +// tx: UniversalTxResponse +{ + hash: '0x6f2a...', + origin: 'eip155:11155111:0x7Be1...', // the agent's key, CAIP-10 + from: '0xWallet', // the AGW, not the signer + blockNumber: 1530n, + wait +} + +const receipt = await tx.wait(); +// receipt: UniversalTxReceipt +{ + status: 1, + hash: '0x6f2a...', + from: '0xWallet', + blockNumber: 1530n, + externalTxHash: '0x91c4...' // the leg executed by the AGW's CEA on Sepolia +} +``` + +The same EVM key initialized against two chains yields two UEAs (derived from namespace, chainId and owner), so the rule must name the UEA of the chain this client initializes against (see 1.b). + +# 3. Types + +### 3.a Client, options and namespace + +```tsx +type Address = `0x${string}`; +type Hex = `0x${string}`; +type ForeignChainNamespace = `eip155:${string}` | `solana:${string}`; +type ProgressHook = (p: ProgressEvent) => void; // ProgressEvent is core's shape: { id, title, message, level, response, timestamp } + +interface PushChainClient { + universal: UniversalNamespace; // in agenticWallet mode: account is the wallet + agentic: AgenticNamespace; // this page + market: MarketNamespace; // page 6 + job: JobNamespace; // page 7 + evaluation: EvaluationNamespace; // page 8 +} + +interface InitializeOptions { + network?: PUSH_NETWORK; + rpcUrls?: Partial>; + agenticWallet?: Address; // NEW: act as the wallet; door chosen by the signer's Push address + // enforceGasCheck is on when agenticWallet is set, except for the first action while the agent's UEA is not yet deployed (2.a) +} + +interface AgenticNamespace { + derive(opts?: { index?: number }): Promise<{ address: Address; index: number; deployed: boolean }>; + create(label: string, options: CreateOptions): Promise; + list(): Promise<{ wallets: WalletSummary[] }>; // connected signer only + wallet(address: Address): AgenticWallet; +} + +interface CreateOptions { + rules: Rule[]; // one entry per chain per agent, may be empty; each rule names its agent and optional ref + funds?: { amount: bigint; token: MoveableToken | Address }[]; // same shape as tx.funds, always an array + pc?: bigint; // native PC for outbound fees + progressHook?: ProgressHook; // AGENTIC-TX-1xx +} + +// No AgentKey type, no curve, no chain. The agent is a Push address. A native key is its own EOA; any external key +// (EVM, Solana, anything) is its UEA, deterministic from (chain, owner), deployed lazily on first use. The AGW's agent +// door checks msg.sender == rules.agent; cross-VM signature verification already happened inside the UEA (page 1, D3). + +interface CreateResult { wallet: Address; index: number; rulesIds: Hex[]; tx: UniversalTxResponse } +interface WalletSummary { address: Address; index: number; label: string; deployed: boolean; rulesCount: number } +``` + +### 3.b Rules + +```tsx +type Rule = NativeRule | UniversalRule; // chainNamespace decides the rulebook: omitted = native, foreign = universal + +interface NativeRule { + agent: Address; // Push address: EOA, or the UEA of an external key (PushChain.utils.account.deriveExecutorAccount) + ref?: Hex; // emitted in RulesGranted, not interpreted + chainNamespace?: never; // omitted = the connected Push chain + target: Address; + selector: Selector | 'value-only'; + validUntil: number; + maxValuePerCall?: bigint; maxValueTotal?: bigint; maxCalls?: number; + pins?: { arg: number; expected: Hex | Address | bigint }[]; + amount?: { arg: number; maxPerCall: bigint; maxTotal?: bigint }; +} + +interface UniversalRule { + agent: Address; // same as NativeRule.agent + ref?: Hex; // same as NativeRule.ref + chainNamespace: ForeignChainNamespace; // "eip155:..." now; "solana:..." once the SVM rulebook ships + asset: Address; // PRC20 on Push; SDK asserts its SOURCE_CHAIN_NAMESPACE + validUntil: number; + maxAmountPerCall: bigint; maxAmountTotal?: bigint; maxPCPerCall: bigint; + allowedCalls: AllowedCall[]; // 1..32, all on chainNamespace +} + +type Selector = Hex | `${string}(${string})`; // '0x617ba037' or 'supply(address,uint256,address,uint16)' + +interface AllowedCall { target: Address; selector: Selector; beneficiary?: number; maxValue?: bigint } // beneficiary = arg index + +interface RulesRecord { + rulesId: Hex; + enabled: boolean; + chainNamespace: string; + agent: Address; // the Push address granted + validUntil: number; + ref: Hex; + rule: Rule; // decoded terms; NativeRule or UniversalRule + spent: Spent; // carried by rules.get and rules.list; no separate call +} + +type Spent = { kind: 'universal'; amountSpent: bigint } | { kind: 'native'; valueSpent: bigint; amountSpent: bigint; callsUsed: number }; // PROPOSED: one self-describing object, readable without knowing the rulebook +``` + +### 3.c Wallet handle and checkpoints + +```tsx +interface AgenticWallet { + address: Address; + info(): Promise; + owner(): Promise<{ owner: Address }>; // Push address as stored + setLabel(label: string, opts?: { progressHook?: ProgressHook }): Promise; // PROPOSED, page 1 item 10 + checkpoints(opts?: { sinceBlock?: bigint }): Promise<{ checkpoints: Checkpoint[] }>; + rules: { + list(): Promise<{ rules: RulesRecord[] }>; + get(rulesId: Hex): Promise; + add(rules: Rule[], opts?: { progressHook?: ProgressHook }): Promise<{ rulesIds: Hex[]; tx: UniversalTxResponse }>; + update(params: { rules: { rulesId: Hex; rule: Rule }[]; progressHook?: ProgressHook }): Promise<{ rules: { rulesId: Hex; replaced: Hex }[]; tx: UniversalTxResponse }>; // revoke plus grant; spend counters reset + revoke(rulesIds: Hex[], opts?: { progressHook?: ProgressHook }): Promise; + revoke(params: { all: true; progressHook?: ProgressHook }): Promise; + }; +} + +interface WalletInfo { address: Address; label: string; index: number; owner: Address; deployed: boolean; rulesCount: number } + +interface Checkpoint { seq: number; kind: 'OWNER_ACTION' | 'RULES_GRANTED' | 'RULES_REVOKED'; ref: Hex; blockNumber: bigint; txHash: Hex } +``` + +### 3.d Constants, PushChain.CONSTANTS.AGENTIC (new) + +```tsx +PushChain.CONSTANTS.AGENTIC[PUSH_NETWORK.TESTNET_DONUT] = { + FACTORY, RULES_POLICY, // RULES_POLICY is URP; no validator address (page 1, D3) + MAX_PINS: 8, MAX_ALLOWED_CALLS: 32, ENVELOPE_VERSION: 1, +}; +``` + +### 3.e Helpers, PushChain.utils.agentic (new) + +Pure functions with the same output as the on-chain views. + +```tsx +PushChain.utils.agentic = { + rulesId(agent, chainNamespace, grantNonce), // the id a grant produces, same as the contract assigns + actionId(target, selector), // id of one allowed call: hash of its target and selector + configId(wallet, rulesId, actionId), // key of one allowed call's stored config, under one rule on one wallet + encodeRules(rules, ctx), // ctx = wallet and chain context needed to resolve beneficiary offsets + decodeRules(bytes), + deriveWallet(owner, index), // any-owner variant of client.agentic.derive + compileCard(card, userInput, ctx), // used by page 6; lives here because it produces Rule[] +}; +``` + +### 3.f Errors and progress + +```tsx +class AgenticError extends Error { code: string; hint?: string } +class AgenticRevertError extends PushChainExecutionError {} +// decoded custom error from the AGW, URP or the factory; uses core's fields: +// code string +// decodedError { name, hint, selector, decoded } + +// codes +// create: AGENT_IS_OWNER, DUPLICATE_RULE, TARGET_NOT_ON_RULE_CHAIN, ASSET_CHAIN_MISMATCH +// initialize (agenticWallet): NOT_OWNER_OR_AGENT, WALLET_NOT_DEPLOYED, NOT_AGENTIC_WALLET +// rules.revoke: REVOKE_NEEDS_TARGET (bare revoke) +// sendTransaction: NO_RULES_FOR_CHAIN, FROM_NOT_ALLOWED (any from, Routes 3 and 4) +// agentic mode: NOT_ALLOWED_IN_AGENTIC_MODE (prepareTransaction, executeTransactions, payGasWith, migrateCEA, rescueFunds) + +// progress events, AGENTIC-TX (PROPOSED) +// AGENTIC-TX-101 wallet derived { address, index, deployed } +// AGENTIC-TX-102 deploy step added +// AGENTIC-TX-103 funds and PC step added +// AGENTIC-TX-104 rules granted { rulesIds } +// AGENTIC-TX-105 rules revoked { rulesIds | all } +// AGENTIC-TX-106 label set +// AGENTIC-TX-107 rule resolved for a send { rulesId, chainNamespace, door } +// AGENTIC-TX-199-01 done +// AGENTIC-TX-199-02 failed { code, decodedError } +// The Push leg of any agentic send also emits core's SEND-TX-1xx events. +// A cross-chain leg sent by the AGW emits 209-xx and 299-xx, never 201 to 204 (the signer's own Route 2 is never used). +``` + +**PROPOSED:** the AGENTIC-TX event list. Every write (`create`, `setLabel`, `rules.add`, `rules.update`, `rules.revoke`) takes a per-call `progressHook`; a `progressHook` passed to `PushChain.initialize` runs alongside it, as in core. + +`NO_RULES_FOR_CHAIN` is thrown before any signature and costs nothing. The rules lookup is one read on every send, not cached at initialize. A URP revert is thrown from `sendTransaction` as `AgenticRevertError` and also lands as `decodedError` on AGENTIC-TX-199-02. A destination-chain revert after URP passed still counts the spend, because the spend is counted when the outbound leaves Push; whether it is credited back depends on [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 6 (`creditRevert`). + +# 4. Outside change: [PushChain.CONSTANTS.READ](http://PushChain.CONSTANTS.READ).CHAIN (confirmed 2026-09-28) + +Problem: `read()` takes `chain: PushChain.CONSTANTS.CHAIN.X`, but `CHAIN` is the set of blockchains the SDK signs for and routes to. Web2 is not one, so `CHAIN.WEB2` exists as a hidden (non-enumerable) member: it works if you know it is there and never appears in any listing. Reads have a wider domain than transactions: anything validators can observe. + +Change: a read-specific constant that is a superset of `CHAIN`. The field name stays `chain`, so nothing breaks, and `CHAIN` values remain valid because the strings are identical. + +```tsx +PushChain.CONSTANTS.READ.CHAIN = { + ...PushChain.CONSTANTS.CHAIN, // every real chain, same string values + WEB2: 'web2', // non-chain source, first-class here, enumerable +}; +type ReadChain = CHAIN | 'web2'; // ReadParams.chain: ReadChain + +read({ chain: PushChain.CONSTANTS.READ.CHAIN.WEB2, ... }) +read({ chain: PushChain.CONSTANTS.CHAIN.ETHEREUM_SEPOLIA, ... }) // still compiles +``` + +- `CHAIN.WEB2` becomes a deprecated alias of `READ.CHAIN.WEB2` for one release (the docs listed it on 2026-09-22), then goes. +- Anything that iterates `CHAIN` stops seeing a fake chain; anything that iterates `READ.CHAIN` sees every read source. +- The evaluator's `Read.chain` (page 8) takes the same values, so `READ.CHAIN` is the one constant the read SDK and the criteria compiler share. + +# 5. Open for review + +1. `rules.update` resets spend counters because it is revoke plus grant. Accepted for v1 and stated in 1.l; an in-place update is a contract change with no demand yet. +2. `setLabel` assumes [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 10 lands. Pointer for the team. \ No newline at end of file diff --git a/plan/agw/notion/history/20261003T075310278902Z/manifest-before.json b/plan/agw/notion/history/20261003T075310278902Z/manifest-before.json new file mode 100644 index 00000000..14756b2c --- /dev/null +++ b/plan/agw/notion/history/20261003T075310278902Z/manifest-before.json @@ -0,0 +1,176 @@ +{ + "schema_version": 1, + "snapshot_date": "2026-10-02", + "notes": "Page content preserved; known intra-export links normalized to local filenames. Comment threads excluded by Notion export. Null edit dates mean not observed. Original bundle retained.", + "sources": [ + { + "title": "AGW design overview", + "page_id": "3e9188aea7f481c8b38ccba332b0afa2", + "notion_url": "https://app.notion.com/p/pushprotocol/AGW-UniversalMarketplace-8183-UniversalEvaluator-3e9188aea7f481c8b38ccba332b0afa2", + "local_file": "notion/overview.md", + "pulled_on": "2026-10-02", + "observed_last_edited_date": "2026-10-01", + "authority": "Supporting design", + "sha256": "f2d7954e018324a937282ca190f397cc12a27973a07c891f3edfd6e89383c53e", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu 3e9188aea7f481c8b38ccba332b0afa2.md", + "raw_export_sha256": "99b727bd58cf588b2c766dc1b93eff402c47e918718b69c2a456b119ad43435b", + "archive": "notion/exports/20261002T133806744498Z/export-1.zip", + "pulled_at": "2026-10-02T13:38:06.744498+00:00" + }, + { + "title": "1 AGW Contract Changes", + "page_id": "3e9188aea7f4813aa31fc95ceb4e684d", + "notion_url": "https://app.notion.com/p/pushprotocol/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d", + "local_file": "notion/1-agw-contract-changes.md", + "pulled_on": "2026-10-02", + "observed_last_edited_date": "2026-10-01", + "authority": "WIP contract target", + "sha256": "22fa37bdd52e903c632760f4b7fa77cd7be89a7c5a124eba3f6866c00b5632c6", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/1 AGW Contract Changes (nomenclature standard + ch 3e9188aea7f4813aa31fc95ceb4e684d.md", + "raw_export_sha256": "22fa37bdd52e903c632760f4b7fa77cd7be89a7c5a124eba3f6866c00b5632c6", + "archive": "notion/exports/20261002T133806744498Z/export-1.zip", + "pulled_at": "2026-10-02T13:38:06.744498+00:00" + }, + { + "title": "2 Universal Marketplace", + "page_id": "3e9188aea7f48118b90ac9b267496295", + "notion_url": "https://app.notion.com/p/pushprotocol/2-Universal-Marketplace-3e9188aea7f48118b90ac9b267496295", + "local_file": "notion/2-universal-marketplace.md", + "pulled_on": "2026-10-02", + "observed_last_edited_date": null, + "authority": "Supporting WIP design", + "sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/2 Universal Marketplace 3e9188aea7f48118b90ac9b267496295.md", + "raw_export_sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18", + "archive": "notion/exports/20261002T133806744498Z/export-1.zip", + "pulled_at": "2026-10-02T13:38:06.744498+00:00" + }, + { + "title": "3 ERC-8183 job kernel and hook", + "page_id": "3e9188aea7f48188a838c3a740d8c858", + "notion_url": "https://app.notion.com/p/pushprotocol/3-8183-job-kernel-and-hook-3e9188aea7f48188a838c3a740d8c858", + "local_file": "notion/3-8183-job-kernel-and-hook.md", + "pulled_on": "2026-10-02", + "observed_last_edited_date": null, + "authority": "Supporting WIP design", + "sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/3 8183 (job kernel and hook) 3e9188aea7f48188a838c3a740d8c858.md", + "raw_export_sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90", + "archive": "notion/exports/20261002T133806744498Z/export-1.zip", + "pulled_at": "2026-10-02T13:38:06.744498+00:00" + }, + { + "title": "4 Universal Evaluation", + "page_id": "3e9188aea7f4817bb03ef4c78c883f8b", + "notion_url": "https://app.notion.com/p/pushprotocol/4-Universal-Evaluation-3e9188aea7f4817bb03ef4c78c883f8b", + "local_file": "notion/4-universal-evaluation.md", + "pulled_on": "2026-10-02", + "observed_last_edited_date": null, + "authority": "Supporting WIP design", + "sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/4 Universal Evaluation 3e9188aea7f4817bb03ef4c78c883f8b.md", + "raw_export_sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f", + "archive": "notion/exports/20261002T133806744498Z/export-1.zip", + "pulled_at": "2026-10-02T13:38:06.744498+00:00" + }, + { + "title": "5 SDK AGW", + "page_id": "3e9188aea7f481cf8e8de324956549b9", + "notion_url": "https://app.notion.com/p/pushprotocol/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9", + "local_file": "notion/5-sdk-agw.md", + "pulled_on": "2026-10-02", + "observed_last_edited_date": "2026-10-01", + "authority": "Primary SDK API target", + "sha256": "9ce90fb84826c989b4fec22066da0776121f9195e27bc6679aaac538995f4653", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/5 SDK AGW 3e9188aea7f481cf8e8de324956549b9.md", + "raw_export_sha256": "25293396ec37f3a48cd47178030d7d6eaa93094dc74ff80ffda3284bdd78021b", + "archive": "notion/exports/20261002T133806744498Z/export-1.zip", + "pulled_at": "2026-10-02T13:38:06.744498+00:00" + }, + { + "title": "6 SDK Universal Marketplace", + "page_id": "3ea188aea7f481e2961ed97129f3a4e6", + "notion_url": "https://app.notion.com/p/pushprotocol/6-SDK-Universal-Marketplace-3ea188aea7f481e2961ed97129f3a4e6", + "local_file": "notion/6-sdk-universal-marketplace.md", + "pulled_on": "2026-10-02", + "observed_last_edited_date": "2026-09-30", + "authority": "Supporting WIP SDK", + "sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/6 SDK Universal Marketplace 3ea188aea7f481e2961ed97129f3a4e6.md", + "raw_export_sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c", + "archive": "notion/exports/20261002T133806744498Z/export-1.zip", + "pulled_at": "2026-10-02T13:38:06.744498+00:00" + }, + { + "title": "7 SDK ERC-8183 Job", + "page_id": "3ea188aea7f481e0a137f5a896723376", + "notion_url": "https://app.notion.com/p/pushprotocol/7-SDK-8183-Job-3ea188aea7f481e0a137f5a896723376", + "local_file": "notion/7-sdk-8183-job.md", + "pulled_on": "2026-10-02", + "observed_last_edited_date": null, + "authority": "Supporting WIP SDK", + "sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/7 SDK 8183 Job 3ea188aea7f481e0a137f5a896723376.md", + "raw_export_sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c", + "archive": "notion/exports/20261002T133806744498Z/export-1.zip", + "pulled_at": "2026-10-02T13:38:06.744498+00:00" + }, + { + "title": "8 SDK Universal Evaluation", + "page_id": "3ea188aea7f48197a3b3cfdedfa74fee", + "notion_url": "https://app.notion.com/p/pushprotocol/8-SDK-Universal-Evaluation-3ea188aea7f48197a3b3cfdedfa74fee", + "local_file": "notion/8-sdk-universal-evaluation.md", + "pulled_on": "2026-10-02", + "observed_last_edited_date": null, + "authority": "Supporting WIP SDK", + "sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/8 SDK Universal Evaluation 3ea188aea7f48197a3b3cfdedfa74fee.md", + "raw_export_sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e", + "archive": "notion/exports/20261002T133806744498Z/export-1.zip", + "pulled_at": "2026-10-02T13:38:06.744498+00:00" + }, + { + "title": "Legacy PUSH AGW SDK Doc v1", + "page_id": "d2d188aea7f4825cbcea81ef86eca607", + "notion_url": "https://app.notion.com/p/pushprotocol/PUSH-AGW-SDK-Doc-v1-d2d188aea7f4825cbcea81ef86eca607", + "local_file": "notion/legacy-agw-sdk-v1.md", + "pulled_on": "2026-10-02", + "observed_last_edited_date": "2026-09-22", + "authority": "Historical encoding and deployment reference", + "sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916", + "raw_export_sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916", + "pulled_at": "2026-10-02T13:38:06.744498+00:00", + "archive": "notion/exports/20261002T133806744498Z/export-2.zip", + "export_entry": "Private & Shared/PUSH AGW SDK Doc - v1 d2d188aea7f4825cbcea81ef86eca607.md" + }, + { + "title": "AGW Address Book PC Donut", + "page_id": "3d1188aea7f480ddbb4af6d0efb211e6", + "notion_url": "https://app.notion.com/p/pushprotocol/AGW-Address-Book-PC-Donut-3d1188aea7f480ddbb4af6d0efb211e6", + "local_file": "notion/agw-address-book-donut-2026-09-04.md", + "pulled_on": "2026-10-02", + "observed_last_edited_date": "2026-09-04", + "authority": "Historical deployment", + "sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742", + "raw_export_sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742", + "pulled_at": "2026-10-02T13:38:06.744498+00:00", + "archive": "notion/exports/20261002T133806744498Z/export-3.zip", + "export_entry": "Private & Shared/AGW Address Book - PC Donut 3d1188aea7f480ddbb4af6d0efb211e6.md" + }, + { + "title": "Agentic wallet flow updated", + "page_id": "3d1188aea7f4801f9cb3fbd9318ec536", + "notion_url": "https://app.notion.com/p/pushprotocol/agentic_wallet_flow-updated-3d1188aea7f4801f9cb3fbd9318ec536", + "local_file": "notion/agentic-wallet-flow-2026-09-07.md", + "pulled_on": "2026-10-02", + "observed_last_edited_date": "2026-09-07", + "authority": "Historical validator-based flow", + "sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0", + "raw_export_sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0", + "pulled_at": "2026-10-02T13:38:06.744498+00:00", + "archive": "notion/exports/20261002T133806744498Z/export-4.zip", + "export_entry": "Private & Shared/agentic_wallet_flow ( updated ) 3d1188aea7f4801f9cb3fbd9318ec536.md" + } + ], + "last_refresh_at": "2026-10-02T13:38:06.744498+00:00" +} diff --git a/plan/agw/notion/history/20261003T075310278902Z/refresh.json b/plan/agw/notion/history/20261003T075310278902Z/refresh.json new file mode 100644 index 00000000..b0897513 --- /dev/null +++ b/plan/agw/notion/history/20261003T075310278902Z/refresh.json @@ -0,0 +1,124 @@ +{ + "run_id": "20261003T075310278902Z", + "pulled_at": "2026-10-03T07:53:10.278902+00:00", + "complete": true, + "missing_page_ids": [], + "unknown_export_entries": [], + "archives": [ + "notion/exports/20261003T075310278902Z/export-1.zip", + "notion/exports/20261003T075310278902Z/export-2.zip", + "notion/exports/20261003T075310278902Z/export-3.zip", + "notion/exports/20261003T075310278902Z/export-4.zip" + ], + "pages": [ + { + "page_id": "3e9188aea7f481c8b38ccba332b0afa2", + "title": "AGW design overview", + "local_file": "notion/overview.md", + "changed": false, + "previous_sha256": "f2d7954e018324a937282ca190f397cc12a27973a07c891f3edfd6e89383c53e", + "sha256": "f2d7954e018324a937282ca190f397cc12a27973a07c891f3edfd6e89383c53e", + "raw_export_sha256": "99b727bd58cf588b2c766dc1b93eff402c47e918718b69c2a456b119ad43435b" + }, + { + "page_id": "3e9188aea7f4813aa31fc95ceb4e684d", + "title": "1 AGW Contract Changes", + "local_file": "notion/1-agw-contract-changes.md", + "changed": true, + "previous_sha256": "22fa37bdd52e903c632760f4b7fa77cd7be89a7c5a124eba3f6866c00b5632c6", + "sha256": "f1301d8ff1cf370968b90a3d53037ece8fa4c6783c45a402f9be6998928e3631", + "raw_export_sha256": "f1301d8ff1cf370968b90a3d53037ece8fa4c6783c45a402f9be6998928e3631" + }, + { + "page_id": "3e9188aea7f48118b90ac9b267496295", + "title": "2 Universal Marketplace", + "local_file": "notion/2-universal-marketplace.md", + "changed": false, + "previous_sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18", + "sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18", + "raw_export_sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18" + }, + { + "page_id": "3e9188aea7f48188a838c3a740d8c858", + "title": "3 ERC-8183 job kernel and hook", + "local_file": "notion/3-8183-job-kernel-and-hook.md", + "changed": false, + "previous_sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90", + "sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90", + "raw_export_sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90" + }, + { + "page_id": "3e9188aea7f4817bb03ef4c78c883f8b", + "title": "4 Universal Evaluation", + "local_file": "notion/4-universal-evaluation.md", + "changed": false, + "previous_sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f", + "sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f", + "raw_export_sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f" + }, + { + "page_id": "3e9188aea7f481cf8e8de324956549b9", + "title": "5 SDK AGW", + "local_file": "notion/5-sdk-agw.md", + "changed": true, + "previous_sha256": "9ce90fb84826c989b4fec22066da0776121f9195e27bc6679aaac538995f4653", + "sha256": "e407ee77cdf874db7ef4697f84e9945ff3a12a2f2e07e8a7f90bd24e93ea32f1", + "raw_export_sha256": "9a16f8aed79fac09818ec216fb4c69dc79f2fa0cffe0af611af956eb0e69f33f" + }, + { + "page_id": "3ea188aea7f481e2961ed97129f3a4e6", + "title": "6 SDK Universal Marketplace", + "local_file": "notion/6-sdk-universal-marketplace.md", + "changed": false, + "previous_sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c", + "sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c", + "raw_export_sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c" + }, + { + "page_id": "3ea188aea7f481e0a137f5a896723376", + "title": "7 SDK ERC-8183 Job", + "local_file": "notion/7-sdk-8183-job.md", + "changed": false, + "previous_sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c", + "sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c", + "raw_export_sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c" + }, + { + "page_id": "3ea188aea7f48197a3b3cfdedfa74fee", + "title": "8 SDK Universal Evaluation", + "local_file": "notion/8-sdk-universal-evaluation.md", + "changed": false, + "previous_sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e", + "sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e", + "raw_export_sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e" + }, + { + "page_id": "d2d188aea7f4825cbcea81ef86eca607", + "title": "Legacy PUSH AGW SDK Doc v1", + "local_file": "notion/legacy-agw-sdk-v1.md", + "changed": false, + "previous_sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916", + "sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916", + "raw_export_sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916" + }, + { + "page_id": "3d1188aea7f480ddbb4af6d0efb211e6", + "title": "AGW Address Book PC Donut", + "local_file": "notion/agw-address-book-donut-2026-09-04.md", + "changed": false, + "previous_sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742", + "sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742", + "raw_export_sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742" + }, + { + "page_id": "3d1188aea7f4801f9cb3fbd9318ec536", + "title": "Agentic wallet flow updated", + "local_file": "notion/agentic-wallet-flow-2026-09-07.md", + "changed": false, + "previous_sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0", + "sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0", + "raw_export_sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0" + } + ], + "review_status": "Review required" +} diff --git a/plan/agw/notion/history/20261007T102718466408Z/5-sdk-agw.diff b/plan/agw/notion/history/20261007T102718466408Z/5-sdk-agw.diff new file mode 100644 index 00000000..17d35d7a --- /dev/null +++ b/plan/agw/notion/history/20261007T102718466408Z/5-sdk-agw.diff @@ -0,0 +1,10 @@ +--- notion/5-sdk-agw.md (previous) ++++ notion/5-sdk-agw.md (refreshed) +@@ -99,7 +99,6 @@ + const created = await client.agentic.create('aave-optimiser', { // wallet with one cross-chain rule + rules: [{ // one entry per chain per agent + agent: '0xAgentOnPush', // a Push address: the agent's EOA, or its UEA if the key lives on another chain. Never the owner +- ref: jobRef, // emitted in RulesGranted, not interpreted + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, // foreign chain => universal rulebook + assets: [ + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, maxPerCall: parseUnits('100', 6), maxTotal: parseUnits('1000', 6) }, diff --git a/plan/agw/notion/history/20261007T102718466408Z/5-sdk-agw.md b/plan/agw/notion/history/20261007T102718466408Z/5-sdk-agw.md new file mode 100644 index 00000000..823222c1 --- /dev/null +++ b/plan/agw/notion/history/20261007T102718466408Z/5-sdk-agw.md @@ -0,0 +1,732 @@ +# 5. SDK: AGW + + + +# List of changes + +New + +- `client.agentic.derive` +- `client.agentic.create` +- `client.agentic.list` +- `client.agentic.wallet`, + - a management handle with + - `info`, + - `owner`, + - `setLabel` (PROPOSED), + - `checkpoints`, + - `rules.list`, + - `rules.get`, + - `rules.add`, + - `rules.update`, + - `rules.revoke` +- `PushChain.CONSTANTS.AGENTIC` +- `PushChain.utils.agentic` + +Updated + +- `PushChain.initialize`, new option `agenticWallet` +- `PushChain.CONSTANTS.READ.CHAIN`, outside change confirmed 2026-09-28 + +Initialize is unchanged on the owner side: + +```tsx +const client = await PushChain.initialize(universalSigner, { network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET }); +``` + +| Signer | Door | Rules checked | +| --- | --- | --- | +| The wallet's owner | Owner door (`execute`) | No. Every send is recorded as a checkpoint | +| An address named as `agent` in one of the wallet's rules | Agent door (`executeAsAgent`) | Yes, by URP (UniversalRulesPolicy, the on-chain rule checker) | +| Anyone else | None | Never reached: `initialize` throws `NOT_OWNER_OR_AGENT` | + +An agentic wallet involves three parties, and it helps to have them straight before reading the functions. + +The **owner** is whoever created the wallet. When the owner sends through the wallet, no rules are checked; this is called the owner door, and the contract records every such action as a checkpoint so that an evaluator can later tell whether the owner touched anything mid-job. + +The **agent** is the address the owner allows to act on its behalf. It is always a Push address. If the agent's key is a Push EOA, that EOA is the agent. If the key lives on another chain (an EVM key on Ethereum, a Solana key, anything else), the agent is that key's UEA on Push, which exists deterministically for every external key. The SDK never asks for a curve, a chain or a key type. When the agent sends through the wallet, the rules are checked; this is the agent door. + +The **rules** say what an agent may do. Each rule names its agent and its destination chain, and there is one rule per chain per agent, so a wallet can have one agent for Ethereum and a different one for Solana. The `chainNamespace` on a rule decides which rulebook applies: leave it out and the rule governs calls on Push itself; set it to an `eip155` or `solana` chain and the rule governs cross-chain calls to that chain. + +Two ways to touch a wallet from the SDK. `PushChain.initialize(signer, { agenticWallet })` returns a client that acts as the wallet, and whether it goes through the owner door or the agent door depends on who the signer is. `client.agentic.wallet(address)` returns a handle for managing the wallet (rules, label, checkpoints) and never sends as it. + +# 1. Owner side, by example + +The owner side is everything the person who owns the wallet does: create it, fund it, write and revoke the rules, look at what happened. The agent side (section 2) is what the agent does: act through the wallet within those rules. + +### 1.a Derive an agentic wallet address - `client.agentic.derive` + +Gives you the address a wallet will have before it is deployed. The address depends only on the owner and an index. + +```tsx +// Function +const first = await client.agentic.derive({ options? }) + +// Usage and Params +const next = await client.agentic.derive(); // the owner's next wallet +const first = await client.agentic.derive({ index: 0 }); // a specific slot +// options.index number, optional which wallet slot to derive; default is the owner's next unused index + +// Returns +// { address, index, deployed } +{ + address: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + index: 0, + deployed: false +} +``` + +Because the address depends only on the owner and an index, it is the same whether you deploy first or later. That lets you send funds to it first (from any chain) and deploy afterwards, or show the address in a UI before anything is on-chain. Same idea as `deriveExecutorAccount` for a UEA. + +### 1.b Create an agentic wallet - `client.agentic.create` + +Deploys the wallet and grants the rules. The label is the only wallet-level input; the agent and an optional `ref` are named on each rule, because that is where the contract binds them. + +```tsx +// Function +const created = await client.agentic.create(label, { options }) + +// Usage and Params +const created = await client.agentic.create('aave-optimiser', { // wallet with one cross-chain rule + rules: [{ // one entry per chain per agent + agent: '0xAgentOnPush', // a Push address: the agent's EOA, or its UEA if the key lives on another chain. Never the owner + ref: jobRef, // emitted in RulesGranted, not interpreted + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, // foreign chain => universal rulebook + assets: [ + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, maxPerCall: parseUnits('100', 6), maxTotal: parseUnits('1000', 6) }, + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.WETH, maxPerCall: parseUnits('0.5', 18) }, + ], + maxGasPerCall: parseUnits('1', 18), // PC (wei) per outbound for the destination leg + validUntil: now + 30 * 86400, + allowedCalls: [ + { target: aavePool, selector: 'supply(address,uint256,address,uint16)', beneficiary: 2 }, // arg index, not offset: onBehalfOf must be the AGW's CEA + { target: usdcSepolia, selector: 'approve(address,uint256)' }, + ], + }], + progressHook: (p) => console.log(p.id, p.message), // AGENTIC-TX-1xx +}); +const bare = await client.agentic.create('scratch', { rules: [] }); // wallet first, rules later with rules.add +// label string, required shown in list() and info(); the contract stores it +// options.rules Rule[], required one per chain per agent, may be empty; each rule carries its own agent and optional ref +// options.progressHook function, optional progress events, AGENTIC-TX-1xx; default none +// rules[].agent Address, required the Push address allowed to act under this rule; never the owner +// rules[].ref Hex, optional emitted in RulesGranted, not interpreted; default zero +// rules[].assets AssetCap[], required on a universal rule tokens the agent may move, as the other chain's address (MOVEABLE constants); the SDK resolves each to its PRC20 on Push; each cap is { token, maxPerCall, maxTotal? } +// rules[].maxGasPerCall bigint, required on a universal rule PC (wei) the wallet may spend per outbound for the destination leg + +// Returns +// { wallet, index, rulesIds, tx } +{ + wallet: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + index: 0, + rulesIds: ['0x9c1e...'], // in the order of the rules you passed; empty for rules: [] + tx: { // UniversalTxResponse + hash: '0xb527...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + blockNumber: 1290n, + wait // await tx.wait() for the receipt; status lives on the receipt + } +} +``` + +One rule per chain per agent. A wallet may have different agents on different chains. If an agent needs to act on two chains, `rules` has two entries with the same `agent`; two agents on one chain are two entries with the same `chainNamespace`. Nobody states a rule type; the SDK reads it from `chainNamespace`. `rules: []` is allowed: create the wallet first and grant rules later with `rules.add` (1.k). + +Before asking for a signature the SDK checks that no rule's agent is the owner (`AGENT_IS_OWNER`), that no two rules share both agent and chain (`DUPLICATE_RULE`), that every `allowedCalls[].target` is on the rule's chain (`TARGET_NOT_ON_RULE_CHAIN`), and that every `assets[].token` resolves to a PRC20 whose `SOURCE_CHAIN_NAMESPACE` matches the rule's chain (`ASSET_CHAIN_MISMATCH`). + +Under the hood this is `deployWallet` (or reuse of a derived address) and one `grantRules` per rule. For an external owner they go as one UEA multicall under one signature. Funding is not part of `create`: the wallet is a normal Push account, so send tokens and PC to its address the way you would to any account (1.a shows the address before deployment). + +For a Push EOA owner the same thing needs a batching entry on the factory, because core rejects multicall from a Push-native sender: [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 11, **PROPOSED** (`createWallet(label, rules[])` on the factory). Until it lands the SDK sends deploy and grant as separate transactions and says so through progress events (AGENTIC-TX-102 and 104); `tx` is then the last of them. + +A `progressHook` passed to `PushChain.initialize` receives the same events alongside the per-call one, as in core. + +Warning for an agent whose key lives on another chain: the same EVM key initialized against two chains yields two UEAs, because a UEA is derived from namespace, chainId and owner. Grant the rule to the UEA of the chain the agent will run against. `PushChain.utils.account.deriveExecutorAccount(PushChain.utils.account.toUniversal(address, { chain }))` gives it. + +### 1.c List an owner's wallets - `client.agentic.list` + +Lists the wallets owned by the connected signer. It takes no arguments and only reads the connected account. + +```tsx +// Function +const res = await client.agentic.list() + +// Usage and Params +const { wallets } = await client.agentic.list(); // the connected signer's wallets +// no params + +// Returns +// { wallets: Array<{ address, index, label, deployed, rulesCount }> } +{ + wallets: [ + { address: '0x2Fd9...', index: 0, label: 'aave-optimiser', deployed: true, rulesCount: 1 }, + { address: '0x81aB...', index: 1, label: '', deployed: false, rulesCount: 0 }, + ] +} +``` + +Client methods act on the connected account; reads about any other account live in `PushChain.utils`. If a read-only view is needed later (a marketplace or explorer page showing the wallets of an address with no signer), it becomes `PushChain.utils.agentic.wallets(owner: Address)` taking a Push address; an external owner passes its UEA. Not in v1. + +### 1.d Get a wallet handle - `client.agentic.wallet` + +Returns a handle for one wallet: the reads that are specific to an agentic wallet, plus the rule writes only an owner can do. It is not a client and never sends as the wallet. + +```tsx +// Function +const w = client.agentic.wallet(address) + +// Usage and Params +const w = client.agentic.wallet('0xWallet'); // handle for one wallet; nothing is sent +// address Address, required the AGW to manage, a Push address + +// Returns +// { address, info(), owner(), setLabel(), checkpoints(), rules.* } +{ + address: '0xWallet', + info, owner, setLabel, checkpoints, // 1.e to 1.h + rules: { list, get, add, update, revoke } // 1.i to 1.m +} +``` + +There is one way to send as the wallet: `PushChain.initialize(signer, { agenticWallet })` (section 2). The handle only manages. To send as the wallet, move funds, reach the wallet's CEA on another chain, or read balances, initialize with `agenticWallet` and use the normal account tooling: `sendTransaction`, `universal.read`, or viem and ethers against `client.universal.account`. That gives the owner the full `sendTransaction` with every route the SDK already has, the same receipts, and the wallet's CEA reachable exactly as it is for any other account. + +Balance reads are deliberately not on the handle: they are not agentic, and every account is read the same way. There is no `w.execute` for the same reason. The handle stays what its name says: management. + +### 1.e Read wallet info - `w.info` + +Returns the wallet's summary in one read: the fields `list()` shows for each wallet, plus the owner. It is how you read the label from the handle. + +```tsx +// Function +const info = await w.info() + +// Usage and Params +const { label, deployed } = await w.info(); // one wallet's summary +// no params + +// Returns +// { address, label, index, owner, deployed, rulesCount } +{ + address: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + label: 'aave-optimiser', + index: 0, + owner: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + deployed: true, + rulesCount: 1 +} +``` + +### 1.f Read the owner - `w.owner` + +Returns the owner's Push address, as the contract stores it. + +```tsx +// Function +const res = await w.owner() + +// Usage and Params +const { owner } = await w.owner(); // the Push address stored as owner +// no params + +// Returns +// { owner } +{ + owner: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9' +} +``` + +If the owner is a UEA and you need the controlling origin behind it (the chain and the external key), use `resolveControllerAccount` on the returned address. + +Page rule: identities going in and out of the agentic namespace are Push addresses (owner, agent, wallet). + +### 1.g Set the wallet label - `w.setLabel` + +**PROPOSED**, contract change, see [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 10. Changes the label shown in `list()` and `info()`; owner only. + +```tsx +// Function +const tx = await w.setLabel(label, { options? }) + +// Usage and Params +const tx = await w.setLabel('aave-optimiser-v2'); // rename the wallet +const tracked = await w.setLabel('aave-optimiser-v2', { progressHook: (p) => console.log(p.id) }); // with progress events +// label string, required the new label; stored by the contract and emitted in LabelSet +// options.progressHook function, optional progress events, AGENTIC-TX-106; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +{ + hash: '0x3b8d...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet + blockNumber: 1488n, + wait // await tx.wait() for the receipt; status lives on the receipt +} +``` + +Emits `LabelSet(string label)`. It is not a checkpoint: the label is cosmetic metadata and evaluators ignore it. Today the label can only be set once, at `deployWallet`, and is emitted in `WalletDeployed`. + +### 1.h Read checkpoints - `w.checkpoints` + +Every owner-side change the wallet has recorded: owner-door sends, rules granted, rules revoked. An evaluator reads these to know whether the owner changed anything after a job started (page 4). + +```tsx +// Function +const res = await w.checkpoints({ options? }) + +// Usage and Params +const all = await w.checkpoints(); // every checkpoint +const recent = await w.checkpoints({ sinceBlock: 1234n }); // from a block onward +// options.sinceBlock bigint, optional only checkpoints at or after this block; default all + +// Returns +// { checkpoints: Array<{ seq, kind, ref, blockNumber, txHash }> } +{ + checkpoints: [ + { seq: 3, kind: 'RULES_GRANTED', ref: '0x9c1e...', blockNumber: 1290n, txHash: '0x...' }, + { seq: 4, kind: 'OWNER_ACTION', ref: '0x5a7b...', blockNumber: 1402n, txHash: '0x...' }, + ] +} +``` + +### 1.i List rules - `w.rules.list` + +Returns every rule on the wallet as a decoded record, including what each rule has spent so far. + +```tsx +// Function +const res = await w.rules.list() + +// Usage and Params +const { rules } = await w.rules.list(); // the wallet's rules +// no params + +// Returns +// { rules: RulesRecord[] } +{ + rules: [ + { + rulesId: '0x9c1e...', + enabled: true, + chainNamespace: 'eip155:11155111', + agent: '0xAgentOnPush', + validUntil: 1767225600, + ref: '0x4a2f...', + rule: { /* decoded UniversalRule, as passed to create */ }, + spent: { kind: 'universal', amountSpent: 25000000n } // shape PROPOSED, see 3.b + } + ] +} +``` + +### 1.j Get one rule - `w.rules.get` + +Returns one rule by id, decoded, with what it has spent. + +```tsx +// Function +const record = await w.rules.get(rulesId) + +// Usage and Params +const record = await w.rules.get('0x9c1e...'); // one rule by id +// rulesId Hex, required the id returned by create or rules.add + +// Returns +// RulesRecord +{ + rulesId: '0x9c1e...', + enabled: true, + chainNamespace: 'eip155:11155111', + agent: '0xAgentOnPush', + validUntil: 1767225600, + ref: '0x4a2f...', + rule: { /* decoded UniversalRule */ }, + spent: { kind: 'universal', amountSpent: 25000000n } // shape PROPOSED, see 3.b +} +``` + +`spent` is a field on the record, so `get` and `list` both carry it. There is no separate spent call. + +### 1.k Add rules - `w.rules.add` + +Grants new rules on an existing wallet under one signature. The rules array comes first; `agent` and `ref` live on each rule. + +```tsx +// Function +const res = await w.rules.add(rules, { options? }) + +// Usage and Params +const one = await w.rules.add([nativeRule]); // one rule +const many = await w.rules.add([ruleOnSepolia, ruleOnPush]); // several rules, one signature +const tracked = await w.rules.add([nativeRule], { progressHook: (p) => console.log(p.id, p.message) }); // with progress events +// rules Rule[], required one per chain per agent; each rule carries its own agent and optional ref +// options.progressHook function, optional progress events, AGENTIC-TX-104; default none + +// Returns +// { rulesIds, tx } +{ + rulesIds: ['0x7d3a...'], // in the order of the rules you passed + tx: { // UniversalTxResponse + hash: '0x4c19...', + origin: 'eip155:11155111:0x31dC...', + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + blockNumber: 1501n, + wait + } +} +``` + +Records a `RULES_GRANTED` checkpoint. + +### 1.l Update rules - `w.rules.update` + +Replaces rules in a batch: each pair names one old rule and the one new rule that takes its place. + +```tsx +// Function +const res = await w.rules.update({ rules, progressHook? }) + +// Usage and Params +const one = await w.rules.update({ rules: [{ rulesId: '0x9c1e...', rule: newRule }] }); // replace one rule +const many = await w.rules.update({ rules: [{ rulesId: idA, rule: ruleA }, { rulesId: idB, rule: ruleB }] }); // replace several, one signature +const tracked = await w.rules.update({ rules: [{ rulesId: idA, rule: ruleA }], progressHook: (p) => console.log(p.id) }); // with progress events +// rules Array<{ rulesId, rule }>, required one old rule to one new rule per pair +// rules[].rulesId Hex, required the rule being replaced +// rules[].rule Rule, required the replacement; one rule per agent per chain still applies +// progressHook function, optional progress events, AGENTIC-TX-105 and 104; default none + +// Returns +// { rules: Array<{ rulesId, replaced }>, tx } +{ + rules: [ + { rulesId: '0x51c0...', replaced: '0x9c1e...' }, // new id, old id + ], + tx: { // UniversalTxResponse + hash: '0x7a02...', + origin: 'eip155:11155111:0x31dC...', + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + blockNumber: 1507n, + wait + } +} +``` + +Rules are immutable on-chain, so an update is a revoke plus a grant: for each pair the SDK asserts the old rule's spend, revokes it and grants the new one, all pairs in one multicall. The result is a new `rulesId` per pair, and the spend counters reset on the new rule: what the old rule had spent does not carry over. This is accepted for v1 (open item 1); an in-place update would be a contract change and there is no demand for it yet. + +### 1.m Revoke rules - `w.rules.revoke` + +Revokes some rules by id, or all of them in one atomic call. + +```tsx +// Function +const tx = await w.rules.revoke(rulesIds, { options? }) +const tx = await w.rules.revoke({ all, progressHook? }) + +// Usage and Params +const some = await w.rules.revoke(['0x9c1e...', '0x7d3a...']); // revoke these rules +const all = await w.rules.revoke({ all: true }); // revoke every rule, on-chain revokeAllRules +const tracked = await w.rules.revoke(['0x9c1e...'], { progressHook: (p) => console.log(p.id) }); // with progress events +// rulesIds Hex[], required unless all is set the rules to revoke +// options.progressHook function, optional progress events, AGENTIC-TX-105; default none +// all true, required unless rulesIds given revoke every rule on the wallet in one atomic call +// progressHook function, optional same events, in the { all: true } form; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +{ + hash: '0x8e01...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet + blockNumber: 1512n, + wait // await tx.wait() for the receipt; status lives on the receipt +} +``` + +A bare `revoke()` is not allowed and throws `REVOKE_NEEDS_TARGET`: a call with no argument that wipes every rule is too easy to make by mistake. Records `RULES_REVOKED` checkpoints. + +# 2. Agent side, by example + +There is no new method on the agent side. The agent uses its own signer and tells `initialize` which wallet to act through. It does not name a rule: which rule applies is decided per transaction, from the destination chain. + +### 2.a Act as the wallet - `PushChain.initialize` with `agenticWallet` (updated) + +Returns a client whose account is the wallet. Whether its sends go through the owner door or the agent door depends on who the signer is. + +```tsx +// Function +const client = await PushChain.initialize(signer, { options }) + +// Usage and Params +const agentClient = await PushChain.initialize(agentSigner, { // agent door: the signer is named as agent in a rule + network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET, + agenticWallet: '0xWallet', +}); +const ownerClient = await PushChain.initialize(ownerSigner, { // owner door: the signer owns the wallet + network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET, + agenticWallet: '0xWallet', +}); +``` + +`agentSigner` is any signer `initialize` accepts today. If the key lives on another chain, the SDK derives its UEA and everything goes through that, as it does for every external user. + +Which door the client uses depends on who the signer is. If the signer is the wallet's owner, sends go through the owner door: no rules, and every send is recorded as a checkpoint. If the signer is an address named as agent in one of the wallet's rules, sends go through the agent door and the rules apply. If it is neither, `initialize` throws `NOT_OWNER_OR_AGENT`. If the address has no wallet deployed yet it throws `WALLET_NOT_DEPLOYED`, and if the address is not an agentic wallet it throws `NOT_AGENTIC_WALLET`. This is also how an owner acts as the wallet with the full client: `PushChain.initialize(ownerSigner, { agenticWallet })`. There is one way to send as a wallet and the signer decides the door. + +On the agent door the SDK sends; URP on-chain is the only rule checker. Before sending, the SDK only looks up the `rulesId` for the destination chain: the rule that is enabled, whose `agent` equals the signer, and whose `chainNamespace` equals the destination. The lookup is one read on every send, not cached at initialize. If none is found it throws `NO_RULES_FOR_CHAIN` before any signature, so it costs nothing; otherwise it calls `executeAsAgent(rulesId, ...)` on the wallet. That is the agent door from D3 on [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md): there is no session validator, and the wallet only checks that `msg.sender` is the rule's agent. There is one rule per (agent, chain), so a signer and a destination match at most one rule. If the action breaks a rule, it reverts on-chain and the agent pays that gas. `sendTransaction` then throws `AgenticRevertError`, which extends core's `PushChainExecutionError` and carries URP's custom error in `decodedError`, so the agent sees which gate failed (3.f). + +From an external key, the call arrives through the agent's UEA. If the agent's UEA is not yet deployed, the first action takes the origin-chain fee lock once (minimum $1), which deploys the UEA and funds it with PC. Every later action requires PC in the UEA and is a direct Push transaction paid from that balance, with no origin transaction and no cross-chain wait. + +Two things for whoever runs the agent. The agent's UEA is a second balance to keep funded: the AGW's PC covers the wallet's outbound fees, not the agent's gas. And in `agenticWallet` mode the SDK turns `enforceGasCheck` on for every action except that one first action while the agent's UEA is not yet deployed, so an empty UEA fails loudly instead of silently falling back to a $1 origin lock and a confirmation wait on every action. + +Routing. In `agenticWallet` mode every send is wrapped as `executeAsAgent` (agent door) or `execute` (owner door), and for cross-chain legs the AGW itself calls the gateway. So the AGW's CEA executes on the destination and the AGW's PC pays as `msg.value`. The SDK never uses the signer's own Route 2, which would run through the agent's CEA instead of the wallet's. Any `from` (Routes 3 and 4) is rejected in `agenticWallet` mode with `FROM_NOT_ALLOWED`: it makes `msg.sender` a CEA, and the agent door check fails. + +What changes on the client in this mode: + +- `universal.account` is the wallet address string, so receipts show the AGW as `from`. `universal.origin` stays the signer's origin account. +- `getAccountStatus()` reports the signer's own UEA, not the wallet. +- The signer is whatever was passed to `initialize`. To top up the agent's UEA, find it with `PushChain.utils.account.deriveExecutorAccount(signer.account)` and send PC to it from a client initialized without `agenticWallet`. +- A Solana-keyed agent can act on Push and `eip155` destinations now, and on `solana:` destinations once the SVM rulebook ships. +- Agents read their own rules through `client.agentic.wallet(addr).rules.list()`. +- `tx.data` arrays and `tx.funds` (moving the AGW's PRC20) work as they do for any account. +- `payGasWith`, `migrateCEA`, `rescueFunds`, `prepareTransaction` and `executeTransactions` throw `NOT_ALLOWED_IN_AGENTIC_MODE`. + +```tsx +const tx = await agentClient.universal.sendTransaction({ // agent door, rule picked by the destination chain + to: { address: aavePool, chain: CHAIN.ETHEREUM_SEPOLIA }, + data: supplyData, +}); + +// tx: UniversalTxResponse +{ + hash: '0x6f2a...', + origin: 'eip155:11155111:0x7Be1...', // the agent's key, CAIP-10 + from: '0xWallet', // the AGW, not the signer + blockNumber: 1530n, + wait +} + +const receipt = await tx.wait(); +// receipt: UniversalTxReceipt +{ + status: 1, + hash: '0x6f2a...', + from: '0xWallet', + blockNumber: 1530n, + externalTxHash: '0x91c4...' // the leg executed by the AGW's CEA on Sepolia +} +``` + +The same EVM key initialized against two chains yields two UEAs (derived from namespace, chainId and owner), so the rule must name the UEA of the chain this client initializes against (see 1.b). + +# 3. Types + +### 3.a Client, options and namespace + +```tsx +type Address = `0x${string}`; +type Hex = `0x${string}`; +type ForeignChainNamespace = `eip155:${string}` | `solana:${string}`; +type ProgressHook = (p: ProgressEvent) => void; // ProgressEvent is core's shape: { id, title, message, level, response, timestamp } + +interface PushChainClient { + universal: UniversalNamespace; // in agenticWallet mode: account is the wallet + agentic: AgenticNamespace; // this page + market: MarketNamespace; // page 6 + job: JobNamespace; // page 7 + evaluation: EvaluationNamespace; // page 8 +} + +interface InitializeOptions { + network?: PUSH_NETWORK; + rpcUrls?: Partial>; + agenticWallet?: Address; // NEW: act as the wallet; door chosen by the signer's Push address + // enforceGasCheck is on when agenticWallet is set, except for the first action while the agent's UEA is not yet deployed (2.a) +} + +interface AgenticNamespace { + derive(opts?: { index?: number }): Promise<{ address: Address; index: number; deployed: boolean }>; + create(label: string, options: CreateOptions): Promise; + list(): Promise<{ wallets: WalletSummary[] }>; // connected signer only + wallet(address: Address): AgenticWallet; +} + +interface CreateOptions { + rules: Rule[]; // one entry per chain per agent, may be empty; each rule names its agent and optional ref + progressHook?: ProgressHook; // AGENTIC-TX-1xx +} + +// No AgentKey type, no curve, no chain. The agent is a Push address. A native key is its own EOA; any external key +// (EVM, Solana, anything) is its UEA, deterministic from (chain, owner), deployed lazily on first use. The AGW's agent +// door checks msg.sender == rules.agent; cross-VM signature verification already happened inside the UEA (page 1, D3). + +interface CreateResult { wallet: Address; index: number; rulesIds: Hex[]; tx: UniversalTxResponse } +interface WalletSummary { address: Address; index: number; label: string; deployed: boolean; rulesCount: number } +``` + +### 3.b Rules + +```tsx +type Rule = NativeRule | UniversalRule; // chainNamespace decides the rulebook: omitted = native, foreign = universal + +interface NativeRule { + agent: Address; // Push address: EOA, or the UEA of an external key (PushChain.utils.account.deriveExecutorAccount) + ref?: Hex; // emitted in RulesGranted, not interpreted + chainNamespace?: never; // omitted = the connected Push chain + target: Address; + selector: Selector | 'value-only'; + validUntil: number; + maxValuePerCall?: bigint; maxValueTotal?: bigint; maxCalls?: number; + pins?: { arg: number; expected: Hex | Address | bigint }[]; + amount?: { arg: number; maxPerCall: bigint; maxTotal?: bigint }; +} + +interface UniversalRule { + agent: Address; // same as NativeRule.agent + ref?: Hex; // same as NativeRule.ref + chainNamespace: ForeignChainNamespace; // "eip155:..." now; "solana:..." once the SVM rulebook ships + assets: AssetCap[]; // tokens the agent may move on chainNamespace; SDK resolves each to its PRC20 and asserts SOURCE_CHAIN_NAMESPACE + maxGasPerCall: bigint; // PC (wei) per outbound for the destination leg + validUntil: number; + allowedCalls: AllowedCall[]; // 1..32, all on chainNamespace +} + +interface AssetCap { + token: MoveableToken | Address; // the other chain's token address (MOVEABLE.TOKEN..) or the native marker; the contract stores the PRC20 + maxPerCall: bigint; + maxTotal?: bigint; +} + +type Selector = Hex | `${string}(${string})`; // '0x617ba037' or 'supply(address,uint256,address,uint16)' + +interface AllowedCall { target: Address; selector: Selector; beneficiary?: number; maxValue?: bigint } // beneficiary = arg index + +interface RulesRecord { + rulesId: Hex; + enabled: boolean; + chainNamespace: string; + agent: Address; // the Push address granted + validUntil: number; + ref: Hex; + rule: Rule; // decoded terms; NativeRule or UniversalRule + spent: Spent; // carried by rules.get and rules.list; no separate call +} + +type Spent = { kind: 'universal'; amountSpent: bigint } | { kind: 'native'; valueSpent: bigint; amountSpent: bigint; callsUsed: number }; // PROPOSED: one self-describing object, readable without knowing the rulebook +``` + +### 3.c Wallet handle and checkpoints + +```tsx +interface AgenticWallet { + address: Address; + info(): Promise; + owner(): Promise<{ owner: Address }>; // Push address as stored + setLabel(label: string, opts?: { progressHook?: ProgressHook }): Promise; // PROPOSED, page 1 item 10 + checkpoints(opts?: { sinceBlock?: bigint }): Promise<{ checkpoints: Checkpoint[] }>; + rules: { + list(): Promise<{ rules: RulesRecord[] }>; + get(rulesId: Hex): Promise; + add(rules: Rule[], opts?: { progressHook?: ProgressHook }): Promise<{ rulesIds: Hex[]; tx: UniversalTxResponse }>; + update(params: { rules: { rulesId: Hex; rule: Rule }[]; progressHook?: ProgressHook }): Promise<{ rules: { rulesId: Hex; replaced: Hex }[]; tx: UniversalTxResponse }>; // revoke plus grant; spend counters reset + revoke(rulesIds: Hex[], opts?: { progressHook?: ProgressHook }): Promise; + revoke(params: { all: true; progressHook?: ProgressHook }): Promise; + }; +} + +interface WalletInfo { address: Address; label: string; index: number; owner: Address; deployed: boolean; rulesCount: number } + +interface Checkpoint { seq: number; kind: 'OWNER_ACTION' | 'RULES_GRANTED' | 'RULES_REVOKED'; ref: Hex; blockNumber: bigint; txHash: Hex } +``` + +### 3.d Constants, PushChain.CONSTANTS.AGENTIC (new) + +```tsx +PushChain.CONSTANTS.AGENTIC[PUSH_NETWORK.TESTNET_DONUT] = { + FACTORY, RULES_POLICY, // RULES_POLICY is URP; no validator address (page 1, D3) + MAX_PINS: 8, MAX_ALLOWED_CALLS: 32, ENVELOPE_VERSION: 1, +}; +``` + +### 3.e Helpers, PushChain.utils.agentic (new) + +Pure functions with the same output as the on-chain views. + +```tsx +PushChain.utils.agentic = { + rulesId(agent, chainNamespace, grantNonce), // the id a grant produces, same as the contract assigns + actionId(target, selector), // id of one allowed call: hash of its target and selector + configId(wallet, rulesId, actionId), // key of one allowed call's stored config, under one rule on one wallet + encodeRules(rules, ctx), // ctx = wallet and chain context needed to resolve beneficiary offsets + decodeRules(bytes), + deriveWallet(owner, index), // any-owner variant of client.agentic.derive + compileCard(card, userInput, ctx), // used by page 6; lives here because it produces Rule[] +}; +``` + +### 3.f Errors and progress + +```tsx +class AgenticError extends Error { code: string; hint?: string } +class AgenticRevertError extends PushChainExecutionError {} +// decoded custom error from the AGW, URP or the factory; uses core's fields: +// code string +// decodedError { name, hint, selector, decoded } + +// codes +// create: AGENT_IS_OWNER, DUPLICATE_RULE, TARGET_NOT_ON_RULE_CHAIN, ASSET_CHAIN_MISMATCH +// initialize (agenticWallet): NOT_OWNER_OR_AGENT, WALLET_NOT_DEPLOYED, NOT_AGENTIC_WALLET +// rules.revoke: REVOKE_NEEDS_TARGET (bare revoke) +// sendTransaction: NO_RULES_FOR_CHAIN, FROM_NOT_ALLOWED (any from, Routes 3 and 4) +// agentic mode: NOT_ALLOWED_IN_AGENTIC_MODE (prepareTransaction, executeTransactions, payGasWith, migrateCEA, rescueFunds) + +// progress events, AGENTIC-TX (PROPOSED) +// AGENTIC-TX-101 wallet derived { address, index, deployed } +// AGENTIC-TX-102 deploy step added +// AGENTIC-TX-104 rules granted { rulesIds } +// AGENTIC-TX-105 rules revoked { rulesIds | all } +// AGENTIC-TX-106 label set +// AGENTIC-TX-107 rule resolved for a send { rulesId, chainNamespace, door } +// AGENTIC-TX-199-01 done +// AGENTIC-TX-199-02 failed { code, decodedError } +// The Push leg of any agentic send also emits core's SEND-TX-1xx events. +// A cross-chain leg sent by the AGW emits 209-xx and 299-xx, never 201 to 204 (the signer's own Route 2 is never used). +``` + +**PROPOSED:** the AGENTIC-TX event list. Every write (`create`, `setLabel`, `rules.add`, `rules.update`, `rules.revoke`) takes a per-call `progressHook`; a `progressHook` passed to `PushChain.initialize` runs alongside it, as in core. + +`NO_RULES_FOR_CHAIN` is thrown before any signature and costs nothing. The rules lookup is one read on every send, not cached at initialize. A URP revert is thrown from `sendTransaction` as `AgenticRevertError` and also lands as `decodedError` on AGENTIC-TX-199-02. A destination-chain revert after URP passed still counts the spend, because the spend is counted when the outbound leaves Push; whether it is credited back depends on [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 6 (`creditRevert`). + +# 4. Outside change: [PushChain.CONSTANTS.READ](http://PushChain.CONSTANTS.READ).CHAIN (confirmed 2026-09-28) + +Problem: `read()` takes `chain: PushChain.CONSTANTS.CHAIN.X`, but `CHAIN` is the set of blockchains the SDK signs for and routes to. Web2 is not one, so `CHAIN.WEB2` exists as a hidden (non-enumerable) member: it works if you know it is there and never appears in any listing. Reads have a wider domain than transactions: anything validators can observe. + +Change: a read-specific constant that is a superset of `CHAIN`. The field name stays `chain`, so nothing breaks, and `CHAIN` values remain valid because the strings are identical. + +```tsx +PushChain.CONSTANTS.READ.CHAIN = { + ...PushChain.CONSTANTS.CHAIN, // every real chain, same string values + WEB2: 'web2', // non-chain source, first-class here, enumerable +}; +type ReadChain = CHAIN | 'web2'; // ReadParams.chain: ReadChain + +read({ chain: PushChain.CONSTANTS.READ.CHAIN.WEB2, ... }) +read({ chain: PushChain.CONSTANTS.CHAIN.ETHEREUM_SEPOLIA, ... }) // still compiles +``` + +- `CHAIN.WEB2` becomes a deprecated alias of `READ.CHAIN.WEB2` for one release (the docs listed it on 2026-09-22), then goes. +- Anything that iterates `CHAIN` stops seeing a fake chain; anything that iterates `READ.CHAIN` sees every read source. +- The evaluator's `Read.chain` (page 8) takes the same values, so `READ.CHAIN` is the one constant the read SDK and the criteria compiler share. + +# 5. Open for review + +1. `rules.update` resets spend counters because it is revoke plus grant. Accepted for v1 and stated in 1.l; an in-place update is a contract change with no demand yet. +2. `setLabel` assumes [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 10 lands. Pointer for the team. \ No newline at end of file diff --git a/plan/agw/notion/history/20261007T102718466408Z/manifest-before.json b/plan/agw/notion/history/20261007T102718466408Z/manifest-before.json new file mode 100644 index 00000000..2d3a634a --- /dev/null +++ b/plan/agw/notion/history/20261007T102718466408Z/manifest-before.json @@ -0,0 +1,178 @@ +{ + "schema_version": 1, + "snapshot_date": "2026-10-03", + "notes": "Page content preserved; known intra-export links normalized to local filenames. Comment threads excluded by Notion export. Null edit dates mean not observed. Original bundle retained.", + "sources": [ + { + "title": "AGW design overview", + "page_id": "3e9188aea7f481c8b38ccba332b0afa2", + "notion_url": "https://app.notion.com/p/pushprotocol/AGW-UniversalMarketplace-8183-UniversalEvaluator-3e9188aea7f481c8b38ccba332b0afa2", + "local_file": "notion/overview.md", + "pulled_on": "2026-10-03", + "observed_last_edited_date": "2026-10-01", + "authority": "Supporting design", + "sha256": "f2d7954e018324a937282ca190f397cc12a27973a07c891f3edfd6e89383c53e", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu 3e9188aea7f481c8b38ccba332b0afa2.md", + "raw_export_sha256": "99b727bd58cf588b2c766dc1b93eff402c47e918718b69c2a456b119ad43435b", + "archive": "notion/exports/20261003T075310278902Z/export-1.zip", + "pulled_at": "2026-10-03T07:53:10.278902+00:00" + }, + { + "title": "1 AGW Contract Changes", + "page_id": "3e9188aea7f4813aa31fc95ceb4e684d", + "notion_url": "https://app.notion.com/p/pushprotocol/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d", + "local_file": "notion/1-agw-contract-changes.md", + "pulled_on": "2026-10-03", + "observed_last_edited_date": "2026-10-02", + "authority": "WIP contract target", + "sha256": "f1301d8ff1cf370968b90a3d53037ece8fa4c6783c45a402f9be6998928e3631", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/1 AGW Contract Changes (nomenclature standard + ch 3e9188aea7f4813aa31fc95ceb4e684d.md", + "raw_export_sha256": "f1301d8ff1cf370968b90a3d53037ece8fa4c6783c45a402f9be6998928e3631", + "archive": "notion/exports/20261003T075310278902Z/export-1.zip", + "pulled_at": "2026-10-03T07:53:10.278902+00:00", + "observed_last_edited_at": "2026-10-02T20:50:00+05:30" + }, + { + "title": "2 Universal Marketplace", + "page_id": "3e9188aea7f48118b90ac9b267496295", + "notion_url": "https://app.notion.com/p/pushprotocol/2-Universal-Marketplace-3e9188aea7f48118b90ac9b267496295", + "local_file": "notion/2-universal-marketplace.md", + "pulled_on": "2026-10-03", + "observed_last_edited_date": null, + "authority": "Supporting WIP design", + "sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/2 Universal Marketplace 3e9188aea7f48118b90ac9b267496295.md", + "raw_export_sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18", + "archive": "notion/exports/20261003T075310278902Z/export-1.zip", + "pulled_at": "2026-10-03T07:53:10.278902+00:00" + }, + { + "title": "3 ERC-8183 job kernel and hook", + "page_id": "3e9188aea7f48188a838c3a740d8c858", + "notion_url": "https://app.notion.com/p/pushprotocol/3-8183-job-kernel-and-hook-3e9188aea7f48188a838c3a740d8c858", + "local_file": "notion/3-8183-job-kernel-and-hook.md", + "pulled_on": "2026-10-03", + "observed_last_edited_date": null, + "authority": "Supporting WIP design", + "sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/3 8183 (job kernel and hook) 3e9188aea7f48188a838c3a740d8c858.md", + "raw_export_sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90", + "archive": "notion/exports/20261003T075310278902Z/export-1.zip", + "pulled_at": "2026-10-03T07:53:10.278902+00:00" + }, + { + "title": "4 Universal Evaluation", + "page_id": "3e9188aea7f4817bb03ef4c78c883f8b", + "notion_url": "https://app.notion.com/p/pushprotocol/4-Universal-Evaluation-3e9188aea7f4817bb03ef4c78c883f8b", + "local_file": "notion/4-universal-evaluation.md", + "pulled_on": "2026-10-03", + "observed_last_edited_date": null, + "authority": "Supporting WIP design", + "sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/4 Universal Evaluation 3e9188aea7f4817bb03ef4c78c883f8b.md", + "raw_export_sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f", + "archive": "notion/exports/20261003T075310278902Z/export-1.zip", + "pulled_at": "2026-10-03T07:53:10.278902+00:00" + }, + { + "title": "5 SDK AGW", + "page_id": "3e9188aea7f481cf8e8de324956549b9", + "notion_url": "https://app.notion.com/p/pushprotocol/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9", + "local_file": "notion/5-sdk-agw.md", + "pulled_on": "2026-10-03", + "observed_last_edited_date": null, + "authority": "Primary SDK API target", + "sha256": "e407ee77cdf874db7ef4697f84e9945ff3a12a2f2e07e8a7f90bd24e93ea32f1", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/5 SDK AGW 3e9188aea7f481cf8e8de324956549b9.md", + "raw_export_sha256": "9a16f8aed79fac09818ec216fb4c69dc79f2fa0cffe0af611af956eb0e69f33f", + "archive": "notion/exports/20261003T075310278902Z/export-1.zip", + "pulled_at": "2026-10-03T07:53:10.278902+00:00", + "previous_observed_last_edited_date": "2026-10-01" + }, + { + "title": "6 SDK Universal Marketplace", + "page_id": "3ea188aea7f481e2961ed97129f3a4e6", + "notion_url": "https://app.notion.com/p/pushprotocol/6-SDK-Universal-Marketplace-3ea188aea7f481e2961ed97129f3a4e6", + "local_file": "notion/6-sdk-universal-marketplace.md", + "pulled_on": "2026-10-03", + "observed_last_edited_date": "2026-09-30", + "authority": "Supporting WIP SDK", + "sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/6 SDK Universal Marketplace 3ea188aea7f481e2961ed97129f3a4e6.md", + "raw_export_sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c", + "archive": "notion/exports/20261003T075310278902Z/export-1.zip", + "pulled_at": "2026-10-03T07:53:10.278902+00:00" + }, + { + "title": "7 SDK ERC-8183 Job", + "page_id": "3ea188aea7f481e0a137f5a896723376", + "notion_url": "https://app.notion.com/p/pushprotocol/7-SDK-8183-Job-3ea188aea7f481e0a137f5a896723376", + "local_file": "notion/7-sdk-8183-job.md", + "pulled_on": "2026-10-03", + "observed_last_edited_date": null, + "authority": "Supporting WIP SDK", + "sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/7 SDK 8183 Job 3ea188aea7f481e0a137f5a896723376.md", + "raw_export_sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c", + "archive": "notion/exports/20261003T075310278902Z/export-1.zip", + "pulled_at": "2026-10-03T07:53:10.278902+00:00" + }, + { + "title": "8 SDK Universal Evaluation", + "page_id": "3ea188aea7f48197a3b3cfdedfa74fee", + "notion_url": "https://app.notion.com/p/pushprotocol/8-SDK-Universal-Evaluation-3ea188aea7f48197a3b3cfdedfa74fee", + "local_file": "notion/8-sdk-universal-evaluation.md", + "pulled_on": "2026-10-03", + "observed_last_edited_date": null, + "authority": "Supporting WIP SDK", + "sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/8 SDK Universal Evaluation 3ea188aea7f48197a3b3cfdedfa74fee.md", + "raw_export_sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e", + "archive": "notion/exports/20261003T075310278902Z/export-1.zip", + "pulled_at": "2026-10-03T07:53:10.278902+00:00" + }, + { + "title": "Legacy PUSH AGW SDK Doc v1", + "page_id": "d2d188aea7f4825cbcea81ef86eca607", + "notion_url": "https://app.notion.com/p/pushprotocol/PUSH-AGW-SDK-Doc-v1-d2d188aea7f4825cbcea81ef86eca607", + "local_file": "notion/legacy-agw-sdk-v1.md", + "pulled_on": "2026-10-03", + "observed_last_edited_date": "2026-09-22", + "authority": "Historical encoding and deployment reference", + "sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916", + "raw_export_sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916", + "pulled_at": "2026-10-03T07:53:10.278902+00:00", + "archive": "notion/exports/20261003T075310278902Z/export-2.zip", + "export_entry": "Private & Shared/PUSH AGW SDK Doc - v1 d2d188aea7f4825cbcea81ef86eca607.md" + }, + { + "title": "AGW Address Book PC Donut", + "page_id": "3d1188aea7f480ddbb4af6d0efb211e6", + "notion_url": "https://app.notion.com/p/pushprotocol/AGW-Address-Book-PC-Donut-3d1188aea7f480ddbb4af6d0efb211e6", + "local_file": "notion/agw-address-book-donut-2026-09-04.md", + "pulled_on": "2026-10-03", + "observed_last_edited_date": "2026-09-04", + "authority": "Historical deployment", + "sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742", + "raw_export_sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742", + "pulled_at": "2026-10-03T07:53:10.278902+00:00", + "archive": "notion/exports/20261003T075310278902Z/export-3.zip", + "export_entry": "Private & Shared/AGW Address Book - PC Donut 3d1188aea7f480ddbb4af6d0efb211e6.md" + }, + { + "title": "Agentic wallet flow updated", + "page_id": "3d1188aea7f4801f9cb3fbd9318ec536", + "notion_url": "https://app.notion.com/p/pushprotocol/agentic_wallet_flow-updated-3d1188aea7f4801f9cb3fbd9318ec536", + "local_file": "notion/agentic-wallet-flow-2026-09-07.md", + "pulled_on": "2026-10-03", + "observed_last_edited_date": "2026-09-07", + "authority": "Historical validator-based flow", + "sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0", + "raw_export_sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0", + "pulled_at": "2026-10-03T07:53:10.278902+00:00", + "archive": "notion/exports/20261003T075310278902Z/export-4.zip", + "export_entry": "Private & Shared/agentic_wallet_flow ( updated ) 3d1188aea7f4801f9cb3fbd9318ec536.md" + } + ], + "last_refresh_at": "2026-10-03T07:53:10.278902+00:00" +} diff --git a/plan/agw/notion/history/20261007T102718466408Z/refresh.json b/plan/agw/notion/history/20261007T102718466408Z/refresh.json new file mode 100644 index 00000000..411ca31f --- /dev/null +++ b/plan/agw/notion/history/20261007T102718466408Z/refresh.json @@ -0,0 +1,124 @@ +{ + "run_id": "20261007T102718466408Z", + "pulled_at": "2026-10-07T10:27:18.466408+00:00", + "complete": true, + "missing_page_ids": [], + "unknown_export_entries": [], + "archives": [ + "notion/exports/20261007T102718466408Z/export-1.zip", + "notion/exports/20261007T102718466408Z/export-2.zip", + "notion/exports/20261007T102718466408Z/export-3.zip", + "notion/exports/20261007T102718466408Z/export-4.zip" + ], + "pages": [ + { + "page_id": "3e9188aea7f481c8b38ccba332b0afa2", + "title": "AGW design overview", + "local_file": "notion/overview.md", + "changed": false, + "previous_sha256": "f2d7954e018324a937282ca190f397cc12a27973a07c891f3edfd6e89383c53e", + "sha256": "f2d7954e018324a937282ca190f397cc12a27973a07c891f3edfd6e89383c53e", + "raw_export_sha256": "99b727bd58cf588b2c766dc1b93eff402c47e918718b69c2a456b119ad43435b" + }, + { + "page_id": "3e9188aea7f4813aa31fc95ceb4e684d", + "title": "1 AGW Contract Changes", + "local_file": "notion/1-agw-contract-changes.md", + "changed": false, + "previous_sha256": "f1301d8ff1cf370968b90a3d53037ece8fa4c6783c45a402f9be6998928e3631", + "sha256": "f1301d8ff1cf370968b90a3d53037ece8fa4c6783c45a402f9be6998928e3631", + "raw_export_sha256": "f1301d8ff1cf370968b90a3d53037ece8fa4c6783c45a402f9be6998928e3631" + }, + { + "page_id": "3e9188aea7f48118b90ac9b267496295", + "title": "2 Universal Marketplace", + "local_file": "notion/2-universal-marketplace.md", + "changed": false, + "previous_sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18", + "sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18", + "raw_export_sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18" + }, + { + "page_id": "3e9188aea7f48188a838c3a740d8c858", + "title": "3 ERC-8183 job kernel and hook", + "local_file": "notion/3-8183-job-kernel-and-hook.md", + "changed": false, + "previous_sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90", + "sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90", + "raw_export_sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90" + }, + { + "page_id": "3e9188aea7f4817bb03ef4c78c883f8b", + "title": "4 Universal Evaluation", + "local_file": "notion/4-universal-evaluation.md", + "changed": false, + "previous_sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f", + "sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f", + "raw_export_sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f" + }, + { + "page_id": "3e9188aea7f481cf8e8de324956549b9", + "title": "5 SDK AGW", + "local_file": "notion/5-sdk-agw.md", + "changed": true, + "previous_sha256": "e407ee77cdf874db7ef4697f84e9945ff3a12a2f2e07e8a7f90bd24e93ea32f1", + "sha256": "d3bc55b08a37d762c49173149fd8d554a8551682c0956de3e91394a54bfed9a6", + "raw_export_sha256": "8d024eb2bd2955fc772d2194f50a02d601a2d5bf903b0c9cc74882ee11348130" + }, + { + "page_id": "3ea188aea7f481e2961ed97129f3a4e6", + "title": "6 SDK Universal Marketplace", + "local_file": "notion/6-sdk-universal-marketplace.md", + "changed": false, + "previous_sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c", + "sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c", + "raw_export_sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c" + }, + { + "page_id": "3ea188aea7f481e0a137f5a896723376", + "title": "7 SDK ERC-8183 Job", + "local_file": "notion/7-sdk-8183-job.md", + "changed": false, + "previous_sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c", + "sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c", + "raw_export_sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c" + }, + { + "page_id": "3ea188aea7f48197a3b3cfdedfa74fee", + "title": "8 SDK Universal Evaluation", + "local_file": "notion/8-sdk-universal-evaluation.md", + "changed": false, + "previous_sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e", + "sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e", + "raw_export_sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e" + }, + { + "page_id": "d2d188aea7f4825cbcea81ef86eca607", + "title": "Legacy PUSH AGW SDK Doc v1", + "local_file": "notion/legacy-agw-sdk-v1.md", + "changed": false, + "previous_sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916", + "sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916", + "raw_export_sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916" + }, + { + "page_id": "3d1188aea7f480ddbb4af6d0efb211e6", + "title": "AGW Address Book PC Donut", + "local_file": "notion/agw-address-book-donut-2026-09-04.md", + "changed": false, + "previous_sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742", + "sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742", + "raw_export_sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742" + }, + { + "page_id": "3d1188aea7f4801f9cb3fbd9318ec536", + "title": "Agentic wallet flow updated", + "local_file": "notion/agentic-wallet-flow-2026-09-07.md", + "changed": false, + "previous_sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0", + "sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0", + "raw_export_sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0" + } + ], + "review_status": "Review required" +} diff --git a/plan/agw/notion/legacy-agw-sdk-v1.md b/plan/agw/notion/legacy-agw-sdk-v1.md new file mode 100644 index 00000000..da35470a --- /dev/null +++ b/plan/agw/notion/legacy-agw-sdk-v1.md @@ -0,0 +1,1097 @@ +# PUSH AGW SDK Doc - v1 + +--- + +| Commit | [`67929f2`](https://github.com/pushchain/push-agentic-wallets/commit/67929f2) on branch `pushAgenticWallet_v3` | +| --- | --- | +| SDK target | [`@pushchain/core`](https://github.com/pushchain/push-chain-sdk/tree/main/packages/core) `6.0.25` at [`bf1dbff`](https://github.com/pushchain/push-chain-sdk/commit/bf1dbff) · TypeScript · `viem ^2.27` (dependency) · `tweetnacl` (optional peer, Ed25519) · jest + `__e2e__` | +| In scope | wallet creation, funding, owner execution, mandate grant / stop / replace, reads, the agent-card → mandate compiler (O9, forward-looking) | +| Out of scope | • building, signing and submitting agent requests (**agent doc**) · + • ERC-8183 job creation, binding and settlement · + • TAP, Read State + • mandates to **SVM destinations** (URP’s allow-list is EVM-shaped: 20-byte `expectedCEA`, multicall payload) | + +Snippets are TypeScript with `viem`, which is the SDK’s own encoding library. Every encoding is plain ABI. + +### 0.1 AGW Addresses Addresses + +> note: NO Pre-define addresses deployment is done yet. Once SDK initial checks are passed, I will make those deployments post that. +> + + [`deployments/address-book-v3/ADDRESSES.md`](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/deployments/address-book-v3/ADDRESSES.md). + +**The two you need.** Both are proxies; both addresses are permanent. Never address an implementation. + +| | Address | +| --- | --- | +| **Factory** | `0x2578041963f692f8b51A137A1c7ddc0c84a8226A` | +| **URP** | `0xeAd99E254ACD64219d057400cdC2A2390bC74372` | + +**Everything we deploy** + +| Key | Address | Verified | +| --- | --- | --- | +| `factoryProxy` | `0x2578041963f692f8b51A137A1c7ddc0c84a8226A` | ✅ | +| `factoryLogic` | `0x517a10C2F2E786CC8271dbD489dFE27dE8F7BE67` | ✅ | +| `walletImplementation` | `0xD7FEF338572f96edBeF89E720f1F0fF1284ec79C` | ✅ | +| `urp` (proxy) | `0xeAd99E254ACD64219d057400cdC2A2390bC74372` | ✅ | +| `urpImplementation` | `0xc95f179D3aDE283E11CF90f3F8E04BFE8534ff4F` | ✅ | +| `urpProxyAdmin` | `0xA634a0cB4F374D89B2cccbdc77300c8Ac3827BF4` | ✅ | +| `sessionValidator` | `0xF77660838Cebb65BD6357FDe71d19f97CC65E829` | ✅ | +| `sessionEngine` | `0x046B2874Fc9F920ad53A317b3cf9d3d1974466f3` | ✅ | + +**External dependencies (not deployed by this repo)** + +| Key | Address | Note | +| --- | --- | --- | +| `universalGatewayPC` | `0x00000000000000000000000000000000000000C1` | the one target a universal mandate may name | +| `universalCore` | `0x00000000000000000000000000000000000000C0` | outbound fee quotes | +| `ueaFactory` | `0x00000000000000000000000000000000000000eA` | maps external wallets → UEAs on Push. **Not** the CEA factory and not a runtime dependency | +| `universalExecutorModule` | `0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7` | **no code** (`cast code` → `0x`, re-read on Donut 2026-09-18); gates `creditRevert` only, so the revert-credit path is unreachable and spend counters never decrease | +| `usv` (Ed25519 precompile) | `0xEC00000000000000000000000000000000000001` | codeless by design | +| `USDC.eth` (PRC20, example asset) | `0x7A58048036206bB898008b5bBDA85697DB1e5d66` | `SOURCE_CHAIN_NAMESPACE()` → `"eip155:11155111"` | + +#### 0.2 Contracts Details + +| Contract | Role, in one line | Source | Address on Push | +| --- | --- | --- | --- | +| `AGWFactory` | Deploys wallet clones at predictable addresses; registry of wallet → owner | [src/AGWFactory.sol](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/src/AGWFactory.sol) | `0x2578041963f692f8b51A137A1c7ddc0c84a8226A` (proxy) | +| `PushAgentWallet` | Holds funds; owner door `execute`, agent door `executeWithSession`, mandate `grant` / `stop` / `stopAll` | [src/PushAgentWallet.sol](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/src/PushAgentWallet.sol) | `0xD7FEF338572f96edBeF89E720f1F0fF1284ec79C` (implementation; every wallet is a clone of it) | +| `URP` | The policy: checks every agent request against the mandate’s terms, meters spend, fails closed | [src/policies/URP.sol](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/src/policies/URP.sol) | `0xeAd99E254ACD64219d057400cdC2A2390bC74372` (proxy) | +| `PushSessionValidator` | Stateless signature check: secp256k1 or Ed25519 via the USV precompile | [src/validators/PushSessionValidator.sol](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/src/validators/PushSessionValidator.sol) | `0xF77660838Cebb65BD6357FDe71d19f97CC65E829` | +| `SmartSession` | Session engine: stores mandates, runs URP, deletes on revoke; the wallet’s only installed validator module | [lib/smartsessions](https://github.com/pushchain/push-agentic-wallets/tree/pushAgenticWallet_v3/lib/smartsessions) | `0x046B2874Fc9F920ad53A317b3cf9d3d1974466f3` | +| `ProxyAdmin` (URP) | Upgrade authority for URP; the SDK never calls it | OpenZeppelin 5.7.0 | `0xA634a0cB4F374D89B2cccbdc77300c8Ac3827BF4` | + +Shared type and error files the SDK mirrors: + +- [src/libraries/PushWalletTypes.sol](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/src/libraries/PushWalletTypes.sol) — gateway struct mirrors, selectors, `OP_HASH_DOMAIN` +- [src/interfaces/IURP.sol](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/src/interfaces/IURP.sol) — `UniversalTerms`, `NativeTerms`, views, errors +- [src/libraries/PushWalletErrors.sol](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/src/libraries/PushWalletErrors.sol) — wallet errors +- [src/interfaces/IPushAgentWallet.sol](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/src/interfaces/IPushAgentWallet.sol) — wallet events +- [src/libraries/ExecutionLib.sol](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/src/libraries/ExecutionLib.sol) — single / batch execution encoding + +#### 0.3 Docs + +- [docs/](https://github.com/pushchain/push-agentic-wallets/tree/pushAgenticWallet_v3/docs) — narrative docs + - [v3-architecture.md](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/docs/v3-architecture.md) — the architecture + - [agentic_wallet_flow.md](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/docs/agentic_wallet_flow.md) — cross-chain (UNIVERSAL) worked example + - [push_native_agentic_wallet_flow.md](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/docs/push_native_agentic_wallet_flow.md) — Push-side (NATIVE) worked example +- [deployments/address-book-v3/](https://github.com/pushchain/push-agentic-wallets/tree/pushAgenticWallet_v3/deployments/address-book-v3) — addresses, live checks, what changed from v2 +- [README.md](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/README.md) · [CLAUDE.md](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/CLAUDE.md) — conventions and invariants +- [test/Base.t.sol](https://github.com/pushchain/push-agentic-wallets/blob/pushAgenticWallet_v3/test/Base.t.sol) — the canonical session / envelope / signature builders; generate SDK test vectors from these +- [push-chain-sdk/plan/read-state-sdk-spec.md](https://github.com/pushchain/push-chain-sdk/blob/main/plan/read-state-sdk-spec.md) — the SDK team’s prior contract→SDK spec; this doc follows its conventions +- [AGW-SDK-v1-agent.md](./AGW-SDK-v1-agent.md) — the agent half +- [05-universal-marketplace-startjob.md](./05-universal-marketplace-startjob.md) · [SDK_HELPER.md](./SDK_HELPER.md) — the marketplace vision and card design O9 compiles from (both work in progress) + +--- + +## 1 · Mental models for AGW + +### 1.1 Actors + +1. **Wallet_Owner** — any `UniversalSigner` (Sepolia, Solana or Push-native). + 1. On chain the owner is `client.universal.account`: the user’s UEA for external-origin signers, the EOA itself for Push-native. + 2. It is `msg.sender` of `deployWallet` and is recorded forever. Deploys, funds, grants, stops, uses the owner door; every write goes through `client.universal.sendTransaction`, so UEA routing and gas abstraction apply unchanged. +2. **Agent** — + 1. holds a session key (secp256k1 address or Ed25519 pubkey) that signs the op hash, plus a funded Push account that submits `executeWithSession` and pays that tx’s gas. + 2. The two may be the same key. The door is permissionless, so any funded account can submit an agent-signed request; v1 has the Agent submit its own. + +### 1.2 The system + +- One wallet = one EIP-1167 clone with 40 bytes of immutable args (`owner`, `factory`). Owner is fixed forever. +- **Owner door** + - `execute(mode, executionCalldata)`: owner only; no policy is consulted. Single or batch. +- **Agent door** + - `executeWithSession(...)`: anyone may call; authority is the signature + nonce + op hash, then URP. Single call only. +- **Mandate** = one SmartSession `Session`: an agent key + 1..8 `(target, selector)` actions, each with exactly one policy, URP, whose `initData` carries the terms. +- Mandates are immutable. + - **For now changing mandate means:** + - stop old mandate + - grant new mandate + - Revocation is immediate and always succeeds. +- The wallet’s balance is the hard ceiling: nothing the agent does can move more than the wallet holds. + +### 1.3 The three important ids + +```solidity +permissionId = keccak256(abi.encode(sessionValidator, sessionValidatorInitData, salt)) +// salt = bytes32(uint256(wallet.grantNonce())) — LEFT-padded, i.e. nonce 3 is +// 0x0000…0003, never 0x0300…0000. The wallet overwrites whatever salt you sent. + +actionId = keccak256(abi.encodePacked(target, selector)) + +configId = keccak256(abi.encodePacked(wallet, keccak256(abi.encodePacked(permissionId, actionId)))) +``` + +**`permissionId` — the mandate.** + +- One per `grantMandate` call. The id an owner revokes and an agent signs against. +- Derived from the agent key config + the wallet’s grant nonce → identical terms granted twice yield different ids; a revoked id never recurs. +- Used in: agent signature prefix · op hash field 5 · `stopMandate` · `isPermissionEnabled` · `getSessionValidatorAndConfig` · `getEnabledActions` · `MandateGranted` / `MandateRevoked` / `MandateActionAuthorized` · `SessionCreated` / `SessionRemoved`. + +**`actionId` — one `(target, selector)` pair.** + +- Global, not per-wallet or per-mandate: `(Aave, supply)` is the same actionId for every user. +- Says which function a request hits; carries no terms. +- Used in: input to `configId` · returned by `getEnabledActions` · argument to `getActionPolicies`. + +**`configId` — one action’s URP terms, in one mandate, on one wallet.** + +- The row URP reads caps and spend counters from. Native mandate with 3 actions → 3 configIds; universal → exactly 1. +- Used in: `urp.getMode` / `getConfig` / `getNativeConfig` / `assertSpent` · `URPPolicySet` / `OutboundMetered` / `NativeCallMetered` events. + +⚠️ `abi.encode` (padded) at level 1, `abi.encodePacked` (tight) at levels 2 and 3. Using one throughout derives every `configId` wrong and reads zeros back from URP. + +### 1.4 SDK object model + +Design rules, mirroring the shipped `universal.*` family: + +- One namespace on the client: `client.agentWallet.*`. Every write has a `prepare*` twin that returns `MultiCall[]`, so callers batch it into one `sendTransaction({ data: MultiCall[] })` signature. +- The SDK computes what the dev cannot guess: chain string, `expectedCEA`, ids, offsets, caps. The dev supplies wallet, agent key, terms, principal. +- Pure encoders and id derivations live under `PushChain.utils.agentWallet.*`; addresses, selectors and limits under `PushChain.CONSTANTS.AGENT_WALLET[network]`. +- Errors are typed classes with a `code`, `AgentWalletError` base (the `PC20Error` pattern). On-chain custom errors are decoded from the AGW ABIs and re-thrown as `AgentWalletRevertError { name, args }`. +- Progress family `AGW-TX-1xx`, same grammar as `SEND-TX`. + +```tsx +// ── method family ──────────────────────────────────────────────────────── +client.agentWallet.predict(index?) // → { address, deployed } (owner = client.universal.account) +client.agentWallet.deploy(label) // → { address, index, txHash } +client.agentWallet.list() // → Address[] walletCount + predictWallet(0..n-1) +client.agentWallet.wallet(address) // → Wallet handle + +wallet.balances(assets?) // → { pc, tokens } +wallet.execute(calls, { value? }) // owner door, single or batch +wallet.approveGateway(asset, amount) // Push-side allowance for universal mandates (see O2) +wallet.grant(terms) // → { permissionId, txHash } +wallet.stop(permissionId) · wallet.stopAll() +wallet.replace(oldId, expectedSpent, terms) // assert → stop → grant, one owner-door batch +wallet.mandates() · wallet.mandate(permissionId) // → Mandate (read model) +wallet.nonce(lane) + +wallet.prepareDeploy / prepareApproveGateway / prepareGrant / prepareStop / prepareReplace // → MultiCall[] + +PushChain.utils.agentWallet.compile(card, userInput, chainContext) // agent card → Session (O9); pure, deterministic + +// agent surface — client.agentWallet.request(...), AgentSigner, AgentRequest — see the AGENT DOC + +PushChain.utils.agentWallet.{ permissionId, actionId, configId, envelope, encodeSession, encodeNativeTerms, encodeUniversalTerms, encodeSingle, encodeBatch } +PushChain.CONSTANTS.AGENT_WALLET[PUSH_NETWORK.TESTNET_DONUT] = { FACTORY, URP, SESSION_VALIDATOR, SESSION_ENGINE, SEND_OUTBOUND_SELECTOR, OP_HASH_DOMAIN, MAX_NATIVE_ACTIONS, MAX_PINS, MAX_ALLOWED_CALLS, MAX_ACTIONS_PER_REQUEST } +``` + +#### OWNER SIDE TYPES + +```tsx +// ── owner side types ───────────────────────────────────────────────────── +type Call = { target: Address; value: bigint; data: Hex }; + +type AgentKey = { scheme: 0; address: Address } | { scheme: 1; pubKey: Hex /* 32 bytes */ }; + +// THE CALLER NEVER STATES A MANDATE KIND. It states a chain; the wallet and URP derive the rest. +// The two shapes are told apart by `chain`: omitted (or this chain) → Push-side; a foreign chain → outbound. +type MandateTerms = NativeMandateTerms | UniversalMandateTerms; + +type NativeMandateTerms = { + chain?: never; // omit it; SDK emits `eip155:` of the connected Push chain + agent: AgentKey; + validUntil: number; // unix seconds; 2^48-1 = never + actions: NativeAction[]; // 1..8, unique (target, selector) +}; +type NativeAction = { + target: Address; + selector: Hex; // 4 bytes; 0xFFFFFFFF = value-only (empty calldata) + maxValuePerCall: bigint; // PC + maxValueTotal: bigint; // PC; 2^256-1 = unlimited + maxCalls: number; // 0 = unlimited + pins: { offset: number; expected: Hex }[]; // ≤ 8 + amount?: { offset: number; maxPerCall: bigint; maxTotal: bigint }; // one metered uint256 arg +}; + +type UniversalMandateTerms = { + chain: ForeignChain; // destination, e.g. CHAIN.ETHEREUM_SEPOLIA. Required, and the ONLY kind signal. + // `ForeignChain` = Exclude — EVM only in v1 + agent: AgentKey; + validUntil: number; + asset: Address; // PRC20 on Push; SDK asserts asset.SOURCE_CHAIN_NAMESPACE() === chain + expectedCEA?: Address; // omit it — SDK derives it. See "expectedCEA, defined once" below. + maxAmountPerCall: bigint; + maxAmountTotal: bigint; // 2^256-1 = unlimited + maxPCPerCall: bigint; // PC attached per outbound (protocol fee + gas swap) + allowedCalls: AllowedCall[]; // 1..32 +}; +type AllowedCall = { target: Address; selector: Hex; beneficiaryOffset: number; hasBeneficiary: boolean; maxValue: bigint }; + +// read model, built from views + events. `mode` here is REPORTED, not chosen: it is what +// urp.getMode(configId, wallet) decoded. The only place the two names appear in the SDK. +type Mandate = { + wallet: Address; permissionId: Hex; enabled: boolean; + mode: 'NATIVE' | 'UNIVERSAL'; chain: string; chainHash: Hex; + agent: AgentKey; validUntil: number; + actions: { configId: Hex; target: Address; selector: Hex; terms: NativeAction | UniversalMandateTerms; spent: Spent }[]; +}; +type Spent = { spent: bigint } | { valueSpent: bigint; amountSpent: bigint; callsUsed: number }; +``` + +--- + +## 2 · Operations + +The following operations are part of WALLET-OWNER Side of the SDK + +1. O1 · Predict and deploy a wallet +2. O2 · Fund +3. O3 · Owner execute +4. O4 · Build a mandate for Push-side actions (derives NATIVE) +5. O5 · Build a mandate for a foreign chain (derives UNIVERSAL) +6. O6 · Pre-flight and grant +7. O7 · Stop +8. O8 · Replace a mandate atomically (assert → stop → grant) +9. *O9 · **Additional:** Compile an agent card into a mandate* + +--- + +#### SetUP + +```tsx +import { encodeAbiParameters, encodePacked, encodeFunctionData, keccak256, concat, pad, toHex } from 'viem'; +import { PushChain, CHAIN, getCEAAddress, CEA_FACTORY_ADDRESSES, VAULT_ADDRESSES, UEA_MULTICALL_SELECTOR } from '@pushchain/core'; +const { encodeTxData } = PushChain.utils.helpers; +const client = await PushChain.initialize(universalSigner, { network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET_DONUT }); + +const FACTORY = '0x2578041963f692f8b51A137A1c7ddc0c84a8226A'; +const URP = '0xeAd99E254ACD64219d057400cdC2A2390bC74372'; +const VALIDATOR = '0xF77660838Cebb65BD6357FDe71d19f97CC65E829'; +const ENGINE = '0x046B2874Fc9F920ad53A317b3cf9d3d1974466f3'; +const GATEWAY = '0x00000000000000000000000000000000000000C1'; +const CORE = '0x00000000000000000000000000000000000000C0'; + +const MODE_SINGLE = '0x0000000000000000000000000000000000000000000000000000000000000000'; // callType 0x00, execType 0x00 +const MODE_BATCH = '0x0100000000000000000000000000000000000000000000000000000000000000'; // callType 0x01, execType 0x00 +const SEND_OUTBOUND_SELECTOR = '0x77b86bec'; +const MULTICALL_SELECTOR = UEA_MULTICALL_SELECTOR; // '0x2cc2842d' = bytes4(keccak256("UEA_MULTICALL")), already in the SDK +const OP_HASH_DOMAIN = '0xee007baac915cb5cecf254fbc38928446424413e2083e43f2155c71b8bf768fe'; // keccak256("PushAgentWallet.Op.v3") +const VALUE_ONLY = '0xFFFFFFFF'; +const UNLIMITED = 2n ** 256n - 1n; +const NEVER = 2 ** 48 - 1; +``` + +### Owner operations + +#### O1 · Predict and deploy a wallet + +```tsx +const owner = client.universal.account; // UEA or Push EOA +const index = await factory.read.walletCount([owner]); // next index +const [predicted, deployed] = await factory.read.predictWallet([owner, index]); + +const data = PushChain.utils.helpers.encodeTxData({ abi: factoryAbi, functionName: 'deployWallet', args: ['my first wallet'] }); +const res = await client.universal.sendTransaction({ to: FACTORY, data }); // msg.sender = owner +// event WalletDeployed(owner indexed, index indexed, wallet indexed, label) +``` + +1. Caller of `deployWallet` **is** the owner; there is no owner parameter. For an external-origin user the caller is their UEA, so the UEA owns the wallet. + + read about ownership structure of AGW here if needed → [2. Rule 2 — Ownership is a strict, single-parent chain, rooted in the user's EOA](https://app.notion.com/p/2-Rule-2-Ownership-is-a-strict-single-parent-chain-rooted-in-the-user-s-EOA-3b9188aea7f48012b934e3598ec929a5?pvs=21) + +2. Local address mirror (for offline prediction): `salt = keccak256(abi.encode(owner, uint96(index)))`, `args = abi.encodePacked(owner, FACTORY)`, OZ `Clones.predictDeterministicAddressWithImmutableArgs(impl, args, salt, FACTORY)`. +3. Verify the mirror against `predictWallet` before showing a funding address. (`abi.encode` pads `uint96` to a full word, so encoding the index as `uint256` gives the same salt for every reachable index — `IndexOutOfRange` caps it far below 2^96.) +4. Counterfactual funding is supported: fund `predicted` before deploying. `predictWallet` reverts `IndexOutOfRange` for `index > walletCount`; never fund beyond that. +5. `label` is emitted only, never stored. + +#### O2 · Fund + +```tsx +await owner.sendTransaction({ to: wallet, value: pc }); // wallet has receive() +await prc20.write.transfer([wallet, amount]); // any PRC20 / ERC-20 +const pcBal = await client.getBalance({ address: wallet }); +const tokBal = await prc20.read.balanceOf([wallet]); +``` + +- The wallet needs **PC** for: `value` on native actions; `value` on every universal outbound (protocol fee + gas swap, capped by `maxPCPerCall`). The agent’s tx gas is paid by the submitter, never by the wallet. +- **Universal mandates need a Push-side allowance.** `sendUniversalTxOutbound` pulls the PRC20 with `transferFrom(msg.sender = wallet, …)` before burning (`UniversalGatewayPC.sol:134, 288`). Without it every agent request with `amount > 0` reverts inside the gateway. Owner sets it through the owner door, once, sized to the mandate: + +```tsx +// wallet.approveGateway(asset, maxAmountTotal) ≡ owner-door batch: +const calls = [ + { target: asset, value: 0n, data: encodeTxData({ abi: ERC20_EVM, functionName: 'approve', args: [GATEWAY, 0n] }) }, // reset first (USDT-style tokens) + { target: asset, value: 0n, data: encodeTxData({ abi: ERC20_EVM, functionName: 'approve', args: [GATEWAY, maxAmountTotal] }) }, +]; +await wallet.execute(calls); // or prepareApproveGateway() → MultiCall[] batched with the grant +``` + +- The allowance is not a policy: it is the wallet’s spending ceiling at the gateway, independent of URP’s caps. Reset it to 0 on `stop` if the mandate was the only reason for it. +- Universal quote (the SDK’s outbound path already does this; reuse `sizeOutboundGas` / `quoteMaxPCForGasCapFromNativeValue`): + +```tsx +const [gasToken, gasFee, protocolFee, gasPrice, chainNamespace, gasLimitUsed] = + await core.read.getOutboundTxGasAndFees([asset, gasLimit]); // gasLimit 0 = chain default +// gateway requires msg.value >= protocolFee; the remainder is swapped to gasToken; unused PC refunds to the wallet +``` + +#### O3 · Owner execute + +```tsx +const single = encodePacked(['address', 'uint256', 'bytes'], [target, value, data]); +await wallet.write.execute([MODE_SINGLE, single], { value }); + +const batch = encodeAbiParameters( + [{ type: 'tuple[]', components: [{ type: 'address', name: 'target' }, { type: 'uint256', name: 'value' }, { type: 'bytes', name: 'callData' }] }], + [calls], +); +await wallet.write.execute([MODE_BATCH, batch]); +// event OwnerExecuted(mode indexed, keccak256(executionCalldata)) +``` + +- SINGLE is `abi.encodePacked` (52-byte header), +- BATCH is `abi.encode(Execution[])`. Not interchangeable. +- Target reverts bubble verbatim. Delegatecall / static / try modes → `UnsupportedExecutionMode`. +- This is the only withdrawal path. +- It also carries self-calls to `grantMandate` / `stopMandate` / `stopAll` (see O8). + +#### O4 · Build a mandate for Push-side actions (derives NATIVE) + +```tsx +const chain = `eip155:${chainId}`; // "eip155:42101" on Donut +// assert: keccak256(toHex(chain)) === await urp.read.pushChainHash() + +const NATIVE_TERMS = { type: 'tuple', components: [ + { type: 'uint48', name: 'validUntil' }, { type: 'address', name: 'target' }, { type: 'bytes4', name: 'selector' }, + { type: 'uint256', name: 'maxValuePerCall' }, { type: 'uint256', name: 'maxValueTotal' }, + { type: 'tuple', name: 'amount', components: [{ type: 'bool', name: 'enabled' }, { type: 'uint16', name: 'offset' }, { type: 'uint256', name: 'maxPerCall' }, { type: 'uint256', name: 'maxTotal' }] }, + { type: 'uint32', name: 'maxCalls' }, + { type: 'tuple[]', name: 'pins', components: [{ type: 'uint16', name: 'offset' }, { type: 'bytes32', name: 'expected' }] }, +]}; + +function nativeAction(a: NativeAction, validUntil: number) { + const body = encodeAbiParameters([NATIVE_TERMS], [{ + validUntil, target: a.target, selector: a.selector, + maxValuePerCall: a.maxValuePerCall, maxValueTotal: a.maxValueTotal, + amount: a.amount ? { enabled: true, ...a.amount } : { enabled: false, offset: 0, maxPerCall: 0n, maxTotal: 0n }, + maxCalls: a.maxCalls, pins: a.pins, + }]); + const initData = encodeAbiParameters([{ type: 'string' }, { type: 'bytes' }], [chain, body]); // the envelope + return { actionTargetSelector: a.selector, actionTarget: a.target, actionPolicies: [{ policy: URP, initData }] }; +} +``` + +- One `NativeTerms` per action. `terms.target` / `terms.selector` must equal the action’s; URP asserts both at runtime (N4, N5). +- **Offsets** are absolute from byte 0 of the calldata, selector included: static argument `i` sits at `4 + 32*i`. Only static-position arguments can be pinned or metered; a role on a dynamic argument (`bytes`, `string`, arrays) is a compile error in the SDK. +- `pins[].expected` is the full 32-byte word: an address is left-padded (`pad(address, { size: 32 })`). +- Value-only action: `selector = 0xFFFFFFFF`, agent sends empty calldata; pins and amount rule must be absent. +- Limits: 1..8 actions; ≤ 8 pins per action; no duplicate `(target, selector)`. +- Forbidden targets: `0x0`, `0x1`, the wallet, engine, URP, validator, factory → `ForbiddenActionTarget`; the gateway → `MandateTypeMismatch`. Forbidden selectors `0x00000001`, `0x00000002`. +- `maxCalls = 0` unlimited; `maxValueTotal = UNLIMITED`; `amount.maxTotal = UNLIMITED`. + +### O5 · Mandates + +#### Mandates from Smart Contract POV + +```solidity +function grantMandate(Session calldata session) external returns (bytes32 permissionId); +// selector 0xa3e13323 · onlyOwnerOrSelf + +struct Session { + ISessionValidator sessionValidator; // fixed: PushSessionValidator + bytes sessionValidatorInitData; // abi.encode(uint8 scheme, bytes key) — the agent key + bytes32 salt; // IGNORED — the wallet overwrites it with its grant nonce + PolicyData[] userOpPolicies; // must be empty + ERC7739Data erc7739Policies; // must be empty (both inner arrays) + ActionData[] actions; // 1..8 Push-side · exactly 1 outbound + bool permitERC4337Paymaster;// must be false +} + +struct ActionData { + bytes4 actionTargetSelector; // ⚠ SELECTOR FIRST — declaration order, not (target, selector) + address actionTarget; + PolicyData[] actionPolicies; // exactly one entry, and it must be URP +} + +struct PolicyData { + address policy; // fixed: URP + bytes initData; // abi.encode(string chain, bytes body) — "the envelope" +} + +``` + +| Field | What it is | Who sets it | +| --- | --- | --- | +| `sessionValidator` | the one validator this system accepts; anything else → `MalformedSessionShape` | fixed constant | +| `sessionValidatorInitData` | **the agent's key.** `abi.encode(uint8 scheme, bytes key)` — scheme 0 = 20-byte address, scheme 1 = 32-byte Ed25519 pubkey. Part of `permissionId`, so it can never be swapped | SDK, from the agent | +| `salt` | send `bytes32(0)`. The wallet replaces it with `grantNonce`, which is what makes every grant a distinct `permissionId` | wallet | +| `userOpPolicies` · `erc7739Policies` · `permitERC4337Paymaster` | dead surface for this wallet; non-empty / true → `MalformedSessionShape` | empty / empty / false | +| `actions[]` | **what the agent may call.** One entry per `(target, selector)` pair | SDK, from the terms | +| `actions[].actionPolicies` | exactly `[{ policy: URP, initData: envelope }]`. One policy, and it must be URP | SDK | +| `initData` (the envelope) | `abi.encode(string chain, bytes body)`. **`chain` decides the rulebook** — this chain → Push-side, any other → outbound. `body` is the terms | SDK | + +The envelope's `body` is one of two wire structs, matching the rulebook the chain derived: + +- NATIVE TERMS - only for agentic workflow exec on Push Chain +- Universal Terms - for agentic workflow on external chains + +```solidity +struct NativeTerms { // Push-side — one per action + uint48 validUntil; // unix seconds; type(uint48).max = never + address target; // must equal this action's actionTarget + bytes4 selector; // must equal this action's actionTargetSelector + uint256 maxValuePerCall; // PC attachable per call + uint256 maxValueTotal; // PC lifetime; type(uint256).max = unlimited + AmountRule amount; // optional metering of ONE uint256 argument + uint32 maxCalls; // 0 = unlimited + ArgPin[] pins; // 0..8 pinned argument words +} + +struct AmountRule { bool enabled; uint16 offset; uint256 maxPerCall; uint256 maxTotal; } +struct ArgPin { uint16 offset; bytes32 expected; } + +struct UniversalTerms { // outbound — exactly one, for the gateway action + uint48 validUntil; + address expectedCEA; // the wallet's account on the destination chain + address asset; // the one permitted PRC20 on Push + uint256 maxAmountPerCall; // bridged amount per call + uint256 maxAmountTotal; // bridged lifetime; max = unlimited + uint256 maxPCPerCall; // PC attached per outbound (protocol fee + gas swap) + AllowedCall[] allowedCalls; // 1..32 destination-chain calls the agent may make +} + +struct AllowedCall { + address target; // destination-chain contract + bytes4 selector; // destination-chain function + uint16 beneficiaryOffset; // where the beneficiary word sits in the INNER calldata + bool hasBeneficiary; // false for calls with no beneficiary argument + uint256 maxValue; // per-entry native ceiling, DESTINATION-chain units +} + +``` + +**1. Build each action (derives NATIVE)** + +couple of notes here: + +1. on chain id + +```tsx +const chain = `eip155:${chainId}`; +// "eip155:42101" on Donut +// assert: keccak256(toHex(chain)) === await urp.read.pushChainHash() +``` + +- must Byte-exact or nothing. +- `"EIP155:42101"`, `"eip155:042101"` and a leading space all hash to not-Push, derive the *outbound* rulebook, and are then refused against the targets with `MandateTypeMismatch`. +- The contracts do not parse or normalise — the hash comparison is the whole rule. + +```tsx +const NATIVE_TERMS = { type: 'tuple', components: [ + { type: 'uint48', name: 'validUntil' }, { type: 'address', name: 'target' }, { type: 'bytes4', name: 'selector' }, + { type: 'uint256', name: 'maxValuePerCall' }, { type: 'uint256', name: 'maxValueTotal' }, + { type: 'tuple', name: 'amount', components: [{ type: 'bool', name: 'enabled' }, { type: 'uint16', name: 'offset' }, { type: 'uint256', name: 'maxPerCall' }, { type: 'uint256', name: 'maxTotal' }] }, + { type: 'uint32', name: 'maxCalls' }, + { type: 'tuple[]', name: 'pins', components: [{ type: 'uint16', name: 'offset' }, { type: 'bytes32', name: 'expected' }] }, +]}; + +function nativeAction(a: NativeAction, validUntil: number) { + const body = encodeAbiParameters([NATIVE_TERMS], [{ + validUntil, target: a.target, selector: a.selector, + maxValuePerCall: a.maxValuePerCall, maxValueTotal: a.maxValueTotal, + amount: a.amount ? { enabled: true, ...a.amount } : { enabled: false, offset: 0, maxPerCall: 0n, maxTotal: 0n }, + maxCalls: a.maxCalls, pins: a.pins, + }]); + const initData = encodeAbiParameters([{ type: 'string' }, { type: 'bytes' }], [chain, body]); // the envelope + return { actionTargetSelector: a.selector, actionTarget: a.target, actionPolicies: [{ policy: URP, initData }] }; +} + +const actions = terms.actions.map(a => nativeAction(a, validUntil)); // 1..8 + +``` + +#### **Rules for Native Action** + +| Rule | Violation | +| --- | --- | +| 1..8 actions | `TooManyActions(count)` | +| no duplicate `(target, selector)` | `DuplicateAction(target, selector)` | +| every action names the same chain | `InconsistentChain(actionIndex)` | +| `terms.target` / `terms.selector` equal the action's | passes at grant, fails every request at N4 / N5 | + +**Targets and selectors** + +| Forbidden | Why | Error | +| --- | --- | --- | +| `0x0`, `0x1`, the wallet, engine, URP, validator, factory | an agent reaching these could re-grant itself | `ForbiddenActionTarget(target)` | +| the gateway `0x…C1` | that is an outbound call, not a Push-side one | `MandateTypeMismatch(derived, i, target)` | +| selectors `0x00000001`, `0x00000002` | engine wildcard sentinels | `ForbiddenActionSelector(selector)` | + +**Arguments — pins and metering** + +- Offsets are **absolute from byte 0 of the calldata, selector included**: static argument `i` sits at `4 + 32*i`. +- Only static-position arguments can be pinned or metered. A role on a dynamic argument (`bytes`, `string`, arrays) is a compile error in the SDK — the offset would point at a length word, not the value. +- `pins[].expected` is the **full 32-byte word**. An address must be left-padded (`pad(address, { size: 32 })`); a dirty high half is a mismatch, deliberately. +- `amount` meters **one** `uint256` argument. A function with two value-moving arguments has one bounded and one free. + +**Value-only actions** (a bare PC transfer) + +- `selector = 0xFFFFFFFF`, and the agent must send **exactly empty** calldata. +- `pins` and `amount` must be absent — `ValueOnlyWithPins` / `ValueOnlyWithAmountRule` at init. +- A no-argument function like `unstake()` still carries its four bytes and is a normal selector action, not this. + +**Defaults** + +`maxCalls = 0` unlimited · `maxValueTotal = UNLIMITED` unlimited · `amount.maxTotal = UNLIMITED` unlimited · `validUntil = NEVER` for no expiry (but zero and past are refused with `InvalidExpiry`). + +**2. Build each action (derives Universal)** + +**couple of notes** + +1. The chain string and the asset + + ```tsx + const chain = terms.chain; // CHAIN.ETHEREUM_SEPOLIA === 'eip155:11155111' + const assetChain = await prc20.read.SOURCE_CHAIN_NAMESPACE(); // add to the PRC20 ABI + if (assetChain !== chain) throw new AssetChainMismatchError(chain, assetChain); + ``` + + - Read the chain string **from the asset**, never type it. \ + - At grant URP asks the same PRC20 the same question and refuses on a mismatch (`ChainMismatch`) or an asset that cannot answer (`InvalidAsset`). + - That single check is what makes the declared chain true for the mandate's whole life. + +b. on **`*expectedCEA()`**:* + +```tsx +const { cea: expectedCEA } = await getCEAAddress(wallet, chain); +// CEAFactory.getCEAForPushAccount(wallet) +``` + +- *the wallet's account on the destination chain. The AGW exists only on Push, so bridged funds land in its mirror account over there, and that account runs the multicall. URP records it and every inner call must name it as the beneficiary, which is what keeps the output of the work coming back to the user.* +- Derived from the **AGW address**, not the owner's UEA — the AGW is `msg.sender` of `sendUniversalTxOutbound`, so the gateway resolves the CEA from the wallet. Returned whether or not it is deployed yet; the Vault deploys it on first delivery. + +```solidity +const UNIVERSAL_TERMS = { type: 'tuple', components: [ + { type: 'uint48', name: 'validUntil' }, { type: 'address', name: 'expectedCEA' }, { type: 'address', name: 'asset' }, + { type: 'uint256', name: 'maxAmountPerCall' }, { type: 'uint256', name: 'maxAmountTotal' }, { type: 'uint256', name: 'maxPCPerCall' }, + { type: 'tuple[]', name: 'allowedCalls', components: [ + { type: 'address', name: 'target' }, { type: 'bytes4', name: 'selector' }, { type: 'uint16', name: 'beneficiaryOffset' }, + { type: 'bool', name: 'hasBeneficiary' }, { type: 'uint256', name: 'maxValue' } ] }, +]}; + +const body = encodeAbiParameters([UNIVERSAL_TERMS], [{ validUntil, expectedCEA, asset, maxAmountPerCall, maxAmountTotal, maxPCPerCall, allowedCalls }]); +const initData = encodeAbiParameters([{ type: 'string' }, { type: 'bytes' }], [chain, body]); +const action = { actionTargetSelector: SEND_OUTBOUND_SELECTOR, actionTarget: GATEWAY, actionPolicies: [{ policy: URP, initData }] }; +const actions = [action]; // exactly one, always + +``` + +#### **Rules** + +| Rule | Violation | +| --- | --- | +| exactly one action | `MalformedSessionShape` | +| it must be `(GATEWAY, 0x77b86bec)` | `MandateTypeMismatch(derived, 0, target)` | +| `asset` non-zero, has code, answers `SOURCE_CHAIN_NAMESPACE()` | `InvalidConfigField` / `InvalidAsset` | +| `expectedCEA` non-zero | `InvalidConfigField` | +| `validUntil` non-zero and future | `InvalidExpiry` | + +**The allow-list** — what the agent may do on the far side + +- 1..32 entries; 0 or more than 32 → `AllowListOutOfRange`. +- `beneficiaryOffset` is absolute from byte 0 of the **inner destination-chain calldata**, selector included (first argument = 4) — not the Push-side calldata. +- `hasBeneficiary: false` for a call with no beneficiary argument; the offset is then ignored. +- `maxValue` is in **destination-chain native units** (ETH on Sepolia), never Push-side PC. Conflating the two is a real bug this design once carried. `0` = non-payable. + +**Two budgets, not one** + +| Cap | Denominated in | Bounds | +| --- | --- | --- | +| `maxAmountPerCall` / `maxAmountTotal` | the PRC20 asset | how much the agent may bridge | +| `maxPCPerCall` | native PC | protocol fee + gas swap per outbound | +| `allowedCalls[].maxValue` | destination-chain native | value attached to one inner call | + +`maxPCPerCall` has **no lifetime counterpart** — it is per-call only, so the wallet's PC balance is the real ceiling on total gas spend. See O2. + +**Scope limit** + +Destination must be EVM in v1: `expectedCEA` is a 20-byte address and URP's gate 12 requires the EVM multicall payload. Reject `CHAIN.SOLANA_*` client-side. + +--- + +#### **O6 · Grant the mandate** + +Once we create mandate, then we wraps them in the `Session` shape the wallet enforces, checks it off-chain, and sends it. + +the following are the breakdown of steps post that. + +#### **O6.1 · Assemble the Session** + +```tsx +const keyConfig = encodeAbiParameters([{ type: 'uint8' }, { type: 'bytes' }], + agent.scheme === 0 ? [0, agent.address] : [1, agent.pubKey]); // 20 bytes / 32 bytes + +const session = { + sessionValidator: VALIDATOR, // fixed + sessionValidatorInitData: keyConfig, + salt: '0x' + '00'.repeat(32), // ignored; wallet overwrites with grantNonce + userOpPolicies: [], // must be empty + erc7739Policies: { allowedERC7739Content: [], erc1271Policies: [] }, // must be empty + actions, // from O4 or O5 + permitERC4337Paymaster: false, // must be false +}; +``` + +Four fields are not yours to choose: `sessionValidator` is the one validator this wallet accepts, and the other three are dead surface — anything else is `MalformedSessionShape`. `salt` is overwritten, so send zero. + +#### **O6.2 · Pre-flight — three checks, in this order** + +```tsx +// 1 · the agent key. THREE-VALUED: true | false | revert. It decodes before it checks, +// so a blob that is not abi.encode(uint8, bytes) reverts. A revert means invalid. +const keyOk = await validator.read.validateConfig([keyConfig]).catch(() => false); +if (!keyOk) throw new InvalidMandateTermsError('BAD_AGENT_KEY', …); + +// 2 · predict the permissionId +const grantNonce = await wallet.read.grantNonce(); +const predictedId = keccak256(encodeAbiParameters([{ type: 'address' }, { type: 'bytes' }, { type: 'bytes32' }], + [VALIDATOR, keyConfig, pad(toHex(grantNonce), { size: 32 })])); + +// 3 · dry-run the real call; the returned id must equal the predicted one +const { result: permissionId } = await wallet.simulate.grantMandate([session], { account: owner }); +if (permissionId !== predictedId) throw new InvalidMandateTermsError('GRANT_NONCE_STALE', …); +``` + +| Check | Prevents | +| --- | --- | +| `validateConfig` | a 19-byte key that grants fine and makes **every** agent request fail forever | +| predict + compare | a stale `grantNonce`, and any disagreement between your derivation and the engine's | +| `simulate` | every shape and init error in §4.3 and §4.4, before the user signs | + +**Why predict the id.** The agent cannot act without it, so you need it before the grant lands: to show the mandate id on the confirmation screen, to store it against the terms, and to reference it downstream in the same batch. `grantNonce` is **0 on a freshly deployed wallet**, so a UEA multicall that deploys and grants in one signature can still compute it up front. + +#### **O6.3 · Send** + +```tsx +const data = encodeTxData({ abi: walletAbi, functionName: 'grantMandate', args: [session] }); + +// A · on its own +await client.universal.sendTransaction({ to: wallet, data }); + +// B · one signature, cross-chain mandate: gateway allowance + grant together +await client.universal.sendTransaction({ to: wallet, data: [ + ...wallet.prepareApproveGateway(asset, maxAmountTotal), // O2 + { to: wallet, value: 0n, data }, +]}); +``` + +`msg.sender` must be the owner. Through `client.universal.sendTransaction` that is `client.universal.account` — the UEA for an external-origin user, the EOA for a Push-native one. + +#### **O6.4 · What you get back** + +| Event | Emitter | Carries | +| --- | --- | --- | +| `MandateGranted(permissionId indexed, uint8 mandateType, bytes32 chainHash indexed, string chain)` | wallet | the id, and the rulebook the contracts **derived** — read it back rather than assuming | +| `SessionCreated(permissionId, account)` | engine | the mandate is live | +| `URPPolicySet(configId indexed, multiplexer indexed, account indexed, uint8 mode, bytes32 chainHash)` | URP | one per action — the `configId`s you read spend counters from | + +Store `(wallet, permissionId, terms, chain)`. The agent needs `permissionId`; you need the terms to render remaining budget later. + +--- + +#### O7 · Replace a mandate atomically (assert → stop → grant) + +**Note: As per current structure:** + +- **A mandate cannot be modified.** +- There is no `updateMandate`, no setter on URP, and no path that rewrites a live config — `initializeWithMultiplexer` refuses re-initialisation outright (`AlreadyInitialized`). +- This is ACTIVE R&D TASK , see here 👉 [**Problem: why we cannot MODIFY the mandate**](https://app.notion.com/p/Problem-why-we-cannot-MODIFY-the-mandate-3dc188aea7f48058a79aecfa00453ee7?pvs=21) + +**so how we change a mandate?** + +A change is therefore always **stop the old one, grant a new one**, and the new mandate is a genuinely different object: + +- New `permissionId` — the wallet's `grantNonce` moves on every grant, so ids never recur. +- New `configId`s — every downstream key the SDK cached is stale. +- **Spend counters restart at zero.** The old mandate's `spent` / `valueSpent` / `callsUsed` do not carry over. A user who has spent 400 of a 500 cap and "raises the cap to 800" is granting a fresh 800, not adding 300. +- Every banked signed request against the old id dies instantly, because `permissionId` is field 5 of the op hash. + + > THIS COULD CHANGE AFTER R&D TASK IS DONE and WE HAVE A SOLUTION/DECISION on how to edit mandates with JOBs. + > + +```tsx +// 1 · freeze the numbers the new terms were computed from +const assertCall = mandate.mode === 'UNIVERSAL' + ? { target: URP, value: 0n, callData: encodeFunctionData({ abi: urpAbi, functionName: 'assertSpent', + args: [configId, wallet, spent] }) } // 0x85859f51 + : { target: URP, value: 0n, callData: encodeFunctionData({ abi: urpAbi, functionName: 'assertSpent', + args: [configId, wallet, valueSpent, amountSpent, callsUsed] }) }; // 0x42bd3e90 — one per action + +const calls = [ + assertCall, + { target: wallet, value: 0n, callData: encodeFunctionData({ abi: walletAbi, functionName: 'stopMandate', args: [oldId] }) }, + { target: wallet, value: 0n, callData: encodeFunctionData({ abi: walletAbi, functionName: 'grantMandate', args: [newSession] }) }, +]; + +await wallet.write.execute([MODE_BATCH, encodeBatch(calls)]); +// MandateRevoked(oldId) · MandateGranted(newId, …) · SessionCreated · URPPolicySet per action + +``` + +#### **What the SDK implements** + +| Function | Does | +| --- | --- | +| `wallet.replace(oldId, expectedSpent, terms)` | the whole batch above; returns the new `permissionId` | +| `wallet.prepareReplace(oldId, expectedSpent, terms)` | the same as `MultiCall[]`, for callers batching it into a larger signature | +| `wallet.mandate(oldId)` | read the live counters to pass as `expectedSpent`, and the old terms to diff against the new | + +Sequence to implement: + +1. Read the mandate (`getMode` → `getConfig` / `getNativeConfig` per action) for current terms **and** current counters. +2. Build `newSession` exactly as in O4 / O5 / O6.1 — same agent key if the agent is unchanged, a different key if it is not. +3. Pre-flight the new session (O6.2). A replace that fails at `grantMandate` would have revoked the old mandate for nothing if the batch were not atomic — it is atomic, so it reverts whole, but catching it in `simulate` gives the better error. +4. Submit the batch. On `SpentMismatch`, re-read and re-present the numbers; do not retry silently, because the terms the user approved were derived from the old ones. +5. Read the new id from `MandateGranted`, replace the stored record, and **hand the new id to the agent** — it has no way to discover it. + +#### **O8.4 · Revoking without replacing** + +For a plain stop, see O8. Revocation never fails: `stopMandate` and `stopAll` carry no guard, no probe and no external call, by design. + +--- + +#### O7 · Stop + +```tsx +await wallet.write.stopMandate([permissionId]); // UnknownPermission if not enabled +await wallet.write.stopAll(); // one MandateRevoked per id +``` + +- Immediate. Every banked signed request for that id is dead. +- URP counters for the old `configId`s persist harmlessly; a regrant produces new ids. + +--- + +### Read operations + +#### R1 · Wallet views + +| Call | Returns | +| --- | --- | +| `owner()` | immutable owner | +| `factory()` | immutable factory | +| `grantNonce()` | salt the next grant will use | +| `getNonce(uint192 lane)` | next `nonceSeq` for that lane | +| `sessionEngine()` `urp()` `sessionValidator()` `universalGateway()` | wiring | +| `accountId()` | `"push.agentwallet.1.0.0"` | +| `isModuleInstalled(1, ENGINE, "")` | `true` on a healthy wallet | + +#### R2 · Factory views + +| Call | Returns | +| --- | --- | +| `walletCount(owner)` | n; next index | +| `predictWallet(owner, index)` | `(address, deployed)` | +| `isWallet(addr)` / `ownerOf(addr)` / `indexOf(addr)` | registry | +| `walletImplementation()` | for mirror checks | + +#### R3 · Mandate views + +| Call | On | Returns | +| --- | --- | --- | +| `getPermissionIDs(wallet)` | engine | all live `permissionId`s | +| `isPermissionEnabled(permissionId, wallet)` | engine | bool | +| `getSessionValidatorAndConfig(wallet, permissionId)` | engine | `(validator, keyConfig)` | +| `getEnabledActions(wallet, permissionId)` | engine | `bytes32[] actionIds` | +| `getActionPolicies(wallet, permissionId, actionId)` | engine | `[URP]` | +| `getMode(configId, wallet)` | URP | `{initialized, mode, chainHash}` — **never reverts; call it first** | +| `getConfig(configId, wallet)` | URP | universal terms + `spent`. Reverts only on an *initialised* native config; a zeroed struct otherwise | +| `getNativeConfig(configId, wallet)` | URP | native terms + `valueSpent, amountSpent, callsUsed`. Same asymmetry | +| `pushChainHash()` | URP | `keccak256("eip155:" ‖ chainid)` | + +⚠️ Neither getter distinguishes “empty” from “zeroed”. A mistyped `configId` returns a struct full of zeros, not an error — which reads as a live mandate with zero caps and no expiry. `getMode().initialized` is the only guard. + +#### R4 · Events + +| Event | Emitter | Index on | +| --- | --- | --- | +| `WalletDeployed(address indexed owner, uint256 indexed index, address indexed wallet, string label)` | factory | owner, wallet | +| `AccountInitialized(address indexed owner, address indexed engine)` | wallet | — | +| `OwnerExecuted(bytes32 indexed mode, bytes32 executionCalldataHash)` | wallet | — | +| `MandateGranted(bytes32 indexed permissionId, uint8 mandateType, bytes32 indexed chainHash, string chain)` | wallet | permissionId, chainHash | +| `MandateRevoked(bytes32 indexed permissionId)` | wallet | permissionId | +| `MandateActionAuthorized(bytes32 indexed permissionId, uint192 indexed nonceKey, uint64 nonceSeq, bytes32 opHash)` | wallet | permissionId | +| `URPPolicySet(bytes32 indexed configId, address indexed multiplexer, address indexed account, uint8 mode, bytes32 chainHash)` | URP | account | +| `OutboundMetered(bytes32 indexed configId, address indexed multiplexer, address indexed account, uint256 amount)` | URP | configId | +| `NativeCallMetered(bytes32 indexed configId, address indexed multiplexer, address indexed account, uint256 value, uint256 amount)` | URP | configId | +| `SessionCreated(bytes32 permissionId, address account)` / `SessionRemoved(bytes32 permissionId, address smartAccount)` | engine | — | +- `mandateType`: `0 = UNIVERSAL`, `1 = NATIVE`. +- `multiplexer` in URP events is always the engine. + +--- + +## 3 · Encoding appendix + +### 3.1 Structs as ABI tuples + +``` +Session (address sessionValidator, bytes sessionValidatorInitData, bytes32 salt, + (address policy, bytes initData)[] userOpPolicies, + ((bytes32 appDomainSeparator, string[] contentNames)[] allowedERC7739Content, + (address policy, bytes initData)[] erc1271Policies) erc7739Policies, + (bytes4 actionTargetSelector, address actionTarget, (address policy, bytes initData)[] actionPolicies)[] actions, + bool permitERC4337Paymaster) + +sessionValidatorInitData abi.encode(uint8 scheme, bytes key) scheme 0 → 20-byte address · scheme 1 → 32-byte Ed25519 pubkey +policy initData (envelope) abi.encode(string chain, bytes body) same shape for both kinds +UniversalTerms (body) (uint48 validUntil, address expectedCEA, address asset, uint256 maxAmountPerCall, uint256 maxAmountTotal, + uint256 maxPCPerCall, (address target, bytes4 selector, uint16 beneficiaryOffset, bool hasBeneficiary, uint256 maxValue)[] allowedCalls) +NativeTerms (body) (uint48 validUntil, address target, bytes4 selector, uint256 maxValuePerCall, uint256 maxValueTotal, + (bool enabled, uint16 offset, uint256 maxPerCall, uint256 maxTotal) amount, uint32 maxCalls, + (uint16 offset, bytes32 expected)[] pins) + +execution SINGLE abi.encodePacked(address target, uint256 value, bytes callData) // 20 + 32 + n bytes +execution BATCH abi.encode((address target, uint256 value, bytes callData)[]) +UniversalOutboundTxRequest (bytes recipient, address token, uint256 amount, uint256 gasLimit, uint256 gasPrice, uint256 maxPCForGas, bytes payload, address revertRecipient) +multicall payload 0x2cc2842d ‖ abi.encode((address to, uint256 value, bytes data)[]) +session signature 0x00 ‖ permissionId (32) ‖ sig (65 ECDSA | 64 Ed25519) +op hash pre-image abi.encode(bytes32 domain, uint256 chainid, address wallet, address engine, bytes32 permissionId, + bytes32 mode, bytes32 keccak256(executionCalldata), uint192 nonceKey, uint64 nonceSeq, uint48 requestExpiry) +``` + +- `Config` and `NativeConfig` (the storage structs returned by `getConfig` / `getNativeConfig`) are **read** types only. Never encode them. + +### 3.2 Mode word (ERC-7579) + +``` +byte 0 callType 0x00 single · 0x01 batch +byte 1 execType 0x00 default (only value accepted) +bytes 2-5 unused +bytes 6-9 modeSelector 0x00000000 +bytes 10-31 payload zero +``` + +### 3.3 Constants + +| Name | Value | +| --- | --- | +| `SEND_OUTBOUND_SELECTOR` | `0x77b86bec` | +| `MULTICALL_SELECTOR` | `0x2cc2842d` | +| `OP_HASH_DOMAIN` | `0xee007baac915cb5cecf254fbc38928446424413e2083e43f2155c71b8bf768fe` | +| `VALUE_SELECTOR` | `0xFFFFFFFF` | +| `SmartSessionMode.USE` | `0x00` | +| Donut chain string / hash | `"eip155:42101"` / `0x3d6bc1f1d3fb03065860265a8e93840b586e57075d956cd41b4319d040be87f9` | +| Sepolia chain string / hash | `"eip155:11155111"` / `0xafa90c317deacd3d68f330a30f96e4fa7736e35e8d1426b2e1b2c04bce1c2fb7` | +| `MAX_NATIVE_ACTIONS` | 8 | +| `MAX_PINS` | 8 | +| `MAX_ALLOWED_CALLS` | 32 | +| `MAX_ACTIONS_PER_REQUEST` (multicall entries) | 10 | +| `MIN_OUTBOUND_BODY_LEN` | 352 — the **body** minimum; the gate is `data.length < 4 + 352`, selector included | + +### 3.4 Function selectors + +| Function | Selector | +| --- | --- | +| `deployWallet(string)` | `0x37ba532c` | +| `execute(bytes32,bytes)` | `0xe9ae5c53` | +| `grantMandate(Session)` | `0xa3e13323` | +| `stopMandate(bytes32)` | `0xa0dbb1e9` | +| `stopAll()` | `0xf0881ae6` | +| `executeWithSession(address,bytes32,bytes,bytes,uint192,uint64,uint48)` | `0x3ea758b5` | +| `assertSpent(bytes32,address,uint256)` | `0x85859f51` | +| `assertSpent(bytes32,address,uint256,uint256,uint32)` | `0x42bd3e90` | + +### 3.5 Argument offsets + +- Absolute, from byte 0 of the calldata being inspected, selector included. Static argument `i` → `4 + 32*i`. +- Native pins and amount rule inspect the **Push-side** calldata. Universal `beneficiaryOffset` inspects the **inner** multicall entry’s `data`. +- Derive offsets from the ABI in tooling; never hand-type them. A wrong offset fails closed (every request reverts), it cannot widen a mandate. + +--- + +## 4 · Error catalogue + +### 4.1 Decoding rule + +- Wallet, factory and validator errors revert **directly** with full arguments. +- URP **init** errors (`grantMandate` path) bubble with full arguments. +- URP **checkAction** errors (`executeWithSession` path) are truncated by the engine to `PolicyCheckReverted(bytes32)`: the 4-byte selector + the first 28 bytes of the first argument. Decode the selector, treat the rest as diagnostic. +- Target reverts from `execute` and from the agent’s dispatched call bubble verbatim. + +### 4.2 Factory + +| Error | When | +| --- | --- | +| `ImplementationNotSet()` | factory not initialised | +| `IndexOutOfRange(uint256 index, uint256 next)` | `predictWallet` beyond next index | +| `NotAWallet(address)` | `indexOf` on a foreign address | +| `EnforcedPause()` | factory paused | + +### 4.3 Wallet — grant + +| Error | When | +| --- | --- | +| `NotOwner()` | caller is not owner or self | +| `MalformedSessionShape()` | any shape rule (see O6) | +| `TooManyActions(uint256 count)` | 0 actions, or > 8 | +| `EmptyChain()` | envelope chain string empty | +| `InconsistentChain(uint256 actionIndex)` | action `i` names a different chain than action 0 | +| `MandateTypeMismatch(uint8 derived, uint256 actionIndex, address target)` | gateway target under this chain’s string, or a non-gateway target under a foreign one. See the note below — `derived` is only informative in one of the two cases | +| `ForbiddenActionTarget(address)` | zero, `0x1`, wallet, engine, URP, validator, factory | +| `ForbiddenActionSelector(bytes4)` | `0x00000001`, `0x00000002` | +| `DuplicateAction(address, bytes4)` | same pair twice | +| `UnknownPermission(bytes32)` | `stopMandate` on a non-live id | +| `MalformedBatchCalldata()` | `execute` in BATCH mode with calldata that is not `abi.encode(Execution[])` — e.g. SINGLE-encoded bytes sent with `MODE_BATCH`. From `ExecutionLib` | +| `EngineStillHoldsPermissions()` | `uninstallModule` on the engine while mandates are live — `stopAll` first | + +⚠️ **`MandateTypeMismatch.derived` carries information in only one direction.** + +- **Foreign chain, non-gateway target** → `derived = 0 (UNIVERSAL)`, and it is real. The usual cause: you meant a Push-side mandate but the chain string is not byte-exact. `"EIP155:42101"`, `"eip155:042101"` and a leading space all hash to not-Push. The SDK’s §5 pre-check exists to catch this before the user sees it. +- **This chain’s string, gateway target** → `derived = 1 (NATIVE)` is **hardcoded at the revert site** (`PushAgentWallet.sol:519`). It is not wrong — that branch only runs when NATIVE was derived — but it is a constant, so do not read it as a derivation result. The useful fields here are `actionIndex` and `target`. + +### 4.4 URP — init, in order (bubbles through grant with full arguments) + +Init has no gate numbers: the numbering in §4.6 / §4.7 comes from the contracts’ own comments and test names, and there is no equivalent scheme here. Rows are in execution order, unnumbered. + +The first group runs in `initializeWithMultiplexer`, **before the chain is read and before the mode is derived**, so it is shared by both rulebooks — which is why `EmptyChain` appears above a universal table. The second group runs inside the mode’s own initialiser. + +⚠️ **`AlreadyInitialized` precedes the envelope decode.** On a config that already exists, *every* malformed shape reports `AlreadyInitialized` instead of its own error. A developer debugging a bad envelope against a reused `configId` will chase the wrong problem. Reuse is not normal — the wallet supplies a fresh salt per grant — so if you see this, the `permissionId` is stale. + +**Envelope, both modes** + +| Error | When | +| --- | --- | +| `AlreadyInitialized(bytes32 configId)` | config already exists; **runs before everything below** | +| unnamed revert | outer `(string, bytes)` decode fails: a `(uint8, bytes32, bytes)` header, `(uint8 ≥ 2, bytes)`, or under 64 bytes | +| `EmptyChain()` | chain string empty — also what a v2 `(uint8 0, bytes)` envelope and any bare struct decode to | + +**Body — universal** (chain ≠ this chain) + +| Error | When | +| --- | --- | +| unnamed revert | body is not `UniversalTerms` | +| `AllowListOutOfRange(uint256)` | 0 or > 32 entries — **checked first, before expiry** | +| `InvalidExpiry(uint48)` | `validUntil` zero or not in the future | +| `InvalidConfigField()` | zero `asset` or zero `expectedCEA` | +| `InvalidAsset(address)` | asset has no code (explicit `code.length` guard), or reverted on `SOURCE_CHAIN_NAMESPACE()` | +| `ChainMismatch(bytes32 declared, bytes32 assetChain)` | asset answered with a different chain than the envelope declared | +| unnamed revert | asset answered `SOURCE_CHAIN_NAMESPACE()` with a non-string — decode fails outside the `try/catch` | + +**Body — native** (chain == this chain) + +| Error | When | +| --- | --- | +| unnamed revert | body is not `NativeTerms` | +| `InvalidExpiry(uint48)` | `validUntil` zero or not in the future — **checked first here** | +| `NativeTargetZero()` | zero target | +| `NativeTargetIsGateway(address)` | target is the gateway | +| `TooManyPins(uint256)` | > 8 pins | +| `ValueOnlyWithPins()` | `selector == 0xFFFFFFFF` with pins | +| `ValueOnlyWithAmountRule()` | `selector == 0xFFFFFFFF` with an amount rule | + +### 4.5 Wallet — agent door + +The owner never calls this door, but these are what a badly-scoped mandate produces at runtime. Full agent-side context in the [agent doc](./AGW-SDK-v1-agent.md) §4. + +| Error | When | +| --- | --- | +| `RequestExpired()` | `requestExpiry ≠ 0` and past | +| `ValidatorNotInstalled(address)` | `validator` arg ≠ engine | +| `InvalidNonce(uint192 key, uint64 expected, uint64 provided)` | wrong `nonceSeq` | +| `InvalidSessionSignature()` | signature < 33 bytes or byte 0 ≠ `0x00` | +| `ValidationFailed(address authorizer)` | signature does not recover / verify (after URP passes) | +| `OutsideTimeWindow(uint48 validAfter, uint48 validUntil)` | engine time window | +| `UnsupportedExecutionMode()` | mode ≠ single/default | +| `ForbiddenDispatchTarget(address)` | target is the wallet or the engine | + +### 4.6 URP — universal gates, in order (truncated to 32 bytes) + +These fire on the agent’s requests, not on the owner’s calls. Listed here because they are the runtime meaning of the terms the owner granted: every gate is a cap or a pin the owner chose. + +The gate numbers come from the contracts’ own comments and test names — use them when reading `URP.sol` or a failing test. They are a **narrative numbering, not a count of checks**: gate 4 is three separate reverts (4a/4b/4c) and gates 14 and 15 are two each, so “sixteen gates” describes the list below, not sixteen discrete `if`s. Don’t go looking for a gate that isn’t a row here. + +| # | Error | Rule | +| --- | --- | --- | +| 1 | `NotInitialized(bytes32 id, address)` | config exists | +| 2 | `MandateExpired(uint48)` | `now ≤ validUntil` | +| 3 | `InvalidTarget(address)` | target is the gateway | +| 4a | `CalldataTooShort(uint256)` | ≥ 4 bytes | +| 4b | `InvalidSelector(bytes4)` | `0x77b86bec` | +| 4c | `MalformedOutboundRequest(uint256)` | body ≥ 352 bytes | +| 5 | `AssetMismatch(address expected, address actual)` | `req.token == asset` | +| 6 | `AmountExceedsCap(uint256 amount, uint256 cap)` | per-call | +| 7 | `TotalSpendCapExceeded(uint256 wouldBe, uint256 cap)` | lifetime | +| 8 | `PCValueExceedsCap(uint256 value, uint256 cap)` | Push-side `value ≤ maxPCPerCall` | +| 9 | `UncappedGasSwapRejected()` | `maxPCForGas ≠ 0` | +| 10 | `InvalidRevertRecipient(address expected, address actual)` | `== wallet` | +| 11 | `RecipientMustBeEmpty()` | `recipient.length == 0` | +| 12 | `PayloadNotMulticall()` | payload starts with `0x2cc2842d` | +| 13 | `BatchSizeOutOfRange(uint256)` | 1..10 entries | +| 14 | `ForbiddenInnerTarget(address)` | not wallet / URP / gateway / expectedCEA | +| 14 | `MalformedInnerCalldata()` | entry data ≥ 4 bytes; offset in range | +| 15 | `CallNotAllowed(address, bytes4)` | pair in `allowedCalls` | +| 15 | `BeneficiaryMismatch(address expected, address actual)` | word at offset == expectedCEA | +| 16 | `InnerValueExceedsAllowance(uint256 index, uint256 value, uint256 max)` | destination units | + +### 4.7 URP — native gates, in order (truncated to 32 bytes) + +| # | Error | Rule | +| --- | --- | --- | +| N1 | `NotInitialized` | | +| N2 | `MandateExpired(uint48)` | | +| N3 | `NativeTargetIsGateway(address)` | never the gateway | +| N4 | `TargetMismatch(address actual, address expected)` | | +| N5 | `SelectorMismatch(bytes4 actual, bytes4 expected)` / `ValueOnlyCalldataNotEmpty(uint256)` | | +| N6 | `ValueExceedsCap(uint256, uint256)` / `TotalValueExceeded(uint256, uint256)` | PC value | +| N7 | `CalldataTooShortForPin(uint256 len, uint256 i, uint256 needed)` / `ArgPinMismatch(bytes32 actual, uint256 i, bytes32 expected)` | pins | +| N8 | `CalldataTooShortForAmount(uint256, uint256)` / `NativeAmountExceedsCap(uint256, uint256)` / `TotalNativeAmountExceeded(uint256, uint256)` | amount rule | +| N9 | `CallLimitReached(uint32 used, uint32 max)` | | + +### 4.8 Validator + +`validateConfig` and `validateSignatureWithData` fail differently, and **neither named validator error can come from `validateConfig`**. + +| Surface | Bad scheme | Bad key length | Not `abi.encode(uint8, bytes)` | +| --- | --- | --- | --- | +| `validateConfig` (pre-check) | returns `false` | returns `false` | **reverts**, unnamed, at the decode | +| `validateSignatureWithData` (runtime, inside the engine) | `UnsupportedScheme(uint8)` | `MalformedConfig()` | reverts, unnamed | +- **Treat any revert from `validateConfig` as an invalid config** — the contract’s own instruction. Wrap it; see §O6. +- A config that passes `validateConfig` can still fail at runtime: a valid key with a wrong signature returns `false`, which the wallet surfaces as `ValidationFailed(authorizer)`. Neither named error above reaches the SDK as itself. + +### 4.9 Views + +| Error | When | +| --- | --- | +| `WrongModeForCall(uint8 actual)` | `getConfig` / `assertSpent` on a config **initialised** under the other rulebook. An **uninitialised** config reverts nothing — both getters return a zeroed struct. Read `getMode().initialized` first. | +| `SpentMismatch(uint256 expected, uint256 actual)` | `assertSpent` — counters moved since you read them | +| `NotInitialized(bytes32 id, address)` | `assertSpent` on a config that was never initialised | + +### 4.10 Errors the SDK will not meet + +Listed so nobody maps them: `ZeroAddress()` (URP constructor) · `NotExecutorModule(address)`, `AlreadyCredited(bytes32)` (`creditRevert`, callable only by the executor module, which has no code on Donut) · `ImplementationNotSet()` (factory misdeployment). + +### 4.11 SDK error classes + +All extend `AgentWalletError { code, hint, ...context }` (the `PC20Error` pattern). Client-side checks throw before any signature is requested; on-chain reverts are decoded from the AGW ABIs. + +| Class | Thrown by | When | +| --- | --- | --- | +| `InvalidMandateTermsError` | `grant`, `prepareGrant` | any §5 grant pre-check fails; carries `violations[]` naming the on-chain error it would have hit | +| `AssetChainMismatchError` | `grant` | `asset.SOURCE_CHAIN_NAMESPACE() !== terms.chain` | +| `CEAFactoryDriftError` | `grant` | `CEA_FACTORY_ADDRESSES[chain] !== Vault.CEAFactory()` | +| `UnsupportedDestinationError` | `grant` | SVM destination for a cross-chain mandate | +| `MandateNotLiveError` | `stop`, `replace` | `isPermissionEnabled` false | +| `AgentWalletRevertError { name, args }` | any write | decoded custom error from wallet / factory / URP / validator; `PolicyCheckReverted` is unwrapped to the inner URP selector | + +--- + +--- + +[O9 · Compile an agent card into a mandate](https://app.notion.com/p/O9-Compile-an-agent-card-into-a-mandate-3df188aea7f480c98f5be5018d268659?pvs=21) + +--- + +## Open questions (team) + +1. **Namespace name.** `client.agentWallet` proposed; alternatives `client.agent`, `client.aw`. Decide before the first PR since it is public API. +2. **Owner batching on Push-native EOAs.** UEA owners get one-signature deploy + approve + grant via `data: MultiCall[]`. A Push-native EOA cannot; accept two txs, or add a factory `deployAndGrant`? (Contract change, out of the SDK’s hands.) +3. **Gateway allowance policy.** Approve `maxAmountTotal` at grant (simple; one allowance per asset, shared across mandates on the same asset) versus approve per request (impossible from the agent side without a native `approve` mandate). Recommend at-grant, reset on `stop`. +4. **`SOURCE_CHAIN_NAMESPACE` on the PRC20 ABI and `getOutboundTxGasAndFees` on a core ABI** are missing from `@pushchain/core`; confirm which team adds them. +5. open questions regarding AGENT CARD to Mandate Translation → [ **Open Question: Agent Card to mandate translation**](https://app.notion.com/p/Open-Question-Agent-Card-to-mandate-translation-3df188aea7f480c99e36decc46df5da0?pvs=21) +6. Open question regarding UniversalMarketplace.startJob() → https://pushchain.slack.com/archives/C077XBA6KUH/p1789667453891089 + +--- + +# Nomenclature and Standardization of Agentic Wallet, SDK, Universal Marketplace \ No newline at end of file diff --git a/plan/agw/notion/overview.md b/plan/agw/notion/overview.md new file mode 100644 index 00000000..ba9d9694 --- /dev/null +++ b/plan/agw/notion/overview.md @@ -0,0 +1,153 @@ +# AGW + UniversalMarketplace + 8183 + UniversalEvaluator + + + +# The flow as a picture + +Six phases, top to bottom. The user signs once at the start; the agent works under the rules; the evaluator settles. + +```mermaid +sequenceDiagram + autonumber + actor Agent + participant Market as Universal Marketplace + actor User + participant AGW as AGW (wallet + rules) + participant Kernel as 8183 Kernel + Hook + participant Eval as UniversalEvaluator + participant Chains as Other chains (validators read) + + Note over Agent,Market: Phase 1. Listing + Agent->>Market: publish card: skill, access needed, fee, evaluation criteria + + Note over User,Kernel: Phase 2. Start job, one signature + User->>Market: pick card, set principal and duration + Market->>AGW: deploy or reuse wallet, fund it, grant rules + Market->>Kernel: create job (client = AGW, criteria in description) + + Note over User,Eval: Phase 3. Fund and start + User->>Kernel: fund: fee into escrow + Kernel->>Kernel: hook: agent key matches, rules outlive job, one live job per wallet + Kernel->>Eval: register criteria + Eval->>Chains: START reads + Chains-->>Eval: baseline recorded, job has started + + Note over Agent,Chains: Phase 4. Execute (repeats) + Agent->>AGW: act under the rules + AGW->>Chains: only what the rules allow + + Note over Agent,Chains: Phase 5. Submit and verify + Agent->>Kernel: submit (refused before baseline or minDuration) + Kernel->>Eval: evaluate + Eval->>AGW: any checkpoint since start? (did the user change anything) + Eval->>Chains: END reads, three blocks + Chains-->>Eval: facts + + Note over User,Eval: Phase 6. Settle + alt promise kept, or user changed things mid-job + Eval->>Kernel: complete: fee to agent + else promise not kept + Eval->>Kernel: reject: fee back to user + else no verdict by expiry + User->>Kernel: claimRefund + end +``` + +# The four pieces, in one line each + +| Piece | What it is | Status today | +| --- | --- | --- | +| AGW (Agentic Wallet) | A user's wallet on Push that an agent key may act from, only inside rules the user set. A primitive: works alone, or as the client of an 8183 job. | BUILT on branch `pushAgenticWallet_v3`, deployed on Donut at provisional addresses. Permanent deployment waits on the contract change set. | +| Universal Marketplace | Where agents list what they do and what access they need (the agent card, including the evaluation criteria they promise). Where a user picks a card and starts a job in one signature. | DESIGN only. No contract, no repo. | +| 8183 (job kernel) | The ERC-8183 escrow: create job, quote, fund, submit, complete or reject, refund. The AGW is the client. A hook binds the job to the AGW's rules. | BUILT on `push-chain-core-contracts` branch `8183-v1` with tests. Not deployed. Hook is partial. | +| UniversalEvaluator | The job's judge. Reads facts through Read State at fixed points, compares them to the criteria, calls complete or reject. Generic: criteria are data, not code. | DESIGN. Three earlier drafts; converged on 2026-09-28 to one generic evaluator. No code. | + +# How they connect, phase by phase + +| Phase | What happens | Which piece | +| --- | --- | --- | +| 1. Listing | Provider publishes an agent card: skill, contracts and functions it needs, fee, execution key, evaluation criteria template. | Marketplace | +| 2. Start job | User picks a card, gives principal and duration. One signature: deploy (or reuse) the AGW, fund it, grant rules compiled from the card, create the 8183 job with the compiled criteria in the description. | Marketplace, AGW, 8183 | +| 3. Fund and start | Fee goes to escrow. The hook checks the rules belong to this provider and outlive the job, registers the criteria with the evaluator, and fires the START reads. When they land, the job has started. | 8183, Evaluator | +| 4. Execute | Agent acts through the AGW's agent door. UniversalRulesPolicy checks every call before it leaves Push. Cross-chain legs run through the gateway and the AGW's CEA. | AGW | +| 5. Submit and verify | Provider submits (refused before minDuration or before START landed). END reads fire. Evaluator compares START, END and the criteria. Checkpoints on the AGW are read first: if the user changed anything mid-job, the provider is paid regardless. | 8183, Evaluator, AGW | +| 6. Settle | Pass: complete, fee to provider. Fail: reject, fee back to the AGW. No verdict by expiry: claimRefund. Reputation write only for evaluator-judged jobs from registered cards. | 8183, Evaluator | + +# Locked so far (2026-09-28) + +- AGW is a primitive; 8183 is one consumer of it. +- One word on-chain and in the SDK: rules (not mandate). Contract names: `AGW.sol`, `AGWFactory.sol`, `UniversalRulesPolicy.sol`. +- The marketplace must be able to run the whole start-job sequence in one contract call, so factory and wallet get signature-authorized variants. +- The evaluator is generic. Criteria are an array of conditions (read plus comparison), authored by the agent on the card, copied into the job at createJob. +- Job start is fund. START reads fire at fund; the job is started when they land. END reads fire at submit. +- Checkpoints on the AGW replace any gate on the owner: any owner-side change mid-job (principal moved, rules changed, key changed) pays the provider. This also settles "rules changed mid-job": there is no rebind; the change is a checkpoint and the fee goes to the agent. +- Gas is always PC. The job fee token is chosen by the client per job (USDC, USDT.eth, USDT.sol and other PRC20s); PUSD is not required. The kernel today is single-token per deployment, so this needs either one kernel per token or a kernel change that puts `paymentToken` on the job (K-12, recommended). +- Solana is required work, not deferred: a third rulebook inside UniversalRulesPolicy keyed by the `solana` namespace. + +# Decisions still open, in the order they unblock people + +1. Start job: SDK-orchestrated multicall first, or marketplace contract from day one? Depends on whether the demo user is Push-native. +2. Fee fixed on the card (provider accepts by signing the card, hook recomputes compile at fund) or provider quotes via setBudget after the job exists. +3. Who pays reads, and whether the evaluator takes a fee. Not needed for the POC, needed before any business-model claim. +4. Client-chosen fee token: K-12 kernel change (token per job, `totalEscrowed` per token, fees in the job's token) vs one kernel deployment per token. Recommendation: K-12. + +# Timeline + +POC before the investor window (important meetings from Oct 10; window Oct 15 to Nov 10). Scope: marketplace listing, card selection, rules creation, job creation, one evaluated job type. + +# Pages + +Read in order. Each page is self-contained and opens with where it is going. Pages 5 to 8 are the SDK, one namespace per piece: `client.agentic`, `client.market`, `client.job`, `client.evaluation`. + +### 1. AGW Contract Changes + +[1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) + +### 2. Universal Marketplace + +Registry, compiler, one-signature start job, the agent card, and the SDK-vs-marketplace orchestration decision. + +[2. Universal Marketplace](2-universal-marketplace.md) + +### 3. 8183 + +[3. 8183 (job kernel and hook)](3-8183-job-kernel-and-hook.md) + +### 4. Universal Evaluation + +[4. Universal Evaluation](4-universal-evaluation.md) + +### 5. SDK: AGW + +`client.agentic` on the owner side; `initialize(agentSigner, { agenticWallet: '0xWallet' })` on the agent side. Rules, derive, create, list, wallet handle, prepare. + +[5. SDK: AGW](5-sdk-agw.md) + +### 6. SDK: Universal Marketplace + +`client.market`: cards, compile, one-signature start (composes agentic, job, evaluation); publish and retire on the provider side. + +[6. SDK: Universal Marketplace](6-sdk-universal-marketplace.md) + +### 7. SDK: 8183 Job + +`client.job`: create, fund, submit, status, watch, claimRefund. Client side through the AGW, provider side with a plain signer. + +[7. SDK: 8183 Job](7-sdk-8183-job.md) + +### 8. SDK: Universal Evaluation + +`client.evaluation`: criteria build, validate, resolve, encode, simulate; job status, waitForStart, verdict. + +[8. SDK: Universal Evaluation](8-sdk-universal-evaluation.md) \ No newline at end of file diff --git a/plan/agw/pending-items.md b/plan/agw/pending-items.md new file mode 100644 index 00000000..1c4af84d --- /dev/null +++ b/plan/agw/pending-items.md @@ -0,0 +1,26 @@ +# AGW SDK pending items + +October 18, 2026. The newly downloaded SDK sections 6/7 supersede the earlier `actions[]` proposal and multiple-rule creation decision. See [the item-by-item feedback list](section6-action-items.md). + +| Item | Owner / dependency | Completion condition | +| --- | --- | --- | +| Preset bridge-token coverage | SDK registry / core token routes | SDK readiness/explicit destination-funded flow is complete and 9/9 grant simulations pass. Sepolia WETH/stETH mappings are verified/fixed; other mocks/Circle routes still need real deployments before registry expansion. Selected tokens remain in review metadata; no silent alias or cap removal. | +| New preset-limit live acceptance | SDK / network processing | Aave passed; EigenLayer and BNB/Venus completed all scenario assertions. Fresh Base/Moonwell acceptance remains incomplete: stopped at user request during setup. No tests running | +| Destination aggregate spend semantics | Product/contracts | Confirm whether limits must aggregate a batch or destination lifetime activity; current pins are per allowed call and maxTotal is Push-outbound only | +| Native 1..32 calls in spec versus deployed maximum 8 | Product/contracts | Align spec or deploy increased ceiling; SDK enforces 8 now | +| Additional preset protocols / chains | SDK + protocol prerequisites | Every shipped testnet protocol/chain combination now has a positive live flow. Remaining coverage is borrow/repay, other markets/methods and mainnet; expand excluded protocol rows only after deployment/function/permission checks | +| Exact authored ABI reconstruction on reads | Spec metadata, optional | Static tuple/fixed-array paths now work. Raw selector + word positions roundtrip losslessly; recovering original names/types requires metadata not stored by contracts | +| Native historical lifetime limits | Spec/migration | Define a lossless public representation if these old grants must be editable; never drop their restrictions silently | +| Revert credit | Push-core executor | Executor invokes creditRevert; verify restored spend independently | +| Delivery/terminal latency | Platform | Resolve delayed terminal status and bounded polling expectations | +| Single clean live run / new-contract acceptance | SDK, then new deployment | All 69 v6 cases have passing coverage across the full run plus focused follow-up. One clean 69-case invocation remains a separate optional release checkpoint | + +User decisions recorded October 12: multi-action native `spent` uses per-action entries. Decoded Solana rules may use an explicit raw form for lossless get→update; authored rules use arg/account positions. These no longer require clarification. + +The first-use EVM gas default is implemented and is no longer an external core/gateway question. `setLabel` already exists on v5; direct invocation requires no contract change. + +V6 accounting note: generic native MAX pins enforce a per-call bound but do not increment the separate `amountSpent` meter. The SDK returns the actual counter (normally zero for the new public shape), plus value/call counters per action; it does not infer token spending from arbitrary numeric arguments. If the UI needs native per-token spend totals, that requires an explicit accounting design. + +Preset permission defaults are now implemented following the user’s October 18 approval: seven-day expiry, 20 PC per-outbound ceiling, and token-specific positive caps. Explicit asset lists retain zero defaults for omitted caps. This resolves the configuration-policy item; it does not supply missing PRC20 routes, liquidity or destination aggregate accounting. + +Publish readiness: preset configuration, route diagnostics, explicit destination-funded direct creation, package checks and v5 immutable-install checks are complete. See research/preset-release-readiness-2026-10-18/README.md. Remaining destination funding/liquidity/routes are operational prerequisites. Publication is manual; no publish action was run. diff --git a/plan/agw/product-decisions-2026-10-04.md b/plan/agw/product-decisions-2026-10-04.md new file mode 100644 index 00000000..708667e2 --- /dev/null +++ b/plan/agw/product-decisions-2026-10-04.md @@ -0,0 +1,77 @@ +# Harsh product replies and SDK impact + +October 6 follow-up: [v4 owner guide/deployment review](research/deployment-review-2026-10-06/README.md) supplies universal hard-zero/maxUint256 semantics, wire/read/assertion layouts, SVM structs and same-agent multiplicity. These are no longer missing contract definitions. Native SDK omission defaults/public fields, raw-offset authoring and send selection remain product choices; see the narrowed question drafts. + +October 5 follow-up: [live Notion comments](research/notion-comments-2026-10-05.md) add multiple-rules direction and ambiguous token-independence wording. See [H6](questions-harsh.md#h6) for same-agent scope/send selection and H3 for final token/limit definitions. The October 4 decisions below remain recorded evidence; uniqueness is now provisional and defaults/raw offsets remain unresolved. + +Recorded October 4, 2026 from the screenshot supplied by Shoaib. The message is attributed to Harsh Rajat and displays 1:35 AM; no Slack permalink or explicit message timezone was supplied. These replies supersede the earlier recommendations where clear. This file records decisions and interpretation; no SDK source changes were made in this pass. + +## Source check + +We downloaded [SDK page 5](https://app.notion.com/p/pushprotocol/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9) again on October 4. Its body is byte-identical to the saved snapshot after normalizing five known page-1 links. It still contains maxValueTotal, public pure helpers, Spent and compileCard. The visible menu says last edited October 2 at 8:39 PM. The message therefore carries newer scope direction than the page body currently exposes. [Export comparison and hash evidence](research/notion-check-2026-10-04/comparison.json). Comments are excluded from the native export; this is not a full twelve-page refresh. + +AGW remote pushAgenticWallet_v3 was rechecked and remains e704d5b. No new deployment was verified. + +## Decisions and interpretations + +| Item | Harsh's reply | Disposition and implementation impact | +| --- | --- | --- | +| H1 / A01 | Approval safety belongs to UI/marketplace; SDK should not decide it | Product policy resolved: remove the SDK's blanket approval-selector rejection. Keep structural/ABI/chain validation and actual contract enforcement. Audit the related native mandatory-spender-pin policy under the same boundary; do not confuse it with the ability to encode a caller-requested pin. The approval exposure still exists and belongs in UI/marketplace guidance. | +| H2 / A02 | Multicall or EIP-7702 should handle multiple transactions | Product wants batching. Our earlier blanket rejection was too broad: a sender-preserving outer batch can contain multiple single-call executeAsAgent operations. Source review supports that mechanism; SDK implementation/local validation is pending. See the dedicated analysis below. | +| H3 / A03 | Omitted maxTotal should use uint256 rather than zero; maxValuePerCall “same I guess”; maxValueTotal has changed in the spec | Partial. Interpret “uint256” as an intended uint256 maximum/unlimited default, not a literal type value, and confirm the exact table against the revised spec. The downloaded page body does not expose the referenced maxValueTotal revision. Other optional defaults and explicit-zero semantics were not fully answered. | +| H4.1 / A04 | Generation context for pure helpers does not need to be public | Keep generation/validator/factory machinery internal; stop asking for approval of public context parameters. Adjust generation-dependent helper exposure accordingly. This is not removal of client.agentic.derive or internal generation validation. Do not infer that every unrelated utility must disappear. | +| H4.2 / A05 | Multi-asset spend does not need to be public | Drop the request for a public per-token Spent shape. Internal per-token counters and expected-spend assertions are still required for rules.update. Align RulesRecord exposure with the narrowed public surface; do not remove on-chain/internal accounting. | +| H4.3 / A06 | Revoked history is not public in v1; reconsider later | Closed as deferred v1 scope. Active rule reads remain; no complete historical reconstruction or new grant metadata is required solely for this feature. Define revoked-ID lookup as an explicit unavailable/not-active result in the revised SDK behavior. | +| H4.4 | Zaryab is working on SVM destinations | Contract dependency remains. Obtain matching terms, payloads, capability/deployment and representable SDK input before enabling it. This is not proof that SVM support is delivered. | +| H5 / A08 | Marketplace nomenclature is not ready; compileCard should not come with AGW | Closed for standalone AGW scope: remove the public AGW compileCard stub/export and move card schema/compiler work to the later marketplace track. It is no longer a standalone AGW release blocker. | + +The later raw-offset NativeRule extension from review R5 was not included in these replies. Its public input/output contract still needs agreement if those records remain public. + +## H2 Correction to our batching analysis + +The wallet's agent door rejects ERC-7579 batch mode inside one executeAsAgent call. That does not prohibit an outer transaction from making several single-call entries: + +```text +Agent UEA multicall or delegated EIP-7702 account + → AGW.executeAsAgent(ruleId, single, call1) + → AGW.executeAsAgent(ruleId, single, call2) +``` + +Each call still arrives from the authorized agent account and gets its own policy checks. This is separate from factory deployment/grant batching. It cannot be replaced with an arbitrary helper contract, whose address would become msg.sender. + +Source evidence: [UEA_EVM multicall and failure propagation at cb69e0b](https://github.com/pushchain/push-chain-core-contracts/blob/cb69e0ba101bef1bb4440e54b2c45396be3e92ce/src/uea/UEA_EVM.sol#L155) calls each target from the UEA and reverts the containing transaction on failure. The SDK's PushBatchExecutor uses delegated EIP-7702/ERC-7821 execution. Native rule expressiveness is separate: a single-action NativeRule cannot authorize different target/selector pairs merely because the transport can batch them. + +SDK work: encode one agent-door call per item, preserve signer identity, test cumulative counters and all-or-nothing rollback, and adapt response/progress reconstruction for the outer batch. Current core can fall back from 7702 to sequential sends. Require an atomic-capable transport for atomic AGW arrays or explicitly settle sequential behavior; never silently claim atomicity. This is a technical implementation/verification task, not evidence that a new AGW batch entry point is required. + +## Implementation queue + +1. Align the public surface: internal generation details; no public universal Spent proposal, no revoked-history promise in v1, and no AGW compileCard. +2. Remove approval-policy rejection from the SDK while retaining encoding and contract validation. +3. Resolve H3's exact field/default table. Do not guess the referenced maxValueTotal change from the screenshot. +4. Implement and test sender-preserving native agent batching using the existing transport capabilities; keep unsupported transport cases explicit. +5. Retain Zaryab dependencies for final multi-asset wire/read/assertion ABI, ref/envelope/metadata scope, SVM artifacts and compatible deployment. +6. Obtain the separate raw-offset public-type decision before release. + +Existing implementation at a852777 still contains provisional approval/default rules, public generation-context helpers, Spent fields and the compileCard stub. These are now recorded alignment work, not claims that the new decisions have already been implemented. No production files, external pages or messages were changed. + +## Implementation follow-through + +The subsequent alignment implements the clear decisions: generation-dependent helpers and spend counters are internal, active-only v1 reads use RULE_NOT_FOUND for unknown/revoked IDs, compileCard is removed, approval policy is external, and native agent arrays use sender-preserving atomic UEA/7702 transport. H3 defaults and the raw-offset public-type question remain unchanged/pending. See [validation and limits](research/product-alignment-2026-10-04/README.md). The earlier a852777 statements above record the pre-alignment state. + +## October 7 follow-up — user-relayed team answers + +This update supersedes the earlier pending status for these decisions. It records reported decisions, not completed implementation. + +- Omitted native `maxValuePerCall` and `maxValueTotal` remain `0`: no native PC value allowance. Existing SDK behavior matches. +- Keep the current `assets[]` model and independent token budgets. +- Public Solana authoring will use named inputs from an IDL. The public adapter and its acceptance tests still need implementation; stored reads must preserve exact constraints because the contract does not store the IDL. +- Rule `ref` is removed from scope. Remove its public input/capability stub during SDK alignment. +- `setLabel` will be fixed by Zaryab. Keep it gated until the contract surface and deployment are verified. +- Contract validation is authoritative; SDK error mapping should expose refusals. Freshly fetched `deploy-agw@10a24f1` still requires an explicit `rulesId` in `executeAsAgent` (`src/AGW.sol:823`). It checks the agent, validates that selected rule, then dispatches (`828–834`). It does not choose among rules. The later clarification retains AMBIGUOUS_RULE for multiple candidates. Reverted action/state does not imply a mined transaction costs no gas. +- No new answer was supplied for H4.5 (native/EVM argument-index versus raw-offset public types). + +## October 7 final decisions and implementation + +Shoaib approved dual native/EVM argument-index/raw-offset authoring with exact decoded reads. The assistant initially misinterpreted the contract-validation reply as a request for automatic rule selection; Shoaib corrected that interpretation. H6 retains AMBIGUOUS_RULE for multiple candidates, with existing contract validation and SDK error mapping. No automatic-selection interface/deployment is required. + +SDK alignment now removes public rule `ref` inputs/records/capability, rejects stale ref inputs, preserves checkpoint `ref`, and implements named-IDL Solana authoring through public create/add/update/read/send paths. Supported fixed layouts fail explicitly on unsupported dynamic/optional/nested schemas. The public guide documents scope. `setLabel` remains gated pending contract delivery. Existing rule selection and contract enforcement remain in place. diff --git a/plan/agw/public-api-proposals.md b/plan/agw/public-api-proposals.md new file mode 100644 index 00000000..58728a4f --- /dev/null +++ b/plan/agw/public-api-proposals.md @@ -0,0 +1,112 @@ +# AGW public API proposals for team review + +**October 7 disposition:** named-IDL Solana authoring and dual native/EVM raw-offset/index inputs were approved and implemented (supported fixed layouts documented in the consumer guide). H6’s caller-selector proposal is not being implemented. The clarified decision retains AMBIGUOUS_RULE and relies on existing contract enforcement/error mapping; no automatic-selection contract change is requested. The sketches below preserve the proposal history; use current exported types and `packages/core/AGW.md` for implementation. + +October 6, 2026. These are proposals for H4.4/H4.5/H6, not implemented public contracts. Native/EVM methods remain as implemented; public Solana capability stays gated. The [source recheck](research/question-source-recheck-2026-10-06/README.md) separates supplied wire definitions from these remaining SDK choices. + +## H4.4 Solana rule inputs and decoded records + +Recommend a Solana-specific member of Rule, selected by `chainNamespace: solana:*`. Keep the existing lifecycle methods and shared agent/expiry/asset/gas fields. Do not make callers supply the gateway or wallet CEA: resolve the configured cluster, derive the CEA and every protected input/output ATA internally. + +For public authoring, recommend IDL instruction/account/field inputs. The SDK compiles them into the supplied program/account/data constraints. Explicit raw wire authoring is an alternative requiring agreement; it is already available internally for acceptance tests, not a root export. + +The following is a proposed input sketch, not a current SDK example: + +```ts +type SvmAddress = string; // validated base58, or explicitly supported 32-byte hex +type SvmAccountRef = + | { kind: 'walletCEA' } + | { kind: 'walletATA'; token: SvmAddress } + | { kind: 'address'; address: SvmAddress }; + +interface SvmInstructionRule { + program: SvmAddress; + instruction: { idl: SvmIdl; name: string }; + accounts: { name: string; expected: SvmAccountRef }[]; + fields?: ( + | { name: string; equals: Hex | bigint } + | { name: string; min: bigint } + | { name: string; max: bigint } + | { numerator: string; denominator: string; minRatio: { num: bigint; den: bigint } } + )[]; +} + +interface SolanaRuleInput { + agent: Address; + chainNamespace: `solana:${string}`; + validUntil: number; + assets: { token: MoveableToken | SvmAddress; maxPerCall: bigint; maxTotal?: bigint }[]; + maxGasPerCall: bigint; + outputTokens?: SvmAddress[]; + allowedInstructions: SvmInstructionRule[]; +} +``` + +Output tokens are separate derivation inputs: they must contribute protected ATAs even if the rule only spends its input tokens. An output declaration is not a guarantee that the instruction pays it; the instruction's actual value-carrying accounts and relevant data fields still need pins. + +Compilation requirements: + +- Resolve instruction discriminators and exact account ordering from the selected IDL; pin the CEA and every value-carrying account. Refuse layouts that cannot be identified reliably. +- Record the source IDL hash in SDK evidence. There is no delivered grant ref/hash field to claim this is stored on-chain; durable metadata is a separate decision. +- Apply the delivered aggregate caps: 8 assets, 32 program entries, 16 account pins, 8 data pins and 16 protected CEA accounts. Each program entry needs a pin, so the aggregate pin cap can limit the practical instruction count below 32. +- Map fixed unsigned fields of at most eight bytes to GTE_LE/LTE_LE, exact byte values to EQ, and supported paired fields to RATIO_GTE_LE. Verify offsets from the actual layout; two variable-length regions are not guessed through. +- Preserve account/data constraints on reads. An on-chain discriminator/offset does not reconstruct an IDL or named field; a decoded record must use exact keys, indexes and offsets unless a separately verified IDL is supplied. +- Keep instruction execution on the normal sendTransaction surface after agreement. One SVM outbound contains one instruction; do not promise a destination instruction array the delivered wire format cannot represent. + +Recommend `RulesRecord.rule` become a discriminated decoded union, including the stored SVM programs, account/data pins and protected accounts. Authoring and decoding should have distinct names; decoded records are not silently passed through the IDL authoring compiler. A conversion helper would need verified IDL/context. Public spend, revoked history and marketplace compilation remain excluded. + +**Decision for Harsh/Zaryab:** adopt the IDL-authoring/explicit-decoded model above, or approve explicit raw constraints as a public authoring alternative. Base58/hex acceptance and non-Anchor instructions must be stated with the selected model. The SDK team will implement and test the selected representation; the delivered wire types do not need redesign. + +## H4.5 Native/EVM raw authoring and decoding + +The current implementation accepts both argument-index and raw-offset authoring, and always reads exact offsets. That is lossless and tested, but extends the latest page-5 shape. The historical SDK used offsets; it does not by itself approve the current public API. + +Two concrete choices: + +| Choice | Inputs | Decoded rules | Compatibility/work | +| --- | --- | --- | --- | +| Keep current dual form | `pins: {arg, expected}` or `{offset, expectedWord}`; amount uses arg or offset; EVM beneficiary uses argument index or beneficiaryOffset | Exact raw offsets/words | Smallest implementation delta; reads can round-trip into add/update. Caller-authored offsets lack ABI semantic validation. | +| Separate input/decoded forms | Public new authoring uses ABI argument indexes; raw wire values remain a decoded type | `DecodedNativeRule` / `DecodedEvmRule` retain exact offsets | More explicit validation boundary; changes RulesRecord.rule type and requires an explicit conversion/reuse story. | + +If the current dual form is chosen, keep exact word validation and integer bounds, reject conflicting index/offset fields, and prefer ABI generation in examples. The SDK must not claim that an arbitrary raw offset pins a particular named argument. + +If separate forms are chosen, do not reconstruct `arg = (offset - 4) / 32`: that assumes a layout that storage does not prove. Keep decoded values exact and specify how an owner reuses an existing rule with a verified ABI. + +**Recommendation:** retain the tested dual form for this SDK revision if product accepts explicit low-level authoring. If public authoring must be ABI-only, use separate decoded records across native/EVM/SVM rather than losing wire information. This choice does not re-open H1's UI/marketplace-owned approval-screening policy. + +## H6 Rule selection for sends + +Recommend an explicit optional selector in per-send options. A single candidate still works without it; multiple candidates require an explicit ID. Selection is never cached at initialize and never based on remaining budget, expiry, grant order or trying several paid transactions. + +Proposed examples, not current supported options: + +```ts +await agent.universal.sendTransaction( + { to: target, data }, + { agentic: { rulesId } }, +); + +await agent.universal.sendTransaction( + { to: wallet, data: [nativeCallA, nativeCallB] }, + { agentic: { rulesIds: [idA, idB] } }, +); +``` + +The exact containing options type is an implementation detail to align with core. The important public contract is one ID for a single action/outbound and an ordered ID list only for an outer native batch. + +| Request | Selection | +| --- | --- | +| Single Push-native action | One optional rulesId | +| Native array | Ordered rulesIds, one per item; alternatively one rulesId reused for every item | +| EVM destination call array | One rulesId for the entire gateway outbound; no merging of permissions from different rules | +| SVM destination | One rulesId for the single instruction/outbound | + +Validation before signing: the selected ID is currently enabled on the selected wallet, names the signer's Push identity and matches the destination chain. Refuse mixed selector forms, count mismatches and selector use outside the agent door. The on-chain policy remains the action/budget/expiry authority. A rule revoked after lookup still fails on-chain; a selector does not lock contract state. + +Native batches retain sender-preserving UEA/7702 execution and atomic rollback. If several IDs are allowed in one batch, internal replay currently assumes one common ID and must be extended deliberately. Proposal: keep existing metadata.rulesId for a single/common ID and add ordered metadata.rulesIds only for a heterogeneous native batch. Preserve origin and raw transport fields. + +**Decision for Harsh:** approve explicit per-send selection, including the native-array and metadata semantics above, or specify a deterministic automatic strategy. Current management permits multiplicity; current ambiguous sends fail before signing with candidate IDs. + +## Boundaries + +These proposals introduce public types/options and need agreement before being advertised. Internal wire-level tests can continue independently. H3's native PC omission defaults and token-model wording, plus Z1.3's ref/label release scope, remain separate. Nothing here adds compileCard, public accounting, historical reconstruction or a legacy adapter. diff --git a/plan/agw/questions-aman.md b/plan/agw/questions-aman.md new file mode 100644 index 00000000..8bea2025 --- /dev/null +++ b/plan/agw/questions-aman.md @@ -0,0 +1,94 @@ +# Preset questions for Aman: agentic wallet presets + +Updated October 21, 2026. Final; ready to send. Internal (not part of the message): our evidence is in [pre-question findings](research/pre-question-findings-2026-10-21/README.md). + +## Answered (October 23, Aman) + +1. **Remove Circle:** presets no longer send Circle USDC (`.old`) from Push. The `.old` mapping stays in the SDK for hand-written rules while the routes exist. +2. **Keep only tokens Push supports; ETH works, remove LINK:** every preset now sends only native ETH. +3. **Native ETH plus wrap on arrival: yes.** +4. **Categories:** DEXES (Uniswap V3) and LENDING (Aave V3); STAKING can wait. PREDICTION is removed. + +**Shipped catalog** (testnets): Uniswap V3 and Aave V3 on Sepolia, Base Sepolia and Arbitrum Sepolia. Each preset wraps ETH first (`WETH.deposit()` capped by `maxValue`). DEX swaps WETH and Circle USDC on the destination chain only; those pools are the only WETH pools with liquidity on these routers (read on-chain October 24). Lending supplies Aave's own WETH reserve. `get` returns `{ rules }`; the `readiness` field is removed. + +--- + +## Context + +Presets are ready-made agent rules for Uniswap/PancakeSwap, Aave/Moonwell/Venus and EigenLayer. Each preset lists the exact tokens that app uses on each test chain. + +A preset can only be created if Push can send every one of those exact tokens to that chain. That needs a Push token (PRC20): a token on Push that represents that exact token and can be sent out as it. We call that a route. The SDK never swaps in a different token with the same name, because the app wouldn't accept it. + +**Why it matters now:** Riyanshu's create screen keeps a preset's Create button disabled until all its routes exist, so 7 of the 9 presets can't be used on testnet. + +Status in `@pushchain/core` 6.0.27-alpha.6, with the token registry checked on October 21. "Ready" means a real agent created that preset and ran its actions on testnet on October 21. + +| Preset | Sepolia | Base Sepolia | Arbitrum Sepolia | BNB testnet | +|---|---|---|---|---| +| DEX | **ready** | blocked: WETH | blocked: WETH | blocked: WBNB, USDT | +| Lending | blocked: LINK | blocked: LINK, Moonwell USDbC, Moonwell WETH | **ready** | blocked: USDT, USDC (Venus) | +| Staking | blocked: WETH (EigenLayer) | — | — | — | + +Questions 1 and 2 may belong to whoever runs the Push token registry (core team). If so, tell us who and we'll ask them directly. Question 3 is a preset design choice. + +--- + +## 1. Can we treat the three Circle USDC ".old" routes as permanent? + +These routes carry Circle's USDC, which the presets use: + +| Chain | Circle USDC | Push token | Used by | +|---|---|---|---| +| Sepolia | `0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238` | `0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E` (USDC.eth.old) | DEX Sepolia (ready) | +| Arbitrum Sepolia | `0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d` | `0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6` (USDC.arb.old) | Lending Arbitrum (ready) | +| Base Sepolia | `0x036CbD53842c5426634e7929541eC2318f3dCF7e` | `0x84B62e44F667F692F7739Ca6040cD17DA02068A8` (USDC.base.old) | DEX Base (its other token, WETH, is what blocks it) | + +- They were renamed ".old" on April 16, when the plain "USDC" names were pointed at newer mock test tokens. Uniswap and Aave don't accept those mock tokens. +- Nothing marks the ".old" routes as deprecated, and sends through all three were delivered on October 21. +- One risk: the node's `develop` branch no longer has their config files, so a future config sync from `develop` could remove them. +- If they were removed, the two ready presets would be blocked again, and anyone holding those Push tokens couldn't send them out. + +**Question:** are these routes staying? If they will be retired, what replaces them? + +## 2. Can routes be added for the missing preset tokens? + +- **Sepolia:** Aave LINK `0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5`; WETH (EigenLayer) `0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9` +- **Base Sepolia:** WETH `0x4200000000000000000000000000000000000006`; Aave LINK `0x810D46F9a9027E28F9B01F75E2bdde839dA61115`; Moonwell USDbC `0x4616975f7E6045FD9737e95bC527e9e14c727BD2`; Moonwell WETH `0x663A6F02d547dFd639BF689FED298712f2FB69Fb` +- **Arbitrum Sepolia:** WETH `0x980B62Da83eFf3D4576C647993b0c1D7faf17c73` +- **BNB testnet:** WBNB `0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd`; USDT `0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c` (used by both the DEX and Venus Lending presets); USDC (Venus) `0x16227D60f7a0e586C66B005219dfc887D13C9531` + +The token registry admin on the core team adds routes. For whoever does it, each route needs: + +- a token config (`MsgAddTokenConfig`, signed by admin `push1negskcfqu09j5zvpk7nhvacnwyy2mafffy7r6a`); +- a Push token for that exact token; +- gas settings for it on Push; +- a liquidity pool against Push's own coin, used to pay gas; +- support in that chain's gateway and vault. + +**Question:** which of these can be added, by whom, and roughly when? Which won't be supported? For those, we'd pick a different token that we've checked the app accepts. + +## 3. Can presets send native ETH/BNB and wrap it on arrival? + +Sending native ETH/BNB from Push already works on all four test chains. Instead of waiting for WETH/WBNB routes, a preset could send ETH/BNB and wrap it into WETH/WBNB in the wallet's account on that chain, as the first step of the same transaction. The app still receives the WETH/WBNB it expects. + +**How it works:** + +- The preset shows ETH/BNB as the token sent from Push. Its limits are counted in ETH/BNB sent from Push, and the wrap step is capped to the same amount. +- If any step fails on arrival, the whole transaction reverts and the ETH/BNB comes back to the wallet on Push. As with any failed send today, it still counts toward the preset's total limit. +- After the wrap, everything is the same as the WETH/WBNB version, including how funds come back. +- SDK work only. We'll estimate it if you lean toward A. + +**What it would unblock:** + +- **No longer blocked by routes:** DEX Base, DEX Arbitrum, Staking Sepolia. +- **Still blocked:** + - DEX BNB: USDT; + - Lending Base: LINK, USDbC (wrapping covers its Moonwell WETH); + - Lending Sepolia and Lending BNB: none of their tokens are wrapped native. + +**Options:** + +- **A. Allow native + wrap** +- **B. Keep WETH/WBNB exactly:** those presets wait for the routes in question 2 + +**Decision needed:** A or B? With A, the WETH/WBNB entries drop out of question 2. diff --git a/plan/agw/questions-core-gateway.md b/plan/agw/questions-core-gateway.md new file mode 100644 index 00000000..f8e79707 --- /dev/null +++ b/plan/agw/questions-core-gateway.md @@ -0,0 +1,75 @@ +# Questions for the core/node and gateway teams + +Updated October 21, 2026. **On hold; not sending now.** None of these blocks Riyanshu or any SDK work, and the SDK already handles each one: + +- the labels say failed sends count toward the total; +- the gas budget never attaches less than the pool cost, and a send that doesn't fit is refused before signing; +- the registry check is an internal script; +- Aman question 1 covers whether the `.old` routes stay. + +The "send when" line under each question says what would make it worth asking. + +- AGW contract questions are in [questions-zaryab.md](questions-zaryab.md). +- Preset token routes are in [questions-aman.md](questions-aman.md). +- What we verified ourselves (node `testnet/donut` `ca3b8d4e`, deployed contracts, live runs) is in [pre-question findings](research/pre-question-findings-2026-10-21/README.md). + +Intro when sending: "A few questions from the agentic wallet (AGW) work on Donut. We checked node testnet/donut (ca3b8d4e, v1.1.44-donut) and the deployed contracts first; these are what we couldn't settle ourselves." + +--- + +## Core / node team + +### 1. Is wiring `creditRevert` for failed agent sends planned? + +When an agentic wallet's outbound fails on the destination, the node re-mints the token to the wallet and refunds unused gas. But the rule still counts that amount against its total limit. `UniversalRulesPolicy.creditRevert` exists to undo that count, but nothing calls it on any node branch; its own comment says the executor doesn't call it yet. + +**Question:** is wiring it planned, and when? Until then, we tell users that failed sends count toward the total. + +**Send when:** Harsh answers question 3.1 and doesn't accept that failed sends count toward the total, or before mainnet. + +### 2. Is the BNB testnet gas price voting set up as intended? + +On Donut the BNB testnet gas price jumps between 0.055, 0.11 and 1.1 gwei, often within minutes. From the node code: + +- each validator reads `eth_gasPrice` from a rotating public RPC and adds 10%; +- only two validators vote for BSC testnet, and the chain takes the higher vote; +- there is no smoothing or clamp. + +So the gas for a wallet's first agent send to BNB swings between about 2.4 PC and 24 PC depending on the moment. + +**Question:** is this intended? Could more validators vote, or could a smoothing window or clamp be added? + +**Send when:** a BNB preset becomes route-ready, or users hit the gas-budget error on BNB. + +### 3. Can the SDK rely on `abci_query` to read the token registry? + +The public REST and gRPC query endpoints aren't reachable. Tendermint `abci_query /uregistry.v1.Query/AllTokenConfigs` on `donut.rpc.push.org` works, and the SDK uses it in a check that its routes match the node. + +**Question:** is this a supported way to read the registry, or will a public REST endpoint be exposed? + +**Send when:** the SDK needs to read the registry at runtime rather than in a check script. + +### 4. Can the USDC `.old` config files be restored on `develop`? + +The live registry keeps `USDC.eth.old`, `USDC.base.old` and `USDC.arb.old`, and two AGW presets depend on them. The `develop` branch dropped their config files (merge `47ef4c9a`); `testnet/donut` and main still have them. + +**Question:** can they be restored on `develop`, so a future config sync doesn't remove routes in use? + +**Send when:** Aman confirms the `.old` routes are staying. + +**Update (October 24):** presets no longer use the `.old` routes (Aman: remove Circle), so this only matters for hand-written rules that list Circle USDC. + +--- + +## Core and gateway teams + +### 5. Can the exact deployed sources be committed or tagged? + +We matched both deployments by bytecode and build strings, but neither exact source is in any commit: + +- **UniversalCore** on Donut (implementation `0xa0023b356344ff623c7e20679cf9d170e44fbbd1`) matches `core-testnet` `8bc60ae`. The verified file differs only in import paths and comments. +- **The Solana gateway at `CFVS…`** was built from `pc20-3rd-iteration` with `declare_id` changed locally. No branch declares CFVS. + +**Question:** can the exact deployed sources be committed or tagged, so the SDK and audits can pin them? + +**Send when:** an audit starts, or before mainnet. diff --git a/plan/agw/questions-harsh.md b/plan/agw/questions-harsh.md new file mode 100644 index 00000000..9f851420 --- /dev/null +++ b/plan/agw/questions-harsh.md @@ -0,0 +1,98 @@ +# Product decisions for Harsh: agentic wallet creation + +Updated October 21, 2026. Final; ready to send. Preset questions (preset tokens and routes) are with Aman in [questions-aman.md](questions-aman.md). + +## Answered (October 23, Slack; Zaryab on the contract options) + +1. **Tokens without an app: C plus A as an opt-in, not B.** Transfers go back to the owner by default, plus recipients the owner names; never "any recipient" (Zaryab: B lets the agent send the whole destination balance to anyone). EVM ERC20s only. **Done in the SDK:** an EVM rule with ERC20 assets and no `allowedCalls` gets `transfer(address,uint256)` calls pinned to the owner's EVM address, plus `transferTo` recipients. +2. **No tokens selected:** the UI sends `assets: [{ token: MOVEABLE.TOKEN..ALL }]`. SDK-only (Zaryab): it expands to every routable PRC20 for that chain, max 8, no wildcard, so tokens added later are not included; `.old` and new USDC are listed separately. **Done:** `ALL` with per-token default limits, plus `PushChain.utils.agentic.assets.all(chain)` for the UI. `assets: []` still means no tokens. +3. **Limits:** ship as is; pins cover per send and total from Push (`maxPerCall`/`maxTotal`), per action (a MAX pin) and fixed spender, pool and recipient (EQ pins). No contract work requested. +4. **8 app actions for Push-chain rules is fine** (option A: change the spec). The SDK already enforced 8; it now reports the 8-function limit even above 32. + +--- + +Four product decisions on agentic wallet creation, from Riyanshu's testing of the create screen. Questions 1 and 2 block that screen today; 3 and 4 decide what we promise users. Each one says how it works today and lists the options. Options that need contract work from Zaryab are marked. If you're considering one of them, tell us and we'll get Zaryab's estimate before you decide. "SDK only" means no contract change or redeploy. + +Terms: + +- **Rule:** what the owner lets an agent do: which apps it can call, which tokens it can move, and the limits. Each rule has an expiry date set when it's created (presets default to 7 days). +- **App action:** one function on one app contract, for example "swap exact input on Uniswap" or "supply on Aave". +- **Push-chain rule / other-chain rule:** a rule is either for apps deployed on Push Chain itself, or for apps on another chain (Sepolia, Base, Arbitrum, BNB, Solana). +- **Destination account:** the wallet's own account on another chain. Tokens sent from Push land there first, and the agent's app actions run from there. +- **PC:** Push Chain's native coin. Gas for every agent transaction is paid in PC. + +These choices apply to rules created afterwards. Existing rules keep their settings until the owner updates them. + +--- + +## 1. Can a rule allow token transfers without picking an app? + +**Today.** An other-chain rule needs at least one app action, and the contract rejects tokens-only rules. Riyanshu expected apps to be optional. Developers can already write a transfer permission by hand with the SDK. The question is what the create screen should build automatically when the owner picks tokens but no app. + +The choice is who the agent may send tokens to: + +- **A. Named recipients:** only addresses the owner enters, up to a per-transfer amount (SDK only) +- **B. Any recipient,** up to a per-transfer amount (SDK only) +- **C. Only back to the owner's own address** on that chain (SDK only) +- **D. Keep apps required;** the screen explains that an app must be picked (UI text only) + +A and C can be combined: the owner's address is just one more named recipient. + +**How much is at risk with A–C.** The limit is per transfer, and the agent can repeat transfers until the rule expires. So the agent can move the selected tokens' entire balance in the destination account, a few transfers at a time, including tokens that were already there. The "total from Push" limit doesn't stop this, because it only counts tokens sent from Push. For example: + +- with B, a rule that allows 100 USDC per transfer lets the agent send the whole USDC balance to anyone; +- with A, the balance can go only to the named addresses; +- with C, it can only go back to the owner. + +**Other limits:** + +- It works for EVM tokens (ERC20) only. +- Native ETH/BNB can't be included, because a rule can only allow contract function calls, not plain coin transfers. +- Solana isn't possible without contract changes (Zaryab). + +**Decision needed:** A, B, C or D? If A–C, is EVM tokens only OK for the first version? + +## 2. What should "no tokens selected" mean? + +**Today.** No tokens selected means the agent can't move any tokens out of Push. It can still use the selected apps with funds already in the destination account. Riyanshu expected no selection to mean "all tokens allowed". + +A rule can list at most 8 tokens per chain, each with its own limit. There's no "any token" setting, and tokens added later are never included automatically. + +- **A. Keep as is** (no work) +- **B. An "All supported tokens" button** that fills in every token Push can send to that chain (3–7 today). Each token still gets its own limit (SDK + UI) +- **C. True "any token",** including future tokens, under one limit. One limit across different tokens would need a common unit, such as USD prices. This is a new contract design (Zaryab) + +**Decision needed:** A, B or C? If B, does the owner enter each token's limit, or do we supply a default per token? Limits differ by token (for example 10 USDC versus 0.001 ETH). + +## 3. Are the spending limits clear and strong enough? + +What the contracts enforce today, with the label text we'd show: + +| Label | What it really controls | +|---|---| +| Max per send from Push | The most of a token sent from Push in one transaction | +| Max total sent from Push (includes failed sends) | The most of a token sent from Push over the rule's life. If a send fails on the other chain, the tokens come back to the wallet on Push, but the amount still counts toward this total. It doesn't count funds already on the other chain | +| Max per action | The most used in one app action. The agent can repeat actions until the rule expires | +| Max gas per transaction (PC) | The most PC attached for gas in one transaction. Unused gas is refunded to the wallet. There's no total gas limit | + +**Not limited today:** + +- **Swap price (slippage).** The agent can accept any price on a swap. A careless or malicious agent could swap 100 USDC for far less than it's worth and stay within every limit above. +- **Total borrowing on lending apps.** Only each action is limited. + +**Decisions needed:** + +1. Is it OK to ship with these limits and labels? +2. Do you need either of these stronger limits? Both need contract work (Zaryab): + - a. **A total limit on activity on the other chain**, for example "at most 100 USDC of swaps in total". This closes the gap that repeated actions have no total. + - b. **A limit on the combined amount of all actions in one transaction.** Today one transaction can include up to 10 actions, each at the per-action maximum. +3. Push-chain rules can already enforce a total amount and a maximum number of uses, but the SDK doesn't offer them yet. Should it? (SDK only. Other-chain rules would still lack these totals unless 2a is built.) + +## 4. How many app actions can a Push-chain rule have? + +The SDK spec says 1–32 app actions per rule. The deployed contract allows 32 for other-chain rules, but only 8 for Push-chain rules. The contract chose 8 on purpose, to keep what an owner approves at once readable, not because of gas. Owners who need more can create several rules for the same agent; several rules can be created together in one approval. + +- **A. Change the spec** to "up to 8 for Push-chain rules" (spec text only) +- **B. Ask for more than 8** (contract change and redeploy, Zaryab) + +**Decision needed:** A or B? If B, how many? diff --git a/plan/agw/questions-zaryab.md b/plan/agw/questions-zaryab.md new file mode 100644 index 00000000..d859c840 --- /dev/null +++ b/plan/agw/questions-zaryab.md @@ -0,0 +1,48 @@ +# Contract questions for Zaryab: agentic wallet (AGW) v6 + +Updated October 21, 2026. Question 1 is final and ready to send. Question 2 is held until Harsh answers. What we verified ourselves is in [pre-question findings](research/pre-question-findings-2026-10-21/README.md). + +## Answered (October 23, Zaryab) + +1. **`fromEnd` pins:** confirmed (`SvmRulebook.sol:666-677`). Exploitable only on programs that ignore trailing data; assume Anchor programs such as Jupiter do. Account pins, forbidden programs and asset caps still hold. Fix in the next policy release: an optional exact instruction-data length per rule, with `fromEnd` pins refused unless it is set. **Done in the SDK until then:** create, add and update refuse a decoded Solana rule with a `fromEnd` pin (`FROM_END_PIN_UNSUPPORTED`); reading existing rules is unchanged. +2. **Harsh's options:** C plus A for tokens-only transfers (not B); `MOVEABLE.TOKEN..ALL` is SDK-only; pins cover the limits. No contract change is requested, so the held items below are closed. + +--- + +These questions cover only the deployed AGW contracts (source `ffd567d`). + +--- + +## 1. SvmRulebook: `fromEnd` data pins can be shifted by appending bytes. Is a fix planned? + +- `AllowedProgram` has no instruction-data length field. The only length checks are the global 1024-byte cap, the exact outer-payload length, and `ixLen >= discriminatorLen` for rule matching. +- `_resolveOffset` returns `ixLen - offset` once the data is long enough (`SvmRulebook.sol:666-677`). So an agent can append N bytes inside the instruction data and raise the length field to match. The payload is still well-formed, and every `fromEnd` pin then reads the appended bytes. +- Example: on a Jupiter-style layout, the appended bytes could satisfy the fee, slippage and ratio pins while the real arguments earlier in the data say something else. Account pins still hold. +- No test appends bytes inside the instruction data. `test_svm_S17_fromEndDataTooShortByOne` shows the read position moving with the length. +- It's only exploitable where the target program ignores trailing instruction data. + +**Possible fixes:** a per-rule exact (or maximum) instruction-data length for fixed-layout instructions, or refusing `fromEnd` pins unless such a length is set. + +The SDK never creates `fromEnd` pins, so SDK-built rules aren't affected. + +--- + +## 2. Held: send only the items Harsh picks + +Each item below is a contract option in [questions-harsh.md](questions-harsh.md). Ask Zaryab about an item only if Harsh chooses it. No change is requested yet. + +| If Harsh picks | Ask Zaryab: feasible, and roughly how much work? | +|---|---| +| Q1 with Solana | Token transfers on Solana without an app program. `SvmRulebook` forbids the System and SPL Token programs, so an agent can move SOL or SPL only through an allow-listed program's CPI. Could a constrained transfer (fixed recipient, capped amount) be allowed? | +| Q2 option C | "Any token" assets. Today a rule holds 1–8 explicit PRC20s and there is no wildcard. | +| Q3.2a | A total limit on activity on the destination chain. Today pins and `maxValue` limit each call, and nothing adds them up across calls or transactions. | +| Q3.2b | A combined limit within one transaction: the sum of a pinned amount across up to 10 calls in one request. | +| Q4 option B | More than 8 actions for Push-chain rules. The source calls 8 a deliberate sanity bound, and raising it a design change. | + +--- + +## Already answered from source; no longer asked + +- **Why 8 native actions.** It is a deliberate sanity bound for readability, the duplicate scan and revoke cost, not a gas bound (`AGW.sol:73-86`, `docs/1_AGW.md:532,573`). The session engine has no cap. +- **`creditRevert`.** No node code calls it on any branch, so a failed send still counts against `maxTotal`. Wiring it is node work; that question is held in [questions-core-gateway.md](questions-core-gateway.md). +- **Solana token-account ownership.** The policy cannot check it (`Types.sol:585-587`). The owner pins positions, and the SDK pins the wallet's token account. Pins compare exact keys; writable and signer flags are not checked. diff --git a/plan/agw/research/creation-error-review-2026-10-20/README.md b/plan/agw/research/creation-error-review-2026-10-20/README.md new file mode 100644 index 00000000..992b3860 --- /dev/null +++ b/plan/agw/research/creation-error-review-2026-10-20/README.md @@ -0,0 +1,43 @@ +# Agentic creation error review — October 20, 2026 + +Scope: the three reported creation screenshots, the shared create/add/update rule preparation paths, and UI presentation of typed SDK and decoded contract failures. This report records validation of the v4 changes. Subsequent Git delivery is tracked in the [SDK development history](../../../SDK-CHANGELOG.md); package publication remains separate. + +The npm alpha tag at inspection was 6.0.27-alpha.3. Its release commit changes version metadata over the reviewed preset implementation. The actual version installed in the UI and its create payload have not yet been supplied. No UI implementation was found in this SDK's UI packages or a matching sibling checkout. + +## Findings + +| Report | Confirmed behavior | Fix / remaining action | +| --- | --- | --- | +| Lending: Unable to infer origin chain or token symbol | The stock Sepolia Aave preset selects faucet LINK (0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5). It has no matching current SDK Push transfer route. Generic resolver Error escaped shared preparation. | TOKEN_ROUTE_UNAVAILABLE now explains the limitation and funding choice, preserves the original cause and includes ruleIndex, assetIndex, token, chainNamespace and field. It does not invent a mapping or silently remove authority. | +| Staking: same resolver error | The Sepolia EigenLayer preset selects WETH 0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9. This differs from the DEX WETH 0xfff9976782d46cc05630d1f6ebab18b2324d6b14 whose Push mapping was fixed previously. | Same typed handling applies, including Solana source-token resolution. Existing typed mismatch errors keep their classification. | +| DEX: at most 32 pins | An untouched two-token, one-router preset has 6 allowed-call entries and 20 input conditions. The guard is per rule, not summed across independent chain rules. Duplicating its call list produces 12 entries / 40 conditions and reproduces the same failure class. | Error now reports full actual count, maximum 32, callCount, ruleIndex and chainNamespace. Actual UI trigger remains unconfirmed pending the exact payload. No deduplication, condition removal, auto-splitting or contract-limit change is applied. | +| Other vague validation/revert text | Technical ABI, capability and provider wording was also the only available display text in many typed failures. | Both AgenticError and AgenticRevertError now expose userMessage. All 26 SDK codes have safe copy. Common decoded contract failures are grouped; remaining names use a safe fallback while retaining decodedError/cause. | +| Destination lookup / malformed addresses | Destination lookup could leak raw RPC failures; invalid agent/app/token addresses could leak conversion details. | Destination lookup failures are typed read failures, not token-route failures. Unsupported destination factories remain capability failures. Address errors carry field context. | +| User cancellation / receipt ambiguity | A cancelled request and an unconfirmed submitted transaction need different next steps. | REQUEST_REJECTED is explicit. Receipt uncertainty keeps transaction hashes and tells the user to check status before retrying; no automatic resend is added. | + +## UI handoff + +1. Render error.userMessage for AgenticError/AgenticRevertError. Keep message, code, hint, details, decodedError and cause for diagnostics or translation. Unknown exceptions get neutral fallback text instead of raw RPC output. The consumer guide has a typechecked renderer. +2. Highlight details.ruleIndex (zero-based), and assetIndex/callIndex/field when supplied. UI copy uses one-based rule numbering. +3. For destination-funded execution, regenerate with funding: 'destination', check readiness.ready, then pass returned rules unchanged into create. selectedAssets is display metadata and must not be copied back to rule.assets. The wallet can be created before funding; balances are needed before execution. +4. For bridge-funded rules, choose genuinely supported source assets. Changing a symbol or substituting a same-symbol token does not establish a valid route. +5. For DEX edits, regenerate rather than append generated allowedCalls. Preserve separate rules for separate networks. Do not merge distinct permission alternatives merely because their function names match. +6. Show the actual network, including testnet name. In destination mode, maxTotal in selectedAssets is not an enforced destination lifetime cap; the rule grants no Push token-export budget. Label the PC field as a maximum gas budget, not an actual fee. + +## Error inventory and compatibility + +error-copy.json inventories 26 typed SDK codes and 181 ABI error names with their UI text. Common revert classes distinguish gas/spend limits, allowance versus balance, expired approval versus expired rule, authorization and oversized configurations. Infrastructure/unknown decoded names retain a neutral contract-rejection fallback. This is not a claim that every ABI error has a unique remediation or a security audit. + +The public changes are additive userMessage properties and TOKEN_ROUTE_UNAVAILABLE / REQUEST_REJECTED codes. Existing diagnostic messages generally remain; the two reported error classes now have readable message text as well. INVALID_RULE remains the condition-limit code, with details.reason RULE_CONSTRAINT_LIMIT. Raw causes and decoded revert data remain available. Message-string matching should be replaced with codes/reasons in consumers. + +## Validation + +- Full unit suite: 2,181 passed, 12 skipped; no failures. +- 39 new regression cases cover route failure before sending, exact over-limit counts, independent stock chain rules, RPC failure classification, every typed code's UI text, uncertainty/hash preservation, cancellation and distinct contract failure categories. +- Actual local v6 suite: 21 passed, including assertions that an engine-wrapped amount-limit revert retains decoded data and has a readable userMessage. +- Build, spec/local typechecks, seven guide examples, compiled CJS/ESM/package checks and source/declaration comparison pass. Changed production files have no lint errors. +- No funded E2E, contract deployment, mainnet transaction or publish action was run. + +## Required to finish the DEX diagnosis + +Obtain the installed package version and exact { label, rules } passed to agentic.create, serializing bigint values as strings. Count conditions per rule after UI reconstruction, not only in the original preset. Compare with the stock six-entry/twenty-condition result. The screenshots alone cannot establish which calls were appended/merged or whether another transformation occurred. diff --git a/plan/agw/research/creation-error-review-2026-10-20/api-summary.json b/plan/agw/research/creation-error-review-2026-10-20/api-summary.json new file mode 100644 index 00000000..b2370051 --- /dev/null +++ b/plan/agw/research/creation-error-review-2026-10-20/api-summary.json @@ -0,0 +1,62 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "4206fae6bf6a92e454473a03b3cb615b3dd41324", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [ + "AgenticPresets", + "ArgumentPath", + "DecodedSolanaRule", + "Pin", + "Preset", + "PresetAsset", + "PresetCallIssue", + "PresetCategory", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetOptions", + "PresetResult", + "PresetRuleTemplate", + "ReadyPresetOptions", + "RuleInput", + "Spent", + "WalletMarker" + ], + "removedExports": [ + "AgenticNetworkConstants", + "NativeRule", + "UniversalRule" + ], + "publicTypeChanges": [ + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticRevertError", + "AgenticErrorCode", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "CreateOptions", + "DecodedSolanaRule", + "Rule", + "RuleInput", + "Pin", + "Spent", + "WalletMarker", + "ArgumentPath", + "RulesRecord", + "Preset", + "PresetCategory", + "PresetAsset", + "PresetOptions", + "ReadyPresetOptions", + "PresetRuleTemplate", + "PresetResult", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetCallIssue", + "AgenticPresets" + ], + "transactionMethodChanges": [], + "instanceMethodChanges": [] +} diff --git a/plan/agw/research/creation-error-review-2026-10-20/build.log b/plan/agw/research/creation-error-review-2026-10-20/build.log new file mode 100644 index 00000000..194ffc1a --- /dev/null +++ b/plan/agw/research/creation-error-review-2026-10-20/build.log @@ -0,0 +1,11 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:75773) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core diff --git a/plan/agw/research/creation-error-review-2026-10-20/docs.log b/plan/agw/research/creation-error-review-2026-10-20/docs.log new file mode 100644 index 00000000..5996134d --- /dev/null +++ b/plan/agw/research/creation-error-review-2026-10-20/docs.log @@ -0,0 +1 @@ +AGW guide: 7 TypeScript blocks typechecked against public exports; no examples executed. diff --git a/plan/agw/research/creation-error-review-2026-10-20/error-copy.json b/plan/agw/research/creation-error-review-2026-10-20/error-copy.json new file mode 100644 index 00000000..460e3721 --- /dev/null +++ b/plan/agw/research/creation-error-review-2026-10-20/error-copy.json @@ -0,0 +1,834 @@ +{ + "sdk": [ + { + "code": "DUPLICATE_RULE", + "userMessage": "Keep one rule per agent and network. Edit the existing rule or remove the duplicate." + }, + { + "code": "AGENT_IS_OWNER", + "userMessage": "Choose an agent address different from the wallet owner." + }, + { + "code": "AMBIGUOUS_RULE", + "userMessage": "More than one rule matches this agent and network. Keep one active matching rule before sending." + }, + { + "code": "TARGET_NOT_ON_RULE_CHAIN", + "userMessage": "Choose an app on the network selected for this rule." + }, + { + "code": "ASSET_CHAIN_MISMATCH", + "userMessage": "The selected token belongs to a different network. Choose a token on this rule’s network." + }, + { + "code": "TOKEN_ROUTE_UNAVAILABLE", + "userMessage": "This token cannot currently be transferred from Push to the selected network. Choose a supported token or use funds already on the destination network." + }, + { + "code": "REQUEST_REJECTED", + "userMessage": "The wallet request was cancelled. Check wallet activity before trying again." + }, + { + "code": "NOT_OWNER_OR_AGENT", + "userMessage": "Connect the wallet owner or an agent authorized by its rules." + }, + { + "code": "WALLET_NOT_DEPLOYED", + "userMessage": "This agentic wallet has not been created yet." + }, + { + "code": "NOT_AGENTIC_WALLET", + "userMessage": "This address is not a supported agentic wallet." + }, + { + "code": "DELETE_NEEDS_TARGET", + "userMessage": "Choose which rules to remove." + }, + { + "code": "NO_RULES_FOR_CHAIN", + "userMessage": "This agent has no active rule for the selected network." + }, + { + "code": "FROM_NOT_ALLOWED", + "userMessage": "The agentic wallet is the sender. Remove the custom sender selection." + }, + { + "code": "NOT_ALLOWED_IN_AGENTIC_MODE", + "userMessage": "This action is unavailable while using an agentic wallet." + }, + { + "code": "INVALID_RULE", + "userMessage": "Some rule settings are invalid. Review the rule and try again." + }, + { + "code": "CAPABILITY_UNAVAILABLE", + "userMessage": "This feature is not available for this wallet or network yet." + }, + { + "code": "READ_ONLY", + "userMessage": "Connect a signing wallet to continue." + }, + { + "code": "NOT_WALLET_OWNER", + "userMessage": "Connect the owner wallet to change these permissions." + }, + { + "code": "RULE_NOT_FOUND", + "userMessage": "This rule could not be found. Refresh the wallet’s rules and try again." + }, + { + "code": "RULE_READ_FAILED", + "userMessage": "The wallet’s current state could not be loaded. Refresh and try again." + }, + { + "code": "INCONSISTENT_READ", + "userMessage": "The wallet changed while it was being checked. Refresh before trying again." + }, + { + "code": "INDEX_RACE", + "userMessage": "The expected wallet address changed. Refresh wallet information before trying again." + }, + { + "code": "RECEIPT_MISMATCH", + "userMessage": "The transaction result needs verification. Check its status before retrying." + }, + { + "code": "RECEIPT_UNAVAILABLE", + "userMessage": "The transaction was submitted, but its status could not be confirmed. Check its status before trying again." + }, + { + "code": "AGENT_GAS_INSUFFICIENT", + "userMessage": "The agent needs more Push coins to pay transaction fees." + }, + { + "code": "WALLET_BALANCE_INSUFFICIENT", + "userMessage": "The agentic wallet does not have enough funds for this action." + } + ], + "contracts": [ + { + "name": "AccessControlBadConfirmation", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "AccessControlEnforcedDefaultAdminDelay", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "AccessControlEnforcedDefaultAdminRules", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "AccessControlInvalidDefaultAdmin", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "AccessControlUnauthorizedAccount", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "AddressEmptyCode", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "AllowListOutOfRange", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "AlreadyCredited", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "AlreadyInitialized", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "AmbiguousRule", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "AmountExceedsCap", + "userMessage": "This action exceeds a rule’s spending or usage limit. Reduce the amount or ask the owner to update the rule." + }, + { + "name": "AmountExceedsU64", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ArgPinAboveMax", + "userMessage": "This action exceeds a rule’s spending or usage limit. Reduce the amount or ask the owner to update the rule." + }, + { + "name": "ArgPinMismatch", + "userMessage": "This action does not match the wallet’s permissions. Check the token, recipient and allowed function." + }, + { + "name": "AssetListOutOfRange", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "AssetNotAllowed", + "userMessage": "This action does not match the wallet’s permissions. Check the token, recipient and allowed function." + }, + { + "name": "AssetSpentMismatch", + "userMessage": "The wallet changed while this action was being prepared. Refresh its state before trying again." + }, + { + "name": "AssociatedArray_OutOfBounds", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "BatchSizeOutOfRange", + "userMessage": "Too many rules or functions are selected. Reduce the selection and try again." + }, + { + "name": "CallLimitReached", + "userMessage": "This action exceeds a rule’s spending or usage limit. Reduce the amount or ask the owner to update the rule." + }, + { + "name": "CallNotAllowed", + "userMessage": "This action does not match the wallet’s permissions. Check the token, recipient and allowed function." + }, + { + "name": "CalldataTooShort", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "CalldataTooShortForAmount", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "CalldataTooShortForPin", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "CallerIsNotAgent", + "userMessage": "Connect the agent authorized by this rule." + }, + { + "name": "CallerIsNotFactory", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "CallerIsNotOwner", + "userMessage": "Connect the owner wallet to make this change." + }, + { + "name": "CallerIsNotUEModule", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "CeaAccountAtUnpinnedIndex", + "userMessage": "The rule is missing a required wallet-recipient restriction. Review its recipient settings." + }, + { + "name": "CeaAccountsMissExpectedCEA", + "userMessage": "The rule is missing a required wallet-recipient restriction. Review its recipient settings." + }, + { + "name": "ChainIdMismatch", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ChainMismatch", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "CloneArgumentsTooLong", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "Create2EmptyBytecode", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "DiscriminatorLenOutOfRange", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "DuplicateAction", + "userMessage": "This rule contains duplicate functions, tokens or conditions. Remove the duplicate selection." + }, + { + "name": "DuplicateAsset", + "userMessage": "This rule contains duplicate functions, tokens or conditions. Remove the duplicate selection." + }, + { + "name": "DuplicateSvmPin", + "userMessage": "This rule contains duplicate functions, tokens or conditions. Remove the duplicate selection." + }, + { + "name": "ERC1967InvalidImplementation", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ERC1967NonPayable", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "EmptyChain", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "EnforcedPause", + "userMessage": "This operation is temporarily paused. Try again later." + }, + { + "name": "EngineStillHoldsPermissions", + "userMessage": "This action does not match the wallet’s permissions. Check the token, recipient and allowed function." + }, + { + "name": "ExecutorMismatch", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ExpectedPause", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "FailedCall", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "FailedDeployment", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ForbiddenActionSelector", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ForbiddenActionTarget", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ForbiddenDispatchTarget", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ForbiddenInnerTarget", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ForbiddenProgramInAllowList", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ForbiddenTargetProgram", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ForbiddenValidationData", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "HashIndexOutOfBounds", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "HashMismatch", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ImplementationNotSet", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InconsistentChain", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "IndexMismatch", + "userMessage": "The wallet changed while this action was being prepared. Refresh its state before trying again." + }, + { + "name": "IndexOutOfRange", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InsufficientBalance", + "userMessage": "There are not enough funds for this action. Check the wallet balance and fees." + }, + { + "name": "IntentExecMismatch", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "IntentGrantNonceMismatch", + "userMessage": "The wallet changed while this action was being prepared. Refresh its state before trying again." + }, + { + "name": "IntentGrantNonceNotZero", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "IntentRulesMismatch", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "IntentSessionMismatch", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "IntentWalletMismatch", + "userMessage": "The wallet changed while this action was being prepared. Refresh its state before trying again." + }, + { + "name": "InvalidActionId", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidAsset", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidCallTarget", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidCeaAccount", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidConfigField", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidData", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidEnableSignature", + "userMessage": "The signature could not be verified. Reconnect the authorized wallet and try again." + }, + { + "name": "InvalidExpiry", + "userMessage": "Choose a valid future expiry for this rule." + }, + { + "name": "InvalidISessionValidator", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidInitialization", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidMode", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidModuleAddress", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidNonce", + "userMessage": "The wallet changed while this action was being prepared. Refresh its state before trying again." + }, + { + "name": "InvalidOwnerSignature", + "userMessage": "The signature could not be verified. Reconnect the authorized wallet and try again." + }, + { + "name": "InvalidPermissionId", + "userMessage": "This action does not match the wallet’s permissions. Check the token, recipient and allowed function." + }, + { + "name": "InvalidRevertRecipient", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidSelector", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidSelfCall", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidSession", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidSessionKeySignature", + "userMessage": "The signature could not be verified. Reconnect the authorized wallet and try again." + }, + { + "name": "InvalidSvmConfigField", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidTarget", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "InvalidUserOpSender", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "LabelTooLong", + "userMessage": "The wallet name is too long. Shorten it and try again." + }, + { + "name": "MalformedBatchCalldata", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "MalformedConfig", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "MalformedInnerCalldata", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "MalformedOutboundRequest", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "MalformedSessionShape", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "MalformedSvmPayload", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ModuleAlreadyInstalled", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "NativeAmountExceedsCap", + "userMessage": "This action exceeds a rule’s spending or usage limit. Reduce the amount or ask the owner to update the rule." + }, + { + "name": "NativeTargetIsGateway", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "NativeTargetZero", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "NoExecutionsInBatch", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "NoPoliciesSet", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "NotAWallet", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "NotInitialized", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "NotInitializing", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "OutsideTimeWindow", + "userMessage": "This request is outside its valid time window. Refresh and approve a new request." + }, + { + "name": "OwnerLaneRequired", + "userMessage": "Connect the owner wallet to make this change." + }, + { + "name": "OwnerSigExpired", + "userMessage": "The wallet approval has expired. Review and sign a new request." + }, + { + "name": "PCValueExceedsCap", + "userMessage": "The required gas exceeds this rule’s gas budget. Review the budget before trying again." + }, + { + "name": "PartlyEnabledActions", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "PartlyEnabledPolicies", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "PayloadNotMulticall", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "PaymasterValidationNotEnabled", + "userMessage": "This action does not match the wallet’s permissions. Check the token, recipient and allowed function." + }, + { + "name": "PolicyNotInitialized", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "PolicyViolation", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ProgramListOutOfRange", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ProgramNotAllowed", + "userMessage": "This action does not match the wallet’s permissions. Check the token, recipient and allowed function." + }, + { + "name": "RecipientMustBeEmpty", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "RecipientNotPubkey", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "RecipientTargetMismatch", + "userMessage": "This action does not match the wallet’s permissions. Check the token, recipient and allowed function." + }, + { + "name": "ReentrancyGuardReentrantCall", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "RuleWithoutPin", + "userMessage": "The rule is missing a required wallet-recipient restriction. Review its recipient settings." + }, + { + "name": "RulesExpired", + "userMessage": "This rule has expired. Ask the owner to renew it." + }, + { + "name": "RulesTypeMismatch", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SafeCastOverflowedUintDowncast", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SelectorMismatch", + "userMessage": "This action does not match the wallet’s permissions. Check the token, recipient and allowed function." + }, + { + "name": "SignatureExpired", + "userMessage": "The wallet approval has expired. Review and sign a new request." + }, + { + "name": "SignerNotFound", + "userMessage": "The signature could not be verified. Reconnect the authorized wallet and try again." + }, + { + "name": "SmartSessionModuleAlreadyInstalled", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SpentLengthMismatch", + "userMessage": "The wallet changed while this action was being prepared. Refresh its state before trying again." + }, + { + "name": "SpentMismatch", + "userMessage": "The wallet changed while this action was being prepared. Refresh its state before trying again." + }, + { + "name": "SvmAccountCountBelowPin", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SvmAccountCountMismatch", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SvmAccountPinMismatch", + "userMessage": "This action does not match the wallet’s permissions. Check the token, recipient and allowed function." + }, + { + "name": "SvmAccountsOutOfRange", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SvmDataCeilingExceeded", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SvmDataFloorNotMet", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SvmDataPinInvalid", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SvmDataPinMismatch", + "userMessage": "This action does not match the wallet’s permissions. Check the token, recipient and allowed function." + }, + { + "name": "SvmDataRatioNotMet", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SvmDataTooShortForPin", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SvmInstructionNotExecute", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SvmIxDataTooLong", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SvmMaxAccountsOutOfRange", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SvmPayloadEmpty", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SvmPinIndexOutOfRange", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "SvmPinRuleOutOfRange", + "userMessage": "This function has too many conditions. Choose a simpler rule configuration." + }, + { + "name": "TargetMismatch", + "userMessage": "This action does not match the wallet’s permissions. Check the token, recipient and allowed function." + }, + { + "name": "TooManyActions", + "userMessage": "Too many rules or functions are selected. Reduce the selection and try again." + }, + { + "name": "TooManyAllowedCallPins", + "userMessage": "This rule has more than 32 conditions. Select fewer tokens or allowed functions." + }, + { + "name": "TooManyCeaAccounts", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "TooManyInitialRules", + "userMessage": "Too many rules or functions are selected. Reduce the selection and try again." + }, + { + "name": "TooManyPins", + "userMessage": "This function has too many conditions. Choose a simpler rule configuration." + }, + { + "name": "TooManySvmDataPins", + "userMessage": "This function has too many conditions. Choose a simpler rule configuration." + }, + { + "name": "TooManySvmPins", + "userMessage": "This function has too many conditions. Choose a simpler rule configuration." + }, + { + "name": "TotalNativeAmountExceeded", + "userMessage": "This action exceeds a rule’s spending or usage limit. Reduce the amount or ask the owner to update the rule." + }, + { + "name": "TotalSpendCapExceeded", + "userMessage": "This action exceeds a rule’s spending or usage limit. Reduce the amount or ask the owner to update the rule." + }, + { + "name": "TotalValueExceeded", + "userMessage": "This action exceeds a rule’s spending or usage limit. Reduce the amount or ask the owner to update the rule." + }, + { + "name": "UUPSUnauthorizedCallContext", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "UUPSUnsupportedProxiableUUID", + "userMessage": "This action is not supported on the selected network or wallet version." + }, + { + "name": "UncappedGasSwapRejected", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "UnknownPermission", + "userMessage": "This action does not match the wallet’s permissions. Check the token, recipient and allowed function." + }, + { + "name": "UnsupportedCallType", + "userMessage": "This action is not supported on the selected network or wallet version." + }, + { + "name": "UnsupportedEnvelopeVersion", + "userMessage": "This action is not supported on the selected network or wallet version." + }, + { + "name": "UnsupportedExecutionMode", + "userMessage": "This action is not supported on the selected network or wallet version." + }, + { + "name": "UnsupportedExecutionType", + "userMessage": "This action is not supported on the selected network or wallet version." + }, + { + "name": "UnsupportedModuleType", + "userMessage": "This action is not supported on the selected network or wallet version." + }, + { + "name": "UnsupportedNamespace", + "userMessage": "This action is not supported on the selected network or wallet version." + }, + { + "name": "UnsupportedPolicy", + "userMessage": "This action is not supported on the selected network or wallet version." + }, + { + "name": "UnsupportedSmartSessionMode", + "userMessage": "This action is not supported on the selected network or wallet version." + }, + { + "name": "ValidationFailed", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ValidatorNotInstalled", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ValueExceedsCap", + "userMessage": "This action exceeds a rule’s spending or usage limit. Reduce the amount or ask the owner to update the rule." + }, + { + "name": "ValueOnlyCalldataNotEmpty", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ValueOnlyWithAmountRule", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ValueOnlyWithPins", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "WrongModeForCall", + "userMessage": "This action is not supported on the selected network or wallet version." + }, + { + "name": "WrongVmForCall", + "userMessage": "This action is not supported on the selected network or wallet version." + }, + { + "name": "ZeroAddress", + "userMessage": "The wallet contract rejected this transaction. Review the permissions and transaction details before trying again." + }, + { + "name": "ZeroMaxCalls", + "userMessage": "This action exceeds a rule’s spending or usage limit. Reduce the amount or ask the owner to update the rule." + } + ] +} diff --git a/plan/agw/research/creation-error-review-2026-10-20/full-unit.log b/plan/agw/research/creation-error-review-2026-10-20/full-unit.log new file mode 100644 index 00000000..d9c5e36e --- /dev/null +++ b/plan/agw/research/creation-error-review-2026-10-20/full-unit.log @@ -0,0 +1,185 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/labels.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/creation-errors.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-routes.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-default-policy.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-default-tokens.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/public-rule.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/prc20-source-encoding.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/universal/prc20-address.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts + +Test Suites: 1 skipped, 132 passed, 132 of 133 total +Tests: 12 skipped, 2181 passed, 2193 total +Snapshots: 0 total +Time: 32.401 s +Ran all test suites. diff --git a/plan/agw/research/creation-error-review-2026-10-20/git-checkpoint-validation.json b/plan/agw/research/creation-error-review-2026-10-20/git-checkpoint-validation.json new file mode 100644 index 00000000..38c912ad --- /dev/null +++ b/plan/agw/research/creation-error-review-2026-10-20/git-checkpoint-validation.json @@ -0,0 +1,68 @@ +{ + "checked_at": "2026-10-20T10:10:06.895514+00:00", + "focused_unit_suites": 3, + "focused_tests_passed": 72, + "spec_typecheck_exit_code": 0, + "files": [ + { + "path": "packages/core/AGW.md", + "sha256": "1b5bfbacdcf80846ca7c3edec158ff785767682bdc6371e65ee18e1e57e3cd68" + }, + { + "path": "packages/core/__agw-local__/v5-multiasset.spec.ts", + "sha256": "59261313ec5d99e914097f277f4dad77232a63b9a308e7af43a9942846e92c9c" + }, + { + "path": "packages/core/src/lib/agentic/__tests__/creation-errors.spec.ts", + "sha256": "111ae710ae0b1096d4c696de648cb3e2443fcf75d8b6247fce21ec5b14f074b5" + }, + { + "path": "packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts", + "sha256": "44ce1daa12f2760e787f2b3ed6140d87b4726dac3203e70558f1cba5559a1dac" + }, + { + "path": "packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts", + "sha256": "357afd334f211e3383b1c82d784ef2981c0c998e10e7baca92eb931e96f39940" + }, + { + "path": "packages/core/src/lib/agentic/codec/rules.ts", + "sha256": "920a5c8b09b46ac7fc927e0f8ced69340bc1c4a7a90475e5778c057a7d852e72" + }, + { + "path": "packages/core/src/lib/agentic/codec/universal.ts", + "sha256": "5c7993e0e1d3284c61da8918ee1a657bac7c8ba3bd8d592033e89a65d7804f73" + }, + { + "path": "packages/core/src/lib/agentic/error-messages.ts", + "sha256": "378fb0343cf468c89f2e87f472c7423fcbb3dccddc4a98cdb8ed950aadc76b28" + }, + { + "path": "packages/core/src/lib/agentic/errors.ts", + "sha256": "b9b1b336f5567e12684f6f2cce7ec88ace0d627ab2788e6b06ae8b1324273246" + }, + { + "path": "packages/core/src/lib/agentic/management/common.ts", + "sha256": "8131a359d19a2c08b5720caad715eac101b1f39328e22888361f9edda45aecb5" + }, + { + "path": "packages/core/src/lib/agentic/management/destination.ts", + "sha256": "b48246902014735a92dfa0ea4d4a1bdfd552ab7016a25ccb07c19544653b3f32" + }, + { + "path": "packages/core/src/lib/agentic/management/prepare.ts", + "sha256": "aaa21c5a29fed7d5d5191a7bfc55b1e747ea16f22f1d505c9703e56738de0b1a" + }, + { + "path": "packages/core/src/lib/agentic/management/svm-public.ts", + "sha256": "fd82688de91b61f7e489751116dd1bad7f863885029624d1f3a775c844ad33b5" + }, + { + "path": "packages/core/src/lib/agentic/presets/index.ts", + "sha256": "e453fa6e8523ce70490915f643b7e00541a395b9e02e313676f3a9ceec6dbe37" + }, + { + "path": "packages/core/src/lib/agentic/public-rule.ts", + "sha256": "fb769f433f518a90fe7b904ad4d5cd36f6bf1dbad587087b2047fba9948c9125" + } + ] +} diff --git a/plan/agw/research/creation-error-review-2026-10-20/lint.log b/plan/agw/research/creation-error-review-2026-10-20/lint.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/creation-error-review-2026-10-20/local-types.log b/plan/agw/research/creation-error-review-2026-10-20/local-types.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/creation-error-review-2026-10-20/local.log b/plan/agw/research/creation-error-review-2026-10-20/local.log new file mode 100644 index 00000000..f74bf4dd --- /dev/null +++ b/plan/agw/research/creation-error-review-2026-10-20/local.log @@ -0,0 +1,29 @@ +PASS core-agw-local packages/core/__agw-local__/v5-multiasset.spec.ts (7.397 s) + v6 multi-asset SDK management and execution + ✓ v6 EVM alternatives enforce both spender and MAX, and reads update losslessly (122 ms) + ✓ v6 refuses a bare alternative that bypasses a pinned function and too many initial rules (24 ms) + ✓ the shipped DEX catalog enforces tuple receiver/token/amount pins on actual v6 URP (101 ms) + ✓ a default-token DEX exactInputSingle call rejects spending above its policy cap despite edited bridge budgets (71 ms) + ✓ a default-token DEX exactOutputSingle call rejects spending above its policy cap despite edited bridge budgets (62 ms) + ✓ public DEXES destination-funded defaults create directly without rewriting returned rules (59 ms) + ✓ public LENDING destination-funded defaults create directly without rewriting returned rules (54 ms) + ✓ public STAKING destination-funded defaults create directly without rewriting returned rules (45 ms) + ✓ regenerated LENDING presets enforce new token/amount pins through atomic rules.update (134 ms) + ✓ regenerated STAKING presets enforce new token/amount pins through atomic rules.update (208 ms) + ✓ a fixture preset produces rules accepted by public create and enforced by real contracts (80 ms) + ✓ public create encodes two ordered assets; public get reconstructs source-token caps (89 ms) + ✓ a token from the wrong chain fails before deployment (6 ms) + ✓ a same-chain registry identity mismatch fails before deployment (3 ms) + ✓ both tokens execute under one rule and keep independent counters/limits (131 ms) + ✓ omitted and explicit zero totals both prohibit movement (142 ms) + ✓ empty user assets grants one zero-cap gas token and executes a call-only request (150 ms) + ✓ public update resets both counters in one batch and records five checkpoints (168 ms) + ✓ spend on the second asset after snapshot rolls back revoke/grant and checkpoint writes (206 ms) + ✓ out-of-band duplicate contract grants still make sends ambiguous (82 ms) + ✓ a legacy two-field envelope is refused by the actual v6 grant path (11 ms) + +Test Suites: 1 passed, 1 total +Tests: 21 passed, 21 total +Snapshots: 0 total +Time: 7.43 s, estimated 9 s +Ran all test suites within paths "packages/core/__agw-local__/v5-multiasset.spec.ts". diff --git a/plan/agw/research/creation-error-review-2026-10-20/package.log b/plan/agw/research/creation-error-review-2026-10-20/package.log new file mode 100644 index 00000000..8e1b97e4 --- /dev/null +++ b/plan/agw/research/creation-error-review-2026-10-20/package.log @@ -0,0 +1 @@ +AGW package: CJS/ESM imports, compiled declaration examples and npm contents pass. No examples executed/published. diff --git a/plan/agw/research/creation-error-review-2026-10-20/types.log b/plan/agw/research/creation-error-review-2026-10-20/types.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/creation-ui-guidance-2026-10-20.md b/plan/agw/research/creation-ui-guidance-2026-10-20.md new file mode 100644 index 00000000..4b14899a --- /dev/null +++ b/plan/agw/research/creation-ui-guidance-2026-10-20.md @@ -0,0 +1,9 @@ +# Creation guidance after alpha.4 feedback + +Implemented actionable missing-function validation (`INVALID_RULE`, reason `ALLOWED_FUNCTION_REQUIRED`), clearer empty-asset preset readiness, and exact-token/protocol compatibility guidance for unavailable routes. Assets and limits are never silently replaced or broadened. + +All nine testnet preset/network combinations have regression coverage for unavailable route reporting and preserved assets. Missing/empty functions fail before signing. Empty universal assets retain zero Push token-export authority; existing local v6 contract coverage demonstrates the zero-cap gas-token representation. No fresh live transactions were run for this copy/validation change. + +Remaining: route addresses/provisioning from the core/node/gateway team; verified protocol-compatible alternatives before changing preset defaults; product agreement on recipients/limits before any transfer-only helper. No unrestricted-token wildcard is introduced. + +Validation: 402 AGW unit tests passed across 25 suites; core build, spec typecheck, package checks and seven guide example typechecks passed. SDK edits sync to v5 without this plan file. npm publication is user-managed. diff --git a/plan/agw/research/decision-alignment-2026-10-07/README.md b/plan/agw/research/decision-alignment-2026-10-07/README.md new file mode 100644 index 00000000..291aa257 --- /dev/null +++ b/plan/agw/research/decision-alignment-2026-10-07/README.md @@ -0,0 +1,43 @@ +# October 7 decisions — SDK alignment and acceptance + +The approved decisions are implemented: native PC omission stays zero; token budgets stay independent; rule `ref` is removed; native/EVM argument indexes and raw offsets are both accepted; public Solana authoring uses named Anchor IDL inputs. + +## Public changes + +- New exported types: `SolanaRule`, `DecodedSolanaRule`, `SvmInstructionRule`, `SvmAccountRef`, `SvmFieldConstraint`. +- Existing create/add/update/get/list/revoke methods now support Solana rules. Reads preserve stored constraints and cannot recover the original IDL. +- The ordinary agentic `sendTransaction` path supports one Solana instruction, including owner sends, wallet-specific account derivation, gateway allowance/balance checks, errors, progress events and replay. Response metadata adds `destinationInstruction`. +- `NativeRule`/`UniversalRule`/`RulesRecord` no longer expose rule `ref`; old runtime inputs containing it are rejected. Checkpoint `ref` remains an existing, separate event field. +- EVM `UniversalRule.chainNamespace` is now EVM-specific; use `SolanaRule` for Solana. Both native argument/offset forms remain supported, with conflicting inputs rejected. +- The consumer guide documents fixed primitive/fixed-array Anchor layouts, eight-byte discriminators, top-level non-optional accounts, supported comparisons, and unsupported-layout failures. Public Solana execution currently uses configured devnet; no public raw-wire rule-authoring API was added. + +## Contract delivery still pending + +Fresh fetch: `deploy-agw@10a24f1`, `pushAgenticWallet_v3@e8db748`. These expose `executeAsAgent(rulesId,...)`, which already enforces permissions, and no `setLabel`. Only editable labels await AGW contract delivery. The SDK retains AMBIGUOUS_RULE when multiple candidates match and maps contract rejections; no automatic-selection interface or caller-facing selector is required. The previously recorded automatic-selection dependency was an assistant misinterpretation, corrected by Shoaib. + +## Validation + +| Check | Result | +| --- | --- | +| Full core unit suite | 1,999 passed, 0 failed; 12 existing skips | +| Actual v4 contract harness | 81 passed, 0 failed across 11 suites | +| New native funded cases | 3/3 pass; zero-default case additionally rerun with exact `ValueExceedsCap` assertion | +| Public Solana funded cases | 4/4 pass after the gas-estimation fix | +| Build | Pass | +| Typechecks | lib/spec/local-contract/AGW-E2E pass | +| Package/API/docs | Compiled exports match source; packed CJS/ESM imports and guide examples pass | +| E2E manifest | AGW: 46 scenarios/12 files/46 tests; default all remains 76/40/81 | + +The 46 AGW cases have selected-run live coverage (39 historical cases plus these seven additions), not one new combined 46-case execution. The local harness uses actual AGW/factory/engine/validator/URP contracts and fixture gateway/core/token components; public live delivery independently checks the real Solana receipt and CEA-to-recipient transfer. [Live evidence](live-evidence.json), [sanitized logs](logs/). + +New native cases cover omitted PC limits with a valid token transfer, raw-offset read/re-grant equality, and removed/conflicting inputs rejected before signing. Public Solana cases cover named-IDL grant/read/atomic replacement, actual destination transfer plus wait/replay, substituted account/oversized instruction refusals, and revoke followed by send refusal. A destination failure was previously tested through the internal wire backend; the new public suite does not claim a separate failing-program run. + +## Live issue found and fixed + +The initial public Solana create+grant reverted under the existing EIP-7702 fallback budget of 1,100,000 gas. Read-only replay at the preceding block failed at that limit and passed at 2,200,000. The fallback guessed 500k per call when state-override estimation failed, which was insufficient for this grant. + +`sendBatch7702` now estimates the actual signed authorization transaction first. If that RPC form is unsupported, it estimates ordinary execution only when the sender already delegates to the exact executor, otherwise attempts the delegation state override. If all valid estimation paths fail, it refuses to broadcast instead of inventing a gas ceiling. Estimates receive execution headroom plus authorization overhead. The live retry succeeded with gas limit 1,732,532 and gas used 1,171,408. [Receipts](batch-gas.json). + +Tests cover authorization-estimate fallback, fresh-account override, and refusal when estimation fails. The local batch rollback test explicitly overrides only its gas estimate to force a mined revert; a separate test verifies the normal pre-broadcast refusal path. Contract validation remains authoritative. + +No contract deployment, mainnet transaction or team message was sent. The funded runs used bounded, previously authorized testnet fixtures; environment secrets are absent from the saved evidence. diff --git a/plan/agw/research/decision-alignment-2026-10-07/batch-gas.json b/plan/agw/research/decision-alignment-2026-10-07/batch-gas.json new file mode 100644 index 00000000..88ffb3ec --- /dev/null +++ b/plan/agw/research/decision-alignment-2026-10-07/batch-gas.json @@ -0,0 +1,18 @@ +[ + { + "hash": "0x3b434310de5fd2542a0a062c3cd2734abcc07ce921b0f497bb32cc1284853d76", + "block": "23988191", + "gas": "1100000", + "gasUsed": "1047582", + "status": "reverted", + "type": "eip7702" + }, + { + "hash": "0x168f42b92fd9f5396cc68d9e6cf0b41cfbb869d6dd8892e0029f6e728acf9368", + "block": "23988300", + "gas": "1732532", + "gasUsed": "1171408", + "status": "success", + "type": "eip7702" + } +] diff --git a/plan/agw/research/decision-alignment-2026-10-07/live-evidence.json b/plan/agw/research/decision-alignment-2026-10-07/live-evidence.json new file mode 100644 index 00000000..7e899542 --- /dev/null +++ b/plan/agw/research/decision-alignment-2026-10-07/live-evidence.json @@ -0,0 +1,86 @@ +[ + { + "name": "zero-pc-defaults", + "at": "2026-10-07T09:36:31.118Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x1213f3b8785598621E49FdEd94D1E8973A478041", + "txHash": "0x5486e5723e14c396751931a4ecd3271bb0a907667f0e9d873dbd5837ddf5d067" + }, + { + "name": "raw-offset-reuse", + "at": "2026-10-07T09:36:55.598Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x39E46010A46A24F48Df05337276242Bc8d4DB864", + "txHash": "0xccbb3e31d51b8c1e976c5818ee850d31287ad43170518838fff73861dc2a0c59" + }, + { + "name": "public-svm-setup", + "at": "2026-10-07T09:42:42.568Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x93dd8A0224e0acD40793a7796cB4dC98fE623657", + "id": "0x1e2dceea3b903fd4b12ce69ed511ae46a4a28d7c5ddf88374466c6610c006465", + "grantHash": "0x168f42b92fd9f5396cc68d9e6cf0b41cfbb869d6dd8892e0029f6e728acf9368", + "cea": "CHtieGAwhxzLX9p5vikpEzdCvTfYdwMgKRaL8BxsbNaM", + "recipient": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb" + }, + { + "name": "public-svm-replacement", + "at": "2026-10-07T09:44:25.367Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x93dd8A0224e0acD40793a7796cB4dC98fE623657", + "id": "0x5409d54790e0682c1ad30c7fc2c72c64689d9ba45e77b091d5f3cb11278ae2c0", + "txHash": "0x9387695709ff660f718ef2381825be25f310cebedc1099cdffa058169930d4a8" + }, + { + "name": "public-svm-submitted", + "at": "2026-10-07T09:44:39.162Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x93dd8A0224e0acD40793a7796cB4dC98fE623657", + "id": "0x5409d54790e0682c1ad30c7fc2c72c64689d9ba45e77b091d5f3cb11278ae2c0", + "hash": "0x1bff1696e1808d4aba472f622be4b6d98120b4ea559c89063c09bf3a320036ca" + }, + { + "name": "public-svm-delivered", + "at": "2026-10-07T09:46:05.379Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x93dd8A0224e0acD40793a7796cB4dC98fE623657", + "hash": "0x1bff1696e1808d4aba472f622be4b6d98120b4ea559c89063c09bf3a320036ca", + "destinationHash": "43bAGg9ZRnPyQfbiLv7UFdXmW27AZuUMYzm1x4idHeUVKAMTVdydLK1FqEb2AoN7PqgZXMDD5xqzEMdfbxCagrQc", + "instruction": { + "program": "0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", + "data": "0x79f4fa0308e5e1011027000000000000", + "accounts": [ + { + "pubkey": "0x4f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af", + "isWritable": true + }, + { + "pubkey": "0x2953026d328218b107268efe60f7d98635af1ff535a91731f75ca7cf8a859044", + "isWritable": true + }, + { + "pubkey": "0xa7c453ab5fcff6b1738264ac9bf5d4a89036e75e8873e614589c35cc75431c52", + "isWritable": true + }, + { + "pubkey": "0x0000000000000000000000000000000000000000000000000000000000000000", + "isWritable": false + } + ] + } + }, + { + "name": "zero-pc-defaults", + "at": "2026-10-07T09:50:52.432Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0xC245d7509116841788d66840De87b4C377308B16", + "txHash": "0xdc5ef369d0ef06bbb21ae4d7c286c25910a5aa8c2df055c70486466729f69c4e" + } +] diff --git a/plan/agw/research/decision-alignment-2026-10-07/logs/build.log b/plan/agw/research/decision-alignment-2026-10-07/logs/build.log new file mode 100644 index 00000000..96dfaa76 --- /dev/null +++ b/plan/agw/research/decision-alignment-2026-10-07/logs/build.log @@ -0,0 +1,11 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:13252) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core diff --git a/plan/agw/research/decision-alignment-2026-10-07/logs/local-contracts.log b/plan/agw/research/decision-alignment-2026-10-07/logs/local-contracts.log new file mode 100644 index 00000000..57db0d34 --- /dev/null +++ b/plan/agw/research/decision-alignment-2026-10-07/logs/local-contracts.log @@ -0,0 +1,29 @@ +PASS core-agw-local packages/core/__agw-local__/svm-backend.spec.ts (11.868 s) +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts (5.429 s) +PASS core-agw-local packages/core/__agw-local__/v4-multiasset.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-differential.spec.ts + ● Console + + console.log + {"corpus":"svm-grant","seed":23063,"cases":107,"accepted":38,"rejected":69,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:226:13) + + console.log + {"corpus":"svm-payload","seed":23063,"cases":88,"accepted":6,"rejected":82,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:407:13) + +PASS core-agw-local packages/core/__agw-local__/agw-local-batch.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-public.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-races.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-internals.spec.ts +PASS core-agw-local packages/core/__agw-local__/delayed-index.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts + +Test Suites: 11 passed, 11 total +Tests: 81 passed, 81 total +Snapshots: 0 total +Time: 33.814 s, estimated 63 s +Ran all test suites. diff --git a/plan/agw/research/decision-alignment-2026-10-07/logs/native-default-refusal-live.log b/plan/agw/research/decision-alignment-2026-10-07/logs/native-default-refusal-live.log new file mode 100644 index 00000000..bd0c08d5 --- /dev/null +++ b/plan/agw/research/decision-alignment-2026-10-07/logs/native-default-refusal-live.log @@ -0,0 +1,20 @@ +PASS core-e2e __e2e__/agw/native-policy-extended.spec.ts (78.747 s) + agw extended native policy + ✓ 9. omitted PC limits forbid value while still allowing a token transfer (57656 ms) + ○ skipped 1. pinned recipient and metered amount decode losslessly and transfer through explicit Push chain + ○ skipped 2. wrong recipient pin is refused with unchanged token balance and counters + ○ skipped 3. per-call amount cap refuses cap plus one + ○ skipped 4. cumulative amount accepts the exact total and refuses the next unit + ○ skipped 5. call count accepts the exact count and refuses a zero-amount extra call + ○ skipped 6. explicit zero total forbids positive amount but permits a metered zero call + ○ skipped 7. failed token callee leaves all policy counters unchanged + ○ skipped 8. an ungranted selector is refused without changing balances or allowance + ○ skipped 10. decoded raw-offset rules can be granted again without fabricated ref metadata + ○ skipped 11. removed ref and conflicting argument-offset inputs fail before signing + +Test Suites: 1 passed, 1 total +Tests: 10 skipped, 1 passed, 11 total +Snapshots: 0 total +Time: 78.782 s, estimated 96 s +Ran all test suites within paths "__e2e__/agw/native-policy-extended.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/decision-alignment-2026-10-07/logs/native-live.log b/plan/agw/research/decision-alignment-2026-10-07/logs/native-live.log new file mode 100644 index 00000000..b91f38b2 --- /dev/null +++ b/plan/agw/research/decision-alignment-2026-10-07/logs/native-live.log @@ -0,0 +1,20 @@ +PASS core-e2e __e2e__/agw/native-policy-extended.spec.ts (95.792 s) + agw extended native policy + ✓ 9. omitted PC limits forbid value while still allowing a token transfer (50635 ms) + ✓ 10. decoded raw-offset rules can be granted again without fabricated ref metadata (24480 ms) + ✓ 11. removed ref and conflicting argument-offset inputs fail before signing (4191 ms) + ○ skipped 1. pinned recipient and metered amount decode losslessly and transfer through explicit Push chain + ○ skipped 2. wrong recipient pin is refused with unchanged token balance and counters + ○ skipped 3. per-call amount cap refuses cap plus one + ○ skipped 4. cumulative amount accepts the exact total and refuses the next unit + ○ skipped 5. call count accepts the exact count and refuses a zero-amount extra call + ○ skipped 6. explicit zero total forbids positive amount but permits a metered zero call + ○ skipped 7. failed token callee leaves all policy counters unchanged + ○ skipped 8. an ungranted selector is refused without changing balances or allowance + +Test Suites: 1 passed, 1 total +Tests: 8 skipped, 3 passed, 11 total +Snapshots: 0 total +Time: 95.811 s +Ran all test suites within paths "__e2e__/agw/native-policy-extended.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/decision-alignment-2026-10-07/logs/svm-public-initial-gas-failure.log b/plan/agw/research/decision-alignment-2026-10-07/logs/svm-public-initial-gas-failure.log new file mode 100644 index 00000000..bfba7056 --- /dev/null +++ b/plan/agw/research/decision-alignment-2026-10-07/logs/svm-public-initial-gas-failure.log @@ -0,0 +1,153 @@ +FAIL core-e2e __e2e__/agw/svm-public.spec.ts (34.947 s) + agw public svm + ✕ 1. named IDL grant reads exact constraints and replaces atomically (1 ms) + ✕ 2. public send confirms actual CEA transfer and preserves replay identity + ✕ 3. substituted named accounts and excessive instruction amounts fail before signing + ✕ 4. public revoke removes the Solana rule and subsequent sends are refused + + ● agw public svm › 1. named IDL grant reads exact constraints and replaces atomically + + AgenticRevertError: sendPushTx — Push Chain transaction 0x3b434310de5fd2542a0a062c3cd2734abcc07ce921b0f497bb32cc1284853d76 reverted + + 135 | if (decoded || err instanceof PushChainExecutionError) { + 136 | const e = err as { message?: string; gatewayTxHash?: string; decodedError?: DecodedErrorPayload }; + > 137 | return new AgenticRevertError(e?.message ?? decoded?.name ?? 'AGW revert', { + | ^ + 138 | decodedError: decoded ?? e?.decodedError, + 139 | gatewayTxHash: e?.gatewayTxHash, + 140 | agenticCode: decoded?.name, + + at wrapSendError (src/lib/agentic/management/common.ts:137:12) + at createFailure (src/lib/agentic/management/create.ts:250:32) + at createWallet (src/lib/agentic/management/create.ts:140:27) + at async Object. (__e2e__/agw/svm-public.spec.ts:140:18) + + Cause: + PushChainExecutionError: sendPushTx — Push Chain transaction 0x3b434310de5fd2542a0a062c3cd2734abcc07ce921b0f497bb32cc1284853d76 reverted + + 76 | receiptWaited = true; + 77 | if (receipt.status === 'reverted') { + > 78 | throw new PushChainExecutionError( + | ^ + 79 | `${label} — Push Chain transaction ${txHash} reverted` + 80 | ); + 81 | } + + at getIndexedPushTransaction (src/lib/orchestrator/internals/push-chain-tx.ts:78:17) + at async sendPushTx (src/lib/orchestrator/internals/push-chain-tx.ts:162:28) + at async executeStandardPayload (src/lib/orchestrator/internals/execute-standard.ts:173:12) + at async Orchestrator.executeWithPolicy (src/lib/orchestrator/orchestrator.ts:471:11) + at async createWallet (src/lib/agentic/management/create.ts:138:10) + at async Object. (__e2e__/agw/svm-public.spec.ts:140:18) + + ● agw public svm › 2. public send confirms actual CEA transfer and preserves replay identity + + AgenticRevertError: sendPushTx — Push Chain transaction 0x3b434310de5fd2542a0a062c3cd2734abcc07ce921b0f497bb32cc1284853d76 reverted + + 135 | if (decoded || err instanceof PushChainExecutionError) { + 136 | const e = err as { message?: string; gatewayTxHash?: string; decodedError?: DecodedErrorPayload }; + > 137 | return new AgenticRevertError(e?.message ?? decoded?.name ?? 'AGW revert', { + | ^ + 138 | decodedError: decoded ?? e?.decodedError, + 139 | gatewayTxHash: e?.gatewayTxHash, + 140 | agenticCode: decoded?.name, + + at wrapSendError (src/lib/agentic/management/common.ts:137:12) + at createFailure (src/lib/agentic/management/create.ts:250:32) + at createWallet (src/lib/agentic/management/create.ts:140:27) + at async Object. (__e2e__/agw/svm-public.spec.ts:140:18) + + Cause: + PushChainExecutionError: sendPushTx — Push Chain transaction 0x3b434310de5fd2542a0a062c3cd2734abcc07ce921b0f497bb32cc1284853d76 reverted + + 76 | receiptWaited = true; + 77 | if (receipt.status === 'reverted') { + > 78 | throw new PushChainExecutionError( + | ^ + 79 | `${label} — Push Chain transaction ${txHash} reverted` + 80 | ); + 81 | } + + at getIndexedPushTransaction (src/lib/orchestrator/internals/push-chain-tx.ts:78:17) + at async sendPushTx (src/lib/orchestrator/internals/push-chain-tx.ts:162:28) + at async executeStandardPayload (src/lib/orchestrator/internals/execute-standard.ts:173:12) + at async Orchestrator.executeWithPolicy (src/lib/orchestrator/orchestrator.ts:471:11) + at async createWallet (src/lib/agentic/management/create.ts:138:10) + at async Object. (__e2e__/agw/svm-public.spec.ts:140:18) + + ● agw public svm › 3. substituted named accounts and excessive instruction amounts fail before signing + + AgenticRevertError: sendPushTx — Push Chain transaction 0x3b434310de5fd2542a0a062c3cd2734abcc07ce921b0f497bb32cc1284853d76 reverted + + 135 | if (decoded || err instanceof PushChainExecutionError) { + 136 | const e = err as { message?: string; gatewayTxHash?: string; decodedError?: DecodedErrorPayload }; + > 137 | return new AgenticRevertError(e?.message ?? decoded?.name ?? 'AGW revert', { + | ^ + 138 | decodedError: decoded ?? e?.decodedError, + 139 | gatewayTxHash: e?.gatewayTxHash, + 140 | agenticCode: decoded?.name, + + at wrapSendError (src/lib/agentic/management/common.ts:137:12) + at createFailure (src/lib/agentic/management/create.ts:250:32) + at createWallet (src/lib/agentic/management/create.ts:140:27) + at async Object. (__e2e__/agw/svm-public.spec.ts:140:18) + + Cause: + PushChainExecutionError: sendPushTx — Push Chain transaction 0x3b434310de5fd2542a0a062c3cd2734abcc07ce921b0f497bb32cc1284853d76 reverted + + 76 | receiptWaited = true; + 77 | if (receipt.status === 'reverted') { + > 78 | throw new PushChainExecutionError( + | ^ + 79 | `${label} — Push Chain transaction ${txHash} reverted` + 80 | ); + 81 | } + + at getIndexedPushTransaction (src/lib/orchestrator/internals/push-chain-tx.ts:78:17) + at async sendPushTx (src/lib/orchestrator/internals/push-chain-tx.ts:162:28) + at async executeStandardPayload (src/lib/orchestrator/internals/execute-standard.ts:173:12) + at async Orchestrator.executeWithPolicy (src/lib/orchestrator/orchestrator.ts:471:11) + at async createWallet (src/lib/agentic/management/create.ts:138:10) + at async Object. (__e2e__/agw/svm-public.spec.ts:140:18) + + ● agw public svm › 4. public revoke removes the Solana rule and subsequent sends are refused + + AgenticRevertError: sendPushTx — Push Chain transaction 0x3b434310de5fd2542a0a062c3cd2734abcc07ce921b0f497bb32cc1284853d76 reverted + + 135 | if (decoded || err instanceof PushChainExecutionError) { + 136 | const e = err as { message?: string; gatewayTxHash?: string; decodedError?: DecodedErrorPayload }; + > 137 | return new AgenticRevertError(e?.message ?? decoded?.name ?? 'AGW revert', { + | ^ + 138 | decodedError: decoded ?? e?.decodedError, + 139 | gatewayTxHash: e?.gatewayTxHash, + 140 | agenticCode: decoded?.name, + + at wrapSendError (src/lib/agentic/management/common.ts:137:12) + at createFailure (src/lib/agentic/management/create.ts:250:32) + at createWallet (src/lib/agentic/management/create.ts:140:27) + at async Object. (__e2e__/agw/svm-public.spec.ts:140:18) + + Cause: + PushChainExecutionError: sendPushTx — Push Chain transaction 0x3b434310de5fd2542a0a062c3cd2734abcc07ce921b0f497bb32cc1284853d76 reverted + + 76 | receiptWaited = true; + 77 | if (receipt.status === 'reverted') { + > 78 | throw new PushChainExecutionError( + | ^ + 79 | `${label} — Push Chain transaction ${txHash} reverted` + 80 | ); + 81 | } + + at getIndexedPushTransaction (src/lib/orchestrator/internals/push-chain-tx.ts:78:17) + at async sendPushTx (src/lib/orchestrator/internals/push-chain-tx.ts:162:28) + at async executeStandardPayload (src/lib/orchestrator/internals/execute-standard.ts:173:12) + at async Orchestrator.executeWithPolicy (src/lib/orchestrator/orchestrator.ts:471:11) + at async createWallet (src/lib/agentic/management/create.ts:138:10) + at async Object. (__e2e__/agw/svm-public.spec.ts:140:18) + +Test Suites: 1 failed, 1 total +Tests: 4 failed, 4 total +Snapshots: 0 total +Time: 34.965 s +Ran all test suites within paths "__e2e__/agw/svm-public.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/decision-alignment-2026-10-07/logs/svm-public-live.log b/plan/agw/research/decision-alignment-2026-10-07/logs/svm-public-live.log new file mode 100644 index 00000000..658b03f7 --- /dev/null +++ b/plan/agw/research/decision-alignment-2026-10-07/logs/svm-public-live.log @@ -0,0 +1,13 @@ +PASS core-e2e __e2e__/agw/svm-public.spec.ts (283.2 s) + agw public svm + ✓ 1. named IDL grant reads exact constraints and replaces atomically (102799 ms) + ✓ 2. public send confirms actual CEA transfer and preserves replay identity (100011 ms) + ✓ 3. substituted named accounts and excessive instruction amounts fail before signing (15315 ms) + ✓ 4. public revoke removes the Solana rule and subsequent sends are refused (9725 ms) + +Test Suites: 1 passed, 1 total +Tests: 4 passed, 4 total +Snapshots: 0 total +Time: 283.218 s +Ran all test suites within paths "__e2e__/agw/svm-public.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/decision-alignment-2026-10-07/logs/units.log b/plan/agw/research/decision-alignment-2026-10-07/logs/units.log new file mode 100644 index 00000000..c05da5e3 --- /dev/null +++ b/plan/agw/research/decision-alignment-2026-10-07/logs/units.log @@ -0,0 +1,171 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts (6.113 s) + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts + +Test Suites: 1 skipped, 118 passed, 118 of 119 total +Tests: 12 skipped, 1999 passed, 2011 total +Snapshots: 0 total +Time: 63.777 s +Ran all test suites. diff --git a/plan/agw/research/deployment-review-2026-10-06/README.md b/plan/agw/research/deployment-review-2026-10-06/README.md new file mode 100644 index 00000000..9494a1fb --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/README.md @@ -0,0 +1,85 @@ +# Donut v4 deployment and SDK integration review + +> Historical pre-migration inspection. Its missing-adapter/registry findings were implemented in a66ff7d. [Current migration](../v4-implementation-2026-10-06/README.md) and [live acceptance](../live-acceptance-2026-10-06/README.md) supersede those implementation-status statements; original source evidence is preserved below. + +Reviewed October 6, 2026. **The contract deployment/artifact dependency is substantially delivered; the current SDK adapter still cannot use it.** This is a source/ABI/read-only integration review, not a funded acceptance run or a security audit. + +## Revisions and evidence + +- [deploy-agw documentation head](https://github.com/pushchain/push-agentic-wallets/tree/10a24f101e2e6e0a9b76517b29f5cdb1aa967796): `10a24f101e2e6e0a9b76517b29f5cdb1aa967796`. +- [Reported deployed source](https://github.com/pushchain/push-agentic-wallets/tree/e8db74815cfbbf5389593805e464fe8d85f7f735): `e8db74815cfbbf5389593805e464fe8d85f7f735`. No src changes between it and the documentation head; the linked owner guide was added afterward. +- [Saved address book](source/docs/addresses/donut.md) and [owner guide](source/docs/5_SDK_Owner_Integration.md). [Source manifest](source-manifest.json) records hashes; these are GitHub snapshots, not a new Notion export. +- [Read-only probe](donut-probe.json): Donut chain 42101, block **23931055**, block hash `0x53bae3cfa28570dc06361ef91e33aa9a885e0d01284cf749d4fd5c018d72c83c`. Code, proxy slots and selected views were read at this block. +- [Explorer artifact metadata](explorer-artifacts.json): the five implementation/engine/validator contracts returned verified ABIs, solc 0.8.26, optimizer 833, Cancun. Saved under [abis/](abis/). Explorer verification is reported by the explorer; a local bytecode rebuild was not performed. +- [ABI comparison](abi-comparison.json) against the SDK e704d5b artifacts; [four focused compatibility checks](wire-checks.json) passed. + +## Deployment facts + +| Integration input | Verified at the probe block | +| --- | --- | +| Factory proxy | `0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF` | +| URP proxy | `0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af` | +| Wallet implementation | `0x96D69ec7e6cDdaD414e656B5c9DCA24587DF713c` | +| Engine | `0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a` | +| Validator | `0x068EE2388475A98EE1f5a434C58bFF3444fffFe6` | +| URP version | `3.1.0` | +| Wallet accountId | `push.agw.1.0.0`, unchanged from the earlier source generation | +| Factory paused | false | +| Historical scan start | Address book reports deployment blocks 23923806–23923810; capture transaction receipts/log provenance when producing the release manifest | + +Factory/URP implementation slots and URP admin match the new book; wallet implementation getters point to the new engine, URP, validator and C1 gateway. Runtime sizes match the book. URP SESSION_ENGINE also returned the documented engine. Core's Sepolia gas-token getter returned `0x2971824Db68229D087931155C2b8bB820B275809` at the same block, matching the guide (see supplemental reads). + +These replace the earlier supplied address table for **new v4 integrations**. Existing wallets remain tied to their original factory/generation; their addresses, rules and balances do not migrate. Do not use an unchanged accountId as proof of envelope compatibility. + +## Contract questions now answered + +| Former uncertainty | Delivered answer | Remaining SDK work | +| --- | --- | --- | +| Z1.1 multi-asset body | UniversalTerms = `(uint48,address,(address,uint256,uint256)[],uint256,(address,bytes4,uint16,bool,uint256)[])`; 1–8 PRC20s, distinct and chain-checked | Resolve user tokens, encode/decode caps, retain order and select outbound token | +| Envelope | `abi.encode(uint16(1), string chainNamespace, bytes body)` for native, EVM and SVM | Migrate every grant and decode path; isolate old fixtures | +| EVM expectedCEA | `address`, not proposed bytes32; derived from the wallet on the destination chain | Resolve/check wallet CEA; preserve derivation-drift handling | +| Empty user assets | Empty wire list rejected; guide prescribes destination gas PRC20 at 0/0 for a no-movement rule | Add exactly one routing-only cap only when input is empty; amount remains zero | +| Universal total zero | Zero forbids movement; uint256 maximum represents no total cap | Replace the provisional zero/unlimited universal default; preserve explicit zero | +| Z1.2 assertion | `assertSpent(bytes32,address,uint256[])`; length and every expected value checked in listed-token order, EVM and SVM | Internal per-token snapshot → assertion → revoke → grant in one owner batch | +| SVM terms | Detailed assets/programs/account/data pins/CEA accounts supplied | Public SDK representation, registry/ATA/PDA resolution, payload composer, reads and acceptance | +| Multiple rules | Guide explicitly permits several rules for one agent and chain | Lifecycle validation must align with Harsh's acceptance; send selection still unspecified (H6) | + +Exact source: [Types.sol](source/src/libraries/Types.sol:208), [asset validation](source/src/policies/UniversalRulesPolicy.sol:439), [ordered assertion](source/src/policies/UniversalRulesPolicy.sol:1437). [Multi-asset source tests](source/test/unit/28_multiAsset.t.sol:142) include exact-counter, independent-token, zero-cap and no-movement cases. They were inspected, not rerun. The owner guide excludes the agent outbound path explicitly. + +## Why the SDK is not ready by adding addresses + +1. **All grants:** [session.ts](../../../../packages/core/src/lib/agentic/codec/session.ts:43) still encodes `(string,bytes)`. Its first word is 64, not version 1. New wallet code decodes three fields before URP; native grants are affected too. The exact revert on a grant depends on which decoder is reached; the wire check does not claim an on-chain grant was executed. +2. **New generation:** [deployments.ts](../../../../packages/core/src/lib/agentic/deployments.ts) only recognizes e704d5b and ships an empty registry. Add a separate v4 adapter/manifest after compatibility tests. Keep old local fixtures reproducible. +3. **Universal reads:** getConfig/getSvmConfig retain selectors but return different tuples. A real empty v4 getConfig response decoded with its verified ABI; the old ABI rejected the same bytes. +4. **Universal grants:** [universal.ts](../../../../packages/core/src/lib/agentic/codec/universal.ts:68) still gates encoding. Implement the delivered multi-asset schema, wallet CEA context and routing-only zero cap. +5. **Agent outbound:** [send.ts](../../../../packages/core/src/lib/agentic/execution/send.ts:170) still reads cfg.asset/maxPCPerCall. V4 requires selected token membership in cfg.assets and maxGasPerCall; each outbound still moves one request token, not all listed tokens together. +6. **Replacement:** implement the array-form internal assertion, preserving token order and checking every old-rule asset; do not replace it with a getter or only check the asset used last. +7. **Logs/errors:** OutboundMetered and RevertCredited now include token; creditRevert gains a token argument; the old scalar universal assertion disappears. Refresh policy ABI/error decoding and event consumers. +8. **Multiplicity:** create/add/update and send resolver still enforce one enabled agent/chain pair. Remove lifecycle restrictions in the agreed change, but settle rule selection first; arbitrary first-match execution is not an acceptable substitute. + +Factory, wallet and engine function/event/error signatures and return shapes match the older ABI comparison. **Wallet execution semantics still changed through envelope decoding despite that ABI similarity.** This is why selector/accountId checks alone are insufficient. + +## Still open and scope limits + +- **H3, narrowed:** universal omitted total is specified as uint256 maximum; explicit zero is a hard zero. Native wire totals also use max for unlimited, maxCalls zero is unlimited, destination maxValue zero is non-payable. The guide does not decide all *SDK omission defaults*, especially native maxValuePerCall/maxValueTotal, or explain Harsh's referenced public maxValueTotal change. Token-independence wording still needs product confirmation; the delivered schema retains assets[]. +- **H4.5:** raw offsets are confirmed wire data, but the public authoring/read model is still a product choice. The guide's `4+32*argIndex` shorthand is valid for simple one-word top-level ABI arguments, not arbitrary tuples/arrays; retain the SDK's ABI-layout validation. +- **H6:** same-agent multiplicity is supported; decide public explicit-rule selection versus a defined automatic strategy, including multi-call/overlapping rules. +- **Z1 metadata:** grantRules still takes Session only, RulesGranted has no job ref, label exists only in WalletDeployed, and setLabel is absent. Confirm intended v1 scope; do not fabricate storage/ref events. +- **SVM:** wire definitions are delivered, but usable SDK inputs/resolution and representative cluster fixtures/acceptance are outstanding. CEA plus every listed token/output value-holding account must be protected; URP cannot derive those accounts for the SDK. +- **creditRevert:** [source](source/src/policies/UniversalRulesPolicy.sol:1514) explicitly says the executor does not yet call it on failure. Its no-code account is an expected module-address property, not proof of a defect by itself. Platform integration remains pending. +- **Gateway allowance:** retain separate owner-established allowance. The SDK must not automatically restore an allowance from a stale read. The owner guide does not itself provide a complete approve/setup sequence. +- **Live acceptance:** no wallet was created, funded or granted by this review; no production pull/burn, agent transport, destination execution or settlement was exercised. Native/local SDK counts from e704d5b do not validate v4. + +## Next SDK steps + +1. Add the e8db748/v4 adapter, verified ABIs and candidate manifest; retain e704d5b as a fixture generation. +2. Make envelope encode/decode generation-aware for all rule kinds and replay utilities; add malformed/version regressions. +3. Implement EVM multi-asset codec, token/chain/CEA resolution, no-movement routing and corrected total semantics. +4. Implement v4 term reads and internal per-token spend/assertion adapter; prove all-asset stale-state rollback. +5. Adapt outbound token choice, maxGasPerCall, events/errors and live/replay summaries. Preserve explicit allowance and identity behavior. +6. Settle H6 and revise management/resolver/batch metadata/tests together. Keep ref/label gated until scope is decided. +7. Port the existing real-contract SDK harness to e8db748 and add multi-asset/call-only/version/multiplicity tests. The four checks here are not that harness. +8. Implement SVM SDK mapping/composition with explicit account coverage and cluster fixtures. +9. Finalize registry/manifest including verified event start provenance, then perform preflight and authorized funded E2Es. Do not silently fund or submit while checking docs. + +Reproduction: `python3 plan/agw/research/deployment-review-2026-10-06/probe.py` (new pinned block each run); `node plan/agw/research/deployment-review-2026-10-06/verify-wire.cjs` (uses the saved probe block). The SDK's full test suite and contracts' build/full suite were not rerun because no implementation was changed. diff --git a/plan/agw/research/deployment-review-2026-10-06/abi-comparison.json b/plan/agw/research/deployment-review-2026-10-06/abi-comparison.json new file mode 100644 index 00000000..c5de2281 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/abi-comparison.json @@ -0,0 +1,48 @@ +{ + "wallet": { + "removed": [], + "added": [], + "output_changed": {} + }, + "factory": { + "removed": [], + "added": [], + "output_changed": {} + }, + "policy": { + "removed": [ + "error AssetMismatch(address,address)", + "event OutboundMetered(bytes32,address,address,uint256)", + "event RevertCredited(bytes32,bytes32,address,uint256)", + "function assertSpent(bytes32,address,uint256)", + "function creditRevert(bytes32,address,bytes32,uint256)" + ], + "added": [ + "error AssetListOutOfRange(uint256)", + "error AssetNotAllowed(address)", + "error AssetSpentMismatch(address,uint256,uint256)", + "error DuplicateAsset(address)", + "error SpentLengthMismatch(uint256,uint256)", + "error UnsupportedEnvelopeVersion(uint256)", + "event OutboundMetered(bytes32,address,address,address,uint256)", + "event RevertCredited(bytes32,bytes32,address,address,uint256)", + "function assertSpent(bytes32,address,uint256[])", + "function creditRevert(bytes32,address,bytes32,address,uint256)" + ], + "output_changed": { + "function getConfig(bytes32,address)": { + "old": "(bool,uint48,bytes32,address,address,uint256,uint256,uint256,uint256,(address,bytes4,uint16,bool,uint256)[])", + "new": "(bool,uint48,address,uint256,(address,uint256,uint256,uint256)[],(address,bytes4,uint16,bool,uint256)[])" + }, + "function getSvmConfig(bytes32,address)": { + "old": "(bool,uint48,bytes32,bytes32,address,uint256,uint256,uint256,uint256,bytes32[],(bytes32,bytes8,uint8,bool,uint8)[],(uint8,uint8,bytes32)[],(uint8,bool,uint16,uint16,uint8,uint8,bytes32,uint64,uint64)[])", + "new": "(bool,uint48,bytes32,bytes32,uint256,(address,uint256,uint256,uint256)[],bytes32[],(bytes32,bytes8,uint8,bool,uint8)[],(uint8,uint8,bytes32)[],(uint8,bool,uint16,uint16,uint8,uint8,bytes32,uint64,uint64)[])" + } + } + }, + "engine": { + "removed": [], + "added": [], + "output_changed": {} + } +} diff --git a/plan/agw/research/deployment-review-2026-10-06/abis/engine.json b/plan/agw/research/deployment-review-2026-10-06/abis/engine.json new file mode 100644 index 00000000..61100bd3 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/abis/engine.json @@ -0,0 +1,1957 @@ +[ + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "AssociatedArray_OutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "providedChainId", + "type": "uint64" + } + ], + "name": "ChainIdMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "providedChainId", + "type": "uint64" + } + ], + "name": "ChainIdMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "ForbiddenValidationData", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "HashIndexOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "providedHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "computedHash", + "type": "bytes32" + } + ], + "name": "HashMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "providedHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "computedHash", + "type": "bytes32" + } + ], + "name": "HashMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidActionId", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidCallTarget", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidData", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "InvalidEnableSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "contract ISessionValidator", + "name": "sessionValidator", + "type": "address" + } + ], + "name": "InvalidISessionValidator", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + } + ], + "name": "InvalidPermissionId", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidSelfCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + } + ], + "name": "InvalidSession", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "sessionValidator", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + } + ], + "name": "InvalidSessionKeySignature", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTarget", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "InvalidUserOpSender", + "type": "error" + }, + { + "inputs": [], + "name": "NoExecutionsInBatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + } + ], + "name": "NoPoliciesSet", + "type": "error" + }, + { + "inputs": [], + "name": "PartlyEnabledActions", + "type": "error" + }, + { + "inputs": [], + "name": "PartlyEnabledPolicies", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + } + ], + "name": "PaymasterValidationNotEnabled", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "policy", + "type": "address" + } + ], + "name": "PolicyViolation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "SignerNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "SignerNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "SmartSessionModuleAlreadyInstalled", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "CallType", + "name": "callType", + "type": "bytes1" + } + ], + "name": "UnsupportedCallType", + "type": "error" + }, + { + "inputs": [], + "name": "UnsupportedExecutionType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + } + ], + "name": "UnsupportedPolicy", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "enum SmartSessionMode", + "name": "mode", + "type": "uint8" + } + ], + "name": "UnsupportedSmartSessionMode", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "ActionId", + "name": "actionId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "smartAccount", + "type": "address" + } + ], + "name": "ActionIdDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newValue", + "type": "uint256" + } + ], + "name": "NonceIterated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "smartAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "PermissionIdPermit4337Paymaster", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "enum PolicyType", + "name": "policyType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "smartAccount", + "type": "address" + } + ], + "name": "PolicyDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "enum PolicyType", + "name": "policyType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "smartAccount", + "type": "address" + } + ], + "name": "PolicyEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "SessionCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "smartAccount", + "type": "address" + } + ], + "name": "SessionRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "sessionValidator", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "smartAccount", + "type": "address" + } + ], + "name": "SessionValidatorDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "sessionValidator", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "smartAccount", + "type": "address" + } + ], + "name": "SessionValidatorEnabled", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "bytes4", + "name": "actionTargetSelector", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "actionTarget", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "actionPolicies", + "type": "tuple[]" + } + ], + "internalType": "struct ActionData[]", + "name": "actions", + "type": "tuple[]" + } + ], + "name": "areActionsEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "erc1271Policies", + "type": "tuple[]" + } + ], + "name": "areERC1271PoliciesEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "userOpPolicies", + "type": "tuple[]" + } + ], + "name": "areUserOpPoliciesEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "ActionId", + "name": "actionId", + "type": "bytes32" + } + ], + "name": "disableActionId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "ActionId", + "name": "actionId", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "policies", + "type": "address[]" + } + ], + "name": "disableActionPolicies", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "policies", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "appDomainSeparator", + "type": "bytes32" + }, + { + "internalType": "string[]", + "name": "contentNames", + "type": "string[]" + } + ], + "internalType": "struct ERC7739Context[]", + "name": "contexts", + "type": "tuple[]" + } + ], + "name": "disableERC1271Policies", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "policies", + "type": "address[]" + } + ], + "name": "disableUserOpPolicies", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "bytes4", + "name": "actionTargetSelector", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "actionTarget", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "actionPolicies", + "type": "tuple[]" + } + ], + "internalType": "struct ActionData[]", + "name": "actionPolicies", + "type": "tuple[]" + } + ], + "name": "enableActionPolicies", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "components": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "appDomainSeparator", + "type": "bytes32" + }, + { + "internalType": "string[]", + "name": "contentNames", + "type": "string[]" + } + ], + "internalType": "struct ERC7739Context[]", + "name": "allowedERC7739Content", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "erc1271Policies", + "type": "tuple[]" + } + ], + "internalType": "struct ERC7739Data", + "name": "erc1271Policies", + "type": "tuple" + } + ], + "name": "enableERC1271Policies", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "contract ISessionValidator", + "name": "sessionValidator", + "type": "address" + }, + { + "internalType": "bytes", + "name": "sessionValidatorInitData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "userOpPolicies", + "type": "tuple[]" + }, + { + "components": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "appDomainSeparator", + "type": "bytes32" + }, + { + "internalType": "string[]", + "name": "contentNames", + "type": "string[]" + } + ], + "internalType": "struct ERC7739Context[]", + "name": "allowedERC7739Content", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "erc1271Policies", + "type": "tuple[]" + } + ], + "internalType": "struct ERC7739Data", + "name": "erc7739Policies", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bytes4", + "name": "actionTargetSelector", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "actionTarget", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "actionPolicies", + "type": "tuple[]" + } + ], + "internalType": "struct ActionData[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "bool", + "name": "permitERC4337Paymaster", + "type": "bool" + } + ], + "internalType": "struct Session[]", + "name": "sessions", + "type": "tuple[]" + } + ], + "name": "enableSessions", + "outputs": [ + { + "internalType": "PermissionId[]", + "name": "permissionIds", + "type": "bytes32[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "userOpPolicies", + "type": "tuple[]" + } + ], + "name": "enableUserOpPolicies", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "ActionId", + "name": "actionId", + "type": "bytes32" + } + ], + "name": "getActionPolicies", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + } + ], + "name": "getERC1271Policies", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + } + ], + "name": "getEnabledActions", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + } + ], + "name": "getEnabledERC7739Content", + "outputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "appDomainSeparator", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "contentNameHashes", + "type": "bytes32[]" + } + ], + "internalType": "struct ERC7739ContextHashes[]", + "name": "enabledERC7739ContentHashes", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getPermissionIDs", + "outputs": [ + { + "internalType": "PermissionId[]", + "name": "permissionIds", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "contract ISessionValidator", + "name": "sessionValidator", + "type": "address" + }, + { + "internalType": "bytes", + "name": "sessionValidatorInitData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "userOpPolicies", + "type": "tuple[]" + }, + { + "components": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "appDomainSeparator", + "type": "bytes32" + }, + { + "internalType": "string[]", + "name": "contentNames", + "type": "string[]" + } + ], + "internalType": "struct ERC7739Context[]", + "name": "allowedERC7739Content", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "erc1271Policies", + "type": "tuple[]" + } + ], + "internalType": "struct ERC7739Data", + "name": "erc7739Policies", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bytes4", + "name": "actionTargetSelector", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "actionTarget", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "actionPolicies", + "type": "tuple[]" + } + ], + "internalType": "struct ActionData[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "bool", + "name": "permitERC4337Paymaster", + "type": "bool" + } + ], + "internalType": "struct Session", + "name": "session", + "type": "tuple" + } + ], + "name": "getPermissionId", + "outputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "components": [ + { + "internalType": "contract ISessionValidator", + "name": "sessionValidator", + "type": "address" + }, + { + "internalType": "bytes", + "name": "sessionValidatorInitData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "userOpPolicies", + "type": "tuple[]" + }, + { + "components": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "appDomainSeparator", + "type": "bytes32" + }, + { + "internalType": "string[]", + "name": "contentNames", + "type": "string[]" + } + ], + "internalType": "struct ERC7739Context[]", + "name": "allowedERC7739Content", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "erc1271Policies", + "type": "tuple[]" + } + ], + "internalType": "struct ERC7739Data", + "name": "erc7739Policies", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bytes4", + "name": "actionTargetSelector", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "actionTarget", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "actionPolicies", + "type": "tuple[]" + } + ], + "internalType": "struct ActionData[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "bool", + "name": "permitERC4337Paymaster", + "type": "bool" + } + ], + "internalType": "struct Session", + "name": "data", + "type": "tuple" + }, + { + "internalType": "enum SmartSessionMode", + "name": "mode", + "type": "uint8" + } + ], + "name": "getSessionDigest", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + } + ], + "name": "getSessionValidatorAndConfig", + "outputs": [ + { + "internalType": "address", + "name": "sessionValidator", + "type": "address" + }, + { + "internalType": "bytes", + "name": "sessionValidatorData", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + } + ], + "name": "getUserOpPolicies", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "ActionId", + "name": "actionId", + "type": "bytes32" + } + ], + "name": "isActionIdEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "ActionId", + "name": "actionId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "policy", + "type": "address" + } + ], + "name": "isActionPolicyEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "policy", + "type": "address" + } + ], + "name": "isERC1271PolicyEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "appDomainSeparator", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "content", + "type": "string" + } + ], + "name": "isERC7739ContentEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "isISessionValidatorSet", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "smartAccount", + "type": "address" + } + ], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "typeID", + "type": "uint256" + } + ], + "name": "isModuleType", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "isPermissionEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "policy", + "type": "address" + } + ], + "name": "isUserOpPolicyEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignatureWithSender", + "outputs": [ + { + "internalType": "bytes4", + "name": "result", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onInstall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onUninstall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + } + ], + "name": "removeSession", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + } + ], + "name": "revokeEnableSignature", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "PermissionId", + "name": "permissionId", + "type": "bytes32" + }, + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "setPermit4337Paymaster", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "name": "userOp", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + } + ], + "name": "validateUserOp", + "outputs": [ + { + "internalType": "ValidationData", + "name": "vd", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/plan/agw/research/deployment-review-2026-10-06/abis/factory.json b/plan/agw/research/deployment-review-2026-10-06/abis/factory.json new file mode 100644 index 00000000..c2bf3eb7 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/abis/factory.json @@ -0,0 +1,1105 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "schedule", + "type": "uint48" + } + ], + "name": "AccessControlEnforcedDefaultAdminDelay", + "type": "error" + }, + { + "inputs": [], + "name": "AccessControlEnforcedDefaultAdminRules", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "defaultAdmin", + "type": "address" + } + ], + "name": "AccessControlInvalidDefaultAdmin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "CloneArgumentsTooLong", + "type": "error" + }, + { + "inputs": [], + "name": "Create2EmptyBytecode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ERC1967InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "ERC1967NonPayable", + "type": "error" + }, + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expected", + "type": "address" + }, + { + "internalType": "address", + "name": "actual", + "type": "address" + } + ], + "name": "ExecutorMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [], + "name": "FailedDeployment", + "type": "error" + }, + { + "inputs": [], + "name": "ImplementationNotSet", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint96", + "name": "expected", + "type": "uint96" + }, + { + "internalType": "uint96", + "name": "provided", + "type": "uint96" + } + ], + "name": "IndexMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "next", + "type": "uint256" + } + ], + "name": "IndexOutOfRange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expected", + "type": "address" + }, + { + "internalType": "address", + "name": "provided", + "type": "address" + } + ], + "name": "IntentWalletMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidOwnerSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "NotAWallet", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "deadline", + "type": "uint48" + } + ], + "name": "SignatureExpired", + "type": "error" + }, + { + "inputs": [], + "name": "UUPSUnauthorizedCallContext", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "slot", + "type": "bytes32" + } + ], + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "DefaultAdminDelayChangeCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "effectSchedule", + "type": "uint48" + } + ], + "name": "DefaultAdminDelayChangeScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "DefaultAdminTransferCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "acceptSchedule", + "type": "uint48" + } + ], + "name": "DefaultAdminTransferScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "wallet", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "label", + "type": "string" + } + ], + "name": "WalletDeployed", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OPERATOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADE_INTERFACE_VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "beginDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cancelDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + } + ], + "name": "changeDefaultAdminDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdminDelay", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdminDelayIncreaseWait", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "label", + "type": "string" + } + ], + "name": "deployWallet", + "outputs": [ + { + "internalType": "address", + "name": "wallet", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "wallet", + "type": "address" + }, + { + "internalType": "address", + "name": "executor", + "type": "address" + }, + { + "internalType": "uint96", + "name": "index", + "type": "uint96" + }, + { + "internalType": "bytes32", + "name": "sessionHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "execCalldataHash", + "type": "bytes32" + }, + { + "internalType": "uint192", + "name": "nonceKey", + "type": "uint192" + }, + { + "internalType": "uint64", + "name": "nonceSeq", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "grantNonce", + "type": "uint64" + }, + { + "internalType": "uint48", + "name": "deadline", + "type": "uint48" + }, + { + "internalType": "uint256", + "name": "signerChainId", + "type": "uint256" + } + ], + "internalType": "struct OwnerIntent", + "name": "intent", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "sig", + "type": "bytes" + }, + { + "internalType": "string", + "name": "label", + "type": "string" + } + ], + "name": "deployWalletWithSig", + "outputs": [ + { + "internalType": "address", + "name": "wallet", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "signerChainId", + "type": "uint256" + } + ], + "name": "domainSeparator", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "wallet", + "type": "address" + } + ], + "name": "indexOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "address", + "name": "walletImplementation_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "isWallet", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "wallet", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingDefaultAdmin", + "outputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + }, + { + "internalType": "uint48", + "name": "schedule", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingDefaultAdminDelay", + "outputs": [ + { + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "schedule", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "predictWallet", + "outputs": [ + { + "internalType": "address", + "name": "wallet", + "type": "address" + }, + { + "internalType": "bool", + "name": "deployed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rollbackDefaultAdminDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "walletCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "walletImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/plan/agw/research/deployment-review-2026-10-06/abis/policy.json b/plan/agw/research/deployment-review-2026-10-06/abis/policy.json new file mode 100644 index 00000000..c8f2f576 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/abis/policy.json @@ -0,0 +1,2157 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "AllowListOutOfRange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "outboundTxId", + "type": "bytes32" + } + ], + "name": "AlreadyCredited", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + } + ], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "i", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "j", + "type": "uint256" + } + ], + "name": "AmbiguousRule", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "AmountExceedsCap", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "AmountExceedsU64", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "actual", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "expected", + "type": "bytes32" + } + ], + "name": "ArgPinMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "AssetListOutOfRange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "AssetNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + } + ], + "name": "AssetSpentMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "name": "BatchSizeOutOfRange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expected", + "type": "address" + }, + { + "internalType": "address", + "name": "actual", + "type": "address" + } + ], + "name": "BeneficiaryMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "callsUsed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "maxCalls", + "type": "uint32" + } + ], + "name": "CallLimitReached", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "CallNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "CalldataTooShort", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actualLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "CalldataTooShortForAmount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actualLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "CalldataTooShortForPin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotUEModule", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "accountIndex", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "account", + "type": "bytes32" + } + ], + "name": "CeaAccountAtUnpinnedIndex", + "type": "error" + }, + { + "inputs": [], + "name": "CeaAccountsMissExpectedCEA", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "declared", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "assetChain", + "type": "bytes32" + } + ], + "name": "ChainMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "rule", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "len", + "type": "uint8" + } + ], + "name": "DiscriminatorLenOutOfRange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "DuplicateAsset", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "first", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "second", + "type": "uint256" + } + ], + "name": "DuplicateSvmPin", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyChain", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "ForbiddenInnerTarget", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "rule", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "program", + "type": "bytes32" + } + ], + "name": "ForbiddenProgramInAllowList", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "program", + "type": "bytes32" + } + ], + "name": "ForbiddenTargetProgram", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxValue", + "type": "uint256" + } + ], + "name": "InnerValueExceedsAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "InvalidAsset", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "InvalidCeaAccount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidConfigField", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "validUntil", + "type": "uint48" + } + ], + "name": "InvalidExpiry", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expected", + "type": "address" + }, + { + "internalType": "address", + "name": "actual", + "type": "address" + } + ], + "name": "InvalidRevertRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "InvalidSelector", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidSvmConfigField", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "InvalidTarget", + "type": "error" + }, + { + "inputs": [], + "name": "MalformedInnerCalldata", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "MalformedOutboundRequest", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "code", + "type": "uint8" + } + ], + "name": "MalformedSvmPayload", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "NativeAmountExceedsCap", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "NativeTargetIsGateway", + "type": "error" + }, + { + "inputs": [], + "name": "NativeTargetZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "PCValueExceedsCap", + "type": "error" + }, + { + "inputs": [], + "name": "PayloadNotMulticall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "multiplexer", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "PolicyNotInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ProgramListOutOfRange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "program", + "type": "bytes32" + }, + { + "internalType": "bytes8", + "name": "discriminator", + "type": "bytes8" + } + ], + "name": "ProgramNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "RecipientMustBeEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "RecipientNotPubkey", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "target", + "type": "bytes32" + } + ], + "name": "RecipientTargetMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "rule", + "type": "uint256" + } + ], + "name": "RuleWithoutPin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "validUntil", + "type": "uint48" + } + ], + "name": "RulesExpired", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "actual", + "type": "bytes4" + }, + { + "internalType": "bytes4", + "name": "expected", + "type": "bytes4" + } + ], + "name": "SelectorMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + } + ], + "name": "SpentLengthMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + } + ], + "name": "SpentMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "pin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "needed", + "type": "uint8" + } + ], + "name": "SvmAccountCountBelowPin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "expected", + "type": "uint8" + } + ], + "name": "SvmAccountCountMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "pin", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "accountIndex", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expected", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "actual", + "type": "bytes32" + } + ], + "name": "SvmAccountPinMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "name": "SvmAccountsOutOfRange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "pin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ceiling", + "type": "uint256" + } + ], + "name": "SvmDataCeilingExceeded", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "pin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "floor", + "type": "uint256" + } + ], + "name": "SvmDataFloorNotMet", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "pin", + "type": "uint256" + } + ], + "name": "SvmDataPinInvalid", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "pin", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "expected", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "actual", + "type": "bytes32" + } + ], + "name": "SvmDataPinMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "pin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "b", + "type": "uint256" + }, + { + "internalType": "uint64", + "name": "num", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "den", + "type": "uint64" + } + ], + "name": "SvmDataRatioNotMet", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "pin", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ixLen", + "type": "uint256" + } + ], + "name": "SvmDataTooShortForPin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "instructionId", + "type": "uint8" + } + ], + "name": "SvmInstructionNotExecute", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "SvmIxDataTooLong", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "rule", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "maxAccounts", + "type": "uint8" + } + ], + "name": "SvmMaxAccountsOutOfRange", + "type": "error" + }, + { + "inputs": [], + "name": "SvmPayloadEmpty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "pin", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "accountIndex", + "type": "uint8" + } + ], + "name": "SvmPinIndexOutOfRange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "pin", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "rule", + "type": "uint8" + } + ], + "name": "SvmPinRuleOutOfRange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "actual", + "type": "address" + }, + { + "internalType": "address", + "name": "expected", + "type": "address" + } + ], + "name": "TargetMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "name": "TooManyCeaAccounts", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "name": "TooManyPins", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "name": "TooManySvmDataPins", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "name": "TooManySvmPins", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newSpent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "TotalNativeAmountExceeded", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "wouldBeTotal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "TotalSpendCapExceeded", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newSpent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "TotalValueExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "UncappedGasSwapRejected", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "version", + "type": "uint256" + } + ], + "name": "UnsupportedEnvelopeVersion", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "chainHash", + "type": "bytes32" + } + ], + "name": "UnsupportedNamespace", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "ValueExceedsCap", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ValueOnlyCalldataNotEmpty", + "type": "error" + }, + { + "inputs": [], + "name": "ValueOnlyWithAmountRule", + "type": "error" + }, + { + "inputs": [], + "name": "ValueOnlyWithPins", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "enum RulesType", + "name": "actual", + "type": "uint8" + } + ], + "name": "WrongModeForCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "enum VmFamily", + "name": "actual", + "type": "uint8" + } + ], + "name": "WrongVmForCall", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "multiplexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "NativeCallMetered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "multiplexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "OutboundMetered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "multiplexer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "PolicySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "outboundTxId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountApplied", + "type": "uint256" + } + ], + "name": "RevertCredited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "multiplexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "enum RulesType", + "name": "mode", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "enum VmFamily", + "name": "vm", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "chainHash", + "type": "bytes32" + } + ], + "name": "RulesConfigured", + "type": "event" + }, + { + "inputs": [], + "name": "SEND_OUTBOUND_SELECTOR", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SESSION_ENGINE", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNIVERSAL_EXECUTOR_MODULE", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNIVERSAL_GATEWAY_PC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "expectedValueSpent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmountSpent", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "expectedCalls", + "type": "uint32" + } + ], + "name": "assertSpent", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "expectedSpent", + "type": "uint256[]" + } + ], + "name": "assertSpent", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "checkAction", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "outboundTxId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "creditRevert", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getConfig", + "outputs": [ + { + "components": [ + { + "internalType": "bool", + "name": "initialized", + "type": "bool" + }, + { + "internalType": "uint48", + "name": "validUntil", + "type": "uint48" + }, + { + "internalType": "address", + "name": "expectedCEA", + "type": "address" + }, + { + "internalType": "uint256", + "name": "maxGasPerCall", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "maxPerCall", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTotal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "spent", + "type": "uint256" + } + ], + "internalType": "struct AssetCapState[]", + "name": "assets", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "internalType": "uint16", + "name": "beneficiaryOffset", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "hasBeneficiary", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "maxValue", + "type": "uint256" + } + ], + "internalType": "struct AllowedCall[]", + "name": "allowedCalls", + "type": "tuple[]" + } + ], + "internalType": "struct Config", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getMode", + "outputs": [ + { + "components": [ + { + "internalType": "bool", + "name": "initialized", + "type": "bool" + }, + { + "internalType": "enum RulesType", + "name": "mode", + "type": "uint8" + }, + { + "internalType": "enum VmFamily", + "name": "vm", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "chainHash", + "type": "bytes32" + } + ], + "internalType": "struct ModeSlot", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getNativeConfig", + "outputs": [ + { + "components": [ + { + "internalType": "bool", + "name": "initialized", + "type": "bool" + }, + { + "internalType": "uint48", + "name": "validUntil", + "type": "uint48" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "internalType": "uint256", + "name": "maxValuePerCall", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxValueTotal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valueSpent", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "offset", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "maxPerCall", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTotal", + "type": "uint256" + } + ], + "internalType": "struct AmountRule", + "name": "amount", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "amountSpent", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxCalls", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "callsUsed", + "type": "uint32" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "offset", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "expected", + "type": "bytes32" + } + ], + "internalType": "struct ArgPin[]", + "name": "pins", + "type": "tuple[]" + } + ], + "internalType": "struct NativeConfig", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "ConfigId", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getSvmConfig", + "outputs": [ + { + "components": [ + { + "internalType": "bool", + "name": "initialized", + "type": "bool" + }, + { + "internalType": "uint48", + "name": "validUntil", + "type": "uint48" + }, + { + "internalType": "bytes32", + "name": "expectedCEA", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "gatewayProgram", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "maxGasPerCall", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "maxPerCall", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTotal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "spent", + "type": "uint256" + } + ], + "internalType": "struct AssetCapState[]", + "name": "assets", + "type": "tuple[]" + }, + { + "internalType": "bytes32[]", + "name": "ceaAccounts", + "type": "bytes32[]" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "program", + "type": "bytes32" + }, + { + "internalType": "bytes8", + "name": "discriminator", + "type": "bytes8" + }, + { + "internalType": "uint8", + "name": "discriminatorLen", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "dataless", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "maxAccounts", + "type": "uint8" + } + ], + "internalType": "struct AllowedProgram[]", + "name": "programs", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "ruleIndex", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "accountIndex", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expected", + "type": "bytes32" + } + ], + "internalType": "struct SvmAccountPin[]", + "name": "pins", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "ruleIndex", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "fromEnd", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "offset", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "offsetB", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "len", + "type": "uint8" + }, + { + "internalType": "enum SvmDataPinMode", + "name": "mode", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expected", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "num", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "den", + "type": "uint64" + } + ], + "internalType": "struct SvmDataPin[]", + "name": "dataPins", + "type": "tuple[]" + } + ], + "internalType": "struct SvmConfig", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "universalGatewayPC", + "type": "address" + }, + { + "internalType": "address", + "name": "universalExecutorModule", + "type": "address" + }, + { + "internalType": "address", + "name": "sessionEngine", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "ConfigId", + "name": "configId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "name": "initializeWithMultiplexer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "outboundTxId", + "type": "bytes32" + } + ], + "name": "isCredited", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pushChainHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "iid", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + } +] diff --git a/plan/agw/research/deployment-review-2026-10-06/abis/validator.json b/plan/agw/research/deployment-review-2026-10-06/abis/validator.json new file mode 100644 index 00000000..d043841a --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/abis/validator.json @@ -0,0 +1,141 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "smartAccount", + "type": "address" + } + ], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "MalformedConfig", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "smartAccount", + "type": "address" + } + ], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "isModuleType", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onInstall", + "outputs": [], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onUninstall", + "outputs": [], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "validateConfig", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sig", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "validateSignatureWithData", + "outputs": [ + { + "internalType": "bool", + "name": "validSig", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + } +] diff --git a/plan/agw/research/deployment-review-2026-10-06/abis/wallet.json b/plan/agw/research/deployment-review-2026-10-06/abis/wallet.json new file mode 100644 index 00000000..4f12c4b4 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/abis/wallet.json @@ -0,0 +1,1550 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "sessionEngine_", + "type": "address" + }, + { + "internalType": "address", + "name": "rulesPolicy_", + "type": "address" + }, + { + "internalType": "address", + "name": "sessionValidator_", + "type": "address" + }, + { + "internalType": "address", + "name": "universalGatewayPC_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "rulesId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "CallerIsNotAgent", + "type": "error" + }, + { + "inputs": [], + "name": "CallerIsNotFactory", + "type": "error" + }, + { + "inputs": [], + "name": "CallerIsNotOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "DuplicateAction", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyChain", + "type": "error" + }, + { + "inputs": [], + "name": "EngineStillHoldsPermissions", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expected", + "type": "address" + }, + { + "internalType": "address", + "name": "actual", + "type": "address" + } + ], + "name": "ExecutorMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "ForbiddenActionSelector", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "ForbiddenActionTarget", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "ForbiddenDispatchTarget", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actionIndex", + "type": "uint256" + } + ], + "name": "InconsistentChain", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "actualCalldataHash", + "type": "bytes32" + } + ], + "name": "IntentExecMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "expected", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "provided", + "type": "uint64" + } + ], + "name": "IntentGrantNonceMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "actual", + "type": "bytes32" + } + ], + "name": "IntentSessionMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expected", + "type": "address" + }, + { + "internalType": "address", + "name": "provided", + "type": "address" + } + ], + "name": "IntentWalletMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidModuleAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint192", + "name": "nonceKey", + "type": "uint192" + }, + { + "internalType": "uint64", + "name": "expected", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "provided", + "type": "uint64" + } + ], + "name": "InvalidNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidOwnerSignature", + "type": "error" + }, + { + "inputs": [], + "name": "MalformedBatchCalldata", + "type": "error" + }, + { + "inputs": [], + "name": "MalformedSessionShape", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ModuleAlreadyInstalled", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "validAfter", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "validUntil", + "type": "uint48" + } + ], + "name": "OutsideTimeWindow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint192", + "name": "nonceKey", + "type": "uint192" + } + ], + "name": "OwnerLaneRequired", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "deadline", + "type": "uint48" + } + ], + "name": "OwnerSigExpired", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "enum RulesType", + "name": "derived", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "actionIndex", + "type": "uint256" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "RulesTypeMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "name": "TooManyActions", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "rulesId", + "type": "bytes32" + } + ], + "name": "UnknownPermission", + "type": "error" + }, + { + "inputs": [], + "name": "UnsupportedExecutionMode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "UnsupportedModuleType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "authorizer", + "type": "address" + } + ], + "name": "ValidationFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "ValidatorNotInstalled", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "engine", + "type": "address" + } + ], + "name": "AccountInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "seq", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "enum CheckpointKind", + "name": "kind", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "ref", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "blockNumber", + "type": "uint64" + } + ], + "name": "Checkpointed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ModuleInstalled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ModuleUninstalled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "executionCalldataHash", + "type": "bytes32" + } + ], + "name": "OwnerExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "executionCalldataHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint192", + "name": "nonceKey", + "type": "uint192" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "nonceSeq", + "type": "uint64" + } + ], + "name": "OwnerExecutedWithSig", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "rulesId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "agent", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "callsHash", + "type": "bytes32" + } + ], + "name": "RulesActionAuthorized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "rulesId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "enum RulesType", + "name": "mode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "chainHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "string", + "name": "chainNamespace", + "type": "string" + } + ], + "name": "RulesGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "rulesId", + "type": "bytes32" + } + ], + "name": "RulesRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "UninstallCallbackFailed", + "type": "event" + }, + { + "inputs": [], + "name": "RULES_POLICY", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SESSION_ENGINE", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SESSION_VALIDATOR", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNIVERSAL_GATEWAY_PC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accountId", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "rulesId", + "type": "bytes32" + } + ], + "name": "agentOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "checkpointCount", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "signerChainId", + "type": "uint256" + } + ], + "name": "domainSeparator", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "rulesId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + } + ], + "name": "executeAsAgent", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "wallet", + "type": "address" + }, + { + "internalType": "address", + "name": "executor", + "type": "address" + }, + { + "internalType": "uint96", + "name": "index", + "type": "uint96" + }, + { + "internalType": "bytes32", + "name": "sessionHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "execCalldataHash", + "type": "bytes32" + }, + { + "internalType": "uint192", + "name": "nonceKey", + "type": "uint192" + }, + { + "internalType": "uint64", + "name": "nonceSeq", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "grantNonce", + "type": "uint64" + }, + { + "internalType": "uint48", + "name": "deadline", + "type": "uint48" + }, + { + "internalType": "uint256", + "name": "signerChainId", + "type": "uint256" + } + ], + "internalType": "struct OwnerIntent", + "name": "intent", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "sig", + "type": "bytes" + } + ], + "name": "executeWithSig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint192", + "name": "nonceKey", + "type": "uint192" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "grantNonce", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "contract ISessionValidator", + "name": "sessionValidator", + "type": "address" + }, + { + "internalType": "bytes", + "name": "sessionValidatorInitData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "userOpPolicies", + "type": "tuple[]" + }, + { + "components": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "appDomainSeparator", + "type": "bytes32" + }, + { + "internalType": "string[]", + "name": "contentNames", + "type": "string[]" + } + ], + "internalType": "struct ERC7739Context[]", + "name": "allowedERC7739Content", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "erc1271Policies", + "type": "tuple[]" + } + ], + "internalType": "struct ERC7739Data", + "name": "erc7739Policies", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bytes4", + "name": "actionTargetSelector", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "actionTarget", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "actionPolicies", + "type": "tuple[]" + } + ], + "internalType": "struct ActionData[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "bool", + "name": "permitERC4337Paymaster", + "type": "bool" + } + ], + "internalType": "struct Session", + "name": "session", + "type": "tuple" + } + ], + "name": "grantRules", + "outputs": [ + { + "internalType": "bytes32", + "name": "rulesId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "contract ISessionValidator", + "name": "sessionValidator", + "type": "address" + }, + { + "internalType": "bytes", + "name": "sessionValidatorInitData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "userOpPolicies", + "type": "tuple[]" + }, + { + "components": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "appDomainSeparator", + "type": "bytes32" + }, + { + "internalType": "string[]", + "name": "contentNames", + "type": "string[]" + } + ], + "internalType": "struct ERC7739Context[]", + "name": "allowedERC7739Content", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "erc1271Policies", + "type": "tuple[]" + } + ], + "internalType": "struct ERC7739Data", + "name": "erc7739Policies", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bytes4", + "name": "actionTargetSelector", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "actionTarget", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "policy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "internalType": "struct PolicyData[]", + "name": "actionPolicies", + "type": "tuple[]" + } + ], + "internalType": "struct ActionData[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "bool", + "name": "permitERC4337Paymaster", + "type": "bool" + } + ], + "internalType": "struct Session", + "name": "session", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "wallet", + "type": "address" + }, + { + "internalType": "address", + "name": "executor", + "type": "address" + }, + { + "internalType": "uint96", + "name": "index", + "type": "uint96" + }, + { + "internalType": "bytes32", + "name": "sessionHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "execCalldataHash", + "type": "bytes32" + }, + { + "internalType": "uint192", + "name": "nonceKey", + "type": "uint192" + }, + { + "internalType": "uint64", + "name": "nonceSeq", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "grantNonce", + "type": "uint64" + }, + { + "internalType": "uint48", + "name": "deadline", + "type": "uint48" + }, + { + "internalType": "uint256", + "name": "signerChainId", + "type": "uint256" + } + ], + "internalType": "struct OwnerIntent", + "name": "intent", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "sig", + "type": "bytes" + } + ], + "name": "grantRulesWithSig", + "outputs": [ + { + "internalType": "bytes32", + "name": "rulesId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "name": "installModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "isModuleInstalled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "lastCheckpointBlock", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "revokeAllRules", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "rulesId", + "type": "bytes32" + } + ], + "name": "revokeRules", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + } + ], + "name": "supportsExecutionMode", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "supportsModule", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "deInitData", + "type": "bytes" + } + ], + "name": "uninstallModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] diff --git a/plan/agw/research/deployment-review-2026-10-06/donut-probe.json b/plan/agw/research/deployment-review-2026-10-06/donut-probe.json new file mode 100644 index 00000000..56a6e805 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/donut-probe.json @@ -0,0 +1,157 @@ +{ + "checked_at": "2026-10-05T18:33:27.508124+00:00", + "rpc": "https://evm.donut.rpc.push.org/", + "chain_id": 42101, + "block": 23931055, + "block_hash": "0x53bae3cfa28570dc06361ef91e33aa9a885e0d01284cf749d4fd5c018d72c83c", + "block_timestamp": 1791225195, + "code": { + "factory": { + "address": "0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF", + "bytes": 141, + "sha256": "c621e945a17be2361dfc247326991d732ede3e25c8ecd8b48ee2025c10ca17eb" + }, + "factoryLogic": { + "address": "0xe138Dc6EfC10233BE1e6c8aF1Caf8cABe599cfC2", + "bytes": 9992, + "sha256": "69cc6b0cfae87debb1da55ba152f0129a8f24e80a740199ab29277811b106ecf" + }, + "walletImplementation": { + "address": "0x96D69ec7e6cDdaD414e656B5c9DCA24587DF713c", + "bytes": 16564, + "sha256": "b26d74bdac5c936e25c694394be9b17bc350325d62ba103d262882b0605a0be1" + }, + "policy": { + "address": "0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af", + "bytes": 830, + "sha256": "039e9bca120a30980a0131552966575b30349654f23746f309fe98adfd2308ae" + }, + "policyImplementation": { + "address": "0xA2391eee4C9EA1B32AEB3A460B77296EA709F02F", + "bytes": 24326, + "sha256": "1694277b24a023615b3693730ea0581e7a6fc209f533e65416d5075ef927df76" + }, + "proxyAdmin": { + "address": "0x0b7a31ec85117892aEA90AA5cB6514e2F97c2295", + "bytes": 926, + "sha256": "3feda633be447e268d618b40cbfcd9dfe9346ebadec981f4f3efea0fbc07cd35" + }, + "validator": { + "address": "0x068EE2388475A98EE1f5a434C58bFF3444fffFe6", + "bytes": 806, + "sha256": "7a8e45814fd8a0a6c9b9e115d797da078718f9f6358fa576e1e218ffd93db59e" + }, + "engine": { + "address": "0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a", + "bytes": 22581, + "sha256": "c4b9fc7b045d9f33953079a91fcb7ae883dd858d9cde827a9cc3df6043bc2d0b" + }, + "gateway": { + "address": "0x00000000000000000000000000000000000000C1", + "bytes": 1551, + "sha256": "3e78a5778be1383f2612556becde8019c22388d7157574c90fb40e1060d450ca" + }, + "core": { + "address": "0x00000000000000000000000000000000000000C0", + "bytes": 1551, + "sha256": "2036ba987ed029f1bc576d020ba11582934583c7eaaa7c00aefc2e0d53053486" + }, + "executor": { + "address": "0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7", + "bytes": 0, + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + }, + "slots": { + "factory": { + "implementation": "0x000000000000000000000000e138dc6efc10233be1e6c8af1caf8cabe599cfc2" + }, + "policy": { + "implementation": "0x000000000000000000000000a2391eee4c9ea1b32aeb3a460b77296ea709f02f", + "admin": "0x0000000000000000000000000b7a31ec85117892aea90aa5cb6514e2f97c2295" + }, + "gateway": { + "implementation": "0x0000000000000000000000001e412939780f2b834dc42c7ac58d9f99888da659" + } + }, + "reads": [ + { + "contract": "factory", + "signature": "walletImplementation()(address)", + "exit_code": 0, + "output": "0x96D69ec7e6cDdaD414e656B5c9DCA24587DF713c", + "error": "" + }, + { + "contract": "factory", + "signature": "paused()(bool)", + "exit_code": 0, + "output": "false", + "error": "" + }, + { + "contract": "policy", + "signature": "version()(string)", + "exit_code": 0, + "output": "\"3.1.0\"", + "error": "" + }, + { + "contract": "policy", + "signature": "pushChainHash()(bytes32)", + "exit_code": 0, + "output": "0x3d6bc1f1d3fb03065860265a8e93840b586e57075d956cd41b4319d040be87f9", + "error": "" + }, + { + "contract": "policy", + "signature": "UNIVERSAL_GATEWAY_PC()(address)", + "exit_code": 0, + "output": "0x00000000000000000000000000000000000000C1", + "error": "" + }, + { + "contract": "policy", + "signature": "UNIVERSAL_EXECUTOR_MODULE()(address)", + "exit_code": 0, + "output": "0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7", + "error": "" + }, + { + "contract": "walletImplementation", + "signature": "accountId()(string)", + "exit_code": 0, + "output": "\"push.agw.1.0.0\"", + "error": "" + }, + { + "contract": "walletImplementation", + "signature": "SESSION_ENGINE()(address)", + "exit_code": 0, + "output": "0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a", + "error": "" + }, + { + "contract": "walletImplementation", + "signature": "RULES_POLICY()(address)", + "exit_code": 0, + "output": "0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af", + "error": "" + }, + { + "contract": "walletImplementation", + "signature": "SESSION_VALIDATOR()(address)", + "exit_code": 0, + "output": "0x068EE2388475A98EE1f5a434C58bFF3444fffFe6", + "error": "" + }, + { + "contract": "walletImplementation", + "signature": "UNIVERSAL_GATEWAY_PC()(address)", + "exit_code": 0, + "output": "0x00000000000000000000000000000000000000C1", + "error": "" + } + ], + "limits": "Code sizes, proxy slots and selected views only; no complete bytecode/source equivalence or transaction execution proof." +} diff --git a/plan/agw/research/deployment-review-2026-10-06/explorer-artifacts.json b/plan/agw/research/deployment-review-2026-10-06/explorer-artifacts.json new file mode 100644 index 00000000..966c64bb --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/explorer-artifacts.json @@ -0,0 +1,70 @@ +{ + "retrieved_at": "2026-10-05T18:34:24.706088+00:00", + "contracts": [ + { + "contract": "factory", + "address": "0xe138Dc6EfC10233BE1e6c8aF1Caf8cABe599cfC2", + "url": "https://donut.push.network/api/v2/smart-contracts/0xe138Dc6EfC10233BE1e6c8aF1Caf8cABe599cfC2", + "abi_entries": 78, + "name": "AGWFactory", + "is_verified": true, + "compiler_version": "v0.8.26+commit.8a97fa7a", + "optimization_enabled": true, + "optimization_runs": 833, + "evm_version": "cancun", + "verified_at": "2026-10-05T13:39:06.864566Z" + }, + { + "contract": "wallet", + "address": "0x96D69ec7e6cDdaD414e656B5c9DCA24587DF713c", + "url": "https://donut.push.network/api/v2/smart-contracts/0x96D69ec7e6cDdaD414e656B5c9DCA24587DF713c", + "abi_entries": 76, + "name": "AGW", + "is_verified": true, + "compiler_version": "v0.8.26+commit.8a97fa7a", + "optimization_enabled": true, + "optimization_runs": 833, + "evm_version": "cancun", + "verified_at": "2026-10-05T13:38:54.015751Z" + }, + { + "contract": "policy", + "address": "0xA2391eee4C9EA1B32AEB3A460B77296EA709F02F", + "url": "https://donut.push.network/api/v2/smart-contracts/0xA2391eee4C9EA1B32AEB3A460B77296EA709F02F", + "abi_entries": 118, + "name": "UniversalRulesPolicy", + "is_verified": true, + "compiler_version": "v0.8.26+commit.8a97fa7a", + "optimization_enabled": true, + "optimization_runs": 833, + "evm_version": "cancun", + "verified_at": "2026-10-05T13:37:25.346522Z" + }, + { + "contract": "validator", + "address": "0x068EE2388475A98EE1f5a434C58bFF3444fffFe6", + "url": "https://donut.push.network/api/v2/smart-contracts/0x068EE2388475A98EE1f5a434C58bFF3444fffFe6", + "abi_entries": 9, + "name": "AgentValidator", + "is_verified": true, + "compiler_version": "v0.8.26+commit.8a97fa7a", + "optimization_enabled": true, + "optimization_runs": 833, + "evm_version": "cancun", + "verified_at": "2026-10-05T13:36:34.683015Z" + }, + { + "contract": "engine", + "address": "0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a", + "url": "https://donut.push.network/api/v2/smart-contracts/0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a", + "abi_entries": 78, + "name": "SmartSession", + "is_verified": true, + "compiler_version": "v0.8.26+commit.8a97fa7a", + "optimization_enabled": true, + "optimization_runs": 833, + "evm_version": "cancun", + "verified_at": "2026-10-05T13:36:21.112501Z" + } + ] +} diff --git a/plan/agw/research/deployment-review-2026-10-06/previous-current-baseline.md b/plan/agw/research/deployment-review-2026-10-06/previous-current-baseline.md new file mode 100644 index 00000000..524ab54e --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/previous-current-baseline.md @@ -0,0 +1,88 @@ +> Historical baseline saved before the October 6 v4 review. Do not use its earlier deployment/artifact absence as current status. Relative links now resolve from this archive location. + +# Current validated AGW baseline + +> October 4 update: [Harsh’s replies](../../product-decisions-2026-10-04.md) supersede earlier provisional approval/default/helper/history/compiler recommendations below. Use [remaining dependencies](../../external-blockers.md) for current blockers. The clear scope changes and sender-preserving native batching are now implemented; H3 defaults remain unchanged pending clarification. See [alignment evidence](../../research/product-alignment-2026-10-04/README.md). + +Updated October 3, 2026 after reviewing checkpoint commit 6b7dbf4 and current head e704d5b. This page supersedes earlier recommendations; consequential corrections are retained in the [review summary](../../review-summary.md). The SDK Notion page remains the target API; conflicts below are recorded for resolution, not silently resolved in favor of code. + +## Pinned sources + +| Repository | Current inspected branch and commit | +| --- | --- | +| AGW | `pushAgenticWallet_v3@e704d5b58fd1d30ce02bc0ad74dccfbdb37804f9` | +| Core | `universalMarketplace_v1@cb69e0ba101bef1bb4440e54b2c45396be3e92ce` | +| Gateway | Eight-field `pc20-3rd-iteration@bcbf7df42e8e6dd11088a43bcc0b056a54ea0a18`; six-field older `main@d02070d` | +| SDK | `167fdc6243ecfe5d97735a6124662c7d2084d126` | +| Notion | October 03, 2026 at 13:23 IST full export; page 1 and page 5 changed, 10 pages unchanged | + +AGW remote branches were checked through GitHub API on October 3: nomenclature-changes was deleted after merging and pushAgenticWallet_v3 points to e704d5b. Core remains pinned at cb69e0b from the existing evidence; no fresh core fetch was performed in this pass. The head adapter keeps the SmartSession source unchanged. It replaces cryptographic session-key validation with a sender-checking adapter. The wallet binds the sender before calling the engine and constructs `USE || rulesId || msg.sender` itself. Engine account binding and disabled alternate paths are essential invariants. **No engine fork is recommended.** + +## Compatibility status + +| Surface | Current status | Remaining work | +| --- | --- | --- | +| `executeAsAgent`, `agentOf`, authorization event | Implemented in AGW source | Verify selected new deployment and preserve adapter invariants; G02 source dependency satisfied | +| Agent config | Exact `abi.encode(address agent)` | SDK codec and generation-specific validator context | +| Rule ID | `keccak256(abi.encode(validator, abi.encode(agent), bytes32(grantNonce)))` | Page 5 helper signature/constants need alignment. Chain is not hashed; key records by wallet plus rule ID | +| Owner batching | Documented design; local tests support atomic replacement | SDK implementation and final-generation regression tests; no need to ask whether batching is intended | +| Agent arrays | Wallet dispatch remains single/default. EVM destination multicall supports 1–10 calls | Define native arrays separately; supporting multiple native actions in a rule is a public type choice, not the same as atomic multi-call dispatch | +| Duplicate agent-chain rules | Accepted by contract with independent IDs/budgets | SDK preflight rejection and explicit ambiguity error are proposed; hard on-chain uniqueness is not assumed necessary | +| Checkpoints | Implemented in source at 6b7dbf4, included in e704d5b; count and last-block views plus Checkpointed event | Compare snapshot counts, account for per-call and lifecycle ticks, and verify selected new deployment | +| Grant job ref, labels, envelope version | Still absent | Agree next-generation surface and spec consequences | +| Historical rules | Revoke removes agent config and enabled actions, while URP terms persist | Event agent attribution or nested-call reconstruction needed if revoked rules are returned | +| expectedCEA | Required universal wire term, derived from AGW plus destination context and committed at grant | SDK must derive it, show it in previews, include it in encodeRules context, and monitor derivation drift | +| Binder | Never present in reviewed code; live Notion page checked October 3 says dropped for v1 | No binder/setBinder implementation required unless a new explicit product decision reverses this | +| Funding approval | Push gateway requires allowance for PRC20 pulls | Existing owner execute mechanism validated in four local fixture tests; implement setup/replenishment and verify production pull/burn/settlement | +| Destination approvals | Page 5 example permits an unpinned spender; current marketplace rejects approve/increaseAllowance | Product policy and owner-controlled approvals; selector filtering alone is not a general guarantee against malicious/custom approval methods | +| Gateway shape | Eight fields in current branch and observed live dispatcher; main's six fields are older | Ask only whether a future removal is actually planned | +| Agent outbound composer | Existing Route 2 request cannot be used unchanged | Empty recipient, AGW revert recipient, nonzero maxPCForGas, policy-compatible multicall and AGW PC accounting | +| Outbound tracking | Existing tracker uses tx hash/events/UTX ID | Reuse provisionally; verify live wrapped outbound. Response `from` and progress route integration still need adaptation | +| Marketplace expiry | Core terms require exact equality with job expiry | Reconcile Notion's <= and >= statements; equality applies to this marketplace compile path, not every standalone AGW rule | +| SVM destination | Source and policy tests available | Typed SDK representation, obligations 19–23, deployment capability; do not claim an agreed deferral | +| Generation detection | Wallet clones immutable; factory implementation frozen by intended design | New generation/address context, supported factory registry, version identification and migration disclosures | + +## Chain observations + +Historical read-only probes on October 2 at Donut block **23818643** confirmed the documented factory still points to `0xD7FEF338572f96edBeF89E720f1F0fF1284ec79C`, that implementation reports `push.agentwallet.1.0.0`, and the documented URP reports `1.0.0`. Gateway implementation `0x1e412939780f2b834dc42c7ac58d9f99888da659` contains the eight-field PUSH4 selector and not the six-field selector. See [probe](../../research/donut-probe-2026-10-02.json). + +These observations validate the named historical deployment, not a global claim that nobody has deployed head elsewhere. No matching new-generation deployment manifest is available. A PUSH4 scan supports dispatch identification but is not complete ABI verification. + +## SDK-owned decisions + +Implement existing namespace structure, signer reuse, receipt identity adaptation, typed failure metadata, Web2 compatibility, generation guards and internal read reconstruction in the SDK. Document the chosen list/read-only/reinitialize behavior in an SDK decision record. Product consultation is needed only when that choice changes an explicit public promise or introduces a new public parameter. + +Do not silently change per-send lookup to filter expired rules: page 5 says lookup selects enabled agent/chain rules and leaves policy checks on-chain. Any expiry precheck is a behavior change to document. A JSON-RPC batch is not necessarily one logical read: IDs must be enumerated before their agent/config reads can be constructed. Avoid promising a single round trip without an index or contract view. + +Retries for stale spend must be bounded and must not repeat wallet signatures without user-visible control. Revoking first is an available alternative with different atomicity and permission-interruption semantics, not a transparent retry. + +## Next live acceptance test + +After a compatible deployment and authorized test funding are available, send a positive-amount EVM agent outbound with owner-established gateway allowance, empty recipient, AGW refund recipient and a policy-compliant multicall. Verify real burn, node/TSS handling, destination execution, receipt identity and unchanged hash-based tracking. No such transaction has been broadcast by this review. + +## Checkpoint revision and current source freshness + +The no-persistent-storage invariant was deliberately revised: owner execution may touch the single packed checkpoint slot, while remaining independent of engine/policy health. `check-execute` now pins the B2 checkpoint revision. A grant starts one tick; every owner call ticks before dispatch; each revoked ID ticks once; successful grants tick once. `executeWithSig` has the same per-call behavior. Failed transactions unwind the ticks; agent execution does not tick. + +For assert/revoke/grant inside one owner batch, the delta is five: OWNER_ACTION(assert), OWNER_ACTION(revoke), RULES_REVOKED, OWNER_ACTION(grant), RULES_GRANTED. Checkpoint ref is a call hash or rulesId; it is not the missing job/card ref parameter on grant. + +The new accepted limit 34 states that pre-existing allowances can be pulled without a wallet call/checkpoint. Checkpoints detect owner-door activity, not every possible balance change. The evaluator must define how allowance-driven changes affect its verdict. A baseline count and correct funding-call ordering are required; a sinceBlock filter alone cannot detect all same-block changes. + +Fresh Notion page 1 was inspected on October 3 and still says binder was dropped for v1. The complete export succeeded. All 12 saved page bodies now reflect the October 3 export. Pages 1 and 5 changed; see the refresh report. Binder is recorded as dropped in the source index and review summary. + +## Latest SDK target after successful refresh + +Page 5 is still authoritative: create deploys/grants only, funding is separate, UniversalRule uses assets[] and maxGasPerCall, and AGENTIC-TX-103 is removed. New page 1 section 4c proposes per-token accounting and 0–8 assets. The tested e704d5b ABI does not implement that new wire format; retain its single-asset fixtures as historical baseline, not the future codec. + +Define per-asset Spent and replacement assertion semantics, empty-asset routing, destination-token/native-marker resolution and the proposed bytes32 expectedCEA encoding. The prior universal defaults/maxAmountTotal naming cannot simply carry forward. Proposed AssetCap.maxTotal zero means unlimited; native defaults remain a separate question. + +See [successful refresh report](../../research/notion-refresh-2026-10-03.md). All earlier download failures remain historical evidence; download permission was sufficient for this run. + +The follow-up [external blocker register](../../external-blockers.md) records what still needs team input after SDK-owned closure. Remote refs were rechecked unchanged; the Notion snapshot date above is unchanged. + + +## Deployment coordination October 5 + +Shoaib supplied the fixed deployment-address table and will receive Zaryab’s completion notice. The table exactly matches the [saved AGW address book](../../notion/agw-address-book-donut-2026-09-04.md): factory proxy `0xF1A131571f89fD06890576e6cD0154114ACBBc8b`, wallet implementation `0x959ED7f6943bdd56B3a359BAE0115fef4aa07e17`, UCEP `0x79F07D379BdC26468E48025a61bC955909522c1D`, PushSessionValidator `0x5A59a5Ac94d5190553821307F98e4673BF3c4a1D`, and engine `0x7540f9a59693d51CFB4A3727141eAE4836F96749`. Remaining dependencies/admin addresses are preserved in that source snapshot. + +The deployment question is removed from the team handoff. These are known address inputs, not a newly verified target-generation manifest: the table uses the earlier PushAgentWallet/UCEP/PushSessionValidator naming and sizes. Once Zaryab reports completion, verify factory wiring, deployed wallet/policy ABI, source revision and event start blocks against the intended release. No RPC probe or SDK registry change occurred in this documentation pass. diff --git a/plan/agw/research/deployment-review-2026-10-06/probe.py b/plan/agw/research/deployment-review-2026-10-06/probe.py new file mode 100644 index 00000000..7068561d --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/probe.py @@ -0,0 +1,76 @@ +"""Read-only v4 Donut probe. No signing, funding or transaction submission.""" +import concurrent.futures +import datetime +import hashlib +import json +from pathlib import Path +import subprocess +import urllib.request + +RPC = 'https://evm.donut.rpc.push.org/' +OUT = Path(__file__).parent / 'donut-probe.json' +ADDRESSES = { + 'factory': '0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF', + 'factoryLogic': '0xe138Dc6EfC10233BE1e6c8aF1Caf8cABe599cfC2', + 'walletImplementation': '0x96D69ec7e6cDdaD414e656B5c9DCA24587DF713c', + 'policy': '0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af', + 'policyImplementation': '0xA2391eee4C9EA1B32AEB3A460B77296EA709F02F', + 'proxyAdmin': '0x0b7a31ec85117892aEA90AA5cB6514e2F97c2295', + 'validator': '0x068EE2388475A98EE1f5a434C58bFF3444fffFe6', + 'engine': '0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a', + 'gateway': '0x00000000000000000000000000000000000000C1', + 'core': '0x00000000000000000000000000000000000000C0', + 'executor': '0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7', +} + +def rpc(method, params): + data = json.dumps({'jsonrpc': '2.0', 'id': 1, 'method': method, 'params': params}).encode() + req = urllib.request.Request(RPC, data=data, headers={'Content-Type': 'application/json'}) + with urllib.request.urlopen(req, timeout=45) as response: + value = json.load(response) + if 'error' in value: + raise RuntimeError(value['error']) + return value['result'] + +chain = int(rpc('eth_chainId', []), 16) +assert chain == 42101, chain +block = rpc('eth_blockNumber', []) +header = rpc('eth_getBlockByNumber', [block, False]) + +def code(entry): + name, address = entry + raw = rpc('eth_getCode', [address, block]) + value = bytes.fromhex(raw[2:]) + return name, {'address': address, 'bytes': len(value), 'sha256': hashlib.sha256(value).hexdigest()} + +impl_slot = '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc' +admin_slot = '0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103' +slots = {} +for name in ['factory', 'policy', 'gateway']: + slots[name] = {'implementation': rpc('eth_getStorageAt', [ADDRESSES[name], impl_slot, block])} +slots['policy']['admin'] = rpc('eth_getStorageAt', [ADDRESSES['policy'], admin_slot, block]) + +calls = [('factory', 'walletImplementation()(address)'), ('factory', 'paused()(bool)'), + ('policy', 'version()(string)'), ('policy', 'pushChainHash()(bytes32)'), + ('policy', 'UNIVERSAL_GATEWAY_PC()(address)'), ('policy', 'UNIVERSAL_EXECUTOR_MODULE()(address)'), + ('walletImplementation', 'accountId()(string)')] +calls.extend(('walletImplementation', f'{name}()(address)') for name in + ['SESSION_ENGINE', 'RULES_POLICY', 'SESSION_VALIDATOR', 'UNIVERSAL_GATEWAY_PC']) + +def call(entry): + name, signature = entry + result = subprocess.run(['cast', 'call', ADDRESSES[name], signature, '--rpc-url', RPC, + '--block', str(int(block, 16))], capture_output=True, text=True, timeout=60) + return {'contract': name, 'signature': signature, 'exit_code': result.returncode, + 'output': result.stdout.strip(), 'error': result.stderr.strip()} + +with concurrent.futures.ThreadPoolExecutor(max_workers=4) as pool: + codes = dict(pool.map(code, ADDRESSES.items())) + reads = list(pool.map(call, calls)) +result = {'checked_at': datetime.datetime.now(datetime.timezone.utc).isoformat(), 'rpc': RPC, + 'chain_id': chain, 'block': int(block, 16), 'block_hash': header['hash'], + 'block_timestamp': int(header['timestamp'], 16), 'code': codes, 'slots': slots, 'reads': reads, + 'limits': 'Code sizes, proxy slots and selected views only; no complete bytecode/source equivalence or transaction execution proof.'} +OUT.write_text(json.dumps(result, indent=2) + '\n') +print(json.dumps({'chain': chain, 'block': result['block'], 'code_sizes': {k: v['bytes'] for k, v in codes.items()}, + 'reads': reads, 'slots': slots, 'saved': str(OUT)}, indent=2)) diff --git a/plan/agw/research/deployment-review-2026-10-06/source-manifest.json b/plan/agw/research/deployment-review-2026-10-06/source-manifest.json new file mode 100644 index 00000000..b340741b --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source-manifest.json @@ -0,0 +1,89 @@ +{ + "fetched_at": "2026-10-05T18:32:09.520781+00:00", + "repo": "https://github.com/pushchain/push-agentic-wallets", + "branch": "deploy-agw", + "documentation_head": "10a24f101e2e6e0a9b76517b29f5cdb1aa967796", + "deployment_reported_source": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "files": [ + { + "path": "CLAUDE.md", + "sha256": "56d65e9f11394d0ee94080e8a01117d92e586044b2d0d8da9e272d5fcb0fc650", + "bytes": 25637 + }, + { + "path": "docs/1_AGW.md", + "sha256": "6b111652c2ce78b3e227b0838fc3ed2f32b6f0f7eb10146f2352730e327abe45", + "bytes": 103201 + }, + { + "path": "docs/2_UniversalRulesPolicy.md", + "sha256": "3a5d943dda72396b46d38ef72ea6b7c456368bfd8fee11334675457d4dc42b1b", + "bytes": 58915 + }, + { + "path": "docs/5_SDK_Owner_Integration.md", + "sha256": "a77c3cdc4dbbb791ed1c9df6bdaa9e01b85f221fb7173bfa7e73f89f9eeb4175", + "bytes": 28355 + }, + { + "path": "docs/addresses/donut.md", + "sha256": "aaab188fbc2bf52afc4aaf2f99ec02c99a34dd5ba006e1f55f7c922f85c6ad3c", + "bytes": 8178 + }, + { + "path": "foundry.toml", + "sha256": "172ef5d44d9cc6740f18d6ef25d6f3e62cfdc129d1bd45ddcecec24dbd698765", + "bytes": 3892 + }, + { + "path": "src/AGW.sol", + "sha256": "9d3fa4c96e7ed0fa74e155aa11c96ffaa0d80fe9a45683ba433a8ba49d30e821", + "bytes": 60814 + }, + { + "path": "src/AGWFactory.sol", + "sha256": "49f950e247923c71bd0abcfedc02d9b7f21d340b76454173293aa33763793e50", + "bytes": 17740 + }, + { + "path": "src/interfaces/IAGW.sol", + "sha256": "72ba3f081c5ad454fdee29aa313216f47d3a1759afccde0ad2360e3af03cf1bb", + "bytes": 11608 + }, + { + "path": "src/interfaces/IUniversalRulesPolicy.sol", + "sha256": "6443532c02ff15008faaf9cb8ba59d372d30baee2a3f3c1e82ced3124c95d310", + "bytes": 6978 + }, + { + "path": "src/libraries/AgentConfigLib.sol", + "sha256": "e2bb3478da66a3b510da7a27eb48e35ca8c4bb74b5d0cb844d3b8e99a15b2e20", + "bytes": 1866 + }, + { + "path": "src/libraries/Errors.sol", + "sha256": "e664a8a4496b1ebe2ad4def28ff914e8ea034bd366b3d26cf6a9e5e76ba46d66", + "bytes": 24953 + }, + { + "path": "src/libraries/Types.sol", + "sha256": "37ff942bd22e03e3868282381a030423773f16988f4463433e8068cf04ccb552", + "bytes": 27486 + }, + { + "path": "src/policies/UniversalRulesPolicy.sol", + "sha256": "0cb721d5ea77bbd8402b4909df7a21672c44abd3ca814c1cb139330c3d557e52", + "bytes": 97043 + }, + { + "path": "src/validators/AgentValidator.sol", + "sha256": "d0ada31e5cb516823421115f5568f9457d4edb6def64526784864761751c7964", + "bytes": 4941 + }, + { + "path": "test/unit/28_multiAsset.t.sol", + "sha256": "be653d4dc115b9d85d34223957e8b8fe3bdac0d5ea63da1cd51c574fcaacfea5", + "bytes": 27595 + } + ] +} diff --git a/plan/agw/research/deployment-review-2026-10-06/source/CLAUDE.md b/plan/agw/research/deployment-review-2026-10-06/source/CLAUDE.md new file mode 100644 index 00000000..e4471d40 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/CLAUDE.md @@ -0,0 +1,330 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +**`docs-internal/v3-architecture-docs/README.md` is the single entry point for design intent.** Read it, and +the reading plan it sets out, before writing any code. This file is conventions, commands and orientation; +it does not restate the architecture. + +**Precedence, highest first:** `docs-internal/v3-architecture-docs/CORE_RULES_v3.md` → +`docs/1_AGW.md` and `docs/2_UniversalRulesPolicy.md` → `docs-internal/v3-architecture-docs/v3-decision-register.md` → +the five PRDs in `v3-prds/` → the worked examples in `docs/` +(`3_Universal_Flow.md` cross-chain, `4_Native_Flow.md` Push-side). +Everything else in the repository is history. **The PRD is the specification; the existing code is not.** + +**The narrative docs live in `docs/`, not `docs-internal/`** — `1_AGW.md` (the system), `2_UniversalRulesPolicy.md` +(the rules policy, split out of the system doc) and the two flow walkthroughs; addresses per network live in +`docs/addresses/`. `docs-internal/` holds the build specifications, the decision register and the PRDs. + +## Commands + +``` +make build # forge build +make test # check-execute, then forge test -vv +make sizes # the S-06 size gate — forge build --sizes, exits non-zero over 24,576 B +make check-execute # sha256 pin: execute() byte-identical to its reviewed text (the B2 checkpoint revision) +make snapshot-execute # WARNING only — owner-door test gas vs .gas-snapshot-execute (±1000 gas) +make e2e # PARKED: prints that the Marketplace E2E awaits its rewrite, exits 1 +forge fmt # line_length 120, tab_width 4 +``` + +**`execute()` is hash-pinned.** `script/check-execute.sh` hashes the source span of +`AGW.execute` (pinned at the B2 checkpoint revision) — not a byte, not a comment may change. +Owner-authority features go in *sibling* doors (`executeWithSig`, `grantRulesWithSig`), never in +`execute`; the per-call checkpoint is the one addition `execute` carries, and it consults nothing and +cannot revert. + +**The Marketplace E2E deploys the core repo's own artifacts** via `vm.deployCode` (core is +shanghai / 99,999 runs / OZ 5.3; this repo does not recompile it). Run `make e2e` — `test_E2E_13` fails on +a stale core artifact. **That suite is currently PARKED** as `test/integration/24_marketplaceE2E.t.sol.parked` (not compiled): the core +marketplace is migrating to a new surface that also needs D3's agent config, so the suite awaits a rewrite; `make e2e` +says so and exits. `lib/push-chain-core-contracts` is currently a **symlink** to the sibling checkout +(`../../push-chain-core-contracts`), which is why `foundry.toml` carries a temporary `allow_paths`. + +**The demos (`demo/`, `demo-native/`) are frozen against the deployed v1 contracts** and do not compile against +the renamed `src/`; they are listed in `.gitignore` and must not be edited. The two demos have their own Foundry +profiles so `forge test` runs only the v3 specification suite: +`FOUNDRY_PROFILE=demo forge test`, `FOUNDRY_PROFILE=demo-native forge test` (each wrapped by its `justfile`; +see `demo/README.md`, `demo-native/README.md`). + +`make sizes` runs `--sizes` twice — once for the build, once for the vendored engine explicitly. That is +deliberate: **which contracts the default table covers is forge-version-dependent** (1.5.1-stable includes +`lib/`; 1.6.0-nightly did not), and SmartSession has the smallest margin in the build. The gate must not +rest on a reporting default that has already changed once. + +Narrower runs: + +``` +forge test --match-path test/unit/5_universalRulebook.t.sol -vv +forge test --match-test test_U09_ -vvv # one test, full traces +forge test --match-contract URPTest # test contract names predate the rename and are kept +forge coverage --ir-minimum # via_ir is on; plain coverage will not compile +forge test --gas-report +``` + +One suite is env-gated and **skips silently when the variable is unset** — a skipped test is not a passing +test, so run it at least once against a real endpoint before reporting a phase done: + +- `DEPLOYMENT_RPC` + `CHAIN_ID` — gate S-05, which checks `deployments/.json` against a live chain. + +Deployment (all five contracts, dependency order, writes `deployments/.json`): + +``` +forge script script/Deploy.s.sol:Deploy --rpc-url $RPC --broadcast +``` + +Requires `UNIVERSAL_GATEWAY_PC`, `UNIVERSAL_EXECUTOR_MODULE`, `CHAIN_ID`, and `FACTORY_ADMIN` off local +chains. See `.env.example`. The script asks the chain for its id and reverts on a mismatch with `CHAIN_ID`. + +## The system in one pass + +A user funds a small, purpose-built wallet on Push Chain and grants it a **rules set**: a frozen bundle of +limits (which agent, which token, which destination protocol and functions, how much per call, how much +total, until when). The wallet's balance is the hard ceiling on everything the agent can lose. Every agent +action is checked by contracts at execution time; the agent's honesty is never assumed. + +**The one hard problem.** Push Chain reaches other chains through a single frozen gateway function, so every +agent action — a trade, a deposit, a theft — is the *same* Push-side call: the wallet calling +`sendUniversalTxOutbound`. To the permission engine they are indistinguishable. Everything the user cares +about lives inside the payload, two decode levels down. **URP is the contract that opens that payload.** + +### Five contracts + +| Contract | Role | +|---|---| +| `AGWFactory` (`src/`) | UUPS proxy. Deploys wallet clones at pre-computable addresses; the registry of record for "is this a real wallet, and who owns it?" There is no owner parameter: the owner is the caller, or the signer of an `OwnerIntent` (the `deployWalletWithSig(intent, sig, label)` form). | +| `AGW` (`src/`) | Holds funds. Minimal clone with 40 bytes of immutable args (owner 0–19, factory 20–39). Push Chain has no ERC-4337 EntryPoint, so the wallet does the EntryPoint's jobs itself. | +| `UniversalRulesPolicy` — URP (`src/policies/`) | The only novel contract and the security boundary. **Three rulebooks**, in normative order, fail closed: universal-EVM (gates 1–16), universal-SVM (S1–S18; S1–S10 restate gates 1–10, S11+ parse the Solana execute payload), and native/Push-side (nine gates). Which one runs is derived from the rules set's chain string, never from a flag anyone sets. Upgradeable behind a transparent proxy. | +| `AgentValidator` (`src/validators/`) | Stateless sender validator: the rules set's config is the agent's Push address; it confirms the sender the wallet wrote into the engine's signature field. Verifies no signature. | +| `SmartSession` (`lib/smartsessions/`) | Adopted unmodified. Stores rules sets, runs policies, deletes on revoke. The wallet's only installed module. | + +### Naming + +AGW follows the core/gateway naming standard (`docs-internal/sdk-first-changes/N-nomenclature_prd.md`): + +- **"Rules", one word everywhere** — `grantRules`, `revokeRules`, `revokeAllRules`, `rulesId`, `RulesGranted`, + `RulesRevoked`, `RulesActionAuthorized`, `RulesConfigured`, `RulesType`. `rulesId` is the engine's + `permissionId` (`rulesId == permissionId`). "Mandate" is retired from code and docs. +- **Rename boundary:** ERC-7579 names (`execute`, `ModeCode`, module functions) and SmartSession names + (`Session`, `PermissionId`, `PolicyData`, `ActionData`, `ConfigId`, `checkAction`, + `initializeWithMultiplexer`, …) never change. Test function and test contract names never change. +- **Errors** live in `src/libraries/Errors.sol` — `AGWErrors`, `AGWFactoryErrors`, `UniversalRulesPolicyErrors`, + `AgentValidatorErrors`; caller checks are `CallerIsNotX`. **Types** live in `src/libraries/Types.sol`. +- **Set-once wiring** is read through `UPPER_CASE()` getters: `SESSION_ENGINE()`, `RULES_POLICY()`, + `SESSION_VALIDATOR()`, `UNIVERSAL_GATEWAY_PC()`. The deployment JSON keys keep their old names for tooling. +- **Interfaces** use numbered banners (`AGW_1: EVENTS` … `AGW_5: VIEWS`, `URP_1`–`URP_3`, `AGWF_1`–`AGWF_3`); + `IAGW` declares the wallet's full external surface and `AGW is IAGW`. +- "URP" stays as the short form in comments and messages; test files are numbered by area (`test/unit/1_factory…`). + +### Load-bearing invariants (each has a permanent test) + +- **The two doors are the whole authority model.** `execute` (owner door) consults *exactly two things* — + the immutable-args owner and calldata — and its only side effect besides the calls is one checkpoint + write per call to the wallet's own slot 0, which cannot revert. No module, policy, engine state or flag + may ever be read there; it must succeed with the engine uninstalled, a hostile validator installed, or + ghost-rules state. Adding any check is the catastrophic regression. `executeAsAgent` (agent door) is + callable only by the rules set's agent: the wallet checks `msg.sender == agentOf(rulesId)` and writes the + sender into the engine's signature field, which the sender validator checks. The agent is a Push + address — an EOA, or the UEA of an external key; the wallet verifies no signature, and replay is the + sender's own nonce. +- **Checkpoints never tick from the agent door.** `_checkpoint` is called only from the two owner doors + (once per call, before the call), `_grantRules`, `revokeRules` and `revokeAllRules` — never from + `_execute`, which both doors share. Kinds are a frozen, append-only wire format. +- **Owner-intent doors are siblings, not extensions, of `execute`.** `executeWithSig` and + `grantRulesWithSig` let a relayer (`intent.executor`) present an EIP-712 `OwnerIntent` signed by the + owner — usually a UEA, which has no ERC-1271, so `OwnerAuthLib.isOwnerSig` tries + `verifyUniversalPayloadSignature` first, then ERC-1271, via raw staticcalls that never revert. The domain + is the **factory's**, shared by factory and wallets. These doors read storage (nonce lanes; the owner lane + requires `OWNER_LANE_FLAG`), which is exactly why they cannot live in `execute`; `executeWithSig` + duplicates `execute`'s mode switch deliberately rather than sharing it. +- **`execute(bytes32,bytes)` is a frozen signature.** The engine branches on this selector; any other shape + routes validation to a path where URP's value gate sees a hardcoded zero instead of the real value. +- **`grantRules` enforces the canonical session shape and nothing else** — the skeleton, not the organs. + Term validation is URP's own init guards. Its monotonic `_grantNonce` becomes the session salt, so every + grant yields a distinct permission id that never recurs. + **One exception, bounded:** the wallet decodes the policy envelope's `chain` string from each action's + `initData` — *after* the policy-shape check has proven the policy is URP — solely to derive the + rules set's mode and assert targets against it. It validates nothing else in the envelope; URP re-derives + the same value from the same bytes and remains the sole judge of the terms. + **The order is load-bearing and is pinned by two tests: count → shape → decode → derive.** Decoding + before the shape check would read an arbitrary policy's data as though URP had authored it, and reading + action 0 before the count check would index an empty array. The per-action shape check inside the native + loop matters as much as the one before it — a rules set whose *third* action names a foreign policy would + otherwise be granted with no URP gate on that action at all. +- **`revokeRules` / `revokeAllRules` must have nothing on them that can fail.** No guard, no probe, no extra + external call. Blockable revocation is the one regression these functions can develop. +- **URP's `checkAction` makes no external calls.** It runs *before* the session validator is consulted, and + must remain safe on arbitrary calldata (the wallet's own agent check precedes the engine, but URP does not + rely on it); its safety rests on having no external calls, all effects last, and reverting on every + failure. Do not wrap its `abi.decode` in `try/catch` to name an + error — that introduces the external call the argument forbids. +- **Gate 12 (payload must be a multicall) is not a format check.** It confines the agent to the one CEA + branch whose entries gates 13–16 can walk; the other branches bypass the allow-list, beneficiary pin and + value cap entirely. +- **Gate 16's per-entry cap is in destination-chain native units** and is never compared against the + Push-side `value` (gate 8). Conflating them is a real bug this design once carried. +- **A universal rules set lists 1..`MAX_ASSETS` tokens, and gate 5 checks the request's token on every + request, zero amount included** (multi-asset branch). The gateway routes by the token, so the token is + what pins the destination chain: every listed token is chain-checked at grant, an empty list is refused, + and a zero-amount request naming an unlisted token is refused. Each token has its own caps and its own + `spent`; "unlimited" is `type(uint256).max`, never 0. See `docs/multi-asset-review.md`. +- **The factory's derivation is frozen forever.** `_walletImplementation` is the append-only storage anchor + with no setter; the salt formula and the 40-byte immutable-args encoding may never change, because + counterfactual funding is a supported flow with no recovery path. + +### Where the layers meet + +- `SEND_OUTBOUND_SELECTOR` and `MULTICALL_SELECTOR` are declared **once**, in + `src/libraries/Types.sol`, beside the struct mirrors they derive from. The wallet's grant-shape + check and URP's request gate both read from there so they cannot disagree. `Types.sol` is the + authoritative mirror of the gateway's frozen structs — reordering a field silently breaks the selector. +- URP's config is keyed `configId => multiplexer => account`. `ConfigId` already binds account and + permission (see the derivation chain in URP's storage comment — note it mixes `abi.encode` and + `abi.encodePacked` across levels; an SDK that assumes one throughout derives every id wrong). The middle + level isolates *callers*: `msg.sender` on the two engine-driven entry points, the `SESSION_ENGINE` + immutable everywhere else. +- The engine truncates policy revert data to 32 bytes and rewraps it as `PolicyCheckReverted(bytes32)`. Use + `BaseTest.expectUrpGate(...)` so negative tests name *which* gate fired; never hand-encode this. + **This applies to `checkAction` only.** `initializeWithMultiplexer` is a plain call from `ConfigLib`, so + init reverts bubble with full data — assert `ChainMismatch`, `InvalidAsset` and `EmptyChain` with every + argument, never through `expectUrpGate`. +- **Which rulebook a rules set uses is DERIVED, by both contracts, from one string.** Each action's URP + `initData` is `abi.encode(uint16 version, string chainNamespace, bytes body)` — the same shape in every mode, + which is what lets the chain be read before the mode is known. URP reads the version from the first word + before decoding anything else and refuses anything but `ENVELOPE_VERSION` (`UnsupportedEnvelopeVersion`); + the wallet decodes the same three fields but judges only the chain. The wallet hashes it and the engine hands URP the + identical bytes, so both call `PushChainLib.deriveMode` and reach the same answer with nothing between + them that can drift. There is no mode byte, no `RulesType` argument and no `PUSH_CHAIN_HASH` constant: + `PushChainLib` computes this chain's identity from `block.chainid`, so there is nothing to configure and + therefore nothing to configure wrongly. A near-miss string (`"EIP155:42101"`) derives the *other* mode + and is refused against the action targets — the hash comparison is the whole rule, and the wallet + deliberately does not parse, normalise or length-check the string. + **For a UNIVERSAL rules set URP derives a second thing, the VM family:** `PushChainLib.deriveVm` reads the + 7-byte prefix (`eip155:` → EVM, `solana:` → SVM, anything else reverts `UnsupportedNamespace` at init). + The result is stored on `ModeSlot.vm` and routes `checkAction` to `_checkUniversal` or `_checkSvm`. Mode + still comes from the full hash; `deriveVm` is never asked about a native string. +- **Tests must pin `block.chainid`.** Foundry defaults to 31337, so the native chain string is + `eip155:31337` unless a test calls `vm.chainId(42101)`. Native helpers build the string from + `block.chainid`, never a literal. +- **`Config`, `SvmConfig` and `NativeConfig` are STORAGE types; `UniversalTerms`, `SvmTerms` and + `NativeTerms` are the wire types.** URP storage is append-only — `_svm` took slot 7 and one `__gap` slot. + The SDK encodes the latter. `Config` stores no chain — a rules set's chain lives on `ModeSlot.chainHash`, + where it has been checked against every listed asset. + `test_upgradeable_configStructLayoutIsFrozen` pins every member's label, slot, offset and type, because a + struct inside a mapping never appears in the contract-level layout and can otherwise be reordered + silently. + +## Standing build rules + +1. **One phase at a time.** Stop at the gate, report, wait for acknowledgement before proceeding. +2. **One contract per phase, its tests in the same phase.** No contract ships without its suite. +3. **The PRDs are locked.** A PRD error is *reported with evidence and waited on* — never fixed in place, + never coded around. Never "fix" anything on a PRD's DO NOT FIX list; raise it instead. +4. **`src/libraries/` and `src/interfaces/` may change only via a diff proposed at the start of the phase + that needs it.** Never edited opportunistically. +5. **Branch `pushAgenticWallet_v3`.** All build work lives there. **Zaryab alone commits and pushes** — + prepare the change, report what is ready, print the commands; never run `git commit` or `git push`. + Never commit `deployments/*.json`, `out/`, `cache/`, or `.env`. +6. **Never invent addresses, selectors or magic values.** Several are deploy-time inputs and marked as such. +7. **Say what you did not do.** Skipped, unverified or uncertain work is stated plainly, not presented as + complete. +8. **Gate report format:** what was built · what was verified and how · what deviated and why · what you are + unsure of · `forge test` and `forge build --sizes` output verbatim · the exact `forge --version` line. + +## Standing test rules + +1. **Every negative test names its expected error.** Two documented exceptions only: URP gate 4 case (d) + (correct-length, malformed-offset body), which asserts "reverts" because it fails at an un-named + `abi.decode` step, and the **malformed-envelope rejection test**. + + **The envelope exception, restated for `abi.encode(uint16 version, string chainNamespace, bytes body)`.** + URP reads the version from the **first word** before decoding anything else, so on an **uninitialised** + config almost every malformed or pre-version blob is refused **named** as + `UnsupportedEnvelopeVersion(firstWord)`: a two-field `(string, bytes)` envelope reports 64, a bare struct + 32, a `(uint8, …)` header its leading byte. What stays **unnamed** at URP: blobs shorter than one word, a + version-1 envelope whose body is the wrong `Terms` type for the derived mode (**owner-door-direct path + only**), and an asset that *answers* `SOURCE_CHAIN_NAMESPACE()` with a non-string. **Through the wallet** + the wallet decodes the envelope first and does not judge the version: an unsupported version reaches the + owner named from URP, but a pre-version two-field envelope panics in the wallet's decode (`0x41`) before + URP is reached — assert that panic, not a bare revert. On an **already-initialised** config every shape + reverts `AlreadyInitialized` first, because the re-init guard precedes the decode. The property the tests + assert is that each **reverts rather than mis-decoding**. + + **A bare `vm.expectRevert()` is permitted only where the revert genuinely carries no data, and + only with an in-line justification saying so.** Before writing one, **grep the repo for the same + assertion elsewhere** — twice now a bare form was written where the named form already existed in + the same file (`test_W29_Native`, Block A §2.2; the native revoke in `8_e2e.t.sol`, Block B §2.1). + A bare `expectRevert` on a revocation or authorisation claim passes on an out-of-gas, a signature + failure or a nonce collision — the weakest assertion in the suite sitting on the strongest claim. +2. **A mock may be the OBSERVER, never the ORACLE.** A mock that supplies the behaviour under test can make + a dead branch look live. That is how this repo's one shipped critical bug survived review: the Ed25519 + branch called the precompile through a typed interface, solc inserted an `extcodesize` check, precompiles + have no code — so the branch reverted on the real chain while every test passed, because the tests etched + bytecode at the precompile address. Whenever you etch or stub something, ask what the code would do + against the real thing. +3. **Gas assertions carry a number.** "Within a sane budget" is not assertable; a test that cannot fail is + worse than no test. +4. **Nothing marked ⚠️ NEVER-DELETE is deleted or weakened.** Test names are specification: keep the names + given, add tests freely, rename nothing. +5. **Prefer artifact assertions over `vm.load` for structural claims.** Solidity offers no runtime way to + prove "declares no storage"; `assertEmptyStorageLayout` and `assertSelectorSet` in `test/Base.t.sol` read + solc's own output instead. Use those helpers — do not write second copies. + +## Test harness + +Every suite extends `BaseTest` (`test/Base.t.sol`), which deploys the real engine, validator, URP, wallet +implementation and an ERC-1967 factory proxy, then hands out wallets via `newWallet(owner)` — the real +`deployWallet` path, not a simulated factory. It also carries the canonical session builder, the outbound +request builder, the gate-naming helper, the agent-config helper and the call recorder. Test ids (`T-`, `W-`, +`U-`, `P-`, `S-`) come from the PRDs and appear in test names and comments. + +## Toolchain pins (facts, not preferences) + +- `solc 0.8.26` · `optimizer_runs = 833` · `evm_version = "cancun"` · `via_ir = true` +- OpenZeppelin 5.7.0 · forge-std 1.16.2 · SmartSession fork `7dc20e4` +- **forge: use STABLE, never nightly** (`foundryup -i stable`). Runtime bytecode is a function of + solc + optimizer + via_ir + evm_version + metadata — all pinned in `foundry.toml` — so the forge binary + does not change the sizes S-06 gates on. It does change how `--sizes` reports, how remappings resolve, and + how `forge script` broadcasts, which is where a nightly actually bites. `foundry.toml` has no key for the + driver version: **record the exact `forge --version` in every gate report.** That is the reproducibility + mechanism — do not invent a config key for it. + + **Recorded at Gate 0 and still current:** `forge 1.5.1-stable` + (`b0a9dd9ceda36f63e2326ce530c10e6916f4b8a2`, 2025-12-22). SmartSession runtime 22,581 B / +1,995 margin — + byte-identical to the figure measured on 1.6.0-nightly, which is the evidence that the driver does not + move bytecode. + +**`optimizer_runs` and `evm_version` are load-bearing.** The vendored engine exceeds EIP-170 above ~833 runs +and becomes undeployable; `cancun` is required for `MCOPY` in URP's `_slice` helper. A local `anvil` deploy +will not catch the size problem — anvil does not enforce EIP-170. + +`fs_permissions` grants read access to `out/` and write access to `deployments/`. Both are required, not +conveniences: the artifact-based storage-layout and selector-set assertions depend on the former. + +## Layout + +| Path | Contents | +|---|---| +| `src/` (root) | `AGW.sol`, `AGWFactory.sol` | +| `src/policies/` | `UniversalRulesPolicy.sol` (URP) | +| `src/validators/` | `AgentValidator.sol` | +| `src/interfaces/` | `IUniversalRulesPolicy`, `IAgentValidator`, `IAGWFactory`, `IAGW`, `IAGWInit`, `ISmartSessionConfigReader` (the one engine view upstream omits), gateway + module interfaces | +| `src/libraries/` | `Types.sol` (the policy's terms/config types, `RulesType`, `VmFamily`, `OwnerIntent` + EIP-712 typehashes, and the temporary gateway/core mirrors), `Errors.sol` (one error library per contract), `PushChainLib` (mode/VM derivation), `OwnerAuthLib` (owner-signature check shared by factory and wallet), `AgentConfigLib` (the one decoder of the agent config, shared by validator and wallet), `ModeLib`, `ExecutionLib` | +| `test/Base.t.sol` | Shared harness — every suite extends `BaseTest` | +| `test/unit/`, `test/integration/`, `test/mocks/` | Suites numbered by area (`1_factory` … `27_naming`), end-to-end flows, observers | +| `script/check-execute.sh`, `script/snapshot-execute.sh` | The `execute()` source pin and its advisory gas check | +| `demo/`, `demo-native/` | Cross-chain and Push-native demos — **frozen** against the deployed v1 contracts; own `justfile`, Foundry profile and `state/` ledger | +| `script/Deploy.s.sol` | The five-contract deployment, in dependency order | +| `deployments/` | `.json` records — **never committed** | +| `_to_delete/` | v1/v2 code staged for deletion — **ignore entirely** | + +## Build order (all phases complete) + +| Phase | Deliverable | +|---|---| +| 0 | Baseline: build green, harness, size gate | +| 1 | `URP` | +| 2 | `AgentValidator` — `validateConfig` addition + full suite | +| 3 | `AGW` | +| 4 | `AGWFactory` | +| 5 | Integration + deploy script | diff --git a/plan/agw/research/deployment-review-2026-10-06/source/docs/1_AGW.md b/plan/agw/research/deployment-review-2026-10-06/source/docs/1_AGW.md new file mode 100644 index 00000000..a77beaac --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/docs/1_AGW.md @@ -0,0 +1,570 @@ +# AGW (Agentic Wallet) — v3 Architecture + +# 1 · What this is +## The problem +- A user wants to let an automated agent trade or move funds for them, with the user's money — on another blockchain, or on Push Chain itself — without handing over their account. +- The user needs three things at once: +\t- The agent can act **without asking the user each time**. +\t- The agent can never spend **more than the user allowed**, on anything the user did not allow, for longer than the user allowed. +\t- The user can **shut it off instantly**, and take their money out at any time, no matter what state anything else is in. +- All of this runs on Push Chain, which reaches other blockchains through its own cross-chain gateway. Push Chain has no shared "transaction entry point" contract of the kind other chains use for smart accounts — so our wallet must do that job itself. +## The shape of the answer +- The user gets a **dedicated agent wallet** — a small, cheap contract created just for one purpose. It is not the user's main account. It only ever holds the money the user chooses to put at risk. +- The user grants the wallet a **permission**: a fixed bundle of limits binding one agent. A permission is one of **two kinds**, and the user never states which: they name the **chain** the permission is for, and the kind follows from it — Push Chain itself means native, anywhere else means universal. It is fixed at grant and never changes. A **universal** permission bounds cross-chain actions: which token, which destination protocol and functions, how much per action, how much in total, and until when. The far chain may be an EVM chain or Solana; the chain's namespace decides which, and with it the format in which the far-chain action is written and checked. A **native** permission bounds actions on Push Chain itself: which Push contracts and functions, which arguments are pinned to which values, how much native value, how many calls, and until when. +- Every action the agent takes is checked against that permission **by contracts, at execution time**. The agent's honesty is never assumed and never needed. +- The single most important contract in the system is **URP — the Universal Rules Policy**. It carries three rulebooks: two for universal permissions — one for EVM destination chains, one for Solana, because the far-chain action inside the call is written in that chain's own format — and one for native permissions. For a universal permission, every agent action, whatever it claims to be, is one and the same kind of call on Push Chain — the wallet calling the cross-chain gateway — and only URP looks inside that call to check what the agent is *really* doing on the far chain. For a native permission the target and function are already visible to the engine, and URP checks the three things the engine cannot see: the arguments, the value, and the count. `2_UniversalRulesPolicy.md` is devoted to it. +## What we build, and what we adopt +| Piece | Build or adopt | What it is | +| -------------------------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Wallet factory** (AGWFactory) | Build | Creates agent wallets at predictable addresses | +| **Agent wallet** (AGW) | Build | The account itself: holds funds, admits only the permission's agent, executes | +| **URP** | **Build — the only genuinely novel contract** | The policy that inspects and limits every agent action — cross-chain through its universal rulebooks (EVM chains, Solana), Push-native through its native rulebook | +| **Session validator** (AgentValidator) | Carry forward — stateless sender validator | Confirms the caller the wallet names is the permission's agent. Verifies no signature | +| **SmartSession** | Adopt, unmodified | An existing open-source permission engine that stores permissions and runs policies | +| **Cross-chain gateway** | Adopt (Push Chain's) | The contract that carries value and instructions to other chains | +| **Destination account** | Adopt (Push Chain's) | The user's account on the far chain, controlled from Push Chain. Universal permissions only | +| **Push-native protocol** | Adopt (whatever the owner names) | Any contract on Push Chain a native permission allows the agent to call — a staking pool, a vault, a token. Nothing is built or trusted; the wallet simply calls it | +## What this system deliberately does not have +Read this list before reading anything else. None of these is an oversight. +- **No editing of a granted permission.** A permission is frozen at grant. Any change means revoking it and granting a new one — in one combined step. +- **No upgrade of a deployed wallet.** A wallet's code is fixed forever at creation. A new wallet version means creating a fresh wallet. +- **No guardian, no recovery contact, and no pause on any wallet.** Nobody but the owner can act on a wallet, and nobody at all can freeze one. *(The **factory** has an operational pause that can stop **new wallets being created**. It cannot touch a wallet that exists, its funds, or its rules sets — see chapter 9, item 22.)* +- **No paymaster and no gas sponsorship.** The agent calls the wallet itself and pays its own gas — an EOA agent from its own balance, a UEA agent through its UEA's gas path. +- **No deny-list.** The permission names what is allowed; everything else is refused. There is no list of specially forbidden functions. *(The fixed targets URP refuses even when allow-listed — the loopbacks of gate 14, and on Solana the programs of gate S15 — are not a deny-list of functions: each is a target that would hand the agent the destination account itself.)* +- **No limit on how far in the future a permission may expire.** The user's choice of expiry is respected as given. +- **No mixed permission.** A permission is universal or native, never both. An owner who wants an agent to do both grants two permissions on the same wallet — they coexist, meter independently, and are revoked independently. +## Glossary +| Term | Meaning | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Owner** | The user's own key. Created the wallet, controls it absolutely. | +| **Agent** | An automated service identified by a Push address — its own EOA, or the UEA of an external key. It calls the agent door itself; it never holds the user's funds. | +| **Agent wallet** | The contract this document is about. Holds the budgeted funds on Push Chain. | +| **Permission** | One frozen bundle of limits binding one agent, of one **kind** — universal or native. A wallet can hold several, of either kind. | +| **Universal permission** | A permission whose every action travels through the gateway to a far chain. One token, one destination chain, an allow-list of far-chain calls, one destination account. The far chain is an EVM chain or Solana. | +| **Destination family** | Which kind of far chain a universal permission targets — EVM or Solana. Derived from the chain's namespace (`eip155:` or `solana:`); any other namespace is refused at grant. It decides which universal rulebook runs. | +| **Account pin** | A Solana limit: the account at a fixed position in an instruction's account list must equal a key frozen at grant. The Solana counterpart of the beneficiary check — how a source, a destination or an authority is locked. | +| **Data pin** | A Solana limit on an instruction's data: a little-endian integer at a fixed offset must equal, stay at or above, stay at or below a frozen value, or stand in a minimum ratio to another field. How a fee, a slippage ceiling or a price floor is locked. | +| **Native permission** | A permission whose actions are calls to contracts on Push Chain itself. One to eight (contract, function) pairs, each with its own pins, caps and call limit. Nothing leaves Push Chain. | +| **Action** | One (contract, function) pair the engine recognises as a unit. A universal permission has exactly one — the gateway's send. A native permission has one to eight. | +| **Argument pin** | A native limit: a 32-byte word at a fixed position in a call's data that must equal a value frozen at grant. This is how a beneficiary, a spender or a pool id is locked. | +| **Policy** | A contract that checks one aspect of a request. URP is the main one. | +| **SmartSession** | The adopted engine that stores permissions and calls each policy in turn. | +| **Gateway** | Push Chain's cross-chain transport. The only thing a **universal** action is ever allowed to call — and the one thing a **native** action never may. | +| **Destination account** | The user's account on the far chain. Its address is known in advance: on an EVM chain Push Chain computes it; on Solana it is a program-derived address of the gateway program, derived by tooling. | +| **PC** | Push Chain's native token, used for gas. | +--- +# 2 · The pieces +Six things make up the system. This chapter says what each one is, what it stores, and where it runs. How they interact comes in chapters 3 to 6. +## 2.1 The wallet factory +- A single contract on Push Chain that creates agent wallets. +- Whoever calls it becomes the owner of the wallet it creates. There is no way to create a wallet owned by someone else — the factory does not accept an owner as input; it uses the caller's address, full stop. +- Wallet addresses are **predictable before creation**. The factory uses deterministic deployment (CREATE2): the address is computed from the owner's address plus a per-owner counter. Creating two wallets in a row gives two different, but individually predictable, addresses. +- The factory itself sits behind an upgradeable proxy, so its logic can be improved — **but the address computation must never change**. If it changed, any address a user had computed in advance (and possibly already sent funds to) would become unreachable. A permanent regression test pins this. +- The factory stores: the wallet implementation address, and each owner's wallet counter. +## 2.2 The agent wallet +- A **minimal clone**: a tiny contract that delegates all logic to one fixed implementation. Cheap to create, and **not upgradeable — ever**. The owner's address is baked into the clone's own bytecode at creation and can never be reassigned. +- It is a modular smart account following an existing standard (ERC-7579), reduced to the minimum: it supports exactly **one kind of module — a validator** (a contract that checks signatures and permissions). Attempts to install any other module kind (executors, hooks, fallbacks) are refused by the wallet itself. +- It has two doors: +\t- **The owner door.** The owner can make the wallet do anything, send anything anywhere, with no checks at all. This is deliberate and is covered in chapter 3. +\t- **The agent door** — a function called `executeAsAgent`. Only the permission's agent may call it, and the call only passes if every check in chapters 5 and 6 passes. +- What the wallet stores: a grant counter used to make every permission unique (chapter 4), replay counters used only by the owner's own relayable signed-intent door, and a checkpoint counter that every owner-side change advances (chapter 4.5). The agent door keeps no state of its own. +- What it holds: the budgeted funds — the tokens the owner has decided to put under agent management, plus a little PC for gas on cross-chain calls. +## 2.3 The permission +- A permission is **not a single record in one place**. It is written across three storage locations in one grant transaction: +\t- **SmartSession's storage** holds: that the permission exists, which agent may act under it — the agent's Push address — and the list of policy contracts to run. +\t- **URP's storage** holds everything about what the agent may actually do, in one of three shapes chosen by the permission's kind and, for a universal permission, its destination family. For a universal permission to an EVM chain: the allowed protocol functions on the far chain, the token, the caps, the counters, and the destination account address. For a universal permission to Solana: the same token, caps and counters, the destination account and the gateway program, the allowed (program, instruction) rules with their account and data pins, and the list of destination-side accounts that hold value. For a native permission, one record **per action**: the Push contract and function, the argument pins, the value and amount caps, the call limit, and the counters. `2_UniversalRulesPolicy.md` lists every field of all three. +\t- **URP also records the kind itself**, in a small mode record written in the same transaction — and, for a universal permission, the destination family beside it. On every later request URP consults that record — not the shape of the data — to choose which rulebook runs. +\t- *(There is no separate time-window policy in v3: the expiry lives inside URP, so URP is the sole action policy — see `2_UniversalRulesPolicy.md` §1.1.)* +- A permission is identified by a unique id computed from its contents plus a salt the wallet supplies from its own grant counter. Granting the same terms twice therefore produces two distinct permissions — they never collide, and revoking one never touches the other. +- A permission is **immutable**. Nothing in the system can modify one after grant. The only operations that exist are: create one, and remove one. +## 2.4 The agent +- An agent is a **Push address**. A Push-native key is its own EOA; any external key — EVM, Solana, anything Push Chain supports — acts through its UEA, the account Push Chain derives for that key, which verifies the key's signature before it ever calls the wallet. The wallet itself verifies no signature: it checks only who the caller is. +- Any address may be an agent, including a smart contract such as a multisig. +- **An agent is attached to one permission, not to the wallet.** A wallet with three permissions can have three different agents, each locked to its own limits. There is no wallet-level "the agent" and no way to swap the agent inside an existing permission — a new agent means a new permission. +- The agent holds no funds of the user's and has no standing power. Its only ability is to call the agent door, naming one of its permissions, and have the wallet check that call. +## 2.5 URP — introduced +- URP is the contract where the user's real intent is enforced: *this protocol, these functions, this token, this much, for me, until then*. +- It exists because of a structural blind spot in the adopted engine, explained fully in `2_UniversalRulesPolicy.md`: from Push Chain's point of view, every agent action looks identical — a call to the gateway. URP is the contract that opens that call up and inspects what is inside — an EVM instruction list for an EVM chain, a single program instruction for Solana. +- For a native permission it does the complementary job: the engine already sees the target and function, so URP checks how the function is called — which arguments are pinned, how much value rides along, how much of a metered amount, and how many times. +- It is the one contract in the system that is **upgradeable** — it sits behind a proxy at a permanent address, so its rules can be corrected or extended without moving any wallet or reissuing any permission. That is a deliberate trade, and it is what limit 27 in chapter 9 is about: the address is fixed forever, the logic behind it is not. +- One paragraph is all it gets here. **`2_UniversalRulesPolicy.md` is its chapter.** +## 2.6 The destination account +- *(Universal permissions only. A native permission has no destination account: its actions never leave Push Chain, and whatever they produce is credited to the wallet itself.)* +- The user's account on the far chain (Ethereum, Solana, or any chain Push supports). Push Chain's existing infrastructure creates it and controls it; we adopt it as-is. +- **On an EVM chain** its address is **computable in advance** on Push Chain, before the account even exists on the far chain (`getCEAForPushAccount` forward, `ceaToPushAccount` reverse). +- **On Solana** it is a program-derived address of the gateway program, seeded by the wallet's own Push address (`["push_identity", wallet]`). A Solidity contract cannot run that derivation, so the tooling derives it — along with the destination account's token accounts for each mint the permission touches — and the owner commits the 32-byte keys at grant. A wrong key fails closed: the pins never match. +- At grant time, the tooling computes this address and freezes it into the permission. From then on, URP requires that everything the agent does on the far chain benefits **that address and no other**. The agent can trade with the user's money; everything it buys lands in the user's own far-chain account — on Solana, in that account's own token accounts. +- **On Solana the destination account is also the signer.** The gateway hands it the bridged funds and then makes one call into the target program with the destination account as the only signer — and that signing authority carries into whatever the target program itself calls. `2_UniversalRulesPolicy.md` §1.4c is how URP narrows what that authority can reach; chapter 9 states what it cannot narrow. +## 2.7 The Push-native protocol +- Any contract on Push Chain that a native permission names: a staking pool, a vault, a token, a registry. Nothing is built, adopted or trusted — it is whatever the owner chose to allow. +- The wallet calls it **directly, as itself**. The protocol sees the wallet as the caller, so whatever the call produces — a staked position, shares, a claim — is the wallet's, never the agent's. This is the native counterpart of the destination account's "for the user only" rule, one hop shorter. +- To the engine it is an (address, function) pair and nothing more. To URP it is that pair plus the pins, caps and counters the owner attached. Neither contract knows what the function *means*; both only know what the owner allowed. +## Diagram — the system map +```mermaid +flowchart TB + subgraph PUSH["Push Chain"] + OWNER["Owner\ +(the user's key)"] + FACTORY["Wallet factory\ +(upgradeable, frozen address math)"] + WALLET["Agent wallet\ +(minimal clone, never upgradeable)\ +owner door + agent door"] + SS["SmartSession\ +(adopted permission engine)"] + URP["URP\ +(the limits — 2_UniversalRulesPolicy.md)\ +upgradeable behind a proxy"] + VAL["Session validator\ +(confirms the caller is the agent)"] + GW["Cross-chain gateway\ +(adopted transport)"] + NP["Push-native protocol\ +(any contract a native permission names)"] + end + subgraph FAR["Destination chain"] + CEA["Destination account\ +(the user's far-chain account)"] + PROTO["Allowed protocol\ +(e.g. a market, a lending pool)"] + end + AGENT["Agent\ +(a Push address: an EOA,\ +or the UEA of an external key)"] + + OWNER -- "creates, one call" --> FACTORY + FACTORY -- "deploys" --> WALLET + OWNER -- "grants / revokes permissions\ +and can execute anything" --> WALLET + AGENT -- "calls the agent door itself" --> WALLET + WALLET -- "asks: is this allowed?" --> SS + SS --> URP + SS --> VAL + WALLET -- "universal action, only if every check passed" --> GW + WALLET -- "native action, only if every check passed\ +(the wallet is the caller)" --> NP + GW -- "bridges value + instruction" --> CEA + CEA -- "calls, for the user's benefit only" --> PROTO +``` +--- +# 3 · Who controls what +## The single chain of authority +There is exactly one chain of control in this system, and it starts and ends with the user. +- **The user's key owns the wallet.** Ownership is fixed at creation, inside the wallet's own bytecode. It cannot be transferred, stolen by code, or reassigned by any function — no function to do so exists. +- **The wallet owns its permissions.** Only the owner, through the wallet, can create or remove a permission. An agent cannot grant itself anything, extend anything, or remove anything. +- **A permission bounds one agent.** The agent can call the agent door within the permission's limits. That is the entirety of its power. +- **The wallet's Push-side identity owns the destination account.** The far-chain account obeys instructions that arrive through Push Chain's gateway from the wallet. The agent never controls the destination account; it can only cause the wallet to send it instructions that URP has already approved. +- **For a native permission the same rule holds one hop shorter.** The wallet calls the Push contract as itself, so the position, the shares, the claim — whatever the call produces — is credited to the wallet. The agent never controls the target contract; it can only cause the wallet to call it in exactly the way URP has already approved, with the arguments the owner pinned. +## The owner door has no checks — on purpose +- The owner can execute anything from the wallet at any time: withdraw every token, send to any address, call any contract, on Push or (via the gateway) beyond. +- **No policy, no cap, no expiry, no destination rule applies to the owner.** All of `2_UniversalRulesPolicy.md` applies to the agent door only. +- Why: every safety mechanism on the owner's own exit is also a way for the owner to be locked out of their own money. The design refuses that trade. The wallet must remain drainable *by its owner* in every degraded state the rest of the system could ever reach — engine misconfigured, policy bricked, permission wedged, bridge down. A standing test executes an owner withdrawal in each of these states and must always pass. +- The cost of this choice is stated plainly: **a stolen owner key drains the wallet completely.** There is no guardian and no delay to stop it. Defence against key theft belongs to the layer that holds keys — the user's identity and key-management setup — not to this wallet. This is the first entry in chapter 9's list of accepted limits. +- **The owner door records, but never asks.** Each call through it advances the wallet's checkpoint counter (chapter 4.5), so a job's evaluator can tell whether the owner touched the wallet during the job. The write consults nothing and cannot revert, so the door stays unblockable. +## What the agent's call is — and is not +- The agent's authority is **being the sender**. The wallet admits a call only from the address the named permission records as its agent, so there is no bearer request: nothing the agent produces can be submitted by anyone else. +- A call grants nothing durable. Each one spends from the permission's remaining budget once, as the transaction it is; replay is prevented by the sender's own nonce (chapter 5). +- The agent never touches custody. At no point in any flow do funds sit in an account the agent controls. Universally, they move from the wallet, through the gateway, to the user's own destination account, and anything bought lands in that same account. Natively, they move from the wallet straight into a Push contract as the wallet's own position, and come back to the wallet. +## Diagram — the chain of ownership +```mermaid +flowchart TB + KEY["The user's key\ +absolute control, no checks on its path"] + W["Agent wallet on Push Chain\ +owner fixed at creation, forever"] + P1["Permission 1\ +agent A · its own limits"] + P2["Permission 2\ +agent B · its own limits"] + CEA["Destination account on the far chain\ +obeys the wallet, via the gateway"] + NP["Push-native protocol\ +credits whoever calls it — the wallet"] + A1["Agent A — may only act\ +within Permission 1"] + A2["Agent B — may only act\ +within Permission 2"] + + KEY -- "owns, unconditionally" --> W + W -- "creates / removes" --> P1 + W -- "creates / removes" --> P2 + P1 -.-> A1 + P2 -.-> A2 + W -- "its Push identity controls" --> CEA + A1 -. "universal: can only trigger wallet→gateway calls\ +that URP approves, benefiting the\ +destination account only" .-> CEA + A2 -. "native: can only trigger wallet→contract calls\ +that URP approves, with the owner's pins,\ +credited to the wallet only" .-> NP +``` +--- +# 4 · The life of a permission +## 4.1 Birth — the grant +- The owner (or the tooling acting for the owner, with the owner signing) composes the terms. **The first term is the chain** — a CAIP-2 identifier such as `eip155:11155111` or `solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1` — and it decides the kind and, for a universal permission, the destination family, which together decide the shape of everything after it. Common to both kinds: +\t- the agent's Push address — its own EOA, or the UEA of its external key; +\t- the expiry — one value, held inside URP. +- **For a universal permission to an EVM chain:** +\t- the far-chain protocol: each allowed contract address and function, and — for each function — where in its arguments the *beneficiary* sits, so URP can later check that the beneficiary is the user's destination account. These argument positions are **generated from the protocol's interface by tooling, never typed by hand** (a promise the contracts cannot check — chapter 10); +\t- one token, and with it one destination chain — a permission never spans tokens or chains; +\t- the caps: a per-action maximum, a lifetime maximum, and a maximum of native PC per action; +\t- the destination account's computed address. +- **For a universal permission to Solana:** +\t- the same token, the same three caps, and the expiry — these terms do not depend on the far chain; +\t- the destination account and the **gateway program** on the declared cluster — both 32-byte keys, both supplied by tooling: the destination account derived from the wallet's address, the gateway program taken from the chain registry, never from user input; +\t- one to thirty-two **program rules**, each a far-chain program and one instruction on it, identified by its leading bytes — eight for an Anchor program, one for an SPL-style program — or marked as an instruction that carries no data. A rule may also fix the instruction's exact account count; +\t- up to sixteen **account pins**: for a given rule, the account at a given position in the instruction's account list must be a given key. This is how the destination account is locked in as the authority, its token account as the source, and its token accounts as every destination. Every rule must carry at least one; +\t- up to eight **data pins** on the instruction data: a little-endian integer at a fixed offset — from the start, or from the end, because Borsh puts variable-length fields first — compared for equality, a floor, a ceiling, or a minimum ratio against a second field. This is how a fee is locked at zero, slippage is capped, and a swap's output is held to a floor *relative to its input*; +\t- up to eight **destination-side accounts that hold value** — the destination account itself, which must be on the list, and its token accounts. At validation, any of these that appears in a request's account list must sit exactly where the matched rule pins it; +\t- **all of it is generated from the program's published interface by tooling, never typed by hand** (chapter 10). A wrong pin fails closed; a missing pin guards nothing. +- **For a native permission:** +\t- one to **eight** actions — eight is a fixed wallet constant, a sanity bound rather than a gas bound — each a Push contract and one function on it. A function may be *value-only*: a bare transfer of native PC with empty call data; +\t- per action, the **argument pins**: up to eight positions in the call data, each frozen to the exact 32-byte word that must appear there. This is how a beneficiary is locked to the wallet, a spender to one contract, a pool to one id. **Positions are generated from the contract's interface by tooling, never typed by hand** (chapter 10) — a wrong position fails closed, but a *missing* pin guards nothing; +\t- per action, the native-value caps: a per-call maximum and a lifetime maximum; +\t- per action, optionally, a **metered amount**: one argument position read as a number, with its own per-call and lifetime maximum — the native counterpart of the bridged-amount cap; +\t- per action, a **call limit**: how many times the action may run, where zero means unlimited; +\t- and nothing else. There is no token, no destination chain, and no destination account: a native permission has no far side. +- The owner sends one transaction through the wallet. The wallet supplies a salt from its internal grant counter — this is what makes every permission unique — and calls the engine's standard enable function. In the same transaction, URP's configuration — including the permission's expiry — is written: one record for a universal permission, one record **per action** for a native one, and beside them the record of which kind this is. +- **Before anything reaches the engine, the wallet derives the kind from the chain and asserts it against the actions.** Every action must name the same chain, or the grant is refused naming the action that differs — which is what makes a mixed permission unrepresentable rather than merely forbidden. A universal permission must name exactly one action, and it must be the gateway's outbound send — whatever its destination family; the wallet never tells an EVM permission from a Solana one, and does not need to. A native permission may name anything on Push Chain **except** the gateway — and except seven addresses that would turn the agent into the owner: the zero address, the engine's wildcard marker, the wallet itself, the engine, URP, the validator, and the factory. It may not name the engine's two wildcard function markers, and it may not name the same (contract, function) pair twice. Every one of these refusals carries its own named error, and the two that matter most — the wallet and the engine as targets — are pinned by permanent tests. +- The wallet exposes exactly **two** permission operations to the owner: *enable* and *remove*. The engine underneath offers more; the wallet deliberately does not surface them. *Enable* takes the session and nothing else; it records the **derived** kind and the chain in the grant event, so an indexer can tell a native permission from a universal one, and which chain it is for, without opening the session. +- A failed grant does not undo a wallet. A wallet with zero permissions is a valid, safe object: with no permission there is no agent authority of any kind, and every agent request fails before any policy even runs. +## 4.2 Life — what the counters mean +- **The lifetime cap counts what is bridged, not what is deployed.** When the agent moves 40 of an allowed 100 to the far chain, the counter reads 40. If it then trades those 40 into 80 and back again on the far chain, the counter still reads 40 — redeployment at the destination is not new spending from the wallet. The cap bounds the user's exposure *from the wallet*; the expiry bounds how long the agent can keep working with what is already across. +- **An unlimited cap is allowed and is expressed as the largest representable number.** There is no special "unlimited" flag; the comparison simply never trips. The product must display this honestly — "unlimited", never a huge number (chapter 10). The one exception is a native action's **call limit, where zero means unlimited** — a call limit of zero calls would be a permission that authorises nothing. +- **A native action keeps three counters, not one:** native value sent, the metered amount (if the action has one), and calls made. **Every successful call counts as a call, even one that sends no value and meters no amount.** A call limit that zero-value calls could slip past would be advisory, so the counter always moves — this is the one place the native rulebook deliberately differs from the universal one, whose counter does not move on a zero-amount request. +- *(Universal only.)* **If a cross-chain action fails on the far side, the spent amount is credited back** — the wallet's funds return and the counter should not stay inflated. This credit is issued by Push Chain's own executor module calling URP. It is **designed but not yet functional**: it needs a change on the Push core side that has not landed. Until it lands, a failed far-side action leaves the counter inflated, and the remedy is to revoke and regrant. Both halves of this are stated again in chapters 9 and 11. +## 4.3 Change — there is no change +- **A permission is never edited. Every "change" is: revoke the old one, grant a new one, in one atomic owner transaction.** If any part fails, the whole transaction fails, and the old permission remains exactly as it was. There is no window where the wallet is half-configured. +- One race is guarded explicitly. Between the owner composing the change and the transaction landing, the agent may spend. The owner's change transaction therefore begins with an **assertion of the expected spent amount**: "I am replacing this permission believing it has consumed X." If the agent moved money in the gap, the assertion fails, the whole change reverts, and the owner re-reads and retries with current numbers. Stale beliefs never silently become new budgets. For a native action the assertion names **all three counters** — value, amount, calls — and every one must match exactly; and it refuses to run against a permission of the other kind, or against one that does not exist, so a stale belief can never pass by reading zeros from the wrong place. +- **Counters restart from zero on the new permission.** This is a real, accepted sharp edge: replacing a 100-cap permission that had 80 spent with a "tighter" 50-cap permission yields 50 of *fresh* authority — more than the 20 that remained. The contracts do not compensate for prior spend, and the product is obliged to show the owner what the old permission had consumed before the new cap is chosen (chapter 10). +- Because no permission can ever be widened in place, an entire class of problems disappears structurally: there is no "widening inside the expiry window" to delay, timelock, or guard. The mechanism that would have needed guarding does not exist. +## 4.4 Death — revocation and expiry +- **Revocation is one owner call, effective immediately on Push Chain.** The permission's storage is removed; the very next agent request against it fails. Nothing the agent does can delay or contest this. Removal performs pure storage deletion — it calls out to nothing, so no external contract can make revocation fail (`SmartSessionBase.sol:329-355`, `ConfigLib.sol:274-284`). +- **One honest limit:** revocation stops new instructions. An instruction that already left through the gateway — already in flight across the bridge — still completes on the far chain. The window is bridge latency. The revoke screen must say this (chapter 10). +- **Expiry needs no transaction.** Past the expiry, URP's expiry gate — the second gate of every rulebook (2, N2, S2) — fails every request. The permission's storage still exists until removed, but it is inert. +- Removing a permission also ends its agent's power under it: removal clears the agent the permission named, so the very next call under that id is refused before any policy runs. A regrant produces a new id — the wallet's grant counter salts it — so a request built for the old id fails against the new permission too. A permanent test pins this. +## 4.5 Checkpoints — what the owner side did, for whoever needs to know +- The wallet keeps one **checkpoint counter**, read through `checkpointCount()`, with the block of the latest checkpoint beside it (`lastCheckpointBlock()`). A job records the count when it is funded; its evaluator compares later. Same number: the result is the agent's alone. Different number: the owner side touched the wallet. +- **What advances it:** every call made through an owner door — `execute` or `executeWithSig`, one tick per call, a batch of five ticks five times — every grant, and every revoked permission (once per id). **What never does:** the agent door and everything it dispatches, module install and uninstall, factory set-up, and any call that reverts. +- **One tick per call, taken before the call.** A job is funded from inside an owner-door call — the wallet itself calls the job contract — and the job's hook reads the counter during that call. Ticking before each call means a clean funding batch ends exactly at the hook's snapshot, while a withdrawal batched after the funding call moves the counter past it. A tick once per batch would either make every job look tampered with or hide that withdrawal. +- **Compare counts, not blocks.** Several checkpoints can share a block — including the funding call's own — so "anything after block N" misses them; a changed count never does. +- **It cannot block anything.** A tick is one write to the wallet's own storage and one event: no external call, no condition that can fail. The owner door and revocation stay unblockable. +- One counter for every kind of change. The event (`Checkpointed`) also carries the kind — `OWNER_ACTION`, `RULES_GRANTED` or `RULES_REVOKED` — and a reference (the call's hash, or the permission's id) for indexers. +## Diagram — the permission lifecycle +```mermaid +stateDiagram-v2 + [*] --> Composed: owner + tooling assemble terms + Composed --> Active: one grant transaction\ +(engine + URP + expiry written together) + Active --> Active: agent request passes\ +counters advance + Active --> Active: far-side failure\ +credit back (designed — not yet functional) + Active --> Expired: expiry passes\ +no transaction needed + Active --> Removed: owner revokes\ +immediate, unconditional + Active --> Replaced: CHANGE = revoke + regrant\ +one atomic transaction,\ +gated by the spent-amount assertion + Replaced --> [*]: old id dead — requests for it die with it\ +new permission starts at zero + Expired --> Removed: cleanup, optional + Removed --> [*] +``` +--- +# 5 · One action, end to end +This chapter walks a single agent action from the agent's call to funds moving. It is the spine of the whole system; `2_UniversalRulesPolicy.md` then zooms into the deepest step. +## 5.1 Why the wallet does so much itself +- On chains that follow the account-abstraction standard, a shared system contract (the "EntryPoint") receives signed account operations, checks replay protection, and dispatches them. **Push Chain has no such contract.** So our wallet performs those jobs itself, inside one function — the agent door, `executeAsAgent`. +- The wallet keeps the standard's *packaging* (the operation format), because the adopted permission engine speaks it. But the packaging is just a shape; there is no shared dispatcher behind it. The wallet is its own dispatcher and never leaves the call stack — which has one important consequence used later: **when the wallet finally calls the gateway, the gateway sees the wallet itself as the caller**, not the agent. +## 5.2 The request the agent sends +What the agent sends depends on the permission's kind — but only in the innermost part. The call around it is identical for both. +**A universal request has nested layers.** The agent composes the action innermost first: +- **Innermost — the far-chain call.** The actual thing the user wanted: for example, *buy these shares, for this much of the token, with the user's destination account as beneficiary*. +- **Around it — the instruction list.** The far-chain calls are packed as an instruction list for the destination account, between one and **ten** entries — ten is a fixed contract constant. Each entry is: a target address, a native-value amount, and call data. +- **Around that — the gateway request.** The message to Push Chain's gateway: which token and how much to bridge, the instruction list as payload, and two routing fields URP will pin (`2_UniversalRulesPolicy.md`): the bridged-funds recipient field, and the refund destination. +- **Outermost — the execution payload.** The gateway request as the single call the wallet will make: the gateway as target, the PC for far-side gas as value. +**A universal request to Solana has the same layers, with a different middle.** There is no instruction list: the gateway makes exactly one call into one program per request, so the payload is a **single Solana instruction** — the account list (each a key and a writable flag), the instruction data, and the target program — in the byte format Push Chain's validators decode, not ABI. The gateway request's recipient field, which must be empty for an EVM chain, carries the **target program** here, and must equal the program named inside the payload. A flow that needs two instructions is two requests, the later ones bridging nothing. +**A native request has one layer.** There is no far-chain call, no instruction list and no gateway request. The agent names a Push contract, a native-value amount, and the call data — and that flat call *is* the execution payload. Three nested envelopes become one call; nothing else changes. +Then the agent calls the agent door itself with three things: **the permission's id, the execution mode, and the execution payload.** There is no signature to attach — the agent's authority is being the sender. +## 5.3 Who may call — the sender check +- The wallet looks up the agent the named permission records — the address stored in it at grant — and compares it with the caller. Anyone else is refused, by name, before the engine is ever called: the owner, a stranger, another permission's agent. An id that is unknown, revoked, or names a session validator other than the canonical one records no agent, so a call under it is refused the same way. +- **An external key acts through its UEA.** The UEA verifies the key — secp256k1, Ed25519 or whatever that chain uses — and then calls the wallet; the UEA is the agent the permission names. The external key calling the wallet directly is just another stranger. +- The wallet then writes the caller's address into the operation it hands the engine, in the field the engine treats as the signature. Nobody outside the wallet can supply that field: the engine accepts an operation only from the account it is for, so only the wallet can obtain a verdict for the wallet. At the end of validation the session validator compares that address with the agent stored in the permission — a second, independent check behind the first. +## 5.4 Replay protection — the sender's own +- Each agent action is a transaction of the agent's own. An EOA agent's transaction carries its nonce; a UEA agent's action is a UEA payload with its own nonce and deadline. A transaction that has been mined cannot be mined again, so no request runs twice — and the wallet keeps no replay state for agents at all. +- The same call submitted twice is two actions: each is checked against the permission and each is metered. +- If execution reverts, the whole transaction unwinds — every counter, everything — leaving no half-spent state. A failed action costs the agent gas and changes nothing else. +- Expiry is the permission's own, checked inside URP. There is no separate per-request deadline at the wallet; a UEA payload carries one, an EOA transaction does not. +- One honest note: an EOA agent has a single sequential nonce, so a stuck transaction blocks that agent's next one until it is mined or replaced. Accepted, and an agent-side problem only. +## 5.5 The walk, in order +What happens when the agent calls, step by step. Every step is on Push Chain, inside one transaction, until the bridge. +1. **The agent calls the agent door**, naming the permission. **The wallet's first acts are to confirm the engine is still installed — the owner switches the agent door off entirely by revoking everything and uninstalling it — and that the caller is the agent the permission names.** Both are checked before anything else costs gas; a wrong caller is refused by name. +2. **The wallet builds the operation**: the execution as an `execute` call, and in the signature field the use-mode marker, the permission's id and the caller's address — written by the wallet, never supplied from outside. +3. **The wallet asks the permission engine to validate.** SmartSession looks up the permission by its id: does it exist on this wallet? Which policies are attached? +4. **The engine runs every attached policy, in order, on the raw request.** First it identifies the action by the call's target and function; a native request naming any pair the permission did not grant dies here, at the engine, before any policy runs. Then, for this system, exactly one policy: **URP — the whole of `2_UniversalRulesPolicy.md`**, which reads the permission's kind and runs the matching rulebook, and which carries the expiry check itself. Every policy must pass; any failure ends everything with nothing spent. Two engine facts matter here: +\t- **Action policies have a minimum count of one, but the engine's other policy class (checks on the outer operation) has a minimum of zero** (`SmartSession.sol:237-247, 285-299`). Rule for this system: **no mandatory guarantee may live only in that zero-minimum class**, because a configuration with none of them is legal. Everything mandatory lives in URP. +\t- **Policies run before the session validator is consulted** — an engine ordering we adopt, not choose (`SmartSession.sol:340-352`). The wallet has already checked the caller at step 1, but the rule stands for every policy: it must be safe to run on arbitrary calldata the engine has not yet authenticated. URP holds no state that validation mutates, so a bad request can waste gas and nothing else. +5. **The session validator is consulted last.** It compares the address the wallet wrote into the signature field with the agent stored in the permission. Wrong address, no execution. +6. **The wallet enforces the verdict explicitly.** Because there is no EntryPoint to do it, the wallet itself unpacks the engine's answer and enforces both the pass/fail result and the validity window it returns. +7. **The wallet refuses two targets whatever the engine said.** After validation and before dispatch, if the approved call targets the wallet itself or the engine, the wallet reverts. Neither can ever be granted (chapter 4.1), so on a permission the wallet created this never fires — it exists for a permission the owner enabled on the engine *directly*, bypassing the wallet's grant check, which the owner door permits. It is the last of four independent refusals of a self-call, it runs deliberately **after** validation and not before (chapter 11), and two permanent tests pin it — one of them reaching the engine as a target through the engine's own wildcard. +8. **The wallet makes the approved call, with the exact validated bytes.** For a universal permission that is **the gateway**: it sees the wallet as the caller, pulls the bridged token amount from the wallet's balance, takes the PC provided for far-side gas, and emits the cross-chain message. For a native permission it is **the named Push contract**, called by the wallet as itself, carrying the approved value and call data: the contract sees the wallet as the caller, and whatever the call produces is the wallet's. **A native action is complete here** — one Push transaction, no bridge, nothing in flight. The two steps below are universal only. +9. **On the far chain**, the destination account receives the message and runs the instruction list, entry by entry, each call made *by the user's own account* — which is why anything bought lands as the user's. **On Solana** the gateway moves the bridged funds to the destination account and makes the one approved call into the target program, with the destination account as signer; whatever the instruction produces lands in the token accounts the pins named. +10. **If the far side fails**, the funds return through Push Chain's infrastructure, and the credit path of chapter 4.2 applies (designed — not yet functional). Gas is never refunded: it was genuinely consumed. **A refund credit must not move any gas counter** — a permanent rule. +## Diagram — one agent action +```mermaid +sequenceDiagram + participant AG as Agent (EOA, or UEA of an external key) + participant W as Agent wallet + participant SS as SmartSession (engine) + participant U as URP + participant V as Session validator + participant GW as Gateway + participant DA as Destination account (far chain) + participant NP as Push-native protocol + + AG->>AG: universal (EVM): build nested layers:
far-chain call → instruction list (≤10) → gateway request → payload
universal (Solana): one program instruction → gateway request → payload
native: one flat call (contract, value, data) = payload + AG->>W: executeAsAgent(permission id, mode, payload) — the agent is the sender + W->>W: 1. engine still installed? caller == the permission's agent?
(refused by name otherwise, before the engine runs) + W->>W: 2. build the operation; write USE ‖ id ‖ caller into the signature field + W->>SS: 3. validate against the named permission + SS->>SS: identify the action by (target, function);
an ungranted pair dies here + SS->>U: 4. the whole of 2_UniversalRulesPolicy.md —
read the kind, run its rulebook, check every limit + U-->>SS: pass / fail (nothing spent on fail) + SS->>V: 5. LAST: is the address in the signature field the permission's agent? + V-->>SS: agent confirmed / rejected + SS-->>W: verdict + W->>W: 6. enforce the verdict and its validity window itself + W->>W: 7. refuse the wallet or the engine as target, whatever the verdict + alt universal permission + W->>GW: 8. call with the exact approved payload
(gateway sees the WALLET as caller) + GW->>DA: bridge token + instruction list + DA->>DA: EVM: run each instruction as the user's own account
Solana: one call into the target program, the user's account signing + Note over U,DA: far-side failure → funds return, spend credited back
(designed — not yet functional) · gas never refunded + else native permission + W->>NP: 8. call the named Push contract with the exact approved bytes
(the WALLET is the caller) + NP-->>W: whatever the call produced is the wallet's — done, one transaction + end +``` +--- +# 6 · The rules policy +URP — the Universal Rules Policy (`UniversalRulesPolicy`) — has its own document: [`2_UniversalRulesPolicy.md`](2_UniversalRulesPolicy.md). It covers why the contract exists, what it stores for each kind of rules set, what it opens, every gate of the universal EVM, Solana and native rulebooks, what it counts, what it deliberately does not do, and how a rules set's kind is fixed — with the flow diagrams. +--- +# 7 · What we adopted, and what that costs +Four external systems are load-bearing. For each: what we rely on it for, and the exact exposure that reliance creates. Nothing here is hidden as a footnote. +## 7.1 The permission engine (SmartSession) +- **Relied on for:** storing permissions and each one's agent, deriving their ids, running every policy, and consulting the session validator — the whole of chapter 5, steps 3–5. +- **What we get for free:** battle-tested storage and lifecycle code; removal that is pure storage deletion and cannot be blocked by any external call (`SmartSessionBase.sol:329-355`, `ConfigLib.sol:274-284`). +- **The costs, each one carried knowingly:** +\t- **Policies run before authentication** (`SmartSession.sol:340-352`). Every policy we ever attach must be safe on arbitrary calldata from anyone. This is a standing constraint on all future policy work, not just on URP. The wallet authenticates the sender before the engine runs, but the engine's own ordering is unchanged. +\t- **One policy class may legally be empty** (`SmartSession.sol:237-247`) — hence the wiring rule that nothing mandatory lives there. +\t- **The engine ships an owner-only function that resets a policy's counters in place.** v3 tooling never calls it, and the agent structurally cannot (it is owner-path only) — a named test proves the agent cannot reach it. But it survives upstream, and a future tool that called it would silently refill a budget. +\t- **At grant, the engine refuses only two targets: the zero address and itself** (`ConfigLib.sol:139-143`). It does **not** refuse its own wildcard marker at grant — only at validation. The wallet is therefore the only grant-time layer keeping that marker, and the two wildcard function markers, out of a native permission. The wallet refuses all three by name; a constant-mirror test pins each value against the vendored engine so a fork bump cannot silently move them. +\t- **The engine identifies an action by (contract, function) alone**, so two entries naming the same pair collapse to one configuration, and the second initialisation would be refused by URP with an error naming an opaque id. The wallet refuses duplicates first, naming the pair. +\t- **The engine truncates a policy's revert data to 32 bytes** before re-wrapping it — a selector and 28 bytes of the first argument. Every native-rulebook error is therefore ordered with its diagnostic value first (`2_UniversalRulesPolicy.md` §1.4b). Wallet errors do not pass through the engine and are not truncated. +## 7.2 The cross-chain gateway +- **Relied on for:** carrying value and instructions to the far chain, and being the *only* thing a universal agent action can touch (gate 3) — and the one thing a native action never may (gate N3, and the wallet's grant check). +- **The costs:** +\t- We inherit the gateway's availability and its bridge latency — the revocation window of chapter 4.4 is exactly this latency. +\t- The gateway's refund behaviour for our outbound direction is documented for the *inbound* direction only (`Revert_Handling.md:14` covers inbound; outbound is handled by Push core's own modules). Our exposure analysis of refund edge-cases is complete except for this one gap, recorded as an open question (chapter 11). It blocks nothing we build. +\t- **On Solana the far side is Push Chain's gateway program**, whose id differs per cluster. URP has no registry for it, so it is committed by the owner at grant from the chain registry (chapter 10). A wrong value weakens only that owner's permission, and fails closed on the pins. +\t- **On Solana the gateway makes one call per outbound.** A flow that needs two instructions — create a token account, then swap — is two outbounds, the later ones bridging nothing. A limit of the gateway, not of URP. +\t- **On Solana URP must parse exactly what Push Chain's validators parse.** The payload grammar of `2_UniversalRulesPolicy.md` §1.3 is theirs; a change to it on their side is a change URP must follow, and until it does every Solana request fails closed at S12. +## 7.3 The destination-account system +- **Relied on for:** the user's far-chain account — its creation, its address computation in both directions, and its obedience to gateway messages. +- **The costs, inherited not owned:** +\t- **Its factory is upgradeable by Push governance,** and the account templates can be rotated. Our guarantee that "the committed destination address is the user's account" is therefore inherited from Push's own governance discipline. We accept this on admin trust — Push's governance is our platform, not our adversary. One operational duty watches it (chapter 10): monitoring compares each permission's committed destination address against the current prediction, so a rotation that changes derivations is *detected* even though nothing on-chain prevents it. +\t- **A paused destination-account factory blocks a first outbound to a chain where the user's account does not yet exist.** Availability only; no funds at risk. +\t- **The account's own instruction loop is unbounded** in Push's code — our ten-entry bound (gate 13) is enforced on our side, and a note is open with Push core about theirs (chapter 11). +\t- **On Solana the destination account is a signer, not a caller.** Whatever program it is handed may act with its signature on every account in the list, including through that program's own inner calls. This is the one way the Solana rulebook is structurally weaker than the EVM one; `2_UniversalRulesPolicy.md` §1.4c's S17 and S18 narrow it, and chapter 9 states the remainder. +\t- **On Solana only the bridged token's account is created for the user automatically.** The gateway creates the destination account's token account for the bridged mint on first use; any other token account — a swap's output, say — must exist beforehand (chapter 10). +## 7.4 Push Chain's executor module +- **Relied on for:** the credit-back path — it is the one caller URP will believe about far-side failure. +- **The costs:** +\t- The whole credit-back feature is **gated on Push core work that has not landed** — the module does not yet call URP on failure. Until it does, the feature is inert and the counter-inflation limit of chapter 9 applies. +\t- Its on-chain address is written in Push's platform code (`UniversalCore.sol:50`) but **unconfirmed against a live deployment** — one of the two facts that must be confirmed before URP hardcodes anything (chapter 11). +\t- URP cannot verify the amounts it reports — trusted, with damage bounded by once-per-id and never-below-zero. +--- +# 8 · Guarantees +Every promise the system makes, with the mechanism behind it and the test that proves it. A promise with no mechanism is marketing; each of these names its enforcement. +| The promise | The mechanism | Proven by | +| ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| Nobody but you can ever own your wallet | Owner = creator, baked into the clone's bytecode; no function to change it | No code path accepts another owner — deployment attempts prove it | +| The agent can never spend a token you did not name | Gate 5: the one-token pin | A request naming any other token reverts | +| …never more per action than you set | Gate 6 | An over-cap request reverts | +| …never more in total than you set | Gate 7 + spend recorded before dispatch | Requests summing past the cap revert at the crossing point | +| …never for anyone's benefit but yours | Gate 15's beneficiary pin; on Solana, gate S17's account pins | A request naming any other beneficiary — on Solana, any other destination token account — reverts | +| …never touching any protocol you did not allow | Gate 15: the allow-list — on Solana, gate S16's exact (program, instruction) match | A request to an unlisted target or function — on Solana, an unlisted program or instruction — reverts | +| …never after the end date | Gate 2 — the expiry inside URP (N2 native, S2 on Solana) | A request after expiry reverts with no state change | +| …never instructing your far-chain account directly | Gate 14, including the destination account, checked before the allow-list; on Solana, gate S15, which adds the token, system, stake, loader and lookup-table programs and the gateway program | **Must revert even when that address is in the allow-list** — permanent tests, at grant and at validation on Solana | +| *Solana:* …never handing your account's other balances to the program | Gate S18: every value-holding account appears only where the matched rule pins it; the list always contains the destination account | A value-holding account at an unpinned position reverts — permanent test; a list without the destination account is refused at grant — permanent test | +| *Solana:* …never swapping below the floor you set | Gate S17's data pins — a floor relative to the input, a slippage ceiling, a zero fee | A swap whose output falls short of the ratio reverts, including one that raises the input to beat a static floor — permanent test | +| *Solana:* …never more per action than Solana can carry | Gate S6b | An amount above 64 bits reverts | +| A "failed" action can never deliver funds to the agent | Gate 10 (refunds come home) + gate 11 (no side recipient); on Solana, S10 + S11 and S14 (the recipient is the target program, nothing else) | A request with any of these fields wrong reverts | +| Only the permission's agent can act under it | The wallet checks the caller against the agent the permission names before the engine runs; the session validator checks the address the wallet wrote, last | Every other caller — the owner included — is refused by name | +| No request runs twice | Each agent action is the agent's own transaction — an EOA's nonce, or the UEA payload's nonce; the wallet keeps no agent replay state | A mined transaction cannot be mined again; the same call sent twice is two actions, each checked and metered | +| A request dies with its permission | Removal clears the permission's agent; a regrant gets a new id from the wallet's grant counter | **A request for the old id fails after revoke-and-regrant** — permanent test | +| One permission's request can never be charged to another | The call names its permission, whose agent must be the caller; URP keys every counter on that id | An agent acting under another agent's permission reverts | +| Revocation is immediate and unblockable | One owner call; removal is pure storage deletion, no external calls | Revocation succeeds with a hostile policy installed; next request fails | +| A change never mixes old and new states | Atomic revoke + regrant; spent-amount assertion gates it | The change reverts when the agent spent in the composition window | +| A failed action costs gas and nothing else | Whole-transaction revert unwinds every counter | Counters identical before and after a failed action | +| You can always withdraw everything | The owner door has no checks | Owner withdrawal succeeds in every degraded state we can construct | +| A module can never block its own removal | The uninstall callback runs defensively with a fixed 100,000-gas stipend; on revert or burn-out an event is emitted and removal proceeds anyway | A callback that reverts and one that burns all its gas are both still removed | +| The agent can never refill its own budget | The engine's reset is owner-path only; v3 tooling never invokes it | **The agent-cannot-reset negative test** — permanent | +| Your wallet address, once computed, stays valid | Address math frozen across factory upgrades | **The address-stability regression test** — permanent | +| *Native:* the agent can never call a Push contract or function you did not name | The engine's action identity, plus gates N4 and N5 asserting URP's own copies | A request to an ungranted pair dies at the engine; a mismatched copy reverts at URP | +| *Native:* …never with a pinned argument set to anything else | Gate N7 — full 32-byte equality at the frozen position | A request with any pinned word different reverts, including a correct address with dirty padding | +| *Native:* …never more native value, per call or in total | Gate N6 | An over-cap call reverts; calls summing past the lifetime cap revert at the crossing point | +| *Native:* …never more of a metered amount, per call or in total | Gate N8 | The same, on the metered argument | +| *Native:* …never more calls than you allowed | Gate N9, with every successful call counted | The (n+1)th call reverts; a zero-value call still consumes one | +| The agent can never make your wallet call itself or its engine | Refused at grant — never grantable — and refused again at dispatch, after validation, whatever the engine said | **Two permanent tests**, one of which reaches the engine as a target through the engine's own wildcard, enabled through the owner door | +| A native permission can never reach the gateway; a universal one can never reach anything else | The kind is derived from the chain and asserted against every target at grant; gate 3 and gate N3 mirror it at validation | A gateway target under this chain, and a non-gateway target under a foreign chain, both revert at grant — **permanent tests** | +| Two permissions of different kinds on one wallet never touch each other's counters | Separate storage per kind, keyed by action id | A native call moves no universal counter — asserted on the raw storage slot, not through a getter | +| A permission for a chain URP cannot check is never granted | The destination family is derived from the chain's namespace at grant; any namespace but `eip155:` and `solana:` is refused | A grant naming any other namespace reverts at initialisation | +| An 8183 evaluator can tell whether the owner touched the wallet during a job | Checkpoint counter: every owner-door call, grant and revoke advances it, before the call; agent actions never do | The checkpoint suite, including three permanent tests | +## The permanent tests +Thirty-one tests across the build documents and suites are marked permanent — **never to be deleted or weakened**. The four below are the ones this table's universal promises rest on directly. The other twenty-seven pin promises made elsewhere in this document: the owner path surviving every degraded state; the two routing pins; the session validator calling nothing — both of its entry points are pure, so no external call can reach the agent check; the agent door never touching the owner's replay lanes; the owner door touching only the checkpoint slot; the checkpoint taken before each owner call; a withdrawal batched after a snapshot made visible; agent actions never moving the checkpoint; the enable-mode-is-dead test; the request-body length constant; the seven native-permission tests (the wallet and the engine refused as targets at grant, the wallet and the engine refused at dispatch, a gateway target refused as native, a non-gateway target refused as universal, the wildcard markers refused, and gate N3 proven live); URP's exact external-function set; the refusal to re-initialise a universal configuration that has no mode record; and the eight Solana-rulebook tests (forbidden programs refused at grant, and again at validation; the value-holding list must contain the destination account; vacuous or impossible data-pin values refused; a redirected destination token account refused; the price floor relative to the input; a value-holding account at an unpinned position refused; and the forbidden program ids pinned against their published base58 forms). Each is the only thing pinning a promise that some future refactor will be tempted to break: +1. **Address stability** — the factory's address math never changes. Breaking it strands counterfactually funded addresses, with no migration remedy in existence. +2. **The forbidden destination-account rule beats the allow-list** — remove this and one owner mistake (allow-listing their own far-chain account) hands the agent everything that account holds. On Solana the same rule covers the forbidden programs of gate S15. +3. **A request for a revoked permission fails after regrant** — remove this and a revoke-and-regrant could leave the old id usable against the new budget. +4. **The agent cannot reset counters** — remove this and the lifetime cap is advisory. +--- +# 9 · What this system does not protect against +Thirty-four accepted limits. Each is a deliberate choice, stated without softening. A builder who "fixes" one of these is reverting a decision, not fixing a bug. Where an open question could change one, it is named in plain words. +## Keys and people +1. **A stolen owner key drains the wallet completely.** Deliberate: any brake on the owner is also a lock-out of the owner. Defence belongs to the user's key-management and identity layer — and what that layer actually guarantees is itself still an open question (chapter 11). +2. **Nobody can act while the owner is unreachable.** No guardian, no emergency contact. Deliberate. The open question "should an emergency contact return?" would change this. +3. ~~Whoever holds a signed request may submit it.~~ **CLOSED.** The agent door admits only the permission's agent as the caller; there is no signed request for anyone else to hold. +## Timing +4. **Revocation cannot recall an instruction already in flight.** The window is bridge latency. Deliberate — physics of bridging. The revoke screen must disclose it. +5. **There is no ceiling on how far ahead a permission may expire.** The user's choice is respected as given. The residual is the agent acting late within the authorised window — never theft, never an amount or target the user did not allow. Deliberate. +## Budgets +6. **Replacing a permission starts its counters at zero — tightening a cap can increase remaining authority.** Deliberate: silent compensation was judged worse than an honest reset. The product must show prior consumption before a new cap is set. +7. **The lifetime cap bounds bridging, not redeployment.** Money already across can be redeployed endlessly until expiry. Deliberate — the cap is exposure-from-the-wallet; the expiry is the time bound. +8. **The adopted engine contains an owner-only counter reset that survives upstream.** Our tooling never calls it; the agent structurally cannot. Deliberate adoption cost, held by a permanent test. +9. **There is no deny-list, so an owner may allow-list a token-approval function** — which hands the agent spending power outside every cap. Deliberate: the model is allow-list-only, and the owner's list is the owner's responsibility. The open question "should the contract refuse approval-granting functions?" would change this. +10. **Until Push core's failure-reporting lands, a failed far-side action leaves the spent counter inflated.** Deliberate and *temporary*. Remedy meanwhile: revoke and regrant. +11. **A refund credit's amount cannot be verified by URP.** Trusted from Push core; damage bounded by once-per-id and never-below-zero. +12. **Gas is never credited back on failure.** The gas was genuinely consumed. Deliberate, with a rule that no credit path may ever touch a gas counter. +## Mechanics +13. **An EOA agent has one sequential nonce and no per-request expiry.** A stuck transaction blocks that agent's next one, and a broadcast transaction stays valid until it is mined or replaced. Bounded by the permission's own expiry and by revocation; a UEA agent's payloads carry the UEA's own nonce and a deadline. Deliberate: replay protection is the sender's own, and the wallet keeps none for agents. +14. ~~Two relayers racing the same request: the loser wastes its gas.~~ **CLOSED.** There are no relayers on the agent door: only the agent submits its own call. +15. **Policies run before the engine consults the session validator** — an adopted-engine ordering. The wallet has already checked the caller, but the standing constraint holds: every policy, forever, must be safe on arbitrary calldata from any caller. +## Platform inheritance +16. **The destination-account templates can be rotated by Push governance.** Accepted on admin trust; monitoring detects derivation changes; nothing on-chain prevents them. +17. **The destination-account factory is upgradeable — our address-verifiability guarantee is inherited, not owned.** Accepted: Push governance is our platform. +18. **A paused destination-account factory blocks a first outbound to a new chain.** Availability only; funds are never at risk. +## Permanence +19. **If the wallet's creation bytecode ever drifted, every pre-computed and pre-funded address would be stranded, with no remedy.** That is why the address-stability test is permanent and the address math is frozen forever. +20. **Deployed v3 wallets can never be migrated.** No upgrade path exists by construction. The open question "when does that stop being acceptable?" records the revisit trigger — nothing more. +21. **Adding any wallet-wide guard later means every user moves to a fresh wallet.** The direct consequence of shipping a validator-only wallet. The product obligation to walk users through far-chain balances exists for exactly this future. + +## Operations + +22. **The factory can be paused, which temporarily blocks new wallet creation.** A user who computed and funded a wallet address in advance cannot deploy it while the pause is on, so those funds are unreachable until it is lifted. **Availability only** — nothing is lost, no existing wallet is affected, and no deployed wallet can be frozen by anyone. Deliberate: it is the system's only incident lever, and its blast radius is limited to signups. + +23. **A misbehaving agent can burn the wallet's native gas balance in fees, within its caps.** Every action costs the wallet native gas up to the per-action ceiling, and a redeploy-only rules set lets an agent act repeatedly without ever moving the spend counter. Bounded by exactly two things: **the gas balance the owner funded, and the expiry.** Deliberate — the alternative is a second counter on a second asset, and the wallet's own funding is already the honest limit. Obligation 15 makes the number visible before the user commits. + +## The limits contract itself + +27. **URP is upgradeable, so whoever holds its proxy admin can rewrite every limit in this document.** This is the most powerful role in the system, and it is stated here rather than left to be discovered. What that role *can* do: replace URP's logic, and with it every gate, cap and pin described in `2_UniversalRulesPolicy.md`. What it *cannot* do: reach into a permission's stored configuration or its counters directly, or touch a wallet's funds — an existing permission keeps its caps until new logic says otherwise, and the owner door never consults URP at all. The trust anchors URP was initialised with (the gateway, the credit-back caller, the engine) have no setter; the only route to changing them is a full implementation swap. **Deliberate, and a genuine trade:** URP previously held those anchors in bytecode and needed no admin trust at all, but a policy that cannot be corrected is a policy whose first mistake is permanent — and its storage layout is frozen and append-only precisely so that a correction cannot silently reinterpret permissions already granted. The mitigation is procedural, not structural: the admin should be a multisig behind a timelock, so a change is visible before it lands. Until it is, this item reads exactly as written. + +## Native permissions + +24. **An unpinned argument guards nothing.** The native rulebook locks the words the owner pinned and nothing else; an argument the owner did not pin is the agent's to choose. Allow-listing a token approval without pinning the spender hands the agent that approval — the native form of the no-deny-list rule (item 9). Deliberate: the contract compares words, it does not understand functions. Obligation 16 makes the SDK refuse to emit the unpinned form. +25. ~~The kind the wallet was told and the kind URP recorded can disagree.~~ **CLOSED.** The premise was that the wallet never decodes URP's initialisation data. It now decodes exactly one field of it — the chain — and both contracts derive the kind from that same value, so there is nothing for them to disagree about and the grant event reports a derived fact rather than a claim. The narrow exception this required is bounded and stated in `2_UniversalRulesPolicy.md` §1.7: one field, read only after the policy has been proven to be URP's, used only to choose which shape rules apply. The terms themselves remain URP's sole business. +26. **A native call limit counts calls, not effects.** An action with a call limit of ten lets the agent spend those ten on calls that move nothing. Deliberate — the alternative, not counting a zero-value call, makes the limit bypassable by exactly such calls. Obligation 18 says so on the grant screen. + +## Solana permissions + +28. **An account pin bounds where value is delivered, not what an allow-listed program may take.** On Solana the destination account signs the whole call, and that authority carries into every call the target program makes on the accounts it is handed. The forbidden set guards the top-level target only. S18, the data pins and a fixed account count narrow what the program is handed; obligation 20 narrows which programs are allowed at all. The remainder is trust in the allow-listed program's code — and Solana programs are commonly upgradeable, the same class of trust as an EVM proxy. +29. **The loss ceiling on Solana is not the lifetime cap.** The caps meter what is bridged per request. Swap outputs, leftovers, and anything anyone sends to the destination account or its token accounts are reachable by any allow-listed program handed those accounts. The honest ceiling is the wallet's balance plus everything the destination account holds. Accounts the owner did not list as value-holding are not judged by S18 at all — deliberately: the list is the owner's statement of what is worth protecting. +30. **A price floor is policy without an oracle.** A ratio floor set at grant goes stale as the market moves — refusing honest trades in one direction, permitting worse ones in the other. Deliberate: URP holds no price feed and makes no external call at validation. The remedy is a regrant, and obligation 21 makes the cadence part of the grant. +31. **Rent is a leak.** A program that creates accounts with the destination account as payer spends its SOL. Not preventable by pins; bounded only by which programs the owner allows. +32. **Swap outputs stay on Solana until the owner brings them home.** Gate S5 pins the outbound token to the permission's listed assets, so the agent can repatriate only a listed asset, never what it bought. The owner door can repatriate anything. Deliberate. Whether listing the output token as a second asset is a safe remedy is open — see `docs/multi-asset-review.md`. + +## Checkpoints + +33. **The checkpoint counter is coarse.** Any owner-door call advances it, harmless or not; the wallet cannot tell whether an arbitrary call moved value. Deliberate. +34. **The checkpoint counter is blind to what needs no wallet call.** An allowance the wallet granted before a job's snapshot can be pulled without the owner touching the wallet, and plain transfers in never tick. The evaluator decides how to treat balances. Deliberate. +--- +# 10 · What the product must do that the contracts cannot +Twenty-three obligations. The contracts cannot check any of them; each names what goes wrong if it is skipped. **Twenty-one of the twenty-three currently have no test anywhere — this is the largest untested surface in the design, and it is the surface users actually experience.** +## The grant and change screens +1. **Argument positions for beneficiary checks are generated from each protocol's interface by tooling — never typed by hand.** A wrong position makes gate 15's beneficiary pin check the wrong bytes: the beneficiary pin silently guards nothing. +2. **Every newly supported protocol ships a rejection test** — a wrong beneficiary and an oversized amount must be shown to revert before that protocol is offered to users. This obligation is itself the test for the previous one. +3. **The destination account address is derived by tooling, never pasted, and the grant screen shows it — and whether it is deployed yet.** A pasted address puts the beneficiary pin under a typo's control. +4. **The grant screen gives the expiry the same prominence as the cap.** Users who see "100" but not "90 days" are authorising more time than they know. +5. **The grant screen shows the destination account's current idle balance.** The agent's instructions can use whatever sits there — the user should see the real exposure, not just the new budget. +6. **An unlimited cap is displayed unmistakably as unlimited — never as a huge number.** A number that means "no limit" printed as digits is a deception. +7. **On a change, show what the old permission consumed before the owner picks the new cap.** Without it, the counters-reset edge (chapter 9, item 6) catches owners silently. The change flow's stale-state assertion forces the tooling to read the old value anyway — showing it costs nothing. +8. **The change flow must never silently shrink the owner's chosen new cap to compensate for prior spend.** The reset is honest; a hidden adjustment would be a lie in the other direction. +9. **The revoke screen states that an already-dispatched instruction still completes.** Otherwise revocation reads as a guarantee it is not (chapter 9, item 4). +## Partners and operations +10. **Launch partners are told, before integration, that rotating an agent's key means a new agent address — revoking and regranting every permission naming the old one, counters resetting with it.** A partner who rotates keys casually will burn its users' budgets. +11. **The agent funds its own gas** — an EOA agent holds PC, a UEA agent's gas path is funded — separate from any wallet balance. If it runs dry, every user's agent stops at once: an outage, not a security event, but an outage the product owns. +12. **A user moving to a new wallet version is told their far-chain balances do not move automatically, and is walked through each one.** No tooling for this exists yet; until it does, this is a support-ticket generator (and chapter 9, item 21, is why it will happen). +13. **Monitoring compares each permission's committed destination address against the current derivation.** This is the detection half of the admin-trust acceptances (chapter 9, items 16–17): drift is caught by operations, or not at all. + +## Wallet creation + +14. **At wallet creation, the interface shows the destination-chain account address this wallet will have on each supported chain.** Every new wallet the user creates means a new account on every chain they may reach. If that cost is not shown before they commit, they discover it later — usually when they find balances stranded on a wallet they stopped using. + +## Gas funding + +15. **The grant screen states how much native gas token the wallet holds, and how many actions that funds at the chosen per-action gas ceiling.** The wallet spends its own gas balance on every cross-chain action — **including actions that bridge nothing**, which is the redeployment path. So the gas balance is a second, independent budget that no cap in the rules set bounds. A user who funds a wallet generously with gas and grants a long expiry has authorised more agent activity than the token caps alone suggest. + +## Native permissions + +16. **Argument pins are generated from the Push contract's interface by tooling — never typed by hand — and an approval-granting function is refused unless its spender argument is pinned.** A wrong pin position fails closed: the word will not match and every call reverts. A *missing* pin fails open: the argument is unchecked (chapter 9, item 24). The SDK is the layer that knows what a function means; the contract only knows what was pinned. +17. **The chain is stated once, and the tooling states it exactly as the asset reports it.** The kind is no longer a variable tooling can carry two copies of — it is derived, by both contracts, from the one chain string in the policy blob (`2_UniversalRulesPolicy.md` §1.7). What remains is a *transcription* obligation: for a universal permission the string must be byte-exact what the asset's own chain view returns, or the grant is refused at initialisation; for a native one it is this chain's own identifier. A near-miss such as a different letter case is not corrected — it derives the other kind and is refused against the targets. +18. **The native grant screen shows, per action, the contract, the function, every pinned argument in human terms, the value and amount caps, and the call limit — and states that a call limit is consumed by any successful call, including one that moves nothing.** Eight actions with eight pins each is the ceiling on what a user may be asked to approve at once; the ceiling exists so that this screen stays readable, not for gas. + +## Solana permissions + +19. **Program rules, account pins and data pins are compiled from the program's interface, fetched at grant — never typed by hand — and the interface's hash is recorded on the grant.** Rules are exact to one instruction and never share a data-pin set with a sibling instruction: two instructions with fields of the same widths at the same offsets can mean opposite things. Every value-carrying account — the authority, the source, every destination, every fee account — is pinned, and every fixed-layout instruction has its exact account count set. An instruction whose value-carrying accounts, input amount or minimum output cannot be identified from the interface, or whose scalar fields sit between two variable-length fields, is refused rather than approximated. A program upgrade that shifts an instruction's layout silently moves every pin measured from the end; the pins are re-verified after any upgrade of an allow-listed program. A missing pin fails open (chapter 9, item 28); URP's "every rule has a pin" check is hygiene, not completeness. +20. **An aggregator is allowed only through its shared-accounts instruction**, so that the inner legs run under the aggregator's own authority and the destination account is never handed to a downstream exchange as signer. The variants that put the user's intermediate token accounts in the account list are never allowed. Each aggregator card is gated on a fork test showing the aggregator refuses a substituted downstream program. +21. **Every swap rule carries a price floor relative to its input, a slippage ceiling, and a zero fee** — a ratio floor (or an exact input plus a floor), an at-most pin on slippage, an equal-zero pin on every fee field. A static floor on the output alone is beaten by raising the input. The grant screen states the floor as a price and the regrant cadence it implies (chapter 9, item 30). +22. **The destination account and its token accounts are derived by tooling from the wallet's address and the gateway program, and the gateway program is taken from the chain registry — never from user input.** The value-holding list is the destination account plus its token account for the asset and for every output token the permission allows. A pasted key puts every pin under a typo's control. +23. **Output token accounts exist before the agent needs them.** The gateway creates only the bridged token's account. Others are created off-band, or by allowing the associated-token program's idempotent create instruction in one exact shape — fixed account count, the owner position pinned to the destination account and the mint position pinned to one allowed output token, one rule per token. Never as an instruction-less rule, which would match the program's other instructions too. +--- +# 11 · Open questions, and what must not be "fixed" +## 11.1 The two items that gate implementation +These are facts to confirm, not decisions to make. Nothing else in this chapter blocks code — only the executor module's address still gates implementation. +- **RESOLVED — the Ed25519 precompile is no longer used by this system.** A Solana-keyed agent acts through its UEA, which verifies the key itself; the wallet verifies no signature. +- **The executor module's address.** Written in Push's platform code but unconfirmed against a live deployment. Confirm before URP hardcodes its one trusted caller. +## 11.2 Design questions for the team — none blocks v3 +- **Should the contract refuse approval-granting functions outright?** Would close chapter 9, items 9 and 24 — for a native permission, the unpinned-spender form. Today: allow-list-only, owner's responsibility, with the SDK refusing the unpinned form (obligation 16). +- **Should an emergency contact return to the design?** Would close chapter 9, item 2. +- **Should the destination and refund locks also exist at the gateway layer?** Our layer locks both regardless; a second lock would be belt-and-braces. +- **When does "no wallet migration, ever" stop being acceptable?** The recorded revisit trigger for chapter 9, item 20. +## 11.3 With Push core +- **The executor module must call URP on outbound failure.** The one piece of Push-core work the credit-back feature waits on. Not agentic-wallet work. +- **The destination account's own instruction loop is unbounded** in Push's code. Ours is bounded at ten; theirs should be bounded too. +- **The gateway's refund behaviour for the outbound direction** is undocumented in the public revert-handling notes (inbound only). Completeness of our exposure analysis, nothing more. +- **Two admin-only paths can pay an agent-chosen refund destination for funds coming back from a destination account.** Push Chain never issues an automatic refund for an inbound that originates at a destination account, so on every automatic path the agent's choice of refund destination is never used. But the stuck-inbound revert and the rescue path, both of which need an admin action, pay that destination without checking where the inbound came from. The agent cannot trigger either alone. The fix is node-side — for such inbounds, refund to the destination account of the originating Push account, or refuse — and is not URP work. +## 11.4 Conventions and text +- **A UEA agent's payload deadline: 15 minutes recommended.** A convention of the agent's own tooling, not a wallet rule — the wallet sees only the sender. +- **The identity layer's recovery guarantees are not yet enumerated.** They are the only defence against chapter 9, item 1. Not this system's work, but this system's users' exposure. +- **One sentence in the internal rules document still overclaims** that no counter reset exists anywhere; it must be narrowed to "no agent-reachable reset" (chapter 7.1 has the truth). +## 11.5 Do not "fix" these +Sixteen things in this design look like mistakes to a fresh reader. Each is a decision. Every implementation task touching one of these must carry this list. +1. **Gas is never credited back on a failed action** — and no refund path may touch a gas counter. The asymmetry is correct: the gas was consumed. +2. **There is no paymaster and none is planned.** Agents submit their own calls and pay their own gas. Do not add sponsorship. +3. **The empty-recipient pin (gate 11) guards a path the current far-side code does not even read.** It is defence in depth against that code changing. Do not remove it as "dead". On Solana the same field is required and is the target program (S11, S14) — the opposite rule for the same field is correct for each family. +4. **The forbidden-target rule compares against the destination account, and it beats the allow-list.** Not a bug that it overrides the owner's own list — the permanent test demands exactly that. +5. **Widening and narrowing a permission share one path: revoke and regrant.** There is no separate, "safer" narrow-only edit. Do not add one. +6. **The configured destination chain is stored but never compared at validation.** The chain is pinned transitively by the token. The unused field is known and documented (`2_UniversalRulesPolicy.md` §1.6), not forgotten. +7. **The wallet's refusal of itself and the engine as dispatch targets runs after validation, not before.** Placed earlier it would pre-empt the engine's own refusals and change which error surfaces, and the engine-as-target case is only reachable at all through the engine's wildcard, which validation has to resolve first. Two permanent tests pin its position; do not move it. +8. **A native call limit is consumed by a call that sends no value and meters nothing.** Not a metering bug. The universal counter ignores a zero-amount request because it counts bridging; the native call counter counts calls, and a limit zero-value calls could slip past would be advisory. +9. **A value-only native action accepts empty call data and nothing else.** The engine buckets one to three bytes under the same action id; URP refuses them by name. That is what value-only means, not overreach. +10. **URP's kind-specific getters revert on a record of the other kind, and return zeros on an empty slot.** Both halves are deliberate: an empty slot is a state, a wrong-kind read is a caller bug. The mode getter never reverts and is the first call for anything that does not already know the kind. +11. **Eight actions, eight pins, thirty-two allow-list entries are sanity bounds, not gas bounds** — and so are a Solana permission's thirty-two program rules, sixteen account pins, eight data pins and eight value-holding accounts. They cap what a human is asked to approve and audit at once. Raising any of them is a design change, not a tuning. +12. **The gateway program is a forbidden Solana target, although calling it is not a drain.** It returns the permission's asset to the owner's own wallet, and the agent's refund destination is never paid on that path. It stays forbidden because under a one-asset permission it can bring home only leftover input — never what the agent bought — while spending the owner's gas and inbound capacity for nothing. Outputs come home through the owner door. A permanent test refuses it at grant and at validation. +13. **URP refuses a Solana rule with no account pin, though a single pin proves nothing.** One authority pin always passes. The check is hygiene; completeness is the tooling's job (obligation 19). A test deliberately grants a rule with one useless pin and shows URP accepts it, so nobody reads the check as a guarantee. +14. **A Solana permission's value-holding list must contain the destination account.** That is what keeps gate S18 always on. Do not relax it to allow an empty list "for simple permissions" — an empty list switches the defence off silently. Permanent test. +15. **Two Solana rules that could match the same instruction are refused at grant, though first-match would simply pick one.** It would pick the first, and the second rule's pins would never run — an owner would believe they had granted limits that do not exist. +16. **The owner door writes one storage slot — the checkpoint.** That is the only exception to "the owner door touches nothing"; it consults nothing and cannot revert, and a permanent test pins that it touches slot 0 and nothing else. +--- +*End of the architecture document. The decision register holds the checkable form of every ruling above; the phase planning document holds the reasoning. Changes to this document follow the same rule as the system it describes: nothing is edited silently — a change names the ruling it implements.* diff --git a/plan/agw/research/deployment-review-2026-10-06/source/docs/2_UniversalRulesPolicy.md b/plan/agw/research/deployment-review-2026-10-06/source/docs/2_UniversalRulesPolicy.md new file mode 100644 index 00000000..b1909996 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/docs/2_UniversalRulesPolicy.md @@ -0,0 +1,326 @@ +# UniversalRulesPolicy (URP) + +*The rules-policy chapter of the AGW architecture, kept as its own document. References to other chapters point to [`1_AGW.md`](1_AGW.md).* + +# 1 · URP — where the limits live +*URP — the Universal Rules Policy. One contract, three rulebooks: the **universal EVM** rulebook (§1.2–§1.4) descends from a v2 contract that has since been removed from the repository; the line references in those sections point into that removed file and are kept only as provenance for the reviewed logic URP reproduces. The **native** rulebook (§1.2b, §1.4b) and the **universal Solana** rulebook (§1.2c, §1.4c) are referenced by function name into `src/policies/UniversalRulesPolicy.sol`. **The authoritative specification is the contract itself, `src/policies/UniversalRulesPolicy.sol`, together with its test suite.** Every v3 extension to the universal rulebook is marked below.* +## 1.1 Why this contract exists +- The adopted permission engine identifies "what action is this?" by hashing **the target contract and the function being called on Push Chain**. +- But every agent action in this system is the *same* Push-side call: the wallet calling the gateway's send function. A market trade, a lending deposit, a transfer to a thief's address — **identical**, from the engine's point of view. +- The things the user actually cares about — which protocol, which function, whose benefit, how much — live *inside the call's data*, nested two layers deep, where the engine never looks. +- **URP is the contract that looks.** It is registered as the action policy for the one action that exists, and it unwraps the call data and checks everything inside — in the far chain's own format: an EVM instruction list for an EVM chain, a Solana instruction for Solana. Remove URP and the user's real limits are not enforced anywhere. That is why the engine's own floor — **at least one action policy per action** (`SmartSession.sol:285-299`) — combined with URP being that one policy, means the system fails closed: strip URP from a permission and the permission validates nothing at all, so every request dies. +- **For a native permission the blind spot is different, and smaller.** Here the engine's identity — the Push contract and the function — is exactly what the user cares about, so the engine itself already refuses a call to any contract or function the permission did not name. What the engine still cannot see is *how* the function is called: the arguments, the value attached, and how many times. URP's native rulebook checks those three. It is registered as the action policy on **each** of the permission's one to eight actions, and the fail-closed property is identical and per action: strip URP from any action and that action validates nothing. +- **URP decides which rulebook to run from a record it wrote at grant, not from the request.** §1.7 explains how that record is set, and why a request can never reach the wrong rulebook. +- Two wiring rules protect the fail-closed property. **Both are enforced in code, by the wallet's grant-shape check — a grant violating either one reverts:** +\t- **Never configure a fallback action policy** on an agent wallet. The engine supports a wildcard policy that catches unmatched actions; installing one would absorb requests that should die. For a universal permission this follows from the one-action shape; for a native permission the wallet refuses the engine's wildcard target and its two wildcard function markers **by name**, because the engine itself does not refuse the wildcard target at grant time (`1_AGW.md` chapter 7.1). +\t- **Never rely on the engine's other policy class** (checks on the outer operation) for anything mandatory — that class is allowed to be empty (`SmartSession.sol:237-247`). Everything mandatory lives in URP. +## 1.2 What URP stores — a universal permission's configuration (EVM chains) +Frozen at grant, per permission, written at initialisation: +| Field | Meaning | +| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| the tokens | One to eight PRC20s on Push (`assets`, at most `MAX_ASSETS`), each with its own caps and its own spent counter. No token twice. Every request must name one of them, **even at zero amount**: the token is what pins the destination chain — see §1.5. A permission with no token is refused at grant, on every grant path; a permission that should move nothing lists one token (the chain's gas token) with both limits at zero | +| per-action cap, per token | The most that one request may bridge in that token. Zero is legal: the token may route a request but never moves (the move-nothing permission) | +| lifetime cap, per token | The most that all requests together may bridge in that token. The largest representable number means unlimited; zero means nothing may move | +| PC-per-action cap | `maxGasPerCall`: the most native PC one request may carry — it pays the protocol fee and the gas swap, despite the name | +| the spent counters | One per token: the running total bridged in that token. Starts at zero. Money coming back to the wallet never lowers it | +| the expiry | The permission's end. Held **inside URP** so this one contract carries the complete mandatory set — no other policy needs to exist for the user to be safe | +| the destination account address | Computed and committed at grant. Everything must benefit this address | +| the allowed-calls list | Per entry: a far-chain contract address, a function on it, where that function's beneficiary argument sits, whether it has one, and a per-entry native-value cap. One to thirty-two entries | +## 1.2b What URP stores — a native permission's configuration, per action +A native permission holds one of these records **per action** — a permission with eight actions holds eight, each under its own action id. Frozen at grant, written at initialisation: +| Field | Meaning | +| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| the target | A defensive copy of the action's Push contract. The engine already routes by it; URP asserts it again at N4 so a mis-wired engine entry cannot pair one contract's rules with another's call | +| the function | A defensive copy of the action's function selector, asserted at N5. The value `0xFFFFFFFF` means **value-only**: a bare transfer of PC with **empty** call data — a function that merely takes no arguments is a normal four-byte selector, not value-only | +| the argument pins | Zero to eight. Each is a byte position in the call data — counted from byte zero, selector included, so 4 is the first argument — and the exact 32-byte word that must sit there. **Full-word equality**, so an address argument with anything in its upper twelve bytes is a mismatch, deliberately: the pin proves the padding is clean as well as the value | +| per-call value cap | The most native PC one call may carry | +| lifetime value cap | The most all calls together may carry. Largest number means unlimited | +| the value-spent counter | Running total of native PC sent. Starts at zero | +| the metered amount | Optional: on/off, a position in the call data read as a number, a per-call cap and a lifetime cap. Off is a flag, not "position zero" — position zero is a legal position, inside the selector | +| the amount-spent counter | Running total of the metered amount. Starts at zero | +| the call limit | How many successful calls the action permits. **Zero means unlimited** — the one cap in the system where zero is not "nothing" | +| the calls-used counter | Successful calls so far. **Moves on every successful call**, including one that sends no value and meters nothing | +| the expiry | The permission's end, held inside URP for the same reason as in the universal rulebook | +Two refusals happen at grant, not at validation: a native record may never name the gateway as its target, and a value-only record may carry neither pins nor a metered amount — such a record could never authorise anything, so it is a misconfiguration the owner believes they granted, not a valid strict one. +## 1.2c What URP stores — a universal permission's configuration (Solana) +Frozen at grant, per permission, written at initialisation. The first five fields mean exactly what they mean in §1.2; everything after them replaces §1.2's destination account and allowed-calls list: +| Field | Meaning | +| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| the tokens | One to eight, with per-token caps and counters, exactly as in §1.2. Each pins the destination chain | +| per-action and lifetime caps | In the token's base units — on Solana, lamports or the SPL token's base units | +| PC-per-action cap | The most native gas value one request may carry | +| the spent counters | One per token, as in §1.2 | +| the expiry | The permission's end, held inside URP | +| the destination account | The 32-byte key of the wallet's Solana account, derived by tooling and committed by the owner. Never a valid target | +| the gateway program | The 32-byte id of the gateway program on the declared cluster, from the chain registry. Never a valid target | +| the program rules | One to thirty-two. Per rule: a program, an instruction tag (its leading one to eight bytes) or the marker that the instruction carries no data, and optionally the exact account count the instruction must have | +| the account pins | Up to sixteen. Per pin: which rule, which position in the account list, and the key that must sit there. Every rule must carry at least one, and a position may be pinned only once per rule | +| the data pins | Up to eight. Per pin: which rule, an offset — from the start or from the end of the instruction data — a width of one to eight bytes (up to thirty-two for equality), and a comparison: equal, at least, at most, or a minimum ratio to a second field at its own offset | +| the value-holding accounts | Up to sixteen destination-side accounts the owner declares worth protecting: the destination account itself, which must be present, one token account per listed token and up to seven swap-output accounts. Each may appear in a request only where the matched rule pins it; a listed account no rule pins can never be passed. URP cannot check that every listed token's account is here (it cannot derive Solana token accounts), so tooling must list them. Gas grows with the number listed: about 6,000 per extra account on a ten-account request | +Refusals at grant, each with its own named error: no program rule may name a program the rulebook forbids as a target (§1.4c, gate S15); two rules on one program may not both be able to match the same instruction — an instruction-less rule against another instruction-less rule, or one tag a prefix of the other — so the first-match lookup is always exact; a fixed account count may not exceed the request bound, and no pin may sit beyond it; a data pin may not sit on an instruction-less rule, and its comparison value must be one the field can actually fail — a ceiling above the field's range, a ratio with a zero numerator, or an equality value encoded in the wrong alignment is refused; and the value-holding list may not contain the zero key, a duplicate, or an allow-listed program, and must contain the destination account. + +**One input per instruction.** Because two rules may not match the same instruction, each (program, instruction) has exactly one rule, and each position one pinned key. If a swap rule pins its input to the USDC account, USDT can never be that instruction's input. Using several listed tokens through one instruction means leaving the input position unpinned and those token accounts off the value-holding list, so only the output and price pins protect them. Several tokens in one Solana permission work best when different tokens are used by different instructions. +**And, beside any of the three configurations, the mode record**: whether this permission's URP record exists at all, which kind it is, and — for a universal permission — which destination family. §1.7. +## 1.3 What URP opens +Each validation performs a **two-level unwrap**: +- **Level one — the gateway request.** URP decodes the wallet's call to the gateway: the token, the amount, the native value, the routing fields, and the payload. +- **Level two — the instruction list.** Inside the payload sits the destination account's instruction list: up to **ten** entries of *(target, value, data)*. URP walks **every** entry. One bad entry — even the last — kills the whole request. +- **For Solana, level two is one instruction, not a list.** URP parses the payload in exactly the byte grammar Push Chain's validators decode — a four-byte account count, that many 33-byte account entries, a four-byte data length, the instruction data, an instruction id and the target program — and requires it to be **consumed exactly**: a short field or a trailing byte is refused, so URP and the validators can never read the same bytes two ways. Every length is checked before the read it guards; the parse is bounded at sixty-four accounts and 1,024 bytes of instruction data. Writable flags are read past, never judged — a wrong flag fails on Solana, not here. +- **A native validation opens nothing.** The call is already flat. URP reads 32-byte words out of the call data at the positions the permission froze, and never decodes it as a structure — it does not know, and does not need to know, what the function's arguments mean. Every read is bounds-checked in 256-bit arithmetic, so a crafted position can neither wrap nor read past the end. +## 1.4 The universal gauntlet — every gate, in order (EVM chains) +Run for a universal permission whose destination family is EVM (`_checkUniversal`). Each gate: what it demands, and what it stops. Any failure reverts the whole request with nothing spent. +| # | Gate | Demands | Stops | +| --- | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1 | **Configured** | This permission's configuration exists and is initialised (`:141`) | Requests against ghosts — ids never granted on this wallet | +| 2 | **Not expired** | The permission's own end date has not passed — **the expiry lives here, in URP** | Everything, after the deadline the user set. This is why URP alone is the complete mandatory set | +| 3 | **Gateway only** | The Push-side call target is the gateway, nothing else (`:143`) | The agent calling any Push contract directly — a token, the wallet, anything. The entire far-chain rulebook below is only sound because *everything* must pass through the gateway | +| 4 | **Send function only** | The gateway function is the outbound send, nothing else (`:145-147`) | Reaching any other gateway capability | +| 5 | **A listed token** | The bridged token is one of the permission's tokens — on **every** request, zero amount included | Spending any asset the user did not budget, and — because the gateway routes by the token — sending the permission's calls to a chain the user never approved | +| 6 | **Per-action cap** | Amount within **that token's** per-action cap | One oversized request | +| 7 | **Lifetime cap** | Amount plus everything already spent **in that token** within that token's lifetime cap | Death by a thousand cuts — many small requests. One token running out never limits another | +| 8 | **Gas-value cap** | Native PC attached within its cap (`:177`) | Draining the wallet's gas balance through the value field | +| 9 | **No uncapped gas swap** | The request's own gas-swap ceiling is non-zero *(v3 addition)* | An agent authoring the field's "no cap" value. The **owner** may set unlimited caps in the rules set; an **agent** may not author an unlimited request field | +| 10 | **Refunds come home** | The refund destination is the wallet itself (`:178-180`) | A "failed" transfer whose refund lands at the agent's address — failure as an exfiltration route | +| 11 | **No side recipient** | The bridged-funds recipient field is empty — funds may only travel with the instruction payload *(v3 addition)* | Any use of the gateway's direct-transfer mode. Defence in depth: the current far-side code ignores this field on the payload path, but URP does not lean on that staying true | +| 12 | **Instruction list only** | The payload is exactly a destination-account instruction list | Smuggling any other payload shape past the gates below | +| 13 | **At most ten** | Between one and ten instructions *(v3 constant)* | Unbounded lists that could exhaust validation gas | +| 14 | **No loopbacks** | No instruction may target the wallet, URP itself, the gateway — **or the destination account** (`:253-255`; the last is a v3 addition). **Checked before gate 15** | Self-calls and re-entry tricks; and — the v3 addition — the agent instructing the user's own account directly, which would hand it arbitrary control of everything that account holds. **This gate wins even if the owner allow-listed that address** — a permanent test pins exactly that | +| 15 | **The allow-list, and for the user only** | Every instruction's far-chain target *and* function appear in the allowed-calls list; and where the matched rule names a beneficiary argument, that argument equals the destination account (`:264-265`) | Everything. This is the only place in the entire system that checks the far-chain destination — and the beneficiary pin is what stops the agent trading honestly but making *itself* the beneficiary | +| 16 | **Per-entry value cap** | Each instruction's native value within its own cap | Value-draining through individual entries | + +> **There is no zero-amount gate.** v2 rejected a bridged amount of zero; v3 permits it, because that is the *redeployment* path — instructions travelling to capital already at the destination, with nothing new bridged. The counter correctly does not move. Without it an agent could buy but never sell. + +After every gate passes, URP **records the spend before the bridge is called** — effects first, so no ordering trick can spend twice against a stale counter. +## 1.4b The native gates — every gate, in order +Run only for a native permission (`_checkNative`). The same discipline as the universal gauntlet, for the same reason: this runs before the engine consults the session validator, on call data the engine has not yet authenticated. The wallet has already checked that the caller is the permission's agent, but URP does not rely on that. No external calls; every counter written last; any failure reverts the whole request with nothing spent. +| # | Gate | Demands | Stops | +| --- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| N1 | **Configured** | This action's native record exists and is initialised | Requests against ghosts — action ids never granted on this wallet | +| N2 | **Not expired** | The permission's end date has not passed — the expiry lives here, as in the universal rulebook | Everything, after the deadline the user set | +| N3 | **Never the gateway** | The call's target is not the gateway | The mirror of gate 3. A native permission cannot be written against the gateway (§1.2b), so on a permission the wallet created this cannot fire — it is defence in depth against a mis-wired grant, and a named test manufactures the state the wallet forbids to prove the gate is live | +| N4 | **The named contract** | The call's target equals the record's own copy of the target | A record reached through any action id but its own | +| N5 | **The named function** | The call's function equals the record's copy. Call data under four bytes counts as value-only — matching how the engine itself buckets short calls — and **a value-only call must carry empty call data, not one to three stray bytes** | Reaching any function but the one granted; and smuggling bytes under a value-only action | +| N6 | **Value caps** | Native PC attached within the per-call cap; attached plus everything already sent within the lifetime cap | Draining the wallet's PC through one large or many small calls | +| N7 | **The argument pins** | For every pin: the call data is long enough to hold the word at that position, and the word there equals the frozen value exactly | A beneficiary that is not the wallet; a spender that is not the intended contract; a pool id the owner did not choose; a correct address with dirty padding. **This is the only place a native call's arguments are checked**, and a missing pin is an unchecked argument (`1_AGW.md` chapter 9) | +| N8 | **The metered amount** | If the action meters an amount: the call data reaches it, the amount is within the per-call cap, and amount plus everything already metered is within the lifetime cap | Staking, approving, transferring or depositing more than the user allowed, per call or over the permission's life | +| N9 | **The call limit** | If the action has a limit: calls used so far are below it | The (n+1)th call — including a zero-value one, because every successful call counts | +After every gate passes, URP writes all three counters — value, amount, calls — **and only then**, so a request that fails at N9 has moved nothing at N6 or N8. It emits a metering event on every success, even when both value and amount are zero, because the call counter still moved. +**Every native error puts the value you debug with first.** The engine truncates a policy's revert data to 32 bytes — a selector plus 28 bytes of the first argument (`1_AGW.md` chapter 7.1). A native error therefore leads with the offending value (the word that did not match, the amount that was too large) rather than an index or a length, which would surface as zeros and tell nobody anything. The universal rulebook's errors predate this ordering and keep their reviewed shape; wallet errors are not truncated at all and do not follow it. +## 1.4c The Solana gauntlet — every gate, in order +Run for a universal permission whose destination family is Solana (`_checkSvm`). The same discipline as the other two: no external calls, the spend written last, any failure reverts the whole request with nothing spent. **Gates S1–S10 are gates 1–10 of §1.4, unchanged in meaning** — configured, not expired, gateway only, send function only, a listed token, the per-action cap, the lifetime cap, the gas-value cap, no uncapped gas swap, refunds come home — run against the Solana configuration. They do not depend on the far chain. From S11 on, the gates replace §1.4's 11–16: +| # | Gate | Demands | Stops | +| --- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| S6b | **Fits Solana's amount** | The bridged amount fits in 64 bits — Solana's amount type | An amount the far side would truncate. Runs beside S6 | +| S11 | **Recipient is a program** | The recipient field is exactly 32 bytes and not zero | The inverse of gate 11: on Solana the recipient is required, and is the program to call. An address in any other form — including a base58 string — fails closed | +| S12 | **One well-formed instruction** | The payload is non-empty and parses exactly in the validators' grammar (§1.3) — no short field, no trailing byte | A funds-only outbound, and any payload URP and the validators could read differently | +| S13 | **Execute only, within bounds** | The instruction id is *execute*; at most sixty-four accounts and 1,024 bytes of instruction data | The *withdraw* form, which no rule below can inspect — the Solana counterpart of gate 12 — and unbounded parsing | +| S14 | **Recipient and target agree** | The program named in the payload equals the recipient field | An ambiguity in the far-side path: the validators sign over one and build the transaction from the other. Two different values fail on Solana at the owner's gas cost; URP refuses the shape instead | +| S15 | **Never a forbidden program** | The target is not the System program, SPL Token, Token-2022, Stake, the upgradeable BPF loader, the address lookup table program, **the gateway program, or the destination account**. **Checked before S16** | Direct drains: each of these, called with the destination account as signer, can move or burn what it holds. The gateway program routes funds back to Push and is refused for the reason in 11.5. **This gate wins even if the owner allow-listed the program** — grant refuses it too, and a permanent test pins both | +| S16 | **The allow-list — exact match** | The (program, instruction tag) matches a rule; an instruction-less rule matches only empty instruction data; and if the rule fixes an account count, the request has exactly that many | Every program and instruction the owner did not name. Because grant forbids two rules that could match the same instruction, the first match is the only match — a rule can never be reached by an instruction its pins were not written for | +| S17 | **Account pins and data pins** | Every account pin of the matched rule: the position exists and holds the frozen key. Every data pin: the instruction data reaches the field, and the field equals, meets the floor, stays under the ceiling, or meets the ratio | A destination that is not the user's token account, an authority that is not the destination account; a non-zero fee, an over-wide slippage, a price floor not met. **The ratio form is what a swap needs**: a static floor on the output is beaten by raising the input to the whole balance | +| S18 | **Value-holding accounts only where pinned** | Any account on the permission's value-holding list that appears anywhere in the account list sits at a position the matched rule pins | Handing the program the destination account's *other* balances as extra accounts. On Solana the destination account signs the whole call, so an account passed is an account the program may spend from. The list must contain the destination account, so this gate is never off | +> **There is no zero-amount gate here either.** A zero-amount request is the Solana counterpart of the redeployment path — one instruction acting on capital already at the destination — and the counter does not move. + +After every gate passes, URP **records the spend** — the same counter discipline as §1.4. +## 1.5 What URP counts +- **The spent counters** — one per listed token — advance by the bridged amount, before dispatch, and only count bridging — `1_AGW.md` chapter 4.2's "bridged, not deployed" rule lives here. **They count what was sent out, never what came back**: URP cannot see money arriving at the wallet, and could not tell an agent's return from the owner's top-up, so a limit of 1000 with 600 sent and 300 returned leaves 400. Everything in this section applies to EVM and Solana alike. +- **The credit-back** *(v3 addition — designed, not yet functional)*: when a far-side execution fails and Push Chain's executor module reports it, URP reduces the named token's spent counter by the failed amount (the module passes the token; a credit can never touch another token's counter). Three properties bound this path: +\t- **module-only** — a single fixed caller, Push Chain's own executor module, may invoke it; the agent cannot fabricate a failure; +\t- **idempotent** — each failed cross-chain transaction id credits at most once; a second credit for the same id reverts (a named test); +\t- **saturating** — the counter never goes below zero. +\t- One honest limit: URP cannot verify the *amount* the module hands it; it trusts Push core. Idempotency and saturation bound the damage of a wrong amount. This is an accepted limit (`1_AGW.md` chapter 9). +- **Gas is never credited.** A failed action's gas was genuinely consumed. **A refund credit must not move any gas counter** — a permanent rule with its own test. +- **A native action counts three things**, all written after every gate passes: native value sent, the metered amount if the action has one, and calls. There is no credit-back and nothing to credit: a native call either succeeds or reverts inside one Push transaction, and a revert unwinds every counter with it. The credit-back path refuses to run against a native record. +## 1.6 What URP deliberately does not do +- **No expiry-distance ceiling.** It rejects the expired; it never rejects the distant-future. The user's chosen horizon is respected as given. +- **No deny-list.** Nothing rejects a function by name. If an owner allow-lists a token-approval function, that is permitted — and hands the agent spending power outside every cap. The product must warn; the contract will not refuse. Gate S15's forbidden programs are the Solana form of gate 14's loopbacks, not an exception: on Solana the token programs *are* the destination account's balances, so calling them directly with its signature is instructing that account directly. (An open question records whether this should change — `1_AGW.md` chapter 11.) +- **No direct destination-chain check.** The configured chain is stored but not compared at validation. The chain is pinned *transitively*: the one allowed token is a Push-side mirror specific to one origin chain, so fixing the token fixes the chain. A builder who notices the stored-but-unchecked field has found a known fact, not a bug. +- **No opinion about the owner.** URP runs only on the agent door. The owner's door never meets it. +- **No verification of Solana keys.** The destination account, its token accounts and the gateway program are 32-byte keys the owner commits; URP cannot run Solana's address derivation and does not try. A wrong key fails closed — the pins never match. +- **No bound on what an allow-listed Solana program does inside its own call.** Account pins bound *where value is delivered*; they cannot bound what a program the owner allow-listed takes from the accounts it is handed, because the destination account's signature carries into every call that program makes. The forbidden set guards the top-level target only. S18, the data pins and the fixed account count narrow this; the rest is trust in the allow-listed program's code — the same trust an EVM allow-list already expresses (`1_AGW.md` chapter 9). +- **No reading of Solana writable flags.** A pinned account passed read-only fails on Solana, not here. +- **No understanding of native calls.** The native rulebook compares words at positions; it does not know what a function does. A pinned argument is locked; an unpinned one is the agent's to choose. So allow-listing a token approval without pinning its spender hands the agent that approval — the native form of the no-deny-list rule. The SDK refuses to emit an unpinned approval (`1_AGW.md` chapter 10); the contract will not. +## 1.7 Which rulebook — how the kind is fixed, and locked three ways +- **The chain travels inside URP's initialisation data, and the kind is derived from it.** The engine passes each policy an opaque blob at grant; URP's blob is a chain identifier followed by the configuration body. URP hashes the chain, compares it to this chain's own identifier — computed from the chain id, never configured — and derives the kind exactly as the wallet did, from the same bytes. An empty chain produces a named error; a blob in any other shape reverts rather than mis-decoding. +- **For a universal permission URP derives one more thing: the destination family.** It reads the chain's namespace — the first seven bytes, `eip155:` or `solana:` — and chooses the EVM or the Solana configuration body and rulebook accordingly. Any other namespace is refused at grant with a named error, so a permission for a chain URP has no rulebook for can never be granted and then fail every request. The kind still comes from the full chain hash; the family is a second, narrower classification inside the universal kind, and URP never asks it of a native chain. The wallet does not derive the family at all: both universal families look identical to it — one action, the gateway's send. +- **URP writes a mode record beside the configuration** — initialised, which kind, and for a universal permission which destination family — and consults that record on every validation. It does not infer the kind from the data's shape, and it does not trust the request. Universal is the record's zero value, so an *empty* record cannot be told from a universal one by its kind field alone; the initialised flag is what is authoritative, and the mode field is meaningless without it. EVM is likewise the family's zero value, so a universal record whose family was never written is an EVM one — which is what every such record is. +- **A permission initialised as one kind can never be re-initialised as the other, or as itself.** The re-initialisation refusal reads the mode record and, beneath it, the universal configuration — so a universal configuration written before its mode record existed is still recognised, and is still protected. URP is upgradeable behind a proxy and its storage is append-only: the universal configuration, the credit-back set, the mode record, the native configuration and the Solana configuration each hold their own slot, and a later implementation may add state only after them. +- **The wallet and URP cannot disagree about the kind, because neither one authors it.** Both derive it from the same chain string in the same blob, with the same rule. The wallet reads that one field — and only that field, only after it has proven the policy is URP's — to choose which shape rules to apply; it still never inspects the terms, which remain URP's sole business. There is therefore no second author for the two to disagree with, and the grant event now reports a derived fact rather than a claim. +- **Three further layers remain, as defence in depth.** Gate 3 requires a universal request to target the gateway. Gate N3 refuses a native request that does. Native initialisation refuses a gateway target outright. Between them there is no shape in which a gateway call reaches a native record, and none in which a native call reaches a universal one. +- **And for a universal permission the chain is checked against the money** — identically for both families, which is what makes a Solana permission over an EVM chain's asset impossible to grant. At initialisation URP asks the asset which chain it came from — the same view the gateway reads on every outbound to decide where to route — and refuses the grant if it disagrees with the declared chain, or if the asset cannot answer. Because every request then pins that same asset, one check at grant makes the declared chain true for the permission's whole life, with no external call at validation time. +- **The mode is readable.** A getter returns the mode record — kind, family and chain — and never reverts; it is the documented first call for anything that does not already know a permission's kind. The universal EVM, universal Solana and native getters each revert, with the actual kind or family named, when asked about a record of another shape — a wrong-kind read is a caller bug — and each returns an all-zero record for an empty slot, which is a state, not an error. +## Diagram — the full agentic flow, Push Chain to an EVM chain, every gate +```mermaid +flowchart TB + subgraph OFF["Off-chain"] + AG["Agent builds the request\ +and calls the agent door itself"] + end + subgraph PUSH["Push Chain — one transaction"] + DOOR["Wallet: agent door\ +caller must be the permission's agent"] + ENG["Permission engine: look up the permission,\ +run its policies"] + subgraph GAUNTLET["URP — the gauntlet (any failure: revert, nothing spent)"] + G1["1 configured?"] --> G2["2 NOT EXPIRED"] --> G3["3 gateway only"] + G3 --> G4["4 send function only"] --> G5["5 the one token"] --> G6["6 per-action cap"] + G6 --> G7["7 lifetime cap"] --> G8["8 gas-value cap"] --> G9["9 gas-swap field non-zero"] + G9 --> G10["10 refunds come home"] --> G11["11 recipient EMPTY"] --> G12["12 instruction list only"] + G12 --> G13["13 at most ten entries"] + G13 --> G14["14 no loopbacks —\ +not the wallet, not URP, not the gateway,\ +not the destination account · BEFORE the allow-list"] + G14 --> G15["15 the allow-list + beneficiary:\ +target + function every entry,\ +beneficiary = destination account"] + G15 --> G16["16 per-entry value cap"] + end + SIGN["Session validator LAST:\ +the sender is the permission's agent"] + SPEND["URP records the spend\ +(before the bridge)"] + GW["Gateway: pulls the token,\ +emits the cross-chain message"] + end + subgraph FARC["Destination chain"] + DA["Destination account\ +runs each instruction as the user"] + PR["Allowed protocol\ +(the only reachable far-chain code)"] + end + EXE["Push Chain's executor module"] + + AG --> DOOR --> ENG --> G1 + G16 --> SIGN --> SPEND --> GW --> DA --> PR + DA -. "far-side failure: funds return" .-> EXE + EXE -. "credit the spend back\ +(module-only · once per tx id · never below zero)\ +DESIGNED — NOT YET FUNCTIONAL" .-> SPEND +``` +## Diagram — the native flow, every gate +```mermaid +flowchart TB + subgraph OFF["Off-chain"] + AG["Agent builds the request — one flat call —\ +and calls the agent door itself"] + end + subgraph PUSH["Push Chain — one transaction, start to finish"] + DOOR["Wallet: agent door\ +caller must be the permission's agent"] + ENG["Permission engine: identify the action by\ +(contract, function) — an ungranted pair dies here"] + subgraph NGATES["URP — the native gates (any failure: revert, nothing spent)"] + N1["N1 configured?"] --> N2["N2 NOT EXPIRED"] --> N3["N3 never the gateway"] + N3 --> N4["N4 the named contract\ +(record's own copy)"] --> N5["N5 the named function\ +value-only = EMPTY call data"] + N5 --> N6["N6 value caps\ +per call · lifetime"] + N6 --> N7["N7 every argument pin:\ +in bounds · exact 32-byte word"] + N7 --> N8["N8 metered amount:\ +in bounds · per call · lifetime"] + N8 --> N9["N9 call limit\ +(every call counts)"] + end + SIGN["Session validator LAST:\ +the sender is the permission's agent"] + METER["URP writes value · amount · calls\ +(all three, after every gate)"] + GUARD["Wallet refuses the wallet or the engine\ +as target, whatever the verdict"] + NP["The named Push contract\ +called by the WALLET, as itself"] + RES["Position · shares · claim →\ +credited to the wallet. Done."] + end + + AG --> DOOR --> ENG --> N1 + N9 --> SIGN --> METER --> GUARD --> NP --> RES +``` +## Diagram — the Solana flow, every gate +```mermaid +flowchart TB + subgraph OFF["Off-chain"] + AG["Agent builds the request — one Solana instruction —\ +and calls the agent door itself"] + end + subgraph PUSH["Push Chain — one transaction"] + DOOR["Wallet: agent door\ +caller must be the permission's agent"] + ENG["Permission engine: look up the permission,\ +run its policies"] + subgraph SGATES["URP — the Solana gauntlet (any failure: revert, nothing spent)"] + S1["S1–S10 = gates 1–10\ +configured · NOT EXPIRED · gateway · send ·\ +token · caps · gas · refunds home"] --> S6b["S6b amount fits 64 bits"] + S6b --> S11["S11 recipient = a 32-byte program"] --> S12["S12 one instruction,\ +parsed exactly"] + S12 --> S13["S13 execute only · bounded"] --> S14["S14 recipient = target program"] + S14 --> S15["S15 never a forbidden program —\ +system, token, stake, loader, lookup table,\ +gateway program, destination account · BEFORE the allow-list"] + S15 --> S16["S16 the allow-list:\ +(program, tag) exact match · account count"] + S16 --> S17["S17 account pins + data pins\ +(source · destination · authority ·\ +fee · slippage · price floor)"] + S17 --> S18["S18 value-holding accounts\ +only where pinned"] + end + SIGN["Session validator LAST:\ +the sender is the permission's agent"] + SPEND["URP records the spend"] + GW["Gateway: pulls the token,\ +emits the cross-chain message"] + end + subgraph SOL["Solana"] + DA["Destination account\ +(gateway PDA of the wallet) receives the funds"] + PR["The one allow-listed program,\ +called with the destination account signing"] + end + EXE["Push Chain's executor module"] + + AG --> DOOR --> ENG --> S1 + S18 --> SIGN --> SPEND --> GW --> DA --> PR + DA -. "far-side failure: funds return" .-> EXE + EXE -. "credit the spend back\ +DESIGNED — NOT YET FUNCTIONAL" .-> SPEND +``` +## Diagram — when things fail +```mermaid +flowchart TB + REQ["Agent request submitted"] + V{"Validation on Push Chain\ +(the agent check, gates 1–16, S1–S18 or N1–N9,\ +expiry, the session validator)"} + REV["Whole transaction reverts.\ +Nothing bridged, nothing spent,\ +counters unwound.\ +The agent paid gas — nothing else happened."] + OK["Dispatched through the gateway.\ +Spend recorded. Token bridged."] + NOK["Native: the Push contract was called.\ +Value · amount · calls recorded.\ +Complete — nothing in flight, nothing to credit."] + F{"Far-chain execution"} + DONE["Instructions ran as the user's account.\ +Proceeds sit in the user's destination account\ +(on Solana, its pinned token accounts)."] + FAIL["Far side failed.\ +Funds return via Push infrastructure."] + CREDIT["Executor module reports the failure to URP →\ +spent counter credited back.\ +DESIGNED — NOT YET FUNCTIONAL.\ +Until it lands: counter stays inflated;\ +remedy is revoke + regrant.\ +Gas is never credited — it was consumed."] + + REQ --> V + V -- "any gate fails" --> REV + V -- "all pass · native" --> NOK + V -- "all pass · universal" --> OK --> F + F -- "succeeds" --> DONE + F -- "fails" --> FAIL --> CREDIT +``` diff --git a/plan/agw/research/deployment-review-2026-10-06/source/docs/5_SDK_Owner_Integration.md b/plan/agw/research/deployment-review-2026-10-06/source/docs/5_SDK_Owner_Integration.md new file mode 100644 index 00000000..264778d6 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/docs/5_SDK_Owner_Integration.md @@ -0,0 +1,488 @@ +# AGW for the SDK — owner side + +What the SDK needs to create agentic wallets, grant and revoke rules, act as the owner, and read state, against the +**v4 deployment on Donut**. Owner side only: the agent side (`executeAsAgent`, building outbound requests) is out of +scope here. + +Everything below is taken from the deployed contracts (commit `e8db748`). ABIs: use the verified contracts on +[donut.push.network](https://donut.push.network), or the build artifacts in this repo (`out/.sol/.json`). + +--- + +## 1. The contracts the SDK talks to + +| Contract | Address (Donut, chain id `42101`) | What the SDK does with it | +|---|---|---| +| **AGWFactory** (proxy) | `0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF` | Predict, deploy and look up wallets | +| **AGW** (one per user) | address from `predictWallet` | Grant / revoke rules, owner actions, reads | +| **URP** (proxy) | `0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af` | Named inside every rule; read rule terms and spend | +| **SmartSession** (engine) | `0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a` | Read only: list a wallet's rules | +| **AgentValidator** | `0x068EE2388475A98EE1f5a434C58bFF3444fffFe6` | Named inside every rule; never called | +| UniversalGatewayPC (Push core) | `0x00000000000000000000000000000000000000C1` | Named as the target of every cross-chain rule | +| UniversalCore (Push core) | `0x00000000000000000000000000000000000000C0` | Look up a chain's gas token (`gasTokenPRC20ByChainNamespace`) | + +`AGW.SESSION_ENGINE()`, `AGW.RULES_POLICY()`, `AGW.SESSION_VALIDATOR()` and `AGW.UNIVERSAL_GATEWAY_PC()` return the +engine, URP, validator and gateway a wallet expects. Prefer reading them from the wallet over hard-coding. + +## 2. Five terms + +- **Owner**: the Push address that owns a wallet (an EOA, or the UEA of an external key). Fixed at deploy. +- **Wallet (AGW)**: a small contract account. It holds the funds the agent may use; its balance is the hard ceiling. +- **Rule**: what one agent may do from one wallet. Granted by the owner, stored in the engine and URP, immutable once + granted. Identified by a `rulesId` (`bytes32`). +- **Agent**: the Push address a rule names (an EOA, or the UEA of an external key). Never the owner. +- **Checkpoint**: a counter on the wallet that moves on every owner-side action (owner calls, grants, revokes), never + on agent actions. Evaluators compare it before and after a job. + +--- + +## 3. Wallets: predict, fund, deploy + +### Predict + +```solidity +function walletCount(address owner) external view returns (uint256); // also the next index +function predictWallet(address owner, uint256 index) external view returns (address wallet, bool deployed); +``` + +The address depends only on `(owner, index)` and never changes, so it can be shown and **funded before deployment** +(PC and PRC20s sent to it are there when it deploys). The next wallet is `predictWallet(owner, walletCount(owner))`. +`index` may be at most `walletCount(owner)`: predicting further ahead reverts `IndexOutOfRange(index, next)`. + +### Deploy + +```solidity +function deployWallet(string calldata label) external returns (address wallet); // caller = owner +function deployWalletWithSig(OwnerIntent calldata intent, bytes calldata sig, string calldata label) + external returns (address wallet); // relayed, see §7 +``` + +- `deployWallet` makes **the caller** the owner; there is no owner parameter. +- `label` is emitted in `WalletDeployed`, **not stored** on-chain. Read it from events. +- Deploys revert while the factory is paused (`EnforcedPause`). + +### Look up + +```solidity +function isWallet(address account) external view returns (bool); +function ownerOf(address wallet) external view returns (address); // address(0) if not a factory wallet +function indexOf(address wallet) external view returns (uint256); // reverts NotAWallet for a non-wallet +``` + +To list an owner's wallets: indices `0 .. walletCount(owner)-1` through `predictWallet`, or the `WalletDeployed` +events filtered by `owner`. + +--- + +## 4. Granting a rule + +```solidity +function grantRules(Session calldata session) external returns (bytes32 rulesId); // owner, or the wallet itself +``` + +One call grants one rule. A rule is a **`Session`** (the engine's struct) whose one policy is URP, carrying the terms +in an **envelope**. + +### 4.1 The Session, field by field + +```solidity +struct Session { + address sessionValidator; // AgentValidator 0x068E…FfFe6 (must equal wallet.SESSION_VALIDATOR()) + bytes sessionValidatorInitData; // abi.encode(address agent), agent != address(0) + bytes32 salt; // anything; the wallet overwrites it with its grant nonce + PolicyData[] userOpPolicies; // MUST be empty + ERC7739Data erc7739Policies; // MUST be empty: { allowedERC7739Content: [], erc1271Policies: [] } + ActionData[] actions; // see below + bool permitERC4337Paymaster; // MUST be false +} +struct PolicyData { address policy; bytes initData; } +struct ActionData { bytes4 actionTargetSelector; address actionTarget; PolicyData[] actionPolicies; } +struct ERC7739Data { ERC7739Context[] allowedERC7739Content; PolicyData[] erc1271Policies; } +struct ERC7739Context { bytes32 appDomainSeparator; string[] contentNames; } +``` + +Every action has **exactly one** policy: `{ policy: URP, initData: }`. Anything else reverts +`MalformedSessionShape`. + +Actions by rule kind: + +| Kind | `actions` | +|---|---| +| **Cross-chain** (EVM or Solana destination) | Exactly 1 action: `actionTarget = UniversalGatewayPC`, `actionTargetSelector = 0x77b86bec` (the gateway's `sendUniversalTxOutbound`) | +| **Native** (Push-side calls) | 1 to 8 actions, one per `(target, selector)` the agent may call; no duplicates; every action's envelope names the same chain | + +The **kind is never declared**: it is derived from the envelope's chain string. This chain (`"eip155:42101"`) means +native; any other `eip155:` or `solana:` chain means cross-chain. + +### 4.2 The envelope (`initData` of the URP policy) + +```solidity +initData = abi.encode(uint16 version, string chainNamespace, bytes body) +``` + +- `version` = **1** (`ENVELOPE_VERSION`). Anything else is refused (`UnsupportedEnvelopeVersion`). +- `chainNamespace`: CAIP-2 string, byte-exact. Destination chain for cross-chain rules (e.g. `"eip155:11155111"`, + `"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"`); `"eip155:42101"` for native rules on Donut. + (`URP.pushChainHash()` returns `keccak256("eip155:42101")` if you want to confirm.) +- `body`: `abi.encode(UniversalTerms)`, `abi.encode(SvmTerms)` or `abi.encode(NativeTerms)`, by kind. + +### 4.3 Cross-chain rule, EVM destination: `UniversalTerms` + +```solidity +struct UniversalTerms { + uint48 validUntil; // unix seconds, in the future; "never" = type(uint48).max + address expectedCEA; // the wallet's account on the destination chain + AssetCap[] assets; // 1..8 tokens the agent may move + uint256 maxGasPerCall; // PC (wei) the wallet may spend per outbound (protocol fee + gas) + AllowedCall[] allowedCalls; // 1..32 destination-chain calls the agent may make +} +struct AssetCap { + address token; // PRC20 ON PUSH (e.g. USDC.eth), never the destination chain's address + uint256 maxPerCall; // per request; 0 = this token can never move + uint256 maxTotal; // lifetime amount sent out; type(uint256).max = unlimited; 0 = nothing +} +struct AllowedCall { + address target; // destination-chain contract + bytes4 selector; // destination-chain function + uint16 beneficiaryOffset; // byte offset of the beneficiary argument: 4 + 32 * argIndex + bool hasBeneficiary; // if true, that argument must equal expectedCEA + uint256 maxValue; // native value per call, in DESTINATION-chain units; 0 = non-payable +} +``` + +ABI tuple: `(uint48,address,(address,uint256,uint256)[],uint256,(address,bytes4,uint16,bool,uint256)[])` + +Rules the contracts enforce at grant (each with a named error, §10): + +- **At least one token, at most 8, no duplicates.** A rule with no token is refused (`AssetListOutOfRange(0)`): the + gateway picks the destination chain from the request's token, so a rule without a token has no chain. +- **Every token's chain must equal the rule's chain**: URP calls `token.SOURCE_CHAIN_NAMESPACE()` and compares + (`ChainMismatch`, `InvalidAsset`). It checks the chain, **not which token**, so picking the right PRC20 is the SDK's job. +- `expectedCEA` non-zero; `allowedCalls` 1..32; `validUntil` non-zero and in the future. + +What the SDK has to resolve: + +- **Token → PRC20**: users give the destination chain's token (e.g. `MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC`); convert + with `PushChain.utils.tokens.getPRC20Address(...)` and confirm `SOURCE_CHAIN_NAMESPACE()` equals the rule's chain. +- **A rule that moves no tokens**: the contracts refuse an empty list, so the SDK adds the destination chain's gas + token with both limits at 0: `UniversalCore.gasTokenPRC20ByChainNamespace(chain)` (Sepolia: pETH + `0x2971824Db68229D087931155C2b8bB820B275809`). Add it only when the user lists no token, or it would duplicate. +- **"No total limit"**: encode `maxTotal = type(uint256).max`. Do not encode 0; 0 means nothing may move. +- **`expectedCEA`**: the wallet's CEA on the destination chain, from that chain's CEA factory: + `getCEAForPushAccount(walletAddress) returns (address cea, bool isDeployed)`. +- **`beneficiaryOffset`**: from the function ABI, `4 + 32 * argIndex` (e.g. Aave `supply(address,uint256,address,uint16)`, + `onBehalfOf` is argument 2, offset 68). + +One rule may list several tokens and several protocols. Limits are **per token**; there is no combined limit across +tokens, and every listed token may be used with every allowed call. Different scopes need separate rules. + +### 4.4 Cross-chain rule, Solana destination: `SvmTerms` + +```solidity +struct SvmTerms { + uint48 validUntil; + bytes32 expectedCEA; // PDA(["push_identity", wallet], gatewayProgram) + bytes32 gatewayProgram; // the Push gateway program on that cluster (from the chain registry) + AssetCap[] assets; // 1..8, same as §4.3; request amounts must fit u64 + uint256 maxGasPerCall; + bytes32[] ceaAccounts; // the CEA's value-holding accounts, max 16, MUST include expectedCEA + AllowedProgram[] programs; // 1..32 allowed (program, instruction) pairs + SvmAccountPin[] pins; // max 16 account pins + SvmDataPin[] dataPins; // max 8 instruction-data pins +} +struct AllowedProgram { bytes32 program; bytes8 discriminator; uint8 discriminatorLen; bool dataless; uint8 maxAccounts; } +struct SvmAccountPin { uint8 ruleIndex; uint8 accountIndex; bytes32 expected; } +struct SvmDataPin { uint8 ruleIndex; bool fromEnd; uint16 offset; uint16 offsetB; uint8 len; + uint8 mode /* 0 EQ, 1 GTE_LE, 2 LTE_LE, 3 RATIO_GTE_LE */; bytes32 expected; uint64 num; uint64 den; } +``` + +What the SDK must get right (all checked at grant, named errors): + +- `ceaAccounts`: the CEA plus **the CEA's token account for every listed token** and any swap-output accounts. URP + cannot derive Solana token accounts, so it cannot check this; an unlisted account is unprotected. +- **One rule per (program, instruction).** Each position takes one pinned key, so if a swap rule pins its input to the + USDC account, USDT cannot be that instruction's input. Plan Solana rules so different tokens use different instructions. +- Every program rule needs at least one account pin; `discriminatorLen` is 1..8, or 0 exactly when `dataless`. +- System, SPL Token, Token-2022, Stake, the upgradeable loader, the lookup-table program, the gateway program and the + CEA itself can never be allowed programs. + +Field-level detail: `docs/2_UniversalRulesPolicy.md` §1.2c. + +### 4.5 Native rule (Push-side calls): `NativeTerms`, one per action + +```solidity +struct NativeTerms { + uint48 validUntil; + address target; // MUST equal this action's actionTarget + bytes4 selector; // MUST equal this action's actionTargetSelector; 0xFFFFFFFF = plain PC transfer + uint256 maxValuePerCall; // PC (wei) per call + uint256 maxValueTotal; // lifetime PC; type(uint256).max = unlimited + AmountRule amount; // optional metering of one uint256 argument + uint32 maxCalls; // 0 = unlimited + ArgPin[] pins; // 0..8 arguments that must equal a fixed word +} +struct AmountRule { bool enabled; uint16 offset; uint256 maxPerCall; uint256 maxTotal; } +struct ArgPin { uint16 offset; bytes32 expected; } // offset counts from byte 0, selector included: 4 = first argument +``` + +ABI tuple: `(uint48,address,bytes4,uint256,uint256,(bool,uint16,uint256,uint256),uint32,(uint16,bytes32)[])` + +- `target`/`selector` must match the action they sit in. The contracts do not cross-check at grant, and a mismatch + makes the rule unusable. +- Targets that can never be granted: the gateway (use a cross-chain rule), the wallet, the factory, the engine, URP, + the validator, `address(0)`, `address(1)`. +- A plain PC transfer (`0xFFFFFFFF`) carries no pins and no amount rule. + +### 4.6 The `rulesId` + +`grantRules` returns it, and `RulesGranted(rulesId, …)` carries it. It is also predictable before sending: + +``` +rulesId = keccak256(abi.encode(address sessionValidator, bytes sessionValidatorInitData, bytes32(grantNonce))) + // grantNonce = wallet.grantNonce() at the moment of the grant; it advances by 1 on every grant +``` + +Equivalently, call `SmartSession.getPermissionId(session)` with `salt = bytes32(grantNonce)`. Ids never repeat, even +for byte-identical rules granted twice. + +### 4.7 Encoding a cross-chain rule (viem) + +```ts +import { encodeAbiParameters, parseAbiParameters, parseEther, maxUint256, zeroHash } from 'viem'; + +const terms = encodeAbiParameters( + parseAbiParameters('(uint48,address,(address,uint256,uint256)[],uint256,(address,bytes4,uint16,bool,uint256)[])'), + [[validUntil, expectedCEA, + [[USDC_ETH, 100_000000n, 1000_000000n], [USDT_ETH, 50_000000n, maxUint256]], + parseEther('1'), + [[aavePool, '0x617ba037', 68, true, 0n], [usdcSepolia, '0x095ea7b3', 0, false, 0n]]]], +); +const initData = encodeAbiParameters(parseAbiParameters('uint16, string, bytes'), [1, 'eip155:11155111', terms]); + +const session = { + sessionValidator: wallet.SESSION_VALIDATOR, // 0x068E…FfFe6 + sessionValidatorInitData: encodeAbiParameters([{ type: 'address' }], [agent]), + salt: zeroHash, + userOpPolicies: [], + erc7739Policies: { allowedERC7739Content: [], erc1271Policies: [] }, + actions: [{ + actionTargetSelector: '0x77b86bec', // gateway sendUniversalTxOutbound + actionTarget: '0x00000000000000000000000000000000000000C1', // UniversalGatewayPC + actionPolicies: [{ policy: URP, initData }], + }], + permitERC4337Paymaster: false, +}; +// wallet.grantRules(session), from the owner +``` + +--- + +## 5. Revoking and replacing rules + +```solidity +function revokeRules(bytes32 rulesId) external; // owner, or the wallet itself; UnknownPermission if not live +function revokeAllRules() external; // owner, or the wallet itself +``` + +Revocation is immediate on Push and cannot be blocked. An outbound already sent across the bridge still completes. + +**Rules are immutable.** To "update" one, the owner sends **one batch through the owner door** (§6): + +1. `URP.assertSpent(configId, wallet, expectedSpent)` — reverts if the agent spent since the SDK read the counters; +2. `wallet.revokeRules(oldRulesId)`; +3. `wallet.grantRules(newSession)`. + +If step 1 reverts, nothing changes. Counters start at zero on the new rule. `assertSpent` forms: + +```solidity +// cross-chain (EVM or Solana): one expected value per listed token, IN THE ORDER THE RULE LISTED THEM +function assertSpent(ConfigId id, address account, uint256[] calldata expectedSpent) external view; +// native: per action +function assertSpent(ConfigId id, address account, uint256 expectedValueSpent, uint256 expectedAmountSpent, uint32 expectedCalls) + external view; +``` + +--- + +## 6. The owner door: `execute` + +```solidity +function execute(bytes32 mode, bytes calldata executionCalldata) external payable; // owner only +``` + +The owner acts as the wallet with **no rule checked**: withdraw, approve, call anything, or call the wallet's own +`grantRules` / `revokeRules` in a batch. + +| | `mode` | `executionCalldata` | +|---|---|---| +| Single call | `0x0000…00` (32 zero bytes) | `abi.encodePacked(address target, uint256 value, bytes callData)` | +| Batch | `0x01` followed by 31 zero bytes | `abi.encode(Execution[])`, `Execution = (address target, uint256 value, bytes callData)` | + +Other modes (delegatecall, try) revert `UnsupportedExecutionMode`. Every call in an owner action records one +checkpoint. Withdraw PC: single call to the destination address with `value = amount, callData = 0x`. Withdraw a +token: single call to the token with `transfer(to, amount)`. + +--- + +## 7. Relayed owner actions: `OwnerIntent` + +For owners who sign but do not send (a Push EOA without gas, or a relayer-driven flow). The owner signs one EIP-712 +`OwnerIntent`; the named `executor` submits it. + +```solidity +struct OwnerIntent { + address owner; // the wallet owner + address wallet; // the wallet (its predicted address if not deployed yet) + address executor; // the ONLY address allowed to submit this intent + uint96 index; // deploy: must equal factory.walletCount(owner) + bytes32 sessionHash; // grant: keccak256(abi.encode(session)) of the session AS SUBMITTED; 0 = no grant + bytes32 mode; // execute: the mode word + bytes32 execCalldataHash; // execute: keccak256(executionCalldata); 0 = no execute + uint192 nonceKey; // execute: lane key; the top bit (1 << 191) MUST be set + uint64 nonceSeq; // execute: must equal wallet.getNonce(nonceKey) + uint64 grantNonce; // grant: must equal wallet.grantNonce() + uint48 deadline; // unix seconds; every door rejects after it + uint256 signerChainId; // the chain id the owner's wallet signs under (their home chain) +} +``` + +EIP-712 type string (fields in this order): + +``` +OwnerIntent(address owner,address wallet,address executor,uint96 index,bytes32 sessionHash,bytes32 mode,bytes32 execCalldataHash,uint192 nonceKey,uint64 nonceSeq,uint64 grantNonce,uint48 deadline,uint256 signerChainId) +``` + +Domain: `name "AGWFactory"`, `version "1"`, `chainId = signerChainId`, `verifyingContract = factory proxy` +(`0xaF88…1aaF`, also for wallet doors), `salt = bytes32(uint256(42101))`. Check the local derivation against +`factory.domainSeparator(signerChainId)` (or `wallet.domainSeparator(...)`, identical) before prompting. + +| Door | Contract | Fields it checks | +|---|---|---| +| `deployWalletWithSig(intent, sig, label)` | factory | `owner`, `index`, `wallet` (= predicted), `executor`, `deadline` | +| `grantRulesWithSig(session, intent, sig)` | wallet | `wallet`, `owner`, `executor`, `deadline`, `sessionHash`, `grantNonce` | +| `executeWithSig(mode, executionCalldata, intent, sig)` | wallet | `wallet`, `owner`, `executor`, `deadline`, `mode`, `execCalldataHash`, `nonceKey`, `nonceSeq` | + +- **One signature can cover all three doors**: each door checks only its own fields, and each is single-use (deploy: + the index advances; grant: the grant nonce advances; execute: the lane sequence advances). +- **Several rules in one signature**: put a batch of the wallet's own `grantRules` calls in `executeWithSig` + (`grantRulesWithSig` grants exactly one). +- `executeWithSig` is **not payable**; value comes from the wallet's balance. +- Signature check: an owner with no code is verified by ECDSA; a contract owner by its UEA method + (`verifyUniversalPayloadSignature`), then ERC-1271. A **Solana-key owner's UEA must already exist on Push** before + its first signed intent. +- If the owner calls `deployWalletWithSig` directly, no signature is needed. + +--- + +## 8. "Create a wallet with rules" in practice + +| Owner | How | +|---|---| +| **UEA** (external key) | One UEA multicall, one signature: `factory.deployWallet(label)` then `predictedWallet.grantRules(session)` per rule. | +| **Push EOA**, sends its own txs | Two transactions: `factory.deployWallet(label)`, then `wallet.execute(batch of wallet.grantRules(...))`. | +| **Push EOA via a relayer** | One signature: an `OwnerIntent` with the deploy fields plus an execute batch of self-grants. The relayer sends `deployWalletWithSig`, then `executeWithSig`. | + +Fund the wallet with PC (for the agent's per-call fees) and the tokens the rules allow, at its address, before or after +deployment. + +--- + +## 9. Reading state + +| To get | Call | +|---|---| +| A wallet's live rules | `SmartSession.getPermissionIDs(wallet)` → `bytes32[]` | +| Is a rule live | `SmartSession.isPermissionEnabled(rulesId, wallet)` | +| The rule's agent | `wallet.agentOf(rulesId)` (zero if revoked or unknown) | +| Kind, VM family, chain | `URP.getMode(configId, wallet)` → `{initialized, mode (0 cross-chain, 1 native), vm (0 EVM, 1 Solana), chainHash}` | +| Cross-chain EVM terms + spend | `URP.getConfig(configId, wallet)` → `{initialized, validUntil, expectedCEA, maxGasPerCall, assets[], allowedCalls[]}`, each asset `{token, maxPerCall, maxTotal, spent}` | +| Solana terms + spend | `URP.getSvmConfig(configId, wallet)` (same `assets[]` with `spent`) | +| Native terms + spend | `URP.getNativeConfig(configId, wallet)` → `{…, valueSpent, amountSpent, callsUsed, …}` | +| Checkpoints | `wallet.checkpointCount()`, `wallet.lastCheckpointBlock()`, `Checkpointed` events | +| Owner / factory | `wallet.owner()`, `wallet.factory()` | +| Next grant nonce | `wallet.grantNonce()` | +| Owner lane position | `wallet.getNonce(nonceKey)` | + +**`configId`** (the key URP reads take), per action: + +``` +actionId = keccak256(abi.encodePacked(address target, bytes4 selector)) +actionPolicyId = keccak256(abi.encodePacked(bytes32 rulesId, actionId)) +configId = keccak256(abi.encodePacked(address wallet, actionPolicyId)) +``` + +- Cross-chain rule: one action, `target = UniversalGatewayPC`, `selector = 0x77b86bec`, so the `configId` follows from + `rulesId` alone. +- Native rule: one `configId` per action; use each action's `(target, selector)` from the session the SDK built (or + decode the grant transaction's input). +- `getConfig` reverts `WrongModeForCall` / `WrongVmForCall` if called on the wrong kind; call `getMode` first when + unsure. An empty slot returns a zeroed struct. +- `spent` counts what was **sent out**. Money coming back to the wallet does not lower it. + +The contracts do not enforce one rule per agent per chain. A wallet can hold several rules for the same agent and +chain, so a lookup by `(agent, chain)` can return more than one. + +--- + +## 10. Events + +| Contract | Event | Notes | +|---|---|---| +| Factory | `WalletDeployed(address indexed owner, uint256 indexed index, address indexed wallet, string label)` | The only place `label` lives | +| Wallet | `AccountInitialized(address indexed owner, address indexed engine)` | Emitted once at deploy | +| Wallet | `RulesGranted(bytes32 indexed rulesId, uint8 mode, bytes32 indexed chainHash, string chainNamespace)` | `mode`: 0 cross-chain, 1 native | +| Wallet | `RulesRevoked(bytes32 indexed rulesId)` | Once per revoked id | +| Wallet | `OwnerExecuted(bytes32 indexed mode, bytes32 executionCalldataHash)` | `execute` | +| Wallet | `OwnerExecutedWithSig(bytes32 indexed mode, bytes32 executionCalldataHash, uint192 nonceKey, uint64 nonceSeq)` | `executeWithSig` | +| Wallet | `Checkpointed(uint64 indexed seq, uint8 kind, bytes32 ref, uint64 blockNumber)` | `kind`: 0 owner action (`ref` = `keccak256(abi.encode(target, value, callData))`), 1 rules granted, 2 rules revoked (`ref` = `rulesId`) | +| Wallet | `RulesActionAuthorized(bytes32 indexed rulesId, address indexed agent, bytes32 callsHash)` | An agent action passed (agent side) | +| URP | `OutboundMetered(bytes32 indexed id, address indexed multiplexer, address indexed account, address token, uint256 amount)` | A cross-chain spend was counted | +| URP | `NativeCallMetered(bytes32 indexed id, address indexed multiplexer, address indexed account, uint256 value, uint256 amount)` | A native call was counted | + +--- + +## 11. Errors the owner side can hit + +All are custom errors with arguments; decode with the contract ABIs. URP errors raised during a grant reach the caller +in full (they come through the wallet). + +| When | Errors | +|---|---| +| **Deploy** | `IndexMismatch(expected, provided)`, `IntentWalletMismatch`, `ExecutorMismatch`, `SignatureExpired`, `InvalidOwnerSignature`, `EnforcedPause` | +| **Grant: session shape** (wallet) | `MalformedSessionShape`, `TooManyActions(n)`, `DuplicateAction(target, selector)`, `ForbiddenActionTarget(target)`, `ForbiddenActionSelector(selector)`, `RulesTypeMismatch(mode, actionIndex, target)`, `EmptyChain`, `InconsistentChain(actionIndex)`, `CallerIsNotOwner` | +| **Grant: envelope** (URP) | `UnsupportedEnvelopeVersion(firstWord)`, `EmptyChain`, `UnsupportedNamespace(chainHash)` (chain is neither `eip155:` nor `solana:`; declared in `PushChainLib`) | +| **Grant: cross-chain terms** (URP) | `AssetListOutOfRange(length)`, `DuplicateAsset(token)`, `InvalidAsset(token)`, `ChainMismatch(declared, assetChain)`, `InvalidConfigField`, `AllowListOutOfRange(length)`, `InvalidExpiry(validUntil)` | +| **Grant: Solana terms** (URP) | `InvalidSvmConfigField`, `ProgramListOutOfRange`, `TooManySvmPins`, `TooManySvmDataPins`, `TooManyCeaAccounts`, `DiscriminatorLenOutOfRange`, `AmbiguousRule`, `ForbiddenProgramInAllowList`, `SvmPinRuleOutOfRange`, `SvmPinIndexOutOfRange`, `SvmMaxAccountsOutOfRange`, `DuplicateSvmPin`, `InvalidCeaAccount`, `CeaAccountsMissExpectedCEA`, `SvmDataPinInvalid`, `RuleWithoutPin` | +| **Grant: native terms** (URP) | `NativeTargetZero`, `NativeTargetIsGateway`, `TooManyPins`, `ValueOnlyWithPins`, `ValueOnlyWithAmountRule`, `InvalidExpiry` | +| **Revoke** | `UnknownPermission(rulesId)`, `CallerIsNotOwner` | +| **Update batch** | `AssetSpentMismatch(token, expected, actual)`, `SpentLengthMismatch(expected, actual)`, `SpentMismatch(expected, actual)` (native), `NotInitialized`, `WrongModeForCall` | +| **Owner door / signed doors** | `CallerIsNotOwner`, `UnsupportedExecutionMode`, `MalformedBatchCalldata`, `OwnerSigExpired`, `IntentWalletMismatch`, `ExecutorMismatch`, `InvalidOwnerSignature`, `IntentSessionMismatch`, `IntentGrantNonceMismatch`, `IntentExecMismatch`, `OwnerLaneRequired`, `InvalidNonce` | +| **Reads** | `WrongModeForCall(actual)`, `WrongVmForCall(actual)`, `NotAWallet(account)`, `IndexOutOfRange(index, next)` | + +A call made inside an owner action that reverts bubbles its own revert data up unchanged. + +--- + +## 12. Limits + +| Limit | Value | +|---|---| +| Tokens per cross-chain rule | 1 to 8 | +| Allowed calls per EVM rule | 1 to 32 | +| Actions per native rule | 1 to 8 | +| Argument pins per native action | 0 to 8 | +| Solana: programs / account pins / data pins / value-holding accounts | 1–32 / ≤16 / ≤8 / ≤16 | +| `validUntil` | non-zero, in the future; `type(uint48).max` = never | +| Unlimited total | `type(uint256).max` (0 means nothing) | +| Envelope version | 1 | + +## 13. Checklist before sending a grant + +- [ ] `sessionValidator` is the wallet's `SESSION_VALIDATOR()`; `sessionValidatorInitData = abi.encode(agent)`; agent ≠ owner. +- [ ] Every action has exactly one policy, URP, with a version-1 envelope. +- [ ] Cross-chain: one action, gateway + `0x77b86bec`; 1–8 PRC20 tokens, each on the rule's chain; a gas-token entry + at 0/0 if the user listed none; `maxTotal` is `type(uint256).max` when the user set no total. +- [ ] `expectedCEA` is the wallet's CEA on that chain; beneficiary offsets are `4 + 32 * argIndex`. +- [ ] Native: each `NativeTerms.target/selector` equals its action's. +- [ ] Solana: `ceaAccounts` includes the CEA and the CEA's account for every listed token. +- [ ] Record the `rulesId` from the receipt (or predict it from `grantNonce`) and keep the token order for `assertSpent`. diff --git a/plan/agw/research/deployment-review-2026-10-06/source/docs/addresses/donut.md b/plan/agw/research/deployment-review-2026-10-06/source/docs/addresses/donut.md new file mode 100644 index 00000000..b153465a --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/docs/addresses/donut.md @@ -0,0 +1,83 @@ +# Push Agentic Wallet — deployed addresses (Donut) + +**Generation `v4` (multi-asset rules, versioned envelope, agent sender door, checkpoints)** · Chain ID `42101` · +explorer [donut.push.network](https://donut.push.network) · deployed in blocks `23923806`–`23923810` · +commit `e8db748` (branch `deploy-agw` = `pushAgenticWallet_v3`) · `forge 1.5.1-stable` + +## The two addresses you need + +| | Address | +| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | +| **Factory**: deploy and look up wallets | [`0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF`](https://donut.push.network/address/0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF) | +| **URP**: name this as every rule's action policy | [`0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af`](https://donut.push.network/address/0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af) | + +Both are **proxies**. Point integrations at these, never at an implementation. + +## Everything + +| Contract | Address | Size (B) | Verified | +| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------: | :------: | +| `factoryProxy` (ERC-1967, UUPS) | [`0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF`](https://donut.push.network/address/0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF) | 141 | ✅ | +| `factoryLogic` (`AGWFactory`) | [`0xe138Dc6EfC10233BE1e6c8aF1Caf8cABe599cfC2`](https://donut.push.network/address/0xe138Dc6EfC10233BE1e6c8aF1Caf8cABe599cfC2) | 9,992 | ✅ | +| `walletImplementation` (`AGW`) | [`0x96D69ec7e6cDdaD414e656B5c9DCA24587DF713c`](https://donut.push.network/address/0x96D69ec7e6cDdaD414e656B5c9DCA24587DF713c) | 16,564 | ✅ | +| `urp` (Transparent proxy) | [`0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af`](https://donut.push.network/address/0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af) | 830 | ✅ | +| `urpImplementation` (`UniversalRulesPolicy` 3.1.0) | [`0xA2391eee4C9EA1B32AEB3A460B77296EA709F02F`](https://donut.push.network/address/0xA2391eee4C9EA1B32AEB3A460B77296EA709F02F) | 24,326 | ✅ | +| `urpProxyAdmin` (`ProxyAdmin`) | [`0x0b7a31ec85117892aEA90AA5cB6514e2F97c2295`](https://donut.push.network/address/0x0b7a31ec85117892aEA90AA5cB6514e2F97c2295) | 926 | ✅ | +| `sessionValidator` (`AgentValidator`) | [`0x068EE2388475A98EE1f5a434C58bFF3444fffFe6`](https://donut.push.network/address/0x068EE2388475A98EE1f5a434C58bFF3444fffFe6) | 806 | ✅ | +| `sessionEngine` (`SmartSession`, fork `7dc20e4`) | [`0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a`](https://donut.push.network/address/0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a) | 22,581 | ✅ | + +**All eight verified** on Blockscout. Keep `urpProxyAdmin`: without it URP can never be upgraded. + +### Push core contracts this deployment points at (not deployed by this repo) + +| | Address | +| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `UniversalGatewayPC` | `0x00000000000000000000000000000000000000C1` (implementation `0x1e41…a659`, 8-field outbound request, selector `0x77b86bec`) | +| `UniversalCore` | `0x00000000000000000000000000000000000000C0` | +| `UEAFactory` | `0x00000000000000000000000000000000000000eA` | +| `UNIVERSAL_EXECUTOR_MODULE` | `0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7` (the address core's UniversalCore and PRC20s use; an account with no code) | + +## How to grant a rule (what changed from v3.2) + +| | v3.2 | v4 | +| --------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| Policy `initData` | `abi.encode(string chainNamespace, bytes body)` | **`abi.encode(uint16 version, string chainNamespace, bytes body)`**, `version = 1` | +| Tokens per cross-chain rule | exactly 1 (`asset`, `maxAmountPerCall`, `maxAmountTotal`) | **1 to 8** (`assets: AssetCap[]`), each with its own limits and spend counter | +| PC fee limit | `maxPCPerCall` | **`maxGasPerCall`** (same meaning: PC per outbound for protocol fee + gas) | +| Agent door | session signature through a validator | **`executeAsAgent(rulesId, mode, executionCalldata)`**, callable only by the rule's agent | +| Owner-side changes | not recorded | **checkpoint counter** (`checkpointCount()`, `Checkpointed` event) | + +Cross-chain body (EVM destination): + +```solidity +struct AssetCap { address token; uint256 maxPerCall; uint256 maxTotal; } // token = PRC20 on Push +struct UniversalTerms { + uint48 validUntil; address expectedCEA; AssetCap[] assets; uint256 maxGasPerCall; AllowedCall[] allowedCalls; +} +// ABI tuple: (uint48,address,(address,uint256,uint256)[],uint256,(address,bytes4,uint16,bool,uint256)[]) +``` + +``` +cast call 0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af 'pushChainHash()(bytes32)' --rpc-url +# -> 0x3d6bc1f1d3fb03065860265a8e93840b586e57075d956cd41b4319d040be87f9 == keccak256("eip155:42101") +``` + +Full design notes: `docs/1_AGW.md`, `docs/2_UniversalRulesPolicy.md`, `docs/multi-asset-review.md`. + +## Admin + +| Authority | Holder | How to change it | +| ----------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| Factory `DEFAULT_ADMIN_ROLE` (factory upgrades) | deployer EOA `0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7` | `beginDefaultAdminTransfer(new)`, then the new admin calls `acceptDefaultAdminTransfer()` after the **48-hour** delay | +| URP `ProxyAdmin` owner (URP upgrades) | deployer EOA `0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7` | `transferOwnership(new)` on `0x0b7a…2295`, immediate | +| Factory `PAUSER_ROLE` / `OPERATOR_ROLE` | **nobody yet** | the default admin must `grantRole` before the factory can be paused or unpaused | + +These are different powers, and for production they belong in different multisigs: the factory admin can strand +counterfactually funded addresses; the URP ProxyAdmin owner can rewrite every gate in the security boundary. + + +## Previous generation (retired) + +`v3.2` (factory `0x2578041963f692f8b51A137A1c7ddc0c84a8226A`, URP `0xeAd99E254ACD64219d057400cdC2A2390bC74372`) stays on +chain but is no longer current. Its wallets and rules do not carry over; owners withdraw through the owner door. Its +record is in `deployments/address-book-v3/`. diff --git a/plan/agw/research/deployment-review-2026-10-06/source/foundry.toml b/plan/agw/research/deployment-review-2026-10-06/source/foundry.toml new file mode 100644 index 00000000..0b4bdf74 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/foundry.toml @@ -0,0 +1,88 @@ +[profile.default] +src = "src" +out = "out" +libs = ["lib"] +ffi = true +ast = true +build_info = true +extra_output = ["storageLayout"] + +solc = "0.8.26" +optimizer = true +# 833 matches the setting smartsessions is built and audited at upstream. At a +# higher setting SmartSession compiles to ~28.7 KB — over the EIP-170 limit and +# undeployable. Bytecode equivalence with the audited artifact is worth more than +# our gas profile. Do not raise this without re-checking `forge build --sizes`. +optimizer_runs = 833 +auto_detect_solc = false +# cancun is REQUIRED: URP's _slice helper uses MCOPY. Lowering this breaks the +# build at deploy time rather than at compile time. +evm_version = "cancun" +via_ir = true + +# Coverage scope: src/ excluding interfaces and libraries of pure types. +no_match_coverage = "(src/interfaces/|test/|script/|lib/)" + +# `out/` is READ-ONLY and is required, not a convenience: the statelessness invariant +# (validator PRD §4, factory PRD T-01(a)) is asserted against the build artifact's +# storageLayout, because Solidity offers no runtime way to prove "declares no storage" — +# a vm.load slot read is equally satisfied by a contract that declares variables and never +# writes them, i.e. a test that cannot fail. +fs_permissions = [ + { access = "read-write", path = "deployments/" }, + { access = "read", path = "out/" }, + # The Demo Ledger (demo/state/ledger.json). The demo scripts are separate processes with no + # shared memory, so the ledger is the only way state survives from one act to the next — it is + # what makes a failed step recoverable rather than fatal. + { access = "read-write", path = "demo/state/" }, + # READ-ONLY: the core repo's own build artifacts, which the UniversalMarketplace E2E deploys with + # vm.deployCode so it runs exactly the bytecode that ships (test_E2E_13 pins it). + { access = "read", path = "lib/push-chain-core-contracts/out/" }, + # READ-ONLY: core's sources, so test_E2E_13 can prove each artifact was built from the source on disk. + { access = "read", path = "lib/push-chain-core-contracts/src/" }, +] + +# ─── The core contracts the UniversalMarketplace E2E deploys (test/integration/24_marketplaceE2E.t.sol) ─── +# +# E2E must run the bytecode that SHIPS: core compiles shanghai / 99 999 runs against OZ 5.3, this repo +# cancun / 833 against OZ 5.7. So this repo does NOT recompile core: the E2E deploys the core repo's own +# build artifacts with vm.deployCode("lib/push-chain-core-contracts/out/…json"). Build core first. +# +# Why not compilation_restrictions + context remappings (the first design): forge's source graph ignores +# context remappings when it assembles a restricted compilation unit, so core's OZ imports resolved to +# this repo's OZ 5.7 and pulled Bytes.sol (MCOPY) into the shanghai job — solc 7755. Measured on 1.5.1. +# +# Only core INTERFACES are compiled here (via the push-core/ remapping), and those carry no settings +# that matter. +# +# TEMPORARY, while lib/push-chain-core-contracts is a symlink to the sibling checkout (the core changes are +# not committed yet, so there is no commit to pin a submodule to). Remove once it is a real submodule. +allow_paths = ["../push-chain-core-contracts"] + +# The demo's own tests (StakeDummy, and the AgentSigning equivalence proof). A SEPARATE PROFILE, +# not a change to the default `test` path: the v3 suite is the contracts' specification and must +# stay exactly what `forge test` runs. Demo tests are run with `FOUNDRY_PROFILE=demo forge test`, +# which the justfile wraps. Everything else is inherited from [profile.default]. +[profile.demo] +test = "demo/test" + +[fmt] +line_length = 120 +tab_width = 4 +bracket_spacing = true + +[fuzz] +runs = 1024 +max_test_rejects = 65536 +seed = '0x1' + +[invariant] +runs = 256 +depth = 64 +fail_on_revert = false + +[profile.ci.fuzz] +runs = 4096 + +[rpc_endpoints] +push_donut = "${PUSH_DONUT_RPC_URL}" diff --git a/plan/agw/research/deployment-review-2026-10-06/source/src/AGW.sol b/plan/agw/research/deployment-review-2026-10-06/source/src/AGW.sol new file mode 100644 index 00000000..e0f635a5 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/src/AGW.sol @@ -0,0 +1,1176 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { Clones } from "@openzeppelin/contracts/proxy/Clones.sol"; +import { ReentrancyGuardTransient } from "@openzeppelin/contracts/utils/ReentrancyGuardTransient.sol"; +import { IERC165 } from "forge-std/interfaces/IERC165.sol"; + +import { ISmartSession } from "smartsessions/ISmartSession.sol"; +import { Session, ActionData, PermissionId, ValidationData, SmartSessionMode } from "smartsessions/DataTypes.sol"; +import { PackedUserOperation } from "account-abstraction/interfaces/PackedUserOperation.sol"; +import { IModule as IERC7579Module } from "erc7579/interfaces/IERC7579Module.sol"; + +import { IAgentValidator } from "./interfaces/IAgentValidator.sol"; +import { IAGW } from "./interfaces/IAGW.sol"; +import { ISmartSessionConfigReader } from "./interfaces/ISmartSessionConfigReader.sol"; +import { AGWErrors } from "./libraries/Errors.sol"; +import { AgentConfigLib } from "./libraries/AgentConfigLib.sol"; +import { PushChainLib } from "./libraries/PushChainLib.sol"; +import { OwnerAuthLib } from "./libraries/OwnerAuthLib.sol"; +import { + OwnerIntent, + OWNER_LANE_FLAG, + SEND_OUTBOUND_SELECTOR, + RulesType, + CheckpointKind, + ENGINE_FALLBACK_TARGET, + ENGINE_FALLBACK_SELECTOR, + ENGINE_FALLBACK_SELECTOR_SMARTSESSION +} from "./libraries/Types.sol"; +import { + ModeCode, + CallType, + ExecType, + ModeLib, + CALLTYPE_SINGLE, + CALLTYPE_BATCH, + EXECTYPE_DEFAULT +} from "./libraries/ModeLib.sol"; +import { ExecutionLib, Execution } from "./libraries/ExecutionLib.sol"; + +/** + * @title AGW — Agentic Wallet + * @notice The user's per-purpose agent wallet on Push Chain. It holds the budgeted funds and is + * `msg.sender` at the gateway, which is what binds it to its destination-chain account. + * + * @dev - Push Chain has no ERC-4337 EntryPoint, so this wallet builds the operation and enforces + * the engine's verdict itself in `executeAsAgent`. + * - An ERC-7579 modular account restricted to validator modules; executor, fallback and + * hook modules are refused. A hook would run on the owner path and could block it. + * - `execute` is the owner door: no policy is ever consulted on it. + * - `executeAsAgent` is the agent door: callable only by the rules set's agent — a Push + * address (an EOA, or the UEA of an external key) — and every call is checked by the + * rules set's policy. + * - Deliberately near-stateless. A request exists only for the transaction that carries it. + */ +contract AGW is IAGW, ReentrancyGuardTransient { + using ModeLib for ModeCode; + + /// @dev ERC-7579 account id, in vendor.account.semver form. + string internal constant ACCOUNT_ID = "push.agw.1.0.0"; + + /// @dev The only ERC-7579 module type this account supports. + uint256 internal constant MODULE_TYPE_VALIDATOR = 1; + + /// @dev Gas stipend for a module's uninstall callback. + uint256 internal constant UNINSTALL_CALLBACK_GAS_STIPEND = 100_000; + + /// @dev Gas cap on the pre-uninstall state probe of the session engine. + uint256 internal constant ENGINE_STATE_PROBE_GAS = 30_000; + + /** + * @dev Maximum actions in one NATIVE rules set. `UNIVERSAL` is always exactly one. + * + * A SANITY BOUND, NOT A GAS BOUND — measured, a maximal 8x8 grant sits far inside the + * budget. It caps the O(n^2) duplicate scan below, the per-rules-set audit and UI surface a + * human has to reason about, and `revokeRules`'s engine-side cleanup cost. + * + * Lives HERE, not in `Types.sol`, because it is a wallet policy number that URP never + * reads — unlike the engine mirrors, which are shared. Do not confuse it with URP's + * `MAX_ACTIONS_PER_REQUEST` (10): that bounds multicall ENTRIES inside one universal + * payload, two layers down. Different layers, different numbers, never conflated. + */ + uint256 internal constant MAX_NATIVE_ACTIONS = 8; + + // The four wiring addresses, read through their UPPER_CASE() auto-getters. Resolved from the + // implementation's runtime bytecode, so every clone reads them correctly through delegatecall. + + /// @notice The permission engine this wallet installs as its default validator. + address public immutable SESSION_ENGINE; + + /// @notice The canonical action policy (URP) every rules set on this wallet must name. + address public immutable RULES_POLICY; + + /// @notice The canonical session validator every rules set on this wallet must name — the sender + /// validator that confirms the caller is the rules set's agent. + address public immutable SESSION_VALIDATOR; + + /// @notice The Push-side outbound gateway, the only target a universal agent action may reach. + address public immutable UNIVERSAL_GATEWAY_PC; + + /// @dev One-shot latch for initializeAccount. + bool private _initialized; + + /// @dev Monotonic salt source for permission ids; never reused. + uint64 private _grantNonce; + + /// @dev Owner-side checkpoints so far; also the `seq` of the latest `Checkpointed`. Packed in slot 0. + uint64 private _checkpointCount; + + /// @dev `block.number` of the latest checkpoint; zero before the first. Packed in slot 0. + uint64 private _lastCheckpointBlock; + + /// @dev The account's entire module registry. + mapping(address => bool) private _installedValidators; + + /// @dev Owner replay lanes for `executeWithSig`: lane key => next expected sequence number. + mapping(uint192 => uint64) private _nonces; + + /** + * @notice Sets the wallet's permanent wiring and locks the implementation itself. + * + * @dev - Reverts with `InvalidModuleAddress` if any of the four addresses is zero. + * - Sets the initialised latch, so the implementation can never be initialised or + * driven directly; only clones of it can. + * + * @param sessionEngine_ Permission engine installed as the default validator. + * @param rulesPolicy_ Canonical action policy every rules set must name. + * @param sessionValidator_ Canonical session validator every rules set must name. + * @param universalGatewayPC_ Push-side outbound gateway. + */ + constructor(address sessionEngine_, address rulesPolicy_, address sessionValidator_, address universalGatewayPC_) { + if ( + sessionEngine_ == address(0) || rulesPolicy_ == address(0) || sessionValidator_ == address(0) + || universalGatewayPC_ == address(0) + ) { + revert AGWErrors.InvalidModuleAddress(); + } + SESSION_ENGINE = sessionEngine_; + RULES_POLICY = rulesPolicy_; + SESSION_VALIDATOR = sessionValidator_; + UNIVERSAL_GATEWAY_PC = universalGatewayPC_; + + _initialized = true; + } + + /// @dev Reverts unless the caller is the clone's immutable-args owner. + modifier onlyOwner() { + if (msg.sender != _owner()) revert AGWErrors.CallerIsNotOwner(); + _; + } + + /** + * @dev Reverts unless the caller is the owner or the wallet itself. Applied to the three + * lifecycle functions only. + * + * - A batch entry targeting the wallet arrives with `msg.sender == address(this)`, so + * without this the owner's own one-signature change batch reverts against itself. + * - Widening to self is safe because self is reachable only through the owner door. From + * the agent door it is refused FOUR ways, in the order they fire: + * (a) at grant time, by `_requireGrantableTarget` — the wallet is never a grantable + * native action target; + * (b) at dispatch time, by the guard in `_gateAndDispatch` — which holds even for a + * session the owner enabled on the engine directly through the owner door, + * bypassing `grantRules` entirely; + * (c) by the engine's `NoPoliciesSet`, because (a) guarantees the wallet is never a + * configured action — true regardless of how many actions a rules set holds; + * (d) by the engine's `InvalidSelfCall`, for the `execute` selector specifically. + * (a) and (b) are never-delete tests. + * - Not applied to installModule or uninstallModule; nothing needs them batched. + */ + modifier onlyOwnerOrSelf() { + if (msg.sender != _owner() && msg.sender != address(this)) revert AGWErrors.CallerIsNotOwner(); + _; + } + + /** + * @dev Reads the owner out of the clone's immutable args. + * + * - Clone args are 40 bytes: owner at 0-19, factory at 20-39. + * - Read from bytecode on every call and never cached; a storage mirror of an immutable is + * drift surface. + * - Meaningful only on a clone. `Clones.fetchCloneArgs` is undefined on a non-clone, and on + * the implementation it returns a slice of that contract's own runtime bytecode. + * - No guard is added for the implementation case: every door on the implementation is + * already inert for an independent reason. + * + * @return The clone's owner. + */ + function _owner() internal view returns (address) { + return address(bytes20(Clones.fetchCloneArgs(address(this)))); + } + + /** + * @dev Reads the deploying factory out of the clone's immutable args. + * @return The factory recorded at clone creation. + */ + function _factory() internal view returns (address) { + bytes memory args = Clones.fetchCloneArgs(address(this)); + return address(bytes20(_slice20(args, 20))); + } + + /** + * @dev Reads 20 bytes at `start` out of a memory blob, without assuming a length. The + * short-blob branch is unreachable from the single call site and is expected to show as + * uncovered. + * + * @param data Blob to read from. + * @param start Byte offset to read at. + * @return out The 20 bytes at `start`, or zero if the blob is too short. + */ + function _slice20(bytes memory data, uint256 start) private pure returns (bytes20 out) { + if (data.length < start + 20) return bytes20(0); + assembly { + out := mload(add(add(data, 0x20), start)) + } + } + + /** + * @notice Factory-only, callable exactly once. Installs the session engine as the account's + * sole validator. + * + * @dev - Reverts with `CallerIsNotFactory` unless the caller is the clone's recorded factory. + * - Reverts with `AlreadyInitialized` if the latch is already set. + * - Sets the latch, marks the engine installed, then calls `onInstall("")` with full gas + * and bubbles any revert, so the factory's deploy transaction unwinds atomically. + * - Emits `ModuleInstalled`, then `AccountInitialized`. + * - Session data is never passed here; grants travel only through `grantRules`. + */ + function initializeAccount() external { + if (msg.sender != _factory()) revert AGWErrors.CallerIsNotFactory(); + if (_initialized) revert AGWErrors.AlreadyInitialized(); + + _initialized = true; + _installedValidators[SESSION_ENGINE] = true; + + IERC7579Module(SESSION_ENGINE).onInstall(""); + + emit ModuleInstalled(MODULE_TYPE_VALIDATOR, SESSION_ENGINE); + emit AccountInitialized(_owner(), SESSION_ENGINE); + } + + /** + * @notice The owner door. Executes a single call or a batch on the owner's behalf; no policy is + * ever consulted. + * + * @dev - Reverts unless the caller is the owner; reentrancy-guarded. + * - Reverts on any execution type other than default, and on any call type other than + * single or batch. + * - Reads no module, policy or engine state — only the immutable-args owner, its calldata, + * and the wallet's own checkpoint slot — so the door still works with the engine + * uninstalled, with a hostile validator installed, or in ghost-rules state. + * - Records one checkpoint per call, before the call (`_checkpointOwnerCall`). The write + * cannot revert. + * - The signature is frozen at `execute(bytes32,bytes)`: the session engine branches on + * this exact selector, and any other shape routes validation down a path where the + * action policy sees a hardcoded zero value instead of the real one. + * - Batch is required product surface: the permission-change flow is one owner signature + * batching a spend assertion, a revoke and a grant. + * - Dispatches through `_execute` and emits `OwnerExecuted`. + * - There is no separate withdraw function; withdrawal, revocation escort and incident + * response all run through this door. + * + * @param mode ERC-7579 mode word; call type and execution type are decoded from it. + * @param executionCalldata Encoded execution, single or batch according to `mode`. + */ + function execute(bytes32 mode, bytes calldata executionCalldata) external payable onlyOwner nonReentrant { + ModeCode m = ModeCode.wrap(mode); + (CallType callType, ExecType execType,,) = m.decode(); + + if (execType != EXECTYPE_DEFAULT) revert AGWErrors.UnsupportedExecutionMode(); + if (callType == CALLTYPE_SINGLE) { + (address target, uint256 value, bytes calldata callData) = ExecutionLib.decodeSingle(executionCalldata); + _checkpointOwnerCall(target, value, callData); + _execute(target, value, callData); + } else if (callType == CALLTYPE_BATCH) { + Execution[] calldata execs = ExecutionLib.decodeBatch(executionCalldata); + uint256 len = execs.length; + for (uint256 i; i < len;) { + _checkpointOwnerCall(execs[i].target, execs[i].value, execs[i].callData); + _execute(execs[i].target, execs[i].value, execs[i].callData); + unchecked { + ++i; + } + } + } else { + revert AGWErrors.UnsupportedExecutionMode(); + } + + emit OwnerExecuted(mode, keccak256(executionCalldata)); + } + + /** + * @dev Plain call, bubbling the callee's revert data verbatim. Shared by both doors so the agent + * path executes the exact validated bytes. + * + * @param target Address to call. + * @param value Native PC to send with the call. + * @param callData Calldata to pass, forwarded unchanged. + */ + function _execute(address target, uint256 value, bytes calldata callData) internal { + (bool ok, bytes memory ret) = target.call{ value: value }(callData); + if (!ok) { + assembly { + revert(add(ret, 0x20), mload(ret)) + } + } + } + + /** + * @dev Records one owner-side change: advances the counter, stamps the block, emits `Checkpointed`. + * + * - CANNOT REVERT except by running out of gas: an unchecked increment of a uint64 that cannot + * realistically reach 2^64, one write to the wallet's own slot 0, one event. No external call. + * That is what lets it sit on the owner doors and on the revocation path. + * - NEVER called from `_execute` or anywhere the agent door reaches. A checkpoint means "the + * owner side touched this wallet"; an agent that could tick it could always fake owner + * interference. + * + * @param kind What changed. + * @param ref Per-kind reference (see `IAGW.Checkpointed`). + */ + function _checkpoint(CheckpointKind kind, bytes32 ref) private { + uint64 seq; + unchecked { + seq = _checkpointCount + 1; + } + // forge-lint: disable-next-line(unsafe-typecast) + uint64 blockNumber = uint64(block.number); // a block number does not exceed 2^64 in practice + _checkpointCount = seq; + _lastCheckpointBlock = blockNumber; + emit Checkpointed(seq, kind, ref, blockNumber); + } + + /** + * @dev The owner-door tick for one call, taken BEFORE the call runs, so a consumer snapshotting the + * counter during that call already sees it, and any later call in the same batch moves it again. + * + * @param target The call's target. + * @param value The call's native value. + * @param callData The call's calldata. + */ + function _checkpointOwnerCall(address target, uint256 value, bytes calldata callData) private { + _checkpoint(CheckpointKind.OWNER_ACTION, keccak256(abi.encode(target, value, callData))); + } + + /** + * @notice The owner door, authorised by a signed OwnerIntent instead of `msg.sender`. Relayable. + * + * @dev - A THIRD door, separate from `execute`. `execute` reads no module, policy or engine + * state — only the immutable-args owner, its calldata and its own checkpoint slot — and + * remains the unblockable fallback. This door reads storage (the nonce lane) and may + * therefore fail where `execute` cannot. + * - The mode switch below is DUPLICATED from `execute`, not shared with it, so that no + * refactor can ever add a check to `execute`. + * - Checks, in order: deadline · `intent.wallet == this` · owner · presenter is + * `intent.executor` · owner lane · `mode` and a non-zero `execCalldataHash` match · + * nonce (consumed before the signature check; any revert unwinds it) · the owner's + * signature under the FACTORY's domain. + * - Single or batch, default exec type. No dispatch guard: this is owner authority, so a + * batch may call the wallet's own lifecycle functions through `onlyOwnerOrSelf`. + * - Records one checkpoint per call, before the call, exactly as `execute` does. + * - Emits `OwnerExecutedWithSig`. + * + * @param mode ERC-7579 mode word; must equal `intent.mode`. + * @param executionCalldata Encoded execution; its hash must equal `intent.execCalldataHash`. + * @param intent The owner's intent; the grant fields are ignored here. + * @param sig The owner's signature over `intent`. + */ + function executeWithSig( + bytes32 mode, + bytes calldata executionCalldata, + OwnerIntent calldata intent, + bytes calldata sig + ) external nonReentrant { + address owner_ = _requireIntentPresenter(intent); + + uint192 nonceKey = intent.nonceKey; + if (nonceKey & OWNER_LANE_FLAG == 0) revert AGWErrors.OwnerLaneRequired(nonceKey); + + bytes32 calldataHash = keccak256(executionCalldata); + if (intent.execCalldataHash == bytes32(0) || intent.execCalldataHash != calldataHash || intent.mode != mode) { + revert AGWErrors.IntentExecMismatch(calldataHash); + } + + uint64 expected = _nonces[nonceKey]; + if (intent.nonceSeq != expected) revert AGWErrors.InvalidNonce(nonceKey, expected, intent.nonceSeq); + _nonces[nonceKey] = expected + 1; + + _requireOwnerSig(owner_, intent, sig); + + (CallType callType, ExecType execType,,) = ModeCode.wrap(mode).decode(); + if (execType != EXECTYPE_DEFAULT) revert AGWErrors.UnsupportedExecutionMode(); + if (callType == CALLTYPE_SINGLE) { + (address target, uint256 value, bytes calldata callData) = ExecutionLib.decodeSingle(executionCalldata); + _checkpointOwnerCall(target, value, callData); + _execute(target, value, callData); + } else if (callType == CALLTYPE_BATCH) { + Execution[] calldata execs = ExecutionLib.decodeBatch(executionCalldata); + uint256 len = execs.length; + for (uint256 i; i < len;) { + _checkpointOwnerCall(execs[i].target, execs[i].value, execs[i].callData); + _execute(execs[i].target, execs[i].value, execs[i].callData); + unchecked { + ++i; + } + } + } else { + revert AGWErrors.UnsupportedExecutionMode(); + } + + emit OwnerExecutedWithSig(mode, calldataHash, nonceKey, intent.nonceSeq); + } + + /** + * @dev The checks every intent door shares, in order: deadline, wallet, owner, presenter. + * Returns the owner so the caller does not re-read the immutable args. + */ + function _requireIntentPresenter(OwnerIntent calldata intent) internal view returns (address owner_) { + if (block.timestamp > intent.deadline) revert AGWErrors.OwnerSigExpired(intent.deadline); + if (intent.wallet != address(this)) { + revert AGWErrors.IntentWalletMismatch(address(this), intent.wallet); + } + owner_ = _owner(); + if (intent.owner != owner_) revert AGWErrors.CallerIsNotOwner(); + if (intent.executor == address(0) || msg.sender != intent.executor) { + revert AGWErrors.ExecutorMismatch(intent.executor, msg.sender); + } + } + + /// @dev The owner's signature over `intent`, under the factory's domain. Last check before effects. + function _requireOwnerSig(address owner_, OwnerIntent calldata intent, bytes calldata sig) internal view { + if (!OwnerAuthLib.isOwnerSig(owner_, OwnerAuthLib.intentDigest(_factory(), intent), sig)) { + revert AGWErrors.InvalidOwnerSignature(); + } + } + + /** + * @notice Grants one rules set to an agent. One of exactly two lifecycle operations. + * + * @dev - Reverts unless the caller is the owner or the wallet itself. + * - Rejects any session that is not the one shape this wallet permits, all with + * `MalformedSessionShape`: any user-op policy present, any ERC-7739 content or policy, + * the ERC-4337 paymaster permit set, an action count other than one, an action whose + * target is not the gateway or whose selector is not the outbound send, an action + * policy set that is not exactly the canonical policy, or a session validator that is + * not the canonical one. + * - Rejects an agent config the session validator does not accept — anything but + * `abi.encode(address agent)` with a non-zero agent. The canonical validator's check + * never reverts; the call is still wrapped in a bare catch rather than a typed one, so a + * future validator's revert or compiler panic is absorbed as a refusal. Wrapping is + * correct here only because the external call already exists; the action policy's own + * decode is deliberately not wrapped, since there it would introduce one. + * - Refusing the paymaster permit keeps dead surface dead: setting it would write a live + * permit row into engine storage, and that row decides whether a non-empty + * `paymasterAndData` is rejected outright or instead requires a user-op policy to run, + * which this shape forbids. + * - Overwrites the caller's salt with the wallet's monotonic grant counter, so identical + * terms granted twice yield distinct permission ids and a replaced id never recurs. + * That is what makes a request built for a revoked rules set die on regrant. + * - Enables the session on the engine and emits `RulesGranted`. + * - Records a checkpoint (`RULES_GRANTED`). + * - Validates the session's shape only. The caps, allow-list and expiry inside the policy + * config are the policy's own concern; do not extend this into term validation. + * - Carries no reentrancy guard: the guard would trip on the owner's own change batch, + * and the engine's enable path never calls back into the account. + * + * - TAKES NO MANDATE TYPE. The kind of a rules set is DERIVED, not declared: each action's + * URP policy envelope is `abi.encode(uint16 version, string chain, bytes body)`, and the chain decides + * the rulebook — this chain means a Push-side call (NATIVE), any other means a call + * through the gateway (UNIVERSAL). The owner states a chain once, where they were + * already stating the terms; nobody states a mode anywhere. Every action must name the + * same chain, which is what makes a mixed rules set unrepresentable rather than merely + * forbidden. + * - The envelope is NOT REWRITTEN. The wallet reads one field and passes the caller's + * bytes to the engine untouched, so what URP validates is exactly what the owner + * reviewed. + * + * @param session The session to enable. Its `salt` field is ignored and overwritten. + * @return rulesId The engine's id for the newly enabled rules set. + * + * `rulesId` is the engine's `permissionId`. + */ + function grantRules(Session calldata session) external onlyOwnerOrSelf returns (bytes32 rulesId) { + return _grantRules(session); + } + + /** + * @notice `grantRules`, authorised by the owner's signed OwnerIntent instead of `msg.sender`. + * + * @dev - Checks, in order: deadline · `intent.wallet == this` · `intent.owner` is this wallet's + * owner · presenter is `intent.executor` (non-zero) · `sessionHash` is non-zero and is the + * hash of `session` · `grantNonce` is the current `_grantNonce` · the owner's signature under + * the FACTORY's domain. Then the entire `grantRules` body, unchanged. + * - `_grantNonce` advances on every grant, so an intent grants at most once and dies on any + * other grant. No new storage. + * - `sessionHash` covers the session AS SUPPLIED, salt included; the salt is then overwritten + * with the grant nonce exactly as on the owner path. + * - Unreachable from the agent door: the wallet is never a grantable action target, and the + * dispatch guard refuses `address(this)` whatever the selector. + * - No reentrancy guard, for the same reason `grantRules` has none. + * + * @param session The session to enable. + * @param intent The owner's intent; the exec fields are ignored here. + * @param sig The owner's signature over `intent`. + * @return rulesId The engine's id for the newly enabled rules set. + * + * `rulesId` is the engine's `permissionId`. + */ + function grantRulesWithSig(Session calldata session, OwnerIntent calldata intent, bytes calldata sig) + external + returns (bytes32 rulesId) + { + address owner_ = _requireIntentPresenter(intent); + + bytes32 sessionHash = keccak256(abi.encode(session)); + if (intent.sessionHash == bytes32(0) || intent.sessionHash != sessionHash) { + revert AGWErrors.IntentSessionMismatch(sessionHash); + } + if (intent.grantNonce != _grantNonce) { + revert AGWErrors.IntentGrantNonceMismatch(_grantNonce, intent.grantNonce); + } + _requireOwnerSig(owner_, intent, sig); + + return _grantRules(session); + } + + /** + * @dev The entire body `grantRules` always had, moved here unchanged so both entry points run the + * same checks in the same order with the same errors. See `grantRules` for the rules. + */ + function _grantRules(Session calldata session) internal returns (bytes32 rulesId) { + // ─── rules COMMON to both types, first ─── + + if (session.userOpPolicies.length != 0) revert AGWErrors.MalformedSessionShape(); + + if ( + session.erc7739Policies.allowedERC7739Content.length != 0 + || session.erc7739Policies.erc1271Policies.length != 0 + ) revert AGWErrors.MalformedSessionShape(); + + if (session.permitERC4337Paymaster) revert AGWErrors.MalformedSessionShape(); + + uint256 n = session.actions.length; + + // BEFORE THE DECODE, AND FOR BOTH MODES. The mode is derived from action 0's envelope, so + // action 0 must exist before anything can be derived: with no actions there is no envelope, + // no chain, and therefore no mode to report. A universal session with zero actions + // consequently reports `TooManyActions(0)`, not `MalformedSessionShape`. + if (n == 0) revert AGWErrors.TooManyActions(0); + + // THE POLICY-SHAPE CHECK RUNS BEFORE THE DECODE, ALWAYS. Decoding first would read an + // arbitrary policy's `initData` as though it were URP's. This ordering is load-bearing. + _requirePolicyShape(session.actions[0]); + (string memory chain, bytes32 chainHash) = _chainNamespaceOf(session.actions[0]); + + // ─── THE ENTIRE MODE DECISION. Nobody declared it. ─── + RulesType mode = PushChainLib.deriveMode(chainHash); + + // THE INVARIANT, STATED ONCE: a wrong POLICY is always `MalformedSessionShape`; a target + // wrong FOR THE DERIVED TYPE is always `RulesTypeMismatch`. Between the two branches + // there is no shape in which a gateway call reaches a native config, and none in which a + // native call reaches a universal one — which, with URP's N3 and gate 3 at runtime, is the + // whole consistency argument. One chain per rules set makes mixed rules sets unrepresentable. + + if (mode == RulesType.UNIVERSAL) { + // `n != 1` BEFORE the target check, as before. A malformed chain string on a + // multi-action session therefore reports `MalformedSessionShape`, not a type mismatch. + if (n != 1) revert AGWErrors.MalformedSessionShape(); + + ActionData calldata a = session.actions[0]; + if (a.actionTarget != UNIVERSAL_GATEWAY_PC || a.actionTargetSelector != SEND_OUTBOUND_SELECTOR) { + revert AGWErrors.RulesTypeMismatch(mode, 0, a.actionTarget); + } + } else { + if (n > MAX_NATIVE_ACTIONS) revert AGWErrors.TooManyActions(n); + + // Hoisted: `_factory()` does an extcodecopy of the clone's own bytecode on every call. + address factoryAddr = _factory(); + + for (uint256 i; i < n;) { + ActionData calldata a = session.actions[i]; + + _requireGrantableTarget(a.actionTarget, factoryAddr, i); + _requireGrantableSelector(a.actionTargetSelector); + + // Action 0's shape and chain were read above; re-reading would waste ~900 gas. + // EVERY action must name the same chain — that is what makes "one rules set, one + // mode" true by construction rather than by a rule. + if (i != 0) { + _requirePolicyShape(a); + (, bytes32 h) = _chainNamespaceOf(a); + if (h != chainHash) revert AGWErrors.InconsistentChain(i); + } + + // O(n^2) by design: 28 comparisons at the n=8 ceiling, which beats a mapping and its + // clear-down. Two identical (target, selector) pairs would hash to one actionId. + for (uint256 j; j < i;) { + if ( + session.actions[j].actionTarget == a.actionTarget + && session.actions[j].actionTargetSelector == a.actionTargetSelector + ) { + revert AGWErrors.DuplicateAction(a.actionTarget, a.actionTargetSelector); + } + unchecked { + ++j; + } + } + + unchecked { + ++i; + } + } + } + + if (address(session.sessionValidator) != SESSION_VALIDATOR) { + revert AGWErrors.MalformedSessionShape(); + } + + try IAgentValidator(SESSION_VALIDATOR).validateConfig(session.sessionValidatorInitData) returns (bool ok) { + if (!ok) revert AGWErrors.MalformedSessionShape(); + } catch { + revert AGWErrors.MalformedSessionShape(); + } + + Session memory sessionMem = session; + sessionMem.salt = bytes32(uint256(_grantNonce)); + // Checked on purpose: a wrapping counter would mean silent salt reuse. + _grantNonce++; + + Session[] memory sessions = new Session[](1); + sessions[0] = sessionMem; + PermissionId[] memory ids = ISmartSession(SESSION_ENGINE).enableSessions(sessions); + + rulesId = PermissionId.unwrap(ids[0]); + _checkpoint(CheckpointKind.RULES_GRANTED, rulesId); + emit RulesGranted(rulesId, mode, chainHash, chain); + } + + /** + * @dev The policy-shape rule, hoisted so it can run before each envelope decode. + * + * A SHAPE rule, so it raises `MalformedSessionShape` like every other shape rule. It is + * also the precondition for `_chainNamespaceOf`: without it, the decode below would be reading an + * arbitrary policy's `initData` as though URP had authored it. + * + * @param a The action whose policy slot is vetted. + */ + function _requirePolicyShape(ActionData calldata a) internal view { + if (a.actionPolicies.length != 1 || a.actionPolicies[0].policy != RULES_POLICY) { + revert AGWErrors.MalformedSessionShape(); + } + } + + /** + * @dev Reads ONE field of the policy envelope — the bounded exception to "the skeleton, not the + * organs". + * + * WHAT THIS IS NOT: it is not term validation. The wallet does not check caps, expiry, + * allow-list contents or anything else inside the body, and must never start. It reads the + * label on the jar: the one field that decides WHICH RULEBOOK the action belongs to, which + * is the wallet's own business because the wallet's target rules depend on it. URP + * re-derives the same value from the same bytes and remains the sole judge of the terms. + * + * CALLER MUST HAVE RUN `_requirePolicyShape` FIRST. + * + * Same decoder as URP's, deliberately (`abi.decode(initData, (uint16, string, bytes))`): + * two different readers of one security-relevant field is the drift this design exists to + * prevent. A malformed envelope reverts here, unnamed, and fails closed. The version is + * URP's to judge: it refuses anything but `ENVELOPE_VERSION` at init, inside this grant. + * + * @param a The action to read. + * @return chain The declared CAIP-2 string, e.g. `"eip155:11155111"`. + * @return chainHash Its keccak256, the value everything downstream compares. + */ + function _chainNamespaceOf(ActionData calldata a) internal pure returns (string memory chain, bytes32 chainHash) { + (, chain,) = abi.decode(a.actionPolicies[0].initData, (uint16, string, bytes)); + if (bytes(chain).length == 0) revert AGWErrors.EmptyChain(); + chainHash = keccak256(bytes(chain)); + } + + /** + * @dev Every grant-time target rule for a NATIVE action, in one place. + * + * TWO RULES, TWO ERRORS, AND THE DISTINCTION IS THE POINT: + * + * - **The gateway → `RulesTypeMismatch`.** The session is well-formed; the CHAIN the + * envelope declares is this chain, and a gateway call is not a Push-side call. A gateway + * target is perfectly grantable — under a foreign chain, as `UNIVERSAL`. Carries the + * action index, because with up to eight actions "something was wrong" is not a usable + * diagnostic. This is one half of the consistency lock; URP's N3 is the runtime mirror. + * - **The other seven → `ForbiddenActionTarget`.** Never grantable, under any type. + * + * Of those seven the severe pair is the wallet and the engine: from the agent door, + * `_execute(wallet, 0, grantRules(...))` would arrive with `msg.sender == address(this)`, + * pass `onlyOwnerOrSelf`, and the agent would have granted itself a rules set of its own + * design. `revokeAllRules` is the mirror. + * + * LAYER CREDIT, so nobody deletes the wrong one as redundant: the engine independently + * refuses `address(0)` and ITSELF at enable time (`ConfigLib.sol:139-143`), but it does NOT + * refuse `address(1)` there — only at check time. **This is the only grant-time layer for + * the fallback flag.** + * + * The action-policy check is deliberately NOT here. That is a SHAPE rule — it raises + * `MalformedSessionShape`, and the UNIVERSAL branch and the common rules raise the same + * error for the same class of defect. It belongs with them, not inside a target helper. + * + * @param t Action target to vet. + * @param factoryAddr The clone's factory, hoisted by the caller so the loop reads it once. + * `_factory()` does an extcodecopy of the clone's own bytecode; the other + * six comparands are immutables and are free to read here. + * @param index Index of this action, reported by `RulesTypeMismatch`. + */ + function _requireGrantableTarget(address t, address factoryAddr, uint256 index) internal view { + if (t == UNIVERSAL_GATEWAY_PC) { + revert AGWErrors.RulesTypeMismatch(RulesType.NATIVE, index, t); + } + if ( + t == address(0) || t == ENGINE_FALLBACK_TARGET || t == address(this) || t == SESSION_ENGINE + || t == RULES_POLICY || t == SESSION_VALIDATOR || t == factoryAddr + ) { + revert AGWErrors.ForbiddenActionTarget(t); + } + } + + /** + * @dev The grant-time forbidden-selector list for NATIVE actions. + * + * Refuses the engine's two fallback selectors by name. `0xFFFFFFFF` (value-only) is + * PERMITTED and is deliberately not on this list. + * + * @param s Action selector to vet. + */ + function _requireGrantableSelector(bytes4 s) internal pure { + if (s == ENGINE_FALLBACK_SELECTOR || s == ENGINE_FALLBACK_SELECTOR_SMARTSESSION) { + revert AGWErrors.ForbiddenActionSelector(s); + } + } + + /** + * @notice Revoke one rules set. The other lifecycle operation, and the emergency lever. + * + * @dev - Reverts unless the caller is the owner or the wallet itself. + * - Reverts with `UnknownPermission` if the id is not enabled, because the upstream + * removal silently no-ops on a ghost id and an operator must never read "revoked" + * while the rules set lives. + * - Removes the session and emits `RulesRevoked`. Revocation is immediate: removal clears + * the agent, so any request under the id fails `CallerIsNotAgent`. + * - Deliberately carries no reentrancy guard and no health probe: nothing that can fail + * belongs on the stop path, since blockable removal is the one regression this + * function can develop. It records a checkpoint (`RULES_REVOKED`) per removed id; that + * write cannot revert. + * + * @param rulesId The rules set to revoke. + * + * `rulesId` is the engine's `permissionId`. + */ + function revokeRules(bytes32 rulesId) external onlyOwnerOrSelf { + if (!ISmartSession(SESSION_ENGINE).isPermissionEnabled(PermissionId.wrap(rulesId), address(this))) { + revert AGWErrors.UnknownPermission(rulesId); + } + + ISmartSession(SESSION_ENGINE).removeSession(PermissionId.wrap(rulesId)); + + _checkpoint(CheckpointKind.RULES_REVOKED, rulesId); + emit RulesRevoked(rulesId); + } + + /** + * @notice Revokes every rules set on this wallet in one call. The incident-response lever. + * + * @dev - Reverts unless the caller is the owner or the wallet itself. + * - Snapshots the permission ids, removes each by id, and emits `RulesRevoked` per id. + * Removal is by id, so engine-side array shifting cannot disturb the snapshot. + * - Deliberately carries no reentrancy guard and no health probe, for the same reason as + * `revokeRules`. It records a checkpoint (`RULES_REVOKED`) per removed id; that write + * cannot revert. + * - Gas grows with permission count; wallets hold few permissions by design. + */ + function revokeAllRules() external onlyOwnerOrSelf { + PermissionId[] memory ids = ISmartSession(SESSION_ENGINE).getPermissionIDs(address(this)); + + uint256 len = ids.length; + for (uint256 i; i < len;) { + ISmartSession(SESSION_ENGINE).removeSession(ids[i]); + _checkpoint(CheckpointKind.RULES_REVOKED, PermissionId.unwrap(ids[i])); + emit RulesRevoked(PermissionId.unwrap(ids[i])); + unchecked { + ++i; + } + } + } + + /** + * @notice The agent door. Callable only by the rules set's agent; every call is checked by the + * rules set's policy before it runs. + * + * @dev This chain has no EntryPoint, so this function does the EntryPoint's work, in order: + * 1. reject if the session engine is no longer installed + * 2. reject unless `msg.sender` is the agent `rulesId` names on this wallet + * 3. build the operation, validate it through the engine, and enforce the verdict + * 4. reject any mode other than single and default, and the two forbidden targets + * 5. dispatch the exact validated bytes + * 6. emit `RulesActionAuthorized` + * + * - The agent is a Push address. An external key (EVM, Solana, anything) acts through its + * UEA, which verifies that key before calling here; this wallet verifies no signature. + * - Replay protection is the sender's own transaction nonce (an EOA's nonce, or the UEA + * payload's nonce). Expiry is the rules set's own (policy gate 2 / N2 / S2); an EOA + * transaction carries no per-request expiry, a UEA payload carries its `deadline`. + * - A request against a revoked rules set fails at step 2: removal clears the agent. + * - Not payable, but a validated request does move PC out of the wallet's own balance, + * bounded by the policy's per-call ceiling. + * - Any revert unwinds the whole transaction, including the policy's counters; dispatch + * is never wrapped in try/catch. + * - Mode is single-only here: batching lives inside the multicall payload, bounded by the + * policy. + * + * @param rulesId The rules set this call acts under. `rulesId` is the engine's + * `permissionId`. + * @param mode ERC-7579 mode word; must decode to single and default. + * @param executionCalldata Encoded single execution, dispatched byte-for-byte once validated. + */ + function executeAsAgent(bytes32 rulesId, bytes32 mode, bytes calldata executionCalldata) external nonReentrant { + if (!_installedValidators[SESSION_ENGINE]) { + revert AGWErrors.ValidatorNotInstalled(SESSION_ENGINE); + } + + if (msg.sender != _agentOf(rulesId)) revert AGWErrors.CallerIsNotAgent(rulesId, msg.sender); + + bytes32 callsHash = keccak256(executionCalldata); + + _validate(rulesId, mode, executionCalldata, callsHash); + + _gateAndDispatch(mode, executionCalldata); + + emit RulesActionAuthorized(rulesId, msg.sender, callsHash); + } + + /** + * @dev Gates the mode to single and default, then dispatches the validated execution unchanged. + * + * - The agent path never batches at the ERC-7579 layer; batching lives inside the multicall + * payload instead, bounded by the policy. + * - Split out for stack depth only. Inlined, this does not compile with the optimizer off, + * which is the configuration `forge coverage` uses. + * + * @param mode ERC-7579 mode word. + * @param executionCalldata Encoded single execution to dispatch. + */ + function _gateAndDispatch(bytes32 mode, bytes calldata executionCalldata) internal { + (CallType callType, ExecType execType,,) = ModeCode.wrap(mode).decode(); + if (callType != CALLTYPE_SINGLE || execType != EXECTYPE_DEFAULT) { + revert AGWErrors.UnsupportedExecutionMode(); + } + (address target, uint256 value, bytes calldata callData) = ExecutionLib.decodeSingle(executionCalldata); + + // ⚠️ THE DISPATCH GUARD — never-delete, and it belongs HERE, after validation. + // + // Two comparisons, no storage, no module or policy state. It holds regardless of how the + // session was enabled — including a session the owner enabled on the engine DIRECTLY + // through the owner door, bypassing `grantRules` and its forbidden-target list entirely. + // That path exists today and is legitimate; this is what stops it reaching the wallet's own + // lifecycle functions from the agent side. + // + // DO NOT MOVE IT BEFORE `_validate`. Placed earlier it would pre-empt the engine's own + // refusals and change which error surfaces, and the engine-target case only ever reaches + // this point through the fallback sentinel, which validation has to run to resolve. + if (target == address(this) || target == SESSION_ENGINE) { + revert AGWErrors.ForbiddenDispatchTarget(target); + } + + _execute(target, value, callData); + } + + /** + * @dev Builds the operation, validates it through the engine, and enforces the verdict. + * + * - Builds a `PackedUserOperation` for its ABI shape only, since there is no EntryPoint. The + * engine requires `sender` to equal `msg.sender` (the wallet); that is what makes the + * signature field below unforgeable. + * - The callData selector must be `execute(bytes32,bytes)`, because that is the only engine + * branch that decodes the mode and forwards the real decoded value to the action policy. + * Every other selector reaches the policy with the account as target and a hardcoded zero + * value, which would make the policy's value gate compare against nothing. + * - The signature field is `USE ‖ rulesId ‖ msg.sender`, written here and nowhere else. The + * session validator accepts it only when those 20 bytes are the rules set's agent. + * - `callsHash` is passed as the operation hash. Nothing verifies a signature over it; it is + * what the engine forwards to the validator, which ignores it. + * - Gas fields are zero and `paymasterAndData` must stay empty, or the engine's paymaster + * permit check reverts. The nonce field is zero: replay protection is the sender's own. + * - Enforces the returned authorizer and time window itself — the EntryPoint's job, and what + * makes the policy's expiry gate real rather than decorative. + * - The engine runs the action policy before it consults the session validator, so policies + * still see calldata the engine has not yet authenticated; the wallet's own agent check + * has already run by then. + * - Performs exactly one external call, to the engine. Split out for stack depth. + * + * @param rulesId The rules set, written into the signature field. + * @param mode ERC-7579 mode word, re-encoded into the operation's calldata. + * @param executionCalldata Execution calldata, re-encoded into the operation's calldata. + * @param callsHash `keccak256(executionCalldata)`, passed as the operation hash. + */ + function _validate(bytes32 rulesId, bytes32 mode, bytes calldata executionCalldata, bytes32 callsHash) internal { + PackedUserOperation memory op; + op.sender = address(this); + op.nonce = 0; + op.initCode = ""; + op.callData = abi.encodeWithSelector(this.execute.selector, mode, executionCalldata); + op.accountGasLimits = bytes32(0); + op.preVerificationGas = 0; + op.gasFees = bytes32(0); + op.paymasterAndData = ""; + op.signature = abi.encodePacked(SmartSessionMode.USE, rulesId, msg.sender); + + uint256 vd = ValidationData.unwrap(ISmartSession(SESSION_ENGINE).validateUserOp(op, callsHash)); + + address authorizer = address(uint160(vd)); + uint48 validUntil = uint48(vd >> 160); // 0 = unbounded + uint48 validAfter = uint48(vd >> 208); + + if (authorizer != address(0)) revert AGWErrors.ValidationFailed(authorizer); + if (block.timestamp < validAfter) revert AGWErrors.OutsideTimeWindow(validAfter, validUntil); + if (validUntil != 0 && block.timestamp > validUntil) { + revert AGWErrors.OutsideTimeWindow(validAfter, validUntil); + } + } + + /** + * @dev The agent `rulesId` names on this wallet, or `address(0)` if it names none. + * Zero when the id is unknown or revoked (removal clears the config), when its session + * validator is not the canonical one, or when its config is malformed. One external view + * call to the engine; decodes through the same library the validator enforces with. + * @param rulesId The rules set to look up. + * @return The agent's Push address, or zero. + */ + function _agentOf(bytes32 rulesId) internal view returns (address) { + (address sessionValidator_, bytes memory config) = ISmartSessionConfigReader(SESSION_ENGINE) + .getSessionValidatorAndConfig(address(this), PermissionId.wrap(rulesId)); + if (sessionValidator_ != SESSION_VALIDATOR) return address(0); + return AgentConfigLib.decode(config); + } + + /** + * @notice Installs a validator module. + * + * @dev - Reverts unless the caller is the owner; reentrancy-guarded. + * - Rejects any module type but validator, the zero address, an address with no code, + * and a module that is already installed. + * - Marks the module installed, calls `onInstall` with full gas and bubbles any revert, + * then emits `ModuleInstalled`. + * - Exists as the recovery lever: a corrected validator can be installed on an existing + * wallet without moving addresses or funds. + * + * @param moduleTypeId ERC-7579 module type; only the validator type is accepted. + * @param module Module to install. + * @param initData Opaque data forwarded to the module's `onInstall`. + */ + function installModule(uint256 moduleTypeId, address module, bytes calldata initData) + external + onlyOwner + nonReentrant + { + if (moduleTypeId != MODULE_TYPE_VALIDATOR) { + revert AGWErrors.UnsupportedModuleType(moduleTypeId); + } + if (module == address(0) || module.code.length == 0) revert AGWErrors.InvalidModuleAddress(); + if (_installedValidators[module]) revert AGWErrors.ModuleAlreadyInstalled(module); + + _installedValidators[module] = true; + + IERC7579Module(module).onInstall(initData); + + emit ModuleInstalled(moduleTypeId, module); + } + + /** + * @notice Uninstalls a validator module. Removal always proceeds. + * + * @dev - Reverts unless the caller is the owner; reentrancy-guarded. + * - Rejects any module type but validator, and a module that is not installed. + * - If and only if the module is the session engine, probes its initialised state under + * a gas cap and refuses removal while it still holds permissions. Uninstalling the + * engine with live permissions would run its cleanup loop out of gas and leave rows it + * then refuses to reinstall over, so the guard forces a `revokeAllRules` first. + * - Unmarks the module before calling back, so a module can never block its own removal. + * - Calls `onUninstall` under a stipend inside try/catch, emitting + * `UninstallCallbackFailed` if it reverts or exhausts the stipend, then emits + * `ModuleUninstalled`. + * - The probe is scoped to the engine alone, so a hostile third-party validator can + * never block its own removal. + * - A probe that reverts or runs out of gas proceeds with removal: the guard exists to + * prevent an ordering mistake, not to make a broken engine permanent. + * + * @param moduleTypeId ERC-7579 module type; only the validator type is accepted. + * @param module Module to uninstall. + * @param deInitData Opaque data forwarded to the module's `onUninstall`. + */ + function uninstallModule(uint256 moduleTypeId, address module, bytes calldata deInitData) + external + onlyOwner + nonReentrant + { + if (moduleTypeId != MODULE_TYPE_VALIDATOR) { + revert AGWErrors.UnsupportedModuleType(moduleTypeId); + } + if (!_installedValidators[module]) revert AGWErrors.ValidatorNotInstalled(module); + + if (module == SESSION_ENGINE) { + (bool ok, bytes memory ret) = module.staticcall{ gas: ENGINE_STATE_PROBE_GAS }( + abi.encodeCall(ISmartSession.isInitialized, (address(this))) + ); + if (ok && ret.length >= 32 && abi.decode(ret, (bool))) { + revert AGWErrors.EngineStillHoldsPermissions(); + } + } + + _installedValidators[module] = false; + + try IERC7579Module(module).onUninstall{ gas: UNINSTALL_CALLBACK_GAS_STIPEND }(deInitData) { } + catch { + emit UninstallCallbackFailed(module); + } + + emit ModuleUninstalled(moduleTypeId, module); + } + + /** + * @notice Whether `module` is installed under `moduleTypeId`. + * @param moduleTypeId ERC-7579 module type to query. + * @param module Module to query. + * @return True only for an installed validator. + */ + function isModuleInstalled(uint256 moduleTypeId, address module, bytes calldata) external view returns (bool) { + return moduleTypeId == MODULE_TYPE_VALIDATOR && _installedValidators[module]; + } + + /** + * @notice Whether this account supports an ERC-7579 module type. + * @param moduleTypeId Module type to query. + * @return True only for the validator type. + */ + function supportsModule(uint256 moduleTypeId) external pure returns (bool) { + return moduleTypeId == MODULE_TYPE_VALIDATOR; + } + + /** + * @notice Whether this account supports an ERC-7579 execution mode. + * @dev Answers for the account as a whole; the agent door additionally restricts itself to + * single calls. + * @param mode ERC-7579 mode word to query. + * @return True for default execution in single or batch call type. + */ + function supportsExecutionMode(bytes32 mode) external pure returns (bool) { + (CallType callType, ExecType execType,,) = ModeCode.wrap(mode).decode(); + if (execType != EXECTYPE_DEFAULT) return false; + return callType == CALLTYPE_SINGLE || callType == CALLTYPE_BATCH; + } + + /// @notice The wallet's owner, read from the clone's immutable args. + function owner() external view returns (address) { + return _owner(); + } + + /// @notice The factory that deployed this wallet. + function factory() external view returns (address) { + return _factory(); + } + + /** + * @notice Next expected sequence number in an owner lane (`OWNER_LANE_FLAG` set), consumed by + * `executeWithSig`. The agent door uses no nonce lanes. + * @param nonceKey Replay lane to query. + * @return The sequence number the next intent in that lane must carry. + */ + function getNonce(uint192 nonceKey) external view returns (uint64) { + return _nonces[nonceKey]; + } + + /// @notice The salt the next grant will use. + function grantNonce() external view returns (uint64) { + return _grantNonce; + } + + /** + * @notice The agent a rules set names on this wallet, or zero if it names none. + * @dev Zero for an unknown or revoked id, for a session the owner enabled on the engine + * directly with a non-canonical session validator, and for a malformed config. Such a + * rules set cannot be used through `executeAsAgent`. + * @param rulesId The rules set to look up. `rulesId` is the engine's `permissionId`. + * @return The agent's Push address, or zero. + */ + function agentOf(bytes32 rulesId) external view returns (address) { + return _agentOf(rulesId); + } + + /** + * @notice Owner-side checkpoints so far. Compare against a snapshot to learn whether the owner side + * touched this wallet since: any owner-door call, grant or revoke moves it; agent actions + * never do. + * @return The number of checkpoints recorded. + */ + function checkpointCount() external view returns (uint64) { + return _checkpointCount; + } + + /** + * @notice `block.number` of the latest checkpoint, or zero if none. A convenience only: consumers + * must compare COUNTS, because several checkpoints can share a block with their snapshot. + * @return The block number of the latest checkpoint. + */ + function lastCheckpointBlock() external view returns (uint64) { + return _lastCheckpointBlock; + } + + /// @notice The OwnerIntent domain separator this wallet verifies against, for a signer on + /// `signerChainId`. Identical to the factory's: the factory is the verifying contract. + function domainSeparator(uint256 signerChainId) external view returns (bytes32) { + return OwnerAuthLib.domainSeparator(_factory(), signerChainId); + } + + /// @notice The ERC-7579 account id, in vendor.account.semver form. + function accountId() external pure returns (string memory) { + return ACCOUNT_ID; + } + + /// @dev Accepts PC with no logic; the wallet pays outbound gas swaps from its own balance and + /// refunds land here. + receive() external payable { } + + /// @notice Accepts ERC-721 transfers, so destination-side refunds and NFTs can land. + function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) { + return this.onERC721Received.selector; + } + + /// @notice Accepts ERC-1155 transfers, so destination-side refunds and NFTs can land. + function onERC1155Received(address, address, uint256, uint256, bytes calldata) external pure returns (bytes4) { + return this.onERC1155Received.selector; + } + + /// @notice Accepts batched ERC-1155 transfers, so destination-side refunds and NFTs can land. + function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata) + external + pure + returns (bytes4) + { + return this.onERC1155BatchReceived.selector; + } + + /** + * @notice ERC-165 support check. + * + * @dev - Reports ERC-165 and the two token-receiver interfaces only. + * - Deliberately does not report `IERC7579Account`: this account implements that + * interface partially, so advertising it would mislead the tooling that probes for it. + * Tooling detects the account through `accountId`, `supportsModule` and + * `supportsExecutionMode` instead. + * + * @param interfaceId Interface id to query. + * @return True for the three supported interfaces. + */ + function supportsInterface(bytes4 interfaceId) external pure returns (bool) { + return interfaceId == type(IERC165).interfaceId // 0x01ffc9a7 + || interfaceId == 0x150b7a02 // IERC721Receiver + || interfaceId == 0x4e2312e0; // IERC1155Receiver + } + + /** + * @notice Always invalid: the wallet never signs as an ERC-1271 party. + * @dev A constant return, with no logic and no future hook. This is also what makes the + * engine's enable-mode grant path dead on these wallets. + * @return The ERC-1271 failure magic value. + */ + function isValidSignature(bytes32, bytes calldata) external pure returns (bytes4) { + return 0xffffffff; + } +} diff --git a/plan/agw/research/deployment-review-2026-10-06/source/src/AGWFactory.sol b/plan/agw/research/deployment-review-2026-10-06/source/src/AGWFactory.sol new file mode 100644 index 00000000..704f1068 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/src/AGWFactory.sol @@ -0,0 +1,355 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { AGWFactoryErrors } from "./libraries/Errors.sol"; + +import { Clones } from "@openzeppelin/contracts/proxy/Clones.sol"; + +import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import { + AccessControlDefaultAdminRulesUpgradeable +} from "@openzeppelin/contracts-upgradeable/access/extensions/AccessControlDefaultAdminRulesUpgradeable.sol"; +import { PausableUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; +import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; + +import { IAGWFactory } from "./interfaces/IAGWFactory.sol"; +import { IAGWInit } from "./interfaces/IAGWInit.sol"; +import { OwnerIntent } from "./libraries/Types.sol"; +import { OwnerAuthLib } from "./libraries/OwnerAuthLib.sol"; + +/** + * @title AGWFactory + * @notice Deploys `AGW` clones at addresses computable before deployment, and is the + * root of trust for wallet identity. + * + * @dev - Wallet addresses are deterministic and predictable before deployment, so counterfactual + * funding is a supported flow. + * - This registry is the only proof of a wallet's provenance: anyone can deploy a contract + * with a lying `owner()` view. The audit chain is destination account, wallet, this + * registry, owner. + * - The owner is the caller, or the signer of an `OwnerIntent` naming this owner, index and + * wallet, presented by the intent's `executor`. Deploying a wallet owned by someone else + * without that owner's signature is impossible. + * - Holds no funds, never touches a wallet after deployment, and has no setter for the + * wallet implementation. + * - Deployed behind an ERC-1967 UUPS proxy; the proxy address is the permanent, + * user-facing factory address and never changes across logic upgrades. + */ +contract AGWFactory is + Initializable, + AccessControlDefaultAdminRulesUpgradeable, + PausableUpgradeable, + UUPSUpgradeable, + IAGWFactory +{ + /// @dev Holder may pause wallet deployment. + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + /// @dev Holder may unpause wallet deployment. + bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); + + /** + * @dev Delay on the two-step admin transfer. + * + * - The admin's one real power is authorising a UUPS upgrade of this logic, which is the + * single action that can permanently strand counterfactually funded addresses. + * - The extension makes `grantRole` and `renounceRole` on the admin role revert, forcing + * the scheduled flow. + */ + uint48 internal constant DEFAULT_ADMIN_DELAY = 2 days; + + /// @dev All bases use ERC-7201 namespaced storage, so these three variables occupy slots 0, 1 + /// and 2. Order is frozen, and a layout test asserts it from `forge inspect` output. + + /// @dev owner => wallets deployed for them, doubling as the next index so a count and an index + /// can never drift apart. `uint96` matches `WalletRecord.index`, so no narrowing cast + /// exists anywhere in this contract. + mapping(address => uint96) internal _walletCount; + + /// @dev wallet => its record; a zero owner means not deployed by this factory. This is the + /// entire registry: existence, owner and index from one packed slot per wallet. + mapping(address => IAGWFactory.WalletRecord) internal _records; + + /** + * @notice The canonical AGW logic contract all clones delegate to. + * + * @dev - Written once, in `initialize`. There is no setter: a function able to rewrite this + * would silently move every predicted address and strand counterfactually funded + * wallets, with no migration path to recover them. + * - Declared last and appended to only. Every future variable goes after it, and nothing + * is inserted or reordered before it, or address derivation breaks with no remedy. + * - `internal`, exposed only through `walletImplementation()`, so no second + * auto-generated getter with a different selector exists. + */ + address internal _walletImplementation; + + // No storage gap: this is a leaf UUPS implementation, so a future version simply appends after + // _walletImplementation. + + /// @dev Locks the logic contract so it can never be initialised directly. + constructor() { + _disableInitializers(); + } + + /** + * @notice Configures the proxy. Callable once, at deployment. + * + * @dev - Reverts with `ZeroAddress` if either address is zero. + * - Sets the admin with the two-day transfer delay, initialises pausable, and records + * the wallet implementation. + * - Makes no external calls and deploys nothing. Pauser and operator membership are + * granted afterwards by the admin through the standard `grantRole`. + * + * @param admin Receives the default admin role. + * @param walletImplementation_ Logic contract every wallet clone will delegate to. + */ + function initialize(address admin, address walletImplementation_) external initializer { + if (admin == address(0) || walletImplementation_ == address(0)) revert AGWFactoryErrors.ZeroAddress(); + + __AccessControlDefaultAdminRules_init(DEFAULT_ADMIN_DELAY, admin); + __Pausable_init(); + // UUPSUpgradeable in OZ 5.7.0 has no initializer; calling one does not compile. + + _walletImplementation = walletImplementation_; + } + + /** + * @notice Deploys the caller's next agent wallet and initialises it. + * + * @dev - Reverts while paused, and with `ImplementationNotSet` if the wallet implementation + * is unset. The latter is reachable only on a proxy deployed without its atomic init + * call; without it, `Clones` would deploy a permanently uninitialisable clone. + * - Advances the caller's wallet count and writes the registry record before the single + * external call, which is what makes a reentrant deploy unable to reuse an index. + * There is deliberately no reentrancy guard; the effect ordering is the protection. + * - Salt is the owner and the factory-assigned sequential index only. Nothing + * rules-related enters the derivation. + * - The owner appears twice, in the salt and in the immutable args, on purpose; + * removing either changes every future address. + * - Calls `initializeAccount` on the new clone. Any revert bubbles and the whole + * deployment unwinds, so an uninitialised wallet can never exist on-chain. + * - Emits `WalletDeployed`. + * + * @param label Free-form label, emitted in the event and never stored. + * @return wallet Address of the newly deployed wallet. + */ + function deployWallet(string calldata label) external whenNotPaused returns (address wallet) { + address implementation = _walletImplementation; + if (implementation == address(0)) revert AGWFactoryErrors.ImplementationNotSet(); + + address owner = msg.sender; + wallet = _deploy(implementation, owner, _walletCount[owner], label); + } + + /** + * @notice Deploys wallet `intent.index` for `intent.owner`, on the owner's signature. + * + * @dev - The index is EXPLICIT and must equal the owner's current count, and `intent.wallet` must + * be the address this call deploys. So a signed intent is idempotent and unmovable: a + * replay fails on the index, and nobody can advance an owner's count without the owner's + * signature. + * - `msg.sender == intent.owner` needs no signature (the caller is the owner, exactly as in + * the single-argument form). Any other caller must be `intent.executor` (non-zero) and + * must carry the owner's signature, before the deadline. + * - Grant and exec fields of the intent are ignored here; the wallet checks those. + * - Every check runs before `_deploy`, which advances the count before its one external + * call — the same effect ordering the single-argument form relies on. + * + * @param intent The owner's intent. Only `owner`, `wallet`, `executor`, `index`, `deadline` and + * `signerChainId` are read here. + * @param sig The owner's signature over `intent`; ignored when the caller is the owner. + * @param label Free-form label, emitted and never stored. Not signed. + * @return wallet The deployed wallet. + */ + function deployWalletWithSig(OwnerIntent calldata intent, bytes calldata sig, string calldata label) + external + whenNotPaused + returns (address wallet) + { + address implementation = _walletImplementation; + if (implementation == address(0)) revert AGWFactoryErrors.ImplementationNotSet(); + + address owner = intent.owner; + if (owner == address(0)) revert AGWFactoryErrors.ZeroAddress(); + + uint96 index = intent.index; + uint96 next = _walletCount[owner]; + if (index != next) revert AGWFactoryErrors.IndexMismatch(next, index); + + address predicted = _predict(implementation, owner, index); + if (intent.wallet != predicted) revert AGWFactoryErrors.IntentWalletMismatch(predicted, intent.wallet); + + if (msg.sender != owner) { + if (intent.executor == address(0) || msg.sender != intent.executor) { + revert AGWFactoryErrors.ExecutorMismatch(intent.executor, msg.sender); + } + if (block.timestamp > intent.deadline) revert AGWFactoryErrors.SignatureExpired(intent.deadline); + if (!OwnerAuthLib.isOwnerSig(owner, OwnerAuthLib.intentDigest(address(this), intent), sig)) { + revert AGWFactoryErrors.InvalidOwnerSignature(); + } + } + + wallet = _deploy(implementation, owner, index, label); + } + + /// @inheritdoc IAGWFactory + function domainSeparator(uint256 signerChainId) external view returns (bytes32) { + return OwnerAuthLib.domainSeparator(address(this), signerChainId); + } + + /** + * @dev The deployment tail shared by `deployWallet` and `deployWalletWithSig`. BYTE-FOR-BYTE the logic the + * single-argument form always had: count advance → salt → args → clone → record → + * initializeAccount → event. Every caller has run all of its checks before calling this. + * + * - The count advances and the record is written before the single external call, which is + * what makes a reentrant deploy unable to reuse an index. + * - Salt and args are frozen forever: counterfactual funding relies on them. + */ + function _deploy(address implementation, address owner, uint96 index, string calldata label) + internal + returns (address wallet) + { + _walletCount[owner] = index + 1; + + bytes32 salt = keccak256(abi.encode(owner, index)); + // 40 bytes: owner at 0-19, factory at 20-39. Frozen forever. + bytes memory args = abi.encodePacked(owner, address(this)); + + wallet = Clones.cloneDeterministicWithImmutableArgs(implementation, args, salt); + + _records[wallet] = WalletRecord({ owner: owner, index: index }); + + IAGWInit(wallet).initializeAccount(); + + emit WalletDeployed(owner, index, wallet, label); + } + + /** + * @dev The address derivation, shared by `predictWallet` and `deployWalletWithSig`. + * Mirrors `_deploy`'s salt and args exactly; any divergence is a critical bug. + */ + function _predict(address implementation, address owner, uint96 index) internal view returns (address) { + bytes32 salt = keccak256(abi.encode(owner, index)); + bytes memory args = abi.encodePacked(owner, address(this)); + return Clones.predictDeterministicAddressWithImmutableArgs(implementation, args, salt, address(this)); + } + + /** + * @notice The address wallet `index` of `owner` has, or will have. + * + * @dev - Reverts with `ImplementationNotSet` if the implementation is unset, and with + * `IndexOutOfRange` if `index` is beyond the next deployable one. Funding an address + * further out than that would put money in a permanent hole. + * - Mirrors `deployWallet`'s salt and args derivation exactly. Any divergence between + * the two is a critical bug, because counterfactual funding relies on this answer. + * - `deployed` is derived from the sequential index rather than `extcodesize`, which + * would misreport during construction and cost more. + * + * @param owner Wallet owner to predict for. + * @param index Wallet index under that owner. + * @return wallet The deterministic address for that owner and index. + * @return deployed True if that wallet already exists. + */ + function predictWallet(address owner, uint256 index) external view returns (address wallet, bool deployed) { + address implementation = _walletImplementation; + if (implementation == address(0)) revert AGWFactoryErrors.ImplementationNotSet(); + + uint256 next = _walletCount[owner]; + if (index > next) revert AGWFactoryErrors.IndexOutOfRange(index, next); + + wallet = _predict(implementation, owner, uint96(index)); + deployed = index < next; + } + + /** + * @notice How many wallets `owner` has; also the index the next deploy will use. + * @dev Full enumeration is this call plus `predictWallet(owner, 0..count-1)`, which is why no + * per-owner wallet array is stored: it cannot be lost or desynced. + * @param owner Owner to count wallets for. + * @return The number of wallets deployed for that owner. + */ + function walletCount(address owner) external view returns (uint256) { + return _walletCount[owner]; + } + + /** + * @notice The owner of `wallet`, or address(0) if this factory did not deploy it. + * @param wallet Wallet to look up. + * @return The recorded owner, or the zero address. + */ + function ownerOf(address wallet) external view returns (address) { + return _records[wallet].owner; + } + + /** + * @notice True only for wallets this factory deployed. + * @param account Address to test. + * @return Whether this factory deployed it. + */ + function isWallet(address account) external view returns (bool) { + return _records[account].owner != address(0); + } + + /** + * @notice The wallet's index under its owner. + * @dev Reverts with `NotAWallet` rather than returning zero, because zero is a valid index. + * @param wallet Wallet to look up. + * @return Its index under its owner. + */ + function indexOf(address wallet) external view returns (uint256) { + WalletRecord memory record = _records[wallet]; + if (record.owner == address(0)) revert AGWFactoryErrors.NotAWallet(wallet); + return record.index; + } + + /** + * @notice The canonical wallet logic contract. + * @dev The only getter for it; the variable is `internal` precisely so no second, + * auto-generated getter exists. Exposed so the SDK can verify its local derivation + * mirror before showing a user an address to fund. + * @return The wallet implementation every clone delegates to. + */ + function walletImplementation() external view returns (address) { + return _walletImplementation; + } + + /** + * @notice Pauses wallet deployment. + * @dev - Gates `deployWallet` only. Views are never gated, and deployed wallets are + * unaffected, since the factory has no reach into them. + * - While paused, a user who funded a predicted address cannot deploy it. Availability + * only; funds are never lost. + */ + function pause() external onlyRole(PAUSER_ROLE) { + _pause(); + } + + /** + * @notice Resumes wallet deployment. + * @dev The role split is deliberate: pause is a cheap panic button, unpause a considered + * operational act. A pauser cannot unpause, and an operator cannot pause. + */ + function unpause() external onlyRole(OPERATOR_ROLE) { + _unpause(); + } + + /** + * @dev Authorises a UUPS upgrade of this logic contract. + * + * - Restricted to the default admin role; reverts with `ZeroAddress` on a zero + * implementation. + * - Every future logic upgrade must leave the salt formula, the immutable-args encoding, + * the value of `_walletImplementation` and the storage layout unchanged. Upgrades exist + * for logic bugs only; the address derivation is frozen forever. + * - New variables are appended after `_walletImplementation`; base contracts are never + * added, removed or reordered, and nothing may come to share that slot. + * - Not `view` although solc suggests it: the base declares `_authorizeUpgrade` non-view, + * and an override cannot add mutability restrictions the base does not have. + * + * @param newImplementation The logic contract being upgraded to. + */ + function _authorizeUpgrade(address newImplementation) internal override onlyRole(DEFAULT_ADMIN_ROLE) { + if (newImplementation == address(0)) revert AGWFactoryErrors.ZeroAddress(); + } +} diff --git a/plan/agw/research/deployment-review-2026-10-06/source/src/interfaces/IAGW.sol b/plan/agw/research/deployment-review-2026-10-06/source/src/interfaces/IAGW.sol new file mode 100644 index 00000000..24155866 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/src/interfaces/IAGW.sol @@ -0,0 +1,199 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { Session } from "smartsessions/DataTypes.sol"; + +import { OwnerIntent, RulesType, CheckpointKind } from "../libraries/Types.sol"; + +/** + * @title IAGW — the Agentic Wallet's external surface. + * @notice The wallet's complete external surface. `AGW is IAGW`, so the compiler rejects any function + * declared here that the contract does not implement with the identical signature — this file + * cannot drift from the contract. Errors live in `AGWErrors` (`libraries/Errors.sol`); types in + * `libraries/Types.sol`. + * + * @dev `rulesId` is the engine's `permissionId`: `rulesId == permissionId` for every rules set this + * wallet grants. SmartSession's own vocabulary (`Session`, `PermissionId`) is kept at the engine + * boundary. + * + * @dev The events are a CONSUMED WIRE FORMAT. Changing a name, a parameter type, or which parameters + * are indexed changes the topic hash and silently breaks every deployed indexer and monitoring + * rule reading the old one. Add events freely; alter an existing one only as a deliberate, + * announced break. + */ +interface IAGW { + // ═══════════════════════════════ AGW_1: EVENTS ═══════════════════════════════ + + /// @notice The one-shot factory initialisation completed; the wallet is live. + event AccountInitialized(address indexed owner, address indexed engine); + + /// @notice The owner executed directly, with no policy consulted. + /// @dev The calldata is hashed rather than logged: an owner batch can be large, and the + /// hash is what an observer needs to tie the event to the transaction it came from. + event OwnerExecuted(bytes32 indexed mode, bytes32 executionCalldataHash); + + /// @notice The owner executed through `executeWithSig`, authorised by a signed OwnerIntent. + /// @dev A separate event from `OwnerExecuted` so an indexer can tell a relayed owner action + /// from one the owner submitted directly. The lane position ties it to the intent. + event OwnerExecutedWithSig(bytes32 indexed mode, bytes32 executionCalldataHash, uint192 nonceKey, uint64 nonceSeq); + + /// @notice A validator module was installed. + event ModuleInstalled(uint256 moduleTypeId, address module); + + /// @notice A validator module was uninstalled. + event ModuleUninstalled(uint256 moduleTypeId, address module); + + /// @notice A module's uninstall callback reverted or exhausted its gas stipend. + /// @dev THE MODULE WAS STILL REMOVED. This is the audit trail for a module that tried to + /// resist its own removal, not a failure of the uninstall. + event UninstallCallbackFailed(address module); + + /// @notice A rules set was granted. + /// @dev `mode` and `chainHash` are DERIVED from the policy envelope's chain namespace, not + /// declared by anyone — nobody in this system states a rules set's kind. The hash is + /// INDEXED so an indexer can filter rules by chain without decoding; the string is carried + /// as data because the wallet already holds it in memory after the action-0 decode + /// (~200 gas) and it makes every explorer record human-readable. + event RulesGranted(bytes32 indexed rulesId, RulesType mode, bytes32 indexed chainHash, string chainNamespace); + + /// @notice A rules set was revoked. + event RulesRevoked(bytes32 indexed rulesId); + + /// @notice An agent request passed validation and was dispatched. + /// @dev Rules-level attribution on the Push side, without touching the gateway's own frozen + /// event. `agent` is the sender (always equal to the rules set's agent). `callsHash` is + /// `keccak256(executionCalldata)` — what ties this record to the exact call executed. + /// A deliberate wire-format break from the earlier `(rulesId, nonceKey, nonceSeq, opHash)` + /// shape; it ships with the new deployment. + event RulesActionAuthorized(bytes32 indexed rulesId, address indexed agent, bytes32 callsHash); + + /// @notice The owner side of this wallet changed. The wallet's checkpoint counter is now `seq`. + /// @dev Emitted once per owner-door call (before the call runs), once per grant and once per + /// revoked id. Never emitted by the agent door. On-chain consumers compare + /// `checkpointCount()` against a snapshot; `kind` and `ref` are for indexers — `ref` is + /// `keccak256(abi.encode(target, value, callData))` for `OWNER_ACTION` and the `rulesId` + /// for `RULES_GRANTED` / `RULES_REVOKED`. + event Checkpointed(uint64 indexed seq, CheckpointKind kind, bytes32 ref, uint64 blockNumber); + + // ═══════════════════════════════ AGW_2: OWNER DOOR ═══════════════════════════════ + + /// @notice The owner door: executes a single call or a batch on the owner's behalf. No policy is + /// ever consulted. Owner only. + function execute(bytes32 mode, bytes calldata executionCalldata) external payable; + + /// @notice The owner door, authorised by a signed OwnerIntent instead of `msg.sender`. Relayable by + /// `intent.executor` only. + function executeWithSig( + bytes32 mode, + bytes calldata executionCalldata, + OwnerIntent calldata intent, + bytes calldata sig + ) external; + + // ═══════════════════════════════ AGW_3: AGENT DOOR ═══════════════════════════════ + + /// @notice The agent door. Callable only by the agent `rulesId` names — a Push address (an EOA, or + /// the UEA of an external key); every call is checked by the rules set's policy. + function executeAsAgent(bytes32 rulesId, bytes32 mode, bytes calldata executionCalldata) external; + + /// @notice The agent a rules set names on this wallet, or zero if it names none (unknown or + /// revoked id, non-canonical session validator, malformed config). + function agentOf(bytes32 rulesId) external view returns (address); + + // ═══════════════════════════════ AGW_4: RULES LIFECYCLE ═══════════════════════════════ + + /// @notice Grants one rules set to an agent. Owner or the wallet itself. + /// @return rulesId The engine's `permissionId` for the new rules set. + function grantRules(Session calldata session) external returns (bytes32 rulesId); + + /// @notice `grantRules`, authorised by the owner's signed OwnerIntent. + /// @return rulesId The engine's `permissionId` for the new rules set. + function grantRulesWithSig(Session calldata session, OwnerIntent calldata intent, bytes calldata sig) + external + returns (bytes32 rulesId); + + /// @notice Revokes one rules set. Owner or the wallet itself. + function revokeRules(bytes32 rulesId) external; + + /// @notice Revokes every rules set on this wallet. Owner or the wallet itself. + function revokeAllRules() external; + + /// @notice Factory-only, once: installs the session engine as the account's sole validator. + function initializeAccount() external; + + /// @notice Installs a validator module. Owner only. + function installModule(uint256 moduleTypeId, address module, bytes calldata initData) external; + + /// @notice Uninstalls a validator module. Owner only; removal always proceeds. + function uninstallModule(uint256 moduleTypeId, address module, bytes calldata deInitData) external; + + // ═══════════════════════════════ AGW_5: VIEWS ═══════════════════════════════ + + /// @notice Whether `module` is installed under `moduleTypeId`. + function isModuleInstalled(uint256 moduleTypeId, address module, bytes calldata) external view returns (bool); + + /// @notice Whether this account supports an ERC-7579 module type. True only for validators. + function supportsModule(uint256 moduleTypeId) external pure returns (bool); + + /// @notice Whether this account supports an ERC-7579 execution mode. + function supportsExecutionMode(bytes32 mode) external pure returns (bool); + + /// @notice The wallet's owner, read from the clone's immutable args. + function owner() external view returns (address); + + /// @notice The factory that deployed this wallet. + function factory() external view returns (address); + + /// @notice Next expected sequence number in an owner lane (`OWNER_LANE_FLAG` set), consumed by + /// `executeWithSig`. + function getNonce(uint192 nonceKey) external view returns (uint64); + + /// @notice The salt the next grant will use. + function grantNonce() external view returns (uint64); + + /// @notice Owner-side checkpoints so far. Any owner-door call, grant or revoke moves it; agent + /// actions never do. + function checkpointCount() external view returns (uint64); + + /// @notice `block.number` of the latest checkpoint, or zero if none. Consumers compare counts, not + /// blocks: several checkpoints can share a block. + function lastCheckpointBlock() external view returns (uint64); + + /// @notice The OwnerIntent EIP-712 domain separator for a signer on `signerChainId`. Identical to + /// the factory's: the factory is the verifying contract. + function domainSeparator(uint256 signerChainId) external view returns (bytes32); + + /// @notice The ERC-7579 account id, in vendor.account.semver form. + function accountId() external pure returns (string memory); + + /// @notice The permission engine this wallet installs as its default validator. + function SESSION_ENGINE() external view returns (address); + + /// @notice The canonical action policy (URP) every rules set on this wallet must name. + function RULES_POLICY() external view returns (address); + + /// @notice The canonical session validator every rules set on this wallet must name — the sender + /// validator that confirms the caller is the rules set's agent. + function SESSION_VALIDATOR() external view returns (address); + + /// @notice The Push-side gateway this wallet's agents send through. + function UNIVERSAL_GATEWAY_PC() external view returns (address); + + /// @notice ERC-165 support check: ERC-165 and the two token-receiver interfaces only. + function supportsInterface(bytes4 interfaceId) external pure returns (bool); + + /// @notice Always the ERC-1271 failure value: the wallet never signs as an ERC-1271 party. + function isValidSignature(bytes32, bytes calldata) external pure returns (bytes4); + + /// @notice Accepts ERC-721 transfers. + function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4); + + /// @notice Accepts ERC-1155 transfers. + function onERC1155Received(address, address, uint256, uint256, bytes calldata) external pure returns (bytes4); + + /// @notice Accepts batched ERC-1155 transfers. + function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata) + external + pure + returns (bytes4); +} diff --git a/plan/agw/research/deployment-review-2026-10-06/source/src/interfaces/IUniversalRulesPolicy.sol b/plan/agw/research/deployment-review-2026-10-06/source/src/interfaces/IUniversalRulesPolicy.sol new file mode 100644 index 00000000..abde64fd --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/src/interfaces/IUniversalRulesPolicy.sol @@ -0,0 +1,111 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { IActionPolicy } from "smartsessions/interfaces/IPolicy.sol"; +import { ConfigId } from "smartsessions/DataTypes.sol"; + +import { RulesType, VmFamily, Config, ModeSlot, NativeConfig, SvmConfig } from "../libraries/Types.sol"; + +/** + * @title IUniversalRulesPolicy (IURP) + * @notice The engine-facing functions (`initializeWithMultiplexer`, `checkAction`) and + * `supportsInterface` are INHERITED from upstream `IActionPolicy`, never repeated here. + * Duplicating a signature across a trust boundary is the drift this project removes. + * + * @dev INHERITANCE SHAPE, verified by compiled probe. `IActionPolicy is IPolicy is IERC165`, + * so IERC165 already arrives transitively and listing it again as + * `is IActionPolicy, IERC165` fails with `Error (5005): Linearization of inheritance + * graph impossible` — C3 linearization requires the most-derived base first. Single + * inheritance is both correct and sufficient; do not "complete" it by adding IERC165. + * + * @dev Errors live in `UniversalRulesPolicyErrors` (`libraries/Errors.sol`); the policy's types live + * in `libraries/Types.sol`. + * + * @dev Revert data truncates to 32 bytes through the engine (`PolicyLib.sol:139-152`, + * `_maxCopy: 32`, surfacing as `PolicyCheckReverted(bytes32)`). The 4-byte selector + * survives; multi-argument custom errors do not round-trip to the caller. Errors below + * still carry their arguments because URP is also called directly (owner path, + * executor module) where they do survive. + */ +interface IUniversalRulesPolicy is IActionPolicy { + // ═══════════════════════════════ URP_1: EVENTS ═══════════════════════════════ + + /// @dev `mode`, `vm` and `chainHash` are all DERIVED from the envelope's chain string, not + /// declared. For a universal config `chainHash` has additionally been verified against EVERY + /// listed asset's own `SOURCE_CHAIN_NAMESPACE()`. `vm` was added with the SVM rulebook (1.1.0). + event RulesConfigured( + ConfigId indexed id, + address indexed multiplexer, + address indexed account, + RulesType mode, + VmFamily vm, + bytes32 chainHash + ); + /// @dev Emitted on every successful native check. Mirrors the effects: `value` and `amount` may + /// both be zero, and the event still fires, because `callsUsed` still moved. + event NativeCallMetered( + ConfigId indexed id, address indexed multiplexer, address indexed account, uint256 value, uint256 amount + ); + /// @dev `token` is the PRC20 whose counter moved — one rules set meters each listed asset separately. + event OutboundMetered( + ConfigId indexed id, address indexed multiplexer, address indexed account, address token, uint256 amount + ); + event RevertCredited( + bytes32 indexed outboundTxId, ConfigId indexed id, address indexed account, address token, uint256 amountApplied + ); + + // ═══════════════════════════════ URP_2: POLICY ═══════════════════════════════ + + /// @notice Exact-equality assertion on every per-asset spend counter — the change-flow race guard. + /// @dev `expectedSpent[i]` is the expected `spent` of `assets[i]`, in the order the rules set + /// listed them; the array must have exactly one entry per asset. Keyed on the SESSION_ENGINE + /// immutable; there is no multiplexer argument to get wrong. + function assertSpent(ConfigId id, address account, uint256[] calldata expectedSpent) external view; + + /// @notice Credit a confirmed far-side failure back to one asset's spend counter. + /// @dev Executor-module-only, once per outboundTxId, saturating. `token` names the counter and + /// must be a listed asset. Ships inert — Push core's calling side is not yet landed. + function creditRevert(ConfigId id, address account, bytes32 outboundTxId, address token, uint256 amount) external; + + /// @notice The native change-flow race guard: exact equality on all three counters. + /// @dev Reverts `WrongModeForCall(UNIVERSAL)` on a universal config and `NotInitialized` on a + /// ghost, for the same reason the universal overload does — this exists to catch stale + /// belief, so it must not have a silent-pass mode. + function assertSpent( + ConfigId id, + address account, + uint256 expectedValueSpent, + uint256 expectedAmountSpent, + uint32 expectedCalls + ) external view; + + // ═══════════════════════════════ URP_3: VIEWS ═══════════════════════════════ + + /// @notice The universal config. Reverts `WrongModeForCall(NATIVE)` on a native slot; returns a + /// zeroed struct on an EMPTY slot, exactly as it always has. + function getConfig(ConfigId id, address account) external view returns (Config memory); + + /// @notice The native config. Reverts `WrongModeForCall(UNIVERSAL)` on a universal slot; returns + /// a zeroed struct on an empty slot. + function getNativeConfig(ConfigId id, address account) external view returns (NativeConfig memory); + + /// @notice The SVM config. Reverts `WrongModeForCall(NATIVE)` on a native slot and + /// `WrongVmForCall(EVM)` on an EVM universal slot; returns a zeroed struct on an empty + /// slot, the same convention as the other two getters. + function getSvmConfig(ConfigId id, address account) external view returns (SvmConfig memory); + + /// @notice The mode record. NEVER REVERTS — the documented first call for any integrator that + /// does not already know a rules set's mode. An empty slot returns + /// `(initialized: false, mode: UNIVERSAL, vm: EVM, chainHash: 0)`, where the mode and vm + /// values are meaningless. An initialised entry always carries its chain. + function getMode(ConfigId id, address account) external view returns (ModeSlot memory); + + /// @notice The hash this URP derives NATIVE from: `keccak256("eip155:" ‖ decimal(block.chainid))`. + /// @dev Exposed so the deploy script asserts what URP will ACTUALLY derive rather than + /// recomputing the formula and agreeing with itself, and so an SDK can confirm the exact + /// native chain string it should emit. Computed, never stored. + function pushChainHash() external view returns (bytes32); + + /// @notice Whether a Push-core outbound id has already been credited back. + function isCredited(bytes32 outboundTxId) external view returns (bool); +} diff --git a/plan/agw/research/deployment-review-2026-10-06/source/src/libraries/AgentConfigLib.sol b/plan/agw/research/deployment-review-2026-10-06/source/src/libraries/AgentConfigLib.sol new file mode 100644 index 00000000..85461cb2 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/src/libraries/AgentConfigLib.sol @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +/** + * @title AgentConfigLib + * @notice The one decoder of a rules set's agent config — `sessionValidatorInitData` — shared by the + * session validator, which enforces it, and the wallet, which reads it for the agent door's + * pre-check and the `agentOf` view. One decoder, so the two can never disagree. + * + * @dev THE FORMAT, FROZEN: `abi.encode(address agent)` — exactly 32 bytes, the upper 12 bytes zero, + * the address non-zero. The agent is a Push address: an EOA, or the UEA of an external key. + * The config is an input to every permission id (`IdLib`), so changing this format changes + * every id; it may never change. + * + * Never reverts. A config that is not exactly that shape decodes to `address(0)`, which no + * caller can ever be, so every consumer fails closed on it. + */ +library AgentConfigLib { + /// @dev Byte length of a well-formed config: one ABI word. + uint256 internal constant CONFIG_LENGTH = 32; + + /** + * @notice The agent named by `config`, or `address(0)` if `config` is malformed. + * @param config The rules set's `sessionValidatorInitData`. + * @return agent The agent's Push address; zero when the config is not exactly one ABI word + * holding a non-zero address with clean upper bytes. + */ + function decode(bytes memory config) internal pure returns (address agent) { + if (config.length != CONFIG_LENGTH) return address(0); + uint256 word; + assembly ("memory-safe") { + word := mload(add(config, 0x20)) + } + if (word >> 160 != 0) return address(0); + // forge-lint: disable-next-line(unsafe-typecast) + agent = address(uint160(word)); // the upper 96 bits were just checked zero, nothing truncates + } +} diff --git a/plan/agw/research/deployment-review-2026-10-06/source/src/libraries/Errors.sol b/plan/agw/research/deployment-review-2026-10-06/source/src/libraries/Errors.sol new file mode 100644 index 00000000..edb98108 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/src/libraries/Errors.sol @@ -0,0 +1,402 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { ConfigId } from "smartsessions/DataTypes.sol"; + +import { RulesType, VmFamily } from "./Types.sol"; + +/** + * @title Errors — every custom error in the AGW system, one library per contract. + * @notice `AGWErrors` (the wallet), `AGWFactoryErrors`, `UniversalRulesPolicyErrors` (URP) and + * `AgentValidatorErrors`. Moving an error into a library does not change its selector: a + * selector is `bytes4(keccak256(name ‖ argument types))`, independent of where the error + * is declared. + */ + +/// @title AGWErrors +/// @notice Custom errors of the AGW (wallet). +/// @dev Errors used by ExecutionLib live here too, so the libraries do not need an error home +/// of their own. +/// @dev THE ERRORS BELOW ARE NEVER TRUNCATED. They revert directly from the wallet, not through +/// the engine's 32-byte `PolicyCheckReverted` wrapper, so every argument survives intact. +/// URP's diagnostic-first argument ordering (which exists only because of that truncation) +/// deliberately does NOT apply here — do not reorder these for consistency with it. +library AGWErrors { + // ───────────────────── access control ───────────────────── + + error CallerIsNotOwner(); + error CallerIsNotFactory(); + + // ─────────────────── initialisation ─────────────────── + + error AlreadyInitialized(); + /// @dev Zero address, or a codeless target on install. Also raised by the wallet's constructor + /// when any of the four wiring addresses is zero. + error InvalidModuleAddress(); + + // ──────────────────── module manager ──────────────────── + + error ModuleAlreadyInstalled(address module); + error UnsupportedModuleType(uint256 moduleTypeId); + error ValidatorNotInstalled(address validator); + /// @dev The engine-scoped uninstall guard: uninstalling the permission engine while it still + /// holds live permissions would strand rows it then refuses to reinstall over. Revoke + /// everything first. + error EngineStillHoldsPermissions(); + + // ──────────────────── execution modes ──────────────────── + + /// @dev ONE error for every rejected mode — delegatecall, static, try-exec, and, on the agent + /// door specifically, batch. + error UnsupportedExecutionMode(); + + // ──────────────────── the agent door ──────────────────── + + /// @dev `executeAsAgent`: the caller is not the agent named by `rulesId` on this wallet — + /// including when the id is unknown, revoked, or names a session validator other than the + /// canonical one (all of which have no agent). Carries both values: this error is raised by + /// the wallet directly and is never truncated. + error CallerIsNotAgent(bytes32 rulesId, address caller); + /// @dev `executeWithSig`: the intent's sequence number is not the owner lane's next one. + error InvalidNonce(uint192 nonceKey, uint64 expected, uint64 provided); + error ValidationFailed(address authorizer); + error OutsideTimeWindow(uint48 validAfter, uint48 validUntil); + + // ──────────────────── rules set lifecycle ──────────────────── + + error UnknownPermission(bytes32 rulesId); + /// @dev Raised by grantRules's canonical-shape check — the granted session deviates from the + /// shape this system accepts for the DERIVED `RulesType`. Stays for the rules COMMON to + /// both types: user-op policies, ERC-7739, the paymaster permit, the session validator, and + /// the action-policy count. A target that is wrong FOR THE DERIVED TYPE is + /// `RulesTypeMismatch` instead — that distinction is the invariant, stated once. + error MalformedSessionShape(); + + // ──────────────────── native rules set shape (grantRules) ──────────────────── + + /// @dev Action count outside 1..MAX_NATIVE_ACTIONS. Zero is refused too: a rules set that + /// authorises nothing is a misconfiguration, not a valid ascetic grant. + /// + /// ZERO IS NOW CHECKED FOR BOTH MODES, BEFORE THE MODE IS KNOWN. The mode is derived from + /// action 0's envelope, so action 0 must exist before anything can be derived — with no + /// actions there is no envelope, no chain, and therefore no mode. A universal session with + /// zero actions consequently reports `TooManyActions(0)` rather than + /// `MalformedSessionShape`. + error TooManyActions(uint256 count); + + /// @dev The same (target, selector) pair twice in one rules set. Both would hash to one actionId, + /// so the second config would overwrite the first — or be refused — depending on engine + /// internals. Refused here instead, where the error can name the pair. + error DuplicateAction(address target, bytes4 selector); + + /// @dev A NATIVE action naming a target no rules set may ever reach: the zero address, the + /// engine's fallback flag, the wallet itself, the engine, URP, the validator, or the + /// factory. Self and engine are the severe ones — both would let an agent reach the + /// wallet's own lifecycle functions through `onlyOwnerOrSelf`. + error ForbiddenActionTarget(address target); + + /// @dev A NATIVE action naming one of the engine's fallback selectors. `0xFFFFFFFF` + /// (value-only) is permitted and is not one of these. + error ForbiddenActionSelector(bytes4 selector); + + /// @dev The type DERIVED from the envelope's chain does not match the action set: a gateway + /// target under the Push chain, or a non-gateway target under a foreign chain. Carries the + /// offending action's index and target, which is why it is distinct from + /// `MalformedSessionShape` — with up to eight actions, "something was wrong" is not a + /// usable diagnostic. + /// + /// IF YOU MEANT A NATIVE MANDATE AND SEE `UNIVERSAL` HERE, THE CHAIN STRING IS NOT + /// BYTE-EXACT `eip155:` OF THIS CHAIN. `"EIP155:42101"`, `"eip155:042101"` and a + /// leading space all hash to not-Push and therefore derive UNIVERSAL. That is deliberate: + /// the hash comparison is the whole rule, and a string parser would be a second rulebook + /// and a heuristic. The SDK prechecks this so a user sees the real cause. + /// + /// ORDER NOTE: under UNIVERSAL the `n != 1` shape rule runs BEFORE the target check, so a + /// malformed chain string on a multi-action session reports `MalformedSessionShape`. + error RulesTypeMismatch(RulesType derived, uint256 actionIndex, address target); + + /// @dev `grantRules`: action 0's policy envelope declares an empty chain string. The wallet + /// performs no other validation of it — a malformed non-empty string derives UNIVERSAL and + /// is then refused against the targets, or against the asset by URP at init. + error EmptyChain(); + + /// @dev `grantRules`: action `actionIndex` declares a different chain than action 0. A rules set + /// is one thing, on one chain, in one mode — which is what makes mixed rules sets impossible + /// by construction rather than by a rule. + error InconsistentChain(uint256 actionIndex); + + // ──────────────────── the agent door, dispatch ──────────────────── + + /// @dev The validated execution's target is the wallet itself or the engine. Fires in + /// `_gateAndDispatch`, AFTER validation — it is the last layer, and it holds even for a + /// session the owner enabled directly on the engine through the owner door, bypassing + /// `grantRules` entirely. Do not move this check before `_validate`. + error ForbiddenDispatchTarget(address target); + + // ─────────────────── the owner-intent doors ─────────────────── + // + // One shape per name, shared with AGWFactory and UniversalMarketplace, so a test encodes one + // selector whichever contract reverts first. + + /// @dev `intent.deadline` has passed. + error OwnerSigExpired(uint48 deadline); + /// @dev The signature is not the owner's over the intent. + error InvalidOwnerSignature(); + /// @dev `intent.wallet` is not this wallet. + error IntentWalletMismatch(address expected, address provided); + /// @dev Presented by someone other than `intent.executor`, or `intent.executor` is zero. + error ExecutorMismatch(address expected, address actual); + /// @dev `intent.sessionHash` is zero or is not the hash of the session being granted. + error IntentSessionMismatch(bytes32 actual); + /// @dev `intent.grantNonce` is not the wallet's current grant nonce. + error IntentGrantNonceMismatch(uint64 expected, uint64 provided); + /// @dev `intent.execCalldataHash` is zero or does not match, or `intent.mode` does not match. + error IntentExecMismatch(bytes32 actualCalldataHash); + /// @dev `executeWithSig` on a nonce key without `OWNER_LANE_FLAG`. + error OwnerLaneRequired(uint192 nonceKey); + + // ──────────────────── used by ExecutionLib ──────────────────── + + /// @dev ExecutionLib.decodeBatch — the only error any library in src/ actually references. + error MalformedBatchCalldata(); +} + +/// @title AGWFactoryErrors +/// @notice Custom errors of `AGWFactory`. +library AGWFactoryErrors { + /// @dev initialize: admin or implementation is zero. + error ZeroAddress(); + /// @dev deploy/predict called on an uninitialised factory. + error ImplementationNotSet(); + /// @dev indexOf on an address this factory did not deploy. + error NotAWallet(address account); + /// @dev predictWallet beyond the next deployable index. + error IndexOutOfRange(uint256 index, uint256 next); + /// @dev deployWalletWithSig: `intent.index` is not the owner's next index. + error IndexMismatch(uint96 expected, uint96 provided); + /// @dev deployWalletWithSig: `intent.wallet` is not the address this call would deploy. + error IntentWalletMismatch(address expected, address provided); + /// @dev deployWalletWithSig: signature path presented by someone other than `intent.executor`, + /// or `intent.executor` is zero. + error ExecutorMismatch(address expected, address actual); + /// @dev deployWalletWithSig: signature path after `intent.deadline`. + error SignatureExpired(uint48 deadline); + /// @dev deployWalletWithSig: the signature is not the owner's over the intent. + error InvalidOwnerSignature(); +} + +/// @title UniversalRulesPolicyErrors +/// @notice Custom errors of the Universal Rules Policy (URP). +/// @dev Revert data truncates to 32 bytes through the engine (`PolicyLib.sol:139-152`, +/// `_maxCopy: 32`, surfacing as `PolicyCheckReverted(bytes32)`). The 4-byte selector +/// survives; multi-argument custom errors do not round-trip to the caller. Errors below +/// still carry their arguments because URP is also called directly (owner path, executor +/// module, init) where they do survive. +library UniversalRulesPolicyErrors { + error ZeroAddress(); + error NotInitialized(ConfigId id, address account); + error AlreadyInitialized(ConfigId id); + /// @dev init: zero, or not in the future. + error InvalidExpiry(uint48 validUntil); + /// @dev init: zero expectedCEA. + error InvalidConfigField(); + /// @dev init, universal (EVM and SVM): the asset list is empty or longer than MAX_ASSETS. Empty is + /// refused because the token is what pins the destination chain: the gateway routes by it. + error AssetListOutOfRange(uint256 length); + /// @dev init, universal: the same token listed twice — the second entry's caps would be dead. + error DuplicateAsset(address token); + /// @dev init: 0 or > MAX_ALLOWED_CALLS. + error AllowListOutOfRange(uint256 length); + error RulesExpired(uint48 validUntil); + error InvalidTarget(address target); + /// @dev Gate 4a. Distinct from InvalidSelector: there is no selector to report, and a zero + /// sentinel would be indistinguishable from a genuine all-zero-selector payload. + error CalldataTooShort(uint256 length); + error InvalidSelector(bytes4 selector); + /// @dev Gate 4c — body below MIN_OUTBOUND_BODY_LEN. + error MalformedOutboundRequest(uint256 length); + /// @dev Gate 5: the request's token is not in the rules set's asset list. Checked on EVERY request, + /// zero amount included — the token decides the destination chain, so an unlisted token is a + /// chain the owner never approved. + error AssetNotAllowed(address token); + error AmountExceedsCap(uint256 amount, uint256 cap); + error TotalSpendCapExceeded(uint256 wouldBeTotal, uint256 cap); + error PCValueExceedsCap(uint256 value, uint256 cap); + error UncappedGasSwapRejected(); + error InvalidRevertRecipient(address expected, address actual); + error RecipientMustBeEmpty(); + error PayloadNotMulticall(); + error BatchSizeOutOfRange(uint256 count); + error ForbiddenInnerTarget(address target); + error CallNotAllowed(address target, bytes4 selector); + error BeneficiaryMismatch(address expected, address actual); + error InnerValueExceedsAllowance(uint256 index, uint256 value, uint256 maxValue); + error MalformedInnerCalldata(); + error SpentMismatch(uint256 expected, uint256 actual); + /// @dev Universal `assertSpent`: one token's counter differs from what the caller composed against. + error AssetSpentMismatch(address token, uint256 expected, uint256 actual); + /// @dev Universal `assertSpent`: the expected array does not have one entry per listed asset. + error SpentLengthMismatch(uint256 expected, uint256 actual); + error CallerIsNotUEModule(address caller); + error AlreadyCredited(bytes32 outboundTxId); + + // ───────────────────────── native mode errors ───────────────────────── + // + // DIAGNOSTIC VALUE FIRST. The engine truncates policy revert data to 32 bytes + // (`PolicyLib.sol:145`), so a caller sees the 4-byte selector plus only the first 28 bytes of + // the FIRST argument. Putting an index or a length first would surface 28 zero bytes and tell + // nobody anything; putting the offending value first surfaces the thing you debug with. + // This ordering applies to URP errors only — wallet errors are never truncated. + + // init + // + // NOT TRUNCATED. The 28-byte rule above applies to `checkAction`, which the engine wraps in + // `PolicyCheckReverted`. `initializeWithMultiplexer` is a plain high-level call from + // `ConfigLib.sol:98-101` inside `enableSessions`, so init reverts BUBBLE WITH FULL DATA. Tests + // assert these with a plain `vm.expectRevert(abi.encodeWithSelector(...))` carrying every + // argument — never `expectUrpGate`. + + /// @dev init: the envelope's `chain` string is empty. The only validation URP performs on the + /// string itself; a malformed non-empty string derives UNIVERSAL and is caught by the + /// asset check instead. + error EmptyChain(); + /// @dev init: the envelope's first word is not `ENVELOPE_VERSION`. Read before anything else is + /// decoded, so most malformed or pre-version blobs land here, named: a two-field + /// `(string, bytes)` envelope starts with its string offset and reports version 64. + error UnsupportedEnvelopeVersion(uint256 version); + + /// @dev init, universal: the asset reports a different source chain than the envelope declares. + /// `declared` first because it is the value the owner can act on. + error ChainMismatch(bytes32 declared, bytes32 assetChain); + + /// @dev init, universal: the asset has no code, is an EOA, or REVERTED when asked for + /// `SOURCE_CHAIN_NAMESPACE()`. + /// + /// AN ASSET THAT *ANSWERS* WITH A NON-STRING, OR WITH NOTHING, REVERTS UNNAMED INSTEAD — + /// the returndata fails ABI decoding in URP's own frame, which `catch` does not see. The + /// no-code and EOA cases are named only because an explicit `code.length` guard runs first; + /// since solc 0.8.10 the compiler omits the `extcodesize` check when return data is + /// expected, so `try/catch` alone would let both through as unnamed reverts. Measured. + error InvalidAsset(address asset); + /// @dev init: native config with a zero target. + error NativeTargetZero(); + /// @dev init AND gate N3. A native config may never name the gateway, and a native config may + /// never be reached by a gateway-targeted request. The mirror of universal gate 3. + error NativeTargetIsGateway(address target); + /// @dev init: a value-only config (`selector == 0xFFFFFFFF`) carrying pins. Refused rather than + /// left to fail closed at N7: such a config can NEVER authorise anything, so it is a + /// misconfiguration the owner believes they granted, not a valid ascetic config. + error ValueOnlyWithPins(); + /// @dev init: a value-only config carrying an amount rule. Same reasoning. + error ValueOnlyWithAmountRule(); + /// @dev init: pins.length > MAX_PINS. + error TooManyPins(uint256 count); + + // check + error TargetMismatch(address actual, address expected); + error SelectorMismatch(bytes4 actual, bytes4 expected); + /// @dev N5: a value-only action carrying 1..3 bytes of calldata. The engine buckets those under + /// `VALUE_SELECTOR` too; URP is where "value-only means empty calldata" becomes true. + error ValueOnlyCalldataNotEmpty(uint256 length); + error ValueExceedsCap(uint256 value, uint256 cap); + error TotalValueExceeded(uint256 newSpent, uint256 cap); + error CalldataTooShortForPin(uint256 actualLength, uint256 index, uint256 needed); + error ArgPinMismatch(bytes32 actual, uint256 index, bytes32 expected); + error CalldataTooShortForAmount(uint256 actualLength, uint256 needed); + error NativeAmountExceedsCap(uint256 amount, uint256 cap); + error TotalNativeAmountExceeded(uint256 newSpent, uint256 cap); + error CallLimitReached(uint32 callsUsed, uint32 maxCalls); + + // views / assertions + /// @dev A getter or assertion was called against the wrong rulebook — `getConfig` on a native + /// slot, or the five-argument `assertSpent` on a universal one. Carries the mode the config + /// ACTUALLY is. An EMPTY slot is not this error: it returns a zeroed struct exactly as + /// before, because an empty slot is a state while a wrong-mode read is a caller bug. + error WrongModeForCall(RulesType actual); + /// @dev A getter or assertion was called against the wrong VM family — `getConfig` on an SVM + /// slot, `getSvmConfig` on an EVM one. Carries the family the config ACTUALLY is. + error WrongVmForCall(VmFamily actual); + + // ───────────────────────── svm mode errors ───────────────────────── + + // init + /// @dev init: zero expectedCEA or gatewayProgram. + error InvalidSvmConfigField(); + /// @dev init: 0 or > MAX_ALLOWED_PROGRAMS. + error ProgramListOutOfRange(uint256 length); + error TooManySvmPins(uint256 count); + error TooManySvmDataPins(uint256 count); + error TooManyCeaAccounts(uint256 count); + /// @dev init: `discriminatorLen` is 0 without `dataless`, non-zero with it, or above 8. + error DiscriminatorLenOutOfRange(uint256 rule, uint8 len); + /// @dev init: two rules on one program that a single request could both match. First-match + /// must be EXACT, or the stricter rule is dead and its pins never run. + error AmbiguousRule(uint256 i, uint256 j); + /// @dev init: a program the rulebook forbids as a target can never be allow-listed either. + error ForbiddenProgramInAllowList(uint256 rule, bytes32 program); + error SvmPinRuleOutOfRange(uint256 pin, uint8 rule); + /// @dev init: account index at or beyond MAX_SVM_ACCOUNTS, or beyond the rule's `maxAccounts`. + error SvmPinIndexOutOfRange(uint256 pin, uint8 accountIndex); + /// @dev init: a rule's fixed account count exceeds the S13 bound, so no request could meet it. + error SvmMaxAccountsOutOfRange(uint256 rule, uint8 maxAccounts); + /// @dev init: two account pins name the same (rule, index). + error DuplicateSvmPin(uint256 first, uint256 second); + /// @dev init: a `ceaAccounts` entry is zero, repeated, or equal to an allow-listed program. + error InvalidCeaAccount(uint256 index); + /// @dev init: `ceaAccounts` does not contain `expectedCEA`, which would switch S18 off for the + /// one account that always holds value. + error CeaAccountsMissExpectedCEA(); + /// @dev init: a data pin with an impossible shape, or a vacuous / impossible comparison value + /// (a ceiling or floor outside the field's range, a zero ratio term, an EQ value with bytes + /// past `len`). See `SvmDataPin` and `URP._dataPinValueValid`. + error SvmDataPinInvalid(uint256 pin); + /// @dev init: every rule must own at least one account pin. HYGIENE, not a guarantee: one + /// authority pin always passes. Which positions must be pinned is the compiler's job. + error RuleWithoutPin(uint256 rule); + + // check + /// @dev S6b. Solana amounts are u64; the node would truncate. Defence in depth. + error AmountExceedsU64(uint256 amount); + /// @dev S11. The recipient must be a 32-byte, non-zero pubkey — the target program. + error RecipientNotPubkey(uint256 length); + /// @dev S12. Execute-only: an empty payload is a funds-only withdraw, never admitted (parity + /// with EVM gate 12). + error SvmPayloadEmpty(); + /// @dev S12. 1 = short header, 2 = short account list, 3 = short ix_data, 4 = trailing bytes. + /// The grammar is the node's `decodePayload`, byte for byte. + error MalformedSvmPayload(uint8 code); + /// @dev S13. Only instruction_id 2 (execute) is admitted. + error SvmInstructionNotExecute(uint8 instructionId); + error SvmAccountsOutOfRange(uint256 count); + error SvmIxDataTooLong(uint256 length); + /// @dev S14. The node signs the payload's target but finalises with the recipient; they must + /// agree or the TSS check fails on Solana at the owner's expense. + error RecipientTargetMismatch(bytes32 recipient, bytes32 target); + /// @dev S15. System, SPL Token, Token-2022, Stake, BPF Loader Upgradeable, Address Lookup Table, + /// the gateway program and the CEA itself. + error ForbiddenTargetProgram(bytes32 program); + /// @dev S16. No rule matches (program, discriminator). Carries the first 8 bytes of ix_data. + error ProgramNotAllowed(bytes32 program, bytes8 discriminator); + /// @dev S16. The rule fixes the account count and the request's differs. + error SvmAccountCountMismatch(uint256 count, uint8 expected); + /// @dev S17. A pinned index does not exist in the request. + error SvmAccountCountBelowPin(uint256 pin, uint256 count, uint8 needed); + error SvmAccountPinMismatch(uint256 pin, uint8 accountIndex, bytes32 expected, bytes32 actual); + /// @dev S17. ix_data is too short for the pin's field. + error SvmDataTooShortForPin(uint256 pin, uint256 ixLen); + error SvmDataPinMismatch(uint256 pin, bytes32 expected, bytes32 actual); + error SvmDataFloorNotMet(uint256 pin, uint256 actual, uint256 floor); + error SvmDataCeilingExceeded(uint256 pin, uint256 actual, uint256 ceiling); + error SvmDataRatioNotMet(uint256 pin, uint256 a, uint256 b, uint64 num, uint64 den); + /// @dev S18. A CEA-controlled account appears at a position the matched rule does not pin to it. + error CeaAccountAtUnpinnedIndex(uint256 accountIndex, bytes32 account); +} + +/// @title AgentValidatorErrors +/// @notice Custom errors of the session validator. +library AgentValidatorErrors { + /// @dev The stored config is not exactly `abi.encode(address agent)` with a non-zero agent. + /// Unreachable through the wallet's grant path, which runs `validateConfig` first; reachable + /// only for a session the owner enabled on the engine directly. + error MalformedConfig(); +} diff --git a/plan/agw/research/deployment-review-2026-10-06/source/src/libraries/Types.sol b/plan/agw/research/deployment-review-2026-10-06/source/src/libraries/Types.sol new file mode 100644 index 00000000..efef214a --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/src/libraries/Types.sol @@ -0,0 +1,544 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +/** + * @notice Mirror of push-chain-gateway .../libraries/TypesUGPC.sol + * @dev MUST match field-for-field and in order. Verified against + * contracts/evm-gateway/src/libraries/TypesUGPC.sol. + */ +struct UniversalOutboundTxRequest { + bytes recipient; // raw destination address on source chain (bytes for SVM compat) + address token; // PRC20 token address on Push Chain + uint256 amount; // amount to withdraw (burn on Push, unlock at origin) + uint256 gasLimit; // gas limit for fee quote; 0 = per-chain default + uint256 gasPrice; // gas price override; 0 = per-chain default + uint256 maxPCForGas; // max native PC for gas swap; 0 = no cap + bytes payload; // ABI-encoded calldata to execute on origin chain + address revertRecipient; // address to receive funds in case of revert +} + +/** + * @notice Mirror of push-chain-core .../libraries/Types.sol + * @dev Batch call entry for multicall execution. + */ +struct Multicall { + address to; + uint256 value; + bytes data; +} + +/// @dev bytes4(keccak256("UEA_MULTICALL")) — magic prefix for multicall payloads. +bytes4 constant MULTICALL_SELECTOR = bytes4(keccak256("UEA_MULTICALL")); + +/** + * @dev The two kinds of rules set. Declared by the owner at grant, asserted by the wallet, stored by + * URP as the config's mode. + * + * DECLARED ONCE, HERE, AND IMPORTED BY BOTH THE WALLET AND `IUniversalRulesPolicy`. Two enums with identical + * values that must always agree is the duplication this file exists to prevent — see the note + * on `SEND_OUTBOUND_SELECTOR` below. The wallet asserts the declared type against the action + * set at grant; URP stores it and branches on it at validation. They must be the same type. + * + * `UNIVERSAL` is the zero value, so an uninitialised slot reads as `UNIVERSAL`. That is why + * URP's `ModeSlot` carries an explicit `initialized` flag and never infers emptiness from the + * mode alone. + */ +enum RulesType { + UNIVERSAL, + NATIVE +} + +/** + * @dev Which destination VM a UNIVERSAL rules set targets. Derived by URP from the envelope's chain + * namespace prefix (`eip155:` / `solana:`) at config init; the wallet never reads it, because + * its grant rules are identical for every non-Push chain. + * + * `EVM` MUST STAY THE ZERO VALUE. URP's `ModeSlot` entries written before this enum existed + * read 0 in the byte that now holds it, and every one of them is an EVM rules set. + */ +enum VmFamily { + EVM, + SVM +} + +/** + * @dev Mirrors of engine constants that are not importable — `IdLib.VALUE_SELECTOR` is `internal` + * to a library, and the fallback flags are file-level constants in the vendored fork. + * + * MIRRORED, NOT GUESSED: each is pinned by a constant-mirror test against the upstream value, + * exactly as `MULTICALL_SELECTOR` is. If the fork moves, the test fails rather than the wallet + * silently permitting an action it means to forbid. + */ + +/// @dev `IdLib.VALUE_SELECTOR` — the action selector the engine assigns when calldata is under four +/// bytes. A native action carrying this selector is a value-only transfer with EMPTY calldata; +/// a no-argument function like `unstake()` still carries its own four bytes and is a normal +/// selector action. +bytes4 constant VALUE_SELECTOR = 0xFFFFFFFF; + +/// @dev `DataTypes.FALLBACK_TARGET_FLAG`. Refused by name at grant time: the engine does NOT reject +/// it at enable time (only at check time, `PolicyLib.sol:200`), so the wallet is the only +/// grant-time layer for this value. +address constant ENGINE_FALLBACK_TARGET = address(1); + +/// @dev `DataTypes.FALLBACK_TARGET_SELECTOR_FLAG` — the wildcard action's selector. +bytes4 constant ENGINE_FALLBACK_SELECTOR = 0x00000001; + +/// @dev `DataTypes.FALLBACK_TARGET_SELECTOR_FLAG_PERMITTED_TO_CALL_SMARTSESSION` — the sentinel that +/// routes a request to the engine itself. An agent reaching this could configure sessions. +bytes4 constant ENGINE_FALLBACK_SELECTOR_SMARTSESSION = 0x00000002; + +/** + * @dev The gateway's outbound entry point — the ONE selector an agent rules set may ever name. + * + * DECLARED HERE, BESIDE THE STRUCT IT TAKES, AND NOWHERE ELSE. The wallet's grant-shape check + * and the policy's request-decode gate must agree on this value exactly: the wallet refuses to + * grant a rules set naming any other selector, and the policy refuses to validate a request + * carrying any other selector. Two independently hand-typed copies of the same signature + * string is the kind of duplication that stays correct only until one of them is edited, and + * the failure would be silent in the safe direction for one contract and open in the other. + * + * The signature string spells out `UniversalOutboundTxRequest` field-for-field because that is + * how Solidity encodes a struct parameter into a selector. It is therefore load-bearing on the + * mirror above: reorder or retype a field there without editing this string and the selector + * silently stops matching the deployed gateway. + */ +bytes4 constant SEND_OUTBOUND_SELECTOR = + bytes4(keccak256("sendUniversalTxOutbound((bytes,address,uint256,uint256,uint256,uint256,bytes,address))")); + +/** + * @dev The owner's signed authorisation for up to three actions: deploy, grant, execute. + * + * SIGNED ONCE under the FACTORY's EIP-712 domain and verified by the factory and by every wallet + * it deploys. Each door checks only its own fields and advances its own nonce, so one signature + * serves each door exactly once. + * + * - Presentable ONLY by `executor`: every door, on its signature path, requires + * `intent.executor != address(0) && msg.sender == intent.executor`. Without that, anyone who saw + * the intent in calldata could drive the doors out of order and burn the owner's signature. + * - A zero `sessionHash` / `execCalldataHash` means "not authorised for that action". + * - EVERY FIELD IS IN THE TYPEHASH, IN DECLARATION ORDER. A field outside the typed data would + * guarantee the SDK and the contract disagree about what was signed. + * + * DECLARED HERE, beside the other values the factory and the wallet must agree on exactly. + */ +struct OwnerIntent { + address owner; // the wallet owner (UEA or EOA) + address wallet; // the wallet this intent is for — the predicted address if not yet deployed + address executor; // the ONLY msg.sender allowed to present this intent to a door + uint96 index; // wallet index under owner; deployWallet requires index == walletCount(owner) + bytes32 sessionHash; // keccak256(abi.encode(Session)) for grantRulesWithSig; 0 = no grant + bytes32 mode; // ERC-7579 mode word for executeWithSig + bytes32 execCalldataHash; // keccak256(executionCalldata) for executeWithSig; 0 = no exec + uint192 nonceKey; // owner lane for executeWithSig; must have OWNER_LANE_FLAG set + uint64 nonceSeq; // expected _nonces[nonceKey] at execution + uint64 grantNonce; // expected _grantNonce at grant + uint48 deadline; // unix seconds; all three doors reject after this + uint256 signerChainId; // EIP-712 domain.chainId the signer's wallet accepts — the owner's HOME chain +} + +/// @dev The struct string must list every OwnerIntent field, in declaration order, with its exact type. +bytes32 constant OWNER_INTENT_TYPEHASH = keccak256( + "OwnerIntent(address owner,address wallet,address executor,uint96 index,bytes32 sessionHash," + "bytes32 mode,bytes32 execCalldataHash,uint192 nonceKey,uint64 nonceSeq,uint64 grantNonce," + "uint48 deadline,uint256 signerChainId)" +); + +/** + * @dev The intent's EIP-712 domain. Five fields: + * - `chainId` is the SIGNER's home chain (`intent.signerChainId`), not Push: MetaMask refuses to + * sign typed data whose `domain.chainId` differs from the active chain. + * - `salt` is `bytes32(block.chainid)` — the Push chain id — which is what isolates one Push chain + * from another. + * - `verifyingContract` is the FACTORY PROXY for both the factory and every wallet; the wallet + * reads it from its immutable args. The `wallet` field stops cross-wallet replay. + */ +bytes32 constant OWNER_INTENT_DOMAIN_TYPEHASH = + keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)"); +bytes32 constant OWNER_INTENT_DOMAIN_NAME_HASH = keccak256("AGWFactory"); +bytes32 constant OWNER_INTENT_DOMAIN_VERSION_HASH = keccak256("1"); + +/** + * @dev Top bit of a uint192 nonce key. `executeWithSig` requires it SET: only owner lanes are ever + * consumed, and keys with it CLEAR are never touched. The agent door uses no nonce lanes at all — + * its replay protection is the sender's own transaction nonce. + */ +uint192 constant OWNER_LANE_FLAG = uint192(1) << 191; + +/** + * @dev The kinds of owner-side change the wallet records as a checkpoint (`IAGW.Checkpointed`). + * + * ORDINALS ARE A FROZEN WIRE FORMAT: indexers and evaluators read them. Append only — never + * reorder, never remove. A future kind (e.g. a binder) is appended as the next ordinal. + */ +enum CheckpointKind { + OWNER_ACTION, + RULES_GRANTED, + RULES_REVOKED +} + +// ─────────────────────── policy types (moved from IURP) ─────────────────────── + +/** + * @dev Maximum pinned arguments per native action. Bounds the N7 loop. + * + * FILE-LEVEL, NOT INSIDE THE INTERFACE — Solidity forbids variables in interfaces (solc 8274), + * and unlike `MAX_ACTIONS_PER_REQUEST` / `MAX_ALLOWED_CALLS` (which are `internal` to URP + * because they bound loops nobody off-chain constructs) this one bounds an array THE SDK + * BUILDS, so an encoder has to be able to see it. Parallel to `MULTICALL_SELECTOR` in + * `Types.sol`. + */ +uint256 constant MAX_PINS = 8; + +/** + * @dev Maximum tokens one UNIVERSAL rules set may list (EVM and SVM alike). Bounds the init duplicate + * check and the gate-5 scan. + * + * FILE-LEVEL FOR THE SAME REASON AS `MAX_PINS`: it bounds an array THE SDK BUILDS. + */ +uint256 constant MAX_ASSETS = 8; + +/** + * @dev The rules-envelope version URP accepts. Every action policy's `initData` is + * `abi.encode(uint16 version, string chainNamespace, bytes body)`, the same shape in every mode. + * URP reads the version from the FIRST WORD before decoding anything else and refuses any other + * value, so a body layout can change later under a new version without being misread. + * FILE-LEVEL so the SDK, which writes the envelope, can read it. + */ +uint16 constant ENVELOPE_VERSION = 1; + +/** + * @notice WIRE TYPE — one token a UNIVERSAL rules set may move, with its own caps. + * @param token The PRC20 ON PUSH (e.g. USDC.eth), never the destination chain's address: the + * gateway request carries the PRC20 and routes by it. Its `SOURCE_CHAIN_NAMESPACE()` + * must equal the rules set's chain, checked at init for every entry. + * @param maxPerCall Per-request ceiling, PRC20 base units. ZERO IS LEGAL and means "this token may + * route a request but never moves": the move-nothing rules set is one entry with a + * zero `maxPerCall`, never an empty list (an empty list would pin no chain). + * @param maxTotal Lifetime ceiling on the amount SENT OUT in this token. `type(uint256).max` = + * unlimited, with no special branch; zero means nothing may move. + */ +struct AssetCap { + address token; + uint256 maxPerCall; + uint256 maxTotal; +} + +/** + * @notice STORAGE TYPE — an `AssetCap` plus the counter URP owns. Never a wire type: a caller-set + * counter would be a granted head start on the cap. + * @param spent Lifetime amount sent out in this token, recorded before dispatch. Money coming back + * to the wallet never lowers it (URP cannot see inflows, and could not tell an agent's + * return from the owner's top-up); only `creditRevert` does. + */ +struct AssetCapState { + address token; + uint256 maxPerCall; + uint256 maxTotal; + uint256 spent; +} + +/// @param target far-chain contract +/// @param selector far-chain function +/// @param beneficiaryOffset byte offset of the beneficiary word in the inner calldata +/// @param hasBeneficiary false for calls with no beneficiary argument +/// @param maxValue per-entry native ceiling, DESTINATION-chain units (0 = non-payable) +struct AllowedCall { + address target; + bytes4 selector; + uint16 beneficiaryOffset; + bool hasBeneficiary; + uint256 maxValue; +} + +/** + * @notice WIRE TYPE — what a UNIVERSAL envelope's body encodes. Not a storage type. + * + * @dev ABSENT BY DESIGN, and each absence is the point: `initialized` (URP sets it), `spent` + * (URP owns it), and the chain (the envelope carries it, exactly once). The SDK used to + * type all three and URP overwrote them — a field whose only legal value is a + * placeholder is a field the caller fills in believing it matters. + * + * Mapped field-by-field onto the storage `Config` by `_store`. The storage struct's + * layout never moves; this one is free to change with the wire format. + */ +struct UniversalTerms { + uint48 validUntil; + address expectedCEA; + AssetCap[] assets; + uint256 maxGasPerCall; + AllowedCall[] allowedCalls; +} + +/// @param initialized set once, at initialisation; re-initialisation is refused +/// @param validUntil non-zero always (enforced at init); "never" = type(uint48).max, explicit +/// @param expectedCEA the wallet's destination account, committed at grant. The rules set's +/// chain is not stored here: it lives on `getMode(id, account).chainHash` +/// @param maxGasPerCall Push-native per-call ceiling on `msg.value`, in PC wei. It pays the protocol +/// fee AND the gas swap, despite the name (renamed from `maxPCPerCall` to +/// match the SDK) +/// @param assets 1..MAX_ASSETS permitted PRC20s, each with its own caps and its own `spent` +struct Config { + bool initialized; + uint48 validUntil; + address expectedCEA; + uint256 maxGasPerCall; + AssetCapState[] assets; + AllowedCall[] allowedCalls; +} + +// ───────────────────────── native mode structs ───────────────────────── + +/** + * @dev Per-config mode record. THE MODE DISCRIMINATOR, and the reason it is a struct rather than + * a bare enum: `RulesType.UNIVERSAL` is the zero value, so an empty storage slot reads as + * `UNIVERSAL` and could not be told apart from a real universal rules set. `initialized` is + * authoritative; `mode` is MEANINGLESS when it is false. + * @param initialized true once any rulebook has been written for this config + * @param mode which rulebook; only meaningful when `initialized` + * @param vm which destination VM a UNIVERSAL config targets; meaningless for NATIVE + */ +struct ModeSlot { + bool initialized; + RulesType mode; + /// @dev ADDED for the SVM rulebook, PLACED HERE ON PURPOSE. Declared between `mode` and + /// `chainHash` it packs into slot 0 at byte 2 — a byte no earlier implementation ever + /// wrote, so every existing entry reads 0 = `EVM`, which is what every existing entry + /// is. No existing member moves: `chainHash` stays at slot 1. Appending it after + /// `chainHash` would be equally safe and cost one more slot per grant; the layout test + /// pins label, slot, offset and type of all four members either way. + VmFamily vm; + /// @dev keccak256(bytes(chain)) as declared in the policy envelope. THE single chain record + /// for BOTH modes — universal stores the destination chain, native stores this chain's + /// own hash. Written at init, never zero on an initialised entry. + bytes32 chainHash; +} + +/** + * @dev One pinned argument of a native call. + * @param offset ABSOLUTE byte offset from byte 0 of the calldata, SELECTOR INCLUDED — so 4 is + * the first argument word, 36 the second, and so on. + * @param expected The full 32-byte word that must appear there. An address argument is + * left-padded by the ABI, so a non-zero high half is a MISMATCH, deliberately: + * full-word equality also proves the padding is clean, which masking would + * silently accept. + */ +struct ArgPin { + uint16 offset; + bytes32 expected; +} + +/** + * @dev Optional metering of a `uint256` argument read out of native calldata. + * @param enabled Whether to meter at all. A BOOL rather than "offset 0 means off", because + * offset 0 is a legal position — it just points inside the selector. + * @param offset Absolute byte offset of the amount word, selector included. + * @param maxPerCall Per-call ceiling. Zero is legal (a call that must carry amount zero). + * @param maxTotal Lifetime ceiling; `type(uint256).max` = unlimited, with no special branch. + */ +struct AmountRule { + bool enabled; + uint16 offset; + uint256 maxPerCall; + uint256 maxTotal; +} + +/** + * @dev The native rulebook for ONE (target, selector) action. One of these per action, so a + * rules set with eight actions holds eight of them under eight distinct config ids. + * + * @param initialized set once; re-initialisation is refused, as in universal mode + * @param validUntil non-zero and future (enforced at init); "never" = type(uint48).max + * @param target defensive copy of the action target, asserted at N4 + * @param selector defensive copy, asserted at N5. `0xFFFFFFFF` = value-only, which means + * EMPTY calldata — a no-argument function still carries four bytes + * @param maxValuePerCall Push-native per-call ceiling + * @param maxValueTotal Push-native lifetime ceiling; type(uint256).max = unlimited + * @param valueSpent lifetime native value metered, written effects-last + * @param amount optional calldata-amount metering + * @param amountSpent lifetime metered amount, written effects-last + * @param maxCalls 0 = unlimited; otherwise the lifetime call ceiling + * @param callsUsed calls consumed. ALWAYS increments on a successful check, including a + * zero-value zero-amount call — a call is a use, and the alternative + * makes `maxCalls` bypassable + * @param pins 0..MAX_PINS pinned argument words + */ +struct NativeConfig { + bool initialized; + uint48 validUntil; + address target; + bytes4 selector; + uint256 maxValuePerCall; + uint256 maxValueTotal; + uint256 valueSpent; + AmountRule amount; + uint256 amountSpent; + uint32 maxCalls; + uint32 callsUsed; + ArgPin[] pins; +} + +/** + * @notice WIRE TYPE — what a NATIVE envelope's body encodes. Not a storage type. + * + * @dev ABSENT BY DESIGN: `initialized`, `valueSpent`, `amountSpent` and `callsUsed` are all + * URP's own counters, zeroed at init. The SDK had to type four zeroes it did not own. + * + * SPLIT EVEN THOUGH ONLY THE UNIVERSAL SIDE FORCES IT. The SDK builds both; one struct + * with dead input fields sitting beside one without is precisely the inconsistency that + * let a since-removed chain field acquire four different conventions in one repository. + */ +struct NativeTerms { + uint48 validUntil; + address target; + bytes4 selector; + uint256 maxValuePerCall; + uint256 maxValueTotal; + AmountRule amount; + uint32 maxCalls; + ArgPin[] pins; +} + +// ───────────────────────── svm mode structs ───────────────────────── +// +// The third rulebook: a UNIVERSAL rules set whose destination is a `solana:*` chain. On Solana an +// outbound is ONE cross-program invocation — a target program, an ordered account list, and an +// instruction byte string — signed by the wallet's CEA (a PDA), not an EVM multicall. Every +// EVM-shaped gate (multicall walk, `address` target, `bytes4` selector, beneficiary word, per-entry +// value) is replaced by the shapes below. See `URP._checkSvm` for the gate list. + +/** + * @dev One allow-listed (program, instruction) pair. + * @param program Target program id, 32 bytes. + * @param discriminator Left-aligned instruction tag; only the first `discriminatorLen` bytes + * are compared. 8 for Anchor (`sha256("global:")[..8]`), 1 for + * SPL-style instruction indexes. + * @param discriminatorLen 1..8, or 0 iff `dataless`. + * @param dataless The instruction carries NO data. The only way to get a length-0 tag, + * and it forces `ix_data` to be EMPTY at check time — so a rule can never + * match an instruction its pins were not written for. + * @param maxAccounts 0 = unbounded; otherwise the request's account count must EQUAL it. + * Set to the IDL count for fixed-layout instructions so nothing can be + * appended behind the pinned positions. + */ +struct AllowedProgram { + bytes32 program; + bytes8 discriminator; + uint8 discriminatorLen; + bool dataless; + uint8 maxAccounts; +} + +/** + * @dev `accounts[accountIndex]` of a request matching rule `ruleIndex` must equal `expected`. + * The SVM counterpart of the EVM beneficiary pin: programs read accounts by POSITION, so a + * value-carrying position is pinned to an owner-committed key (the CEA, or one of its ATAs). + */ +struct SvmAccountPin { + uint8 ruleIndex; + uint8 accountIndex; + bytes32 expected; +} + +/// @dev How an `SvmDataPin` compares. Integers are LITTLE-ENDIAN (Borsh), `len` bytes wide. +enum SvmDataPinMode { + EQ, + GTE_LE, + LTE_LE, + RATIO_GTE_LE +} + +/** + * @dev A constraint on the `ix_data` of a request matching rule `ruleIndex`. + * - EQ `ix_data[off : off+len] == expected[0 : len]`, `len` 1..32, raw bytes, + * LEFT-ALIGNED: bytes of `expected` past `len` must be zero. + * - GTE_LE `uintLE(ix_data[off : off+len]) >= uint256(expected)`, `len` 1..8, + * RIGHT-ALIGNED integer: `expected` must fit in `len` bytes. + * - LTE_LE `uintLE(ix_data[off : off+len]) <= uint256(expected)`, same encoding. + * - RATIO_GTE_LE `uintLE(A) * den >= uintLE(B) * num`, A at `offset`, B at `offsetB`, both + * `len` bytes and both addressed with the same `fromEnd`; `expected` unused; + * `num` and `den` both non-zero. + * This is the min-out floor RELATIVE to the input amount — a static floor on + * the output alone is bypassed by an input equal to the whole balance. + * - fromEnd `offset` counts back from the END of `ix_data` to the field's START. + * Borsh serialises vectors before scalars, so trailing scalar arguments have + * stable from-end offsets and unstable from-start ones. Requires + * `offset >= len`. + */ +struct SvmDataPin { + uint8 ruleIndex; + bool fromEnd; + uint16 offset; + uint16 offsetB; + uint8 len; + SvmDataPinMode mode; + bytes32 expected; + uint64 num; + uint64 den; +} + +/** + * @notice WIRE TYPE — what a `solana:*` UNIVERSAL envelope's body encodes. Not a storage type. + * + * @dev ABSENT BY DESIGN, as in `UniversalTerms`: `initialized` and `spent` are URP's. + * + * @param validUntil non-zero, in the future (enforced at init); "never" = type(uint48).max + * @param expectedCEA the wallet's CEA on the destination: `PDA(["push_identity", wallet], + * gatewayProgram)`. Owner-committed — Solidity cannot derive a PDA. + * @param gatewayProgram the Push gateway program on the declared cluster. Owner-committed; the + * SDK sources it from the chain registry. Forbidden as a target: that + * route only returns the permitted asset to the owner's wallet, at the + * owner's rate-limit and gas cost. + * @param assets 1..MAX_ASSETS permitted PRC20s with their caps, exactly as `UniversalTerms`; + * amounts are PRC20 base units (lamports / SPL base units), and a request's + * amount must also fit Solana's u64 (S6b) + * @param maxGasPerCall Push-native per-call ceiling (protocol fee + gas swap budget), PC wei + * @param ceaAccounts every CEA-controlled account that HOLDS VALUE: the CEA, its ATA for EACH + * listed asset, its ATAs for allowed outputs. At most MAX_CEA_ACCOUNTS (16, + * the CEA included: room for all 8 assets plus 7 outputs). Each may appear in + * a request ONLY at a position the matched rule pins to it; a listed account + * no rule pins can never be passed at all. Unlisted accounts are not + * protected — the list is the owner's statement of what is worth taking. + * URP CANNOT CHECK that each listed asset's ATA is here (it cannot derive a + * Solana token account, and does not know a PRC20's mint): listing them is + * the SDK's job. Must contain `expectedCEA`; no zero, duplicate, or program + * entries. + * @param programs the allow-list; first match wins, made exact by the init ambiguity rule. + * ONE RULE PER (program, instruction), so ONE PINNED KEY PER POSITION: if a + * swap rule pins its input to the USDC account, USDT can never be that + * instruction's input. Using several listed tokens through one instruction + * means leaving the input unpinned and those token accounts unlisted, so + * only the output and price pins protect them. Multi-asset on Solana is + * strongest when different tokens are used by different instructions. + * @param pins account pins, each naming its rule + * @param dataPins `ix_data` pins, each naming its rule + */ +struct SvmTerms { + uint48 validUntil; + bytes32 expectedCEA; + bytes32 gatewayProgram; + AssetCap[] assets; + uint256 maxGasPerCall; + bytes32[] ceaAccounts; + AllowedProgram[] programs; + SvmAccountPin[] pins; + SvmDataPin[] dataPins; +} + +/** + * @dev The SVM rulebook — STORAGE type, lives inside `_svm`. + * @param initialized set once; re-initialisation is refused + * @param assets per-token caps and per-token `spent`, exactly as `Config.assets` + */ +struct SvmConfig { + bool initialized; + uint48 validUntil; + bytes32 expectedCEA; + bytes32 gatewayProgram; + uint256 maxGasPerCall; + AssetCapState[] assets; + bytes32[] ceaAccounts; + AllowedProgram[] programs; + SvmAccountPin[] pins; + SvmDataPin[] dataPins; +} diff --git a/plan/agw/research/deployment-review-2026-10-06/source/src/policies/UniversalRulesPolicy.sol b/plan/agw/research/deployment-review-2026-10-06/source/src/policies/UniversalRulesPolicy.sol new file mode 100644 index 00000000..17799758 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/src/policies/UniversalRulesPolicy.sol @@ -0,0 +1,1881 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { UniversalRulesPolicyErrors } from "../libraries/Errors.sol"; + +import { VALIDATION_SUCCESS } from "erc7579/interfaces/IERC7579Module.sol"; +import { ConfigId } from "smartsessions/DataTypes.sol"; +import { IActionPolicy, IPolicy } from "smartsessions/interfaces/IPolicy.sol"; +import { IERC165 } from "forge-std/interfaces/IERC165.sol"; +import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +import { IUniversalRulesPolicy } from "../interfaces/IUniversalRulesPolicy.sol"; +import { IPRC20Source } from "../interfaces/IPRC20Source.sol"; +import { PushChainLib } from "../libraries/PushChainLib.sol"; +import { + AllowedCall, + AllowedProgram, + ArgPin, + AssetCap, + AssetCapState, + Config, + MAX_ASSETS, + ENVELOPE_VERSION, + MAX_PINS, + ModeSlot, + Multicall, + MULTICALL_SELECTOR, + NativeConfig, + NativeTerms, + RulesType, + SEND_OUTBOUND_SELECTOR as GATEWAY_SEND_OUTBOUND_SELECTOR, + SvmAccountPin, + SvmConfig, + SvmDataPin, + SvmDataPinMode, + SvmTerms, + UniversalOutboundTxRequest, + UniversalTerms, + VALUE_SELECTOR, + VmFamily +} from "../libraries/Types.sol"; + +// Cluster-independent Solana program ids, never targets. Decoded from their base58 ids by tooling and +// pinned by `test_svm_forbiddenProgramConstantsMatchBase58` — do not hand-edit a hex word. FILE-LEVEL, +// not inside the contract, so that test can import them without inheriting all of URP: a harness that +// did so grew past the 24,576-byte limit and failed `make sizes`. Inlined either way; no runtime cost. +/// @dev `11111111111111111111111111111111` — a system transfer with the CEA as funder drains it. +bytes32 constant SYSTEM_PROGRAM = bytes32(0); +/// @dev `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA` — transfer/approve/close with CEA authority. +bytes32 constant SPL_TOKEN_PROGRAM = 0x06ddf6e1d765a193d9cbe146ceeb79ac1cb485ed5f5b37913a8cf5857eff00a9; +/// @dev `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb` — the same surface on Token-2022. +bytes32 constant TOKEN_2022_PROGRAM = 0x06ddf6e1ee758fde18425dbce46ccddab61afc4d83b90d27febdf928d8a18bfc; +/// @dev `Stake11111111111111111111111111111111111111` — withdraw with the CEA as authority. +bytes32 constant STAKE_PROGRAM = 0x06a1d8179137542a983437bdfe2a7ab2557f535c8a78722b68a49dc000000000; +/// @dev `BPFLoaderUpgradeab1e11111111111111111111111` — never a CEA action; refused outright. +bytes32 constant BPF_LOADER_UPGRADEABLE = 0x02a8f6914e88a1b0e210153ef763ae2b00c2b93d16c124d2c0537a1004800000; +/// @dev `AddressLookupTab1e1111111111111111111111111` — rent drain with the CEA as payer. +bytes32 constant ADDRESS_LOOKUP_TABLE = 0x0277a6af97339b7ac88d1892c90446f50002309266f62e53c118244982000000; + +/** + * @title UniversalRulesPolicy (URP) + * @notice The security boundary of the whole system: the only contract that ever inspects what an + * agent really does on the far chain. Everything else routes, stores, or signs. + * + * @dev - The engine identifies actions by hashing the Push-side target and selector, and every + * agent action is the same Push-side call, so to the engine a trade, a deposit and a theft + * are identical. What the user actually authorised lives two decode levels down, inside + * the payload. This policy opens it. + * - It is the fail-closed anchor: the engine requires at least one action policy per action + * (`PolicyLib.check`), so removing this one does not weaken a rules set, it kills every + * request under it. + * - No owner, no setters, no pause. Its three trust anchors are written once, at + * initialisation, and there is no function that can change them afterwards. + * - It never makes an external call, and writes only after every gate has passed. + * + * UPGRADEABLE, BEHIND A TRANSPARENT PROXY, AND THAT IS A DELIBERATE TRADE. This contract + * used to hold its trust anchors in immutables and describe itself as needing no trust at + * all. Immutables live in the implementation's bytecode, which a `delegatecall` never + * executes the constructor of, so upgradeability and immutables are mutually exclusive — + * they had to become storage. The consequence is worth stating plainly rather than + * discovering later: **URP's guarantees now hold subject to the proxy admin not being + * malicious.** An admin able to install new logic can rewrite every gate in this file. + * + * What that means in practice, and what it does NOT mean: + * - No function here can move `SESSION_ENGINE`, the gateway or the executor module. The + * only route to changing them is a full implementation swap by the admin. + * - The admin cannot reach `_configs` or `_credited` directly; it can only replace the code + * that reads them. Existing rules sets keep their caps until an upgrade says otherwise. + * - Storage layout is therefore load-bearing FOREVER. See the layout note on `__gap`. + * + * THE IMPLEMENTATION MUST NEVER BE INITIALISED DIRECTLY. Its constructor disables the + * initialiser for exactly that reason; an initialised implementation is a contract with a + * live config that the proxy does not know about. + */ +contract UniversalRulesPolicy is IUniversalRulesPolicy, Initializable { + /// @dev Maximum inner calls in one request. Bounds the gate-13 loop. + uint256 internal constant MAX_ACTIONS_PER_REQUEST = 10; + + /// @dev Maximum allow-list entries per config. Bounds the allow-list scan. + uint256 internal constant MAX_ALLOWED_CALLS = 32; + + /// @notice The gateway selector every agent action must carry. + /// @dev Part of this contract's ABI, so it stays a public constant. The value comes from the + /// shared gateway constant, so this policy and the wallet's grant-shape check cannot + /// disagree. + bytes4 public constant SEND_OUTBOUND_SELECTOR = GATEWAY_SEND_OUTBOUND_SELECTOR; + + /// @dev Smallest valid ABI encoding of a UniversalOutboundTxRequest argument list: + /// 32 (outer offset) + 256 (eight head words) + 32 + 32 (length words for the two empty + /// bytes fields). Do not hand-maintain: a test pins this against abi.encode of an empty + /// request, so a new struct field fails the build rather than loosening gate 4c. + uint256 internal constant MIN_OUTBOUND_BODY_LEN = 352; + + // ───────────────────────────── svm rulebook bounds ───────────────────────────── + + /// @dev Maximum allow-list entries per SVM config. Mirrors MAX_ALLOWED_CALLS. + uint256 internal constant MAX_ALLOWED_PROGRAMS = 32; + /// @dev Maximum account pins per SVM config. Bounds the S17 and S18 loops. + uint256 internal constant MAX_SVM_PINS = 16; + /// @dev Maximum ix_data pins per SVM config. + uint256 internal constant MAX_SVM_DATA_PINS = 8; + /// @dev Maximum CEA-controlled accounts an owner may list. Bounds the S18 loop. 16 = the CEA, one + /// token account per listed asset (MAX_ASSETS = 8) and up to 7 swap-output accounts. S18 gas + /// grows with the number actually listed, never with this bound. + uint256 internal constant MAX_CEA_ACCOUNTS = 16; + /// @dev Loop bound on a request's account list. Solana's transaction size limit bites first. + uint256 internal constant MAX_SVM_ACCOUNTS = 64; + /// @dev Loop bound on a request's instruction data. + uint256 internal constant MAX_SVM_IX_DATA = 1024; + + // The SVM payload grammar — the node's `decodePayload`, byte for byte: + // [u32 BE count][count × (pubkey32 ‖ is_writable u8)][u32 BE len][ix_data][u8 id][target32] + uint256 internal constant SVM_HEADER_LEN = 4; + uint256 internal constant SVM_ACCOUNT_LEN = 33; + uint256 internal constant SVM_LEN_FIELD = 4; + uint256 internal constant SVM_TRAILER_LEN = 33; + uint8 internal constant SVM_INSTRUCTION_EXECUTE = 2; + + // ───────────────────────────────── storage ───────────────────────────────── + // + // THE LAYOUT BELOW IS FROZEN. Behind a proxy, storage belongs to the proxy and outlives every + // implementation, so a new version may only APPEND — never reorder, never remove, never change + // a type. Doing so does not fail the build: it silently reinterprets live rules sets, which is + // the worst failure mode this system has. + // + // slot 0 UNIVERSAL_GATEWAY_PC + // slot 1 UNIVERSAL_EXECUTOR_MODULE + // slot 2 SESSION_ENGINE + // slot 3 _configs + // slot 4 _credited + // slot 5 _mode APPENDED 2026-09-09 (native mode) + // slot 6 _native APPENDED 2026-09-09 (native mode) + // slot 7 _svm APPENDED 2026-09-30 (svm rulebook) + // slots 8..49 __gap (uint256[42]) + // + // THE 2026-09-09 APPEND, AND WHY IT IS SAFE. `_mode` and `_native` were added AFTER `_credited` + // and `__gap` was shrunk 45 -> 43 in the same commit, so slots 0-4 are byte-identical to the + // deployed layout and `__gap` still ends at slot 49. Nothing that holds data moved. The + // alternative that was rejected — renaming `_configs` to `_universal` and inserting `_native` + // beside it — would have shifted `_credited` and silently reinterpreted the live idempotency + // set. Measured with `forge inspect` before the change, not assumed. + // + // `Initializable` adds nothing here: OZ 5.x keeps its initialisation flags in an ERC-7201 + // namespaced slot, not slot 0. A test pins this exact layout against solc's own output. + + /// @notice The one Push-side target any agent action may reach. + /// @dev Written once by `initialize`. No setter exists, here or anywhere. + address public UNIVERSAL_GATEWAY_PC; + + /// @notice The sole caller permitted to credit a failed outbound. + /// @dev Address unconfirmed against a live deployment; confirm before mainnet. It is an + /// initialiser argument, so nothing about building or testing depends on the real one. + address public UNIVERSAL_EXECUTOR_MODULE; + + /// @notice The multiplexer this contract trusts on every non-engine-driven path. + /// @dev Never accepted as a call argument: a wrong value would silently address an empty + /// slice. It is set once at initialisation and read from storage thereafter. + address public SESSION_ENGINE; + + /// @dev configId => multiplexer (the engine) => account (the wallet) => config. + /// @dev The configId already binds the account and the permission, so the middle level isolates + /// callers, not permissions. + /// @dev On the two engine-driven entry points the multiplexer is msg.sender; every other + /// function keys on SESSION_ENGINE. + mapping(ConfigId => mapping(address => mapping(address => Config))) internal _configs; + + /// @dev outbound tx id => credited already; idempotency for the refund path. + mapping(bytes32 => bool) internal _credited; + + /// @dev configId => multiplexer => account => which rulebook this config uses. + /// @dev THE MODE DISCRIMINATOR. Stored rather than derived from `_native[...].initialized`, + /// because a one-bit derived mode cannot grow: URP is upgradeable behind a proxy, and the + /// register's extensibility item points at MORE MODES. `ModeSlot.initialized` is + /// authoritative for emptiness; `mode` is meaningless when it is false. + mapping(ConfigId => mapping(address => mapping(address => ModeSlot))) internal _mode; + + /// @dev configId => multiplexer => account => the native rulebook. + /// @dev One entry per ACTION, not per rules set: a native rules set with eight actions writes eight + /// of these under eight distinct config ids. + mapping(ConfigId => mapping(address => mapping(address => NativeConfig))) internal _native; + + /// @dev configId => multiplexer => account => the SVM rulebook. + /// @dev APPENDED 2026-09-30 after `_native`; `__gap` shrunk 43 -> 42 in the same commit so it + /// still ends at slot 49. Slots 0-6 are byte-identical to the deployed layout. `ModeSlot` + /// gained a packed byte in the same change (see `ModeSlot.vm`); no member of any live + /// struct moved. Measured with the layout tests, not assumed. + mapping(ConfigId => mapping(address => mapping(address => SvmConfig))) internal _svm; + + /** + * @dev Reserved so a later version can add state without shifting anything above. + * + * Adding a variable means DECREMENTING this by exactly the number of slots consumed, in + * the same commit. A mapping or dynamic array costs one slot; a struct costs its packed + * size. `Config` itself lives inside a mapping, so APPENDING a field to that struct is + * safe and costs nothing here — reordering or removing one is not. + * + * Was `uint256[45]` before the 2026-09-09 native-mode append; `_mode` and `_native` took + * two slots, so it became 43. `_svm` took one more on 2026-09-30, so it is 42. `__gap` + * still ends at slot 49. + */ + uint256[42] private __gap; + + /** + * @notice Locks the implementation so it can never be initialised in its own context. + * + * @dev An implementation left initialisable is a live contract holding a config the proxy + * has no knowledge of. This is the standard guard and it is not optional. + */ + constructor() { + _disableInitializers(); + } + + /** + * @notice Pins the three addresses this policy trusts for its whole lifetime. + * + * @dev Runs once, in the PROXY's context, immediately after deployment. Reverts with + * `ZeroAddress` if any argument is zero, and with `InvalidInitialization` on any + * second call. + * + * Deploy and initialise atomically — pass this call as the TransparentUpgradeableProxy + * constructor's `_data`. A proxy deployed uninitialised is front-runnable: whoever + * calls `initialize` first chooses the engine this policy trusts. + * + * @param universalGatewayPC The one Push-side target agent actions may reach. + * @param universalExecutorModule The only caller permitted to credit a failed outbound. + * @param sessionEngine The multiplexer trusted on non-engine-driven paths. + */ + function initialize(address universalGatewayPC, address universalExecutorModule, address sessionEngine) + external + initializer + { + if (universalGatewayPC == address(0)) revert UniversalRulesPolicyErrors.ZeroAddress(); + if (universalExecutorModule == address(0)) revert UniversalRulesPolicyErrors.ZeroAddress(); + if (sessionEngine == address(0)) revert UniversalRulesPolicyErrors.ZeroAddress(); + + UNIVERSAL_GATEWAY_PC = universalGatewayPC; + UNIVERSAL_EXECUTOR_MODULE = universalExecutorModule; + SESSION_ENGINE = sessionEngine; + } + + /** + * @dev The mode of a config, from its `ModeSlot`, which every init writes. Read by every + * mode-sensitive entry point that is not `checkAction`. + * + * @return initialized true once any rulebook has been written for this config + * @return mode the rulebook; meaningless when `initialized` is false + */ + function _modeOf(ConfigId id, address mux, address account) + internal + view + returns (bool initialized, RulesType mode) + { + ModeSlot storage slot = _mode[id][mux][account]; + return (slot.initialized, slot.mode); + } + + /// @dev The family of a UNIVERSAL config. Meaningless for NATIVE and for empty slots; callers check + /// the mode first. + function _vmOf(ConfigId id, address mux, address account) internal view returns (VmFamily) { + return _mode[id][mux][account].vm; + } + + /** + * @notice Writes one permission's configuration. Reached inside `enableSessions` during the + * wallet's `grantRules`, where `msg.sender` becomes the multiplexer key. + * + * @dev - Refuses re-initialisation, a deliberate deviation from the upstream policy + * interface, which says a repeat call must overwrite. Do not restore overwrite + * semantics for interface fidelity. + * - This cannot break a legitimate regrant: the wallet supplies a fresh salt on every + * grant, so a regranted rules set has a new permission id and therefore an untouched + * config slot. The refusal only ever fires on a path this system does not use. + * - Rejects an allow-list that is empty or longer than the cap, an expiry that is zero + * or already past, a zero expected destination account, and an asset list that is + * empty, longer than MAX_ASSETS, repeats a token, or names a token whose source chain + * is not the declared chain. An owner consent term has no meaningful silence, so + * "never expires" is written as the maximum value. + * - Deliberately does not validate cap values (zero and max are both legal, a zero + * per-call cap being a valid move-nothing entry), `beneficiaryOffset`, or + * allow-list contents. A wrong offset fails closed at validation time; it cannot widen + * a rules set, only break it. Offsets must be generated from each protocol's ABI by + * tooling rather than hand-typed, and each newly supported protocol must ship a test + * rejecting a wrong beneficiary and an oversized amount. + * - Anyone may call this with themselves as the multiplexer; that writes into their own + * keyed slice and the engine never reads it. + * - Writes the config, sets the initialised flag, and emits `RulesConfigured` and + * `PolicySet`. + * + * - THE ENVELOPE. `initData` is `abi.encode(uint16 version, string chain, bytes body)` — + * IDENTICAL IN SHAPE FOR EVERY MODE, which is what lets the chain be read before the + * mode is known. Nobody declares the mode: URP derives it from the chain with + * `PushChainLib.deriveMode`, and the wallet derived the same value from the same bytes + * at grant. There is no mode byte and therefore no `InvalidPolicyMode`. + * - THE VERSION is read from the first word BEFORE anything else is decoded, and anything + * but `ENVELOPE_VERSION` is refused `UnsupportedEnvelopeVersion`. So a body layout can + * change later under a new version, and almost every malformed or pre-version blob is + * refused NAMED: a two-field `(string, bytes)` envelope reports version 64 (its string + * offset), a bare struct 32, a zeroed blob 0. Blobs shorter than one word, and a + * version-1 envelope whose body is the wrong `Terms` type, revert unnamed. Nothing + * mis-decodes into a live config — measured, one test per shape. + * - Re-initialisation is refused ACROSS MODES, and the guard runs BEFORE the decode, so + * a malformed blob aimed at a live config still gets a named `AlreadyInitialized`. + * + * @param account The wallet this config belongs to. + * @param configId Engine-derived id binding the account and the permission. + * @param initData `abi.encode(uint16 version, string chain, bytes body)`, body being + * `abi.encode(UniversalTerms)`, `abi.encode(SvmTerms)` or `abi.encode(NativeTerms)` + * according to the DERIVED mode and family. + */ + function initializeWithMultiplexer(address account, ConfigId configId, bytes calldata initData) external { + ModeSlot storage slot = _mode[configId][msg.sender][account]; + + // Re-initialisation would let the owner door reset a spend counter or flip a mode. + if (slot.initialized) revert UniversalRulesPolicyErrors.AlreadyInitialized(configId); + + // THE VERSION, from the first word, before anything else is decoded. + uint256 envelopeVersion = uint256(bytes32(initData[0:32])); + if (envelopeVersion != ENVELOPE_VERSION) { + revert UniversalRulesPolicyErrors.UnsupportedEnvelopeVersion(envelopeVersion); + } + + // THE ENVELOPE, decoded exactly as the wallet decoded it at grant — same expression, same + // bytes. That identity is the whole consistency argument: there is no second author of the + // discriminator, so there is nothing for the two contracts to disagree about. + (, string memory chainNamespace, bytes memory body) = abi.decode(initData, (uint16, string, bytes)); + if (bytes(chainNamespace).length == 0) revert UniversalRulesPolicyErrors.EmptyChain(); + + bytes32 chainHash = keccak256(bytes(chainNamespace)); + RulesType mode = PushChainLib.deriveMode(chainHash); + + // THE FAMILY, derived only for UNIVERSAL. A native string is `eip155:` too and would classify + // EVM, but NATIVE has no family and must not carry a meaningless one. `deriveVm` refuses any + // namespace without a rulebook, so a `cosmos:` grant fails here, named, instead of producing + // a rules set that passes init and rejects every request. + VmFamily vm = VmFamily.EVM; + if (mode == RulesType.UNIVERSAL) { + vm = PushChainLib.deriveVm(chainNamespace); + if (vm == VmFamily.EVM) { + _initUniversal(_configs[configId][msg.sender][account], body, chainHash); + } else { + _initSvm(_svm[configId][msg.sender][account], body, chainHash); + } + } else { + _initNative(_native[configId][msg.sender][account], body); + } + + slot.initialized = true; + slot.mode = mode; + slot.vm = vm; + slot.chainHash = chainHash; + + emit RulesConfigured(configId, msg.sender, account, mode, vm, chainHash); + emit PolicySet(configId, msg.sender, account); + } + + /// @inheritdoc IUniversalRulesPolicy + function pushChainHash() external view returns (bytes32) { + return PushChainLib.selfChainHash(); + } + + /** + * @dev The universal init guards — unchanged from the single-mode contract, only relocated. + * @param cfg Storage slot to write. + * @param body `abi.encode(Config)`. + */ + function _initUniversal(Config storage cfg, bytes memory body, bytes32 chainHash) internal { + UniversalTerms memory incoming = abi.decode(body, (UniversalTerms)); + + uint256 listLength = incoming.allowedCalls.length; + if (listLength == 0 || listLength > MAX_ALLOWED_CALLS) { + revert UniversalRulesPolicyErrors.AllowListOutOfRange(listLength); + } + + if (incoming.validUntil == 0 || incoming.validUntil <= block.timestamp) { + revert UniversalRulesPolicyErrors.InvalidExpiry(incoming.validUntil); + } + if (incoming.expectedCEA == address(0)) revert UniversalRulesPolicyErrors.InvalidConfigField(); + + // ─── THE TEETH ─── + // + // After every decode and guard, before every write. Effects last, as everywhere else here. + // + // WHY THIS MAKES THE DECLARED CHAIN TRUE AT RUNTIME. `SOURCE_CHAIN_NAMESPACE()` is the exact + // view the gateway reads on every outbound, through `UniversalCore.getOutboundTxGasAndFees`, + // to decide where to route. Gate 5 pins `req.token` to a LISTED asset on every request, zero + // amount included. So asserting it here, for EVERY listed asset, binds the owner's declared + // chain to the chain the gateway will actually use — with no runtime change and no external + // call in `checkAction`. It is also why the list may never be empty: an empty list would pin + // no token, and the agent would choose the chain. + // + // WHY AN EXTERNAL CALL IS SAFE HERE AND NOWHERE ELSE: this runs at INIT, inside the owner's + // own grant transaction, never in `checkAction` and never on a removal path. A failure + // blocks a grant; it can never block a revocation or an execution. The `try/catch` is + // permitted because the external call ALREADY EXISTS — do not extend that reasoning to + // `checkAction`'s decode, which has no external call to hide behind. + // + // A `view` call compiles to STATICCALL, so the callee cannot write state: reentrancy from a + // hostile asset is structurally impossible, not merely unreachable. + // + // ⚠️ THE `code.length` GUARD IS NOT REDUNDANT WITH THE `catch`. MEASURED: + // callee reverts -> catch fires -> named InvalidAsset + // no code at the address, or EOA -> catch does NOT -> UNNAMED, empty revert + // answers with a non-string -> catch does NOT -> UNNAMED, empty revert + // Since solc 0.8.10 the compiler omits the extcodesize check when return data is + // expected; the call to a codeless address then SUCCEEDS with empty returndata and the + // failure happens when THIS frame tries to ABI-decode it — outside the try/catch. Without + // this line a typo'd asset address, the likeliest real mistake, reverts unnamed. + _requireAssets(incoming.assets, chainHash); + + _store(cfg, incoming); + cfg.initialized = true; + } + + /** + * @dev The asset-list guards, shared by both universal families: 1..MAX_ASSETS entries, no token + * twice, and THE TEETH for every entry. A zero token fails the teeth as `InvalidAsset(0)`. + * O(n^2) duplicate check at n <= 8. + */ + function _requireAssets(AssetCap[] memory assets, bytes32 chainHash) internal view { + uint256 n = assets.length; + if (n == 0 || n > MAX_ASSETS) revert UniversalRulesPolicyErrors.AssetListOutOfRange(n); + for (uint256 i; i < n;) { + address token = assets[i].token; + for (uint256 j; j < i;) { + if (assets[j].token == token) revert UniversalRulesPolicyErrors.DuplicateAsset(token); + unchecked { + ++j; + } + } + _requireAssetOnChain(token, chainHash); + unchecked { + ++i; + } + } + } + + /** + * @dev THE TEETH, shared by both universal families. Reverts `InvalidAsset` for a codeless + * address, a reverting callee or a non-string answer, and `ChainMismatch` when the asset's + * own `SOURCE_CHAIN_NAMESPACE()` hash differs from the declared chain. See the long note + * in `_initUniversal` for why this external call is safe at init and nowhere else. + */ + function _requireAssetOnChain(address asset, bytes32 chainHash) internal view { + if (asset.code.length == 0) revert UniversalRulesPolicyErrors.InvalidAsset(asset); + + try IPRC20Source(asset).SOURCE_CHAIN_NAMESPACE() returns (string memory ns) { + bytes32 assetChain = keccak256(bytes(ns)); + if (assetChain != chainHash) revert UniversalRulesPolicyErrors.ChainMismatch(chainHash, assetChain); + } catch { + revert UniversalRulesPolicyErrors.InvalidAsset(asset); + } + } + + /** + * @dev The native init guards. + * + * - Refuses a zero target, and the GATEWAY as a target: the mirror of gate 3, and half of + * the consistency lock. A native config can never be written against the gateway. + * - Refuses a value-only config carrying pins or an amount rule. That combination can never + * authorise anything — every request under it would die at N7/N8 — so it is a + * misconfiguration the owner believes they granted, not a valid ascetic config. Same + * reasoning as the empty-allow-list refusal in universal mode. + * - Deliberately does NOT validate cap values (zero and max are both legal), pin offsets or + * `amount.offset` — they cannot be checked against calldata that does not exist yet, and a + * wrong offset fails closed at N7/N8 rather than widening anything. Nor the selector + * against the engine's fallback flags: the wallet refuses those at grant, and a + * stranger-slice config the engine never reads is harmless. + * + * - MAKES NO EXTERNAL CALL. A native rules set has no asset, so there is nothing to verify the + * chain against — and nothing to verify: the chain IS this chain, which is what made the + * mode NATIVE in the first place. The universal branch's teeth have no native counterpart + * and must not acquire one. + * + * @param cfg Storage slot to write. + * @param body `abi.encode(NativeTerms)`. + */ + function _initNative(NativeConfig storage cfg, bytes memory body) internal { + NativeTerms memory incoming = abi.decode(body, (NativeTerms)); + + if (incoming.validUntil == 0 || incoming.validUntil <= block.timestamp) { + revert UniversalRulesPolicyErrors.InvalidExpiry(incoming.validUntil); + } + if (incoming.target == address(0)) revert UniversalRulesPolicyErrors.NativeTargetZero(); + if (incoming.target == UNIVERSAL_GATEWAY_PC) { + revert UniversalRulesPolicyErrors.NativeTargetIsGateway(incoming.target); + } + if (incoming.pins.length > MAX_PINS) revert UniversalRulesPolicyErrors.TooManyPins(incoming.pins.length); + + if (incoming.selector == VALUE_SELECTOR) { + if (incoming.pins.length != 0) revert UniversalRulesPolicyErrors.ValueOnlyWithPins(); + if (incoming.amount.enabled) revert UniversalRulesPolicyErrors.ValueOnlyWithAmountRule(); + } + + _storeNative(cfg, incoming); + cfg.initialized = true; + } + + /** + * @dev The SVM init guards — the `solana:*` counterpart of `_initUniversal`. + * - Shape bounds first, then expiry and the three identity fields, then the allow-list + * rules, then the pins, then the teeth. Same discipline as the universal branch: every + * decode and guard before any write. + * - The teeth are IDENTICAL to the universal branch and for the same reason: each listed + * asset's `SOURCE_CHAIN_NAMESPACE()` is what the gateway routes on, so binding the declared + * chain to every one of them here is what makes a `solana:` grant with an EVM asset impossible. + * @param cfg Storage slot to write. + * @param body `abi.encode(SvmTerms)`. + * @param chainHash keccak256 of the declared chain string, verified against every listed asset. + */ + function _initSvm(SvmConfig storage cfg, bytes memory body, bytes32 chainHash) internal { + SvmTerms memory incoming = abi.decode(body, (SvmTerms)); + + uint256 ruleCount = incoming.programs.length; + if (ruleCount == 0 || ruleCount > MAX_ALLOWED_PROGRAMS) { + revert UniversalRulesPolicyErrors.ProgramListOutOfRange(ruleCount); + } + if (incoming.pins.length > MAX_SVM_PINS) { + revert UniversalRulesPolicyErrors.TooManySvmPins(incoming.pins.length); + } + if (incoming.dataPins.length > MAX_SVM_DATA_PINS) { + revert UniversalRulesPolicyErrors.TooManySvmDataPins(incoming.dataPins.length); + } + if (incoming.ceaAccounts.length > MAX_CEA_ACCOUNTS) { + revert UniversalRulesPolicyErrors.TooManyCeaAccounts(incoming.ceaAccounts.length); + } + + if (incoming.validUntil == 0 || incoming.validUntil <= block.timestamp) { + revert UniversalRulesPolicyErrors.InvalidExpiry(incoming.validUntil); + } + if (incoming.expectedCEA == bytes32(0) || incoming.gatewayProgram == bytes32(0)) { + revert UniversalRulesPolicyErrors.InvalidSvmConfigField(); + } + + _checkSvmRules(incoming); + _checkSvmPinShapes(incoming); + _checkCeaAccountList(incoming); + + _requireAssets(incoming.assets, chainHash); + + _storeSvm(cfg, incoming); + cfg.initialized = true; + } + + /** + * @dev Allow-list rule guards: tag shape, forbidden programs, and pairwise exactness. + * - A rule is `dataless` XOR has a 1..8-byte tag. + * - A fixed account count, if set, is within the S13 bound. + * - A program the check path forbids as a target is refused here too; S15 is then defence + * in depth against state this guard makes unreachable. + * - Two rules on one program must not both match one request, or first-match makes the + * later rule dead and its pins never run. O(n^2) at n <= 32. + */ + function _checkSvmRules(SvmTerms memory t) internal pure { + uint256 n = t.programs.length; + for (uint256 i; i < n;) { + AllowedProgram memory r = t.programs[i]; + bool badLen = r.dataless ? r.discriminatorLen != 0 : (r.discriminatorLen == 0 || r.discriminatorLen > 8); + if (badLen) revert UniversalRulesPolicyErrors.DiscriminatorLenOutOfRange(i, r.discriminatorLen); + // A fixed count above the S13 loop bound can never be met: every request would fail + // S13 or S16. Refused here so the owner never grants a rule that is dead on arrival. + if (r.maxAccounts > MAX_SVM_ACCOUNTS) { + revert UniversalRulesPolicyErrors.SvmMaxAccountsOutOfRange(i, r.maxAccounts); + } + if (_isForbiddenProgram(r.program, t.gatewayProgram, t.expectedCEA)) { + revert UniversalRulesPolicyErrors.ForbiddenProgramInAllowList(i, r.program); + } + for (uint256 j; j < i;) { + if (_rulesCollide(t.programs[j], r)) revert UniversalRulesPolicyErrors.AmbiguousRule(j, i); + unchecked { + ++j; + } + } + unchecked { + ++i; + } + } + } + + /// @dev Two rules collide when a single request could match both: same program and either both + /// dataless, or neither dataless with one tag a prefix of the other. A dataless rule and a + /// tagged rule never collide — one needs empty ix_data, the other needs at least the tag. + function _rulesCollide(AllowedProgram memory a, AllowedProgram memory b) internal pure returns (bool) { + if (a.program != b.program) return false; + if (a.dataless || b.dataless) return a.dataless && b.dataless; + uint256 shorter = a.discriminatorLen < b.discriminatorLen ? a.discriminatorLen : b.discriminatorLen; + bytes8 mask = _prefixMask8(shorter); + return (a.discriminator & mask) == (b.discriminator & mask); + } + + /** + * @dev Pin shape guards, both kinds. + * - Account pins: rule in range; index below the loop bound and, when the rule fixes its + * account count, below that too. Every rule must own at least one — HYGIENE: an + * authority-only pin always passes, and which positions must be pinned is the compiler's + * responsibility, not this contract's. + * One pin per (rule, index). + * - Data pins: rule in range and not dataless; `len` 1..32 for EQ, 1..8 otherwise; from-end + * offsets must reach at least `len` back; every offset stays inside the ix_data bound; + * the comparison value must be one the field can actually be compared against + * (`_dataPinValueValid`). + */ + function _checkSvmPinShapes(SvmTerms memory t) internal pure { + uint256 ruleCount = t.programs.length; + bool[] memory covered = new bool[](ruleCount); // rule i has at least one account pin + + uint256 n = t.pins.length; + for (uint256 i; i < n;) { + SvmAccountPin memory pin = t.pins[i]; + if (pin.ruleIndex >= ruleCount) revert UniversalRulesPolicyErrors.SvmPinRuleOutOfRange(i, pin.ruleIndex); + uint8 cap = t.programs[pin.ruleIndex].maxAccounts; + if (pin.accountIndex >= MAX_SVM_ACCOUNTS || (cap != 0 && pin.accountIndex >= cap)) { + revert UniversalRulesPolicyErrors.SvmPinIndexOutOfRange(i, pin.accountIndex); + } + // One position, one pin. Two pins on a (rule, index) are either redundant or + // contradictory, and a contradictory pair makes the rule unsatisfiable. O(n^2), n <= 16. + for (uint256 j; j < i;) { + if (t.pins[j].ruleIndex == pin.ruleIndex && t.pins[j].accountIndex == pin.accountIndex) { + revert UniversalRulesPolicyErrors.DuplicateSvmPin(j, i); + } + unchecked { + ++j; + } + } + covered[pin.ruleIndex] = true; + unchecked { + ++i; + } + } + for (uint256 r; r < ruleCount;) { + if (!covered[r]) revert UniversalRulesPolicyErrors.RuleWithoutPin(r); + unchecked { + ++r; + } + } + + n = t.dataPins.length; + for (uint256 i; i < n;) { + SvmDataPin memory dp = t.dataPins[i]; + if (dp.ruleIndex >= ruleCount || t.programs[dp.ruleIndex].dataless) { + revert UniversalRulesPolicyErrors.SvmDataPinInvalid(i); + } + uint256 maxLen = dp.mode == SvmDataPinMode.EQ ? 32 : 8; + if (dp.len == 0 || dp.len > maxLen) revert UniversalRulesPolicyErrors.SvmDataPinInvalid(i); + if (!_offsetValid(dp.fromEnd, dp.offset, dp.len)) revert UniversalRulesPolicyErrors.SvmDataPinInvalid(i); + if (!_dataPinValueValid(dp)) revert UniversalRulesPolicyErrors.SvmDataPinInvalid(i); + unchecked { + ++i; + } + } + } + + /// @dev A from-start field must end inside the bound; a from-end field must start at least `len` + /// back and no further back than the bound. + function _offsetValid(bool fromEnd, uint16 offset, uint8 len) internal pure returns (bool) { + if (fromEnd) return uint256(offset) >= len && uint256(offset) <= MAX_SVM_IX_DATA; + return uint256(offset) + len <= MAX_SVM_IX_DATA; + } + + /** + * @dev Refuses a data pin whose comparison is vacuous or impossible, and the encoding mistake that + * would make it so. The two value encodings differ by mode — EQ compares LEFT-ALIGNED raw + * bytes, the integer modes compare a RIGHT-ALIGNED integer — and each mis-encoding of one + * as the other is caught here, at grant, instead of producing a pin that silently never + * fails (a ceiling above the field's range) or never passes. + * - EQ: every byte of `expected` past `len` must be zero (a right-aligned integer would + * leave its value there). + * - GTE / LTE: `expected` must fit in `len` bytes, i.e. `< 2^(8·len)`. + * - RATIO: `num` and `den` non-zero (`num == 0` makes `a·den >= 0` always true), and the + * second field's offset valid. + */ + function _dataPinValueValid(SvmDataPin memory dp) internal pure returns (bool) { + if (dp.mode == SvmDataPinMode.EQ) return dp.expected & ~_prefixMask32(dp.len) == bytes32(0); + if (dp.mode == SvmDataPinMode.RATIO_GTE_LE) { + return dp.num != 0 && dp.den != 0 && _offsetValid(dp.fromEnd, dp.offsetB, dp.len); + } + return uint256(dp.expected) >> (8 * uint256(dp.len)) == 0; + } + + /** + * @dev The CEA-controlled account list that S18 enforces. + * - Must contain `expectedCEA`. The CEA always holds value (it is the signer, and pSOL lands + * on it), so an empty or CEA-less list would silently switch the aliasing defence off. + * - No zero entry: `bytes32(0)` is the System program's id, present in most account lists, + * and would make every request fail. + * - No entry equal to an allow-listed program: Anchor passes the program's own account in + * many instructions, and listing it would make every such request fail. + * - No duplicates. + * All four fail closed at check time anyway; refusing them here means an owner never grants + * a rules set that can never be used. + */ + function _checkCeaAccountList(SvmTerms memory t) internal pure { + uint256 n = t.ceaAccounts.length; + bool hasCea; + for (uint256 i; i < n;) { + bytes32 key = t.ceaAccounts[i]; + if (key == bytes32(0)) revert UniversalRulesPolicyErrors.InvalidCeaAccount(i); + if (key == t.expectedCEA) hasCea = true; + for (uint256 j; j < i;) { + if (t.ceaAccounts[j] == key) revert UniversalRulesPolicyErrors.InvalidCeaAccount(i); + unchecked { + ++j; + } + } + uint256 rules = t.programs.length; + for (uint256 r; r < rules;) { + if (t.programs[r].program == key) revert UniversalRulesPolicyErrors.InvalidCeaAccount(i); + unchecked { + ++r; + } + } + unchecked { + ++i; + } + } + if (!hasCea) revert UniversalRulesPolicyErrors.CeaAccountsMissExpectedCEA(); + } + + /// @dev The programs an SVM rules set may never target, directly. Inner CPIs are the allow-listed + /// program's own business — this set guards the top level only. + function _isForbiddenProgram(bytes32 program, bytes32 gatewayProgram, bytes32 cea) internal pure returns (bool) { + return program == SYSTEM_PROGRAM || program == SPL_TOKEN_PROGRAM || program == TOKEN_2022_PROGRAM + || program == STAKE_PROGRAM || program == BPF_LOADER_UPGRADEABLE || program == ADDRESS_LOOKUP_TABLE + || program == gatewayProgram || program == cea; + } + + /** + * @notice Runs every gate a cross-chain agent request must pass. Order is fixed; any failure + * reverts with nothing written. + * + * @dev - Not `view`: gate 7 accumulates spend, and the engine invokes this with a real call + * so the write persists. + * - Runs before the session signature is verified, on unauthenticated calldata from an + * arbitrary caller. It is safe because it makes no external call, applies all effects + * last, and reverts on every failure. Do not introduce an external call here. + * - Replayed signatures cannot burn budget through this door; they die at the wallet's + * nonce gate first. + * + * The gates, in order: + * 1. the config is initialised + * 2. the rules set has not expired + * 3. the target is the gateway + * 4. calldata is at least four bytes; the selector is the outbound send; the body is at + * least the minimum encoded length + * 5. the token is one of the listed assets — on EVERY request, zero amount included, + * because the token is what the gateway routes by + * 6. the amount is within THAT asset's per-call cap + * 7. THAT asset's running total is within its lifetime cap + * 8. the Push-native value is within the per-call ceiling (`maxGasPerCall`) + * 9. the request does not ask for an uncapped gas swap + * 10. the revert recipient is the wallet + * 11. the recipient field is empty + * 12. the payload is a multicall + * 13. the inner call count is between one and the maximum + * 14. no inner call targets the wallet, this policy, the gateway or the destination + * account + * 15. each inner target and selector is allow-listed, and where the rule declares a + * beneficiary it matches the expected destination account + * 16. each inner value is within its rule's allowance + * + * - A zero amount passes gate 6 and writes nothing: zero-amount is the redeployment + * path, acting on capital already at the destination. There is no zero-amount gate and + * one must not be added. + * - `abi.decode` ignores trailing bytes, so gate 4c is a length floor and not a + * canonical-encoding check. There is no exploit: the whole execution calldata is bound + * into the wallet's operation hash, and the signature is verified last. + * - A body of correct length carrying malformed internal offsets reverts with a compiler + * panic rather than a named error. It cannot be given a named error without wrapping + * the decode in an external call, which this function must not have. + * - Spend accumulation is optimistic but atomic: it is written during validation and + * survives only because validation and dispatch share one transaction. Splitting them + * breaks the accounting silently. + * - Gate 14 runs before gate 15 on purpose, so a forbidden destination beats the + * allow-list: an owner who allow-listed their own destination account still cannot + * hand the agent direct control of it. + * + * @param id Config id identifying the rules set. + * @param account The wallet. The engine passes its own caller through as this parameter, so it + * is never the engine itself. + * @param target Push-side call target; must be the gateway. + * @param value Push-native value attached to the call. + * @param data The gateway calldata, opened and walked by the gates above. + * @return The engine's success sentinel. + */ + function checkAction(ConfigId id, address account, address target, uint256 value, bytes calldata data) + external + returns (uint256) + { + // MODE ROUTING. An EMPTY slot falls through to the universal path, whose gate 1 reverts + // `NotInitialized` — fail-closed either way. The `initialized &&` conjunction is what makes + // that safe: `RulesType.UNIVERSAL` is the zero value, so testing `mode` alone could not + // tell an empty slot from a real universal one. + ModeSlot storage slot = _mode[id][msg.sender][account]; + if (slot.initialized) { + if (slot.mode == RulesType.NATIVE) return _checkNative(id, account, target, value, data); + // The family byte was never written by earlier implementations, so it reads 0 = EVM on + // every pre-existing universal slot — those keep routing exactly where they always did. + if (slot.vm == VmFamily.SVM) return _checkSvm(id, account, target, value, data); + } + return _checkUniversal(id, account, target, value, data); + } + + /** + * @dev The universal gauntlet — gates 1 to 16, unchanged from the single-mode contract. Only the + * function name and visibility changed; the body is byte-for-byte what `checkAction` was. + * + * @param id Config id identifying the rules set. + * @param account The wallet. + * @param target Push-side call target; must be the gateway. + * @param value Push-native value attached to the call. + * @param data The gateway calldata. + * @return The engine's success sentinel. + */ + function _checkUniversal(ConfigId id, address account, address target, uint256 value, bytes calldata data) + internal + returns (uint256) + { + Config storage cfg = _configs[id][msg.sender][account]; + + if (!cfg.initialized) revert UniversalRulesPolicyErrors.NotInitialized(id, account); + + if (block.timestamp > cfg.validUntil) revert UniversalRulesPolicyErrors.RulesExpired(cfg.validUntil); + + if (target != UNIVERSAL_GATEWAY_PC) revert UniversalRulesPolicyErrors.InvalidTarget(target); + + if (data.length < 4) revert UniversalRulesPolicyErrors.CalldataTooShort(data.length); + + if (bytes4(data[0:4]) != SEND_OUTBOUND_SELECTOR) { + revert UniversalRulesPolicyErrors.InvalidSelector(bytes4(data[0:4])); + } + + if (data.length < 4 + MIN_OUTBOUND_BODY_LEN) { + revert UniversalRulesPolicyErrors.MalformedOutboundRequest(data.length); + } + UniversalOutboundTxRequest memory req = abi.decode(data[4:], (UniversalOutboundTxRequest)); + + AssetCapState storage cap = _assetFor(cfg.assets, req.token); + + if (req.amount > cap.maxPerCall) { + revert UniversalRulesPolicyErrors.AmountExceedsCap(req.amount, cap.maxPerCall); + } + + uint256 newSpent = cap.spent + req.amount; + if (newSpent > cap.maxTotal) revert UniversalRulesPolicyErrors.TotalSpendCapExceeded(newSpent, cap.maxTotal); + + if (value > cfg.maxGasPerCall) revert UniversalRulesPolicyErrors.PCValueExceedsCap(value, cfg.maxGasPerCall); + + if (req.maxPCForGas == 0) revert UniversalRulesPolicyErrors.UncappedGasSwapRejected(); + + if (req.revertRecipient != account) { + revert UniversalRulesPolicyErrors.InvalidRevertRecipient(account, req.revertRecipient); + } + + if (req.recipient.length != 0) revert UniversalRulesPolicyErrors.RecipientMustBeEmpty(); + + _checkInnerCalls(cfg, account, req.payload); + + if (req.amount > 0) { + cap.spent = newSpent; + emit OutboundMetered(id, msg.sender, account, req.token, req.amount); + } + + return VALIDATION_SUCCESS; + } + + /** + * @dev The native gauntlet — gates N1 to N9, then effects. The same discipline as the universal + * path and for the same reason: this runs BEFORE the session signature is verified, on + * unauthenticated calldata from an arbitrary caller. + * + * - NO EXTERNAL CALLS. Pins and the metered amount are read by slicing `data` directly, + * never through `_slice` into memory and never through a helper that calls out. + * - ALL EFFECTS LAST. `newValueSpent` and `newAmountSpent` are computed at N6/N8 and + * assigned only after N9 passes, exactly as `_checkUniversal` handles `newSpent`. A + * request that fails at N7 leaves every counter untouched. + * - BOUNDS ARITHMETIC IS DONE IN `uint256`. `pin.offset` is `uint16`, so + * `uint256(offset) + 32` cannot wrap — but written as `uint16` arithmetic it would, and + * the check would pass on a crafted offset. Do not "simplify" the cast away. + * - `callsUsed` ALWAYS increments on success, including on a zero-value zero-amount call. + * A call is a use; mirroring universal's zero-amount rule (which writes nothing) would + * make `maxCalls` bypassable by zero-value calls, i.e. advisory. This is the one + * deliberate divergence between the two rulebooks. + * - Value-only configs carry no pins and no amount rule — init refuses that combination — + * so with `data.length == 0` the N7 loop does not execute and N8 is skipped. + * + * @param id Config id identifying the rules set. + * @param account The wallet. + * @param target Push-side call target; must be the configured native target. + * @param value Push-native value attached to the call. + * @param data The native calldata, read but never decoded as a structure. + * @return The engine's success sentinel. + */ + function _checkNative(ConfigId id, address account, address target, uint256 value, bytes calldata data) + internal + returns (uint256) + { + NativeConfig storage cfg = _native[id][msg.sender][account]; + + // N1 + if (!cfg.initialized) revert UniversalRulesPolicyErrors.NotInitialized(id, account); + + // N2 + if (block.timestamp > cfg.validUntil) revert UniversalRulesPolicyErrors.RulesExpired(cfg.validUntil); + + // N3 — the consistency lock, mirror of universal gate 3. Init refuses a gateway target, so + // this can only fire on state the wallet's grant check makes unreachable. It is defence in + // depth against a mis-wired grant, not dead code. + if (target == UNIVERSAL_GATEWAY_PC) revert UniversalRulesPolicyErrors.NativeTargetIsGateway(target); + + // N4 + if (target != cfg.target) revert UniversalRulesPolicyErrors.TargetMismatch(target, cfg.target); + + // N5 — under four bytes is the engine's value-only selector; four or more is a real one. + bytes4 sel = data.length < 4 ? VALUE_SELECTOR : bytes4(data[0:4]); + if (sel != cfg.selector) revert UniversalRulesPolicyErrors.SelectorMismatch(sel, cfg.selector); + // Value-only means EMPTY calldata (register N-46). The engine buckets 1..3 bytes under the + // same actionId, so URP is the layer that makes the documented meaning true. + if (sel == VALUE_SELECTOR && data.length != 0) { + revert UniversalRulesPolicyErrors.ValueOnlyCalldataNotEmpty(data.length); + } + + // N6 + if (value > cfg.maxValuePerCall) revert UniversalRulesPolicyErrors.ValueExceedsCap(value, cfg.maxValuePerCall); + uint256 newValueSpent = cfg.valueSpent + value; + if (newValueSpent > cfg.maxValueTotal) { + revert UniversalRulesPolicyErrors.TotalValueExceeded(newValueSpent, cfg.maxValueTotal); + } + + // N7 + uint256 pinCount = cfg.pins.length; + for (uint256 i; i < pinCount;) { + ArgPin storage pin = cfg.pins[i]; + uint256 needed = uint256(pin.offset) + 32; + if (data.length < needed) revert UniversalRulesPolicyErrors.CalldataTooShortForPin(data.length, i, needed); + + bytes32 actual = bytes32(data[pin.offset:needed]); + if (actual != pin.expected) revert UniversalRulesPolicyErrors.ArgPinMismatch(actual, i, pin.expected); + + unchecked { + ++i; + } + } + + // N8 + uint256 amt; + uint256 newAmountSpent = cfg.amountSpent; + if (cfg.amount.enabled) { + uint256 neededAmt = uint256(cfg.amount.offset) + 32; + if (data.length < neededAmt) { + revert UniversalRulesPolicyErrors.CalldataTooShortForAmount(data.length, neededAmt); + } + + amt = uint256(bytes32(data[cfg.amount.offset:neededAmt])); + if (amt > cfg.amount.maxPerCall) { + revert UniversalRulesPolicyErrors.NativeAmountExceedsCap(amt, cfg.amount.maxPerCall); + } + + newAmountSpent = cfg.amountSpent + amt; + if (newAmountSpent > cfg.amount.maxTotal) { + revert UniversalRulesPolicyErrors.TotalNativeAmountExceeded(newAmountSpent, cfg.amount.maxTotal); + } + } + + // N9 + if (cfg.maxCalls != 0 && cfg.callsUsed >= cfg.maxCalls) { + revert UniversalRulesPolicyErrors.CallLimitReached(cfg.callsUsed, cfg.maxCalls); + } + + // Effects, last. + cfg.valueSpent = newValueSpent; + cfg.amountSpent = newAmountSpent; + unchecked { + // Bounded by N9 when maxCalls != 0; when it is 0 the counter is informational and a + // uint32 overflow is unreachable at any realistic call volume. + cfg.callsUsed = cfg.callsUsed + 1; + } + emit NativeCallMetered(id, msg.sender, account, value, amt); + + return VALIDATION_SUCCESS; + } + + /** + * @dev Implements gates 12 to 16 of `checkAction`'s list. + * + * - Split out for stack depth only. It makes no external call and writes no storage, so the + * caller's effects-last property holds. + * - Gate 12 is not merely a format check: the destination account dispatches on the payload + * prefix, and only the multicall branch has entries that gates 13 to 16 can walk. Its + * other branches re-target the account itself or call an arbitrary target with the raw + * payload, bypassing the allow-list, the beneficiary pin and the per-entry value cap. + * Do not weaken this gate, or the agent picks its own branch. + * - A payload that is exactly the multicall selector, or the selector followed by malformed + * bytes, reverts inside the ABI decoder rather than with a named error. No minimum-length + * pre-check is added: unlike gate 4c, this decode sits behind eleven gates on an already + * constrained request, so a second hand-derived constant would be more surface than the + * named error is worth. It fails closed either way. + * + * @param cfg Config to validate against. + * @param account The wallet, used as the forbidden self-target and the refund destination. + * @param payload The multicall payload carried by the outbound request. + */ + function _checkInnerCalls(Config storage cfg, address account, bytes memory payload) internal view { + if (payload.length < 4 || bytes4(_slice(payload, 0, 4)) != MULTICALL_SELECTOR) { + revert UniversalRulesPolicyErrors.PayloadNotMulticall(); + } + + Multicall[] memory calls = abi.decode(_slice(payload, 4, payload.length - 4), (Multicall[])); + + uint256 count = calls.length; + if (count == 0 || count > MAX_ACTIONS_PER_REQUEST) { + revert UniversalRulesPolicyErrors.BatchSizeOutOfRange(count); + } + + address expectedCEA = cfg.expectedCEA; + + for (uint256 i; i < count;) { + Multicall memory entry = calls[i]; + + if ( + entry.to == account || entry.to == address(this) || entry.to == UNIVERSAL_GATEWAY_PC + || entry.to == expectedCEA + ) { + revert UniversalRulesPolicyErrors.ForbiddenInnerTarget(entry.to); + } + if (entry.data.length < 4) revert UniversalRulesPolicyErrors.MalformedInnerCalldata(); + + AllowedCall memory rule = _requireAllowed(cfg, entry.to, bytes4(_slice(entry.data, 0, 4))); + if (rule.hasBeneficiary) { + address beneficiary = _extractBeneficiary(entry.data, rule.beneficiaryOffset); + if (beneficiary != expectedCEA) { + revert UniversalRulesPolicyErrors.BeneficiaryMismatch(expectedCEA, beneficiary); + } + } + + // Destination-chain native units, never the Push-side value: two assets on two chains. + if (entry.value > rule.maxValue) { + revert UniversalRulesPolicyErrors.InnerValueExceedsAllowance(i, entry.value, rule.maxValue); + } + + unchecked { + ++i; + } + } + } + + /** + * @dev The SVM gauntlet — S1 to S18, then effects. Same discipline as the other two: it runs + * BEFORE the session signature is verified, on unauthenticated calldata from an arbitrary + * caller, so it makes no external call, applies all effects last, and reverts on every + * failure. + * + * S1-S10 are the universal gates 1-10 restated against `SvmConfig` — they are chain- + * independent. S6b is Solana's u64 amount. S11 onwards replace gates 11-16: + * + * S11 the recipient is a 32-byte, non-zero pubkey (the target program) + * S12 the payload is non-empty and parses as the node's execute grammar, exactly + * S13 instruction_id is 2 (execute); account count and ix_data length are within bounds + * S14 the payload's target program equals the recipient + * S15 the target is not a forbidden program + * S16 a rule matches (program, tag) — first match — and its account count, if fixed, holds + * S17 every account pin and every data pin of that rule holds + * S18 every CEA-controlled account in the list sits only where that rule pins it + * + * - A zero amount passes S6/S7 and writes nothing: on SVM that is a payload-only call + * acting on capital already at the destination, the analogue of the EVM redeploy path. + * - The forbidden-program check runs before the allow-list, as gate 14 runs before 15. + */ + function _checkSvm(ConfigId id, address account, address target, uint256 value, bytes calldata data) + internal + returns (uint256) + { + SvmConfig storage cfg = _svm[id][msg.sender][account]; + + if (!cfg.initialized) revert UniversalRulesPolicyErrors.NotInitialized(id, account); + + if (block.timestamp > cfg.validUntil) revert UniversalRulesPolicyErrors.RulesExpired(cfg.validUntil); + + if (target != UNIVERSAL_GATEWAY_PC) revert UniversalRulesPolicyErrors.InvalidTarget(target); + + if (data.length < 4) revert UniversalRulesPolicyErrors.CalldataTooShort(data.length); + + if (bytes4(data[0:4]) != SEND_OUTBOUND_SELECTOR) { + revert UniversalRulesPolicyErrors.InvalidSelector(bytes4(data[0:4])); + } + + if (data.length < 4 + MIN_OUTBOUND_BODY_LEN) { + revert UniversalRulesPolicyErrors.MalformedOutboundRequest(data.length); + } + UniversalOutboundTxRequest memory req = abi.decode(data[4:], (UniversalOutboundTxRequest)); + + AssetCapState storage cap = _assetFor(cfg.assets, req.token); + + if (req.amount > cap.maxPerCall) { + revert UniversalRulesPolicyErrors.AmountExceedsCap(req.amount, cap.maxPerCall); + } + + if (req.amount > type(uint64).max) revert UniversalRulesPolicyErrors.AmountExceedsU64(req.amount); + + uint256 newSpent = cap.spent + req.amount; + if (newSpent > cap.maxTotal) revert UniversalRulesPolicyErrors.TotalSpendCapExceeded(newSpent, cap.maxTotal); + + if (value > cfg.maxGasPerCall) revert UniversalRulesPolicyErrors.PCValueExceedsCap(value, cfg.maxGasPerCall); + + if (req.maxPCForGas == 0) revert UniversalRulesPolicyErrors.UncappedGasSwapRejected(); + + if (req.revertRecipient != account) { + revert UniversalRulesPolicyErrors.InvalidRevertRecipient(account, req.revertRecipient); + } + + // S11 — a zero pubkey is reported with the length it has (32): the shape is right, the value + // is not, and both are "not a pubkey". + if (req.recipient.length != 32) revert UniversalRulesPolicyErrors.RecipientNotPubkey(req.recipient.length); + bytes32 recipient = _loadWord(req.recipient, 0); + if (recipient == bytes32(0)) revert UniversalRulesPolicyErrors.RecipientNotPubkey(32); + + _checkSvmPayload(cfg, recipient, req.payload); + + if (req.amount > 0) { + cap.spent = newSpent; + emit OutboundMetered(id, msg.sender, account, req.token, req.amount); + } + + return VALIDATION_SUCCESS; + } + + /// @dev The parsed shape of an execute payload. Memory only; never stored. + struct SvmPayloadView { + uint256 count; + uint256 ixOff; + uint256 ixLen; + bytes32 target; + } + + /** + * @dev S12 to S18. Split out for stack depth; makes no external call, writes no storage. + * @param cfg Config to validate against. + * @param recipient The request's recipient, already proven to be a non-zero pubkey. + * @param payload The execute payload carried by the outbound request. + */ + function _checkSvmPayload(SvmConfig storage cfg, bytes32 recipient, bytes memory payload) internal view { + SvmPayloadView memory v = _parseSvmPayload(payload); + + if (v.target != recipient) revert UniversalRulesPolicyErrors.RecipientTargetMismatch(recipient, v.target); + + if (_isForbiddenProgram(v.target, cfg.gatewayProgram, cfg.expectedCEA)) { + revert UniversalRulesPolicyErrors.ForbiddenTargetProgram(v.target); + } + + uint256 rule = _matchSvmRule(cfg, payload, v); + + _checkSvmAccountPins(cfg, payload, v, rule); + _checkSvmDataPins(cfg, payload, v, rule); + _checkCeaAccounts(cfg, payload, v, rule); + } + + /** + * @dev S12/S13 — the node's `decodePayload` grammar, byte for byte, including "consumed exactly": + * `[u32 BE count][count × (pubkey32 ‖ writable u8)][u32 BE len][ix_data][u8 id][target32]`. + * Every length is checked before the read it guards. `is_writable` bytes are read past, + * never judged — a wrong flag fails on Solana, not here. + */ + function _parseSvmPayload(bytes memory p) internal pure returns (SvmPayloadView memory v) { + if (p.length == 0) revert UniversalRulesPolicyErrors.SvmPayloadEmpty(); + if (p.length < SVM_HEADER_LEN + SVM_LEN_FIELD + SVM_TRAILER_LEN) { + revert UniversalRulesPolicyErrors.MalformedSvmPayload(1); + } + + v.count = _u32be(p, 0); + if (v.count > MAX_SVM_ACCOUNTS) revert UniversalRulesPolicyErrors.SvmAccountsOutOfRange(v.count); + + uint256 lenOff = SVM_HEADER_LEN + v.count * SVM_ACCOUNT_LEN; + if (p.length < lenOff + SVM_LEN_FIELD) revert UniversalRulesPolicyErrors.MalformedSvmPayload(2); + + v.ixLen = _u32be(p, lenOff); + if (v.ixLen > MAX_SVM_IX_DATA) revert UniversalRulesPolicyErrors.SvmIxDataTooLong(v.ixLen); + v.ixOff = lenOff + SVM_LEN_FIELD; + + uint256 expected = v.ixOff + v.ixLen + SVM_TRAILER_LEN; + if (p.length < expected) revert UniversalRulesPolicyErrors.MalformedSvmPayload(3); + if (p.length > expected) revert UniversalRulesPolicyErrors.MalformedSvmPayload(4); + + uint8 id = uint8(p[v.ixOff + v.ixLen]); + if (id != SVM_INSTRUCTION_EXECUTE) revert UniversalRulesPolicyErrors.SvmInstructionNotExecute(id); + + v.target = _loadWord(p, v.ixOff + v.ixLen + 1); + } + + /** + * @dev S16 — first rule whose program equals the target and whose tag matches: a dataless rule + * matches only empty ix_data; a tagged rule needs at least `discriminatorLen` bytes and a + * prefix-equal tag. Init guarantees at most one rule can match, so first-match is exact. + * Then the rule's fixed account count, if any. + */ + function _matchSvmRule(SvmConfig storage cfg, bytes memory p, SvmPayloadView memory v) + internal + view + returns (uint256) + { + uint256 n = cfg.programs.length; + for (uint256 i; i < n;) { + AllowedProgram storage r = cfg.programs[i]; + if (r.program == v.target && _tagMatches(r, p, v)) { + uint8 cap = r.maxAccounts; + if (cap != 0 && v.count != cap) { + revert UniversalRulesPolicyErrors.SvmAccountCountMismatch(v.count, cap); + } + return i; + } + unchecked { + ++i; + } + } + uint256 shown = v.ixLen < 8 ? v.ixLen : 8; + revert UniversalRulesPolicyErrors.ProgramNotAllowed( + v.target, bytes8(_loadWord(p, v.ixOff)) & _prefixMask8(shown) + ); + } + + function _tagMatches(AllowedProgram storage r, bytes memory p, SvmPayloadView memory v) + internal + view + returns (bool) + { + if (r.dataless) return v.ixLen == 0; + uint8 len = r.discriminatorLen; + if (v.ixLen < len) return false; + bytes8 mask = _prefixMask8(len); + return (bytes8(_loadWord(p, v.ixOff)) & mask) == (r.discriminator & mask); + } + + /// @dev S17, account half: every pin of the matched rule names an index that exists and holds + /// the expected key. + function _checkSvmAccountPins(SvmConfig storage cfg, bytes memory p, SvmPayloadView memory v, uint256 rule) + internal + view + { + uint256 n = cfg.pins.length; + for (uint256 i; i < n;) { + SvmAccountPin storage pin = cfg.pins[i]; + if (pin.ruleIndex == rule) { + if (v.count <= pin.accountIndex) { + revert UniversalRulesPolicyErrors.SvmAccountCountBelowPin(i, v.count, pin.accountIndex); + } + bytes32 actual = _svmAccount(p, pin.accountIndex); + if (actual != pin.expected) { + revert UniversalRulesPolicyErrors.SvmAccountPinMismatch(i, pin.accountIndex, pin.expected, actual); + } + } + unchecked { + ++i; + } + } + } + + /// @dev S17, data half. Offsets resolve from the start or the end of ix_data; init proved the + /// from-end shape reaches at least `len` back, so only the length floor is checked here. + /// Integer reads are little-endian, `len` bytes; the ratio is computed in uint256 and cannot + /// overflow (both operands are at most 64 bits wide). + function _checkSvmDataPins(SvmConfig storage cfg, bytes memory p, SvmPayloadView memory v, uint256 rule) + internal + view + { + uint256 n = cfg.dataPins.length; + for (uint256 i; i < n;) { + SvmDataPin storage dp = cfg.dataPins[i]; + if (dp.ruleIndex == rule) _checkOneDataPin(dp, p, v, i); + unchecked { + ++i; + } + } + } + + function _checkOneDataPin(SvmDataPin storage dp, bytes memory p, SvmPayloadView memory v, uint256 i) internal view { + uint256 off = _resolveOffset(dp.fromEnd, dp.offset, dp.len, v.ixLen, i); + uint256 at = v.ixOff + off; + SvmDataPinMode mode = dp.mode; + + if (mode == SvmDataPinMode.EQ) { + bytes32 mask = _prefixMask32(dp.len); + bytes32 actual = _loadWord(p, at) & mask; + bytes32 want = dp.expected & mask; + if (actual != want) revert UniversalRulesPolicyErrors.SvmDataPinMismatch(i, want, actual); + return; + } + + uint256 a = _uintLE(p, at, dp.len); + if (mode == SvmDataPinMode.GTE_LE) { + if (a < uint256(dp.expected)) { + revert UniversalRulesPolicyErrors.SvmDataFloorNotMet(i, a, uint256(dp.expected)); + } + } else if (mode == SvmDataPinMode.LTE_LE) { + if (a > uint256(dp.expected)) { + revert UniversalRulesPolicyErrors.SvmDataCeilingExceeded(i, a, uint256(dp.expected)); + } + } else { + uint256 offB = _resolveOffset(dp.fromEnd, dp.offsetB, dp.len, v.ixLen, i); + uint256 b = _uintLE(p, v.ixOff + offB, dp.len); + if (a * dp.den < b * dp.num) revert UniversalRulesPolicyErrors.SvmDataRatioNotMet(i, a, b, dp.num, dp.den); + } + } + + /// @dev The field's start relative to ix_data, or `SvmDataTooShortForPin` if ix_data cannot hold it. + function _resolveOffset(bool fromEnd, uint16 offset, uint8 len, uint256 ixLen, uint256 pin) + internal + pure + returns (uint256) + { + if (fromEnd) { + if (ixLen < offset) revert UniversalRulesPolicyErrors.SvmDataTooShortForPin(pin, ixLen); + return ixLen - offset; + } + if (ixLen < uint256(offset) + len) revert UniversalRulesPolicyErrors.SvmDataTooShortForPin(pin, ixLen); + return offset; + } + + /** + * @dev S18 — a CEA-controlled account may appear only where the matched rule pins it. Any other + * occurrence hands a program, running with the CEA's signature, an account it was not + * granted. Accounts absent from `ceaAccounts` are not judged: the list is the owner's + * statement of what holds value. O(count × |ceaAccounts| × |pins|), all bounded. + */ + function _checkCeaAccounts(SvmConfig storage cfg, bytes memory p, SvmPayloadView memory v, uint256 rule) + internal + view + { + // Never empty: init requires `expectedCEA` in the list (`_checkCeaAccountList`). + uint256 listed = cfg.ceaAccounts.length; + for (uint256 i; i < v.count;) { + bytes32 key = _svmAccount(p, i); + for (uint256 c; c < listed;) { + if (cfg.ceaAccounts[c] == key && !_pinnedAt(cfg, rule, i)) { + revert UniversalRulesPolicyErrors.CeaAccountAtUnpinnedIndex(i, key); + } + unchecked { + ++c; + } + } + unchecked { + ++i; + } + } + } + + /// @dev Whether the matched rule pins `index` at all. S17 has already proved that every pinned + /// position holds its expected key, so "pinned" and "pinned to this key" are the same fact + /// here and the key is not re-compared. + function _pinnedAt(SvmConfig storage cfg, uint256 rule, uint256 index) internal view returns (bool) { + uint256 n = cfg.pins.length; + for (uint256 i; i < n;) { + SvmAccountPin storage pin = cfg.pins[i]; + if (pin.ruleIndex == rule && pin.accountIndex == index) return true; + unchecked { + ++i; + } + } + return false; + } + + // ───────────────────────── svm byte helpers (pure, memory only) ───────────────────────── + + /// @dev The pubkey of account `i` in a parsed payload. Callers bound `i` by the parsed count. + function _svmAccount(bytes memory p, uint256 i) internal pure returns (bytes32) { + return _loadWord(p, SVM_HEADER_LEN + i * SVM_ACCOUNT_LEN); + } + + /// @dev Loads 32 bytes at `off`. Every caller has already proved the bytes it USES are inside + /// `b`; bytes past the end are masked away by the caller, never compared. + function _loadWord(bytes memory b, uint256 off) internal pure returns (bytes32 w) { + // solhint-disable-next-line no-inline-assembly + assembly ("memory-safe") { + w := mload(add(add(b, 0x20), off)) + } + } + + function _u32be(bytes memory b, uint256 off) internal pure returns (uint256) { + return uint256(uint32(bytes4(_loadWord(b, off)))); + } + + /// @dev Little-endian unsigned integer of `len` bytes (1..8) starting at `off`. + function _uintLE(bytes memory b, uint256 off, uint256 len) internal pure returns (uint256 v) { + bytes32 w = _loadWord(b, off); + for (uint256 i; i < len;) { + v |= uint256(uint8(w[i])) << (8 * i); + unchecked { + ++i; + } + } + } + + /// @dev Keeps the top `len` bytes of a bytes8. `len` 8 keeps all (a shift by >= 64 is zero). + function _prefixMask8(uint256 len) internal pure returns (bytes8) { + return bytes8(~(type(uint64).max >> (8 * len))); + } + + /// @dev Keeps the top `len` bytes of a bytes32. `len` 32 keeps all. + function _prefixMask32(uint256 len) internal pure returns (bytes32) { + return bytes32(~(type(uint256).max >> (8 * len))); + } + + /** + * @notice Exact-equality assertion on every per-asset spend counter; the change-flow race guard. + * + * @dev - Intended as the first entry of the owner's atomic change batch: assert, revoke, + * grant. A mismatch reverts the whole change. + * - Reverts if the config is not initialised. Reading zero from a ghost config is + * indistinguishable from reading zero from a real unused rules set, and this function + * exists to catch stale belief, so it must not have a silent-pass mode. + * - One expected value per listed asset, in list order; a different count reverts + * `SpentLengthMismatch` rather than checking a prefix. + * - Exact equality in both directions, so a credit landing between read and submit also + * forces recomposition. + * - Callable by anyone; it is a pure read. + * + * @param id Config id identifying the rules set. + * @param account The wallet the rules set belongs to. + * @param expectedSpent The per-asset spend totals the caller composed its change against. + */ + function assertSpent(ConfigId id, address account, uint256[] calldata expectedSpent) external view { + (bool init, RulesType mode) = _modeOf(id, SESSION_ENGINE, account); + if (init && mode == RulesType.NATIVE) revert UniversalRulesPolicyErrors.WrongModeForCall(RulesType.NATIVE); + + AssetCapState[] storage assets = _universalAssets(id, account); + + uint256 n = assets.length; + if (expectedSpent.length != n) revert UniversalRulesPolicyErrors.SpentLengthMismatch(n, expectedSpent.length); + for (uint256 i; i < n;) { + AssetCapState storage a = assets[i]; + if (a.spent != expectedSpent[i]) { + revert UniversalRulesPolicyErrors.AssetSpentMismatch(a.token, expectedSpent[i], a.spent); + } + unchecked { + ++i; + } + } + } + + /** + * @notice The native change-flow race guard: exact equality on all three counters. + * + * @dev - The native counterpart of the universal `assertSpent`, and the same intent: the + * first entry of the owner's atomic change batch — assert, revoke, grant. + * - Reverts `WrongModeForCall(UNIVERSAL)` on a universal config and `NotInitialized` on + * a ghost. It must not have a silent-pass mode: reading zero from a ghost config is + * indistinguishable from reading zero from a real unused rules set, and this function + * exists to catch stale belief. + * - Exact equality on every counter, in both directions. + * - Callable by anyone; it is a pure read. + * + * @param id Config id identifying the rules set. + * @param account The wallet the rules set belongs to. + * @param expectedValueSpent Native value total the caller composed against. + * @param expectedAmountSpent Metered calldata-amount total the caller composed against. + * @param expectedCalls Call count the caller composed against. + */ + function assertSpent( + ConfigId id, + address account, + uint256 expectedValueSpent, + uint256 expectedAmountSpent, + uint32 expectedCalls + ) external view { + (bool init, RulesType mode) = _modeOf(id, SESSION_ENGINE, account); + + if (!init) revert UniversalRulesPolicyErrors.NotInitialized(id, account); + if (mode != RulesType.NATIVE) revert UniversalRulesPolicyErrors.WrongModeForCall(RulesType.UNIVERSAL); + + NativeConfig storage cfg = _native[id][SESSION_ENGINE][account]; + + if (cfg.valueSpent != expectedValueSpent) { + revert UniversalRulesPolicyErrors.SpentMismatch(expectedValueSpent, cfg.valueSpent); + } + if (cfg.amountSpent != expectedAmountSpent) { + revert UniversalRulesPolicyErrors.SpentMismatch(expectedAmountSpent, cfg.amountSpent); + } + if (cfg.callsUsed != expectedCalls) { + revert UniversalRulesPolicyErrors.SpentMismatch(expectedCalls, cfg.callsUsed); + } + } + + /** + * @notice Credits a confirmed far-side failure back to one asset's spend counter. + * + * @dev - Callable only by the executor module; nobody else can fabricate a failure. + * - A ghost config reverts `NotInitialized` and an unlisted token `AssetNotAllowed`; the + * revert rolls the idempotency flag back, so a misrouted credit stays retryable. Both are + * resolved BEFORE the flag is checked, so an already-credited id sent with an unlisted + * token reports the token, the actionable mistake. + * - Reverts if the id was already credited. + * - Subtracts saturating, since the amount is trusted from Push core and cannot be + * verified here. Idempotency and saturation bound a wrong value, PER ASSET: a credit + * can never lower another token's counter. + * - `token` is trusted from the caller as much as `amount` is: URP never learns the + * outbound id at check time, so it cannot map an id to the token it metered. + * - Emits the amount actually applied, not the amount claimed, so monitoring can detect + * divergence between the two. + * - Not yet functional: the executor module does not yet call this on outbound failure, + * so until that lands a failed far leg leaves `spent` inflated and the remedy is + * revoke-and-regrant. + * - There is no gas counter and this path must never introduce one, because gas consumed + * on a failed outbound was genuinely consumed. + * + * @param id Config id identifying the rules set. + * @param account The wallet the rules set belongs to. + * @param outboundTxId Push-core transaction id, the idempotency key. + * @param token The listed asset whose counter is credited. + * @param amount Amount claimed as failed, credited saturating. + */ + function creditRevert(ConfigId id, address account, bytes32 outboundTxId, address token, uint256 amount) external { + if (msg.sender != UNIVERSAL_EXECUTOR_MODULE) revert UniversalRulesPolicyErrors.CallerIsNotUEModule(msg.sender); + + AssetCapState storage cap = _assetFor(_universalAssets(id, account), token); + + if (_credited[outboundTxId]) revert UniversalRulesPolicyErrors.AlreadyCredited(outboundTxId); + _credited[outboundTxId] = true; + + uint256 applied = cap.spent > amount ? amount : cap.spent; + cap.spent -= applied; + + emit RevertCredited(outboundTxId, id, account, token, applied); + } + + /** + * @dev The engine-keyed asset list of a UNIVERSAL config, either family. Reverts `NotInitialized` + * on an empty EVM slot; an SVM family byte is only ever written together with an initialised + * `SvmConfig`, so that branch needs no check. Shared by `assertSpent` and `creditRevert`. + */ + function _universalAssets(ConfigId id, address account) internal view returns (AssetCapState[] storage) { + if (_vmOf(id, SESSION_ENGINE, account) == VmFamily.SVM) return _svm[id][SESSION_ENGINE][account].assets; + + Config storage cfg = _configs[id][SESSION_ENGINE][account]; + if (!cfg.initialized) revert UniversalRulesPolicyErrors.NotInitialized(id, account); + return cfg.assets; + } + + /** + * @dev Gate 5: the entry for `token` in a listed-asset array, or `AssetNotAllowed`. A linear scan + * at n <= MAX_ASSETS, so up to eight cold reads on a miss. Makes no external call. + */ + function _assetFor(AssetCapState[] storage assets, address token) internal view returns (AssetCapState storage) { + uint256 n = assets.length; + for (uint256 i; i < n;) { + AssetCapState storage a = assets[i]; + if (a.token == token) return a; + unchecked { + ++i; + } + } + revert UniversalRulesPolicyErrors.AssetNotAllowed(token); + } + + /** + * @notice The full universal config including the allow-list, keyed on the session engine. + * + * @dev Reverts `WrongModeForCall(NATIVE)` on a native slot. An EMPTY slot returns the zeroed + * struct exactly as it always has — an empty slot is a STATE, a wrong-mode read is a + * CALLER BUG, and only the second is worth a revert. `getMode` is the documented first + * call for anything that does not already know a rules set's mode. + * + * @param id Config id identifying the rules set. + * @param account The wallet the rules set belongs to. + * @return The stored config. + */ + function getConfig(ConfigId id, address account) external view returns (Config memory) { + (bool init, RulesType mode) = _modeOf(id, SESSION_ENGINE, account); + if (init && mode == RulesType.NATIVE) revert UniversalRulesPolicyErrors.WrongModeForCall(RulesType.NATIVE); + if (init && _vmOf(id, SESSION_ENGINE, account) == VmFamily.SVM) { + revert UniversalRulesPolicyErrors.WrongVmForCall(VmFamily.SVM); + } + + return _configs[id][SESSION_ENGINE][account]; + } + + /** + * @notice The full SVM config including its rules and pins, keyed on the session engine. + * @dev Reverts `WrongModeForCall(NATIVE)` on a native slot and `WrongVmForCall(EVM)` on an EVM + * universal slot; an empty slot returns the zeroed struct. See `getConfig`. + * @param id Config id identifying the rules set. + * @param account The wallet the rules set belongs to. + * @return The stored SVM config. + */ + function getSvmConfig(ConfigId id, address account) external view returns (SvmConfig memory) { + (bool init, RulesType mode) = _modeOf(id, SESSION_ENGINE, account); + if (init && mode == RulesType.NATIVE) revert UniversalRulesPolicyErrors.WrongModeForCall(RulesType.NATIVE); + if (init && _vmOf(id, SESSION_ENGINE, account) == VmFamily.EVM) { + revert UniversalRulesPolicyErrors.WrongVmForCall(VmFamily.EVM); + } + + return _svm[id][SESSION_ENGINE][account]; + } + + /** + * @notice The full native config including its pins, keyed on the session engine. + * @dev Reverts `WrongModeForCall(UNIVERSAL)` on a universal slot; an empty slot returns the + * zeroed struct. See `getConfig`. + * @param id Config id identifying the rules set. + * @param account The wallet the rules set belongs to. + * @return The stored native config. + */ + function getNativeConfig(ConfigId id, address account) external view returns (NativeConfig memory) { + (bool init, RulesType mode) = _modeOf(id, SESSION_ENGINE, account); + if (init && mode == RulesType.UNIVERSAL) { + revert UniversalRulesPolicyErrors.WrongModeForCall(RulesType.UNIVERSAL); + } + + return _native[id][SESSION_ENGINE][account]; + } + + /** + * @notice Which rulebook a config uses, and which chain it was granted for. NEVER REVERTS. + * @dev The documented first call for any integrator that does not already know a rules set's + * mode. An empty slot returns `(initialized: false, mode: UNIVERSAL, chainHash: 0)` — and + * the mode value is MEANINGLESS when `initialized` is false, because `UNIVERSAL` is the + * enum's zero value. Read `initialized` first, always. + * + * `chainHash` is the rules set's chain, recorded at init (and, for a universal rules set, + * verified against every listed asset). It is THE chain record; there is no other. + * @param id Config id identifying the rules set. + * @param account The wallet the rules set belongs to. + * @return The stored mode record. + */ + function getMode(ConfigId id, address account) external view returns (ModeSlot memory) { + return _mode[id][SESSION_ENGINE][account]; + } + + /** + * @notice Exposes the idempotency set for monitoring. + * @param outboundTxId Push-core transaction id to query. + * @return Whether that id has already been credited. + */ + function isCredited(bytes32 outboundTxId) external view returns (bool) { + return _credited[outboundTxId]; + } + + /** + * @notice The implementation's version, readable THROUGH the proxy. + * + * @dev The proxy has no version of its own — it delegates, so this answers with whichever + * implementation is currently installed. That makes it the cheapest possible check that + * an upgrade actually took effect: read it before, upgrade, read it again. + * + * A `constant` in bytecode, deliberately not storage: it must change with the CODE, and + * a storage value could drift from the logic it claims to describe. + * + * BUMP THIS IN THE SAME COMMIT AS ANY LOGIC CHANGE. + */ + function version() external pure returns (string memory) { + return "3.1.0"; + } + + /** + * @notice ERC-165 support check. + * @param iid Interface id to query. + * @return True for the action-policy, policy and ERC-165 interfaces. + */ + function supportsInterface(bytes4 iid) external pure returns (bool) { + return + iid == type(IActionPolicy).interfaceId || iid == type(IPolicy).interfaceId + || iid == type(IERC165).interfaceId; + } + + /** + * @dev Reads the 32-byte word at `offset` and returns its low 20 bytes. Bounds-checked because + * reading past the end of a short blob would return adjacent memory, which could be + * manipulated to pass the beneficiary check. + * + * @param data Inner call calldata to read from. + * @param offset Byte offset of the beneficiary word, taken from config and never the request. + * @return The address encoded at that offset. + */ + function _extractBeneficiary(bytes memory data, uint16 offset) internal pure returns (address) { + if (uint256(offset) + 32 > data.length) revert UniversalRulesPolicyErrors.MalformedInnerCalldata(); + bytes32 word; + assembly { + word := mload(add(add(data, 0x20), offset)) + } + return address(uint160(uint256(word))); + } + + /** + * @dev The target and selector pair must appear in the allow-list. + * @param cfg Config whose allow-list is scanned. + * @param to Inner call target. + * @param selector Inner call selector. + * @return The matching rule; reverts with `CallNotAllowed` if there is none. + */ + function _requireAllowed(Config storage cfg, address to, bytes4 selector) + internal + view + returns (AllowedCall memory) + { + uint256 len = cfg.allowedCalls.length; + for (uint256 i; i < len;) { + AllowedCall storage rule = cfg.allowedCalls[i]; + if (rule.target == to && rule.selector == selector) { + return + AllowedCall(rule.target, rule.selector, rule.beneficiaryOffset, rule.hasBeneficiary, rule.maxValue); + } + unchecked { + ++i; + } + } + revert UniversalRulesPolicyErrors.CallNotAllowed(to, selector); + } + + /** + * @dev Memory slice helper. The bounds branch is unreachable from the three call sites, which + * are all length-guarded by gates 12 and 14, and is expected to show as uncovered. It stays + * because this is a `pure` helper whose safety must not depend on every future caller. + * + * @param data Blob to slice. + * @param start Byte offset to start at. + * @param len Number of bytes to copy. + * @return out The requested slice. + */ + function _slice(bytes memory data, uint256 start, uint256 len) internal pure returns (bytes memory out) { + if (start + len > data.length) revert UniversalRulesPolicyErrors.MalformedInnerCalldata(); + out = new bytes(len); + // MCOPY requires evm_version = "cancun"; lowering the EVM target breaks this silently at + // deploy time rather than loudly at compile time. + assembly ("memory-safe") { + mcopy(add(out, 0x20), add(add(data, 0x20), start), len) + } + } + + /** + * @dev Copies decoded WIRE terms into the STORAGE config. The two are deliberately different + * types: the wire shape is free to change, the storage layout is frozen forever + * (see the layout note on `__gap`). + * + * - Forces every asset's `spent` to zero. It is not a wire field at all — URP owns it. + * - Stores no chain: the chain of every rules set lives on `ModeSlot.chainHash`, where it has + * been verified against every listed asset. + * - Clears and repopulates the allow-list. + * - Does not set `initialized`; the caller does, immediately after this returns. + * + * @param cfg Storage slot to write into. + * @param incoming Decoded wire terms to copy from. + */ + function _store(Config storage cfg, UniversalTerms memory incoming) internal { + cfg.validUntil = incoming.validUntil; + cfg.expectedCEA = incoming.expectedCEA; + cfg.maxGasPerCall = incoming.maxGasPerCall; + delete cfg.assets; + _storeAssets(cfg.assets, incoming.assets); + + // Re-initialisation is refused, so in production this array is always empty here. The + // delete is kept for the stranger-slice path and for tests. + delete cfg.allowedCalls; + uint256 len = incoming.allowedCalls.length; + for (uint256 i; i < len;) { + cfg.allowedCalls.push(incoming.allowedCalls[i]); + unchecked { + ++i; + } + } + } + + /// @dev Wire asset caps into storage, element by element, every `spent` forced to zero. Shared by + /// both universal families. The caller deletes `dst` first, as for every other array. + function _storeAssets(AssetCapState[] storage dst, AssetCap[] memory src) internal { + uint256 len = src.length; + for (uint256 i; i < len;) { + dst.push( + AssetCapState({ + token: src[i].token, maxPerCall: src[i].maxPerCall, maxTotal: src[i].maxTotal, spent: 0 + }) + ); + unchecked { + ++i; + } + } + } + + /** + * @dev Copies a decoded native config into storage. The native counterpart of `_store`. + * + * - Forces `valueSpent`, `amountSpent` and `callsUsed` to zero, ignoring anything the + * caller supplied. A caller-set counter would be a granted head start on every cap. + * - `amount` is a value struct with no dynamic members, so it assigns wholesale. + * - `pins` must be copied ELEMENT BY ELEMENT: Solidity cannot assign a memory dynamic array + * into a storage struct field. Same shape as `allowedCalls` above, same reason. + * - Does not set `initialized`; the caller does, immediately after this returns. + * + * @param cfg Storage slot to write into. + * @param incoming Decoded native wire terms to copy from. + */ + function _storeNative(NativeConfig storage cfg, NativeTerms memory incoming) internal { + cfg.validUntil = incoming.validUntil; + cfg.target = incoming.target; + cfg.selector = incoming.selector; + cfg.maxValuePerCall = incoming.maxValuePerCall; + cfg.maxValueTotal = incoming.maxValueTotal; + cfg.valueSpent = 0; + cfg.amount = incoming.amount; + cfg.amountSpent = 0; + cfg.maxCalls = incoming.maxCalls; + cfg.callsUsed = 0; + + // Re-initialisation is refused, so in production this array is always empty here. The + // delete is kept for the stranger-slice path and for tests. + delete cfg.pins; + uint256 len = incoming.pins.length; + for (uint256 i; i < len;) { + cfg.pins.push(incoming.pins[i]); + unchecked { + ++i; + } + } + } + + /** + * @dev Copies decoded SVM wire terms into storage. The SVM counterpart of `_store`. + * - Forces every asset's `spent` to zero; URP owns it. + * - Every dynamic member is copied ELEMENT BY ELEMENT, same shape and same reason as + * `allowedCalls` and `pins`. + * - Does not set `initialized`; the caller does, immediately after this returns. + */ + function _storeSvm(SvmConfig storage cfg, SvmTerms memory incoming) internal { + cfg.validUntil = incoming.validUntil; + cfg.expectedCEA = incoming.expectedCEA; + cfg.gatewayProgram = incoming.gatewayProgram; + cfg.maxGasPerCall = incoming.maxGasPerCall; + delete cfg.assets; + _storeAssets(cfg.assets, incoming.assets); + + delete cfg.ceaAccounts; + uint256 len = incoming.ceaAccounts.length; + for (uint256 i; i < len;) { + cfg.ceaAccounts.push(incoming.ceaAccounts[i]); + unchecked { + ++i; + } + } + + delete cfg.programs; + len = incoming.programs.length; + for (uint256 i; i < len;) { + cfg.programs.push(incoming.programs[i]); + unchecked { + ++i; + } + } + + delete cfg.pins; + len = incoming.pins.length; + for (uint256 i; i < len;) { + cfg.pins.push(incoming.pins[i]); + unchecked { + ++i; + } + } + + delete cfg.dataPins; + len = incoming.dataPins.length; + for (uint256 i; i < len;) { + cfg.dataPins.push(incoming.dataPins[i]); + unchecked { + ++i; + } + } + } +} diff --git a/plan/agw/research/deployment-review-2026-10-06/source/src/validators/AgentValidator.sol b/plan/agw/research/deployment-review-2026-10-06/source/src/validators/AgentValidator.sol new file mode 100644 index 00000000..053a79af --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/src/validators/AgentValidator.sol @@ -0,0 +1,103 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { AgentValidatorErrors } from "../libraries/Errors.sol"; + +import { ISessionValidator } from "smartsessions/interfaces/ISessionValidator.sol"; +import { IAgentValidator } from "../interfaces/IAgentValidator.sol"; +import { AgentConfigLib } from "../libraries/AgentConfigLib.sol"; + +/** + * @title AgentValidator + * @notice A stateless ISessionValidator (ERC-7579 module type 7) that authorises a rules set's agent by + * WHO SENT THE TRANSACTION, not by a signature. The rules set's config is the agent's Push + * address — an EOA, or the UEA of an external key — and the "signature" the engine hands this + * contract is the 20-byte sender the wallet wrote into it. + * + * @dev WHY THIS IS SOUND. The engine calls this only from `validateUserOp`, which reverts unless + * `userOp.sender == msg.sender == account` — so only the wallet can obtain a verdict for its + * own account. The wallet's agent door builds the operation itself and always writes + * `USE ‖ rulesId ‖ msg.sender` into the signature field; no caller-supplied bytes reach it. + * The wallet also refuses a non-agent sender BEFORE the engine runs (`CallerIsNotAgent`); this + * contract is the second, independent layer, and the one the engine requires. + * + * WHY IT STILL EXISTS. SmartSession always ends policy enforcement by calling the permission's + * session validator and reverts `SignerNotFound` without one, and a validator never sees the + * transaction sender. Removing this contract would mean forking the engine. + * + * External-key verification (secp256k1, Ed25519) is NOT done here. It happens inside the + * agent's UEA before the UEA ever calls the wallet. + * + * Holds no storage and calls nothing, so one deployment serves every account. + */ +contract AgentValidator is ISessionValidator, IAgentValidator { + /// @dev ERC-7579 stateless-validator module type. + uint256 internal constant MODULE_TYPE_STATELESS_VALIDATOR = 7; + + /** + * @notice Whether `sig` is the configured agent. + * + * @dev - Reverts `MalformedConfig` if `data` is not a well-formed agent config. Unreachable + * through the wallet's grant path, which runs `validateConfig` first; reachable only for + * a session the owner enabled on the engine directly. + * - Returns false unless `sig` is exactly 20 bytes. + * - Returns whether those 20 bytes equal the configured agent. + * - `hash` is ignored: there is no signature to check it against. + * + * @param sig The 20-byte sender written by the wallet. + * @param data The rules set's config, `abi.encode(address agent)`. + * @return validSig True iff the sender is the agent. + */ + function validateSignatureWithData(bytes32, bytes calldata sig, bytes calldata data) + external + pure + override + returns (bool validSig) + { + address agent = AgentConfigLib.decode(data); + if (agent == address(0)) revert AgentValidatorErrors.MalformedConfig(); + if (sig.length != 20) return false; + // forge-lint: disable-next-line(unsafe-typecast) + return address(bytes20(sig)) == agent; // `sig` is exactly 20 bytes, checked above + } + + /** + * @notice Grant-time config check, used by the wallet's grant path and by tooling. + * + * @dev Two-valued and never reverts: true iff `data` is exactly one ABI word holding a non-zero + * address with clean upper bytes. True means `validateSignatureWithData` will not revert on + * this config; false means it reverts `MalformedConfig`. + * + * @param data Candidate `sessionValidatorInitData`. + * @return True iff `data` is a well-formed agent config. + */ + function validateConfig(bytes calldata data) external pure returns (bool) { + return AgentConfigLib.decode(data) != address(0); + } + + // --- IERC7579Module --- + + /// @dev No-op: the validator holds no per-account state. + function onInstall(bytes calldata) external pure { } + + /// @dev No-op: the validator holds no per-account state. + function onUninstall(bytes calldata) external pure { } + + /** + * @notice Whether this module implements an ERC-7579 module type. + * @param moduleTypeId Module type to query. + * @return True only for the stateless-validator type. + */ + function isModuleType(uint256 moduleTypeId) external pure returns (bool) { + return moduleTypeId == MODULE_TYPE_STATELESS_VALIDATOR; + } + + /** + * @notice Whether this module is initialised for an account. + * @dev Always true: the validator is stateless, so there is nothing to initialise. + * @return Always true. + */ + function isInitialized(address) external pure returns (bool) { + return true; + } +} diff --git a/plan/agw/research/deployment-review-2026-10-06/source/test/unit/28_multiAsset.t.sol b/plan/agw/research/deployment-review-2026-10-06/source/test/unit/28_multiAsset.t.sol new file mode 100644 index 00000000..0dcef8e3 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/source/test/unit/28_multiAsset.t.sol @@ -0,0 +1,590 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { UniversalRulesPolicyErrors } from "../../src/libraries/Errors.sol"; + +import { BaseTest } from "../Base.t.sol"; +import { AGW } from "../../src/AGW.sol"; +import { IUniversalRulesPolicy } from "../../src/interfaces/IUniversalRulesPolicy.sol"; +import { AllowedCall, AssetCapState, Config, MAX_ASSETS, Multicall, OwnerIntent } from "../../src/libraries/Types.sol"; +import { ModeLib, ModeCode } from "../../src/libraries/ModeLib.sol"; +import { ExecutionLib } from "../../src/libraries/ExecutionLib.sol"; +import { ConfigId, Session } from "smartsessions/DataTypes.sol"; +import { ISmartSession } from "smartsessions/ISmartSession.sol"; +import { MockPRC20 } from "../mocks/MockUniversalGateway.sol"; +import { MockPRC20Source } from "../mocks/MockPRC20Source.sol"; + +/** + * @title MultiAssetTest — one UNIVERSAL rules set, several tokens (the multi-asset branch) + * @notice A rules set lists 1..MAX_ASSETS PRC20s, each with its own per-call cap, lifetime cap and + * spend counter. These tests pin the three properties the change must not lose: + * - THE CHAIN STAYS PINNED. The gateway routes by `req.token`, so every listed token is + * chain-checked at grant and every request's token must be listed — zero amount included. + * An empty list is refused for the same reason. + * - TOKENS ARE ISOLATED. One token's spend, cap, credit or exhaustion never touches another's. + * - "TOTAL" IS GROSS. A lifetime cap counts what was sent out; money coming back to the wallet + * never restores room (only `creditRevert` lowers a counter). + */ +contract MultiAssetTest is BaseTest { + bytes4 internal constant SWAP_SELECTOR = bytes4(keccak256("swap(uint256,address)")); + uint16 internal constant BENEFICIARY_OFFSET = 36; + ConfigId internal constant CID = ConfigId.wrap(bytes32(uint256(0xA55E7))); + uint48 internal constant VALID_UNTIL = 2_000_000_000; + + string internal constant CHAIN_ARBITRUM_SEPOLIA = "eip155:421614"; + + address internal account; + address internal cea; + address internal protocol; + + /// @dev Two Sepolia PRC20s (the defaults of `MockPRC20`) and one PRC20 of ANOTHER chain. + address internal usdc; + address internal usdt; + address internal arbUsdc; + + function setUp() public override { + super.setUp(); + account = makeAddr("agentWallet"); + cea = makeAddr("destinationAccount"); + protocol = makeAddr("farChainProtocol"); + usdc = address(new MockPRC20()); + usdt = address(new MockPRC20()); + arbUsdc = address(new MockPRC20Source(CHAIN_ARBITRUM_SEPOLIA)); + vm.warp(1_000_000_000); + } + + // ───────────────────────────── builders ───────────────────────────── + + function _rules() internal view returns (AllowedCall[] memory r) { + r = new AllowedCall[](1); + r[0] = AllowedCall({ + target: protocol, + selector: SWAP_SELECTOR, + beneficiaryOffset: BENEFICIARY_OFFSET, + hasBeneficiary: true, + maxValue: 0 + }); + } + + /// @dev The confirmed example: "on Ethereum, move 1000 USDC and 500 USDT". USDC 100/1000, USDT 50/500. + function _two() internal view returns (AssetCapState[] memory a) { + a = new AssetCapState[](2); + a[0] = AssetCapState({ token: usdc, maxPerCall: 100e6, maxTotal: 1000e6, spent: 0 }); + a[1] = AssetCapState({ token: usdt, maxPerCall: 50e6, maxTotal: 500e6, spent: 0 }); + } + + function _config(AssetCapState[] memory assets) internal view returns (Config memory) { + return Config({ + initialized: false, + validUntil: VALID_UNTIL, + expectedCEA: cea, + maxGasPerCall: 5 ether, + assets: assets, + allowedCalls: _rules() + }); + } + + function _init(AssetCapState[] memory assets) internal { + _initAt(CID, assets); + } + + function _initAt(ConfigId id, AssetCapState[] memory assets) internal { + vm.prank(address(engine)); + urp.initializeWithMultiplexer(account, id, universalInitData(_config(assets))); + } + + function _initReverts(bytes memory err, AssetCapState[] memory assets) internal { + vm.prank(address(engine)); + vm.expectRevert(err); + urp.initializeWithMultiplexer(account, CID, universalInitData(_config(assets))); + } + + function _calls() internal view returns (Multicall[] memory c) { + c = new Multicall[](1); + c[0] = Multicall({ to: protocol, value: 0, data: abi.encodeWithSelector(SWAP_SELECTOR, uint256(1), cea) }); + } + + function _req(address token, uint256 amount) internal view returns (bytes memory) { + return outboundRequest(token, amount, 1 ether, account, _calls()); + } + + function _check(address token, uint256 amount) internal { + vm.prank(address(engine)); + urp.checkAction(CID, account, GATEWAY, 0, _req(token, amount)); + } + + function _checkReverts(bytes memory err, address token, uint256 amount) internal { + vm.prank(address(engine)); + vm.expectRevert(err); + urp.checkAction(CID, account, GATEWAY, 0, _req(token, amount)); + } + + function _spent(uint256 i) internal view returns (uint256) { + return urp.getConfig(CID, account).assets[i].spent; + } + + function _spentPair(uint256 a, uint256 b) internal pure returns (uint256[] memory s) { + s = new uint256[](2); + s[0] = a; + s[1] = b; + } + + /// @dev `n` distinct Sepolia PRC20s, each 1/1 capped. + function _many(uint256 n) internal returns (AssetCapState[] memory a) { + a = new AssetCapState[](n); + for (uint256 i; i < n; ++i) { + a[i] = AssetCapState({ token: address(new MockPRC20()), maxPerCall: 1, maxTotal: 1, spent: 0 }); + } + } + + // ═══════════════════════════════ grant time ═══════════════════════════════ + + function test_MA01_twoAssetsStoredInOrderWithZeroSpent() public { + _init(_two()); + Config memory got = urp.getConfig(CID, account); + assertEq(got.assets.length, 2, "two entries"); + assertEq(got.assets[0].token, usdc, "order kept: USDC first"); + assertEq(got.assets[0].maxPerCall, 100e6, "USDC per-call"); + assertEq(got.assets[0].maxTotal, 1000e6, "USDC total"); + assertEq(got.assets[1].token, usdt, "USDT second"); + assertEq(got.assets[1].maxPerCall, 50e6, "USDT per-call"); + assertEq(got.assets[1].maxTotal, 500e6, "USDT total"); + assertEq(got.assets[0].spent + got.assets[1].spent, 0, "every counter starts at zero"); + assertEq(got.maxGasPerCall, 5 ether, "maxGasPerCall stored"); + } + + /** + * ⚠️ NEVER-DELETE. The token is what the gateway routes by, so a rules set with no token pins no + * chain. §4c's "empty = call contracts, move nothing" is refused; move-nothing is one entry with + * a zero `maxPerCall` (MA11). + */ + function test_MA02_emptyAssetListRefused() public { + _initReverts( + abi.encodeWithSelector(UniversalRulesPolicyErrors.AssetListOutOfRange.selector, uint256(0)), + new AssetCapState[](0) + ); + } + + function test_MA03_listBoundIsMaxAssets() public { + assertEq(MAX_ASSETS, 8, "the bound the SDK encodes against"); + _init(_many(MAX_ASSETS)); + assertEq(urp.getConfig(CID, account).assets.length, MAX_ASSETS, "eight accepted"); + + AssetCapState[] memory nine = _many(MAX_ASSETS + 1); + vm.prank(address(engine)); + vm.expectRevert(abi.encodeWithSelector(UniversalRulesPolicyErrors.AssetListOutOfRange.selector, MAX_ASSETS + 1)); + urp.initializeWithMultiplexer(account, ConfigId.wrap(bytes32(uint256(2))), universalInitData(_config(nine))); + } + + /// The duplicate is NOT adjacent: the check compares every pair, not neighbours. + function test_MA04_duplicateTokenRefused() public { + AssetCapState[] memory a = new AssetCapState[](3); + a[0] = AssetCapState({ token: usdc, maxPerCall: 1, maxTotal: 1, spent: 0 }); + a[1] = AssetCapState({ token: usdt, maxPerCall: 1, maxTotal: 1, spent: 0 }); + a[2] = AssetCapState({ token: usdc, maxPerCall: 9, maxTotal: 9, spent: 0 }); + _initReverts(abi.encodeWithSelector(UniversalRulesPolicyErrors.DuplicateAsset.selector, usdc), a); + } + + /** + * ⚠️ NEVER-DELETE. Every listed token is chain-checked, not just the first: a Sepolia rules set + * whose SECOND token is an Arbitrum PRC20 would let the agent route to Arbitrum by naming it. + */ + function test_MA05_everyTokenIsChainChecked() public { + AssetCapState[] memory a = _two(); + a[1].token = arbUsdc; + _initReverts( + abi.encodeWithSelector( + UniversalRulesPolicyErrors.ChainMismatch.selector, + keccak256(bytes(CHAIN_SEPOLIA)), + keccak256(bytes(CHAIN_ARBITRUM_SEPOLIA)) + ), + a + ); + } + + function test_MA06_codelessOrZeroTokenRefusedAtAnyPosition() public { + address codeless = makeAddr("typoedToken"); + AssetCapState[] memory a = _two(); + a[1].token = codeless; + _initReverts(abi.encodeWithSelector(UniversalRulesPolicyErrors.InvalidAsset.selector, codeless), a); + + a = _two(); + a[1].token = address(0); + _initReverts(abi.encodeWithSelector(UniversalRulesPolicyErrors.InvalidAsset.selector, address(0)), a); + } + + // ═══════════════════════════════ check time ═══════════════════════════════ + + /** + * ⚠️ NEVER-DELETE. THE CHAIN-ESCAPE GUARD. A zero-amount request moves nothing, but its token + * still decides the destination chain. If gate 5 ran only for "the token being moved" (§4c's + * wording), an agent could send the rules set's calls to Arbitrum by naming an Arbitrum token + * with amount 0. + */ + function test_MA07_unlistedTokenRefusedEvenAtZeroAmount() public { + _init(_two()); + _checkReverts(abi.encodeWithSelector(UniversalRulesPolicyErrors.AssetNotAllowed.selector, arbUsdc), arbUsdc, 0); + + // An unlisted token of the RIGHT chain is refused too: the list is the owner's statement. + address otherSepolia = address(new MockPRC20()); + _checkReverts( + abi.encodeWithSelector(UniversalRulesPolicyErrors.AssetNotAllowed.selector, otherSepolia), otherSepolia, 0 + ); + + // A listed token at amount 0 passes and writes nothing. + vm.recordLogs(); + _check(usdt, 0); + assertEq(vm.getRecordedLogs().length, 0, "no OutboundMetered for a zero-amount request"); + assertEq(_spent(1), 0, "nothing metered"); + } + + function test_MA08_eachTokenIsMeteredOnItsOwnCounter() public { + _init(_two()); + + vm.expectEmit(true, true, true, true, address(urp)); + emit IUniversalRulesPolicy.OutboundMetered(CID, address(engine), account, usdc, 60e6); + _check(usdc, 60e6); + + vm.expectEmit(true, true, true, true, address(urp)); + emit IUniversalRulesPolicy.OutboundMetered(CID, address(engine), account, usdt, 30e6); + _check(usdt, 30e6); + + _check(usdc, 40e6); + + assertEq(_spent(0), 100e6, "USDC counter: 60 + 40"); + assertEq(_spent(1), 30e6, "USDT counter: 30, untouched by USDC"); + } + + function test_MA09_perCallCapIsTheMatchedTokens() public { + _init(_two()); + // 51 is within USDC's per-call cap (100) and above USDT's (50). + _check(usdc, 51e6); + _checkReverts( + abi.encodeWithSelector(UniversalRulesPolicyErrors.AmountExceedsCap.selector, uint256(51e6), uint256(50e6)), + usdt, + 51e6 + ); + } + + function test_MA10_exhaustingOneTokenLeavesTheOthersUsable() public { + _init(_two()); + for (uint256 i; i < 10; ++i) { + _check(usdc, 100e6); + } + _checkReverts( + abi.encodeWithSelector( + UniversalRulesPolicyErrors.TotalSpendCapExceeded.selector, uint256(1000e6 + 1), uint256(1000e6) + ), + usdc, + 1 + ); + _check(usdt, 50e6); + assertEq(_spent(1), 50e6, "USDT still spends after USDC is exhausted"); + } + + /// Move-nothing: the token pins the chain, the zero per-call cap forbids moving it. + function test_MA11_zeroPerCallTokenRoutesButNeverMoves() public { + AssetCapState[] memory a = new AssetCapState[](1); + a[0] = AssetCapState({ token: usdc, maxPerCall: 0, maxTotal: 0, spent: 0 }); + _init(a); + + _check(usdc, 0); + _checkReverts( + abi.encodeWithSelector(UniversalRulesPolicyErrors.AmountExceedsCap.selector, uint256(1), uint256(0)), + usdc, + 1 + ); + } + + /// Unlimited is `type(uint256).max`, with no special branch; a zero total means NOTHING moves. + function test_MA12_unlimitedIsMaxUintAndZeroTotalMovesNothing() public { + AssetCapState[] memory a = new AssetCapState[](2); + a[0] = AssetCapState({ token: usdc, maxPerCall: type(uint256).max, maxTotal: type(uint256).max, spent: 0 }); + a[1] = AssetCapState({ token: usdt, maxPerCall: 100e6, maxTotal: 0, spent: 0 }); + _init(a); + + _check(usdc, 1e30); + assertEq(_spent(0), 1e30, "unlimited really is unlimited"); + + _checkReverts( + abi.encodeWithSelector(UniversalRulesPolicyErrors.TotalSpendCapExceeded.selector, uint256(1), uint256(0)), + usdt, + 1 + ); + } + + /** + * The bridge-back edge case raised in review: limit 1000, agent sends 600, 300 comes back to the wallet. The agent has + * 400 left, not 700. URP never sees inflows; it could not tell an agent's return from the + * owner's top-up, and counting inflows would let any deposit raise the agent's limit. + */ + function test_MA13_moneyComingBackDoesNotRestoreRoom() public { + AssetCapState[] memory a = new AssetCapState[](1); + a[0] = AssetCapState({ token: usdc, maxPerCall: 1000e6, maxTotal: 1000e6, spent: 0 }); + _init(a); + + _check(usdc, 600e6); + MockPRC20(usdc).mint(account, 300e6); // the 300 coming back, landing on the wallet + assertEq(_spent(0), 600e6, "an inflow changes nothing"); + + _checkReverts( + abi.encodeWithSelector( + UniversalRulesPolicyErrors.TotalSpendCapExceeded.selector, uint256(1001e6), uint256(1000e6) + ), + usdc, + 401e6 + ); + _check(usdc, 400e6); + } + + // ═══════════════════════════ assertSpent / creditRevert ═══════════════════════════ + + function test_MA14_assertSpentIsExactPerAsset() public { + _init(_two()); + _check(usdc, 70e6); + _check(usdt, 20e6); + + urp.assertSpent(CID, account, _spentPair(70e6, 20e6)); + + vm.expectRevert( + abi.encodeWithSelector( + UniversalRulesPolicyErrors.AssetSpentMismatch.selector, usdt, uint256(21e6), uint256(20e6) + ) + ); + urp.assertSpent(CID, account, _spentPair(70e6, 21e6)); + + // A prefix is not accepted: one entry per listed asset, exactly. + vm.expectRevert( + abi.encodeWithSelector(UniversalRulesPolicyErrors.SpentLengthMismatch.selector, uint256(2), uint256(1)) + ); + urp.assertSpent(CID, account, oneSpent(70e6)); + + uint256[] memory three = new uint256[](3); + vm.expectRevert( + abi.encodeWithSelector(UniversalRulesPolicyErrors.SpentLengthMismatch.selector, uint256(2), uint256(3)) + ); + urp.assertSpent(CID, account, three); + } + + function test_MA15_creditRevertTouchesOnlyItsToken() public { + _init(_two()); + _check(usdc, 100e6); + _check(usdt, 50e6); + + bytes32 txId = keccak256("failed-USDT-outbound"); + + // An unlisted token is refused; the revert leaves the id uncredited, so the credit stays retryable. + vm.prank(EXECUTOR_MODULE); + vm.expectRevert(abi.encodeWithSelector(UniversalRulesPolicyErrors.AssetNotAllowed.selector, arbUsdc)); + urp.creditRevert(CID, account, txId, arbUsdc, 20e6); + assertFalse(urp.isCredited(txId), "a misrouted credit does not burn the id"); + + vm.expectEmit(true, true, true, true, address(urp)); + emit IUniversalRulesPolicy.RevertCredited(txId, CID, account, usdt, 20e6); + vm.prank(EXECUTOR_MODULE); + urp.creditRevert(CID, account, txId, usdt, 20e6); + + assertEq(_spent(1), 30e6, "USDT credited"); + assertEq(_spent(0), 100e6, "USDC untouched"); + + // Precedence: the token is resolved before the idempotency check, so an already-credited id + // sent with an unlisted token reports the token, not `AlreadyCredited`. + vm.prank(EXECUTOR_MODULE); + vm.expectRevert(abi.encodeWithSelector(UniversalRulesPolicyErrors.AssetNotAllowed.selector, arbUsdc)); + urp.creditRevert(CID, account, txId, arbUsdc, 1); + } + + /// Per-token isolation under arbitrary amounts: spending one token never moves another's counter. + function testFuzz_MA16_perTokenIsolation(uint256 a, uint256 b) public { + a = bound(a, 0, 100e6); + b = bound(b, 0, 50e6); + _init(_two()); + + _check(usdc, a); + assertEq(_spent(1), 0, "USDT untouched by a USDC spend"); + _check(usdt, b); + assertEq(_spent(0), a, "USDC untouched by a USDT spend"); + assertEq(_spent(1), b, "USDT exact"); + } + + // ═══════════════════════════ through the wallet ═══════════════════════════ + + /// The point of the change: ONE rulesId moves two tokens, through the real engine path. + function test_MA17_oneRulesIdMovesTwoTokensThroughTheWallet() public { + (address agent,) = ecdsaKey("multiAssetAgent"); + address owner = makeAddr("multiAssetOwner"); + AGW wallet = newWallet(owner); + cea = makeAddr("walletCea"); + + Config memory cfg = _config(_two()); + vm.prank(owner); + bytes32 rulesId = wallet.grantRules(canonicalSession(agentConfig(agent), universalInitData(cfg))); + + etchCallRecorder(GATEWAY); + bytes32 mode = ModeCode.unwrap(ModeLib.encodeSimpleSingle()); + vm.prank(agent); + wallet.executeAsAgent(rulesId, mode, _walletEcd(wallet, usdc, 80e6)); + vm.prank(agent); + wallet.executeAsAgent(rulesId, mode, _walletEcd(wallet, usdt, 40e6)); + + ConfigId cid = _walletConfigId(wallet, rulesId); + Config memory got = urp.getConfig(cid, address(wallet)); + assertEq(got.assets[0].spent, 80e6, "USDC metered under the one rulesId"); + assertEq(got.assets[1].spent, 40e6, "USDT metered under the same rulesId"); + + // An unlisted token through the wallet dies at gate 5, named through the engine. + expectUrpGate(abi.encodeWithSelector(UniversalRulesPolicyErrors.AssetNotAllowed.selector, arbUsdc)); + vm.prank(agent); + wallet.executeAsAgent(rulesId, mode, _walletEcd(wallet, arbUsdc, 0)); + } + + function _walletEcd(AGW wallet, address token, uint256 amount) internal view returns (bytes memory) { + return ExecutionLib.encodeSingle(GATEWAY, 0, outboundRequest(token, amount, 1 ether, address(wallet), _calls())); + } + + function _walletConfigId(AGW wallet, bytes32 rulesId) internal view returns (ConfigId) { + bytes32 actionId = keccak256(abi.encodePacked(GATEWAY, SEND_OUTBOUND_SELECTOR)); + bytes32 actionPolicyId = keccak256(abi.encodePacked(rulesId, actionId)); + return ConfigId.wrap(keccak256(abi.encodePacked(address(wallet), actionPolicyId))); + } + + // ═══════════════════ C1: every rule lists at least one token ═══════════════════ + + /** + * ⚠️ NEVER-DELETE. C1: A CROSS-CHAIN RULE MUST LIST AT LEAST ONE TOKEN. + * + * The gateway picks the destination chain from the request's token alone; the request has no + * chain field. A rule with no token therefore pins no chain, and an agent could run its calls on + * any chain by naming that chain's token at amount 0. URP refuses the empty list at grant + * (`AssetListOutOfRange(0)`); this pins that EVERY grant path reaches that refusal: + * 1. `grantRules`; + * 2. `grantRulesWithSig`, a relayer presenting the owner's signed intent; + * 3. the owner door enabling the session on the engine directly, bypassing `grantRules`. + * The revert unwinds everything: the grant nonce and the checkpoint counter do not move. + */ + function test_MA19_ruleWithNoTokenRefusedOnEveryGrantPath() public { + (address owner, uint256 ownerPk) = ecdsaKey("noTokenOwner"); + address relayer = makeAddr("noTokenRelayer"); + AGW wallet = newWallet(owner); + Session memory s = + canonicalSession(agentConfig(makeAddr("noTokenAgent")), universalInitData(_config(new AssetCapState[](0)))); + bytes memory refused = + abi.encodeWithSelector(UniversalRulesPolicyErrors.AssetListOutOfRange.selector, uint256(0)); + uint64 grantNonceBefore = wallet.grantNonce(); + uint64 checkpointsBefore = wallet.checkpointCount(); + + // 1. grantRules + vm.prank(owner); + vm.expectRevert(refused); + wallet.grantRules(s); + + // 2. grantRulesWithSig + OwnerIntent memory intent = blankIntent(owner, address(wallet), relayer); + intent.sessionHash = keccak256(abi.encode(s)); + intent.grantNonce = wallet.grantNonce(); + bytes memory sig = signIntent(ownerPk, intent); + vm.prank(relayer); + vm.expectRevert(refused); + wallet.grantRulesWithSig(s, intent, sig); + + // 3. the owner door, straight to the engine + Session[] memory sessions = new Session[](1); + sessions[0] = s; + bytes memory direct = + ExecutionLib.encodeSingle(address(engine), 0, abi.encodeCall(ISmartSession.enableSessions, (sessions))); + vm.prank(owner); + vm.expectRevert(refused); + wallet.execute(ModeCode.unwrap(ModeLib.encodeSimpleSingle()), direct); + + assertEq(wallet.grantNonce(), grantNonceBefore, "no grant nonce consumed"); + assertEq(wallet.checkpointCount(), checkpointsBefore, "no checkpoint recorded"); + } + + /** + * The SDK's "no tokens" rule, end to end. A user who wants a rule that moves nothing gets one + * token, the destination chain's gas token, with `maxPerCall = 0` and `maxTotal = 0`. The token + * pins the chain; the zero limits mean the agent can make payload-only calls and never move it. + * Through the real wallet and engine: amount 0 passes, amount 1 is refused, and another chain's + * token is refused even at amount 0. + */ + function test_MA20_noMovementRuleIsOneZeroLimitToken() public { + (address agent,) = ecdsaKey("noMovementAgent"); + address owner = makeAddr("noMovementOwner"); + AGW wallet = newWallet(owner); + address gasToken = address(new MockPRC20()); // stands in for the chain's gas token PRC20 + + AssetCapState[] memory pin = new AssetCapState[](1); + pin[0] = AssetCapState({ token: gasToken, maxPerCall: 0, maxTotal: 0, spent: 0 }); + vm.prank(owner); + bytes32 rulesId = wallet.grantRules(canonicalSession(agentConfig(agent), universalInitData(_config(pin)))); + + etchCallRecorder(GATEWAY); + bytes32 mode = ModeCode.unwrap(ModeLib.encodeSimpleSingle()); + + vm.prank(agent); + wallet.executeAsAgent(rulesId, mode, _walletEcd(wallet, gasToken, 0)); + assertEq(urp.getConfig(_walletConfigId(wallet, rulesId), address(wallet)).assets[0].spent, 0, "nothing moved"); + + expectUrpGate( + abi.encodeWithSelector(UniversalRulesPolicyErrors.AmountExceedsCap.selector, uint256(1), uint256(0)) + ); + vm.prank(agent); + wallet.executeAsAgent(rulesId, mode, _walletEcd(wallet, gasToken, 1)); + + expectUrpGate(abi.encodeWithSelector(UniversalRulesPolicyErrors.AssetNotAllowed.selector, arbUsdc)); + vm.prank(agent); + wallet.executeAsAgent(rulesId, mode, _walletEcd(wallet, arbUsdc, 0)); + } + + // ═══════════════════════════════ gas ═══════════════════════════════ + + /// @dev Marginal gate-5 cost of one more listed token ahead of the matched one, budget = measured + /// +10%. Two budgets, because the mode decides warmth: in a plain run the whole test is one + /// transaction, so the slots init just wrote are WARM (measured 402); under `--isolate` / + /// `--gas-report` every call is its own transaction and the entry's `token` slot is a COLD + /// read, as on a real agent call (measured 2,402). Worst case, eight listed tokens and the + /// last one matched: about 16.8k gas over a first-entry match. + uint256 internal constant GATE5_SCAN_GAS_PER_ENTRY_BUDGET = 443; + uint256 internal constant GATE5_SCAN_GAS_PER_ENTRY_BUDGET_ISOLATED = 2_643; + + /** + * The scan is linear: a token at index 7 costs seven extra cold reads over one at index 0. + * Measured on two FRESH configs, each with eight tokens, after a warm-up check on a third, so + * both measured checks start equally cold and differ only in where the match sits. Amount 0, so + * neither check writes. + */ + function test_gas_MA18_gate5ScanCostPerListedToken() public { + AssetCapState[] memory a = _many(MAX_ASSETS); + ConfigId warm = ConfigId.wrap(bytes32(uint256(0xF0))); + ConfigId first = ConfigId.wrap(bytes32(uint256(0xF1))); + ConfigId last = ConfigId.wrap(bytes32(uint256(0xF8))); + _initAt(warm, a); + _initAt(first, a); + _initAt(last, a); + + // Pay the costs both measured checks share — the proxy and implementation accounts, the + // gateway slot — once, on a third config, so they land on neither measurement. + vm.prank(address(engine)); + urp.checkAction(warm, account, GATEWAY, 0, _req(a[0].token, 0)); + + bytes memory hitFirst = _req(a[0].token, 0); + bytes memory hitLast = _req(a[MAX_ASSETS - 1].token, 0); + + vm.prank(address(engine)); + uint256 g0 = gasleft(); + urp.checkAction(first, account, GATEWAY, 0, hitFirst); + g0 -= gasleft(); + + vm.prank(address(engine)); + uint256 g7 = gasleft(); + urp.checkAction(last, account, GATEWAY, 0, hitLast); + g7 -= gasleft(); + + uint256 perEntry = (g7 - g0) / (MAX_ASSETS - 1); + emit log_named_uint("gate-5 scan gas per listed token ahead of the match", perEntry); + emit log_named_uint("checkAction gas, match at index 0 of 8", g0); + emit log_named_uint("checkAction gas, match at index 7 of 8", g7); + uint256 budget = isolatedCalls() ? GATE5_SCAN_GAS_PER_ENTRY_BUDGET_ISOLATED : GATE5_SCAN_GAS_PER_ENTRY_BUDGET; + assertLe(perEntry, budget, "gate-5 scan per entry"); + } +} diff --git a/plan/agw/research/deployment-review-2026-10-06/supplemental-reads.json b/plan/agw/research/deployment-review-2026-10-06/supplemental-reads.json new file mode 100644 index 00000000..f5b33f7c --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/supplemental-reads.json @@ -0,0 +1,25 @@ +{ + "rpc": "https://evm.donut.rpc.push.org/", + "block": 23931055, + "checked_at": "2026-10-05T18:42:12.699217+00:00", + "reads": [ + { + "address": "0x00000000000000000000000000000000000000C0", + "signature": "gasTokenPRC20ByChainNamespace(string)(address)", + "args": [ + "eip155:11155111" + ], + "exit_code": 0, + "output": "0x2971824Db68229D087931155C2b8bB820B275809", + "error": "" + }, + { + "address": "0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af", + "signature": "SESSION_ENGINE()(address)", + "args": [], + "exit_code": 0, + "output": "0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a", + "error": "" + } + ] +} diff --git a/plan/agw/research/deployment-review-2026-10-06/verify-wire.cjs b/plan/agw/research/deployment-review-2026-10-06/verify-wire.cjs new file mode 100644 index 00000000..0ecde19e --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/verify-wire.cjs @@ -0,0 +1,52 @@ +// Read-only ABI/envelope compatibility checks; no signer or transaction submission. +const fs = require('node:fs'); +const path = require('node:path'); +const assert = require('node:assert/strict'); +const v = require('viem'); +const root = __dirname; +const policy = JSON.parse(fs.readFileSync(path.join(root, 'abis/policy.json'), 'utf8')); +const oldPolicy = JSON.parse(fs.readFileSync(path.join(root, '../validation-e704d5b/abi/UniversalRulesPolicy.json'), 'utf8')); +const probe = JSON.parse(fs.readFileSync(path.join(root, 'donut-probe.json'), 'utf8')); +const results = []; + +async function main() { + const header = v.parseAbiParameters('uint16,string,bytes'); + const oldEnvelope = v.encodeAbiParameters(v.parseAbiParameters('string,bytes'), ['eip155:42101', '0x']); + assert.equal(BigInt(oldEnvelope.slice(0, 66)), 64n); + const newEnvelope = v.encodeAbiParameters(header, [1, 'eip155:42101', '0x']); + assert.deepEqual(v.decodeAbiParameters(header, newEnvelope), [1, 'eip155:42101', '0x']); + results.push({check: 'Old SDK envelope starts with 64; v4 requires version 1. Native grants also need migration.', pass: true}); + + const terms = v.parseAbiParameters('(uint48,address,(address,uint256,uint256)[],uint256,(address,bytes4,uint16,bool,uint256)[])'); + const value = [2000000000, probe.code.walletImplementation.address, + [[probe.code.policy.address, 5n, v.maxUint256], [probe.code.factory.address, 0n, 0n]], + 1n, [[probe.code.walletImplementation.address, '0x12345678', 68, true, 0n]]]; + const encoded = v.encodeAbiParameters(terms, [value]); + assert.deepEqual(v.decodeAbiParameters(terms, encoded)[0], value); + results.push({check: 'Owner-guide UniversalTerms tuple round-trips two ordered caps; maxUint256 and zero remain distinct.', pass: true, + note: 'Synthetic codec values only; the addresses used as dummy tokens/CEA/target are not a valid grant or chain-valid token fixture.'}); + + const snapshot = v.createPublicClient({transport: v.http(probe.rpc)}); + const data = v.encodeFunctionData({abi: policy, functionName: 'getConfig', args: [v.zeroHash, probe.code.walletImplementation.address]}); + const raw = await snapshot.call({to: probe.code.policy.address, data, blockNumber: BigInt(probe.block)}); + const cfg = v.decodeFunctionResult({abi: policy, functionName: 'getConfig', data: raw.data}); + assert.equal(cfg.initialized, false); + assert.deepEqual(cfg.assets, []); + let oldDecoderRejected = false; + try { v.decodeFunctionResult({abi: oldPolicy, functionName: 'getConfig', data: raw.data}); } + catch { oldDecoderRejected = true; } + assert.equal(oldDecoderRejected, true); + results.push({check: 'Verified v4 ABI decodes a live empty getConfig; e704d5b ABI rejects the same result.', pass: true, + block: probe.block, returndata: raw.data}); + + const assertion = v.encodeFunctionData({abi: policy, functionName: 'assertSpent', args: [v.zeroHash, probe.code.walletImplementation.address, []]}); + const decoded = v.decodeFunctionData({abi: policy, data: assertion}); + assert.equal(decoded.functionName, 'assertSpent'); + assert.deepEqual(decoded.args[2], []); + results.push({check: 'New array-form assertSpent encodes/decodes using explorer-verified ABI.', pass: true, selector: assertion.slice(0, 10)}); + + fs.writeFileSync(path.join(root, 'wire-checks.json'), JSON.stringify({run_at: new Date().toISOString(), checks: results, + limits: 'Envelope/ABI compatibility and synthetic wire round-trip only. No rule grant, spend-race execution, SDK full-suite rerun or live funded E2E.'}, null, 2) + '\n'); + console.log(JSON.stringify(results.map(({returndata, ...x}) => x), null, 2)); +} +main().catch(e => { console.error(e.message); process.exitCode = 1; }); diff --git a/plan/agw/research/deployment-review-2026-10-06/wire-checks.json b/plan/agw/research/deployment-review-2026-10-06/wire-checks.json new file mode 100644 index 00000000..19ad1267 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-06/wire-checks.json @@ -0,0 +1,26 @@ +{ + "run_at": "2026-10-05T18:36:03.715Z", + "checks": [ + { + "check": "Old SDK envelope starts with 64; v4 requires version 1. Native grants also need migration.", + "pass": true + }, + { + "check": "Owner-guide UniversalTerms tuple round-trips two ordered caps; maxUint256 and zero remain distinct.", + "pass": true, + "note": "Synthetic codec values only; the addresses used as dummy tokens/CEA/target are not a valid grant or chain-valid token fixture." + }, + { + "check": "Verified v4 ABI decodes a live empty getConfig; e704d5b ABI rejects the same result.", + "pass": true, + "block": 23931055, + "returndata": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + }, + { + "check": "New array-form assertSpent encodes/decodes using explorer-verified ABI.", + "pass": true, + "selector": "0x997b1856" + } + ], + "limits": "Envelope/ABI compatibility and synthetic wire round-trip only. No rule grant, spend-race execution, SDK full-suite rerun or live funded E2E." +} diff --git a/plan/agw/research/deployment-review-2026-10-07-v5/README.md b/plan/agw/research/deployment-review-2026-10-07-v5/README.md new file mode 100644 index 00000000..47d3be4a --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-07-v5/README.md @@ -0,0 +1,54 @@ +# Donut v5 deployment check — 7 October 2026 + +The label contract dependency is delivered. SDK migration and label implementation remain to be done. This check changes no production SDK code and broadcasts no transactions. + +## Sources + +- [Current address book](https://github.com/pushchain/push-agentic-wallets/blob/bd230d20dbf778d9994b1f1082f79b1a8829a10f/docs/addresses/donut.md). +- [Owner integration guide](https://github.com/pushchain/push-agentic-wallets/blob/bd230d20dbf778d9994b1f1082f79b1a8829a10f/docs/5_SDK_Owner_Integration.md). +- Fetched `origin/deploy-agw`: `bd230d20dbf778d9994b1f1082f79b1a8829a10f` (PR #17). +- Address book identifies deployed contract source as `2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb`. Later commits deploy the suite, update docs and remove earlier deployment books. +- Exact inspected files are copied under [source/](source/). + +## Read-only network verification + +Donut RPC `https://evm.donut.rpc.push.org/`, chain ID 42101, pinned block **23991912**. See [donut-probe.json](donut-probe.json) and [label-readonly-check.json](label-readonly-check.json). + +| Component | Address | Result | +| --- | --- | --- | +| New factory proxy | `0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5` | Code exists; unpaused; implementation slot points to the new factory logic | +| New factory logic | `0xe549d3D4e85cB16F687448D7acA21D9d13A7cD0f` | 10,013 runtime bytes | +| New wallet implementation | `0x4D459Da499C14548aa16c46c57fD92880A88EBb4` | 17,584 runtime bytes; factory getter agrees; label/init selectors present | +| URP proxy | `0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af` | Same bytecode, implementation/admin slots and version 3.1.0 as the prior probe | +| Engine / validator / gateway | See probe | Bytecode and inspected wiring unchanged | + +The wallet implementation's `accountId()` is still `push.agw.1.0.0`; it cannot identify label capability by itself. + +The SDK's existing clone derivation formula, supplied with the new factory and implementation, matches live `predictWallet(owner, 0)`. Immutable clone arguments and salt formula are unchanged. Addresses change because the factory and implementation change, not because the label is part of the address. + +`eth_call` simulations of the live factory's `deployWallet` succeed for an empty label, 64 ASCII bytes, and 16 four-byte emoji. Labels of 65 ASCII bytes and 17 emoji revert with `LabelTooLong(65)` and `LabelTooLong(68)` respectively. No wallets were actually created. + +There were no `WalletDeployed` events from this factory between its deployment and the pinned block. Therefore successful rename/reset transactions, actual clone label reads and their checkpoint effects have **not** been exercised on a live wallet. Source and the contract team's label tests establish the intended semantics; this check is not a full source-bytecode equivalence proof or security audit. + +Probe `unchanged` fields compare against the older v4 probe: a false value for new factory logic, wallet implementation or factory wiring is expected. The proxy runtime itself is identical despite the changed address. Initial log scan exceeded the RPC's 1,000-block range limit; the completed scan uses bounded pages. + +## Label behavior in exact source + +- `label()` returns the stored custom label, otherwise `AGW `. +- Owner or wallet-self may call `setLabel(string)`; wallet-self enables signed owner-door execution. Agent dispatch cannot target the wallet. +- Empty string resets the default. Maximum length is **64 UTF-8 bytes**, not 64 characters. +- `LabelSet(string)` emits the supplied string, including empty on reset. +- Direct setter adds no checkpoint. A rename through `execute` or `executeWithSig` adds the normal owner-action checkpoint. +- Initialization changed from `initializeAccount()` to `initializeAccount(string)`; factory stores the supplied label through initialization. +- Signed deployment still does **not** bind the label in OwnerIntent. The relayer can choose this cosmetic value; the owner can rename afterward. This is documented and deliberately tested upstream. +- v4 wallets stay at their existing addresses and do not gain label methods. + +## SDK changes needed + +1. Replace the v4-only deployment binding with v5, including addresses, source pin, start block, EIP-712 factory domain and verification fixtures. Preserve the unchanged rule encoding and selection behavior. +2. Refresh durable ABI/artifact snapshots and local real-contract harness for the new initializer, label views/setter/event and `LabelTooLong` error. +3. Implement the existing public `wallet.setLabel()` method using the owner authorization path. Validate the UTF-8 byte cap consistently for create and rename; permit empty reset. +4. Read current labels through `label()` in wallet `info()` and `list()`, replacing deploy-event label lookup. +5. Add unit/local/live E2Es for default numbering, custom deployment labels, rename/reset, boundaries and Unicode, owner authorization, agent refusal, signed owner execution, checkpoints and v5 address/domain derivation. + +No new caller-facing method is needed: `setLabel` is already exposed but currently throws capability unavailable. Following the user's existing no-legacy-baggage direction, migration should target the current v5 suite rather than add a second v4 adapter. Existing uncommitted SVM alignment work was preserved. diff --git a/plan/agw/research/deployment-review-2026-10-07-v5/donut-probe.json b/plan/agw/research/deployment-review-2026-10-07-v5/donut-probe.json new file mode 100644 index 00000000..c5ea09ce --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-07-v5/donut-probe.json @@ -0,0 +1,167 @@ +{ + "checked_at": "2026-10-07T12:11:18.493Z", + "rpc": "https://evm.donut.rpc.push.org/", + "chain_id": 42101, + "block": "23991912", + "block_hash": "0x7ca084b733e457669ec0d87d4e67ca833014d64550d8d9a631fb398dd95bfc4f", + "code": { + "factory": { + "address": "0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5", + "bytes": 141, + "sha256": "c621e945a17be2361dfc247326991d732ede3e25c8ecd8b48ee2025c10ca17eb", + "unchanged": true + }, + "gateway": { + "address": "0x00000000000000000000000000000000000000C1", + "bytes": 1551, + "sha256": "3e78a5778be1383f2612556becde8019c22388d7157574c90fb40e1060d450ca", + "unchanged": true + }, + "proxyAdmin": { + "address": "0x0b7a31ec85117892aEA90AA5cB6514e2F97c2295", + "bytes": 926, + "sha256": "3feda633be447e268d618b40cbfcd9dfe9346ebadec981f4f3efea0fbc07cd35", + "unchanged": true + }, + "executor": { + "address": "0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7", + "bytes": 0, + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "unchanged": true + }, + "validator": { + "address": "0x068EE2388475A98EE1f5a434C58bFF3444fffFe6", + "bytes": 806, + "sha256": "7a8e45814fd8a0a6c9b9e115d797da078718f9f6358fa576e1e218ffd93db59e", + "unchanged": true + }, + "policy": { + "address": "0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af", + "bytes": 830, + "sha256": "039e9bca120a30980a0131552966575b30349654f23746f309fe98adfd2308ae", + "unchanged": true + }, + "core": { + "address": "0x00000000000000000000000000000000000000C0", + "bytes": 1551, + "sha256": "2036ba987ed029f1bc576d020ba11582934583c7eaaa7c00aefc2e0d53053486", + "unchanged": true + }, + "factoryLogic": { + "address": "0xe549d3D4e85cB16F687448D7acA21D9d13A7cD0f", + "bytes": 10013, + "sha256": "674c57210c4c0889e01491aedb5133e54f3e78c6450dcadf3c7d1aec54d1e50c", + "unchanged": false + }, + "walletImplementation": { + "address": "0x4D459Da499C14548aa16c46c57fD92880A88EBb4", + "bytes": 17584, + "sha256": "3354d9c2c4f97574748850910625a89793874b6b6a86682f3b131ec20a9df35e", + "unchanged": false + }, + "engine": { + "address": "0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a", + "bytes": 22581, + "sha256": "c4b9fc7b045d9f33953079a91fcb7ae883dd858d9cde827a9cc3df6043bc2d0b", + "unchanged": true + }, + "policyImplementation": { + "address": "0xA2391eee4C9EA1B32AEB3A460B77296EA709F02F", + "bytes": 24326, + "sha256": "1694277b24a023615b3693730ea0581e7a6fc209f533e65416d5075ef927df76", + "unchanged": true + } + }, + "slots": { + "factory": { + "implementation": { + "value": "0x000000000000000000000000e549d3d4e85cb16f687448d7aca21d9d13a7cd0f", + "unchanged": false + } + }, + "policy": { + "implementation": { + "value": "0x000000000000000000000000a2391eee4c9ea1b32aeb3a460b77296ea709f02f", + "unchanged": true + }, + "admin": { + "value": "0x0000000000000000000000000b7a31ec85117892aea90aa5cb6514e2f97c2295", + "unchanged": true + } + }, + "gateway": { + "implementation": { + "value": "0x0000000000000000000000001e412939780f2b834dc42c7ac58d9f99888da659", + "unchanged": true + } + } + }, + "reads": [ + { + "contract": "factory", + "signature": "walletImplementation()(address)", + "value": "0x4D459Da499C14548aa16c46c57fD92880A88EBb4", + "unchanged": false + }, + { + "contract": "factory", + "signature": "paused()(bool)", + "value": "false", + "unchanged": true + }, + { + "contract": "policy", + "signature": "version()(string)", + "value": "3.1.0", + "unchanged": true + }, + { + "contract": "policy", + "signature": "pushChainHash()(bytes32)", + "value": "0x3d6bc1f1d3fb03065860265a8e93840b586e57075d956cd41b4319d040be87f9", + "unchanged": true + }, + { + "contract": "policy", + "signature": "UNIVERSAL_GATEWAY_PC()(address)", + "value": "0x00000000000000000000000000000000000000C1", + "unchanged": true + }, + { + "contract": "policy", + "signature": "UNIVERSAL_EXECUTOR_MODULE()(address)", + "value": "0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7", + "unchanged": true + }, + { + "contract": "walletImplementation", + "signature": "accountId()(string)", + "value": "push.agw.1.0.0", + "unchanged": true + }, + { + "contract": "walletImplementation", + "signature": "SESSION_ENGINE()(address)", + "value": "0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a", + "unchanged": true + }, + { + "contract": "walletImplementation", + "signature": "RULES_POLICY()(address)", + "value": "0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af", + "unchanged": true + }, + { + "contract": "walletImplementation", + "signature": "SESSION_VALIDATOR()(address)", + "value": "0x068EE2388475A98EE1f5a434C58bFF3444fffFe6", + "unchanged": true + }, + { + "contract": "walletImplementation", + "signature": "UNIVERSAL_GATEWAY_PC()(address)", + "value": "0x00000000000000000000000000000000000000C1", + "unchanged": true + } + ] +} diff --git a/plan/agw/research/deployment-review-2026-10-07-v5/label-check.cjs b/plan/agw/research/deployment-review-2026-10-07-v5/label-check.cjs new file mode 100644 index 00000000..0e636faf --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-07-v5/label-check.cjs @@ -0,0 +1,29 @@ +const fs=require('fs'),path=require('path'); +const {createPublicClient,http,parseAbi,parseAbiItem,toFunctionSelector,encodeAbiParameters,encodePacked,keccak256,concat,numberToHex,getContractAddress}=require(path.join(process.cwd(),'node_modules/viem')); +const dir='plan/agw/research/deployment-review-2026-10-07-v5'; +const probe=JSON.parse(fs.readFileSync(dir+'/donut-probe.json')); const block=BigInt(probe.block),factory=probe.code.factory.address,implementation=probe.code.walletImplementation.address; +const client=createPublicClient({transport:http(probe.rpc)}); +(async()=>{ +const logs=[]; for(let start=23989983n;start<=block;start+=1000n) {const end=start+999n>block?block:start+999n; logs.push(...await client.getLogs({address:factory,event:parseAbiItem('event WalletDeployed(address indexed owner, uint256 indexed index, address indexed wallet, string label)'),fromBlock:start,toBlock:end}));} +const code=await client.getCode({address:implementation,blockNumber:block}); +const result={block:String(block),selectors:Object.fromEntries(['label()','setLabel(string)','initializeAccount(string)'].map(s=>[s,{selector:toFunctionSelector(s),presentInRuntime:code.includes(toFunctionSelector(s).slice(2))}])),wallets:[]}; +for(const log of logs.slice(0,5)) { +const {owner,index,wallet,label}=log.args; +const abi=parseAbi(['function label() view returns (string)','function checkpointCount() view returns (uint64)','function setLabel(string)','error LabelTooLong(uint256 length)','error CallerIsNotOwner()']); +const reads={label:await client.readContract({address:wallet,abi,functionName:'label',blockNumber:block}),checkpointCount:String(await client.readContract({address:wallet,abi,functionName:'checkpointCount',blockNumber:block}))}; +const simulations=[]; +for(const [name,account,newLabel] of [['owner',owner,'SDK review'],['emptyReset',owner,''],['over64Bytes',owner,'a'.repeat(65)],['nonOwner','0x0000000000000000000000000000000000000001','SDK review']]) { +try {await client.simulateContract({address:wallet,abi,functionName:'setLabel',args:[newLabel],account,blockNumber:block});simulations.push({name,success:true});}catch(e){let c=e;while(c.cause)c=c.cause;simulations.push({name,success:false,errorName:c.data?.errorName||null,args:c.data?.args?.map(String)||[],message:e.shortMessage});}} +result.wallets.push({owner,index:String(index),wallet,deployLabel:label,reads,simulations}); +} +const sampleOwner=logs[0]?.args.owner||'0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7'; +const count=await client.readContract({address:factory,abi:parseAbi(['function walletCount(address) view returns (uint256)']),functionName:'walletCount',args:[sampleOwner],blockNumber:block}); +const salt=keccak256(encodeAbiParameters([{type:'address'},{type:'uint96'}],[sampleOwner,count])); +const args=encodePacked(['address','address'],[sampleOwner,factory]); +const bytecode=concat(['0x61',numberToHex(85,{size:2}),'0x3d81600a3d39f3363d3d373d3d3d363d73',implementation,'0x5af43d82803e903d91602b57fd5bf3',args]); +const local=getContractAddress({opcode:'CREATE2',from:factory,salt,bytecodeHash:keccak256(bytecode)}); +const prediction=await client.readContract({address:factory,abi:parseAbi(['function predictWallet(address,uint256) view returns (address,bool)']),functionName:'predictWallet',args:[sampleOwner,count],blockNumber:block}); +result.derivation={owner:sampleOwner,index:String(count),local,predicted:prediction[0],matches:local.toLowerCase()===prediction[0].toLowerCase()}; +result.deploySimulations=[];for(const [name,label]of [['default',''],['64Bytes','a'.repeat(64)],['65Bytes','a'.repeat(65)],['16Emoji','🙂'.repeat(16)],['17Emoji','🙂'.repeat(17)]]){try{const simulated=await client.simulateContract({address:factory,abi:parseAbi(['function deployWallet(string) returns (address)','error LabelTooLong(uint256 length)']),functionName:'deployWallet',args:[label],account:sampleOwner,blockNumber:block});result.deploySimulations.push({name,success:true,wallet:simulated.result});}catch(e){const c=e.walk?.(x=>x.name==='ContractFunctionRevertedError');result.deploySimulations.push({name,success:false,errorName:c?.data?.errorName||null,args:c?.data?.args?.map(String)||[],message:e.shortMessage});}} +result.totalDeployedWalletEvents=logs.length;fs.writeFileSync(dir+'/label-readonly-check.json',JSON.stringify(result,null,2)+'\n');console.log(JSON.stringify(result,null,2)); +})(); diff --git a/plan/agw/research/deployment-review-2026-10-07-v5/label-readonly-check.json b/plan/agw/research/deployment-review-2026-10-07-v5/label-readonly-check.json new file mode 100644 index 00000000..bf9c9128 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-07-v5/label-readonly-check.json @@ -0,0 +1,61 @@ +{ + "block": "23991912", + "selectors": { + "label()": { + "selector": "0xcb4774c4", + "presentInRuntime": true + }, + "setLabel(string)": { + "selector": "0xbf530969", + "presentInRuntime": true + }, + "initializeAccount(string)": { + "selector": "0x767df6cb", + "presentInRuntime": true + } + }, + "wallets": [], + "derivation": { + "owner": "0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7", + "index": "0", + "local": "0x9E1e228d5Fb19e4c33fd8aF96de8492Ef59b6612", + "predicted": "0x9E1e228d5Fb19e4c33fd8aF96de8492Ef59b6612", + "matches": true + }, + "deploySimulations": [ + { + "name": "default", + "success": true, + "wallet": "0x9E1e228d5Fb19e4c33fd8aF96de8492Ef59b6612" + }, + { + "name": "64Bytes", + "success": true, + "wallet": "0x9E1e228d5Fb19e4c33fd8aF96de8492Ef59b6612" + }, + { + "name": "65Bytes", + "success": false, + "errorName": "LabelTooLong", + "args": [ + "65" + ], + "message": "The contract function \"deployWallet\" reverted." + }, + { + "name": "16Emoji", + "success": true, + "wallet": "0x9E1e228d5Fb19e4c33fd8aF96de8492Ef59b6612" + }, + { + "name": "17Emoji", + "success": false, + "errorName": "LabelTooLong", + "args": [ + "68" + ], + "message": "The contract function \"deployWallet\" reverted." + } + ], + "totalDeployedWalletEvents": 0 +} diff --git a/plan/agw/research/deployment-review-2026-10-07-v5/probe.cjs b/plan/agw/research/deployment-review-2026-10-07-v5/probe.cjs new file mode 100644 index 00000000..b3d2ccf3 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-07-v5/probe.cjs @@ -0,0 +1,10 @@ +const fs=require('fs'),path=require('path'),crypto=require('crypto');const root=process.cwd();const {createPublicClient,http,parseAbi}=require(path.join(root,'node_modules/viem')); +const prior=JSON.parse(fs.readFileSync('plan/agw/research/deployment-review-2026-10-06/donut-probe.json')); +prior.code.factory.address='0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5'; prior.code.factoryLogic.address='0xe549d3D4e85cB16F687448D7acA21D9d13A7cD0f'; prior.code.walletImplementation.address='0x4D459Da499C14548aa16c46c57fD92880A88EBb4'; +const client=createPublicClient({transport:http(prior.rpc)}); +(async()=>{const block=await client.getBlock();const result={checked_at:new Date().toISOString(),rpc:prior.rpc,chain_id:await client.getChainId(),block:String(block.number),block_hash:block.hash,code:{},slots:{},reads:[]}; +await Promise.all(Object.entries(prior.code).map(async([name,item])=>{const data=await client.getCode({address:item.address,blockNumber:block.number})||'0x';const bytes=Buffer.from(data.slice(2),'hex');const sha256=crypto.createHash('sha256').update(bytes).digest('hex');result.code[name]={address:item.address,bytes:bytes.length,sha256,unchanged:sha256===item.sha256};})); +const slots={implementation:'0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc',admin:'0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103'}; +for(const [name,rows]of Object.entries(prior.slots)){result.slots[name]={};for(const [kind,value]of Object.entries(rows)){const actual=await client.getStorageAt({address:prior.code[name].address,slot:slots[kind],blockNumber:block.number});result.slots[name][kind]={value:actual,unchanged:actual?.toLowerCase()===value.toLowerCase()};}} +for(const row of prior.reads){const name=row.signature.split('(')[0],type=row.signature.split(')(')[1].slice(0,-1);try{const value=await client.readContract({address:prior.code[row.contract].address,abi:parseAbi([`function ${name}() view returns (${type})`]),functionName:name,blockNumber:block.number});result.reads.push({contract:row.contract,signature:row.signature,value:String(value),unchanged:String(value).toLowerCase()===row.output.replaceAll('"','').toLowerCase()});}catch(e){result.reads.push({contract:row.contract,signature:row.signature,error:e.shortMessage||e.message});}} +fs.writeFileSync('plan/agw/research/deployment-review-2026-10-07-v5/donut-probe.json',JSON.stringify(result,null,2)+'\n');console.log(JSON.stringify({block:result.block,codeChanged:Object.entries(result.code).filter(([,v])=>!v.unchanged).map(([k])=>k),slots:result.slots,readMismatches:result.reads.filter(r=>!r.unchanged)}));})(); diff --git a/plan/agw/research/deployment-review-2026-10-07-v5/source/deployments/address-book-v5/push_agw_contracts.json b/plan/agw/research/deployment-review-2026-10-07-v5/source/deployments/address-book-v5/push_agw_contracts.json new file mode 100644 index 00000000..b35caae4 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-07-v5/source/deployments/address-book-v5/push_agw_contracts.json @@ -0,0 +1,128 @@ +{ + "network": "push-donut-testnet", + "chainId": 42101, + "generation": "v5", + "explorer": "https://donut.push.network", + "commit": "git:2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", + "engineForkCommit": "7dc20e4", + "forge": "1.5.1-stable", + "deployer": "0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7", + "deployScript": "script/DeployWalletAndFactory.s.sol", + "blocks": [ + 23989983, + 23989987 + ], + "deploymentGas": 6357076, + "deploymentCostPC": "0.0071517105", + "summary": "New AGW implementation (wallet label) and a new factory proxy + logic. The engine, URP (proxy, implementation, ProxyAdmin) and AgentValidator are reused from v4 unchanged: none stores a factory or wallet-implementation address, and their state is keyed per wallet.", + "contracts": { + "factoryProxy": { + "address": "0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5", + "contract": "ERC1967Proxy (UUPS)", + "sizeBytes": 141, + "verified": true, + "explorer": "https://donut.push.network/address/0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5", + "deployTx": "0x7294e0aff89cda3a3197e419e3c3273aa7a0ce3e29e2a66bbe56479226dc0ca9", + "note": "PERMANENT, user-facing: deploy and look up wallets here. Also the EIP-712 verifyingContract for every OwnerIntent." + }, + "factoryLogic": { + "address": "0xe549d3D4e85cB16F687448D7acA21D9d13A7cD0f", + "contract": "AGWFactory", + "sizeBytes": 10013, + "verified": true, + "explorer": "https://donut.push.network/address/0xe549d3D4e85cB16F687448D7acA21D9d13A7cD0f", + "deployTx": "0x3def7e525fb9a205597351bf2c2c386cd8e668ef8d1138afb2bcc2c6cb0cd502" + }, + "walletImplementation": { + "address": "0x4D459Da499C14548aa16c46c57fD92880A88EBb4", + "contract": "AGW", + "sizeBytes": 17584, + "verified": true, + "explorer": "https://donut.push.network/address/0x4D459Da499C14548aa16c46c57fD92880A88EBb4", + "deployTx": "0x8dfa2be6d1fd7266bc4685487693360d2bee67ab1272ab97bc3ba86cabecd389", + "note": "Clone target; accountId push.agw.1.0.0. Adds the wallet label: label(), setLabel(string), LabelSet, initializeAccount(string)." + }, + "urp": { + "address": "0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af", + "contract": "TransparentUpgradeableProxy", + "sizeBytes": 830, + "verified": true, + "explorer": "https://donut.push.network/address/0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af", + "deployTx": "0xa52689e41f70b2d72d938f3c62f4dd6db0bf3595e9f89f44889ae17ff7692655", + "note": "PERMANENT: every wallet pins it; every rule names it as its only action policy.", + "reusedFrom": "v4" + }, + "urpImplementation": { + "address": "0xA2391eee4C9EA1B32AEB3A460B77296EA709F02F", + "contract": "UniversalRulesPolicy 3.1.0", + "sizeBytes": 24326, + "verified": true, + "explorer": "https://donut.push.network/address/0xA2391eee4C9EA1B32AEB3A460B77296EA709F02F", + "deployTx": "0x6b5705fccec7f68c0ac71294a4cf6b1f4d509b8c1b1645658c502f2bca917a91", + "reusedFrom": "v4" + }, + "urpProxyAdmin": { + "address": "0x0b7a31ec85117892aEA90AA5cB6514e2F97c2295", + "contract": "ProxyAdmin", + "sizeBytes": 926, + "verified": true, + "explorer": "https://donut.push.network/address/0x0b7a31ec85117892aEA90AA5cB6514e2F97c2295", + "note": "KEEP: no URP upgrade is possible without it. Created internally by the TUP; read from the ERC-1967 admin slot.", + "reusedFrom": "v4" + }, + "sessionValidator": { + "address": "0x068EE2388475A98EE1f5a434C58bFF3444fffFe6", + "contract": "AgentValidator", + "sizeBytes": 806, + "verified": true, + "explorer": "https://donut.push.network/address/0x068EE2388475A98EE1f5a434C58bFF3444fffFe6", + "deployTx": "0xb7c736e905952354201767da3287eb4769870029f29db7baeab732ac9db73e35", + "reusedFrom": "v4" + }, + "sessionEngine": { + "address": "0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a", + "contract": "SmartSession (fork 7dc20e4)", + "sizeBytes": 22581, + "verified": true, + "explorer": "https://donut.push.network/address/0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a", + "deployTx": "0xf36a57a8a626e6918cd80ffc0a635a15afac68e643b576fd3891c482e27c9fd7", + "reusedFrom": "v4" + } + }, + "external": { + "universalGateway": "0x00000000000000000000000000000000000000C1", + "universalCore": "0x00000000000000000000000000000000000000C0", + "ueaFactory": "0x00000000000000000000000000000000000000eA", + "universalExecutorModule": "0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7", + "gatewayImplementationAtDeploy": "0x1e412939780f2b834DC42C7AC58d9f99888Da659", + "gatewayOutboundSelector": "0x77b86bec" + }, + "adminState": { + "factoryDefaultAdmin": "0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7", + "defaultAdminDelaySeconds": 172800, + "urpProxyAdminOwner": "0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7", + "pauserRole": "none", + "operatorRole": "none", + "note": "Testnet: the new factory's default admin and the (reused) URP ProxyAdmin owner are both the deployer EOA. PAUSER_ROLE and OPERATOR_ROLE are unassigned on the new factory; grant them before it can be paused." + }, + "ruleEncoding": { + "initData": "abi.encode(uint16 version, string chainNamespace, bytes body), version 1", + "universalTermsTuple": "(uint48,address,(address,uint256,uint256)[],uint256,(address,bytes4,uint16,bool,uint256)[])", + "tokens": "PRC20 addresses on Push, 1..8 per cross-chain rule; type(uint256).max = unlimited, 0 = nothing", + "pushChainHash": "0x3d6bc1f1d3fb03065860265a8e93840b586e57075d956cd41b4319d040be87f9" + }, + "walletLabel": { + "default": "AGW , the owner's own factory index", + "maxBytes": 64, + "reset": "setLabel(\"\") restores the default", + "checkpoint": "none", + "signedInDeployWalletWithSig": false + }, + "supersedes": { + "generation": "v4", + "factoryProxy": "0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF", + "factoryLogic": "0xe138Dc6EfC10233BE1e6c8aF1Caf8cABe599cfC2", + "walletImplementation": "0x96D69ec7e6cDdaD414e656B5c9DCA24587DF713c", + "note": "v4 wallets keep working against the same URP and engine but have no label functions. Earlier address books are in git history." + } +} diff --git a/plan/agw/research/deployment-review-2026-10-07-v5/source/docs/5_SDK_Owner_Integration.md b/plan/agw/research/deployment-review-2026-10-07-v5/source/docs/5_SDK_Owner_Integration.md new file mode 100644 index 00000000..2b24c609 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-07-v5/source/docs/5_SDK_Owner_Integration.md @@ -0,0 +1,523 @@ +# AGW for the SDK — owner side + +What the SDK needs to create agentic wallets, grant and revoke rules, act as the owner, and read state, against the +**v5 deployment on Donut**. Owner side only: the agent side (`executeAsAgent`, building outbound requests) is out of +scope here. + +Everything below is taken from the deployed contracts (commit `2e61e13`). ABIs: use the verified contracts on +[donut.push.network](https://donut.push.network), or the build artifacts in this repo (`out/.sol/.json`). +Full address book: [`docs/addresses/donut.md`](addresses/donut.md). + +**What changed from v4:** +- **New factory:** `0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5`. It is also the EIP-712 `verifyingContract`, so every + `OwnerIntent` must be signed for the new address (§7). +- **New wallet implementation**, with a stored label (§3, [Label](#label)). +- URP, SmartSession and AgentValidator keep their addresses, and rule encoding is unchanged. +- Wallets from the v4 factory (`0xaF88…1aaF`) still work but have no label functions. Deploy new wallets only through + the v5 factory. + +--- + +## 1. The contracts the SDK talks to + +| Contract | Address (Donut, chain id `42101`) | What the SDK does with it | +|---|---|---| +| **AGWFactory** (proxy) | `0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5` | Predict, deploy and look up wallets | +| **AGW** (one per user) | address from `predictWallet` | Grant / revoke rules, owner actions, reads | +| **URP** (proxy) | `0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af` | Named inside every rule; read rule terms and spend | +| **SmartSession** (engine) | `0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a` | Read only: list a wallet's rules | +| **AgentValidator** | `0x068EE2388475A98EE1f5a434C58bFF3444fffFe6` | Named inside every rule; never called | +| UniversalGatewayPC (Push core) | `0x00000000000000000000000000000000000000C1` | Named as the target of every cross-chain rule | +| UniversalCore (Push core) | `0x00000000000000000000000000000000000000C0` | Look up a chain's gas token (`gasTokenPRC20ByChainNamespace`) | + +`AGW.SESSION_ENGINE()`, `AGW.RULES_POLICY()`, `AGW.SESSION_VALIDATOR()` and `AGW.UNIVERSAL_GATEWAY_PC()` return the +engine, URP, validator and gateway a wallet expects. Prefer reading them from the wallet over hard-coding. + +## 2. Five terms + +- **Owner**: the Push address that owns a wallet (an EOA, or the UEA of an external key). Fixed at deploy. +- **Wallet (AGW)**: a small contract account. It holds the funds the agent may use; its balance is the hard ceiling. +- **Rule**: what one agent may do from one wallet. Granted by the owner, stored in the engine and URP, immutable once + granted. Identified by a `rulesId` (`bytes32`). +- **Agent**: the Push address a rule names (an EOA, or the UEA of an external key). Never the owner. +- **Checkpoint**: a counter on the wallet that moves on every owner-side action (owner calls, grants, revokes), never + on agent actions. Evaluators compare it before and after a job. + +--- + +## 3. Wallets: predict, fund, deploy + +### Predict + +```solidity +function walletCount(address owner) external view returns (uint256); // also the next index +function predictWallet(address owner, uint256 index) external view returns (address wallet, bool deployed); +``` + +The address depends only on `(owner, index)` and never changes, so it can be shown and **funded before deployment** +(PC and PRC20s sent to it are there when it deploys). The next wallet is `predictWallet(owner, walletCount(owner))`. +`index` may be at most `walletCount(owner)`: predicting further ahead reverts `IndexOutOfRange(index, next)`. + +### Deploy + +```solidity +function deployWallet(string calldata label) external returns (address wallet); // caller = owner +function deployWalletWithSig(OwnerIntent calldata intent, bytes calldata sig, string calldata label) + external returns (address wallet); // relayed, see §7 +``` + +- `deployWallet` makes **the caller** the owner; there is no owner parameter. +- `label` is optional (`""` for the default) and is **stored on the wallet** (see [Label](#label)). It is also + emitted in `WalletDeployed`. Over 64 bytes, the deploy reverts `LabelTooLong(length)`. +- Deploys revert while the factory is paused (`EnforcedPause`). + +### Look up + +```solidity +function isWallet(address account) external view returns (bool); +function ownerOf(address wallet) external view returns (address); // address(0) if not a factory wallet +function indexOf(address wallet) external view returns (uint256); // reverts NotAWallet for a non-wallet +``` + +To list an owner's wallets: indices `0 .. walletCount(owner)-1` through `predictWallet`, or the `WalletDeployed` +events filtered by `owner`. + +### Label + +> Wallets from the retired v4 factory (`0xaF88…1aaF`) have no `label()` / `setLabel`; calling them reverts. + +```solidity +function label() external view returns (string memory); // on the wallet +function setLabel(string calldata label) external; // on the wallet; owner (or the wallet itself) +event LabelSet(string label); +``` + +- **Every wallet has a label.** With none set, `label()` returns `"AGW "`, using the owner's own index: + an owner's wallets read `AGW 1`, `AGW 2`, … and another owner's first wallet is also `AGW 1`. +- `setLabel` renames; `setLabel("")` resets to the default. At most **64 bytes** (bytes, not characters: 16 + four-byte emoji fit), else `LabelTooLong(length)`. Anyone but the owner gets `CallerIsNotOwner`. +- **Not a checkpoint.** A direct `setLabel` moves no counter. Sent through `execute` / `executeWithSig` (how a UEA + owner renames: an execute whose single call targets the wallet's own `setLabel`), only the owner-door call ticks. +- `LabelSet` carries the label as passed (`""` on a reset). The deploy-time label is in `WalletDeployed`. +- **The label is not signed in `deployWalletWithSig`**: the relayer passes it, so it can differ from what the owner + chose. It is cosmetic; the owner can fix it with `setLabel`. +- `list()` / `info()` need one `eth_call` per wallet: `label()`. No event scan. + +--- + +## 4. Granting a rule + +```solidity +function grantRules(Session calldata session) external returns (bytes32 rulesId); // owner, or the wallet itself +``` + +One call grants one rule. A rule is a **`Session`** (the engine's struct) whose one policy is URP, carrying the terms +in an **envelope**. + +### 4.1 The Session, field by field + +```solidity +struct Session { + address sessionValidator; // AgentValidator 0x068E…FfFe6 (must equal wallet.SESSION_VALIDATOR()) + bytes sessionValidatorInitData; // abi.encode(address agent), agent != address(0) + bytes32 salt; // anything; the wallet overwrites it with its grant nonce + PolicyData[] userOpPolicies; // MUST be empty + ERC7739Data erc7739Policies; // MUST be empty: { allowedERC7739Content: [], erc1271Policies: [] } + ActionData[] actions; // see below + bool permitERC4337Paymaster; // MUST be false +} +struct PolicyData { address policy; bytes initData; } +struct ActionData { bytes4 actionTargetSelector; address actionTarget; PolicyData[] actionPolicies; } +struct ERC7739Data { ERC7739Context[] allowedERC7739Content; PolicyData[] erc1271Policies; } +struct ERC7739Context { bytes32 appDomainSeparator; string[] contentNames; } +``` + +Every action has **exactly one** policy: `{ policy: URP, initData: }`. Anything else reverts +`MalformedSessionShape`. + +Actions by rule kind: + +| Kind | `actions` | +|---|---| +| **Cross-chain** (EVM or Solana destination) | Exactly 1 action: `actionTarget = UniversalGatewayPC`, `actionTargetSelector = 0x77b86bec` (the gateway's `sendUniversalTxOutbound`) | +| **Native** (Push-side calls) | 1 to 8 actions, one per `(target, selector)` the agent may call; no duplicates; every action's envelope names the same chain | + +The **kind is never declared**: it is derived from the envelope's chain string. This chain (`"eip155:42101"`) means +native; any other `eip155:` or `solana:` chain means cross-chain. + +### 4.2 The envelope (`initData` of the URP policy) + +```solidity +initData = abi.encode(uint16 version, string chainNamespace, bytes body) +``` + +- `version` = **1** (`ENVELOPE_VERSION`). Anything else is refused (`UnsupportedEnvelopeVersion`). +- `chainNamespace`: CAIP-2 string, byte-exact. Destination chain for cross-chain rules (e.g. `"eip155:11155111"`, + `"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"`); `"eip155:42101"` for native rules on Donut. + (`URP.pushChainHash()` returns `keccak256("eip155:42101")` if you want to confirm.) +- `body`: `abi.encode(UniversalTerms)`, `abi.encode(SvmTerms)` or `abi.encode(NativeTerms)`, by kind. + +### 4.3 Cross-chain rule, EVM destination: `UniversalTerms` + +```solidity +struct UniversalTerms { + uint48 validUntil; // unix seconds, in the future; "never" = type(uint48).max + address expectedCEA; // the wallet's account on the destination chain + AssetCap[] assets; // 1..8 tokens the agent may move + uint256 maxGasPerCall; // PC (wei) the wallet may spend per outbound (protocol fee + gas) + AllowedCall[] allowedCalls; // 1..32 destination-chain calls the agent may make +} +struct AssetCap { + address token; // PRC20 ON PUSH (e.g. USDC.eth), never the destination chain's address + uint256 maxPerCall; // per request; 0 = this token can never move + uint256 maxTotal; // lifetime amount sent out; type(uint256).max = unlimited; 0 = nothing +} +struct AllowedCall { + address target; // destination-chain contract + bytes4 selector; // destination-chain function + uint16 beneficiaryOffset; // byte offset of the beneficiary argument: 4 + 32 * argIndex + bool hasBeneficiary; // if true, that argument must equal expectedCEA + uint256 maxValue; // native value per call, in DESTINATION-chain units; 0 = non-payable +} +``` + +ABI tuple: `(uint48,address,(address,uint256,uint256)[],uint256,(address,bytes4,uint16,bool,uint256)[])` + +Rules the contracts enforce at grant (each with a named error, §10): + +- **At least one token, at most 8, no duplicates.** A rule with no token is refused (`AssetListOutOfRange(0)`): the + gateway picks the destination chain from the request's token, so a rule without a token has no chain. +- **Every token's chain must equal the rule's chain**: URP calls `token.SOURCE_CHAIN_NAMESPACE()` and compares + (`ChainMismatch`, `InvalidAsset`). It checks the chain, **not which token**, so picking the right PRC20 is the SDK's job. +- `expectedCEA` non-zero; `allowedCalls` 1..32; `validUntil` non-zero and in the future. + +What the SDK has to resolve: + +- **Token → PRC20**: users give the destination chain's token (e.g. `MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC`); convert + with `PushChain.utils.tokens.getPRC20Address(...)` and confirm `SOURCE_CHAIN_NAMESPACE()` equals the rule's chain. +- **A rule that moves no tokens**: the contracts refuse an empty list, so the SDK adds the destination chain's gas + token with both limits at 0: `UniversalCore.gasTokenPRC20ByChainNamespace(chain)` (Sepolia: pETH + `0x2971824Db68229D087931155C2b8bB820B275809`). Add it only when the user lists no token, or it would duplicate. +- **"No total limit"**: encode `maxTotal = type(uint256).max`. Do not encode 0; 0 means nothing may move. +- **`expectedCEA`**: the wallet's CEA on the destination chain, from that chain's CEA factory: + `getCEAForPushAccount(walletAddress) returns (address cea, bool isDeployed)`. +- **`beneficiaryOffset`**: from the function ABI, `4 + 32 * argIndex` (e.g. Aave `supply(address,uint256,address,uint16)`, + `onBehalfOf` is argument 2, offset 68). + +One rule may list several tokens and several protocols. Limits are **per token**; there is no combined limit across +tokens, and every listed token may be used with every allowed call. Different scopes need separate rules. + +### 4.4 Cross-chain rule, Solana destination: `SvmTerms` + +```solidity +struct SvmTerms { + uint48 validUntil; + bytes32 expectedCEA; // PDA(["push_identity", wallet], gatewayProgram) + bytes32 gatewayProgram; // the Push gateway program on that cluster (from the chain registry) + AssetCap[] assets; // 1..8, same as §4.3; request amounts must fit u64 + uint256 maxGasPerCall; + bytes32[] ceaAccounts; // the CEA's value-holding accounts, max 16, MUST include expectedCEA + AllowedProgram[] programs; // 1..32 allowed (program, instruction) pairs + SvmAccountPin[] pins; // max 16 account pins + SvmDataPin[] dataPins; // max 8 instruction-data pins +} +struct AllowedProgram { bytes32 program; bytes8 discriminator; uint8 discriminatorLen; bool dataless; uint8 maxAccounts; } +struct SvmAccountPin { uint8 ruleIndex; uint8 accountIndex; bytes32 expected; } +struct SvmDataPin { uint8 ruleIndex; bool fromEnd; uint16 offset; uint16 offsetB; uint8 len; + uint8 mode /* 0 EQ, 1 GTE_LE, 2 LTE_LE, 3 RATIO_GTE_LE */; bytes32 expected; uint64 num; uint64 den; } +``` + +What the SDK must get right (all checked at grant, named errors): + +- `ceaAccounts`: the CEA plus **the CEA's token account for every listed token** and any swap-output accounts. URP + cannot derive Solana token accounts, so it cannot check this; an unlisted account is unprotected. +- **One rule per (program, instruction).** Each position takes one pinned key, so if a swap rule pins its input to the + USDC account, USDT cannot be that instruction's input. Plan Solana rules so different tokens use different instructions. +- Every program rule needs at least one account pin; `discriminatorLen` is 1..8, or 0 exactly when `dataless`. +- System, SPL Token, Token-2022, Stake, the upgradeable loader, the lookup-table program, the gateway program and the + CEA itself can never be allowed programs. + +Field-level detail: `docs/2_UniversalRulesPolicy.md` §1.2c. + +### 4.5 Native rule (Push-side calls): `NativeTerms`, one per action + +```solidity +struct NativeTerms { + uint48 validUntil; + address target; // MUST equal this action's actionTarget + bytes4 selector; // MUST equal this action's actionTargetSelector; 0xFFFFFFFF = plain PC transfer + uint256 maxValuePerCall; // PC (wei) per call + uint256 maxValueTotal; // lifetime PC; type(uint256).max = unlimited + AmountRule amount; // optional metering of one uint256 argument + uint32 maxCalls; // 0 = unlimited + ArgPin[] pins; // 0..8 arguments that must equal a fixed word +} +struct AmountRule { bool enabled; uint16 offset; uint256 maxPerCall; uint256 maxTotal; } +struct ArgPin { uint16 offset; bytes32 expected; } // offset counts from byte 0, selector included: 4 = first argument +``` + +ABI tuple: `(uint48,address,bytes4,uint256,uint256,(bool,uint16,uint256,uint256),uint32,(uint16,bytes32)[])` + +- `target`/`selector` must match the action they sit in. The contracts do not cross-check at grant, and a mismatch + makes the rule unusable. +- Targets that can never be granted: the gateway (use a cross-chain rule), the wallet, the factory, the engine, URP, + the validator, `address(0)`, `address(1)`. +- A plain PC transfer (`0xFFFFFFFF`) carries no pins and no amount rule. + +### 4.6 The `rulesId` + +`grantRules` returns it, and `RulesGranted(rulesId, …)` carries it. It is also predictable before sending: + +``` +rulesId = keccak256(abi.encode(address sessionValidator, bytes sessionValidatorInitData, bytes32(grantNonce))) + // grantNonce = wallet.grantNonce() at the moment of the grant; it advances by 1 on every grant +``` + +Equivalently, call `SmartSession.getPermissionId(session)` with `salt = bytes32(grantNonce)`. Ids never repeat, even +for byte-identical rules granted twice. + +### 4.7 Encoding a cross-chain rule (viem) + +```ts +import { encodeAbiParameters, parseAbiParameters, parseEther, maxUint256, zeroHash } from 'viem'; + +const terms = encodeAbiParameters( + parseAbiParameters('(uint48,address,(address,uint256,uint256)[],uint256,(address,bytes4,uint16,bool,uint256)[])'), + [[validUntil, expectedCEA, + [[USDC_ETH, 100_000000n, 1000_000000n], [USDT_ETH, 50_000000n, maxUint256]], + parseEther('1'), + [[aavePool, '0x617ba037', 68, true, 0n], [usdcSepolia, '0x095ea7b3', 0, false, 0n]]]], +); +const initData = encodeAbiParameters(parseAbiParameters('uint16, string, bytes'), [1, 'eip155:11155111', terms]); + +const session = { + sessionValidator: wallet.SESSION_VALIDATOR, // 0x068E…FfFe6 + sessionValidatorInitData: encodeAbiParameters([{ type: 'address' }], [agent]), + salt: zeroHash, + userOpPolicies: [], + erc7739Policies: { allowedERC7739Content: [], erc1271Policies: [] }, + actions: [{ + actionTargetSelector: '0x77b86bec', // gateway sendUniversalTxOutbound + actionTarget: '0x00000000000000000000000000000000000000C1', // UniversalGatewayPC + actionPolicies: [{ policy: URP, initData }], + }], + permitERC4337Paymaster: false, +}; +// wallet.grantRules(session), from the owner +``` + +--- + +## 5. Revoking and replacing rules + +```solidity +function revokeRules(bytes32 rulesId) external; // owner, or the wallet itself; UnknownPermission if not live +function revokeAllRules() external; // owner, or the wallet itself +``` + +Revocation is immediate on Push and cannot be blocked. An outbound already sent across the bridge still completes. + +**Rules are immutable.** To "update" one, the owner sends **one batch through the owner door** (§6): + +1. `URP.assertSpent(configId, wallet, expectedSpent)` — reverts if the agent spent since the SDK read the counters; +2. `wallet.revokeRules(oldRulesId)`; +3. `wallet.grantRules(newSession)`. + +If step 1 reverts, nothing changes. Counters start at zero on the new rule. `assertSpent` forms: + +```solidity +// cross-chain (EVM or Solana): one expected value per listed token, IN THE ORDER THE RULE LISTED THEM +function assertSpent(ConfigId id, address account, uint256[] calldata expectedSpent) external view; +// native: per action +function assertSpent(ConfigId id, address account, uint256 expectedValueSpent, uint256 expectedAmountSpent, uint32 expectedCalls) + external view; +``` + +--- + +## 6. The owner door: `execute` + +```solidity +function execute(bytes32 mode, bytes calldata executionCalldata) external payable; // owner only +``` + +The owner acts as the wallet with **no rule checked**: withdraw, approve, call anything, or call the wallet's own +`grantRules` / `revokeRules` in a batch. + +| | `mode` | `executionCalldata` | +|---|---|---| +| Single call | `0x0000…00` (32 zero bytes) | `abi.encodePacked(address target, uint256 value, bytes callData)` | +| Batch | `0x01` followed by 31 zero bytes | `abi.encode(Execution[])`, `Execution = (address target, uint256 value, bytes callData)` | + +Other modes (delegatecall, try) revert `UnsupportedExecutionMode`. Every call in an owner action records one +checkpoint. Withdraw PC: single call to the destination address with `value = amount, callData = 0x`. Withdraw a +token: single call to the token with `transfer(to, amount)`. + +--- + +## 7. Relayed owner actions: `OwnerIntent` + +For owners who sign but do not send (a Push EOA without gas, or a relayer-driven flow). The owner signs one EIP-712 +`OwnerIntent`; the named `executor` submits it. + +```solidity +struct OwnerIntent { + address owner; // the wallet owner + address wallet; // the wallet (its predicted address if not deployed yet) + address executor; // the ONLY address allowed to submit this intent + uint96 index; // deploy: must equal factory.walletCount(owner) + bytes32 sessionHash; // grant: keccak256(abi.encode(session)) of the session AS SUBMITTED; 0 = no grant + bytes32 mode; // execute: the mode word + bytes32 execCalldataHash; // execute: keccak256(executionCalldata); 0 = no execute + uint192 nonceKey; // execute: lane key; the top bit (1 << 191) MUST be set + uint64 nonceSeq; // execute: must equal wallet.getNonce(nonceKey) + uint64 grantNonce; // grant: must equal wallet.grantNonce() + uint48 deadline; // unix seconds; every door rejects after it + uint256 signerChainId; // the chain id the owner's wallet signs under (their home chain) +} +``` + +EIP-712 type string (fields in this order): + +``` +OwnerIntent(address owner,address wallet,address executor,uint96 index,bytes32 sessionHash,bytes32 mode,bytes32 execCalldataHash,uint192 nonceKey,uint64 nonceSeq,uint64 grantNonce,uint48 deadline,uint256 signerChainId) +``` + +Domain: `name "AGWFactory"`, `version "1"`, `chainId = signerChainId`, `verifyingContract = factory proxy` +(`0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5`, also for wallet doors), `salt = bytes32(uint256(42101))`. Check the local derivation against +`factory.domainSeparator(signerChainId)` (or `wallet.domainSeparator(...)`, identical) before prompting. + +| Door | Contract | Fields it checks | +|---|---|---| +| `deployWalletWithSig(intent, sig, label)` | factory | `owner`, `index`, `wallet` (= predicted), `executor`, `deadline` | +| `grantRulesWithSig(session, intent, sig)` | wallet | `wallet`, `owner`, `executor`, `deadline`, `sessionHash`, `grantNonce` | +| `executeWithSig(mode, executionCalldata, intent, sig)` | wallet | `wallet`, `owner`, `executor`, `deadline`, `mode`, `execCalldataHash`, `nonceKey`, `nonceSeq` | + +- **One signature can cover all three doors**: each door checks only its own fields, and each is single-use (deploy: + the index advances; grant: the grant nonce advances; execute: the lane sequence advances). +- **Several rules in one signature**: put a batch of the wallet's own `grantRules` calls in `executeWithSig` + (`grantRulesWithSig` grants exactly one). +- `executeWithSig` is **not payable**; value comes from the wallet's balance. +- Signature check: an owner with no code is verified by ECDSA; a contract owner by its UEA method + (`verifyUniversalPayloadSignature`), then ERC-1271. A **Solana-key owner's UEA must already exist on Push** before + its first signed intent. +- If the owner calls `deployWalletWithSig` directly, no signature is needed. + +--- + +## 8. "Create a wallet with rules" in practice + +| Owner | How | +|---|---| +| **UEA** (external key) | One UEA multicall, one signature: `factory.deployWallet(label)` then `predictedWallet.grantRules(session)` per rule. | +| **Push EOA**, sends its own txs | Two transactions: `factory.deployWallet(label)`, then `wallet.execute(batch of wallet.grantRules(...))`. | +| **Push EOA via a relayer** | One signature: an `OwnerIntent` with the deploy fields plus an execute batch of self-grants. The relayer sends `deployWalletWithSig`, then `executeWithSig`. | + +Fund the wallet with PC (for the agent's per-call fees) and the tokens the rules allow, at its address, before or after +deployment. + +--- + +## 9. Reading state + +| To get | Call | +|---|---| +| A wallet's live rules | `SmartSession.getPermissionIDs(wallet)` → `bytes32[]` | +| Is a rule live | `SmartSession.isPermissionEnabled(rulesId, wallet)` | +| The rule's agent | `wallet.agentOf(rulesId)` (zero if revoked or unknown) | +| Kind, VM family, chain | `URP.getMode(configId, wallet)` → `{initialized, mode (0 cross-chain, 1 native), vm (0 EVM, 1 Solana), chainHash}` | +| Cross-chain EVM terms + spend | `URP.getConfig(configId, wallet)` → `{initialized, validUntil, expectedCEA, maxGasPerCall, assets[], allowedCalls[]}`, each asset `{token, maxPerCall, maxTotal, spent}` | +| Solana terms + spend | `URP.getSvmConfig(configId, wallet)` (same `assets[]` with `spent`) | +| Native terms + spend | `URP.getNativeConfig(configId, wallet)` → `{…, valueSpent, amountSpent, callsUsed, …}` | +| Checkpoints | `wallet.checkpointCount()`, `wallet.lastCheckpointBlock()`, `Checkpointed` events | +| Owner / factory | `wallet.owner()`, `wallet.factory()` | +| Label | `wallet.label()` (the default `AGW ` when none is set) | +| Next grant nonce | `wallet.grantNonce()` | +| Owner lane position | `wallet.getNonce(nonceKey)` | + +**`configId`** (the key URP reads take), per action: + +``` +actionId = keccak256(abi.encodePacked(address target, bytes4 selector)) +actionPolicyId = keccak256(abi.encodePacked(bytes32 rulesId, actionId)) +configId = keccak256(abi.encodePacked(address wallet, actionPolicyId)) +``` + +- Cross-chain rule: one action, `target = UniversalGatewayPC`, `selector = 0x77b86bec`, so the `configId` follows from + `rulesId` alone. +- Native rule: one `configId` per action; use each action's `(target, selector)` from the session the SDK built (or + decode the grant transaction's input). +- `getConfig` reverts `WrongModeForCall` / `WrongVmForCall` if called on the wrong kind; call `getMode` first when + unsure. An empty slot returns a zeroed struct. +- `spent` counts what was **sent out**. Money coming back to the wallet does not lower it. + +The contracts do not enforce one rule per agent per chain. A wallet can hold several rules for the same agent and +chain, so a lookup by `(agent, chain)` can return more than one. + +--- + +## 10. Events + +| Contract | Event | Notes | +|---|---|---| +| Factory | `WalletDeployed(address indexed owner, uint256 indexed index, address indexed wallet, string label)` | The label as passed at deploy (`""` = default) | +| Wallet | `AccountInitialized(address indexed owner, address indexed engine)` | Emitted once at deploy | +| Wallet | `LabelSet(string label)` | `setLabel`; `""` = reset to the default | +| Wallet | `RulesGranted(bytes32 indexed rulesId, uint8 mode, bytes32 indexed chainHash, string chainNamespace)` | `mode`: 0 cross-chain, 1 native | +| Wallet | `RulesRevoked(bytes32 indexed rulesId)` | Once per revoked id | +| Wallet | `OwnerExecuted(bytes32 indexed mode, bytes32 executionCalldataHash)` | `execute` | +| Wallet | `OwnerExecutedWithSig(bytes32 indexed mode, bytes32 executionCalldataHash, uint192 nonceKey, uint64 nonceSeq)` | `executeWithSig` | +| Wallet | `Checkpointed(uint64 indexed seq, uint8 kind, bytes32 ref, uint64 blockNumber)` | `kind`: 0 owner action (`ref` = `keccak256(abi.encode(target, value, callData))`), 1 rules granted, 2 rules revoked (`ref` = `rulesId`) | +| Wallet | `RulesActionAuthorized(bytes32 indexed rulesId, address indexed agent, bytes32 callsHash)` | An agent action passed (agent side) | +| URP | `OutboundMetered(bytes32 indexed id, address indexed multiplexer, address indexed account, address token, uint256 amount)` | A cross-chain spend was counted | +| URP | `NativeCallMetered(bytes32 indexed id, address indexed multiplexer, address indexed account, uint256 value, uint256 amount)` | A native call was counted | + +--- + +## 11. Errors the owner side can hit + +All are custom errors with arguments; decode with the contract ABIs. URP errors raised during a grant reach the caller +in full (they come through the wallet). + +| When | Errors | +|---|---| +| **Deploy** | `IndexMismatch(expected, provided)`, `IntentWalletMismatch`, `ExecutorMismatch`, `SignatureExpired`, `InvalidOwnerSignature`, `EnforcedPause`, `LabelTooLong(length)` | +| **Label** | `LabelTooLong(length)`, `CallerIsNotOwner` | +| **Grant: session shape** (wallet) | `MalformedSessionShape`, `TooManyActions(n)`, `DuplicateAction(target, selector)`, `ForbiddenActionTarget(target)`, `ForbiddenActionSelector(selector)`, `RulesTypeMismatch(mode, actionIndex, target)`, `EmptyChain`, `InconsistentChain(actionIndex)`, `CallerIsNotOwner` | +| **Grant: envelope** (URP) | `UnsupportedEnvelopeVersion(firstWord)`, `EmptyChain`, `UnsupportedNamespace(chainHash)` (chain is neither `eip155:` nor `solana:`; declared in `PushChainLib`) | +| **Grant: cross-chain terms** (URP) | `AssetListOutOfRange(length)`, `DuplicateAsset(token)`, `InvalidAsset(token)`, `ChainMismatch(declared, assetChain)`, `InvalidConfigField`, `AllowListOutOfRange(length)`, `InvalidExpiry(validUntil)` | +| **Grant: Solana terms** (URP) | `InvalidSvmConfigField`, `ProgramListOutOfRange`, `TooManySvmPins`, `TooManySvmDataPins`, `TooManyCeaAccounts`, `DiscriminatorLenOutOfRange`, `AmbiguousRule`, `ForbiddenProgramInAllowList`, `SvmPinRuleOutOfRange`, `SvmPinIndexOutOfRange`, `SvmMaxAccountsOutOfRange`, `DuplicateSvmPin`, `InvalidCeaAccount`, `CeaAccountsMissExpectedCEA`, `SvmDataPinInvalid`, `RuleWithoutPin` | +| **Grant: native terms** (URP) | `NativeTargetZero`, `NativeTargetIsGateway`, `TooManyPins`, `ValueOnlyWithPins`, `ValueOnlyWithAmountRule`, `InvalidExpiry` | +| **Revoke** | `UnknownPermission(rulesId)`, `CallerIsNotOwner` | +| **Update batch** | `AssetSpentMismatch(token, expected, actual)`, `SpentLengthMismatch(expected, actual)`, `SpentMismatch(expected, actual)` (native), `NotInitialized`, `WrongModeForCall` | +| **Owner door / signed doors** | `CallerIsNotOwner`, `UnsupportedExecutionMode`, `MalformedBatchCalldata`, `OwnerSigExpired`, `IntentWalletMismatch`, `ExecutorMismatch`, `InvalidOwnerSignature`, `IntentSessionMismatch`, `IntentGrantNonceMismatch`, `IntentExecMismatch`, `OwnerLaneRequired`, `InvalidNonce` | +| **Reads** | `WrongModeForCall(actual)`, `WrongVmForCall(actual)`, `NotAWallet(account)`, `IndexOutOfRange(index, next)` | + +A call made inside an owner action that reverts bubbles its own revert data up unchanged. + +--- + +## 12. Limits + +| Limit | Value | +|---|---| +| Tokens per cross-chain rule | 1 to 8 | +| Allowed calls per EVM rule | 1 to 32 | +| Actions per native rule | 1 to 8 | +| Argument pins per native action | 0 to 8 | +| Solana: programs / account pins / data pins / value-holding accounts | 1–32 / ≤16 / ≤8 / ≤16 | +| `validUntil` | non-zero, in the future; `type(uint48).max` = never | +| Unlimited total | `type(uint256).max` (0 means nothing) | +| Envelope version | 1 | +| Wallet label | 0 to 64 bytes (`""` = the default `AGW `) | + +## 13. Checklist before sending a grant + +- [ ] `sessionValidator` is the wallet's `SESSION_VALIDATOR()`; `sessionValidatorInitData = abi.encode(agent)`; agent ≠ owner. +- [ ] Every action has exactly one policy, URP, with a version-1 envelope. +- [ ] Cross-chain: one action, gateway + `0x77b86bec`; 1–8 PRC20 tokens, each on the rule's chain; a gas-token entry + at 0/0 if the user listed none; `maxTotal` is `type(uint256).max` when the user set no total. +- [ ] `expectedCEA` is the wallet's CEA on that chain; beneficiary offsets are `4 + 32 * argIndex`. +- [ ] Native: each `NativeTerms.target/selector` equals its action's. +- [ ] Solana: `ceaAccounts` includes the CEA and the CEA's account for every listed token. +- [ ] Record the `rulesId` from the receipt (or predict it from `grantNonce`) and keep the token order for `assertSpent`. diff --git a/plan/agw/research/deployment-review-2026-10-07-v5/source/docs/addresses/donut.md b/plan/agw/research/deployment-review-2026-10-07-v5/source/docs/addresses/donut.md new file mode 100644 index 00000000..7a77961e --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-07-v5/source/docs/addresses/donut.md @@ -0,0 +1,109 @@ +# Push Agentic Wallet — deployed addresses (Donut) + +**Generation `v5` (wallet label)** · Chain ID `42101` · explorer [donut.push.network](https://donut.push.network) · +new factory and wallet implementation deployed in blocks `23989983`–`23989987` · commit `2e61e13` (branch +`wallet-label`) · `script/DeployWalletAndFactory.s.sol` · `forge 1.5.1-stable` + +v5 deployed **three** contracts: the AGW wallet implementation, the AGWFactory logic and a new factory proxy. The +engine, URP (proxy, implementation, ProxyAdmin) and AgentValidator are **the v4 contracts, unchanged**: none of them +stores a factory or wallet-implementation address, and their state is keyed per wallet. + +## The two addresses you need + +| | Address | +| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | +| **Factory**: deploy and look up wallets | [`0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5`](https://donut.push.network/address/0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5) | +| **URP**: name this as every rule's action policy | [`0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af`](https://donut.push.network/address/0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af) | + +Both are **proxies**. Point integrations at these, never at an implementation. + +## Everything + +| Contract | Address | Size (B) | Verified | +| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------: | :------: | +| `factoryProxy` (ERC-1967, UUPS) — **new in v5** | [`0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5`](https://donut.push.network/address/0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5) | 141 | ✅ | +| `factoryLogic` (`AGWFactory`) — **new in v5** | [`0xe549d3D4e85cB16F687448D7acA21D9d13A7cD0f`](https://donut.push.network/address/0xe549d3D4e85cB16F687448D7acA21D9d13A7cD0f) | 10,013 | ✅ | +| `walletImplementation` (`AGW`) — **new in v5** | [`0x4D459Da499C14548aa16c46c57fD92880A88EBb4`](https://donut.push.network/address/0x4D459Da499C14548aa16c46c57fD92880A88EBb4) | 17,584 | ✅ | +| `urp` (Transparent proxy) | [`0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af`](https://donut.push.network/address/0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af) | 830 | ✅ | +| `urpImplementation` (`UniversalRulesPolicy` 3.1.0) | [`0xA2391eee4C9EA1B32AEB3A460B77296EA709F02F`](https://donut.push.network/address/0xA2391eee4C9EA1B32AEB3A460B77296EA709F02F) | 24,326 | ✅ | +| `urpProxyAdmin` (`ProxyAdmin`) | [`0x0b7a31ec85117892aEA90AA5cB6514e2F97c2295`](https://donut.push.network/address/0x0b7a31ec85117892aEA90AA5cB6514e2F97c2295) | 926 | ✅ | +| `sessionValidator` (`AgentValidator`) | [`0x068EE2388475A98EE1f5a434C58bFF3444fffFe6`](https://donut.push.network/address/0x068EE2388475A98EE1f5a434C58bFF3444fffFe6) | 806 | ✅ | +| `sessionEngine` (`SmartSession`, fork `7dc20e4`) | [`0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a`](https://donut.push.network/address/0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a) | 22,581 | ✅ | + +**All eight verified** on Blockscout. The five rows not marked new are the v4 contracts, reused as they are. Keep +`urpProxyAdmin`: without it URP can never be upgraded. + +Check the wiring yourself: `cast call 'walletImplementation()(address)'` returns the +`walletImplementation` above, and that implementation's `SESSION_ENGINE()`, `RULES_POLICY()` and `SESSION_VALIDATOR()` +return the engine, URP and validator in this table. + +### Push core contracts this deployment points at (not deployed by this repo) + +| | Address | +| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `UniversalGatewayPC` | `0x00000000000000000000000000000000000000C1` (implementation `0x1e41…a659`, 8-field outbound request, selector `0x77b86bec`) | +| `UniversalCore` | `0x00000000000000000000000000000000000000C0` | +| `UEAFactory` | `0x00000000000000000000000000000000000000eA` | +| `UNIVERSAL_EXECUTOR_MODULE` | `0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7` (the address core's UniversalCore and PRC20s use; an account with no code) | + +## What changed from v4 + +| | v4 | v5 | +| ------------------------ | ---------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| Factory proxy | `0xaF88…1aaF` | **`0x8137…Ccc5`** | +| Wallet implementation | `0x96D6…713c` | **`0x4D45…EBb4`** | +| Wallet label | emitted in `WalletDeployed`, not stored | **stored on the wallet**: `label()` (default `AGW `), owner-only `setLabel(string)`, `LabelSet` event, 64 bytes max | +| `OwnerIntent` signatures | domain `verifyingContract` = `0xaF88…1aaF` | domain `verifyingContract` = **`0x8137…Ccc5`**: intents must be signed for the new factory | +| URP, engine, validator | `0x603E…59af`, `0x165A…102a`, `0x068E…fFe6` | **the same** | +| Rule encoding | as below | **unchanged** | + +## How to grant a rule (what changed from v3.2 to v4, still current) + +| | v3.2 | v4 | +| --------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| Policy `initData` | `abi.encode(string chainNamespace, bytes body)` | **`abi.encode(uint16 version, string chainNamespace, bytes body)`**, `version = 1` | +| Tokens per cross-chain rule | exactly 1 (`asset`, `maxAmountPerCall`, `maxAmountTotal`) | **1 to 8** (`assets: AssetCap[]`), each with its own limits and spend counter | +| PC fee limit | `maxPCPerCall` | **`maxGasPerCall`** (same meaning: PC per outbound for protocol fee + gas) | +| Agent door | session signature through a validator | **`executeAsAgent(rulesId, mode, executionCalldata)`**, callable only by the rule's agent | +| Owner-side changes | not recorded | **checkpoint counter** (`checkpointCount()`, `Checkpointed` event) | + +Cross-chain body (EVM destination): + +```solidity +struct AssetCap { address token; uint256 maxPerCall; uint256 maxTotal; } // token = PRC20 on Push +struct UniversalTerms { + uint48 validUntil; address expectedCEA; AssetCap[] assets; uint256 maxGasPerCall; AllowedCall[] allowedCalls; +} +// ABI tuple: (uint48,address,(address,uint256,uint256)[],uint256,(address,bytes4,uint16,bool,uint256)[]) +``` + +``` +cast call 0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af 'pushChainHash()(bytes32)' --rpc-url +# -> 0x3d6bc1f1d3fb03065860265a8e93840b586e57075d956cd41b4319d040be87f9 == keccak256("eip155:42101") +``` + +Full design notes: `docs/1_AGW.md`, `docs/2_UniversalRulesPolicy.md`, `docs/multi-asset-review.md`. + +## Admin + +| Authority | Holder | How to change it | +| ----------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| Factory `DEFAULT_ADMIN_ROLE` (factory upgrades) | deployer EOA `0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7` | `beginDefaultAdminTransfer(new)`, then the new admin calls `acceptDefaultAdminTransfer()` after the **48-hour** delay | +| URP `ProxyAdmin` owner (URP upgrades) | deployer EOA `0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7` | `transferOwnership(new)` on `0x0b7a…2295`, immediate | +| Factory `PAUSER_ROLE` / `OPERATOR_ROLE` | **nobody yet** | the default admin must `grantRole` before the factory can be paused or unpaused | + +These are different powers, and for production they belong in different multisigs: the factory admin can strand +counterfactually funded addresses; the URP ProxyAdmin owner can rewrite every gate in the security boundary. + + +## Previous generations (retired) + +- **`v4`** (factory `0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF`, wallet implementation + `0x96D69ec7e6cDdaD414e656B5c9DCA24587DF713c`) is no longer current. Deploy new wallets only through the v5 factory. + v4 wallets keep working, because URP and the engine are shared, but they have no `label()` / `setLabel`. +- **`v3.2`** (factory `0x2578041963f692f8b51A137A1c7ddc0c84a8226A`, URP `0xeAd99E254ACD64219d057400cdC2A2390bC74372`) + stays on chain but is no longer current. Its wallets and rules do not carry over; owners withdraw through the owner + door. + +Only the current deployment's book is kept in the repo (`deployments/address-book-v5/`). Earlier generations' books are +in git history. diff --git a/plan/agw/research/deployment-review-2026-10-07-v5/source/src/AGW.sol b/plan/agw/research/deployment-review-2026-10-07-v5/source/src/AGW.sol new file mode 100644 index 00000000..f10108ef --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-07-v5/source/src/AGW.sol @@ -0,0 +1,1224 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { Clones } from "@openzeppelin/contracts/proxy/Clones.sol"; +import { ReentrancyGuardTransient } from "@openzeppelin/contracts/utils/ReentrancyGuardTransient.sol"; +import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; +import { IERC165 } from "forge-std/interfaces/IERC165.sol"; + +import { ISmartSession } from "smartsessions/ISmartSession.sol"; +import { Session, ActionData, PermissionId, ValidationData, SmartSessionMode } from "smartsessions/DataTypes.sol"; +import { PackedUserOperation } from "account-abstraction/interfaces/PackedUserOperation.sol"; +import { IModule as IERC7579Module } from "erc7579/interfaces/IERC7579Module.sol"; + +import { IAgentValidator } from "./interfaces/IAgentValidator.sol"; +import { IAGW } from "./interfaces/IAGW.sol"; +import { IAGWFactory } from "./interfaces/IAGWFactory.sol"; +import { ISmartSessionConfigReader } from "./interfaces/ISmartSessionConfigReader.sol"; +import { AGWErrors } from "./libraries/Errors.sol"; +import { AgentConfigLib } from "./libraries/AgentConfigLib.sol"; +import { PushChainLib } from "./libraries/PushChainLib.sol"; +import { OwnerAuthLib } from "./libraries/OwnerAuthLib.sol"; +import { + OwnerIntent, + OWNER_LANE_FLAG, + SEND_OUTBOUND_SELECTOR, + RulesType, + CheckpointKind, + MAX_LABEL_BYTES, + ENGINE_FALLBACK_TARGET, + ENGINE_FALLBACK_SELECTOR, + ENGINE_FALLBACK_SELECTOR_SMARTSESSION +} from "./libraries/Types.sol"; +import { + ModeCode, + CallType, + ExecType, + ModeLib, + CALLTYPE_SINGLE, + CALLTYPE_BATCH, + EXECTYPE_DEFAULT +} from "./libraries/ModeLib.sol"; +import { ExecutionLib, Execution } from "./libraries/ExecutionLib.sol"; + +/** + * @title AGW — Agentic Wallet + * @notice The user's per-purpose agent wallet on Push Chain. It holds the budgeted funds and is + * `msg.sender` at the gateway, which is what binds it to its destination-chain account. + * + * @dev - Push Chain has no ERC-4337 EntryPoint, so this wallet builds the operation and enforces + * the engine's verdict itself in `executeAsAgent`. + * - An ERC-7579 modular account restricted to validator modules; executor, fallback and + * hook modules are refused. A hook would run on the owner path and could block it. + * - `execute` is the owner door: no policy is ever consulted on it. + * - `executeAsAgent` is the agent door: callable only by the rules set's agent — a Push + * address (an EOA, or the UEA of an external key) — and every call is checked by the + * rules set's policy. + * - Deliberately near-stateless. A request exists only for the transaction that carries it. + */ +contract AGW is IAGW, ReentrancyGuardTransient { + using ModeLib for ModeCode; + + /// @dev ERC-7579 account id, in vendor.account.semver form. + string internal constant ACCOUNT_ID = "push.agw.1.0.0"; + + /// @dev The only ERC-7579 module type this account supports. + uint256 internal constant MODULE_TYPE_VALIDATOR = 1; + + /// @dev Gas stipend for a module's uninstall callback. + uint256 internal constant UNINSTALL_CALLBACK_GAS_STIPEND = 100_000; + + /// @dev Gas cap on the pre-uninstall state probe of the session engine. + uint256 internal constant ENGINE_STATE_PROBE_GAS = 30_000; + + /** + * @dev Maximum actions in one NATIVE rules set. `UNIVERSAL` is always exactly one. + * + * A SANITY BOUND, NOT A GAS BOUND — measured, a maximal 8x8 grant sits far inside the + * budget. It caps the O(n^2) duplicate scan below, the per-rules-set audit and UI surface a + * human has to reason about, and `revokeRules`'s engine-side cleanup cost. + * + * Lives HERE, not in `Types.sol`, because it is a wallet policy number that URP never + * reads — unlike the engine mirrors, which are shared. Do not confuse it with URP's + * `MAX_ACTIONS_PER_REQUEST` (10): that bounds multicall ENTRIES inside one universal + * payload, two layers down. Different layers, different numbers, never conflated. + */ + uint256 internal constant MAX_NATIVE_ACTIONS = 8; + + // The four wiring addresses, read through their UPPER_CASE() auto-getters. Resolved from the + // implementation's runtime bytecode, so every clone reads them correctly through delegatecall. + + /// @notice The permission engine this wallet installs as its default validator. + address public immutable SESSION_ENGINE; + + /// @notice The canonical action policy (URP) every rules set on this wallet must name. + address public immutable RULES_POLICY; + + /// @notice The canonical session validator every rules set on this wallet must name — the sender + /// validator that confirms the caller is the rules set's agent. + address public immutable SESSION_VALIDATOR; + + /// @notice The Push-side outbound gateway, the only target a universal agent action may reach. + address public immutable UNIVERSAL_GATEWAY_PC; + + /// @dev One-shot latch for initializeAccount. + bool private _initialized; + + /// @dev Monotonic salt source for permission ids; never reused. + uint64 private _grantNonce; + + /// @dev Owner-side checkpoints so far; also the `seq` of the latest `Checkpointed`. Packed in slot 0. + uint64 private _checkpointCount; + + /// @dev `block.number` of the latest checkpoint; zero before the first. Packed in slot 0. + uint64 private _lastCheckpointBlock; + + /// @dev The account's entire module registry. + mapping(address => bool) private _installedValidators; + + /// @dev Owner replay lanes for `executeWithSig`: lane key => next expected sequence number. + mapping(uint192 => uint64) private _nonces; + + /// @dev The owner's label for this wallet; empty means the default `AGW `. + string private _label; + + /** + * @notice Sets the wallet's permanent wiring and locks the implementation itself. + * + * @dev - Reverts with `InvalidModuleAddress` if any of the four addresses is zero. + * - Sets the initialised latch, so the implementation can never be initialised or + * driven directly; only clones of it can. + * + * @param sessionEngine_ Permission engine installed as the default validator. + * @param rulesPolicy_ Canonical action policy every rules set must name. + * @param sessionValidator_ Canonical session validator every rules set must name. + * @param universalGatewayPC_ Push-side outbound gateway. + */ + constructor(address sessionEngine_, address rulesPolicy_, address sessionValidator_, address universalGatewayPC_) { + if ( + sessionEngine_ == address(0) || rulesPolicy_ == address(0) || sessionValidator_ == address(0) + || universalGatewayPC_ == address(0) + ) { + revert AGWErrors.InvalidModuleAddress(); + } + SESSION_ENGINE = sessionEngine_; + RULES_POLICY = rulesPolicy_; + SESSION_VALIDATOR = sessionValidator_; + UNIVERSAL_GATEWAY_PC = universalGatewayPC_; + + _initialized = true; + } + + /// @dev Reverts unless the caller is the clone's immutable-args owner. + modifier onlyOwner() { + if (msg.sender != _owner()) revert AGWErrors.CallerIsNotOwner(); + _; + } + + /** + * @dev Reverts unless the caller is the owner or the wallet itself. Applied to the three + * lifecycle functions and `setLabel` only. + * + * - A batch entry targeting the wallet arrives with `msg.sender == address(this)`, so + * without this the owner's own one-signature change batch reverts against itself. + * - Widening to self is safe because self is reachable only through the owner door. From + * the agent door it is refused FOUR ways, in the order they fire: + * (a) at grant time, by `_requireGrantableTarget` — the wallet is never a grantable + * native action target; + * (b) at dispatch time, by the guard in `_gateAndDispatch` — which holds even for a + * session the owner enabled on the engine directly through the owner door, + * bypassing `grantRules` entirely; + * (c) by the engine's `NoPoliciesSet`, because (a) guarantees the wallet is never a + * configured action — true regardless of how many actions a rules set holds; + * (d) by the engine's `InvalidSelfCall`, for the `execute` selector specifically. + * (a) and (b) are never-delete tests. + * - Not applied to installModule or uninstallModule; nothing needs them batched. + */ + modifier onlyOwnerOrSelf() { + if (msg.sender != _owner() && msg.sender != address(this)) revert AGWErrors.CallerIsNotOwner(); + _; + } + + /** + * @dev Reads the owner out of the clone's immutable args. + * + * - Clone args are 40 bytes: owner at 0-19, factory at 20-39. + * - Read from bytecode on every call and never cached; a storage mirror of an immutable is + * drift surface. + * - Meaningful only on a clone. `Clones.fetchCloneArgs` is undefined on a non-clone, and on + * the implementation it returns a slice of that contract's own runtime bytecode. + * - No guard is added for the implementation case: every door on the implementation is + * already inert for an independent reason. + * + * @return The clone's owner. + */ + function _owner() internal view returns (address) { + return address(bytes20(Clones.fetchCloneArgs(address(this)))); + } + + /** + * @dev Reads the deploying factory out of the clone's immutable args. + * @return The factory recorded at clone creation. + */ + function _factory() internal view returns (address) { + bytes memory args = Clones.fetchCloneArgs(address(this)); + return address(bytes20(_slice20(args, 20))); + } + + /** + * @dev Reads 20 bytes at `start` out of a memory blob, without assuming a length. The + * short-blob branch is unreachable from the single call site and is expected to show as + * uncovered. + * + * @param data Blob to read from. + * @param start Byte offset to read at. + * @return out The 20 bytes at `start`, or zero if the blob is too short. + */ + function _slice20(bytes memory data, uint256 start) private pure returns (bytes20 out) { + if (data.length < start + 20) return bytes20(0); + assembly { + out := mload(add(add(data, 0x20), start)) + } + } + + /** + * @notice Factory-only, callable exactly once. Installs the session engine as the account's + * sole validator. + * + * @dev - Reverts with `CallerIsNotFactory` unless the caller is the clone's recorded factory. + * - Reverts with `AlreadyInitialized` if the latch is already set. + * - Sets the latch, marks the engine installed, then calls `onInstall("")` with full gas + * and bubbles any revert, so the factory's deploy transaction unwinds atomically. + * - Emits `ModuleInstalled`, then `AccountInitialized`. + * - Session data is never passed here; grants travel only through `grantRules`. + * - Stores `label_` when it is non-empty; an empty label costs no write and reads as the + * default. An over-long label reverts `LabelTooLong` and unwinds the whole deploy. + * + * @param label_ The deploy-time label; empty for the default `AGW `. + */ + function initializeAccount(string calldata label_) external { + if (msg.sender != _factory()) revert AGWErrors.CallerIsNotFactory(); + if (_initialized) revert AGWErrors.AlreadyInitialized(); + + _initialized = true; + if (bytes(label_).length != 0) _setLabel(label_); + _installedValidators[SESSION_ENGINE] = true; + + IERC7579Module(SESSION_ENGINE).onInstall(""); + + emit ModuleInstalled(MODULE_TYPE_VALIDATOR, SESSION_ENGINE); + emit AccountInitialized(_owner(), SESSION_ENGINE); + } + + /** + * @notice The owner door. Executes a single call or a batch on the owner's behalf; no policy is + * ever consulted. + * + * @dev - Reverts unless the caller is the owner; reentrancy-guarded. + * - Reverts on any execution type other than default, and on any call type other than + * single or batch. + * - Reads no module, policy or engine state — only the immutable-args owner, its calldata, + * and the wallet's own checkpoint slot — so the door still works with the engine + * uninstalled, with a hostile validator installed, or in ghost-rules state. + * - Records one checkpoint per call, before the call (`_checkpointOwnerCall`). The write + * cannot revert. + * - The signature is frozen at `execute(bytes32,bytes)`: the session engine branches on + * this exact selector, and any other shape routes validation down a path where the + * action policy sees a hardcoded zero value instead of the real one. + * - Batch is required product surface: the permission-change flow is one owner signature + * batching a spend assertion, a revoke and a grant. + * - Dispatches through `_execute` and emits `OwnerExecuted`. + * - There is no separate withdraw function; withdrawal, revocation escort and incident + * response all run through this door. + * + * @param mode ERC-7579 mode word; call type and execution type are decoded from it. + * @param executionCalldata Encoded execution, single or batch according to `mode`. + */ + function execute(bytes32 mode, bytes calldata executionCalldata) external payable onlyOwner nonReentrant { + ModeCode m = ModeCode.wrap(mode); + (CallType callType, ExecType execType,,) = m.decode(); + + if (execType != EXECTYPE_DEFAULT) revert AGWErrors.UnsupportedExecutionMode(); + if (callType == CALLTYPE_SINGLE) { + (address target, uint256 value, bytes calldata callData) = ExecutionLib.decodeSingle(executionCalldata); + _checkpointOwnerCall(target, value, callData); + _execute(target, value, callData); + } else if (callType == CALLTYPE_BATCH) { + Execution[] calldata execs = ExecutionLib.decodeBatch(executionCalldata); + uint256 len = execs.length; + for (uint256 i; i < len;) { + _checkpointOwnerCall(execs[i].target, execs[i].value, execs[i].callData); + _execute(execs[i].target, execs[i].value, execs[i].callData); + unchecked { + ++i; + } + } + } else { + revert AGWErrors.UnsupportedExecutionMode(); + } + + emit OwnerExecuted(mode, keccak256(executionCalldata)); + } + + /** + * @dev Plain call, bubbling the callee's revert data verbatim. Shared by both doors so the agent + * path executes the exact validated bytes. + * + * @param target Address to call. + * @param value Native PC to send with the call. + * @param callData Calldata to pass, forwarded unchanged. + */ + function _execute(address target, uint256 value, bytes calldata callData) internal { + (bool ok, bytes memory ret) = target.call{ value: value }(callData); + if (!ok) { + assembly { + revert(add(ret, 0x20), mload(ret)) + } + } + } + + /** + * @dev Records one owner-side change: advances the counter, stamps the block, emits `Checkpointed`. + * + * - CANNOT REVERT except by running out of gas: an unchecked increment of a uint64 that cannot + * realistically reach 2^64, one write to the wallet's own slot 0, one event. No external call. + * That is what lets it sit on the owner doors and on the revocation path. + * - NEVER called from `_execute` or anywhere the agent door reaches. A checkpoint means "the + * owner side touched this wallet"; an agent that could tick it could always fake owner + * interference. + * + * @param kind What changed. + * @param ref Per-kind reference (see `IAGW.Checkpointed`). + */ + function _checkpoint(CheckpointKind kind, bytes32 ref) private { + uint64 seq; + unchecked { + seq = _checkpointCount + 1; + } + // forge-lint: disable-next-line(unsafe-typecast) + uint64 blockNumber = uint64(block.number); // a block number does not exceed 2^64 in practice + _checkpointCount = seq; + _lastCheckpointBlock = blockNumber; + emit Checkpointed(seq, kind, ref, blockNumber); + } + + /** + * @dev The owner-door tick for one call, taken BEFORE the call runs, so a consumer snapshotting the + * counter during that call already sees it, and any later call in the same batch moves it again. + * + * @param target The call's target. + * @param value The call's native value. + * @param callData The call's calldata. + */ + function _checkpointOwnerCall(address target, uint256 value, bytes calldata callData) private { + _checkpoint(CheckpointKind.OWNER_ACTION, keccak256(abi.encode(target, value, callData))); + } + + /** + * @notice The owner door, authorised by a signed OwnerIntent instead of `msg.sender`. Relayable. + * + * @dev - A THIRD door, separate from `execute`. `execute` reads no module, policy or engine + * state — only the immutable-args owner, its calldata and its own checkpoint slot — and + * remains the unblockable fallback. This door reads storage (the nonce lane) and may + * therefore fail where `execute` cannot. + * - The mode switch below is DUPLICATED from `execute`, not shared with it, so that no + * refactor can ever add a check to `execute`. + * - Checks, in order: deadline · `intent.wallet == this` · owner · presenter is + * `intent.executor` · owner lane · `mode` and a non-zero `execCalldataHash` match · + * nonce (consumed before the signature check; any revert unwinds it) · the owner's + * signature under the FACTORY's domain. + * - Single or batch, default exec type. No dispatch guard: this is owner authority, so a + * batch may call the wallet's own lifecycle functions through `onlyOwnerOrSelf`. + * - Records one checkpoint per call, before the call, exactly as `execute` does. + * - Emits `OwnerExecutedWithSig`. + * + * @param mode ERC-7579 mode word; must equal `intent.mode`. + * @param executionCalldata Encoded execution; its hash must equal `intent.execCalldataHash`. + * @param intent The owner's intent; the grant fields are ignored here. + * @param sig The owner's signature over `intent`. + */ + function executeWithSig( + bytes32 mode, + bytes calldata executionCalldata, + OwnerIntent calldata intent, + bytes calldata sig + ) external nonReentrant { + address owner_ = _requireIntentPresenter(intent); + + uint192 nonceKey = intent.nonceKey; + if (nonceKey & OWNER_LANE_FLAG == 0) revert AGWErrors.OwnerLaneRequired(nonceKey); + + bytes32 calldataHash = keccak256(executionCalldata); + if (intent.execCalldataHash == bytes32(0) || intent.execCalldataHash != calldataHash || intent.mode != mode) { + revert AGWErrors.IntentExecMismatch(calldataHash); + } + + uint64 expected = _nonces[nonceKey]; + if (intent.nonceSeq != expected) revert AGWErrors.InvalidNonce(nonceKey, expected, intent.nonceSeq); + _nonces[nonceKey] = expected + 1; + + _requireOwnerSig(owner_, intent, sig); + + (CallType callType, ExecType execType,,) = ModeCode.wrap(mode).decode(); + if (execType != EXECTYPE_DEFAULT) revert AGWErrors.UnsupportedExecutionMode(); + if (callType == CALLTYPE_SINGLE) { + (address target, uint256 value, bytes calldata callData) = ExecutionLib.decodeSingle(executionCalldata); + _checkpointOwnerCall(target, value, callData); + _execute(target, value, callData); + } else if (callType == CALLTYPE_BATCH) { + Execution[] calldata execs = ExecutionLib.decodeBatch(executionCalldata); + uint256 len = execs.length; + for (uint256 i; i < len;) { + _checkpointOwnerCall(execs[i].target, execs[i].value, execs[i].callData); + _execute(execs[i].target, execs[i].value, execs[i].callData); + unchecked { + ++i; + } + } + } else { + revert AGWErrors.UnsupportedExecutionMode(); + } + + emit OwnerExecutedWithSig(mode, calldataHash, nonceKey, intent.nonceSeq); + } + + /** + * @dev The checks every intent door shares, in order: deadline, wallet, owner, presenter. + * Returns the owner so the caller does not re-read the immutable args. + */ + function _requireIntentPresenter(OwnerIntent calldata intent) internal view returns (address owner_) { + if (block.timestamp > intent.deadline) revert AGWErrors.OwnerSigExpired(intent.deadline); + if (intent.wallet != address(this)) { + revert AGWErrors.IntentWalletMismatch(address(this), intent.wallet); + } + owner_ = _owner(); + if (intent.owner != owner_) revert AGWErrors.CallerIsNotOwner(); + if (intent.executor == address(0) || msg.sender != intent.executor) { + revert AGWErrors.ExecutorMismatch(intent.executor, msg.sender); + } + } + + /// @dev The owner's signature over `intent`, under the factory's domain. Last check before effects. + function _requireOwnerSig(address owner_, OwnerIntent calldata intent, bytes calldata sig) internal view { + if (!OwnerAuthLib.isOwnerSig(owner_, OwnerAuthLib.intentDigest(_factory(), intent), sig)) { + revert AGWErrors.InvalidOwnerSignature(); + } + } + + /** + * @notice Sets the wallet's label. `""` resets it to the default `AGW `. + * + * @dev - Reverts unless the caller is the owner or the wallet itself, so a UEA owner can rename + * through `executeWithSig`. The agent door never reaches it: its dispatch guard refuses + * the wallet as a target. + * - Reverts `LabelTooLong` above `MAX_LABEL_BYTES` bytes. + * - Cosmetic metadata: writes NO checkpoint (a rename sent through `execute` still ticks + * once, for the owner-door call itself). Makes no external call. + * - Emits `LabelSet` with the label as passed. + * + * @param label_ The new label, or `""` for the default. + */ + function setLabel(string calldata label_) external onlyOwnerOrSelf { + _setLabel(label_); + emit LabelSet(label_); + } + + /// @dev The one place the label is written and its length checked; the deploy path and `setLabel` + /// both come through here, so the cap cannot diverge between them. + function _setLabel(string calldata label_) private { + uint256 length = bytes(label_).length; + if (length > MAX_LABEL_BYTES) revert AGWErrors.LabelTooLong(length); + _label = label_; + } + + /** + * @notice Grants one rules set to an agent. One of exactly two lifecycle operations. + * + * @dev - Reverts unless the caller is the owner or the wallet itself. + * - Rejects any session that is not the one shape this wallet permits, all with + * `MalformedSessionShape`: any user-op policy present, any ERC-7739 content or policy, + * the ERC-4337 paymaster permit set, an action count other than one, an action whose + * target is not the gateway or whose selector is not the outbound send, an action + * policy set that is not exactly the canonical policy, or a session validator that is + * not the canonical one. + * - Rejects an agent config the session validator does not accept — anything but + * `abi.encode(address agent)` with a non-zero agent. The canonical validator's check + * never reverts; the call is still wrapped in a bare catch rather than a typed one, so a + * future validator's revert or compiler panic is absorbed as a refusal. Wrapping is + * correct here only because the external call already exists; the action policy's own + * decode is deliberately not wrapped, since there it would introduce one. + * - Refusing the paymaster permit keeps dead surface dead: setting it would write a live + * permit row into engine storage, and that row decides whether a non-empty + * `paymasterAndData` is rejected outright or instead requires a user-op policy to run, + * which this shape forbids. + * - Overwrites the caller's salt with the wallet's monotonic grant counter, so identical + * terms granted twice yield distinct permission ids and a replaced id never recurs. + * That is what makes a request built for a revoked rules set die on regrant. + * - Enables the session on the engine and emits `RulesGranted`. + * - Records a checkpoint (`RULES_GRANTED`). + * - Validates the session's shape only. The caps, allow-list and expiry inside the policy + * config are the policy's own concern; do not extend this into term validation. + * - Carries no reentrancy guard: the guard would trip on the owner's own change batch, + * and the engine's enable path never calls back into the account. + * + * - TAKES NO MANDATE TYPE. The kind of a rules set is DERIVED, not declared: each action's + * URP policy envelope is `abi.encode(uint16 version, string chain, bytes body)`, and the chain decides + * the rulebook — this chain means a Push-side call (NATIVE), any other means a call + * through the gateway (UNIVERSAL). The owner states a chain once, where they were + * already stating the terms; nobody states a mode anywhere. Every action must name the + * same chain, which is what makes a mixed rules set unrepresentable rather than merely + * forbidden. + * - The envelope is NOT REWRITTEN. The wallet reads one field and passes the caller's + * bytes to the engine untouched, so what URP validates is exactly what the owner + * reviewed. + * + * @param session The session to enable. Its `salt` field is ignored and overwritten. + * @return rulesId The engine's id for the newly enabled rules set. + * + * `rulesId` is the engine's `permissionId`. + */ + function grantRules(Session calldata session) external onlyOwnerOrSelf returns (bytes32 rulesId) { + return _grantRules(session); + } + + /** + * @notice `grantRules`, authorised by the owner's signed OwnerIntent instead of `msg.sender`. + * + * @dev - Checks, in order: deadline · `intent.wallet == this` · `intent.owner` is this wallet's + * owner · presenter is `intent.executor` (non-zero) · `sessionHash` is non-zero and is the + * hash of `session` · `grantNonce` is the current `_grantNonce` · the owner's signature under + * the FACTORY's domain. Then the entire `grantRules` body, unchanged. + * - `_grantNonce` advances on every grant, so an intent grants at most once and dies on any + * other grant. No new storage. + * - `sessionHash` covers the session AS SUPPLIED, salt included; the salt is then overwritten + * with the grant nonce exactly as on the owner path. + * - Unreachable from the agent door: the wallet is never a grantable action target, and the + * dispatch guard refuses `address(this)` whatever the selector. + * - No reentrancy guard, for the same reason `grantRules` has none. + * + * @param session The session to enable. + * @param intent The owner's intent; the exec fields are ignored here. + * @param sig The owner's signature over `intent`. + * @return rulesId The engine's id for the newly enabled rules set. + * + * `rulesId` is the engine's `permissionId`. + */ + function grantRulesWithSig(Session calldata session, OwnerIntent calldata intent, bytes calldata sig) + external + returns (bytes32 rulesId) + { + address owner_ = _requireIntentPresenter(intent); + + bytes32 sessionHash = keccak256(abi.encode(session)); + if (intent.sessionHash == bytes32(0) || intent.sessionHash != sessionHash) { + revert AGWErrors.IntentSessionMismatch(sessionHash); + } + if (intent.grantNonce != _grantNonce) { + revert AGWErrors.IntentGrantNonceMismatch(_grantNonce, intent.grantNonce); + } + _requireOwnerSig(owner_, intent, sig); + + return _grantRules(session); + } + + /** + * @dev The entire body `grantRules` always had, moved here unchanged so both entry points run the + * same checks in the same order with the same errors. See `grantRules` for the rules. + */ + function _grantRules(Session calldata session) internal returns (bytes32 rulesId) { + // ─── rules COMMON to both types, first ─── + + if (session.userOpPolicies.length != 0) revert AGWErrors.MalformedSessionShape(); + + if ( + session.erc7739Policies.allowedERC7739Content.length != 0 + || session.erc7739Policies.erc1271Policies.length != 0 + ) revert AGWErrors.MalformedSessionShape(); + + if (session.permitERC4337Paymaster) revert AGWErrors.MalformedSessionShape(); + + uint256 n = session.actions.length; + + // BEFORE THE DECODE, AND FOR BOTH MODES. The mode is derived from action 0's envelope, so + // action 0 must exist before anything can be derived: with no actions there is no envelope, + // no chain, and therefore no mode to report. A universal session with zero actions + // consequently reports `TooManyActions(0)`, not `MalformedSessionShape`. + if (n == 0) revert AGWErrors.TooManyActions(0); + + // THE POLICY-SHAPE CHECK RUNS BEFORE THE DECODE, ALWAYS. Decoding first would read an + // arbitrary policy's `initData` as though it were URP's. This ordering is load-bearing. + _requirePolicyShape(session.actions[0]); + (string memory chain, bytes32 chainHash) = _chainNamespaceOf(session.actions[0]); + + // ─── THE ENTIRE MODE DECISION. Nobody declared it. ─── + RulesType mode = PushChainLib.deriveMode(chainHash); + + // THE INVARIANT, STATED ONCE: a wrong POLICY is always `MalformedSessionShape`; a target + // wrong FOR THE DERIVED TYPE is always `RulesTypeMismatch`. Between the two branches + // there is no shape in which a gateway call reaches a native config, and none in which a + // native call reaches a universal one — which, with URP's N3 and gate 3 at runtime, is the + // whole consistency argument. One chain per rules set makes mixed rules sets unrepresentable. + + if (mode == RulesType.UNIVERSAL) { + // `n != 1` BEFORE the target check, as before. A malformed chain string on a + // multi-action session therefore reports `MalformedSessionShape`, not a type mismatch. + if (n != 1) revert AGWErrors.MalformedSessionShape(); + + ActionData calldata a = session.actions[0]; + if (a.actionTarget != UNIVERSAL_GATEWAY_PC || a.actionTargetSelector != SEND_OUTBOUND_SELECTOR) { + revert AGWErrors.RulesTypeMismatch(mode, 0, a.actionTarget); + } + } else { + if (n > MAX_NATIVE_ACTIONS) revert AGWErrors.TooManyActions(n); + + // Hoisted: `_factory()` does an extcodecopy of the clone's own bytecode on every call. + address factoryAddr = _factory(); + + for (uint256 i; i < n;) { + ActionData calldata a = session.actions[i]; + + _requireGrantableTarget(a.actionTarget, factoryAddr, i); + _requireGrantableSelector(a.actionTargetSelector); + + // Action 0's shape and chain were read above; re-reading would waste ~900 gas. + // EVERY action must name the same chain — that is what makes "one rules set, one + // mode" true by construction rather than by a rule. + if (i != 0) { + _requirePolicyShape(a); + (, bytes32 h) = _chainNamespaceOf(a); + if (h != chainHash) revert AGWErrors.InconsistentChain(i); + } + + // O(n^2) by design: 28 comparisons at the n=8 ceiling, which beats a mapping and its + // clear-down. Two identical (target, selector) pairs would hash to one actionId. + for (uint256 j; j < i;) { + if ( + session.actions[j].actionTarget == a.actionTarget + && session.actions[j].actionTargetSelector == a.actionTargetSelector + ) { + revert AGWErrors.DuplicateAction(a.actionTarget, a.actionTargetSelector); + } + unchecked { + ++j; + } + } + + unchecked { + ++i; + } + } + } + + if (address(session.sessionValidator) != SESSION_VALIDATOR) { + revert AGWErrors.MalformedSessionShape(); + } + + try IAgentValidator(SESSION_VALIDATOR).validateConfig(session.sessionValidatorInitData) returns (bool ok) { + if (!ok) revert AGWErrors.MalformedSessionShape(); + } catch { + revert AGWErrors.MalformedSessionShape(); + } + + Session memory sessionMem = session; + sessionMem.salt = bytes32(uint256(_grantNonce)); + // Checked on purpose: a wrapping counter would mean silent salt reuse. + _grantNonce++; + + Session[] memory sessions = new Session[](1); + sessions[0] = sessionMem; + PermissionId[] memory ids = ISmartSession(SESSION_ENGINE).enableSessions(sessions); + + rulesId = PermissionId.unwrap(ids[0]); + _checkpoint(CheckpointKind.RULES_GRANTED, rulesId); + emit RulesGranted(rulesId, mode, chainHash, chain); + } + + /** + * @dev The policy-shape rule, hoisted so it can run before each envelope decode. + * + * A SHAPE rule, so it raises `MalformedSessionShape` like every other shape rule. It is + * also the precondition for `_chainNamespaceOf`: without it, the decode below would be reading an + * arbitrary policy's `initData` as though URP had authored it. + * + * @param a The action whose policy slot is vetted. + */ + function _requirePolicyShape(ActionData calldata a) internal view { + if (a.actionPolicies.length != 1 || a.actionPolicies[0].policy != RULES_POLICY) { + revert AGWErrors.MalformedSessionShape(); + } + } + + /** + * @dev Reads ONE field of the policy envelope — the bounded exception to "the skeleton, not the + * organs". + * + * WHAT THIS IS NOT: it is not term validation. The wallet does not check caps, expiry, + * allow-list contents or anything else inside the body, and must never start. It reads the + * label on the jar: the one field that decides WHICH RULEBOOK the action belongs to, which + * is the wallet's own business because the wallet's target rules depend on it. URP + * re-derives the same value from the same bytes and remains the sole judge of the terms. + * + * CALLER MUST HAVE RUN `_requirePolicyShape` FIRST. + * + * Same decoder as URP's, deliberately (`abi.decode(initData, (uint16, string, bytes))`): + * two different readers of one security-relevant field is the drift this design exists to + * prevent. A malformed envelope reverts here, unnamed, and fails closed. The version is + * URP's to judge: it refuses anything but `ENVELOPE_VERSION` at init, inside this grant. + * + * @param a The action to read. + * @return chain The declared CAIP-2 string, e.g. `"eip155:11155111"`. + * @return chainHash Its keccak256, the value everything downstream compares. + */ + function _chainNamespaceOf(ActionData calldata a) internal pure returns (string memory chain, bytes32 chainHash) { + (, chain,) = abi.decode(a.actionPolicies[0].initData, (uint16, string, bytes)); + if (bytes(chain).length == 0) revert AGWErrors.EmptyChain(); + chainHash = keccak256(bytes(chain)); + } + + /** + * @dev Every grant-time target rule for a NATIVE action, in one place. + * + * TWO RULES, TWO ERRORS, AND THE DISTINCTION IS THE POINT: + * + * - **The gateway → `RulesTypeMismatch`.** The session is well-formed; the CHAIN the + * envelope declares is this chain, and a gateway call is not a Push-side call. A gateway + * target is perfectly grantable — under a foreign chain, as `UNIVERSAL`. Carries the + * action index, because with up to eight actions "something was wrong" is not a usable + * diagnostic. This is one half of the consistency lock; URP's N3 is the runtime mirror. + * - **The other seven → `ForbiddenActionTarget`.** Never grantable, under any type. + * + * Of those seven the severe pair is the wallet and the engine: from the agent door, + * `_execute(wallet, 0, grantRules(...))` would arrive with `msg.sender == address(this)`, + * pass `onlyOwnerOrSelf`, and the agent would have granted itself a rules set of its own + * design. `revokeAllRules` is the mirror. + * + * LAYER CREDIT, so nobody deletes the wrong one as redundant: the engine independently + * refuses `address(0)` and ITSELF at enable time (`ConfigLib.sol:139-143`), but it does NOT + * refuse `address(1)` there — only at check time. **This is the only grant-time layer for + * the fallback flag.** + * + * The action-policy check is deliberately NOT here. That is a SHAPE rule — it raises + * `MalformedSessionShape`, and the UNIVERSAL branch and the common rules raise the same + * error for the same class of defect. It belongs with them, not inside a target helper. + * + * @param t Action target to vet. + * @param factoryAddr The clone's factory, hoisted by the caller so the loop reads it once. + * `_factory()` does an extcodecopy of the clone's own bytecode; the other + * six comparands are immutables and are free to read here. + * @param index Index of this action, reported by `RulesTypeMismatch`. + */ + function _requireGrantableTarget(address t, address factoryAddr, uint256 index) internal view { + if (t == UNIVERSAL_GATEWAY_PC) { + revert AGWErrors.RulesTypeMismatch(RulesType.NATIVE, index, t); + } + if ( + t == address(0) || t == ENGINE_FALLBACK_TARGET || t == address(this) || t == SESSION_ENGINE + || t == RULES_POLICY || t == SESSION_VALIDATOR || t == factoryAddr + ) { + revert AGWErrors.ForbiddenActionTarget(t); + } + } + + /** + * @dev The grant-time forbidden-selector list for NATIVE actions. + * + * Refuses the engine's two fallback selectors by name. `0xFFFFFFFF` (value-only) is + * PERMITTED and is deliberately not on this list. + * + * @param s Action selector to vet. + */ + function _requireGrantableSelector(bytes4 s) internal pure { + if (s == ENGINE_FALLBACK_SELECTOR || s == ENGINE_FALLBACK_SELECTOR_SMARTSESSION) { + revert AGWErrors.ForbiddenActionSelector(s); + } + } + + /** + * @notice Revoke one rules set. The other lifecycle operation, and the emergency lever. + * + * @dev - Reverts unless the caller is the owner or the wallet itself. + * - Reverts with `UnknownPermission` if the id is not enabled, because the upstream + * removal silently no-ops on a ghost id and an operator must never read "revoked" + * while the rules set lives. + * - Removes the session and emits `RulesRevoked`. Revocation is immediate: removal clears + * the agent, so any request under the id fails `CallerIsNotAgent`. + * - Deliberately carries no reentrancy guard and no health probe: nothing that can fail + * belongs on the stop path, since blockable removal is the one regression this + * function can develop. It records a checkpoint (`RULES_REVOKED`) per removed id; that + * write cannot revert. + * + * @param rulesId The rules set to revoke. + * + * `rulesId` is the engine's `permissionId`. + */ + function revokeRules(bytes32 rulesId) external onlyOwnerOrSelf { + if (!ISmartSession(SESSION_ENGINE).isPermissionEnabled(PermissionId.wrap(rulesId), address(this))) { + revert AGWErrors.UnknownPermission(rulesId); + } + + ISmartSession(SESSION_ENGINE).removeSession(PermissionId.wrap(rulesId)); + + _checkpoint(CheckpointKind.RULES_REVOKED, rulesId); + emit RulesRevoked(rulesId); + } + + /** + * @notice Revokes every rules set on this wallet in one call. The incident-response lever. + * + * @dev - Reverts unless the caller is the owner or the wallet itself. + * - Snapshots the permission ids, removes each by id, and emits `RulesRevoked` per id. + * Removal is by id, so engine-side array shifting cannot disturb the snapshot. + * - Deliberately carries no reentrancy guard and no health probe, for the same reason as + * `revokeRules`. It records a checkpoint (`RULES_REVOKED`) per removed id; that write + * cannot revert. + * - Gas grows with permission count; wallets hold few permissions by design. + */ + function revokeAllRules() external onlyOwnerOrSelf { + PermissionId[] memory ids = ISmartSession(SESSION_ENGINE).getPermissionIDs(address(this)); + + uint256 len = ids.length; + for (uint256 i; i < len;) { + ISmartSession(SESSION_ENGINE).removeSession(ids[i]); + _checkpoint(CheckpointKind.RULES_REVOKED, PermissionId.unwrap(ids[i])); + emit RulesRevoked(PermissionId.unwrap(ids[i])); + unchecked { + ++i; + } + } + } + + /** + * @notice The agent door. Callable only by the rules set's agent; every call is checked by the + * rules set's policy before it runs. + * + * @dev This chain has no EntryPoint, so this function does the EntryPoint's work, in order: + * 1. reject if the session engine is no longer installed + * 2. reject unless `msg.sender` is the agent `rulesId` names on this wallet + * 3. build the operation, validate it through the engine, and enforce the verdict + * 4. reject any mode other than single and default, and the two forbidden targets + * 5. dispatch the exact validated bytes + * 6. emit `RulesActionAuthorized` + * + * - The agent is a Push address. An external key (EVM, Solana, anything) acts through its + * UEA, which verifies that key before calling here; this wallet verifies no signature. + * - Replay protection is the sender's own transaction nonce (an EOA's nonce, or the UEA + * payload's nonce). Expiry is the rules set's own (policy gate 2 / N2 / S2); an EOA + * transaction carries no per-request expiry, a UEA payload carries its `deadline`. + * - A request against a revoked rules set fails at step 2: removal clears the agent. + * - Not payable, but a validated request does move PC out of the wallet's own balance, + * bounded by the policy's per-call ceiling. + * - Any revert unwinds the whole transaction, including the policy's counters; dispatch + * is never wrapped in try/catch. + * - Mode is single-only here: batching lives inside the multicall payload, bounded by the + * policy. + * + * @param rulesId The rules set this call acts under. `rulesId` is the engine's + * `permissionId`. + * @param mode ERC-7579 mode word; must decode to single and default. + * @param executionCalldata Encoded single execution, dispatched byte-for-byte once validated. + */ + function executeAsAgent(bytes32 rulesId, bytes32 mode, bytes calldata executionCalldata) external nonReentrant { + if (!_installedValidators[SESSION_ENGINE]) { + revert AGWErrors.ValidatorNotInstalled(SESSION_ENGINE); + } + + if (msg.sender != _agentOf(rulesId)) revert AGWErrors.CallerIsNotAgent(rulesId, msg.sender); + + bytes32 callsHash = keccak256(executionCalldata); + + _validate(rulesId, mode, executionCalldata, callsHash); + + _gateAndDispatch(mode, executionCalldata); + + emit RulesActionAuthorized(rulesId, msg.sender, callsHash); + } + + /** + * @dev Gates the mode to single and default, then dispatches the validated execution unchanged. + * + * - The agent path never batches at the ERC-7579 layer; batching lives inside the multicall + * payload instead, bounded by the policy. + * - Split out for stack depth only. Inlined, this does not compile with the optimizer off, + * which is the configuration `forge coverage` uses. + * + * @param mode ERC-7579 mode word. + * @param executionCalldata Encoded single execution to dispatch. + */ + function _gateAndDispatch(bytes32 mode, bytes calldata executionCalldata) internal { + (CallType callType, ExecType execType,,) = ModeCode.wrap(mode).decode(); + if (callType != CALLTYPE_SINGLE || execType != EXECTYPE_DEFAULT) { + revert AGWErrors.UnsupportedExecutionMode(); + } + (address target, uint256 value, bytes calldata callData) = ExecutionLib.decodeSingle(executionCalldata); + + // ⚠️ THE DISPATCH GUARD — never-delete, and it belongs HERE, after validation. + // + // Two comparisons, no storage, no module or policy state. It holds regardless of how the + // session was enabled — including a session the owner enabled on the engine DIRECTLY + // through the owner door, bypassing `grantRules` and its forbidden-target list entirely. + // That path exists today and is legitimate; this is what stops it reaching the wallet's own + // lifecycle functions from the agent side. + // + // DO NOT MOVE IT BEFORE `_validate`. Placed earlier it would pre-empt the engine's own + // refusals and change which error surfaces, and the engine-target case only ever reaches + // this point through the fallback sentinel, which validation has to run to resolve. + if (target == address(this) || target == SESSION_ENGINE) { + revert AGWErrors.ForbiddenDispatchTarget(target); + } + + _execute(target, value, callData); + } + + /** + * @dev Builds the operation, validates it through the engine, and enforces the verdict. + * + * - Builds a `PackedUserOperation` for its ABI shape only, since there is no EntryPoint. The + * engine requires `sender` to equal `msg.sender` (the wallet); that is what makes the + * signature field below unforgeable. + * - The callData selector must be `execute(bytes32,bytes)`, because that is the only engine + * branch that decodes the mode and forwards the real decoded value to the action policy. + * Every other selector reaches the policy with the account as target and a hardcoded zero + * value, which would make the policy's value gate compare against nothing. + * - The signature field is `USE ‖ rulesId ‖ msg.sender`, written here and nowhere else. The + * session validator accepts it only when those 20 bytes are the rules set's agent. + * - `callsHash` is passed as the operation hash. Nothing verifies a signature over it; it is + * what the engine forwards to the validator, which ignores it. + * - Gas fields are zero and `paymasterAndData` must stay empty, or the engine's paymaster + * permit check reverts. The nonce field is zero: replay protection is the sender's own. + * - Enforces the returned authorizer and time window itself — the EntryPoint's job, and what + * makes the policy's expiry gate real rather than decorative. + * - The engine runs the action policy before it consults the session validator, so policies + * still see calldata the engine has not yet authenticated; the wallet's own agent check + * has already run by then. + * - Performs exactly one external call, to the engine. Split out for stack depth. + * + * @param rulesId The rules set, written into the signature field. + * @param mode ERC-7579 mode word, re-encoded into the operation's calldata. + * @param executionCalldata Execution calldata, re-encoded into the operation's calldata. + * @param callsHash `keccak256(executionCalldata)`, passed as the operation hash. + */ + function _validate(bytes32 rulesId, bytes32 mode, bytes calldata executionCalldata, bytes32 callsHash) internal { + PackedUserOperation memory op; + op.sender = address(this); + op.nonce = 0; + op.initCode = ""; + op.callData = abi.encodeWithSelector(this.execute.selector, mode, executionCalldata); + op.accountGasLimits = bytes32(0); + op.preVerificationGas = 0; + op.gasFees = bytes32(0); + op.paymasterAndData = ""; + op.signature = abi.encodePacked(SmartSessionMode.USE, rulesId, msg.sender); + + uint256 vd = ValidationData.unwrap(ISmartSession(SESSION_ENGINE).validateUserOp(op, callsHash)); + + address authorizer = address(uint160(vd)); + uint48 validUntil = uint48(vd >> 160); // 0 = unbounded + uint48 validAfter = uint48(vd >> 208); + + if (authorizer != address(0)) revert AGWErrors.ValidationFailed(authorizer); + if (block.timestamp < validAfter) revert AGWErrors.OutsideTimeWindow(validAfter, validUntil); + if (validUntil != 0 && block.timestamp > validUntil) { + revert AGWErrors.OutsideTimeWindow(validAfter, validUntil); + } + } + + /** + * @dev The agent `rulesId` names on this wallet, or `address(0)` if it names none. + * Zero when the id is unknown or revoked (removal clears the config), when its session + * validator is not the canonical one, or when its config is malformed. One external view + * call to the engine; decodes through the same library the validator enforces with. + * @param rulesId The rules set to look up. + * @return The agent's Push address, or zero. + */ + function _agentOf(bytes32 rulesId) internal view returns (address) { + (address sessionValidator_, bytes memory config) = ISmartSessionConfigReader(SESSION_ENGINE) + .getSessionValidatorAndConfig(address(this), PermissionId.wrap(rulesId)); + if (sessionValidator_ != SESSION_VALIDATOR) return address(0); + return AgentConfigLib.decode(config); + } + + /** + * @notice Installs a validator module. + * + * @dev - Reverts unless the caller is the owner; reentrancy-guarded. + * - Rejects any module type but validator, the zero address, an address with no code, + * and a module that is already installed. + * - Marks the module installed, calls `onInstall` with full gas and bubbles any revert, + * then emits `ModuleInstalled`. + * - Exists as the recovery lever: a corrected validator can be installed on an existing + * wallet without moving addresses or funds. + * + * @param moduleTypeId ERC-7579 module type; only the validator type is accepted. + * @param module Module to install. + * @param initData Opaque data forwarded to the module's `onInstall`. + */ + function installModule(uint256 moduleTypeId, address module, bytes calldata initData) + external + onlyOwner + nonReentrant + { + if (moduleTypeId != MODULE_TYPE_VALIDATOR) { + revert AGWErrors.UnsupportedModuleType(moduleTypeId); + } + if (module == address(0) || module.code.length == 0) revert AGWErrors.InvalidModuleAddress(); + if (_installedValidators[module]) revert AGWErrors.ModuleAlreadyInstalled(module); + + _installedValidators[module] = true; + + IERC7579Module(module).onInstall(initData); + + emit ModuleInstalled(moduleTypeId, module); + } + + /** + * @notice Uninstalls a validator module. Removal always proceeds. + * + * @dev - Reverts unless the caller is the owner; reentrancy-guarded. + * - Rejects any module type but validator, and a module that is not installed. + * - If and only if the module is the session engine, probes its initialised state under + * a gas cap and refuses removal while it still holds permissions. Uninstalling the + * engine with live permissions would run its cleanup loop out of gas and leave rows it + * then refuses to reinstall over, so the guard forces a `revokeAllRules` first. + * - Unmarks the module before calling back, so a module can never block its own removal. + * - Calls `onUninstall` under a stipend inside try/catch, emitting + * `UninstallCallbackFailed` if it reverts or exhausts the stipend, then emits + * `ModuleUninstalled`. + * - The probe is scoped to the engine alone, so a hostile third-party validator can + * never block its own removal. + * - A probe that reverts or runs out of gas proceeds with removal: the guard exists to + * prevent an ordering mistake, not to make a broken engine permanent. + * + * @param moduleTypeId ERC-7579 module type; only the validator type is accepted. + * @param module Module to uninstall. + * @param deInitData Opaque data forwarded to the module's `onUninstall`. + */ + function uninstallModule(uint256 moduleTypeId, address module, bytes calldata deInitData) + external + onlyOwner + nonReentrant + { + if (moduleTypeId != MODULE_TYPE_VALIDATOR) { + revert AGWErrors.UnsupportedModuleType(moduleTypeId); + } + if (!_installedValidators[module]) revert AGWErrors.ValidatorNotInstalled(module); + + if (module == SESSION_ENGINE) { + (bool ok, bytes memory ret) = module.staticcall{ gas: ENGINE_STATE_PROBE_GAS }( + abi.encodeCall(ISmartSession.isInitialized, (address(this))) + ); + if (ok && ret.length >= 32 && abi.decode(ret, (bool))) { + revert AGWErrors.EngineStillHoldsPermissions(); + } + } + + _installedValidators[module] = false; + + try IERC7579Module(module).onUninstall{ gas: UNINSTALL_CALLBACK_GAS_STIPEND }(deInitData) { } + catch { + emit UninstallCallbackFailed(module); + } + + emit ModuleUninstalled(moduleTypeId, module); + } + + /** + * @notice Whether `module` is installed under `moduleTypeId`. + * @param moduleTypeId ERC-7579 module type to query. + * @param module Module to query. + * @return True only for an installed validator. + */ + function isModuleInstalled(uint256 moduleTypeId, address module, bytes calldata) external view returns (bool) { + return moduleTypeId == MODULE_TYPE_VALIDATOR && _installedValidators[module]; + } + + /** + * @notice Whether this account supports an ERC-7579 module type. + * @param moduleTypeId Module type to query. + * @return True only for the validator type. + */ + function supportsModule(uint256 moduleTypeId) external pure returns (bool) { + return moduleTypeId == MODULE_TYPE_VALIDATOR; + } + + /** + * @notice Whether this account supports an ERC-7579 execution mode. + * @dev Answers for the account as a whole; the agent door additionally restricts itself to + * single calls. + * @param mode ERC-7579 mode word to query. + * @return True for default execution in single or batch call type. + */ + function supportsExecutionMode(bytes32 mode) external pure returns (bool) { + (CallType callType, ExecType execType,,) = ModeCode.wrap(mode).decode(); + if (execType != EXECTYPE_DEFAULT) return false; + return callType == CALLTYPE_SINGLE || callType == CALLTYPE_BATCH; + } + + /// @notice The wallet's owner, read from the clone's immutable args. + function owner() external view returns (address) { + return _owner(); + } + + /// @notice The factory that deployed this wallet. + function factory() external view returns (address) { + return _factory(); + } + + /** + * @notice The wallet's label: the owner's, or `AGW ` when none is set. + * @dev The default is computed, never stored, from the factory's per-owner index — so an + * owner's wallets read `AGW 1`, `AGW 2`, … A view only: no door ever calls it. + * @return The label. + */ + function label() external view returns (string memory) { + if (bytes(_label).length != 0) return _label; + return string.concat("AGW ", Strings.toString(IAGWFactory(_factory()).indexOf(address(this)) + 1)); + } + + /** + * @notice Next expected sequence number in an owner lane (`OWNER_LANE_FLAG` set), consumed by + * `executeWithSig`. The agent door uses no nonce lanes. + * @param nonceKey Replay lane to query. + * @return The sequence number the next intent in that lane must carry. + */ + function getNonce(uint192 nonceKey) external view returns (uint64) { + return _nonces[nonceKey]; + } + + /// @notice The salt the next grant will use. + function grantNonce() external view returns (uint64) { + return _grantNonce; + } + + /** + * @notice The agent a rules set names on this wallet, or zero if it names none. + * @dev Zero for an unknown or revoked id, for a session the owner enabled on the engine + * directly with a non-canonical session validator, and for a malformed config. Such a + * rules set cannot be used through `executeAsAgent`. + * @param rulesId The rules set to look up. `rulesId` is the engine's `permissionId`. + * @return The agent's Push address, or zero. + */ + function agentOf(bytes32 rulesId) external view returns (address) { + return _agentOf(rulesId); + } + + /** + * @notice Owner-side checkpoints so far. Compare against a snapshot to learn whether the owner side + * touched this wallet since: any owner-door call, grant or revoke moves it; agent actions + * never do. + * @return The number of checkpoints recorded. + */ + function checkpointCount() external view returns (uint64) { + return _checkpointCount; + } + + /** + * @notice `block.number` of the latest checkpoint, or zero if none. A convenience only: consumers + * must compare COUNTS, because several checkpoints can share a block with their snapshot. + * @return The block number of the latest checkpoint. + */ + function lastCheckpointBlock() external view returns (uint64) { + return _lastCheckpointBlock; + } + + /// @notice The OwnerIntent domain separator this wallet verifies against, for a signer on + /// `signerChainId`. Identical to the factory's: the factory is the verifying contract. + function domainSeparator(uint256 signerChainId) external view returns (bytes32) { + return OwnerAuthLib.domainSeparator(_factory(), signerChainId); + } + + /// @notice The ERC-7579 account id, in vendor.account.semver form. + function accountId() external pure returns (string memory) { + return ACCOUNT_ID; + } + + /// @dev Accepts PC with no logic; the wallet pays outbound gas swaps from its own balance and + /// refunds land here. + receive() external payable { } + + /// @notice Accepts ERC-721 transfers, so destination-side refunds and NFTs can land. + function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) { + return this.onERC721Received.selector; + } + + /// @notice Accepts ERC-1155 transfers, so destination-side refunds and NFTs can land. + function onERC1155Received(address, address, uint256, uint256, bytes calldata) external pure returns (bytes4) { + return this.onERC1155Received.selector; + } + + /// @notice Accepts batched ERC-1155 transfers, so destination-side refunds and NFTs can land. + function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata) + external + pure + returns (bytes4) + { + return this.onERC1155BatchReceived.selector; + } + + /** + * @notice ERC-165 support check. + * + * @dev - Reports ERC-165 and the two token-receiver interfaces only. + * - Deliberately does not report `IERC7579Account`: this account implements that + * interface partially, so advertising it would mislead the tooling that probes for it. + * Tooling detects the account through `accountId`, `supportsModule` and + * `supportsExecutionMode` instead. + * + * @param interfaceId Interface id to query. + * @return True for the three supported interfaces. + */ + function supportsInterface(bytes4 interfaceId) external pure returns (bool) { + return interfaceId == type(IERC165).interfaceId // 0x01ffc9a7 + || interfaceId == 0x150b7a02 // IERC721Receiver + || interfaceId == 0x4e2312e0; // IERC1155Receiver + } + + /** + * @notice Always invalid: the wallet never signs as an ERC-1271 party. + * @dev A constant return, with no logic and no future hook. This is also what makes the + * engine's enable-mode grant path dead on these wallets. + * @return The ERC-1271 failure magic value. + */ + function isValidSignature(bytes32, bytes calldata) external pure returns (bytes4) { + return 0xffffffff; + } +} diff --git a/plan/agw/research/deployment-review-2026-10-07-v5/source/src/AGWFactory.sol b/plan/agw/research/deployment-review-2026-10-07-v5/source/src/AGWFactory.sol new file mode 100644 index 00000000..73308aa7 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-07-v5/source/src/AGWFactory.sol @@ -0,0 +1,355 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { AGWFactoryErrors } from "./libraries/Errors.sol"; + +import { Clones } from "@openzeppelin/contracts/proxy/Clones.sol"; + +import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import { + AccessControlDefaultAdminRulesUpgradeable +} from "@openzeppelin/contracts-upgradeable/access/extensions/AccessControlDefaultAdminRulesUpgradeable.sol"; +import { PausableUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; +import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; + +import { IAGWFactory } from "./interfaces/IAGWFactory.sol"; +import { IAGWInit } from "./interfaces/IAGWInit.sol"; +import { OwnerIntent } from "./libraries/Types.sol"; +import { OwnerAuthLib } from "./libraries/OwnerAuthLib.sol"; + +/** + * @title AGWFactory + * @notice Deploys `AGW` clones at addresses computable before deployment, and is the + * root of trust for wallet identity. + * + * @dev - Wallet addresses are deterministic and predictable before deployment, so counterfactual + * funding is a supported flow. + * - This registry is the only proof of a wallet's provenance: anyone can deploy a contract + * with a lying `owner()` view. The audit chain is destination account, wallet, this + * registry, owner. + * - The owner is the caller, or the signer of an `OwnerIntent` naming this owner, index and + * wallet, presented by the intent's `executor`. Deploying a wallet owned by someone else + * without that owner's signature is impossible. + * - Holds no funds, never touches a wallet after deployment, and has no setter for the + * wallet implementation. + * - Deployed behind an ERC-1967 UUPS proxy; the proxy address is the permanent, + * user-facing factory address and never changes across logic upgrades. + */ +contract AGWFactory is + Initializable, + AccessControlDefaultAdminRulesUpgradeable, + PausableUpgradeable, + UUPSUpgradeable, + IAGWFactory +{ + /// @dev Holder may pause wallet deployment. + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + /// @dev Holder may unpause wallet deployment. + bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); + + /** + * @dev Delay on the two-step admin transfer. + * + * - The admin's one real power is authorising a UUPS upgrade of this logic, which is the + * single action that can permanently strand counterfactually funded addresses. + * - The extension makes `grantRole` and `renounceRole` on the admin role revert, forcing + * the scheduled flow. + */ + uint48 internal constant DEFAULT_ADMIN_DELAY = 2 days; + + /// @dev All bases use ERC-7201 namespaced storage, so these three variables occupy slots 0, 1 + /// and 2. Order is frozen, and a layout test asserts it from `forge inspect` output. + + /// @dev owner => wallets deployed for them, doubling as the next index so a count and an index + /// can never drift apart. `uint96` matches `WalletRecord.index`, so no narrowing cast + /// exists anywhere in this contract. + mapping(address => uint96) internal _walletCount; + + /// @dev wallet => its record; a zero owner means not deployed by this factory. This is the + /// entire registry: existence, owner and index from one packed slot per wallet. + mapping(address => IAGWFactory.WalletRecord) internal _records; + + /** + * @notice The canonical AGW logic contract all clones delegate to. + * + * @dev - Written once, in `initialize`. There is no setter: a function able to rewrite this + * would silently move every predicted address and strand counterfactually funded + * wallets, with no migration path to recover them. + * - Declared last and appended to only. Every future variable goes after it, and nothing + * is inserted or reordered before it, or address derivation breaks with no remedy. + * - `internal`, exposed only through `walletImplementation()`, so no second + * auto-generated getter with a different selector exists. + */ + address internal _walletImplementation; + + // No storage gap: this is a leaf UUPS implementation, so a future version simply appends after + // _walletImplementation. + + /// @dev Locks the logic contract so it can never be initialised directly. + constructor() { + _disableInitializers(); + } + + /** + * @notice Configures the proxy. Callable once, at deployment. + * + * @dev - Reverts with `ZeroAddress` if either address is zero. + * - Sets the admin with the two-day transfer delay, initialises pausable, and records + * the wallet implementation. + * - Makes no external calls and deploys nothing. Pauser and operator membership are + * granted afterwards by the admin through the standard `grantRole`. + * + * @param admin Receives the default admin role. + * @param walletImplementation_ Logic contract every wallet clone will delegate to. + */ + function initialize(address admin, address walletImplementation_) external initializer { + if (admin == address(0) || walletImplementation_ == address(0)) revert AGWFactoryErrors.ZeroAddress(); + + __AccessControlDefaultAdminRules_init(DEFAULT_ADMIN_DELAY, admin); + __Pausable_init(); + // UUPSUpgradeable in OZ 5.7.0 has no initializer; calling one does not compile. + + _walletImplementation = walletImplementation_; + } + + /** + * @notice Deploys the caller's next agent wallet and initialises it. + * + * @dev - Reverts while paused, and with `ImplementationNotSet` if the wallet implementation + * is unset. The latter is reachable only on a proxy deployed without its atomic init + * call; without it, `Clones` would deploy a permanently uninitialisable clone. + * - Advances the caller's wallet count and writes the registry record before the single + * external call, which is what makes a reentrant deploy unable to reuse an index. + * There is deliberately no reentrancy guard; the effect ordering is the protection. + * - Salt is the owner and the factory-assigned sequential index only. Nothing + * rules-related enters the derivation. + * - The owner appears twice, in the salt and in the immutable args, on purpose; + * removing either changes every future address. + * - Calls `initializeAccount` on the new clone. Any revert bubbles and the whole + * deployment unwinds, so an uninitialised wallet can never exist on-chain. + * - Emits `WalletDeployed`. + * + * @param label Free-form label, emitted in the event and stored on the wallet (`AGW.label`). + * @return wallet Address of the newly deployed wallet. + */ + function deployWallet(string calldata label) external whenNotPaused returns (address wallet) { + address implementation = _walletImplementation; + if (implementation == address(0)) revert AGWFactoryErrors.ImplementationNotSet(); + + address owner = msg.sender; + wallet = _deploy(implementation, owner, _walletCount[owner], label); + } + + /** + * @notice Deploys wallet `intent.index` for `intent.owner`, on the owner's signature. + * + * @dev - The index is EXPLICIT and must equal the owner's current count, and `intent.wallet` must + * be the address this call deploys. So a signed intent is idempotent and unmovable: a + * replay fails on the index, and nobody can advance an owner's count without the owner's + * signature. + * - `msg.sender == intent.owner` needs no signature (the caller is the owner, exactly as in + * the single-argument form). Any other caller must be `intent.executor` (non-zero) and + * must carry the owner's signature, before the deadline. + * - Grant and exec fields of the intent are ignored here; the wallet checks those. + * - Every check runs before `_deploy`, which advances the count before its one external + * call — the same effect ordering the single-argument form relies on. + * + * @param intent The owner's intent. Only `owner`, `wallet`, `executor`, `index`, `deadline` and + * `signerChainId` are read here. + * @param sig The owner's signature over `intent`; ignored when the caller is the owner. + * @param label Free-form label, emitted, and stored on the wallet (`AGW.label`). Not signed. + * @return wallet The deployed wallet. + */ + function deployWalletWithSig(OwnerIntent calldata intent, bytes calldata sig, string calldata label) + external + whenNotPaused + returns (address wallet) + { + address implementation = _walletImplementation; + if (implementation == address(0)) revert AGWFactoryErrors.ImplementationNotSet(); + + address owner = intent.owner; + if (owner == address(0)) revert AGWFactoryErrors.ZeroAddress(); + + uint96 index = intent.index; + uint96 next = _walletCount[owner]; + if (index != next) revert AGWFactoryErrors.IndexMismatch(next, index); + + address predicted = _predict(implementation, owner, index); + if (intent.wallet != predicted) revert AGWFactoryErrors.IntentWalletMismatch(predicted, intent.wallet); + + if (msg.sender != owner) { + if (intent.executor == address(0) || msg.sender != intent.executor) { + revert AGWFactoryErrors.ExecutorMismatch(intent.executor, msg.sender); + } + if (block.timestamp > intent.deadline) revert AGWFactoryErrors.SignatureExpired(intent.deadline); + if (!OwnerAuthLib.isOwnerSig(owner, OwnerAuthLib.intentDigest(address(this), intent), sig)) { + revert AGWFactoryErrors.InvalidOwnerSignature(); + } + } + + wallet = _deploy(implementation, owner, index, label); + } + + /// @inheritdoc IAGWFactory + function domainSeparator(uint256 signerChainId) external view returns (bytes32) { + return OwnerAuthLib.domainSeparator(address(this), signerChainId); + } + + /** + * @dev The deployment tail shared by `deployWallet` and `deployWalletWithSig`. BYTE-FOR-BYTE the logic the + * single-argument form always had: count advance → salt → args → clone → record → + * initializeAccount → event. Every caller has run all of its checks before calling this. + * + * - The count advances and the record is written before the single external call, which is + * what makes a reentrant deploy unable to reuse an index. + * - Salt and args are frozen forever: counterfactual funding relies on them. + */ + function _deploy(address implementation, address owner, uint96 index, string calldata label) + internal + returns (address wallet) + { + _walletCount[owner] = index + 1; + + bytes32 salt = keccak256(abi.encode(owner, index)); + // 40 bytes: owner at 0-19, factory at 20-39. Frozen forever. + bytes memory args = abi.encodePacked(owner, address(this)); + + wallet = Clones.cloneDeterministicWithImmutableArgs(implementation, args, salt); + + _records[wallet] = WalletRecord({ owner: owner, index: index }); + + IAGWInit(wallet).initializeAccount(label); + + emit WalletDeployed(owner, index, wallet, label); + } + + /** + * @dev The address derivation, shared by `predictWallet` and `deployWalletWithSig`. + * Mirrors `_deploy`'s salt and args exactly; any divergence is a critical bug. + */ + function _predict(address implementation, address owner, uint96 index) internal view returns (address) { + bytes32 salt = keccak256(abi.encode(owner, index)); + bytes memory args = abi.encodePacked(owner, address(this)); + return Clones.predictDeterministicAddressWithImmutableArgs(implementation, args, salt, address(this)); + } + + /** + * @notice The address wallet `index` of `owner` has, or will have. + * + * @dev - Reverts with `ImplementationNotSet` if the implementation is unset, and with + * `IndexOutOfRange` if `index` is beyond the next deployable one. Funding an address + * further out than that would put money in a permanent hole. + * - Mirrors `deployWallet`'s salt and args derivation exactly. Any divergence between + * the two is a critical bug, because counterfactual funding relies on this answer. + * - `deployed` is derived from the sequential index rather than `extcodesize`, which + * would misreport during construction and cost more. + * + * @param owner Wallet owner to predict for. + * @param index Wallet index under that owner. + * @return wallet The deterministic address for that owner and index. + * @return deployed True if that wallet already exists. + */ + function predictWallet(address owner, uint256 index) external view returns (address wallet, bool deployed) { + address implementation = _walletImplementation; + if (implementation == address(0)) revert AGWFactoryErrors.ImplementationNotSet(); + + uint256 next = _walletCount[owner]; + if (index > next) revert AGWFactoryErrors.IndexOutOfRange(index, next); + + wallet = _predict(implementation, owner, uint96(index)); + deployed = index < next; + } + + /** + * @notice How many wallets `owner` has; also the index the next deploy will use. + * @dev Full enumeration is this call plus `predictWallet(owner, 0..count-1)`, which is why no + * per-owner wallet array is stored: it cannot be lost or desynced. + * @param owner Owner to count wallets for. + * @return The number of wallets deployed for that owner. + */ + function walletCount(address owner) external view returns (uint256) { + return _walletCount[owner]; + } + + /** + * @notice The owner of `wallet`, or address(0) if this factory did not deploy it. + * @param wallet Wallet to look up. + * @return The recorded owner, or the zero address. + */ + function ownerOf(address wallet) external view returns (address) { + return _records[wallet].owner; + } + + /** + * @notice True only for wallets this factory deployed. + * @param account Address to test. + * @return Whether this factory deployed it. + */ + function isWallet(address account) external view returns (bool) { + return _records[account].owner != address(0); + } + + /** + * @notice The wallet's index under its owner. + * @dev Reverts with `NotAWallet` rather than returning zero, because zero is a valid index. + * @param wallet Wallet to look up. + * @return Its index under its owner. + */ + function indexOf(address wallet) external view returns (uint256) { + WalletRecord memory record = _records[wallet]; + if (record.owner == address(0)) revert AGWFactoryErrors.NotAWallet(wallet); + return record.index; + } + + /** + * @notice The canonical wallet logic contract. + * @dev The only getter for it; the variable is `internal` precisely so no second, + * auto-generated getter exists. Exposed so the SDK can verify its local derivation + * mirror before showing a user an address to fund. + * @return The wallet implementation every clone delegates to. + */ + function walletImplementation() external view returns (address) { + return _walletImplementation; + } + + /** + * @notice Pauses wallet deployment. + * @dev - Gates `deployWallet` only. Views are never gated, and deployed wallets are + * unaffected, since the factory has no reach into them. + * - While paused, a user who funded a predicted address cannot deploy it. Availability + * only; funds are never lost. + */ + function pause() external onlyRole(PAUSER_ROLE) { + _pause(); + } + + /** + * @notice Resumes wallet deployment. + * @dev The role split is deliberate: pause is a cheap panic button, unpause a considered + * operational act. A pauser cannot unpause, and an operator cannot pause. + */ + function unpause() external onlyRole(OPERATOR_ROLE) { + _unpause(); + } + + /** + * @dev Authorises a UUPS upgrade of this logic contract. + * + * - Restricted to the default admin role; reverts with `ZeroAddress` on a zero + * implementation. + * - Every future logic upgrade must leave the salt formula, the immutable-args encoding, + * the value of `_walletImplementation` and the storage layout unchanged. Upgrades exist + * for logic bugs only; the address derivation is frozen forever. + * - New variables are appended after `_walletImplementation`; base contracts are never + * added, removed or reordered, and nothing may come to share that slot. + * - Not `view` although solc suggests it: the base declares `_authorizeUpgrade` non-view, + * and an override cannot add mutability restrictions the base does not have. + * + * @param newImplementation The logic contract being upgraded to. + */ + function _authorizeUpgrade(address newImplementation) internal override onlyRole(DEFAULT_ADMIN_ROLE) { + if (newImplementation == address(0)) revert AGWFactoryErrors.ZeroAddress(); + } +} diff --git a/plan/agw/research/deployment-review-2026-10-07-v5/source/src/interfaces/IAGW.sol b/plan/agw/research/deployment-review-2026-10-07-v5/source/src/interfaces/IAGW.sol new file mode 100644 index 00000000..cc532786 --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-07-v5/source/src/interfaces/IAGW.sol @@ -0,0 +1,213 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { Session } from "smartsessions/DataTypes.sol"; + +import { OwnerIntent, RulesType, CheckpointKind } from "../libraries/Types.sol"; + +/** + * @title IAGW — the Agentic Wallet's external surface. + * @notice The wallet's complete external surface. `AGW is IAGW`, so the compiler rejects any function + * declared here that the contract does not implement with the identical signature — this file + * cannot drift from the contract. Errors live in `AGWErrors` (`libraries/Errors.sol`); types in + * `libraries/Types.sol`. + * + * @dev `rulesId` is the engine's `permissionId`: `rulesId == permissionId` for every rules set this + * wallet grants. SmartSession's own vocabulary (`Session`, `PermissionId`) is kept at the engine + * boundary. + * + * @dev The events are a CONSUMED WIRE FORMAT. Changing a name, a parameter type, or which parameters + * are indexed changes the topic hash and silently breaks every deployed indexer and monitoring + * rule reading the old one. Add events freely; alter an existing one only as a deliberate, + * announced break. + */ +interface IAGW { + // ═══════════════════════════════ AGW_1: EVENTS ═══════════════════════════════ + + /// @notice The one-shot factory initialisation completed; the wallet is live. + event AccountInitialized(address indexed owner, address indexed engine); + + /// @notice The owner executed directly, with no policy consulted. + /// @dev The calldata is hashed rather than logged: an owner batch can be large, and the + /// hash is what an observer needs to tie the event to the transaction it came from. + event OwnerExecuted(bytes32 indexed mode, bytes32 executionCalldataHash); + + /// @notice The owner executed through `executeWithSig`, authorised by a signed OwnerIntent. + /// @dev A separate event from `OwnerExecuted` so an indexer can tell a relayed owner action + /// from one the owner submitted directly. The lane position ties it to the intent. + event OwnerExecutedWithSig(bytes32 indexed mode, bytes32 executionCalldataHash, uint192 nonceKey, uint64 nonceSeq); + + /// @notice A validator module was installed. + event ModuleInstalled(uint256 moduleTypeId, address module); + + /// @notice A validator module was uninstalled. + event ModuleUninstalled(uint256 moduleTypeId, address module); + + /// @notice A module's uninstall callback reverted or exhausted its gas stipend. + /// @dev THE MODULE WAS STILL REMOVED. This is the audit trail for a module that tried to + /// resist its own removal, not a failure of the uninstall. + event UninstallCallbackFailed(address module); + + /// @notice A rules set was granted. + /// @dev `mode` and `chainHash` are DERIVED from the policy envelope's chain namespace, not + /// declared by anyone — nobody in this system states a rules set's kind. The hash is + /// INDEXED so an indexer can filter rules by chain without decoding; the string is carried + /// as data because the wallet already holds it in memory after the action-0 decode + /// (~200 gas) and it makes every explorer record human-readable. + event RulesGranted(bytes32 indexed rulesId, RulesType mode, bytes32 indexed chainHash, string chainNamespace); + + /// @notice A rules set was revoked. + event RulesRevoked(bytes32 indexed rulesId); + + /// @notice An agent request passed validation and was dispatched. + /// @dev Rules-level attribution on the Push side, without touching the gateway's own frozen + /// event. `agent` is the sender (always equal to the rules set's agent). `callsHash` is + /// `keccak256(executionCalldata)` — what ties this record to the exact call executed. + /// A deliberate wire-format break from the earlier `(rulesId, nonceKey, nonceSeq, opHash)` + /// shape; it ships with the new deployment. + event RulesActionAuthorized(bytes32 indexed rulesId, address indexed agent, bytes32 callsHash); + + /// @notice The owner side of this wallet changed. The wallet's checkpoint counter is now `seq`. + /// @dev Emitted once per owner-door call (before the call runs), once per grant and once per + /// revoked id. Never emitted by the agent door. On-chain consumers compare + /// `checkpointCount()` against a snapshot; `kind` and `ref` are for indexers — `ref` is + /// `keccak256(abi.encode(target, value, callData))` for `OWNER_ACTION` and the `rulesId` + /// for `RULES_GRANTED` / `RULES_REVOKED`. + event Checkpointed(uint64 indexed seq, CheckpointKind kind, bytes32 ref, uint64 blockNumber); + + /// @notice The owner renamed the wallet. Fired by `setLabel` only, with the label as passed. + /// @dev `""` means the label was reset to the default `AGW `. The label chosen at + /// deployment is carried by the factory's `WalletDeployed`, not by this event. + event LabelSet(string label); + + // ═══════════════════════════════ AGW_2: OWNER DOOR ═══════════════════════════════ + + /// @notice The owner door: executes a single call or a batch on the owner's behalf. No policy is + /// ever consulted. Owner only. + function execute(bytes32 mode, bytes calldata executionCalldata) external payable; + + /// @notice The owner door, authorised by a signed OwnerIntent instead of `msg.sender`. Relayable by + /// `intent.executor` only. + function executeWithSig( + bytes32 mode, + bytes calldata executionCalldata, + OwnerIntent calldata intent, + bytes calldata sig + ) external; + + /// @notice Sets the wallet's label; `""` resets it to the default `AGW `. Owner or the + /// wallet itself. At most `MAX_LABEL_BYTES` bytes. Cosmetic: writes no checkpoint. + function setLabel(string calldata label) external; + + // ═══════════════════════════════ AGW_3: AGENT DOOR ═══════════════════════════════ + + /// @notice The agent door. Callable only by the agent `rulesId` names — a Push address (an EOA, or + /// the UEA of an external key); every call is checked by the rules set's policy. + function executeAsAgent(bytes32 rulesId, bytes32 mode, bytes calldata executionCalldata) external; + + /// @notice The agent a rules set names on this wallet, or zero if it names none (unknown or + /// revoked id, non-canonical session validator, malformed config). + function agentOf(bytes32 rulesId) external view returns (address); + + // ═══════════════════════════════ AGW_4: RULES LIFECYCLE ═══════════════════════════════ + + /// @notice Grants one rules set to an agent. Owner or the wallet itself. + /// @return rulesId The engine's `permissionId` for the new rules set. + function grantRules(Session calldata session) external returns (bytes32 rulesId); + + /// @notice `grantRules`, authorised by the owner's signed OwnerIntent. + /// @return rulesId The engine's `permissionId` for the new rules set. + function grantRulesWithSig(Session calldata session, OwnerIntent calldata intent, bytes calldata sig) + external + returns (bytes32 rulesId); + + /// @notice Revokes one rules set. Owner or the wallet itself. + function revokeRules(bytes32 rulesId) external; + + /// @notice Revokes every rules set on this wallet. Owner or the wallet itself. + function revokeAllRules() external; + + /// @notice Factory-only, once: stores the deploy-time label (if any) and installs the session + /// engine as the account's sole validator. + function initializeAccount(string calldata label) external; + + /// @notice Installs a validator module. Owner only. + function installModule(uint256 moduleTypeId, address module, bytes calldata initData) external; + + /// @notice Uninstalls a validator module. Owner only; removal always proceeds. + function uninstallModule(uint256 moduleTypeId, address module, bytes calldata deInitData) external; + + // ═══════════════════════════════ AGW_5: VIEWS ═══════════════════════════════ + + /// @notice Whether `module` is installed under `moduleTypeId`. + function isModuleInstalled(uint256 moduleTypeId, address module, bytes calldata) external view returns (bool); + + /// @notice Whether this account supports an ERC-7579 module type. True only for validators. + function supportsModule(uint256 moduleTypeId) external pure returns (bool); + + /// @notice Whether this account supports an ERC-7579 execution mode. + function supportsExecutionMode(bytes32 mode) external pure returns (bool); + + /// @notice The wallet's owner, read from the clone's immutable args. + function owner() external view returns (address); + + /// @notice The wallet's label: the owner's, or `AGW ` if none is set (the index is the + /// factory's per-owner index, so an owner's wallets read `AGW 1`, `AGW 2`, …). + function label() external view returns (string memory); + + /// @notice The factory that deployed this wallet. + function factory() external view returns (address); + + /// @notice Next expected sequence number in an owner lane (`OWNER_LANE_FLAG` set), consumed by + /// `executeWithSig`. + function getNonce(uint192 nonceKey) external view returns (uint64); + + /// @notice The salt the next grant will use. + function grantNonce() external view returns (uint64); + + /// @notice Owner-side checkpoints so far. Any owner-door call, grant or revoke moves it; agent + /// actions never do. + function checkpointCount() external view returns (uint64); + + /// @notice `block.number` of the latest checkpoint, or zero if none. Consumers compare counts, not + /// blocks: several checkpoints can share a block. + function lastCheckpointBlock() external view returns (uint64); + + /// @notice The OwnerIntent EIP-712 domain separator for a signer on `signerChainId`. Identical to + /// the factory's: the factory is the verifying contract. + function domainSeparator(uint256 signerChainId) external view returns (bytes32); + + /// @notice The ERC-7579 account id, in vendor.account.semver form. + function accountId() external pure returns (string memory); + + /// @notice The permission engine this wallet installs as its default validator. + function SESSION_ENGINE() external view returns (address); + + /// @notice The canonical action policy (URP) every rules set on this wallet must name. + function RULES_POLICY() external view returns (address); + + /// @notice The canonical session validator every rules set on this wallet must name — the sender + /// validator that confirms the caller is the rules set's agent. + function SESSION_VALIDATOR() external view returns (address); + + /// @notice The Push-side gateway this wallet's agents send through. + function UNIVERSAL_GATEWAY_PC() external view returns (address); + + /// @notice ERC-165 support check: ERC-165 and the two token-receiver interfaces only. + function supportsInterface(bytes4 interfaceId) external pure returns (bool); + + /// @notice Always the ERC-1271 failure value: the wallet never signs as an ERC-1271 party. + function isValidSignature(bytes32, bytes calldata) external pure returns (bytes4); + + /// @notice Accepts ERC-721 transfers. + function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4); + + /// @notice Accepts ERC-1155 transfers. + function onERC1155Received(address, address, uint256, uint256, bytes calldata) external pure returns (bytes4); + + /// @notice Accepts batched ERC-1155 transfers. + function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata) + external + pure + returns (bytes4); +} diff --git a/plan/agw/research/deployment-review-2026-10-07-v5/source/src/libraries/Errors.sol b/plan/agw/research/deployment-review-2026-10-07-v5/source/src/libraries/Errors.sol new file mode 100644 index 00000000..c572e53c --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-07-v5/source/src/libraries/Errors.sol @@ -0,0 +1,407 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { ConfigId } from "smartsessions/DataTypes.sol"; + +import { RulesType, VmFamily } from "./Types.sol"; + +/** + * @title Errors — every custom error in the AGW system, one library per contract. + * @notice `AGWErrors` (the wallet), `AGWFactoryErrors`, `UniversalRulesPolicyErrors` (URP) and + * `AgentValidatorErrors`. Moving an error into a library does not change its selector: a + * selector is `bytes4(keccak256(name ‖ argument types))`, independent of where the error + * is declared. + */ + +/// @title AGWErrors +/// @notice Custom errors of the AGW (wallet). +/// @dev Errors used by ExecutionLib live here too, so the libraries do not need an error home +/// of their own. +/// @dev THE ERRORS BELOW ARE NEVER TRUNCATED. They revert directly from the wallet, not through +/// the engine's 32-byte `PolicyCheckReverted` wrapper, so every argument survives intact. +/// URP's diagnostic-first argument ordering (which exists only because of that truncation) +/// deliberately does NOT apply here — do not reorder these for consistency with it. +library AGWErrors { + // ───────────────────── access control ───────────────────── + + error CallerIsNotOwner(); + error CallerIsNotFactory(); + + // ─────────────────── initialisation ─────────────────── + + error AlreadyInitialized(); + /// @dev Zero address, or a codeless target on install. Also raised by the wallet's constructor + /// when any of the four wiring addresses is zero. + error InvalidModuleAddress(); + + // ──────────────────────── label ──────────────────────── + + /// @dev `setLabel`, or a deploy with a label: the label is longer than `MAX_LABEL_BYTES` bytes. + error LabelTooLong(uint256 length); + + // ──────────────────── module manager ──────────────────── + + error ModuleAlreadyInstalled(address module); + error UnsupportedModuleType(uint256 moduleTypeId); + error ValidatorNotInstalled(address validator); + /// @dev The engine-scoped uninstall guard: uninstalling the permission engine while it still + /// holds live permissions would strand rows it then refuses to reinstall over. Revoke + /// everything first. + error EngineStillHoldsPermissions(); + + // ──────────────────── execution modes ──────────────────── + + /// @dev ONE error for every rejected mode — delegatecall, static, try-exec, and, on the agent + /// door specifically, batch. + error UnsupportedExecutionMode(); + + // ──────────────────── the agent door ──────────────────── + + /// @dev `executeAsAgent`: the caller is not the agent named by `rulesId` on this wallet — + /// including when the id is unknown, revoked, or names a session validator other than the + /// canonical one (all of which have no agent). Carries both values: this error is raised by + /// the wallet directly and is never truncated. + error CallerIsNotAgent(bytes32 rulesId, address caller); + /// @dev `executeWithSig`: the intent's sequence number is not the owner lane's next one. + error InvalidNonce(uint192 nonceKey, uint64 expected, uint64 provided); + error ValidationFailed(address authorizer); + error OutsideTimeWindow(uint48 validAfter, uint48 validUntil); + + // ──────────────────── rules set lifecycle ──────────────────── + + error UnknownPermission(bytes32 rulesId); + /// @dev Raised by grantRules's canonical-shape check — the granted session deviates from the + /// shape this system accepts for the DERIVED `RulesType`. Stays for the rules COMMON to + /// both types: user-op policies, ERC-7739, the paymaster permit, the session validator, and + /// the action-policy count. A target that is wrong FOR THE DERIVED TYPE is + /// `RulesTypeMismatch` instead — that distinction is the invariant, stated once. + error MalformedSessionShape(); + + // ──────────────────── native rules set shape (grantRules) ──────────────────── + + /// @dev Action count outside 1..MAX_NATIVE_ACTIONS. Zero is refused too: a rules set that + /// authorises nothing is a misconfiguration, not a valid ascetic grant. + /// + /// ZERO IS NOW CHECKED FOR BOTH MODES, BEFORE THE MODE IS KNOWN. The mode is derived from + /// action 0's envelope, so action 0 must exist before anything can be derived — with no + /// actions there is no envelope, no chain, and therefore no mode. A universal session with + /// zero actions consequently reports `TooManyActions(0)` rather than + /// `MalformedSessionShape`. + error TooManyActions(uint256 count); + + /// @dev The same (target, selector) pair twice in one rules set. Both would hash to one actionId, + /// so the second config would overwrite the first — or be refused — depending on engine + /// internals. Refused here instead, where the error can name the pair. + error DuplicateAction(address target, bytes4 selector); + + /// @dev A NATIVE action naming a target no rules set may ever reach: the zero address, the + /// engine's fallback flag, the wallet itself, the engine, URP, the validator, or the + /// factory. Self and engine are the severe ones — both would let an agent reach the + /// wallet's own lifecycle functions through `onlyOwnerOrSelf`. + error ForbiddenActionTarget(address target); + + /// @dev A NATIVE action naming one of the engine's fallback selectors. `0xFFFFFFFF` + /// (value-only) is permitted and is not one of these. + error ForbiddenActionSelector(bytes4 selector); + + /// @dev The type DERIVED from the envelope's chain does not match the action set: a gateway + /// target under the Push chain, or a non-gateway target under a foreign chain. Carries the + /// offending action's index and target, which is why it is distinct from + /// `MalformedSessionShape` — with up to eight actions, "something was wrong" is not a + /// usable diagnostic. + /// + /// IF YOU MEANT A NATIVE MANDATE AND SEE `UNIVERSAL` HERE, THE CHAIN STRING IS NOT + /// BYTE-EXACT `eip155:` OF THIS CHAIN. `"EIP155:42101"`, `"eip155:042101"` and a + /// leading space all hash to not-Push and therefore derive UNIVERSAL. That is deliberate: + /// the hash comparison is the whole rule, and a string parser would be a second rulebook + /// and a heuristic. The SDK prechecks this so a user sees the real cause. + /// + /// ORDER NOTE: under UNIVERSAL the `n != 1` shape rule runs BEFORE the target check, so a + /// malformed chain string on a multi-action session reports `MalformedSessionShape`. + error RulesTypeMismatch(RulesType derived, uint256 actionIndex, address target); + + /// @dev `grantRules`: action 0's policy envelope declares an empty chain string. The wallet + /// performs no other validation of it — a malformed non-empty string derives UNIVERSAL and + /// is then refused against the targets, or against the asset by URP at init. + error EmptyChain(); + + /// @dev `grantRules`: action `actionIndex` declares a different chain than action 0. A rules set + /// is one thing, on one chain, in one mode — which is what makes mixed rules sets impossible + /// by construction rather than by a rule. + error InconsistentChain(uint256 actionIndex); + + // ──────────────────── the agent door, dispatch ──────────────────── + + /// @dev The validated execution's target is the wallet itself or the engine. Fires in + /// `_gateAndDispatch`, AFTER validation — it is the last layer, and it holds even for a + /// session the owner enabled directly on the engine through the owner door, bypassing + /// `grantRules` entirely. Do not move this check before `_validate`. + error ForbiddenDispatchTarget(address target); + + // ─────────────────── the owner-intent doors ─────────────────── + // + // One shape per name, shared with AGWFactory and UniversalMarketplace, so a test encodes one + // selector whichever contract reverts first. + + /// @dev `intent.deadline` has passed. + error OwnerSigExpired(uint48 deadline); + /// @dev The signature is not the owner's over the intent. + error InvalidOwnerSignature(); + /// @dev `intent.wallet` is not this wallet. + error IntentWalletMismatch(address expected, address provided); + /// @dev Presented by someone other than `intent.executor`, or `intent.executor` is zero. + error ExecutorMismatch(address expected, address actual); + /// @dev `intent.sessionHash` is zero or is not the hash of the session being granted. + error IntentSessionMismatch(bytes32 actual); + /// @dev `intent.grantNonce` is not the wallet's current grant nonce. + error IntentGrantNonceMismatch(uint64 expected, uint64 provided); + /// @dev `intent.execCalldataHash` is zero or does not match, or `intent.mode` does not match. + error IntentExecMismatch(bytes32 actualCalldataHash); + /// @dev `executeWithSig` on a nonce key without `OWNER_LANE_FLAG`. + error OwnerLaneRequired(uint192 nonceKey); + + // ──────────────────── used by ExecutionLib ──────────────────── + + /// @dev ExecutionLib.decodeBatch — the only error any library in src/ actually references. + error MalformedBatchCalldata(); +} + +/// @title AGWFactoryErrors +/// @notice Custom errors of `AGWFactory`. +library AGWFactoryErrors { + /// @dev initialize: admin or implementation is zero. + error ZeroAddress(); + /// @dev deploy/predict called on an uninitialised factory. + error ImplementationNotSet(); + /// @dev indexOf on an address this factory did not deploy. + error NotAWallet(address account); + /// @dev predictWallet beyond the next deployable index. + error IndexOutOfRange(uint256 index, uint256 next); + /// @dev deployWalletWithSig: `intent.index` is not the owner's next index. + error IndexMismatch(uint96 expected, uint96 provided); + /// @dev deployWalletWithSig: `intent.wallet` is not the address this call would deploy. + error IntentWalletMismatch(address expected, address provided); + /// @dev deployWalletWithSig: signature path presented by someone other than `intent.executor`, + /// or `intent.executor` is zero. + error ExecutorMismatch(address expected, address actual); + /// @dev deployWalletWithSig: signature path after `intent.deadline`. + error SignatureExpired(uint48 deadline); + /// @dev deployWalletWithSig: the signature is not the owner's over the intent. + error InvalidOwnerSignature(); +} + +/// @title UniversalRulesPolicyErrors +/// @notice Custom errors of the Universal Rules Policy (URP). +/// @dev Revert data truncates to 32 bytes through the engine (`PolicyLib.sol:139-152`, +/// `_maxCopy: 32`, surfacing as `PolicyCheckReverted(bytes32)`). The 4-byte selector +/// survives; multi-argument custom errors do not round-trip to the caller. Errors below +/// still carry their arguments because URP is also called directly (owner path, executor +/// module, init) where they do survive. +library UniversalRulesPolicyErrors { + error ZeroAddress(); + error NotInitialized(ConfigId id, address account); + error AlreadyInitialized(ConfigId id); + /// @dev init: zero, or not in the future. + error InvalidExpiry(uint48 validUntil); + /// @dev init: zero expectedCEA. + error InvalidConfigField(); + /// @dev init, universal (EVM and SVM): the asset list is empty or longer than MAX_ASSETS. Empty is + /// refused because the token is what pins the destination chain: the gateway routes by it. + error AssetListOutOfRange(uint256 length); + /// @dev init, universal: the same token listed twice — the second entry's caps would be dead. + error DuplicateAsset(address token); + /// @dev init: 0 or > MAX_ALLOWED_CALLS. + error AllowListOutOfRange(uint256 length); + error RulesExpired(uint48 validUntil); + error InvalidTarget(address target); + /// @dev Gate 4a. Distinct from InvalidSelector: there is no selector to report, and a zero + /// sentinel would be indistinguishable from a genuine all-zero-selector payload. + error CalldataTooShort(uint256 length); + error InvalidSelector(bytes4 selector); + /// @dev Gate 4c — body below MIN_OUTBOUND_BODY_LEN. + error MalformedOutboundRequest(uint256 length); + /// @dev Gate 5: the request's token is not in the rules set's asset list. Checked on EVERY request, + /// zero amount included — the token decides the destination chain, so an unlisted token is a + /// chain the owner never approved. + error AssetNotAllowed(address token); + error AmountExceedsCap(uint256 amount, uint256 cap); + error TotalSpendCapExceeded(uint256 wouldBeTotal, uint256 cap); + error PCValueExceedsCap(uint256 value, uint256 cap); + error UncappedGasSwapRejected(); + error InvalidRevertRecipient(address expected, address actual); + error RecipientMustBeEmpty(); + error PayloadNotMulticall(); + error BatchSizeOutOfRange(uint256 count); + error ForbiddenInnerTarget(address target); + error CallNotAllowed(address target, bytes4 selector); + error BeneficiaryMismatch(address expected, address actual); + error InnerValueExceedsAllowance(uint256 index, uint256 value, uint256 maxValue); + error MalformedInnerCalldata(); + error SpentMismatch(uint256 expected, uint256 actual); + /// @dev Universal `assertSpent`: one token's counter differs from what the caller composed against. + error AssetSpentMismatch(address token, uint256 expected, uint256 actual); + /// @dev Universal `assertSpent`: the expected array does not have one entry per listed asset. + error SpentLengthMismatch(uint256 expected, uint256 actual); + error CallerIsNotUEModule(address caller); + error AlreadyCredited(bytes32 outboundTxId); + + // ───────────────────────── native mode errors ───────────────────────── + // + // DIAGNOSTIC VALUE FIRST. The engine truncates policy revert data to 32 bytes + // (`PolicyLib.sol:145`), so a caller sees the 4-byte selector plus only the first 28 bytes of + // the FIRST argument. Putting an index or a length first would surface 28 zero bytes and tell + // nobody anything; putting the offending value first surfaces the thing you debug with. + // This ordering applies to URP errors only — wallet errors are never truncated. + + // init + // + // NOT TRUNCATED. The 28-byte rule above applies to `checkAction`, which the engine wraps in + // `PolicyCheckReverted`. `initializeWithMultiplexer` is a plain high-level call from + // `ConfigLib.sol:98-101` inside `enableSessions`, so init reverts BUBBLE WITH FULL DATA. Tests + // assert these with a plain `vm.expectRevert(abi.encodeWithSelector(...))` carrying every + // argument — never `expectUrpGate`. + + /// @dev init: the envelope's `chain` string is empty. The only validation URP performs on the + /// string itself; a malformed non-empty string derives UNIVERSAL and is caught by the + /// asset check instead. + error EmptyChain(); + /// @dev init: the envelope's first word is not `ENVELOPE_VERSION`. Read before anything else is + /// decoded, so most malformed or pre-version blobs land here, named: a two-field + /// `(string, bytes)` envelope starts with its string offset and reports version 64. + error UnsupportedEnvelopeVersion(uint256 version); + + /// @dev init, universal: the asset reports a different source chain than the envelope declares. + /// `declared` first because it is the value the owner can act on. + error ChainMismatch(bytes32 declared, bytes32 assetChain); + + /// @dev init, universal: the asset has no code, is an EOA, or REVERTED when asked for + /// `SOURCE_CHAIN_NAMESPACE()`. + /// + /// AN ASSET THAT *ANSWERS* WITH A NON-STRING, OR WITH NOTHING, REVERTS UNNAMED INSTEAD — + /// the returndata fails ABI decoding in URP's own frame, which `catch` does not see. The + /// no-code and EOA cases are named only because an explicit `code.length` guard runs first; + /// since solc 0.8.10 the compiler omits the `extcodesize` check when return data is + /// expected, so `try/catch` alone would let both through as unnamed reverts. Measured. + error InvalidAsset(address asset); + /// @dev init: native config with a zero target. + error NativeTargetZero(); + /// @dev init AND gate N3. A native config may never name the gateway, and a native config may + /// never be reached by a gateway-targeted request. The mirror of universal gate 3. + error NativeTargetIsGateway(address target); + /// @dev init: a value-only config (`selector == 0xFFFFFFFF`) carrying pins. Refused rather than + /// left to fail closed at N7: such a config can NEVER authorise anything, so it is a + /// misconfiguration the owner believes they granted, not a valid ascetic config. + error ValueOnlyWithPins(); + /// @dev init: a value-only config carrying an amount rule. Same reasoning. + error ValueOnlyWithAmountRule(); + /// @dev init: pins.length > MAX_PINS. + error TooManyPins(uint256 count); + + // check + error TargetMismatch(address actual, address expected); + error SelectorMismatch(bytes4 actual, bytes4 expected); + /// @dev N5: a value-only action carrying 1..3 bytes of calldata. The engine buckets those under + /// `VALUE_SELECTOR` too; URP is where "value-only means empty calldata" becomes true. + error ValueOnlyCalldataNotEmpty(uint256 length); + error ValueExceedsCap(uint256 value, uint256 cap); + error TotalValueExceeded(uint256 newSpent, uint256 cap); + error CalldataTooShortForPin(uint256 actualLength, uint256 index, uint256 needed); + error ArgPinMismatch(bytes32 actual, uint256 index, bytes32 expected); + error CalldataTooShortForAmount(uint256 actualLength, uint256 needed); + error NativeAmountExceedsCap(uint256 amount, uint256 cap); + error TotalNativeAmountExceeded(uint256 newSpent, uint256 cap); + error CallLimitReached(uint32 callsUsed, uint32 maxCalls); + + // views / assertions + /// @dev A getter or assertion was called against the wrong rulebook — `getConfig` on a native + /// slot, or the five-argument `assertSpent` on a universal one. Carries the mode the config + /// ACTUALLY is. An EMPTY slot is not this error: it returns a zeroed struct exactly as + /// before, because an empty slot is a state while a wrong-mode read is a caller bug. + error WrongModeForCall(RulesType actual); + /// @dev A getter or assertion was called against the wrong VM family — `getConfig` on an SVM + /// slot, `getSvmConfig` on an EVM one. Carries the family the config ACTUALLY is. + error WrongVmForCall(VmFamily actual); + + // ───────────────────────── svm mode errors ───────────────────────── + + // init + /// @dev init: zero expectedCEA or gatewayProgram. + error InvalidSvmConfigField(); + /// @dev init: 0 or > MAX_ALLOWED_PROGRAMS. + error ProgramListOutOfRange(uint256 length); + error TooManySvmPins(uint256 count); + error TooManySvmDataPins(uint256 count); + error TooManyCeaAccounts(uint256 count); + /// @dev init: `discriminatorLen` is 0 without `dataless`, non-zero with it, or above 8. + error DiscriminatorLenOutOfRange(uint256 rule, uint8 len); + /// @dev init: two rules on one program that a single request could both match. First-match + /// must be EXACT, or the stricter rule is dead and its pins never run. + error AmbiguousRule(uint256 i, uint256 j); + /// @dev init: a program the rulebook forbids as a target can never be allow-listed either. + error ForbiddenProgramInAllowList(uint256 rule, bytes32 program); + error SvmPinRuleOutOfRange(uint256 pin, uint8 rule); + /// @dev init: account index at or beyond MAX_SVM_ACCOUNTS, or beyond the rule's `maxAccounts`. + error SvmPinIndexOutOfRange(uint256 pin, uint8 accountIndex); + /// @dev init: a rule's fixed account count exceeds the S13 bound, so no request could meet it. + error SvmMaxAccountsOutOfRange(uint256 rule, uint8 maxAccounts); + /// @dev init: two account pins name the same (rule, index). + error DuplicateSvmPin(uint256 first, uint256 second); + /// @dev init: a `ceaAccounts` entry is zero, repeated, or equal to an allow-listed program. + error InvalidCeaAccount(uint256 index); + /// @dev init: `ceaAccounts` does not contain `expectedCEA`, which would switch S18 off for the + /// one account that always holds value. + error CeaAccountsMissExpectedCEA(); + /// @dev init: a data pin with an impossible shape, or a vacuous / impossible comparison value + /// (a ceiling or floor outside the field's range, a zero ratio term, an EQ value with bytes + /// past `len`). See `SvmDataPin` and `URP._dataPinValueValid`. + error SvmDataPinInvalid(uint256 pin); + /// @dev init: every rule must own at least one account pin. HYGIENE, not a guarantee: one + /// authority pin always passes. Which positions must be pinned is the compiler's job. + error RuleWithoutPin(uint256 rule); + + // check + /// @dev S6b. Solana amounts are u64; the node would truncate. Defence in depth. + error AmountExceedsU64(uint256 amount); + /// @dev S11. The recipient must be a 32-byte, non-zero pubkey — the target program. + error RecipientNotPubkey(uint256 length); + /// @dev S12. Execute-only: an empty payload is a funds-only withdraw, never admitted (parity + /// with EVM gate 12). + error SvmPayloadEmpty(); + /// @dev S12. 1 = short header, 2 = short account list, 3 = short ix_data, 4 = trailing bytes. + /// The grammar is the node's `decodePayload`, byte for byte. + error MalformedSvmPayload(uint8 code); + /// @dev S13. Only instruction_id 2 (execute) is admitted. + error SvmInstructionNotExecute(uint8 instructionId); + error SvmAccountsOutOfRange(uint256 count); + error SvmIxDataTooLong(uint256 length); + /// @dev S14. The node signs the payload's target but finalises with the recipient; they must + /// agree or the TSS check fails on Solana at the owner's expense. + error RecipientTargetMismatch(bytes32 recipient, bytes32 target); + /// @dev S15. System, SPL Token, Token-2022, Stake, BPF Loader Upgradeable, Address Lookup Table, + /// the gateway program and the CEA itself. + error ForbiddenTargetProgram(bytes32 program); + /// @dev S16. No rule matches (program, discriminator). Carries the first 8 bytes of ix_data. + error ProgramNotAllowed(bytes32 program, bytes8 discriminator); + /// @dev S16. The rule fixes the account count and the request's differs. + error SvmAccountCountMismatch(uint256 count, uint8 expected); + /// @dev S17. A pinned index does not exist in the request. + error SvmAccountCountBelowPin(uint256 pin, uint256 count, uint8 needed); + error SvmAccountPinMismatch(uint256 pin, uint8 accountIndex, bytes32 expected, bytes32 actual); + /// @dev S17. ix_data is too short for the pin's field. + error SvmDataTooShortForPin(uint256 pin, uint256 ixLen); + error SvmDataPinMismatch(uint256 pin, bytes32 expected, bytes32 actual); + error SvmDataFloorNotMet(uint256 pin, uint256 actual, uint256 floor); + error SvmDataCeilingExceeded(uint256 pin, uint256 actual, uint256 ceiling); + error SvmDataRatioNotMet(uint256 pin, uint256 a, uint256 b, uint64 num, uint64 den); + /// @dev S18. A CEA-controlled account appears at a position the matched rule does not pin to it. + error CeaAccountAtUnpinnedIndex(uint256 accountIndex, bytes32 account); +} + +/// @title AgentValidatorErrors +/// @notice Custom errors of the session validator. +library AgentValidatorErrors { + /// @dev The stored config is not exactly `abi.encode(address agent)` with a non-zero agent. + /// Unreachable through the wallet's grant path, which runs `validateConfig` first; reachable + /// only for a session the owner enabled on the engine directly. + error MalformedConfig(); +} diff --git a/plan/agw/research/deployment-review-2026-10-07-v5/source/src/libraries/Types.sol b/plan/agw/research/deployment-review-2026-10-07-v5/source/src/libraries/Types.sol new file mode 100644 index 00000000..494a0dab --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-07-v5/source/src/libraries/Types.sol @@ -0,0 +1,550 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +/** + * @notice Mirror of push-chain-gateway .../libraries/TypesUGPC.sol + * @dev MUST match field-for-field and in order. Verified against + * contracts/evm-gateway/src/libraries/TypesUGPC.sol. + */ +struct UniversalOutboundTxRequest { + bytes recipient; // raw destination address on source chain (bytes for SVM compat) + address token; // PRC20 token address on Push Chain + uint256 amount; // amount to withdraw (burn on Push, unlock at origin) + uint256 gasLimit; // gas limit for fee quote; 0 = per-chain default + uint256 gasPrice; // gas price override; 0 = per-chain default + uint256 maxPCForGas; // max native PC for gas swap; 0 = no cap + bytes payload; // ABI-encoded calldata to execute on origin chain + address revertRecipient; // address to receive funds in case of revert +} + +/** + * @notice Mirror of push-chain-core .../libraries/Types.sol + * @dev Batch call entry for multicall execution. + */ +struct Multicall { + address to; + uint256 value; + bytes data; +} + +/// @dev bytes4(keccak256("UEA_MULTICALL")) — magic prefix for multicall payloads. +bytes4 constant MULTICALL_SELECTOR = bytes4(keccak256("UEA_MULTICALL")); + +/** + * @dev The two kinds of rules set. Declared by the owner at grant, asserted by the wallet, stored by + * URP as the config's mode. + * + * DECLARED ONCE, HERE, AND IMPORTED BY BOTH THE WALLET AND `IUniversalRulesPolicy`. Two enums with identical + * values that must always agree is the duplication this file exists to prevent — see the note + * on `SEND_OUTBOUND_SELECTOR` below. The wallet asserts the declared type against the action + * set at grant; URP stores it and branches on it at validation. They must be the same type. + * + * `UNIVERSAL` is the zero value, so an uninitialised slot reads as `UNIVERSAL`. That is why + * URP's `ModeSlot` carries an explicit `initialized` flag and never infers emptiness from the + * mode alone. + */ +enum RulesType { + UNIVERSAL, + NATIVE +} + +/** + * @dev Which destination VM a UNIVERSAL rules set targets. Derived by URP from the envelope's chain + * namespace prefix (`eip155:` / `solana:`) at config init; the wallet never reads it, because + * its grant rules are identical for every non-Push chain. + * + * `EVM` MUST STAY THE ZERO VALUE. URP's `ModeSlot` entries written before this enum existed + * read 0 in the byte that now holds it, and every one of them is an EVM rules set. + */ +enum VmFamily { + EVM, + SVM +} + +/** + * @dev Mirrors of engine constants that are not importable — `IdLib.VALUE_SELECTOR` is `internal` + * to a library, and the fallback flags are file-level constants in the vendored fork. + * + * MIRRORED, NOT GUESSED: each is pinned by a constant-mirror test against the upstream value, + * exactly as `MULTICALL_SELECTOR` is. If the fork moves, the test fails rather than the wallet + * silently permitting an action it means to forbid. + */ + +/// @dev `IdLib.VALUE_SELECTOR` — the action selector the engine assigns when calldata is under four +/// bytes. A native action carrying this selector is a value-only transfer with EMPTY calldata; +/// a no-argument function like `unstake()` still carries its own four bytes and is a normal +/// selector action. +bytes4 constant VALUE_SELECTOR = 0xFFFFFFFF; + +/// @dev `DataTypes.FALLBACK_TARGET_FLAG`. Refused by name at grant time: the engine does NOT reject +/// it at enable time (only at check time, `PolicyLib.sol:200`), so the wallet is the only +/// grant-time layer for this value. +address constant ENGINE_FALLBACK_TARGET = address(1); + +/// @dev `DataTypes.FALLBACK_TARGET_SELECTOR_FLAG` — the wildcard action's selector. +bytes4 constant ENGINE_FALLBACK_SELECTOR = 0x00000001; + +/// @dev `DataTypes.FALLBACK_TARGET_SELECTOR_FLAG_PERMITTED_TO_CALL_SMARTSESSION` — the sentinel that +/// routes a request to the engine itself. An agent reaching this could configure sessions. +bytes4 constant ENGINE_FALLBACK_SELECTOR_SMARTSESSION = 0x00000002; + +/** + * @dev The gateway's outbound entry point — the ONE selector an agent rules set may ever name. + * + * DECLARED HERE, BESIDE THE STRUCT IT TAKES, AND NOWHERE ELSE. The wallet's grant-shape check + * and the policy's request-decode gate must agree on this value exactly: the wallet refuses to + * grant a rules set naming any other selector, and the policy refuses to validate a request + * carrying any other selector. Two independently hand-typed copies of the same signature + * string is the kind of duplication that stays correct only until one of them is edited, and + * the failure would be silent in the safe direction for one contract and open in the other. + * + * The signature string spells out `UniversalOutboundTxRequest` field-for-field because that is + * how Solidity encodes a struct parameter into a selector. It is therefore load-bearing on the + * mirror above: reorder or retype a field there without editing this string and the selector + * silently stops matching the deployed gateway. + */ +bytes4 constant SEND_OUTBOUND_SELECTOR = + bytes4(keccak256("sendUniversalTxOutbound((bytes,address,uint256,uint256,uint256,uint256,bytes,address))")); + +/** + * @dev The owner's signed authorisation for up to three actions: deploy, grant, execute. + * + * SIGNED ONCE under the FACTORY's EIP-712 domain and verified by the factory and by every wallet + * it deploys. Each door checks only its own fields and advances its own nonce, so one signature + * serves each door exactly once. + * + * - Presentable ONLY by `executor`: every door, on its signature path, requires + * `intent.executor != address(0) && msg.sender == intent.executor`. Without that, anyone who saw + * the intent in calldata could drive the doors out of order and burn the owner's signature. + * - A zero `sessionHash` / `execCalldataHash` means "not authorised for that action". + * - EVERY FIELD IS IN THE TYPEHASH, IN DECLARATION ORDER. A field outside the typed data would + * guarantee the SDK and the contract disagree about what was signed. + * + * DECLARED HERE, beside the other values the factory and the wallet must agree on exactly. + */ +struct OwnerIntent { + address owner; // the wallet owner (UEA or EOA) + address wallet; // the wallet this intent is for — the predicted address if not yet deployed + address executor; // the ONLY msg.sender allowed to present this intent to a door + uint96 index; // wallet index under owner; deployWallet requires index == walletCount(owner) + bytes32 sessionHash; // keccak256(abi.encode(Session)) for grantRulesWithSig; 0 = no grant + bytes32 mode; // ERC-7579 mode word for executeWithSig + bytes32 execCalldataHash; // keccak256(executionCalldata) for executeWithSig; 0 = no exec + uint192 nonceKey; // owner lane for executeWithSig; must have OWNER_LANE_FLAG set + uint64 nonceSeq; // expected _nonces[nonceKey] at execution + uint64 grantNonce; // expected _grantNonce at grant + uint48 deadline; // unix seconds; all three doors reject after this + uint256 signerChainId; // EIP-712 domain.chainId the signer's wallet accepts — the owner's HOME chain +} + +/// @dev The struct string must list every OwnerIntent field, in declaration order, with its exact type. +bytes32 constant OWNER_INTENT_TYPEHASH = keccak256( + "OwnerIntent(address owner,address wallet,address executor,uint96 index,bytes32 sessionHash," + "bytes32 mode,bytes32 execCalldataHash,uint192 nonceKey,uint64 nonceSeq,uint64 grantNonce," + "uint48 deadline,uint256 signerChainId)" +); + +/** + * @dev The intent's EIP-712 domain. Five fields: + * - `chainId` is the SIGNER's home chain (`intent.signerChainId`), not Push: MetaMask refuses to + * sign typed data whose `domain.chainId` differs from the active chain. + * - `salt` is `bytes32(block.chainid)` — the Push chain id — which is what isolates one Push chain + * from another. + * - `verifyingContract` is the FACTORY PROXY for both the factory and every wallet; the wallet + * reads it from its immutable args. The `wallet` field stops cross-wallet replay. + */ +bytes32 constant OWNER_INTENT_DOMAIN_TYPEHASH = + keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)"); +bytes32 constant OWNER_INTENT_DOMAIN_NAME_HASH = keccak256("AGWFactory"); +bytes32 constant OWNER_INTENT_DOMAIN_VERSION_HASH = keccak256("1"); + +/** + * @dev Top bit of a uint192 nonce key. `executeWithSig` requires it SET: only owner lanes are ever + * consumed, and keys with it CLEAR are never touched. The agent door uses no nonce lanes at all — + * its replay protection is the sender's own transaction nonce. + */ +uint192 constant OWNER_LANE_FLAG = uint192(1) << 191; + +/** + * @dev The kinds of owner-side change the wallet records as a checkpoint (`IAGW.Checkpointed`). + * + * ORDINALS ARE A FROZEN WIRE FORMAT: indexers and evaluators read them. Append only — never + * reorder, never remove. A future kind (e.g. a binder) is appended as the next ordinal. + */ +enum CheckpointKind { + OWNER_ACTION, + RULES_GRANTED, + RULES_REVOKED +} + +// ─────────────────────── policy types (moved from IURP) ─────────────────────── + +/** + * @dev Maximum pinned arguments per native action. Bounds the N7 loop. + * + * FILE-LEVEL, NOT INSIDE THE INTERFACE — Solidity forbids variables in interfaces (solc 8274), + * and unlike `MAX_ACTIONS_PER_REQUEST` / `MAX_ALLOWED_CALLS` (which are `internal` to URP + * because they bound loops nobody off-chain constructs) this one bounds an array THE SDK + * BUILDS, so an encoder has to be able to see it. Parallel to `MULTICALL_SELECTOR` in + * `Types.sol`. + */ +uint256 constant MAX_PINS = 8; + +/** + * @dev Maximum tokens one UNIVERSAL rules set may list (EVM and SVM alike). Bounds the init duplicate + * check and the gate-5 scan. + * + * FILE-LEVEL FOR THE SAME REASON AS `MAX_PINS`: it bounds an array THE SDK BUILDS. + */ +uint256 constant MAX_ASSETS = 8; + +/** + * @dev Longest wallet label, in BYTES (not characters). `AGW.setLabel` and the deploy path refuse a + * longer one, so every `label()` read is bounded. FILE-LEVEL so the SDK can see it. + */ +uint256 constant MAX_LABEL_BYTES = 64; + +/** + * @dev The rules-envelope version URP accepts. Every action policy's `initData` is + * `abi.encode(uint16 version, string chainNamespace, bytes body)`, the same shape in every mode. + * URP reads the version from the FIRST WORD before decoding anything else and refuses any other + * value, so a body layout can change later under a new version without being misread. + * FILE-LEVEL so the SDK, which writes the envelope, can read it. + */ +uint16 constant ENVELOPE_VERSION = 1; + +/** + * @notice WIRE TYPE — one token a UNIVERSAL rules set may move, with its own caps. + * @param token The PRC20 ON PUSH (e.g. USDC.eth), never the destination chain's address: the + * gateway request carries the PRC20 and routes by it. Its `SOURCE_CHAIN_NAMESPACE()` + * must equal the rules set's chain, checked at init for every entry. + * @param maxPerCall Per-request ceiling, PRC20 base units. ZERO IS LEGAL and means "this token may + * route a request but never moves": the move-nothing rules set is one entry with a + * zero `maxPerCall`, never an empty list (an empty list would pin no chain). + * @param maxTotal Lifetime ceiling on the amount SENT OUT in this token. `type(uint256).max` = + * unlimited, with no special branch; zero means nothing may move. + */ +struct AssetCap { + address token; + uint256 maxPerCall; + uint256 maxTotal; +} + +/** + * @notice STORAGE TYPE — an `AssetCap` plus the counter URP owns. Never a wire type: a caller-set + * counter would be a granted head start on the cap. + * @param spent Lifetime amount sent out in this token, recorded before dispatch. Money coming back + * to the wallet never lowers it (URP cannot see inflows, and could not tell an agent's + * return from the owner's top-up); only `creditRevert` does. + */ +struct AssetCapState { + address token; + uint256 maxPerCall; + uint256 maxTotal; + uint256 spent; +} + +/// @param target far-chain contract +/// @param selector far-chain function +/// @param beneficiaryOffset byte offset of the beneficiary word in the inner calldata +/// @param hasBeneficiary false for calls with no beneficiary argument +/// @param maxValue per-entry native ceiling, DESTINATION-chain units (0 = non-payable) +struct AllowedCall { + address target; + bytes4 selector; + uint16 beneficiaryOffset; + bool hasBeneficiary; + uint256 maxValue; +} + +/** + * @notice WIRE TYPE — what a UNIVERSAL envelope's body encodes. Not a storage type. + * + * @dev ABSENT BY DESIGN, and each absence is the point: `initialized` (URP sets it), `spent` + * (URP owns it), and the chain (the envelope carries it, exactly once). The SDK used to + * type all three and URP overwrote them — a field whose only legal value is a + * placeholder is a field the caller fills in believing it matters. + * + * Mapped field-by-field onto the storage `Config` by `_store`. The storage struct's + * layout never moves; this one is free to change with the wire format. + */ +struct UniversalTerms { + uint48 validUntil; + address expectedCEA; + AssetCap[] assets; + uint256 maxGasPerCall; + AllowedCall[] allowedCalls; +} + +/// @param initialized set once, at initialisation; re-initialisation is refused +/// @param validUntil non-zero always (enforced at init); "never" = type(uint48).max, explicit +/// @param expectedCEA the wallet's destination account, committed at grant. The rules set's +/// chain is not stored here: it lives on `getMode(id, account).chainHash` +/// @param maxGasPerCall Push-native per-call ceiling on `msg.value`, in PC wei. It pays the protocol +/// fee AND the gas swap, despite the name (renamed from `maxPCPerCall` to +/// match the SDK) +/// @param assets 1..MAX_ASSETS permitted PRC20s, each with its own caps and its own `spent` +struct Config { + bool initialized; + uint48 validUntil; + address expectedCEA; + uint256 maxGasPerCall; + AssetCapState[] assets; + AllowedCall[] allowedCalls; +} + +// ───────────────────────── native mode structs ───────────────────────── + +/** + * @dev Per-config mode record. THE MODE DISCRIMINATOR, and the reason it is a struct rather than + * a bare enum: `RulesType.UNIVERSAL` is the zero value, so an empty storage slot reads as + * `UNIVERSAL` and could not be told apart from a real universal rules set. `initialized` is + * authoritative; `mode` is MEANINGLESS when it is false. + * @param initialized true once any rulebook has been written for this config + * @param mode which rulebook; only meaningful when `initialized` + * @param vm which destination VM a UNIVERSAL config targets; meaningless for NATIVE + */ +struct ModeSlot { + bool initialized; + RulesType mode; + /// @dev ADDED for the SVM rulebook, PLACED HERE ON PURPOSE. Declared between `mode` and + /// `chainHash` it packs into slot 0 at byte 2 — a byte no earlier implementation ever + /// wrote, so every existing entry reads 0 = `EVM`, which is what every existing entry + /// is. No existing member moves: `chainHash` stays at slot 1. Appending it after + /// `chainHash` would be equally safe and cost one more slot per grant; the layout test + /// pins label, slot, offset and type of all four members either way. + VmFamily vm; + /// @dev keccak256(bytes(chain)) as declared in the policy envelope. THE single chain record + /// for BOTH modes — universal stores the destination chain, native stores this chain's + /// own hash. Written at init, never zero on an initialised entry. + bytes32 chainHash; +} + +/** + * @dev One pinned argument of a native call. + * @param offset ABSOLUTE byte offset from byte 0 of the calldata, SELECTOR INCLUDED — so 4 is + * the first argument word, 36 the second, and so on. + * @param expected The full 32-byte word that must appear there. An address argument is + * left-padded by the ABI, so a non-zero high half is a MISMATCH, deliberately: + * full-word equality also proves the padding is clean, which masking would + * silently accept. + */ +struct ArgPin { + uint16 offset; + bytes32 expected; +} + +/** + * @dev Optional metering of a `uint256` argument read out of native calldata. + * @param enabled Whether to meter at all. A BOOL rather than "offset 0 means off", because + * offset 0 is a legal position — it just points inside the selector. + * @param offset Absolute byte offset of the amount word, selector included. + * @param maxPerCall Per-call ceiling. Zero is legal (a call that must carry amount zero). + * @param maxTotal Lifetime ceiling; `type(uint256).max` = unlimited, with no special branch. + */ +struct AmountRule { + bool enabled; + uint16 offset; + uint256 maxPerCall; + uint256 maxTotal; +} + +/** + * @dev The native rulebook for ONE (target, selector) action. One of these per action, so a + * rules set with eight actions holds eight of them under eight distinct config ids. + * + * @param initialized set once; re-initialisation is refused, as in universal mode + * @param validUntil non-zero and future (enforced at init); "never" = type(uint48).max + * @param target defensive copy of the action target, asserted at N4 + * @param selector defensive copy, asserted at N5. `0xFFFFFFFF` = value-only, which means + * EMPTY calldata — a no-argument function still carries four bytes + * @param maxValuePerCall Push-native per-call ceiling + * @param maxValueTotal Push-native lifetime ceiling; type(uint256).max = unlimited + * @param valueSpent lifetime native value metered, written effects-last + * @param amount optional calldata-amount metering + * @param amountSpent lifetime metered amount, written effects-last + * @param maxCalls 0 = unlimited; otherwise the lifetime call ceiling + * @param callsUsed calls consumed. ALWAYS increments on a successful check, including a + * zero-value zero-amount call — a call is a use, and the alternative + * makes `maxCalls` bypassable + * @param pins 0..MAX_PINS pinned argument words + */ +struct NativeConfig { + bool initialized; + uint48 validUntil; + address target; + bytes4 selector; + uint256 maxValuePerCall; + uint256 maxValueTotal; + uint256 valueSpent; + AmountRule amount; + uint256 amountSpent; + uint32 maxCalls; + uint32 callsUsed; + ArgPin[] pins; +} + +/** + * @notice WIRE TYPE — what a NATIVE envelope's body encodes. Not a storage type. + * + * @dev ABSENT BY DESIGN: `initialized`, `valueSpent`, `amountSpent` and `callsUsed` are all + * URP's own counters, zeroed at init. The SDK had to type four zeroes it did not own. + * + * SPLIT EVEN THOUGH ONLY THE UNIVERSAL SIDE FORCES IT. The SDK builds both; one struct + * with dead input fields sitting beside one without is precisely the inconsistency that + * let a since-removed chain field acquire four different conventions in one repository. + */ +struct NativeTerms { + uint48 validUntil; + address target; + bytes4 selector; + uint256 maxValuePerCall; + uint256 maxValueTotal; + AmountRule amount; + uint32 maxCalls; + ArgPin[] pins; +} + +// ───────────────────────── svm mode structs ───────────────────────── +// +// The third rulebook: a UNIVERSAL rules set whose destination is a `solana:*` chain. On Solana an +// outbound is ONE cross-program invocation — a target program, an ordered account list, and an +// instruction byte string — signed by the wallet's CEA (a PDA), not an EVM multicall. Every +// EVM-shaped gate (multicall walk, `address` target, `bytes4` selector, beneficiary word, per-entry +// value) is replaced by the shapes below. See `URP._checkSvm` for the gate list. + +/** + * @dev One allow-listed (program, instruction) pair. + * @param program Target program id, 32 bytes. + * @param discriminator Left-aligned instruction tag; only the first `discriminatorLen` bytes + * are compared. 8 for Anchor (`sha256("global:")[..8]`), 1 for + * SPL-style instruction indexes. + * @param discriminatorLen 1..8, or 0 iff `dataless`. + * @param dataless The instruction carries NO data. The only way to get a length-0 tag, + * and it forces `ix_data` to be EMPTY at check time — so a rule can never + * match an instruction its pins were not written for. + * @param maxAccounts 0 = unbounded; otherwise the request's account count must EQUAL it. + * Set to the IDL count for fixed-layout instructions so nothing can be + * appended behind the pinned positions. + */ +struct AllowedProgram { + bytes32 program; + bytes8 discriminator; + uint8 discriminatorLen; + bool dataless; + uint8 maxAccounts; +} + +/** + * @dev `accounts[accountIndex]` of a request matching rule `ruleIndex` must equal `expected`. + * The SVM counterpart of the EVM beneficiary pin: programs read accounts by POSITION, so a + * value-carrying position is pinned to an owner-committed key (the CEA, or one of its ATAs). + */ +struct SvmAccountPin { + uint8 ruleIndex; + uint8 accountIndex; + bytes32 expected; +} + +/// @dev How an `SvmDataPin` compares. Integers are LITTLE-ENDIAN (Borsh), `len` bytes wide. +enum SvmDataPinMode { + EQ, + GTE_LE, + LTE_LE, + RATIO_GTE_LE +} + +/** + * @dev A constraint on the `ix_data` of a request matching rule `ruleIndex`. + * - EQ `ix_data[off : off+len] == expected[0 : len]`, `len` 1..32, raw bytes, + * LEFT-ALIGNED: bytes of `expected` past `len` must be zero. + * - GTE_LE `uintLE(ix_data[off : off+len]) >= uint256(expected)`, `len` 1..8, + * RIGHT-ALIGNED integer: `expected` must fit in `len` bytes. + * - LTE_LE `uintLE(ix_data[off : off+len]) <= uint256(expected)`, same encoding. + * - RATIO_GTE_LE `uintLE(A) * den >= uintLE(B) * num`, A at `offset`, B at `offsetB`, both + * `len` bytes and both addressed with the same `fromEnd`; `expected` unused; + * `num` and `den` both non-zero. + * This is the min-out floor RELATIVE to the input amount — a static floor on + * the output alone is bypassed by an input equal to the whole balance. + * - fromEnd `offset` counts back from the END of `ix_data` to the field's START. + * Borsh serialises vectors before scalars, so trailing scalar arguments have + * stable from-end offsets and unstable from-start ones. Requires + * `offset >= len`. + */ +struct SvmDataPin { + uint8 ruleIndex; + bool fromEnd; + uint16 offset; + uint16 offsetB; + uint8 len; + SvmDataPinMode mode; + bytes32 expected; + uint64 num; + uint64 den; +} + +/** + * @notice WIRE TYPE — what a `solana:*` UNIVERSAL envelope's body encodes. Not a storage type. + * + * @dev ABSENT BY DESIGN, as in `UniversalTerms`: `initialized` and `spent` are URP's. + * + * @param validUntil non-zero, in the future (enforced at init); "never" = type(uint48).max + * @param expectedCEA the wallet's CEA on the destination: `PDA(["push_identity", wallet], + * gatewayProgram)`. Owner-committed — Solidity cannot derive a PDA. + * @param gatewayProgram the Push gateway program on the declared cluster. Owner-committed; the + * SDK sources it from the chain registry. Forbidden as a target: that + * route only returns the permitted asset to the owner's wallet, at the + * owner's rate-limit and gas cost. + * @param assets 1..MAX_ASSETS permitted PRC20s with their caps, exactly as `UniversalTerms`; + * amounts are PRC20 base units (lamports / SPL base units), and a request's + * amount must also fit Solana's u64 (S6b) + * @param maxGasPerCall Push-native per-call ceiling (protocol fee + gas swap budget), PC wei + * @param ceaAccounts every CEA-controlled account that HOLDS VALUE: the CEA, its ATA for EACH + * listed asset, its ATAs for allowed outputs. At most MAX_CEA_ACCOUNTS (16, + * the CEA included: room for all 8 assets plus 7 outputs). Each may appear in + * a request ONLY at a position the matched rule pins to it; a listed account + * no rule pins can never be passed at all. Unlisted accounts are not + * protected — the list is the owner's statement of what is worth taking. + * URP CANNOT CHECK that each listed asset's ATA is here (it cannot derive a + * Solana token account, and does not know a PRC20's mint): listing them is + * the SDK's job. Must contain `expectedCEA`; no zero, duplicate, or program + * entries. + * @param programs the allow-list; first match wins, made exact by the init ambiguity rule. + * ONE RULE PER (program, instruction), so ONE PINNED KEY PER POSITION: if a + * swap rule pins its input to the USDC account, USDT can never be that + * instruction's input. Using several listed tokens through one instruction + * means leaving the input unpinned and those token accounts unlisted, so + * only the output and price pins protect them. Multi-asset on Solana is + * strongest when different tokens are used by different instructions. + * @param pins account pins, each naming its rule + * @param dataPins `ix_data` pins, each naming its rule + */ +struct SvmTerms { + uint48 validUntil; + bytes32 expectedCEA; + bytes32 gatewayProgram; + AssetCap[] assets; + uint256 maxGasPerCall; + bytes32[] ceaAccounts; + AllowedProgram[] programs; + SvmAccountPin[] pins; + SvmDataPin[] dataPins; +} + +/** + * @dev The SVM rulebook — STORAGE type, lives inside `_svm`. + * @param initialized set once; re-initialisation is refused + * @param assets per-token caps and per-token `spent`, exactly as `Config.assets` + */ +struct SvmConfig { + bool initialized; + uint48 validUntil; + bytes32 expectedCEA; + bytes32 gatewayProgram; + uint256 maxGasPerCall; + AssetCapState[] assets; + bytes32[] ceaAccounts; + AllowedProgram[] programs; + SvmAccountPin[] pins; + SvmDataPin[] dataPins; +} diff --git a/plan/agw/research/deployment-review-2026-10-07-v5/source/test/unit/29_walletLabel.t.sol b/plan/agw/research/deployment-review-2026-10-07-v5/source/test/unit/29_walletLabel.t.sol new file mode 100644 index 00000000..99dc886a --- /dev/null +++ b/plan/agw/research/deployment-review-2026-10-07-v5/source/test/unit/29_walletLabel.t.sol @@ -0,0 +1,275 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { BaseTest } from "../Base.t.sol"; +import { PermissivePolicy } from "./4_agentDoor.t.sol"; +import { AGW } from "../../src/AGW.sol"; +import { IAGW } from "../../src/interfaces/IAGW.sol"; +import { IAGWFactory } from "../../src/interfaces/IAGWFactory.sol"; +import { AGWErrors } from "../../src/libraries/Errors.sol"; +import { ModeLib, ModeCode } from "../../src/libraries/ModeLib.sol"; +import { ExecutionLib, Execution } from "../../src/libraries/ExecutionLib.sol"; +import { OwnerIntent, MAX_LABEL_BYTES } from "../../src/libraries/Types.sol"; +import { Session, PermissionId } from "smartsessions/DataTypes.sol"; + +/** + * @title Wallet label — L01–L13 (PRD `docs-internal/sdk-first-changes/L-wallet-label_prd.md`). + * @notice The label is stored on the wallet, editable by the owner, capped at `MAX_LABEL_BYTES` bytes, + * and reads as `AGW ` (the factory's per-owner index) while none is set. + */ +contract WalletLabelTest is BaseTest { + address internal ownerAddr; + uint256 internal ownerPk; + address internal EXECUTOR; + AGW internal wallet; + + function setUp() public override { + super.setUp(); + (ownerAddr, ownerPk) = ecdsaKey("labelOwner"); + EXECUTOR = makeAddr("executor"); + wallet = newWallet(ownerAddr); + } + + // ─────────────────────────────── helpers ─────────────────────────────── + + function _single() internal pure returns (bytes32) { + return ModeCode.unwrap(ModeLib.encodeSimpleSingle()); + } + + function _batch() internal pure returns (bytes32) { + return ModeCode.unwrap(ModeLib.encodeSimpleBatch()); + } + + function _setLabelCall(string memory l) internal pure returns (bytes memory) { + return abi.encodeCall(AGW.setLabel, (l)); + } + + /// @dev A string of `n` copies of `unit`. + function _repeat(string memory unit, uint256 n) internal pure returns (string memory out) { + for (uint256 i; i < n; ++i) { + out = string.concat(out, unit); + } + } + + // ═══════════════════════════════════ L01 ═══════════════════════════════════ + + /// The default is `AGW `, numbered per owner. + function test_L01_DefaultIsAGWIndexPlusOne() public { + assertEq(wallet.label(), "AGW 1", "owner A, index 0"); + AGW second = newWallet(ownerAddr); + assertEq(second.label(), "AGW 2", "owner A, index 1"); + assertEq(wallet.label(), "AGW 1", "the first is unaffected"); + + AGW bobs = newWallet(makeAddr("bob")); + assertEq(bobs.label(), "AGW 1", "owner B counts from 1 on their own index"); + } + + // ═══════════════════════════════════ L02 ═══════════════════════════════════ + + /// A label passed at deploy is stored, and `WalletDeployed` still carries it. + function test_L02_DeployLabelIsStored() public { + (address predicted, uint96 index) = nextWallet(ownerAddr); + vm.expectEmit(true, true, true, true, FACTORY); + emit IAGWFactory.WalletDeployed(ownerAddr, index, predicted, "prediction-market-account"); + + vm.prank(ownerAddr); + AGW w = AGW(payable(factory.deployWallet("prediction-market-account"))); + + assertEq(address(w), predicted, "deployed at the predicted address"); + assertEq(w.label(), "prediction-market-account", "stored"); + } + + // ═══════════════════════════════════ L03 ═══════════════════════════════════ + + /// The owner sets a label: stored, `LabelSet` emitted, no checkpoint. + function test_L03_OwnerSetsLabel() public { + uint64 before = wallet.checkpointCount(); + + vm.expectEmit(false, false, false, true, address(wallet)); + emit IAGW.LabelSet("x"); + vm.prank(ownerAddr); + wallet.setLabel("x"); + + assertEq(wallet.label(), "x", "stored"); + assertEq(wallet.checkpointCount(), before, "a rename is not a checkpoint"); + } + + // ═══════════════════════════════════ L04 ═══════════════════════════════════ + + /// `""` resets to the default, and the event carries the empty string. + function test_L04_EmptyResetsToDefault() public { + vm.prank(ownerAddr); + wallet.setLabel("x"); + + vm.expectEmit(false, false, false, true, address(wallet)); + emit IAGW.LabelSet(""); + vm.prank(ownerAddr); + wallet.setLabel(""); + + assertEq(wallet.label(), "AGW 1", "back to the default"); + } + + // ═══════════════════════════════════ L05 ═══════════════════════════════════ + + /// Nobody but the owner (or the wallet itself) can rename. + function test_L05_NonOwnerRefused() public { + address[3] memory callers = [AGENT, makeAddr("stranger"), FACTORY]; + for (uint256 i; i < callers.length; ++i) { + vm.prank(callers[i]); + vm.expectRevert(AGWErrors.CallerIsNotOwner.selector); + wallet.setLabel("hijacked"); + } + assertEq(wallet.label(), "AGW 1", "unchanged"); + } + + // ═══════════════════════════════════ L06 ═══════════════════════════════════ + + /// A rename through the owner door works; only the owner-door calls tick, `setLabel` adds nothing. + function test_L06_RenameThroughExecute() public { + uint64 c0 = wallet.checkpointCount(); + + vm.prank(ownerAddr); + wallet.execute(_single(), ExecutionLib.encodeSingle(address(wallet), 0, _setLabelCall("one"))); + assertEq(wallet.label(), "one", "single"); + assertEq(wallet.checkpointCount(), c0 + 1, "one owner-door call, one tick"); + + Execution[] memory batch = new Execution[](2); + batch[0] = Execution({ target: address(wallet), value: 0, callData: _setLabelCall("two") }); + batch[1] = Execution({ target: address(wallet), value: 0, callData: _setLabelCall("three") }); + vm.prank(ownerAddr); + wallet.execute(_batch(), ExecutionLib.encodeBatch(batch)); + assertEq(wallet.label(), "three", "the last entry wins"); + assertEq(wallet.checkpointCount(), c0 + 3, "two batch entries, two ticks - none from setLabel"); + } + + // ═══════════════════════════════════ L07 ═══════════════════════════════════ + + /// A relayer renames on the owner's signature (the UEA owner's route). + function test_L07_RenameThroughExecuteWithSig() public { + bytes memory ecd = ExecutionLib.encodeSingle(address(wallet), 0, _setLabelCall("relayed")); + OwnerIntent memory i = blankIntent(ownerAddr, address(wallet), EXECUTOR); + i.mode = _single(); + i.execCalldataHash = keccak256(ecd); + i.nonceSeq = wallet.getNonce(i.nonceKey); + bytes memory sig = signIntent(ownerPk, i); + + vm.prank(EXECUTOR); + wallet.executeWithSig(_single(), ecd, i, sig); + + assertEq(wallet.label(), "relayed", "stored via the signed owner door"); + } + + // ═══════════════════════════════════ L08 ═══════════════════════════════════ + + /// The agent door cannot reach `setLabel`, even under a session enabled directly on the engine + /// with a policy that approves everything: the dispatch guard refuses the wallet as a target. + function test_L08_AgentDoorCannotRename() public { + PermissivePolicy permissive = new PermissivePolicy(); + Session memory bypass = sessionWithPolicy(address(permissive), agentConfig(AGENT), ""); + bypass.actions[0].actionTarget = address(wallet); + bypass.actions[0].actionTargetSelector = AGW.setLabel.selector; + Session[] memory arr = new Session[](1); + arr[0] = bypass; + vm.prank(address(wallet)); + bytes32 pid = PermissionId.unwrap(engine.enableSessions(arr)[0]); + + bytes memory ecd = ExecutionLib.encodeSingle(address(wallet), 0, _setLabelCall("agent-was-here")); + vm.prank(AGENT); + vm.expectRevert(abi.encodeWithSelector(AGWErrors.ForbiddenDispatchTarget.selector, address(wallet))); + wallet.executeAsAgent(pid, _single(), ecd); + + assertEq(wallet.label(), "AGW 1", "unchanged"); + } + + // ═══════════════════════════════════ L09 ═══════════════════════════════════ + + /// 64 bytes is the cap, on the setter and on the deploy path alike. + function test_L09_MaxLength() public { + string memory atCap = _repeat("a", MAX_LABEL_BYTES); + string memory overCap = _repeat("a", MAX_LABEL_BYTES + 1); + + vm.prank(ownerAddr); + wallet.setLabel(atCap); + assertEq(wallet.label(), atCap, "64 bytes is accepted"); + + vm.prank(ownerAddr); + vm.expectRevert(abi.encodeWithSelector(AGWErrors.LabelTooLong.selector, MAX_LABEL_BYTES + 1)); + wallet.setLabel(overCap); + assertEq(wallet.label(), atCap, "a refused rename leaves the old label"); + + // The deploy path: the wallet's revert bubbles through the factory with full data, and the + // whole deploy unwinds — the owner's count does not move. + uint256 countBefore = factory.walletCount(ownerAddr); + vm.prank(ownerAddr); + vm.expectRevert(abi.encodeWithSelector(AGWErrors.LabelTooLong.selector, MAX_LABEL_BYTES + 1)); + factory.deployWallet(overCap); + assertEq(factory.walletCount(ownerAddr), countBefore, "no wallet deployed"); + } + + // ═══════════════════════════════════ L10 ═══════════════════════════════════ + + /// The cap counts BYTES: sixteen 4-byte characters fit, seventeen do not. + function test_L10_LengthIsBytesNotChars() public { + string memory fourByteChar = unicode"🙂"; + assertEq(bytes(fourByteChar).length, 4, "fixture: a 4-byte UTF-8 character"); + + vm.prank(ownerAddr); + wallet.setLabel(_repeat(fourByteChar, 16)); + assertEq(wallet.label(), _repeat(fourByteChar, 16), "64 bytes, 16 characters"); + + vm.prank(ownerAddr); + vm.expectRevert(abi.encodeWithSelector(AGWErrors.LabelTooLong.selector, 68)); + wallet.setLabel(_repeat(fourByteChar, 17)); + } + + // ═══════════════════════════════════ L11 ═══════════════════════════════════ + + /// KNOWN LIMITATION, pinned: the label is not part of the owner's signature, so the relayer of a + /// `deployWalletWithSig` chooses it. Cosmetic; the owner can rename with `setLabel`. + function test_L11_SignedDeployLabelIsUnsigned() public { + address owner2; + uint256 pk2; + (owner2, pk2) = ecdsaKey("signedDeployOwner"); + (address predicted, uint96 index) = nextWallet(owner2); + OwnerIntent memory i = blankIntent(owner2, predicted, EXECUTOR); + i.index = index; + bytes memory sig = signIntent(pk2, i); + + vm.prank(EXECUTOR); + AGW w = AGW(payable(factory.deployWalletWithSig(i, sig, "relayer-chose-this"))); + + assertEq(w.label(), "relayer-chose-this", "the relayer's label is stored"); + + vm.prank(owner2); + w.setLabel(""); + assertEq(w.label(), "AGW 1", "and the owner can reset it"); + } + + // ═══════════════════════════════════ L12 ═══════════════════════════════════ + + /// Any 1..64-byte label round-trips unchanged. + function testFuzz_L12_RoundTrip(bytes memory raw) public { + vm.assume(raw.length != 0); + uint256 n = raw.length > MAX_LABEL_BYTES ? MAX_LABEL_BYTES : raw.length; + bytes memory b = new bytes(n); + for (uint256 k; k < n; ++k) { + b[k] = raw[k]; + } + + vm.prank(ownerAddr); + wallet.setLabel(string(b)); + assertEq(bytes(wallet.label()), b, "round-trip"); + } + + // ═══════════════════════════════════ L13 ═══════════════════════════════════ + + /// The default follows the owner's own index, not how many wallets the factory has deployed. + function test_L13_DefaultFollowsIndexNotGlobalCount() public { + AGW bobs = newWallet(makeAddr("bob")); + AGW second = newWallet(ownerAddr); + + assertEq(wallet.label(), "AGW 1", "A's first"); + assertEq(bobs.label(), "AGW 1", "B's first"); + assertEq(second.label(), "AGW 2", "A's second is AGW 2, not AGW 3"); + } +} diff --git a/plan/agw/research/donut-probe-2026-10-02.json b/plan/agw/research/donut-probe-2026-10-02.json new file mode 100644 index 00000000..52986500 --- /dev/null +++ b/plan/agw/research/donut-probe-2026-10-02.json @@ -0,0 +1,33 @@ +{ + "block": "23818643", + "rpc": "https://evm.donut.rpc.push.org/", + "checks": { + "factory": { + "exit": 0, + "output": "0xD7FEF338572f96edBeF89E720f1F0fF1284ec79C", + "error": "" + }, + "policy": { + "exit": 0, + "output": "\"1.0.0\"", + "error": "" + }, + "wallet": { + "exit": 0, + "output": "\"push.agentwallet.1.0.0\"", + "error": "" + }, + "gateway_slot": { + "exit": 0, + "output": "0x0000000000000000000000001e412939780f2b834dc42c7ac58d9f99888da659", + "error": "" + }, + "gateway_dispatch": { + "implementation": "0x1e412939780f2b834dc42c7ac58d9f99888da659", + "read_exit": 0, + "eight_field_push4_present": true, + "six_field_push4_present": false + } + }, + "caveat": "PUSH4 scan is supporting evidence, not full ABI proof; probes only cover named deployment." +} diff --git a/plan/agw/research/extended-e2e-2026-10-06/README.md b/plan/agw/research/extended-e2e-2026-10-06/README.md new file mode 100644 index 00000000..69670770 --- /dev/null +++ b/plan/agw/research/extended-e2e-2026-10-06/README.md @@ -0,0 +1,56 @@ +# Extended AGW E2E coverage — October 6, 2026 + +Branch `feat/agw-sdk-v4`. This follow-up adds 14 additional Donut/Sepolia E2E scenarios in the opt-in `agw` group. They exercise wallet identity and management races, atomic rule lifecycle behavior, and native policy enforcement against the deployed v4 contracts. The cases use bounded testnet funds and create fresh test wallets. + +## Coverage + +| File | Scenarios | Checks | +| ---------------------------------------------------------- | --------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `packages/core/__e2e__/agw/management-extended.spec.ts` | 6 | Prefunding a derived wallet, label/index reads, same-agent multiplicity and ambiguous-send refusal, batched add/revoke checkpoint counts, invalid revoke guards, stale update rollback after an intervening agent spend, and owner wallet-index race recovery. | +| `packages/core/__e2e__/agw/native-policy-extended.spec.ts` | 8 | Lossless raw-offset decode and recipient delivery, pin mismatch, per-call and cumulative amount caps, exact call count, explicit zero total, failed-callee rollback, and ungranted selector refusal without allowance change. | + +Every refusal test checks that balances and policy counters remain unchanged. The update-race test also checks that grants, checkpoint count and grant nonce remain unchanged after rollback. + +## Race found and correction + +The first funded run passed 13 of 14 scenarios. The wallet-index race proved that the losing create did not grant rules to the competing wallet, and the retry used the next slot, but the SDK returned a generic execution error instead of its documented `INDEX_RACE` result. + +The create flow now classifies this narrow case from fresh factory/wallet reads: it requires an uncommitted failure, an advanced owner index, and a deployed wallet at the predicted slot with the same owner/index but a different immutable label. If reads are unavailable or evidence is ambiguous, the SDK preserves the original error. A unit regression and isolated live race pass. This is an internal error-classification correction; it does not change the public API. + +## Validation + +| Check | Result | +| ------------------------------------------------------- | ---------------------------------------------------------------- | +| Funded live run before consolidation | 14 passed, 0 failed (6 management + 8 native policy) | +| Full core unit suite after the correction | 1,982 passed, 0 failed; 12 skipped; 116 suites passed, 1 skipped | +| Focused management unit suite | 19 passed | +| `core` build | Passed | +| `tsconfig.lib.json` and `tsconfig.spec.json` typechecks | Passed | +| Default E2E selection | Unchanged: 76 scenarios / 40 files / 81 tests | +| AGW selection after consolidation | 39 scenarios/11 files/39 tests; all 14 additions are opt-in with the AGW group | + +The 14 cases now live under `packages/core/__e2e__/agw/` and share the existing `--group agw`. They remain excluded from `all`, which still selects 76 scenarios. The combined group is guarded by the same verified manifest. Reproduce selection (no transactions): + +```sh +cd packages/core +npx ts-node --transpile-only __e2e__/ci/run.ts --verify --group agw +``` + +Running the group broadcasts testnet transactions and spends testnet funds. It can be selected from the E2E workflow dispatch: + +```sh +cd packages/core +npx ts-node --transpile-only __e2e__/ci/preflight.ts --group agw --dry-run +npx ts-node --transpile-only __e2e__/ci/run.ts --group agw +``` + +Use the existing test environment and preflight procedure before a rerun. Logs below are sanitized; private keys and environment values are not included. + +## Logs + +- [Final full funded run](../live-svm-wire-2026-10-06/logs/live-agw-extended-final.log) +- [Initial index-race reproduction](../live-svm-wire-2026-10-06/logs/live-agw-extended-index-race.log) +- [Initial full run](../live-svm-wire-2026-10-06/logs/live-agw-extended.log) +- [Unit suite](../live-svm-wire-2026-10-06/logs/unit-final.log) +- [Focused management unit suite](../live-svm-wire-2026-10-06/logs/management-unit.log) +- [Build](../live-svm-wire-2026-10-06/logs/build-final.log) diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/README.md b/plan/agw/research/extended-v5-e2e-2026-10-07/README.md new file mode 100644 index 00000000..50802ec6 --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/README.md @@ -0,0 +1,54 @@ +# Expanded v5 E2E coverage — October 7, 2026 + +Added the five requested scenarios. The opt-in AGW group now registers **58 scenarios across 14 files**; default `all` remains **76 scenarios / 40 files / 81 tests**. This report records validation performed before commit and push. + +## Coverage added + +| Scenario | Independent assertions | +| --- | --- | +| Solana-origin owner create / rename / reset | Correct UEA ownership, stored label, list visibility, default reset and two owner checkpoints | +| Rename with an active rule | Same rule ID/config/grant nonce and spend after rename; agent consumes its remaining budget; further value is rejected without signing | +| Failing owner batch after rename | SDK simulation maps `LabelTooLong`; a bounded mined transaction with the same SDK encoding reverts with no logs, preserving label and checkpoint count | +| Two assets used under one universal rule | Both ETH and USDC reach this wallet's CEA; each allowance/balance/spend changes independently; exhausted ETH does not prevent USDC; extra units are rejected by URP with nonce and counters unchanged | +| Owner funds-only SPL export | Recipient USDT ATA credit, per-transaction token delta, wallet burn, allowance consumption, owner checkpoint and response/replay identity | + +Existing label tests now check isolation between two wallets and the intermediate renamed label through an EVM UEA owner, before reset. Destination receipts remain required: a successful Push leg alone cannot pass a delivery test. + +## SDK defect found and fixed + +The new SPL test failed **before signing** when `SOURCE_TOKEN_ADDRESS()` was decoded as a Solidity string. A read-only raw probe showed that the current SVM synthetic precompile returns a **zero word**, not a source mint string. It must not be interpreted as the mint of a non-native token. + +The shared SVM metadata resolver now: + +- Accepts populated string/word metadata when supplied. +- Treats a zero marker as native only for the registered gas PRC20. +- Resolves a known non-native mapping using the SDK's existing registry, matching the full origin chain, network and exact PRC20 address, as ordinary Route 2 already does. +- Rejects unknown mappings instead of guessing a mint. +- Serves quoting, authoring and rule reads consistently; decoded hexadecimal mint inputs normalize to base58 for registry lookup. + +Four added regression units cover real ABI decoding, unavailable metadata, the live zero-word/registered-mint case, and hexadecimal mint authoring. The subsequent funded SPL test delivered exactly **1,000 raw USDT units** to the intended ATA and passed replay checks. No public API or permission-selection behavior changed. + +## EVM destination gas finding + +The existing positive EVM case initially reached Sepolia and **reverted** with a 500,000-gas transaction. Replaying its exact call with 500,000 gas failed; five million gas succeeded; `eth_estimateGas` returned **1,304,470** for fresh CEA finalization. This was not evidence of malformed SDK payloads or a gas-limit safety bypass. + +Positive EVM tests and the guide now supply an explicit **2,000,000 destination-gas budget**. A later fresh-fixture run succeeded with that exact gas limit, using **1,265,746 gas**, and independently verified the wallet's CEA, caller, target, ETH credit and replay. The two-token case also passed both real deliveries. + +One explicit-budget run timed out after ten minutes before the later successful run. Its timeout is retained as delivery-latency evidence; we have not established its root cause. The SDK's default is **not silently raised**. Core/gateway should revisit the default for fresh CEA deployment; the caller workaround is verified. See [failed transaction](evm-failed-destination.json), [read-only gas checks](evm-failure-followup.json), and [successful explicit budget](evm-explicit-success.json). + +## Validation and execution limits + +- Full unit suite: **2,014 passed / 12 skipped / 0 failed**. +- Actual v5 contract harness: **90 passed**, 12 suites, retaining the documented gateway/core/token/destination fixtures. +- Typecheck, build, package imports/declarations, API comparison, guide examples, scenario manifests and scoped lint pass; lint has test non-null warnings, not errors. +- Funding preflight `--dry-run` passes with explicit new master-USDC and master-SPL requirements. This check does not fund anything. +- Live labels: **8/8 passed**, including a genuinely mined reverted owner batch. +- Live multi-asset suite: **3/3 passed** with explicit destination gas, including the new independent-budget case. +- Final EVM/SPL rerun: **3/3 passed** (EVM positive, intentional destination failure, SPL transfer). +- Native SOL public suite: **6/6 passed again after the metadata resolver fix**, including actual agent delivery, owner funds-only SOL delivery and replay. + +These are selected runs, not a single complete 58-case run. Across this expansion, 20 distinct live scenarios are covered (8 labels, 3 multi-asset, 2 EVM, 6 native SOL, 1 SPL). Earlier v5 native/lifecycle acceptance adds ten further distinct cases; it is not a fresh rerun of every scenario. + +Initial default-gas EVM failure, an explicit-gas timeout and the pre-fix SPL decoding failure remain in the logs. Failed delivery is never accepted as success. All actual broadcasts were on Donut, Sepolia or Solana devnet, using fresh AGWs and bounded fixture funding. No mainnet transaction, contract deployment, team message, publication or credential dump occurred. + +Evidence: [logs/](logs/), [live records](live-evidence.jsonl), [raw SPL metadata](spl-metadata-probe.json), [API comparison](api-comparison.json). Some diagnostic event/search files contain no matches; those empty results are not proof that no outbound exists. diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/api-comparison.json b/plan/agw/research/extended-v5-e2e-2026-10-07/api-comparison.json new file mode 100644 index 00000000..2454ca5e --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/api-comparison.json @@ -0,0 +1,11460 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "898eda17911133faa155899ac8e1276a589c4564", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [ + "DecodedSolanaRule", + "SolanaRule", + "SvmAccountRef", + "SvmFieldConstraint", + "SvmInstructionRule" + ], + "removedExports": [], + "changedAgwTypes": [ + "AgenticError", + "AGENTIC_ERROR_CODE", + "NativeRule", + "AllowedCall", + "UniversalRule", + "RulesRecord", + "AgenticTxMetadata" + ], + "publicTypeChanges": [ + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticErrorCode", + "AgenticNetworkConstants", + "AgenticTxMetadata", + "AllowedCall", + "NativeRule", + "SolanaRule", + "DecodedSolanaRule", + "SvmInstructionRule", + "SvmAccountRef", + "SvmFieldConstraint", + "Rule", + "RulesRecord", + "UniversalRule" + ], + "transactionMethodChanges": [], + "instanceMethodChanges": [], + "agwConstantsChanged": true, + "before": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address(token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }): {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "after": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DecodedSolanaRule", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SolanaRule", + "SvmAccountRef", + "SvmExecutePayloadFields", + "SvmFieldConstraint", + "SvmGatewayAccountMeta", + "SvmInstructionRule", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "beneficiaryOffset": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": false, + "readonly": false, + "type": "number" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "beneficiaryOffset": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "SolanaRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").SolanaRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedInstructions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").SvmInstructionRule[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal?: bigint;\n token: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n}[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "outputTokens": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DecodedSolanaRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[]" + }, + "ceaAccounts": { + "optional": false, + "readonly": false, + "type": "readonly `0x${string}`[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`solana:${string}`" + }, + "dataPins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmDataPinWire[]" + }, + "expectedCEA": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "format": { + "optional": false, + "readonly": false, + "type": "\"decoded\"" + }, + "gatewayProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmAccountPinWire[]" + }, + "programs": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").AllowedProgramWire[]" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "SvmInstructionRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").SvmInstructionRule", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "{\n expected: import(\"sdk/src/lib/agentic/agentic.types\").SvmAccountRef;\n name: string;\n}[]" + }, + "fields": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").SvmFieldConstraint[] | undefined" + }, + "instruction": { + "optional": false, + "readonly": false, + "type": "{\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n name: string;\n}" + }, + "program": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "SvmAccountRef": { + "type": "{\n address: string;\n kind: \"address\";\n} | {\n kind: \"walletATA\";\n token: string;\n} | {\n kind: \"walletCEA\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"address\" | \"walletATA\" | \"walletCEA\"" + } + } + }, + "SvmFieldConstraint": { + "type": "{\n denominator: string;\n minRatio: {\n den: bigint;\n num: bigint;\n };\n numerator: string;\n} | {\n equals: `0x${string}` | bigint | boolean;\n name: string;\n} | {\n max: bigint;\n name: string;\n} | {\n min: bigint;\n name: string;\n}", + "members": {} + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").SolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address: (token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": false, + "readonly": false, + "type": "number" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "scope": "All root exports and declared public members, PushChain static/instance members, universal transaction methods, utility groups, readonly/optional markers and constants. Behavior/default/deployment changes need the written session review." +} diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/credential-scan.json b/plan/agw/research/extended-v5-e2e-2026-10-07/credential-scan.json new file mode 100644 index 00000000..2638f264 --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/credential-scan.json @@ -0,0 +1,4 @@ +{ + "scanned": 204, + "credentialMatches": [] +} diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-cosmos.json b/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-cosmos.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-cosmos.json @@ -0,0 +1 @@ +[] diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-gas-events-raw.json b/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-gas-events-raw.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-gas-events-raw.json @@ -0,0 +1 @@ +[] diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-gas-events.json b/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-gas-events.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-gas-events.json @@ -0,0 +1 @@ +[] diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-node-records.json b/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-node-records.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-node-records.json @@ -0,0 +1 @@ +[] diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-success.json b/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-success.json new file mode 100644 index 00000000..d0aaf607 --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/evm-explicit-success.json @@ -0,0 +1,7 @@ +{ + "hash": "0x05842ed536ce0c298233bec9afd807a8c721513fc9092d079cccd916ac70f7bb", + "gasLimit": "2000000", + "gasUsed": "1265746", + "status": "success", + "block": "11863465" +} diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/evm-failed-destination.json b/plan/agw/research/extended-v5-e2e-2026-10-07/evm-failed-destination.json new file mode 100644 index 00000000..8e411185 --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/evm-failed-destination.json @@ -0,0 +1,45 @@ +{ + "tx": { + "blockHash": "0x73efb0b0598f4256b2074f08c9f8831f4da12add7486ea7ca7aef2a57f549ca0", + "blockNumber": "11863151", + "blockTimestamp": "0x6ac64298", + "from": "0x9fed6f778a956244c06a3b905ba45bdb2ec3afea", + "gas": "500000", + "gasPrice": "1100026", + "hash": "0xf91e4cc9e2605ff9f27d575ceb9e928dadddd1755a428112021ef9983738abb7", + "input": "0x40a31fe2ba8aafd675f92c2cd74ae627bf430338a54ec81894cc078bfea235fb67f4dcaec042fcac8ebeb211a83218f0e55acc33e1658f90e825b08ae8dd3b9860f09f290000000000000000000000003c461162312c8a55e65c3f3905afda4b92a14d7900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e8d4a5100000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001042cc2842d000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000f1552ed5ac48c273570500bd10b10c00e1c418bb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000004d09de08a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": 50083, + "to": "0xd019eb12d0d6ef8d299661f22b4b7d262ed4b965", + "transactionIndex": 100, + "value": "1000000000000", + "type": "legacy", + "chainId": 11155111, + "v": "22310257", + "r": "0xb6339cf288b8ac60e2378202304c4e3cc980780b1e56b1b4fa58448e9c7d59bf", + "s": "0x62f709a2cb6bd1fd0647e6304c3178d5f228814f35ac8e4968008e0cf1c5d4a1", + "typeHex": "0x0" + }, + "receipt": { + "blockHash": "0x73efb0b0598f4256b2074f08c9f8831f4da12add7486ea7ca7aef2a57f549ca0", + "blockNumber": "11863151", + "contractAddress": null, + "cumulativeGasUsed": "77674744", + "effectiveGasPrice": "1100026", + "from": "0x9fed6f778a956244c06a3b905ba45bdb2ec3afea", + "gasUsed": "222972", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "status": "reverted", + "to": "0xd019eb12d0d6ef8d299661f22b4b7d262ed4b965", + "transactionHash": "0xf91e4cc9e2605ff9f27d575ceb9e928dadddd1755a428112021ef9983738abb7", + "transactionIndex": 100, + "type": "legacy" + }, + "trace": { + "error": "HTTP request failed." + }, + "call": { + "error": "Execution reverted for an unknown reason.", + "details": "execution reverted" + } +} diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/evm-failure-followup.json b/plan/agw/research/extended-v5-e2e-2026-10-07/evm-failure-followup.json new file mode 100644 index 00000000..98ceb1ca --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/evm-failure-followup.json @@ -0,0 +1,14 @@ +{ + "VAULT": "0xD019Eb12D0d6eF8D299661f22B4B7d262eD4b965", + "CEA_PROXY_IMPLEMENTATION": "0x425291f35BA1A94Bd2dcC2dC097c2B55700A1fB6", + "CEA_IMPLEMENTATION": "0x1972646e4208c5Fe20914c3E09Ba339df43D9CB0", + "deploy": { + "result": "0xFA06Ea99a62c760d11d40B787eAd7225b69d3aCf" + }, + "call500000": { + "error": "Execution reverted for an unknown reason.", + "details": "execution reverted" + }, + "call5000000": {}, + "estimatedFreshCeaFinalizationGas": "1304470" +} diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/live-evidence.jsonl b/plan/agw/research/extended-v5-e2e-2026-10-07/live-evidence.jsonl new file mode 100644 index 00000000..18785013 --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/live-evidence.jsonl @@ -0,0 +1,32 @@ +{"name": "universal-destination-revert", "at": "2026-10-07T13:03:30.315Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x3c461162312c8A55e65C3F3905aFDa4B92A14D79", "pushTx": "0xd6ef67aee6697f753c1353cb72bbc3a7f7adef9ce2c05bb7b79dfb544e2b9d42", "externalStatus": "failed"} +{"name": "public-svm-setup", "at": "2026-10-07T13:04:31.162Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xC905D911FB11Cf7490E61Ae7A19396b9BD9d440b", "id": "0x8b9814f4b460d740c3bf7b1218093867e7b27965fc88067819684ec501f2b10c", "grantHash": "0xada541d69a65a8ba61808c8c221e893ee2ff34ed8eb6ae4bf9dcfc6649383775", "cea": "FsyabVBzK46spbndEZwsXS8UgR5PQ93HtcqpK5AQ1R9v", "recipient": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb"} +{"name": "public-svm-replacement", "at": "2026-10-07T13:04:50.171Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xC905D911FB11Cf7490E61Ae7A19396b9BD9d440b", "id": "0xdf5a44a59a7a70fac2c38b7c9d170fd8610d9787fa8531f34522a707b0808e92", "txHash": "0x822598e1d2eab4e7f86655ba8cf0979737edb4c7c5e5fe97f4dc162cd53c6ef0"} +{"name": "public-svm-submitted", "at": "2026-10-07T13:05:06.779Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xC905D911FB11Cf7490E61Ae7A19396b9BD9d440b", "id": "0xdf5a44a59a7a70fac2c38b7c9d170fd8610d9787fa8531f34522a707b0808e92", "hash": "0x1b525875791e4172d1643ca2725ca4933e13a0e9433c7c4c9c78a952dae3ea86"} +{"name": "public-svm-delivered", "at": "2026-10-07T13:06:20.641Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xC905D911FB11Cf7490E61Ae7A19396b9BD9d440b", "hash": "0x1b525875791e4172d1643ca2725ca4933e13a0e9433c7c4c9c78a952dae3ea86", "destinationHash": "4Eo6hZoh5Ro5GrLRpz7bkv9bwdP2efcaNwLNH9xjRfn1Cgtfhvf2KVbak1to2xxvyBKRWD56YyEMRGqYYuYvQFUk", "instruction": {"program": "0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", "data": "0x79f4fa0308e5e1011027000000000000", "accounts": [{"pubkey": "0x4f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af", "isWritable": true}, {"pubkey": "0x2953026d328218b107268efe60f7d98635af1ff535a91731f75ca7cf8a859044", "isWritable": true}, {"pubkey": "0xdd12a1ba3121401d0c0e0ed20c5ce07f90ca11399714739a1387510418a6d575", "isWritable": true}, {"pubkey": "0x0000000000000000000000000000000000000000000000000000000000000000", "isWritable": false}]}} +{"name": "public-svm-contract-refusals", "at": "2026-10-07T13:06:41.535Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xC905D911FB11Cf7490E61Ae7A19396b9BD9d440b", "id": "0xdf5a44a59a7a70fac2c38b7c9d170fd8610d9787fa8531f34522a707b0808e92", "agentNonce": 1, "state": {"tokens": "10000", "pcBalance": "40369379674144047445", "checkpoints": "7", "spent": ["10000"]}} +{"name": "public-svm-owner-transfer-submitted", "at": "2026-10-07T13:07:04.001Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xC905D911FB11Cf7490E61Ae7A19396b9BD9d440b", "hash": "0xf5ac64f229a285985da031342aaabba904af4a1afb9717013eb158ae8c25fcde"} +{"name": "public-svm-owner-transfer-delivered", "at": "2026-10-07T13:08:23.087Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xC905D911FB11Cf7490E61Ae7A19396b9BD9d440b", "hash": "0xf5ac64f229a285985da031342aaabba904af4a1afb9717013eb158ae8c25fcde", "destinationHash": "3xKuVZ3rvFLYWgmKbhPVLFEZpYcHpVybZfdogRpSJYsAodomANRjQaiyVyNLCCEkaqxQ34EBvT8Xfe1f5EeJAr2D", "recipient": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb", "amount": "10000"} +{"name": "v5-label-default-custom", "at": "2026-10-07T13:15:15.082Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallets": ["0xb70e13E47651ea9ebB26b62C5530204e1a1Ecde9", "0x5Da80edA2e48fda6C997585E5253beaF6D4e52DE"], "indices": [16, 17], "hashes": ["0x8f54c5b9c403335897ae25dd985e65f2702679054c8a586053237489b1e11e8e", "0x35681c3076eb8da6c7bd0e879759222b3fd3b0ca6b7f5116708f35eff0b37f3f", "0x1d5e3e0240484171cd35319cec6f60989a6b0915f226d01e2c86f5221c45a03d"]} +{"name": "v5-label-rename-reset", "at": "2026-10-07T13:15:59.178Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xD5499dCa4082374Ac6e7B82e0d0086aacB34097c", "hashes": ["0x31ccecf6a76372035650e5570ee057cea376f882772e86aa934f7412c5f0a80b", "0x555b99c02a1e1774fda0685f4a4af3bd3f4c51f311a9108c45d50f2bc15cdd14"], "checkpointsBefore": "0", "checkpointsAfter": "2"} +{"name": "v5-label-byte-boundary", "at": "2026-10-07T13:16:21.411Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xBb790C48045afEb9878bA1f648Eb895825fCb596", "checkpoints": "1", "unchangedNextSlot": 20} +{"name": "v5-label-agent-refused", "at": "2026-10-07T13:16:39.031Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x3D407438b1dbB2EF6d66aD3D94Bb402F39D6306F", "checkpoints": "1"} +{"name": "v5-label-uea-owner", "at": "2026-10-07T13:17:31.930Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x19b64878E52658a4390DAAC7D5Dd52E8466FbAB9", "owner": "0x5C70C864Cf1aDfB04A0e107fFA248ba3600EAb8D", "hashes": ["0x70025b20c360d4b8db40de326621a88fce0cf9b207374a824f6253e6d3c827f5", "0xf29404374074848939c38c88920c9819409775b07b95f558676a3f7286c7943e", "0x19be422a1de88b9fdd177d4b37d43e88a0fbfe74f3b10828173854fd4320c548"], "checkpointsBefore": "0", "checkpointsAfter": "2"} +{"name": "v5-label-solana-owner", "at": "2026-10-07T13:18:20.716Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x23F2e20a3D6CBA6AD3a1C3364C41d1FDe4FEe8C5", "owner": "0xad977a75D8BEd06579D6498b7e2e3885f9D31F15", "hashes": ["0xf3321b6f170317e219c2ca13e0b1401ef08c79d40cfc86d697b00b4912947fd1", "0x0cce0bcec7f9bfe07c41ef22e12b0d38621ca132b0df5f93c314592f3d393235", "0xe0ec10679fbe860f9d9ccf69a0626775ed1e6d4cf497c162c649c1dd755f34eb"], "checkpointsBefore": "0", "checkpointsAfter": "2"} +{"name": "v5-label-active-rule", "at": "2026-10-07T13:19:07.570Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x3F6680B891248900A9eb6D886C27911F211CFb4B", "rulesId": "0x305bda56c59c99c050a007f4a7166bf4b3f29cd302982771363f7240ba0fead6", "hashes": ["0x581feba3171b7d99b4d25babd674e8b030d6e8a120cb21b65946774080092606", "0x053f9d887791edf2f41bcc5da4d742dfe510b0430bf0419b3632438ba6800a04", "0xe4371b01237750c1f4e6cadf0ea4cd918329924eeff8c3bd4e66c3018302b449"], "spendBefore": {"valueSpent": "1", "amountSpent": "0", "callsUsed": 1}, "spendAfter": {"valueSpent": "2", "amountSpent": "0", "callsUsed": 2}, "grantNonce": "1"} +{"name": "v5-label-batch-rollback", "at": "2026-10-07T13:19:23.779Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x02288178E780d54a53a4E4170b370CeE9d324300", "hash": "0x0904eb583e188945a07aeb4542d9f82b01cc18186bc13da5e07215d3b5c4c0f6", "block": "23993562", "gasUsed": "200000", "status": "reverted", "checkpoints": "0"} +{"name": "universal-destination-revert", "at": "2026-10-07T13:34:11.642Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xb045C61F185718a0DB614B355CCada4d99fD0510", "pushTx": "0x7a1544ffaf26c1d8807a20d19991f59d0abe2e6b5f82a7e3ef2fb6ff0e2e08b2", "externalStatus": "failed"} +{"name": "v5-two-token-replacement", "at": "2026-10-07T13:34:52.255Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x6cD97f78a5d8EDb669be1A472dC30716fc39F148", "oldId": "0x7bec5118b772d5c509dbc72661cddf97135465db88fd1571e0b95e8cc9806556", "newId": "0x5e9fab71dc21352e55ec76e52c5217025b809757716f56dbf0cbe0b11525ca21", "txHash": "0x7c5d096e3182558125a0c9cc463fdbed394720335f8b723518e37d83fda6ed08"} +{"name": "v5-call-only", "at": "2026-10-07T13:36:41.334Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x3f3cE51de56544d9f6a655DD2E31729C2e1D2B4f", "pushTx": "0x7b19c1405da5ec099db77c9324f2f4f6ab252631497aca0e0872ef8b4570b5c0", "externalTx": "0x418ca768b33baf4ba472ac8b9349dad42dd02d99ff3c045a0fe76d34722902cd"} +{"name": "v5-independent-token-budgets", "at": "2026-10-07T13:40:25.774Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x8611fD4cdD2f66e46c1Fd662d0BE07D09c7589D5", "rulesId": "0x7bec5118b772d5c509dbc72661cddf97135465db88fd1571e0b95e8cc9806556", "tokens": ["0x2971824Db68229D087931155C2b8bB820B275809", "0x7A58048036206bB898008b5bBDA85697DB1e5d66"], "amounts": ["1000000000000", "10"], "spent": ["1000000000000", "10"], "hashes": ["0xfaaf5856b068ba9b78556216072f0456e3b28ba14f3f2aab4bea5674784628fe", "0xa984c11996b92faacad565f4762dcf5dfdccf114060d9d2ba75b570e093fcbed", "0xa727fdd8d2423ceb1d8a605725815336a6ab67a05eddbd057eb70d78ea713df5", "0x5e2c328d16d3c6a9c728683ad1988698d69f9c5310ede64b56aa43d18add327d"]} +{"name": "v5-evm-outbound-submitted", "at": "2026-10-07T14:03:38.215Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x8a92851E2672E728B078Ed672DF3Ba95839Ed045", "cea": "0xF8662bBb2c3a6490114A13Bd5CC3A1Fd09d5faB1", "pushTx": "0xc7c481e856eb84dfc4970a81ef25eed0aad21e6d2ccc1183cce15546159ae8bb", "destinationGasLimit": "2000000"} +{"name": "universal-outbound", "at": "2026-10-07T14:05:07.101Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x8a92851E2672E728B078Ed672DF3Ba95839Ed045", "cea": "0xF8662bBb2c3a6490114A13Bd5CC3A1Fd09d5faB1", "rulesId": "0x7f1b3e73f18cfaddba4c22f6a3fd7b360ef7ce9282bec9d65ab38883697ff54b", "pushTx": "0xc7c481e856eb84dfc4970a81ef25eed0aad21e6d2ccc1183cce15546159ae8bb", "externalTx": "0x05842ed536ce0c298233bec9afd807a8c721513fc9092d079cccd916ac70f7bb", "amount": "1000000000000"} +{"name": "universal-destination-revert", "at": "2026-10-07T14:07:13.191Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x8a92851E2672E728B078Ed672DF3Ba95839Ed045", "pushTx": "0xaf1d3eea7f3b281ef4586b629fe4c021419a2e4a10f4270f12adddb6e50c2fc9", "externalStatus": "failed"} +{"name": "v5-spl-owner-submitted", "at": "2026-10-07T14:08:10.674Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xC4635F40A0925f8adf2c2B0B0C021F9330b28AF0", "hash": "0xdd0ae0081a55e5e8ebbda2b5e3c37e616ba74c94985b8e17d47536aeb3547cfb", "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", "recipient": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb", "ata": "oVL4eb7hqoq4iJEZ4mPf9Hgd5ys3EzaXuCpZ434aRRt", "amount": "1000"} +{"name": "v5-spl-owner-delivered", "at": "2026-10-07T14:09:36.083Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xC4635F40A0925f8adf2c2B0B0C021F9330b28AF0", "hash": "0xdd0ae0081a55e5e8ebbda2b5e3c37e616ba74c94985b8e17d47536aeb3547cfb", "destinationHash": "5UVT2JFJqEuAeGb5NUsn63sUCE7xJkypR8qwJrqgDFm2JTiSWoGZy62R5uX75C9vDJHbr8Tcy9YF7XRJcmzv3xCF", "mint": "EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF", "recipient": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb", "ata": "oVL4eb7hqoq4iJEZ4mPf9Hgd5ys3EzaXuCpZ434aRRt", "beforeRecipient": "9995959000", "afterRecipient": "9995960000", "amount": "1000"} +{"name": "public-svm-setup", "at": "2026-10-07T14:22:29.834Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xE6BEcbb5FB2463099A10f535242Fdc29650DBAA6", "id": "0xa4cd3c6c7d9db29c19784a91d92e4127f9c80070c20d89f0694c08e19eed6da6", "grantHash": "0xea31b4d3b89d1672fc727bd71e45610b9c7ab4ca640c278c10923b9b3146a174", "cea": "3Mqez5ddDU9VVMy12gEpWDCe6Lqw4yaRGvf6k3jPQEwe", "recipient": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb"} +{"name": "public-svm-replacement", "at": "2026-10-07T14:22:54.795Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xE6BEcbb5FB2463099A10f535242Fdc29650DBAA6", "id": "0xef27e402c9d606935e5048768c146af3da2ff4a60e81c77f656029f09663d842", "txHash": "0xca808841b002042c2848f1480b62ceecc7880aed045ca78053d45caa2843139d"} +{"name": "public-svm-submitted", "at": "2026-10-07T14:23:15.756Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xE6BEcbb5FB2463099A10f535242Fdc29650DBAA6", "id": "0xef27e402c9d606935e5048768c146af3da2ff4a60e81c77f656029f09663d842", "hash": "0x4fa10b1edfb832a895c16d7fbcde733ba398e6bcb3eae344737223a2f8b31bf9"} +{"name": "public-svm-delivered", "at": "2026-10-07T14:24:30.636Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xE6BEcbb5FB2463099A10f535242Fdc29650DBAA6", "hash": "0x4fa10b1edfb832a895c16d7fbcde733ba398e6bcb3eae344737223a2f8b31bf9", "destinationHash": "23t5UMQxKvBzoXk7uZAQc5xqpnCN6gioqm6gkBNGHDywo2pm1BRSNrMwAvXWwPe6rZLBTQZDitq2LaGC6TjDDrFR", "instruction": {"program": "0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", "data": "0x79f4fa0308e5e1011027000000000000", "accounts": [{"pubkey": "0x4f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af", "isWritable": true}, {"pubkey": "0x2953026d328218b107268efe60f7d98635af1ff535a91731f75ca7cf8a859044", "isWritable": true}, {"pubkey": "0x230e011a0d2f4e49884464a5078c5b83cff464fc757ab6b3b5e9fc32df81f96d", "isWritable": true}, {"pubkey": "0x0000000000000000000000000000000000000000000000000000000000000000", "isWritable": false}]}} +{"name": "public-svm-contract-refusals", "at": "2026-10-07T14:24:53.102Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xE6BEcbb5FB2463099A10f535242Fdc29650DBAA6", "id": "0xef27e402c9d606935e5048768c146af3da2ff4a60e81c77f656029f09663d842", "agentNonce": 1, "state": {"tokens": "10000", "pcBalance": "40369379595049366856", "checkpoints": "7", "spent": ["10000"]}} +{"name": "public-svm-owner-transfer-submitted", "at": "2026-10-07T14:25:23.143Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xE6BEcbb5FB2463099A10f535242Fdc29650DBAA6", "hash": "0x134ecf6fe57d4cfe796660ec7179930bb22570b303c38f92f87b16bf857b5e95"} +{"name": "public-svm-owner-transfer-delivered", "at": "2026-10-07T14:26:58.875Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xE6BEcbb5FB2463099A10f535242Fdc29650DBAA6", "hash": "0x134ecf6fe57d4cfe796660ec7179930bb22570b303c38f92f87b16bf857b5e95", "destinationHash": "5RC9jrEyyGEZYYqiYmzmWKqG5woFMiKjjeq14Rt1p49nuVLfw3sgurduqQbFkgePftfzn3wNCufFy7BsusA1H8eD", "recipient": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb", "amount": "10000"} diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/actual-contracts.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/actual-contracts.log new file mode 100644 index 00000000..f84c63cf --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/actual-contracts.log @@ -0,0 +1,30 @@ +PASS core-agw-local packages/core/__agw-local__/v5-multiasset.spec.ts (7.919 s) +PASS core-agw-local packages/core/__agw-local__/svm-backend.spec.ts (7.71 s) +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-public.spec.ts (5.087 s) +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-differential.spec.ts + ● Console + + console.log + {"corpus":"svm-grant","seed":23063,"cases":107,"accepted":38,"rejected":69,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:226:13) + + console.log + {"corpus":"svm-payload","seed":23063,"cases":88,"accepted":6,"rejected":82,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:407:13) + +PASS core-agw-local packages/core/__agw-local__/labels.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-batch.spec.ts +PASS core-agw-local packages/core/__agw-local__/delayed-index.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-races.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-internals.spec.ts + +Test Suites: 12 passed, 12 total +Tests: 90 passed, 90 total +Snapshots: 0 total +Time: 38.992 s, estimated 44 s +Ran all test suites. diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/api.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/api.log new file mode 100644 index 00000000..0b5c2eee --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/api.log @@ -0,0 +1 @@ +{"compiledMatchesSource":true,"addedExports":["DecodedSolanaRule","SolanaRule","SvmAccountRef","SvmFieldConstraint","SvmInstructionRule"],"removedExports":[],"changedAgwTypes":["AgenticError","AGENTIC_ERROR_CODE","NativeRule","AllowedCall","UniversalRule","RulesRecord","AgenticTxMetadata"],"publicTypeChanges":["AGENTIC_ERROR_CODE","AgenticError","AgenticErrorCode","AgenticNetworkConstants","AgenticTxMetadata","AllowedCall","NativeRule","SolanaRule","DecodedSolanaRule","SvmInstructionRule","SvmAccountRef","SvmFieldConstraint","Rule","RulesRecord","UniversalRule"],"transactionMethodChanges":[],"instanceMethodChanges":[],"initializeSignatureChanged":false,"agwConstantsChanged":true} diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/build.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/build.log new file mode 100644 index 00000000..7742e881 --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/build.log @@ -0,0 +1,11 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:1508) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/default-manifest.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/default-manifest.log new file mode 100644 index 00000000..dfa5f250 --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/default-manifest.log @@ -0,0 +1,79 @@ +✓ smoke-uea-derive-evm 1 test +✓ smoke-read-track-lookup 1 test +✓ smoke-cea-derive-evm 1 test +✓ smoke-roundtrip-evm 1 test +✓ smoke-roundtrip-svm 1 test +✓ smoke-cea-pda-svm 1 test +✓ smoke-gasfee-reads 2 tests +✓ smoke-gas-sizer 2 tests +✓ smoke-pc20-registry 2 tests +✓ smoke-pc20-resolve 1 test +✓ evm-r1-transfer 1 test +✓ evm-r1-funds-usdt 1 test +✓ evm-r1-funds-native 1 test +✓ evm-r1-value-funds-data 1 test +✓ evm-r1-bridge-multicall 1 test +✓ evm-r1-fresh-value-native 1 test +✓ evm-r2-funds-erc20 1 test +✓ evm-r2-payload 1 test +✓ evm-r2-multicall 1 test +✓ evm-r2-funds-payload 1 test +✓ evm-r2-native-funds 1 test +✓ evm-r2-native-funds-payload 1 test +✓ evm-r3-funds-erc20 1 test +✓ evm-r3-payload 1 test +✓ evm-r3-multicall 1 test +✓ evm-r3-funds-payload 1 test +✓ evm-r3-native-funds 1 test +✓ evm-r3-eoa-native-funds 1 test +✓ svm-r1-transfer 1 test +✓ svm-r1-funds-sol-self 1 test +✓ svm-r1-value-self 1 test +✓ svm-r1-data-contract 1 test +✓ svm-r1-fresh-key-repro 1 test +✓ svm-r2-funds-sol 1 test +✓ svm-r2-funds-spl 1 test +✓ svm-r2-payload-cpi 1 test +✓ svm-r2-sol-cpi 1 test +✓ svm-r3-drain-sol 1 test +✓ svm-r3-drain-spl 1 test +✓ pc20-export-deployed-wrapper 1 test +✓ pc20-export-predicts-wrapper 1 test +✓ pc20-inbound-burn-unlock 1 test +✓ pc20-r3-cea-burn 1 test +✓ pc20-svm-r1-direct-burn 1 test +✓ pc20-svm-r3-cea-ata-burn 1 test +✓ push-send-transaction 1 test +✓ push-value-own-uea 1 test +✓ push-multicall-no-funds 1 test +✓ push-track-r1-sepolia-parity 1 test +✓ push-track-r3-funds-roundtrip 1 test +✓ push-track-source-leg-hashes 2 tests +✓ xc-multi-child-r3 1 test +✓ xc-fresh-wallet-r3 1 test +✓ xc-peth-bridge-back 1 test +✓ xc-cascade-6hop 1 test +✓ read-evm-balance-eoa 1 test +✓ read-canonical-registry 1 test +✓ read-evm-balance-uea 1 test +✓ read-evm-contract-call 1 test +✓ read-evm-callback-reverts 1 test +✓ read-expiry 1 test +✓ read-svm-lamports 1 test +✓ read-web2-json 1 test +✓ read-docs-example 1 test +✓ read-docs-evm-balance 1 test +✓ read-docs-batch 1 test +✓ read-docs-resume 2 tests +✓ read-app-batch-eoa 1 test +✓ read-app-batch-uea 1 test +✓ read-app-batch-recovery 1 test +✓ read-api-token 1 test +✓ read-api-mixed-outcomes 1 test +✓ read-svm-token-auto 1 test +✓ read-svm-idl 1 test +✓ read-evm-any-mutability 1 test +✓ read-svm-raw 1 test + +76 scenarios, 40 spec files, 81 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/destinations-final-evm-spl.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/destinations-final-evm-spl.log new file mode 100644 index 00000000..9bcfcc3f --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/destinations-final-evm-spl.log @@ -0,0 +1,25 @@ +PASS core-e2e packages/core/__e2e__/agw/universal-evm.spec.ts (279.893 s) + ● Console + + console.log + [ExternalTxVerifier] Verifying EVM tx on eip155:11155111: 0x05842ed536ce0c298233bec9afd807a8c721513fc9092d079cccd916ac70f7bb + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx 0x05842ed536ce0c298233bec9afd807a8c721513fc9092d079cccd916ac70f7bb on eip155:11155111: status=0x1 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx CONFIRMED SUCCESS on eip155:11155111 + + at console.log (__e2e__/shared/logger.ts:42:5) + +PASS core-e2e packages/core/__e2e__/agw/svm-spl-transfer.spec.ts (142.869 s) + +Test Suites: 2 passed, 2 total +Tests: 3 passed, 3 total +Snapshots: 0 total +Time: 422.795 s, estimated 807 s +Ran all test suites within paths "packages/core/__e2e__/agw/svm-spl-transfer.spec.ts", "packages/core/__e2e__/agw/universal-evm.spec.ts". diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/destinations-initial-default.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/destinations-initial-default.log new file mode 100644 index 00000000..da8be10a --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/destinations-initial-default.log @@ -0,0 +1,36 @@ +FAIL core-e2e packages/core/__e2e__/agw/universal-evm.spec.ts (245.031 s) + ● Console + + console.log + [ExternalTxVerifier] Verifying EVM tx on eip155:11155111: 0xf91e4cc9e2605ff9f27d575ceb9e928dadddd1755a428112021ef9983738abb7 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx 0xf91e4cc9e2605ff9f27d575ceb9e928dadddd1755a428112021ef9983738abb7 on eip155:11155111: status=0x0 + + at console.log (__e2e__/shared/logger.ts:42:5) + + ● agw universal evm › 1. positive-amount outbound: allowance pull/burn, the wallet CEA executes on Sepolia, receipts and replay identity + + ExternalTxFailedError: [ExternalTxVerifier] EVM tx 0xf91e4cc9e2605ff9f27d575ceb9e928dadddd1755a428112021ef9983738abb7 on eip155:11155111 FAILED on-chain: receipt status=0x0 (expected 0x1). The external chain transaction reverted. + + 78 | // Definitive failure — receipt exists but tx reverted. No point retrying. + 79 | if (status !== '0x1') { + > 80 | throw new ExternalTxFailedError( + | ^ + 81 | `[ExternalTxVerifier] EVM tx ${txHash} on ${chainName} FAILED on-chain: receipt status=${status} (expected 0x1). The external chain transaction reverted.` + 82 | ); + 83 | } + + at verifyEvmTransaction (__e2e__/shared/external-tx-verifier.ts:80:15) + at async verifyExternalTransaction (__e2e__/shared/external-tx-verifier.ts:221:5) + at async Object. (__e2e__/agw/universal-evm.spec.ts:157:5) + +PASS core-e2e packages/core/__e2e__/agw/svm-public.spec.ts (304.031 s) + +Test Suites: 1 failed, 1 passed, 2 total +Tests: 1 failed, 7 passed, 8 total +Snapshots: 0 total +Time: 549.097 s +Ran all test suites within paths "packages/core/__e2e__/agw/universal-evm.spec.ts", "packages/core/__e2e__/agw/svm-public.spec.ts". diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/destinations-initial-explicit.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/destinations-initial-explicit.log new file mode 100644 index 00000000..e11df0a8 --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/destinations-initial-explicit.log @@ -0,0 +1,144 @@ +FAIL core-e2e packages/core/__e2e__/agw/universal-evm.spec.ts (759.246 s) + ● agw universal evm › 1. positive-amount outbound: allowance pull/burn, the wallet CEA executes on Sepolia, receipts and replay identity + + expect(received).toBe(expected) // Object.is equality + + Expected: "success" + Received: "timeout" + + 159 | expect(receipt.status).toBe(1); + 160 | expect(receipt.from).toBe(wallet); + > 161 | expect(receipt.externalStatus).toBe('success'); + | ^ + 162 | expect(receipt.externalTxHash).toBeTruthy(); + 163 | await verifyExternalTransaction(receipt.externalTxHash as string, SEPOLIA); + 164 | const destinationReceipt = await sep.getTransactionReceipt({ + + at Object. (__e2e__/agw/universal-evm.spec.ts:161:36) + +PASS core-e2e packages/core/__e2e__/agw/v5-multiasset.spec.ts (374.118 s) + ● Console + + console.log + [ExternalTxVerifier] Verifying EVM tx on eip155:11155111: 0x418ca768b33baf4ba472ac8b9349dad42dd02d99ff3c045a0fe76d34722902cd + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] Attempt 1 failed, retrying in 10000ms... + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx 0x418ca768b33baf4ba472ac8b9349dad42dd02d99ff3c045a0fe76d34722902cd on eip155:11155111: status=0x1 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx CONFIRMED SUCCESS on eip155:11155111 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] Verifying EVM tx on eip155:11155111: 0xa984c11996b92faacad565f4762dcf5dfdccf114060d9d2ba75b570e093fcbed + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx 0xa984c11996b92faacad565f4762dcf5dfdccf114060d9d2ba75b570e093fcbed on eip155:11155111: status=0x1 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx CONFIRMED SUCCESS on eip155:11155111 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] Verifying EVM tx on eip155:11155111: 0x5e2c328d16d3c6a9c728683ad1988698d69f9c5310ede64b56aa43d18add327d + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx 0x5e2c328d16d3c6a9c728683ad1988698d69f9c5310ede64b56aa43d18add327d on eip155:11155111: status=0x1 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx CONFIRMED SUCCESS on eip155:11155111 + + at console.log (__e2e__/shared/logger.ts:42:5) + +FAIL core-e2e packages/core/__e2e__/agw/svm-spl-transfer.spec.ts (47.75 s) + ● agw svm spl transfer › 1. owner funds-only SPL delivery credits the recipient ATA and preserves burn, allowance and replay + + AgenticError: SOURCE_TOKEN_ADDRESS read on 0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34 failed at block 23994097 + + 51 | })) as T; + 52 | } catch (cause) { + > 53 | throw new AgenticError( + | ^ + 54 | this.failCode, + 55 | `${functionName} read on ${address} failed at block ${this.blockNumber}`, + 56 | { + + at Snapshot.read (src/lib/agentic/reads/snapshot.ts:53:13) + at async quoteSvmRequest (src/lib/agentic/execution/svm-quote.ts:39:15) + at async sendPublicSvm (src/lib/agentic/execution/svm-public.ts:146:19) + at async Object. (__e2e__/agw/svm-spl-transfer.spec.ts:121:16) + + Cause: + ContractFunctionExecutionError: Position `32` is out of bounds (`0 < position < 32`). + + Contract Call: + address: 0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34 + function: SOURCE_TOKEN_ADDRESS() + + Docs: https://viem.sh/docs/contract/readContract + Version: viem@2.27.2 + + 43 | ): Promise { + 44 | try { + > 45 | return (await this.reader.readContract({ + | ^ + 46 | address, + 47 | abi, + 48 | functionName, + + at getContractError (../../node_modules/viem/utils/errors/getContractError.ts:78:10) + at readContract (../../node_modules/viem/actions/public/readContract.ts:136:27) + at async Snapshot.read (src/lib/agentic/reads/snapshot.ts:45:15) + at async quoteSvmRequest (src/lib/agentic/execution/svm-quote.ts:39:15) + at async sendPublicSvm (src/lib/agentic/execution/svm-public.ts:146:19) + at async Object. (__e2e__/agw/svm-spl-transfer.spec.ts:121:16) + + Cause: + PositionOutOfBoundsError: Position `32` is out of bounds (`0 < position < 32`). + + Version: viem@2.27.2 + + 43 | ): Promise { + 44 | try { + > 45 | return (await this.reader.readContract({ + | ^ + 46 | address, + 47 | abi, + 48 | functionName, + + at Object.assertPosition (../../node_modules/viem/utils/cursor.ts:79:13) + at Object.setPosition (../../node_modules/viem/utils/cursor.ts:210:10) + at decodeString (../../node_modules/viem/utils/abi/decodeAbiParameters.ts:357:12) + at decodeParameter (../../node_modules/viem/utils/abi/decodeAbiParameters.ts:113:39) + at decodeAbiParameters (../../node_modules/viem/utils/abi/decodeAbiParameters.ts:75:31) + at decodeFunctionResult (../../node_modules/viem/utils/abi/decodeFunctionResult.ts:161:37) + at readContract (../../node_modules/viem/actions/public/readContract.ts:129:32) + at async Snapshot.read (src/lib/agentic/reads/snapshot.ts:45:15) + at async quoteSvmRequest (src/lib/agentic/execution/svm-quote.ts:39:15) + at async sendPublicSvm (src/lib/agentic/execution/svm-public.ts:146:19) + at async Object. (__e2e__/agw/svm-spl-transfer.spec.ts:121:16) + +Test Suites: 2 failed, 1 passed, 3 total +Tests: 2 failed, 4 passed, 6 total +Snapshots: 0 total +Time: 1181.178 s +Ran all test suites within paths "packages/core/__e2e__/agw/universal-evm.spec.ts", "packages/core/__e2e__/agw/v5-multiasset.spec.ts", "packages/core/__e2e__/agw/svm-spl-transfer.spec.ts". diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/docs.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/docs.log new file mode 100644 index 00000000..8d1582db --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/docs.log @@ -0,0 +1 @@ +AGW guide: 10 TypeScript blocks typechecked against public exports; no examples executed. diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/full-unit.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/full-unit.log new file mode 100644 index 00000000..b73697e7 --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/full-unit.log @@ -0,0 +1,173 @@ +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/universal/account/account.spec.ts (9.962 s) + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/labels.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts + +Test Suites: 1 skipped, 120 passed, 120 of 121 total +Tests: 12 skipped, 2014 passed, 2026 total +Snapshots: 0 total +Time: 31.572 s +Ran all test suites. diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/funding-preflight-dry-run.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/funding-preflight-dry-run.log new file mode 100644 index 00000000..ba4db232 --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/funding-preflight-dry-run.log @@ -0,0 +1,27 @@ +AGW deployment manifest verified on-chain. +Solana wire fixture verified read-only before funding. + +Wallets + EVM master (Sepolia) 0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf + Push master (Donut) 0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf + Solana master (Devnet) 3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb + Shared UEA (Donut) 0x5C70C864Cf1aDfB04A0e107fFA248ba3600EAb8D + UEA CEA PDA (Devnet) Fqp8UeJxEWvN1Ciu5jqrA3opGXwNvRL2HfJxNQotj3Qh + +Group "agw" — 58 scenarios, headroom ×1.25. + +┌────────────────────────┬───────────┬──────────┬─────────────┬────────┐ +│ Scope │ Asset │ Need │ Have │ Status │ +├────────────────────────┼───────────┼──────────┼─────────────┼────────┤ +│ EVM master (Sepolia) │ ETH │ 0.027500 │ 3.8372 │ ✓ │ +│ Push master (Donut) │ PC │ 588.8125 │ 969762.3672 │ ✓ │ +│ Push master (Donut) │ pETH │ 0.000014 │ 434.3115 │ ✓ │ +│ Push master (Donut) │ pSOL │ 0.000150 │ 5.7690 │ ✓ │ +│ Push master (Donut) │ pUSDT.sol │ 0.001250 │ 10006.8169 │ ✓ │ +│ Push master (Donut) │ pUSDC.eth │ 0.000014 │ 44642.9077 │ ✓ │ +│ Solana master (Devnet) │ SOL │ 0.013750 │ 0.615391 │ ✓ │ +│ UEA (Donut) │ PC │ 15.0000 │ 6193.4999 │ ✓ │ +└────────────────────────┴───────────┴──────────┴─────────────┴────────┘ + +All master wallets can cover this run. +Derived accounts are already at target. Ready to run. diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/labels-live.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/labels-live.log new file mode 100644 index 00000000..eeca3068 --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/labels-live.log @@ -0,0 +1,16 @@ +PASS core-e2e packages/core/__e2e__/agw/labels.spec.ts (317.919 s) + agw labels + ✓ 1. default and custom deployment labels are stored and listed (57364 ms) + ✓ 2. owner rename and empty reset update info/list, emit LabelSet and tick the owner door (44096 ms) + ✓ 3. UTF-8 byte boundaries are accepted or rejected without changing wallet state (22232 ms) + ✓ 4. an agent cannot rename through either the SDK or the contract (17619 ms) + ✓ 5. an external EVM owner creates and renames through its UEA (52898 ms) + ✓ 6. a Solana-origin owner creates, renames and resets through its UEA (48788 ms) + ✓ 7. renaming an active wallet preserves rules, spend and remaining agent budget (46853 ms) + ✓ 8. a failed owner batch rolls back the earlier rename and all checkpoints (16207 ms) + +Test Suites: 1 passed, 1 total +Tests: 8 passed, 8 total +Snapshots: 0 total +Time: 317.944 s +Ran all test suites within paths "packages/core/__e2e__/agw/labels.spec.ts". diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/lint.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/lint.log new file mode 100644 index 00000000..b494a098 --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/lint.log @@ -0,0 +1,11 @@ + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/svm-spl-transfer.spec.ts + 171:51 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 177:49 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/v5-multiasset.spec.ts + 35:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 274:39 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 333:28 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +✖ 5 problems (0 errors, 5 warnings) diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/manifest.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/manifest.log new file mode 100644 index 00000000..ac1e6f4f --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/manifest.log @@ -0,0 +1,61 @@ +✓ agw-create-bare 1 test +✓ agw-create-rules 1 test +✓ agw-funding-pc 1 test +✓ agw-funding-allowance 1 test +✓ agw-native-batch 1 test +✓ agw-native-batch-rollback 1 test +✓ agw-native-agent 1 test +✓ agw-native-owner 1 test +✓ agw-native-over-cap 1 test +✓ agw-native-stranger 1 test +✓ agw-native-revoked 1 test +✓ agw-native-expired 1 test +✓ agw-lifecycle-add 1 test +✓ agw-lifecycle-update 1 test +✓ agw-lifecycle-checkpoints 1 test +✓ agw-lifecycle-revoke-all 1 test +✓ agw-universal-outbound 1 test +✓ agw-v5-multi-asset 1 test +✓ agw-v5-call-only 1 test +✓ agw-universal-dest-revert 1 test +✓ agw-identity-evm 1 test +✓ agw-identity-first-use 1 test +✓ agw-identity-solana 1 test +✓ agw-responses-hooks 1 test +✓ agw-responses-replay 1 test +✓ agw-public-svm-1 1 test +✓ agw-public-svm-2 1 test +✓ agw-public-svm-3 1 test +✓ agw-public-svm-4 1 test +✓ agw-public-svm-5 1 test +✓ agw-public-svm-6 1 test +✓ agw-labels-1 1 test +✓ agw-labels-2 1 test +✓ agw-labels-3 1 test +✓ agw-labels-4 1 test +✓ agw-labels-5 1 test +✓ agw-labels-6 1 test +✓ agw-labels-7 1 test +✓ agw-labels-8 1 test +✓ agw-v5-independent-token-budgets 1 test +✓ agw-owner-spl-transfer 1 test +✓ agw-extended-prefunding 1 test +✓ agw-extended-ambiguous-rules 1 test +✓ agw-extended-batched-lifecycle 1 test +✓ agw-extended-invalid-revoke 1 test +✓ agw-extended-stale-update 1 test +✓ agw-extended-index-race 1 test +✓ agw-extended-native-policy-1 1 test +✓ agw-extended-native-policy-2 1 test +✓ agw-extended-native-policy-3 1 test +✓ agw-extended-native-policy-4 1 test +✓ agw-extended-native-policy-5 1 test +✓ agw-extended-native-policy-6 1 test +✓ agw-extended-native-policy-7 1 test +✓ agw-extended-native-policy-8 1 test +✓ agw-extended-native-policy-9 1 test +✓ agw-extended-native-policy-10 1 test +✓ agw-extended-native-policy-11 1 test + +58 scenarios, 14 spec files, 58 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/native-sol-final.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/native-sol-final.log new file mode 100644 index 00000000..9755829b --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/native-sol-final.log @@ -0,0 +1,14 @@ +PASS core-e2e packages/core/__e2e__/agw/svm-public.spec.ts (337.85 s) + agw public svm + ✓ 1. named IDL grant reads exact constraints and replaces atomically (24961 ms) + ✓ 2. public send confirms actual CEA transfer and preserves replay identity (95840 ms) + ✓ 3. contract simulation maps account and data refusals without state changes (22467 ms) + ✓ 4. public revoke removes the Solana rule and subsequent sends are refused (14659 ms) + ✓ 5. owner funds-only transfer reaches the recipient and replays with the same amount (111114 ms) + ✓ 6. agents still require an instruction and owner allowance failures do not sign (11055 ms) + +Test Suites: 1 passed, 1 total +Tests: 6 passed, 6 total +Snapshots: 0 total +Time: 337.879 s +Ran all test suites within paths "packages/core/__e2e__/agw/svm-public.spec.ts". diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/package.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/package.log new file mode 100644 index 00000000..8e1b97e4 --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/package.log @@ -0,0 +1 @@ +AGW package: CJS/ESM imports, compiled declaration examples and npm contents pass. No examples executed/published. diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/logs/types.log b/plan/agw/research/extended-v5-e2e-2026-10-07/logs/types.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/extended-v5-e2e-2026-10-07/spl-metadata-probe.json b/plan/agw/research/extended-v5-e2e-2026-10-07/spl-metadata-probe.json new file mode 100644 index 00000000..fd05e141 --- /dev/null +++ b/plan/agw/research/extended-v5-e2e-2026-10-07/spl-metadata-probe.json @@ -0,0 +1,7 @@ +{ + "block": "23994422", + "token": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34", + "rawReturn": "0x0000000000000000000000000000000000000000000000000000000000000000", + "mintHex": "0x0000000000000000000000000000000000000000000000000000000000000000", + "mintBase58": "11111111111111111111111111111111" +} diff --git a/plan/agw/research/live-acceptance-2026-10-06/README.md b/plan/agw/research/live-acceptance-2026-10-06/README.md new file mode 100644 index 00000000..70696912 --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/README.md @@ -0,0 +1,76 @@ +# Donut live acceptance — October 6, 2026 + +Branch `feat/agw-sdk-v4`; runtime commits `a66ff7d` and `b68bab7`, acceptance-test commit `ab42b84`; deployed source `e8db74815cfbbf5389593805e464fe8d85f7f735`. This report supersedes the earlier restricted-environment and unrun-live status. Test funding and broadcasts were authorized by Shoaib. No contract was deployed and no team message was sent. + +## Validation + +| Check | Result | +| --- | --- | +| Full, unfiltered core unit suite | 1,947 passed, 0 failed; 12 existing skips; 113 passed suites, 1 skipped | +| SDK against actual v4 contracts on Anvil | 53 passed in 7 suites, including all 7 SVM integration cases | +| Focused gas/agent-send regressions | 36 passed | +| Typechecks | lib, spec, local harness and portable AGW E2E config pass | +| Build | Nx core:build passes | +| Changed AGW, VM client and acceptance-file lint | 0 errors; existing warnings retained | +| Existing full-core lint | 7 pre-existing errors in unchanged files | +| Explorer ABI comparison | All 5 ABI entry sets match the isolated source build | +| Public SDK Donut derive | Pass; read-only result recorded in the prior v4 report directory | +| Opt-in scenario selection | AGW remains 25 scenarios; default all remains 76 | + +The 53 Anvil cases include actual factory/wallet/engine/validator/URP contracts, with gateway/core/token/executor fixtures. SVM uses encoded Solana terms/payloads inside that local EVM harness; this does not establish live Solana CPI or settlement. The separate 10 Foundry checks are not counted as 10 more SDK integration cases. + +## Funded checks completed + +All 25 registered AGW scenarios have passing live coverage across sequential selected runs. [Per-scenario results and log links](scenario-results.json). These include: + +- Bare wallet creation and information reads. +- Creation with a native rule. +- Native agent transfer, owner transfer, over-cap rejection and stranger initialization rejection. +- Public two-asset grant/read/atomic update, including its five checkpoint ticks. +- Call-only outbound, with confirmed Sepolia delivery through the wallet's CEA. +- Positive-amount outbound: wallet token debit, bounded allowance reduction, confirmed Sepolia receipt, CEA balance increase and replay identity all pass. +- Destination revert: the Push leg succeeds and the receipt classifies the external outcome as failed. + +This was not one complete group invocation: each registered title has a passing selected-run result, with fresh bounded fixtures. Logs include failed initial attempts as well as passing retries; a selected skip is not a pass. [Public wallet/transaction evidence](live-evidence.json) records events produced by successful cases. Individual cases without an evidence event remain verifiable in the saved Jest logs. + +The completed coverage also includes native EIP-7702 batching and rollback, native rule add/update/checkpoint/revoke-all, explicit allowance set/remove, response hooks/replay, revoked and expired rule rejection, existing EVM-origin UEA identity, fresh EVM UEA first-use fee handling and Solana-origin UEA identity on a Push destination. Public Solana destinations remain capability-gated. + +The initial lifecycle run asserted a removed diagnostic kind field from the test helper. On-chain spend/call counters matched. The obsolete field assertion was removed; the entire four-case lifecycle suite then passed. The independent counter, replacement/reset and checkpoint assertions were preserved. + +The fresh EVM first-use test now uses the configured public RPC fallback and waits for the origin funding receipt before spending. [Read-only origin budget preflight](origin-preflight.json) preceded the bounded 0.003 ETH transfer; the existing Solana-origin case uses the configured devnet key. Origin keys were not printed or committed. + +## Issues found and fixed + +1. Donut rejects eth_getLogs ranges larger than 1,000 blocks. Snapshot paging now requests contiguous windows of at most 1,000 blocks. The regression verifies boundary coverage; bare wallet info now passes live. +2. A native gas PRC20 can return a static zero address from SOURCE_TOKEN_ADDRESS(), while ERC20-backed PRC20s return a dynamic string. Native mapping now verifies the registered gas PRC20 before accepting the static-zero result; other malformed metadata fails. The public two-asset grant/read/update now passes live. +3. Viem simulation revert bytes can be in cause.raw. Error extraction preserves them; all seven formerly blocked SVM Anvil cases now pass with named errors. +4. The Sepolia acceptance reader was using viem's default paid dRPC endpoint. It now uses the SDK's configured public RPC fallback. This is test-only transport configuration. +5. The initial positive-amount AGW → gateway → token transaction reverted with its exact RPC gas estimate. At the preceding block, replay fails at 483,168 gas and succeeds at 500,000 and larger limits. Direct gateway and token replays succeed. [Receipt and replay evidence](positive-revert-probe.json) isolates insufficient nested-call gas headroom. Estimated VM-client contract gas now receives 20% headroom, rounded up, consistent with the existing EIP-7702 path. Explicit gas limits and the 21,000-gas code-free EOA path are unchanged. This Push execution limit is separate from destination gas and the URP PC budget. The regression checks the observed estimate, explicit-gas preservation and EOA/delegated-account behavior. The passing Push receipt additionally records the exact pETH transfer from wallet to C1 and its C1-to-zero burn. [Push receipt/events and gas](positive-push-events.json). + +## Funding and evidence boundaries + +The loader uses packages/core/.env. Key values stay in memory and are redacted from copied artifacts; no key was printed or committed. [Read-only preflight](preflight.json) verifies chain 42101, deployment wiring, balances and bounded reserves before funding. Outbound setup uses a fresh wallet, 21 PC (20 PC ceiling plus 1), 0.000003 pETH and a bounded 0.000002 pETH gateway allowance. Each fresh Push agent receives 0.5 PC. Funding is separate from creation/rule grants. + +Unspent funds can remain in fresh master-owned test wallets; no shared wallet was revoked or drained. Destination success checks use a fresh wallet CEA and independently verify its balance increase. A read-only check of the confirmed Sepolia receipt additionally verifies the `UniversalTxExecuted` emitter equals that CEA, originCaller equals the AGW, and target/data equal the intended counter/increment. [Attribution evidence](positive-destination-execution.json). The same assertion is now in the live test without submitting a duplicate funded transaction for that extra receipt check. creditRevert remains an executor dependency. A real far-side failure must not be treated as restoring the policy spend. + +[Sanitized logs](logs/) preserve commands' output and initial failures; trailing whitespace/extra EOF blank lines were normalized for Git. No full security audit or complete release acceptance is claimed. Product H3/H4.5/H6, ref/label scope and public SVM mapping are separate remaining decisions. + +## Reproduction + +From the SDK root, using the existing local test environment: + +```sh +AGW_LOCAL_DIR="${TMPDIR:-/tmp}/push-agw-local-v4" node node_modules/jest/bin/jest.js --config packages/core/jest.agw-local.config.ts --runInBand +node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand +node node_modules/typescript/bin/tsc --project packages/core/tsconfig.lib.json --noEmit +node node_modules/typescript/bin/tsc --project packages/core/tsconfig.spec.json --noEmit +node node_modules/typescript/bin/tsc --project packages/core/tsconfig.agw-local.json --noEmit +node node_modules/typescript/bin/tsc --project plan/agw/research/v4-implementation-2026-10-06/tsconfig.agw-e2e.json --noEmit +NX_DAEMON=false node node_modules/nx/bin/nx.js run core:build --skip-nx-cache +``` + +The opt-in live command submits transactions and spends testnet funds. Use the same verified manifest and bounded fixtures, run sequentially, and choose scenarios deliberately: + +```sh +AGW_E2E=1 AGW_E2E_AGENT_PC=0.5 node node_modules/jest/bin/jest.js --config packages/core/jest.e2e.config.ts --runInBand --forceExit --runTestsByPath packages/core/__e2e__/agw/universal-evm.spec.ts +``` diff --git a/plan/agw/research/live-acceptance-2026-10-06/live-evidence.json b/plan/agw/research/live-acceptance-2026-10-06/live-evidence.json new file mode 100644 index 00000000..9399561b --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/live-evidence.json @@ -0,0 +1,145 @@ +[ + { + "name": "create-with-rule", + "at": "2026-10-05T21:06:35.105Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x428325Ce3966A4B32D8B1d929AB0Df0723042Da4", + "rulesIds": [ + "0x6f7881f8a6e019f0a91d639dfd26170eebf12884348ed8f7f0490ed0f85e1ddf" + ], + "tx": "0xac162329f85fac96ca3fadd453aa151a92f224033f88fa49a4a33062dbd81fc0", + "atomic": true + }, + { + "name": "native-agent-send", + "at": "2026-10-05T21:07:11.307Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0xc8982105786701598aE2A4E6685304074e7e99f0", + "rulesId": "0xfe24f47d822c340f0ccfac6c3fb70ea6337c52f27dad2cf5949fdf14cb07a6ae", + "tx": "0x18a59103e292e5b4a70e6ea1bdb14dbccf7e04e0562f6a2cefbfc219cde2bf43", + "block": "23934793" + }, + { + "name": "create-bare", + "at": "2026-10-05T21:10:27.937Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x91B812Fa58775a6C287658d2A51Ff899aDF3308E", + "index": 3, + "tx": "0xa9e5f13e0d4629e0be1746d0c8fe0646a9c65c4bd42256d2bb8eae7e09dd8865", + "block": "23934869" + }, + { + "name": "v4-two-token-replacement", + "at": "2026-10-05T21:16:54.137Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0xcd9FB65aeDB3b200163D3209520926181a2C0611", + "oldId": "0xef98211b8734b57da5fba9ad7b32e3b5e7e6c3779e4ad86c22e2882b21810f77", + "newId": "0xeef1b885580ab2ae5ea2a1e112e72f4df94d7e2173406c400f697b4b68da4341", + "txHash": "0x31e2c657ba10d4da07c7453c8a41810af9d7e9152d9e48b5155d623a29e09f5a" + }, + { + "name": "v4-call-only", + "at": "2026-10-05T21:21:18.546Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x4780C8fd6643387BB1af016CB750fe0b8F17ed5e", + "pushTx": "0x7fb0792747909149da3c8975aaba43a80224a20544c41ac88c04a3cf899c9926", + "externalTx": "0xadb89cd9cfb70fd33b9eaa2e05b109b0a9a26d3fb9221e8dc28cd8cf8d4f27fe" + }, + { + "name": "universal-outbound", + "at": "2026-10-05T21:51:27.498Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x1C015E6B101ad2965D9912437c2499262Ef8F502", + "cea": "0x485E0aF54D8944ebDF9a3eC9641D8aB838b7C590", + "rulesId": "0xa7b3993ea6ec9794d0d46574def4379a96340773e242fbc6082c2c5c690902a4", + "pushTx": "0x3236bbc8f2029f53a2aa09d0c0d3cd291568bbaccf4de70061ecd085d4adcb3e", + "externalTx": "0x1dac9f08f651c30e0c2de11c42c8df8bbcbd12484575b536e4d42f40819989ea", + "amount": "1000000000000" + }, + { + "name": "universal-destination-revert", + "at": "2026-10-05T21:53:12.285Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x1C015E6B101ad2965D9912437c2499262Ef8F502", + "pushTx": "0xe64f8e09992b059feaaf77a00182f2337105479af028212876b5031f2363f71e", + "externalStatus": "failed" + }, + { + "name": "native-agent-batch", + "at": "2026-10-05T21:56:41.474Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x93e17E662a68fAD566A9BF85B864e44e13e17c4F", + "rulesId": "0x1bbae44588285709fd2b6a7819e9c7b2cfecfb9d1d434bca710d5693e2a46804", + "tx": "0x33aa4cceb64dc6652324aaab72917212a27cab191d353cd311ec81b7fa648679" + }, + { + "name": "native-agent-batch-rollback", + "at": "2026-10-05T21:57:09.796Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0xBab9effbE66F51aF9Ca592472C80536EE87B0C0b", + "rulesId": "0x1bbae44588285709fd2b6a7819e9c7b2cfecfb9d1d434bca710d5693e2a46804" + }, + { + "name": "replay-identity", + "at": "2026-10-05T21:58:18.163Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x4114E1aE8e076818336da09e3B3A3a7a11258766", + "tx": "0xbf615e5c7dda51d0b448a792bfcd446de8ca49b1939d453cd4a92044db1bf236" + }, + { + "name": "allowance-set-remove", + "at": "2026-10-05T21:59:07.661Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x4A75e0060de0287987FFF9b33985119e448Ab0cE", + "token": "0x2971824Db68229D087931155C2b8bB820B275809", + "setTx": "0x8e0cfab44132e406fa3af77434f324def1bcb4ed7386dddff5d6b6c6854da3dd" + }, + { + "name": "rules-update", + "at": "2026-10-05T22:00:56.863Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x5657d413eC5f1d4Fa9Fc6a91210b29a5C399046F", + "original": "0x76aeb12a16f8dd99ce775fffc6642f28c8f99668cf509cee99ea1335c6d2f8d9", + "replacement": "0xd687e19b9ab378328b341320981ca4259682220ea589dee5a13b22ad46bc859a", + "tx": "0x21b1f56f999773e29c516c1944976ee923f972857211db1e8c005cb441e7526b", + "checkpointDelta": 5 + }, + { + "name": "external-evm-agent", + "at": "2026-10-05T22:02:03.221Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x24CB91b9284097E591F36476bBc2d165AAc51873", + "uea": "0x5C70C864Cf1aDfB04A0e107fFA248ba3600EAb8D", + "tx": "0xc3f7bd68a84b7042189cd5540917f5dfd8e9b991f0548511e80801df845b8ba7" + }, + { + "name": "first-use-uea", + "at": "2026-10-05T22:03:29.060Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0xa416185c2e1790A4f23da0Bb16FfEA95aca95EA1", + "uea": "0x0302B6d6dadDb35F3b5618b39E01C7bB874FC156" + }, + { + "name": "solana-origin-agent", + "at": "2026-10-05T22:04:00.125Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0xE66E9C651548f2f94d16F4daC9C872c5dEF4361a", + "uea": "0xad977a75D8BEd06579D6498b7e2e3885f9D31F15", + "tx": "0xf010a8c0690cd1b4696a8d5b186663bc1ffd7def8acee86016c5d552f96b03a0" + } +] diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-build.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-build.log new file mode 100644 index 00000000..bf76aced --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-build.log @@ -0,0 +1,11 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:98450) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-e2e-tsc.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-e2e-tsc.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-lib-tsc.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-lib-tsc.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-lint.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-lint.log new file mode 100644 index 00000000..f12c71c9 --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-lint.log @@ -0,0 +1,91 @@ + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local-advanced.spec.ts + 73:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 85:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 295:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 311:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 337:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 426:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local-batch.spec.ts + 44:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 90:37 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 91:46 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 98:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 106:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local-races.spec.ts + 54:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 99:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 117:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 145:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local.spec.ts + 47:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 48:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/harness.ts + 210:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 229:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 238:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 373:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/svm-internals.spec.ts + 86:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 119:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 189:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/v4-multiasset.spec.ts + 12:10 warning 'createWallet' is defined but never used @typescript-eslint/no-unused-vars + 78:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 92:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 176:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 188:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 325:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 335:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 353:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/vectors.spec.ts + 56:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 57:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 98:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 207:25 warning '_a' is assigned a value but never used @typescript-eslint/no-unused-vars + 208:25 warning '_b' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/identity-gas.spec.ts + 62:123 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/universal-evm.spec.ts + 27:10 warning 'v4' is defined but never used @typescript-eslint/no-unused-vars + 41:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/v4-multiasset.spec.ts + 17:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/codec.spec.ts + 373:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/management.spec.ts + 12:10 warning 'AgenticCapability' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts + 2:17 warning 'PUSH_NETWORK' is defined but never used @typescript-eslint/no-unused-vars + 41:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/reads-context.spec.ts + 374:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/response-surface.spec.ts + 4:3 warning 'getAddress' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts + 457:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/reads/rules.ts + 3:3 warning 'isAddress' is defined but never used @typescript-eslint/no-unused-vars + 11:3 warning 'CAPABILITY_DEPENDENCY' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/wallet.ts + 92:33 warning '_opts' is defined but never used @typescript-eslint/no-unused-vars + +✖ 51 problems (0 errors, 51 warnings) diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-live-lint.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-live-lint.log new file mode 100644 index 00000000..5800fb9e --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-live-lint.log @@ -0,0 +1,9 @@ + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/identity-gas.spec.ts + 112:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/universal-evm.spec.ts + 29:10 warning 'v4' is defined but never used @typescript-eslint/no-unused-vars + 43:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +✖ 3 problems (0 errors, 3 warnings) diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-local-tsc.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-local-tsc.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-selection-agw.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-selection-agw.log new file mode 100644 index 00000000..16369abf --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-selection-agw.log @@ -0,0 +1,28 @@ +✓ agw-create-bare 1 test +✓ agw-create-rules 1 test +✓ agw-funding-pc 1 test +✓ agw-funding-allowance 1 test +✓ agw-native-batch 1 test +✓ agw-native-batch-rollback 1 test +✓ agw-native-agent 1 test +✓ agw-native-owner 1 test +✓ agw-native-over-cap 1 test +✓ agw-native-stranger 1 test +✓ agw-native-revoked 1 test +✓ agw-native-expired 1 test +✓ agw-lifecycle-add 1 test +✓ agw-lifecycle-update 1 test +✓ agw-lifecycle-checkpoints 1 test +✓ agw-lifecycle-revoke-all 1 test +✓ agw-universal-outbound 1 test +✓ agw-v4-multi-asset 1 test +✓ agw-v4-call-only 1 test +✓ agw-universal-dest-revert 1 test +✓ agw-identity-evm 1 test +✓ agw-identity-first-use 1 test +✓ agw-identity-solana 1 test +✓ agw-responses-hooks 1 test +✓ agw-responses-replay 1 test + +25 scenarios, 9 spec files, 25 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-selection-all.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-selection-all.log new file mode 100644 index 00000000..dfa5f250 --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-selection-all.log @@ -0,0 +1,79 @@ +✓ smoke-uea-derive-evm 1 test +✓ smoke-read-track-lookup 1 test +✓ smoke-cea-derive-evm 1 test +✓ smoke-roundtrip-evm 1 test +✓ smoke-roundtrip-svm 1 test +✓ smoke-cea-pda-svm 1 test +✓ smoke-gasfee-reads 2 tests +✓ smoke-gas-sizer 2 tests +✓ smoke-pc20-registry 2 tests +✓ smoke-pc20-resolve 1 test +✓ evm-r1-transfer 1 test +✓ evm-r1-funds-usdt 1 test +✓ evm-r1-funds-native 1 test +✓ evm-r1-value-funds-data 1 test +✓ evm-r1-bridge-multicall 1 test +✓ evm-r1-fresh-value-native 1 test +✓ evm-r2-funds-erc20 1 test +✓ evm-r2-payload 1 test +✓ evm-r2-multicall 1 test +✓ evm-r2-funds-payload 1 test +✓ evm-r2-native-funds 1 test +✓ evm-r2-native-funds-payload 1 test +✓ evm-r3-funds-erc20 1 test +✓ evm-r3-payload 1 test +✓ evm-r3-multicall 1 test +✓ evm-r3-funds-payload 1 test +✓ evm-r3-native-funds 1 test +✓ evm-r3-eoa-native-funds 1 test +✓ svm-r1-transfer 1 test +✓ svm-r1-funds-sol-self 1 test +✓ svm-r1-value-self 1 test +✓ svm-r1-data-contract 1 test +✓ svm-r1-fresh-key-repro 1 test +✓ svm-r2-funds-sol 1 test +✓ svm-r2-funds-spl 1 test +✓ svm-r2-payload-cpi 1 test +✓ svm-r2-sol-cpi 1 test +✓ svm-r3-drain-sol 1 test +✓ svm-r3-drain-spl 1 test +✓ pc20-export-deployed-wrapper 1 test +✓ pc20-export-predicts-wrapper 1 test +✓ pc20-inbound-burn-unlock 1 test +✓ pc20-r3-cea-burn 1 test +✓ pc20-svm-r1-direct-burn 1 test +✓ pc20-svm-r3-cea-ata-burn 1 test +✓ push-send-transaction 1 test +✓ push-value-own-uea 1 test +✓ push-multicall-no-funds 1 test +✓ push-track-r1-sepolia-parity 1 test +✓ push-track-r3-funds-roundtrip 1 test +✓ push-track-source-leg-hashes 2 tests +✓ xc-multi-child-r3 1 test +✓ xc-fresh-wallet-r3 1 test +✓ xc-peth-bridge-back 1 test +✓ xc-cascade-6hop 1 test +✓ read-evm-balance-eoa 1 test +✓ read-canonical-registry 1 test +✓ read-evm-balance-uea 1 test +✓ read-evm-contract-call 1 test +✓ read-evm-callback-reverts 1 test +✓ read-expiry 1 test +✓ read-svm-lamports 1 test +✓ read-web2-json 1 test +✓ read-docs-example 1 test +✓ read-docs-evm-balance 1 test +✓ read-docs-batch 1 test +✓ read-docs-resume 2 tests +✓ read-app-batch-eoa 1 test +✓ read-app-batch-uea 1 test +✓ read-app-batch-recovery 1 test +✓ read-api-token 1 test +✓ read-api-mixed-outcomes 1 test +✓ read-svm-token-auto 1 test +✓ read-svm-idl 1 test +✓ read-evm-any-mutability 1 test +✓ read-svm-raw 1 test + +76 scenarios, 40 spec files, 81 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-spec-tsc.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-spec-tsc.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-unit.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-unit.log new file mode 100644 index 00000000..e82c719e --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-final-unit.log @@ -0,0 +1,166 @@ +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts + +Test Suites: 1 skipped, 113 passed, 113 of 114 total +Tests: 12 skipped, 1947 passed, 1959 total +Snapshots: 0 total +Time: 35.789 s, estimated 42 s +Ran all test suites. diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-gas-local.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-gas-local.log new file mode 100644 index 00000000..0c45b0e1 --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-gas-local.log @@ -0,0 +1,16 @@ +PASS core-agw-local packages/core/__agw-local__/svm-internals.spec.ts (15.775 s) +PASS core-agw-local packages/core/__agw-local__/v4-multiasset.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-races.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-batch.spec.ts +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts + +Test Suites: 7 passed, 7 total +Tests: 53 passed, 53 total +Snapshots: 0 total +Time: 28.564 s +Ran all test suites. +Jest did not exit one second after the test run has completed. + +'This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue. diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-gas-unit.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-gas-unit.log new file mode 100644 index 00000000..73b0b3eb --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-gas-unit.log @@ -0,0 +1,8 @@ +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts (5.439 s) +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts + +Test Suites: 2 passed, 2 total +Tests: 36 passed, 36 total +Snapshots: 0 total +Time: 5.713 s +Ran all test suites within paths "packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts", "packages/core/src/lib/vm-client/evm-client.spec.ts", "packages/core/src/lib/agentic/__tests__/send.spec.ts". diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-callonly.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-callonly.log new file mode 100644 index 00000000..83649c1a --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-callonly.log @@ -0,0 +1,26 @@ + console.log + [ExternalTxVerifier] Verifying EVM tx on eip155:11155111: 0xadb89cd9cfb70fd33b9eaa2e05b109b0a9a26d3fb9221e8dc28cd8cf8d4f27fe + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx 0xadb89cd9cfb70fd33b9eaa2e05b109b0a9a26d3fb9221e8dc28cd8cf8d4f27fe on eip155:11155111: status=0x1 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx CONFIRMED SUCCESS on eip155:11155111 + + at console.log (__e2e__/shared/logger.ts:42:5) + +PASS core-e2e packages/core/__e2e__/agw/v4-multiasset.spec.ts (102.469 s) + agw v4 multi-asset + ✓ 2. empty user assets routes a call-only outbound with zero token spend (89508 ms) + ○ skipped 1. public create reads and replaces an ordered two-token rule + +Test Suites: 1 passed, 1 total +Tests: 1 skipped, 1 passed, 2 total +Snapshots: 0 total +Time: 102.497 s +Ran all test suites within paths "packages/core/__e2e__/agw/v4-multiasset.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-final-cases.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-final-cases.log new file mode 100644 index 00000000..8ed7e563 --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-final-cases.log @@ -0,0 +1,182 @@ +PASS core-e2e packages/core/__e2e__/agw/lifecycle.spec.ts (93.065 s) +PASS core-e2e packages/core/__e2e__/agw/identity-gas.spec.ts (159.091 s) + ● Console + + console.log + [4.80s] AGENTIC-TX-107: Rule Resolved + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [4.81s] SEND-TX-101: Origin Chain Detected + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [4.82s] SEND-TX-102-01: Estimating Gas + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [5.17s] SEND-TX-103-01: Resolving Universal Execution Account + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [5.49s] SEND-TX-103-02: Universal Execution Account Resolved + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [5.49s] SEND-TX-103-03-04: Prepaid Deposit Estimated + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [7.80s] SEND-TX-104-01: Awaiting Transaction + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [9.70s] SEND-TX-105-01: Gas Funding In Progress + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [26.48s] SEND-TX-105-02: Gas Funding Confirmed + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [26.48s] SEND-TX-107: Broadcasting to Push Chain + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [39.43s] SEND-TX-199-01: Push Chain Tx Success + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [39.43s] AGENTIC-TX-199-01: Agentic Operation Done + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [41.82s] AGENTIC-TX-107: Rule Resolved + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [1.38s] AGENTIC-TX-107: Rule Resolved + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [41.82s] SEND-TX-101: Origin Chain Detected + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [1.38s] SEND-TX-101: Origin Chain Detected + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [41.82s] SEND-TX-102-01: Estimating Gas + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [1.38s] SEND-TX-102-01: Estimating Gas + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [42.15s] SEND-TX-103-01: Resolving Universal Execution Account + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [1.70s] SEND-TX-103-01: Resolving Universal Execution Account + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [42.80s] SEND-TX-103-02: Universal Execution Account Resolved + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [2.35s] SEND-TX-103-02: Universal Execution Account Resolved + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [42.80s] SEND-TX-103-03-04: Prepaid Deposit Estimated + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [2.35s] SEND-TX-103-03-04: Prepaid Deposit Estimated + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [43.43s] SEND-TX-104-02: Awaiting Signature + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [2.99s] SEND-TX-104-02: Awaiting Signature + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [43.43s] SEND-TX-104-03: Verification Success + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [2.99s] SEND-TX-104-03: Verification Success + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [43.43s] SEND-TX-107: Broadcasting to Push Chain + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [2.99s] SEND-TX-107: Broadcasting to Push Chain + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [51.01s] SEND-TX-199-01: Push Chain Tx Success + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [10.57s] SEND-TX-199-01: Push Chain Tx Success + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [51.01s] AGENTIC-TX-199-01: Agentic Operation Done + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [10.57s] AGENTIC-TX-199-01: Agentic Operation Done + + at console.log (__e2e__/shared/logger.ts:42:5) + +PASS core-e2e packages/core/__e2e__/agw/native-exec.spec.ts (113.845 s) + +Test Suites: 3 passed, 3 total +Tests: 4 skipped, 9 passed, 13 total +Snapshots: 0 total +Time: 366.042 s +Ran all test suites within paths "packages/core/__e2e__/agw/lifecycle.spec.ts", "packages/core/__e2e__/agw/native-exec.spec.ts", "packages/core/__e2e__/agw/identity-gas.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-management.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-management.log new file mode 100644 index 00000000..ff988910 --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-management.log @@ -0,0 +1,75 @@ +PASS core-e2e packages/core/__e2e__/agw/create.spec.ts (28.902 s) +FAIL core-e2e packages/core/__e2e__/agw/v4-multiasset.spec.ts (12.983 s) + ● agw v4 multi-asset › 1. public create reads and replaces an ordered two-token rule + + AgenticError: SOURCE_TOKEN_ADDRESS read on 0x2971824Db68229D087931155C2b8bB820B275809 failed at block 23934879 + + 43 | ): Promise { + 44 | try { + > 45 | return (await this.reader.readContract({ + | ^ + 46 | address, + 47 | abi, + 48 | functionName, + + at Snapshot.read (src/lib/agentic/reads/snapshot.ts:45:13) + at async prepareWalletRules (src/lib/agentic/management/prepare.ts:102:24) + at async createWallet (src/lib/agentic/management/create.ts:81:20) + at async Object. (__e2e__/agw/v4-multiasset.spec.ts:45:21) + + Cause: + ContractFunctionExecutionError: Position `32` is out of bounds (`0 < position < 32`). + + Contract Call: + address: 0x2971824Db68229D087931155C2b8bB820B275809 + function: SOURCE_TOKEN_ADDRESS() + + Docs: https://viem.sh/docs/contract/readContract + Version: viem@2.27.2 + + 35 | return new Snapshot(reader, block, failCode); + 36 | } + > 37 | + | ^ + 38 | async read( + 39 | address: Address, + 40 | abi: readonly unknown[], + + at getContractError (../../node_modules/viem/utils/errors/getContractError.ts:78:10) + at readContract (../../node_modules/viem/actions/public/readContract.ts:136:27) + at async Snapshot.read (src/lib/agentic/reads/snapshot.ts:37:15) + at async prepareWalletRules (src/lib/agentic/management/prepare.ts:102:24) + at async createWallet (src/lib/agentic/management/create.ts:81:20) + at async Object. (__e2e__/agw/v4-multiasset.spec.ts:45:21) + + Cause: + PositionOutOfBoundsError: Position `32` is out of bounds (`0 < position < 32`). + + Version: viem@2.27.2 + + 35 | return new Snapshot(reader, block, failCode); + 36 | } + > 37 | + | ^ + 38 | async read( + 39 | address: Address, + 40 | abi: readonly unknown[], + + at Object.assertPosition (../../node_modules/viem/utils/cursor.ts:79:13) + at Object.setPosition (../../node_modules/viem/utils/cursor.ts:210:10) + at decodeString (../../node_modules/viem/utils/abi/decodeAbiParameters.ts:357:12) + at decodeParameter (../../node_modules/viem/utils/abi/decodeAbiParameters.ts:113:39) + at decodeAbiParameters (../../node_modules/viem/utils/abi/decodeAbiParameters.ts:75:31) + at decodeFunctionResult (../../node_modules/viem/utils/abi/decodeFunctionResult.ts:161:37) + at readContract (../../node_modules/viem/actions/public/readContract.ts:129:32) + at async Snapshot.read (src/lib/agentic/reads/snapshot.ts:37:15) + at async prepareWalletRules (src/lib/agentic/management/prepare.ts:102:24) + at async createWallet (src/lib/agentic/management/create.ts:81:20) + at async Object. (__e2e__/agw/v4-multiasset.spec.ts:45:21) + +Test Suites: 1 failed, 1 passed, 2 total +Tests: 1 failed, 2 skipped, 1 passed, 4 total +Snapshots: 0 total +Time: 41.91 s +Ran all test suites within paths "packages/core/__e2e__/agw/create.spec.ts", "packages/core/__e2e__/agw/v4-multiasset.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-multiasset.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-multiasset.log new file mode 100644 index 00000000..32c66cd5 --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-multiasset.log @@ -0,0 +1,11 @@ +PASS core-e2e packages/core/__e2e__/agw/v4-multiasset.spec.ts (47.483 s) + agw v4 multi-asset + ✓ 1. public create reads and replaces an ordered two-token rule (31012 ms) + ○ skipped 2. empty user assets routes a call-only outbound with zero token spend + +Test Suites: 1 passed, 1 total +Tests: 1 skipped, 1 passed, 2 total +Snapshots: 0 total +Time: 47.514 s +Ran all test suites within paths "packages/core/__e2e__/agw/v4-multiasset.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-native-remaining.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-native-remaining.log new file mode 100644 index 00000000..0dca300e --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-native-remaining.log @@ -0,0 +1,34 @@ +FAIL core-e2e packages/core/__e2e__/agw/lifecycle.spec.ts (69.275 s) + ● agw lifecycle › 2. rules.update: old ID disabled, new ID usable with reset counters, five checkpoint ticks + + expect(received).toMatchObject(expected) + + - Expected - 1 + + Received + 0 + + Object { + "callsUsed": 1, + - "kind": "native", + "valueSpent": 10n, + } + + 73 | original + 74 | ); + > 75 | expect(spentBefore).toMatchObject({ + | ^ + 76 | kind: 'native', + 77 | valueSpent: BigInt(10), + 78 | callsUsed: 1, + + at Object. (__e2e__/agw/lifecycle.spec.ts:75:25) + +PASS core-e2e packages/core/__e2e__/agw/native-batch.spec.ts (85.028 s) +PASS core-e2e packages/core/__e2e__/agw/responses-hooks.spec.ts (68.355 s) +PASS core-e2e packages/core/__e2e__/agw/funding-allowance.spec.ts (49.494 s) + +Test Suites: 1 failed, 3 passed, 4 total +Tests: 1 failed, 9 passed, 10 total +Snapshots: 0 total +Time: 272.19 s +Ran all test suites within paths "packages/core/__e2e__/agw/native-batch.spec.ts", "packages/core/__e2e__/agw/lifecycle.spec.ts", "packages/core/__e2e__/agw/funding-allowance.spec.ts", "packages/core/__e2e__/agw/responses-hooks.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-native-smoke.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-native-smoke.log new file mode 100644 index 00000000..a2e2dabf --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-native-smoke.log @@ -0,0 +1,65 @@ +FAIL core-e2e packages/core/__e2e__/agw/create.spec.ts (39.418 s) + ● agw create › 1. bare wallet: factory records the owner and index, no rules, no implicit funding + + AgenticError: log scan for WalletDeployed failed for blocks 23923806-23934775 + + 82 | out.push(...(await reader.getLogs({ ...args, fromBlock: start, toBlock: end }))); + 83 | } catch (cause) { + > 84 | throw new AgenticError( + | ^ + 85 | AGENTIC_ERROR_CODE.RULE_READ_FAILED, + 86 | `log scan for ${args.event.name} failed for blocks ${start}-${end}`, + 87 | { cause } + + at scanLogs (src/lib/agentic/reads/snapshot.ts:84:13) + at async labelsFor (src/lib/agentic/reads/wallets.ts:78:16) + at async walletInfo (src/lib/agentic/reads/wallets.ts:183:18) + at async Object. (__e2e__/agw/create.spec.ts:49:18) + + Cause: + InvalidInputRpcError: Missing or invalid parameters. + Double check you have provided the correct parameters. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_getLogs","params":[{"address":"0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF","topics":["0xc8b37f011e9b6e64684cc9a96d216bbbc580aa1834cdbb981be54e529671b04c",null,null,"0x00000000000000000000000017d7f35da183685229694efd82b5701fd8b240d2"],"fromBlock":"0x16d0c5e","toBlock":"0x16d3737"}]} + + Details: maximum [from, to] blocks distance: 1000 + Version: viem@2.27.2 + + at delay.count.count (../../node_modules/viem/utils/buildRequest.ts:173:25) + at async attemptRetry (../../node_modules/viem/utils/promise/withRetry.ts:44:22) + + Cause: + InvalidInputRpcError: Missing or invalid parameters. + Double check you have provided the correct parameters. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_getLogs","params":[{"address":"0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF","topics":["0xc8b37f011e9b6e64684cc9a96d216bbbc580aa1834cdbb981be54e529671b04c",null,null,"0x00000000000000000000000017d7f35da183685229694efd82b5701fd8b240d2"],"fromBlock":"0x16d0c5e","toBlock":"0x16d3737"}]} + + Details: maximum [from, to] blocks distance: 1000 + Version: viem@2.27.2 + + at delay.count.count (../../node_modules/viem/utils/buildRequest.ts:173:25) + at async attemptRetry (../../node_modules/viem/utils/promise/withRetry.ts:44:22) + + Cause: + RpcRequestError: RPC Request failed. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_getLogs","params":[{"address":"0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF","topics":["0xc8b37f011e9b6e64684cc9a96d216bbbc580aa1834cdbb981be54e529671b04c",null,null,"0x00000000000000000000000017d7f35da183685229694efd82b5701fd8b240d2"],"fromBlock":"0x16d0c5e","toBlock":"0x16d3737"}]} + + Details: maximum [from, to] blocks distance: 1000 + Version: viem@2.27.2 + + at request (../../node_modules/viem/clients/transports/http.ts:154:19) + at async delay.count.count (../../node_modules/viem/utils/buildRequest.ts:150:22) + at async attemptRetry (../../node_modules/viem/utils/promise/withRetry.ts:44:22) + +PASS core-e2e packages/core/__e2e__/agw/native-exec.spec.ts (54.496 s) + +Test Suites: 1 failed, 1 passed, 2 total +Tests: 1 failed, 2 skipped, 5 passed, 8 total +Snapshots: 0 total +Time: 93.95 s +Ran all test suites within paths "packages/core/__e2e__/agw/create.spec.ts", "packages/core/__e2e__/agw/native-exec.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-positive-buffered.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-positive-buffered.log new file mode 100644 index 00000000..f3fb460a --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-positive-buffered.log @@ -0,0 +1,26 @@ + console.log + [ExternalTxVerifier] Verifying EVM tx on eip155:11155111: 0x1dac9f08f651c30e0c2de11c42c8df8bbcbd12484575b536e4d42f40819989ea + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx 0x1dac9f08f651c30e0c2de11c42c8df8bbcbd12484575b536e4d42f40819989ea on eip155:11155111: status=0x1 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx CONFIRMED SUCCESS on eip155:11155111 + + at console.log (__e2e__/shared/logger.ts:42:5) + +PASS core-e2e packages/core/__e2e__/agw/universal-evm.spec.ts (340.877 s) + agw universal evm + ✓ 1. positive-amount outbound: allowance pull/burn, the wallet CEA executes on Sepolia, receipts and replay identity (182705 ms) + ✓ 2. destination revert is classified on the receipt; the Push leg succeeded (104785 ms) + +Test Suites: 1 passed, 1 total +Tests: 2 passed, 2 total +Snapshots: 0 total +Time: 340.897 s +Ran all test suites within paths "packages/core/__e2e__/agw/universal-evm.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-positive.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-positive.log new file mode 100644 index 00000000..8b1b596f --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-live-positive.log @@ -0,0 +1,45 @@ +FAIL core-e2e packages/core/__e2e__/agw/universal-evm.spec.ts (59.44 s) + agw universal evm + ✕ 1. positive-amount outbound: allowance pull/burn, the wallet CEA executes on Sepolia, receipts and replay identity (9436 ms) + ○ skipped 2. destination revert is classified on the receipt; the Push leg succeeded + + ● agw universal evm › 1. positive-amount outbound: allowance pull/burn, the wallet CEA executes on Sepolia, receipts and replay identity + + AgenticRevertError: sendPushTx — Push Chain transaction 0x33b8ed9690023e9c8450ce2219f197e98da0412a49a267672ef7ddbe3fe48c27 reverted + + 135 | if (decoded || err instanceof PushChainExecutionError) { + 136 | const e = err as { message?: string; gatewayTxHash?: string; decodedError?: DecodedErrorPayload }; + > 137 | return new AgenticRevertError(e?.message ?? decoded?.name ?? 'AGW revert', { + | ^ + 138 | decodedError: decoded ?? e?.decodedError, + 139 | gatewayTxHash: e?.gatewayTxHash, + 140 | agenticCode: decoded?.name, + + at wrapSendError (src/lib/agentic/management/common.ts:137:12) + at agenticSend (src/lib/agentic/execution/send.ts:359:34) + at async Object. (__e2e__/agw/universal-evm.spec.ts:137:16) + + Cause: + PushChainExecutionError: sendPushTx — Push Chain transaction 0x33b8ed9690023e9c8450ce2219f197e98da0412a49a267672ef7ddbe3fe48c27 reverted + + 76 | receiptWaited = true; + 77 | if (receipt.status === 'reverted') { + > 78 | throw new PushChainExecutionError( + | ^ + 79 | `${label} — Push Chain transaction ${txHash} reverted` + 80 | ); + 81 | } + + at getIndexedPushTransaction (src/lib/orchestrator/internals/push-chain-tx.ts:78:17) + at async sendPushTx (src/lib/orchestrator/internals/push-chain-tx.ts:316:22) + at async executeStandardPayload (src/lib/orchestrator/internals/execute-standard.ts:173:12) + at async Orchestrator.executeWithPolicy (src/lib/orchestrator/orchestrator.ts:471:11) + at async agenticSend (src/lib/agentic/execution/send.ts:349:9) + at async Object. (__e2e__/agw/universal-evm.spec.ts:137:16) + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 1 skipped, 2 total +Snapshots: 0 total +Time: 59.469 s +Ran all test suites within paths "packages/core/__e2e__/agw/universal-evm.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/live-acceptance-2026-10-06/logs/agw-permissions-unit-final.log b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-permissions-unit-final.log new file mode 100644 index 00000000..3df9a6b8 --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/logs/agw-permissions-unit-final.log @@ -0,0 +1,166 @@ +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts + +Test Suites: 1 skipped, 113 passed, 113 of 114 total +Tests: 12 skipped, 1945 passed, 1957 total +Snapshots: 0 total +Time: 50.322 s +Ran all test suites. diff --git a/plan/agw/research/live-acceptance-2026-10-06/origin-preflight.json b/plan/agw/research/live-acceptance-2026-10-06/origin-preflight.json new file mode 100644 index 00000000..cc8ed342 --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/origin-preflight.json @@ -0,0 +1,9 @@ +{ + "checkedAt": "2026-10-05T21:57:16.868Z", + "sepoliaMasterBalanceETH": "3.840195032605851535", + "sepoliaFirstUseReserveETH": "0.004", + "sufficientForFirstUse": true, + "solanaMasterBalanceLamports": 615330949, + "solanaSlot": 507874335, + "transactionsSubmitted": false +} diff --git a/plan/agw/research/live-acceptance-2026-10-06/outbound-preflight.json b/plan/agw/research/live-acceptance-2026-10-06/outbound-preflight.json new file mode 100644 index 00000000..6f34ad08 --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/outbound-preflight.json @@ -0,0 +1,7 @@ +{ + "ownerPC": "970102.514236583381997743", + "ownerPETH": "434.311538549551169292", + "positiveOutboundReservePC": "25", + "positiveOutboundTokenAmount": "0.000003", + "sufficient": true +} diff --git a/plan/agw/research/live-acceptance-2026-10-06/positive-destination-execution.json b/plan/agw/research/live-acceptance-2026-10-06/positive-destination-execution.json new file mode 100644 index 00000000..fb32db79 --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/positive-destination-execution.json @@ -0,0 +1,20 @@ +{ + "chainId": 11155111, + "transactionHash": "0x1dac9f08f651c30e0c2de11c42c8df8bbcbd12484575b536e4d42f40819989ea", + "block": "11851537", + "status": "success", + "attributionAssertionsPass": true, + "executionEvents": [ + { + "emitter": "0x485e0af54d8944ebdf9a3ec9641d8ab838b7c590", + "eventName": "UniversalTxExecuted", + "args": { + "subTxId": "0x2e0cddd56aa8ceb6dcf89342a187207be138efc13d255ae296b00ff8747261de", + "universalTxId": "0x468b004e8920b299f06158f6fba82be8e8ac327abd107854ec7c8bee175ddc16", + "originCaller": "0x1C015E6B101ad2965D9912437c2499262Ef8F502", + "target": "0xF1552eD5ac48C273570500bD10b10C00E1C418bB", + "data": "0xd09de08a" + } + } + ] +} diff --git a/plan/agw/research/live-acceptance-2026-10-06/positive-push-events.json b/plan/agw/research/live-acceptance-2026-10-06/positive-push-events.json new file mode 100644 index 00000000..0b65fa63 --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/positive-push-events.json @@ -0,0 +1,50 @@ +{ + "chainId": 42101, + "transactionHash": "0x3236bbc8f2029f53a2aa09d0c0d3cd291568bbaccf4de70061ecd085d4adcb3e", + "block": "23935801", + "status": "success", + "gasLimit": "584699", + "gasUsed": "398931", + "transfers": [ + { + "token": "0x2971824db68229d087931155c2b8bb820b275809", + "args": { + "from": "0x1C015E6B101ad2965D9912437c2499262Ef8F502", + "to": "0x00000000000000000000000000000000000000C1", + "value": "1000000000000" + } + }, + { + "token": "0x2971824db68229d087931155c2b8bb820b275809", + "args": { + "from": "0x00000000000000000000000000000000000000C1", + "to": "0x0000000000000000000000000000000000000000", + "value": "1000000000000" + } + }, + { + "token": "0x2971824db68229d087931155c2b8bb820b275809", + "args": { + "from": "0x012d5C099f8AE00009f40824317a18c3A342f622", + "to": "0x00000000000000000000000000000000000000C0", + "value": "622648148500000" + } + }, + { + "token": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "args": { + "from": "0x00000000000000000000000000000000000000C0", + "to": "0x012d5C099f8AE00009f40824317a18c3A342f622", + "value": "1050217272734187113" + } + }, + { + "token": "0x2971824db68229d087931155c2b8bb820b275809", + "args": { + "from": "0x00000000000000000000000000000000000000C0", + "to": "0x0000000000000000000000000000000000000000", + "value": "622648148500000" + } + } + ] +} diff --git a/plan/agw/research/live-acceptance-2026-10-06/positive-revert-probe.json b/plan/agw/research/live-acceptance-2026-10-06/positive-revert-probe.json new file mode 100644 index 00000000..6a6768af --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/positive-revert-probe.json @@ -0,0 +1,132 @@ +{ + "receipt": { + "jsonrpc": "2.0", + "id": 1, + "result": { + "blockHash": "0xea6d93a1d7f273f80f82b53cc2d74bb29cde9113e158c000536ac6d2866d5ee6", + "blockNumber": "0x16d39a1", + "contractAddress": null, + "cumulativeGasUsed": "0x71d28", + "effectiveGasPrice": "0x430e2340", + "from": "0x582b101ad4db4890f38486047ab5dd3e65b1eb24", + "gasUsed": "0x71d28", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "status": "0x0", + "to": "0x2c7659030ea646b46d9f7e15c6dca7e64aceef56", + "transactionHash": "0x33b8ed9690023e9c8450ce2219f197e98da0412a49a267672ef7ddbe3fe48c27", + "transactionIndex": "0x0", + "type": "0x2" + } + }, + "transaction": { + "jsonrpc": "2.0", + "id": 1, + "result": { + "blockHash": "0xea6d93a1d7f273f80f82b53cc2d74bb29cde9113e158c000536ac6d2866d5ee6", + "blockNumber": "0x16d39a1", + "from": "0x582b101ad4db4890f38486047ab5dd3e65b1eb24", + "gas": "0x75f60", + "gasPrice": "0x430e2340", + "maxFeePerGas": "0x4ef9e540", + "maxPriorityFeePerGas": "0x7735940", + "hash": "0x33b8ed9690023e9c8450ce2219f197e98da0412a49a267672ef7ddbe3fe48c27", + "input": "0xc0ca77910c69104ab07365f615452dc733dbdf400ffdf6f90129f72d0b7a52e537d8f0c30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000002b800000000000000000000000000000000000000c1000000000000000000000000000000000000000000000000e6b73cb59223280077b86bec000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000002971824db68229d087931155c2b8bb820b275809000000000000000000000000000000000000000000000000000000e8d4a51000000000000000000000000000000000000000000000000000000000000007a1200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e6b73cb59223280000000000000000000000000000000000000000000000000000000000000001200000000000000000000000002c7659030ea646b46d9f7e15c6dca7e64aceef56000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001042cc2842d000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000f1552ed5ac48c273570500bd10b10c00e1c418bb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000004d09de08a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0", + "to": "0x2c7659030ea646b46d9f7e15c6dca7e64aceef56", + "transactionIndex": "0x0", + "value": "0x0", + "type": "0x2", + "accessList": [], + "chainId": "0xa475", + "v": "0x0", + "r": "0x237124e9d372930758f5b44d5897a505efc655a4b45f6c63fe4d10bdf4d6626f", + "s": "0x9170ee2602fe6c90815f31e8b2068717dd410c0169d921c6f7e9fc57625f2a8", + "yParity": "0x0" + } + }, + "trace": { + "jsonrpc": "2.0", + "id": 1, + "error": { + "code": -32601, + "message": "the method debug_traceTransaction does not exist/is not available" + } + }, + "replays": [ + { + "block": "0x16d39a0", + "response": { + "jsonrpc": "2.0", + "id": 1, + "error": { + "code": -32000, + "message": "execution reverted" + } + } + }, + { + "block": "0x16d39a1", + "response": { + "jsonrpc": "2.0", + "id": 1, + "error": { + "code": -32000, + "message": "execution reverted" + } + } + } + ], + "isolation": { + "block": "23935392", + "wallet": "0x2c7659030ea646b46d9f7e15c6dca7e64aceef56", + "amount": "1000000000000", + "gateway": "0x00000000000000000000000000000000000000C1", + "token": "0x2971824Db68229D087931155C2b8bB820B275809", + "probes": [ + { + "name": "wallet-high-gas", + "status": "success" + }, + { + "name": "gateway-direct", + "status": "success" + }, + { + "name": "token-pull", + "status": "success", + "data": "0x0000000000000000000000000000000000000000000000000000000000000001" + } + ] + }, + "gas_ladder": [ + { + "gas": 483168, + "success": false, + "error": { + "code": -32000, + "message": "execution reverted" + } + }, + { + "gas": 500000, + "success": true, + "error": null + }, + { + "gas": 600000, + "success": true, + "error": null + }, + { + "gas": 800000, + "success": true, + "error": null + }, + { + "gas": 1000000, + "success": true, + "error": null + } + ] +} diff --git a/plan/agw/research/live-acceptance-2026-10-06/preflight.json b/plan/agw/research/live-acceptance-2026-10-06/preflight.json new file mode 100644 index 00000000..4df7fa72 --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/preflight.json @@ -0,0 +1,15 @@ +{ + "checkedAt": "2026-10-05T21:04:12.624Z", + "chainId": 42101, + "block": "23934720", + "wiringVerified": true, + "ownerBalancePC": "970126.529158449381997743", + "nativeSmokeBudgetPC": "6", + "sufficientForNativeSmoke": true, + "keysPresent": { + "push": true, + "evm": true, + "solana": true + }, + "transactionsSubmitted": false +} diff --git a/plan/agw/research/live-acceptance-2026-10-06/preflight.ts b/plan/agw/research/live-acceptance-2026-10-06/preflight.ts new file mode 100644 index 00000000..2dc09ea5 --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/preflight.ts @@ -0,0 +1,30 @@ +/** Read-only. Key material stays in memory; never printed, copied or logged. */ +import { readFileSync, writeFileSync } from 'node:fs'; +import { join, resolve } from 'node:path'; +import dotenv from 'dotenv'; +import { createPublicClient, http, formatEther, parseEther } from 'viem'; +import { privateKeyToAccount } from 'viem/accounts'; +import { getPushViemChain } from '../../../../packages/core/src/lib/constants/chain'; +import { CHAIN } from '../../../../packages/core/src/lib/constants/enums'; +import { loadAgwManifest, verifyAgwManifest } from '../../../../packages/core/__e2e__/agw/_manifest'; + +async function main() { + const env = dotenv.parse(readFileSync(resolve(__dirname, '../../../../packages/core/.env'))); + const raw = env.PUSH_PRIVATE_KEY; + if (!raw || !/^0x[0-9a-fA-F]{64}$/.test(raw)) throw new Error('Configured PUSH_PRIVATE_KEY is missing or invalid'); + let account; + try { account = privateKeyToAccount(raw as `0x${string}`); } + catch { throw new Error('Configured PUSH_PRIVATE_KEY cannot be used'); } + const chain = getPushViemChain(CHAIN.PUSH_TESTNET_DONUT)!; + const client = createPublicClient({ chain, transport: http('https://evm.donut.rpc.push.org/') }); + if (await client.getChainId() !== 42101) throw new Error('Unexpected chain; no funding permitted'); + await verifyAgwManifest(client, loadAgwManifest()); + const [balance, block] = await Promise.all([client.getBalance({ address: account.address }), client.getBlockNumber()]); + const result = { checkedAt: new Date().toISOString(), chainId: 42101, block: block.toString(), wiringVerified: true, + ownerBalancePC: formatEther(balance), nativeSmokeBudgetPC: '6', sufficientForNativeSmoke: balance >= parseEther('6'), + keysPresent: { push: true, evm: !!env.EVM_PRIVATE_KEY, solana: !!env.SOLANA_PRIVATE_KEY }, transactionsSubmitted: false }; + writeFileSync(join(__dirname, 'preflight.json'), JSON.stringify(result, null, 2) + '\n'); + process.stdout.write(JSON.stringify(result, null, 2) + '\n'); + if (!result.sufficientForNativeSmoke) throw new Error('Owner balance is below the native smoke reserve; no funding performed'); +} +main().catch(() => { process.stderr.write('Read-only preflight did not complete; no funding was performed.\n'); process.exitCode = 1; }); diff --git a/plan/agw/research/live-acceptance-2026-10-06/scenario-results.json b/plan/agw/research/live-acceptance-2026-10-06/scenario-results.json new file mode 100644 index 00000000..7eb87d4e --- /dev/null +++ b/plan/agw/research/live-acceptance-2026-10-06/scenario-results.json @@ -0,0 +1,183 @@ +{ + "chainId": 42101, + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "scenariosPassed": 25, + "method": "Distinct registered scenarios passed across sequential selected runs; not a claim of one complete group invocation. Initial failures were corrected and retested; selection skips are not passes.", + "results": [ + { + "id": "agw-create-bare", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-management.log" + ] + }, + { + "id": "agw-create-rules", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-native-smoke.log" + ] + }, + { + "id": "agw-funding-pc", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-native-remaining.log" + ] + }, + { + "id": "agw-funding-allowance", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-native-remaining.log" + ] + }, + { + "id": "agw-native-batch", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-native-remaining.log" + ] + }, + { + "id": "agw-native-batch-rollback", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-native-remaining.log" + ] + }, + { + "id": "agw-native-agent", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-native-smoke.log" + ] + }, + { + "id": "agw-native-owner", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-native-smoke.log" + ] + }, + { + "id": "agw-native-over-cap", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-native-smoke.log" + ] + }, + { + "id": "agw-native-stranger", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-native-smoke.log" + ] + }, + { + "id": "agw-native-revoked", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-final-cases.log" + ] + }, + { + "id": "agw-native-expired", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-final-cases.log" + ] + }, + { + "id": "agw-lifecycle-add", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-final-cases.log" + ] + }, + { + "id": "agw-lifecycle-update", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-final-cases.log" + ] + }, + { + "id": "agw-lifecycle-checkpoints", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-final-cases.log" + ] + }, + { + "id": "agw-lifecycle-revoke-all", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-final-cases.log" + ] + }, + { + "id": "agw-universal-outbound", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-positive-buffered.log" + ] + }, + { + "id": "agw-v4-multi-asset", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-multiasset.log" + ] + }, + { + "id": "agw-v4-call-only", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-callonly.log" + ] + }, + { + "id": "agw-universal-dest-revert", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-positive-buffered.log" + ] + }, + { + "id": "agw-identity-evm", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-final-cases.log" + ] + }, + { + "id": "agw-identity-first-use", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-final-cases.log" + ] + }, + { + "id": "agw-identity-solana", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-final-cases.log" + ] + }, + { + "id": "agw-responses-hooks", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-native-remaining.log" + ] + }, + { + "id": "agw-responses-replay", + "status": "passed", + "evidenceLogs": [ + "logs/agw-live-native-remaining.log" + ] + } + ] +} diff --git a/plan/agw/research/live-svm-wire-2026-10-06/README.md b/plan/agw/research/live-svm-wire-2026-10-06/README.md new file mode 100644 index 00000000..5654ab32 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/README.md @@ -0,0 +1,80 @@ +# Live AGW Solana wire acceptance + +October 6, 2026. Internal SVM backend against verified Donut v4 contracts and Solana devnet. Public Solana Rule inputs/capability are still gated; no native/EVM behavior, public method, default, selector option or export changed. + +## Outcome + +| Work | Result | +| --- | --- | +| Read-only network/program preflight | Pass: Donut wiring/URP 3.1.0, devnet genesis, executable gateway/counter programs, ProgramData fingerprints, unpaused gateway Config and decoded counter | +| Positive internal outbound | Pass: actual Solana counter CPI plus System transfer from the AGW-derived CEA to the pinned owned recipient | +| SDK preflight refusals | Pass: substituted account / excessive instruction amount fail without advancing the agent nonce | +| Deployed policy refusals | Pass: read-only eth_call bypasses SDK validation and obtains SvmAccountPinMismatch and SvmDataCeilingExceeded, wrapped/truncated by SmartSession | +| Receipt/replay | Pass: wallet from, agent origin, SVM route, same external signature on replay and wait | +| Destination-error acceptance | Initial 600-second wait timed out; the same outbound later became REVERTED and read-only SDK replay returned failed, preserving Push status 1 | +| Concrete public API proposals | [Prepared for H4.4/H4.5/H6](../../public-api-proposals.md); no proposed public type/option enabled | + +The initial funded suite result is **2 passed, 1 failed**: its strict terminal-failure assertion received timeout at ten minutes. The platform subsequently published REVERTED for that exact outbound, and read-only replay confirmed failed without another funded submission. The failed assertion remains strict; its future bounded terminalization window is extended to twenty minutes. A full second funded run is not claimed. [Operational timing follow-up](platform-followup.md). Public SVM E2E coverage still requires the agreed public adapters. + +The follow-up **read-only E2E group passes 3/3** against these recorded transactions: success/identity/signature, terminal rejection/charged spend and deployed policy refusals. It performs no signing or funding. [Jest result](logs/replay.log). + +## Actual delivery + +- Push transaction: [0x50a96ff8…ee73b8](https://donut.push.network/tx/0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8), block 23949837. +- Solana transaction: [kGUaPUfA…PXKgK](https://explorer.solana.com/tx/kGUaPUfASg9Poo93aMsztHJjUk27MKuRJBfDZK1WP3FFSaXSYcoPcxjUMFyDxaK6aU6mQkZeowSu3MtvK5PXKgK?cluster=devnet). +- Wallet: 0x4612ad240cd66A77b921693BbbB356d1B8219b2c. +- CEA: Fuas2d6gmyPEpKgvBEHGhNgu99Nx8xVWmmf6cVFp4feY, derived from this wallet's 20 bytes under the configured gateway. +- Rules ID: 0x0ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d0. +- Destination program: 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx; counter PDA 6Kg1NF5RRytjGwR6USttBLEYJrqwm65xtJzdPbbFwJKg. +- Actual instruction: receive_sol(10000), with counter, pinned owned recipient, wallet CEA and System program accounts. + +The parsed transaction independently shows the counter program's inner instruction with the exact discriminator/amount and the wallet CEA account, and a System transfer of **10,000 lamports** from that CEA to the pinned recipient. The shared counter increased by at least this amount. Attribution relies on this transaction's CPI/transfer, not only a global counter change. Push-side policy spent increased; the agent call did not tick checkpoints. Replay resolved the same Solana signature. + +[Public live evidence](live-evidence.json) includes setup, receipt, parsed destination transaction, replay and initial timeout records. [Read-only replay](readonly-replay.json) separately verifies the wallet from, actual agent CAIP-10 origin, successful signature and later terminal failure. These contain public addresses/signatures and wire terms only; signer keys are not recorded. + +## Fixture and funding boundaries + +Preflight recorded Donut block 23949601 and Solana slot 508014048. The gateway is CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS. The local sibling counter source declares a different program ID, so it was not used as proof of deployed binary equivalence. We fingerprinted live ProgramData and verified actual instruction behavior against the selected SDK IDL. + +Setup creates a fresh owner-controlled AGW and a fresh native agent. It checks cluster/program/configuration and funding prerequisites before setup funding. Agent funding is at most 0.5 PC; wallet receives 41 PC for two outbounds capped at 20 PC each plus reserve; exactly 20,000 pSOL base units are funded/approved. No origin-chain deposit or Solana signing is needed; the existing Solana key is used internally only to identify the owned recipient. Each source send uses the separate owner-established allowance. No agent approval is inserted. + +Two source outbounds were submitted: positive and intentional destination rejection. The first live attempt failed in the new test's module bootstrap before any funding; its log is retained. The corrected attempt funded one fixture and submitted those two outbounds. Subsequent policy probes, rejection simulation, spend checks and replay were read-only; the rejected transaction was not rebroadcast. Unused PC remains in the owner-controlled wallet. The fresh agent key is not retained in the committed evidence. + +## Negative evidence and limitation + +The intended failure calls decrement(1) using the wallet CEA against a counter owned by a different authority. Solana read-only simulation independently returns custom error 6002/Unauthorized, with the actual counter authority and wallet CEA in its logs. It does not send a transaction or charge the simulated fee. [Simulation](destination-rejection-simulation.json). + +The actual Push outbound [0x51e2227e…410fc](https://donut.push.network/tx/0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc), block 23949885, succeeded. The first captured node state was PENDING without a hash/error, and the SDK's ten-minute wait accurately returned timeout. The [later record](failure-observation-final.json) is REVERTED (3), observed success=false and error "tx not executed on destination chain", with no Solana hash. Read-only SDK replay accurately returns failed; a missing destination hash is legitimate for a pre-broadcast rejection. + +The later record reports successful asset/gas refund executions at block 23950149. At block 23950160 the rule's pSOL spent is still 20,000. [Final accounting](terminal-accounting.json), block 23950641, independently checks returned wallet balance=10,000, allowance=0 and spent=20,000. Returning funds does not restore the rule budget: the separately documented creditRevert platform dependency remains. + +Direct deployed-URP probes at block 23949837 independently refuse account and instruction-data mutations. [Results](live-policy-probes.json). These were added to the final reusable E2E source after the funded run and exercised separately against its pinned historical state; no second funded run is claimed. + +## Code and validation + +- New opt-in agw-svm-wire group: 3 funded scenarios in one spec; agw-svm-replay: 3 read-only recorded-transaction scenarios in another spec. Default all remains 76 scenarios/81 tests; public AGW group remains 25 scenarios. +- Fixture preflight records account owners, discriminators, ProgramData hashes/upgrade slots, cluster genesis and Config paused state. Six unit cases cover substituted/missing/paused/wrong-cluster prerequisites. +- A shared eth_call probe verifies actual policy refusals independently of the SDK validator. +- Full units: **1,981 passed**, 12 existing skips; library/spec typechecks and core build pass. Changed-file lint has 0 errors and 21 non-null assertion warnings. No production library code changed; the earlier 75 local-contract cases were not rerun for this fixture-only change. +- Existing public replay adaptation is applied to the internal raw signer response, using the gateway wire call as the logical summary. That enables normal outbound wait without inventing public Solana instruction-display fields. + +[Logs](logs/): live-initial.log (unfunded bootstrap error), live-bootstrap-fixed.log (initial 2/1 funded result), replay.log (read-only acceptance), unit.log, lint.log. The funded runner redacts credential environment values before saving/printing logs. Its ten-minute timeout is retained as evidence; no timeout was relabeled failed or counted as a passing funded run. + +## Reproduction + +Read-only, no keys loaded: + +```sh +cd packages/core +node ../../node_modules/ts-node/dist/bin.js --transpile-only __e2e__/ci/agw-svm-preflight.ts ../../plan/agw/research/live-svm-wire-2026-10-06/preflight.json +node ../../node_modules/ts-node/dist/bin.js --transpile-only __e2e__/ci/run.ts --verify --group agw-svm-wire +node ../../node_modules/ts-node/dist/bin.js --transpile-only __e2e__/ci/run.ts --group agw-svm-replay +``` + +Funded opt-in run from the repository root, using the existing authorized testnet environment internally: + +```sh +node plan/agw/research/live-svm-wire-2026-10-06/run-redacted.cjs live.log +``` + +The replay group never signs or funds and can check these recorded hashes independently. Repeating the funded suite creates/funds a fresh fixture. Public Solana authoring/dispatch acceptance remains a later task after H4.4; this wire suite is an independent contract/node/destination proof. diff --git a/plan/agw/research/live-svm-wire-2026-10-06/destination-rejection-simulation.json b/plan/agw/research/live-svm-wire-2026-10-06/destination-rejection-simulation.json new file mode 100644 index 00000000..ce849df0 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/destination-rejection-simulation.json @@ -0,0 +1,58 @@ +{ + "at": "2026-10-06T07:32:23.955Z", + "wallet": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "cea": "Fuas2d6gmyPEpKgvBEHGhNgu99Nx8xVWmmf6cVFp4feY", + "program": "8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx", + "readOnlySimulation": true, + "transactionsSent": 0, + "slot": 508018651, + "result": { + "accounts": null, + "err": { + "InstructionError": [ + 0, + { + "Custom": 6002 + } + ] + }, + "fee": 5000, + "innerInstructions": null, + "loadedAccountsDataSize": 280057, + "loadedAddresses": { + "readonly": [], + "writable": [] + }, + "logs": [ + "Program 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx invoke [1]", + "Program log: Instruction: Decrement", + "Program log: AnchorError caused by account: counter. Error Code: Unauthorized. Error Number: 6002. Error Message: Unauthorized.", + "Program log: Left:", + "Program log: BesWssuCiGE3EqeGRFamuouvAxJDUCdWH6NPHpAFPMBa", + "Program log: Right:", + "Program log: Fuas2d6gmyPEpKgvBEHGhNgu99Nx8xVWmmf6cVFp4feY", + "Program 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx consumed 5387 of 200000 compute units", + "Program 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx failed: custom program error: 0x1772" + ], + "postBalances": [ + 615335949, + 4280640, + 1141440, + 0 + ], + "postTokenBalances": [], + "preBalances": [ + 615340949, + 4280640, + 1141440, + 0 + ], + "preTokenBalances": [], + "replacementBlockhash": { + "blockhash": "EyLpG12Ns8fdRbN6CzowR5CYRU6TPErXvwHRNf4ojYYQ", + "lastValidBlockHeight": 495260925 + }, + "returnData": null, + "unitsConsumed": 5387 + } +} \ No newline at end of file diff --git a/plan/agw/research/live-svm-wire-2026-10-06/failure-observation-final.json b/plan/agw/research/live-svm-wire-2026-10-06/failure-observation-final.json new file mode 100644 index 00000000..295c3a22 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/failure-observation-final.json @@ -0,0 +1,74 @@ +{ + "at": "2026-10-06T07:49:02.484Z", + "id": "f328cfa0af8a4e50afc3648205161759c02f1d0ddd27c40ba25f15990d084f36", + "record": { + "universalTx": { + "id": "f328cfa0af8a4e50afc3648205161759c02f1d0ddd27c40ba25f15990d084f36", + "pcTx": [ + { + "txHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "sender": "0xDfFb9e4cc2b869cF35ab811675333f40cD04dF76", + "gasUsed": 417241, + "blockHeight": 23949885, + "status": "SUCCESS", + "errorMsg": "" + } + ], + "outboundTx": [ + { + "destinationChain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "recipient": "0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", + "amount": "10000", + "externalAssetAddr": "0x0000000000000000000000000000000000000000", + "prc20AssetAddr": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "sender": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "payload": "0x000000024f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af01dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe8100000000106ae3a83bf81b96650100000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", + "gasLimit": "960", + "txType": 4, + "pcTx": { + "txHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "logIndex": "13" + }, + "observedTx": { + "success": false, + "blockHeight": 0, + "txHash": "", + "errorMsg": "tx not executed on destination chain", + "gasFeeUsed": "0", + "pc20WrapperAddress": "" + }, + "id": "d7e4da935abc97cbb68c0869dafa1e28038b89848c53650364250f60cd11e1ef", + "outboundStatus": 3, + "revertInstructions": { + "fundRecipient": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c" + }, + "pcRevertExecution": { + "txHash": "0xcae270b1615ef4912ec9adbf8aa6afed9455107ee24e211af537f99ea9765ecb", + "sender": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "gasUsed": 74893, + "blockHeight": 23950149, + "status": "SUCCESS", + "errorMsg": "" + }, + "gasPrice": "1000", + "gasFee": "960000", + "pcRefundExecution": { + "txHash": "0x8f77c3e8504b1b493cf40f4b677b17dc81aa46e034aa3edc13711aa79dee0934", + "sender": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "gasUsed": 178441, + "blockHeight": 23950149, + "status": "SUCCESS", + "errorMsg": "" + }, + "refundSwapError": "", + "gasToken": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "abortReason": "", + "isPc20": false, + "pc20ContractAddress": "" + } + ], + "universalStatus": 0 + } + }, + "transactionsSent": 0 +} \ No newline at end of file diff --git a/plan/agw/research/live-svm-wire-2026-10-06/failure-observation.json b/plan/agw/research/live-svm-wire-2026-10-06/failure-observation.json new file mode 100644 index 00000000..dda32f29 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/failure-observation.json @@ -0,0 +1,103 @@ +{ + "at": "2026-10-06T07:29:28.593Z", + "hash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "block": 23949885, + "observations": [ + { + "id": "0xf328cfa0af8a4e50afc3648205161759c02f1d0ddd27c40ba25f15990d084f36", + "record": { + "universalTx": { + "id": "f328cfa0af8a4e50afc3648205161759c02f1d0ddd27c40ba25f15990d084f36", + "pcTx": [ + { + "txHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "sender": "0xDfFb9e4cc2b869cF35ab811675333f40cD04dF76", + "gasUsed": 417241, + "blockHeight": 23949885, + "status": "SUCCESS", + "errorMsg": "" + } + ], + "outboundTx": [ + { + "destinationChain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "recipient": "0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", + "amount": "10000", + "externalAssetAddr": "0x0000000000000000000000000000000000000000", + "prc20AssetAddr": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "sender": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "payload": "0x000000024f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af01dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe8100000000106ae3a83bf81b96650100000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", + "gasLimit": "960", + "txType": 4, + "pcTx": { + "txHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "logIndex": "13" + }, + "id": "d7e4da935abc97cbb68c0869dafa1e28038b89848c53650364250f60cd11e1ef", + "outboundStatus": 1, + "revertInstructions": { + "fundRecipient": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c" + }, + "gasPrice": "1000", + "gasFee": "960000", + "refundSwapError": "", + "gasToken": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "abortReason": "", + "isPc20": false, + "pc20ContractAddress": "" + } + ], + "universalStatus": 0 + } + } + }, + { + "id": "0xf328cfa0af8a4e50afc3648205161759c02f1d0ddd27c40ba25f15990d084f36", + "record": { + "universalTx": { + "id": "f328cfa0af8a4e50afc3648205161759c02f1d0ddd27c40ba25f15990d084f36", + "pcTx": [ + { + "txHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "sender": "0xDfFb9e4cc2b869cF35ab811675333f40cD04dF76", + "gasUsed": 417241, + "blockHeight": 23949885, + "status": "SUCCESS", + "errorMsg": "" + } + ], + "outboundTx": [ + { + "destinationChain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "recipient": "0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", + "amount": "10000", + "externalAssetAddr": "0x0000000000000000000000000000000000000000", + "prc20AssetAddr": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "sender": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "payload": "0x000000024f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af01dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe8100000000106ae3a83bf81b96650100000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", + "gasLimit": "960", + "txType": 4, + "pcTx": { + "txHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "logIndex": "13" + }, + "id": "d7e4da935abc97cbb68c0869dafa1e28038b89848c53650364250f60cd11e1ef", + "outboundStatus": 1, + "revertInstructions": { + "fundRecipient": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c" + }, + "gasPrice": "1000", + "gasFee": "960000", + "refundSwapError": "", + "gasToken": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "abortReason": "", + "isPc20": false, + "pc20ContractAddress": "" + } + ], + "universalStatus": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/plan/agw/research/live-svm-wire-2026-10-06/live-evidence.json b/plan/agw/research/live-svm-wire-2026-10-06/live-evidence.json new file mode 100644 index 00000000..efdc5bac --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/live-evidence.json @@ -0,0 +1,1296 @@ +[ + { + "name": "svm-wire-program-preflight", + "at": "2026-10-06T07:22:43.969Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "checkedAt": "2026-10-06T07:22:25.858Z", + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "genesis": "EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG", + "slot": 508016133, + "programDataSlot": 508016133, + "programs": [ + { + "address": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "programData": "DqeV1giGX9UPbTCsUaqau4ZaTqmjxKeRa4TQdbLiUCYC", + "lastUpgradeSlot": "496655369", + "dataLength": 724997, + "dataSha256": "2633943f479debc6bf0cba19861f90dfd01a09ecba206b2ce941c97281b8a95d" + }, + { + "address": "8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx", + "programData": "GQmC7eueNLqazwr7U9fR3s4VwbXUtNf1HL6UCXuSWvaN", + "lastUpgradeSlot": "447956626", + "dataLength": 279709, + "dataSha256": "6887b9299b53bcaede79facbe9d9a53c9a0ba78e2c109322caef070b57637f95" + } + ], + "gatewayConfig": { + "address": "2urirovTZSgpEAEFyf2dMWjMTqfkgg1J3piTBeSEwV5P", + "paused": false, + "dataSha256": "1f7595b955ae35e2ea577db04d3e73f30d7284d9536910065e0fc7b078b6ae33" + }, + "counter": { + "address": "6Kg1NF5RRytjGwR6USttBLEYJrqwm65xtJzdPbbFwJKg", + "value": "201889018", + "authority": "BesWssuCiGE3EqeGRFamuouvAxJDUCdWH6NPHpAFPMBa", + "dataSha256": "4b1725035d45f06567ffe10489d847db80caeb03a2fa853a018cac309879e224" + }, + "counterIdlSha256": "493678d103afab762cc1668d02c641226125166ba8b4d7df46b67fec52b3a9ca", + "gatewayIdlSha256": "62d7792d04c657e1224f7c64d13b68e2f49dd39fdd6da0088deca0c32a5fb042" + }, + { + "name": "svm-wire-setup", + "at": "2026-10-06T07:23:28.532Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "rulesId": "0x0ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d0", + "grantHash": "0x5a1f05556a1abac0f05773b666f554977fecb54294d9a5119844da41632dc638", + "agent": "0xDfFb9e4cc2b869cF35ab811675333f40cD04dF76", + "recipient": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb", + "cea": "Fuas2d6gmyPEpKgvBEHGhNgu99Nx8xVWmmf6cVFp4feY", + "token": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "terms": { + "expectedCEA": "0xdd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe81", + "gatewayProgram": "0xa726d940296890606ae77be948a7726799b7e19076ced8c14c6ed43e98b7a6e5", + "ceaAccounts": [ + "0xdd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe81" + ], + "assets": [ + { + "token": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "maxPerCall": "10000", + "maxTotal": "20000" + } + ], + "validUntil": 1791278580, + "maxGasPerCall": "20000000000000000000", + "programs": [ + { + "program": "0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", + "discriminator": "0x79f4fa0308e5e101", + "discriminatorLen": 8, + "dataless": false, + "maxAccounts": 4 + }, + { + "program": "0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", + "discriminator": "0x6ae3a83bf81b9665", + "discriminatorLen": 8, + "dataless": false, + "maxAccounts": 2 + } + ], + "pins": [ + { + "ruleIndex": 0, + "accountIndex": 0, + "expected": "0x4f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af" + }, + { + "ruleIndex": 0, + "accountIndex": 1, + "expected": "0x2953026d328218b107268efe60f7d98635af1ff535a91731f75ca7cf8a859044" + }, + { + "ruleIndex": 0, + "accountIndex": 2, + "expected": "0xdd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe81" + }, + { + "ruleIndex": 0, + "accountIndex": 3, + "expected": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + { + "ruleIndex": 1, + "accountIndex": 0, + "expected": "0x4f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af" + }, + { + "ruleIndex": 1, + "accountIndex": 1, + "expected": "0xdd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe81" + } + ], + "dataPins": [ + { + "ruleIndex": 0, + "fromEnd": false, + "offset": 8, + "offsetB": 0, + "len": 8, + "mode": 2, + "expected": "0x0000000000000000000000000000000000000000000000000000000000002710", + "num": "0", + "den": "0" + }, + { + "ruleIndex": 1, + "fromEnd": false, + "offset": 8, + "offsetB": 0, + "len": 8, + "mode": 2, + "expected": "0x0000000000000000000000000000000000000000000000000000000000000001", + "num": "0", + "den": "0" + } + ] + }, + "walletPCFunded": "41000000000000000000", + "tokenFunded": "20000" + }, + { + "name": "svm-wire-positive-submitted", + "at": "2026-10-06T07:23:41.870Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "rulesId": "0x0ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d0", + "hash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8" + }, + { + "name": "svm-wire-positive-receipt", + "at": "2026-10-06T07:24:40.063Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "hash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "receipt": { + "hash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "blockNumber": "23949837", + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "transactionIndex": 1, + "from": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "to": "0x00000000000000000000000000000000000000C1", + "contractAddress": null, + "gasPrice": "1125000000", + "gasUsed": "445073", + "cumulativeGasUsed": "445073", + "logs": [ + { + "address": "0x603e7f0af6e1aaff46ddfb28b1e99364f8bc59af", + "topics": [ + "0x3ac286ad36e454b1ae54d96d9de29fdde1f3984110b62d27d0c7bbc70ccfbf93", + "0xc83601cd9bbdf58b8e3e8ca5eda8bf224739c5f34b1b91e2c4c5d7a93cdb4fd5", + "0x000000000000000000000000165a5e6782f39d30b38c7d97e1303e4cb2ad102a", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c" + ], + "data": "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 1, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x00000000000000000000000000000000000000000000000000000000000000c1" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 2, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x00000000000000000000000000000000000000000000000000000000000000c1" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 3, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c1", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 4, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 5, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037" + ], + "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 6, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000e5914e3a7e2e6d18330dd33fa387ce33da48b54", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000ea600", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 7, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000000e5914e3a7e2e6d18330dd33fa387ce33da48b54" + ], + "data": "0x0000000000000000000000000000000000000000000000000c112c5348fdcf04", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 8, + "removed": false + }, + { + "address": "0x0e5914e3a7e2e6d18330dd33fa387ce33da48b54", + "topics": [ + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff15a000000000000000000000000000000000000000000000000000c112c5348fdcf0400000000000000000000000000000000000e84b1be17079db39e9ef80a30b925000000000000000000000000000000000000000000000002f15ecbc2e691bc650000000000000000000000000000000000000000000000000000000000043381", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 9, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 10, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000ea600", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 11, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x0000000000000000000000000000000000000000000000007eb5f6b140ea30fc", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 12, + "removed": false + }, + { + "address": "0x00000000000000000000000000000000000000c0", + "topics": [ + "0x01fd625a5ce1109c10761818e2ef64ea92cd4966d78086d37e5a4b50e3226878", + "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c" + ], + "data": "0x0000000000000000000000000000000000000000000000000c112c5348fdcf0400000000000000000000000000000000000000000000000000000000000ea60000000000000000000000000000000000000000000000000000000000000001f4", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 13, + "removed": false + }, + { + "address": "0x00000000000000000000000000000000000000c1", + "topics": [ + "0x8882d1d8f7b1750e49d021ea8d62e07c2d163645b8fa31c035905d6572ffc637", + "0xdcce211428bdd1e5bb6cd8c346fd68e2e919245bd28bca9692ec281d7a69fbcc", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000027100000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed00000000000000000000000000000000000000000000000000000000000ea60000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000027736f6c616e613a457457545241425a61597136694d6665594b6f755275313636565532787161310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000207673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d00000000000000000000000000000000000000000000000000000000000000bd000000044f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af012953026d328218b107268efe60f7d98635af1ff535a91731f75ca7cf8a85904401dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe81010000000000000000000000000000000000000000000000000000000000000000000000001079f4fa0308e5e1011027000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d000000", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 14, + "removed": false + }, + { + "address": "0x4612ad240cd66a77b921693bbbb356d1b8219b2c", + "topics": [ + "0x3dbef004c3d4318a109f103c40928ef6cb77519329e4d7f473364dd15bf6b3fd", + "0x0ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d0", + "0x000000000000000000000000dffb9e4cc2b869cf35ab811675333f40cd04df76" + ], + "data": "0xc2c1ff13c20fb17960a533cdbe11f2e82e5f4020bef7ff8e0c3749d5f2edd18b", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 15, + "removed": false + } + ], + "logsBloom": "0x0020000110100000000000010000030100000000000000000000000000000000000000000000000000001e000000000000000000000022000400020040200008000000000200004808000008000000080000020004400004000800008020200000000000020002001000000004000803200000000000040200000090404c00000000000000000004000000000000000000010001000000002000020000001000020010000000000200000080000000000000000000000040010000100000000004000002200020000000000000000090800000100000000000000002000020004010020012004000000000000000000000000000000001400000000040000000", + "status": 1, + "raw": { + "from": "0xDfFb9e4cc2b869cF35ab811675333f40cD04dF76", + "to": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "nonce": 0, + "data": "0xc0ca77910ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000027800000000000000000000000000000000000000c10000000000000000000000000000000000000000000000008ac7230489e8000077b86bec000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000001400000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c00000000000000000000000000000000000000000000000000000000000000207673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d00000000000000000000000000000000000000000000000000000000000000bd000000044f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af012953026d328218b107268efe60f7d98635af1ff535a91731f75ca7cf8a85904401dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe81010000000000000000000000000000000000000000000000000000000000000000000000001079f4fa0308e5e1011027000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d0000000000000000000000", + "value": "0" + }, + "finalTxHash": "kGUaPUfASg9Poo93aMsztHJjUk27MKuRJBfDZK1WP3FFSaXSYcoPcxjUMFyDxaK6aU6mQkZeowSu3MtvK5PXKgK", + "externalTxHash": "kGUaPUfASg9Poo93aMsztHJjUk27MKuRJBfDZK1WP3FFSaXSYcoPcxjUMFyDxaK6aU6mQkZeowSu3MtvK5PXKgK", + "externalChain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "externalExplorerUrl": "https://explorer.solana.com/tx/kGUaPUfASg9Poo93aMsztHJjUk27MKuRJBfDZK1WP3FFSaXSYcoPcxjUMFyDxaK6aU6mQkZeowSu3MtvK5PXKgK?cluster=devnet", + "externalRecipient": "0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", + "externalAmount": "10000", + "externalAssetAddr": "0x0000000000000000000000000000000000000000", + "externalStatus": "success" + } + }, + { + "name": "svm-wire-positive-destination", + "at": "2026-10-06T07:25:10.654Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "hash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "externalTxHash": "kGUaPUfASg9Poo93aMsztHJjUk27MKuRJBfDZK1WP3FFSaXSYcoPcxjUMFyDxaK6aU6mQkZeowSu3MtvK5PXKgK", + "destination": { + "blockTime": 1791271462, + "meta": { + "computeUnitsConsumed": 90001, + "costUnits": 93130, + "err": null, + "fee": 5000, + "innerInstructions": [ + { + "index": 1, + "instructions": [ + { + "parsed": { + "info": { + "lamports": 690880, + "newAccount": "DBX5UrNvpkfd351q6xQ7B71QxsmW7on8HwSmbtHJigCD", + "owner": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "source": "FkXGfYVbXT5euXjYabvZn4e6Ygc8aCYpFv9j1hKstw2H", + "space": 8 + }, + "type": "createAccount" + }, + "program": "system", + "programId": "11111111111111111111111111111111", + "stackHeight": 2 + }, + { + "parsed": { + "info": { + "destination": "Fuas2d6gmyPEpKgvBEHGhNgu99Nx8xVWmmf6cVFp4feY", + "lamports": 10000, + "source": "89q1AUFb7YREHtjc1aYaPywovPq6tb3GYNPyDUJ3rshi" + }, + "type": "transfer" + }, + "program": "system", + "programId": "11111111111111111111111111111111", + "stackHeight": 2 + }, + { + "accounts": [ + "6Kg1NF5RRytjGwR6USttBLEYJrqwm65xtJzdPbbFwJKg", + "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb", + "Fuas2d6gmyPEpKgvBEHGhNgu99Nx8xVWmmf6cVFp4feY", + "11111111111111111111111111111111" + ], + "data": "G4U3TEuFnivMddm3E6dMCb", + "programId": "8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx", + "stackHeight": 2 + }, + { + "parsed": { + "info": { + "destination": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb", + "lamports": 10000, + "source": "Fuas2d6gmyPEpKgvBEHGhNgu99Nx8xVWmmf6cVFp4feY" + }, + "type": "transfer" + }, + "program": "system", + "programId": "11111111111111111111111111111111", + "stackHeight": 3 + }, + { + "parsed": { + "info": { + "destination": "FkXGfYVbXT5euXjYabvZn4e6Ygc8aCYpFv9j1hKstw2H", + "lamports": 695880, + "source": "89q1AUFb7YREHtjc1aYaPywovPq6tb3GYNPyDUJ3rshi" + }, + "type": "transfer" + }, + "program": "system", + "programId": "11111111111111111111111111111111", + "stackHeight": 2 + }, + { + "accounts": [ + "Hd8hF5GsJ3a54yxA1HNNNUvB55QCXsXA5mgyL167rJk5" + ], + "data": "5oQqPwQ2EA5YePTzsKVUGyA2fXjYdrQAiALVKG7Lp1PFqU6wHrUnK2Qd1pMGPvwceSRafE2bm4JZVdTViCcxivaGefCJmj6xpa4buvSwUmdksfosJdpvS5mnJ79jkZL1iH5zd8yJ2Qt5MahkAnVcrVkFF7Tw3xczwJteMiBgfsGMbYVZyXewCnRx1iottBERuZ7zuWFikUW7FQzrHposgLTux1qBL1aLQReFwReUhvvVWTBLMELN46geeRrn3qq1N7p2GuNoeJ5ezhM8ii9bUooWsdnfdy7GkVdhQywX2LFL1QjQQW2QjA7sbrankwc9hYfURXCwpM1gFSJiKGDeEB", + "programId": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "stackHeight": 2 + } + ] + } + ], + "logMessages": [ + "Program ComputeBudget111111111111111111111111111111 invoke [1]", + "Program ComputeBudget111111111111111111111111111111 success", + "Program CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS invoke [1]", + "Program log: Instruction: FinalizeUniversalTx", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx invoke [2]", + "Program log: Instruction: ReceiveSol", + "Program 11111111111111111111111111111111 invoke [3]", + "Program 11111111111111111111111111111111 success", + "Program log: Received 10000 lamports, counter incremented to: 201899018", + "Program 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx consumed 7499 of 331858 compute units", + "Program 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx success", + "Program 11111111111111111111111111111111 invoke [2]", + "Program 11111111111111111111111111111111 success", + "Program CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS invoke [2]", + "Program CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS consumed 4017 of 315404 compute units", + "Program CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS success", + "Program CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS consumed 89851 of 399850 compute units", + "Program CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS success" + ], + "postBalances": [ + 41078347081, + 0, + 1566000, + 690880, + 4280640, + 615340949, + 1141440, + 41141440, + 0, + 1, + 1501617194629, + 2832720, + 1 + ], + "postTokenBalances": [], + "preBalances": [ + 41078347081, + 0, + 1566000, + 0, + 4280640, + 615330949, + 1141440, + 41141440, + 0, + 1, + 1501617900509, + 2832720, + 1 + ], + "preTokenBalances": [], + "rewards": [], + "status": { + "Ok": null + } + }, + "slot": 508016629, + "transaction": { + "message": { + "accountKeys": [ + { + "pubkey": "FkXGfYVbXT5euXjYabvZn4e6Ygc8aCYpFv9j1hKstw2H", + "signer": true, + "source": "transaction", + "writable": true + }, + { + "pubkey": "Fuas2d6gmyPEpKgvBEHGhNgu99Nx8xVWmmf6cVFp4feY", + "signer": false, + "source": "transaction", + "writable": true + }, + { + "pubkey": "79jbZqURnjNAeEL9C8jzQfoMCV8Excux3qArET3oWBBY", + "signer": false, + "source": "transaction", + "writable": true + }, + { + "pubkey": "DBX5UrNvpkfd351q6xQ7B71QxsmW7on8HwSmbtHJigCD", + "signer": false, + "source": "transaction", + "writable": true + }, + { + "pubkey": "6Kg1NF5RRytjGwR6USttBLEYJrqwm65xtJzdPbbFwJKg", + "signer": false, + "source": "transaction", + "writable": true + }, + { + "pubkey": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb", + "signer": false, + "source": "transaction", + "writable": true + }, + { + "pubkey": "8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx", + "signer": false, + "source": "transaction", + "writable": false + }, + { + "pubkey": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "signer": false, + "source": "transaction", + "writable": false + }, + { + "pubkey": "Hd8hF5GsJ3a54yxA1HNNNUvB55QCXsXA5mgyL167rJk5", + "signer": false, + "source": "transaction", + "writable": false + }, + { + "pubkey": "ComputeBudget111111111111111111111111111111", + "signer": false, + "source": "transaction", + "writable": false + }, + { + "pubkey": "89q1AUFb7YREHtjc1aYaPywovPq6tb3GYNPyDUJ3rshi", + "signer": false, + "source": "lookupTable", + "writable": true + }, + { + "pubkey": "2urirovTZSgpEAEFyf2dMWjMTqfkgg1J3piTBeSEwV5P", + "signer": false, + "source": "lookupTable", + "writable": false + }, + { + "pubkey": "11111111111111111111111111111111", + "signer": false, + "source": "lookupTable", + "writable": false + } + ], + "addressTableLookups": [ + { + "accountKey": "6AdUqeKQMapkoMXP3wJ7FrjYfVreqaD7bq3HZyZEn8kN", + "readonlyIndexes": [ + 0, + 3 + ], + "writableIndexes": [ + 2 + ] + } + ], + "instructions": [ + { + "accounts": [], + "data": "HMypLP", + "programId": "ComputeBudget111111111111111111111111111111", + "stackHeight": 1 + }, + { + "accounts": [ + "FkXGfYVbXT5euXjYabvZn4e6Ygc8aCYpFv9j1hKstw2H", + "2urirovTZSgpEAEFyf2dMWjMTqfkgg1J3piTBeSEwV5P", + "89q1AUFb7YREHtjc1aYaPywovPq6tb3GYNPyDUJ3rshi", + "Fuas2d6gmyPEpKgvBEHGhNgu99Nx8xVWmmf6cVFp4feY", + "79jbZqURnjNAeEL9C8jzQfoMCV8Excux3qArET3oWBBY", + "DBX5UrNvpkfd351q6xQ7B71QxsmW7on8HwSmbtHJigCD", + "11111111111111111111111111111111", + "8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "Hd8hF5GsJ3a54yxA1HNNNUvB55QCXsXA5mgyL167rJk5", + "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "6Kg1NF5RRytjGwR6USttBLEYJrqwm65xtJzdPbbFwJKg", + "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb", + "Fuas2d6gmyPEpKgvBEHGhNgu99Nx8xVWmmf6cVFp4feY", + "11111111111111111111111111111111" + ], + "data": "5GnKk9T5dWyimwxJHxPqPwrXGUzE211fQE38qmM75Uas2qDURUoijyfXKBa2yNTikSYRZQ2WoQCjxBUkKsX9VP5kaW78ft3Mu21PjiPmAu7PEUkuEHgX1A4gx2JSYARQCdaZqEyFJg9ZZAghEBWcbQjyhAL6zFypw2HYWVnBKwdxC72v5kbSb4Fs3jR4wTgWmtjvvgVmMcjPzARJPJ3oYwftpzwBJYWzYeX4CRKMv162qbRZQ7jfFbqW3nNZuvZnaK746PKEgexCgRKxkWL4AC3fAK9PDbZUZRUX6w1Ay1yZKX1bA6SJX8v8PrUwCEKQkBeqzfc", + "programId": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "stackHeight": 1 + } + ], + "recentBlockhash": "HUtUv2neQFdpXVtyJj8Bq4ju3cSwn4mjp6AcTHjGEXX1" + }, + "signatures": [ + "kGUaPUfASg9Poo93aMsztHJjUk27MKuRJBfDZK1WP3FFSaXSYcoPcxjUMFyDxaK6aU6mQkZeowSu3MtvK5PXKgK" + ] + }, + "transactionIndex": 5, + "version": 0 + }, + "replayReceipt": { + "hash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "blockNumber": "23949837", + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "transactionIndex": 1, + "from": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "to": "0x00000000000000000000000000000000000000C1", + "contractAddress": null, + "gasPrice": "1125000000", + "gasUsed": "445073", + "cumulativeGasUsed": "445073", + "logs": [ + { + "address": "0x603e7f0af6e1aaff46ddfb28b1e99364f8bc59af", + "topics": [ + "0x3ac286ad36e454b1ae54d96d9de29fdde1f3984110b62d27d0c7bbc70ccfbf93", + "0xc83601cd9bbdf58b8e3e8ca5eda8bf224739c5f34b1b91e2c4c5d7a93cdb4fd5", + "0x000000000000000000000000165a5e6782f39d30b38c7d97e1303e4cb2ad102a", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c" + ], + "data": "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 1, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x00000000000000000000000000000000000000000000000000000000000000c1" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 2, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x00000000000000000000000000000000000000000000000000000000000000c1" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 3, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c1", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 4, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 5, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037" + ], + "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 6, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000e5914e3a7e2e6d18330dd33fa387ce33da48b54", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000ea600", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 7, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000000e5914e3a7e2e6d18330dd33fa387ce33da48b54" + ], + "data": "0x0000000000000000000000000000000000000000000000000c112c5348fdcf04", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 8, + "removed": false + }, + { + "address": "0x0e5914e3a7e2e6d18330dd33fa387ce33da48b54", + "topics": [ + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff15a000000000000000000000000000000000000000000000000000c112c5348fdcf0400000000000000000000000000000000000e84b1be17079db39e9ef80a30b925000000000000000000000000000000000000000000000002f15ecbc2e691bc650000000000000000000000000000000000000000000000000000000000043381", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 9, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 10, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000ea600", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 11, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x0000000000000000000000000000000000000000000000007eb5f6b140ea30fc", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 12, + "removed": false + }, + { + "address": "0x00000000000000000000000000000000000000c0", + "topics": [ + "0x01fd625a5ce1109c10761818e2ef64ea92cd4966d78086d37e5a4b50e3226878", + "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c" + ], + "data": "0x0000000000000000000000000000000000000000000000000c112c5348fdcf0400000000000000000000000000000000000000000000000000000000000ea60000000000000000000000000000000000000000000000000000000000000001f4", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 13, + "removed": false + }, + { + "address": "0x00000000000000000000000000000000000000c1", + "topics": [ + "0x8882d1d8f7b1750e49d021ea8d62e07c2d163645b8fa31c035905d6572ffc637", + "0xdcce211428bdd1e5bb6cd8c346fd68e2e919245bd28bca9692ec281d7a69fbcc", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000027100000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed00000000000000000000000000000000000000000000000000000000000ea60000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000027736f6c616e613a457457545241425a61597136694d6665594b6f755275313636565532787161310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000207673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d00000000000000000000000000000000000000000000000000000000000000bd000000044f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af012953026d328218b107268efe60f7d98635af1ff535a91731f75ca7cf8a85904401dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe81010000000000000000000000000000000000000000000000000000000000000000000000001079f4fa0308e5e1011027000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d000000", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 14, + "removed": false + }, + { + "address": "0x4612ad240cd66a77b921693bbbb356d1b8219b2c", + "topics": [ + "0x3dbef004c3d4318a109f103c40928ef6cb77519329e4d7f473364dd15bf6b3fd", + "0x0ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d0", + "0x000000000000000000000000dffb9e4cc2b869cf35ab811675333f40cd04df76" + ], + "data": "0xc2c1ff13c20fb17960a533cdbe11f2e82e5f4020bef7ff8e0c3749d5f2edd18b", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 15, + "removed": false + } + ], + "logsBloom": "0x0020000110100000000000010000030100000000000000000000000000000000000000000000000000001e000000000000000000000022000400020040200008000000000200004808000008000000080000020004400004000800008020200000000000020002001000000004000803200000000000040200000090404c00000000000000000004000000000000000000010001000000002000020000001000020010000000000200000080000000000000000000000040010000100000000004000002200020000000000000000090800000100000000000000002000020004010020012004000000000000000000000000000000001400000000040000000", + "status": 1, + "raw": { + "from": "0xDfFb9e4cc2b869cF35ab811675333f40cD04dF76", + "to": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "nonce": 0, + "data": "0xc0ca77910ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000027800000000000000000000000000000000000000c10000000000000000000000000000000000000000000000008ac7230489e8000077b86bec000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000001400000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c00000000000000000000000000000000000000000000000000000000000000207673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d00000000000000000000000000000000000000000000000000000000000000bd000000044f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af012953026d328218b107268efe60f7d98635af1ff535a91731f75ca7cf8a85904401dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe81010000000000000000000000000000000000000000000000000000000000000000000000001079f4fa0308e5e1011027000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d0000000000000000000000", + "value": "0" + }, + "finalTxHash": "kGUaPUfASg9Poo93aMsztHJjUk27MKuRJBfDZK1WP3FFSaXSYcoPcxjUMFyDxaK6aU6mQkZeowSu3MtvK5PXKgK", + "externalTxHash": "kGUaPUfASg9Poo93aMsztHJjUk27MKuRJBfDZK1WP3FFSaXSYcoPcxjUMFyDxaK6aU6mQkZeowSu3MtvK5PXKgK", + "externalChain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "externalExplorerUrl": "https://explorer.solana.com/tx/kGUaPUfASg9Poo93aMsztHJjUk27MKuRJBfDZK1WP3FFSaXSYcoPcxjUMFyDxaK6aU6mQkZeowSu3MtvK5PXKgK?cluster=devnet", + "externalRecipient": "0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", + "externalAmount": "10000", + "externalAssetAddr": "0x0000000000000000000000000000000000000000", + "externalStatus": "success" + } + }, + { + "name": "svm-wire-preflight-refusals", + "at": "2026-10-06T07:25:22.319Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "rulesId": "0x0ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d0", + "nonce": 1, + "transactionsSent": 0 + }, + { + "name": "svm-wire-failure-submitted", + "at": "2026-10-06T07:25:42.438Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "rulesId": "0x0ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d0", + "hash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc" + }, + { + "name": "svm-wire-failure-receipt", + "at": "2026-10-06T07:35:47.327Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "hash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "receipt": { + "hash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "blockNumber": "23949885", + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "transactionIndex": 0, + "from": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "to": "0x00000000000000000000000000000000000000C1", + "contractAddress": null, + "gasPrice": "1125000000", + "gasUsed": "417241", + "cumulativeGasUsed": "417241", + "logs": [ + { + "address": "0x603e7f0af6e1aaff46ddfb28b1e99364f8bc59af", + "topics": [ + "0x3ac286ad36e454b1ae54d96d9de29fdde1f3984110b62d27d0c7bbc70ccfbf93", + "0xc83601cd9bbdf58b8e3e8ca5eda8bf224739c5f34b1b91e2c4c5d7a93cdb4fd5", + "0x000000000000000000000000165a5e6782f39d30b38c7d97e1303e4cb2ad102a", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c" + ], + "data": "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 0, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x00000000000000000000000000000000000000000000000000000000000000c1" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 1, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x00000000000000000000000000000000000000000000000000000000000000c1" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 2, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c1", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 3, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 4, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037" + ], + "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 5, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000e5914e3a7e2e6d18330dd33fa387ce33da48b54", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000ea600", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 6, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000000e5914e3a7e2e6d18330dd33fa387ce33da48b54" + ], + "data": "0x0000000000000000000000000000000000000000000000000c112c58397d3a87", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 7, + "removed": false + }, + { + "address": "0x0e5914e3a7e2e6d18330dd33fa387ce33da48b54", + "topics": [ + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff15a000000000000000000000000000000000000000000000000000c112c58397d3a8700000000000000000000000000000000000e84b1c10fb5fd51e951bcc48cb09f000000000000000000000000000000000000000000000002f15ecbc2e691bc650000000000000000000000000000000000000000000000000000000000043381", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 8, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 9, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000ea600", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 10, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x0000000000000000000000000000000000000000000000007eb5f6ac506ac579", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 11, + "removed": false + }, + { + "address": "0x00000000000000000000000000000000000000c0", + "topics": [ + "0x01fd625a5ce1109c10761818e2ef64ea92cd4966d78086d37e5a4b50e3226878", + "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c" + ], + "data": "0x0000000000000000000000000000000000000000000000000c112c58397d3a8700000000000000000000000000000000000000000000000000000000000ea60000000000000000000000000000000000000000000000000000000000000001f4", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 12, + "removed": false + }, + { + "address": "0x00000000000000000000000000000000000000c1", + "topics": [ + "0x8882d1d8f7b1750e49d021ea8d62e07c2d163645b8fa31c035905d6572ffc637", + "0xd7e4da935abc97cbb68c0869dafa1e28038b89848c53650364250f60cd11e1ef", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000027100000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed00000000000000000000000000000000000000000000000000000000000ea60000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000027736f6c616e613a457457545241425a61597136694d6665594b6f755275313636565532787161310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000207673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d000000000000000000000000000000000000000000000000000000000000007b000000024f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af01dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe8100000000106ae3a83bf81b96650100000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d0000000000", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 13, + "removed": false + }, + { + "address": "0x4612ad240cd66a77b921693bbbb356d1b8219b2c", + "topics": [ + "0x3dbef004c3d4318a109f103c40928ef6cb77519329e4d7f473364dd15bf6b3fd", + "0x0ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d0", + "0x000000000000000000000000dffb9e4cc2b869cf35ab811675333f40cd04df76" + ], + "data": "0x356b0bac276dd8ee6f6f4f4e0ecbcc5ca8f3667706ef81daaa6b1d70a52701d3", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 14, + "removed": false + } + ], + "logsBloom": "0x0020000110100000000000010000030100000000000000000000000000000000000000000000000000001e000000000000000000000022000400020040200008000000000200004808000008000000080000022004400004000800008020200400000000020002001000000004000802200000000000040200000090404800000000000000000004000000000000000000010001000000002000020000001000020010000000000200000080000000000000000000000040010000100000000004000002200020000000000000000090800000120000000000000002000020004010000012004000000000000000000000000000000001400000000040000000", + "status": 1, + "raw": { + "from": "0xDfFb9e4cc2b869cF35ab811675333f40cD04dF76", + "to": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "nonce": 1, + "data": "0xc0ca77910ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000023800000000000000000000000000000000000000c10000000000000000000000000000000000000000000000008ac7230489e8000077b86bec000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000001400000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c00000000000000000000000000000000000000000000000000000000000000207673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d000000000000000000000000000000000000000000000000000000000000007b000000024f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af01dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe8100000000106ae3a83bf81b96650100000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d00000000000000000000000000", + "value": "0" + }, + "finalTxHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "externalStatus": "timeout", + "externalError": "Timeout waiting for outbound transaction. Push Chain TX: 0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc. Timeout: 600000ms. The relay may still be processing." + } + } +] diff --git a/plan/agw/research/live-svm-wire-2026-10-06/live-policy-probes.json b/plan/agw/research/live-svm-wire-2026-10-06/live-policy-probes.json new file mode 100644 index 00000000..875f77f4 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/live-policy-probes.json @@ -0,0 +1,29 @@ +{ + "at": "2026-10-06T07:36:52.702Z", + "sourceHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "chainId": 42101, + "block": "23949837", + "observations": [ + { + "kind": "account-pin", + "reverted": true, + "decoded": { + "name": "PolicyCheckReverted(SvmAccountPinMismatch)", + "selector": "0xf4270752", + "decoded": "0xff3dafe500000000000000000000000000000000000000000000000000000000", + "hint": "URP rejected the action (truncated through the session engine). The inner selector names the gate; arguments are truncated to 28 bytes." + } + }, + { + "kind": "instruction-data-pin", + "reverted": true, + "decoded": { + "name": "PolicyCheckReverted(SvmDataCeilingExceeded)", + "selector": "0xf4270752", + "decoded": "0x94de1ef800000000000000000000000000000000000000000000000000000000", + "hint": "URP rejected the action (truncated through the session engine). The inner selector names the gate; arguments are truncated to 28 bytes." + } + } + ], + "transactionsSent": 0 +} \ No newline at end of file diff --git a/plan/agw/research/live-svm-wire-2026-10-06/logs/build-final.log b/plan/agw/research/live-svm-wire-2026-10-06/logs/build-final.log new file mode 100644 index 00000000..3ef7e788 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/logs/build-final.log @@ -0,0 +1,11 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:79325) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core diff --git a/plan/agw/research/live-svm-wire-2026-10-06/logs/build.log b/plan/agw/research/live-svm-wire-2026-10-06/logs/build.log new file mode 100644 index 00000000..e255f704 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/logs/build.log @@ -0,0 +1,11 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:77080) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core diff --git a/plan/agw/research/live-svm-wire-2026-10-06/logs/lint.log b/plan/agw/research/live-svm-wire-2026-10-06/logs/lint.log new file mode 100644 index 00000000..5c65d631 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/logs/lint.log @@ -0,0 +1,31 @@ + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw-svm-wire/outbound.spec.ts + 114:38 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 126:56 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 127:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 127:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 128:28 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 129:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 129:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 133:30 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 146:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 170:50 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 170:50 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw-svm-wire/replay.spec.ts + 33:40 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 44:40 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 47:83 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 49:51 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 54:82 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/shared/agw-svm-preflight.ts + 12:33 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 17:34 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts + 41:50 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 46:45 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 50:45 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +✖ 21 problems (0 errors, 21 warnings) diff --git a/plan/agw/research/live-svm-wire-2026-10-06/logs/live-agw-extended-final.log b/plan/agw/research/live-svm-wire-2026-10-06/logs/live-agw-extended-final.log new file mode 100644 index 00000000..b712a88d --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/logs/live-agw-extended-final.log @@ -0,0 +1,11 @@ +Running 14 scenarios (group: agw-extended) across 2 spec files. + +PASS core-e2e __e2e__/agw-extended/native-policy.spec.ts (275.511 s) +PASS core-e2e __e2e__/agw-extended/management.spec.ts (276.819 s) + +Test Suites: 2 passed, 2 total +Tests: 14 passed, 14 total +Snapshots: 0 total +Time: 552.361 s +Ran all test suites within paths "__e2e__/agw-extended/management.spec.ts", "__e2e__/agw-extended/native-policy.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/live-svm-wire-2026-10-06/logs/live-agw-extended-index-race.log b/plan/agw/research/live-svm-wire-2026-10-06/logs/live-agw-extended-index-race.log new file mode 100644 index 00000000..ad8d7067 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/logs/live-agw-extended-index-race.log @@ -0,0 +1,225 @@ +node:internal/modules/cjs/loader:1215 + throw err; + ^ + +Error: Cannot find module '/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/node_modules/jest/bin/jest.js' + at Module._resolveFilename (node:internal/modules/cjs/loader:1212:15) + at Module._load (node:internal/modules/cjs/loader:1043:27) + at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:164:12) + at node:internal/main/run_main_module:28:49 { + code: 'MODULE_NOT_FOUND', + requireStack: [] +} + +Node.js v20.19.2 +FAIL core-e2e packages/core/__e2e__/agw-extended/management.spec.ts + ● Test suite failed to run + + packages/core/__e2e__/agw-extended/management.spec.ts:104:5 - error TS1005: 'try' expected. + + 104 finally { rt.execute = original; } +    ~~~~~~~ + +Test Suites: 1 failed, 1 total +Tests: 0 total +Snapshots: 0 total +Time: 0.532 s, estimated 239 s +Ran all test suites within paths "packages/core/__e2e__/agw-extended/management.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? +FAIL core-e2e packages/core/__e2e__/agw-extended/management.spec.ts (32.417 s) + agw extended management + ✕ 6. index race commits no grants to the competing wallet and retry takes the next slot (19822 ms) + ○ skipped 1. prefunding a derived address survives deployment and info/list keep owner index and label + ○ skipped 2. same-agent multiplicity is ambiguous before signing and selective revoke restores uncached lookup + ○ skipped 3. multi-rule add and revoke are atomic batches with exact checkpoint counts + ○ skipped 4. invalid revoke targets preserve enabled rules and signer nonce + ○ skipped 5. intervening agent spend refuses a stale replacement without changing grants or checkpoints + + ● agw extended management › 6. index race commits no grants to the competing wallet and retry takes the next slot + + expect(received).toMatchObject(expected) + + - Expected - 4 + + Received + 1 + + Object { + - "code": "INDEX_RACE", + - "details": Object { + - "committed": false, + - }, + + "code": "PUSH_CHAIN_EXECUTION_FAILED", + } + + 102 | causeDecodedErrorName: observed?.cause?.decodedError?.name, + 103 | }); + > 104 | expect(raceError).toMatchObject({ code: 'INDEX_RACE', details: { committed: false } }); + | ^ + 105 | } finally { rt.execute = original; } + 106 | if (!competing) throw new Error('Race injection did not run'); + 107 | expect((await f.owner.agentic.wallet(competing.wallet).rules.list()).rules).toEqual([]); + + at Object. (__e2e__/agw-extended/management.spec.ts:104:23) + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 5 skipped, 6 total +Snapshots: 0 total +Time: 32.442 s +Ran all test suites within paths "packages/core/__e2e__/agw-extended/management.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? +FAIL core-e2e packages/core/__e2e__/agw-extended/management.spec.ts (30.927 s) + agw extended management + ✕ 6. index race commits no grants to the competing wallet and retry takes the next slot (18356 ms) + ○ skipped 1. prefunding a derived address survives deployment and info/list keep owner index and label + ○ skipped 2. same-agent multiplicity is ambiguous before signing and selective revoke restores uncached lookup + ○ skipped 3. multi-rule add and revoke are atomic batches with exact checkpoint counts + ○ skipped 4. invalid revoke targets preserve enabled rules and signer nonce + ○ skipped 5. intervening agent spend refuses a stale replacement without changing grants or checkpoints + + ● agw extended management › 6. index race commits no grants to the competing wallet and retry takes the next slot + + expect(received).toMatchObject(expected) + + - Expected - 4 + + Received + 1 + + Object { + - "code": "INDEX_RACE", + - "details": Object { + - "committed": false, + - }, + + "code": "PUSH_CHAIN_EXECUTION_FAILED", + } + + 113 | errorLayers, + 114 | }); + > 115 | expect(raceError).toMatchObject({ code: 'INDEX_RACE', details: { committed: false } }); + | ^ + 116 | } finally { rt.execute = original; } + 117 | if (!competing) throw new Error('Race injection did not run'); + 118 | expect((await f.owner.agentic.wallet(competing.wallet).rules.list()).rules).toEqual([]); + + at Object. (__e2e__/agw-extended/management.spec.ts:115:23) + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 5 skipped, 6 total +Snapshots: 0 total +Time: 30.944 s, estimated 33 s +Ran all test suites within paths "packages/core/__e2e__/agw-extended/management.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? +FAIL core-e2e packages/core/__e2e__/agw-extended/management.spec.ts (28.745 s) + agw extended management + ✕ 6. index race commits no grants to the competing wallet and retry takes the next slot (17599 ms) + ○ skipped 1. prefunding a derived address survives deployment and info/list keep owner index and label + ○ skipped 2. same-agent multiplicity is ambiguous before signing and selective revoke restores uncached lookup + ○ skipped 3. multi-rule add and revoke are atomic batches with exact checkpoint counts + ○ skipped 4. invalid revoke targets preserve enabled rules and signer nonce + ○ skipped 5. intervening agent spend refuses a stale replacement without changing grants or checkpoints + + ● agw extended management › 6. index race commits no grants to the competing wallet and retry takes the next slot + + expect(received).toMatchObject(expected) + + - Expected - 4 + + Received + 1 + + Object { + - "code": "INDEX_RACE", + - "details": Object { + - "committed": false, + - }, + + "code": "PUSH_CHAIN_EXECUTION_FAILED", + } + + 114 | nestedDecodedErrorName: observed?.cause?.cause?.decodedError?.name, + 115 | }); + > 116 | expect(raceError).toMatchObject({ code: 'INDEX_RACE', details: { committed: false } }); + | ^ + 117 | } finally { rt.execute = original; } + 118 | if (!competing) throw new Error('Race injection did not run'); + 119 | expect((await f.owner.agentic.wallet(competing.wallet).rules.list()).rules).toEqual([]); + + at Object. (__e2e__/agw-extended/management.spec.ts:116:23) + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 5 skipped, 6 total +Snapshots: 0 total +Time: 28.767 s, estimated 31 s +Ran all test suites within paths "packages/core/__e2e__/agw-extended/management.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? +FAIL core-e2e packages/core/__e2e__/agw-extended/management.spec.ts + ● Test suite failed to run + + packages/core/__e2e__/agw-extended/management.spec.ts:95:38 - error TS2339: Property 'message' does not exist on type '{ code?: string | undefined; name?: string | undefined; details?: Record | undefined; transactionHashes?: `0x${string}`[] | undefined; pendingTransactionHash?: `0x${string}` | undefined; decodedError?: { ...; } | undefined; cause?: { ...; } | undefined; }'. + + 95 const messageLayers = [observed?.message, observed?.cause?.message, observed?.cause?.cause?.message] +    ~~~~~~~ + packages/core/__e2e__/agw-extended/management.spec.ts:95:64 - error TS2339: Property 'message' does not exist on type '{ name?: string | undefined; decodedError?: { name?: string | undefined; } | undefined; gatewayTxHash?: `0x${string}` | undefined; transactionHashes?: `0x${string}`[] | undefined; cause?: { name?: string | undefined; decodedError?: { ...; } | undefined; } | undefined; }'. + + 95 const messageLayers = [observed?.message, observed?.cause?.message, observed?.cause?.cause?.message] +    ~~~~~~~ + packages/core/__e2e__/agw-extended/management.spec.ts:95:97 - error TS2339: Property 'message' does not exist on type '{ name?: string | undefined; decodedError?: { name?: string | undefined; } | undefined; }'. + + 95 const messageLayers = [observed?.message, observed?.cause?.message, observed?.cause?.cause?.message] +    ~~~~~~~ + +Test Suites: 1 failed, 1 total +Tests: 0 total +Snapshots: 0 total +Time: 0.48 s, estimated 29 s +Ran all test suites within paths "packages/core/__e2e__/agw-extended/management.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? +FAIL core-e2e packages/core/__e2e__/agw-extended/management.spec.ts (38.232 s) + agw extended management + ✕ 6. index race commits no grants to the competing wallet and retry takes the next slot (23598 ms) + ○ skipped 1. prefunding a derived address survives deployment and info/list keep owner index and label + ○ skipped 2. same-agent multiplicity is ambiguous before signing and selective revoke restores uncached lookup + ○ skipped 3. multi-rule add and revoke are atomic batches with exact checkpoint counts + ○ skipped 4. invalid revoke targets preserve enabled rules and signer nonce + ○ skipped 5. intervening agent spend refuses a stale replacement without changing grants or checkpoints + + ● agw extended management › 6. index race commits no grants to the competing wallet and retry takes the next slot + + expect(received).toMatchObject(expected) + + - Expected - 4 + + Received + 1 + + Object { + - "code": "INDEX_RACE", + - "details": Object { + - "committed": false, + - }, + + "code": "PUSH_CHAIN_EXECUTION_FAILED", + } + + 124 | customErrorSelectors, + 125 | }); + > 126 | expect(raceError).toMatchObject({ code: 'INDEX_RACE', details: { committed: false } }); + | ^ + 127 | } finally { rt.execute = original; } + 128 | if (!competing) throw new Error('Race injection did not run'); + 129 | expect((await f.owner.agentic.wallet(competing.wallet).rules.list()).rules).toEqual([]); + + at Object. (__e2e__/agw-extended/management.spec.ts:126:23) + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 5 skipped, 6 total +Snapshots: 0 total +Time: 38.253 s +Ran all test suites within paths "packages/core/__e2e__/agw-extended/management.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? +PASS core-e2e packages/core/__e2e__/agw-extended/management.spec.ts (67.19 s) + agw extended management + ✓ 6. index race commits no grants to the competing wallet and retry takes the next slot (50016 ms) + ○ skipped 1. prefunding a derived address survives deployment and info/list keep owner index and label + ○ skipped 2. same-agent multiplicity is ambiguous before signing and selective revoke restores uncached lookup + ○ skipped 3. multi-rule add and revoke are atomic batches with exact checkpoint counts + ○ skipped 4. invalid revoke targets preserve enabled rules and signer nonce + ○ skipped 5. intervening agent spend refuses a stale replacement without changing grants or checkpoints + +Test Suites: 1 passed, 1 total +Tests: 5 skipped, 1 passed, 6 total +Snapshots: 0 total +Time: 67.209 s +Ran all test suites within paths "packages/core/__e2e__/agw-extended/management.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/live-svm-wire-2026-10-06/logs/live-agw-extended.log b/plan/agw/research/live-svm-wire-2026-10-06/logs/live-agw-extended.log new file mode 100644 index 00000000..da8b5e61 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/logs/live-agw-extended.log @@ -0,0 +1,37 @@ +Running 14 scenarios (group: agw-extended) across 2 spec files. + +FAIL core-e2e __e2e__/agw-extended/management.spec.ts (238.257 s) + ● agw extended management › 6. index race commits no grants to the competing wallet and retry takes the next slot + + expect(received).rejects.toMatchObject(expected) + + - Expected - 4 + + Received + 1 + + Object { + - "code": "INDEX_RACE", + - "details": Object { + - "committed": false, + - }, + + "code": "PUSH_CHAIN_EXECUTION_FAILED", + } + + 76 | return original(params, opts); + 77 | }; + > 78 | try { await expect(f.owner.agentic.create('e2e-race-loser', { rules: [rule()] })).rejects.toMatchObject({ code: 'INDEX_RACE', details: { committed: false } }); } + | ^ + 79 | finally { rt.execute = original; } + 80 | if (!competing) throw new Error('Race injection did not run'); + 81 | expect((await f.owner.agentic.wallet(competing.wallet).rules.list()).rules).toEqual([]); + + at Object.toMatchObject (../../node_modules/expect/build/index.js:218:22) + at Object. (__e2e__/agw-extended/management.spec.ts:78:95) + +PASS core-e2e __e2e__/agw-extended/native-policy.spec.ts (296.801 s) + +Test Suites: 1 failed, 1 passed, 2 total +Tests: 1 failed, 13 passed, 14 total +Snapshots: 0 total +Time: 535.098 s +Ran all test suites within paths "__e2e__/agw-extended/management.spec.ts", "__e2e__/agw-extended/native-policy.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/live-svm-wire-2026-10-06/logs/live-bootstrap-fixed.log b/plan/agw/research/live-svm-wire-2026-10-06/logs/live-bootstrap-fixed.log new file mode 100644 index 00000000..49b667c1 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/logs/live-bootstrap-fixed.log @@ -0,0 +1,31 @@ +Running 3 scenarios (group: agw-svm-wire) across 1 spec files. + +FAIL core-e2e __e2e__/agw-svm-wire/outbound.spec.ts (805.011 s) + agw svm wire + ✓ 1. positive outbound: actual CEA transfer and counter execution, receipt and replay (102123 ms) + ✓ 2. substituted account and oversized instruction amount fail before submission (11664 ms) + ✕ 3. destination program failure is classified and does not restore policy spend (625608 ms) + + ● agw svm wire › 3. destination program failure is classified and does not restore policy spend + + expect(received).toBe(expected) // Object.is equality + + Expected: "failed" + Received: "timeout" + + 159 | f.evidence('svm-wire-failure-submitted', { wallet, rulesId, hash: tx.hash }); + 160 | await adaptTrackedResponse(rt(agent), tx); + > 161 | const receipt = await tx.wait({ outboundTimeoutMs: 600_000 }); + | ^ + 162 | f.evidence('svm-wire-failure-receipt', { hash: tx.hash, receipt }); + 163 | const pushReceipt = await f.push.getTransactionReceipt({ hash: tx.hash as Hex }); + 164 | expect(pushReceipt.status).toBe('success'); expect(receipt.externalStatus).toBe('failed'); + + at Object. (__e2e__/agw-svm-wire/outbound.spec.ts:161:80) + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 2 passed, 3 total +Snapshots: 0 total +Time: 805.092 s +Ran all test suites within paths "__e2e__/agw-svm-wire/outbound.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/live-svm-wire-2026-10-06/logs/live-initial.log b/plan/agw/research/live-svm-wire-2026-10-06/logs/live-initial.log new file mode 100644 index 00000000..a6d7d817 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/logs/live-initial.log @@ -0,0 +1,62 @@ +Running 3 scenarios (group: agw-svm-wire) across 1 spec files. + +FAIL core-e2e __e2e__/agw-svm-wire/outbound.spec.ts (20.197 s) + agw svm wire + ✕ 1. positive outbound: actual CEA transfer and counter execution, receipt and replay (1 ms) + ✕ 2. substituted account and oversized instruction amount fail before submission + ✕ 3. destination program failure is classified and does not restore policy spend + + ● agw svm wire › 1. positive outbound: actual CEA transfer and counter execution, receipt and replay + + TypeError: Cannot read properties of undefined (reading 'signer') + + 37 | + 38 | const universalSigner = + > 39 | await PushChain.utils.signer.toUniversalFromKeypair(walletClient, { + | ^ + 40 | chain: opts.chain, + 41 | library: PushChain.CONSTANTS.LIBRARY.ETHEREUM_VIEM, + 42 | }); + + at createEvmPushClient (__e2e__/shared/evm-client.ts:39:27) + at setupAgw (__e2e__/agw/_fixture.ts:77:67) + at async Object. (__e2e__/agw-svm-wire/outbound.spec.ts:83:9) + + ● agw svm wire › 2. substituted account and oversized instruction amount fail before submission + + TypeError: Cannot read properties of undefined (reading 'signer') + + 37 | + 38 | const universalSigner = + > 39 | await PushChain.utils.signer.toUniversalFromKeypair(walletClient, { + | ^ + 40 | chain: opts.chain, + 41 | library: PushChain.CONSTANTS.LIBRARY.ETHEREUM_VIEM, + 42 | }); + + at createEvmPushClient (__e2e__/shared/evm-client.ts:39:27) + at setupAgw (__e2e__/agw/_fixture.ts:77:67) + at async Object. (__e2e__/agw-svm-wire/outbound.spec.ts:83:9) + + ● agw svm wire › 3. destination program failure is classified and does not restore policy spend + + TypeError: Cannot read properties of undefined (reading 'signer') + + 37 | + 38 | const universalSigner = + > 39 | await PushChain.utils.signer.toUniversalFromKeypair(walletClient, { + | ^ + 40 | chain: opts.chain, + 41 | library: PushChain.CONSTANTS.LIBRARY.ETHEREUM_VIEM, + 42 | }); + + at createEvmPushClient (__e2e__/shared/evm-client.ts:39:27) + at setupAgw (__e2e__/agw/_fixture.ts:77:67) + at async Object. (__e2e__/agw-svm-wire/outbound.spec.ts:83:9) + +Test Suites: 1 failed, 1 total +Tests: 3 failed, 3 total +Snapshots: 0 total +Time: 20.219 s +Ran all test suites within paths "__e2e__/agw-svm-wire/outbound.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/live-svm-wire-2026-10-06/logs/management-unit.log b/plan/agw/research/live-svm-wire-2026-10-06/logs/management-unit.log new file mode 100644 index 00000000..ac595771 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/logs/management-unit.log @@ -0,0 +1,29 @@ +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts + agentic.create + ✓ validates first, then sends deploy + grants in input order and returns receipt IDs (9 ms) + ✓ a bare wallet is one deployWallet call, no funding + ✓ invalid input never reaches the signer + ✓ refuses a changed URP version before grant signing + ✓ a different wallet in the receipt is an INDEX_RACE with full details (1 ms) + ✓ IDs that differ from the input order are a RECEIPT_MISMATCH, not a silent reorder (2 ms) + ✓ a sequential failure after deployment is CREATE_PARTIAL; what committed comes from this call’s receipts (2 ms) + ✓ a pending hash keeps an unconfirmed deployment unknown (1 ms) + ✓ failed recovery reads report unknown state, never "not deployed" (1 ms) + ✓ a receipt that cannot be read after submission keeps the hash and reports unknown state (1 ms) + ✓ the deploy is index-bound: a raced slot reverts and is reported as INDEX_RACE with nothing committed (2 ms) + ✓ a generic send error is still identified as a race when the fresh slot label proves another create won (1 ms) + ✓ a slot that is already deployed is refused before signing (1 ms) + rules.add / rules.revoke + ✓ add: owner-only, same-agent grants allowed, IDs from the grant nonce + ✓ add: several rules are one atomic owner execute batch (one signature on any signer) (2 ms) + ✓ revoke: bare and empty are refused; unknown IDs fail before signing; several IDs are one atomic owner execute (2 ms) + rules.update — one owner batch: assert → revoke → grant + ✓ builds exactly one execute(batch) with the observed spend asserted per pair (2 ms) + ✓ universal replacement asserts every asset in stored order before revoke/grant (2 ms) + ✓ replacement may name another live agent, but may not repeat an old ID (4 ms) + +Test Suites: 1 passed, 1 total +Tests: 19 passed, 19 total +Snapshots: 0 total +Time: 3.115 s +Ran all test suites within paths "packages/core/src/lib/agentic/__tests__/management.spec.ts". diff --git a/plan/agw/research/live-svm-wire-2026-10-06/logs/replay.log b/plan/agw/research/live-svm-wire-2026-10-06/logs/replay.log new file mode 100644 index 00000000..63bf6a05 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/logs/replay.log @@ -0,0 +1,14 @@ +Running 3 scenarios (group: agw-svm-replay) across 1 spec files. + +PASS core-e2e __e2e__/agw-svm-wire/replay.spec.ts (58.193 s) + agw svm recorded replay + ✓ 1. positive replay retains wallet, signer origin and actual Solana signature (26146 ms) + ✓ 2. later terminal rejection is failed, while the source succeeded and spend remains charged (28339 ms) + ✓ 3. pinned live policy calls refuse account and data mutations without submitting (1057 ms) + +Test Suites: 1 passed, 1 total +Tests: 3 passed, 3 total +Snapshots: 0 total +Time: 58.215 s +Ran all test suites within paths "__e2e__/agw-svm-wire/replay.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/live-svm-wire-2026-10-06/logs/unit-final.log b/plan/agw/research/live-svm-wire-2026-10-06/logs/unit-final.log new file mode 100644 index 00000000..1b1198ff --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/logs/unit-final.log @@ -0,0 +1,169 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts + +Test Suites: 1 skipped, 116 passed, 116 of 117 total +Tests: 12 skipped, 1982 passed, 1994 total +Snapshots: 0 total +Time: 28.266 s, estimated 37 s +Ran all test suites. diff --git a/plan/agw/research/live-svm-wire-2026-10-06/logs/unit.log b/plan/agw/research/live-svm-wire-2026-10-06/logs/unit.log new file mode 100644 index 00000000..181c7190 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/logs/unit.log @@ -0,0 +1,169 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts + +Test Suites: 1 skipped, 116 passed, 116 of 117 total +Tests: 12 skipped, 1981 passed, 1993 total +Snapshots: 0 total +Time: 31.077 s +Ran all test suites. diff --git a/plan/agw/research/live-svm-wire-2026-10-06/platform-followup.md b/plan/agw/research/live-svm-wire-2026-10-06/platform-followup.md new file mode 100644 index 00000000..461fb86f --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/platform-followup.md @@ -0,0 +1,35 @@ +# Solana rejection terminalizes after the SDK timeout — operational follow-up + +For the Push outbound executor/relay team; Harsh/Zaryab can help route this if timing clarification is useful. This is a read-only evidence note, not a message that has been sent. Terminal failure is now observed, so this is not an unresolved delivery blocker or an established relay defect. + +## Observed behavior + +On October 6, 2026 we sent two internal AGW SVM outbounds through the same verified Donut v4 generation and devnet gateway. The positive receive_sol call completed and its wallet CEA transfer/CPI were verified. The second intentionally calls decrement with a CEA that is not the counter's authority. + +| Evidence | Value | +| --- | --- | +| Push hash | 0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc | +| Push block/status | 23949885 / SUCCESS | +| Universal/subtransaction ID | f328cfa0af8a4e50afc3648205161759c02f1d0ddd27c40ba25f15990d084f36 | +| Outbound ID | d7e4da935abc97cbb68c0869dafa1e28038b89848c53650364250f60cd11e1ef | +| Destination | Solana devnet; gateway CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS | +| Program/instruction | 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx / decrement(1) | +| Expected destination error | Actual read-only simulation returns Unauthorized, custom error 6002 | +| Node observation | PENDING (1), universal status UNSPECIFIED (0), no observedTx hash, no abortReason | +| SDK wait | Push status 1, externalStatus timeout after 600 seconds; source hash retained | +| Later node observation | REVERTED (3), observed success=false, error "tx not executed on destination chain", no Solana hash | +| Later read-only replay | Push status 1, externalStatus failed, same source identity/hash | +| Refund executions | Asset and gas refunds report SUCCESS at block 23950149; policy spent remains 20,000 | + +[Initial node state](failure-observation.json), [terminal record](failure-observation-final.json), [simulation and error logs](destination-rejection-simulation.json), [source/SDK receipt evidence](live-evidence.json), [read-only replay](readonly-replay.json), [initial strict test output](logs/live-bootstrap-fixed.log). + +The positive sibling source hash is 0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8. It proves this wallet/gateway/program route delivers a permitted instruction; the negative route is not evidence of missing deployed SVM support. + +## Optional operational clarification + +1. What retry/expiry and terminalization window should the SDK documentation and negative live tests expect for a Solana program/preflight rejection? This case exceeded the initial ten-minute wait, then became terminal without another source submission. +2. Can the observed record preserve the actual program/preflight reason (Unauthorized/6002 here), instead of only "tx not executed on destination chain"? A destination hash may legitimately be absent. + +The SDK follows the published state correctly: timeout while pending, failed after REVERTED. The test keeps that distinction and allows a bounded twenty-minute failure window for future funded runs. The successful read-only recovery does not erase the initial timeout result or establish a guaranteed terminalization SLA. + +This is separate from creditRevert integration. Returning assets/gas does not lower policy spend; final accounting remains charged. No failed Solana transaction signature is claimed because the record says execution did not occur on the destination. diff --git a/plan/agw/research/live-svm-wire-2026-10-06/policy-spend-after-timeout.json b/plan/agw/research/live-svm-wire-2026-10-06/policy-spend-after-timeout.json new file mode 100644 index 00000000..afe16d0b --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/policy-spend-after-timeout.json @@ -0,0 +1,14 @@ +{ + "at": "2026-10-06T07:36:57.491Z", + "block": "23950160", + "wallet": "0x4612ad240cd66a77b921693bbbb356d1b8219b2c", + "rulesId": "0x0ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d0", + "assets": [ + { + "token": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "maxPerCall": "10000", + "maxTotal": "20000", + "spent": "20000" + } + ] +} \ No newline at end of file diff --git a/plan/agw/research/live-svm-wire-2026-10-06/preflight.json b/plan/agw/research/live-svm-wire-2026-10-06/preflight.json new file mode 100644 index 00000000..a4933c48 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/preflight.json @@ -0,0 +1,53 @@ +{ + "push": { + "chainId": 42101, + "block": "23949601", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "token": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "quote": [ + "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "960000", + "0", + "1000", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "960" + ] + }, + "solana": { + "checkedAt": "2026-10-06T07:14:03.580Z", + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "genesis": "EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG", + "slot": 508014048, + "programDataSlot": 508014048, + "programs": [ + { + "address": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "programData": "DqeV1giGX9UPbTCsUaqau4ZaTqmjxKeRa4TQdbLiUCYC", + "lastUpgradeSlot": "496655369", + "dataLength": 724997, + "dataSha256": "2633943f479debc6bf0cba19861f90dfd01a09ecba206b2ce941c97281b8a95d" + }, + { + "address": "8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx", + "programData": "GQmC7eueNLqazwr7U9fR3s4VwbXUtNf1HL6UCXuSWvaN", + "lastUpgradeSlot": "447956626", + "dataLength": 279709, + "dataSha256": "6887b9299b53bcaede79facbe9d9a53c9a0ba78e2c109322caef070b57637f95" + } + ], + "gatewayConfig": { + "address": "2urirovTZSgpEAEFyf2dMWjMTqfkgg1J3piTBeSEwV5P", + "paused": false, + "dataSha256": "1f7595b955ae35e2ea577db04d3e73f30d7284d9536910065e0fc7b078b6ae33" + }, + "counter": { + "address": "6Kg1NF5RRytjGwR6USttBLEYJrqwm65xtJzdPbbFwJKg", + "value": "201889018", + "authority": "BesWssuCiGE3EqeGRFamuouvAxJDUCdWH6NPHpAFPMBa", + "dataSha256": "4b1725035d45f06567ffe10489d847db80caeb03a2fa853a018cac309879e224" + }, + "counterIdlSha256": "493678d103afab762cc1668d02c641226125166ba8b4d7df46b67fec52b3a9ca", + "gatewayIdlSha256": "62d7792d04c657e1224f7c64d13b68e2f49dd39fdd6da0088deca0c32a5fb042" + }, + "transactionsSent": 0 +} diff --git a/plan/agw/research/live-svm-wire-2026-10-06/readonly-replay.json b/plan/agw/research/live-svm-wire-2026-10-06/readonly-replay.json new file mode 100644 index 00000000..1e6ec02e --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/readonly-replay.json @@ -0,0 +1,574 @@ +{ + "at": "2026-10-06T07:46:11.434Z", + "readOnlyClient": true, + "transactionsSent": 0, + "observations": [ + { + "kind": "positive", + "hash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "from": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "origin": "eip155:42101:0xDfFb9e4cc2b869cF35ab811675333f40cD04dF76", + "route": "UOA_TO_CEA", + "agentic": { + "wallet": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "door": "agent", + "rulesId": "0x0ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d0", + "chainNamespace": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "rawTo": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "rawData": "0xc0ca77910ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000027800000000000000000000000000000000000000c10000000000000000000000000000000000000000000000008ac7230489e8000077b86bec000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000001400000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c00000000000000000000000000000000000000000000000000000000000000207673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d00000000000000000000000000000000000000000000000000000000000000bd000000044f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af012953026d328218b107268efe60f7d98635af1ff535a91731f75ca7cf8a85904401dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe81010000000000000000000000000000000000000000000000000000000000000000000000001079f4fa0308e5e1011027000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d0000000000000000000000" + }, + "receipt": { + "hash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "blockNumber": "23949837", + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "transactionIndex": 1, + "from": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "to": "0x00000000000000000000000000000000000000C1", + "contractAddress": null, + "gasPrice": "1125000000", + "gasUsed": "445073", + "cumulativeGasUsed": "445073", + "logs": [ + { + "address": "0x603e7f0af6e1aaff46ddfb28b1e99364f8bc59af", + "topics": [ + "0x3ac286ad36e454b1ae54d96d9de29fdde1f3984110b62d27d0c7bbc70ccfbf93", + "0xc83601cd9bbdf58b8e3e8ca5eda8bf224739c5f34b1b91e2c4c5d7a93cdb4fd5", + "0x000000000000000000000000165a5e6782f39d30b38c7d97e1303e4cb2ad102a", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c" + ], + "data": "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 1, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x00000000000000000000000000000000000000000000000000000000000000c1" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 2, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x00000000000000000000000000000000000000000000000000000000000000c1" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 3, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c1", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 4, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 5, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037" + ], + "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 6, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000e5914e3a7e2e6d18330dd33fa387ce33da48b54", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000ea600", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 7, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000000e5914e3a7e2e6d18330dd33fa387ce33da48b54" + ], + "data": "0x0000000000000000000000000000000000000000000000000c112c5348fdcf04", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 8, + "removed": false + }, + { + "address": "0x0e5914e3a7e2e6d18330dd33fa387ce33da48b54", + "topics": [ + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff15a000000000000000000000000000000000000000000000000000c112c5348fdcf0400000000000000000000000000000000000e84b1be17079db39e9ef80a30b925000000000000000000000000000000000000000000000002f15ecbc2e691bc650000000000000000000000000000000000000000000000000000000000043381", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 9, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 10, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000ea600", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 11, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x0000000000000000000000000000000000000000000000007eb5f6b140ea30fc", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 12, + "removed": false + }, + { + "address": "0x00000000000000000000000000000000000000c0", + "topics": [ + "0x01fd625a5ce1109c10761818e2ef64ea92cd4966d78086d37e5a4b50e3226878", + "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c" + ], + "data": "0x0000000000000000000000000000000000000000000000000c112c5348fdcf0400000000000000000000000000000000000000000000000000000000000ea60000000000000000000000000000000000000000000000000000000000000001f4", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 13, + "removed": false + }, + { + "address": "0x00000000000000000000000000000000000000c1", + "topics": [ + "0x8882d1d8f7b1750e49d021ea8d62e07c2d163645b8fa31c035905d6572ffc637", + "0xdcce211428bdd1e5bb6cd8c346fd68e2e919245bd28bca9692ec281d7a69fbcc", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000027100000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed00000000000000000000000000000000000000000000000000000000000ea60000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000027736f6c616e613a457457545241425a61597136694d6665594b6f755275313636565532787161310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000207673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d00000000000000000000000000000000000000000000000000000000000000bd000000044f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af012953026d328218b107268efe60f7d98635af1ff535a91731f75ca7cf8a85904401dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe81010000000000000000000000000000000000000000000000000000000000000000000000001079f4fa0308e5e1011027000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d000000", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 14, + "removed": false + }, + { + "address": "0x4612ad240cd66a77b921693bbbb356d1b8219b2c", + "topics": [ + "0x3dbef004c3d4318a109f103c40928ef6cb77519329e4d7f473364dd15bf6b3fd", + "0x0ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d0", + "0x000000000000000000000000dffb9e4cc2b869cf35ab811675333f40cd04df76" + ], + "data": "0xc2c1ff13c20fb17960a533cdbe11f2e82e5f4020bef7ff8e0c3749d5f2edd18b", + "blockNumber": "23949837", + "transactionHash": "0x50a96ff863722ced3464e3e8e5e451621903396c9bc83fcc010756dc1aee73b8", + "transactionIndex": 1, + "blockHash": "0xf5a2ba7e2704285075f3df2c63321ea337f6e0e55fc042abe4441afc260c594b", + "blockTimestamp": "0x6ac4a1f7", + "logIndex": 15, + "removed": false + } + ], + "logsBloom": "0x0020000110100000000000010000030100000000000000000000000000000000000000000000000000001e000000000000000000000022000400020040200008000000000200004808000008000000080000020004400004000800008020200000000000020002001000000004000803200000000000040200000090404c00000000000000000004000000000000000000010001000000002000020000001000020010000000000200000080000000000000000000000040010000100000000004000002200020000000000000000090800000100000000000000002000020004010020012004000000000000000000000000000000001400000000040000000", + "status": 1, + "raw": { + "from": "0xDfFb9e4cc2b869cF35ab811675333f40cD04dF76", + "to": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "nonce": 0, + "data": "0xc0ca77910ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000027800000000000000000000000000000000000000c10000000000000000000000000000000000000000000000008ac7230489e8000077b86bec000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000001400000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c00000000000000000000000000000000000000000000000000000000000000207673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d00000000000000000000000000000000000000000000000000000000000000bd000000044f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af012953026d328218b107268efe60f7d98635af1ff535a91731f75ca7cf8a85904401dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe81010000000000000000000000000000000000000000000000000000000000000000000000001079f4fa0308e5e1011027000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d0000000000000000000000", + "value": "0" + }, + "finalTxHash": "kGUaPUfASg9Poo93aMsztHJjUk27MKuRJBfDZK1WP3FFSaXSYcoPcxjUMFyDxaK6aU6mQkZeowSu3MtvK5PXKgK", + "externalTxHash": "kGUaPUfASg9Poo93aMsztHJjUk27MKuRJBfDZK1WP3FFSaXSYcoPcxjUMFyDxaK6aU6mQkZeowSu3MtvK5PXKgK", + "externalChain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "externalExplorerUrl": "https://explorer.solana.com/tx/kGUaPUfASg9Poo93aMsztHJjUk27MKuRJBfDZK1WP3FFSaXSYcoPcxjUMFyDxaK6aU6mQkZeowSu3MtvK5PXKgK?cluster=devnet", + "externalRecipient": "0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d", + "externalAmount": "10000", + "externalAssetAddr": "0x0000000000000000000000000000000000000000", + "externalStatus": "success" + } + }, + { + "kind": "pending-rejection", + "hash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "from": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "origin": "eip155:42101:0xDfFb9e4cc2b869cF35ab811675333f40cD04dF76", + "route": "UOA_TO_CEA", + "agentic": { + "wallet": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "door": "agent", + "rulesId": "0x0ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d0", + "chainNamespace": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "rawTo": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "rawData": "0xc0ca77910ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000023800000000000000000000000000000000000000c10000000000000000000000000000000000000000000000008ac7230489e8000077b86bec000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000001400000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c00000000000000000000000000000000000000000000000000000000000000207673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d000000000000000000000000000000000000000000000000000000000000007b000000024f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af01dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe8100000000106ae3a83bf81b96650100000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d00000000000000000000000000" + }, + "receipt": { + "hash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "blockNumber": "23949885", + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "transactionIndex": 0, + "from": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "to": "0x00000000000000000000000000000000000000C1", + "contractAddress": null, + "gasPrice": "1125000000", + "gasUsed": "417241", + "cumulativeGasUsed": "417241", + "logs": [ + { + "address": "0x603e7f0af6e1aaff46ddfb28b1e99364f8bc59af", + "topics": [ + "0x3ac286ad36e454b1ae54d96d9de29fdde1f3984110b62d27d0c7bbc70ccfbf93", + "0xc83601cd9bbdf58b8e3e8ca5eda8bf224739c5f34b1b91e2c4c5d7a93cdb4fd5", + "0x000000000000000000000000165a5e6782f39d30b38c7d97e1303e4cb2ad102a", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c" + ], + "data": "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 0, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x00000000000000000000000000000000000000000000000000000000000000c1" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 1, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x00000000000000000000000000000000000000000000000000000000000000c1" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 2, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c1", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000002710", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 3, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 4, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037" + ], + "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 5, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000e5914e3a7e2e6d18330dd33fa387ce33da48b54", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000ea600", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 6, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000000e5914e3a7e2e6d18330dd33fa387ce33da48b54" + ], + "data": "0x0000000000000000000000000000000000000000000000000c112c58397d3a87", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 7, + "removed": false + }, + { + "address": "0x0e5914e3a7e2e6d18330dd33fa387ce33da48b54", + "topics": [ + "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffff15a000000000000000000000000000000000000000000000000000c112c58397d3a8700000000000000000000000000000000000e84b1c10fb5fd51e951bcc48cb09f000000000000000000000000000000000000000000000002f15ecbc2e691bc650000000000000000000000000000000000000000000000000000000000043381", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 8, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000005d548bb9e305aae0d6dc6e6fdc3ab419f6ac0037" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 9, + "removed": false + }, + { + "address": "0x5d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x00000000000000000000000000000000000000000000000000000000000000c0", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000ea600", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 10, + "removed": false + }, + { + "address": "0xe17dd2e0509f99e9ee9469cf6634048ec5a3ade9", + "topics": [ + "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65", + "0x00000000000000000000000000000000000000000000000000000000000000c0" + ], + "data": "0x0000000000000000000000000000000000000000000000007eb5f6ac506ac579", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 11, + "removed": false + }, + { + "address": "0x00000000000000000000000000000000000000c0", + "topics": [ + "0x01fd625a5ce1109c10761818e2ef64ea92cd4966d78086d37e5a4b50e3226878", + "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c" + ], + "data": "0x0000000000000000000000000000000000000000000000000c112c58397d3a8700000000000000000000000000000000000000000000000000000000000ea60000000000000000000000000000000000000000000000000000000000000001f4", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 12, + "removed": false + }, + { + "address": "0x00000000000000000000000000000000000000c1", + "topics": [ + "0x8882d1d8f7b1750e49d021ea8d62e07c2d163645b8fa31c035905d6572ffc637", + "0xd7e4da935abc97cbb68c0869dafa1e28038b89848c53650364250f60cd11e1ef", + "0x0000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c", + "0x0000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000027100000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed00000000000000000000000000000000000000000000000000000000000ea60000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000027736f6c616e613a457457545241425a61597136694d6665594b6f755275313636565532787161310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000207673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d000000000000000000000000000000000000000000000000000000000000007b000000024f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af01dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe8100000000106ae3a83bf81b96650100000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d0000000000", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 13, + "removed": false + }, + { + "address": "0x4612ad240cd66a77b921693bbbb356d1b8219b2c", + "topics": [ + "0x3dbef004c3d4318a109f103c40928ef6cb77519329e4d7f473364dd15bf6b3fd", + "0x0ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d0", + "0x000000000000000000000000dffb9e4cc2b869cf35ab811675333f40cd04df76" + ], + "data": "0x356b0bac276dd8ee6f6f4f4e0ecbcc5ca8f3667706ef81daaa6b1d70a52701d3", + "blockNumber": "23949885", + "transactionHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "transactionIndex": 0, + "blockHash": "0xc465553f489498b344dd61a15da3ac67a7b98a294c72787ba4ab399e8adbfb4e", + "blockTimestamp": "0x6ac4a26c", + "logIndex": 14, + "removed": false + } + ], + "logsBloom": "0x0020000110100000000000010000030100000000000000000000000000000000000000000000000000001e000000000000000000000022000400020040200008000000000200004808000008000000080000022004400004000800008020200400000000020002001000000004000802200000000000040200000090404800000000000000000004000000000000000000010001000000002000020000001000020010000000000200000080000000000000000000000040010000100000000004000002200020000000000000000090800000120000000000000002000020004010000012004000000000000000000000000000000001400000000040000000", + "status": 1, + "raw": { + "from": "0xDfFb9e4cc2b869cF35ab811675333f40cD04dF76", + "to": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "nonce": 1, + "data": "0xc0ca77910ed59a0b2764cf395b53a7a7d1b58e2ae3fb99b818be5392f3fdbc7eb4f645d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000023800000000000000000000000000000000000000c10000000000000000000000000000000000000000000000008ac7230489e8000077b86bec000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000005d525df2bd99a6e7ec58b76af2fd95f39874ebed000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000001400000000000000000000000004612ad240cd66a77b921693bbbb356d1b8219b2c00000000000000000000000000000000000000000000000000000000000000207673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d000000000000000000000000000000000000000000000000000000000000007b000000024f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af01dd7c1b885eb85dbac2db2a4ce5887489200c20d2549a6ed12d202cd12a7dfe8100000000106ae3a83bf81b96650100000000000000027673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d00000000000000000000000000", + "value": "0" + }, + "finalTxHash": "0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc", + "externalStatus": "failed", + "externalError": "Outbound to solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 reverted: tx not executed on destination chain. Push Chain TX: 0x51e2227e833e8090844f151c2d5d959225d3ec24828bf11a1c6467e2a74410fc." + } + } + ] +} \ No newline at end of file diff --git a/plan/agw/research/live-svm-wire-2026-10-06/run-redacted.cjs b/plan/agw/research/live-svm-wire-2026-10-06/run-redacted.cjs new file mode 100644 index 00000000..d72a7787 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/run-redacted.cjs @@ -0,0 +1,33 @@ +/** Bounded, opt-in test runner. Never prints/copies environment credentials. */ +const fs = require('node:fs'); +const path = require('node:path'); +const { spawn } = require('node:child_process'); +const dotenv = require('dotenv'); +const root = path.resolve(__dirname, '../../../..'); +const env = { ...process.env, ...dotenv.parse(fs.readFileSync(path.join(root, 'packages/core/.env'))) }; +const secrets = [...new Set(Object.entries(env) + .filter(([name, value]) => /KEY|SECRET|TOKEN|PASSWORD/.test(name) && value && value.length >= 6) + .flatMap(([, value]) => [value, ...(value.startsWith('0x') ? [value.slice(2)] : [])]))] + .sort((a, b) => b.length - a.length); +const redact = (text) => secrets.reduce((result, secret) => result.split(secret).join('[REDACTED]'), text); +const group = process.argv[2] ?? 'agw-svm-wire'; +const name = process.argv[3] ?? `${group}.log`; +if (!['agw-svm-wire', 'agw-extended'].includes(group)) throw new Error('Unsupported funded AGW test group'); +if (!/^[a-z0-9-]+\.log$/.test(name)) throw new Error('Use a simple log filename'); +const child = spawn(process.execPath, ['../../node_modules/ts-node/dist/bin.js', '--transpile-only', + '__e2e__/ci/run.ts', '--group', group], { + cwd: path.join(root, 'packages/core'), env, stdio: ['ignore', 'pipe', 'pipe'], +}); +let log = ''; +child.stdout.on('data', (data) => { log += data.toString(); }); +child.stderr.on('data', (data) => { log += data.toString(); }); +child.on('error', (error) => console.error(redact(error.message))); +child.on('exit', (code) => { + const clean = redact(log); + fs.mkdirSync(path.join(__dirname, 'logs'), { recursive: true }); + fs.writeFileSync(path.join(__dirname, 'logs', name), clean); + console.log(clean.slice(-12000)); + console.log(`Sanitized wire test log saved; exit=${code}`); + process.exitCode = code || 0; +}); +console.log('Starting bounded live wire suite; output is buffered and redacted.'); diff --git a/plan/agw/research/live-svm-wire-2026-10-06/terminal-accounting.json b/plan/agw/research/live-svm-wire-2026-10-06/terminal-accounting.json new file mode 100644 index 00000000..d5ca6b81 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/terminal-accounting.json @@ -0,0 +1,10 @@ +{ + "at": "2026-10-06T07:56:43.396Z", + "block": "23950641", + "wallet": "0x4612ad240cd66A77b921693BbbB356d1B8219b2c", + "token": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "balance": "10000", + "allowance": "0", + "spent": "20000", + "transactionsSent": 0 +} \ No newline at end of file diff --git a/plan/agw/research/live-svm-wire-2026-10-06/validation.json b/plan/agw/research/live-svm-wire-2026-10-06/validation.json new file mode 100644 index 00000000..3e2f2a21 --- /dev/null +++ b/plan/agw/research/live-svm-wire-2026-10-06/validation.json @@ -0,0 +1,47 @@ +{ + "at": "2026-10-06T08:06:26.092329+00:00", + "unit": { + "passed": 1981, + "failed": 0, + "skipped": 12 + }, + "recorded_live_e2e": { + "passed": 3, + "failed": 0, + "transactions_sent": 0 + }, + "initial_funded_e2e": { + "passed": 2, + "failed": 1, + "failure": "externalStatus timeout at 600 seconds; same source outbound later became REVERTED and read-only replay classified failed" + }, + "funded_source_outbounds": 2, + "core_build": "pass", + "types": { + "library": "pass", + "spec": "pass" + }, + "lint": { + "errors": 0, + "warnings": 21 + }, + "groups": { + "all": { + "scenarios": 76, + "tests": 81 + }, + "agw": { + "scenarios": 25 + }, + "agw-svm-wire": { + "scenarios": 3 + }, + "agw-svm-replay": { + "scenarios": 3 + } + }, + "public_svm_enabled": false, + "production_library_files_changed": false, + "prior_local_contract_passes": 75, + "local_contract_suite_rerun": false +} diff --git a/plan/agw/research/native-multi-action-e2e-2026-10-12/README.md b/plan/agw/research/native-multi-action-e2e-2026-10-12/README.md new file mode 100644 index 00000000..612163af --- /dev/null +++ b/plan/agw/research/native-multi-action-e2e-2026-10-12/README.md @@ -0,0 +1,43 @@ +# Native multi-action SDK acceptance — October 12, 2026 + +Working branch: `feat/agw-sdk-v4`, after the user's v5 merge (`7115c594`). Contract fixture: deployed Donut v5 source `2e61e13`. All work in this pass remains local; no commit, push, PR update or merge was performed by the agent. + +## Changes + +Ten opt-in scenarios are added in `packages/core/__e2e__/agw/native-multi-action.spec.ts`. The AGW group now contains **68 scenarios / 15 files / 68 tests**. Default `all` remains **76 / 40 / 81**. + +1. Grant/read two native actions under one ID, recreate decoded terms, execute both, and verify replay identity. +2. Reject wrong recipient pins, excess amounts and an ungranted selector with unchanged balances, both action configs and signer nonce. +3. Exhaust PC/call capacity in one action while the token action remains usable; verify independent counters and amount totals. +4. Execute a mixed PC/token atomic batch through native EIP-7702, checking sender identity, both spends and replayed call metadata. +5. Reject a failing second item through SDK simulation, then submit the same encoded mixed batch as a bounded raw transaction through the already delegated agent. Its mined revert must have no logs and restore both balances and action counters. +6. Replace a two-action rule, verify six checkpoint ticks and fresh counters, then remove an action and prove it is no longer authorized. +7. Inject a real token spend in the second action between replacement reads and execution; require `SpentMismatch`, unchanged grant nonce/checkpoints and original rule, then a successful fresh retry. +8. Accept eight actions; reject empty, duplicate, mixed-shape and ninth-action inputs before signing. +9. Expire the first action while the later-expiring second action remains usable under the same ID. +10. Return structured `INVALID_RULE` for malformed action entries and missing/expired rule expiry, with no new wallet or owner nonce change. + +The shared state helper reads every action's policy config at one pinned block. Tests compare actual balances, individual counters, grant nonces, checkpoint counts and receipts instead of relying on SDK return values alone. Each test creates its own wallets and can be selected independently. + +## Review fixes exercised by the tests + +- `nativeActionsOf` checks that every action is an object before reading it, so `actions: [null]` produces `AgenticError(INVALID_RULE)` rather than a JavaScript `TypeError`. +- Required rule-level expiry is validated even when every action overrides it. Four added unit regressions cover null/non-object entries and missing/expired rule expiry. +- The guide now states that replacement of N old native actions adds **N + 4** checkpoints. Universal replacement still adds five. +- The public multi-action type remains pending product sign-off. Test completion does not constitute that approval. + +## Validation + +- Full units: **2,034 passed, 12 skipped, 0 failed**. Focused AGW units: **255 passed**. +- Actual pinned v5 contract harness: **97 passed**, 13 suites, including the seven prior multi-action cases. +- Spec/local typechecks, build, 11 consumer guide blocks, CJS/ESM package/declaration checks and API comparison passed. +- Registration and full-group funding preflight `--dry-run` passed. The live run selects only this new ten-case file. +- Final E2E/state-helper lint has no errors or warnings. The native codec retains its previously reported unused destructured `_agent` warning. + +Live Donut: **10/10 passed in one invocation** (585 seconds). [Exact live log](logs/live-donut.log), [transaction and state evidence](live-evidence.jsonl), [validation summary](validation.json). No scenario was skipped or rerun to obtain this result. The final test file additionally bounds the expiry wait to two minutes; the successful run did not require that timeout. + +## Scope and funding + +The existing verified v5 manifest gates setup. No test contract is deployed. Fixtures use one fresh agent funded with at most **0.5 PC**, fresh AGWs funded with **10 PC wei** and **20 raw pETH units** each, and existing Donut token/executor contracts. The intentionally failing raw batch has a **600,000-gas** ceiling and spends the fresh agent's gas only. Its outer encoding is the same ERC-7821 execute shape used by the SDK. + +The second-action race injects a real public SDK send immediately before owner submission; the stale owner operation is refused during simulation. The expiry wait is bounded to two minutes. No external-chain delivery or contract deployment is needed for these native cases. Existing EVM/SVM and other live groups were not rerun in this pass; this is not a single 68-case run. diff --git a/plan/agw/research/native-multi-action-e2e-2026-10-12/api-comparison.json b/plan/agw/research/native-multi-action-e2e-2026-10-12/api-comparison.json new file mode 100644 index 00000000..98c958a4 --- /dev/null +++ b/plan/agw/research/native-multi-action-e2e-2026-10-12/api-comparison.json @@ -0,0 +1,11644 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "7115c59474af6304905ad3e4466732b0530dc791", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [ + "DecodedSolanaRule", + "NativeAction", + "NativeMultiRule", + "NativeSingleRule", + "SolanaRule", + "SvmAccountRef", + "SvmFieldConstraint", + "SvmInstructionRule" + ], + "removedExports": [], + "changedAgwTypes": [ + "AgenticError", + "AGENTIC_ERROR_CODE", + "NativeRule", + "AllowedCall", + "UniversalRule", + "RulesRecord", + "AgenticTxMetadata" + ], + "publicTypeChanges": [ + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticErrorCode", + "AgenticNetworkConstants", + "AgenticTxMetadata", + "AllowedCall", + "NativeAction", + "NativeMultiRule", + "NativeRule", + "NativeSingleRule", + "SolanaRule", + "DecodedSolanaRule", + "SvmInstructionRule", + "SvmAccountRef", + "SvmFieldConstraint", + "Rule", + "RulesRecord", + "UniversalRule" + ], + "transactionMethodChanges": [], + "instanceMethodChanges": [], + "agwConstantsChanged": true, + "before": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address(token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }): {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "after": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DecodedSolanaRule", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeAction", + "NativeMultiRule", + "NativeRule", + "NativeSingleRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SolanaRule", + "SvmAccountRef", + "SvmExecutePayloadFields", + "SvmFieldConstraint", + "SvmGatewayAccountMeta", + "SvmInstructionRule", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeMultiRule | import(\"sdk/src/lib/agentic/agentic.types\").NativeSingleRule", + "members": { + "actions": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeAction[] | undefined" + }, + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "beneficiaryOffset": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": false, + "readonly": false, + "type": "number" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "beneficiaryOffset": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeAction": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeAction", + "members": { + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "NativeMultiRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeMultiRule", + "members": { + "actions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeAction[]" + }, + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeMultiRule | import(\"sdk/src/lib/agentic/agentic.types\").NativeSingleRule", + "members": { + "actions": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeAction[] | undefined" + }, + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "NativeSingleRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeSingleRule", + "members": { + "actions": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "SolanaRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").SolanaRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedInstructions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").SvmInstructionRule[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal?: bigint;\n token: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n}[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "outputTokens": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DecodedSolanaRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[]" + }, + "ceaAccounts": { + "optional": false, + "readonly": false, + "type": "readonly `0x${string}`[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`solana:${string}`" + }, + "dataPins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmDataPinWire[]" + }, + "expectedCEA": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "format": { + "optional": false, + "readonly": false, + "type": "\"decoded\"" + }, + "gatewayProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmAccountPinWire[]" + }, + "programs": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").AllowedProgramWire[]" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "SvmInstructionRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").SvmInstructionRule", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "{\n expected: import(\"sdk/src/lib/agentic/agentic.types\").SvmAccountRef;\n name: string;\n}[]" + }, + "fields": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").SvmFieldConstraint[] | undefined" + }, + "instruction": { + "optional": false, + "readonly": false, + "type": "{\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n name: string;\n}" + }, + "program": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "SvmAccountRef": { + "type": "{\n address: string;\n kind: \"address\";\n} | {\n kind: \"walletATA\";\n token: string;\n} | {\n kind: \"walletCEA\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"address\" | \"walletATA\" | \"walletCEA\"" + } + } + }, + "SvmFieldConstraint": { + "type": "{\n denominator: string;\n minRatio: {\n den: bigint;\n num: bigint;\n };\n numerator: string;\n} | {\n equals: `0x${string}` | bigint | boolean;\n name: string;\n} | {\n max: bigint;\n name: string;\n} | {\n min: bigint;\n name: string;\n}", + "members": {} + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").SolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address: (token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": false, + "readonly": false, + "type": "number" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "scope": "All root exports and declared public members, PushChain static/instance members, universal transaction methods, utility groups, readonly/optional markers and constants. Behavior/default/deployment changes need the written session review." +} diff --git a/plan/agw/research/native-multi-action-e2e-2026-10-12/credential-scan.json b/plan/agw/research/native-multi-action-e2e-2026-10-12/credential-scan.json new file mode 100644 index 00000000..4c200d6d --- /dev/null +++ b/plan/agw/research/native-multi-action-e2e-2026-10-12/credential-scan.json @@ -0,0 +1,4 @@ +{ + "scanned": 37, + "credentialMatches": [] +} diff --git a/plan/agw/research/native-multi-action-e2e-2026-10-12/live-evidence.jsonl b/plan/agw/research/native-multi-action-e2e-2026-10-12/live-evidence.jsonl new file mode 100644 index 00000000..18bd02fe --- /dev/null +++ b/plan/agw/research/native-multi-action-e2e-2026-10-12/live-evidence.jsonl @@ -0,0 +1,16 @@ +{"name": "native-multi-grant-read-send", "at": "2026-10-12T11:44:22.795Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x76c1ea6815fF50407325b3752627F20BAe82b8cD", "id": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "copy": "0xeF8180C9EEB82f25Ad3B96CD50E849AF414f1b6A", "hashes": ["0x23d526366ead37fb3b2f0d9929a2665aececa7bf81e30c7ab00274b86808efee", "0x9ec060ab43138d918b12bd5fbb70fb8fa87c2bba0ef2df22b69e92eaf819e56c", "0x83587566f82943d1c7e2c17d9bdf2fa8d98ecb14c0a237072d9ea1d2e3d45120", "0xb1ed6b77c5f82f0e5dd719dfe79bb2143abdb15b47a578a317f90192a606c902"], "state": {"configs": [{"actionId": "0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c", "config": {"initialized": true, "validUntil": 1791808978, "target": "0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf", "selector": "0xffffffff", "maxValuePerCall": "1", "maxValueTotal": "2", "valueSpent": "1", "amount": {"enabled": false, "offset": 0, "maxPerCall": "0", "maxTotal": "0"}, "amountSpent": "0", "maxCalls": 2, "callsUsed": 1, "pins": []}}, {"actionId": "0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d", "config": {"initialized": true, "validUntil": 1791808978, "target": "0x2971824Db68229D087931155C2b8bB820B275809", "selector": "0xa9059cbb", "maxValuePerCall": "0", "maxValueTotal": "0", "valueSpent": "0", "amount": {"enabled": true, "offset": 36, "maxPerCall": "3", "maxTotal": "5"}, "amountSpent": "2", "maxCalls": 4, "callsUsed": 1, "pins": [{"offset": 4, "expected": "0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"}]}}], "walletPC": "9", "recipientPC": "969572353733022131997650", "walletToken": "18", "recipientToken": "434311519549551168609", "checkpointCount": "1", "grantNonce": "1"}} +{"name": "native-multi-refused", "at": "2026-10-12T11:45:01.116Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xFC43b68d04A07cD67E175849E677279de8f86531", "id": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "gate": "PolicyCheckReverted(ArgPinMismatch)", "state": {"configs": [{"actionId": "0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c", "config": {"initialized": true, "validUntil": 1791809062, "target": "0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf", "selector": "0xffffffff", "maxValuePerCall": "1", "maxValueTotal": "2", "valueSpent": "0", "amount": {"enabled": false, "offset": 0, "maxPerCall": "0", "maxTotal": "0"}, "amountSpent": "0", "maxCalls": 2, "callsUsed": 0, "pins": []}}, {"actionId": "0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d", "config": {"initialized": true, "validUntil": 1791809062, "target": "0x2971824Db68229D087931155C2b8bB820B275809", "selector": "0xa9059cbb", "maxValuePerCall": "0", "maxValueTotal": "0", "valueSpent": "0", "amount": {"enabled": true, "offset": 36, "maxPerCall": "3", "maxTotal": "5"}, "amountSpent": "0", "maxCalls": 4, "callsUsed": 0, "pins": [{"offset": 4, "expected": "0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"}]}}], "walletPC": "10", "recipientPC": "969572352390339131997640", "walletToken": "20", "recipientToken": "434311519549551168589", "checkpointCount": "1", "grantNonce": "1"}, "agentNonce": 2} +{"name": "native-multi-refused", "at": "2026-10-12T11:45:05.025Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xFC43b68d04A07cD67E175849E677279de8f86531", "id": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "gate": "PolicyCheckReverted(NativeAmountExceedsCap)", "state": {"configs": [{"actionId": "0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c", "config": {"initialized": true, "validUntil": 1791809062, "target": "0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf", "selector": "0xffffffff", "maxValuePerCall": "1", "maxValueTotal": "2", "valueSpent": "0", "amount": {"enabled": false, "offset": 0, "maxPerCall": "0", "maxTotal": "0"}, "amountSpent": "0", "maxCalls": 2, "callsUsed": 0, "pins": []}}, {"actionId": "0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d", "config": {"initialized": true, "validUntil": 1791809062, "target": "0x2971824Db68229D087931155C2b8bB820B275809", "selector": "0xa9059cbb", "maxValuePerCall": "0", "maxValueTotal": "0", "valueSpent": "0", "amount": {"enabled": true, "offset": 36, "maxPerCall": "3", "maxTotal": "5"}, "amountSpent": "0", "maxCalls": 4, "callsUsed": 0, "pins": [{"offset": 4, "expected": "0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"}]}}], "walletPC": "10", "recipientPC": "969572352390339131997640", "walletToken": "20", "recipientToken": "434311519549551168589", "checkpointCount": "1", "grantNonce": "1"}, "agentNonce": 2} +{"name": "native-multi-refused", "at": "2026-10-12T11:45:08.918Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xFC43b68d04A07cD67E175849E677279de8f86531", "id": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "gate": "NoPoliciesSet", "state": {"configs": [{"actionId": "0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c", "config": {"initialized": true, "validUntil": 1791809062, "target": "0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf", "selector": "0xffffffff", "maxValuePerCall": "1", "maxValueTotal": "2", "valueSpent": "0", "amount": {"enabled": false, "offset": 0, "maxPerCall": "0", "maxTotal": "0"}, "amountSpent": "0", "maxCalls": 2, "callsUsed": 0, "pins": []}}, {"actionId": "0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d", "config": {"initialized": true, "validUntil": 1791809062, "target": "0x2971824Db68229D087931155C2b8bB820B275809", "selector": "0xa9059cbb", "maxValuePerCall": "0", "maxValueTotal": "0", "valueSpent": "0", "amount": {"enabled": true, "offset": 36, "maxPerCall": "3", "maxTotal": "5"}, "amountSpent": "0", "maxCalls": 4, "callsUsed": 0, "pins": [{"offset": 4, "expected": "0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"}]}}], "walletPC": "10", "recipientPC": "969572352390339131997640", "walletToken": "20", "recipientToken": "434311519549551168589", "checkpointCount": "1", "grantNonce": "1"}, "agentNonce": 2} +{"name": "native-multi-refused", "at": "2026-10-12T11:45:58.131Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x3590679Ad8a77610Eb3D70B8b972E1e2a500817b", "id": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "gate": "PolicyCheckReverted(CallLimitReached)", "state": {"configs": [{"actionId": "0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c", "config": {"initialized": true, "validUntil": 1791809109, "target": "0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf", "selector": "0xffffffff", "maxValuePerCall": "1", "maxValueTotal": "2", "valueSpent": "2", "amount": {"enabled": false, "offset": 0, "maxPerCall": "0", "maxTotal": "0"}, "amountSpent": "0", "maxCalls": 2, "callsUsed": 2, "pins": []}}, {"actionId": "0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d", "config": {"initialized": true, "validUntil": 1791809109, "target": "0x2971824Db68229D087931155C2b8bB820B275809", "selector": "0xa9059cbb", "maxValuePerCall": "0", "maxValueTotal": "0", "valueSpent": "0", "amount": {"enabled": true, "offset": 36, "maxPerCall": "3", "maxTotal": "5"}, "amountSpent": "0", "maxCalls": 4, "callsUsed": 0, "pins": [{"offset": 4, "expected": "0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"}]}}], "walletPC": "8", "recipientPC": "969572351047696631997632", "walletToken": "20", "recipientToken": "434311519549551168569", "checkpointCount": "1", "grantNonce": "1"}, "agentNonce": 4} +{"name": "native-multi-refused", "at": "2026-10-12T11:46:17.796Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x3590679Ad8a77610Eb3D70B8b972E1e2a500817b", "id": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "gate": "PolicyCheckReverted(TotalNativeAmountExceeded)", "state": {"configs": [{"actionId": "0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c", "config": {"initialized": true, "validUntil": 1791809109, "target": "0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf", "selector": "0xffffffff", "maxValuePerCall": "1", "maxValueTotal": "2", "valueSpent": "2", "amount": {"enabled": false, "offset": 0, "maxPerCall": "0", "maxTotal": "0"}, "amountSpent": "0", "maxCalls": 2, "callsUsed": 2, "pins": []}}, {"actionId": "0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d", "config": {"initialized": true, "validUntil": 1791809109, "target": "0x2971824Db68229D087931155C2b8bB820B275809", "selector": "0xa9059cbb", "maxValuePerCall": "0", "maxValueTotal": "0", "valueSpent": "0", "amount": {"enabled": true, "offset": 36, "maxPerCall": "3", "maxTotal": "5"}, "amountSpent": "5", "maxCalls": 4, "callsUsed": 2, "pins": [{"offset": 4, "expected": "0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"}]}}], "walletPC": "8", "recipientPC": "969572351047696631997632", "walletToken": "15", "recipientToken": "434311519549551168574", "checkpointCount": "1", "grantNonce": "1"}, "agentNonce": 6} +{"name": "native-multi-independent-counters", "at": "2026-10-12T11:46:18.693Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x3590679Ad8a77610Eb3D70B8b972E1e2a500817b", "id": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "state": {"configs": [{"actionId": "0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c", "config": {"initialized": true, "validUntil": 1791809109, "target": "0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf", "selector": "0xffffffff", "maxValuePerCall": "1", "maxValueTotal": "2", "valueSpent": "2", "amount": {"enabled": false, "offset": 0, "maxPerCall": "0", "maxTotal": "0"}, "amountSpent": "0", "maxCalls": 2, "callsUsed": 2, "pins": []}}, {"actionId": "0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d", "config": {"initialized": true, "validUntil": 1791809109, "target": "0x2971824Db68229D087931155C2b8bB820B275809", "selector": "0xa9059cbb", "maxValuePerCall": "0", "maxValueTotal": "0", "valueSpent": "0", "amount": {"enabled": true, "offset": 36, "maxPerCall": "3", "maxTotal": "5"}, "amountSpent": "5", "maxCalls": 4, "callsUsed": 2, "pins": [{"offset": 4, "expected": "0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"}]}}], "walletPC": "8", "recipientPC": "969572351047696631997632", "walletToken": "15", "recipientToken": "434311519549551168574", "checkpointCount": "1", "grantNonce": "1"}} +{"name": "native-multi-mixed-batch", "at": "2026-10-12T11:47:11.010Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xbef2F2fBfd7E8316B5BC62EabE763dE94F33960d", "id": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "hash": "0x8244c8dced419a9baad66ab7888be8b63829bb299eee1c76c29b3a3b1572e877", "state": {"configs": [{"actionId": "0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c", "config": {"initialized": true, "validUntil": 1791809178, "target": "0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf", "selector": "0xffffffff", "maxValuePerCall": "1", "maxValueTotal": "2", "valueSpent": "1", "amount": {"enabled": false, "offset": 0, "maxPerCall": "0", "maxTotal": "0"}, "amountSpent": "0", "maxCalls": 2, "callsUsed": 1, "pins": []}}, {"actionId": "0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d", "config": {"initialized": true, "validUntil": 1791809178, "target": "0x2971824Db68229D087931155C2b8bB820B275809", "selector": "0xa9059cbb", "maxValuePerCall": "0", "maxValueTotal": "0", "valueSpent": "0", "amount": {"enabled": true, "offset": 36, "maxPerCall": "3", "maxTotal": "5"}, "amountSpent": "2", "maxCalls": 4, "callsUsed": 1, "pins": [{"offset": 4, "expected": "0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"}]}}], "walletPC": "9", "recipientPC": "969572349705013631997623", "walletToken": "18", "recipientToken": "434311519549551168556", "checkpointCount": "1", "grantNonce": "1"}} +{"name": "native-multi-refused", "at": "2026-10-12T11:47:56.726Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xDEB9A125CB641D26A695CA1D4443939C71f8635c", "id": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "gate": "PolicyCheckReverted(NativeAmountExceedsCap)", "state": {"configs": [{"actionId": "0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c", "config": {"initialized": true, "validUntil": 1791809231, "target": "0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf", "selector": "0xffffffff", "maxValuePerCall": "1", "maxValueTotal": "2", "valueSpent": "1", "amount": {"enabled": false, "offset": 0, "maxPerCall": "0", "maxTotal": "0"}, "amountSpent": "0", "maxCalls": 2, "callsUsed": 1, "pins": []}}, {"actionId": "0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d", "config": {"initialized": true, "validUntil": 1791809231, "target": "0x2971824Db68229D087931155C2b8bB820B275809", "selector": "0xa9059cbb", "maxValuePerCall": "0", "maxValueTotal": "0", "valueSpent": "0", "amount": {"enabled": true, "offset": 36, "maxPerCall": "3", "maxTotal": "5"}, "amountSpent": "1", "maxCalls": 4, "callsUsed": 1, "pins": [{"offset": 4, "expected": "0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"}]}}], "walletPC": "9", "recipientPC": "969572348362330631997614", "walletToken": "19", "recipientToken": "434311519549551168537", "checkpointCount": "1", "grantNonce": "1"}, "agentNonce": 10} +{"name": "native-multi-mined-rollback", "at": "2026-10-12T11:48:02.313Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xDEB9A125CB641D26A695CA1D4443939C71f8635c", "id": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "hash": "0xe592e422c9f958f80e1a5b2b6575c5f49b27e41033a5d5b3aafac4510245799a", "block": "24167667", "gasUsed": "300000", "state": {"configs": [{"actionId": "0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c", "config": {"initialized": true, "validUntil": 1791809231, "target": "0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf", "selector": "0xffffffff", "maxValuePerCall": "1", "maxValueTotal": "2", "valueSpent": "1", "amount": {"enabled": false, "offset": 0, "maxPerCall": "0", "maxTotal": "0"}, "amountSpent": "0", "maxCalls": 2, "callsUsed": 1, "pins": []}}, {"actionId": "0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d", "config": {"initialized": true, "validUntil": 1791809231, "target": "0x2971824Db68229D087931155C2b8bB820B275809", "selector": "0xa9059cbb", "maxValuePerCall": "0", "maxValueTotal": "0", "valueSpent": "0", "amount": {"enabled": true, "offset": 36, "maxPerCall": "3", "maxTotal": "5"}, "amountSpent": "1", "maxCalls": 4, "callsUsed": 1, "pins": [{"offset": 4, "expected": "0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"}]}}], "walletPC": "9", "recipientPC": "969572348362330631997614", "walletToken": "19", "recipientToken": "434311519549551168537", "checkpointCount": "1", "grantNonce": "1"}} +{"name": "native-multi-replacement", "at": "2026-10-12T11:49:13.204Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xBbCF2b4fB9b49237129175293Ec96Cc3008437a1", "oldId": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "newId": "0x8744081a45faa6a01722dff73da0d93bc796614f2cd3c3f795d7ffea10beb33d", "trimmedId": "0x8cbdc3d9165f9a9bd37f0b81ff4ef7f04ab523e808717c14cda312b151e1b80a", "hashes": ["0x7c1443310972b9e3501351ac63c343045ac77c601c65104a53d10a1542ca2381", "0xac7a139322ba8b7e981ffcab11551667463311014be4a3541067309cdb2209cd", "0x908065e4a835ade2f4195cc37092e5f94d7ee0bdb8523a3f70d2575e049dfebe"]} +{"name": "native-multi-second-action-race", "at": "2026-10-12T11:50:08.320Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x1E5616320596A9b0F0326eAeA2E061dccB34c7B4", "oldId": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "newId": "0x8744081a45faa6a01722dff73da0d93bc796614f2cd3c3f795d7ffea10beb33d", "spendHash": "0x6e0bfd3b2b481cf39dfc8ef8bc3b9d82250accfdfff6f0d2297b95a628a39247", "retryHash": "0x8f399fb1485bde5ce938ba8ff12858ecee9e1610c033930939fd079a1f94ccec", "stateAfterRace": {"configs": [{"actionId": "0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c", "config": {"initialized": true, "validUntil": 1791809353, "target": "0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf", "selector": "0xffffffff", "maxValuePerCall": "1", "maxValueTotal": "2", "valueSpent": "0", "amount": {"enabled": false, "offset": 0, "maxPerCall": "0", "maxTotal": "0"}, "amountSpent": "0", "maxCalls": 2, "callsUsed": 0, "pins": []}}, {"actionId": "0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d", "config": {"initialized": true, "validUntil": 1791809353, "target": "0x2971824Db68229D087931155C2b8bB820B275809", "selector": "0xa9059cbb", "maxValuePerCall": "0", "maxValueTotal": "0", "valueSpent": "0", "amount": {"enabled": true, "offset": 36, "maxPerCall": "3", "maxTotal": "5"}, "amountSpent": "1", "maxCalls": 4, "callsUsed": 1, "pins": [{"offset": 4, "expected": "0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"}]}}], "walletPC": "10", "recipientPC": "969572343854891006997595", "walletToken": "19", "recipientToken": "434311519549551168501", "checkpointCount": "1", "grantNonce": "1"}} +{"name": "native-multi-eight-boundary", "at": "2026-10-12T11:50:31.951Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x2AaEd40d93A6B00f6Cf6523F07199AFA5caF4061", "id": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "hash": "0x18b052a9dcff2091a7ba315afd9264ea6f80d93a147c05c2d30ffc47986dab5e", "unchangedNextSlot": 40} +{"name": "native-multi-refused", "at": "2026-10-12T11:52:12.019Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xA79688f8fb433E60DEF8492372528Ae06E68B158", "id": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "gate": "PolicyCheckReverted(RulesExpired)", "state": {"configs": [{"actionId": "0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c", "config": {"initialized": true, "validUntil": 1791805921, "target": "0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf", "selector": "0xffffffff", "maxValuePerCall": "1", "maxValueTotal": "2", "valueSpent": "1", "amount": {"enabled": false, "offset": 0, "maxPerCall": "0", "maxTotal": "0"}, "amountSpent": "0", "maxCalls": 2, "callsUsed": 1, "pins": []}}, {"actionId": "0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d", "config": {"initialized": true, "validUntil": 1791809521, "target": "0x2971824Db68229D087931155C2b8bB820B275809", "selector": "0xa9059cbb", "maxValuePerCall": "0", "maxValueTotal": "0", "valueSpent": "0", "amount": {"enabled": true, "offset": 36, "maxPerCall": "3", "maxTotal": "5"}, "amountSpent": "0", "maxCalls": 4, "callsUsed": 0, "pins": [{"offset": 4, "expected": "0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"}]}}], "walletPC": "9", "recipientPC": "969572338780101506997586", "walletToken": "20", "recipientToken": "434311519549551168481", "checkpointCount": "1", "grantNonce": "1"}, "agentNonce": 16} +{"name": "native-multi-action-expiry", "at": "2026-10-12T11:52:19.053Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xA79688f8fb433E60DEF8492372528Ae06E68B158", "id": "0xc56220c74ac19d10e6e06d9fc4a86686487e26f457b56cc804d638afa9ef6075", "expiry": 1791805921, "laterExpiry": 1791809521, "hash": "0xc96da84063a0e25c4960bf9e8044c4d9c2c6c8c67e7832551ca70fd7c02ae5ee", "state": {"configs": [{"actionId": "0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c", "config": {"initialized": true, "validUntil": 1791805921, "target": "0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf", "selector": "0xffffffff", "maxValuePerCall": "1", "maxValueTotal": "2", "valueSpent": "1", "amount": {"enabled": false, "offset": 0, "maxPerCall": "0", "maxTotal": "0"}, "amountSpent": "0", "maxCalls": 2, "callsUsed": 1, "pins": []}}, {"actionId": "0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d", "config": {"initialized": true, "validUntil": 1791809521, "target": "0x2971824Db68229D087931155C2b8bB820B275809", "selector": "0xa9059cbb", "maxValuePerCall": "0", "maxValueTotal": "0", "valueSpent": "0", "amount": {"enabled": true, "offset": 36, "maxPerCall": "3", "maxTotal": "5"}, "amountSpent": "1", "maxCalls": 4, "callsUsed": 1, "pins": [{"offset": 4, "expected": "0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"}]}}], "walletPC": "9", "recipientPC": "969572338780101506997586", "walletToken": "19", "recipientToken": "434311519549551168482", "checkpointCount": "1", "grantNonce": "1"}} +{"name": "native-multi-invalid-input", "at": "2026-10-12T11:52:27.491Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "unchangedNextSlot": 41, "ownerNonce": 712} diff --git a/plan/agw/research/native-multi-action-e2e-2026-10-12/validation.json b/plan/agw/research/native-multi-action-e2e-2026-10-12/validation.json new file mode 100644 index 00000000..584c7b9c --- /dev/null +++ b/plan/agw/research/native-multi-action-e2e-2026-10-12/validation.json @@ -0,0 +1,26 @@ +{ + "date": "2026-10-12", + "branch": "feat/agw-sdk-v4", + "base_head": "7115c59474af6304905ad3e4466732b0530dc791", + "source": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", + "unit": { + "passed": 2034, + "skipped": 12, + "failed": 0 + }, + "actual_contracts": { + "passed": 97, + "failed": 0 + }, + "live": { + "passed": 10, + "failed": 0, + "single_invocation": true + }, + "agw_scenarios": 68, + "default_scenarios": 76, + "committed": false, + "pushed": false, + "evidence_rows": 16, + "test_sha256": "7e04e470bf8642eab41fabe943f387ae0d592f1139328c713289bdac39eb420f" +} diff --git a/plan/agw/research/notion-check-2026-10-04/comparison.json b/plan/agw/research/notion-check-2026-10-04/comparison.json new file mode 100644 index 00000000..9392d977 --- /dev/null +++ b/plan/agw/research/notion-check-2026-10-04/comparison.json @@ -0,0 +1,18 @@ +{ + "checked_at": "2026-10-04T01:41:32.593330+00:00", + "page_id": "3e9188aea7f481cf8e8de324956549b9", + "url": "https://app.notion.com/p/pushprotocol/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9", + "scope": "Only SDK page 5; other 11 registered pages not refreshed", + "method": "Browser native Markdown/CSV export; compare after normalizing known page-1 links", + "observed_last_edited_label": "Last edited by Harsh Rajat Oct 2, 2026, 8:39 PM", + "archive": "sdk-page-export.zip", + "export_entry": "Private & Shared/5 SDK AGW 3e9188aea7f481cf8e8de324956549b9.md", + "archive_sha256": "05829135e9174668e11a00ca3ac8700ce958f154001103a8a2c9f3c1a1050034", + "raw_export_sha256": "3fe718ac5610ffd00e6b9e5a35e0e4b96c6e7fc6d52c901c040813b6cb82cb89", + "normalized_sha256": "e407ee77cdf874db7ef4697f84e9945ff3a12a2f2e07e8a7f90bd24e93ea32f1", + "saved_snapshot_sha256": "e407ee77cdf874db7ef4697f84e9945ff3a12a2f2e07e8a7f90bd24e93ea32f1", + "normalized_links": 5, + "body_changed": false, + "comments": "Native export omits comment threads; this does not certify unchanged comments.", + "agw_remote_head": "e704d5b58fd1d30ce02bc0ad74dccfbdb37804f9" +} diff --git a/plan/agw/research/notion-check-2026-10-04/sdk-page-export.zip b/plan/agw/research/notion-check-2026-10-04/sdk-page-export.zip new file mode 100644 index 00000000..0d751498 Binary files /dev/null and b/plan/agw/research/notion-check-2026-10-04/sdk-page-export.zip differ diff --git a/plan/agw/research/notion-comments-2026-10-05.md b/plan/agw/research/notion-comments-2026-10-05.md new file mode 100644 index 00000000..1563bfc3 --- /dev/null +++ b/plan/agw/research/notion-comments-2026-10-05.md @@ -0,0 +1,63 @@ +# Live Notion comment review — October 5, 2026 + +Checked through Shoaib’s connected Chrome browser on October 5, 2026, starting around 08:03 UTC (13:33 IST); a local clock check during the review recorded 08:09:35 UTC. This is a focused comment review, not a new twelve-page Markdown export or contract/deployment refresh. Native Notion exports exclude discussions. Saved canonical snapshots and the full-export manifest remain unchanged. + +## Pages checked + +| Page | Method and observation | +| --- | --- | +| [5. SDK: AGW](https://app.notion.com/p/pushprotocol/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9) | Opened **All discussions**, including threads displaying Reopen (resolved). One thread was marked New/Today. Read the attached create example, validation paragraph and rule type block. | +| [1. AGW Contract Changes](https://app.notion.com/p/pushprotocol/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d) | Opened All discussions. Visible comments dated September 29 and October 1; no newer substantive reply was visible. | +| [AGW overview](https://app.notion.com/p/pushprotocol/AGW-UniversalMarketplace-8183-UniversalEvaluator-3e9188aea7f481c8b38ccba332b0afa2) | Page displayed Edited Oct 1 and Add comment; no page-body discussion was visible. No claim about hidden/resolved overview discussions. | + +The other nine registered pages were not checked in this pass. Relative comment ages below are UI observations, not independently verified creation timestamps. No comments were posted, resolved or edited. + +## SDK comments and their meaning + +### C1 — Multiple rules per chain (new) + +**Author:** Harsh Rajat. **UI:** Today, New, initially 9m and later 13m/14m. + +**Exact comment:** “multiple rules per chain is also acepted @Shoaib Mohammed” + +**Context:** [create example block](https://app.notion.com/p/pushprotocol/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9#f9712c13f75c4398aef2dbf7628450b2). The example still contains `// one entry per chain per agent`, and its parameter notes still say `one per chain per agent`. The [validation paragraph](https://app.notion.com/p/pushprotocol/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9#af9c3fac35d94f2585cb27310271c1d8) still rejects two rules sharing agent and chain. + +**Confirmed:** multiple rules on a chain are accepted product direction. **Unresolved:** whether this includes multiple rules for the *same agent*, and how an agent send chooses a rulesId when several candidates exist. Different agents sharing one chain were already allowed. The attached wording makes relaxing same-agent uniqueness plausible, but the comment alone does not specify selection behavior. + +**SDK impact:** [codec/rules.ts](../../../packages/core/src/lib/agentic/codec/rules.ts) rejects duplicate agent/chain pairs in create/add/update, while [reads/rules.ts](../../../packages/core/src/lib/agentic/reads/rules.ts) rejects more than one matching enabled rule at send time. Existing tests assert that behavior. These are provisional pending [H6](../questions-harsh.md#h6), not settled product invariants. Do not remove the guard and silently pick the first grant or try several transactions. + +### C2 — Tokens independent from the rule (needs interpretation) + +**Author:** Harsh Rajat. **UI:** Last Saturday, 1d. Both comments are attached to the validation paragraph linked above. + +**Exact comments:** “iterative SDK only, step”; “we usually want the tokens to be independent and not attached to this”. + +**Unresolved:** “this” and the intended token model are not defined. It may concern token resolution/validation, the attachment of assets to a rule, or staged SDK delivery. The current UniversalRule still contains assets[]. Treat this as a clarification within H3/Z1.1, not authorization to remove asset policy enforcement or invent a new schema. + +### C3 — Earlier resolved universal-limit discussion + +The thread displays **Original content deleted** and **Reopen**. Harsh’s visible messages, October 1–2, discuss whether constraints belong per allowed call, defining token/native treatment, removing redundant maxPCPerCall and keeping maxGasPerCall/AllowedAmount. No visible Zaryab answer accompanies them. + +These provide background for the existing multi-asset/gas-cap proposal. Their deleted source context and abbreviated wording do not settle the current native omission/default table or the precise final universal ABI. Keep H3 and Z1 open. + +### C4 — Update counters + +An October 1 comment tagging Zaryab is attached to `rules.update resets spend counters because it is revoke plus grant`. No substantive reply was visible. It does not change the implemented atomic replacement or remove internal stale-spend assertions. + +## Contract-page comments + +All visible comments were from Harsh: + +- October 1: “Need explaination here @Zaryab Afser”, with Original content deleted. +- October 1 and September 29: tag-only comments with deleted original content. +- October 1 (edited): the existing page-level request to review editable owner-only setLabel, its LabelSet event, cosmetic/non-checkpoint status, D3 and the D4 rename boundary. + +No new contract artifact, limit/default decision, deployment confirmation or raw-offset answer was provided by these visible threads. Deleted original context cannot be reconstructed from this UI. + +## Actions from this review + +- Added H6 for same-agent multiplicity and send selection; tracked as G26. +- Added the token-independence clarification to H3 and referenced it in Z1.1. +- Updated the source index, gap register, external dependencies and implementation-plan warning. +- H3 defaults and H4.5 raw offsets remain unresolved. The live rule type block still declares optional maxValueTotal and arg-based pins/amount. +- No production SDK code, contract source, snapshot body, deployment registry or team message was changed. diff --git a/plan/agw/research/notion-refresh-2026-10-03.md b/plan/agw/research/notion-refresh-2026-10-03.md new file mode 100644 index 00000000..232157d6 --- /dev/null +++ b/plan/agw/research/notion-refresh-2026-10-03.md @@ -0,0 +1,34 @@ +# Successful Notion refresh on October 3 2026 + +Downloaded and imported all **12 registered pages** on October 03, 2026 at 13:23 IST (2026-10-03T07:53:10.278902+00:00). The earlier browser download block is resolved for this run. Two page bodies changed: **1 AGW Contract Changes** and **5 SDK AGW**. Ten are unchanged. No registered pages are missing and no unexpected page IDs appeared. + +## SDK target changes + +- `create` now deploys the wallet and grants rules; it no longer funds it. `CreateOptions.funds` and `pc` were removed. Funding uses ordinary account tooling separately. +- Universal rules now use `assets: AssetCap[]`, with per-token `token`, `maxPerCall` and optional `maxTotal`, replacing single `asset` and amount caps. +- Asset inputs are destination-chain token addresses/Moveable constants or the native marker; the SDK resolves them to Push PRC20 addresses and checks source-chain identity. +- `maxGasPerCall` replaces `maxPCPerCall`. It still caps PC wei attached to one outbound, not a lifetime gas budget. +- Creation progress event `AGENTIC-TX-103` was removed. + +## New contract proposal section 4c + +The proposal adds 0–8 asset caps, per-token spend accounting, a token on OutboundMetered, the gas-field rename, and a changed assertSpent surface. Asset maxTotal zero means no total cap in this proposal. Empty assets means calls that move no tokens. These changes are proposed; the tested e704d5b source still has the previous single-asset terms and assertion overloads. + +## New alignment items + +1. Page 5's universal Spent remains a scalar amountSpent despite per-token accounting. A per-asset return shape and corresponding error/event fields are needed. +2. Section 4c describes `assertSpent(configId, account)` as returning totals. A read alone cannot enforce the existing replacement race guard. Define the expected per-token assertion input/behavior separately from the spend getter. +3. Empty-asset execution needs an agreed routing token/destination mechanism: the existing gateway derives its destination from token context, and current URP requires a configured asset. Do not assume the new call-only mode works without new fixtures. +4. The new EVM UniversalTerms sketch uses bytes32 expectedCEA; current source uses address. Confirm canonical EVM/SVM representation and codec validation. +5. Pages 6–8 are unchanged, so their card/compiler limits and funding orchestration still need reconciliation with the new multi-asset and separate-funding target. + +The headline destination approve remains unpinned. Binder still says dropped for v1. D3 wording and gateway-removal narrative remain older than verified contract evidence. Existing questions remain relevant after the updates recorded in the drafts. + +## Evidence + +- [Per-page comparison](../notion/history/20261003T075310278902Z/refresh.json) +- [Manifest](../source-manifest.json) +- [Contract page diff](../notion/history/20261003T075310278902Z/1-agw-contract-changes.diff) +- [SDK page diff](../notion/history/20261003T075310278902Z/5-sdk-agw.diff) + +Raw exports, previous manifest, previous changed snapshots and unified diffs are retained. Known links were normalized by page ID. Comment threads are not included in exports. Notion itself was not edited, and no questions were sent. diff --git a/plan/agw/research/pre-question-findings-2026-10-21/README.md b/plan/agw/research/pre-question-findings-2026-10-21/README.md new file mode 100644 index 00000000..fd240992 --- /dev/null +++ b/plan/agw/research/pre-question-findings-2026-10-21/README.md @@ -0,0 +1,69 @@ +# Answers we could establish before asking the team: 21 October 2026 + +These answers come from read-only analysis of the deployed node, contract and gateway code, from on-chain data, and from funded testnet runs. The question drafts in `plan/agw/questions-*.md` now contain only what this work could not settle. + +## Sources pinned + +| Component | Deployed source | How confirmed | +|---|---|---| +| Push node (Donut) | `push-chain` `origin/testnet/donut` = release/v1.1.44-donut, `ca3b8d4e` | Newest upgrade `cea-read-ingest` applied at height 23,217,721 (abci `AppliedPlan`). Later commits on `develop` are not deployed | +| UniversalCore `0x…C0` | `push-chain-core-contracts` `origin/core-testnet`, `src/UniversalCore.sol` from `8bc60ae` | EIP-1967 proxy; implementation `0xa0023b356344ff623c7e20679cf9d170e44fbbd1` is verified on Blockscout. Compiling `8bc60ae` reproduces the bytecode; only the metadata hash differs. The exact verified file is not committed | +| Solana gateway `CFVS…` | Built from `push-chain-gateway-contracts` `pc20-3rd-iteration` (`da6cca5`…`bcbf7df`), with `declare_id` swapped to CFVS locally | Instruction-name strings, PC20 strings and the `emit_cpi` layout in the deployed binary (program data `DqeV1gi…`, deployed slot 496,655,369, 2026-09-11) match. No committed branch declares CFVS | +| AGW contracts | `ffd567d` (`deploy-agw` `e57998c`) | As in the review | + +## Answers + +### Routes and registry (Aman, core/node) +- **The Circle USDC `.old` routes settle outbound on all three chains.** + - Owner-door sends of 0.01 USDC were delivered on Sepolia (`0x7de758af…`, 1,286,650 gas), Base (`0xcd4f3ab7…`) and Arbitrum (`0xbc22d5c6…`). + - The DEXES Sepolia and LENDING Arbitrum presets also passed live over these routes. +- **Where they came from.** Node commit `c84f9a97` (2026-04-16) pointed the plain `USDC.*` names at new mock tokens and kept the previous Circle configs as `USDC.*.old`. + - Nothing marks them deprecated. + - `develop` no longer has their config files (dropped by merge `47ef4c9a`), so there is drift risk if configs are re-synced from `develop`. +- **`TokenConfig.enabled` is never read by the node.** A config's presence is what makes a route work. + - Removing a config would block withdrawals for existing holders of that PRC20. + - Outbound uses the registry's `address` as the destination token. The node never reads the PRC20's `SOURCE_TOKEN_ADDRESS`, so the zero word on Solana PRC20s does not matter to routing. +- **Adding a route is admin-curated.** `MsgAddTokenConfig` must be signed by the uregistry admin, `push1negskcfqu09j5zvpk7nhvacnwyy2mafffy7r6a`. A route also needs: + - the PRC20 deployed and initialised for that exact source token; + - UniversalCore gas token, base gas limit and voted gas prices; + - a WPC pool for auto-swap; + - destination gateway and vault support. +- **Reading the registry.** The public REST and gRPC endpoints are not reachable. Tendermint `abci_query /uregistry.v1.Query/AllTokenConfigs` works and is what `check-agw-route-registry.js` uses. + +### Gas (core/node, gateway) +- **Unused EVM destination gas is refunded** to the wallet (the revert recipient) as PC, in a later Push transaction. + - Example: our DEXES Sepolia subsequent send had gasFee 220,027,000,000 and used 362,079 gas at 220,027. + - Refund `RefundUnusedGas` in tx `0x75fad72a…ea92` (block 24,472,797): 140,359,843,867 pETH-wei, swapped to 0.000205 PC. + - So larger default gas limits cost only the gas actually used, minus swap slippage. +- **Unused Solana gas is also refunded.** The gateway keeps `gas_to_refund` in its vault and emits it. The node then refunds `gasFee − gas_used` the same way. Live events match: for example 960,000 budget, 695,880 used, 264,120 refunded. + - If a Solana outbound never executes, the full gas fee is refunded. +- **Why the BNB testnet gas price jumps.** + - Each validator reads `eth_gasPrice` from a different public RPC every interval and adds a 10% markup (operator config). + - Donut has only two voters for BSC testnet, and the chain takes the upper median, which is the higher vote. + - Providers report 0.05–1 gwei, and there is no smoothing or clamp. +- **Solana gas price.** The constant 1000 is the node's fallback when devnet priority fees are zero. +- **Base gas limits** (500,000 EVM; 960 Solana) are UniversalCore admin settings. +- **Gas limits are used as given.** The EVM destination transaction uses the request's gasLimit exactly, with no buffer. Solana compute is fixed at 400,000 CU; gasLimit only prices the fee. + +### Failure handling and policy (Zaryab, core/node) +- **On a failed destination execution** the node re-mints the bridged PRC20 to the revert recipient (the wallet) and refunds unused gas. + - Payload-only sends get no fund revert. + - The protocol fee is not refunded. +- **Nothing calls `UniversalRulesPolicy.creditRevert`.** I searched all 161 node branches; the contract itself says it ships inert. So a failed agent send still counts against the rule's `maxTotal`. Wiring it is node work. +- **`MAX_NATIVE_ACTIONS = 8` is a deliberate sanity bound, not a gas bound** (`AGW.sol:73-86`; `docs/1_AGW.md:532,573`). It keeps a grant readable and bounds the duplicate scan and revoke cost. The session engine has no cap, and raising the limit is described as a design change. +- **Confirmed SvmRulebook gap: `fromEnd` data pins can be shifted by appending bytes.** + - The instruction-data length is not tied to the matched rule; only a 1024-byte cap and an exact outer-payload length apply. + - So an agent can append bytes that a `fromEnd` pin then reads. + - Account pins still hold. Whether a target program ignores trailing data decides whether this is exploitable. + - The SDK does not create `fromEnd` pins. + +### Solana programs (gateway) +- **SPL Memo v2 works as a second test program.** Owner door: Push `0x480c55ae…`, Solana `kaQ3QrRC…`. Agent door: Push `0xae951445…`, Solana `4PF7bSEs…`. + - The agent door used a rule with a raw 8-byte prefix and a CEA pin. A different prefix was refused before broadcast. + - The gateway has no target-program allowlist; the CEA is the only CPI signer. + - Payload trap: the payload's target must be zero or equal to the recipient. The SDK already sets it equal. + +## Evidence files +- `live-routes-memo-evidence.json` and `live-routes-memo-results.log`: the five live cases above. +- Routed-preset and gas runs: `../../independent-review-creation-flow-2026-10-20/data/live-2026-10-21-*`. +- New opt-in e2e groups: `agw-exact-routes` (`__e2e__/agw/exact-routes-live.spec.ts`) and `agw-svm-memo` (`__e2e__/agw/svm-memo-live.spec.ts`). diff --git a/plan/agw/research/pre-question-findings-2026-10-21/live-routes-memo-evidence.json b/plan/agw/research/pre-question-findings-2026-10-21/live-routes-memo-evidence.json new file mode 100644 index 00000000..2d604ef6 --- /dev/null +++ b/plan/agw/research/pre-question-findings-2026-10-21/live-routes-memo-evidence.json @@ -0,0 +1,100 @@ +{ + "note": "Live runs 21 Oct 03:14-03:24Z: agw-exact-routes 3/3 (owner-door Circle USDC outbound on Sepolia, Base, Arbitrum) and agw-svm-memo 2/2 (SPL Memo v2 via owner and agent doors). Public hashes only.", + "entries": [ + { + "name": "exact-route-submitted", + "at": "2026-10-21T03:15:39.714Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:11155111", + "wallet": "0x05b5c17A66233E609dE7f7CC23B157CCEb8bFA3D", + "prc20": "0x387b9C8Db60E74999aAAC5A2b7825b400F12d68E", + "source": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "hash": "0xc356eb6e8999b1d150a348602dc764ae158bb731fb9a5797b3f8e122359da01f" + }, + { + "name": "exact-route-delivered", + "at": "2026-10-21T03:16:50.293Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:11155111", + "hash": "0xc356eb6e8999b1d150a348602dc764ae158bb731fb9a5797b3f8e122359da01f", + "destinationHash": "0x7de758afad801a85a3bfd31545bacdeb0c8fd79758a538ad0ae3d039c7cf7bd3", + "destinationGasUsed": "1286650" + }, + { + "name": "exact-route-submitted", + "at": "2026-10-21T03:17:36.797Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:84532", + "wallet": "0x97dfB17BCCB47c3810d383634bB43E7d13b89799", + "prc20": "0x84B62e44F667F692F7739Ca6040cD17DA02068A8", + "source": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "hash": "0x0015d85dff1ef4f8c63d15017378beb567da1ecc0f82606ac53d9e0dea4f9978" + }, + { + "name": "exact-route-delivered", + "at": "2026-10-21T03:18:46.638Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:84532", + "hash": "0x0015d85dff1ef4f8c63d15017378beb567da1ecc0f82606ac53d9e0dea4f9978", + "destinationHash": "0xcd4f3ab74b5faf2a4181547b7cf31653d5b621f277e0aca22c65e286834e5307", + "destinationGasUsed": "364116" + }, + { + "name": "exact-route-submitted", + "at": "2026-10-21T03:19:23.271Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:421614", + "wallet": "0xF2C2f4420eCe850C1F47659Ead3cA79B6B5f781E", + "prc20": "0xa261A10e94aE4bA88EE8c5845CbE7266bD679DD6", + "source": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "hash": "0x07fab93586a60c1700e54f336ddf5ecd504c968651df03c611fa26aa463c9b65" + }, + { + "name": "exact-route-delivered", + "at": "2026-10-21T03:20:26.431Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:421614", + "hash": "0x07fab93586a60c1700e54f336ddf5ecd504c968651df03c611fa26aa463c9b65", + "destinationHash": "0xbc22d5c6ef2e7e42084844c0b52266b178b68248659f30a5c26a29ab01f9ac7e", + "destinationGasUsed": "364128" + }, + { + "name": "svm-memo-owner-submitted", + "at": "2026-10-21T03:21:04.090Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "wallet": "0xb6AE3C9018723cb53CdeE157986951662874202e", + "hash": "0x480c55ae4f5ee3fed337ee755a87bf4b5ce88c29ca845596366ad5cc3245ce78" + }, + { + "name": "svm-memo-owner-delivered", + "at": "2026-10-21T03:21:51.925Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "hash": "0x480c55ae4f5ee3fed337ee755a87bf4b5ce88c29ca845596366ad5cc3245ce78", + "destinationHash": "kaQ3QrRCgh4PXWhY5yWmEdWyUJ3kG6WYqZan4qva5mEccMXPPo1tFM99TPdUYvq77AqCCnpXadcJWASahHEdKVy" + }, + { + "name": "svm-memo-agent-submitted", + "at": "2026-10-21T03:23:01.198Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "wallet": "0x9b99895c74808c3691E4C41fda43F8f81609baaE", + "hash": "0xae951445c8473d2e83f7b06facd2f8523b846cebc5eb7b94056951893d7bd6d5" + }, + { + "name": "svm-memo-agent-delivered", + "at": "2026-10-21T03:23:56.719Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "hash": "0xae951445c8473d2e83f7b06facd2f8523b846cebc5eb7b94056951893d7bd6d5", + "destinationHash": "4PF7bSEs3jb1AFxqRub7fHbuc3ygfDy9sHqxJz24paJUN3gEi5bSmQU8b9Jd1ZVQAsLiHC1rLWVXrPPCnkCbH8rk" + } + ] +} \ No newline at end of file diff --git a/plan/agw/research/pre-question-findings-2026-10-21/live-routes-memo-results.log b/plan/agw/research/pre-question-findings-2026-10-21/live-routes-memo-results.log new file mode 100644 index 00000000..62e89f3d --- /dev/null +++ b/plan/agw/research/pre-question-findings-2026-10-21/live-routes-memo-results.log @@ -0,0 +1,15 @@ +2026-10-21T03:20:26Z +│ Push master (Donut) │ PC │ 67.0000 │ 967073.5565 │ ✓ │ +PASS core-e2e __e2e__/agw/svm-memo-live.spec.ts (196.945 s) + ✓ 1. owner door: the gateway runs Memo with the wallet CEA as signer (70999 ms) + ✓ 2. agent door: a raw-prefix rule with a CEA pin runs, another prefix is refused (124796 ms) +Tests: 2 passed, 2 total +2026-10-21T03:23:56Z +2026-10-21T03:14:40Z +│ Push master (Donut) │ PC │ 99.5000 │ 967136.5585 │ ✓ │ +PASS core-e2e __e2e__/agw/exact-routes-live.spec.ts (332.404 s) + ✓ 1. Sepolia Circle USDC (115006 ms) + ✓ 2. Base Sepolia Circle USDC (116342 ms) + ✓ 3. Arbitrum Sepolia Circle USDC (99791 ms) +Tests: 3 passed, 3 total +2026-10-21T03:20:26Z diff --git a/plan/agw/research/preset-acceptance-2026-10-20/README.md b/plan/agw/research/preset-acceptance-2026-10-20/README.md new file mode 100644 index 00000000..10df863e --- /dev/null +++ b/plan/agw/research/preset-acceptance-2026-10-20/README.md @@ -0,0 +1,69 @@ +# Preset acceptance, compatible tokens and gas — October 20, 2026 + +## Corrections (independent review, later the same day) + +Details are in the [review](../../independent-review-creation-flow-2026-10-20/review.md). + +- **Routes.** The node registry (uregistry) has enabled, Vault-backed routes for the exact Circle USDC on Sepolia, Base Sepolia and Arbitrum Sepolia. The SDK's symbol-keyed registry had omitted them, and the compatibility search below covered only that registry. After the SDK fix, DEXES Sepolia and LENDING Arbitrum Sepolia are route-ready; the other seven combinations remain blocked. +- **Gas.** "10 PC" is the SDK's $1 minimum budget at the fixed $0.10 rate used for Push-native signers. It is not a chain fee. On-chain `SwapAndBurnGas` shows 0.0008–2.37 PC actually consumed per send, with the remainder refunded in the same transaction. +- **Gas ceiling.** BNB testnet first sends exceed the 20 PC ceiling while Donut's BNB gas price is high (observed between 0.055 and 1.1 gwei). +- **Solana destination cost.** The relayer was reimbursed 2,184,320 lamports for the first send and 695,880 lamports for the subsequent send, including rent. The fee itself was 5,000 lamports. +- **Gateway allow-list.** The gateway's `isSupportedToken` is an inbound allow-list only. Outbound delivery needs Vault liquidity, or the TSS balance for native coins. +- **Live preset log.** `live-presets-blocked.log` was produced by an earlier revision of the spec file. The outcome is unchanged. + +## Result + +All nine unchanged preset payloads pass creation and exact readback against the pinned real v6 AGW/URP contracts with locally provisioned PRC20 stand-ins. Live unchanged-preset acceptance is blocked for all nine combinations before funding. Existing prefunded protocol tests remain useful but do not establish default-preset bridge availability. + +A fresh public agent SPL test passed on Donut/devnet: exact asset caps and wallet ATA pin survive creation; wrong ATA and an excessive instruction amount are refused without agent nonce advancement; two agent sends credit the owned recipient's USDT ATA exactly. Both sends omit gasLimit. Stored spend reaches exactly 2,000 raw USDT units. This is test_counter.receive_spl, not a newly certified third-party Solana app. The funded run checked reverts and unchanged nonce; a subsequent pinned eth_call probe confirmed the exact SvmDataCeilingExceeded and SvmAccountPinMismatch gates at Donut block 24,456,030 (spl-rejections.json). The test assertions were then strengthened to require those decoded names; no second funded run was needed for that assertion tightening. + +## Compatibility audit + +Read-only script: `packages/core/scripts/check-agw-preset-compatibility.js`. It loads the shipped catalog and source-token registry, checks exact PRC20 source identities on Donut, and queries reserves/underlyings and factory pools at recorded destination blocks. Snapshot: 2026-10-20T15:18:15.748Z; Donut block 24455488. See compatibility.json for every query result. + +| Network | Block | Routed-token compatibility | +|---|---|---| +| eip155:11155111 | 11956140 | No matched Aave reserve or fixed market/strategy underlying; no pool returned for queried routed ERC20 pairs at the preset router factory. | +| eip155:84532 | 48370608 | No matched Aave reserve or fixed market/strategy underlying; no pool returned for queried routed ERC20 pairs at the preset router factory. | +| eip155:421614 | 321097574 | No matched Aave reserve or fixed market/strategy underlying; no pool returned for queried routed ERC20 pairs at the preset router factory. | +| eip155:97 | 137909051 | No matched Aave reserve or fixed market/strategy underlying; no pool returned for queried routed ERC20 pairs at the preset router factory. | + +No default-token substitutions were made. Adding arbitrary routed USDC/USDT would generate unusable lending/staking permissions; the queried DEX factories have no routed pair to execute. This is bounded evidence for the current registry, catalog contracts, queried fee tiers and block snapshots, not proof that no alternative protocol or unpublished route exists. Wrapped-native and native coins are not interchangeable. + +The core/node/gateway team still needs to provide or provision exact source-token → PRC20 routes. The SDK can register verified mappings once provided. Mainnet execution was not attempted. + +## SDK gas fix + +Public Solana sends previously used gasLimit=1,000,000 when omitted. At the current Donut quote that requests 100 PC, exceeding a 20 PC rule. Omitted Solana gas now uses route sizing (0 as the quote input), retaining the existing live finalization/rent floor. Explicit gas inputs remain passed through. This changes neither rule caps nor the gas budget the owner authorizes. + +Current read-only quotes show 10 PC attached for checked EVM inputs and route-sized Solana. The old explicit million-unit Solana input quotes 100 PC. These are quote observations, not fixed future fees. The 0.1 PC custom-rule UI prefill is too small for these observed quotes. The existing 20 PC preset ceiling covers the observations and the fresh SPL deliveries; custom rule authoring still requires an explicit budget. + +Fresh SPL first-use quote: 10 PC, resolved input 2,285; subsequent quote: 10 PC, resolved input 960. On Solana the two transactions used 116,402 and 98,301 compute units and each charged a 5,000-lamport transaction fee. These differ from the quoted attached PC budget. Push signer gas was 0.0005265045 PC and 0.0005029245 PC respectively. See live-spl-evidence.json for hashes and Push blocks 24,455,663 and 24,455,695. No claim about exact net quote consumption/refunds is made. + +## Acceptance commands + +- Local: AGW_LOCAL_DIR=/tmp/agw-preset-defaults-v6 node node_modules/jest/bin/jest.js --config packages/core/jest.agw-local.config.ts --runInBand --runTestsByPath packages/core/__agw-local__/preset-acceptance.spec.ts +- Live unchanged presets: opt-in group agw-presets-acceptance (9 explicit cases). Preflight checks all nine readiness results before any funding; tests do not silently skip blocked routes. +- Live public SPL: opt-in group agw-svm-agent-spl. Exact wallet ATA pin, instruction cap and actual recipient delivery are asserted. +- Live EVM gas: opt-in group agw-gas. Four native-token routes, two agent sends each; results recorded separately from preset acceptance. + +## Validation and remaining scope + +405 AGW unit tests pass, 9 new real-contract local cases pass, spec/local typechecks and core build pass, package/guide checks pass. All 14 new live scenario selectors resolve to their expected tests. The nine live preset cases fail explicitly on unavailable routes before any funding. The one live SPL case passes and includes two destination deliveries. All four live EVM gas scenarios pass, including first/subsequent sends on every testnet (eight destination deliveries). Together with SPL, five live scenarios establish ten destination deliveries. These are distinct from the nine blocked preset scenarios. The funded SPL run preceded the assertion-only tightening described above. ESLint reports no errors in changed test/source files; existing-style non-null assertions generate warnings. + +No all-token wildcard, implicit arbitrary transfer permissions or default cap broadening was introduced. Apps-optional transfer recipients and all-token scope still require product/contract decisions. A separate devnet protocol recommendation still requires a compatible verified deployment; the successful SPL case continues to use the known test program. + +Changes remain local on v4; no release or publication is performed by this task. + +## Fresh EVM gas results + +One clean run: 4 passed, 0 failed, 715.584 seconds. Each scenario created a fresh wallet/rule, exported the chain's native PRC20 twice, confirmed destination receipt success and CEA-origin execution, and checked exact destination native balances and total rule spend. No gasLimit was supplied to either send. These are the existing counter fixtures, not preset protocols. + +| Testnet | First destination gas used | Subsequent destination gas used | +|---|---:|---:| +| Ethereum Sepolia | 1,265,722 | 223,683 | +| Base Sepolia | 325,448 | 123,187 | +| Arbitrum Sepolia | 325,424 | 123,163 | +| BNB testnet | 325,919 | 123,637 | + +All observed attached quote budgets were 10 PC, within the explicit 20 PC rule ceiling. Keep this separate from measured destination fees and Push signer gas. Full hashes, block numbers and costs are in live-evm-gas-evidence.json. The EVM run used the same production code as the final state; a read-only RPC chain guard was added to the test source after invocation without changing sends or assertions for gas/delivery. diff --git a/plan/agw/research/preset-acceptance-2026-10-20/compatibility.json b/plan/agw/research/preset-acceptance-2026-10-20/compatibility.json new file mode 100644 index 00000000..60e639bb --- /dev/null +++ b/plan/agw/research/preset-acceptance-2026-10-20/compatibility.json @@ -0,0 +1,882 @@ +{ + "at": "2026-10-20T15:18:15.748Z", + "readOnly": true, + "chains": [ + { + "chain": "eip155:11155111", + "candidates": [ + { + "token": "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876", + "symbol": "USDT", + "prc20": "0x0f97A213207703923F5f0C613C9827f7C9A0f96B", + "identityVerified": true + }, + { + "token": "0x97F477B7f970D47a87B42869ceeace218106152a", + "symbol": "USDC", + "prc20": "0x7A58048036206bB898008b5bBDA85697DB1e5d66", + "identityVerified": true + }, + { + "token": "0xfff9976782d46cc05630d1f6ebab18b2324d6b14", + "symbol": "WETH", + "prc20": "0x0d0dF7E8807430A81104EA84d926139816eC7586", + "identityVerified": true + }, + { + "token": "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af", + "symbol": "stETH", + "prc20": "0xaf89E805949c628ebde3262e91dc4ab9eA12668E", + "identityVerified": true + } + ], + "protocols": [ + { + "app": "Uniswap V3", + "kind": "dex", + "router": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E", + "pairs": [ + { + "tokens": [ + "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876", + "0x97F477B7f970D47a87B42869ceeace218106152a" + ], + "pools": [] + }, + { + "tokens": [ + "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876", + "0xfff9976782d46cc05630d1f6ebab18b2324d6b14" + ], + "pools": [] + }, + { + "tokens": [ + "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876", + "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af" + ], + "pools": [] + }, + { + "tokens": [ + "0x97F477B7f970D47a87B42869ceeace218106152a", + "0xfff9976782d46cc05630d1f6ebab18b2324d6b14" + ], + "pools": [] + }, + { + "tokens": [ + "0x97F477B7f970D47a87B42869ceeace218106152a", + "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af" + ], + "pools": [] + }, + { + "tokens": [ + "0xfff9976782d46cc05630d1f6ebab18b2324d6b14", + "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af" + ], + "pools": [] + } + ], + "factory": "0x0227628f3F023bb0B980b67D528571c95c6DaC1c" + }, + { + "app": "Aave V3", + "kind": "lending", + "pool": "0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951", + "reserves": [ + "0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357", + "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8", + "0x29f2D40B0605204364af54EC677bD022dA425d03", + "0xC558DBdd856501FCd9aaF1E62eae57A9F0629a3c", + "0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0", + "0x88541670E55cC00bEEFD87eB59EDd1b7C511AC9a", + "0x6d906e526a4e2Ca02097BA9d0caA3c382F52278E", + "0xc4bF5CbDaBE595361438F8c6a187bDc330539c60" + ], + "routedReserves": [] + }, + { + "app": "EigenLayer", + "kind": "strategy", + "strategy": "0x424246eF71b01ee33aA33aC590fd9a0855F5eFbc", + "underlying": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "routed": false + } + ], + "presets": [ + { + "category": "DEXES", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:11155111", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "prc20": "0x0d0dF7E8807430A81104EA84d926139816eC7586", + "status": "registered" + }, + { + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "message": "No SDK PRC20 mapping for eip155:11155111:0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ] + }, + { + "category": "LENDING", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:11155111", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "maxPerCall": "1000000000000000000", + "maxTotal": "10000000000000000000" + } + ], + "bridgeAssets": [ + { + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "message": "No SDK PRC20 mapping for eip155:11155111:0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357", + "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8", + "0x29f2D40B0605204364af54EC677bD022dA425d03", + "0xC558DBdd856501FCd9aaF1E62eae57A9F0629a3c", + "0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0", + "0x88541670E55cC00bEEFD87eB59EDd1b7C511AC9a", + "0x6d906e526a4e2Ca02097BA9d0caA3c382F52278E", + "0xc4bF5CbDaBE595361438F8c6a187bDc330539c60" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "maxPerCall": "1000000000000000000", + "maxTotal": "10000000000000000000" + } + ] + }, + { + "category": "STAKING", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:11155111", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + } + ], + "bridgeAssets": [ + { + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "message": "No SDK PRC20 mapping for eip155:11155111:0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + } + ] + } + ], + "block": "11956140" + }, + { + "chain": "eip155:84532", + "candidates": [ + { + "token": "0x4D7646B9eE3D68F4b0F135B5cbc66B00819F6b61", + "symbol": "USDT", + "prc20": "0x148823809B853e1db187BC09A9ac909BC42F971a", + "identityVerified": true + }, + { + "token": "0x5c3504F0E3bA28FDc1F74234fE936518276AaBB8", + "symbol": "USDC", + "prc20": "0xD7C6cA1e2c0CE260BE0c0AD39C1540de460e3Be1", + "identityVerified": true + }, + { + "token": "0xfff9976782d46cc05630d1f6ebab18b2324d6b14", + "symbol": "WETH", + "unavailable": "Unsupported WETH origin chain for synthetic mapping" + } + ], + "protocols": [ + { + "app": "Uniswap V3", + "kind": "dex", + "router": "0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4", + "pairs": [ + { + "tokens": [ + "0x4D7646B9eE3D68F4b0F135B5cbc66B00819F6b61", + "0x5c3504F0E3bA28FDc1F74234fE936518276AaBB8" + ], + "pools": [] + } + ], + "factory": "0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24" + }, + { + "app": "Aave V3", + "kind": "lending", + "pool": "0x8bAB6d1b75f19e9eD9fCe8b9BD338844fF79aE27", + "reserves": [ + "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f", + "0x0a215D8ba66387DCA84B284D18c3B4ec3de6E54a", + "0x54114591963CF60EF3aA63bEfD6eC263D98145a4", + "0x4200000000000000000000000000000000000006", + "0xD171b9694f7A2597Ed006D41f7509aaD4B485c4B", + "0x810D46F9a9027E28F9B01F75E2bdde839dA61115" + ], + "routedReserves": [] + }, + { + "app": "Moonwell mUSDbC", + "kind": "market", + "market": "0x876852425331a113d8E432eFFB3aC5BEf38f033a", + "underlying": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "routed": false + }, + { + "app": "Moonwell mWETH", + "kind": "market", + "market": "0x2F39a349A79492a70E152760ce7123A1933eCf28", + "underlying": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "routed": false + } + ], + "presets": [ + { + "category": "DEXES", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:84532", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0x4200000000000000000000000000000000000006", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0x4200000000000000000000000000000000000006", + "status": "unavailable" + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x4200000000000000000000000000000000000006", + "message": "No SDK PRC20 mapping for eip155:84532:0x4200000000000000000000000000000000000006 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "message": "No SDK PRC20 mapping for eip155:84532:0x036CbD53842c5426634e7929541eC2318f3dCF7e on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0x4200000000000000000000000000000000000006", + "0x036CbD53842c5426634e7929541eC2318f3dCF7e" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0x4200000000000000000000000000000000000006", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ] + }, + { + "category": "LENDING", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:84532", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "maxPerCall": "1000000000000000000", + "maxTotal": "10000000000000000000" + }, + { + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "maxPerCall": "10000000", + "maxTotal": "100000000" + }, + { + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + } + ], + "bridgeAssets": [ + { + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "status": "unavailable" + }, + { + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "status": "unavailable" + }, + { + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "message": "No SDK PRC20 mapping for eip155:84532:0x810D46F9a9027E28F9B01F75E2bdde839dA61115 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "message": "No SDK PRC20 mapping for eip155:84532:0x4616975f7E6045FD9737e95bC527e9e14c727BD2 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "message": "No SDK PRC20 mapping for eip155:84532:0x663A6F02d547dFd639BF689FED298712f2FB69Fb on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [ + { + "target": "0x876852425331a113d8E432eFFB3aC5BEf38f033a", + "selector": "redeem(uint256)", + "app": "Moonwell mUSDbC", + "reason": "SHARE_AMOUNT", + "alternative": "redeemUnderlying(uint256)" + }, + { + "target": "0x2F39a349A79492a70E152760ce7123A1933eCf28", + "selector": "redeem(uint256)", + "app": "Moonwell mWETH", + "reason": "SHARE_AMOUNT", + "alternative": "redeemUnderlying(uint256)" + } + ], + "knownTokens": [ + "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f", + "0x0a215D8ba66387DCA84B284D18c3B4ec3de6E54a", + "0x54114591963CF60EF3aA63bEfD6eC263D98145a4", + "0x4200000000000000000000000000000000000006", + "0xD171b9694f7A2597Ed006D41f7509aaD4B485c4B", + "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "0x663A6F02d547dFd639BF689FED298712f2FB69Fb" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "maxPerCall": "1000000000000000000", + "maxTotal": "10000000000000000000" + }, + { + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "maxPerCall": "10000000", + "maxTotal": "100000000" + }, + { + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + } + ] + } + ], + "block": "48370608" + }, + { + "chain": "eip155:421614", + "candidates": [ + { + "token": "0xE30928528f52CAEeB75fB07837e22d77D47e9c07", + "symbol": "USDT", + "prc20": "0xFE6E9DF2BbC9ce05D98b83B1365df6DcA9951891", + "identityVerified": true + }, + { + "token": "0x5dd39b0b3610F666F631a6506b7713EF83e1Ac5C", + "symbol": "USDC", + "prc20": "0x1091cCBA2FF8d2A131AE4B35e34cf3308C48572C", + "identityVerified": true + }, + { + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "symbol": "WETH", + "unavailable": "Unsupported WETH origin chain for synthetic mapping" + } + ], + "protocols": [ + { + "app": "Uniswap V3", + "kind": "dex", + "router": "0x101F443B4d1b059569D643917553c771E1b9663E", + "pairs": [ + { + "tokens": [ + "0xE30928528f52CAEeB75fB07837e22d77D47e9c07", + "0x5dd39b0b3610F666F631a6506b7713EF83e1Ac5C" + ], + "pools": [] + } + ], + "factory": "0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e" + }, + { + "app": "Aave V3", + "kind": "lending", + "pool": "0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff", + "reserves": [ + "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "0x1dF462e2712496373A347f8ad10802a5E95f053D" + ], + "routedReserves": [] + } + ], + "presets": [ + { + "category": "DEXES", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:421614", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "status": "unavailable" + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "message": "No SDK PRC20 mapping for eip155:421614:0x980B62Da83eFf3D4576C647993b0c1D7faf17c73 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "message": "No SDK PRC20 mapping for eip155:421614:0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ] + }, + { + "category": "LENDING", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:421614", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "message": "No SDK PRC20 mapping for eip155:421614:0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "0x1dF462e2712496373A347f8ad10802a5E95f053D" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ] + } + ], + "block": "321097574" + }, + { + "chain": "eip155:97", + "candidates": [ + { + "token": "0xE935d9c9C24D02E61186c640cc01d713C876d40F", + "symbol": "USDT", + "prc20": "0x731aF1Da5365259d27528557EE4aFBA4baC90ef2", + "identityVerified": true + }, + { + "token": "0xA8802F96cAd0d45343d9bc660B6f7d80050A660b", + "symbol": "USDC", + "prc20": "0x120EBf25Dad7D6a09Ad2316f23f9Be95DBb90639", + "identityVerified": true + } + ], + "protocols": [ + { + "app": "PancakeSwap V3", + "kind": "dex", + "router": "0x9a489505a00cE272eAa5e07Dba6491314CaE3796", + "pairs": [ + { + "tokens": [ + "0xE935d9c9C24D02E61186c640cc01d713C876d40F", + "0xA8802F96cAd0d45343d9bc660B6f7d80050A660b" + ], + "pools": [] + } + ], + "factory": "0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865" + }, + { + "app": "Venus vUSDT", + "kind": "market", + "market": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A", + "underlying": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "routed": false + }, + { + "app": "Venus vUSDC", + "kind": "market", + "market": "0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7", + "underlying": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "routed": false + } + ], + "presets": [ + { + "category": "DEXES", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:97", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "maxPerCall": "10000000000000000", + "maxTotal": "100000000000000000" + }, + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "status": "unavailable" + }, + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "message": "No SDK PRC20 mapping for eip155:97:0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "message": "No SDK PRC20 mapping for eip155:97:0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "maxPerCall": "10000000000000000", + "maxTotal": "100000000000000000" + }, + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ] + }, + { + "category": "LENDING", + "readiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:97", + "ready": false, + "configurationReady": true, + "selectedAssets": [ + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "maxPerCall": "10000000", + "maxTotal": "100000000" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "status": "unavailable" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "message": "No SDK PRC20 mapping for eip155:97:0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "message": "No SDK PRC20 mapping for eip155:97:0x16227D60f7a0e586C66B005219dfc887D13C9531 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address." + } + ], + "disabledCalls": [], + "excludedCalls": [ + { + "target": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A", + "selector": "redeem(uint256)", + "app": "Venus vUSDT", + "reason": "SHARE_AMOUNT", + "alternative": "redeemUnderlying(uint256)" + }, + { + "target": "0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7", + "selector": "redeem(uint256)", + "app": "Venus vUSDC", + "reason": "SHARE_AMOUNT", + "alternative": "redeemUnderlying(uint256)" + } + ], + "knownTokens": [ + "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "0x16227D60f7a0e586C66B005219dfc887D13C9531" + ], + "zeroBridgeLimits": [] + } + ] + }, + "assets": [ + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "maxPerCall": "10000000", + "maxTotal": "100000000" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ] + } + ], + "block": "137909051" + } + ], + "pushBlock": "24455488" +} \ No newline at end of file diff --git a/plan/agw/research/preset-acceptance-2026-10-20/gas-quotes.json b/plan/agw/research/preset-acceptance-2026-10-20/gas-quotes.json new file mode 100644 index 00000000..38f40e8d --- /dev/null +++ b/plan/agw/research/preset-acceptance-2026-10-20/gas-quotes.json @@ -0,0 +1,110 @@ +{ + "at": "2026-10-20T15:29:48.372Z", + "readOnly": true, + "network": "TESTNET_DONUT", + "pushBlockBefore": "24455772", + "note": "Current quotes only; first-use and subsequent labels describe gas-limit inputs, not executed transactions.", + "cases": [ + { + "chain": "eip155:11155111", + "stage": "default-new-account", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "eip155:11155111", + "stage": "route-default-zero-input", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "eip155:84532", + "stage": "default-new-account", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "eip155:84532", + "stage": "route-default-zero-input", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "eip155:421614", + "stage": "default-new-account", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "eip155:421614", + "stage": "route-default-zero-input", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "eip155:97", + "stage": "default-new-account", + "inputGasLimit": "2000000", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "eip155:97", + "stage": "route-default-zero-input", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "stage": "legacy-million-unit-fallback", + "inputGasLimit": "1000000", + "protocolFee": "0", + "nativeValueForGas": "100000000000000000000", + "gasLimitUsed": "1000000", + "attachedPCWei": "100000000000000000000", + "fits20PCCeiling": false + }, + { + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "stage": "sdk-default-route-sizing", + "inputGasLimit": "0", + "protocolFee": "0", + "nativeValueForGas": "10000000000000000000", + "gasLimitUsed": "1052", + "attachedPCWei": "10000000000000000000", + "fits20PCCeiling": true + } + ], + "pushBlockAfter": "24455774" +} \ No newline at end of file diff --git a/plan/agw/research/preset-acceptance-2026-10-20/live-evm-gas-evidence.json b/plan/agw/research/preset-acceptance-2026-10-20/live-evm-gas-evidence.json new file mode 100644 index 00000000..d268250e --- /dev/null +++ b/plan/agw/research/preset-acceptance-2026-10-20/live-evm-gas-evidence.json @@ -0,0 +1,410 @@ +[ + { + "name": "agw-gas-quote", + "at": "2026-10-20T15:30:36.730Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:11155111:first-use", + "token": "0x2971824Db68229D087931155C2b8bB820B275809", + "requestedGasLimit": "2000000", + "chain": "eip155:11155111", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-20T15:30:40.623Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:11155111", + "stage": "first-use", + "wallet": "0xD847ca2462405a70c32ff5776e70fE25EA7B26ca", + "cea": "0xDdc0C8e35863f1478c0485144d2Fae959242Ce43", + "hash": "0xb968f71a2f8deb17a194632744e0e256b7703e229e0a0d35461751e580debce6" + }, + { + "name": "agw-push-gas", + "at": "2026-10-20T15:31:50.714Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:11155111:first-use", + "hash": "0xb968f71a2f8deb17a194632744e0e256b7703e229e0a0d35461751e580debce6", + "block": "24455794", + "gasUsed": "397778", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "447500250000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-20T15:31:50.714Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:11155111", + "stage": "first-use", + "wallet": "0xD847ca2462405a70c32ff5776e70fE25EA7B26ca", + "hash": "0xb968f71a2f8deb17a194632744e0e256b7703e229e0a0d35461751e580debce6", + "destinationHash": "0xf3ed17fa05f700543ec10930d078c6fb793624e44e8ec8fe3f14fbb7cee5cf19", + "destinationBlock": "11956206", + "destinationGasUsed": "1265722", + "destinationGasPaidWei": "1392314451552" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-20T15:31:53.587Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:11155111:subsequent", + "token": "0x2971824Db68229D087931155C2b8bB820B275809", + "requestedGasLimit": "0", + "chain": "eip155:11155111", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPCWei": "10000000000000000000" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-20T15:31:56.514Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:11155111", + "stage": "subsequent", + "wallet": "0xD847ca2462405a70c32ff5776e70fE25EA7B26ca", + "cea": "0xDdc0C8e35863f1478c0485144d2Fae959242Ce43", + "hash": "0xc3b021815bcfd26269ddcdbaed813aa91fb0c03a36dbf2cbc5678f84b157c7cf" + }, + { + "name": "agw-push-gas", + "at": "2026-10-20T15:33:05.911Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:11155111:subsequent", + "hash": "0xc3b021815bcfd26269ddcdbaed813aa91fb0c03a36dbf2cbc5678f84b157c7cf", + "block": "24455824", + "gasUsed": "377183", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "424330875000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-20T15:33:05.912Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:11155111", + "stage": "subsequent", + "wallet": "0xD847ca2462405a70c32ff5776e70fE25EA7B26ca", + "hash": "0xc3b021815bcfd26269ddcdbaed813aa91fb0c03a36dbf2cbc5678f84b157c7cf", + "destinationHash": "0x15f49a09b3879f3cc1ea4c3accddc7431b279da59033f5eb9842a0d4994df50a", + "destinationBlock": "11956213", + "destinationGasUsed": "223683", + "destinationGasPaidWei": "246054878928" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-20T15:33:43.693Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:84532:first-use", + "token": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "requestedGasLimit": "2000000", + "chain": "eip155:84532", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-20T15:33:53.180Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:84532", + "stage": "first-use", + "wallet": "0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58", + "cea": "0xB0d8079eEF1553d3e975947f087eEeB05f02ab1A", + "hash": "0xb9fd4a64a2fd9b68193ac3aef1177f054dc591cfc3917968d3cfc9ee1fc35153" + }, + { + "name": "agw-push-gas", + "at": "2026-10-20T15:35:02.818Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:84532:first-use", + "hash": "0xb9fd4a64a2fd9b68193ac3aef1177f054dc591cfc3917968d3cfc9ee1fc35153", + "block": "24455871", + "gasUsed": "396773", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "446369625000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-20T15:35:02.819Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:84532", + "stage": "first-use", + "wallet": "0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58", + "hash": "0xb9fd4a64a2fd9b68193ac3aef1177f054dc591cfc3917968d3cfc9ee1fc35153", + "destinationHash": "0x89337900340a39fd1725657e72f146fe5b4b917a58d5db150f052b2222724d6d", + "destinationBlock": "48371096", + "destinationGasUsed": "325448", + "destinationGasPaidWei": "2147956800000" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-20T15:35:06.034Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:84532:subsequent", + "token": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "requestedGasLimit": "0", + "chain": "eip155:84532", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPCWei": "10000000000000000000" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-20T15:35:10.428Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:84532", + "stage": "subsequent", + "wallet": "0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58", + "cea": "0xB0d8079eEF1553d3e975947f087eEeB05f02ab1A", + "hash": "0xc0aa504633d7e0fe66e4aa2abaf994e4b8ff09c992b8712e3a8879fe33c9026d" + }, + { + "name": "agw-push-gas", + "at": "2026-10-20T15:36:02.248Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:84532:subsequent", + "hash": "0xc0aa504633d7e0fe66e4aa2abaf994e4b8ff09c992b8712e3a8879fe33c9026d", + "block": "24455903", + "gasUsed": "376379", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "423426375000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-20T15:36:02.248Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:84532", + "stage": "subsequent", + "wallet": "0xB07a90329A3Ef6B20aC80a458069a7D8daE93D58", + "hash": "0xc0aa504633d7e0fe66e4aa2abaf994e4b8ff09c992b8712e3a8879fe33c9026d", + "destinationHash": "0xe81704385810c74cef8d16cb7fe3e2a98805aff9a9f63aaf5008d3d9288a4781", + "destinationBlock": "48371126", + "destinationGasUsed": "123187", + "destinationGasPaidWei": "813034200000" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-20T15:36:56.233Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:421614:first-use", + "token": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "requestedGasLimit": "2000000", + "chain": "eip155:421614", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-20T15:36:59.677Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:421614", + "stage": "first-use", + "wallet": "0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb", + "cea": "0x97B91433aF804877cd11EC522C910c54E04624b5", + "hash": "0x21ce19a3780fee8cbcc006b3197163166402da30557ef1eff8556c97d793846c" + }, + { + "name": "agw-push-gas", + "at": "2026-10-20T15:37:59.481Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:421614:first-use", + "hash": "0x21ce19a3780fee8cbcc006b3197163166402da30557ef1eff8556c97d793846c", + "block": "24455949", + "gasUsed": "404486", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "455046750000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-20T15:37:59.483Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:421614", + "stage": "first-use", + "wallet": "0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb", + "hash": "0x21ce19a3780fee8cbcc006b3197163166402da30557ef1eff8556c97d793846c", + "destinationHash": "0x059011ed41d6409e48b70ab47dd02a16eca292e01e68eb721d78df5813f46c98", + "destinationBlock": "321102083", + "destinationGasUsed": "325424", + "destinationGasPaidWei": "7351913923200" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-20T15:38:02.774Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:421614:subsequent", + "token": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "requestedGasLimit": "0", + "chain": "eip155:421614", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPCWei": "10000000000000000000" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-20T15:38:06.357Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:421614", + "stage": "subsequent", + "wallet": "0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb", + "cea": "0x97B91433aF804877cd11EC522C910c54E04624b5", + "hash": "0xba1c063ab2e261f0d1af0833975fd1344daa390ae80336c45a45d49759ebecad" + }, + { + "name": "agw-push-gas", + "at": "2026-10-20T15:38:54.881Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:421614:subsequent", + "hash": "0xba1c063ab2e261f0d1af0833975fd1344daa390ae80336c45a45d49759ebecad", + "block": "24455976", + "gasUsed": "390806", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "439656750000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-20T15:38:54.882Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:421614", + "stage": "subsequent", + "wallet": "0x3130f7F8b10C94A54eC012A4d0e6DAc963f200eb", + "hash": "0xba1c063ab2e261f0d1af0833975fd1344daa390ae80336c45a45d49759ebecad", + "destinationHash": "0x54f382ed25d895893f6cd3042ff7ee43e63bc392397c9a9572c424a3589d9df8", + "destinationBlock": "321102318", + "destinationGasUsed": "123163", + "destinationGasPaidWei": "2780035236000" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-20T15:39:43.371Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:97:first-use", + "token": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "requestedGasLimit": "2000000", + "chain": "eip155:97", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "2000000", + "attachedPCWei": "10000000000000000000" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-20T15:39:46.663Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:97", + "stage": "first-use", + "wallet": "0x0140403283bB76C1890501067754d1c376189b5D", + "cea": "0xA7384f2b00463E548426Cd9C8979dDa78ECf60c4", + "hash": "0x6e4bf8a92eb569fb4aa34a5d5eab4799ab86f6aa40fe405d59cba6498c669f7d" + }, + { + "name": "agw-push-gas", + "at": "2026-10-20T15:40:38.326Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:97:first-use", + "hash": "0x6e4bf8a92eb569fb4aa34a5d5eab4799ab86f6aa40fe405d59cba6498c669f7d", + "block": "24456018", + "gasUsed": "404574", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "455145750000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-20T15:40:38.326Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:97", + "stage": "first-use", + "wallet": "0x0140403283bB76C1890501067754d1c376189b5D", + "hash": "0x6e4bf8a92eb569fb4aa34a5d5eab4799ab86f6aa40fe405d59cba6498c669f7d", + "destinationHash": "0x6b5cfb84699948c2b626e2a244b9ff8354d070093d6f8ecb42a228914adfdaa5", + "destinationBlock": "137911931", + "destinationGasUsed": "325919", + "destinationGasPaidWei": "35851090000000" + }, + { + "name": "agw-gas-quote", + "at": "2026-10-20T15:40:41.547Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:97:subsequent", + "token": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "requestedGasLimit": "0", + "chain": "eip155:97", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "500000", + "attachedPCWei": "10000000000000000000" + }, + { + "name": "evm-gas-submitted", + "at": "2026-10-20T15:40:45.906Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:97", + "stage": "subsequent", + "wallet": "0x0140403283bB76C1890501067754d1c376189b5D", + "cea": "0xA7384f2b00463E548426Cd9C8979dDa78ECf60c4", + "hash": "0x82f343dcd100715d5693d68fbdcccdaf1467c3c5626391501d1f7b579d279047" + }, + { + "name": "agw-push-gas", + "at": "2026-10-20T15:41:40.866Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "eip155:97:subsequent", + "hash": "0x82f343dcd100715d5693d68fbdcccdaf1467c3c5626391501d1f7b579d279047", + "block": "24456042", + "gasUsed": "390894", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "439755750000000" + }, + { + "name": "evm-gas-delivered", + "at": "2026-10-20T15:41:40.866Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "chain": "eip155:97", + "stage": "subsequent", + "wallet": "0x0140403283bB76C1890501067754d1c376189b5D", + "hash": "0x82f343dcd100715d5693d68fbdcccdaf1467c3c5626391501d1f7b579d279047", + "destinationHash": "0x42adb9167d8f25a81ff01e143cb43e676818d8ce144a08444c890caecd08029a", + "destinationBlock": "137912063", + "destinationGasUsed": "123637", + "destinationGasPaidWei": "13600070000000" + } +] diff --git a/plan/agw/research/preset-acceptance-2026-10-20/live-evm-gas.log b/plan/agw/research/preset-acceptance-2026-10-20/live-evm-gas.log new file mode 100644 index 00000000..06419691 --- /dev/null +++ b/plan/agw/research/preset-acceptance-2026-10-20/live-evm-gas.log @@ -0,0 +1,12 @@ +PASS core-e2e packages/core/__e2e__/agw/gas-live.spec.ts (715.558 s) + agw live gas sizing + ✓ 1. Sepolia first-use and subsequent execution (200128 ms) + ✓ 2. Base Sepolia first-use and subsequent execution (175985 ms) + ✓ 3. Arbitrum Sepolia first-use and subsequent execution (172600 ms) + ✓ 4. BNB testnet first-use and subsequent execution (165645 ms) + +Test Suites: 1 passed, 1 total +Tests: 4 passed, 4 total +Snapshots: 0 total +Time: 715.584 s +Ran all test suites within paths "packages/core/__e2e__/agw/gas-live.spec.ts". diff --git a/plan/agw/research/preset-acceptance-2026-10-20/live-presets-blocked.log b/plan/agw/research/preset-acceptance-2026-10-20/live-presets-blocked.log new file mode 100644 index 00000000..30d13f4e --- /dev/null +++ b/plan/agw/research/preset-acceptance-2026-10-20/live-presets-blocked.log @@ -0,0 +1,152 @@ +FAIL core-e2e packages/core/__e2e__/agw/presets-acceptance.spec.ts + agw unchanged preset acceptance + ✕ 1. DEXES Sepolia (2 ms) + ✕ 2. DEXES Base Sepolia + ✕ 3. DEXES Arbitrum Sepolia (1 ms) + ✕ 4. DEXES BNB testnet + ✕ 5. LENDING Sepolia (1 ms) + ✕ 6. LENDING Base Sepolia (1 ms) + ✕ 7. LENDING Arbitrum Sepolia (1 ms) + ✕ 8. LENDING BNB testnet + ✕ 9. STAKING Sepolia + + ● agw unchanged preset acceptance › 1. DEXES Sepolia + + PRESET_BLOCKED_BEFORE_FUNDING DEXES eip155:11155111: [{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238","message":"No SDK PRC20 mapping for eip155:11155111:0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."}] + + 198 | }); + 199 | if (!preview.readiness.ready) + > 200 | throw new Error( + | ^ + 201 | `PRESET_BLOCKED_BEFORE_FUNDING ${category} ${chainNamespace}: ${JSON.stringify( + 202 | preview.readiness.chains[0].issues + 203 | )}` + + at run (__e2e__/agw/presets-acceptance.spec.ts:200:13) + at Object. (__e2e__/agw/presets-acceptance.spec.ts:331:32) + + ● agw unchanged preset acceptance › 2. DEXES Base Sepolia + + PRESET_BLOCKED_BEFORE_FUNDING DEXES eip155:84532: [{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0x4200000000000000000000000000000000000006","message":"No SDK PRC20 mapping for eip155:84532:0x4200000000000000000000000000000000000006 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."},{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0x036CbD53842c5426634e7929541eC2318f3dCF7e","message":"No SDK PRC20 mapping for eip155:84532:0x036CbD53842c5426634e7929541eC2318f3dCF7e on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."}] + + 198 | }); + 199 | if (!preview.readiness.ready) + > 200 | throw new Error( + | ^ + 201 | `PRESET_BLOCKED_BEFORE_FUNDING ${category} ${chainNamespace}: ${JSON.stringify( + 202 | preview.readiness.chains[0].issues + 203 | )}` + + at run (__e2e__/agw/presets-acceptance.spec.ts:200:13) + at Object. (__e2e__/agw/presets-acceptance.spec.ts:332:37) + + ● agw unchanged preset acceptance › 3. DEXES Arbitrum Sepolia + + PRESET_BLOCKED_BEFORE_FUNDING DEXES eip155:421614: [{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0x980B62Da83eFf3D4576C647993b0c1D7faf17c73","message":"No SDK PRC20 mapping for eip155:421614:0x980B62Da83eFf3D4576C647993b0c1D7faf17c73 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."},{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d","message":"No SDK PRC20 mapping for eip155:421614:0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."}] + + 198 | }); + 199 | if (!preview.readiness.ready) + > 200 | throw new Error( + | ^ + 201 | `PRESET_BLOCKED_BEFORE_FUNDING ${category} ${chainNamespace}: ${JSON.stringify( + 202 | preview.readiness.chains[0].issues + 203 | )}` + + at run (__e2e__/agw/presets-acceptance.spec.ts:200:13) + at Object. (__e2e__/agw/presets-acceptance.spec.ts:335:11) + + ● agw unchanged preset acceptance › 4. DEXES BNB testnet + + PRESET_BLOCKED_BEFORE_FUNDING DEXES eip155:97: [{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd","message":"No SDK PRC20 mapping for eip155:97:0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."},{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c","message":"No SDK PRC20 mapping for eip155:97:0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."}] + + 198 | }); + 199 | if (!preview.readiness.ready) + > 200 | throw new Error( + | ^ + 201 | `PRESET_BLOCKED_BEFORE_FUNDING ${category} ${chainNamespace}: ${JSON.stringify( + 202 | preview.readiness.chains[0].issues + 203 | )}` + + at run (__e2e__/agw/presets-acceptance.spec.ts:200:13) + at Object. (__e2e__/agw/presets-acceptance.spec.ts:338:36) + + ● agw unchanged preset acceptance › 5. LENDING Sepolia + + PRESET_BLOCKED_BEFORE_FUNDING LENDING eip155:11155111: [{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5","message":"No SDK PRC20 mapping for eip155:11155111:0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."}] + + 198 | }); + 199 | if (!preview.readiness.ready) + > 200 | throw new Error( + | ^ + 201 | `PRESET_BLOCKED_BEFORE_FUNDING ${category} ${chainNamespace}: ${JSON.stringify( + 202 | preview.readiness.chains[0].issues + 203 | )}` + + at run (__e2e__/agw/presets-acceptance.spec.ts:200:13) + at Object. (__e2e__/agw/presets-acceptance.spec.ts:339:34) + + ● agw unchanged preset acceptance › 6. LENDING Base Sepolia + + PRESET_BLOCKED_BEFORE_FUNDING LENDING eip155:84532: [{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0x810D46F9a9027E28F9B01F75E2bdde839dA61115","message":"No SDK PRC20 mapping for eip155:84532:0x810D46F9a9027E28F9B01F75E2bdde839dA61115 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."},{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0x4616975f7E6045FD9737e95bC527e9e14c727BD2","message":"No SDK PRC20 mapping for eip155:84532:0x4616975f7E6045FD9737e95bC527e9e14c727BD2 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."},{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0x663A6F02d547dFd639BF689FED298712f2FB69Fb","message":"No SDK PRC20 mapping for eip155:84532:0x663A6F02d547dFd639BF689FED298712f2FB69Fb on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."}] + + 198 | }); + 199 | if (!preview.readiness.ready) + > 200 | throw new Error( + | ^ + 201 | `PRESET_BLOCKED_BEFORE_FUNDING ${category} ${chainNamespace}: ${JSON.stringify( + 202 | preview.readiness.chains[0].issues + 203 | )}` + + at run (__e2e__/agw/presets-acceptance.spec.ts:200:13) + at Object. (__e2e__/agw/presets-acceptance.spec.ts:342:11) + + ● agw unchanged preset acceptance › 7. LENDING Arbitrum Sepolia + + PRESET_BLOCKED_BEFORE_FUNDING LENDING eip155:421614: [{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d","message":"No SDK PRC20 mapping for eip155:421614:0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."}] + + 198 | }); + 199 | if (!preview.readiness.ready) + > 200 | throw new Error( + | ^ + 201 | `PRESET_BLOCKED_BEFORE_FUNDING ${category} ${chainNamespace}: ${JSON.stringify( + 202 | preview.readiness.chains[0].issues + 203 | )}` + + at run (__e2e__/agw/presets-acceptance.spec.ts:200:13) + at Object. (__e2e__/agw/presets-acceptance.spec.ts:347:11) + + ● agw unchanged preset acceptance › 8. LENDING BNB testnet + + PRESET_BLOCKED_BEFORE_FUNDING LENDING eip155:97: [{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c","message":"No SDK PRC20 mapping for eip155:97:0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."},{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0x16227D60f7a0e586C66B005219dfc887D13C9531","message":"No SDK PRC20 mapping for eip155:97:0x16227D60f7a0e586C66B005219dfc887D13C9531 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."}] + + 198 | }); + 199 | if (!preview.readiness.ready) + > 200 | throw new Error( + | ^ + 201 | `PRESET_BLOCKED_BEFORE_FUNDING ${category} ${chainNamespace}: ${JSON.stringify( + 202 | preview.readiness.chains[0].issues + 203 | )}` + + at run (__e2e__/agw/presets-acceptance.spec.ts:200:13) + at Object. (__e2e__/agw/presets-acceptance.spec.ts:352:11) + + ● agw unchanged preset acceptance › 9. STAKING Sepolia + + PRESET_BLOCKED_BEFORE_FUNDING STAKING eip155:11155111: [{"code":"BRIDGE_ASSET_UNAVAILABLE","token":"0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9","message":"No SDK PRC20 mapping for eip155:11155111:0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9 on TESTNET_DONUT. This preset cannot be created with this token until its Push route is verified. Choose a routed token only if the selected app supports that exact token address."}] + + 198 | }); + 199 | if (!preview.readiness.ready) + > 200 | throw new Error( + | ^ + 201 | `PRESET_BLOCKED_BEFORE_FUNDING ${category} ${chainNamespace}: ${JSON.stringify( + 202 | preview.readiness.chains[0].issues + 203 | )}` + + at run (__e2e__/agw/presets-acceptance.spec.ts:200:13) + at Object. (__e2e__/agw/presets-acceptance.spec.ts:355:34) + +Test Suites: 1 failed, 1 total +Tests: 9 failed, 9 total +Snapshots: 0 total +Time: 3.914 s +Ran all test suites within paths "packages/core/__e2e__/agw/presets-acceptance.spec.ts". diff --git a/plan/agw/research/preset-acceptance-2026-10-20/live-spl-evidence.json b/plan/agw/research/preset-acceptance-2026-10-20/live-spl-evidence.json new file mode 100644 index 00000000..41de3368 --- /dev/null +++ b/plan/agw/research/preset-acceptance-2026-10-20/live-spl-evidence.json @@ -0,0 +1,100 @@ +[ + { + "name": "agw-gas-quote", + "at": "2026-10-20T15:25:17.649Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "agent-spl:first-use", + "token": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34", + "requestedGasLimit": "0", + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "2285", + "attachedPCWei": "10000000000000000000" + }, + { + "name": "agent-spl-submitted", + "at": "2026-10-20T15:25:25.219Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "first-use", + "wallet": "0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372", + "cea": "DKbAi4YmS5EfdvKHzS2zHKSSPfgiffu3ZddXoY4N2VuX", + "ceaATA": "GuKBtW2xo53yMyj915CMCziHyyz1LaGxnfZBUDRJPd9K", + "hash": "0x119c89e9ff7c7cccdfc8c071fade2488aa28b0eff7d9b71f7f0cf247c958bbf5" + }, + { + "name": "agw-push-gas", + "at": "2026-10-20T15:26:23.815Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "agent-spl:first-use", + "hash": "0x119c89e9ff7c7cccdfc8c071fade2488aa28b0eff7d9b71f7f0cf247c958bbf5", + "block": "24455663", + "gasUsed": "468004", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "526504500000000" + }, + { + "name": "agent-spl-delivered", + "at": "2026-10-20T15:26:23.816Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "first-use", + "wallet": "0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372", + "hash": "0x119c89e9ff7c7cccdfc8c071fade2488aa28b0eff7d9b71f7f0cf247c958bbf5", + "destinationHash": "y8hK7xQWVs4mRupJAJDRBkbt1EnVmtQNxAhPhTbvJbfULrwARFimjvygaDskPawH44dntUaq5Tq6ubDDp7592q1", + "destinationFeeLamports": 5000, + "computeUnitsConsumed": 116402 + }, + { + "name": "agw-gas-quote", + "at": "2026-10-20T15:26:33.128Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "agent-spl:subsequent", + "token": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34", + "requestedGasLimit": "0", + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "protocolFeePCWei": "0", + "quotedGasBudgetPCWei": "10000000000000000000", + "gasLimitUsed": "960", + "attachedPCWei": "10000000000000000000" + }, + { + "name": "agent-spl-submitted", + "at": "2026-10-20T15:26:43.259Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "subsequent", + "wallet": "0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372", + "cea": "DKbAi4YmS5EfdvKHzS2zHKSSPfgiffu3ZddXoY4N2VuX", + "ceaATA": "GuKBtW2xo53yMyj915CMCziHyyz1LaGxnfZBUDRJPd9K", + "hash": "0x7980032bb748889f44d9a58e4030dc1338575d03fa78da23531dcf96d6c23e57" + }, + { + "name": "agw-push-gas", + "at": "2026-10-20T15:27:42.193Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "agent-spl:subsequent", + "hash": "0x7980032bb748889f44d9a58e4030dc1338575d03fa78da23531dcf96d6c23e57", + "block": "24455695", + "gasUsed": "447044", + "effectiveGasPrice": "1125000000", + "transactionGasPaidPCWei": "502924500000000" + }, + { + "name": "agent-spl-delivered", + "at": "2026-10-20T15:27:42.195Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "stage": "subsequent", + "wallet": "0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372", + "hash": "0x7980032bb748889f44d9a58e4030dc1338575d03fa78da23531dcf96d6c23e57", + "destinationHash": "3G782PfUtqv3THZGt7vH5J9xoscMMFvKwUo215J2Hoh4APYHEHMGDcKBjix6je5y3M2DhoeuENkmqWEFrJgUjmLe", + "destinationFeeLamports": 5000, + "computeUnitsConsumed": 98301 + } +] diff --git a/plan/agw/research/preset-acceptance-2026-10-20/live-spl.log b/plan/agw/research/preset-acceptance-2026-10-20/live-spl.log new file mode 100644 index 00000000..84f399d8 --- /dev/null +++ b/plan/agw/research/preset-acceptance-2026-10-20/live-spl.log @@ -0,0 +1,9 @@ +PASS core-e2e packages/core/__e2e__/agw/svm-agent-spl.spec.ts (226.407 s) + agw public agent spl + ✓ 1. exact wallet ATA and amount constraints survive create and two omitted-gas deliveries (224822 ms) + +Test Suites: 1 passed, 1 total +Tests: 1 passed, 1 total +Snapshots: 0 total +Time: 226.441 s +Ran all test suites within paths "packages/core/__e2e__/agw/svm-agent-spl.spec.ts". diff --git a/plan/agw/research/preset-acceptance-2026-10-20/local-contracts.log b/plan/agw/research/preset-acceptance-2026-10-20/local-contracts.log new file mode 100644 index 00000000..4e2f92bc --- /dev/null +++ b/plan/agw/research/preset-acceptance-2026-10-20/local-contracts.log @@ -0,0 +1,17 @@ +PASS core-agw-local packages/core/__agw-local__/preset-acceptance.spec.ts (5.382 s) + unchanged default preset contract acceptance + ✓ DEXES eip155:11155111 preserves every generated asset, cap, function and pin (50 ms) + ✓ DEXES eip155:84532 preserves every generated asset, cap, function and pin (39 ms) + ✓ DEXES eip155:421614 preserves every generated asset, cap, function and pin (38 ms) + ✓ DEXES eip155:97 preserves every generated asset, cap, function and pin (35 ms) + ✓ LENDING eip155:11155111 preserves every generated asset, cap, function and pin (28 ms) + ✓ LENDING eip155:84532 preserves every generated asset, cap, function and pin (48 ms) + ✓ LENDING eip155:421614 preserves every generated asset, cap, function and pin (19 ms) + ✓ LENDING eip155:97 preserves every generated asset, cap, function and pin (28 ms) + ✓ STAKING eip155:11155111 preserves every generated asset, cap, function and pin (25 ms) + +Test Suites: 1 passed, 1 total +Tests: 9 passed, 9 total +Snapshots: 0 total +Time: 5.415 s +Ran all test suites within paths "packages/core/__agw-local__/preset-acceptance.spec.ts". diff --git a/plan/agw/research/preset-acceptance-2026-10-20/probe-spl-rejections.cjs b/plan/agw/research/preset-acceptance-2026-10-20/probe-spl-rejections.cjs new file mode 100644 index 00000000..0a647818 --- /dev/null +++ b/plan/agw/research/preset-acceptance-2026-10-20/probe-spl-rejections.cjs @@ -0,0 +1,32 @@ +// Read-only exact contract error checks using the recorded successful SPL call. +// Run from SDK root after building. No signer or environment keys are loaded. +const root=process.cwd(),fs=require('node:fs'); +const { createPublicClient,http,decodeFunctionData,encodeFunctionData }=require(root+'/node_modules/viem'); +const built=root+'/dist/packages/core/src'; +const {v6}=require(built+'/lib/agentic/contracts/v6'); +const {UNIVERSAL_GATEWAY_PC}=require(built+'/lib/constants/abi'); +const {parseAgwSvmPayload,encodeAgwSvmPayload}=require(built+'/lib/agentic/execution/svm-payload'); +const {decodeAgenticRevert}=require(built+'/lib/agentic/revert'); +const reportPath=root+'/plan/agw/research/preset-acceptance-2026-10-20/'; +(async()=>{ + const rpc=createPublicClient({transport:http('https://evm.donut.rpc.push.org/',{timeout:15000,retryCount:1})}); + const evidence=JSON.parse(fs.readFileSync(reportPath+'live-spl-evidence.json')); + const hash=evidence.find(x=>x.name==='agent-spl-submitted').hash; + const tx=await rpc.getTransaction({hash}),w=v6.decodeWalletCall(tx.input); + if(w?.kind!=='executeAsAgent'||w.calls.length!==1)throw new Error('Unexpected recorded wallet call'); + const call=w.calls[0],{args}=decodeFunctionData({abi:UNIVERSAL_GATEWAY_PC,data:call.data}),req=args[0]; + const original=parseAgwSvmPayload(req.payload),block=await rpc.getBlockNumber(); + const results=[]; + for(const mode of ['amount','account']){ + const payload={...original,accounts:original.accounts.map(a=>({...a})),instructionData:Uint8Array.from(original.instructionData)}; + if(mode==='amount')new DataView(payload.instructionData.buffer).setBigUint64(8,1001n,true); + else payload.accounts[1].pubkey=payload.accounts[2].pubkey; + const next={...req,amount:0n,payload:encodeAgwSvmPayload(payload.program,payload.accounts,payload.instructionData)}; + const data=v6.encodeExecuteAsAgent(w.rulesId,{...call,data:encodeFunctionData({abi:UNIVERSAL_GATEWAY_PC,functionName:'sendUniversalTxOutbound',args:[next]})}); + try{await rpc.call({account:tx.from,to:tx.to,data,blockNumber:block});throw new Error('Expected refusal');} + catch(e){const decoded=decodeAgenticRevert(e);if(!decoded)throw e;results.push({mode,decoded});} + } + const report={at:new Date().toISOString(),readOnly:true,chainId:await rpc.getChainId(),block:String(block),originalHash:hash,note:'Zero burn on the already-spent rule isolates instruction/data checks; no transactions sent.',results}; + fs.writeFileSync(reportPath+'spl-rejections.json',JSON.stringify(report,(_k,v)=>typeof v==='bigint'?String(v):v,2)); + console.log(JSON.stringify(report,null,2)); +})().catch(e=>{console.error(e.shortMessage||e.message);process.exitCode=1}); diff --git a/plan/agw/research/preset-acceptance-2026-10-20/spl-rejections.json b/plan/agw/research/preset-acceptance-2026-10-20/spl-rejections.json new file mode 100644 index 00000000..7858ad47 --- /dev/null +++ b/plan/agw/research/preset-acceptance-2026-10-20/spl-rejections.json @@ -0,0 +1,28 @@ +{ + "at": "2026-10-20T15:40:20.540Z", + "readOnly": true, + "chainId": 42101, + "block": "24456030", + "originalHash": "0x119c89e9ff7c7cccdfc8c071fade2488aa28b0eff7d9b71f7f0cf247c958bbf5", + "note": "Zero burn on the already-spent rule isolates instruction/data checks; no transactions sent.", + "results": [ + { + "mode": "amount", + "decoded": { + "name": "PolicyCheckReverted(SvmDataCeilingExceeded)", + "selector": "0xf4270752", + "decoded": "0x94de1ef800000000000000000000000000000000000000000000000000000000", + "hint": "URP rejected the action (truncated through the session engine). The inner selector names the gate; arguments are truncated to 28 bytes." + } + }, + { + "mode": "account", + "decoded": { + "name": "PolicyCheckReverted(SvmAccountPinMismatch)", + "selector": "0xf4270752", + "decoded": "0xff3dafe500000000000000000000000000000000000000000000000000000000", + "hint": "URP rejected the action (truncated through the session engine). The inner selector names the gate; arguments are truncated to 28 bytes." + } + } + ] +} \ No newline at end of file diff --git a/plan/agw/research/preset-catalog-2026-10-15/84532.json b/plan/agw/research/preset-catalog-2026-10-15/84532.json new file mode 100644 index 00000000..18d3e0e0 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/84532.json @@ -0,0 +1,217 @@ +[ + { + "addr": "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb", + "isContract": true, + "name": "MORPHO_BLUE" + }, + { + "addr": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "isContract": true, + "name": "USDC" + }, + { + "addr": "0x79A1027a6A159502049F10906D333EC57E95F083", + "name": "WORMHOLE_CORE", + "isContract": true + }, + { + "addr": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "name": "USDBC", + "isContract": true + }, + { + "addr": "0xdbc885569E711262926803184eC9Ff73816fc953", + "name": "cbETH", + "isContract": true + }, + { + "addr": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "name": "WETH", + "isContract": true + }, + { + "addr": "0x21A36dE5734BE165f7bFa42a086a51C466Cb90EE", + "name": "USDC_ORACLE", + "isContract": true + }, + { + "addr": "0xbf7491f119bCC33E5a697D3528e7d8D64E35b3F2", + "name": "ETH_ORACLE", + "isContract": true + }, + { + "addr": "0x3E4589Ca47F41f6DEFC78929D210976678960754", + "name": "cbETH_COMPOSITE_ORACLE", + "isContract": true + }, + { + "addr": "0x8967d9F9fdD2be7A712d83dD15D79123BdAe872e", + "name": "PAUSE_GUARDIAN_DEPRECATED", + "isContract": false + }, + { + "addr": "0x8967d9F9fdD2be7A712d83dD15D79123BdAe872e", + "name": "EMISSIONS_ADMIN", + "isContract": false + }, + { + "addr": "0x8967d9F9fdD2be7A712d83dD15D79123BdAe872e", + "name": "SECURITY_COUNCIL", + "isContract": false + }, + { + "addr": "0x35b3314EA652899154BbfE937E3cCC2775ba712e", + "name": "BORROW_SUPPLY_GUARDIAN", + "isContract": false + }, + { + "addr": "0x93BAD53DDfB6132b0aC8E37f6029163E63372cEE", + "name": "WORMHOLE_BRIDGE_RELAYER_PROXY", + "isContract": true + }, + { + "addr": "0xDbFACEfA114f79B7aAa8676A9cae9dF6edb76e11", + "name": "MRD_PROXY_ADMIN", + "isContract": true + }, + { + "addr": "0xc01EA381A64F8BE3bDBb01A7c34D809f80783662", + "name": "TEMPORAL_GOVERNOR", + "isContract": true + }, + { + "addr": "0x778F1bc4865F60201Dd0adAb2a57e9495bA9B80f", + "name": "MRD_IMPL", + "isContract": true + }, + { + "addr": "0xE193BE0A14D86BA554b11075b4235ab2Bd4F7D16", + "name": "COMPTROLLER", + "isContract": true + }, + { + "addr": "0xC72ba45f2Ae134F21DAEb2b7B5fd5De0064Ee9bB", + "name": "UNITROLLER", + "isContract": true + }, + { + "addr": "0xcdC49088c040f1209F1aa548b2Ae40d8E24B53A5", + "name": "MRD_PROXY", + "isContract": true + }, + { + "addr": "0x1c7b1689809F9f572e3DF9c1e063473549bdf37c", + "name": "MTOKEN_IMPLEMENTATION", + "isContract": true + }, + { + "addr": "0x7073814cfF6c183010df4D2BEC895a04bdB7f8cd", + "name": "JUMP_RATE_IRM_MOONWELL_USDBC", + "isContract": true + }, + { + "addr": "0x876852425331a113d8E432eFFB3aC5BEf38f033a", + "name": "MOONWELL_USDBC", + "isContract": true + }, + { + "addr": "0x2fdF038b9D09F7fA5E775cEF6787cdf0C780961c", + "name": "JUMP_RATE_IRM_MOONWELL_WETH", + "isContract": true + }, + { + "addr": "0x2F39a349A79492a70E152760ce7123A1933eCf28", + "name": "MOONWELL_WETH", + "isContract": true + }, + { + "addr": "0x38D292Adf50f0cceb12e06e1303d875F553D9b29", + "name": "JUMP_RATE_IRM_MOONWELL_cbETH", + "isContract": true + }, + { + "addr": "0x5302EbD8BC32435C823c2e22B04Cd6c45f593e89", + "name": "MOONWELL_cbETH", + "isContract": true + }, + { + "addr": "0xB7eAfB1B503c189CA4E5f19bCe272029cD98Cf1F", + "name": "WETH_ROUTER", + "isContract": true + }, + { + "addr": "0x13C0d0a89E7c3C747cc3A15234AB6942238d2ECb", + "name": "GOVTOKEN", + "isContract": true + }, + { + "addr": "0x1AbEA09b07276669de5BC3a11F820fdC4ba529d1", + "name": "CHAINLINK_ORACLE", + "isContract": true + }, + { + "addr": "0x6bD7f004Dda748dB47Eb764a816eD2AA26EB4e40", + "name": "WORMHOLE_BRIDGE_ADAPTER_PROXY", + "isContract": true + }, + { + "addr": "0xF81d39f4F2f98B5D804FCCF3Db194D17c78145Ff", + "name": "WORMHOLE_BRIDGE_ADAPTER_LOGIC", + "isContract": true + }, + { + "addr": "0xC18f4443e92D62Df803aA267E3117A1F244f09E3", + "name": "xWELL_LOGIC", + "isContract": true + }, + { + "addr": "0xE8F339C51cb2700113ec6ef552eE1D6cCA3BfB95", + "name": "xWELL_PROXY", + "isContract": true + }, + { + "addr": "0x9AC4520143F86538CdF325Ec9141e060e5896d7a", + "isContract": true, + "name": "ECOSYSTEM_RESERVE_PROXY" + }, + { + "addr": "0x4462233cA8899316540ffE976990D77D486A3f9c", + "isContract": true, + "name": "ECOSYSTEM_RESERVE_IMPL" + }, + { + "addr": "0xCEdb41D3D274326a6a72F03215BA2E8aA0fA0A6a", + "isContract": true, + "name": "ECOSYSTEM_RESERVE_CONTROLLER" + }, + { + "addr": "0x136b89Fc7e52493AadC7710a64603793a857dAfA", + "isContract": true, + "name": "STK_GOVTOKEN_PROXY" + }, + { + "addr": "0xa48382Da31A70EFecDF0a77d454cdE07b25b4B8D", + "isContract": true, + "name": "STK_GOVTOKEN_IMPL" + }, + { + "addr": "0xBdD86164da753C1a25e72603d266Dc1CC32e8acf", + "isContract": true, + "name": "VOTE_COLLECTION_PROXY" + }, + { + "addr": "0xb6cbE1de9878547BbC8DdB7288A668AbF9F43d16", + "isContract": true, + "name": "VOTE_COLLECTION_IMPL" + }, + { + "addr": "0x2dF0598Caa354D546dac1aAa0716553cEB81E8D8", + "isContract": false, + "name": "DEX_RELAYER" + }, + { + "addr": "0xE9fFd686Ca83CeB308962f4e50c5Fd7F2E3c037e", + "isContract": true, + "name": "MARKET_ADD_CHECKER" + } +] diff --git a/plan/agw/research/preset-catalog-2026-10-15/AaveV3ArbitrumSepolia.sol b/plan/agw/research/preset-catalog-2026-10-15/AaveV3ArbitrumSepolia.sol new file mode 100644 index 00000000..24b46a7e --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/AaveV3ArbitrumSepolia.sol @@ -0,0 +1,113 @@ +// AUTOGENERATED - MANUAL CHANGES WILL BE REVERTED BY THE GENERATOR +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.0; + +import {IPoolAddressesProvider, IPool, IPoolConfigurator, IAaveOracle, IPoolDataProvider, IACLManager, ICollector} from './AaveV3.sol'; +library AaveV3ArbitrumSepolia { + // https://sepolia.arbiscan.io/address/0xB25a5D144626a0D488e52AE717A051a2E9997076 + IPoolAddressesProvider internal constant POOL_ADDRESSES_PROVIDER = + IPoolAddressesProvider(0xB25a5D144626a0D488e52AE717A051a2E9997076); + + // https://sepolia.arbiscan.io/address/0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff + IPool internal constant POOL = IPool(0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff); + + // https://sepolia.arbiscan.io/address/0x8E4Bb46E6245a507F1a267ef488228B08c0dc664 + IPoolConfigurator internal constant POOL_CONFIGURATOR = + IPoolConfigurator(0x8E4Bb46E6245a507F1a267ef488228B08c0dc664); + + // https://sepolia.arbiscan.io/address/0xEf95A6B9e88Bd509Fd67BA741cf2b263DaC65c00 + IAaveOracle internal constant ORACLE = IAaveOracle(0xEf95A6B9e88Bd509Fd67BA741cf2b263DaC65c00); + + // https://sepolia.arbiscan.io/address/0xC08C599C22bfD4a729E33e1Ed9b49456Abad0005 + address internal constant ACL_ADMIN = 0xC08C599C22bfD4a729E33e1Ed9b49456Abad0005; + + // https://sepolia.arbiscan.io/address/0xB66f0fF09f256A73d2E2b5faF596b363A21a7D68 + IACLManager internal constant ACL_MANAGER = + IACLManager(0xB66f0fF09f256A73d2E2b5faF596b363A21a7D68); + + // https://sepolia.arbiscan.io/address/0x12373B5085e3b42D42C1D4ABF3B3Cf4Df0E0Fa01 + IPoolDataProvider internal constant AAVE_PROTOCOL_DATA_PROVIDER = + IPoolDataProvider(0x12373B5085e3b42D42C1D4ABF3B3Cf4Df0E0Fa01); + + // https://sepolia.arbiscan.io/address/0x82405D1a189bd6cE4667809C35B37fBE136A4c5B + address internal constant POOL_IMPL = 0x82405D1a189bd6cE4667809C35B37fBE136A4c5B; + + // https://sepolia.arbiscan.io/address/0x629A5a607aC4901252e4C48a0Fde156785598F5b + address internal constant POOL_CONFIGURATOR_IMPL = 0x629A5a607aC4901252e4C48a0Fde156785598F5b; + + // https://sepolia.arbiscan.io/address/0x3A203B14CF8749a1e3b7314c6c49004B77Ee667A + address internal constant DEFAULT_INCENTIVES_CONTROLLER = + 0x3A203B14CF8749a1e3b7314c6c49004B77Ee667A; + + // https://sepolia.arbiscan.io/address/0x54E3aa872c3d2A89D1A6495F770f2cCa2C4Fc185 + address internal constant EMISSION_MANAGER = 0x54E3aa872c3d2A89D1A6495F770f2cCa2C4Fc185; + + // https://sepolia.arbiscan.io/address/0xa0208CE8356ad6C5EC6dFb8996c9A6B828212022 + ICollector internal constant COLLECTOR = ICollector(0xa0208CE8356ad6C5EC6dFb8996c9A6B828212022); + + // https://sepolia.arbiscan.io/address/0xc0Bac16A64FbAa7EE6483bD12a759e28cD13dcBe + address internal constant DEFAULT_A_TOKEN_IMPL = 0xc0Bac16A64FbAa7EE6483bD12a759e28cD13dcBe; + + // https://sepolia.arbiscan.io/address/0x486C2D3F59E4d72f3cAa301a7eF19E3db657F5b0 + address internal constant DEFAULT_VARIABLE_DEBT_TOKEN_IMPL = + 0x486C2D3F59E4d72f3cAa301a7eF19E3db657F5b0; + + // https://sepolia.arbiscan.io/address/0x2E45e7dCD1e94d8edf1605FfF4602912FDC662bC + address internal constant L2_ENCODER = 0x2E45e7dCD1e94d8edf1605FfF4602912FDC662bC; + + // https://sepolia.arbiscan.io/address/0x0a275C06556EeB3c7Ff2b0f0cfD462A7645772EF + address internal constant CONFIG_ENGINE = 0x0a275C06556EeB3c7Ff2b0f0cfD462A7645772EF; + + // https://sepolia.arbiscan.io/address/0xbB7492Cce831eE6F349960a6E2da8eadC4b50cA3 + address internal constant POOL_ADDRESSES_PROVIDER_REGISTRY = + 0xbB7492Cce831eE6F349960a6E2da8eadC4b50cA3; + + // https://sepolia.arbiscan.io/address/0xB90fa850a4af6D30feA8b41989eaAecDcA8fd414 + address internal constant UI_INCENTIVE_DATA_PROVIDER = 0xB90fa850a4af6D30feA8b41989eaAecDcA8fd414; + + // https://sepolia.arbiscan.io/address/0x97Cf44bF6a9A3D2B4F32b05C480dBEdC018F72A9 + address internal constant UI_POOL_DATA_PROVIDER = 0x97Cf44bF6a9A3D2B4F32b05C480dBEdC018F72A9; + + // https://sepolia.arbiscan.io/address/0x1Be33D186a081eFDf15310e4bdEd81E828C47f9b + address internal constant WALLET_BALANCE_PROVIDER = 0x1Be33D186a081eFDf15310e4bdEd81E828C47f9b; + + // https://sepolia.arbiscan.io/address/0x20040a64612555042335926d72B4E5F667a67fA1 + address internal constant WETH_GATEWAY = 0x20040a64612555042335926d72B4E5F667a67fA1; +} +library AaveV3ArbitrumSepoliaAssets { + // https://sepolia.arbiscan.io/address/0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d + address internal constant USDC_UNDERLYING = 0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d; + + uint8 internal constant USDC_DECIMALS = 6; + + // https://sepolia.arbiscan.io/address/0x460b97BD498E1157530AEb3086301d5225b91216 + address internal constant USDC_A_TOKEN = 0x460b97BD498E1157530AEb3086301d5225b91216; + + // https://sepolia.arbiscan.io/address/0x4fBE3A94C60A5085dA6a2D309965DcF34c36711d + address internal constant USDC_V_TOKEN = 0x4fBE3A94C60A5085dA6a2D309965DcF34c36711d; + + // https://sepolia.arbiscan.io/address/0x0153002d20B96532C639313c2d54c3dA09109309 + address internal constant USDC_ORACLE = 0x0153002d20B96532C639313c2d54c3dA09109309; + + // https://sepolia.arbiscan.io/address/0x5C0A210C9C0df2Ab147BDE7D9583c07cEb3131CD + address internal constant USDC_INTEREST_RATE_STRATEGY = + 0x5C0A210C9C0df2Ab147BDE7D9583c07cEb3131CD; + + // https://sepolia.arbiscan.io/address/0x1dF462e2712496373A347f8ad10802a5E95f053D + address internal constant WETH_UNDERLYING = 0x1dF462e2712496373A347f8ad10802a5E95f053D; + + uint8 internal constant WETH_DECIMALS = 18; + + // https://sepolia.arbiscan.io/address/0xf5f17EbE81E516Dc7cB38D61908EC252F150CE60 + address internal constant WETH_A_TOKEN = 0xf5f17EbE81E516Dc7cB38D61908EC252F150CE60; + + // https://sepolia.arbiscan.io/address/0x372eB464296D8D78acaa462b41eaaf2D3663dAD3 + address internal constant WETH_V_TOKEN = 0x372eB464296D8D78acaa462b41eaaf2D3663dAD3; + + // https://sepolia.arbiscan.io/address/0xd30e2101a97dcbAeBCBC04F14C3f624E67A35165 + address internal constant WETH_ORACLE = 0xd30e2101a97dcbAeBCBC04F14C3f624E67A35165; + + // https://sepolia.arbiscan.io/address/0x46d3a2A27E2c700d74f21AD3290A20cB8437F7b7 + address internal constant WETH_INTEREST_RATE_STRATEGY = + 0x46d3a2A27E2c700d74f21AD3290A20cB8437F7b7; +} diff --git a/plan/agw/research/preset-catalog-2026-10-15/AaveV3BaseSepolia.sol b/plan/agw/research/preset-catalog-2026-10-15/AaveV3BaseSepolia.sol new file mode 100644 index 00000000..66952969 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/AaveV3BaseSepolia.sol @@ -0,0 +1,227 @@ +// AUTOGENERATED - MANUAL CHANGES WILL BE REVERTED BY THE GENERATOR +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.0; + +import {IPoolAddressesProvider, IPool, IPoolConfigurator, IAaveOracle, IPoolDataProvider, IACLManager, ICollector} from './AaveV3.sol'; +library AaveV3BaseSepolia { + // https://sepolia.basescan.org/address/0xE4C23309117Aa30342BFaae6c95c6478e0A4Ad00 + IPoolAddressesProvider internal constant POOL_ADDRESSES_PROVIDER = + IPoolAddressesProvider(0xE4C23309117Aa30342BFaae6c95c6478e0A4Ad00); + + // https://sepolia.basescan.org/address/0x8bAB6d1b75f19e9eD9fCe8b9BD338844fF79aE27 + IPool internal constant POOL = IPool(0x8bAB6d1b75f19e9eD9fCe8b9BD338844fF79aE27); + + // https://sepolia.basescan.org/address/0x0Bf6bdFF4da24C272BC524d521Ab0db20601D384 + IPoolConfigurator internal constant POOL_CONFIGURATOR = + IPoolConfigurator(0x0Bf6bdFF4da24C272BC524d521Ab0db20601D384); + + // https://sepolia.basescan.org/address/0x943b0dE18d4abf4eF02A85912F8fc07684C141dF + IAaveOracle internal constant ORACLE = IAaveOracle(0x943b0dE18d4abf4eF02A85912F8fc07684C141dF); + + // https://sepolia.basescan.org/address/0x956DE559DFc27678FD69d4f49f485196b50BDD0F + address internal constant ACL_ADMIN = 0x956DE559DFc27678FD69d4f49f485196b50BDD0F; + + // https://sepolia.basescan.org/address/0x9f09F541Adf314341d8d45E5B18961147b9050E9 + IACLManager internal constant ACL_MANAGER = + IACLManager(0x9f09F541Adf314341d8d45E5B18961147b9050E9); + + // https://sepolia.basescan.org/address/0xBc9f5b7E248451CdD7cA54e717a2BFe1F32b566b + IPoolDataProvider internal constant AAVE_PROTOCOL_DATA_PROVIDER = + IPoolDataProvider(0xBc9f5b7E248451CdD7cA54e717a2BFe1F32b566b); + + // https://sepolia.basescan.org/address/0xE9fb54369E85b9714F9d86366D918c5C7C87783A + address internal constant POOL_IMPL = 0xE9fb54369E85b9714F9d86366D918c5C7C87783A; + + // https://sepolia.basescan.org/address/0x6fDdde45f777a4E461B0721a578b169b44579623 + address internal constant POOL_CONFIGURATOR_IMPL = 0x6fDdde45f777a4E461B0721a578b169b44579623; + + // https://sepolia.basescan.org/address/0x71B448405c803A3982aBa448133133D2DEAFBE5F + address internal constant DEFAULT_INCENTIVES_CONTROLLER = + 0x71B448405c803A3982aBa448133133D2DEAFBE5F; + + // https://sepolia.basescan.org/address/0x49ECA4d8e7EaE6a1e7c02516851fF9038b277e96 + address internal constant EMISSION_MANAGER = 0x49ECA4d8e7EaE6a1e7c02516851fF9038b277e96; + + // https://sepolia.basescan.org/address/0x6414DE3F58d54Fb90636e8393F065fDFe34Da420 + ICollector internal constant COLLECTOR = ICollector(0x6414DE3F58d54Fb90636e8393F065fDFe34Da420); + + // https://sepolia.basescan.org/address/0xF83D6A049FE62b8A1270525E1516F93b61C7D113 + address internal constant DEFAULT_A_TOKEN_IMPL = 0xF83D6A049FE62b8A1270525E1516F93b61C7D113; + + // https://sepolia.basescan.org/address/0x1A91BEfb27d0DB4FDE68D28bf0cbdD5BC9C5FdF2 + address internal constant DEFAULT_VARIABLE_DEBT_TOKEN_IMPL = + 0x1A91BEfb27d0DB4FDE68D28bf0cbdD5BC9C5FdF2; + + // https://sepolia.basescan.org/address/0x4Afb5ADe7Bd7a670B61f303ab0C740eE8350918f + address internal constant STATA_FACTORY = 0x4Afb5ADe7Bd7a670B61f303ab0C740eE8350918f; + + // https://sepolia.basescan.org/address/0xD3a3f523100e1eaa740A6eE72Ae94710A0fAcFCe + address internal constant CONFIG_ENGINE = 0xD3a3f523100e1eaa740A6eE72Ae94710A0fAcFCe; + + // https://sepolia.basescan.org/address/0x8eB0791E0981947df2eA074D2479dB9A258b0312 + address internal constant L2_ENCODER = 0x8eB0791E0981947df2eA074D2479dB9A258b0312; + + // https://sepolia.basescan.org/address/0x34473a6Ef69d92191d7b25352b5D266f3a5BAca2 + address internal constant POOL_ADDRESSES_PROVIDER_REGISTRY = + 0x34473a6Ef69d92191d7b25352b5D266f3a5BAca2; + + // https://sepolia.basescan.org/address/0xDB1412acf288D5bE057f8e90fd7b1BF4f84bB3B1 + address internal constant UI_INCENTIVE_DATA_PROVIDER = 0xDB1412acf288D5bE057f8e90fd7b1BF4f84bB3B1; + + // https://sepolia.basescan.org/address/0x3cB7B00B6C09B71998124196691e8bF2694De863 + address internal constant UI_POOL_DATA_PROVIDER = 0x3cB7B00B6C09B71998124196691e8bF2694De863; + + // https://sepolia.basescan.org/address/0x2c4D1F4EC7F4FfA09a5E1C9e74fD3A10f21Bd811 + address internal constant WALLET_BALANCE_PROVIDER = 0x2c4D1F4EC7F4FfA09a5E1C9e74fD3A10f21Bd811; + + // https://sepolia.basescan.org/address/0x0568130e794429D2eEBC4dafE18f25Ff1a1ed8b6 + address internal constant WETH_GATEWAY = 0x0568130e794429D2eEBC4dafE18f25Ff1a1ed8b6; +} +library AaveV3BaseSepoliaAssets { + // https://sepolia.basescan.org/address/0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f + address internal constant USDC_UNDERLYING = 0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f; + + uint8 internal constant USDC_DECIMALS = 6; + + // https://sepolia.basescan.org/address/0x10F1A9D11CDf50041f3f8cB7191CBE2f31750ACC + address internal constant USDC_A_TOKEN = 0x10F1A9D11CDf50041f3f8cB7191CBE2f31750ACC; + + // https://sepolia.basescan.org/address/0xFB3e85601b7fEb3691bbb8779Ef0E1069E347204 + address internal constant USDC_V_TOKEN = 0xFB3e85601b7fEb3691bbb8779Ef0E1069E347204; + + // https://sepolia.basescan.org/address/0xd30e2101a97dcbAeBCBC04F14C3f624E67A35165 + address internal constant USDC_ORACLE = 0xd30e2101a97dcbAeBCBC04F14C3f624E67A35165; + + // https://sepolia.basescan.org/address/0x705F7D9Ed0Ac3724eC974DaF6A099bA59d254b92 + address internal constant USDC_INTEREST_RATE_STRATEGY = + 0x705F7D9Ed0Ac3724eC974DaF6A099bA59d254b92; + + // https://sepolia.basescan.org/address/0xf430cb6E2b85f99222fBFA6dFEa18Ff60FA6B32a + address internal constant USDC_STATA_TOKEN = 0xf430cb6E2b85f99222fBFA6dFEa18Ff60FA6B32a; + + // https://sepolia.basescan.org/address/0x0a215D8ba66387DCA84B284D18c3B4ec3de6E54a + address internal constant USDT_UNDERLYING = 0x0a215D8ba66387DCA84B284D18c3B4ec3de6E54a; + + uint8 internal constant USDT_DECIMALS = 6; + + // https://sepolia.basescan.org/address/0xcE3CAae5Ed17A7AafCEEbc897DE843fA6CC0c018 + address internal constant USDT_A_TOKEN = 0xcE3CAae5Ed17A7AafCEEbc897DE843fA6CC0c018; + + // https://sepolia.basescan.org/address/0xE3C742c88EE6A610157C16b60bBDD62351daeE39 + address internal constant USDT_V_TOKEN = 0xE3C742c88EE6A610157C16b60bBDD62351daeE39; + + // https://sepolia.basescan.org/address/0x3ec8593F930EA45ea58c968260e6e9FF53FC934f + address internal constant USDT_ORACLE = 0x3ec8593F930EA45ea58c968260e6e9FF53FC934f; + + // https://sepolia.basescan.org/address/0x705F7D9Ed0Ac3724eC974DaF6A099bA59d254b92 + address internal constant USDT_INTEREST_RATE_STRATEGY = + 0x705F7D9Ed0Ac3724eC974DaF6A099bA59d254b92; + + // https://sepolia.basescan.org/address/0xf63dA51069FAe9448747FA425F8Cb84B0149eC0F + address internal constant USDT_STATA_TOKEN = 0xf63dA51069FAe9448747FA425F8Cb84B0149eC0F; + + // https://sepolia.basescan.org/address/0x54114591963CF60EF3aA63bEfD6eC263D98145a4 + address internal constant WBTC_UNDERLYING = 0x54114591963CF60EF3aA63bEfD6eC263D98145a4; + + uint8 internal constant WBTC_DECIMALS = 8; + + // https://sepolia.basescan.org/address/0x47Db195BAf46898302C06c31bCF46c01C64ACcF9 + address internal constant WBTC_A_TOKEN = 0x47Db195BAf46898302C06c31bCF46c01C64ACcF9; + + // https://sepolia.basescan.org/address/0x638291B5Ccb9fEd339FdD351Eb086e607fCA9561 + address internal constant WBTC_V_TOKEN = 0x638291B5Ccb9fEd339FdD351Eb086e607fCA9561; + + // https://sepolia.basescan.org/address/0x0FB99723Aee6f420beAD13e6bBB79b7E6F034298 + address internal constant WBTC_ORACLE = 0x0FB99723Aee6f420beAD13e6bBB79b7E6F034298; + + // https://sepolia.basescan.org/address/0x705F7D9Ed0Ac3724eC974DaF6A099bA59d254b92 + address internal constant WBTC_INTEREST_RATE_STRATEGY = + 0x705F7D9Ed0Ac3724eC974DaF6A099bA59d254b92; + + // https://sepolia.basescan.org/address/0x5d7538579560F5fdD54F9D264DBe0e697b5BF668 + address internal constant WBTC_STATA_TOKEN = 0x5d7538579560F5fdD54F9D264DBe0e697b5BF668; + + // https://sepolia.basescan.org/address/0x4200000000000000000000000000000000000006 + address internal constant WETH_UNDERLYING = 0x4200000000000000000000000000000000000006; + + uint8 internal constant WETH_DECIMALS = 18; + + // https://sepolia.basescan.org/address/0x73a5bB60b0B0fc35710DDc0ea9c407031E31Bdbb + address internal constant WETH_A_TOKEN = 0x73a5bB60b0B0fc35710DDc0ea9c407031E31Bdbb; + + // https://sepolia.basescan.org/address/0x562abf6562d6A2b165aDa02b5946bc3E7b4dD653 + address internal constant WETH_V_TOKEN = 0x562abf6562d6A2b165aDa02b5946bc3E7b4dD653; + + // https://sepolia.basescan.org/address/0x4aDC67696bA383F43DD60A9e78F2C97Fbbfc7cb1 + address internal constant WETH_ORACLE = 0x4aDC67696bA383F43DD60A9e78F2C97Fbbfc7cb1; + + // https://sepolia.basescan.org/address/0x705F7D9Ed0Ac3724eC974DaF6A099bA59d254b92 + address internal constant WETH_INTEREST_RATE_STRATEGY = + 0x705F7D9Ed0Ac3724eC974DaF6A099bA59d254b92; + + // https://sepolia.basescan.org/address/0xde7820fFb73059608928cb9e29F6EB1369Ad1342 + address internal constant WETH_STATA_TOKEN = 0xde7820fFb73059608928cb9e29F6EB1369Ad1342; + + // https://sepolia.basescan.org/address/0xD171b9694f7A2597Ed006D41f7509aaD4B485c4B + address internal constant cbETH_UNDERLYING = 0xD171b9694f7A2597Ed006D41f7509aaD4B485c4B; + + uint8 internal constant cbETH_DECIMALS = 18; + + // https://sepolia.basescan.org/address/0x9Fd6d1DBAd7c052e0c43f46df36eEc6a68814B63 + address internal constant cbETH_A_TOKEN = 0x9Fd6d1DBAd7c052e0c43f46df36eEc6a68814B63; + + // https://sepolia.basescan.org/address/0xa1a483652b157FF006292CDb0e9EB7FFad2a5142 + address internal constant cbETH_V_TOKEN = 0xa1a483652b157FF006292CDb0e9EB7FFad2a5142; + + // https://sepolia.basescan.org/address/0x3c65e28D357a37589e1C7C86044a9f44dDC17134 + address internal constant cbETH_ORACLE = 0x3c65e28D357a37589e1C7C86044a9f44dDC17134; + + // https://sepolia.basescan.org/address/0x705F7D9Ed0Ac3724eC974DaF6A099bA59d254b92 + address internal constant cbETH_INTEREST_RATE_STRATEGY = + 0x705F7D9Ed0Ac3724eC974DaF6A099bA59d254b92; + + // https://sepolia.basescan.org/address/0x9F56ff6c3441bb89eBFf1c0bc75D4096C33230d1 + address internal constant cbETH_STATA_TOKEN = 0x9F56ff6c3441bb89eBFf1c0bc75D4096C33230d1; + + // https://sepolia.basescan.org/address/0x810D46F9a9027E28F9B01F75E2bdde839dA61115 + address internal constant LINK_UNDERLYING = 0x810D46F9a9027E28F9B01F75E2bdde839dA61115; + + uint8 internal constant LINK_DECIMALS = 18; + + // https://sepolia.basescan.org/address/0x0aD46dE765522399d7b25B438b230A894d72272B + address internal constant LINK_A_TOKEN = 0x0aD46dE765522399d7b25B438b230A894d72272B; + + // https://sepolia.basescan.org/address/0xBA42C6752F347e3c22DD0A4e5578dCB0137C1325 + address internal constant LINK_V_TOKEN = 0xBA42C6752F347e3c22DD0A4e5578dCB0137C1325; + + // https://sepolia.basescan.org/address/0xb113F5A928BCfF189C998ab20d753a47F9dE5A61 + address internal constant LINK_ORACLE = 0xb113F5A928BCfF189C998ab20d753a47F9dE5A61; + + // https://sepolia.basescan.org/address/0x705F7D9Ed0Ac3724eC974DaF6A099bA59d254b92 + address internal constant LINK_INTEREST_RATE_STRATEGY = + 0x705F7D9Ed0Ac3724eC974DaF6A099bA59d254b92; + + // https://sepolia.basescan.org/address/0xFb3AB5ABd3dE4703C0F296B1fe6f5E570e1631Ff + address internal constant LINK_STATA_TOKEN = 0xFb3AB5ABd3dE4703C0F296B1fe6f5E570e1631Ff; +} +library AaveV3BaseSepoliaEModes { + uint8 internal constant NONE = 0; + + uint8 internal constant WETH_cbETH__WETH_cbETH = 1; +} +library AaveV3BaseSepoliaExternalLibraries { + // https://sepolia.basescan.org/address/0xE66AdcF153d0bD67a74e5d23e23F90b4011024EC + address internal constant FLASHLOAN_LOGIC = 0xE66AdcF153d0bD67a74e5d23e23F90b4011024EC; + + // https://sepolia.basescan.org/address/0x1Fb8f7C906cddD28B42ae6Eb76abC04A91188635 + address internal constant BORROW_LOGIC = 0x1Fb8f7C906cddD28B42ae6Eb76abC04A91188635; + + // https://sepolia.basescan.org/address/0x8dc095F287dBEBD9e15f75BB3DfBF18389BB8104 + address internal constant LIQUIDATION_LOGIC = 0x8dc095F287dBEBD9e15f75BB3DfBF18389BB8104; + + // https://sepolia.basescan.org/address/0x25Ed699a052B820d772765E26Ed4dD9f0A26F3E5 + address internal constant POOL_LOGIC = 0x25Ed699a052B820d772765E26Ed4dD9f0A26F3E5; + + // https://sepolia.basescan.org/address/0x33654b16A4De97bCE05d7dD06803Bf1066f3123C + address internal constant SUPPLY_LOGIC = 0x33654b16A4De97bCE05d7dD06803Bf1066f3123C; +} diff --git a/plan/agw/research/preset-catalog-2026-10-15/AaveV3Sepolia.sol b/plan/agw/research/preset-catalog-2026-10-15/AaveV3Sepolia.sol new file mode 100644 index 00000000..4e1fc549 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/AaveV3Sepolia.sol @@ -0,0 +1,261 @@ +// AUTOGENERATED - MANUAL CHANGES WILL BE REVERTED BY THE GENERATOR +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.0; + +import {IPoolAddressesProvider, IPool, IPoolConfigurator, IAaveOracle, IPoolDataProvider, IACLManager, ICollector} from './AaveV3.sol'; +library AaveV3Sepolia { + // https://sepolia.etherscan.io/address/0x012bAC54348C0E635dCAc9D5FB99f06F24136C9A + IPoolAddressesProvider internal constant POOL_ADDRESSES_PROVIDER = + IPoolAddressesProvider(0x012bAC54348C0E635dCAc9D5FB99f06F24136C9A); + + // https://sepolia.etherscan.io/address/0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951 + IPool internal constant POOL = IPool(0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951); + + // https://sepolia.etherscan.io/address/0x7Ee60D184C24Ef7AfC1Ec7Be59A0f448A0abd138 + IPoolConfigurator internal constant POOL_CONFIGURATOR = + IPoolConfigurator(0x7Ee60D184C24Ef7AfC1Ec7Be59A0f448A0abd138); + + // https://sepolia.etherscan.io/address/0x2da88497588bf89281816106C7259e31AF45a663 + IAaveOracle internal constant ORACLE = IAaveOracle(0x2da88497588bf89281816106C7259e31AF45a663); + + // https://sepolia.etherscan.io/address/0xfA0e305E0f46AB04f00ae6b5f4560d61a2183E00 + address internal constant ACL_ADMIN = 0xfA0e305E0f46AB04f00ae6b5f4560d61a2183E00; + + // https://sepolia.etherscan.io/address/0x7F2bE3b178deeFF716CD6Ff03Ef79A1dFf360ddD + IACLManager internal constant ACL_MANAGER = + IACLManager(0x7F2bE3b178deeFF716CD6Ff03Ef79A1dFf360ddD); + + // https://sepolia.etherscan.io/address/0x3e9708d80f7B3e43118013075F7e95CE3AB31F31 + IPoolDataProvider internal constant AAVE_PROTOCOL_DATA_PROVIDER = + IPoolDataProvider(0x3e9708d80f7B3e43118013075F7e95CE3AB31F31); + + // https://sepolia.etherscan.io/address/0x0562453c3DAFBB5e625483af58f4E6D668c44e19 + address internal constant POOL_IMPL = 0x0562453c3DAFBB5e625483af58f4E6D668c44e19; + + // https://sepolia.etherscan.io/address/0x63Dea961A0B2e2dF4F7A4bb61CBc39BF53A6eb32 + address internal constant POOL_CONFIGURATOR_IMPL = 0x63Dea961A0B2e2dF4F7A4bb61CBc39BF53A6eb32; + + // https://sepolia.etherscan.io/address/0x4DA5c4da71C5a167171cC839487536d86e083483 + address internal constant DEFAULT_INCENTIVES_CONTROLLER = + 0x4DA5c4da71C5a167171cC839487536d86e083483; + + // https://sepolia.etherscan.io/address/0x098a890BAfDf6FB4ACD24bF107D20EA15D229C62 + address internal constant EMISSION_MANAGER = 0x098a890BAfDf6FB4ACD24bF107D20EA15D229C62; + + // https://sepolia.etherscan.io/address/0x604264f8017fEF3b11B3dD63537CB501560380B5 + ICollector internal constant COLLECTOR = ICollector(0x604264f8017fEF3b11B3dD63537CB501560380B5); + + // https://sepolia.etherscan.io/address/0x48424f2779be0f03cDF6F02E17A591A9BF7AF89f + address internal constant DEFAULT_A_TOKEN_IMPL = 0x48424f2779be0f03cDF6F02E17A591A9BF7AF89f; + + // https://sepolia.etherscan.io/address/0x54bdE009156053108E73E2401aEA755e38f92098 + address internal constant DEFAULT_VARIABLE_DEBT_TOKEN_IMPL = + 0x54bdE009156053108E73E2401aEA755e38f92098; + + // https://sepolia.etherscan.io/address/0xC959483DBa39aa9E78757139af0e9a2EDEb3f42D + address internal constant FAUCET = 0xC959483DBa39aa9E78757139af0e9a2EDEb3f42D; + + // https://sepolia.etherscan.io/address/0xBA25de9a7DC623B30799F33B770d31B44c2C3b77 + address internal constant UI_INCENTIVE_DATA_PROVIDER = 0xBA25de9a7DC623B30799F33B770d31B44c2C3b77; + + // https://sepolia.etherscan.io/address/0x69529987FA4A075D0C00B0128fa848dc9ebbE9CE + address internal constant UI_POOL_DATA_PROVIDER = 0x69529987FA4A075D0C00B0128fa848dc9ebbE9CE; + + // https://sepolia.etherscan.io/address/0xCD4e0d6D2b1252E2A709B8aE97DBA31164C5a709 + address internal constant WALLET_BALANCE_PROVIDER = 0xCD4e0d6D2b1252E2A709B8aE97DBA31164C5a709; + + // https://sepolia.etherscan.io/address/0x387d311e47e80b498169e6fb51d3193167d89F7D + address internal constant WETH_GATEWAY = 0x387d311e47e80b498169e6fb51d3193167d89F7D; + + // https://sepolia.etherscan.io/address/0xd210dFB43B694430B8d31762B5199e30c31266C8 + address internal constant LEGACY_STATIC_A_TOKEN_FACTORY = + 0xd210dFB43B694430B8d31762B5199e30c31266C8; + + // https://sepolia.etherscan.io/address/0x69B9843A16a6E9933125EBD97659BA3CCbE2Ef8A + address internal constant UI_GHO_DATA_PROVIDER = 0x69B9843A16a6E9933125EBD97659BA3CCbE2Ef8A; +} +library AaveV3SepoliaAssets { + // https://sepolia.etherscan.io/address/0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357 + address internal constant DAI_UNDERLYING = 0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357; + + uint8 internal constant DAI_DECIMALS = 18; + + // https://sepolia.etherscan.io/address/0x29598b72eb5CeBd806C5dCD549490FdA35B13cD8 + address internal constant DAI_A_TOKEN = 0x29598b72eb5CeBd806C5dCD549490FdA35B13cD8; + + // https://sepolia.etherscan.io/address/0x22675C506A8FC26447aFFfa33640f6af5d4D4cF0 + address internal constant DAI_V_TOKEN = 0x22675C506A8FC26447aFFfa33640f6af5d4D4cF0; + + // https://sepolia.etherscan.io/address/0x9aF11c35c5d3Ae182C0050438972aac4376f9516 + address internal constant DAI_ORACLE = 0x9aF11c35c5d3Ae182C0050438972aac4376f9516; + + // https://sepolia.etherscan.io/address/0xA813CC4d67821fbAcF24659e414A1Cf6c551373c + address internal constant DAI_INTEREST_RATE_STRATEGY = 0xA813CC4d67821fbAcF24659e414A1Cf6c551373c; + + // https://sepolia.etherscan.io/address/0xDE46e43F46ff74A23a65EBb0580cbe3dFE684a17 + address internal constant DAI_STATIC_A_TOKEN = 0xDE46e43F46ff74A23a65EBb0580cbe3dFE684a17; + + // https://sepolia.etherscan.io/address/0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5 + address internal constant LINK_UNDERLYING = 0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5; + + uint8 internal constant LINK_DECIMALS = 18; + + // https://sepolia.etherscan.io/address/0x3FfAf50D4F4E96eB78f2407c090b72e86eCaed24 + address internal constant LINK_A_TOKEN = 0x3FfAf50D4F4E96eB78f2407c090b72e86eCaed24; + + // https://sepolia.etherscan.io/address/0x34a4d932E722b9dFb492B9D8131127690CE2430B + address internal constant LINK_V_TOKEN = 0x34a4d932E722b9dFb492B9D8131127690CE2430B; + + // https://sepolia.etherscan.io/address/0x14fC51b7df22b4D393cD45504B9f0A3002A63F3F + address internal constant LINK_ORACLE = 0x14fC51b7df22b4D393cD45504B9f0A3002A63F3F; + + // https://sepolia.etherscan.io/address/0xCA30c502d52F905FB3D04eE60cA48F5A1A89f8dB + address internal constant LINK_INTEREST_RATE_STRATEGY = + 0xCA30c502d52F905FB3D04eE60cA48F5A1A89f8dB; + + // https://sepolia.etherscan.io/address/0x8227a989709a757f25dF251C3C3e71CA38627836 + address internal constant LINK_STATIC_A_TOKEN = 0x8227a989709a757f25dF251C3C3e71CA38627836; + + // https://sepolia.etherscan.io/address/0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8 + address internal constant USDC_UNDERLYING = 0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8; + + uint8 internal constant USDC_DECIMALS = 6; + + // https://sepolia.etherscan.io/address/0x16dA4541aD1807f4443d92D26044C1147406EB80 + address internal constant USDC_A_TOKEN = 0x16dA4541aD1807f4443d92D26044C1147406EB80; + + // https://sepolia.etherscan.io/address/0x36B5dE936eF1710E1d22EabE5231b28581a92ECc + address internal constant USDC_V_TOKEN = 0x36B5dE936eF1710E1d22EabE5231b28581a92ECc; + + // https://sepolia.etherscan.io/address/0x98458D6A99489F15e6eB5aFa67ACFAcf6F211051 + address internal constant USDC_ORACLE = 0x98458D6A99489F15e6eB5aFa67ACFAcf6F211051; + + // https://sepolia.etherscan.io/address/0x5CB1008969a2d5FAcE8eF32732e6A306d0D0EF2A + address internal constant USDC_INTEREST_RATE_STRATEGY = + 0x5CB1008969a2d5FAcE8eF32732e6A306d0D0EF2A; + + // https://sepolia.etherscan.io/address/0x8A88124522dbBF1E56352ba3DE1d9F78C143751e + address internal constant USDC_STATIC_A_TOKEN = 0x8A88124522dbBF1E56352ba3DE1d9F78C143751e; + + // https://sepolia.etherscan.io/address/0x29f2D40B0605204364af54EC677bD022dA425d03 + address internal constant WBTC_UNDERLYING = 0x29f2D40B0605204364af54EC677bD022dA425d03; + + uint8 internal constant WBTC_DECIMALS = 8; + + // https://sepolia.etherscan.io/address/0x1804Bf30507dc2EB3bDEbbbdd859991EAeF6EefF + address internal constant WBTC_A_TOKEN = 0x1804Bf30507dc2EB3bDEbbbdd859991EAeF6EefF; + + // https://sepolia.etherscan.io/address/0xEB016dFd303F19fbDdFb6300eB4AeB2DA7Ceac37 + address internal constant WBTC_V_TOKEN = 0xEB016dFd303F19fbDdFb6300eB4AeB2DA7Ceac37; + + // https://sepolia.etherscan.io/address/0x784B90bA1E9a8cf3C9939c2e072F058B024C4b8a + address internal constant WBTC_ORACLE = 0x784B90bA1E9a8cf3C9939c2e072F058B024C4b8a; + + // https://sepolia.etherscan.io/address/0xCA30c502d52F905FB3D04eE60cA48F5A1A89f8dB + address internal constant WBTC_INTEREST_RATE_STRATEGY = + 0xCA30c502d52F905FB3D04eE60cA48F5A1A89f8dB; + + // https://sepolia.etherscan.io/address/0x131a121bda71ED810bCAf2aC9079214925e59C18 + address internal constant WBTC_STATIC_A_TOKEN = 0x131a121bda71ED810bCAf2aC9079214925e59C18; + + // https://sepolia.etherscan.io/address/0xC558DBdd856501FCd9aaF1E62eae57A9F0629a3c + address internal constant WETH_UNDERLYING = 0xC558DBdd856501FCd9aaF1E62eae57A9F0629a3c; + + uint8 internal constant WETH_DECIMALS = 18; + + // https://sepolia.etherscan.io/address/0x5b071b590a59395fE4025A0Ccc1FcC931AAc1830 + address internal constant WETH_A_TOKEN = 0x5b071b590a59395fE4025A0Ccc1FcC931AAc1830; + + // https://sepolia.etherscan.io/address/0x22a35DB253f4F6D0029025D6312A3BdAb20C2c6A + address internal constant WETH_V_TOKEN = 0x22a35DB253f4F6D0029025D6312A3BdAb20C2c6A; + + // https://sepolia.etherscan.io/address/0xDde0E8E6d3653614878Bf5009EDC317BC129fE2F + address internal constant WETH_ORACLE = 0xDde0E8E6d3653614878Bf5009EDC317BC129fE2F; + + // https://sepolia.etherscan.io/address/0xCA30c502d52F905FB3D04eE60cA48F5A1A89f8dB + address internal constant WETH_INTEREST_RATE_STRATEGY = + 0xCA30c502d52F905FB3D04eE60cA48F5A1A89f8dB; + + // https://sepolia.etherscan.io/address/0x162B500569F42D9eCe937e6a61EDfef660A12E98 + address internal constant WETH_STATIC_A_TOKEN = 0x162B500569F42D9eCe937e6a61EDfef660A12E98; + + // https://sepolia.etherscan.io/address/0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0 + address internal constant USDT_UNDERLYING = 0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0; + + uint8 internal constant USDT_DECIMALS = 6; + + // https://sepolia.etherscan.io/address/0xAF0F6e8b0Dc5c913bbF4d14c22B4E78Dd14310B6 + address internal constant USDT_A_TOKEN = 0xAF0F6e8b0Dc5c913bbF4d14c22B4E78Dd14310B6; + + // https://sepolia.etherscan.io/address/0x9844386d29EEd970B9F6a2B9a676083b0478210e + address internal constant USDT_V_TOKEN = 0x9844386d29EEd970B9F6a2B9a676083b0478210e; + + // https://sepolia.etherscan.io/address/0x4e86D3Aa271Fa418F38D7262fdBa2989C94aa5Ba + address internal constant USDT_ORACLE = 0x4e86D3Aa271Fa418F38D7262fdBa2989C94aa5Ba; + + // https://sepolia.etherscan.io/address/0x5CB1008969a2d5FAcE8eF32732e6A306d0D0EF2A + address internal constant USDT_INTEREST_RATE_STRATEGY = + 0x5CB1008969a2d5FAcE8eF32732e6A306d0D0EF2A; + + // https://sepolia.etherscan.io/address/0x978206fAe13faF5a8d293FB614326B237684B750 + address internal constant USDT_STATIC_A_TOKEN = 0x978206fAe13faF5a8d293FB614326B237684B750; + + // https://sepolia.etherscan.io/address/0x88541670E55cC00bEEFD87eB59EDd1b7C511AC9a + address internal constant AAVE_UNDERLYING = 0x88541670E55cC00bEEFD87eB59EDd1b7C511AC9a; + + uint8 internal constant AAVE_DECIMALS = 18; + + // https://sepolia.etherscan.io/address/0x6b8558764d3b7572136F17174Cb9aB1DDc7E1259 + address internal constant AAVE_A_TOKEN = 0x6b8558764d3b7572136F17174Cb9aB1DDc7E1259; + + // https://sepolia.etherscan.io/address/0xf12fdFc4c631F6D361b48723c2F2800b84B519e6 + address internal constant AAVE_V_TOKEN = 0xf12fdFc4c631F6D361b48723c2F2800b84B519e6; + + // https://sepolia.etherscan.io/address/0xda678Ef100c13504edDb8a228A1e8e4CB139f189 + address internal constant AAVE_ORACLE = 0xda678Ef100c13504edDb8a228A1e8e4CB139f189; + + // https://sepolia.etherscan.io/address/0xCA30c502d52F905FB3D04eE60cA48F5A1A89f8dB + address internal constant AAVE_INTEREST_RATE_STRATEGY = + 0xCA30c502d52F905FB3D04eE60cA48F5A1A89f8dB; + + // https://sepolia.etherscan.io/address/0x56771cEF0cb422e125564CcCC98BB05fdc718E77 + address internal constant AAVE_STATIC_A_TOKEN = 0x56771cEF0cb422e125564CcCC98BB05fdc718E77; + + // https://sepolia.etherscan.io/address/0x6d906e526a4e2Ca02097BA9d0caA3c382F52278E + address internal constant EURS_UNDERLYING = 0x6d906e526a4e2Ca02097BA9d0caA3c382F52278E; + + uint8 internal constant EURS_DECIMALS = 2; + + // https://sepolia.etherscan.io/address/0xB20691021F9AcED8631eDaa3c0Cd2949EB45662D + address internal constant EURS_A_TOKEN = 0xB20691021F9AcED8631eDaa3c0Cd2949EB45662D; + + // https://sepolia.etherscan.io/address/0x94482C7A7477196259D8a0f74fB853277Fa5a75b + address internal constant EURS_V_TOKEN = 0x94482C7A7477196259D8a0f74fB853277Fa5a75b; + + // https://sepolia.etherscan.io/address/0xCbE15C1f40f1D7eE1De3756D1557d5Fdc2A50bBD + address internal constant EURS_ORACLE = 0xCbE15C1f40f1D7eE1De3756D1557d5Fdc2A50bBD; + + // https://sepolia.etherscan.io/address/0x5CB1008969a2d5FAcE8eF32732e6A306d0D0EF2A + address internal constant EURS_INTEREST_RATE_STRATEGY = + 0x5CB1008969a2d5FAcE8eF32732e6A306d0D0EF2A; + + // https://sepolia.etherscan.io/address/0x72B49a461900e11632C95dfa563e7173438D4e3E + address internal constant EURS_STATIC_A_TOKEN = 0x72B49a461900e11632C95dfa563e7173438D4e3E; + + // https://sepolia.etherscan.io/address/0xc4bF5CbDaBE595361438F8c6a187bDc330539c60 + address internal constant GHO_UNDERLYING = 0xc4bF5CbDaBE595361438F8c6a187bDc330539c60; + + uint8 internal constant GHO_DECIMALS = 18; + + // https://sepolia.etherscan.io/address/0xd190eF37dB51Bb955A680fF1A85763CC72d083D4 + address internal constant GHO_A_TOKEN = 0xd190eF37dB51Bb955A680fF1A85763CC72d083D4; + + // https://sepolia.etherscan.io/address/0x67ae46EF043F7A4508BD1d6B94DB6c33F0915844 + address internal constant GHO_V_TOKEN = 0x67ae46EF043F7A4508BD1d6B94DB6c33F0915844; + + // https://sepolia.etherscan.io/address/0x00f7fecFAEbEd9499e1f3f9d04E755a21E5fc47C + address internal constant GHO_ORACLE = 0x00f7fecFAEbEd9499e1f3f9d04E755a21E5fc47C; + + // https://sepolia.etherscan.io/address/0x521247B4d0a51E71DE580dA2cBF99EB40a44b3Bf + address internal constant GHO_INTEREST_RATE_STRATEGY = 0x521247B4d0a51E71DE580dA2cBF99EB40a44b3Bf; +} diff --git a/plan/agw/research/preset-catalog-2026-10-15/Comptroller.sol b/plan/agw/research/preset-catalog-2026-10-15/Comptroller.sol new file mode 100644 index 00000000..f429dd34 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/Comptroller.sol @@ -0,0 +1,1418 @@ +// SPDX-License-Identifier: BSD-3-Clause +pragma solidity 0.8.19; + +import "./MToken.sol"; +import "./TokenErrorReporter.sol"; +import "./oracles/PriceOracle.sol"; +import "./ComptrollerInterface.sol"; +import "./ComptrollerStorage.sol"; +import "./Unitroller.sol"; + +/** + * @title Moonwell's Comptroller Contract + * @author Moonwell + */ +contract Comptroller is + ComptrollerV2Storage, + ComptrollerInterface, + ComptrollerErrorReporter, + ExponentialNoError +{ + /// @notice Emitted when an admin supports a market + event MarketListed(MToken mToken); + + /// @notice Emitted when an account enters a market + event MarketEntered(MToken mToken, address account); + + /// @notice Emitted when an account exits a market + event MarketExited(MToken mToken, address account); + + /// @notice Emitted when close factor is changed by admin + event NewCloseFactor( + uint oldCloseFactorMantissa, + uint newCloseFactorMantissa + ); + + /// @notice Emitted when a collateral factor is changed by admin + event NewCollateralFactor( + MToken mToken, + uint oldCollateralFactorMantissa, + uint newCollateralFactorMantissa + ); + + /// @notice Emitted when liquidation incentive is changed by admin + event NewLiquidationIncentive( + uint oldLiquidationIncentiveMantissa, + uint newLiquidationIncentiveMantissa + ); + + /// @notice Emitted when price oracle is changed + event NewPriceOracle( + PriceOracle oldPriceOracle, + PriceOracle newPriceOracle + ); + + /// @notice Emitted when pause guardian is changed + event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian); + + /// @notice Emitted when an action is paused globally + event ActionPaused(string action, bool pauseState); + + /// @notice Emitted when an action is paused on a market + event ActionPaused(MToken mToken, string action, bool pauseState); + + /// @notice Emitted when borrow cap for a mToken is changed + event NewBorrowCap(MToken indexed mToken, uint newBorrowCap); + + /// @notice Emitted when borrow cap guardian is changed + event NewBorrowCapGuardian( + address oldBorrowCapGuardian, + address newBorrowCapGuardian + ); + + /// @notice Emitted when supply cap for a mToken is changed + event NewSupplyCap(MToken indexed mToken, uint newSupplyCap); + + /// @notice Emitted when supply cap guardian is changed + event NewSupplyCapGuardian( + address oldSupplyCapGuardian, + address newSupplyCapGuardian + ); + + /// @notice Emitted when reward distributor is changed + event NewRewardDistributor( + MultiRewardDistributor oldRewardDistributor, + MultiRewardDistributor newRewardDistributor + ); + + // closeFactorMantissa must be strictly greater than this value + uint internal constant closeFactorMinMantissa = 0.05e18; // 0.05 + + // closeFactorMantissa must not exceed this value + uint internal constant closeFactorMaxMantissa = 0.9e18; // 0.9 + + // No collateralFactorMantissa may exceed this value + uint internal constant collateralFactorMaxMantissa = 0.9e18; // 0.9 + + constructor() { + admin = msg.sender; + } + + /*** Assets You Are In ***/ + + /** + * @notice Returns the assets an account has entered + * @param account The address of the account to pull assets for + * @return A dynamic list with the assets the account has entered + */ + function getAssetsIn( + address account + ) external view returns (MToken[] memory) { + MToken[] memory assetsIn = accountAssets[account]; + + return assetsIn; + } + + /** + * @notice Returns whether the given account is entered in the given asset + * @param account The address of the account to check + * @param mToken The mToken to check + * @return True if the account is in the asset, otherwise false. + */ + function checkMembership( + address account, + MToken mToken + ) external view returns (bool) { + return markets[address(mToken)].accountMembership[account]; + } + + /** + * @notice Add assets to be included in account liquidity calculation + * @param mTokens The list of addresses of the mToken markets to be enabled + * @return Success indicator for whether each corresponding market was entered + */ + function enterMarkets( + address[] memory mTokens + ) public override returns (uint[] memory) { + uint len = mTokens.length; + + uint[] memory results = new uint[](len); + for (uint i = 0; i < len; i++) { + MToken mToken = MToken(mTokens[i]); + + results[i] = uint(addToMarketInternal(mToken, msg.sender)); + } + + return results; + } + + /** + * @notice Add the market to the borrower's "assets in" for liquidity calculations + * @param mToken The market to enter + * @param borrower The address of the account to modify + * @return Success indicator for whether the market was entered + */ + function addToMarketInternal( + MToken mToken, + address borrower + ) internal returns (Error) { + Market storage marketToJoin = markets[address(mToken)]; + + if (!marketToJoin.isListed) { + // market is not listed, cannot join + return Error.MARKET_NOT_LISTED; + } + + if (marketToJoin.accountMembership[borrower] == true) { + // already joined + return Error.NO_ERROR; + } + + // survived the gauntlet, add to list + // NOTE: we store these somewhat redundantly as a significant optimization + // this avoids having to iterate through the list for the most common use cases + // that is, only when we need to perform liquidity checks + // and not whenever we want to check if an account is in a particular market + marketToJoin.accountMembership[borrower] = true; + accountAssets[borrower].push(mToken); + + emit MarketEntered(mToken, borrower); + + return Error.NO_ERROR; + } + + /** + * @notice Removes asset from sender's account liquidity calculation + * @dev Sender must not have an outstanding borrow balance in the asset, + * or be providing necessary collateral for an outstanding borrow. + * @param mTokenAddress The address of the asset to be removed + * @return Whether or not the account successfully exited the market + */ + function exitMarket( + address mTokenAddress + ) external override returns (uint) { + MToken mToken = MToken(mTokenAddress); + /* Get sender tokensHeld and amountOwed underlying from the mToken */ + (uint oErr, uint tokensHeld, uint amountOwed, ) = mToken + .getAccountSnapshot(msg.sender); + require(oErr == 0, "exitMarket: getAccountSnapshot failed"); // semi-opaque error code + + /* Fail if the sender has a borrow balance */ + if (amountOwed != 0) { + return + fail( + Error.NONZERO_BORROW_BALANCE, + FailureInfo.EXIT_MARKET_BALANCE_OWED + ); + } + + /* Fail if the sender is not permitted to redeem all of their tokens */ + uint allowed = redeemAllowedInternal( + mTokenAddress, + msg.sender, + tokensHeld + ); + if (allowed != 0) { + return + failOpaque( + Error.REJECTION, + FailureInfo.EXIT_MARKET_REJECTION, + allowed + ); + } + + Market storage marketToExit = markets[address(mToken)]; + + /* Return true if the sender is not already ‘in’ the market */ + if (!marketToExit.accountMembership[msg.sender]) { + return uint(Error.NO_ERROR); + } + + /* Set mToken account membership to false */ + delete marketToExit.accountMembership[msg.sender]; + + /* Delete mToken from the account’s list of assets */ + // load into memory for faster iteration + MToken[] memory userAssetList = accountAssets[msg.sender]; + uint len = userAssetList.length; + uint assetIndex = len; + for (uint i = 0; i < len; i++) { + if (userAssetList[i] == mToken) { + assetIndex = i; + break; + } + } + + // We *must* have found the asset in the list or our redundant data structure is broken + assert(assetIndex < len); + + // copy last item in list to location of item to be removed, reduce length by 1 + MToken[] storage storedList = accountAssets[msg.sender]; + storedList[assetIndex] = storedList[storedList.length - 1]; + storedList.pop(); + + emit MarketExited(mToken, msg.sender); + + return uint(Error.NO_ERROR); + } + + /*** Policy Hooks ***/ + + /** + * @notice Checks if the account should be allowed to mint tokens in the given market + * @param mToken The market to verify the mint against + * @param minter The account which would get the minted tokens + * @param mintAmount The amount of underlying being supplied to the market in exchange for tokens + * @return 0 if the mint is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol) + */ + function mintAllowed( + address mToken, + address minter, + uint mintAmount + ) external override returns (uint) { + // Pausing is a very serious situation - we revert to sound the alarms + require(!mintGuardianPaused[mToken], "mint is paused"); + + // Shh - currently unused + mintAmount; + + if (!markets[mToken].isListed) { + return uint(Error.MARKET_NOT_LISTED); + } + + uint supplyCap = supplyCaps[mToken]; + // Supply cap of 0 corresponds to unlimited supplying + if (supplyCap != 0) { + uint totalCash = MToken(mToken).getCash(); + uint totalBorrows = MToken(mToken).totalBorrows(); + uint totalReserves = MToken(mToken).totalReserves(); + // totalSupplies = totalCash + totalBorrows - totalReserves + uint totalSupplies = sub_( + add_(totalCash, totalBorrows), + totalReserves + ); + + uint nextTotalSupplies = add_(totalSupplies, mintAmount); + require(nextTotalSupplies < supplyCap, "market supply cap reached"); + } + + // Keep the flywheel moving + updateAndDistributeSupplierRewardsForToken(mToken, minter); + return uint(Error.NO_ERROR); + } + + /** + * @notice Checks if the account should be allowed to redeem tokens in the given market + * @param mToken The market to verify the redeem against + * @param redeemer The account which would redeem the tokens + * @param redeemTokens The number of mTokens to exchange for the underlying asset in the market + * @return 0 if the redeem is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol) + */ + function redeemAllowed( + address mToken, + address redeemer, + uint redeemTokens + ) external override returns (uint) { + uint allowed = redeemAllowedInternal(mToken, redeemer, redeemTokens); + if (allowed != uint(Error.NO_ERROR)) { + return allowed; + } + + // Keep the flywheel moving + updateAndDistributeSupplierRewardsForToken(mToken, redeemer); + + return uint(Error.NO_ERROR); + } + + function redeemAllowedInternal( + address mToken, + address redeemer, + uint redeemTokens + ) internal view returns (uint) { + if (!markets[mToken].isListed) { + return uint(Error.MARKET_NOT_LISTED); + } + + /* If the redeemer is not 'in' the market, then we can bypass the liquidity check */ + if (!markets[mToken].accountMembership[redeemer]) { + return uint(Error.NO_ERROR); + } + + /* Otherwise, perform a hypothetical liquidity check to guard against shortfall */ + (Error err, , uint shortfall) = getHypotheticalAccountLiquidityInternal( + redeemer, + MToken(mToken), + redeemTokens, + 0 + ); + if (err != Error.NO_ERROR) { + return uint(err); + } + if (shortfall > 0) { + return uint(Error.INSUFFICIENT_LIQUIDITY); + } + + return uint(Error.NO_ERROR); + } + + /** + * @notice Validates redeem and reverts on rejection. May emit logs. + * @param mToken Asset being redeemed + * @param redeemer The address redeeming the tokens + * @param redeemAmount The amount of the underlying asset being redeemed + * @param redeemTokens The number of tokens being redeemed + */ + function redeemVerify( + address mToken, + address redeemer, + uint redeemAmount, + uint redeemTokens + ) external pure override { + // Shh - currently unused + mToken; + redeemer; + + // Require tokens is zero or amount is also zero + if (redeemTokens == 0 && redeemAmount > 0) { + revert("redeemTokens zero"); + } + } + + /** + * @notice Checks if the account should be allowed to borrow the underlying asset of the given market + * @param mToken The market to verify the borrow against + * @param borrower The account which would borrow the asset + * @param borrowAmount The amount of underlying the account would borrow + * @return 0 if the borrow is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol) + */ + function borrowAllowed( + address mToken, + address borrower, + uint borrowAmount + ) external override returns (uint) { + // Pausing is a very serious situation - we revert to sound the alarms + require(!borrowGuardianPaused[mToken], "borrow is paused"); + + if (!markets[mToken].isListed) { + return uint(Error.MARKET_NOT_LISTED); + } + + if (!markets[mToken].accountMembership[borrower]) { + // only mTokens may call borrowAllowed if borrower not in market + require(msg.sender == mToken, "sender must be mToken"); + + // attempt to add borrower to the market + Error addToMarketErr = addToMarketInternal( + MToken(msg.sender), + borrower + ); + if (addToMarketErr != Error.NO_ERROR) { + return uint(addToMarketErr); + } + + // it should be impossible to break the important invariant + assert(markets[mToken].accountMembership[borrower]); + } + + if (oracle.getUnderlyingPrice(MToken(mToken)) == 0) { + return uint(Error.PRICE_ERROR); + } + + uint borrowCap = borrowCaps[mToken]; + // Borrow cap of 0 corresponds to unlimited borrowing + if (borrowCap != 0) { + uint totalBorrows = MToken(mToken).totalBorrows(); + uint nextTotalBorrows = add_(totalBorrows, borrowAmount); + require(nextTotalBorrows < borrowCap, "market borrow cap reached"); + } + + (Error err, , uint shortfall) = getHypotheticalAccountLiquidityInternal( + borrower, + MToken(mToken), + 0, + borrowAmount + ); + if (err != Error.NO_ERROR) { + return uint(err); + } + if (shortfall > 0) { + return uint(Error.INSUFFICIENT_LIQUIDITY); + } + + // Keep the flywheel moving + updateAndDistributeBorrowerRewardsForToken(mToken, borrower); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Checks if the account should be allowed to repay a borrow in the given market + * @param mToken The market to verify the repay against + * @param payer The account which would repay the asset + * @param borrower The account which would borrowed the asset + * @param repayAmount The amount of the underlying asset the account would repay + * @return 0 if the repay is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol) + */ + function repayBorrowAllowed( + address mToken, + address payer, + address borrower, + uint repayAmount + ) external override returns (uint) { + // Shh - currently unused + payer; + borrower; + repayAmount; + + if (!markets[mToken].isListed) { + return uint(Error.MARKET_NOT_LISTED); + } + + // Keep the flywheel moving + updateAndDistributeBorrowerRewardsForToken(mToken, borrower); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Checks if the liquidation should be allowed to occur + * @param mTokenBorrowed Asset which was borrowed by the borrower + * @param mTokenCollateral Asset which was used as collateral and will be seized + * @param liquidator The address repaying the borrow and seizing the collateral + * @param borrower The address of the borrower + * @param repayAmount The amount of underlying being repaid + */ + function liquidateBorrowAllowed( + address mTokenBorrowed, + address mTokenCollateral, + address liquidator, + address borrower, + uint repayAmount + ) external view override returns (uint) { + // Shh - currently unused + liquidator; + + if ( + !markets[mTokenBorrowed].isListed || + !markets[mTokenCollateral].isListed + ) { + return uint(Error.MARKET_NOT_LISTED); + } + + /* The borrower must have shortfall in order to be liquidatable */ + (Error err, , uint shortfall) = getAccountLiquidityInternal(borrower); + if (err != Error.NO_ERROR) { + return uint(err); + } + if (shortfall == 0) { + return uint(Error.INSUFFICIENT_SHORTFALL); + } + + /* The liquidator may not repay more than what is allowed by the closeFactor */ + uint borrowBalance = MToken(mTokenBorrowed).borrowBalanceStored( + borrower + ); + uint maxClose = mul_ScalarTruncate( + Exp({mantissa: closeFactorMantissa}), + borrowBalance + ); + if (repayAmount > maxClose) { + return uint(Error.TOO_MUCH_REPAY); + } + + return uint(Error.NO_ERROR); + } + + /** + * @notice Checks if the seizing of assets should be allowed to occur + * @param mTokenCollateral Asset which was used as collateral and will be seized + * @param mTokenBorrowed Asset which was borrowed by the borrower + * @param liquidator The address repaying the borrow and seizing the collateral + * @param borrower The address of the borrower + * @param seizeTokens The number of collateral tokens to seize + */ + function seizeAllowed( + address mTokenCollateral, + address mTokenBorrowed, + address liquidator, + address borrower, + uint seizeTokens + ) external override returns (uint) { + // Pausing is a very serious situation - we revert to sound the alarms + require(!seizeGuardianPaused, "seize is paused"); + + // Shh - currently unused + seizeTokens; + + if ( + !markets[mTokenCollateral].isListed || + !markets[mTokenBorrowed].isListed + ) { + return uint(Error.MARKET_NOT_LISTED); + } + + if ( + MToken(mTokenCollateral).comptroller() != + MToken(mTokenBorrowed).comptroller() + ) { + return uint(Error.COMPTROLLER_MISMATCH); + } + + // Keep the flywheel moving + // Note: We don't update borrower indices here because as part of liquidations + // repayBorrowFresh is called, which in turn calls `borrowAllow`, which updates + // the liquidated borrower's indices. + updateAndDistributeSupplierRewardsForToken(mTokenCollateral, borrower); + updateAndDistributeSupplierRewardsForToken( + mTokenCollateral, + liquidator + ); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Checks if the account should be allowed to transfer tokens in the given market + * @param mToken The market to verify the transfer against + * @param src The account which sources the tokens + * @param dst The account which receives the tokens + * @param transferTokens The number of mTokens to transfer + * @return 0 if the transfer is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol) + */ + function transferAllowed( + address mToken, + address src, + address dst, + uint transferTokens + ) external override returns (uint) { + // Pausing is a very serious situation - we revert to sound the alarms + require(!transferGuardianPaused, "transfer is paused"); + + // Currently the only consideration is whether or not + // the src is allowed to redeem this many tokens + uint allowed = redeemAllowedInternal(mToken, src, transferTokens); + if (allowed != uint(Error.NO_ERROR)) { + return allowed; + } + + // Keep the flywheel moving + updateAndDistributeSupplierRewardsForToken(mToken, src); + updateAndDistributeSupplierRewardsForToken(mToken, dst); + + return uint(Error.NO_ERROR); + } + + /*** Liquidity/Liquidation Calculations ***/ + + /** + * @dev Local vars for avoiding stack-depth limits in calculating account liquidity. + * Note that `mTokenBalance` is the number of mTokens the account owns in the market, + * whereas `borrowBalance` is the amount of underlying that the account has borrowed. + */ + struct AccountLiquidityLocalVars { + uint sumCollateral; + uint sumBorrowPlusEffects; + uint mTokenBalance; + uint borrowBalance; + uint exchangeRateMantissa; + uint oraclePriceMantissa; + Exp collateralFactor; + Exp exchangeRate; + Exp oraclePrice; + Exp tokensToDenom; + } + + /** + * @notice Determine the current account liquidity wrt collateral requirements + * @return (possible error code (semi-opaque), + account liquidity in excess of collateral requirements, + * account shortfall below collateral requirements) + */ + function getAccountLiquidity( + address account + ) public view returns (uint, uint, uint) { + ( + Error err, + uint liquidity, + uint shortfall + ) = getHypotheticalAccountLiquidityInternal( + account, + MToken(address(0)), + 0, + 0 + ); + + return (uint(err), liquidity, shortfall); + } + + /** + * @notice Determine the current account liquidity wrt collateral requirements + * @return (possible error code, + account liquidity in excess of collateral requirements, + * account shortfall below collateral requirements) + */ + function getAccountLiquidityInternal( + address account + ) internal view returns (Error, uint, uint) { + return + getHypotheticalAccountLiquidityInternal( + account, + MToken(address(0)), + 0, + 0 + ); + } + + /** + * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed + * @param mTokenModify The market to hypothetically redeem/borrow in + * @param account The account to determine liquidity for + * @param redeemTokens The number of tokens to hypothetically redeem + * @param borrowAmount The amount of underlying to hypothetically borrow + * @return (possible error code (semi-opaque), + hypothetical account liquidity in excess of collateral requirements, + * hypothetical account shortfall below collateral requirements) + */ + function getHypotheticalAccountLiquidity( + address account, + address mTokenModify, + uint redeemTokens, + uint borrowAmount + ) public view returns (uint, uint, uint) { + ( + Error err, + uint liquidity, + uint shortfall + ) = getHypotheticalAccountLiquidityInternal( + account, + MToken(mTokenModify), + redeemTokens, + borrowAmount + ); + return (uint(err), liquidity, shortfall); + } + + /** + * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed + * @param mTokenModify The market to hypothetically redeem/borrow in + * @param account The account to determine liquidity for + * @param redeemTokens The number of tokens to hypothetically redeem + * @param borrowAmount The amount of underlying to hypothetically borrow + * @dev Note that we calculate the exchangeRateStored for each collateral mToken using stored data, + * without calculating accumulated interest. + * @return (possible error code, + hypothetical account liquidity in excess of collateral requirements, + * hypothetical account shortfall below collateral requirements) + */ + function getHypotheticalAccountLiquidityInternal( + address account, + MToken mTokenModify, + uint redeemTokens, + uint borrowAmount + ) internal view returns (Error, uint, uint) { + AccountLiquidityLocalVars memory vars; // Holds all our calculation results + uint oErr; + + // For each asset the account is in + MToken[] memory assets = accountAssets[account]; + for (uint i = 0; i < assets.length; i++) { + MToken asset = assets[i]; + + // Read the balances and exchange rate from the mToken + ( + oErr, + vars.mTokenBalance, + vars.borrowBalance, + vars.exchangeRateMantissa + ) = asset.getAccountSnapshot(account); + if (oErr != 0) { + // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades + return (Error.SNAPSHOT_ERROR, 0, 0); + } + vars.collateralFactor = Exp({ + mantissa: markets[address(asset)].collateralFactorMantissa + }); + vars.exchangeRate = Exp({mantissa: vars.exchangeRateMantissa}); + + // Get the normalized price of the asset + vars.oraclePriceMantissa = oracle.getUnderlyingPrice(asset); + if (vars.oraclePriceMantissa == 0) { + return (Error.PRICE_ERROR, 0, 0); + } + vars.oraclePrice = Exp({mantissa: vars.oraclePriceMantissa}); + + // Pre-compute a conversion factor from tokens -> glmr (normalized price value) + vars.tokensToDenom = mul_( + mul_(vars.collateralFactor, vars.exchangeRate), + vars.oraclePrice + ); + + // sumCollateral += tokensToDenom * mTokenBalance + vars.sumCollateral = mul_ScalarTruncateAddUInt( + vars.tokensToDenom, + vars.mTokenBalance, + vars.sumCollateral + ); + + // sumBorrowPlusEffects += oraclePrice * borrowBalance + vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt( + vars.oraclePrice, + vars.borrowBalance, + vars.sumBorrowPlusEffects + ); + + // Calculate effects of interacting with mTokenModify + if (asset == mTokenModify) { + // redeem effect + // sumBorrowPlusEffects += tokensToDenom * redeemTokens + vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt( + vars.tokensToDenom, + redeemTokens, + vars.sumBorrowPlusEffects + ); + + // borrow effect + // sumBorrowPlusEffects += oraclePrice * borrowAmount + vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt( + vars.oraclePrice, + borrowAmount, + vars.sumBorrowPlusEffects + ); + } + } + + // These are safe, as the underflow condition is checked first + if (vars.sumCollateral > vars.sumBorrowPlusEffects) { + return ( + Error.NO_ERROR, + vars.sumCollateral - vars.sumBorrowPlusEffects, + 0 + ); + } else { + return ( + Error.NO_ERROR, + 0, + vars.sumBorrowPlusEffects - vars.sumCollateral + ); + } + } + + /** + * @notice Calculate number of tokens of collateral asset to seize given an underlying amount + * @dev Used in liquidation (called in mToken.liquidateBorrowFresh) + * @param mTokenBorrowed The address of the borrowed mToken + * @param mTokenCollateral The address of the collateral mToken + * @param actualRepayAmount The amount of mTokenBorrowed underlying to convert into mTokenCollateral tokens + * @return (errorCode, number of mTokenCollateral tokens to be seized in a liquidation) + */ + function liquidateCalculateSeizeTokens( + address mTokenBorrowed, + address mTokenCollateral, + uint actualRepayAmount + ) external view override returns (uint, uint) { + /* Read oracle prices for borrowed and collateral markets */ + uint priceBorrowedMantissa = oracle.getUnderlyingPrice( + MToken(mTokenBorrowed) + ); + uint priceCollateralMantissa = oracle.getUnderlyingPrice( + MToken(mTokenCollateral) + ); + if (priceBorrowedMantissa == 0 || priceCollateralMantissa == 0) { + return (uint(Error.PRICE_ERROR), 0); + } + + /* + * Get the exchange rate and calculate the number of collateral tokens to seize: + * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral + * seizeTokens = seizeAmount / exchangeRate + * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate) + */ + uint exchangeRateMantissa = MToken(mTokenCollateral) + .exchangeRateStored(); // Note: reverts on error + uint seizeTokens; + Exp memory numerator; + Exp memory denominator; + Exp memory ratio; + + numerator = mul_( + Exp({mantissa: liquidationIncentiveMantissa}), + Exp({mantissa: priceBorrowedMantissa}) + ); + denominator = mul_( + Exp({mantissa: priceCollateralMantissa}), + Exp({mantissa: exchangeRateMantissa}) + ); + ratio = div_(numerator, denominator); + + seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount); + + return (uint(Error.NO_ERROR), seizeTokens); + } + + /*** Admin Functions ***/ + + /** + * @notice Sets a new price oracle for the comptroller + * @dev Admin function to set a new price oracle + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function _setPriceOracle(PriceOracle newOracle) public returns (uint) { + // Check caller is admin + if (msg.sender != admin) { + return + fail( + Error.UNAUTHORIZED, + FailureInfo.SET_PRICE_ORACLE_OWNER_CHECK + ); + } + + // Track the old oracle for the comptroller + PriceOracle oldOracle = oracle; + + // Set comptroller's oracle to newOracle + oracle = newOracle; + + // Emit NewPriceOracle(oldOracle, newOracle) + emit NewPriceOracle(oldOracle, newOracle); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Sets the closeFactor used when liquidating borrows + * @dev Admin function to set closeFactor + * @param newCloseFactorMantissa New close factor, scaled by 1e18 + * @return uint 0=success, otherwise a failure + */ + function _setCloseFactor( + uint newCloseFactorMantissa + ) external returns (uint) { + // Check caller is admin + require(msg.sender == admin, "only admin can set close factor"); + + uint oldCloseFactorMantissa = closeFactorMantissa; + closeFactorMantissa = newCloseFactorMantissa; + emit NewCloseFactor(oldCloseFactorMantissa, closeFactorMantissa); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Sets the collateralFactor for a market + * @dev Admin function to set per-market collateralFactor + * @param mToken The market to set the factor on + * @param newCollateralFactorMantissa The new collateral factor, scaled by 1e18 + * @return uint 0=success, otherwise a failure. (See ErrorReporter for details) + */ + function _setCollateralFactor( + MToken mToken, + uint newCollateralFactorMantissa + ) external returns (uint) { + // Check caller is admin + if (msg.sender != admin) { + return + fail( + Error.UNAUTHORIZED, + FailureInfo.SET_COLLATERAL_FACTOR_OWNER_CHECK + ); + } + + // Verify market is listed + Market storage market = markets[address(mToken)]; + if (!market.isListed) { + return + fail( + Error.MARKET_NOT_LISTED, + FailureInfo.SET_COLLATERAL_FACTOR_NO_EXISTS + ); + } + + Exp memory newCollateralFactorExp = Exp({ + mantissa: newCollateralFactorMantissa + }); + + // Check collateral factor <= 0.9 + Exp memory highLimit = Exp({mantissa: collateralFactorMaxMantissa}); + if (lessThanExp(highLimit, newCollateralFactorExp)) { + return + fail( + Error.INVALID_COLLATERAL_FACTOR, + FailureInfo.SET_COLLATERAL_FACTOR_VALIDATION + ); + } + + // If collateral factor != 0, fail if price == 0 + if ( + newCollateralFactorMantissa != 0 && + oracle.getUnderlyingPrice(mToken) == 0 + ) { + return + fail( + Error.PRICE_ERROR, + FailureInfo.SET_COLLATERAL_FACTOR_WITHOUT_PRICE + ); + } + + // Set market's collateral factor to new collateral factor, remember old value + uint oldCollateralFactorMantissa = market.collateralFactorMantissa; + market.collateralFactorMantissa = newCollateralFactorMantissa; + + // Emit event with asset, old collateral factor, and new collateral factor + emit NewCollateralFactor( + mToken, + oldCollateralFactorMantissa, + newCollateralFactorMantissa + ); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Sets liquidationIncentive + * @dev Admin function to set liquidationIncentive + * @param newLiquidationIncentiveMantissa New liquidationIncentive scaled by 1e18 + * @return uint 0=success, otherwise a failure. (See ErrorReporter for details) + */ + function _setLiquidationIncentive( + uint newLiquidationIncentiveMantissa + ) external returns (uint) { + // Check caller is admin + if (msg.sender != admin) { + return + fail( + Error.UNAUTHORIZED, + FailureInfo.SET_LIQUIDATION_INCENTIVE_OWNER_CHECK + ); + } + + // Save current value for use in log + uint oldLiquidationIncentiveMantissa = liquidationIncentiveMantissa; + + // Set liquidation incentive to new incentive + liquidationIncentiveMantissa = newLiquidationIncentiveMantissa; + + // Emit event with old incentive, new incentive + emit NewLiquidationIncentive( + oldLiquidationIncentiveMantissa, + newLiquidationIncentiveMantissa + ); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Add the market to the markets mapping and set it as listed + * @dev Admin function to set isListed and add support for the market + * @param mToken The address of the market (token) to list + * @return uint 0=success, otherwise a failure. (See enum Error for details) + */ + function _supportMarket(MToken mToken) external returns (uint) { + if (msg.sender != admin) { + return + fail( + Error.UNAUTHORIZED, + FailureInfo.SUPPORT_MARKET_OWNER_CHECK + ); + } + + if (markets[address(mToken)].isListed) { + return + fail( + Error.MARKET_ALREADY_LISTED, + FailureInfo.SUPPORT_MARKET_EXISTS + ); + } + + require(mToken.isMToken(), "Must be an MToken"); // Sanity check to make sure its really a MToken + + Market storage newMarket = markets[address(mToken)]; + newMarket.isListed = true; + newMarket.collateralFactorMantissa = 0; + + _addMarketInternal(address(mToken)); + + emit MarketListed(mToken); + + return uint(Error.NO_ERROR); + } + + function _addMarketInternal(address mToken) internal { + for (uint i = 0; i < allMarkets.length; i++) { + require(allMarkets[i] != MToken(mToken), "market already added"); + } + allMarkets.push(MToken(mToken)); + } + + /** + * @notice Set the given borrow caps for the given mToken markets. Borrowing that brings total borrows to or above borrow cap will revert. + * @dev Admin or borrowCapGuardian function to set the borrow caps. A borrow cap of 0 corresponds to unlimited borrowing. + * @param mTokens The addresses of the markets (tokens) to change the borrow caps for + * @param newBorrowCaps The new borrow cap values in underlying to be set. A value of 0 corresponds to unlimited borrowing. + */ + function _setMarketBorrowCaps( + MToken[] calldata mTokens, + uint[] calldata newBorrowCaps + ) external { + require( + msg.sender == admin || msg.sender == borrowCapGuardian, + "only admin or borrow cap guardian can set borrow caps" + ); + + uint numMarkets = mTokens.length; + uint numBorrowCaps = newBorrowCaps.length; + + require( + numMarkets != 0 && numMarkets == numBorrowCaps, + "invalid input" + ); + + for (uint i = 0; i < numMarkets; i++) { + borrowCaps[address(mTokens[i])] = newBorrowCaps[i]; + emit NewBorrowCap(mTokens[i], newBorrowCaps[i]); + } + } + + /** + * @notice Admin function to change the Borrow Cap Guardian + * @param newBorrowCapGuardian The address of the new Borrow Cap Guardian + */ + function _setBorrowCapGuardian(address newBorrowCapGuardian) external { + require(msg.sender == admin, "only admin can set borrow cap guardian"); + + // Save current value for inclusion in log + address oldBorrowCapGuardian = borrowCapGuardian; + + // Store borrowCapGuardian with value newBorrowCapGuardian + borrowCapGuardian = newBorrowCapGuardian; + + // Emit NewBorrowCapGuardian(OldBorrowCapGuardian, NewBorrowCapGuardian) + emit NewBorrowCapGuardian(oldBorrowCapGuardian, newBorrowCapGuardian); + } + + /** + * @notice Set the given supply caps for the given mToken markets. Supplying that brings total supplies to or above supply cap will revert. + * @dev Admin or supplyCapGuardian function to set the supply caps. A supply cap of 0 corresponds to unlimited supplying. + * @param mTokens The addresses of the markets (tokens) to change the supply caps for + * @param newSupplyCaps The new supply cap values in underlying to be set. A value of 0 corresponds to unlimited supplying. + */ + function _setMarketSupplyCaps( + MToken[] calldata mTokens, + uint[] calldata newSupplyCaps + ) external { + require( + msg.sender == admin || msg.sender == supplyCapGuardian, + "only admin or supply cap guardian can set supply caps" + ); + + uint numMarkets = mTokens.length; + uint numSupplyCaps = newSupplyCaps.length; + + require( + numMarkets != 0 && numMarkets == numSupplyCaps, + "invalid input" + ); + + for (uint i = 0; i < numMarkets; i++) { + supplyCaps[address(mTokens[i])] = newSupplyCaps[i]; + emit NewSupplyCap(mTokens[i], newSupplyCaps[i]); + } + } + + /** + * @notice Admin function to change the Supply Cap Guardian + * @param newSupplyCapGuardian The address of the new Supply Cap Guardian + */ + function _setSupplyCapGuardian(address newSupplyCapGuardian) external { + require(msg.sender == admin, "only admin can set supply cap guardian"); + + // Save current value for inclusion in log + address oldSupplyCapGuardian = supplyCapGuardian; + + // Store supplyCapGuardian with value newSupplyCapGuardian + supplyCapGuardian = newSupplyCapGuardian; + + // Emit NewSupplyCapGuardian(OldSupplyCapGuardian, NewSupplyCapGuardian) + emit NewSupplyCapGuardian(oldSupplyCapGuardian, newSupplyCapGuardian); + } + + /** + * @notice Admin function to change the Pause Guardian + * @param newPauseGuardian The address of the new Pause Guardian + * @return uint 0=success, otherwise a failure. (See enum Error for details) + */ + function _setPauseGuardian(address newPauseGuardian) public returns (uint) { + if (msg.sender != admin) { + return + fail( + Error.UNAUTHORIZED, + FailureInfo.SET_PAUSE_GUARDIAN_OWNER_CHECK + ); + } + + // Save current value for inclusion in log + address oldPauseGuardian = pauseGuardian; + + // Store pauseGuardian with value newPauseGuardian + pauseGuardian = newPauseGuardian; + + // Emit NewPauseGuardian(OldPauseGuardian, NewPauseGuardian) + emit NewPauseGuardian(oldPauseGuardian, pauseGuardian); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Admin function to change the Reward Distributor + * @param newRewardDistributor The address of the new Reward Distributor + */ + function _setRewardDistributor( + MultiRewardDistributor newRewardDistributor + ) public { + require(msg.sender == admin, "Unauthorized"); + + MultiRewardDistributor oldRewardDistributor = rewardDistributor; + + rewardDistributor = newRewardDistributor; + + emit NewRewardDistributor(oldRewardDistributor, newRewardDistributor); + } + + function _setMintPaused(MToken mToken, bool state) public returns (bool) { + require( + markets[address(mToken)].isListed, + "cannot pause a market that is not listed" + ); + require( + msg.sender == pauseGuardian || msg.sender == admin, + "only pause guardian and admin can pause" + ); + require(msg.sender == admin || state == true, "only admin can unpause"); + + mintGuardianPaused[address(mToken)] = state; + emit ActionPaused(mToken, "Mint", state); + return state; + } + + function _setBorrowPaused(MToken mToken, bool state) public returns (bool) { + require( + markets[address(mToken)].isListed, + "cannot pause a market that is not listed" + ); + require( + msg.sender == pauseGuardian || msg.sender == admin, + "only pause guardian and admin can pause" + ); + require(msg.sender == admin || state == true, "only admin can unpause"); + + borrowGuardianPaused[address(mToken)] = state; + emit ActionPaused(mToken, "Borrow", state); + return state; + } + + function _setTransferPaused(bool state) public returns (bool) { + require( + msg.sender == pauseGuardian || msg.sender == admin, + "only pause guardian and admin can pause" + ); + require(msg.sender == admin || state == true, "only admin can unpause"); + + transferGuardianPaused = state; + emit ActionPaused("Transfer", state); + return state; + } + + function _setSeizePaused(bool state) public returns (bool) { + require( + msg.sender == pauseGuardian || msg.sender == admin, + "only pause guardian and admin can pause" + ); + require(msg.sender == admin || state == true, "only admin can unpause"); + + seizeGuardianPaused = state; + emit ActionPaused("Seize", state); + return state; + } + + function _become(Unitroller unitroller) public { + require( + msg.sender == unitroller.admin(), + "only unitroller admin can change brains" + ); + require( + unitroller._acceptImplementation() == 0, + "change not authorized" + ); + } + + /** + * @notice Sweep ERC-20 tokens from the comptroller to the admin + * @param _tokenAddress The address of the token to transfer + * @param _amount The amount of tokens to sweep, uint.max means everything + */ + function _rescueFunds(address _tokenAddress, uint _amount) external { + require(msg.sender == admin, "Unauthorized"); + + IERC20 token = IERC20(_tokenAddress); + // Similar to mTokens, if this is uint.max that means "transfer everything" + if (_amount == type(uint).max) { + token.transfer(admin, token.balanceOf(address(this))); + } else { + token.transfer(admin, _amount); + } + } + + /*** WELL Distribution ***/ + + /** + * @notice Call out to the reward distributor to update its supply index and this user's index too + * @param mToken The market to synchronize indexes for + * @param supplier The supplier to whom rewards are going + */ + function updateAndDistributeSupplierRewardsForToken( + address mToken, + address supplier + ) internal { + if (address(rewardDistributor) != address(0)) { + rewardDistributor.updateMarketSupplyIndexAndDisburseSupplierRewards( + MToken(mToken), + supplier, + false + ); + } + } + + /** + * @notice Call out to the reward distributor to update its borrow index and this user's index too + * @param mToken The market to synchronize indexes for + * @param borrower The borrower to whom rewards are going + */ + function updateAndDistributeBorrowerRewardsForToken( + address mToken, + address borrower + ) internal { + if (address(rewardDistributor) != address(0)) { + rewardDistributor.updateMarketBorrowIndexAndDisburseBorrowerRewards( + MToken(mToken), + borrower, + false + ); + } + } + + /** + * @notice Claim all the WELL accrued by holder in all markets + */ + function claimReward() public { + claimReward(msg.sender, allMarkets); + } + + /** + * @notice Claim all the rewards accrued by specified holder in all markets + * @param holder The address to claim rewards for + */ + function claimReward(address holder) public { + claimReward(holder, allMarkets); + } + + /** + * @notice Claim all the rewards accrued by holder in the specified markets + * @param holder The address to claim rewards for + * @param mTokens The list of markets to claim rewards in + */ + function claimReward(address holder, MToken[] memory mTokens) public { + address[] memory holders = new address[](1); + holders[0] = holder; + claimReward(holders, mTokens, true, true); + } + + /** + * @notice Claim all rewards for a specified group of users, tokens, and market sides + * @param holders The addresses to claim for + * @param mTokens The list of markets to claim in + * @param borrowers Whether or not to claim earned by borrowing + * @param suppliers Whether or not to claim earned by supplying + */ + function claimReward( + address[] memory holders, + MToken[] memory mTokens, + bool borrowers, + bool suppliers + ) public { + require( + address(rewardDistributor) != address(0), + "No reward distributor configured!" + ); + + for (uint i = 0; i < mTokens.length; i++) { + // Safety check that the supplied mTokens are active/listed + MToken mToken = mTokens[i]; + require(markets[address(mToken)].isListed, "market must be listed"); + + // Disburse supply side + if (suppliers == true) { + rewardDistributor.updateMarketSupplyIndex(mToken); + for ( + uint holderIndex = 0; + holderIndex < holders.length; + holderIndex++ + ) { + rewardDistributor.disburseSupplierRewards( + mToken, + holders[holderIndex], + true + ); + } + } + + // Disburse borrow side + if (borrowers == true) { + rewardDistributor.updateMarketBorrowIndex(mToken); + for ( + uint holderIndex = 0; + holderIndex < holders.length; + holderIndex++ + ) { + rewardDistributor.disburseBorrowerRewards( + mToken, + holders[holderIndex], + true + ); + } + } + } + } + + /** + * @notice Return all of the markets + * @dev The automatic getter may be used to access an individual market. + * @return The list of market addresses + */ + function getAllMarkets() public view returns (MToken[] memory) { + return allMarkets; + } + + function getBlockTimestamp() public view returns (uint) { + return block.timestamp; + } + + /** + * @dev Prevents a contract from calling itself, directly or indirectly. + * Calling a `nonReentrant` function from another `nonReentrant` + * function is not supported. It is possible to prevent this from happening + * by making the `nonReentrant` function external, and make it call a + * `private` function that does the actual work. + */ + modifier nonReentrant() { + // On the first call to nonReentrant, _notEntered will be true + require(_locked != 1, "ReentrancyGuard: reentrant call"); + + // Any calls to nonReentrant after this point will fail + _locked = 1; + + _; + + // By storing the original value once again, a refund is triggered (see + // https://eips.ethereum.org/EIPS/eip-2200) + _locked = 0; + } +} diff --git a/plan/agw/research/preset-catalog-2026-10-15/EigenStrategyManager.sol b/plan/agw/research/preset-catalog-2026-10-15/EigenStrategyManager.sol new file mode 100644 index 00000000..02f6717e --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/EigenStrategyManager.sol @@ -0,0 +1,573 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.27; + +import "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol"; +import "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol"; +import "@openzeppelin-upgrades/contracts/security/ReentrancyGuardUpgradeable.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; + +import "../mixins/SignatureUtilsMixin.sol"; +import "../interfaces/IEigenPodManager.sol"; +import "../permissions/Pausable.sol"; +import "./StrategyManagerStorage.sol"; + +/** + * @title The primary entry- and exit-point for funds into and out of EigenLayer. + * @author Layr Labs, Inc. + * @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service + * @notice This contract is for managing deposits in different strategies. The main + * functionalities are: + * - adding and removing strategies that any delegator can deposit into + * - enabling deposit of assets into specified strategy(s) + */ +contract StrategyManager is + Initializable, + OwnableUpgradeable, + ReentrancyGuardUpgradeable, + Pausable, + StrategyManagerStorage, + SignatureUtilsMixin +{ + using OperatorSetLib for *; + using SlashingLib for *; + using SafeERC20 for IERC20; + using EnumerableMap for EnumerableMap.AddressToUintMap; + using EnumerableSet for EnumerableSet.Bytes32Set; + using EnumerableSet for EnumerableSet.UintSet; + + modifier onlyStrategyWhitelister() { + require(msg.sender == strategyWhitelister, OnlyStrategyWhitelister()); + _; + } + + modifier onlyStrategiesWhitelistedForDeposit( + IStrategy strategy + ) { + require(strategyIsWhitelistedForDeposit[strategy], StrategyNotWhitelisted()); + _; + } + + modifier onlyDelegationManager() { + require(msg.sender == address(delegation), OnlyDelegationManager()); + _; + } + + /** + * @param _delegation The delegation contract of EigenLayer. + */ + constructor( + IAllocationManager _allocationManager, + IDelegationManager _delegation, + IPauserRegistry _pauserRegistry, + string memory _version + ) StrategyManagerStorage(_allocationManager, _delegation) Pausable(_pauserRegistry) SignatureUtilsMixin(_version) { + _disableInitializers(); + } + + // EXTERNAL FUNCTIONS + + /** + * @notice Initializes the strategy manager contract. Sets the `pauserRegistry` (currently **not** modifiable after being set), + * and transfers contract ownership to the specified `initialOwner`. + * @param initialOwner Ownership of this contract is transferred to this address. + * @param initialStrategyWhitelister The initial value of `strategyWhitelister` to set. + */ + function initialize( + address initialOwner, + address initialStrategyWhitelister, + uint256 initialPausedStatus + ) external initializer { + _setPausedStatus(initialPausedStatus); + _transferOwnership(initialOwner); + _setStrategyWhitelister(initialStrategyWhitelister); + } + + /// @inheritdoc IStrategyManager + function depositIntoStrategy( + IStrategy strategy, + IERC20 token, + uint256 amount + ) external onlyWhenNotPaused(PAUSED_DEPOSITS) nonReentrant returns (uint256 depositShares) { + depositShares = _depositIntoStrategy(msg.sender, strategy, token, amount); + } + + /// @inheritdoc IStrategyManager + function depositIntoStrategyWithSignature( + IStrategy strategy, + IERC20 token, + uint256 amount, + address staker, + uint256 expiry, + bytes memory signature + ) external onlyWhenNotPaused(PAUSED_DEPOSITS) nonReentrant returns (uint256 depositShares) { + // Cache staker's nonce to avoid sloads. + uint256 nonce = nonces[staker]; + // Assert that the signature is valid. + _checkIsValidSignatureNow({ + signer: staker, + signableDigest: calculateStrategyDepositDigestHash(staker, strategy, token, amount, nonce, expiry), + signature: signature, + expiry: expiry + }); + // Increment the nonce for the staker. + unchecked { + nonces[staker] = nonce + 1; + } + // deposit the tokens (from the `msg.sender`) and credit the new shares to the `staker` + depositShares = _depositIntoStrategy(staker, strategy, token, amount); + } + + /// @inheritdoc IShareManager + function removeDepositShares( + address staker, + IStrategy strategy, + uint256 depositSharesToRemove + ) external onlyDelegationManager nonReentrant returns (uint256) { + return _removeDepositShares(staker, strategy, depositSharesToRemove); + } + + /// @inheritdoc IShareManager + function addShares( + address staker, + IStrategy strategy, + uint256 shares + ) external onlyDelegationManager nonReentrant returns (uint256, uint256) { + return _addShares(staker, strategy, shares); + } + + /// @inheritdoc IShareManager + function withdrawSharesAsTokens( + address staker, + IStrategy strategy, + IERC20 token, + uint256 shares + ) external onlyDelegationManager nonReentrant { + strategy.withdraw(staker, token, shares); + } + + /// @inheritdoc IShareManager + function increaseBurnOrRedistributableShares( + OperatorSet calldata operatorSet, + uint256 slashId, + IStrategy strategy, + uint256 sharesToBurn + ) external onlyDelegationManager nonReentrant { + // Create storage pointer for readability. + EnumerableMap.AddressToUintMap storage burnOrRedistributableShares = + _burnOrRedistributableShares[operatorSet.key()][slashId]; + + // Sanity check that the strategy is not already in the slash's burn or redistributable shares. + // This should never happen because the `AllocationManager` ensures that strategies for a given slash are unique. + // Add the shares to the operator set's burn or redistributable shares. + require(burnOrRedistributableShares.set(address(strategy), sharesToBurn), StrategyAlreadyInSlash()); + + // NOTE: Duplicate operator sets and slash ids will not revert, but will not be added. + _pendingOperatorSets.add(operatorSet.key()); + _pendingSlashIds[operatorSet.key()].add(slashId); + + emit BurnOrRedistributableSharesIncreased(operatorSet, slashId, strategy, sharesToBurn); + } + + /// @inheritdoc IStrategyManager + function clearBurnOrRedistributableShares( + OperatorSet calldata operatorSet, + uint256 slashId + ) external nonReentrant returns (uint256[] memory) { + // Get the strategies to clear. + address[] memory strategies = _burnOrRedistributableShares[operatorSet.key()][slashId].keys(); + uint256 length = strategies.length; + uint256[] memory amounts = new uint256[](length); + + // Note: We don't need to iterate backwards since we're indexing into the `EnumerableMap` directly. + for (uint256 i = 0; i < length; ++i) { + amounts[i] = _clearBurnOrRedistributableShares({ + operatorSet: operatorSet, + slashId: slashId, + strategy: IStrategy(strategies[i]), + recipient: allocationManager.getRedistributionRecipient(operatorSet) + }); + } + + return amounts; + } + + /// @inheritdoc IStrategyManager + function clearBurnOrRedistributableSharesByStrategy( + OperatorSet calldata operatorSet, + uint256 slashId, + IStrategy strategy + ) external nonReentrant returns (uint256) { + return _clearBurnOrRedistributableShares({ + operatorSet: operatorSet, + slashId: slashId, + strategy: strategy, + recipient: allocationManager.getRedistributionRecipient(operatorSet) + }); + } + + /// @inheritdoc IStrategyManager + function burnShares( + IStrategy strategy + ) external nonReentrant { + (, uint256 sharesToBurn) = EnumerableMap.tryGet(burnableShares, address(strategy)); + EnumerableMap.remove(burnableShares, address(strategy)); + emit BurnableSharesDecreased(strategy, sharesToBurn); + + // Burning acts like withdrawing, except that the destination is to the burn address. + // If we have no shares to burn, we don't need to call the strategy. + if (sharesToBurn != 0) { + strategy.withdraw(DEFAULT_BURN_ADDRESS, strategy.underlyingToken(), sharesToBurn); + } + } + + /// @inheritdoc IStrategyManager + function setStrategyWhitelister( + address newStrategyWhitelister + ) external onlyOwner nonReentrant { + _setStrategyWhitelister(newStrategyWhitelister); + } + + /// @inheritdoc IStrategyManager + function addStrategiesToDepositWhitelist( + IStrategy[] calldata strategiesToWhitelist + ) external onlyStrategyWhitelister nonReentrant { + uint256 strategiesToWhitelistLength = strategiesToWhitelist.length; + for (uint256 i = 0; i < strategiesToWhitelistLength; ++i) { + // change storage and emit event only if strategy is not already in whitelist + if (!strategyIsWhitelistedForDeposit[strategiesToWhitelist[i]]) { + strategyIsWhitelistedForDeposit[strategiesToWhitelist[i]] = true; + emit StrategyAddedToDepositWhitelist(strategiesToWhitelist[i]); + } + } + } + + /// @inheritdoc IStrategyManager + function removeStrategiesFromDepositWhitelist( + IStrategy[] calldata strategiesToRemoveFromWhitelist + ) external onlyStrategyWhitelister nonReentrant { + uint256 strategiesToRemoveFromWhitelistLength = strategiesToRemoveFromWhitelist.length; + for (uint256 i = 0; i < strategiesToRemoveFromWhitelistLength; ++i) { + // change storage and emit event only if strategy is already in whitelist + if (strategyIsWhitelistedForDeposit[strategiesToRemoveFromWhitelist[i]]) { + strategyIsWhitelistedForDeposit[strategiesToRemoveFromWhitelist[i]] = false; + emit StrategyRemovedFromDepositWhitelist(strategiesToRemoveFromWhitelist[i]); + } + } + } + + // INTERNAL FUNCTIONS + + /** + * @notice This function adds `shares` for a given `strategy` to the `staker` and runs through the necessary update logic. + * @param staker The address to add shares to + * @param strategy The Strategy in which the `staker` is receiving shares + * @param shares The amount of shares to grant to the `staker` + * @dev In particular, this function calls `delegation.increaseDelegatedShares(staker, strategy, shares)` to ensure that all + * delegated shares are tracked, increases the stored share amount in `stakerDepositShares[staker][strategy]`, and adds `strategy` + * to the `staker`'s list of strategies, if it is not in the list already. + */ + function _addShares(address staker, IStrategy strategy, uint256 shares) internal returns (uint256, uint256) { + // sanity checks on inputs + require(staker != address(0), StakerAddressZero()); + require(shares != 0, SharesAmountZero()); + + uint256 prevDepositShares = stakerDepositShares[staker][strategy]; + + // if they dont have prevDepositShares of this strategy, add it to their strats + if (prevDepositShares == 0) { + require(stakerStrategyList[staker].length < MAX_STAKER_STRATEGY_LIST_LENGTH, MaxStrategiesExceeded()); + stakerStrategyList[staker].push(strategy); + } + + // add the returned depositedShares to their existing shares for this strategy + stakerDepositShares[staker][strategy] = prevDepositShares + shares; + + emit Deposit(staker, strategy, shares); + return (prevDepositShares, shares); + } + + /** + * @notice Internal function in which `amount` of ERC20 `token` is transferred from `msg.sender` to the Strategy-type contract + * `strategy`, with the resulting shares credited to `staker`. + * @param staker The address that will be credited with the new shares. + * @param strategy The Strategy contract to deposit into. + * @param token The ERC20 token to deposit. + * @param amount The amount of `token` to deposit. + * @return shares The amount of *new* shares in `strategy` that have been credited to the `staker`. + */ + function _depositIntoStrategy( + address staker, + IStrategy strategy, + IERC20 token, + uint256 amount + ) internal onlyStrategiesWhitelistedForDeposit(strategy) returns (uint256 shares) { + // transfer tokens from the sender to the strategy + token.safeTransferFrom(msg.sender, address(strategy), amount); + + // deposit the assets into the specified strategy and get the equivalent amount of shares in that strategy + shares = strategy.deposit(token, amount); + + // add the returned shares to the staker's existing shares for this strategy + (uint256 prevDepositShares, uint256 addedShares) = _addShares(staker, strategy, shares); + + // Increase shares delegated to operator + delegation.increaseDelegatedShares({ + staker: staker, + strategy: strategy, + prevDepositShares: prevDepositShares, + addedShares: addedShares + }); + + return shares; + } + + /** + * @notice Decreases the shares that `staker` holds in `strategy` by `depositSharesToRemove`. + * @param staker The address to decrement shares from + * @param strategy The strategy for which the `staker`'s shares are being decremented + * @param depositSharesToRemove The amount of deposit shares to decrement + * @dev If the amount of shares represents all of the staker`s shares in said strategy, + * then the strategy is removed from stakerStrategyList[staker] and 'true' is returned. Otherwise 'false' is returned. + * Also returns the user's updated deposit shares after decrement. + */ + function _removeDepositShares( + address staker, + IStrategy strategy, + uint256 depositSharesToRemove + ) internal returns (uint256) { + // sanity checks on inputs + require(depositSharesToRemove != 0, SharesAmountZero()); + + //check that the user has sufficient shares + uint256 userDepositShares = stakerDepositShares[staker][strategy]; + + // This check technically shouldn't actually ever revert because depositSharesToRemove is already + // checked to not exceed max amount of shares when the withdrawal was queued in the DelegationManager + require(depositSharesToRemove <= userDepositShares, SharesAmountTooHigh()); + userDepositShares = userDepositShares - depositSharesToRemove; + + // subtract the shares from the staker's existing shares for this strategy + stakerDepositShares[staker][strategy] = userDepositShares; + + // if no existing shares, remove the strategy from the staker's dynamic array of strategies + if (userDepositShares == 0) { + _removeStrategyFromStakerStrategyList(staker, strategy); + } + + return userDepositShares; + } + + /** + * @notice Removes `strategy` from `staker`'s dynamic array of strategies, i.e. from `stakerStrategyList[staker]` + * @param staker The user whose array will have an entry removed + * @param strategy The Strategy to remove from `stakerStrategyList[staker]` + */ + function _removeStrategyFromStakerStrategyList(address staker, IStrategy strategy) internal { + //loop through all of the strategies, find the right one, then replace + uint256 stratsLength = stakerStrategyList[staker].length; + uint256 j = 0; + for (; j < stratsLength; ++j) { + if (stakerStrategyList[staker][j] == strategy) { + //replace the strategy with the last strategy in the list + stakerStrategyList[staker][j] = stakerStrategyList[staker][stakerStrategyList[staker].length - 1]; + break; + } + } + // if we didn't find the strategy, revert + require(j != stratsLength, StrategyNotFound()); + // pop off the last entry in the list of strategies + stakerStrategyList[staker].pop(); + } + + /** + * @notice Clears burn/redistributable shares and sends underlying tokens to recipient. + * @param operatorSet The operator set to clear the shares for. + * @param slashId The slash id to clear the shares for. + * @param strategy The strategy to clear the shares for. + * @param recipient The recipient to withdraw the shares to. + */ + function _clearBurnOrRedistributableShares( + OperatorSet calldata operatorSet, + uint256 slashId, + IStrategy strategy, + address recipient + ) internal returns (uint256) { + EnumerableMap.AddressToUintMap storage burnOrRedistributableShares = + _burnOrRedistributableShares[operatorSet.key()][slashId]; + + (, uint256 sharesToRemove) = burnOrRedistributableShares.tryGet(address(strategy)); + burnOrRedistributableShares.remove(address(strategy)); + + uint256 amountOut; + if (sharesToRemove != 0) { + // Withdraw the shares to the burn address. + amountOut = IStrategy(strategy).withdraw({ + recipient: recipient, + token: IStrategy(strategy).underlyingToken(), + amountShares: sharesToRemove + }); + + // Emit an event to notify the that burnable shares have been decreased. + emit BurnOrRedistributableSharesDecreased(operatorSet, slashId, strategy, sharesToRemove); + } + + uint256 remainingStrategies = burnOrRedistributableShares.keys().length; + + // If there are no more strategies to burn or redistribute... + if (remainingStrategies == 0) { + // Remove the slash id from the pending slash ids. + _pendingSlashIds[operatorSet.key()].remove(slashId); + + // If there are no more pending slash ids for this operator set, remove the operator set from the pending operator sets. + if (_pendingSlashIds[operatorSet.key()].length() == 0) { + _pendingOperatorSets.remove(operatorSet.key()); + } + } + + return amountOut; + } + + /** + * @notice Internal function for modifying the `strategyWhitelister`. Used inside of the `setStrategyWhitelister` and `initialize` functions. + * @param newStrategyWhitelister The new address for the `strategyWhitelister` to take. + */ + function _setStrategyWhitelister( + address newStrategyWhitelister + ) internal { + emit StrategyWhitelisterChanged(strategyWhitelister, newStrategyWhitelister); + strategyWhitelister = newStrategyWhitelister; + } + + // VIEW FUNCTIONS + + /// @inheritdoc IStrategyManager + function getDeposits( + address staker + ) external view returns (IStrategy[] memory, uint256[] memory) { + uint256 strategiesLength = stakerStrategyList[staker].length; + uint256[] memory depositedShares = new uint256[](strategiesLength); + + for (uint256 i = 0; i < strategiesLength; ++i) { + depositedShares[i] = stakerDepositShares[staker][stakerStrategyList[staker][i]]; + } + return (stakerStrategyList[staker], depositedShares); + } + + function getStakerStrategyList( + address staker + ) external view returns (IStrategy[] memory) { + return stakerStrategyList[staker]; + } + + /// @inheritdoc IStrategyManager + function stakerStrategyListLength( + address staker + ) external view returns (uint256) { + return stakerStrategyList[staker].length; + } + + /// @inheritdoc IStrategyManager + function calculateStrategyDepositDigestHash( + address staker, + IStrategy strategy, + IERC20 token, + uint256 amount, + uint256 nonce, + uint256 expiry + ) public view returns (bytes32) { + /// forgefmt: disable-next-item + return _calculateSignableDigest( + keccak256( + abi.encode( + DEPOSIT_TYPEHASH, + staker, + strategy, + token, + amount, + nonce, + expiry + ) + ) + ); + } + + /// @inheritdoc IStrategyManager + function getBurnOrRedistributableShares( + OperatorSet calldata operatorSet, + uint256 slashId + ) external view returns (IStrategy[] memory, uint256[] memory) { + // Store the data structure for readability + EnumerableMap.AddressToUintMap storage burnOrRedistributableShares = + _burnOrRedistributableShares[operatorSet.key()][slashId]; + + address[] memory keys = burnOrRedistributableShares.keys(); + IStrategy[] memory strategies = new IStrategy[](keys.length); + uint256[] memory shares = new uint256[](keys.length); + + for (uint256 i = 0; i < keys.length; ++i) { + strategies[i] = IStrategy(keys[i]); + (, shares[i]) = burnOrRedistributableShares.tryGet(keys[i]); + } + + return (strategies, shares); + } + + /// @inheritdoc IStrategyManager + function getBurnOrRedistributableShares( + OperatorSet calldata operatorSet, + uint256 slashId, + IStrategy strategy + ) external view returns (uint256) { + (, uint256 shares) = _burnOrRedistributableShares[operatorSet.key()][slashId].tryGet(address(strategy)); + return shares; + } + + /// @inheritdoc IStrategyManager + function getBurnOrRedistributableCount( + OperatorSet calldata operatorSet, + uint256 slashId + ) external view returns (uint256) { + return _burnOrRedistributableShares[operatorSet.key()][slashId].length(); + } + + /// @inheritdoc IStrategyManager + function getBurnableShares( + IStrategy strategy + ) external view returns (uint256) { + (, uint256 shares) = EnumerableMap.tryGet(burnableShares, address(strategy)); + return shares; + } + + /// @inheritdoc IStrategyManager + function getStrategiesWithBurnableShares() external view returns (address[] memory, uint256[] memory) { + uint256 totalEntries = EnumerableMap.length(burnableShares); + + address[] memory strategies = new address[](totalEntries); + uint256[] memory shares = new uint256[](totalEntries); + + for (uint256 i = 0; i < totalEntries; i++) { + (address strategy, uint256 shareAmount) = EnumerableMap.at(burnableShares, i); + strategies[i] = strategy; + shares[i] = shareAmount; + } + + return (strategies, shares); + } + + /// @inheritdoc IStrategyManager + function getPendingOperatorSets() external view returns (OperatorSet[] memory) { + uint256 totalEntries = _pendingOperatorSets.length(); + OperatorSet[] memory operatorSets = new OperatorSet[](totalEntries); + for (uint256 i = 0; i < totalEntries; i++) { + operatorSets[i] = _pendingOperatorSets.at(i).decode(); + } + return operatorSets; + } + + /// @inheritdoc IStrategyManager + function getPendingSlashIds( + OperatorSet calldata operatorSet + ) external view returns (uint256[] memory) { + return _pendingSlashIds[operatorSet.key()].values(); + } +} diff --git a/plan/agw/research/preset-catalog-2026-10-15/IPool.sol b/plan/agw/research/preset-catalog-2026-10-15/IPool.sol new file mode 100644 index 00000000..2f2b88e7 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/IPool.sol @@ -0,0 +1,848 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {IPoolAddressesProvider} from './IPoolAddressesProvider.sol'; +import {DataTypes} from '../protocol/libraries/types/DataTypes.sol'; + +/** + * @title IPool + * @author Aave + * @notice Defines the basic interface for an Aave Pool. + */ +interface IPool { + /** + * @dev Emitted on supply() + * @param reserve The address of the underlying asset of the reserve + * @param user The address initiating the supply + * @param onBehalfOf The beneficiary of the supply, receiving the aTokens + * @param amount The amount supplied + * @param referralCode The referral code used + */ + event Supply( + address indexed reserve, + address user, + address indexed onBehalfOf, + uint256 amount, + uint16 indexed referralCode + ); + + /** + * @dev Emitted on withdraw() + * @param reserve The address of the underlying asset being withdrawn + * @param user The address initiating the withdrawal, owner of aTokens + * @param to The address that will receive the underlying + * @param amount The amount to be withdrawn + */ + event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount); + + /** + * @dev Emitted on borrow() and flashLoan() when debt needs to be opened + * @param reserve The address of the underlying asset being borrowed + * @param user The address of the user initiating the borrow(), receiving the funds on borrow() or just + * initiator of the transaction on flashLoan() + * @param onBehalfOf The address that will be getting the debt + * @param amount The amount borrowed out + * @param interestRateMode The rate mode: 2 for Variable, 1 is deprecated (changed on v3.2.0) + * @param borrowRate The numeric rate at which the user has borrowed, expressed in ray + * @param referralCode The referral code used + */ + event Borrow( + address indexed reserve, + address user, + address indexed onBehalfOf, + uint256 amount, + DataTypes.InterestRateMode interestRateMode, + uint256 borrowRate, + uint16 indexed referralCode + ); + + /** + * @dev Emitted on repay() + * @param reserve The address of the underlying asset of the reserve + * @param user The beneficiary of the repayment, getting his debt reduced + * @param repayer The address of the user initiating the repay(), providing the funds + * @param amount The amount repaid + * @param useATokens True if the repayment is done using aTokens, `false` if done with underlying asset directly + */ + event Repay( + address indexed reserve, + address indexed user, + address indexed repayer, + uint256 amount, + bool useATokens + ); + + /** + * @dev Emitted when the user selects a certain asset category for eMode + * @param user The address of the user + * @param categoryId The category id + */ + event UserEModeSet(address indexed user, uint8 categoryId); + + /** + * @dev Emitted on setUserUseReserveAsCollateral() + * @param reserve The address of the underlying asset of the reserve + * @param user The address of the user enabling the usage as collateral + */ + event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user); + + /** + * @dev Emitted on setUserUseReserveAsCollateral() + * @param reserve The address of the underlying asset of the reserve + * @param user The address of the user enabling the usage as collateral + */ + event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user); + + /** + * @dev Emitted on flashLoan() + * @param target The address of the flash loan receiver contract + * @param initiator The address initiating the flash loan + * @param asset The address of the asset being flash borrowed + * @param amount The amount flash borrowed + * @param interestRateMode The flashloan mode: 0 for regular flashloan, + * 1 for Stable (Deprecated on v3.2.0), 2 for Variable + * @param premium The fee flash borrowed + * @param referralCode The referral code used + */ + event FlashLoan( + address indexed target, + address initiator, + address indexed asset, + uint256 amount, + DataTypes.InterestRateMode interestRateMode, + uint256 premium, + uint16 indexed referralCode + ); + + /** + * @dev Emitted when a borrower is liquidated. + * @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation + * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation + * @param user The address of the borrower getting liquidated + * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover + * @param liquidatedCollateralAmount The amount of collateral received by the liquidator + * @param liquidator The address of the liquidator + * @param receiveAToken True if the liquidators wants to receive the collateral aTokens, `false` if he wants + * to receive the underlying collateral asset directly + */ + event LiquidationCall( + address indexed collateralAsset, + address indexed debtAsset, + address indexed user, + uint256 debtToCover, + uint256 liquidatedCollateralAmount, + address liquidator, + bool receiveAToken + ); + + /** + * @dev Emitted when the state of a reserve is updated. + * @param reserve The address of the underlying asset of the reserve + * @param liquidityRate The next liquidity rate + * @param stableBorrowRate The next stable borrow rate @note deprecated on v3.2.0 + * @param variableBorrowRate The next variable borrow rate + * @param liquidityIndex The next liquidity index + * @param variableBorrowIndex The next variable borrow index + */ + event ReserveDataUpdated( + address indexed reserve, + uint256 liquidityRate, + uint256 stableBorrowRate, + uint256 variableBorrowRate, + uint256 liquidityIndex, + uint256 variableBorrowIndex + ); + + /** + * @dev Emitted when the deficit of a reserve is covered. + * @param reserve The address of the underlying asset of the reserve + * @param caller The caller that triggered the DeficitCovered event + * @param amountCovered The amount of deficit covered + */ + event DeficitCovered(address indexed reserve, address caller, uint256 amountCovered); + + /** + * @dev Emitted when the protocol treasury receives minted aTokens from the accrued interest. + * @param reserve The address of the reserve + * @param amountMinted The amount minted to the treasury + */ + event MintedToTreasury(address indexed reserve, uint256 amountMinted); + + /** + * @dev Emitted when deficit is realized on a liquidation. + * @param user The user address where the bad debt will be burned + * @param debtAsset The address of the underlying borrowed asset to be burned + * @param amountCreated The amount of deficit created + */ + event DeficitCreated(address indexed user, address indexed debtAsset, uint256 amountCreated); + + /** + * @dev Emitted when a position manager is approved by the user. + * @param user The user address + * @param positionManager The address of the position manager + */ + event PositionManagerApproved(address indexed user, address indexed positionManager); + + /** + * @dev Emitted when a position manager is revoked by the user. + * @param user The user address + * @param positionManager The address of the position manager + */ + event PositionManagerRevoked(address indexed user, address indexed positionManager); + + /** + * @notice Supplies an `amount` of underlying asset into the reserve, receiving in return overlying aTokens. + * - E.g. User supplies 100 USDC and gets in return 100 aUSDC + * @param asset The address of the underlying asset to supply + * @param amount The amount to be supplied + * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user + * wants to receive them on his own wallet, or a different address if the beneficiary of aTokens + * is a different wallet + * @param referralCode Code used to register the integrator originating the operation, for potential rewards. + * 0 if the action is executed directly by the user, without any middle-man + */ + function supply(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external; + + /** + * @notice Supply with transfer approval of asset to be supplied done via permit function + * see: https://eips.ethereum.org/EIPS/eip-2612 and https://eips.ethereum.org/EIPS/eip-713 + * @param asset The address of the underlying asset to supply + * @param amount The amount to be supplied + * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user + * wants to receive them on his own wallet, or a different address if the beneficiary of aTokens + * is a different wallet + * @param deadline The deadline timestamp that the permit is valid + * @param referralCode Code used to register the integrator originating the operation, for potential rewards. + * 0 if the action is executed directly by the user, without any middle-man + * @param permitV The V parameter of ERC712 permit sig + * @param permitR The R parameter of ERC712 permit sig + * @param permitS The S parameter of ERC712 permit sig + */ + function supplyWithPermit( + address asset, + uint256 amount, + address onBehalfOf, + uint16 referralCode, + uint256 deadline, + uint8 permitV, + bytes32 permitR, + bytes32 permitS + ) external; + + /** + * @notice Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned + * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC + * @param asset The address of the underlying asset to withdraw + * @param amount The underlying amount to be withdrawn + * - Send the value type(uint256).max in order to withdraw the whole aToken balance + * @param to The address that will receive the underlying, same as msg.sender if the user + * wants to receive it on his own wallet, or a different address if the beneficiary is a + * different wallet + * @return The final amount withdrawn + */ + function withdraw(address asset, uint256 amount, address to) external returns (uint256); + + /** + * @notice Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower + * already supplied enough collateral, or he was given enough allowance by a credit delegator on the VariableDebtToken + * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet + * and 100 variable debt tokens + * @param asset The address of the underlying asset to borrow + * @param amount The amount to be borrowed + * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 + * @param referralCode The code used to register the integrator originating the operation, for potential rewards. + * 0 if the action is executed directly by the user, without any middle-man + * @param onBehalfOf The address of the user who will receive the debt. Should be the address of the borrower itself + * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator + * if he has been given credit delegation allowance + */ + function borrow( + address asset, + uint256 amount, + uint256 interestRateMode, + uint16 referralCode, + address onBehalfOf + ) external; + + /** + * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned + * - E.g. User repays 100 USDC, burning 100 variable debt tokens of the `onBehalfOf` address + * @param asset The address of the borrowed underlying asset previously borrowed + * @param amount The amount to repay + * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` + * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 + * @param onBehalfOf The address of the user who will get his debt reduced/removed. Should be the address of the + * user calling the function if he wants to reduce/remove his own debt, or the address of any other + * other borrower whose debt should be removed + * @return The final amount repaid + */ + function repay( + address asset, + uint256 amount, + uint256 interestRateMode, + address onBehalfOf + ) external returns (uint256); + + /** + * @notice Repay with transfer approval of asset to be repaid done via permit function + * see: https://eips.ethereum.org/EIPS/eip-2612 and https://eips.ethereum.org/EIPS/eip-713 + * @param asset The address of the borrowed underlying asset previously borrowed + * @param amount The amount to repay + * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` + * @param interestRateMode 2 for Variable, 1 is deprecated on v3.2.0 + * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the + * user calling the function if he wants to reduce/remove his own debt, or the address of any other + * other borrower whose debt should be removed + * @param deadline The deadline timestamp that the permit is valid + * @param permitV The V parameter of ERC712 permit sig + * @param permitR The R parameter of ERC712 permit sig + * @param permitS The S parameter of ERC712 permit sig + * @return The final amount repaid + */ + function repayWithPermit( + address asset, + uint256 amount, + uint256 interestRateMode, + address onBehalfOf, + uint256 deadline, + uint8 permitV, + bytes32 permitR, + bytes32 permitS + ) external returns (uint256); + + /** + * @notice Repays a borrowed `amount` on a specific reserve using the reserve aTokens, burning the + * equivalent debt tokens + * - E.g. User repays 100 USDC using 100 aUSDC, burning 100 variable debt tokens + * @dev Passing uint256.max as amount will clean up any residual aToken dust balance, if the user aToken + * balance is not enough to cover the whole debt + * @param asset The address of the borrowed underlying asset previously borrowed + * @param amount The amount to repay + * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` + * @param interestRateMode DEPRECATED in v3.2.0 + * @return The final amount repaid + */ + function repayWithATokens( + address asset, + uint256 amount, + uint256 interestRateMode + ) external returns (uint256); + + /** + * @notice Allows suppliers to enable/disable a specific supplied asset as collateral + * @param asset The address of the underlying asset supplied + * @param useAsCollateral True if the user wants to use the supply as collateral, false otherwise + */ + function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external; + + /** + * @notice Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1 + * - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives + * a proportionally amount of the `collateralAsset` plus a bonus to cover market risk + * @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation + * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation + * @param borrower The address of the borrower getting liquidated + * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover + * @param receiveAToken True if the liquidators wants to receive the collateral aTokens, `false` if he wants + * to receive the underlying collateral asset directly + */ + function liquidationCall( + address collateralAsset, + address debtAsset, + address borrower, + uint256 debtToCover, + bool receiveAToken + ) external; + + /** + * @notice Allows smartcontracts to access the liquidity of the pool within one transaction, + * as long as the amount taken plus a fee is returned. + * @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept + * into consideration. For further details please visit https://docs.aave.com/developers/ + * @param receiverAddress The address of the contract receiving the funds, implementing IFlashLoanReceiver interface + * @param assets The addresses of the assets being flash-borrowed + * @param amounts The amounts of the assets being flash-borrowed + * @param interestRateModes Types of the debt to open if the flash loan is not returned: + * 0 -> Don't open any debt, just revert if funds can't be transferred from the receiver + * 1 -> Deprecated on v3.2.0 + * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address + * @param onBehalfOf The address that will receive the debt in the case of using 2 on `modes` + * @param params Variadic packed params to pass to the receiver as extra information + * @param referralCode The code used to register the integrator originating the operation, for potential rewards. + * 0 if the action is executed directly by the user, without any middle-man + */ + function flashLoan( + address receiverAddress, + address[] calldata assets, + uint256[] calldata amounts, + uint256[] calldata interestRateModes, + address onBehalfOf, + bytes calldata params, + uint16 referralCode + ) external; + + /** + * @notice Allows smartcontracts to access the liquidity of the pool within one transaction, + * as long as the amount taken plus a fee is returned. + * @dev IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept + * into consideration. For further details please visit https://docs.aave.com/developers/ + * @param receiverAddress The address of the contract receiving the funds, implementing IFlashLoanSimpleReceiver interface + * @param asset The address of the asset being flash-borrowed + * @param amount The amount of the asset being flash-borrowed + * @param params Variadic packed params to pass to the receiver as extra information + * @param referralCode The code used to register the integrator originating the operation, for potential rewards. + * 0 if the action is executed directly by the user, without any middle-man + */ + function flashLoanSimple( + address receiverAddress, + address asset, + uint256 amount, + bytes calldata params, + uint16 referralCode + ) external; + + /** + * @notice Returns the user account data across all the reserves + * @param user The address of the user + * @return totalCollateralBase The total collateral of the user in the base currency used by the price feed + * @return totalDebtBase The total debt of the user in the base currency used by the price feed + * @return availableBorrowsBase The borrowing power left of the user in the base currency used by the price feed + * @return currentLiquidationThreshold The liquidation threshold of the user + * @return ltv The loan to value of The user + * @return healthFactor The current health factor of the user + */ + function getUserAccountData( + address user + ) + external + view + returns ( + uint256 totalCollateralBase, + uint256 totalDebtBase, + uint256 availableBorrowsBase, + uint256 currentLiquidationThreshold, + uint256 ltv, + uint256 healthFactor + ); + + /** + * @notice Initializes a reserve, activating it, assigning an aToken and debt tokens + * @dev Only callable by the PoolConfigurator contract + * @param asset The address of the underlying asset of the reserve + * @param aTokenAddress The address of the aToken that will be assigned to the reserve + * @param variableDebtAddress The address of the VariableDebtToken that will be assigned to the reserve + */ + function initReserve(address asset, address aTokenAddress, address variableDebtAddress) external; + + /** + * @notice Accumulates interest to all indexes of the reserve + * @dev Only callable by the PoolConfigurator contract + * @dev To be used when required by the configurator, for example when updating interest rates strategy data + * @param asset The address of the underlying asset of the reserve + */ + function syncIndexesState(address asset) external; + + /** + * @notice Updates interest rates on the reserve data + * @dev Only callable by the PoolConfigurator contract + * @dev To be used when required by the configurator, for example when updating interest rates strategy data + * @param asset The address of the underlying asset of the reserve + */ + function syncRatesState(address asset) external; + + /** + * @notice Sets the configuration bitmap of the reserve as a whole + * @dev Only callable by the PoolConfigurator contract + * @param asset The address of the underlying asset of the reserve + * @param configuration The new configuration bitmap + */ + function setConfiguration( + address asset, + DataTypes.ReserveConfigurationMap calldata configuration + ) external; + + /** + * @notice Returns the configuration of the reserve + * @param asset The address of the underlying asset of the reserve + * @return The configuration of the reserve + */ + function getConfiguration( + address asset + ) external view returns (DataTypes.ReserveConfigurationMap memory); + + /** + * @notice Returns the configuration of the user across all the reserves + * @param user The user address + * @return The configuration of the user + */ + function getUserConfiguration( + address user + ) external view returns (DataTypes.UserConfigurationMap memory); + + /** + * @notice Returns the normalized income of the reserve + * @param asset The address of the underlying asset of the reserve + * @return The reserve's normalized income + */ + function getReserveNormalizedIncome(address asset) external view returns (uint256); + + /** + * @notice Returns the normalized variable debt per unit of asset + * @dev WARNING: This function is intended to be used primarily by the protocol itself to get a + * "dynamic" variable index based on time, current stored index and virtual rate at the current + * moment (approx. a borrower would get if opening a position). This means that is always used in + * combination with variable debt supply/balances. + * If using this function externally, consider that is possible to have an increasing normalized + * variable debt that is not equivalent to how the variable debt index would be updated in storage + * (e.g. only updates with non-zero variable debt supply) + * @param asset The address of the underlying asset of the reserve + * @return The reserve normalized variable debt + */ + function getReserveNormalizedVariableDebt(address asset) external view returns (uint256); + + /** + * @notice Returns the state and configuration of the reserve + * @param asset The address of the underlying asset of the reserve + * @return The state and configuration data of the reserve + */ + function getReserveData(address asset) external view returns (DataTypes.ReserveDataLegacy memory); + + /** + * @notice Returns the virtual underlying balance of the reserve + * @param asset The address of the underlying asset of the reserve + * @return The reserve virtual underlying balance + */ + function getVirtualUnderlyingBalance(address asset) external view returns (uint128); + + /** + * @notice Validates and finalizes an aToken transfer + * @dev Only callable by the overlying aToken of the `asset` + * @param asset The address of the underlying asset of the aToken + * @param from The user from which the aTokens are transferred + * @param to The user receiving the aTokens + * @param scaledAmount The scaled amount being transferred/withdrawn + * @param scaledBalanceFromBefore The aToken scaled balance of the `from` user before the transfer + */ + function finalizeTransfer( + address asset, + address from, + address to, + uint256 scaledAmount, + uint256 scaledBalanceFromBefore + ) external; + + /** + * @notice Returns the list of the underlying assets of all the initialized reserves + * @dev It does not include dropped reserves + * @return The addresses of the underlying assets of the initialized reserves + */ + function getReservesList() external view returns (address[] memory); + + /** + * @notice Returns the number of initialized reserves + * @dev It includes dropped reserves + * @return The count + */ + function getReservesCount() external view returns (uint256); + + /** + * @notice Returns the address of the underlying asset of a reserve by the reserve id as stored in the DataTypes.ReserveData struct + * @param id The id of the reserve as stored in the DataTypes.ReserveData struct + * @return The address of the reserve associated with id + */ + function getReserveAddressById(uint16 id) external view returns (address); + + /** + * @notice Returns the PoolAddressesProvider connected to this contract + * @return The address of the PoolAddressesProvider + */ + function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider); + + /** + * @notice Returns the ReserveInterestRateStrategy connected to all the reserves + * @return The address of the ReserveInterestRateStrategy contract + */ + function RESERVE_INTEREST_RATE_STRATEGY() external view returns (address); + + /** + * @notice Updates flash loan premium. All this premium is collected by the protocol treasury. + * @dev The premium is calculated on the total borrowed amount + * @dev Only callable by the PoolConfigurator contract + * @param flashLoanPremium The flash loan premium, expressed in bps + */ + function updateFlashloanPremium(uint128 flashLoanPremium) external; + + /** + * @notice Configures a new or alters an existing collateral configuration of an eMode. + * @dev In eMode, the protocol allows very high borrowing power to borrow assets of the same category. + * The category 0 is reserved as it's the default for volatile assets + * @param id The id of the category + * @param config The configuration of the category + */ + function configureEModeCategory( + uint8 id, + DataTypes.EModeCategoryBaseConfiguration memory config + ) external; + + /** + * @notice Replaces the current eMode collateralBitmap. + * @param id The id of the category + * @param collateralBitmap The collateralBitmap of the category + */ + function configureEModeCategoryCollateralBitmap(uint8 id, uint128 collateralBitmap) external; + + /** + * @notice Replaces the current eMode borrowableBitmap. + * @param id The id of the category + * @param borrowableBitmap The borrowableBitmap of the category + */ + function configureEModeCategoryBorrowableBitmap(uint8 id, uint128 borrowableBitmap) external; + + /** + * @notice Replaces the current eMode ltvzeroBitmap. + * @param id The id of the category + * @param ltvzeroBitmap The ltvzeroBitmap of the category + */ + function configureEModeCategoryLtvzeroBitmap(uint8 id, uint128 ltvzeroBitmap) external; + + /** + * @notice Sets the isolated flag of an eMode category. + * @param id The id of the category + * @param isolated True if the eMode should be isolated + */ + function configureEModeCategoryIsolated(uint8 id, bool isolated) external; + + /** + * @notice Returns the data of an eMode category + * @dev DEPRECATED use independent getters instead + * @param id The id of the category + * @return The configuration data of the category + */ + function getEModeCategoryData( + uint8 id + ) external view returns (DataTypes.EModeCategoryLegacy memory); + + /** + * @notice Returns the label of an eMode category + * @dev This function is deprecated and will be removed in a future version. + * @custom:deprecated + * @param id The id of the category + * @return The label of the category + */ + function getEModeCategoryLabel(uint8 id) external view returns (string memory); + + /** + * @notice Returns the collateral config of an eMode category + * @param id The id of the category + * @return The ltv,lt,lb of the category + */ + function getEModeCategoryCollateralConfig( + uint8 id + ) external view returns (DataTypes.CollateralConfig memory); + + /** + * @notice Returns the collateralBitmap of an eMode category + * @param id The id of the category + * @return The collateralBitmap of the category + */ + function getEModeCategoryCollateralBitmap(uint8 id) external view returns (uint128); + + /** + * @notice Returns the borrowableBitmap of an eMode category + * @param id The id of the category + * @return The borrowableBitmap of the category + */ + function getEModeCategoryBorrowableBitmap(uint8 id) external view returns (uint128); + + /** + * @notice Returns the ltvzero of an eMode category + * @param id The id of the category + * @return The ltvzeroBitmap of the category + */ + function getEModeCategoryLtvzeroBitmap(uint8 id) external view returns (uint128); + + /** + * @notice Returns the isolated flag of an eMode category + * @param id The id of the category + * @return True if the eMode category is isolated + */ + function getIsEModeCategoryIsolated(uint8 id) external view returns (bool); + + /** + * @notice Allows a user to use the protocol in eMode + * @param categoryId The id of the category + */ + function setUserEMode(uint8 categoryId) external; + + /** + * @notice Returns the eMode the user is using + * @param user The address of the user + * @return The eMode id + */ + function getUserEMode(address user) external view returns (uint256); + + /** + * @notice Sets the liquidation grace period of the given asset + * @dev To enable a liquidation grace period, a timestamp in the future should be set, + * To disable a liquidation grace period, any timestamp in the past works, like 0 + * @param asset The address of the underlying asset to set the liquidationGracePeriod + * @param until Timestamp when the liquidation grace period will end + **/ + function setLiquidationGracePeriod(address asset, uint40 until) external; + + /** + * @notice Returns the liquidation grace period of the given asset + * @param asset The address of the underlying asset + * @return Timestamp when the liquidation grace period will end + **/ + function getLiquidationGracePeriod(address asset) external view returns (uint40); + + /** + * @notice Returns the total fee on flash loans. + * @dev From v3.4 all flashloan fees will be send to the treasury. + * @return The total fee on flashloans + */ + function FLASHLOAN_PREMIUM_TOTAL() external view returns (uint128); + + /** + * @notice Returns the part of the flashloan fees sent to protocol + * @dev From v3.4 all flashloan fees will be send to the treasury and this value + * is always 100_00. + * @return The flashloan fee sent to the protocol treasury + */ + function FLASHLOAN_PREMIUM_TO_PROTOCOL() external view returns (uint128); + + /** + * @notice Returns the maximum number of reserves supported to be listed in this Pool + * @return The maximum number of reserves supported + */ + function MAX_NUMBER_RESERVES() external view returns (uint16); + + /** + * @notice Mints the assets accrued through the reserve factor to the treasury in the form of aTokens + * @param assets The list of reserves for which the minting needs to be executed + */ + function mintToTreasury(address[] calldata assets) external; + + /** + * @notice Rescue and transfer tokens locked in this contract + * @param token The address of the token + * @param to The address of the recipient + * @param amount The amount of token to transfer + */ + function rescueTokens(address token, address to, uint256 amount) external; + + /** + * @notice Supplies an `amount` of underlying asset into the reserve, receiving in return overlying aTokens. + * - E.g. User supplies 100 USDC and gets in return 100 aUSDC + * @dev Deprecated: Use the `supply` function instead + * @param asset The address of the underlying asset to supply + * @param amount The amount to be supplied + * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user + * wants to receive them on his own wallet, or a different address if the beneficiary of aTokens + * is a different wallet + * @param referralCode Code used to register the integrator originating the operation, for potential rewards. + * 0 if the action is executed directly by the user, without any middle-man + */ + function deposit(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external; + + /** + * @notice It covers the deficit of a specified reserve by burning the equivalent aToken `amount` for assets + * @dev The deficit of a reserve can occur due to situations where borrowed assets are not repaid, leading to bad debt. + * @param asset The address of the underlying asset to cover the deficit. + * @param amount The amount to be covered, in aToken + * @return The amount of tokens burned + */ + function eliminateReserveDeficit(address asset, uint256 amount) external returns (uint256); + + /** + * @notice Approves or disapproves a position manager. This position manager will be able + * to call the `setUserUseReserveAsCollateralOnBehalfOf` and the + * `setUserEModeOnBehalfOf` function on behalf of the user. + * @param positionManager The address of the position manager + * @param approve True if the position manager should be approved, false otherwise + */ + function approvePositionManager(address positionManager, bool approve) external; + + /** + * @notice Renounces a position manager role for a given user. + * @param user The address of the user + */ + function renouncePositionManagerRole(address user) external; + + /** + * @notice Sets the use as collateral flag for the user on the specific reserve on behalf of the user. + * @param asset The address of the underlying asset of the reserve + * @param useAsCollateral True if the user wants to use the reserve as collateral, false otherwise + * @param onBehalfOf The address of the user + */ + function setUserUseReserveAsCollateralOnBehalfOf( + address asset, + bool useAsCollateral, + address onBehalfOf + ) external; + + /** + * @notice Sets the eMode category for the user on the specific reserve on behalf of the user. + * @param categoryId The id of the category + * @param onBehalfOf The address of the user + */ + function setUserEModeOnBehalfOf(uint8 categoryId, address onBehalfOf) external; + + /** + * @notice Returns true if the `positionManager` address is approved to use the position manager role on behalf of the user. + * @param user The address of the user + * @param positionManager The address of the position manager + * @return True if the user is approved to use the position manager, false otherwise + */ + function isApprovedPositionManager( + address user, + address positionManager + ) external view returns (bool); + + /** + * @notice Returns the current deficit of a reserve. + * @param asset The address of the underlying asset of the reserve + * @return The current deficit of the reserve + */ + function getReserveDeficit(address asset) external view returns (uint256); + + /** + * @notice Returns the aToken address of a reserve. + * @param asset The address of the underlying asset of the reserve + * @return The address of the aToken + */ + function getReserveAToken(address asset) external view returns (address); + + /** + * @notice Returns the variableDebtToken address of a reserve. + * @param asset The address of the underlying asset of the reserve + * @return The address of the variableDebtToken + */ + function getReserveVariableDebtToken(address asset) external view returns (address); + + /** + * @notice Gets the address of the external FlashLoanLogic + */ + function getFlashLoanLogic() external view returns (address); + + /** + * @notice Gets the address of the external BorrowLogic + */ + function getBorrowLogic() external view returns (address); + + /** + * @notice Gets the address of the external LiquidationLogic + */ + function getLiquidationLogic() external view returns (address); + + /** + * @notice Gets the address of the external PoolLogic + */ + function getPoolLogic() external view returns (address); + + /** + * @notice Gets the address of the external SupplyLogic + */ + function getSupplyLogic() external view returns (address); +} diff --git a/plan/agw/research/preset-catalog-2026-10-15/IV3SwapRouter.sol b/plan/agw/research/preset-catalog-2026-10-15/IV3SwapRouter.sol new file mode 100644 index 00000000..f5d64597 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/IV3SwapRouter.sol @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +pragma solidity >=0.7.5; +pragma abicoder v2; + +import '@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol'; + +/// @title Router token swapping functionality +/// @notice Functions for swapping tokens via Uniswap V3 +interface IV3SwapRouter is IUniswapV3SwapCallback { + struct ExactInputSingleParams { + address tokenIn; + address tokenOut; + uint24 fee; + address recipient; + uint256 amountIn; + uint256 amountOutMinimum; + uint160 sqrtPriceLimitX96; + } + + /// @notice Swaps `amountIn` of one token for as much as possible of another token + /// @dev Setting `amountIn` to 0 will cause the contract to look up its own balance, + /// and swap the entire amount, enabling contracts to send tokens before calling this function. + /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata + /// @return amountOut The amount of the received token + function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut); + + struct ExactInputParams { + bytes path; + address recipient; + uint256 amountIn; + uint256 amountOutMinimum; + } + + /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path + /// @dev Setting `amountIn` to 0 will cause the contract to look up its own balance, + /// and swap the entire amount, enabling contracts to send tokens before calling this function. + /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata + /// @return amountOut The amount of the received token + function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut); + + struct ExactOutputSingleParams { + address tokenIn; + address tokenOut; + uint24 fee; + address recipient; + uint256 amountOut; + uint256 amountInMaximum; + uint160 sqrtPriceLimitX96; + } + + /// @notice Swaps as little as possible of one token for `amountOut` of another token + /// that may remain in the router after the swap. + /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata + /// @return amountIn The amount of the input token + function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn); + + struct ExactOutputParams { + bytes path; + address recipient; + uint256 amountOut; + uint256 amountInMaximum; + } + + /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed) + /// that may remain in the router after the swap. + /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata + /// @return amountIn The amount of the input token + function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn); +} diff --git a/plan/agw/research/preset-catalog-2026-10-15/MERC20.sol b/plan/agw/research/preset-catalog-2026-10-15/MERC20.sol new file mode 100644 index 00000000..4f2d2897 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/MERC20.sol @@ -0,0 +1,295 @@ +// SPDX-License-Identifier: BSD-3-Clause +pragma solidity 0.8.19; + +import "@openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; +import "./MToken.sol"; + +/** + * @title Moonwell's MErc20 Contract + * @notice MTokens which wrap an EIP-20 underlying + * @author Moonwell + */ +contract MErc20 is MToken, MErc20Interface { + /** + * @notice Initialize the new money market + * @param underlying_ The address of the underlying asset + * @param comptroller_ The address of the Comptroller + * @param interestRateModel_ The address of the interest rate model + * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18 + * @param name_ ERC-20 name of this token + * @param symbol_ ERC-20 symbol of this token + * @param decimals_ ERC-20 decimal precision of this token + */ + function initialize( + address underlying_, + ComptrollerInterface comptroller_, + InterestRateModel interestRateModel_, + uint initialExchangeRateMantissa_, + string memory name_, + string memory symbol_, + uint8 decimals_ + ) public { + // MToken initialize does the bulk of the work + super.initialize( + comptroller_, + interestRateModel_, + initialExchangeRateMantissa_, + name_, + symbol_, + decimals_ + ); + + // Set underlying and sanity check it + underlying = underlying_; + EIP20Interface(underlying).totalSupply(); + } + + /*** User Interface ***/ + + /** + * @notice Sender supplies assets into the market and receives mTokens in exchange + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param mintAmount The amount of the underlying asset to supply + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function mint(uint mintAmount) external override returns (uint) { + (uint err, ) = mintInternal(mintAmount); + return err; + } + + /** + * @notice Supply assets but without a 2-step approval process, EIP-2612 + * @dev Simply calls the underlying token's `permit()` function and then assumes things worked + * @param mintAmount The amount of the underlying asset to supply + * @param deadline The amount of the underlying asset to supply + * @param v ECDSA recovery id for the signature + * @param r ECDSA r parameter for the signature + * @param s ECDSA s parameter for the signature + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function mintWithPermit( + uint mintAmount, + uint deadline, + uint8 v, + bytes32 r, + bytes32 s + ) external override returns (uint) { + IERC20Permit token = IERC20Permit(underlying); + + // Go submit our pre-approval signature data to the underlying token, but + // explicitly fail if there is an issue. + SafeERC20.safePermit( + token, + msg.sender, + address(this), + mintAmount, + deadline, + v, + r, + s + ); + + (uint err, ) = mintInternal(mintAmount); + return err; + } + + /** + * @notice Sender redeems mTokens in exchange for the underlying asset + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param redeemTokens The number of mTokens to redeem into underlying + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function redeem(uint redeemTokens) external override returns (uint) { + return redeemInternal(redeemTokens); + } + + /** + * @notice Sender redeems mTokens in exchange for a specified amount of underlying asset + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param redeemAmount The amount of underlying to redeem + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function redeemUnderlying( + uint redeemAmount + ) external override returns (uint) { + return redeemUnderlyingInternal(redeemAmount); + } + + /** + * @notice Sender borrows assets from the protocol to their own address + * @param borrowAmount The amount of the underlying asset to borrow + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function borrow(uint borrowAmount) external override returns (uint) { + return borrowInternal(borrowAmount); + } + + /** + * @notice Sender repays their own borrow + * @param repayAmount The amount to repay, or uint.max for the full outstanding amount + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function repayBorrow(uint repayAmount) external override returns (uint) { + (uint err, ) = repayBorrowInternal(repayAmount); + return err; + } + + /** + * @notice Sender repays a borrow belonging to borrower + * @param borrower the account with the debt being payed off + * @param repayAmount The amount to repay, or uint.max for the full outstanding amount + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function repayBorrowBehalf( + address borrower, + uint repayAmount + ) external override returns (uint) { + (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount); + return err; + } + + /** + * @notice The sender liquidates the borrowers collateral. + * The collateral seized is transferred to the liquidator. + * @param borrower The borrower of this mToken to be liquidated + * @param repayAmount The amount of the underlying borrowed asset to repay + * @param mTokenCollateral The market in which to seize collateral from the borrower + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function liquidateBorrow( + address borrower, + uint repayAmount, + MTokenInterface mTokenCollateral + ) external override returns (uint) { + (uint err, ) = liquidateBorrowInternal( + borrower, + repayAmount, + mTokenCollateral + ); + return err; + } + + /** + * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to admin (timelock) + * @param token The address of the ERC-20 token to sweep + */ + function sweepToken(EIP20NonStandardInterface token) external override { + require( + msg.sender == admin, + "MErc20::sweepToken: only admin can sweep tokens" + ); + require( + address(token) != underlying, + "MErc20::sweepToken: can not sweep underlying token" + ); + uint256 balance = token.balanceOf(address(this)); + token.transfer(admin, balance); + } + + /** + * @notice The sender adds to reserves. + * @param addAmount The amount fo underlying token to add as reserves + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function _addReserves(uint addAmount) external override returns (uint) { + return _addReservesInternal(addAmount); + } + + /*** Safe Token ***/ + + /** + * @notice Gets balance of this contract in terms of the underlying + * @dev This excludes the value of the current message, if any + * @return The quantity of underlying tokens owned by this contract + */ + function getCashPrior() internal view virtual override returns (uint) { + EIP20Interface token = EIP20Interface(underlying); + return token.balanceOf(address(this)); + } + + /** + * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case. + * This will revert due to insufficient balance or insufficient allowance. + * This function returns the actual amount received, + * which may be less than `amount` if there is a fee attached to the transfer. + * + * Note: This wrapper safely handles non-standard ERC-20 tokens that do not return a value. + * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca + */ + function doTransferIn( + address from, + uint amount + ) internal virtual override returns (uint) { + // Read from storage once + address underlying_ = underlying; + EIP20NonStandardInterface token = EIP20NonStandardInterface( + underlying_ + ); + uint balanceBefore = EIP20Interface(underlying_).balanceOf( + address(this) + ); + token.transferFrom(from, address(this), amount); + + bool success; + assembly { + switch returndatasize() + case 0 { + // This is a non-standard ERC-20 + success := not(0) // set success to true + } + case 32 { + // This is a compliant ERC-20 + returndatacopy(0, 0, 32) + success := mload(0) // Set `success = returndata` of external call + } + default { + // This is an excessively non-compliant ERC-20, revert. + revert(0, 0) + } + } + require(success, "TOKEN_TRANSFER_IN_FAILED"); + + // Calculate the amount that was *actually* transferred + uint balanceAfter = EIP20Interface(underlying_).balanceOf( + address(this) + ); + require(balanceAfter >= balanceBefore, "TOKEN_TRANSFER_IN_OVERFLOW"); + return balanceAfter - balanceBefore; // underflow already checked above, just subtract + } + + /** + * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory + * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to + * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified + * it is >= amount, this should not revert in normal conditions. + * + * Note: This wrapper safely handles non-standard ERC-20 tokens that do not return a value. + * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca + */ + function doTransferOut( + address payable to, + uint amount + ) internal virtual override { + EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying); + token.transfer(to, amount); + + bool success; + assembly { + switch returndatasize() + case 0 { + // This is a non-standard ERC-20 + success := not(0) // set success to true + } + case 32 { + // This is a compliant ERC-20 + returndatacopy(0, 0, 32) + success := mload(0) // Set `success = returndata` of override external call + } + default { + // This is an excessively non-compliant ERC-20, revert. + revert(0, 0) + } + } + require(success, "TOKEN_TRANSFER_OUT_FAILED"); + } +} diff --git a/plan/agw/research/preset-catalog-2026-10-15/MToken.sol b/plan/agw/research/preset-catalog-2026-10-15/MToken.sol new file mode 100644 index 00000000..bc0384e4 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/MToken.sol @@ -0,0 +1,2222 @@ +// SPDX-License-Identifier: BSD-3-Clause +pragma solidity 0.8.19; + +import "./ComptrollerInterface.sol"; +import "./MTokenInterfaces.sol"; +import "./TokenErrorReporter.sol"; +import "./Exponential.sol"; +import "./EIP20Interface.sol"; +import "./irm/InterestRateModel.sol"; + +/** + * @title Moonwell's MToken Contract + * @notice Abstract base for MTokens + * @author Moonwell + */ +abstract contract MToken is MTokenInterface, Exponential, TokenErrorReporter { + /** + * @notice Initialize the money market + * @param comptroller_ The address of the Comptroller + * @param interestRateModel_ The address of the interest rate model + * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18 + * @param name_ EIP-20 name of this token + * @param symbol_ EIP-20 symbol of this token + * @param decimals_ EIP-20 decimal precision of this token + */ + function initialize( + ComptrollerInterface comptroller_, + InterestRateModel interestRateModel_, + uint initialExchangeRateMantissa_, + string memory name_, + string memory symbol_, + uint8 decimals_ + ) public { + require(msg.sender == admin, "only admin may initialize the market"); + require( + accrualBlockTimestamp == 0 && borrowIndex == 0, + "market may only be initialized once" + ); + + // Set initial exchange rate + initialExchangeRateMantissa = initialExchangeRateMantissa_; + require( + initialExchangeRateMantissa > 0, + "initial exchange rate must be greater than zero." + ); + + // Set the comptroller + uint err = _setComptroller(comptroller_); + require(err == uint(Error.NO_ERROR), "setting comptroller failed"); + + // Initialize block timestamp and borrow index (block timestamp mocks depend on comptroller being set) + accrualBlockTimestamp = getBlockTimestamp(); + borrowIndex = mantissaOne; + + // Set the interest rate model (depends on block timestamp / borrow index) + err = _setInterestRateModelFresh(interestRateModel_); + require( + err == uint(Error.NO_ERROR), + "setting interest rate model failed" + ); + + name = name_; + symbol = symbol_; + decimals = decimals_; + + // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund) + _notEntered = true; + } + + /** + * @notice Transfer `tokens` tokens from `src` to `dst` by `spender` + * @dev Called by both `transfer` and `transferFrom` internally + * @param spender The address of the account performing the transfer + * @param src The address of the source account + * @param dst The address of the destination account + * @param tokens The number of tokens to transfer + * @return Whether or not the transfer succeeded + */ + function transferTokens( + address spender, + address src, + address dst, + uint tokens + ) internal returns (uint) { + /* Fail if transfer not allowed */ + uint allowed = comptroller.transferAllowed( + address(this), + src, + dst, + tokens + ); + if (allowed != 0) { + return + failOpaque( + Error.COMPTROLLER_REJECTION, + FailureInfo.TRANSFER_COMPTROLLER_REJECTION, + allowed + ); + } + + /* Do not allow self-transfers */ + if (src == dst) { + return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED); + } + + /* Get the allowance, infinite for the account owner */ + uint startingAllowance = 0; + if (spender == src) { + startingAllowance = type(uint).max; + } else { + startingAllowance = transferAllowances[src][spender]; + } + + /* Do the calculations, checking for {under,over}flow */ + MathError mathErr; + uint allowanceNew; + uint srcTokensNew; + uint dstTokensNew; + + (mathErr, allowanceNew) = subUInt(startingAllowance, tokens); + if (mathErr != MathError.NO_ERROR) { + return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED); + } + + (mathErr, srcTokensNew) = subUInt(accountTokens[src], tokens); + if (mathErr != MathError.NO_ERROR) { + return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH); + } + + (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens); + if (mathErr != MathError.NO_ERROR) { + return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH); + } + + ///////////////////////// + // EFFECTS & INTERACTIONS + // (No safe failures beyond this point) + + accountTokens[src] = srcTokensNew; + accountTokens[dst] = dstTokensNew; + + /* Eat some of the allowance (if necessary) */ + if (startingAllowance != type(uint).max) { + transferAllowances[src][spender] = allowanceNew; + } + + /* We emit a Transfer event */ + emit Transfer(src, dst, tokens); + + // unused function + // comptroller.transferVerify(address(this), src, dst, tokens); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Transfer `amount` tokens from `msg.sender` to `dst` + * @param dst The address of the destination account + * @param amount The number of tokens to transfer + * @return Whether or not the transfer succeeded + */ + function transfer( + address dst, + uint256 amount + ) external override nonReentrant returns (bool) { + return + transferTokens(msg.sender, msg.sender, dst, amount) == + uint(Error.NO_ERROR); + } + + /** + * @notice Transfer `amount` tokens from `src` to `dst` + * @param src The address of the source account + * @param dst The address of the destination account + * @param amount The number of tokens to transfer + * @return Whether or not the transfer succeeded + */ + function transferFrom( + address src, + address dst, + uint256 amount + ) external override nonReentrant returns (bool) { + return + transferTokens(msg.sender, src, dst, amount) == + uint(Error.NO_ERROR); + } + + /** + * @notice Approve `spender` to transfer up to `amount` from `src` + * @dev This will overwrite the approval amount for `spender` + * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) + * @param spender The address of the account which may transfer tokens + * @param amount The number of tokens that are approved (uint.max means infinite) + * @return Whether or not the approval succeeded + */ + function approve( + address spender, + uint256 amount + ) external override returns (bool) { + address src = msg.sender; + transferAllowances[src][spender] = amount; + emit Approval(src, spender, amount); + return true; + } + + /** + * @notice Get the current allowance from `owner` for `spender` + * @param owner The address of the account which owns the tokens to be spent + * @param spender The address of the account which may transfer tokens + * @return The number of tokens allowed to be spent (uint.max means infinite) + */ + function allowance( + address owner, + address spender + ) external view override returns (uint256) { + return transferAllowances[owner][spender]; + } + + /** + * @notice Get the token balance of the `owner` + * @param owner The address of the account to query + * @return The number of tokens owned by `owner` + */ + function balanceOf(address owner) external view override returns (uint256) { + return accountTokens[owner]; + } + + /** + * @notice Get the underlying balance of the `owner` + * @dev This also accrues interest in a transaction + * @param owner The address of the account to query + * @return The amount of underlying owned by `owner` + */ + function balanceOfUnderlying( + address owner + ) external override returns (uint) { + Exp memory exchangeRate = Exp({mantissa: exchangeRateCurrent()}); + (MathError mErr, uint balance) = mulScalarTruncate( + exchangeRate, + accountTokens[owner] + ); + require(mErr == MathError.NO_ERROR, "balance could not be calculated"); + return balance; + } + + /** + * @notice Get a snapshot of the account's balances, and the cached exchange rate + * @dev This is used by comptroller to more efficiently perform liquidity checks. + * @param account Address of the account to snapshot + * @return (possible error, token balance, borrow balance, exchange rate mantissa) + */ + function getAccountSnapshot( + address account + ) external view override returns (uint, uint, uint, uint) { + uint mTokenBalance = accountTokens[account]; + uint borrowBalance; + uint exchangeRateMantissa; + + MathError mErr; + + (mErr, borrowBalance) = borrowBalanceStoredInternal(account); + if (mErr != MathError.NO_ERROR) { + return (uint(Error.MATH_ERROR), 0, 0, 0); + } + + (mErr, exchangeRateMantissa) = exchangeRateStoredInternal(); + if (mErr != MathError.NO_ERROR) { + return (uint(Error.MATH_ERROR), 0, 0, 0); + } + + return ( + uint(Error.NO_ERROR), + mTokenBalance, + borrowBalance, + exchangeRateMantissa + ); + } + + /** + * @dev Function to simply retrieve block timestamp + * This exists mainly for inheriting test contracts to stub this result. + */ + function getBlockTimestamp() internal view virtual returns (uint) { + return block.timestamp; + } + + /** + * @notice Returns the current per-timestamp borrow interest rate for this mToken + * @return The borrow interest rate per timestamp, scaled by 1e18 + */ + function borrowRatePerTimestamp() external view override returns (uint) { + return + interestRateModel.getBorrowRate( + getCashPrior(), + totalBorrows, + totalReserves + ); + } + + /** + * @notice Returns the current per-timestamp supply interest rate for this mToken + * @return The supply interest rate per timestamp, scaled by 1e18 + */ + function supplyRatePerTimestamp() external view override returns (uint) { + return + interestRateModel.getSupplyRate( + getCashPrior(), + totalBorrows, + totalReserves, + reserveFactorMantissa + ); + } + + /** + * @notice Returns the current total borrows plus accrued interest + * @return The total borrows with interest + */ + function totalBorrowsCurrent() + external + override + nonReentrant + returns (uint) + { + require( + accrueInterest() == uint(Error.NO_ERROR), + "accrue interest failed" + ); + return totalBorrows; + } + + /** + * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex + * @param account The address whose balance should be calculated after updating borrowIndex + * @return The calculated balance + */ + function borrowBalanceCurrent( + address account + ) external override nonReentrant returns (uint) { + require( + accrueInterest() == uint(Error.NO_ERROR), + "accrue interest failed" + ); + return borrowBalanceStored(account); + } + + /** + * @notice Return the borrow balance of account based on stored data + * @param account The address whose balance should be calculated + * @return The calculated balance + */ + function borrowBalanceStored( + address account + ) public view override returns (uint) { + (MathError err, uint result) = borrowBalanceStoredInternal(account); + require( + err == MathError.NO_ERROR, + "borrowBalanceStored: borrowBalanceStoredInternal failed" + ); + return result; + } + + /** + * @notice Return the borrow balance of account based on stored data + * @param account The address whose balance should be calculated + * @return (error code, the calculated balance or 0 if error code is non-zero) + */ + function borrowBalanceStoredInternal( + address account + ) internal view returns (MathError, uint) { + /* Note: we do not assert that the market is up to date */ + MathError mathErr; + uint principalTimesIndex; + uint result; + + /* Get borrowBalance and borrowIndex */ + BorrowSnapshot storage borrowSnapshot = accountBorrows[account]; + + /* If borrowBalance = 0 then borrowIndex is likely also 0. + * Rather than failing the calculation with a division by 0, we immediately return 0 in this case. + */ + if (borrowSnapshot.principal == 0) { + return (MathError.NO_ERROR, 0); + } + + /* Calculate new borrow balance using the interest index: + * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex + */ + (mathErr, principalTimesIndex) = mulUInt( + borrowSnapshot.principal, + borrowIndex + ); + if (mathErr != MathError.NO_ERROR) { + return (mathErr, 0); + } + + (mathErr, result) = divUInt( + principalTimesIndex, + borrowSnapshot.interestIndex + ); + if (mathErr != MathError.NO_ERROR) { + return (mathErr, 0); + } + + return (MathError.NO_ERROR, result); + } + + /** + * @notice Accrue interest then return the up-to-date exchange rate + * @return Calculated exchange rate scaled by 1e18 + */ + function exchangeRateCurrent() public override nonReentrant returns (uint) { + require( + accrueInterest() == uint(Error.NO_ERROR), + "accrue interest failed" + ); + return exchangeRateStored(); + } + + /** + * @notice Calculates the exchange rate from the underlying to the MToken + * @dev This function does not accrue interest before calculating the exchange rate + * @return Calculated exchange rate scaled by 1e18 + */ + function exchangeRateStored() public view override returns (uint) { + (MathError err, uint result) = exchangeRateStoredInternal(); + require( + err == MathError.NO_ERROR, + "exchangeRateStored: exchangeRateStoredInternal failed" + ); + return result; + } + + /** + * @notice Calculates the exchange rate from the underlying to the MToken + * @dev This function does not accrue interest before calculating the exchange rate + * @return (error code, calculated exchange rate scaled by 1e18) + */ + function exchangeRateStoredInternal() + internal + view + virtual + returns (MathError, uint) + { + uint _totalSupply = totalSupply; + if (_totalSupply == 0) { + /* + * If there are no tokens minted: + * exchangeRate = initialExchangeRate + */ + return (MathError.NO_ERROR, initialExchangeRateMantissa); + } else { + /* + * Otherwise: + * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply + */ + uint totalCash = getCashPrior(); + uint cashPlusBorrowsMinusReserves; + Exp memory exchangeRate; + MathError mathErr; + + (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt( + totalCash, + totalBorrows, + totalReserves + ); + if (mathErr != MathError.NO_ERROR) { + return (mathErr, 0); + } + + (mathErr, exchangeRate) = getExp( + cashPlusBorrowsMinusReserves, + _totalSupply + ); + if (mathErr != MathError.NO_ERROR) { + return (mathErr, 0); + } + + return (MathError.NO_ERROR, exchangeRate.mantissa); + } + } + + /** + * @notice Get cash balance of this mToken in the underlying asset + * @return The quantity of underlying asset owned by this contract + */ + function getCash() external view override returns (uint) { + return getCashPrior(); + } + + /** + * @notice Applies accrued interest to total borrows and reserves + * @dev This calculates interest accrued from the last checkpointed block + * up to the current block and writes new checkpoint to storage. + */ + function accrueInterest() public virtual override returns (uint) { + /* Remember the initial block timestamp */ + uint currentBlockTimestamp = getBlockTimestamp(); + uint accrualBlockTimestampPrior = accrualBlockTimestamp; + + /* Short-circuit accumulating 0 interest */ + if (accrualBlockTimestampPrior == currentBlockTimestamp) { + return uint(Error.NO_ERROR); + } + + /* Read the previous values out of storage */ + uint cashPrior = getCashPrior(); + uint borrowsPrior = totalBorrows; + uint reservesPrior = totalReserves; + uint borrowIndexPrior = borrowIndex; + + /* Calculate the current borrow interest rate */ + uint borrowRateMantissa = interestRateModel.getBorrowRate( + cashPrior, + borrowsPrior, + reservesPrior + ); + require( + borrowRateMantissa <= borrowRateMaxMantissa, + "borrow rate is absurdly high" + ); + + /* Calculate the number of blocks elapsed since the last accrual */ + (MathError mathErr, uint blockDelta) = subUInt( + currentBlockTimestamp, + accrualBlockTimestampPrior + ); + require( + mathErr == MathError.NO_ERROR, + "could not calculate block delta" + ); + + /* + * Calculate the interest accumulated into borrows and reserves and the new index: + * simpleInterestFactor = borrowRate * blockDelta + * interestAccumulated = simpleInterestFactor * totalBorrows + * totalBorrowsNew = interestAccumulated + totalBorrows + * totalReservesNew = interestAccumulated * reserveFactor + totalReserves + * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex + */ + + Exp memory simpleInterestFactor; + uint interestAccumulated; + uint totalBorrowsNew; + uint totalReservesNew; + uint borrowIndexNew; + + (mathErr, simpleInterestFactor) = mulScalar( + Exp({mantissa: borrowRateMantissa}), + blockDelta + ); + if (mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo + .ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED, + uint(mathErr) + ); + } + + (mathErr, interestAccumulated) = mulScalarTruncate( + simpleInterestFactor, + borrowsPrior + ); + if (mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo + .ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED, + uint(mathErr) + ); + } + + (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior); + if (mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo + .ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED, + uint(mathErr) + ); + } + + (mathErr, totalReservesNew) = mulScalarTruncateAddUInt( + Exp({mantissa: reserveFactorMantissa}), + interestAccumulated, + reservesPrior + ); + if (mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo + .ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED, + uint(mathErr) + ); + } + + (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt( + simpleInterestFactor, + borrowIndexPrior, + borrowIndexPrior + ); + if (mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo + .ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED, + uint(mathErr) + ); + } + + ///////////////////////// + // EFFECTS & INTERACTIONS + // (No safe failures beyond this point) + + /* We write the previously calculated values into storage */ + accrualBlockTimestamp = currentBlockTimestamp; + borrowIndex = borrowIndexNew; + totalBorrows = totalBorrowsNew; + totalReserves = totalReservesNew; + + /* We emit an AccrueInterest event */ + emit AccrueInterest( + cashPrior, + interestAccumulated, + borrowIndexNew, + totalBorrowsNew + ); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Sender supplies assets into the market and receives mTokens in exchange + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param mintAmount The amount of the underlying asset to supply + * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount. + */ + function mintInternal( + uint mintAmount + ) internal nonReentrant returns (uint, uint) { + uint error = accrueInterest(); + if (error != uint(Error.NO_ERROR)) { + // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed + return ( + fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), + 0 + ); + } + // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to + return mintFresh(msg.sender, mintAmount); + } + + struct MintLocalVars { + Error err; + MathError mathErr; + uint exchangeRateMantissa; + uint mintTokens; + uint totalSupplyNew; + uint accountTokensNew; + uint actualMintAmount; + } + + /** + * @notice User supplies assets into the market and receives mTokens in exchange + * @dev Assumes interest has already been accrued up to the current block + * @param minter The address of the account which is supplying the assets + * @param mintAmount The amount of the underlying asset to supply + * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount. + */ + function mintFresh( + address minter, + uint mintAmount + ) internal returns (uint, uint) { + /* Fail if mint not allowed */ + uint allowed = comptroller.mintAllowed( + address(this), + minter, + mintAmount + ); + if (allowed != 0) { + return ( + failOpaque( + Error.COMPTROLLER_REJECTION, + FailureInfo.MINT_COMPTROLLER_REJECTION, + allowed + ), + 0 + ); + } + + /* Verify market's block timestamp equals current block timestamp */ + if (accrualBlockTimestamp != getBlockTimestamp()) { + return ( + fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), + 0 + ); + } + + MintLocalVars memory vars; + + ( + vars.mathErr, + vars.exchangeRateMantissa + ) = exchangeRateStoredInternal(); + if (vars.mathErr != MathError.NO_ERROR) { + return ( + failOpaque( + Error.MATH_ERROR, + FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, + uint(vars.mathErr) + ), + 0 + ); + } + + ///////////////////////// + // EFFECTS & INTERACTIONS + // (No safe failures beyond this point) + + /* + * We call `doTransferIn` for the minter and the mintAmount. + * Note: The mToken must handle variations between ERC-20 and GLMR underlying. + * `doTransferIn` reverts if anything goes wrong, since we can't be sure if + * side-effects occurred. The function returns the amount actually transferred, + * in case of a fee. On success, the mToken holds an additional `actualMintAmount` + * of cash. + */ + vars.actualMintAmount = doTransferIn(minter, mintAmount); + + /* + * We get the current exchange rate and calculate the number of mTokens to be minted: + * mintTokens = actualMintAmount / exchangeRate + */ + + (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate( + vars.actualMintAmount, + Exp({mantissa: vars.exchangeRateMantissa}) + ); + require( + vars.mathErr == MathError.NO_ERROR, + "MINT_EXCHANGE_CALCULATION_FAILED" + ); + + /* + * We calculate the new total supply of mTokens and minter token balance, checking for overflow: + * totalSupplyNew = totalSupply + mintTokens + * accountTokensNew = accountTokens[minter] + mintTokens + */ + (vars.mathErr, vars.totalSupplyNew) = addUInt( + totalSupply, + vars.mintTokens + ); + require( + vars.mathErr == MathError.NO_ERROR, + "MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED" + ); + + (vars.mathErr, vars.accountTokensNew) = addUInt( + accountTokens[minter], + vars.mintTokens + ); + require( + vars.mathErr == MathError.NO_ERROR, + "MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED" + ); + + /* We write previously calculated values into storage */ + totalSupply = vars.totalSupplyNew; + accountTokens[minter] = vars.accountTokensNew; + + /* We emit a Mint event, and a Transfer event */ + emit Mint(minter, vars.actualMintAmount, vars.mintTokens); + emit Transfer(address(this), minter, vars.mintTokens); + + /* We call the defense hook */ + // unused function + // comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens); + + return (uint(Error.NO_ERROR), vars.actualMintAmount); + } + + /** + * @notice Sender redeems mTokens in exchange for the underlying asset + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param redeemTokens The number of mTokens to redeem into underlying + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function redeemInternal( + uint redeemTokens + ) internal nonReentrant returns (uint) { + uint error = accrueInterest(); + if (error != uint(Error.NO_ERROR)) { + // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed + return + fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED); + } + // redeemFresh emits redeem-specific logs on errors, so we don't need to + return redeemFresh(payable(msg.sender), redeemTokens, 0); + } + + /** + * @notice Sender redeems mTokens in exchange for a specified amount of underlying asset + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param redeemAmount The amount of underlying to receive from redeeming mTokens + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function redeemUnderlyingInternal( + uint redeemAmount + ) internal nonReentrant returns (uint) { + uint error = accrueInterest(); + if (error != uint(Error.NO_ERROR)) { + // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed + return + fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED); + } + // redeemFresh emits redeem-specific logs on errors, so we don't need to + return redeemFresh(payable(msg.sender), 0, redeemAmount); + } + + struct RedeemLocalVars { + Error err; + MathError mathErr; + uint exchangeRateMantissa; + uint redeemTokens; + uint redeemAmount; + uint totalSupplyNew; + uint accountTokensNew; + } + + /** + * @notice User redeems mTokens in exchange for the underlying asset + * @dev Assumes interest has already been accrued up to the current block + * @param redeemer The address of the account which is redeeming the tokens + * @param redeemTokensIn The number of mTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero) + * @param redeemAmountIn The number of underlying tokens to receive from redeeming mTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero) + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function redeemFresh( + address payable redeemer, + uint redeemTokensIn, + uint redeemAmountIn + ) internal returns (uint) { + require( + redeemTokensIn == 0 || redeemAmountIn == 0, + "one of redeemTokensIn or redeemAmountIn must be zero" + ); + + RedeemLocalVars memory vars; + + /* exchangeRate = invoke Exchange Rate Stored() */ + ( + vars.mathErr, + vars.exchangeRateMantissa + ) = exchangeRateStoredInternal(); + if (vars.mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo.REDEEM_EXCHANGE_RATE_READ_FAILED, + uint(vars.mathErr) + ); + } + + /* If redeemTokensIn > 0: */ + if (redeemTokensIn > 0) { + /* + * We calculate the exchange rate and the amount of underlying to be redeemed: + * redeemTokens = redeemTokensIn + * redeemAmount = redeemTokensIn x exchangeRateCurrent + */ + if (redeemTokensIn == type(uint).max) { + vars.redeemTokens = accountTokens[redeemer]; + } else { + vars.redeemTokens = redeemTokensIn; + } + + (vars.mathErr, vars.redeemAmount) = mulScalarTruncate( + Exp({mantissa: vars.exchangeRateMantissa}), + vars.redeemTokens + ); + if (vars.mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo.REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED, + uint(vars.mathErr) + ); + } + } else { + /* + * We get the current exchange rate and calculate the amount to be redeemed: + * redeemTokens = redeemAmountIn / exchangeRate + * redeemAmount = redeemAmountIn + */ + if (redeemAmountIn == type(uint).max) { + vars.redeemTokens = accountTokens[redeemer]; + + (vars.mathErr, vars.redeemAmount) = mulScalarTruncate( + Exp({mantissa: vars.exchangeRateMantissa}), + vars.redeemTokens + ); + if (vars.mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo + .REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED, + uint(vars.mathErr) + ); + } + } else { + vars.redeemAmount = redeemAmountIn; + + (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate( + redeemAmountIn, + Exp({mantissa: vars.exchangeRateMantissa}) + ); + if (vars.mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo + .REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED, + uint(vars.mathErr) + ); + } + } + } + + /* Fail if redeem not allowed */ + uint allowed = comptroller.redeemAllowed( + address(this), + redeemer, + vars.redeemTokens + ); + if (allowed != 0) { + return + failOpaque( + Error.COMPTROLLER_REJECTION, + FailureInfo.REDEEM_COMPTROLLER_REJECTION, + allowed + ); + } + + /* Verify market's block timestamp equals current block timestamp */ + if (accrualBlockTimestamp != getBlockTimestamp()) { + return + fail( + Error.MARKET_NOT_FRESH, + FailureInfo.REDEEM_FRESHNESS_CHECK + ); + } + + /* + * We calculate the new total supply and redeemer balance, checking for underflow: + * totalSupplyNew = totalSupply - redeemTokens + * accountTokensNew = accountTokens[redeemer] - redeemTokens + */ + (vars.mathErr, vars.totalSupplyNew) = subUInt( + totalSupply, + vars.redeemTokens + ); + if (vars.mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo.REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED, + uint(vars.mathErr) + ); + } + + (vars.mathErr, vars.accountTokensNew) = subUInt( + accountTokens[redeemer], + vars.redeemTokens + ); + if (vars.mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo.REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED, + uint(vars.mathErr) + ); + } + + /* Fail gracefully if protocol has insufficient cash */ + if (getCashPrior() < vars.redeemAmount) { + return + fail( + Error.TOKEN_INSUFFICIENT_CASH, + FailureInfo.REDEEM_TRANSFER_OUT_NOT_POSSIBLE + ); + } + + ///////////////////////// + // EFFECTS & INTERACTIONS + // (No safe failures beyond this point) + + /* We write previously calculated values into storage */ + totalSupply = vars.totalSupplyNew; + accountTokens[redeemer] = vars.accountTokensNew; + + /* We emit a Transfer event, and a Redeem event */ + emit Transfer(redeemer, address(this), vars.redeemTokens); + emit Redeem(redeemer, vars.redeemAmount, vars.redeemTokens); + + /* We call the defense hook */ + comptroller.redeemVerify( + address(this), + redeemer, + vars.redeemAmount, + vars.redeemTokens + ); + + /* + * We invoke doTransferOut for the redeemer and the redeemAmount. + * Note: The mToken must handle variations between ERC-20 and GLMR underlying. + * On success, the mToken has redeemAmount less of cash. + * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred. + */ + doTransferOut(redeemer, vars.redeemAmount); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Sender borrows assets from the protocol to their own address + * @param borrowAmount The amount of the underlying asset to borrow + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function borrowInternal( + uint borrowAmount + ) internal nonReentrant returns (uint) { + uint error = accrueInterest(); + if (error != uint(Error.NO_ERROR)) { + // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed + return + fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED); + } + // borrowFresh emits borrow-specific logs on errors, so we don't need to + return borrowFresh(payable(msg.sender), borrowAmount); + } + + struct BorrowLocalVars { + MathError mathErr; + uint accountBorrows; + uint accountBorrowsNew; + uint totalBorrowsNew; + } + + /** + * @notice Users borrow assets from the protocol to their own address + * @param borrowAmount The amount of the underlying asset to borrow + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function borrowFresh( + address payable borrower, + uint borrowAmount + ) internal returns (uint) { + /* Fail if borrow not allowed */ + uint allowed = comptroller.borrowAllowed( + address(this), + borrower, + borrowAmount + ); + if (allowed != 0) { + return + failOpaque( + Error.COMPTROLLER_REJECTION, + FailureInfo.BORROW_COMPTROLLER_REJECTION, + allowed + ); + } + + /* Verify market's block timestamp equals current block timestamp */ + if (accrualBlockTimestamp != getBlockTimestamp()) { + return + fail( + Error.MARKET_NOT_FRESH, + FailureInfo.BORROW_FRESHNESS_CHECK + ); + } + + /* Fail gracefully if protocol has insufficient underlying cash */ + if (getCashPrior() < borrowAmount) { + return + fail( + Error.TOKEN_INSUFFICIENT_CASH, + FailureInfo.BORROW_CASH_NOT_AVAILABLE + ); + } + + BorrowLocalVars memory vars; + + /* + * We calculate the new borrower and total borrow balances, failing on overflow: + * accountBorrowsNew = accountBorrows + borrowAmount + * totalBorrowsNew = totalBorrows + borrowAmount + */ + (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal( + borrower + ); + if (vars.mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo.BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED, + uint(vars.mathErr) + ); + } + + (vars.mathErr, vars.accountBorrowsNew) = addUInt( + vars.accountBorrows, + borrowAmount + ); + if (vars.mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo + .BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED, + uint(vars.mathErr) + ); + } + + (vars.mathErr, vars.totalBorrowsNew) = addUInt( + totalBorrows, + borrowAmount + ); + if (vars.mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo.BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED, + uint(vars.mathErr) + ); + } + + ///////////////////////// + // EFFECTS & INTERACTIONS + // (No safe failures beyond this point) + + /* We write the previously calculated values into storage */ + accountBorrows[borrower].principal = vars.accountBorrowsNew; + accountBorrows[borrower].interestIndex = borrowIndex; + totalBorrows = vars.totalBorrowsNew; + + /* We emit a Borrow event */ + emit Borrow( + borrower, + borrowAmount, + vars.accountBorrowsNew, + vars.totalBorrowsNew + ); + + /* + * We invoke doTransferOut for the borrower and the borrowAmount. + * Note: The mToken must handle variations between ERC-20 and GLMR underlying. + * On success, the mToken borrowAmount less of cash. + * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred. + */ + doTransferOut(borrower, borrowAmount); + + /* We call the defense hook */ + // unused function + // comptroller.borrowVerify(address(this), borrower, borrowAmount); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Sender repays their own borrow + * @param repayAmount The amount to repay + * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount. + */ + function repayBorrowInternal( + uint repayAmount + ) internal nonReentrant returns (uint, uint) { + uint error = accrueInterest(); + if (error != uint(Error.NO_ERROR)) { + // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed + return ( + fail( + Error(error), + FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED + ), + 0 + ); + } + // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to + return repayBorrowFresh(msg.sender, msg.sender, repayAmount); + } + + /** + * @notice Sender repays a borrow belonging to borrower + * @param borrower the account with the debt being payed off + * @param repayAmount The amount to repay + * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount. + */ + function repayBorrowBehalfInternal( + address borrower, + uint repayAmount + ) internal nonReentrant returns (uint, uint) { + uint error = accrueInterest(); + if (error != uint(Error.NO_ERROR)) { + // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed + return ( + fail( + Error(error), + FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED + ), + 0 + ); + } + // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to + return repayBorrowFresh(msg.sender, borrower, repayAmount); + } + + struct RepayBorrowLocalVars { + Error err; + MathError mathErr; + uint repayAmount; + uint borrowerIndex; + uint accountBorrows; + uint accountBorrowsNew; + uint totalBorrowsNew; + uint actualRepayAmount; + } + + /** + * @notice Borrows are repaid by another user (possibly the borrower). + * @param payer the account paying off the borrow + * @param borrower the account with the debt being payed off + * @param repayAmount the amount of underlying tokens being returned + * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount. + */ + function repayBorrowFresh( + address payer, + address borrower, + uint repayAmount + ) internal returns (uint, uint) { + /* Fail if repayBorrow not allowed */ + uint allowed = comptroller.repayBorrowAllowed( + address(this), + payer, + borrower, + repayAmount + ); + if (allowed != 0) { + return ( + failOpaque( + Error.COMPTROLLER_REJECTION, + FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, + allowed + ), + 0 + ); + } + + /* Verify market's block timestamp equals current block timestamp */ + if (accrualBlockTimestamp != getBlockTimestamp()) { + return ( + fail( + Error.MARKET_NOT_FRESH, + FailureInfo.REPAY_BORROW_FRESHNESS_CHECK + ), + 0 + ); + } + + RepayBorrowLocalVars memory vars; + + /* We remember the original borrowerIndex for verification purposes */ + vars.borrowerIndex = accountBorrows[borrower].interestIndex; + + /* We fetch the amount the borrower owes, with accumulated interest */ + (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal( + borrower + ); + if (vars.mathErr != MathError.NO_ERROR) { + return ( + failOpaque( + Error.MATH_ERROR, + FailureInfo + .REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED, + uint(vars.mathErr) + ), + 0 + ); + } + + /* If repayAmount == uint.max, repayAmount = accountBorrows */ + if (repayAmount == type(uint).max) { + vars.repayAmount = vars.accountBorrows; + } else { + vars.repayAmount = repayAmount; + } + + ///////////////////////// + // EFFECTS & INTERACTIONS + // (No safe failures beyond this point) + + /* + * We call doTransferIn for the payer and the repayAmount + * Note: The mToken must handle variations between ERC-20 and GLMR underlying. + * On success, the mToken holds an additional repayAmount of cash. + * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred. + * it returns the amount actually transferred, in case of a fee. + */ + vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount); + + /* + * We calculate the new borrower and total borrow balances, failing on underflow: + * accountBorrowsNew = accountBorrows - actualRepayAmount + * totalBorrowsNew = totalBorrows - actualRepayAmount + */ + (vars.mathErr, vars.accountBorrowsNew) = subUInt( + vars.accountBorrows, + vars.actualRepayAmount + ); + require( + vars.mathErr == MathError.NO_ERROR, + "REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED" + ); + + (vars.mathErr, vars.totalBorrowsNew) = subUInt( + totalBorrows, + vars.actualRepayAmount + ); + require( + vars.mathErr == MathError.NO_ERROR, + "REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED" + ); + + /* We write the previously calculated values into storage */ + accountBorrows[borrower].principal = vars.accountBorrowsNew; + accountBorrows[borrower].interestIndex = borrowIndex; + totalBorrows = vars.totalBorrowsNew; + + /* We emit a RepayBorrow event */ + emit RepayBorrow( + payer, + borrower, + vars.actualRepayAmount, + vars.accountBorrowsNew, + vars.totalBorrowsNew + ); + + /* We call the defense hook */ + // unused function + // comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex); + + return (uint(Error.NO_ERROR), vars.actualRepayAmount); + } + + /** + * @notice The sender liquidates the borrowers collateral. + * The collateral seized is transferred to the liquidator. + * @param borrower The borrower of this mToken to be liquidated + * @param mTokenCollateral The market in which to seize collateral from the borrower + * @param repayAmount The amount of the underlying borrowed asset to repay + * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount. + */ + function liquidateBorrowInternal( + address borrower, + uint repayAmount, + MTokenInterface mTokenCollateral + ) internal nonReentrant returns (uint, uint) { + uint error = accrueInterest(); + if (error != uint(Error.NO_ERROR)) { + // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed + return ( + fail( + Error(error), + FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED + ), + 0 + ); + } + + error = mTokenCollateral.accrueInterest(); + if (error != uint(Error.NO_ERROR)) { + // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed + return ( + fail( + Error(error), + FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED + ), + 0 + ); + } + + // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to + return + liquidateBorrowFresh( + msg.sender, + borrower, + repayAmount, + mTokenCollateral + ); + } + + /** + * @notice The liquidator liquidates the borrowers collateral. + * The collateral seized is transferred to the liquidator. + * @param borrower The borrower of this mToken to be liquidated + * @param liquidator The address repaying the borrow and seizing collateral + * @param mTokenCollateral The market in which to seize collateral from the borrower + * @param repayAmount The amount of the underlying borrowed asset to repay + * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount. + */ + function liquidateBorrowFresh( + address liquidator, + address borrower, + uint repayAmount, + MTokenInterface mTokenCollateral + ) internal returns (uint, uint) { + /* Fail if liquidate not allowed */ + uint allowed = comptroller.liquidateBorrowAllowed( + address(this), + address(mTokenCollateral), + liquidator, + borrower, + repayAmount + ); + if (allowed != 0) { + return ( + failOpaque( + Error.COMPTROLLER_REJECTION, + FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, + allowed + ), + 0 + ); + } + + /* Verify market's block timestamp equals current block timestamp */ + if (accrualBlockTimestamp != getBlockTimestamp()) { + return ( + fail( + Error.MARKET_NOT_FRESH, + FailureInfo.LIQUIDATE_FRESHNESS_CHECK + ), + 0 + ); + } + + /* Verify mTokenCollateral market's block timestamp equals current block timestamp */ + if (mTokenCollateral.accrualBlockTimestamp() != getBlockTimestamp()) { + return ( + fail( + Error.MARKET_NOT_FRESH, + FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK + ), + 0 + ); + } + + /* Fail if borrower = liquidator */ + if (borrower == liquidator) { + return ( + fail( + Error.INVALID_ACCOUNT_PAIR, + FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER + ), + 0 + ); + } + + /* Fail if repayAmount = 0 */ + if (repayAmount == 0) { + return ( + fail( + Error.INVALID_CLOSE_AMOUNT_REQUESTED, + FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO + ), + 0 + ); + } + + /* Fail if repayAmount = uint.max */ + if (repayAmount == type(uint).max) { + return ( + fail( + Error.INVALID_CLOSE_AMOUNT_REQUESTED, + FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX + ), + 0 + ); + } + + /* Fail if repayBorrow fails */ + (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh( + liquidator, + borrower, + repayAmount + ); + if (repayBorrowError != uint(Error.NO_ERROR)) { + return ( + fail( + Error(repayBorrowError), + FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED + ), + 0 + ); + } + + ///////////////////////// + // EFFECTS & INTERACTIONS + // (No safe failures beyond this point) + + /* We calculate the number of collateral tokens that will be seized */ + (uint amountSeizeError, uint seizeTokens) = comptroller + .liquidateCalculateSeizeTokens( + address(this), + address(mTokenCollateral), + actualRepayAmount + ); + require( + amountSeizeError == uint(Error.NO_ERROR), + "LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED" + ); + + /* Revert if borrower collateral token balance < seizeTokens */ + require( + mTokenCollateral.balanceOf(borrower) >= seizeTokens, + "LIQUIDATE_SEIZE_TOO_MUCH" + ); + + // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call + uint seizeError; + if (address(mTokenCollateral) == address(this)) { + seizeError = seizeInternal( + address(this), + liquidator, + borrower, + seizeTokens + ); + } else { + seizeError = mTokenCollateral.seize( + liquidator, + borrower, + seizeTokens + ); + } + + /* Revert if seize tokens fails (since we cannot be sure of side effects) */ + require(seizeError == uint(Error.NO_ERROR), "token seizure failed"); + + /* We emit a LiquidateBorrow event */ + emit LiquidateBorrow( + liquidator, + borrower, + actualRepayAmount, + address(mTokenCollateral), + seizeTokens + ); + + /* We call the defense hook */ + // unused function + // comptroller.liquidateBorrowVerify(address(this), address(mTokenCollateral), liquidator, borrower, actualRepayAmount, seizeTokens); + + return (uint(Error.NO_ERROR), actualRepayAmount); + } + + /** + * @notice Transfers collateral tokens (this market) to the liquidator. + * @dev Will fail unless called by another mToken during the process of liquidation. + * Its absolutely critical to use msg.sender as the borrowed mToken and not a parameter. + * @param liquidator The account receiving seized collateral + * @param borrower The account having collateral seized + * @param seizeTokens The number of mTokens to seize + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function seize( + address liquidator, + address borrower, + uint seizeTokens + ) external override nonReentrant returns (uint) { + return seizeInternal(msg.sender, liquidator, borrower, seizeTokens); + } + + struct SeizeInternalLocalVars { + MathError mathErr; + uint borrowerTokensNew; + uint liquidatorTokensNew; + uint liquidatorSeizeTokens; + uint protocolSeizeTokens; + uint protocolSeizeAmount; + uint exchangeRateMantissa; + uint totalReservesNew; + uint totalSupplyNew; + } + + /** + * @notice Transfers collateral tokens (this market) to the liquidator. + * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another MToken. + * Its absolutely critical to use msg.sender as the seizer mToken and not a parameter. + * @param seizerToken The contract seizing the collateral (i.e. borrowed mToken) + * @param liquidator The account receiving seized collateral + * @param borrower The account having collateral seized + * @param seizeTokens The number of mTokens to seize + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function seizeInternal( + address seizerToken, + address liquidator, + address borrower, + uint seizeTokens + ) internal returns (uint) { + /* Fail if seize not allowed */ + uint allowed = comptroller.seizeAllowed( + address(this), + seizerToken, + liquidator, + borrower, + seizeTokens + ); + if (allowed != 0) { + return + failOpaque( + Error.COMPTROLLER_REJECTION, + FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, + allowed + ); + } + + /* Fail if borrower = liquidator */ + if (borrower == liquidator) { + return + fail( + Error.INVALID_ACCOUNT_PAIR, + FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER + ); + } + + SeizeInternalLocalVars memory vars; + + /* + * We calculate the new borrower and liquidator token balances, failing on underflow/overflow: + * borrowerTokensNew = accountTokens[borrower] - seizeTokens + * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens + */ + (vars.mathErr, vars.borrowerTokensNew) = subUInt( + accountTokens[borrower], + seizeTokens + ); + if (vars.mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, + uint(vars.mathErr) + ); + } + + vars.protocolSeizeTokens = mul_( + seizeTokens, + Exp({mantissa: protocolSeizeShareMantissa}) + ); + vars.liquidatorSeizeTokens = sub_( + seizeTokens, + vars.protocolSeizeTokens + ); + + ( + vars.mathErr, + vars.exchangeRateMantissa + ) = exchangeRateStoredInternal(); + require(vars.mathErr == MathError.NO_ERROR, "exchange rate math error"); + + vars.protocolSeizeAmount = mul_ScalarTruncate( + Exp({mantissa: vars.exchangeRateMantissa}), + vars.protocolSeizeTokens + ); + + vars.totalReservesNew = add_(totalReserves, vars.protocolSeizeAmount); + vars.totalSupplyNew = sub_(totalSupply, vars.protocolSeizeTokens); + + (vars.mathErr, vars.liquidatorTokensNew) = addUInt( + accountTokens[liquidator], + vars.liquidatorSeizeTokens + ); + if (vars.mathErr != MathError.NO_ERROR) { + return + failOpaque( + Error.MATH_ERROR, + FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, + uint(vars.mathErr) + ); + } + + ///////////////////////// + // EFFECTS & INTERACTIONS + // (No safe failures beyond this point) + + /* We write the previously calculated values into storage */ + totalReserves = vars.totalReservesNew; + totalSupply = vars.totalSupplyNew; + accountTokens[borrower] = vars.borrowerTokensNew; + accountTokens[liquidator] = vars.liquidatorTokensNew; + + /* Emit a Transfer event */ + emit Transfer(borrower, liquidator, vars.liquidatorSeizeTokens); + emit Transfer(borrower, address(this), vars.protocolSeizeTokens); + emit ReservesAdded( + address(this), + vars.protocolSeizeAmount, + vars.totalReservesNew + ); + + /* We call the defense hook */ + // unused function + // comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens); + + return uint(Error.NO_ERROR); + } + + /*** Admin Functions ***/ + + /** + * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. + * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. + * @param newPendingAdmin New pending admin. + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function _setPendingAdmin( + address payable newPendingAdmin + ) external override returns (uint) { + // Check caller = admin + if (msg.sender != admin) { + return + fail( + Error.UNAUTHORIZED, + FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK + ); + } + + // Save current value, if any, for inclusion in log + address oldPendingAdmin = pendingAdmin; + + // Store pendingAdmin with value newPendingAdmin + pendingAdmin = newPendingAdmin; + + // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin) + emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin + * @dev Admin function for pending admin to accept role and update admin + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function _acceptAdmin() external override returns (uint) { + // Check caller is pendingAdmin and pendingAdmin ≠ address(0) + if (msg.sender != pendingAdmin || msg.sender == address(0)) { + return + fail( + Error.UNAUTHORIZED, + FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK + ); + } + + // Save current values for inclusion in log + address oldAdmin = admin; + address oldPendingAdmin = pendingAdmin; + + // Store admin with value pendingAdmin + admin = pendingAdmin; + + // Clear the pending value + pendingAdmin = payable(address(0)); + + emit NewAdmin(oldAdmin, admin); + emit NewPendingAdmin(oldPendingAdmin, pendingAdmin); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Sets a new comptroller for the market + * @dev Admin function to set a new comptroller + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function _setComptroller( + ComptrollerInterface newComptroller + ) public override returns (uint) { + // Check caller is admin + if (msg.sender != admin) { + return + fail( + Error.UNAUTHORIZED, + FailureInfo.SET_COMPTROLLER_OWNER_CHECK + ); + } + + ComptrollerInterface oldComptroller = comptroller; + // Ensure invoke comptroller.isComptroller() returns true + require(newComptroller.isComptroller(), "marker method returned false"); + + // Set market's comptroller to newComptroller + comptroller = newComptroller; + + // Emit NewComptroller(oldComptroller, newComptroller) + emit NewComptroller(oldComptroller, newComptroller); + + return uint(Error.NO_ERROR); + } + + /** + * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh + * @dev Admin function to accrue interest and set a new reserve factor + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function _setReserveFactor( + uint newReserveFactorMantissa + ) external override nonReentrant returns (uint) { + uint error = accrueInterest(); + if (error != uint(Error.NO_ERROR)) { + // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed. + return + fail( + Error(error), + FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED + ); + } + // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to. + return _setReserveFactorFresh(newReserveFactorMantissa); + } + + /** + * @notice Sets a new reserve factor for the protocol (*requires fresh interest accrual) + * @dev Admin function to set a new reserve factor + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function _setReserveFactorFresh( + uint newReserveFactorMantissa + ) internal returns (uint) { + // Check caller is admin + if (msg.sender != admin) { + return + fail( + Error.UNAUTHORIZED, + FailureInfo.SET_RESERVE_FACTOR_ADMIN_CHECK + ); + } + + // Verify market's block timestamp equals current block timestamp + if (accrualBlockTimestamp != getBlockTimestamp()) { + return + fail( + Error.MARKET_NOT_FRESH, + FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK + ); + } + + // Check newReserveFactor ≤ maxReserveFactor + if (newReserveFactorMantissa > reserveFactorMaxMantissa) { + return + fail( + Error.BAD_INPUT, + FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK + ); + } + + uint oldReserveFactorMantissa = reserveFactorMantissa; + reserveFactorMantissa = newReserveFactorMantissa; + + emit NewReserveFactor( + oldReserveFactorMantissa, + newReserveFactorMantissa + ); + + return uint(Error.NO_ERROR); + } + + /** + * @notice Accrues interest and reduces reserves by transferring from msg.sender + * @param addAmount Amount of addition to reserves + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function _addReservesInternal( + uint addAmount + ) internal nonReentrant returns (uint) { + uint error = accrueInterest(); + if (error != uint(Error.NO_ERROR)) { + // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed. + return + fail( + Error(error), + FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED + ); + } + + // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to. + (error, ) = _addReservesFresh(addAmount); + return error; + } + + /** + * @notice Add reserves by transferring from caller + * @dev Requires fresh interest accrual + * @param addAmount Amount of addition to reserves + * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees + */ + function _addReservesFresh(uint addAmount) internal returns (uint, uint) { + // totalReserves + actualAddAmount + uint totalReservesNew; + uint actualAddAmount; + + // We fail gracefully unless market's block timestamp equals current block timestamp + if (accrualBlockTimestamp != getBlockTimestamp()) { + return ( + fail( + Error.MARKET_NOT_FRESH, + FailureInfo.ADD_RESERVES_FRESH_CHECK + ), + actualAddAmount + ); + } + + ///////////////////////// + // EFFECTS & INTERACTIONS + // (No safe failures beyond this point) + + /* + * We call doTransferIn for the caller and the addAmount + * Note: The mToken must handle variations between ERC-20 and GLMR underlying. + * On success, the mToken holds an additional addAmount of cash. + * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred. + * it returns the amount actually transferred, in case of a fee. + */ + + actualAddAmount = doTransferIn(msg.sender, addAmount); + + totalReservesNew = totalReserves + actualAddAmount; + + /* Revert on overflow */ + require( + totalReservesNew >= totalReserves, + "add reserves unexpected overflow" + ); + + // Store reserves[n+1] = reserves[n] + actualAddAmount + totalReserves = totalReservesNew; + + /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */ + emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew); + + /* Return (NO_ERROR, actualAddAmount) */ + return (uint(Error.NO_ERROR), actualAddAmount); + } + + /** + * @notice Accrues interest and reduces reserves by transferring to admin + * @param reduceAmount Amount of reduction to reserves + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function _reduceReserves( + uint reduceAmount + ) external override nonReentrant returns (uint) { + uint error = accrueInterest(); + if (error != uint(Error.NO_ERROR)) { + // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed. + return + fail( + Error(error), + FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED + ); + } + // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to. + return _reduceReservesFresh(reduceAmount); + } + + /** + * @notice Reduces reserves by transferring to admin + * @dev Requires fresh interest accrual + * @param reduceAmount Amount of reduction to reserves + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function _reduceReservesFresh(uint reduceAmount) internal returns (uint) { + // totalReserves - reduceAmount + uint totalReservesNew; + + // Check caller is admin + if (msg.sender != admin) { + return + fail( + Error.UNAUTHORIZED, + FailureInfo.REDUCE_RESERVES_ADMIN_CHECK + ); + } + + // We fail gracefully unless market's block timestamp equals current block timestamp + if (accrualBlockTimestamp != getBlockTimestamp()) { + return + fail( + Error.MARKET_NOT_FRESH, + FailureInfo.REDUCE_RESERVES_FRESH_CHECK + ); + } + + // Fail gracefully if protocol has insufficient underlying cash + if (getCashPrior() < reduceAmount) { + return + fail( + Error.TOKEN_INSUFFICIENT_CASH, + FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE + ); + } + + // Check reduceAmount ≤ reserves[n] (totalReserves) + if (reduceAmount > totalReserves) { + return + fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION); + } + + ///////////////////////// + // EFFECTS & INTERACTIONS + // (No safe failures beyond this point) + + totalReservesNew = totalReserves - reduceAmount; + // We checked reduceAmount <= totalReserves above, so this should never revert. + require( + totalReservesNew <= totalReserves, + "reduce reserves unexpected underflow" + ); + + // Store reserves[n+1] = reserves[n] - reduceAmount + totalReserves = totalReservesNew; + + // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred. + doTransferOut(admin, reduceAmount); + + emit ReservesReduced(admin, reduceAmount, totalReservesNew); + + return uint(Error.NO_ERROR); + } + + /** + * @notice accrues interest and updates the interest rate model using _setInterestRateModelFresh + * @dev Admin function to accrue interest and update the interest rate model + * @param newInterestRateModel the new interest rate model to use + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function _setInterestRateModel( + InterestRateModel newInterestRateModel + ) public override returns (uint) { + uint error = accrueInterest(); + if (error != uint(Error.NO_ERROR)) { + // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed + return + fail( + Error(error), + FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED + ); + } + // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to. + return _setInterestRateModelFresh(newInterestRateModel); + } + + /** + * @notice updates the interest rate model (*requires fresh interest accrual) + * @dev Admin function to update the interest rate model + * @param newInterestRateModel the new interest rate model to use + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function _setInterestRateModelFresh( + InterestRateModel newInterestRateModel + ) internal returns (uint) { + // Used to store old model for use in the event that is emitted on success + InterestRateModel oldInterestRateModel; + + // Check caller is admin + if (msg.sender != admin) { + return + fail( + Error.UNAUTHORIZED, + FailureInfo.SET_INTEREST_RATE_MODEL_OWNER_CHECK + ); + } + + // We fail gracefully unless market's block timestamp equals current block timestamp + if (accrualBlockTimestamp != getBlockTimestamp()) { + return + fail( + Error.MARKET_NOT_FRESH, + FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK + ); + } + + // Track the market's current interest rate model + oldInterestRateModel = interestRateModel; + + // Ensure invoke newInterestRateModel.isInterestRateModel() returns true + require( + newInterestRateModel.isInterestRateModel(), + "marker method returned false" + ); + + // Set the interest rate model to newInterestRateModel + interestRateModel = newInterestRateModel; + + // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel) + emit NewMarketInterestRateModel( + oldInterestRateModel, + newInterestRateModel + ); + + return uint(Error.NO_ERROR); + } + + /** + * @notice accrues interest and updates the protocol seize share using _setProtocolSeizeShareFresh + * @dev Admin function to accrue interest and update the protocol seize share + * @param newProtocolSeizeShareMantissa the new protocol seize share to use + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function _setProtocolSeizeShare( + uint newProtocolSeizeShareMantissa + ) external override nonReentrant returns (uint) { + uint error = accrueInterest(); + if (error != uint(Error.NO_ERROR)) { + // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of protocol seize share failed + return + fail( + Error(error), + FailureInfo.SET_PROTOCOL_SEIZE_SHARE_ACCRUE_INTEREST_FAILED + ); + } + // _setProtocolSeizeShareFresh emits protocol-seize-share-update-specific logs on errors, so we don't need to. + return _setProtocolSeizeShareFresh(newProtocolSeizeShareMantissa); + } + + /** + * @notice updates the protocol seize share (*requires fresh interest accrual) + * @dev Admin function to update the protocol seize share + * @param newProtocolSeizeShareMantissa the new protocol seize share to use + * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) + */ + function _setProtocolSeizeShareFresh( + uint newProtocolSeizeShareMantissa + ) internal returns (uint) { + // Used to store old share for use in the event that is emitted on success + uint oldProtocolSeizeShareMantissa; + + // Check caller is admin + if (msg.sender != admin) { + return + fail( + Error.UNAUTHORIZED, + FailureInfo.SET_PROTOCOL_SEIZE_SHARE_OWNER_CHECK + ); + } + + // We fail gracefully unless market's block timestamp equals current block timestamp + if (accrualBlockTimestamp != getBlockTimestamp()) { + return + fail( + Error.MARKET_NOT_FRESH, + FailureInfo.SET_PROTOCOL_SEIZE_SHARE_FRESH_CHECK + ); + } + + // Track the market's current protocol seize share + oldProtocolSeizeShareMantissa = protocolSeizeShareMantissa; + + // Set the protocol seize share to newProtocolSeizeShareMantissa + protocolSeizeShareMantissa = newProtocolSeizeShareMantissa; + + // Emit NewProtocolSeizeShareMantissa(oldProtocolSeizeShareMantissa, newProtocolSeizeShareMantissa) + emit NewProtocolSeizeShare( + oldProtocolSeizeShareMantissa, + newProtocolSeizeShareMantissa + ); + + return uint(Error.NO_ERROR); + } + + /*** Safe Token ***/ + + /** + * @notice Gets balance of this contract in terms of the underlying + * @dev This excludes the value of the current message, if any + * @return The quantity of underlying owned by this contract + */ + function getCashPrior() internal view virtual returns (uint); + + /** + * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee. + * This may revert due to insufficient balance or insufficient allowance. + */ + function doTransferIn( + address from, + uint amount + ) internal virtual returns (uint); + + /** + * @dev Performs a transfer out, ideally returning an explanatory error code upon failure tather than reverting. + * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract. + * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions. + */ + function doTransferOut(address payable to, uint amount) internal virtual; + + /*** Reentrancy Guard ***/ + + /** + * @dev Prevents a contract from calling itself, directly or indirectly. + */ + modifier nonReentrant() { + require(_notEntered, "re-entered"); + _notEntered = false; + _; + _notEntered = true; // get a gas-refund post-Istanbul + } +} diff --git a/plan/agw/research/preset-catalog-2026-10-15/README.md b/plan/agw/research/preset-catalog-2026-10-15/README.md new file mode 100644 index 00000000..3cf86023 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/README.md @@ -0,0 +1,402 @@ + + +# EigenLayer + +**EigenLayer** is a protocol built on Ethereum that introduces Restaking, a primitive for app and service builders to make verifiable commitments to their users. + +EigenLayer brings together Restakers, Operators, and Autonomous Verifiable Services (AVSs) to extend Ethereum's cryptoeconomic security with penalty and reward commitments (like slashing) on staked assets acting as security. The protocol supports permissionless security; EIGEN, Native ETH, LSTs, and ERC-20s. + +## Deployments + +The deployments on `mainnet`, `base`, `sepolia`, `hoodi`, and `base sepolia` are on the below versions: + +| Environment | Version | Core Protocol Deployed | Supports Native Restaking | Supports Multichain | +| -------- | -------- | -------- | -------- | -------- | +| Mainnet Ethereum | [`v1.13.0`](https://github.com/Layr-Labs/eigenlayer-contracts/releases/tag/v1.13.0) | Yes | Yes | Yes (source & destination) | +| Base | [`v1.9.0`](https://github.com/Layr-Labs/eigenlayer-contracts/releases/tag/v1.9.0) | No | No | Yes (destination) | +| Testnet Sepolia | [`v1.12.1`](https://github.com/Layr-Labs/eigenlayer-contracts/releases/tag/v1.12.1) | Yes | No | Yes (source & destination) | +| Testnet Hoodi | [`v1.11.0`](https://github.com/Layr-Labs/eigenlayer-contracts/releases/tag/v1.11.0) | Yes | Yes | No | +| Testnet Base Sepolia | [`v1.9.0`](https://github.com/Layr-Labs/eigenlayer-contracts/releases/tag/v1.9.0) | No | No | Yes (destination) | + +### Current Deployment Contracts + +
+ Mainnet Ethereum + + +###### Core + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`DelegationManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.6.0/src/contracts/core/DelegationManager.sol) | [`0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A`](https://etherscan.io/address/0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A) | [`0xE702...cE75`](https://etherscan.io/address/0xE7022a128Acd4C6cad7aFf6FA874D61f984BcE75) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/core/StrategyManager.sol) | [`0x858646372CC42E1A627fcE94aa7A7033e7CF075A`](https://etherscan.io/address/0x858646372CC42E1A627fcE94aa7A7033e7CF075A) | [`0xa753...656A`](https://etherscan.io/address/0xa7536C85898dC424c6BFe8592F983661f830656A) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`EigenPodManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.6.0/src/contracts/pods/EigenPodManager.sol) | [`0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338`](https://etherscan.io/address/0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338) | [`0xd22d...E9dB`](https://etherscan.io/address/0xd22dd829779ADBf3869fb224F703452f7F95E9dB) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`AVSDirectory`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.3.0/src/contracts/core/AVSDirectory.sol) | [`0x135dda560e946695d6f155dacafc6f1f25c1f5af`](https://etherscan.io/address/0x135dda560e946695d6f155dacafc6f1f25c1f5af) | [`0xcD35...862b`](https://etherscan.io/address/0xcD35Cef328b496fA9d70a8d7C34EF3434614862b) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`RewardsCoordinator`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/core/RewardsCoordinator.sol) | [`0x7750d328b314EfFa365A0402CcfD489B80B0adda`](https://etherscan.io/address/0x7750d328b314EfFa365A0402CcfD489B80B0adda) | [`0xa067...3C26`](https://etherscan.io/address/0xa0673C53980665a706352412D2538bA005403C26) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`PermissionController`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.3.0/src/contracts/permissions/PermissionController.sol) | [`0x25E5F8B1E7aDf44518d35D5B2271f114e081f0E5`](https://etherscan.io/address/0x25E5F8B1E7aDf44518d35D5B2271f114e081f0E5) | [`0x36dd...EEd2`](https://etherscan.io/address/0x36dd260AbF606172875E6B5B7A96B435DC74EEd2) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`AllocationManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.6.0/src/contracts/core/AllocationManager.sol) | [`0x948a420b8CC1d6BFd0B6087C2E7c344a2CD0bc39`](https://etherscan.io/address/0x948a420b8CC1d6BFd0B6087C2E7c344a2CD0bc39) | [`0xdA2A...97C4`](https://etherscan.io/address/0xdA2A68D318A571dD550F2EcbCb09bf50497e97C4) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`EmissionsController`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/core/EmissionsController.sol) | [`0x619F988b4EA2f896ED068d84cE6F52550d6acE84`](https://etherscan.io/address/0x619F988b4EA2f896ED068d84cE6F52550d6acE84) | [`0x29Db...CA01`](https://etherscan.io/address/0x29Db9526F3A95F3059A5d3a9A05B611eBA7dcA01) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### Strategies + +Anyone can deploy and whitelist strategies for standard ERC20s by using the `StrategyFactory` deployed to the address below (see [docs](./docs/core/StrategyManager.md#strategyfactorydeploynewstrategy)). Strategies deployed from the `StrategyFactory` are deployed using the beacon proxy pattern: + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`StrategyFactory`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/StrategyFactory.sol) | [`0x5e4C39Ad7A3E881585e383dB9827EB4811f6F647`](https://etherscan.io/address/0x5e4C39Ad7A3E881585e383dB9827EB4811f6F647) | [`0xbbc4...2b76`](https://etherscan.io/address/0xbbc4124C74C567396181fBfbaE746b80619D2b76) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyBase`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/StrategyBase.sol) | [`0x0ed6703C298d28aE0878d1b28e88cA87F9662fE9`](https://etherscan.io/address/0x0ed6703c298d28ae0878d1b28e88ca87f9662fe9) | [`0x8F6b...1Ce`](https://etherscan.io/address/0x8F6be4A906376bB4481E78cBF6FC783Cc0f8D1Ce) | - Beacon: [`BeaconProxy`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.0/contracts/proxy/beacon/BeaconProxy.sol)
- Strategies: [`UpgradeableBeacon`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/proxy/beacon/UpgradeableBeacon.sol) | +| [`DurationVaultStrategy`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/DurationVaultStrategy.sol) | [`0x0fCE0A591D96BB76883323eF555867111E2050a9`](https://etherscan.io/address/0x0fCE0A591D96BB76883323eF555867111E2050a9) | [`0xc946...8903`](https://etherscan.io/address/0xc946787cFd6c155886C673BF9815C841c1718903) | - Beacon: [`BeaconProxy`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.0/contracts/proxy/beacon/BeaconProxy.sol)
- Strategies: [`UpgradeableBeacon`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/proxy/beacon/UpgradeableBeacon.sol) | + +The following strategies were originally deployed and whitelisted outside of the `StrategyFactory`: + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`StrategyBase (cbETH)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc`](https://etherscan.io/address/0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc) | [`0xB427...7230`](https://etherscan.io/address/0xB427E2Eb4Bb33eE3f1ee72dc9e347e8625a72230) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyBase (stETH)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0x93c4b944D05dfe6df7645A86cd2206016c51564D`](https://etherscan.io/address/0x93c4b944D05dfe6df7645A86cd2206016c51564D) | [`0xB427...7230`](https://etherscan.io/address/0xB427E2Eb4Bb33eE3f1ee72dc9e347e8625a72230) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyBase (rETH)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0x1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2`](https://etherscan.io/address/0x1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2) | [`0xB427...7230`](https://etherscan.io/address/0xB427E2Eb4Bb33eE3f1ee72dc9e347e8625a72230) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyBase (ETHx)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0x9d7eD45EE2E8FC5482fa2428f15C971e6369011d`](https://etherscan.io/address/0x9d7eD45EE2E8FC5482fa2428f15C971e6369011d) | [`0xB427...7230`](https://etherscan.io/address/0xB427E2Eb4Bb33eE3f1ee72dc9e347e8625a72230) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyBase (ankrETH)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0x13760F50a9d7377e4F20CB8CF9e4c26586c658ff`](https://etherscan.io/address/0x13760F50a9d7377e4F20CB8CF9e4c26586c658ff) | [`0xB427...7230`](https://etherscan.io/address/0xB427E2Eb4Bb33eE3f1ee72dc9e347e8625a72230) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyBase (OETH)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0xa4C637e0F704745D182e4D38cAb7E7485321d059`](https://etherscan.io/address/0xa4C637e0F704745D182e4D38cAb7E7485321d059) | [`0xB427...7230`](https://etherscan.io/address/0xB427E2Eb4Bb33eE3f1ee72dc9e347e8625a72230) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyBase (osETH)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0x57ba429517c3473B6d34CA9aCd56c0e735b94c02`](https://etherscan.io/address/0x57ba429517c3473B6d34CA9aCd56c0e735b94c02) | [`0xB427...7230`](https://etherscan.io/address/0xB427E2Eb4Bb33eE3f1ee72dc9e347e8625a72230) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyBase (swETH)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0x0Fe4F44beE93503346A3Ac9EE5A26b130a5796d6`](https://etherscan.io/address/0x0Fe4F44beE93503346A3Ac9EE5A26b130a5796d6) | [`0xB427...7230`](https://etherscan.io/address/0xB427E2Eb4Bb33eE3f1ee72dc9e347e8625a72230) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyBase (wBETH)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0x7CA911E83dabf90C90dD3De5411a10F1A6112184`](https://etherscan.io/address/0x7CA911E83dabf90C90dD3De5411a10F1A6112184) | [`0xB427...7230`](https://etherscan.io/address/0xB427E2Eb4Bb33eE3f1ee72dc9e347e8625a72230) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyBase (sfrxETH)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0x8CA7A5d6f3acd3A7A8bC468a8CD0FB14B6BD28b6`](https://etherscan.io/address/0x8CA7A5d6f3acd3A7A8bC468a8CD0FB14B6BD28b6) | [`0xB427...7230`](https://etherscan.io/address/0xB427E2Eb4Bb33eE3f1ee72dc9e347e8625a72230) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyBase (lsETH)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0xAe60d8180437b5C34bB956822ac2710972584473`](https://etherscan.io/address/0xAe60d8180437b5C34bB956822ac2710972584473) | [`0xB427...7230`](https://etherscan.io/address/0xB427E2Eb4Bb33eE3f1ee72dc9e347e8625a72230) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyBase (mETH)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/StrategyBaseTVLLimits.sol) | [`0x298aFB19A105D59E74658C4C334Ff360BadE6dd2`](https://etherscan.io/address/0x298aFB19A105D59E74658C4C334Ff360BadE6dd2) | [`0xB427...7230`](https://etherscan.io/address/0xB427E2Eb4Bb33eE3f1ee72dc9e347e8625a72230) | Proxy: [`TUP@4.7.1`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### Strategies - Special + +The following strategies differ significantly from the other strategies deployed/used above: + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`EigenStrategy (EIGEN)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.12.0/src/contracts/strategies/EigenStrategy.sol) | [`0xaCB55C530Acdb2849e6d4f36992Cd8c9D50ED8F7`](https://etherscan.io/address/0xaCB55C530Acdb2849e6d4f36992Cd8c9D50ED8F7) | [`0x509A...8f40`](https://etherscan.io/address/0x509Aadb99487182b21fF4E9e7Eb362a9Ea8E8f40) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| `Beacon Chain ETH` | `0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0` | - | - Used for Beacon Chain ETH shares
- Not a real contract! | + +###### EigenPods + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`EigenPod (beacon)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.6.0/src/contracts/pods/EigenPod.sol) | [`0x5a2a4F2F3C18f09179B6703e63D9eDD165909073`](https://etherscan.io/address/0x5a2a4F2F3C18f09179B6703e63D9eDD165909073) | [`0x53cC...e868`](https://etherscan.io/address/0x53cC2D82E08370Fe1e44a96f69CEc7d5b54ae868) | - Beacon: [`BeaconProxy`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.0/contracts/proxy/beacon/BeaconProxy.sol)
- Pods: [`UpgradeableBeacon`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/proxy/beacon/UpgradeableBeacon.sol) | + +###### EIGEN/bEIGEN + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`Eigen`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.6.0/src/contracts/token/Eigen.sol) | [`0xec53bf9167f50cdeb3ae105f56099aaab9061f83`](https://etherscan.io/address/0xec53bf9167f50cdeb3ae105f56099aaab9061f83) | [`0x2C4A...2E50`](https://etherscan.io/address/0x2C4A81e257381F87F5A5C4bd525116466D972E50) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`Backing Eigen`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.6.0/src/contracts/token/BackingEigen.sol) | [`0x83E9115d334D248Ce39a6f36144aEaB5b3456e75`](https://etherscan.io/address/0x83E9115d334D248Ce39a6f36144aEaB5b3456e75) | [`0xF2b2...9b17`](https://etherscan.io/address/0xF2b225815F70c9b327DC9db758A36c92A4279b17) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`SignedDistributor`](https://etherscan.io/address/0x035bdAeaB85E47710C27EdA7FD754bA80aD4ad02#code) | - | [`0x035b...ad02`](https://etherscan.io/address/0x035bdAeaB85E47710C27EdA7FD754bA80aD4ad02) | - | + +###### AVS + +The following contracts are used by AVSs. + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`ReleaseManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.1/src/contracts/core/ReleaseManager.sol) | [`0xeDA3CAd031c0cf367cF3f517Ee0DC98F9bA80C8F`](https://etherscan.io/address/0xeDA3CAd031c0cf367cF3f517Ee0DC98F9bA80C8F) | [`0xD0cb...13bd`](https://etherscan.io/address/0xD0cb07Df397b122bB7ebaA453356F21f8Ff813bd) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`TaskMailbox`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.1/src/contracts/avs/task/TaskMailbox.sol) | [`0x132b466d9d5723531F68797519DfED701aC2C749`](https://etherscan.io/address/0x132b466d9d5723531F68797519DfED701aC2C749) | [`0xA2A9...c55e`](https://etherscan.io/address/0xA2A9D0F957D81A0f8134F68803240f1CAD81c55e) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### Multichain - Source + +The multichain protocol expects AVSs to register on the source chain. AVS's stakes are then transported to supported destination chains. For the mainnet Ethereum network, the destination chains include Base. + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`CrossChainRegistry`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.1/src/contracts/multichain/CrossChainRegistry.sol) | [`0x9376A5863F2193cdE13e1aB7c678F22554E2Ea2b`](https://etherscan.io/address/0x9376A5863F2193cdE13e1aB7c678F22554E2Ea2b) | [`0xdc23...642C`](https://etherscan.io/address/0xdc2354FaDd4bf0f9857038381917D0089880642C) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`KeyRegistrar`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.1/src/contracts/permissions/KeyRegistrar.sol) | [`0x54f4bC6bDEbe479173a2bbDc31dD7178408A57A4`](https://etherscan.io/address/0x54f4bC6bDEbe479173a2bbDc31dD7178408A57A4) | [`0x0f93...C219`](https://etherscan.io/address/0x0f939726Ab8514c13546804311149a8CC244C219) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### Multichain - Destination + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`OperatorTableUpdater`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.1/src/contracts/multichain/OperatorTableUpdater.sol) | [`0x5557E1fE3068A1e823cE5Dcd052c6C352E2617B5`](https://etherscan.io/address/0x5557E1fE3068A1e823cE5Dcd052c6C352E2617B5) | [`0x8c4F...adF7`](https://etherscan.io/address/0x8c4F429e6d884899ebf4602bd2691920B056adF7) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`ECDSACertificateVerifier`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.1/src/contracts/multichain/ECDSACertificateVerifier.sol) | [`0xd0930ee96D07de4F9d493c259232222e46B6EC25`](https://etherscan.io/address/0xd0930ee96D07de4F9d493c259232222e46B6EC25) | [`0x2d52...40dC`](https://etherscan.io/address/0x2d52c39461795835b1F8F6cD242f4955AaC040dC) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`BN254CertificateVerifier`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.1/src/contracts/multichain/BN254CertificateVerifier.sol) | [`0x3F55654b2b2b86bB11bE2f72657f9C33bf88120A`](https://etherscan.io/address/0x3F55654b2b2b86bB11bE2f72657f9C33bf88120A) | [`0x9907...eaD2`](https://etherscan.io/address/0x9907690007b7ECFE1E03F96beca1a957faE3eaD2) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### Multisigs + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`PauserRegistry`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.1/src/contracts/permissions/PauserRegistry.sol) | - | [`0xB876...2806`](https://etherscan.io/address/0xB8765ed72235d279c3Fb53936E4606db0Ef12806) | | +| [`OZ: TimelockController`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v4.7/contracts/governance/TimelockController.sol) | - | [`0xC06F...Aa2d`](https://etherscan.io/address/0xC06Fd4F821eaC1fF1ae8067b36342899b57BAa2d) | | +| [`OZ: TimelockController (BEIGEN)`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v4.7/contracts/governance/TimelockController.sol) | - | [`0x7381...bc53`](https://etherscan.io/address/0x738130BC8eADe1Bc65A9c056DEa636835896bc53) | | +| [`OZ: Proxy Admin`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/ProxyAdmin.sol) | - | [`0x8b95...2444`](https://etherscan.io/address/0x8b9566AdA63B64d1E1dcF1418b43fd1433b72444) | | +| [`Pauser Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0x5050389572f2d220ad927CcbeA0D406831012390`](https://etherscan.io/address/0x5050389572f2d220ad927CcbeA0D406831012390) | - | | +| [`Community Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0xFEA47018D632A77bA579846c840d5706705Dc598`](https://etherscan.io/address/0xFEA47018D632A77bA579846c840d5706705Dc598) | - | | +| [`Executor Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0x369e6F597e22EaB55fFb173C6d9cD234BD699111`](https://etherscan.io/address/0x369e6F597e22EaB55fFb173C6d9cD234BD699111) | - | | +| [`Operations Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0xBE1685C81aA44FF9FB319dD389addd9374383e90`](https://etherscan.io/address/0xBE1685C81aA44FF9FB319dD389addd9374383e90) | - | | +| [`Protocol Council Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0x461854d84ee845f905e0ecf6c288ddeeb4a9533f`](https://etherscan.io/address/0x461854d84ee845f905e0ecf6c288ddeeb4a9533f) | - | | +| [`Foundation Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0xbb00DDa2832850a43840A3A86515E3Fe226865F2`](https://etherscan.io/address/0xbb00DDa2832850a43840A3A86515E3Fe226865F2) | - | | +| [`BEIGEN Executor Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0x942eaF324971440384e4cA0ffA39fC3bb369D67d`](https://etherscan.io/address/0x942eaF324971440384e4cA0ffA39fC3bb369D67d) | - | | +| [`Multichain Deployer Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0xa3053EF25F1F7d9D55a7655372B8a31D0f40eCA9`](https://etherscan.io/address/0xa3053EF25F1F7d9D55a7655372B8a31D0f40eCA9) | - | | + + +
+ + + +
+ Base + + +**Note: Base only supports verification of tasks from stake that lives on Mainnet Ethereum. Standard core protocol functionality (restaking, slashing) does not exist on Base.** + +###### Multichain - Destination + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`OperatorTableUpdater`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.1/src/contracts/multichain/OperatorTableUpdater.sol) | [`0x5557E1fE3068A1e823cE5Dcd052c6C352E2617B5`](https://basescan.org/address/0x5557E1fE3068A1e823cE5Dcd052c6C352E2617B5) | [`0x792F...419D`](https://basescan.org/address/0x792FfeA0D8734695670697f8b9f03DE3F666419D) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`ECDSACertificateVerifier`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.1/src/contracts/multichain/ECDSACertificateVerifier.sol) | [`0xd0930ee96D07de4F9d493c259232222e46B6EC25`](https://basescan.org/address/0xd0930ee96D07de4F9d493c259232222e46B6EC25) | [`0xf2cC...025F`](https://basescan.org/address/0xf2cC35A48561c2344577489a0873339F5B7E025F) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`BN254CertificateVerifier`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.1/src/contracts/multichain/BN254CertificateVerifier.sol) | [`0x3F55654b2b2b86bB11bE2f72657f9C33bf88120A`](https://basescan.org/address/0x3F55654b2b2b86bB11bE2f72657f9C33bf88120A) | [`0xc6c7...5D7d`](https://basescan.org/address/0xc6c7a63518d0150D57C6b00CDC7F13eB4b275D7d) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### AVS + +The following contracts are used by AVSs. + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`TaskMailbox`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.1/src/contracts/avs/task/TaskMailbox.sol) | [`0x132b466d9d5723531F68797519DfED701aC2C749`](https://basescan.org/address/0x132b466d9d5723531F68797519DfED701aC2C749) | [`0x6eD2...c1bd`](https://basescan.org/address/0x6eD28c7dfEa8F70a7edec02A1E295DA6307Fc1bd) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### Multisigs + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`PauserRegistry`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.1/src/contracts/permissions/PauserRegistry.sol) | - | [`0xb175...6ea`](https://basescan.org/address/0xb1754226917e866c1701f1d9F9E135D88f2e86ea) | | +| [`OZ: TimelockController`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v4.7/contracts/governance/TimelockController.sol) | - | [`0xE48D...ABd`](https://basescan.org/address/0xE48D7CaeC1790b293667e4bB2dE1E00536F2bABd) | | +| [`OZ: Proxy Admin`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/ProxyAdmin.sol) | - | [`0xDb00...9CE`](https://basescan.org/address/0xDb0052E272D1D126617c36A9D6d65C801d1549CE) | | +| [`Pauser Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0x1a051eF1524cbaEa57Ca04319ef93fE78903D5E6`](https://basescan.org/address/0x1a051eF1524cbaEa57Ca04319ef93fE78903D5E6) | - | | +| [`Operations Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0x8eD55c7640497Db15aC32c698c1a06E2E604d865`](https://basescan.org/address/0x8eD55c7640497Db15aC32c698c1a06E2E604d865) | - | | +| [`Protocol Council Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0x841B988aaEafce13b6456ff34015FBc42Aedb7e6`](https://basescan.org/address/0x841B988aaEafce13b6456ff34015FBc42Aedb7e6) | - | | +| [`Community Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0xC107547924C7D1d3E2d10eA8DF534BBfC5F373e6`](https://basescan.org/address/0xC107547924C7D1d3E2d10eA8DF534BBfC5F373e6) | - | | +| [`Executor Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0x5d808608Ad70873ca4dE50F83416264dc15264C2`](https://basescan.org/address/0x5d808608Ad70873ca4dE50F83416264dc15264C2) | - | | +| [`Multichain Deployer Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0xa3053EF25F1F7d9D55a7655372B8a31D0f40eCA9`](https://basescan.org/address/0xa3053EF25F1F7d9D55a7655372B8a31D0f40eCA9) | - | | + +
+ + + +
+ Testnet Sepolia + + +You can view the deployed contract addresses below, or check out the code itself on the [`testnet-sepolia`](https://github.com/Layr-Labs/eigenlayer-contracts/tree/testnet-sepolia) branch. + +###### Core + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`DelegationManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/core/DelegationManager.sol) | [`0xD4A7E1Bd8015057293f0D0A557088c286942e84b`](https://sepolia.etherscan.io/address/0xD4A7E1Bd8015057293f0D0A557088c286942e84b) | [`0xa6Fe...C0f5`](https://sepolia.etherscan.io/address/0xa6FeC50d15FCaE6d3Ac8755e350C747F7733C0f5) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/core/StrategyManager.sol) | [`0x2E3D6c0744b10eb0A4e6F679F71554a39Ec47a5D`](https://sepolia.etherscan.io/address/0x2E3D6c0744b10eb0A4e6F679F71554a39Ec47a5D) | [`0x7D59...E6F1`](https://sepolia.etherscan.io/address/0x7D59F252Bd32733f8850c50bF6BB2e46BF37E6F1) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`EigenPodManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/pods/EigenPodManager.sol) | [`0x56BfEb94879F4543E756d26103976c567256034a`](https://sepolia.etherscan.io/address/0x56BfEb94879F4543E756d26103976c567256034a) | [`0x151e...75D4`](https://sepolia.etherscan.io/address/0x151eCe1662E530f4889F016a63FC58F4b72175D4) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | All EigenPod functionality is paused on Sepolia | +| [`AVSDirectory`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.3.0/src/contracts/core/AVSDirectory.sol) | [`0xa789c91ECDdae96865913130B786140Ee17aF545`](https://sepolia.etherscan.io/address/0xa789c91ECDdae96865913130B786140Ee17aF545) | [`0x3216...6D69`](https://sepolia.etherscan.io/address/0x321604fDA757e8728d7b338C284613E2A0136D69) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`RewardsCoordinator`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.3.0/src/contracts/core/RewardsCoordinator.sol) | [`0x5ae8152fb88c26ff9ca5C014c94fca3c68029349`](https://sepolia.etherscan.io/address/0x5ae8152fb88c26ff9ca5C014c94fca3c68029349) | [`0x5Ac1...FF61`](https://sepolia.etherscan.io/address/0x5Ac1705931E999aa267167DaE57b41fA690bFF61) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`AllocationManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/core/AllocationManager.sol) | [`0x42583067658071247ec8CE0A516A58f682002d07`](https://sepolia.etherscan.io/address/0x42583067658071247ec8CE0A516A58f682002d07) | [`0x87cf...4f31`](https://sepolia.etherscan.io/address/0x87cffb49a29d4dC1C0842c70a75eDBa9B62e4f31) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`PermissionController`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.3.0/src/contracts/permissions/PermissionController.sol) | [`0x44632dfBdCb6D3E21EF613B0ca8A6A0c618F5a37`](https://sepolia.etherscan.io/address/0x44632dfBdCb6D3E21EF613B0ca8A6A0c618F5a37) | [`0xEBDa...B720`](https://sepolia.etherscan.io/address/0xEBDa1FCe8527C0c9ac94a60D7ECA37640415B720) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`KeyRegistrar`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.0-testnet-final/src/contracts/permissions/KeyRegistrar.sol) | [`0xA4dB30D08d8bbcA00D40600bee9F029984dB162a`](https://sepolia.etherscan.io/address/0xA4dB30D08d8bbcA00D40600bee9F029984dB162a) | [`0x1AFc...68e6`](https://sepolia.etherscan.io/address/0x1AFc1E6c6bA44B21Ce621B5B41fAa085682c68e6) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### Strategies + +Anyone can deploy and whitelist strategies for standard ERC20s by using the `StrategyFactory` deployed to the address below (see [docs](./docs/core/StrategyManager.md#strategyfactorydeploynewstrategy)). Strategies deployed from the `StrategyFactory` are deployed using the beacon proxy pattern: + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`StrategyFactory`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.3.0/src/contracts/strategies/StrategyFactory.sol) | [`0x066cF95c1bf0927124DFB8B02B401bc23A79730D`](https://sepolia.etherscan.io/address/0x066cF95c1bf0927124DFB8B02B401bc23A79730D) | [`0x3f98...c5Ac`](https://sepolia.etherscan.io/address/0x3f98d8B9CFa2102aD340C19648E8BB3C06fbc5Ac) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyBase`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/strategies/StrategyBase.sol) | [`0x427e627Bc7E83cac0f84337d3Ad94230C32697D3`](https://sepolia.etherscan.io/address/0x427e627Bc7E83cac0f84337d3Ad94230C32697D3) | [`0x8f31...5cEf`](https://sepolia.etherscan.io/address/0x8f31bFC631B51A39f027A7C9750F7B5cCe9E5cEf) | - Beacon: [`BeaconProxy`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.0/contracts/proxy/beacon/BeaconProxy.sol)
- Strategies: [`UpgradeableBeacon`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/proxy/beacon/UpgradeableBeacon.sol) | +| [`StETH Strategy`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/strategies/StrategyBase.sol) | [`0x8b29d91e67b013e855EaFe0ad704aC4Ab086a574`](https://sepolia.etherscan.io/address/0x8b29d91e67b013e855EaFe0ad704aC4Ab086a574) | [`0x8f31...5cEf`](https://sepolia.etherscan.io/address/0x8f31bFC631B51A39f027A7C9750F7B5cCe9E5cEf) | Strategy Factory deployed | +| [`WETH Strategy`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/strategies/StrategyBase.sol) | [`0x424246eF71b01ee33aA33aC590fd9a0855F5eFbc`](https://sepolia.etherscan.io/address/0x424246eF71b01ee33aA33aC590fd9a0855F5eFbc) | [`0x8f31...5cEf`](https://sepolia.etherscan.io/address/0x8f31bFC631B51A39f027A7C9750F7B5cCe9E5cEf) | Strategy Factory deployed | + +###### Strategies - Special + +The following strategies differ significantly from the other strategies deployed/used above: + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`EigenStrategy (EIGEN)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/strategies/EigenStrategy.sol) | [`0x8E93249a6C37a32024756aaBd813E6139b17D1d5`](https://sepolia.etherscan.io/address/0x8E93249a6C37a32024756aaBd813E6139b17D1d5) | [`0xE8E4...7afC`](https://sepolia.etherscan.io/address/0xE8E469151e8d561Be94a4838B582B7da25487afC) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| `Beacon Chain ETH` | `0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0` | - | - Used for Beacon Chain ETH shares
- Not a real contract! | + +###### EigenPods + +**NOTE: Due to the permissioned validator set on Sepolia, all EigenPod functionality is *PAUSED*.** + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`EigenPod (beacon)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.6.0/src/contracts/pods/EigenPod.sol) | [`0x0e19E56E41D42137d00dD4f51EC2F613E50cAcf4`](https://sepolia.etherscan.io/address/0x0e19E56E41D42137d00dD4f51EC2F613E50cAcf4) | [`0xb1B6...B533`](https://sepolia.etherscan.io/address/0xb1B6dAD80AD719BC5A700f8F3C9Da46224D3B533) | - Beacon: [`BeaconProxy`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/proxy/beacon/BeaconProxy.sol)
- Pods: [`UpgradeableBeacon`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/proxy/beacon/UpgradeableBeacon.sol) | + +###### EIGEN/bEIGEN + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`Eigen`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.6.0/src/contracts/token/Eigen.sol) | [`0x0011FA2c512063C495f77296Af8d195F33A8Dd38`](https://sepolia.etherscan.io/address/0x0011FA2c512063C495f77296Af8d195F33A8Dd38) | [`0x7ec6...BD6F`](https://sepolia.etherscan.io/address/0x7ec6a02235Bf8d8a1fDB894AD2E1573192bfBD6F) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`Backing Eigen`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.3.0/src/contracts/token/BackingEigen.sol) | [`0xc5B857A92245f64e9D90cCc5b096Db82eB77eB5c`](https://sepolia.etherscan.io/address/0xc5B857A92245f64e9D90cCc5b096Db82eB77eB5c) | [`0x1298...3173`](https://sepolia.etherscan.io/address/0x12988B679AA497C30A8D1850eCC4Dc7700383173) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### AVS + +The following contracts are used by AVSs. + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`ReleaseManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.0-testnet-final/src/contracts/core/ReleaseManager.sol) | [`0x59c8D715DCa616e032B744a753C017c9f3E16bf4`](https://sepolia.etherscan.io/address/0x59c8D715DCa616e032B744a753C017c9f3E16bf4) | [`0x67cE...2ac6`](https://sepolia.etherscan.io/address/0x67cEc1bE4De9D4a96Bd6dB28F9ceD6A1bD562ac6) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`TaskMailbox`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.0-testnet-final/src/contracts/avs/task/TaskMailbox.sol) | [`0xB99CC53e8db7018f557606C2a5B066527bF96b26`](https://sepolia.etherscan.io/address/0xB99CC53e8db7018f557606C2a5B066527bF96b26) | [`0x49A8...5AdB`](https://sepolia.etherscan.io/address/0x49A800bfFa5B561daD94Adf4Ea9bfe35bBEB5AdB) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### Multichain - Source + +The multichain protocol expects AVSs to register on the source chain. AVS's stakes are then transported to supported destination chains. For the sepolia network, the destination chains are sepolia and base-sepolia. + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`CrossChainRegistry`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.0-testnet-final/src/contracts/multichain/source/CrossChainRegistry.sol) | [`0x287381B1570d9048c4B4C7EC94d21dDb8Aa1352a`](https://sepolia.etherscan.io/address/0x287381B1570d9048c4B4C7EC94d21dDb8Aa1352a) | [`0x4a93...3084`](https://sepolia.etherscan.io/address/0x4a93d276ea78B48be9D8BB864BACDD5D5A713084) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### Multichain - Destination + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`OperatorTableUpdater`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.0-testnet-final/src/contracts/multichain/destination/OperatorTableUpdater.sol) | [`0xB02A15c6Bd0882b35e9936A9579f35FB26E11476`](https://sepolia.etherscan.io/address/0xB02A15c6Bd0882b35e9936A9579f35FB26E11476) | [`0x0F26...0F5C`](https://sepolia.etherscan.io/address/0x0F264E714a3c03309F4041Db26229EF4E9B00F5C) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`ECDSACertificateVerifier`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.0-testnet-final/src/contracts/multichain/destination/ECDSACertificateVerifier.sol) | [`0xb3Cd1A457dEa9A9A6F6406c6419B1c326670A96F`](https://sepolia.etherscan.io/address/0xb3Cd1A457dEa9A9A6F6406c6419B1c326670A96F) | [`0xFc86...7B26`](https://sepolia.etherscan.io/address/0xFc868562d93c4DC192419e970C220279cdAb7B26) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`BN254CertificateVerifier`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.0-testnet-final/src/contracts/multichain/destination/BN254CertificateVerifier.sol) | [`0xff58A373c18268F483C1F5cA03Cf885c0C43373a`](https://sepolia.etherscan.io/address/0xff58A373c18268F483C1F5cA03Cf885c0C43373a) | [`0x7a2b...8f5d`](https://sepolia.etherscan.io/address/0x7a2b8c559a8C8c71A9d364Ad250Fce5A24b18f5d) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### Multisigs + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`PauserRegistry`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.3.0/src/contracts/permissions/PauserRegistry.sol) | - | [`0x63AA...20f3`](https://sepolia.etherscan.io/address/0x63AAe451780090f50Ad323aAEF155F63a29D20f3) | | +| [`OZ: TimelockController`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v4.7/contracts/governance/TimelockController.sol) | - | [`0x1BEF...1b5B`](https://sepolia.etherscan.io/address/0x1BEF05C7303d44e0E2FCD2A19d993eDEd4c51b5B) | | +| [`OZ: Proxy Admin`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.1/contracts/proxy/transparent/ProxyAdmin.sol) | - | [`0x56E8...6Fa1`](https://sepolia.etherscan.io/address/0x56E88cb4f0136fC27D95499dE4BE2acf47946Fa1) | | +| [`Pauser Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0x0B415f75980D863872C3eb8caa76E6eC8Bc81536`](https://sepolia.etherscan.io/address/0x0B415f75980D863872C3eb8caa76E6eC8Bc81536) | [`0x4167...461a`](https://sepolia.etherscan.io/address/0xd9db270c1b5e3bd161e8c8503c55ceabee709552) | Proxy: [`Gnosis@1.3.0`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/proxies/GnosisSafeProxy.sol) | +| [`Community Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0x6f8459810197cc9fE123BBeB918451757a4fBAc6`](https://sepolia.etherscan.io/address/0x6f8459810197cc9fE123BBeB918451757a4fBAc6) | [`0x4167...461a`](https://sepolia.etherscan.io/address/0xd9db270c1b5e3bd161e8c8503c55ceabee709552) | Proxy: [`Gnosis@1.3.0`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/proxies/GnosisSafeProxy.sol) | +| [`Executor Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0x4FDA8998EC3b7d4b4A612d45FeB8fB36734470f2`](https://sepolia.etherscan.io/address/0x4FDA8998EC3b7d4b4A612d45FeB8fB36734470f2) | [`0x4167...461a`](https://sepolia.etherscan.io/address/0xd9db270c1b5e3bd161e8c8503c55ceabee709552) | Proxy: [`Gnosis@1.3.0`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/proxies/GnosisSafeProxy.sol) | +| [`Operations Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0xb094Ba769b4976Dc37fC689A76675f31bc4923b0`](https://sepolia.etherscan.io/address/0xb094Ba769b4976Dc37fC689A76675f31bc4923b0) | [`0x4167...461a`](https://sepolia.etherscan.io/address/0x41675C099F32341bf84BFc5382aF534df5C7461a) | Proxy: [`Gnosis@1.3.0`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/proxies/GnosisSafeProxy.sol) | + +
+ + + +
+ Testnet Hoodi + + +You can view the deployed contract addresses below, or check out the code itself on the [`testnet-hoodi`](https://github.com/Layr-Labs/eigenlayer-contracts/tree/testnet-hoodi) branch. + +###### Core + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`DelegationManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/core/DelegationManager.sol) | [`0x867837a9722C512e0862d8c2E15b8bE220E8b87d`](https://hoodi.etherscan.io/address/0x867837a9722C512e0862d8c2E15b8bE220E8b87d) | [`0x6FE5...1407`](https://hoodi.etherscan.io/address/0x6FE5eBE3ED0F4b2419263868efb5CC640e541407) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/core/StrategyManager.sol) | [`0xeE45e76ddbEDdA2918b8C7E3035cd37Eab3b5D41`](https://hoodi.etherscan.io/address/0xeE45e76ddbEDdA2918b8C7E3035cd37Eab3b5D41) | [`0x1B76...0f62`](https://hoodi.etherscan.io/address/0x1B76a41b1128a5Cd92dAE7C4c0DEC0bfe12B0f62) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`EigenPodManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/pods/EigenPodManager.sol) | [`0xcd1442415Fc5C29Aa848A49d2e232720BE07976c`](https://hoodi.etherscan.io/address/0xcd1442415Fc5C29Aa848A49d2e232720BE07976c) | [`0x0F26...0F5C`](https://hoodi.etherscan.io/address/0x0F264E714a3c03309F4041Db26229EF4E9B00F5C) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`AVSDirectory`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.3.0/src/contracts/core/AVSDirectory.sol) | [`0xD58f6844f79eB1fbd9f7091d05f7cb30d3363926`](https://hoodi.etherscan.io/address/0xD58f6844f79eB1fbd9f7091d05f7cb30d3363926) | [`0xE368...13Eb`](https://hoodi.etherscan.io/address/0xE368218aDDc4d2dDC5b0AFd70f5878DD8c1713Eb) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`RewardsCoordinator`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.3.0/src/contracts/core/RewardsCoordinator.sol) | [`0x29e8572678e0c272350aa0b4B8f304E47EBcd5e7`](https://hoodi.etherscan.io/address/0x29e8572678e0c272350aa0b4B8f304E47EBcd5e7) | [`0x35a8...0525`](https://hoodi.etherscan.io/address/0x35a8198E98cB76f1DD81D977fBd2a8F2a62C0525) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`AllocationManager`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/core/AllocationManager.sol) | [`0x95a7431400F362F3647a69535C5666cA0133CAA0`](https://hoodi.etherscan.io/address/0x95a7431400F362F3647a69535C5666cA0133CAA0) | [`0xe1b7...fFB9`](https://hoodi.etherscan.io/address/0xe1b7A1249C71b538CC183B0080FfC3eFD02BFfB9) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`PermissionController`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.3.0/src/contracts/permissions/PermissionController.sol) | [`0xdcCF401fD121d8C542E96BC1d0078884422aFAD2`](https://hoodi.etherscan.io/address/0xdcCF401fD121d8C542E96BC1d0078884422aFAD2) | [`0x151e...75D4`](https://hoodi.etherscan.io/address/0x151eCe1662E530f4889F016a63FC58F4b72175D4) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + + +###### Strategies + +Anyone can deploy and whitelist strategies for standard ERC20s by using the `StrategyFactory` deployed to the address below (see [docs](./docs/core/StrategyManager.md#strategyfactorydeploynewstrategy)). Strategies deployed from the `StrategyFactory` are deployed using the beacon proxy pattern: + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`StrategyFactory`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.4.1/src/contracts/strategies/StrategyFactory.sol) | [`0xfB7d94501E4d4ACC264833Ef4ede70a11517422B`](https://hoodi.etherscan.io/address/0xfB7d94501E4d4ACC264833Ef4ede70a11517422B) | [`0x0d82...A3f3`](https://hoodi.etherscan.io/address/0x0d824D128eb5bBF5a0dEDD7D58332a00de57A3f3) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`StrategyBase`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/strategies/StrategyBase.sol) | [`0x6d28cEC1659BC3a9BC814c3EFc1412878B406579`](https://hoodi.etherscan.io/address/0x6d28cEC1659BC3a9BC814c3EFc1412878B406579) | [`0xa621...063A`](https://hoodi.etherscan.io/address/0xa621Ebb0Df923e87e9C527C9fC55b9C6F6E0063A) | - Beacon: [`BeaconProxy`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.7.0/contracts/proxy/beacon/BeaconProxy.sol)
- Strategies: [`UpgradeableBeacon`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/proxy/beacon/UpgradeableBeacon.sol) | +| [`StETH Strategy`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/strategies/StrategyBase.sol) | [`0xf8a1a66130d614c7360e868576d5e59203475fe0`](https://hoodi.etherscan.io/address/0xf8a1a66130d614c7360e868576d5e59203475fe0) | [`0xa621...063A`](https://hoodi.etherscan.io/address/0xa621Ebb0Df923e87e9C527C9fC55b9C6F6E0063A) | Strategy Factory deployed | +| [`WETH Strategy`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/strategies/StrategyBase.sol) | [`0x24579aD4fe83aC53546E5c2D3dF5F85D6383420d`](https://hoodi.etherscan.io/address/0x24579aD4fe83aC53546E5c2D3dF5F85D6383420d) | [`0xa621...063A`](https://hoodi.etherscan.io/address/0xa621Ebb0Df923e87e9C527C9fC55b9C6F6E0063A) | Strategy Factory deployed | + +###### Strategies - Special + +The following strategies differ significantly from the other strategies deployed/used above: + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`EigenStrategy (EIGEN)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.5.0/src/contracts/strategies/EigenStrategy.sol) | [`0xB27b10291DBFE6576d17afF3e251c954Ae14f1D3`](https://hoodi.etherscan.io/address/0xB27b10291DBFE6576d17afF3e251c954Ae14f1D3) | [`0xd318...caE8`](https://hoodi.etherscan.io/address/0xd318ECAcaf8998FB4508FA07159B758253FbcaE8) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| `Beacon Chain ETH` | `0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0` | - | - Used for Beacon Chain ETH shares
- Not a real contract! | + +###### EigenPods + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`EigenPod (beacon)`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.6.0/src/contracts/pods/EigenPod.sol) | [`0x5e1577f8efB21b229cD5Eb4C5Aa3d6C4b228f650`](https://hoodi.etherscan.io/address/0x5e1577f8efB21b229cD5Eb4C5Aa3d6C4b228f650) | [`0x49A8...5AdB`](https://hoodi.etherscan.io/address/0x49A800bfFa5B561daD94Adf4Ea9bfe35bBEB5AdB) | - Beacon: [`BeaconProxy`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/proxy/beacon/BeaconProxy.sol)
- Pods: [`UpgradeableBeacon`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/proxy/beacon/UpgradeableBeacon.sol) | + +###### EIGEN/bEIGEN + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`Eigen`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.6.0/src/contracts/token/Eigen.sol) | [`0x8ae2520954db7D80D66835cB71E692835bbA45bf`](https://hoodi.etherscan.io/address/0x8ae2520954db7D80D66835cB71E692835bbA45bf) | [`0x68F3...2FE9`](https://hoodi.etherscan.io/address/0x68F3E0B02b15F96B50aC73d7680F020B646D2FE9) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`Backing Eigen`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.3.0/src/contracts/token/BackingEigen.sol) | [`0x6e60888132Cc7e637488379B4B40c42b3751f63a`](https://hoodi.etherscan.io/address/0x6e60888132Cc7e637488379B4B40c42b3751f63a) | [`0x43e4...1C4`](https://hoodi.etherscan.io/address/0x43e4940aCeb1C1F5a57e307EEB212007F0f6a1C4) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### Multisigs + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`PauserRegistry`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.4.1/src/contracts/permissions/PauserRegistry.sol) | - | [`0x64D7...c13D`](https://hoodi.etherscan.io/address/0x64D78399B0fa32EA72959f33edCF313159F3c13D) | | +| [`OZ: TimelockController`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v4.7/contracts/governance/TimelockController.sol) | - | [`0xE332...2d15`](https://hoodi.etherscan.io/address/0xE3328cb5068924119d6170496c4AB2dD12c12d15) | | +| [`OZ: Proxy Admin`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/ProxyAdmin.sol) | - | [`0xE7f4...2257`](https://hoodi.etherscan.io/address/0xE7f4E30D2619273468afe9EC0Acf805E55532257) | | + +
+ + + +
+ Testnet Base Sepolia + + +**Note: Testnet Base Sepolia only supports verification of tasks from stake that lives on Sepolia. Standard core protocol functionality (restaking, slashing) does not exist on Base Sepolia.** + +###### Multichain - Destination + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`OperatorTableUpdater`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.0-testnet-final/src/contracts/multichain/destination/OperatorTableUpdater.sol) | [`0xB02A15c6Bd0882b35e9936A9579f35FB26E11476`](https://sepolia.basescan.org/address/0xB02A15c6Bd0882b35e9936A9579f35FB26E11476) | [`0x6514...2D6F`](https://sepolia.basescan.org/address/0x65147e9916152C1EbdBaD8A6f3e145b4BDeE2D6F) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`ECDSACertificateVerifier`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.0-testnet-final/src/contracts/multichain/destination/ECDSACertificateVerifier.sol) | [`0xb3Cd1A457dEa9A9A6F6406c6419B1c326670A96F`](https://sepolia.basescan.org/address/0xb3Cd1A457dEa9A9A6F6406c6419B1c326670A96F) | [`0xEE41...ca1A`](https://sepolia.basescan.org/address/0xEE41826B7D5B89e7F5eED6a831b4eFD69FC9ca1A) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | +| [`BN254CertificateVerifier`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.0-testnet-final/src/contracts/multichain/destination/BN254CertificateVerifier.sol) | [`0xff58A373c18268F483C1F5cA03Cf885c0C43373a`](https://sepolia.basescan.org/address/0xff58A373c18268F483C1F5cA03Cf885c0C43373a) | [`0x59B1...f525`](https://sepolia.basescan.org/address/0x59B11b191B572888703E150E45F5015e0fFcf525) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### AVS + +The following contracts are used by AVSs. + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`TaskMailbox`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.8.0-testnet-final/src/contracts/avs/task/TaskMailbox.sol) | [`0xB99CC53e8db7018f557606C2a5B066527bF96b26`](https://sepolia.basescan.org/address/0xB99CC53e8db7018f557606C2a5B066527bF96b26) | [`0x46CF...16db`](https://sepolia.basescan.org/address/0x46CFA3C2eaDe97D53739120b87A63F739B9616db) | Proxy: [`TUP@4.9.0`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol) | + +###### Multisigs + +| Name | Proxy | Implementation | Notes | +| -------- | -------- | -------- | -------- | +| [`PauserRegistry`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/v1.7.0-rc.4/src/contracts/permissions/PauserRegistry.sol) | - | [`0x6ffE...672B`](https://sepolia.basescan.org/address/0x6ffE77C321a773e2A27B0B0a31C5e1bBda83672B) | | +| [`OZ: Proxy Admin`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/transparent/ProxyAdmin.sol) | - | [`0xbe2F...0b5`](https://sepolia.basescan.org/address/0xbe2F96Efff467c6773Dc91eA62Ab34C73195a0b5) | | +| [`Pauser Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0x2DD9BDDf299C846f61C0105905f9a60ee99242d6`](https://sepolia.basescan.org/address/0x2DD9BDDf299C846f61C0105905f9a60ee99242d6) | - | | +| [`Operations Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0x4ACA7e09eF90612941A9185A6690Dbe9e39aae8f`](https://sepolia.basescan.org/address/0x4ACA7e09eF90612941A9185A6690Dbe9e39aae8f) | - | | +| [`Multichain Deployer Multisig`](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) | [`0xA591635DE4C254BD3fa9C9Db9000eA6488344C28`](https://sepolia.basescan.org/address/0xA591635DE4C254BD3fa9C9Db9000eA6488344C28) | - | | + +
+ +## Branching + +Branches we use: +* `main`: The canonical, most up-to-date branch, containing the work-in-progress code for upcoming releases +* `Vx.y.z`: Release branch with version `x.y.z` that matches a release of EigenLayer, release branch is always cut from `main` via cherry-picking +* `release-dev/xxx`: A development branch for a large feature to be released, the branch should eventually be deleted after merge to `main` + +## Building Apps & Services on EigenLayer + +### Developer & User Basics + +[Our documentation](https://docs.eigenlayer.xyz/) is a great place to start to understand EigenLayer and the Eigen ecosystem. If you are an audio/visual learner, check out the "[You Could've Invented EigenLayer](https://www.blog.eigenlayer.xyz/ycie/)" video. + +To understand more about how our ecosystem and its participants work, checkout the guides below. These are split out by who you are: AVS developers, restakers and Operators. All have different roles and interactioons with EigenLayer: + +* [AVS Developer Guide](https://docs.eigenlayer.xyz/developers/Concepts/avs-developer-guide) +* [Operator Guide](https://docs.eigenlayer.xyz/operators/concepts/operator-introduction) +* [Restaker Guide](https://docs.eigenlayer.xyz/restakers/concepts/overview) + +### Contract Docs & Deep Dive + +The most up-to-date and technical documentation on our core contracts can be found in [/docs](/docs). If you're a shadowy super coder, this is a great place to get an overview of the contracts before diving into the code. + +To learn more about interfacing with the EigenLayer core contracts onchain, see our [middleware repo.](https://github.com/Layr-Labs/eigenlayer-middleware) + +To get an idea of how users interact with these contracts, check out our integration tests: [/src/test/integration](./src/test/integration/). + +## Contribute to the Core + +See [CONTRIBUTING](CONTRIBUTING.md). + +Contributions that do not follow our fork base PR practices will be either rejected or immediately deleted based on your role, preventing branch pollution, keeping our repository clean, make it more readable and searchable. diff --git a/plan/agw/research/preset-catalog-2026-10-15/StakeHub.sol b/plan/agw/research/preset-catalog-2026-10-15/StakeHub.sol new file mode 100644 index 00000000..f1992c2f --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/StakeHub.sol @@ -0,0 +1,1306 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity 0.8.17; + +import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; + +import "./SystemV2.sol"; +import "./extension/Protectable.sol"; +import "./interface/0.8.x/IBSCValidatorSet.sol"; +import "./interface/0.8.x/IGovToken.sol"; +import "./interface/0.8.x/IStakeCredit.sol"; +import "./lib/0.8.x/Utils.sol"; + +contract StakeHub is SystemV2, Initializable, Protectable { + using Utils for string; + using Utils for bytes; + using EnumerableSet for EnumerableSet.AddressSet; + + /*----------------- constants -----------------*/ + uint256 private constant BLS_PUBKEY_LENGTH = 48; + uint256 private constant BLS_SIG_LENGTH = 96; + + address public constant DEAD_ADDRESS = address(0xdEaD); + uint256 public constant LOCK_AMOUNT = 1 ether; + uint256 public constant REDELEGATE_FEE_RATE_BASE = 100000; // 100% + + uint256 public constant BREATHE_BLOCK_INTERVAL = 1 days; + + uint256 public constant INIT_MAX_NUMBER_NODE_ID = 5; + + // receive fund status + uint8 private constant _DISABLE = 0; + uint8 private constant _ENABLE = 1; + + /*----------------- errors -----------------*/ + // @notice signature: 0x5f28f62b + error ValidatorExisted(); + // @notice signature: 0x056e8811 + error ValidatorNotExisted(); + // @notice signature: 0x4b6b857d + error ValidatorNotJailed(); + // @notice signature: 0x3cdeb0ea + error DuplicateConsensusAddress(); + // @notice signature: 0x11fdb947 + error DuplicateVoteAddress(); + // @notice signature: 0xc0bf4143 + error DuplicateMoniker(); + // @notice signature: 0x2f64097e + error SelfDelegationNotEnough(); + // @notice signature: 0xdc81db85 + error InvalidCommission(); + // @notice signature: 0x5dba5ad7 + error InvalidMoniker(); + // @notice signature: 0x2c8fc796 + error InvalidVoteAddress(); + // @notice signature: 0xca40c236 + error InvalidConsensusAddress(); + // @notice signature: 0x3f259b7a + error UpdateTooFrequently(); + // @notice signature: 0x5c32dd9c + error JailTimeNotExpired(); + // @notice signature: 0xdc6f0bdd + error DelegationAmountTooSmall(); + // @notice signature: 0x64689203 + error OnlySelfDelegation(); + // @notice signature: 0x9811e0c7 + error ZeroShares(); + // @notice signature: 0xf0e3e629 + error SameValidator(); + // @notice signature: 0xbd52fcdb + error NoMoreFelonyAllowed(); + // @notice signature: 0x37233762 + error AlreadySlashed(); + // @notice signature: 0x90b8ec18 + error TransferFailed(); + // @notice signature: 0x41abc801 + error InvalidRequest(); + // @notice signature: 0x1898eb6b + error VoteAddressExpired(); + // @notice signature: 0xc2aee074 + error ConsensusAddressExpired(); + // @notice signature: 0x0d7b78d4 + error InvalidSynPackage(); + // @notice signature: 0xbebdc757 + error InvalidAgent(); + // @notice signature: 0x682a6e7c + error InvalidValidator(); + // @notice signature: 0x6490ffd3 + error InvalidNodeID(); + // @notice signature: 0x246be614 + error ExceedsMaxNodeIDs(); + // @notice signature: 0x440bc78e + error DuplicateNodeID(); + + /*----------------- storage -----------------*/ + uint8 private _receiveFundStatus; + uint256 public transferGasLimit; + + // stake params + uint256 public minSelfDelegationBNB; + uint256 public minDelegationBNBChange; + uint256 public maxElectedValidators; + uint256 public unbondPeriod; + uint256 public redelegateFeeRate; + + // slash params + uint256 public downtimeSlashAmount; + uint256 public felonySlashAmount; + uint256 public downtimeJailTime; + uint256 public felonyJailTime; + + // validator operator address set + EnumerableSet.AddressSet private _validatorSet; + // validator operator address => validator info + mapping(address => Validator) private _validators; + // validator moniker set(hash of the moniker) + mapping(bytes32 => bool) private _monikerSet; + // validator consensus address => validator operator address + mapping(address => address) public consensusToOperator; + // validator consensus address => expiry date + mapping(address => uint256) public consensusExpiration; + // validator vote address => validator operator address + mapping(bytes => address) public voteToOperator; + // validator vote address => expiry date + mapping(bytes => uint256) public voteExpiration; + + // legacy addresses of BC + mapping(address => bool) private _legacyConsensusAddress; // @dev deprecated + mapping(bytes => bool) private _legacyVoteAddress; // @dev deprecated + + // total number of current jailed validators + uint256 public numOfJailed; + // max number of jailed validators between breathe block(only for malicious vote and double sign) + uint256 public maxFelonyBetweenBreatheBlock; + // index(timestamp / breatheBlockInterval) => number of malicious vote and double sign slash + mapping(uint256 => uint256) private _felonyMap; + // slash key => slash jail time + mapping(bytes32 => uint256) private _felonyRecords; + + // agent => validator operator address + mapping(address => address) public agentToOperator; + + // network related values // + + // governance controlled maximum number of NodeIDs per validator (default is 5). + uint256 public maxNodeIDs; + + // mapping from a validator's operator address to an array of their registered NodeIDs, + // where each NodeID is stored as a fixed 32-byte value. + mapping(address => bytes32[]) private validatorNodeIDs; + + /*----------------- structs and events -----------------*/ + struct StakeMigrationPackage { + address operatorAddress; // the operator address of the target validator to delegate to + address delegator; // the beneficiary of the delegation + address refundAddress; // the Beacon Chain address to refund the fund if migration failed + uint256 amount; // the amount of BNB to be migrated(decimal: 18) + } + + enum StakeMigrationRespCode { + MIGRATE_SUCCESS, + CLAIM_FUND_FAILED, + VALIDATOR_NOT_EXISTED, + VALIDATOR_JAILED, + INVALID_DELEGATOR + } + + struct Validator { + address consensusAddress; + address operatorAddress; + address creditContract; + uint256 createdTime; + bytes voteAddress; + Description description; + Commission commission; + bool jailed; + uint256 jailUntil; + uint256 updateTime; + // The agent can perform transactions on behalf of the operatorAddress in certain scenarios. + address agent; + uint256[19] __reservedSlots; + } + + struct Description { + string moniker; + string identity; + string website; + string details; + } + + struct Commission { + uint64 rate; // the commission rate charged to delegators(10000 is 100%) + uint64 maxRate; // maximum commission rate which validator can ever charge + uint64 maxChangeRate; // maximum daily increase of the validator commission + } + + enum SlashType { + DoubleSign, + DownTime, + MaliciousVote + } + + event ValidatorCreated( + address indexed consensusAddress, + address indexed operatorAddress, + address indexed creditContract, + bytes voteAddress + ); + event StakeCreditInitialized(address indexed operatorAddress, address indexed creditContract); + event ConsensusAddressEdited(address indexed operatorAddress, address indexed newConsensusAddress); + event CommissionRateEdited(address indexed operatorAddress, uint64 newCommissionRate); + event DescriptionEdited(address indexed operatorAddress); + event VoteAddressEdited(address indexed operatorAddress, bytes newVoteAddress); + event Delegated(address indexed operatorAddress, address indexed delegator, uint256 shares, uint256 bnbAmount); + event Undelegated(address indexed operatorAddress, address indexed delegator, uint256 shares, uint256 bnbAmount); + event Redelegated( + address indexed srcValidator, + address indexed dstValidator, + address indexed delegator, + uint256 oldShares, + uint256 newShares, + uint256 bnbAmount + ); + event RewardDistributed(address indexed operatorAddress, uint256 reward); + event RewardDistributeFailed(address indexed operatorAddress, bytes failReason); + event ValidatorSlashed( + address indexed operatorAddress, uint256 jailUntil, uint256 slashAmount, SlashType slashType + ); + event ValidatorJailed(address indexed operatorAddress); + event ValidatorEmptyJailed(address indexed operatorAddress); + event ValidatorUnjailed(address indexed operatorAddress); + event Claimed(address indexed operatorAddress, address indexed delegator, uint256 bnbAmount); + event AgentChanged(address indexed operatorAddress, address indexed oldAgent, address indexed newAgent); + + // Events for adding and removing NodeIDs. + event NodeIDAdded(address indexed validator, bytes32 nodeID); + event NodeIDRemoved(address indexed validator, bytes32 nodeID); + + event MigrateSuccess(address indexed operatorAddress, address indexed delegator, uint256 shares, uint256 bnbAmount); // @dev deprecated + event MigrateFailed( + address indexed operatorAddress, address indexed delegator, uint256 bnbAmount, StakeMigrationRespCode respCode + ); // @dev deprecated + event UnexpectedPackage(uint8 channelId, bytes msgBytes); // @dev deprecated + + /*----------------- modifiers -----------------*/ + modifier validatorExist( + address operatorAddress + ) { + if (!_validatorSet.contains(operatorAddress)) revert ValidatorNotExisted(); + _; + } + + modifier enableReceivingFund() { + _receiveFundStatus = _ENABLE; + _; + _receiveFundStatus = _DISABLE; + } + + receive() external payable { + // to prevent BNB from being lost + if (_receiveFundStatus != _ENABLE) revert(); + } + + /** + * @dev this function is invoked by BSC Parlia consensus engine during the hard fork + */ + function initialize() external initializer onlyCoinbase onlyZeroGasPrice { + transferGasLimit = 5000; + minSelfDelegationBNB = 2_000 ether; + minDelegationBNBChange = 1 ether; + maxElectedValidators = 45; + unbondPeriod = 7 days; + redelegateFeeRate = 2; + downtimeSlashAmount = 10 ether; + felonySlashAmount = 200 ether; + downtimeJailTime = 2 days; + felonyJailTime = 30 days; + maxFelonyBetweenBreatheBlock = 2; + // Different address will be set depending on the environment + __Protectable_init_unchained(0x08E68Ec70FA3b629784fDB28887e206ce8561E08); + } + + /*----------------- Implement cross chain app -----------------*/ + function handleSynPackage( + uint8, + bytes calldata msgBytes + ) external onlyCrossChainContract whenNotPaused enableReceivingFund returns (bytes memory) { + revert("deprecated"); + } + + function handleAckPackage(uint8 channelId, bytes calldata msgBytes) external onlyCrossChainContract { + revert("deprecated"); + } + + function handleFailAckPackage(uint8 channelId, bytes calldata msgBytes) external onlyCrossChainContract { + revert("deprecated"); + } + + /*----------------- external functions -----------------*/ + /** + * @param newAgent the new agent address of the validator, updating to address(0) means remove the old agent. + */ + function updateAgent( + address newAgent + ) external validatorExist(msg.sender) whenNotPaused notInBlackList { + if (agentToOperator[newAgent] != address(0)) revert InvalidAgent(); + if (_validatorSet.contains(newAgent)) revert InvalidAgent(); + + address operatorAddress = msg.sender; + address oldAgent = _validators[operatorAddress].agent; + if (oldAgent == newAgent) revert InvalidAgent(); + + if (oldAgent != address(0)) { + delete agentToOperator[oldAgent]; + } + + _validators[operatorAddress].agent = newAgent; + + if (newAgent != address(0)) { + agentToOperator[newAgent] = operatorAddress; + } + + emit AgentChanged(operatorAddress, oldAgent, newAgent); + } + + /** + * @param consensusAddress the consensus address of the validator + * @param voteAddress the vote address of the validator + * @param blsProof the bls proof of the vote address + * @param commission the commission of the validator + * @param description the description of the validator + */ + function createValidator( + address consensusAddress, + bytes calldata voteAddress, + bytes calldata blsProof, + Commission calldata commission, + Description calldata description + ) external payable whenNotPaused notInBlackList { + // basic check + address operatorAddress = msg.sender; + if (_validatorSet.contains(operatorAddress)) revert ValidatorExisted(); + if (agentToOperator[operatorAddress] != address(0)) revert InvalidValidator(); + + if (consensusToOperator[consensusAddress] != address(0)) { + revert DuplicateConsensusAddress(); + } + if (voteToOperator[voteAddress] != address(0)) { + revert DuplicateVoteAddress(); + } + bytes32 monikerHash = keccak256(abi.encodePacked(description.moniker)); + if (_monikerSet[monikerHash]) revert DuplicateMoniker(); + + uint256 delegation = msg.value - LOCK_AMOUNT; // create validator need to lock 1 BNB + if (delegation < minSelfDelegationBNB) revert SelfDelegationNotEnough(); + + if (consensusAddress == address(0)) revert InvalidConsensusAddress(); + if ( + commission.maxRate > 5_000 || commission.rate > commission.maxRate + || commission.maxChangeRate > commission.maxRate + ) revert InvalidCommission(); + if (!_checkMoniker(description.moniker)) revert InvalidMoniker(); + // proof-of-possession verify + if (!_checkVoteAddress(operatorAddress, voteAddress, blsProof)) revert InvalidVoteAddress(); + + // deploy stake credit proxy contract + address creditContract = _deployStakeCredit(operatorAddress, description.moniker); + + _validatorSet.add(operatorAddress); + _monikerSet[monikerHash] = true; + Validator storage valInfo = _validators[operatorAddress]; + valInfo.consensusAddress = consensusAddress; + valInfo.operatorAddress = operatorAddress; + valInfo.creditContract = creditContract; + valInfo.createdTime = block.timestamp; + valInfo.voteAddress = voteAddress; + valInfo.description = description; + valInfo.commission = commission; + valInfo.updateTime = block.timestamp; + consensusToOperator[consensusAddress] = operatorAddress; + voteToOperator[voteAddress] = operatorAddress; + + emit ValidatorCreated(consensusAddress, operatorAddress, creditContract, voteAddress); + emit Delegated(operatorAddress, operatorAddress, delegation, delegation); + emit Delegated(operatorAddress, DEAD_ADDRESS, LOCK_AMOUNT, LOCK_AMOUNT); + + IGovToken(GOV_TOKEN_ADDR).sync(creditContract, operatorAddress); + } + + /** + * @param newConsensusAddress the new consensus address of the validator + */ + function editConsensusAddress( + address newConsensusAddress + ) external whenNotPaused notInBlackList validatorExist(_bep410MsgSender()) { + if (newConsensusAddress == address(0)) revert InvalidConsensusAddress(); + if (consensusToOperator[newConsensusAddress] != address(0)) { + revert DuplicateConsensusAddress(); + } + + address operatorAddress = _bep410MsgSender(); + Validator storage valInfo = _validators[operatorAddress]; + if (valInfo.updateTime + BREATHE_BLOCK_INTERVAL > block.timestamp) revert UpdateTooFrequently(); + + consensusExpiration[valInfo.consensusAddress] = block.timestamp; + valInfo.consensusAddress = newConsensusAddress; + valInfo.updateTime = block.timestamp; + consensusToOperator[newConsensusAddress] = operatorAddress; + + emit ConsensusAddressEdited(operatorAddress, newConsensusAddress); + } + + /** + * @param commissionRate the new commission rate of the validator + */ + function editCommissionRate( + uint64 commissionRate + ) external whenNotPaused notInBlackList validatorExist(_bep410MsgSender()) { + address operatorAddress = _bep410MsgSender(); + Validator storage valInfo = _validators[operatorAddress]; + if (valInfo.updateTime + BREATHE_BLOCK_INTERVAL > block.timestamp) revert UpdateTooFrequently(); + + if (commissionRate > valInfo.commission.maxRate) revert InvalidCommission(); + uint256 changeRate = commissionRate >= valInfo.commission.rate + ? commissionRate - valInfo.commission.rate + : valInfo.commission.rate - commissionRate; + if (changeRate > valInfo.commission.maxChangeRate) revert InvalidCommission(); + + valInfo.commission.rate = commissionRate; + valInfo.updateTime = block.timestamp; + + emit CommissionRateEdited(operatorAddress, commissionRate); + } + + /** + * @notice the moniker of the validator will be ignored as it is not editable + * @param description the new description of the validator + */ + function editDescription( + Description memory description + ) external whenNotPaused notInBlackList validatorExist(_bep410MsgSender()) { + address operatorAddress = _bep410MsgSender(); + Validator storage valInfo = _validators[operatorAddress]; + if (valInfo.updateTime + BREATHE_BLOCK_INTERVAL > block.timestamp) revert UpdateTooFrequently(); + + description.moniker = valInfo.description.moniker; + valInfo.description = description; + valInfo.updateTime = block.timestamp; + + emit DescriptionEdited(operatorAddress); + } + + /** + * @param newVoteAddress the new vote address of the validator + * @param blsProof the bls proof of the vote address + */ + function editVoteAddress( + bytes calldata newVoteAddress, + bytes calldata blsProof + ) external whenNotPaused notInBlackList validatorExist(_bep410MsgSender()) { + // proof-of-possession verify + address operatorAddress = _bep410MsgSender(); + if (!_checkVoteAddress(operatorAddress, newVoteAddress, blsProof)) revert InvalidVoteAddress(); + if (voteToOperator[newVoteAddress] != address(0)) { + revert DuplicateVoteAddress(); + } + + Validator storage valInfo = _validators[operatorAddress]; + if (valInfo.updateTime + BREATHE_BLOCK_INTERVAL > block.timestamp) revert UpdateTooFrequently(); + + voteExpiration[valInfo.voteAddress] = block.timestamp; + valInfo.voteAddress = newVoteAddress; + valInfo.updateTime = block.timestamp; + voteToOperator[newVoteAddress] = operatorAddress; + + emit VoteAddressEdited(operatorAddress, newVoteAddress); + } + + /** + * @param operatorAddress the operator address of the validator to be unjailed + */ + function unjail( + address operatorAddress + ) external whenNotPaused notInBlackList validatorExist(operatorAddress) { + Validator storage valInfo = _validators[operatorAddress]; + if (!valInfo.jailed) revert ValidatorNotJailed(); + + if (IStakeCredit(valInfo.creditContract).getPooledBNB(operatorAddress) < minSelfDelegationBNB) { + revert SelfDelegationNotEnough(); + } + if (valInfo.jailUntil > block.timestamp) revert JailTimeNotExpired(); + + valInfo.jailed = false; + numOfJailed -= 1; + emit ValidatorUnjailed(operatorAddress); + } + + /** + * @param operatorAddress the operator address of the validator to be delegated to + * @param delegateVotePower whether to delegate vote power to the validator + */ + function delegate( + address operatorAddress, + bool delegateVotePower + ) external payable whenNotPaused notInBlackList validatorExist(operatorAddress) { + uint256 bnbAmount = msg.value; + if (bnbAmount < minDelegationBNBChange) revert DelegationAmountTooSmall(); + + address delegator = msg.sender; + Validator memory valInfo = _validators[operatorAddress]; + if (valInfo.jailed && delegator != operatorAddress) revert OnlySelfDelegation(); + + uint256 shares = IStakeCredit(valInfo.creditContract).delegate{ value: bnbAmount }(delegator); + emit Delegated(operatorAddress, delegator, shares, bnbAmount); + + IGovToken(GOV_TOKEN_ADDR).sync(valInfo.creditContract, delegator); + if (delegateVotePower) { + IGovToken(GOV_TOKEN_ADDR).delegateVote(delegator, operatorAddress); + } + } + + /** + * @dev Undelegate BNB from a validator, fund is only claimable few days later + * @param operatorAddress the operator address of the validator to be undelegated from + * @param shares the shares to be undelegated + */ + function undelegate( + address operatorAddress, + uint256 shares + ) external whenNotPaused notInBlackList validatorExist(operatorAddress) { + if (shares == 0) revert ZeroShares(); + + address delegator = msg.sender; + Validator memory valInfo = _validators[operatorAddress]; + + uint256 bnbAmount = IStakeCredit(valInfo.creditContract).undelegate(delegator, shares); + emit Undelegated(operatorAddress, delegator, shares, bnbAmount); + + if (delegator == operatorAddress) { + _checkValidatorSelfDelegation(operatorAddress); + } + + IGovToken(GOV_TOKEN_ADDR).sync(valInfo.creditContract, delegator); + } + + /** + * @param srcValidator the operator address of the validator to be redelegated from + * @param dstValidator the operator address of the validator to be redelegated to + * @param shares the shares to be redelegated + * @param delegateVotePower whether to delegate vote power to the dstValidator + */ + function redelegate( + address srcValidator, + address dstValidator, + uint256 shares, + bool delegateVotePower + ) + external + whenNotPaused + notInBlackList + validatorExist(srcValidator) + validatorExist(dstValidator) + enableReceivingFund + { + if (shares == 0) revert ZeroShares(); + if (srcValidator == dstValidator) revert SameValidator(); + + address delegator = msg.sender; + Validator memory srcValInfo = _validators[srcValidator]; + Validator memory dstValInfo = _validators[dstValidator]; + if (dstValInfo.jailed && delegator != dstValidator) revert OnlySelfDelegation(); + + uint256 bnbAmount = IStakeCredit(srcValInfo.creditContract).unbond(delegator, shares); + if (bnbAmount < minDelegationBNBChange) revert DelegationAmountTooSmall(); + // check if the srcValidator has enough self delegation + if ( + delegator == srcValidator + && IStakeCredit(srcValInfo.creditContract).getPooledBNB(srcValidator) < minSelfDelegationBNB + ) { + revert SelfDelegationNotEnough(); + } + + uint256 feeCharge = bnbAmount * redelegateFeeRate / REDELEGATE_FEE_RATE_BASE; + (bool success,) = dstValInfo.creditContract.call{ value: feeCharge }(""); + if (!success) revert TransferFailed(); + + bnbAmount -= feeCharge; + uint256 newShares = IStakeCredit(dstValInfo.creditContract).delegate{ value: bnbAmount }(delegator); + emit Redelegated(srcValidator, dstValidator, delegator, shares, newShares, bnbAmount); + + address[] memory stakeCredits = new address[](2); + stakeCredits[0] = srcValInfo.creditContract; + stakeCredits[1] = dstValInfo.creditContract; + IGovToken(GOV_TOKEN_ADDR).syncBatch(stakeCredits, delegator); + if (delegateVotePower) { + IGovToken(GOV_TOKEN_ADDR).delegateVote(delegator, dstValidator); + } + } + + /** + * @dev Claim the undelegated BNB from the pool after unbondPeriod + * @param operatorAddress the operator address of the validator + * @param requestNumber the request number of the undelegation. 0 means claim all + */ + function claim(address operatorAddress, uint256 requestNumber) external whenNotPaused notInBlackList { + _claim(operatorAddress, requestNumber); + } + + /** + * @dev Claim the undelegated BNB from the pools after unbondPeriod + * @param operatorAddresses the operator addresses of the validator + * @param requestNumbers numbers of the undelegation requests. 0 means claim all + */ + function claimBatch( + address[] calldata operatorAddresses, + uint256[] calldata requestNumbers + ) external whenNotPaused notInBlackList { + if (operatorAddresses.length != requestNumbers.length) revert InvalidRequest(); + for (uint256 i; i < operatorAddresses.length; ++i) { + _claim(operatorAddresses[i], requestNumbers[i]); + } + } + + /** + * @dev Sync the gov tokens of validators in operatorAddresses + * @param operatorAddresses the operator addresses of the validators + * @param account the account to sync gov tokens to + */ + function syncGovToken( + address[] calldata operatorAddresses, + address account + ) external whenNotPaused notInBlackList { + uint256 _length = operatorAddresses.length; + address[] memory stakeCredits = new address[](_length); + address credit; + for (uint256 i = 0; i < _length; ++i) { + if (!_validatorSet.contains(operatorAddresses[i])) revert ValidatorNotExisted(); + credit = _validators[operatorAddresses[i]].creditContract; + stakeCredits[i] = credit; + } + + IGovToken(GOV_TOKEN_ADDR).syncBatch(stakeCredits, account); + } + + /*----------------- system functions -----------------*/ + /** + * @dev This function will be called by consensus engine. So it should never revert. + */ + function distributeReward( + address consensusAddress + ) external payable onlyValidatorContract { + address operatorAddress = consensusToOperator[consensusAddress]; + Validator memory valInfo = _validators[operatorAddress]; + if (valInfo.creditContract == address(0) || valInfo.jailed) { + SYSTEM_REWARD_ADDR.call{ value: msg.value }(""); + emit RewardDistributeFailed(operatorAddress, "INVALID_VALIDATOR"); + return; + } + + IStakeCredit(valInfo.creditContract).distributeReward{ value: msg.value }(valInfo.commission.rate); + emit RewardDistributed(operatorAddress, msg.value); + + IGovToken(GOV_TOKEN_ADDR).sync(valInfo.creditContract, operatorAddress); + } + + /** + * @dev Downtime slash. Only the `SlashIndicator` contract can call this function. + */ + function downtimeSlash( + address consensusAddress + ) external onlySlash { + address operatorAddress = consensusToOperator[consensusAddress]; + if (!_validatorSet.contains(operatorAddress)) revert ValidatorNotExisted(); // should never happen + Validator storage valInfo = _validators[operatorAddress]; + + // slash + uint256 slashAmount = IStakeCredit(valInfo.creditContract).slash(downtimeSlashAmount); + uint256 jailUntil = block.timestamp + downtimeJailTime; + _jailValidator(valInfo, jailUntil); + + emit ValidatorSlashed(operatorAddress, jailUntil, slashAmount, SlashType.DownTime); + + IGovToken(GOV_TOKEN_ADDR).sync(valInfo.creditContract, operatorAddress); + } + + /** + * @dev Malicious vote slash. Only the `SlashIndicator` contract can call this function. + */ + function maliciousVoteSlash( + bytes calldata voteAddress + ) external onlySlash whenNotPaused { + address operatorAddress = voteToOperator[voteAddress]; + if (!_validatorSet.contains(operatorAddress)) revert ValidatorNotExisted(); // should never happen + Validator storage valInfo = _validators[operatorAddress]; + + uint256 index = block.timestamp / BREATHE_BLOCK_INTERVAL; + // This is to prevent many honest validators being slashed at the same time because of implementation bugs + if (_felonyMap[index] >= maxFelonyBetweenBreatheBlock) revert NoMoreFelonyAllowed(); + _felonyMap[index] += 1; + + // check if the voteAddress has already expired + if (voteExpiration[voteAddress] != 0 && voteExpiration[voteAddress] + BREATHE_BLOCK_INTERVAL < block.timestamp) + { + revert VoteAddressExpired(); + } + + // slash + (bool canSlash, uint256 jailUntil) = _checkFelonyRecord(operatorAddress, SlashType.MaliciousVote); + if (!canSlash) revert AlreadySlashed(); + uint256 slashAmount = IStakeCredit(valInfo.creditContract).slash(felonySlashAmount); + _jailValidator(valInfo, jailUntil); + // Evict using the post-rotation consensus key; SlashIndicator's voteAddr-based + // eviction covers the case where BSCValidatorSet has not yet synced K_new. + IBSCValidatorSet(VALIDATOR_CONTRACT_ADDR).felony(valInfo.consensusAddress); + + emit ValidatorSlashed(operatorAddress, jailUntil, slashAmount, SlashType.MaliciousVote); + + IGovToken(GOV_TOKEN_ADDR).sync(valInfo.creditContract, operatorAddress); + } + + /** + * @dev Double sign slash. Only the `SlashIndicator` contract can call this function. + */ + function doubleSignSlash( + address consensusAddress + ) external onlySlash whenNotPaused { + address operatorAddress = consensusToOperator[consensusAddress]; + if (!_validatorSet.contains(operatorAddress)) revert ValidatorNotExisted(); // should never happen + Validator storage valInfo = _validators[operatorAddress]; + + uint256 index = block.timestamp / BREATHE_BLOCK_INTERVAL; + // This is to prevent many honest validators being slashed at the same time because of implementation bugs + if (_felonyMap[index] >= maxFelonyBetweenBreatheBlock) revert NoMoreFelonyAllowed(); + _felonyMap[index] += 1; + + // check if the consensusAddress has already expired + if ( + consensusExpiration[consensusAddress] != 0 + && consensusExpiration[consensusAddress] + BREATHE_BLOCK_INTERVAL < block.timestamp + ) { + revert ConsensusAddressExpired(); + } + + // slash + (bool canSlash, uint256 jailUntil) = _checkFelonyRecord(operatorAddress, SlashType.DoubleSign); + if (!canSlash) revert AlreadySlashed(); + uint256 slashAmount = IStakeCredit(valInfo.creditContract).slash(felonySlashAmount); + _jailValidator(valInfo, jailUntil); + // Evict using the post-rotation consensus key; SlashIndicator's felony(K_old) + // covers the case where BSCValidatorSet has not yet synced K_new. + IBSCValidatorSet(VALIDATOR_CONTRACT_ADDR).felony(valInfo.consensusAddress); + + emit ValidatorSlashed(operatorAddress, jailUntil, slashAmount, SlashType.DoubleSign); + + IGovToken(GOV_TOKEN_ADDR).sync(valInfo.creditContract, operatorAddress); + } + + /** + * @param key the key of the param + * @param value the value of the param + */ + function updateParam(string calldata key, bytes calldata value) external onlyGov { + if (key.compareStrings("transferGasLimit")) { + if (value.length != 32) revert InvalidValue(key, value); + uint256 newTransferGasLimit = value.bytesToUint256(32); + if (newTransferGasLimit < 2300 || newTransferGasLimit > 10_000) revert InvalidValue(key, value); + transferGasLimit = newTransferGasLimit; + } else if (key.compareStrings("minSelfDelegationBNB")) { + if (value.length != 32) revert InvalidValue(key, value); + uint256 newMinSelfDelegationBNB = value.bytesToUint256(32); + if (newMinSelfDelegationBNB < 1000 ether || newMinSelfDelegationBNB > 100_000 ether) { + revert InvalidValue(key, value); + } + minSelfDelegationBNB = newMinSelfDelegationBNB; + } else if (key.compareStrings("minDelegationBNBChange")) { + if (value.length != 32) revert InvalidValue(key, value); + uint256 newMinDelegationBNBChange = value.bytesToUint256(32); + if (newMinDelegationBNBChange < 0.1 ether || newMinDelegationBNBChange > 10 ether) { + revert InvalidValue(key, value); + } + minDelegationBNBChange = newMinDelegationBNBChange; + } else if (key.compareStrings("maxElectedValidators")) { + if (value.length != 32) revert InvalidValue(key, value); + uint256 newMaxElectedValidators = value.bytesToUint256(32); + if (newMaxElectedValidators == 0 || newMaxElectedValidators > 500) revert InvalidValue(key, value); + maxElectedValidators = newMaxElectedValidators; + } else if (key.compareStrings("unbondPeriod")) { + if (value.length != 32) revert InvalidValue(key, value); + uint256 newUnbondPeriod = value.bytesToUint256(32); + if (newUnbondPeriod < 3 days || newUnbondPeriod > 30 days) revert InvalidValue(key, value); + unbondPeriod = newUnbondPeriod; + } else if (key.compareStrings("redelegateFeeRate")) { + if (value.length != 32) revert InvalidValue(key, value); + uint256 newRedelegateFeeRate = value.bytesToUint256(32); + if (newRedelegateFeeRate > 100) { + revert InvalidValue(key, value); + } + redelegateFeeRate = newRedelegateFeeRate; + } else if (key.compareStrings("downtimeSlashAmount")) { + if (value.length != 32) revert InvalidValue(key, value); + uint256 newDowntimeSlashAmount = value.bytesToUint256(32); + if (newDowntimeSlashAmount < 1 ether || newDowntimeSlashAmount >= felonySlashAmount) { + revert InvalidValue(key, value); + } + downtimeSlashAmount = newDowntimeSlashAmount; + } else if (key.compareStrings("felonySlashAmount")) { + if (value.length != 32) revert InvalidValue(key, value); + uint256 newFelonySlashAmount = value.bytesToUint256(32); + if (newFelonySlashAmount < 10 ether || newFelonySlashAmount <= downtimeSlashAmount) { + revert InvalidValue(key, value); + } + felonySlashAmount = newFelonySlashAmount; + } else if (key.compareStrings("downtimeJailTime")) { + if (value.length != 32) revert InvalidValue(key, value); + uint256 newDowntimeJailTime = value.bytesToUint256(32); + if (newDowntimeJailTime < 1 days || newDowntimeJailTime >= felonyJailTime) revert InvalidValue(key, value); + downtimeJailTime = newDowntimeJailTime; + } else if (key.compareStrings("felonyJailTime")) { + if (value.length != 32) revert InvalidValue(key, value); + uint256 newFelonyJailTime = value.bytesToUint256(32); + if (newFelonyJailTime < 3 days || newFelonyJailTime <= downtimeJailTime) revert InvalidValue(key, value); + felonyJailTime = newFelonyJailTime; + } else if (key.compareStrings("maxFelonyBetweenBreatheBlock")) { + if (value.length != 32) revert InvalidValue(key, value); + uint256 newJailedPerDay = value.bytesToUint256(32); + if (newJailedPerDay == 0) revert InvalidValue(key, value); + maxFelonyBetweenBreatheBlock = newJailedPerDay; + } else if (key.compareStrings("stakeHubProtector")) { + if (value.length != 20) revert InvalidValue(key, value); + address newStakeHubProtector = value.bytesToAddress(20); + if (newStakeHubProtector == address(0)) revert InvalidValue(key, value); + _setProtector(newStakeHubProtector); + } else if (key.compareStrings("maxNodeIDs")) { + if (value.length != 32) revert InvalidValue(key, value); + uint256 newMaxNodeIDs = value.bytesToUint256(32); + if (newMaxNodeIDs == 0) revert InvalidValue(key, value); + maxNodeIDs = newMaxNodeIDs; + } else { + revert UnknownParam(key, value); + } + emit ParamChange(key, value); + } + + /*----------------- view functions -----------------*/ + /** + * @param operatorAddress the operator address of the validator + * @param index the index of the day to query(timestamp / 1 days) + * + * @return the validator's reward of the day + */ + function getValidatorRewardRecord(address operatorAddress, uint256 index) external view returns (uint256) { + if (!_validatorSet.contains(operatorAddress)) revert ValidatorNotExisted(); + return IStakeCredit(_validators[operatorAddress].creditContract).rewardRecord(index); + } + + /** + * @param operatorAddress the operator address of the validator + * @param index the index of the day to query(timestamp / 1 days) + * + * @return the validator's total pooled BNB of the day + */ + function getValidatorTotalPooledBNBRecord(address operatorAddress, uint256 index) external view returns (uint256) { + if (!_validatorSet.contains(operatorAddress)) revert ValidatorNotExisted(); + return IStakeCredit(_validators[operatorAddress].creditContract).totalPooledBNBRecord(index); + } + + /** + * @notice pagination query all validators' operator address and credit contract address + * + * @param offset the offset of the query + * @param limit the limit of the query + * + * @return operatorAddrs operator addresses + * @return creditAddrs credit contract addresses + * @return totalLength total number of validators + */ + function getValidators( + uint256 offset, + uint256 limit + ) external view returns (address[] memory operatorAddrs, address[] memory creditAddrs, uint256 totalLength) { + totalLength = _validatorSet.length(); + if (offset >= totalLength) { + return (operatorAddrs, creditAddrs, totalLength); + } + + limit = limit == 0 ? totalLength : limit; + uint256 count = (totalLength - offset) > limit ? limit : (totalLength - offset); + operatorAddrs = new address[](count); + creditAddrs = new address[](count); + for (uint256 i; i < count; ++i) { + operatorAddrs[i] = _validatorSet.at(offset + i); + creditAddrs[i] = _validators[operatorAddrs[i]].creditContract; + } + } + + /** + * @notice get the consensus address of a validator + * + * @param operatorAddress the operator address of the validator + * + * @return consensusAddress the consensus address of the validator + */ + function getValidatorConsensusAddress( + address operatorAddress + ) external view returns (address consensusAddress) { + Validator memory valInfo = _validators[operatorAddress]; + consensusAddress = valInfo.consensusAddress; + } + + /** + * @notice get the credit contract address of a validator + * + * @param operatorAddress the operator address of the validator + * + * @return creditContract the credit contract address of the validator + */ + function getValidatorCreditContract( + address operatorAddress + ) external view returns (address creditContract) { + Validator memory valInfo = _validators[operatorAddress]; + creditContract = valInfo.creditContract; + } + + /** + * @notice get the vote address of a validator + * + * @param operatorAddress the operator address of the validator + * + * @return voteAddress the vote address of the validator + */ + function getValidatorVoteAddress( + address operatorAddress + ) external view returns (bytes memory voteAddress) { + Validator memory valInfo = _validators[operatorAddress]; + voteAddress = valInfo.voteAddress; + } + + /** + * @notice get the basic info of a validator + * + * @param operatorAddress the operator address of the validator + * + * @return createdTime the creation time of the validator + * @return jailed whether the validator is jailed + * @return jailUntil the jail time of the validator + */ + function getValidatorBasicInfo( + address operatorAddress + ) external view returns (uint256 createdTime, bool jailed, uint256 jailUntil) { + Validator memory valInfo = _validators[operatorAddress]; + createdTime = valInfo.createdTime; + jailed = valInfo.jailed; + jailUntil = valInfo.jailUntil; + } + + /** + * @param operatorAddress the operator address of the validator + * + * @return the description of a validator + */ + function getValidatorDescription( + address operatorAddress + ) external view validatorExist(operatorAddress) returns (Description memory) { + return _validators[operatorAddress].description; + } + + /** + * @param operatorAddress the operator address of the validator + * + * @return the commission of a validator + */ + function getValidatorCommission( + address operatorAddress + ) external view validatorExist(operatorAddress) returns (Commission memory) { + return _validators[operatorAddress].commission; + } + + /** + * @param operatorAddress the operator address of the validator + * + * @return the agent of a validator + */ + function getValidatorAgent( + address operatorAddress + ) external view validatorExist(operatorAddress) returns (address) { + return _validators[operatorAddress].agent; + } + + /** + * @param operatorAddress the operator address of the validator + * + * @return the updateTime of a validator + */ + function getValidatorUpdateTime( + address operatorAddress + ) external view validatorExist(operatorAddress) returns (uint256) { + return _validators[operatorAddress].updateTime; + } + + /** + * @dev this function will be used by Parlia consensus engine. + * + * @notice get the election info of a validator + * + * @param offset the offset of the query + * @param limit the limit of the query + * + * @return consensusAddrs the consensus addresses of the validators + * @return votingPowers the voting powers of the validators. The voting power will be 0 if the validator is jailed. + * @return voteAddrs the vote addresses of the validators + * @return totalLength the total number of validators + */ + function getValidatorElectionInfo( + uint256 offset, + uint256 limit + ) + external + view + returns ( + address[] memory consensusAddrs, + uint256[] memory votingPowers, + bytes[] memory voteAddrs, + uint256 totalLength + ) + { + totalLength = _validatorSet.length(); + if (offset >= totalLength) { + return (consensusAddrs, votingPowers, voteAddrs, totalLength); + } + + limit = limit == 0 ? totalLength : limit; + uint256 count = (totalLength - offset) > limit ? limit : (totalLength - offset); + consensusAddrs = new address[](count); + votingPowers = new uint256[](count); + voteAddrs = new bytes[](count); + for (uint256 i; i < count; ++i) { + address operatorAddress = _validatorSet.at(offset + i); + Validator memory valInfo = _validators[operatorAddress]; + consensusAddrs[i] = valInfo.consensusAddress; + votingPowers[i] = valInfo.jailed ? 0 : IStakeCredit(valInfo.creditContract).totalPooledBNB(); + voteAddrs[i] = valInfo.voteAddress; + } + } + + /** + * @notice Adds multiple new NodeIDs to the validator's registry. + * @param nodeIDs Array of NodeIDs to be added. + */ + function addNodeIDs( + bytes32[] calldata nodeIDs + ) external whenNotPaused notInBlackList validatorExist(_bep563MsgSender()) { + maxNodeIDsInitializer(); + + if (nodeIDs.length == 0) { + revert InvalidNodeID(); + } + + address operatorAddress = _bep563MsgSender(); + bytes32[] storage existingNodeIDs = validatorNodeIDs[operatorAddress]; + uint256 currentLength = existingNodeIDs.length; + + if (currentLength + nodeIDs.length > maxNodeIDs) { + revert ExceedsMaxNodeIDs(); + } + + // Check for duplicates in new NodeIDs + for (uint256 i = 0; i < nodeIDs.length; i++) { + if (nodeIDs[i] == bytes32(0)) { + revert InvalidNodeID(); + } + for (uint256 j = i + 1; j < nodeIDs.length; j++) { + if (nodeIDs[i] == nodeIDs[j]) { + revert DuplicateNodeID(); + } + } + } + + // Check for duplicates in existing NodeIDs + for (uint256 i = 0; i < nodeIDs.length; i++) { + for (uint256 j = 0; j < currentLength; j++) { + if (nodeIDs[i] == existingNodeIDs[j]) { + revert DuplicateNodeID(); + } + } + } + + // Add new NodeIDs + for (uint256 i = 0; i < nodeIDs.length; i++) { + existingNodeIDs.push(nodeIDs[i]); + emit NodeIDAdded(operatorAddress, nodeIDs[i]); + } + } + + /** + * @notice Removes multiple NodeIDs from the validator's registry. + * @param targetNodeIDs Array of NodeIDs to be removed. + */ + function removeNodeIDs( + bytes32[] calldata targetNodeIDs + ) external whenNotPaused notInBlackList validatorExist(_bep563MsgSender()) { + address validator = _bep563MsgSender(); + bytes32[] storage nodeIDs = validatorNodeIDs[validator]; + uint256 length = nodeIDs.length; + + // If targetNodeIDs is empty, remove all NodeIDs + if (targetNodeIDs.length == 0) { + for (uint256 i = 0; i < length; i++) { + emit NodeIDRemoved(validator, nodeIDs[i]); + } + delete validatorNodeIDs[validator]; + return; + } + + // Otherwise, remove specific NodeIDs + for (uint256 i = 0; i < targetNodeIDs.length; i++) { + bytes32 nodeID = targetNodeIDs[i]; + for (uint256 j = 0; j < length; j++) { + if (nodeIDs[j] == nodeID) { + // Swap and pop + nodeIDs[j] = nodeIDs[length - 1]; + nodeIDs.pop(); + length--; + emit NodeIDRemoved(validator, nodeID); + break; + } + } + } + + // Clean up storage if no NodeIDs left + if (nodeIDs.length == 0) { + delete validatorNodeIDs[validator]; + } + } + + /** + * @notice Returns all validators with their consensus addresses and registered NodeIDs. + * @param validatorsToQuery The operator addresses of the validators. + * @return consensusAddresses Array of consensus addresses corresponding to the validators. + * @return nodeIDsList Array of NodeIDs for each validator. + */ + function getNodeIDs( + address[] calldata validatorsToQuery + ) external view returns (address[] memory consensusAddresses, bytes32[][] memory nodeIDsList) { + uint256 len = validatorsToQuery.length; + consensusAddresses = new address[](len); + nodeIDsList = new bytes32[][](len); + + for (uint256 i = 0; i < len; i++) { + address operator = validatorsToQuery[i]; + Validator memory valInfo = _validators[operator]; + consensusAddresses[i] = valInfo.consensusAddress; + nodeIDsList[i] = validatorNodeIDs[operator]; + } + + return (consensusAddresses, nodeIDsList); + } + + /*----------------- internal functions -----------------*/ + function _checkMoniker( + string memory moniker + ) internal pure returns (bool) { + bytes memory bz = bytes(moniker); + + // 1. moniker length should be between 3 and 9 + if (bz.length < 3 || bz.length > 9) { + return false; + } + + // 2. first character should be uppercase + if (uint8(bz[0]) < 65 || uint8(bz[0]) > 90) { + return false; + } + + // 3. only alphanumeric characters are allowed + for (uint256 i = 1; i < bz.length; ++i) { + // Check if the ASCII value of the character falls outside the range of alphanumeric characters + if ( + (uint8(bz[i]) < 48 || uint8(bz[i]) > 57) && (uint8(bz[i]) < 65 || uint8(bz[i]) > 90) + && (uint8(bz[i]) < 97 || uint8(bz[i]) > 122) + ) { + // Character is a special character + return false; + } + } + + // No special characters found + return true; + } + + function _checkVoteAddress( + address operatorAddress, + bytes calldata voteAddress, + bytes calldata blsProof + ) internal view returns (bool) { + if (voteAddress.length != BLS_PUBKEY_LENGTH || blsProof.length != BLS_SIG_LENGTH) { + return false; + } + + // get msg hash + bytes32 msgHash = keccak256(abi.encodePacked(operatorAddress, voteAddress, block.chainid)); + bytes memory msgBz = new bytes(32); + assembly { + mstore(add(msgBz, 32), msgHash) + } + + // call the precompiled contract to verify the BLS signature + // the precompiled contract's address is 0x66 + bytes memory input = bytes.concat(msgBz, blsProof, voteAddress); // length: 32 + 96 + 48 = 176 + bytes memory output = new bytes(1); + assembly { + let len := mload(input) + if iszero(staticcall(not(0), 0x66, add(input, 0x20), len, add(output, 0x20), 0x01)) { revert(0, 0) } + } + uint8 result = uint8(output[0]); + if (result != uint8(1)) { + return false; + } + return true; + } + + function _deployStakeCredit(address operatorAddress, string memory moniker) internal returns (address) { + address creditProxy = address(new TransparentUpgradeableProxy(STAKE_CREDIT_ADDR, DEAD_ADDRESS, "")); + IStakeCredit(creditProxy).initialize{ value: msg.value }(operatorAddress, moniker); + emit StakeCreditInitialized(operatorAddress, creditProxy); + + return creditProxy; + } + + function _checkValidatorSelfDelegation( + address operatorAddress + ) internal { + Validator storage valInfo = _validators[operatorAddress]; + if (valInfo.jailed) { + return; + } + if (IStakeCredit(valInfo.creditContract).getPooledBNB(operatorAddress) < minSelfDelegationBNB) { + _jailValidator(valInfo, block.timestamp + downtimeJailTime); + IBSCValidatorSet(VALIDATOR_CONTRACT_ADDR).felony(valInfo.consensusAddress); + } + } + + function _checkFelonyRecord(address operatorAddress, SlashType slashType) internal returns (bool, uint256) { + bytes32 slashKey = keccak256(abi.encodePacked(operatorAddress, slashType)); + uint256 jailUntil = _felonyRecords[slashKey]; + // for double sign and malicious vote slash + // if the validator is already jailed, no need to slash again + if (jailUntil > block.timestamp) { + return (false, 0); + } + jailUntil = block.timestamp + felonyJailTime; + _felonyRecords[slashKey] = jailUntil; + return (true, jailUntil); + } + + function _jailValidator(Validator storage valInfo, uint256 jailUntil) internal { + // keep the last eligible validator + bool isLast = (numOfJailed >= _validatorSet.length() - 1); + if (isLast) { + // If staking channel is closed, then BC-fusion is finished and we should keep the last eligible validator here + emit ValidatorEmptyJailed(valInfo.operatorAddress); + return; + } + + if (jailUntil > valInfo.jailUntil) { + valInfo.jailUntil = jailUntil; + } + + if (!valInfo.jailed) { + valInfo.jailed = true; + numOfJailed += 1; + + emit ValidatorJailed(valInfo.operatorAddress); + } + } + + function _claim(address operatorAddress, uint256 requestNumber) internal validatorExist(operatorAddress) { + uint256 bnbAmount = IStakeCredit(_validators[operatorAddress].creditContract).claim(msg.sender, requestNumber); + emit Claimed(operatorAddress, msg.sender, bnbAmount); + } + + function _bep410MsgSender() internal view returns (address) { + if (agentToOperator[msg.sender] != address(0)) { + return agentToOperator[msg.sender]; + } + + return msg.sender; + } + + function _bep563MsgSender() internal view returns (address) { + // Rotated consensus addresses must no longer authorize validator-admin + // actions, but the stale mapping is intentionally retained for system + // paths such as slash/reward handling. + if (consensusToOperator[msg.sender] != address(0) && consensusExpiration[msg.sender] == 0) { + return consensusToOperator[msg.sender]; + } + + return _bep410MsgSender(); + } + + function maxNodeIDsInitializer() internal { + if (maxNodeIDs == 0) { + maxNodeIDs = INIT_MAX_NUMBER_NODE_ID; + } + } +} diff --git a/plan/agw/research/preset-catalog-2026-10-15/VBep20.sol b/plan/agw/research/preset-catalog-2026-10-15/VBep20.sol new file mode 100644 index 00000000..d2d5e1c0 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/VBep20.sol @@ -0,0 +1,272 @@ +// SPDX-License-Identifier: BSD-3-Clause + +pragma solidity 0.8.25; + +import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import { ComptrollerInterface } from "../../Comptroller/ComptrollerInterface.sol"; +import { InterestRateModelV8 } from "../../InterestRateModels/InterestRateModelV8.sol"; +import { VBep20Interface, VTokenInterface } from "./VTokenInterfaces.sol"; +import { VToken } from "./VToken.sol"; + +/** + * @title Venus's VBep20 Contract + * @notice vTokens which wrap an ERC-20 underlying + * @author Venus + */ +contract VBep20 is VToken, VBep20Interface { + using SafeERC20 for IERC20; + + /*** User Interface ***/ + + /** + * @notice Sender supplies assets into the market and receives vTokens in exchange + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param mintAmount The amount of the underlying asset to supply + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + // @custom:event Emits Transfer event + // @custom:event Emits Mint event + function mint(uint mintAmount) external returns (uint) { + (uint err, ) = mintInternal(mintAmount); + return err; + } + + /** + * @notice Sender supplies assets into the market and receiver receives vTokens in exchange + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param receiver The account which is receiving the vTokens + * @param mintAmount The amount of the underlying asset to supply + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + // @custom:event Emits Transfer event + // @custom:event Emits MintBehalf event + function mintBehalf(address receiver, uint mintAmount) external returns (uint) { + (uint err, ) = mintBehalfInternal(receiver, mintAmount); + return err; + } + + /** + * @notice Sender redeems vTokens in exchange for the underlying asset + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param redeemTokens The number of vTokens to redeem into underlying + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + // @custom:event Emits Redeem event on success + // @custom:event Emits Transfer event on success + // @custom:event Emits RedeemFee when fee is charged by the treasury + function redeem(uint redeemTokens) external returns (uint) { + return redeemInternal(msg.sender, payable(msg.sender), redeemTokens); + } + + /** + * @notice Sender redeems assets on behalf of some other address. This function is only available + * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate` + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param redeemer The user on behalf of whom to redeem + * @param redeemTokens The number of vTokens to redeem into underlying + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + // @custom:event Emits Redeem event on success + // @custom:event Emits Transfer event on success + // @custom:event Emits RedeemFee when fee is charged by the treasury + function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) { + require(comptroller.approvedDelegates(redeemer, msg.sender), "not an approved delegate"); + + return redeemInternal(redeemer, payable(msg.sender), redeemTokens); + } + + /** + * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param redeemAmount The amount of underlying to redeem + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + // @custom:event Emits Redeem event on success + // @custom:event Emits Transfer event on success + // @custom:event Emits RedeemFee when fee is charged by the treasury + function redeemUnderlying(uint redeemAmount) external returns (uint) { + return redeemUnderlyingInternal(msg.sender, payable(msg.sender), redeemAmount); + } + + /** + * @notice Sender redeems underlying assets on behalf of some other address. This function is only available + * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate` + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param redeemer, on behalf of whom to redeem + * @param redeemAmount The amount of underlying to receive from redeeming vTokens + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + // @custom:event Emits Redeem event on success + // @custom:event Emits Transfer event on success + // @custom:event Emits RedeemFee when fee is charged by the treasury + function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) { + require(comptroller.approvedDelegates(redeemer, msg.sender), "not an approved delegate"); + + return redeemUnderlyingInternal(redeemer, payable(msg.sender), redeemAmount); + } + + /** + * @notice Sender borrows assets from the protocol to their own address + * @param borrowAmount The amount of the underlying asset to borrow + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + // @custom:event Emits Borrow event on success + function borrow(uint borrowAmount) external returns (uint) { + return borrowInternal(msg.sender, payable(msg.sender), borrowAmount); + } + + /** + * @notice Sender borrows assets on behalf of some other address. This function is only available + * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate` + * @param borrower The borrower, on behalf of whom to borrow. + * @param borrowAmount The amount of the underlying asset to borrow + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + // @custom:event Emits Borrow event on success + function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) { + require(comptroller.approvedDelegates(borrower, msg.sender), "not an approved delegate"); + return borrowInternal(borrower, payable(msg.sender), borrowAmount); + } + + /** + * @notice Sender repays their own borrow + * @param repayAmount The amount to repay + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + // @custom:event Emits RepayBorrow event on success + function repayBorrow(uint repayAmount) external returns (uint) { + (uint err, ) = repayBorrowInternal(repayAmount); + return err; + } + + /** + * @notice Sender repays a borrow belonging to another borrowing account + * @param borrower The account with the debt being payed off + * @param repayAmount The amount to repay + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + // @custom:event Emits RepayBorrow event on success + function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) { + (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount); + return err; + } + + /** + * @notice The sender liquidates the borrowers collateral. + * The collateral seized is transferred to the liquidator. + * @param borrower The borrower of this vToken to be liquidated + * @param repayAmount The amount of the underlying borrowed asset to repay + * @param vTokenCollateral The market in which to seize collateral from the borrower + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + // @custom:event Emit LiquidateBorrow event on success + function liquidateBorrow( + address borrower, + uint repayAmount, + VTokenInterface vTokenCollateral + ) external returns (uint) { + (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral); + return err; + } + + /** + * @notice The sender adds to reserves. + * @param addAmount The amount of underlying tokens to add as reserves + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + // @custom:event Emits ReservesAdded event + function _addReserves(uint addAmount) external returns (uint) { + return _addReservesInternal(addAmount); + } + + /** + * @notice Initialize the new money market + * @param underlying_ The address of the underlying asset + * @param comptroller_ The address of the Comptroller + * @param interestRateModel_ The address of the interest rate model + * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18 + * @param name_ BEP-20 name of this token + * @param symbol_ BEP-20 symbol of this token + * @param decimals_ BEP-20 decimal precision of this token + */ + function initialize( + address underlying_, + ComptrollerInterface comptroller_, + InterestRateModelV8 interestRateModel_, + uint initialExchangeRateMantissa_, + string memory name_, + string memory symbol_, + uint8 decimals_ + ) public { + // VToken initialize does the bulk of the work + super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_); + + // Set underlying and sanity check it + underlying = underlying_; + IERC20(underlying).totalSupply(); + } + + /*** Safe Token ***/ + + /** + * @dev Similar to ERC-20 transfer, but handles tokens that have transfer fees. + * This function returns the actual amount received, + * which may be less than `amount` if there is a fee attached to the transfer. + * Increments `internalCash` by the actual amount received. + * @param from Sender of the underlying tokens + * @param amount Amount of underlying to transfer + * @return Actual amount received + */ + function doTransferIn(address from, uint256 amount) internal virtual override returns (uint256) { + IERC20 token = IERC20(underlying); + uint256 balanceBefore = token.balanceOf(address(this)); + token.safeTransferFrom(from, address(this), amount); + uint256 balanceAfter = token.balanceOf(address(this)); + uint256 actualAmount = balanceAfter - balanceBefore; + internalCash += actualAmount; + // Return the amount that was *actually* transferred + return actualAmount; + } + + /** + * @dev Just a regular ERC-20 transfer, reverts on failure. + * Decrements `internalCash` by `amount` before transferring. + * @param to Receiver of the underlying tokens + * @param amount Amount of underlying to transfer + */ + function doTransferOut(address payable to, uint256 amount) internal virtual override { + internalCash -= amount; + IERC20 token = IERC20(underlying); + token.safeTransfer(to, amount); + } + + /** + * @notice Gets the tracked internal cash balance of this contract + * @dev Returns `internalCash` rather than the actual token balance, making it immune to donation attacks. + * @return The internally tracked cash balance of underlying tokens + */ + function getCashPrior() internal view override returns (uint) { + return internalCash; + } + + /** + * @notice Transfer excess tokens to caller and sync internalCash with actual balance + * @dev Admin-only. `sweepTokenAndSync(0)` is the general admin resync entry for internalCash — + * use it for migration, donation-attack protection, and intentional donation incorporation. + * Transfers `transferAmount` of underlying to msg.sender, then sets internalCash = balanceOf(address(this)). + * @param transferAmount Amount of underlying to transfer to msg.sender before syncing + */ + function sweepTokenAndSync(uint256 transferAmount) external { + require(msg.sender == admin); + + if (transferAmount > 0) { + IERC20(underlying).safeTransfer(msg.sender, transferAmount); + emit TokenSwept(msg.sender, transferAmount); + } + + uint256 oldInternalCash = internalCash; + internalCash = IERC20(underlying).balanceOf(address(this)); + emit CashSynced(oldInternalCash, internalCash); + } +} diff --git a/plan/agw/research/preset-catalog-2026-10-15/additional-sources.json b/plan/agw/research/preset-catalog-2026-10-15/additional-sources.json new file mode 100644 index 00000000..befa930b --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/additional-sources.json @@ -0,0 +1,22 @@ +[ + { + "file": "PancakeIV3SwapRouter.sol", + "url": "https://raw.githubusercontent.com/pancakeswap/pancake-v3-contracts/main/projects/smart-router/contracts/interfaces/IV3SwapRouter.sol", + "error": "HTTP Error 404: Not Found" + }, + { + "file": "MERC20.sol", + "url": "https://raw.githubusercontent.com/moonwell-fi/moonwell-contracts-v2/main/src/MErc20.sol", + "bytes": 11341 + }, + { + "file": "EigenStrategyManager.sol", + "url": "https://raw.githubusercontent.com/Layr-Labs/eigenlayer-contracts/v1.5.0/src/contracts/core/StrategyManager.sol", + "bytes": 23355 + }, + { + "file": "Comptroller.sol", + "url": "https://raw.githubusercontent.com/moonwell-fi/moonwell-contracts-v2/main/src/Comptroller.sol", + "bytes": 50692 + } +] diff --git a/plan/agw/research/preset-catalog-2026-10-15/addresses.md b/plan/agw/research/preset-catalog-2026-10-15/addresses.md new file mode 100644 index 00000000..27da8949 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/addresses.md @@ -0,0 +1,71 @@ +--- +description: Fork of Uniswap v3 +--- + +# PancakeSwap v3 Addresses + +## Core + +| Contract | BSC, ETH, ARB, Linea, Base, opBNB, BSC TESTNET / MAINNET, Monad, Robinhood | zkSync | +| --------------------- | -------------------------------------------------------------------- | ------------------------------------------ | +| PancakeV3Factory | 0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865 | 0x1BB72E0CbbEA93c08f535fc7856E0338D7F7a8aB | +| PancakeV3PoolDeployer | 0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9 | 0x7f71382044A6a62595D5D357fE75CA8199123aD6 | + +## Periphery + +| Contract | BSC, ETH, Arbitrum, Linea, Base, opBNB, Monad | zkSync | BSC TESTNET | Robinhood | +| -------------------------- | --------------------------------------------- | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| SwapRouter (v3) | 0x1b81D678ffb9C0263b24A97847620C99d213eB14 | 0xD70C70AD87aa8D45b8D59600342FB3AEe76E3c68 | 0x1b81D678ffb9C0263b24A97847620C99d213eB14 | n/a | +| V3Migrator | 0xbC203d7f83677c7ed3F7acEc959963E7F4ECC5C2 | 0x556A72A7A3bB3bbd293D923e59b6B56898fB405D | 0x46A15B0b27311cedF172AB29E4f4766fbE7F4364 | 0xbC203d7f83677c7ed3F7acEc959963E7F4ECC5C2 | +| NonfungiblePositionManager | 0x46A15B0b27311cedF172AB29E4f4766fbE7F4364 | 0xa815e2eD7f7d5B0c49fda367F249232a1B9D2883 | 0x427bF5b37357632377eCbEC9de3626C71A5396c1 | 0x46A15B0b27311cedF172AB29E4f4766fbE7F4364 | +| QuoterV2 | 0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997 | 0x3d146FcE6c1006857750cBe8aF44f76a28041CCc | 0xbC203d7f83677c7ed3F7acEc959963E7F4ECC5C2 | 0x8553AA1615549A86882151784b329B017aA7c832 | +| TickLens | 0x9a489505a00cE272eAa5e07Dba6491314CaE3796 | 0x7b08978FA77910f77d273c353C62b5BFB9E6D17B | 0xac1cE734566f390A94b00eb9bf561c2625BF44ea | 0x9a489505a00cE272eAa5e07Dba6491314CaE3796 | +| PancakeInterfaceMulticall | 0xac1cE734566f390A94b00eb9bf561c2625BF44ea | 0x2a76b93B9Cd441AE8aDA529e0e95826e00556351 | 0x3D00CdB4785F0ef20C903A13596e0b9B2c652227 | 0xcf05Fc31A6B693DD0bEB76e958ae4BCD490dc985 | + +| Contract | BSC, ETH, Linea | Linea, Base, opBNB | Arbitrum | zkSync | Monad | BSC TESTNET | Robinhood | +| ------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| MixedRouteQuoterV1 | 0x678Aa4bF4E210cf2166753e054d5b7c31cc7fa86 | 0x4c650FB471fe4e0f476fD3437C3411B1122c4e3B | 0x3652Fc6EDcbD76161b8554388867d3dAb65eCA93 | 0x9B1edFB3848660402E4f1DC25733764e80aA627A | 0x77b482D9A4E391d682C857C630B8d869FdeE5c44 | 0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997 | 0x2b792b99ae08483D45d79833408439674C6Daf1B | +| TokenValidator | 0x864ED564875BdDD6F421e226494a0E7c071C06f8 | 0x556B9306565093C855AEA9AE92A594704c2Cd59e | 0x8be9EA9C6015985AB2F5A216093305A9AaEb8164 | 0x08529A4be615746ef31CdbeD46Ce556406787E2F | 0xfcB76dfDf9c79AE5d334C0E1901449c8A893DF22 | 0x678Aa4bF4E210cf2166753e054d5b7c31cc7fa86 | n/a | + +## Smart Router +Able to route to v3, v2 and stable pool + +| Chain | Address +| ------------------------------------------ | ------------------------------------------ | +| BSC, ETH, Robinhood | 0x13f4EA83D0bd40E75C8222255bc855a974568Dd4 | +| Linea, Base, opBNB | 0x678Aa4bF4E210cf2166753e054d5b7c31cc7fa86 | +| Arbitrum | 0x32226588378236Fd0c7c4053999F88aC0e5cAc77 | +| zkSync | 0xf8b59f3c3Ab33200ec80a8A58b2aA5F5D2a8944C | +| Monad | 0x21114915Ac6d5A2e156931e20B20b038dEd0Be7C | + +**Testnet** + +| Chain | Address +| ------------------------------------------ | ------------------------------------------ | +| BSC testnet | 0x9a489505a00cE272eAa5e07Dba6491314CaE3796 | + + +## MasterchefV3 + +**Mainnet** + +| Chain | Address +| ------------------------------------------ | ------------------------------------------ | +| BSC, ETH | 0x556B9306565093C855AEA9AE92A594704c2Cd59e | +| Arbitrum | 0x5e09ACf80C0296740eC5d6F643005a4ef8DaA694 | +| zkSync | 0x4c615E78c5fCA1Ad31e4d66eb0D8688d84307463 | +| Linea | 0x22E2f236065B780FA33EC8C4E58b99ebc8B55c57 | +| Base | 0xC6A2Db661D5a5690172d8eB0a7DEA2d3008665A3 | +| opBNB | 0x05ddEDd07C51739d2aE21F6A9d97a8d69C2C3aaA | + +**Testnet** + +| Chain | Address +| ------------------------------------------ | ------------------------------------------ | +| BSC testnet | 0x4c650FB471fe4e0f476fD3437C3411B1122c4e3B | +| Arbitrum | 0x66A9870FF7707936B0B0278cF999C5f2Ac2e42F5 | +| zkSync | 0x3c6Aa61f72932aD5D7C917737367be32D5509e6f | +| Linea | 0xb66b07590B30d4E6E22e45Ddc83B06Bb018A7B44 | +| Base | 0xAd3fe5Aeabf79B8291F877B367139466c221216e | +| opBNB | 0x236e713bFF45adb30e25D1c29A887aBCb0Ea7E21 | + diff --git a/plan/agw/research/preset-catalog-2026-10-15/addresses.ts b/plan/agw/research/preset-catalog-2026-10-15/addresses.ts new file mode 100644 index 00000000..8076118f --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/addresses.ts @@ -0,0 +1,714 @@ +import { ChainId, SUPPORTED_CHAINS, SupportedChainsType } from './chains' + +type AddressMap = { [chainId: number]: string } + +type ChainAddresses = { + v3CoreFactoryAddress: string + multicallAddress: string + quoterAddress: string + v3MigratorAddress?: string + nonfungiblePositionManagerAddress?: string + tickLensAddress?: string + swapRouter02Address?: string + mixedRouteQuoterV1Address?: string + mixedRouteQuoterV2Address?: string + + // v4 + v4PoolManagerAddress?: string + v4PositionManagerAddress?: string + v4StateView?: string + v4QuoterAddress?: string + permissionedV4PositionManagerAddress?: string + permissionedV4HooksAddress?: string +} + +const DEFAULT_NETWORKS = [ChainId.MAINNET, ChainId.GOERLI, ChainId.SEPOLIA] + +function constructSameAddressMap(address: string, additionalNetworks: ChainId[] = []): AddressMap { + return DEFAULT_NETWORKS.concat(additionalNetworks).reduce((memo, chainId) => { + memo[chainId] = address + return memo + }, {}) +} + +export const UNI_ADDRESSES: AddressMap = constructSameAddressMap('0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', [ + ChainId.OPTIMISM, + ChainId.ARBITRUM_ONE, + ChainId.POLYGON, + ChainId.POLYGON_MUMBAI, + ChainId.SEPOLIA, +]) + +export const UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS = '0x8B799381ac40b838BBA4131ffB26197C432AFe78' + +/** + * @deprecated use V2_FACTORY_ADDRESSES instead + */ +export const V2_FACTORY_ADDRESS = '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f' +export const V2_FACTORY_ADDRESSES: AddressMap = { + [ChainId.MAINNET]: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f', + [ChainId.GOERLI]: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f', + [ChainId.SEPOLIA]: '0xF62c03E08ada871A0bEb309762E260a7a6a880E6', + [ChainId.OPTIMISM]: '0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf', + [ChainId.ARBITRUM_ONE]: '0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9', + [ChainId.AVALANCHE]: '0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C', + [ChainId.BASE_SEPOLIA]: '0x7Ae58f10f7849cA6F5fB71b7f45CB416c9204b1e', + [ChainId.BASE]: '0x8909dc15e40173ff4699343b6eb8132c65e18ec6', + [ChainId.BNB]: '0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6', + [ChainId.POLYGON]: '0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C', + [ChainId.CELO]: '0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f', + [ChainId.BLAST]: '0x5C346464d33F90bABaf70dB6388507CC889C1070', + [ChainId.WORLDCHAIN]: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f', + [ChainId.UNICHAIN_SEPOLIA]: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f', + [ChainId.UNICHAIN]: '0x1f98400000000000000000000000000000000002', + [ChainId.MONAD_TESTNET]: '0x733e88f248b742db6c14c0b1713af5ad7fdd59d0', + [ChainId.SONEIUM]: '0x97febbc2adbd5644ba22736e962564b23f5828ce', + [ChainId.MONAD]: '0x182a927119d56008d921126764bf884221b10f59', + [ChainId.XLAYER]: '0xdf38f24fe153761634be942f9d859f3dba857e95', + [ChainId.LINEA]: '0x114A43DF6C5f54EBB8A9d70Cd1951D3dD68004c7', + [ChainId.TEMPO]: '0xf9ec577a4e45b5278bb7cf60fcbc20c3acaef68f', + [ChainId.MEGAETH]: '0xbf56488c857a881ae7e3bed27cf99c10a7ab7e50', + [ChainId.ARC]: '0x89e5db8b5aa49aa85ac63f691524311aeb649eba', + [ChainId.ROBINHOOD]: '0x8bceaa40b9acdfaedf85adf4ff01f5ad6517937f', + [ChainId.INK]: '0xfe57a6ba1951f69ae2ed4abe23e0f095df500c04', +} +/** + * @deprecated use V2_ROUTER_ADDRESSES instead + */ +export const V2_ROUTER_ADDRESS = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D' +export const V2_ROUTER_ADDRESSES: AddressMap = { + [ChainId.MAINNET]: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D', + [ChainId.GOERLI]: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D', + [ChainId.SEPOLIA]: '0xeE567Fe1712Faf6149d80dA1E6934E354124CfE3', + [ChainId.ARBITRUM_ONE]: '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', + [ChainId.OPTIMISM]: '0x4a7b5da61326a6379179b40d00f57e5bbdc962c2', + [ChainId.BASE_SEPOLIA]: '0x1689E7B1F10000AE47eBfE339a4f69dECd19F602', + [ChainId.BASE]: '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', + [ChainId.AVALANCHE]: '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', + [ChainId.BNB]: '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24', + [ChainId.POLYGON]: '0xedf6066a2b290c185783862c7f4776a2c8077ad1', + [ChainId.BLAST]: '0xBB66Eb1c5e875933D44DAe661dbD80e5D9B03035', + [ChainId.WORLDCHAIN]: '0x541aB7c31A119441eF3575F6973277DE0eF460bd', + [ChainId.UNICHAIN_SEPOLIA]: '0x920b806E40A00E02E7D2b94fFc89860fDaEd3640', + [ChainId.UNICHAIN]: '0x284f11109359a7e1306c3e447ef14d38400063ff', + [ChainId.MONAD_TESTNET]: '0xfb8e1c3b833f9e67a71c859a132cf783b645e436', + [ChainId.SONEIUM]: '0x273f68c234fa55b550b40e563c4a488e0d334320', + [ChainId.MONAD]: '0x4b2ab38dbf28d31d467aa8993f6c2585981d6804', + [ChainId.XLAYER]: '0x182a927119d56008d921126764bf884221b10f59', + [ChainId.LINEA]: '0x8702463e73f74d0b6765abceb314ef07acb92650', + [ChainId.TEMPO]: '0x0fbac3c46f6f83b44c7fb4ea986d7309c701d73e', + [ChainId.MEGAETH]: '0xb73055db2b3a3eae87a331dd88e4a80b43602690', + [ChainId.ARC]: '0x1f7d7550b1b028f7571e69a784071f0205fd2efa', + [ChainId.ROBINHOOD]: '0x89e5db8b5aa49aa85ac63f691524311aeb649eba', +} + +// Networks that share most of the same addresses i.e. Mainnet, Goerli, Optimism, Arbitrum, Polygon +const DEFAULT_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x1F98431c8aD98523631AE4a59f267346ea31F984', + multicallAddress: '0x1F98415757620B543A52E61c46B32eB19261F984', + quoterAddress: '0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6', + v3MigratorAddress: '0xA5644E29708357803b5A882D272c41cC0dF92B34', + nonfungiblePositionManagerAddress: '0xC36442b4a4522E871399CD717aBDD847Ab11FE88', +} +const MAINNET_ADDRESSES: ChainAddresses = { + ...DEFAULT_ADDRESSES, + mixedRouteQuoterV1Address: '0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E', + + v4PoolManagerAddress: '0x000000000004444c5dc75cB358380D2e3dE08A90', + v4PositionManagerAddress: '0xbd216513d74c8cf14cf4747e6aaa6420ff64ee9e', + v4StateView: '0x7ffe42c4a5deea5b0fec41c94c136cf115597227', + v4QuoterAddress: '0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203', + permissionedV4PositionManagerAddress: '0xD7BE746B6b29f6185A01013E944313E1704C971F', + permissionedV4HooksAddress: '0x499a724Ab630549f14C995EC41a8E04fA3fd28c0', +} +const GOERLI_ADDRESSES: ChainAddresses = { + ...DEFAULT_ADDRESSES, + mixedRouteQuoterV1Address: '0xBa60b6e6fF25488308789E6e0A65D838be34194e', +} + +const OPTIMISM_ADDRESSES: ChainAddresses = { + ...DEFAULT_ADDRESSES, + + v4PoolManagerAddress: '0x9a13f98cb987694c9f086b1f5eb990eea8264ec3', + v4PositionManagerAddress: '0x3c3ea4b57a46241e54610e5f022e5c45859a1017', + v4StateView: '0xc18a3169788f4f75a170290584eca6395c75ecdb', + v4QuoterAddress: '0x1f3131a13296fb91c90870043742c3cdbff1a8d7', +} + +const ARBITRUM_ONE_ADDRESSES: ChainAddresses = { + ...DEFAULT_ADDRESSES, + multicallAddress: '0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB', + tickLensAddress: '0xbfd8137f7d1516D3ea5cA83523914859ec47F573', + + v4PoolManagerAddress: '0x360e68faccca8ca495c1b759fd9eee466db9fb32', + v4PositionManagerAddress: '0xd88f38f930b7952f2db2432cb002e7abbf3dd869', + v4StateView: '0x76fd297e2d437cd7f76d50f01afe6160f86e9990', + v4QuoterAddress: '0x3972c00f7ed4885e145823eb7c655375d275a1c5', +} +const POLYGON_ADDRESSES: ChainAddresses = { + ...DEFAULT_ADDRESSES, + + v4PoolManagerAddress: '0x67366782805870060151383f4bbff9dab53e5cd6', + v4PositionManagerAddress: '0x1ec2ebf4f37e7363fdfe3551602425af0b3ceef9', + v4StateView: '0x5ea1bd7974c8a611cbab0bdcafcb1d9cc9b3ba5a', + v4QuoterAddress: '0xb3d5c3dfc3a7aebff71895a7191796bffc2c81b9', +} + +// celo v3 and v4 addresses +const CELO_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0xAfE208a311B21f13EF87E33A90049fC17A7acDEc', + multicallAddress: '0x633987602DE5C4F337e3DbF265303A1080324204', + quoterAddress: '0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8', + v3MigratorAddress: '0x3cFd4d48EDfDCC53D3f173F596f621064614C582', + nonfungiblePositionManagerAddress: '0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A', + tickLensAddress: '0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D', + + v4PoolManagerAddress: '0x288dc841A52FCA2707c6947B3A777c5E56cd87BC', + v4PositionManagerAddress: '0xf7965f3981e4d5bc383bfbcb61501763e9068ca9', + v4StateView: '0xbc21f8720babf4b20d195ee5c6e99c52b76f2bfb', + v4QuoterAddress: '0x28566da1093609182dff2cb2a91cfd72e61d66cd', +} + +// BNB v3 addresses +const BNB_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7', + multicallAddress: '0x963Df249eD09c358A4819E39d9Cd5736c3087184', + quoterAddress: '0x78D78E420Da98ad378D7799bE8f4AF69033EB077', + v3MigratorAddress: '0x32681814957e0C13117ddc0c2aba232b5c9e760f', + nonfungiblePositionManagerAddress: '0x7b8A01B39D58278b5DE7e48c8449c9f4F5170613', + tickLensAddress: '0xD9270014D396281579760619CCf4c3af0501A47C', + swapRouter02Address: '0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2', + + v4PoolManagerAddress: '0x28e2ea090877bf75740558f6bfb36a5ffee9e9df', + v4PositionManagerAddress: '0x7a4a5c919ae2541aed11041a1aeee68f1287f95b', + v4StateView: '0xd13dd3d6e93f276fafc9db9e6bb47c1180aee0c4', + v4QuoterAddress: '0x9f75dd27d6664c475b90e105573e550ff69437b0', +} + +// optimism goerli addresses +const OPTIMISM_GOERLI_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0xB656dA17129e7EB733A557f4EBc57B76CFbB5d10', + multicallAddress: '0x07F2D8a2a02251B62af965f22fC4744A5f96BCCd', + quoterAddress: '0x9569CbA925c8ca2248772A9A4976A516743A246F', + v3MigratorAddress: '0xf6c55fBe84B1C8c3283533c53F51bC32F5C7Aba8', + nonfungiblePositionManagerAddress: '0x39Ca85Af2F383190cBf7d7c41ED9202D27426EF6', + tickLensAddress: '0xe6140Bd164b63E8BfCfc40D5dF952f83e171758e', +} + +// optimism sepolia addresses +const OPTIMISM_SEPOLIA_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x8CE191193D15ea94e11d327b4c7ad8bbE520f6aF', + multicallAddress: '0x80e4e06841bb76AA9735E0448cB8d003C0EF009a', + quoterAddress: '0x0FBEa6cf957d95ee9313490050F6A0DA68039404', + v3MigratorAddress: '0xE7EcbAAaA54D007A00dbb6c1d2f150066D69dA07', + nonfungiblePositionManagerAddress: '0xdA75cEf1C93078e8b736FCA5D5a30adb97C8957d', + tickLensAddress: '0xCb7f54747F58F8944973cea5b8f4ac2209BadDC5', + swapRouter02Address: '0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4', +} + +// arbitrum goerli v3 addresses +const ARBITRUM_GOERLI_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6', + multicallAddress: '0x8260CB40247290317a4c062F3542622367F206Ee', + quoterAddress: '0x1dd92b83591781D0C6d98d07391eea4b9a6008FA', + v3MigratorAddress: '0xA815919D2584Ac3F76ea9CB62E6Fd40a43BCe0C3', + nonfungiblePositionManagerAddress: '0x622e4726a167799826d1E1D150b076A7725f5D81', + tickLensAddress: '0xb52429333da969a0C79a60930a4Bf0020E5D1DE8', +} + +// arbitrum sepolia v3 addresses +const ARBITRUM_SEPOLIA_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e', + multicallAddress: '0x2B718b475e385eD29F56775a66aAB1F5cC6B2A0A', + quoterAddress: '0x2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B', + v3MigratorAddress: '0x398f43ef2c67B941147157DA1c5a868E906E043D', + nonfungiblePositionManagerAddress: '0x6b2937Bde17889EDCf8fbD8dE31C3C2a70Bc4d65', + tickLensAddress: '0x0fd18587734e5C2dcE2dccDcC7DD1EC89ba557d9', + swapRouter02Address: '0x101F443B4d1b059569D643917553c771E1b9663E', + + v4PoolManagerAddress: '0xFB3e0C6F74eB1a21CC1Da29aeC80D2Dfe6C9a317', + v4PositionManagerAddress: '0xAc631556d3d4019C95769033B5E719dD77124BAc', + v4StateView: '0x9d467fa9062b6e9b1a46e26007ad82db116c67cb', + v4QuoterAddress: '0x7de51022d70a725b508085468052e25e22b5c4c9', +} + +// sepolia v3 addresses +const SEPOLIA_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x0227628f3F023bb0B980b67D528571c95c6DaC1c', + multicallAddress: '0xD7F33bCdb21b359c8ee6F0251d30E94832baAd07', + quoterAddress: '0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3', + v3MigratorAddress: '0x729004182cF005CEC8Bd85df140094b6aCbe8b15', + nonfungiblePositionManagerAddress: '0x1238536071E1c677A632429e3655c799b22cDA52', + tickLensAddress: '0x0b343475d44EC2b4b8243EBF81dc888BF0A14b36', + swapRouter02Address: '0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E', + + // TODO: update mixedRouteQuoterV2Address once v4 on sepolia redeployed + mixedRouteQuoterV2Address: '0x4745f77b56a0e2294426e3936dc4fab68d9543cd', + + // TODO: update all below once v4 on sepolia redeployed + v4PoolManagerAddress: '0xE03A1074c86CFeDd5C142C4F04F1a1536e203543', + v4PositionManagerAddress: '0x429ba70129df741B2Ca2a85BC3A2a3328e5c09b4', + v4StateView: '0xe1dd9c3fa50edb962e442f60dfbc432e24537e4c', + v4QuoterAddress: '0x61b3f2011a92d183c7dbadbda940a7555ccf9227', + permissionedV4PositionManagerAddress: '0x864C37908Aa5e10b100CaCEe1c62E3954d76f5E1', + permissionedV4HooksAddress: '0x51247E2291d290d17C08813A175AC86465EdE8c0', +} + +// Avalanche v3 addresses +const AVALANCHE_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD', + multicallAddress: '0x0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2', + quoterAddress: '0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F', + v3MigratorAddress: '0x44f5f1f5E452ea8d29C890E8F6e893fC0f1f0f97', + nonfungiblePositionManagerAddress: '0x655C406EBFa14EE2006250925e54ec43AD184f8B', + tickLensAddress: '0xEB9fFC8bf81b4fFd11fb6A63a6B0f098c6e21950', + swapRouter02Address: '0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE', + + v4PoolManagerAddress: '0x06380c0e0912312b5150364b9dc4542ba0dbbc85', + v4PositionManagerAddress: '0xb74b1f14d2754acfcbbe1a221023a5cf50ab8acd', + v4StateView: '0xc3c9e198c735a4b97e3e683f391ccbdd60b69286', + v4QuoterAddress: '0xbe40675bb704506a3c2ccfb762dcfd1e979845c2', +} + +const BASE_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x33128a8fC17869897dcE68Ed026d694621f6FDfD', + multicallAddress: '0x091e99cb1C49331a94dD62755D168E941AbD0693', + quoterAddress: '0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a', + v3MigratorAddress: '0x23cF10b1ee3AdfCA73B0eF17C07F7577e7ACd2d7', + nonfungiblePositionManagerAddress: '0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1', + tickLensAddress: '0x0CdeE061c75D43c82520eD998C23ac2991c9ac6d', + swapRouter02Address: '0x2626664c2603336E57B271c5C0b26F421741e481', + mixedRouteQuoterV1Address: '0xe544efae946f0008ae9a8d64493efa7886b73776', + + v4PoolManagerAddress: '0x498581ff718922c3f8e6a244956af099b2652b2b', + v4PositionManagerAddress: '0x7c5f5a4bbd8fd63184577525326123b519429bdc', + v4StateView: '0xa3c0c9b65bad0b08107aa264b0f3db444b867a71', + v4QuoterAddress: '0x0d5e0f971ed27fbff6c2837bf31316121532048d', + permissionedV4PositionManagerAddress: '0xC09255D86DB563cBc11C2fCf4a0C512e160111B4', + permissionedV4HooksAddress: '0x5750be78fEdfb2fA48FAa6C6623400Ba4538A8c0', +} + +// Base Goerli v3 addresses +const BASE_GOERLI_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2', + multicallAddress: '0xB206027a9E0E13F05eBEFa5D2402Bab3eA716439', + quoterAddress: '0xedf539058e28E5937dAef3f69cEd0b25fbE66Ae9', + v3MigratorAddress: '0x3efe5d02a04b7351D671Db7008ec6eBA9AD9e3aE', + nonfungiblePositionManagerAddress: '0x3c61369ef0D1D2AFa70d8feC2F31C5D6Ce134F30', + tickLensAddress: '0x1acB873Ee909D0c98adB18e4474943249F931b92', + swapRouter02Address: '0x8357227D4eDc78991Db6FDB9bD6ADE250536dE1d', +} + +// Base Sepolia v3 addresses +const BASE_SEPOLIA_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24', + multicallAddress: '0xd867e273eAbD6c853fCd0Ca0bFB6a3aE6491d2C1', + quoterAddress: '0xC5290058841028F1614F3A6F0F5816cAd0df5E27', + v3MigratorAddress: '0xCbf8b7f80800bd4888Fbc7bf1713B80FE4E23E10', + nonfungiblePositionManagerAddress: '0x27F971cb582BF9E50F397e4d29a5C7A34f11faA2', + tickLensAddress: '0xedf6066a2b290C185783862C7F4776A2C8077AD1', + swapRouter02Address: '0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4', + + // v4 + v4PoolManagerAddress: '0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408', + v4PositionManagerAddress: '0x4b2c77d209d3405f41a037ec6c77f7f5b8e2ca80', + v4StateView: '0x571291b572ed32ce6751a2cb2486ebee8defb9b4', + v4QuoterAddress: '0x4a6513c898fe1b2d0e78d3b0e0a4a151589b1cba', +} + +const ZORA_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x7145F8aeef1f6510E92164038E1B6F8cB2c42Cbb', + multicallAddress: '0xA51c76bEE6746cB487a7e9312E43e2b8f4A37C15', + quoterAddress: '0x11867e1b3348F3ce4FcC170BC5af3d23E07E64Df', + v3MigratorAddress: '0x048352d8dCF13686982C799da63fA6426a9D0b60', + nonfungiblePositionManagerAddress: '0xbC91e8DfA3fF18De43853372A3d7dfe585137D78', + tickLensAddress: '0x209AAda09D74Ad3B8D0E92910Eaf85D2357e3044', + swapRouter02Address: '0x7De04c96BE5159c3b5CeffC82aa176dc81281557', + + v4PoolManagerAddress: '0x0575338e4c17006ae181b47900a84404247ca30f', + v4PositionManagerAddress: '0xf66c7b99e2040f0d9b326b3b7c152e9663543d63', + v4StateView: '0x385785af07d63b50d0a0ea57c4ff89d06adf7328', + v4QuoterAddress: '0x5edaccc0660e0a2c44b06e07ce8b915e625dc2c6', +} + +const ZORA_SEPOLIA_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x4324A677D74764f46f33ED447964252441aA8Db6', + multicallAddress: '0xA1E7e3A69671C4494EC59Dbd442de930a93F911A', + quoterAddress: '0xC195976fEF0985886E37036E2DF62bF371E12Df0', + v3MigratorAddress: '0x65ef259b31bf1d977c37e9434658694267674897', + nonfungiblePositionManagerAddress: '0xB8458EaAe43292e3c1F7994EFd016bd653d23c20', + tickLensAddress: '0x23C0F71877a1Fc4e20A78018f9831365c85f3064', +} + +const ROOTSTOCK_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0xaF37EC98A00FD63689CF3060BF3B6784E00caD82', + multicallAddress: '0x996a9858cDfa45Ad68E47c9A30a7201E29c6a386', + quoterAddress: '0xb51727c996C68E60F598A923a5006853cd2fEB31', + v3MigratorAddress: '0x16678977CA4ec3DAD5efc7b15780295FE5f56162', + nonfungiblePositionManagerAddress: '0x9d9386c042F194B460Ec424a1e57ACDE25f5C4b1', + tickLensAddress: '0x55B9dF5bF68ADe972191a91980459f48ecA16afC', + swapRouter02Address: '0x0B14ff67f0014046b4b99057Aec4509640b3947A', +} + +const BLAST_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x792edAdE80af5fC680d96a2eD80A44247D2Cf6Fd', + multicallAddress: '0xdC7f370de7631cE9e2c2e1DCDA6B3B5744Cf4705', + quoterAddress: '0x6Cdcd65e03c1CEc3730AeeCd45bc140D57A25C77', + v3MigratorAddress: '0x15CA7043CD84C5D21Ae76Ba0A1A967d42c40ecE0', + nonfungiblePositionManagerAddress: '0xB218e4f7cF0533d4696fDfC419A0023D33345F28', + tickLensAddress: '0x2E95185bCdD928a3e984B7e2D6560Ab1b17d7274', + swapRouter02Address: '0x549FEB8c9bd4c12Ad2AB27022dA12492aC452B66', + + v4PoolManagerAddress: '0x1631559198a9e474033433b2958dabc135ab6446', + v4PositionManagerAddress: '0x4ad2f4cca2682cbb5b950d660dd458a1d3f1baad', + v4StateView: '0x12a88ae16f46dce4e8b15368008ab3380885df30', + v4QuoterAddress: '0x6f71cdcb0d119ff72c6eb501abceb576fbf62bcf', +} + +const ZKSYNC_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x8FdA5a7a8dCA67BBcDd10F02Fa0649A937215422', + multicallAddress: '0x0c68a7C72f074d1c45C16d41fa74eEbC6D16a65C', + quoterAddress: '0x8Cb537fc92E26d8EBBb760E632c95484b6Ea3e28', + v3MigratorAddress: '0x611841b24E43C4ACfd290B427a3D6cf1A59dac8E', + nonfungiblePositionManagerAddress: '0x0616e5762c1E7Dc3723c50663dF10a162D690a86', + tickLensAddress: '0xe10FF11b809f8EE07b056B452c3B2caa7FE24f89', + swapRouter02Address: '0x99c56385daBCE3E81d8499d0b8d0257aBC07E8A3', +} + +const WORLDCHAIN_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x7a5028BDa40e7B173C278C5342087826455ea25a', + multicallAddress: '0x0a22c04215c97E3F532F4eF30e0aD9458792dAB9', + quoterAddress: '0x10158D43e6cc414deE1Bd1eB0EfC6a5cBCfF244c', + v3MigratorAddress: '0x9EBDdCBa71C9027E1eB45135672a30bcFEec9de3', + nonfungiblePositionManagerAddress: '0xec12a9F9a09f50550686363766Cc153D03c27b5e', + tickLensAddress: '0xE61df0CaC9d85876aCE5E3037005D80943570623', + swapRouter02Address: '0x091AD9e2e6e5eD44c1c66dB50e49A601F9f36cF6', + + v4PoolManagerAddress: '0xb1860d529182ac3bc1f51fa2abd56662b7d13f33', + v4PositionManagerAddress: '0xc585e0f504613b5fbf874f21af14c65260fb41fa', + v4StateView: '0x51d394718bc09297262e368c1a481217fdeb71eb', + v4QuoterAddress: '0x55d235b3ff2daf7c3ede0defc9521f1d6fe6c5c0', +} + +const UNICHAIN_SEPOLIA_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x1F98431c8aD98523631AE4a59f267346ea31F984', + multicallAddress: '0x9D0F15f2cf58655fDDcD1EE6129C547fDaeD01b1', + quoterAddress: '0x6Dd37329A1A225a6Fca658265D460423DCafBF89', + v3MigratorAddress: '0xb5FA244C9d6D04B2FBac84418b3c4910ED1Ae5f2', + nonfungiblePositionManagerAddress: '0xB7F724d6dDDFd008eFf5cc2834edDE5F9eF0d075', + tickLensAddress: '0x5f739c790a48E97eec0efb81bab5D152c0A0ecA0', + swapRouter02Address: '0xd1AAE39293221B77B0C71fBD6dCb7Ea29Bb5B166', + + v4PoolManagerAddress: '0x00b036b58a818b1bc34d502d3fe730db729e62ac', + v4PositionManagerAddress: '0xf969aee60879c54baaed9f3ed26147db216fd664', + v4StateView: '0xc199f1072a74d4e905aba1a84d9a45e2546b6222', + v4QuoterAddress: '0x56dcd40a3f2d466f48e7f48bdbe5cc9b92ae4472', +} + +const UNICHAIN_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x1f98400000000000000000000000000000000003', + multicallAddress: '0xb7610f9b733e7d45184be3a1bc966960ccc54f0b', + quoterAddress: '0x565ac8c7863d9bb16d07e809ff49fe5cd467634c', + v3MigratorAddress: '0xb9d0c246f306b1aaf02ae6ba112d5ef25e5b60dc', + nonfungiblePositionManagerAddress: '0x943e6e07a7e8e791dafc44083e54041d743c46e9', + tickLensAddress: '0xd5d76fa166ab8d8ad4c9f61aaa81457b66cbe443', + swapRouter02Address: '0x73855d06de49d0fe4a9c42636ba96c62da12ff9c', + + v4PoolManagerAddress: '0x1f98400000000000000000000000000000000004', + v4PositionManagerAddress: '0x4529a01c7a0410167c5740c487a8de60232617bf', + v4StateView: '0x86e8631a016f9068c3f085faf484ee3f5fdee8f2', + v4QuoterAddress: '0x333e3c607b141b18ff6de9f258db6e77fe7491e0', +} + +const MONAD_TESTNET_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x961235a9020b05c44df1026d956d1f4d78014276', + multicallAddress: '0xa707ceb989cc3728551ed0e6e44b718dd114cf44', + quoterAddress: '0x1ba215c17565de7b0cb7ecab971bcf540c24a862', + v3MigratorAddress: '0x0a78348b71f8ae8caff2f8f9d4d74a2f36516661', + nonfungiblePositionManagerAddress: '0x3dcc735c74f10fe2b9db2bb55c40fbbbf24490f7', + tickLensAddress: '0x337478eb6058455ecb3696184b30dd6a29e3a893', + swapRouter02Address: '0x4c4eabd5fb1d1a7234a48692551eaecff8194ca7', +} + +const MONAD_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x204faca1764b154221e35c0d20abb3c525710498', + multicallAddress: '0xd1b797d92d87b688193a2b976efc8d577d204343', + quoterAddress: '0x2d01411773c8c24805306e89a41f7855c3c4fe65', + v3MigratorAddress: '0x7078c4537c04c2b2e52ddba06074dbdacf23ca15', + nonfungiblePositionManagerAddress: '0x7197e214c0b767cfb76fb734ab638e2c192f4e53', + tickLensAddress: '0xf025e0fe9e331a0ef05c2ad3c4e9c64b625cda6f', + swapRouter02Address: '0xfe31f71c1b106eac32f1a19239c9a9a72ddfb900', + // v4 + v4PoolManagerAddress: '0x188d586ddcf52439676ca21a244753fa19f9ea8e', + v4PositionManagerAddress: '0x5b7ec4a94ff9bedb700fb82ab09d5846972f4016', + v4StateView: '0x77395f3b2e73ae90843717371294fa97cc419d64', + v4QuoterAddress: '0xa222dd357a9076d1091ed6aa2e16c9742dd26891', +} + +const SONEIUM_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x42ae7ec7ff020412639d443e245d936429fbe717', + multicallAddress: '0x8ad5ef2f2508288d2de66f04dd883ad5f4ef62b2', + quoterAddress: '0x3e6c707d0125226ff60f291b6bd1404634f00aba', + v3MigratorAddress: '0xa107580f73bd797bd8b87ff24e98346d99f93ddb', + nonfungiblePositionManagerAddress: '0x56c1205b0244332011c1e866f4ea5384eb6bfa2c', + tickLensAddress: '0xcd08eefb928c86499e6235ac155906bb7c4dc41a', + swapRouter02Address: '0x7e40db01736f88464e5f4e42394f3d5bbb6705b9', + + v4PoolManagerAddress: '0x360e68faccca8ca495c1b759fd9eee466db9fb32', + v4PositionManagerAddress: '0x1b35d13a2e2528f192637f14b05f0dc0e7deb566', + v4StateView: '0x76fd297e2d437cd7f76d50f01afe6160f86e9990', + v4QuoterAddress: '0x3972c00f7ed4885e145823eb7c655375d275a1c5', +} + +const XLAYER_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x4b2ab38dbf28d31d467aa8993f6c2585981d6804', + multicallAddress: '0xe2023f3fa515cf070e07fd9d51c1d236e07843f4', + quoterAddress: '0x976183ac3d09840d243a88c0268badb3b3e3259f', + v3MigratorAddress: '0x7197e214c0b767cfb76fb734ab638e2c192f4e53', + nonfungiblePositionManagerAddress: '0x315e413a11ab0df498ef83873012430ca36638ae', + tickLensAddress: '0x661e93cca42afacb172121ef892830ca3b70f08d', + swapRouter02Address: '0x4f0c28f5926afda16bf2506d5d9e57ea190f9bca', + mixedRouteQuoterV2Address: '0x2d01411773c8c24805306e89a41f7855c3c4fe65', + + v4PoolManagerAddress: '0x360e68faccca8ca495c1b759fd9eee466db9fb32', + v4PositionManagerAddress: '0xcF1EAFC6928dC385A342E7C6491d371d2871458b', + v4StateView: '0x76fd297e2d437cd7f76d50f01afe6160f86e9990', + v4QuoterAddress: '0x8928074ca1b241d8ec02815881c1af11e8bc5219', +} + +const LINEA_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x31FAfd4889FA1269F7a13A66eE0fB458f27D72A9', + multicallAddress: '0x93e253D101519578A8DF0BCe2A43D8292BFb3A1F', + quoterAddress: '0x58ead433ea99708604c4dd7c9b7e80c70976e202', + v3MigratorAddress: '0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1', + nonfungiblePositionManagerAddress: '0x4615C383F85D0a2BbED973d83ccecf5CB7121463', + tickLensAddress: '0x3334d83e224aF5ef9C2E7DDA7c7C98Efd9621fA9', + swapRouter02Address: '0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a', + mixedRouteQuoterV2Address: '0xe2023f3fa515cf070e07fd9d51c1d236e07843f4', + + v4PoolManagerAddress: '0x248083fb965359d82b06c1f5322480dcfc1ad857', + v4PositionManagerAddress: '0xddcad5775b2816a87495f207731b3571d7ee3c76', + v4StateView: '0xe861de206e460a8b936b05ad3816520b58ccdf9b', + v4QuoterAddress: '0x2c125569c0bee20a66e33e5491c552b37ebd9934', +} + +const TEMPO_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x24a3d4757e330890a8b8978028c9e58e04611fd6', + multicallAddress: '0x64eb6294fd6072b2c20d31a54e39d5d3bf69d982', + quoterAddress: '0x53ab5d7a69db158f621b43ee70423da1e1403c2a', + v3MigratorAddress: '0x2352328bd3313549d6d908646c82c2b7136901a9', + nonfungiblePositionManagerAddress: '0xb71c33f096ceabdc0229110e0d76a6382d01c633', + tickLensAddress: '0x95cb27f323a03b03528096a527ee75704db28ef5', + swapRouter02Address: '0x7e9d53081e961201837336bcd81f52ae92691a8f', + mixedRouteQuoterV2Address: '0x741abcaeb95da1b0766c8db7819bb6c4fed27e3d', + + v4PoolManagerAddress: '0x33620f62c5b9b2086dd6b62f4a297a9f30347029', + v4PositionManagerAddress: '0x3fc79444f8eacc1894775493ff3fa41f1e35ce11', + v4StateView: '0x21b954fba3f5ddebe77ef2d47a3100c066908b2a', + v4QuoterAddress: '0x20e6487c371a2086f841ef453f85378223df4f4e', +} + +const MEGAETH_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x3a5f0cd7d62452b7f899b2a5758bfa57be0de478', + multicallAddress: '0x61f3272a3619d9f20788c6822fed2e5471bfc477', + quoterAddress: '0x5affda77bc34d945f9632bd080ebfcf24133b90e', + v3MigratorAddress: '0xed30f6c25fe915dc710f168fa3ab66199ee84454', + nonfungiblePositionManagerAddress: '0xcdc86e98184e96436f733a8bf31bd4f0214e6d7d', + tickLensAddress: '0xe7a2d824722addcb21e7a203ae7b372bf3a29ec5', + swapRouter02Address: '0x48020de9208bafc183f5cad5118ffbe8f0f913f5', + mixedRouteQuoterV2Address: '0x1768d0b0f8ee6638986aab8f775ceb87c45f8730', + + v4PoolManagerAddress: '0xacb7e78fa05d562e0a5d3089ec896d57d057d38e', + v4PositionManagerAddress: '0x9ae0921e981aaa7308f176f8d4f9129b9247c89d', + v4StateView: '0x726f84e1dfb8d375a365e0808282f40d52d3e4e8', + v4QuoterAddress: '0x94bdc671f0c35f44a1daa53143fd1f868d1623b9', +} + +const ARC_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0xf0db7b58379503491d857db50ac9ece64c653918', + multicallAddress: '0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7', + quoterAddress: '0x7dfd4f31be6814d2906bde155c3e1b146eac1468', + nonfungiblePositionManagerAddress: '0x39654a85a4c05127f5fd6ed22caec077a0fb1377', + tickLensAddress: '0x9eb8600665b55d10c1eb2316ca5127a9ca6e2e76', + swapRouter02Address: '0x53bf6b0684ec7ef91e1387da3d1a1769bc5a6f77', + + v4PoolManagerAddress: '0x8366a39cc670b4001a1121b8f6a443a643e40951', + v4PositionManagerAddress: '0x6049c9a0e26405c0985f9e3685c87d0ae917f82b', + v4StateView: '0xf3334192d15450cdd385c8b70e03f9a6bd9e673b', + v4QuoterAddress: '0x8dc178efb8111bb0973dd9d722ebeff267c98f94', +} + +const ROBINHOOD_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x1f7d7550b1b028f7571e69a784071f0205fd2efa', + multicallAddress: '0x282a3c4d320cc7f0d5eaf56b8029e4b88338f0a3', + quoterAddress: '0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7', + nonfungiblePositionManagerAddress: '0x73991a25c818bf1f1128deaab1492d45638de0d3', + tickLensAddress: '0x7dfd4f31be6814d2906bde155c3e1b146eac1468', + swapRouter02Address: '0xcaf681a66d020601342297493863e78c959e5cb2', + + v4PoolManagerAddress: '0x8366a39cc670b4001a1121b8f6a443a643e40951', + v4PositionManagerAddress: '0x58daec3116aae6d93017baaea7749052e8a04fa7', + v4StateView: '0xf3334192d15450cdd385c8b70e03f9a6bd9e673b', + v4QuoterAddress: '0x8dc178efb8111bb0973dd9d722ebeff267c98f94', +} + +const INK_ADDRESSES: ChainAddresses = { + v3CoreFactoryAddress: '0x640887a9ba3a9c53ed27d0f7e8246a4f933f3424', + multicallAddress: '0xa0fcec583aee6176527c07b198e5561722332014', + quoterAddress: '0x96b572d2d880cf2fa2563651bd23ade6f5516652', + nonfungiblePositionManagerAddress: '0xc0836e5b058bbe22ae2266e1ac488a1a0fd8dce8', + tickLensAddress: '0x3e6dba802d62aba2361dd632fbc9f547aa6789ae', + swapRouter02Address: '0x177778f19e89dd1012bdbe603f144088a95c4b53', + mixedRouteQuoterV2Address: '0x1f7d7550b1b028f7571e69a784071f0205fd2efa', + + v4PoolManagerAddress: '0x360e68faccca8ca495c1b759fd9eee466db9fb32', + v4PositionManagerAddress: '0x1b35d13a2e2528f192637f14b05f0dc0e7deb566', + v4StateView: '0x76fd297e2d437cd7f76d50f01afe6160f86e9990', + v4QuoterAddress: '0x3972c00f7ed4885e145823eb7c655375d275a1c5', + permissionedV4PositionManagerAddress: '0x003aa18c6E682dB80Cf4aa17261CcbFfd28690CE', + permissionedV4HooksAddress: '0x3c5903cEa9F15e1e59758c8f9267d39C16ea28c0', +} + +export const CHAIN_TO_ADDRESSES_MAP: Record = { + [ChainId.MAINNET]: MAINNET_ADDRESSES, + [ChainId.OPTIMISM]: OPTIMISM_ADDRESSES, + [ChainId.ARBITRUM_ONE]: ARBITRUM_ONE_ADDRESSES, + [ChainId.POLYGON]: POLYGON_ADDRESSES, + [ChainId.POLYGON_MUMBAI]: POLYGON_ADDRESSES, + [ChainId.GOERLI]: GOERLI_ADDRESSES, + [ChainId.CELO]: CELO_ADDRESSES, + [ChainId.CELO_ALFAJORES]: CELO_ADDRESSES, + [ChainId.BNB]: BNB_ADDRESSES, + [ChainId.OPTIMISM_GOERLI]: OPTIMISM_GOERLI_ADDRESSES, + [ChainId.OPTIMISM_SEPOLIA]: OPTIMISM_SEPOLIA_ADDRESSES, + [ChainId.ARBITRUM_GOERLI]: ARBITRUM_GOERLI_ADDRESSES, + [ChainId.ARBITRUM_SEPOLIA]: ARBITRUM_SEPOLIA_ADDRESSES, + [ChainId.SEPOLIA]: SEPOLIA_ADDRESSES, + [ChainId.AVALANCHE]: AVALANCHE_ADDRESSES, + [ChainId.BASE]: BASE_ADDRESSES, + [ChainId.BASE_GOERLI]: BASE_GOERLI_ADDRESSES, + [ChainId.BASE_SEPOLIA]: BASE_SEPOLIA_ADDRESSES, + [ChainId.ZORA]: ZORA_ADDRESSES, + [ChainId.ZORA_SEPOLIA]: ZORA_SEPOLIA_ADDRESSES, + [ChainId.ROOTSTOCK]: ROOTSTOCK_ADDRESSES, + [ChainId.BLAST]: BLAST_ADDRESSES, + [ChainId.ZKSYNC]: ZKSYNC_ADDRESSES, + [ChainId.WORLDCHAIN]: WORLDCHAIN_ADDRESSES, + [ChainId.UNICHAIN_SEPOLIA]: UNICHAIN_SEPOLIA_ADDRESSES, + [ChainId.UNICHAIN]: UNICHAIN_ADDRESSES, + [ChainId.MONAD_TESTNET]: MONAD_TESTNET_ADDRESSES, + [ChainId.SONEIUM]: SONEIUM_ADDRESSES, + [ChainId.MONAD]: MONAD_ADDRESSES, + [ChainId.XLAYER]: XLAYER_ADDRESSES, + [ChainId.LINEA]: LINEA_ADDRESSES, + [ChainId.TEMPO]: TEMPO_ADDRESSES, + [ChainId.MEGAETH]: MEGAETH_ADDRESSES, + [ChainId.ARC]: ARC_ADDRESSES, + [ChainId.ROBINHOOD]: ROBINHOOD_ADDRESSES, + [ChainId.INK]: INK_ADDRESSES, +} + +/* V3 Contract Addresses */ +export const V3_CORE_FACTORY_ADDRESSES: AddressMap = { + ...SUPPORTED_CHAINS.reduce((memo, chainId) => { + memo[chainId] = CHAIN_TO_ADDRESSES_MAP[chainId].v3CoreFactoryAddress + return memo + }, {}), +} + +export const V3_MIGRATOR_ADDRESSES: AddressMap = { + ...SUPPORTED_CHAINS.reduce((memo, chainId) => { + const v3MigratorAddress = CHAIN_TO_ADDRESSES_MAP[chainId].v3MigratorAddress + if (v3MigratorAddress) { + memo[chainId] = v3MigratorAddress + } + return memo + }, {}), +} + +export const MULTICALL_ADDRESSES: AddressMap = { + ...SUPPORTED_CHAINS.reduce((memo, chainId) => { + memo[chainId] = CHAIN_TO_ADDRESSES_MAP[chainId].multicallAddress + return memo + }, {}), +} + +/** + * The oldest V0 governance address + */ +export const GOVERNANCE_ALPHA_V0_ADDRESSES: AddressMap = constructSameAddressMap( + '0x5e4be8Bc9637f0EAA1A755019e06A68ce081D58F' +) +/** + * The older V1 governance address + */ +export const GOVERNANCE_ALPHA_V1_ADDRESSES: AddressMap = { + [ChainId.MAINNET]: '0xC4e172459f1E7939D522503B81AFAaC1014CE6F6', +} +/** + * The latest governor bravo that is currently admin of timelock + */ +export const GOVERNANCE_BRAVO_ADDRESSES: AddressMap = { + [ChainId.MAINNET]: '0x408ED6354d4973f66138C91495F2f2FCbd8724C3', +} + +export const TIMELOCK_ADDRESSES: AddressMap = constructSameAddressMap('0x1a9C8182C09F50C8318d769245beA52c32BE35BC') + +export const MERKLE_DISTRIBUTOR_ADDRESS: AddressMap = { + [ChainId.MAINNET]: '0x090D4613473dEE047c3f2706764f49E0821D256e', +} + +export const ARGENT_WALLET_DETECTOR_ADDRESS: AddressMap = { + [ChainId.MAINNET]: '0xeca4B0bDBf7c55E9b7925919d03CbF8Dc82537E8', +} + +export const QUOTER_ADDRESSES: AddressMap = { + ...SUPPORTED_CHAINS.reduce((memo, chainId) => { + memo[chainId] = CHAIN_TO_ADDRESSES_MAP[chainId].quoterAddress + return memo + }, {}), +} + +export const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: AddressMap = { + ...SUPPORTED_CHAINS.reduce((memo, chainId) => { + const nonfungiblePositionManagerAddress = CHAIN_TO_ADDRESSES_MAP[chainId].nonfungiblePositionManagerAddress + if (nonfungiblePositionManagerAddress) { + memo[chainId] = nonfungiblePositionManagerAddress + } + return memo + }, {}), +} + +export const ENS_REGISTRAR_ADDRESSES: AddressMap = { + ...constructSameAddressMap('0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'), +} + +export const SOCKS_CONTROLLER_ADDRESSES: AddressMap = { + [ChainId.MAINNET]: '0x65770b5283117639760beA3F867b69b3697a91dd', +} + +export const TICK_LENS_ADDRESSES: AddressMap = { + ...SUPPORTED_CHAINS.reduce((memo, chainId) => { + const tickLensAddress = CHAIN_TO_ADDRESSES_MAP[chainId].tickLensAddress + if (tickLensAddress) { + memo[chainId] = tickLensAddress + } + return memo + }, {}), +} + +export const MIXED_ROUTE_QUOTER_V1_ADDRESSES: AddressMap = SUPPORTED_CHAINS.reduce((memo, chainId) => { + const mixedRouteQuoterV1Address = CHAIN_TO_ADDRESSES_MAP[chainId].mixedRouteQuoterV1Address + if (mixedRouteQuoterV1Address) { + memo[chainId] = mixedRouteQuoterV1Address + } + return memo +}, {}) + +export const SWAP_ROUTER_02_ADDRESSES = (chainId: number) => { + if (SUPPORTED_CHAINS.includes(chainId)) { + const id = chainId as SupportedChainsType + return CHAIN_TO_ADDRESSES_MAP[id].swapRouter02Address ?? '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45' + } + return '' +} diff --git a/plan/agw/research/preset-catalog-2026-10-15/bsctestnet_addresses.json b/plan/agw/research/preset-catalog-2026-10-15/bsctestnet_addresses.json new file mode 100644 index 00000000..4dad5437 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/bsctestnet_addresses.json @@ -0,0 +1,257 @@ +{ + "name": "bsctestnet", + "chainId": "97", + "addresses": { + "AccessControlManagerMockTest": "0x4eA05Cb383a258212C46D19299d6e7F14D79fDEC", + "BTCB": "0xA808e341e8e723DC6BA0Bb5204Bafc2330d7B8e4", + "BUSD": "0x8301F2213c0eeD49a7E28Ae4c3e91722919B8B47", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump10900bps_kink8000bps_bpy21024000_To_bpy42048000_At_1748243100": "0x137352dC1d46746Bdea02b29911bfE4144A7391F", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump10900bps_kink8000bps_bpy42048000_To_bpy70080000_At_1762741500": "0xd32721dfF0C69C52C14b14205784C4A4E1F223cc", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump20000bps_kink7500bps_bpy10512000_To_bpy21024000_At_1744097580": "0x962edf115d24240930f7B1CF95EaEC9E49f06F92", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump20000bps_kink7500bps_bpy21024000_To_bpy42048000_At_1748243100": "0x447512e07C6aad8D356174Adf88645E54480697D", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump20000bps_kink7500bps_bpy42048000_To_bpy70080000_At_1762741500": "0x8273779013E74DF618faddc28e2eE770A6372874", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps_bpy10512000_To_bpy21024000_At_1744097580": "0xa5f1d44f7D2Ea604aAEba6eEd438E07C31Ee1dd2", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps_bpy21024000_To_bpy42048000_At_1748243100": "0x798Ac25e651734781d9fF2816A1E1A8dD1Ec5a4e", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps_bpy42048000_To_bpy70080000_At_1762741500": "0x2B12Fe8267b6742Dd1Cd02A6f91E6f333eE641b6", + "CheckpointView_From_JumpRateModel_base0bps_slope2000bps_jump30000bps_kink5000bps_bpy10512000_To_bpy21024000_At_1744097580": "0x9657300eEa812f2920f416cE4008713690253716", + "CheckpointView_From_JumpRateModel_base0bps_slope2000bps_jump30000bps_kink5000bps_bpy21024000_To_bpy42048000_At_1748243100": "0xdB49a057ab4a3D402ABe31b58a04EE04000025f7", + "CheckpointView_From_JumpRateModel_base0bps_slope2000bps_jump30000bps_kink5000bps_bpy42048000_To_bpy70080000_At_1762741500": "0x8BFC2afD0b0AC204Fd9e06103eF9e1b66c057723", + "CheckpointView_From_JumpRateModel_base0bps_slope500bps_jump10900bps_kink8000bps_bpy10512000_To_bpy21024000_At_1744097580": "0xdE06A850D42dcff216e1EfCa5358cB167Da247ca", + "CheckpointView_From_JumpRateModel_base0bps_slope500bps_jump5000bps_kink8000bps_bpy10512000_To_bpy21024000_At_1744097580": "0x3985fd3fa7975BB08c962797640A84297fDbe262", + "CheckpointView_From_JumpRateModel_base0bps_slope500bps_jump5000bps_kink8000bps_bpy21024000_To_bpy42048000_At_1748243100": "0x3D1c435930b52B197a5861E8F9F62509445434fC", + "CheckpointView_From_JumpRateModel_base0bps_slope500bps_jump5000bps_kink8000bps_bpy42048000_To_bpy70080000_At_1762741500": "0x04Cdb7DC0a6ed631DF5e7926622bDBDF2543cd3F", + "CheckpointView_From_JumpRateModel_base0bps_slope687bps_jump25000bps_kink8000bps_bpy10512000_To_bpy21024000_At_1744097580": "0x2182450eC9780F17511FeAcE6FC3ED8F774157b3", + "CheckpointView_From_JumpRateModel_base0bps_slope750bps_jump5000bps_kink8000bps_bpy10512000_To_bpy21024000_At_1744097580": "0x24B5bDe69D8e4280a30e1dAbB2f8B0152c30228c", + "CheckpointView_From_JumpRateModel_base0bps_slope750bps_jump5000bps_kink8000bps_bpy21024000_To_bpy42048000_At_1748243100": "0xB83Ec5A6994ED5779815c7aC3f9668160a210cae", + "CheckpointView_From_JumpRateModel_base0bps_slope750bps_jump5000bps_kink8000bps_bpy42048000_To_bpy70080000_At_1762741500": "0x60386490E654d5529eD1cb6146bFcec08B9a3876", + "CheckpointView_From_JumpRateModel_base0bps_slope900bps_jump20000bps_kink5000bps_bpy10512000_To_bpy21024000_At_1744097580": "0x8f63Ca20A6F0805F44d56Afb4B32520488218540", + "CheckpointView_From_JumpRateModel_base0bps_slope900bps_jump20000bps_kink5000bps_bpy21024000_To_bpy42048000_At_1748243100": "0xCf744EF5472951Cda24283348E62CE86B2C53235", + "CheckpointView_From_JumpRateModel_base0bps_slope900bps_jump20000bps_kink5000bps_bpy42048000_To_bpy70080000_At_1762741500": "0x8734dBD8Ba959BbC75f2701a022f8d1D47e0722d", + "CheckpointView_From_JumpRateModel_base0bps_slope900bps_jump35000bps_kink4500bps_bpy10512000_To_bpy21024000_At_1744097580": "0x6D95fcD7f086a6EA2e0f1B057c1fbddC1c18C146", + "CheckpointView_From_JumpRateModel_base0bps_slope900bps_jump35000bps_kink4500bps_bpy21024000_To_bpy42048000_At_1748243100": "0x2612eA702d1d87CA31EF189492C4924Ee8174CB9", + "CheckpointView_From_JumpRateModel_base0bps_slope900bps_jump35000bps_kink4500bps_bpy42048000_To_bpy70080000_At_1762741500": "0x3B7BE12BE569c8D2F451B441f14b4576f4489D49", + "CheckpointView_From_JumpRateModel_base200bps_slope1500bps_jump30000bps_kink6000bps_bpy10512000_To_bpy21024000_At_1744097580": "0x253B09357D5D1CDE57dB6356cDE77cD0bd963a09", + "CheckpointView_From_JumpRateModel_base200bps_slope1500bps_jump30000bps_kink6000bps_bpy21024000_To_bpy42048000_At_1748243100": "0x429D0a66DA5E785155B66842447d0Bb4Ee6930e8", + "CheckpointView_From_JumpRateModel_base200bps_slope1500bps_jump30000bps_kink6000bps_bpy42048000_To_bpy70080000_At_1762741500": "0x53C22998e06A3Bc4DC859ee5e234173f4CC30976", + "CheckpointView_From_JumpRateModel_base200bps_slope2000bps_jump30000bps_kink5000bps_bpy10512000_To_bpy21024000_At_1744097580": "0x93ad9750cA2F89984EE6790A7cEcc4Aa9C07CfeC", + "CheckpointView_From_JumpRateModel_base200bps_slope2000bps_jump30000bps_kink5000bps_bpy21024000_To_bpy42048000_At_1748243100": "0xA3244E4719b96E8930aaF24d7D98b77a79131454", + "CheckpointView_From_JumpRateModel_base200bps_slope2000bps_jump30000bps_kink5000bps_bpy42048000_To_bpy70080000_At_1762741500": "0xbD99C5f21C457BBe11F79151e949fDBD1990273d", + "CheckpointView_From_TwoKinks_base0bps_slope1000bps_kink8000bps_slope27000bps_base20bps_kink29000bps_jump30000bps_bpy21024000_To_bpy42048000_At_1748243100": "0x6B31cBD9636496B8FcfFac2EDBDaC28162B35890", + "CheckpointView_From_TwoKinks_base0bps_slope1000bps_kink8000bps_slope27000bps_base20bps_kink29000bps_jump30000bps_bpy42048000_To_bpy70080000_At_1762741500": "0xa1D93E797bbf70Bd2296B394D21eb4B341CdEcA9", + "CheckpointView_From_TwoKinks_base0bps_slope350bps_kink8000bps_slope217500bps_base20bps_kink29000bps_jump30000bps_bpy10512000_To_bpy21024000_At_1744097580": "0x4FAE14f71c3ee15635d7161292eC5F1F09f70Ad7", + "CheckpointView_From_TwoKinks_base0bps_slope350bps_kink8000bps_slope217500bps_base20bps_kink29000bps_jump30000bps_bpy21024000_To_bpy42048000_At_1748243100": "0x4D387015542262057b2ddb3d117aC4eFA24ea563", + "CheckpointView_From_TwoKinks_base0bps_slope350bps_kink8000bps_slope217500bps_base20bps_kink29000bps_jump30000bps_bpy42048000_To_bpy70080000_At_1762741500": "0x5c764D2E220C210C872c0d6224b55FBb8287c53c", + "CheckpointView_From_TwoKinks_base0bps_slope450bps_kink7000bps_slope214000bps_base20bps_kink28000bps_jump30000bps_bpy42048000_To_bpy70080000_At_1762741500": "0x51B17Dd2DF3934a579c59D875BAC643e8a72Ce74", + "CheckpointView_From_WhitePaperInterestRateModel_base0bps_slope10000bps_bpy10512000_To_bpy21024000_At_1744097580": "0x9c2666E33aee517975D61e573DbF5b829c342c03", + "CheckpointView_From_WhitePaperInterestRateModel_base0bps_slope10000bps_bpy21024000_To_bpy42048000_At_1748243100": "0xa6EE5513d4bC1F4541e5a98A09eF808F4f9e7477", + "CheckpointView_From_WhitePaperInterestRateModel_base0bps_slope10000bps_bpy42048000_To_bpy70080000_At_1762741500": "0xA8694CA042F8038Dcd4c6104b8574841226050A2", + "CheckpointView_From_WhitePaperInterestRateModel_base200bps_slope1000bps_bpy10512000_To_bpy21024000_At_1744097580": "0xc8dC4a0a29e2423664556a31349Da3FF26850e8D", + "CheckpointView_From_WhitePaperInterestRateModel_base200bps_slope1000bps_bpy21024000_To_bpy42048000_At_1748243100": "0x0F8F7633AdBea7025107421A5FBe354219B33FaF", + "CheckpointView_From_WhitePaperInterestRateModel_base200bps_slope1000bps_bpy42048000_To_bpy70080000_At_1762741500": "0x4048c69928993023eD5D3fA9Da8708FfB4a21fe8", + "ComptrollerLens": "0x0Dab769617B2d690DDbe8A6D730D9C9b85F26ca0", + "DefaultProxyAdmin": "0x7877ffd62649b6a1557b55d4c20fcbab17344c91", + "ETH": "0x98f7A83361F7Ac8765CcEBAB1425da6b341958a7", + "FlashLoanFacet": "0x528A428748dfE73DFcc844176B401475D1831057", + "JumpRateModel_base0bps_slope1000bps_jump10900bps_kink8000bps_bpy21024000": "0xb1993AA3E9ee53D37096C58a4B86A8B1B6ED2F8e", + "JumpRateModel_base0bps_slope1000bps_jump10900bps_kink8000bps_bpy42048000": "0x18A31286b462345A21Eb467c67e1C6282fa8E852", + "JumpRateModel_base0bps_slope1000bps_jump10900bps_kink8000bps_bpy70080000": "0x66d8Ac8ef8C5A46909343be425b3Ed1C8b9c9373", + "JumpRateModel_base0bps_slope1000bps_jump20000bps_kink7500bps_bpy10512000": "0xebb0B3Ca7c4095b1392C75e96f8Dc565c9047FAa", + "JumpRateModel_base0bps_slope1000bps_jump20000bps_kink7500bps_bpy21024000": "0x20Da556A8cd887Ff3AB1AD84f4645c8F2413D884", + "JumpRateModel_base0bps_slope1000bps_jump20000bps_kink7500bps_bpy42048000": "0xb889f359Ab4eD32EEa9E4E78D6e9f44655449c95", + "JumpRateModel_base0bps_slope1000bps_jump20000bps_kink7500bps_bpy70080000": "0xD1e35044F9624497b08360CBa77a174B148e93eD", + "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps_bpy10512000": "0x4348FC0CBD4ab6E46311ef90ba706169e50fC804", + "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps_bpy21024000": "0xaE81cA4E6eA7f7E72165dc68dBa2A0B1465E3B1f", + "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps_bpy42048000": "0x0acdc336EA232E4C31D91FCb9B93b10921A3fCEF", + "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps_bpy70080000": "0xf621b106020031fDa4b8920B26ea82F724A992eB", + "JumpRateModel_base0bps_slope2000bps_jump30000bps_kink5000bps_bpy10512000": "0x40e5d89ca4FED67F4C48A4eA5fe40bC1a1af1726", + "JumpRateModel_base0bps_slope2000bps_jump30000bps_kink5000bps_bpy21024000": "0x72c341Ed005c84446acB280059F44974Ba51F39a", + "JumpRateModel_base0bps_slope2000bps_jump30000bps_kink5000bps_bpy42048000": "0x59a76C684385Cf27d0BE0e2Bcec2012A88622C68", + "JumpRateModel_base0bps_slope2000bps_jump30000bps_kink5000bps_bpy70080000": "0xf40E0e047e24825740D18e435F533d75a4A2e9f9", + "JumpRateModel_base0bps_slope200bps_jump400bps_kink8000bps_bpy70080000": "0x08a2F4387BcAe9776243dF1f5BFfb6Ea2bE9c7dD", + "JumpRateModel_base0bps_slope500bps_jump10900bps_kink8000bps_bpy10512000": "0xB200dBd23cff696Cf2E95C0FbccDd3AF7814c00F", + "JumpRateModel_base0bps_slope500bps_jump10900bps_kink8000bps_bpy21024000": "0xe33B7a74Db5F6CEb0FB5cA9c03D4E6521b46D0B0", + "JumpRateModel_base0bps_slope500bps_jump5000bps_kink8000bps_bpy10512000": "0xfB14Dd85A26e41E4fD62b3B142b17f279c7Bb8B0", + "JumpRateModel_base0bps_slope500bps_jump5000bps_kink8000bps_bpy21024000": "0x7cBA76eB5A9A89E7179bCf3c71875706e0c8Af2e", + "JumpRateModel_base0bps_slope500bps_jump5000bps_kink8000bps_bpy42048000": "0xA313F761cc79Fb8C27D0f5d35b88DB7075A61653", + "JumpRateModel_base0bps_slope500bps_jump5000bps_kink8000bps_bpy70080000": "0x4B22c785101401e6EB906F5C10548A6Cf6A059f4", + "JumpRateModel_base0bps_slope667bps_jump62700bps_kink7500bps_bpy70080000": "0x1CcDaf39085bae4e27c3Ba100561b1AD1B5A6b80", + "JumpRateModel_base0bps_slope687bps_jump25000bps_kink8000bps_bpy10512000": "0xf59B7f2733a549dCF82b804d69d9c6a38985B90B", + "JumpRateModel_base0bps_slope687bps_jump25000bps_kink8000bps_bpy21024000": "0x5E68358e77673A6E17b1C7dE1C519a070033b698", + "JumpRateModel_base0bps_slope750bps_jump5000bps_kink8000bps_bpy10512000": "0x37bD1aFb1E9965FB9a229f85f71f8bEB5afdA91C", + "JumpRateModel_base0bps_slope750bps_jump5000bps_kink8000bps_bpy21024000": "0x12a1Be021756cd66CdA146b7485c00Baf6Ff63F9", + "JumpRateModel_base0bps_slope750bps_jump5000bps_kink8000bps_bpy42048000": "0x0f5F4e273335A605d478F0a4B75AF2e16D037b00", + "JumpRateModel_base0bps_slope750bps_jump5000bps_kink8000bps_bpy70080000": "0x92336573c47a55F2E418bf5452B00832b3bF2855", + "JumpRateModel_base0bps_slope900bps_jump20000bps_kink5000bps_bpy10512000": "0x12b88631a2033c0e9afA36b295cdFCf49493E89e", + "JumpRateModel_base0bps_slope900bps_jump20000bps_kink5000bps_bpy21024000": "0xE0d3774406296322f42CBf25e96e8388cDAf0A66", + "JumpRateModel_base0bps_slope900bps_jump20000bps_kink5000bps_bpy42048000": "0x2aFDF0f2377158cD45C12f4a5c70269baF15fcc5", + "JumpRateModel_base0bps_slope900bps_jump20000bps_kink5000bps_bpy70080000": "0x274362695401Bb1B0468BfcFE448AD7021D97562", + "JumpRateModel_base0bps_slope900bps_jump35000bps_kink4500bps_bpy10512000": "0xBbA0DEC733d5217A14B934710Cf07F070BA6c01e", + "JumpRateModel_base0bps_slope900bps_jump35000bps_kink4500bps_bpy21024000": "0xfC5538BDb73548127b392e9dFA420fdFdaF9438B", + "JumpRateModel_base0bps_slope900bps_jump35000bps_kink4500bps_bpy42048000": "0x0Cf272DBF1691271b9f56a3CDb8e574C8B5AD387", + "JumpRateModel_base0bps_slope900bps_jump35000bps_kink4500bps_bpy70080000": "0x8a637EB581150D1C0d8f8A2036D790c9a94803E6", + "JumpRateModel_base200bps_slope1500bps_jump30000bps_kink6000bps_bpy10512000": "0xf334E44BA510079833EcC8eb00fD5Bd26d8048F5", + "JumpRateModel_base200bps_slope1500bps_jump30000bps_kink6000bps_bpy21024000": "0x4b7c161640ee88307f6e544f60F7523e6Ee1cca9", + "JumpRateModel_base200bps_slope1500bps_jump30000bps_kink6000bps_bpy42048000": "0xfB778F06cafA439825cAd4095f31e83740eC7364", + "JumpRateModel_base200bps_slope1500bps_jump30000bps_kink6000bps_bpy70080000": "0x16e0d26D08eeb3CEdF7991C5525f2d202bEcF797", + "JumpRateModel_base200bps_slope2000bps_jump30000bps_kink5000bps_bpy10512000": "0xF1A8B40CA68d08EFfa31a16a83f4fd9b5c174872", + "JumpRateModel_base200bps_slope2000bps_jump30000bps_kink5000bps_bpy21024000": "0x0122b6aE004b90f080587b8921Ea32Fd1F2AFa11", + "JumpRateModel_base200bps_slope2000bps_jump30000bps_kink5000bps_bpy42048000": "0xE3087584EA86dc9eAe6DfcFd68BCAb69BC0D728A", + "JumpRateModel_base200bps_slope2000bps_jump30000bps_kink5000bps_bpy70080000": "0xb8dB7D937D32C111Ddc89af962A8a3e3E2A51Ac2", + "LTC": "0x969F147B6b8D81f86175de33206A4FD43dF17913", + "Liquidator": "0x55AEABa76ecf144031Ef64E222166eb28Cb4865F", + "Liquidator_Implementation": "0x56E364C3e5A556479e08b671A3d35eF4168d632f", + "Liquidator_Proxy": "0x55AEABa76ecf144031Ef64E222166eb28Cb4865F", + "MarketFacet": "0x3372D6aeb32aa6AB0933127ac9194E8915172752", + "MockFDUSD": "0xcF27439fA231af9931ee40c4f27Bb77B83826F3C", + "MockNVDAB": "0x8A7d8589A597619A7842d3BC284b9a5a276FaE56", + "MockPT-USDe-30OCT2025": "0x0c98334aCF440b9936D9cc1d99dc1A77bf26a93B", + "MockPT-clisBNB-25JUN2026": "0x60825e8eBbed5C32c1DAA7eA68ceCA70BEA65040", + "MockPT-sUSDE-26JUN2025": "0x95e58161BA2423c3034658d957F3f5b94DeAbf81", + "MockSKHYB": "0xb52DE23C6D4be6Bb3E87fF64527E856Ab346FDf2", + "MockSOL": "0xC337Dd0390FdFD0Ee5D2b682E425986EDD7b59da", + "MockSPCXB": "0x6D9e91cB766259af42619c14c994E694E57e6E85", + "MockSolvBTC": "0x6855E14A6df91b8E4D55163d068E9ef2530fd4CE", + "MockTHE": "0x952653d23cB9bef19E442D2BF8fBc8843A968052", + "MockTSLAB": "0x10d63B1203E5A0719AbbE927C8BFc87135b2F129", + "MockU": "0x180Bc1a9843A65D4116e44886FD3558515a56A49", + "MockUSD1": "0x7792af341a10ccc4B1CDd7B317F0460a37346a0A", + "MockUSDe": "0x986C30591f5aAb401ea3aa63aFA595608721B1B9", + "MockXAUM": "0xd2e2575c24302C82d38A9079c85722e0D0C0D2cD", + "MocksUSDe": "0xcFec590e417Abb378cfEfE6296829E35fa25cEbd", + "MockxSolvBTC": "0x3ea87323806586A0282b50377e0FEa76070F532B", + "PegStability_USDT": "0xB21E69eef4Bc1D64903fa28D9b32491B1c0786F1", + "PegStability_USDT_Implementation": "0xDDa903294fB71141302aD3Bf2AF37dD6Cbd5DBbF", + "PegStability_USDT_Proxy": "0xB21E69eef4Bc1D64903fa28D9b32491B1c0786F1", + "PolicyFacet": "0x808746E246393a98209990844951826D67da970A", + "Prime": "0xe840F8EC2Dc50E7D22e5e2991975b9F6e34b62Ad", + "PrimeLeaderboard": "0x1a4408613eec291f2d338F7A88E9D550fa9cD8dC", + "PrimeLeaderboard_Implementation": "0x3f4869b098E6a781e86475eF5C79888F266ec257", + "PrimeLeaderboard_Proxy": "0x1a4408613eec291f2d338F7A88E9D550fa9cD8dC", + "PrimeLens": "0x13b3C3442e5fD642bc31D34db43d547E8C4322f7", + "PrimeLiquidityProvider": "0xAdeddc73eAFCbed174e6C400165b111b0cb80B7E", + "PrimeLiquidityProviderTest": "0x7a780FbBa026568025a82101De65863A94CcD8f7", + "PrimeLiquidityProviderTest_Implementation": "0x9Ac449Fe41e67E5161C01d9366f655a8A7406A76", + "PrimeLiquidityProviderTest_Proxy": "0x7a780FbBa026568025a82101De65863A94CcD8f7", + "PrimeLiquidityProvider_Implementation": "0xbc85D7c9F7BdB348bd31d726ADa716d7efAEaBfB", + "PrimeLiquidityProvider_Proxy": "0xAdeddc73eAFCbed174e6C400165b111b0cb80B7E", + "PrimeV2": "0xeC22366d2572e52BCB29B50C905b945BA421B9b2", + "PrimeV2_Implementation": "0x9Ab9dA79df616a4b55B1f9c9994d582D6865aB08", + "PrimeV2_Proxy": "0xeC22366d2572e52BCB29B50C905b945BA421B9b2", + "Prime_Implementation": "0x3C439A567C0f66b3D2Ca682327fC303Ec3Fb82D9", + "Prime_Proxy": "0xe840F8EC2Dc50E7D22e5e2991975b9F6e34b62Ad", + "RewardFacet": "0x68C120C4b35874593EE494faf4Db6deFcEFf53b4", + "SXP": "0x75107940Cf1121232C0559c747A986DEfbc69DA9", + "SetCheckpointBsctestnet": "0x69B83Bf4e8501D97217b545ce4151b62a5b550c9", + "SetterFacet": "0x4eC6D748a2647000895b455c408f85602A144Ed6", + "SnapshotLens": "0xdC888D97d6cBA15d2733ce14bF292F8ae6e0450e", + "SwapRouterCorePool": "0x83edf1deE1B730b7e8e13C00ba76027D63a51ac0", + "SwapRouterDefi": "0x76B88ff4579B35D2722B7383b9B9ce831dc89B72", + "SwapRouterGamefi": "0xFdeBF4530F9c7d352ffFE88cd0e96C8Bb7391BD9", + "SwapRouterLiquidStakedBNB": "0x7DcBd10E3479907e0B8C79d01D0572C8cc00227B", + "SwapRouterStableCoins": "0x6cE131c2321e25d7b4C63283b75DB160Ce3Fb710", + "SwapRouterTronFamily": "0x51Fd03aD1132e8cb5a5a793528c9F4ec918667d4", + "TUSD": "0xB32171ecD878607FFc4F8FC0bCcE6852BB3149E0", + "TwoKinks_base0bps_slope1000bps_kink8000bps_slope27000bps_base20bps_kink29000bps_jump30000bps_bpy21024000": "0x0e072E068851279b4573A3e445FA259d9d47f03C", + "TwoKinks_base0bps_slope1000bps_kink8000bps_slope27000bps_base20bps_kink29000bps_jump30000bps_bpy42048000": "0x31DeE85C1A1d1DfC074F4206AA26CF06C9E764B9", + "TwoKinks_base0bps_slope1000bps_kink8000bps_slope27000bps_base20bps_kink29000bps_jump30000bps_bpy70080000": "0x87971b23F5977CC7e98474ebeF1582CADfbCfC6a", + "TwoKinks_base0bps_slope350bps_kink8000bps_slope217500bps_base20bps_kink29000bps_jump30000bps_bpy10512000": "0x46D9269a8Db9623ac2baAB305B119a39BAfd8668", + "TwoKinks_base0bps_slope350bps_kink8000bps_slope217500bps_base20bps_kink29000bps_jump30000bps_bpy21024000": "0xb39D9F97Ad7Cf08C0Bef592aADD4CbBac8F8078E", + "TwoKinks_base0bps_slope350bps_kink8000bps_slope217500bps_base20bps_kink29000bps_jump30000bps_bpy42048000": "0xE85AD8bd7ADbEEDd818dAE20ED669d238e7cBCd3", + "TwoKinks_base0bps_slope350bps_kink8000bps_slope217500bps_base20bps_kink29000bps_jump30000bps_bpy70080000": "0x2f3be8fE4E24C63F27C091d3BD4CeF39242c6C09", + "TwoKinks_base0bps_slope450bps_kink7000bps_slope214000bps_base20bps_kink28000bps_jump30000bps_bpy42048000": "0xa84848Bd2E24a829D97c882Fb86AF90F811540F3", + "TwoKinks_base0bps_slope450bps_kink7000bps_slope214000bps_base20bps_kink28000bps_jump30000bps_bpy70080000": "0x2cdB649D70c3b183b4BA6BeFD240601A3bdD292D", + "TwoKinks_base0bps_slope625bps_kink8000bps_slope26000bps_base20bps_kink29000bps_jump34000bps_bpy70080000": "0x27670709C5CD7EA594a887Af5D4eBA926F36c561", + "USDC": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "USDT": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "Unitroller": "0x94d1820b2D1c7c7452A163983Dc888CEC546b77D", + "Unitroller_Implementation": "0xbb34bBC161C9dbBE1dbCbC0A03478581f04b0E44", + "Unitroller_Proxy": "0x94d1820b2D1c7c7452A163983Dc888CEC546b77D", + "VAI": "0x5fFbE5302BadED40941A403228E6AD03f93752d9", + "VAIVault": "0x5c1c23ac038059c7B4EC1659728c166facab590b", + "VAIVaultProxy": "0x7Db4f5cC3bBA3e12FF1F528D2e3417afb0a57118", + "VAIVaultProxy_Implementation": "0x3f047c3022b35ed59484a4ee12b28849903a8c3b", + "VAIVaultProxy_Proxy": "0x7Db4f5cC3bBA3e12FF1F528D2e3417afb0a57118", + "VBNBAdmin": "0x04109575c1dbB4ac2e59e60c783800ea10441BBe", + "VBNBAdmin_Implementation": "0x920863fB3965fc411A1c0aC610C768F4347570fE", + "VBNBAdmin_Proxy": "0x04109575c1dbB4ac2e59e60c783800ea10441BBe", + "VBep20Delegate": "0x73fF75092Da265b87b25ffB943c47C90419a04A6", + "VRT": "0x331F639B4F3CF6E391CD244e0b5027C5968Ec325", + "VRTConverter": "0xF0fCB229031A386C672e291cE183390c1a7705dA", + "VRTConverterProxy": "0xAb81e79F9607eC4C7b69Ab4f7cf6c0AF607aA131", + "VRTVault": "0xa298713eCaE4e2C35C3af5241AAf81E0cc34Da84", + "VRTVaultProxy": "0x1ffD1b8B67A1AE0C189c734B0F58B0954522FF71", + "VRTVaultProxy_Implementation": "0x06ad3e299dc946fef2afa1f5e251682d52f4ebb6", + "VRTVaultProxy_Proxy": "0x1ffD1b8B67A1AE0C189c734B0F58B0954522FF71", + "VTreasury": "0x8b293600c50d6fbdc6ed4251cc75ece29880276f", + "VaiUnitroller": "0xf70C3C6b749BbAb89C081737334E74C9aFD4BE16", + "VaiUnitroller_Implementation": "0xd2848305b0ee7646C930240D79549D50d6Ed024F", + "VaiUnitroller_Proxy": "0xf70C3C6b749BbAb89C081737334E74C9aFD4BE16", + "VenusLens": "0x17A6222fB8b4b6D852cA54f5bc376a6A2c6224Bd", + "WBETH": "0xf9F98365566F4D55234f24b99caA1AfBE6428D44", + "WBNB": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "WhitePaperInterestRateModel_base0bps_slope10000bps_bpy10512000": "0x562639bbbf595806d910d6bD82d215ac18604A12", + "WhitePaperInterestRateModel_base0bps_slope10000bps_bpy21024000": "0xef4017690CA2EF6831BBBA6bEBb6E9A116Ac332E", + "WhitePaperInterestRateModel_base0bps_slope10000bps_bpy42048000": "0x8d90aDaCCc998Fa7B0E71f0c03484b47bc5a3121", + "WhitePaperInterestRateModel_base0bps_slope10000bps_bpy70080000": "0x3b99ce268673e77E59e511f68cd183DAeC5Dffc6", + "WhitePaperInterestRateModel_base200bps_slope1000bps_bpy10512000": "0xdE9beC5102ee897a2c934321309517dD6c0106F4", + "WhitePaperInterestRateModel_base200bps_slope1000bps_bpy21024000": "0xc24A551Fcea07F53eB9d4a7F95411dD49D8B51D9", + "WhitePaperInterestRateModel_base200bps_slope1000bps_bpy42048000": "0x95829232e71616cc3B595AAd47d3674552e88FC0", + "WhitePaperInterestRateModel_base200bps_slope1000bps_bpy70080000": "0x1ac040e357fD9C613D76baFA305b05B998a6A969", + "XRP": "0x3022A32fdAdB4f02281E8Fab33e0A6811237aab0", + "XVS": "0xB9e0E753630434d7863528cc73CB7AC638a7c8ff", + "XVSStore": "0x7B4dba3b320E7D421A213e1a73bB9858bb6839F8", + "XVSVault": "0x9801565BE8fe2c9fD12C17992ecDeb510BaF677A", + "XVSVaultProxy": "0x9aB56bAD2D7631B2A857ccf36d998232A8b82280", + "XVSVaultProxy_Implementation": "0x471A33538D8A73fc7148F8B72A2A8BE6Ab9E3723", + "XVSVaultProxy_Proxy": "0x9aB56bAD2D7631B2A857ccf36d998232A8b82280", + "XVSVesting": "0x9667B6E438232925525F26CeC0acC3A39B9980C8", + "XVSVestingProxy": "0xcfa3a6bc934EcA22fa39e854c823cD3dE79D9BC8", + "XVSVestingProxy_Implementation": "0x9667b6e438232925525f26cec0acc3a39b9980c8", + "XVSVestingProxy_Proxy": "0xcfa3a6bc934EcA22fa39e854c823cD3dE79D9BC8", + "pancakeFactory": "0x182859893230dC89b114d6e2D547BFFE30474a21", + "vAAVE": "0x714db6c38A17883964B68a07d56cE331501d9eb6", + "vADA": "0x37C28DE42bA3d22217995D146FC684B2326Ede64", + "vBNB": "0x2E7222e51c0f6e98610A1543Aa3836E092CDe62c", + "vBTC": "0xb6e9322C49FD75a367Fcb17B0Fcd62C5070EbCBe", + "vBUSD": "0x08e0A5575De71037aE36AbfAfb516595fE68e5e4", + "vCAKE": "0xeDaC03D29ff74b5fDc0CC936F6288312e1459BC6", + "vDOGE": "0xF912d3001CAf6DC4ADD366A62Cc9115B4303c9A9", + "vETH": "0x162D005F0Fff510E54958Cfc5CF32A3180A84aab", + "vFDUSD": "0xF06e662a00796c122AaAE935EC4F0Be3F74f5636", + "vLTC": "0xAfc13BC065ABeE838540823431055D2ea52eBA52", + "vMATIC": "0x3619bdDc61189F33365CC572DF3a68FB3b316516", + "vNVDAB": "0x9e1ECb2671AfabE9eaAA2e74Cb2318a9b6A2Eb5d", + "vPT-USDe-30OCT2025": "0x86a94290f2B8295daA3e53bA1286f2Ff21199143", + "vPT-clisBNB-25JUN2026": "0xCd5A0037ebfC4a22A755923bB5C983947FaBdCe7", + "vPT-sUSDE-26JUN2025": "0x90535B06ddB00453a5e5f2bC094d498F1cc86032", + "vSKHYB": "0x101843eAbA6b98fbF4bba078b86EFdE62DF0fc16", + "vSOL": "0xbd9EB061444665Df7282Ec0888b72D60aC41Eb8C", + "vSPCXB": "0x05B2EC5B7437FB188175bf440e3EB36af79fe319", + "vSXP": "0x74469281310195A04840Daf6EdF576F559a3dE80", + "vSolvBTC": "0xA38110ae4451A86ab754695057d5B5a9BEAd0387", + "vTHE": "0x39A239F5117BFaC7a1b0b3A517c454113323451d", + "vTRX": "0x6AF3Fdb3282c5bb6926269Db10837fa8Aec67C04", + "vTRXOLD": "0x369Fea97f6fB7510755DCA389088d9E2e2819278", + "vTSLAB": "0x3Ed56f6937fc8549f9325405d1e8E650739647Fa", + "vTUSD": "0xEFAACF73CE2D38ED40991f29E72B12C74bd4cf23", + "vTUSDOLD": "0x3A00d9B02781f47d033BAd62edc55fBF8D083Fb0", + "vTWT": "0x95DaED37fdD3F557b3A5cCEb7D50Be65b36721DF", + "vU": "0x93969F17d4c1C7B22000eA26D5C2766E0f616D90", + "vUNI": "0x171B468b52d7027F12cEF90cd065d6776a25E24e", + "vUSD1": "0x519e61D2CDA04184FB086bbD2322C1bfEa0917Cf", + "vUSDC": "0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7", + "vUSDT": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A", + "vUSDe": "0x86f8DfB7CA84455174EE9C3edd94867b51Da46BD", + "vWBETH": "0x35566ED3AF9E537Be487C98b1811cDf95ad0C32b", + "vWBNB": "0xd9E77847ec815E56ae2B9E69596C69b6972b0B1C", + "vXAUM": "0xc93CBF6CA7F3124737F2f4daDa8dBBC7be56d125", + "vXRP": "0x488aB2826a154da01CC4CC16A8C83d4720D3cA2C", + "vXVS": "0x6d6F697e34145Bb95c54E77482d97cc261Dc237E", + "vasBNB": "0x73F506Aefd5e169D48Ea21A373B9B0a200E37585", + "vlisUSD": "0x9447b1D4Bd192f25416B6aCc3B7f06be2f7D6309", + "vsUSDe": "0x8c8A1a0b6e1cb8058037F7bF24de6b79Aca5B7B0", + "vslisBNB": "0xaB5504A3cde0d8253E8F981D663c7Ff7128B3e56", + "vvhUSDT": "0xb846eEbaC8b014296709dc660Bfcb6ea182718e8", + "vxSolvBTC": "0x97cB97B05697c377C0bd09feDce67DBd86B7aB1e" + } +} diff --git a/plan/agw/research/preset-catalog-2026-10-15/catalog.md b/plan/agw/research/preset-catalog-2026-10-15/catalog.md new file mode 100644 index 00000000..711941e6 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/catalog.md @@ -0,0 +1,291 @@ +# AGW Presets: proposal and rules + +Presets are ready-made rule sets for `client.agentic.create`: pick a category, add an agent, a token budget and an expiry, and get one `Rule` per chain that already names the right contracts, calls and pins. The wallet UI and developers read the same presets from `PushChain.utils.agentic.presets`. + +This doc proposes the first preset list, the allowed calls and pins per app, and the contract and SDK changes the rest depends on. It extends page 5 (SDK: AGW), section 7. + +- Addresses: read from each protocol's deployment files or docs on 2026-10-13 (Sources at the end). Three carry caveats, listed in section 11, item 12. + +# Prerequisites + +> +> +> +> [7. Changes proposed on 12 Oct 2026: Presets](https://app.notion.com/p/7-Changes-proposed-on-12-Oct-2026-Presets-07ce163677ef44dfae03a38ea4c16da0?pvs=21) +> +> Contract source, what the rules policy checks today: [push-agentic-wallets, branch demo-v2](https://github.com/pushchain/push-agentic-wallets/tree/demo-v2/src), `src/libraries/Types.sol` (the rule shapes) and `src/policies/UniversalRulesPolicy.sol` (the gates); URP 3.1.0, the version on Donut +> +> [https://www.figma.com/design/FvJL0JWHlsVohsHTERB1Lh/Push-Design-Foundations?node-id=50458-26112&t=GpO3AVzquTow00Gj-0](https://www.figma.com/design/FvJL0JWHlsVohsHTERB1Lh/Push-Design-Foundations?node-id=50458-26112&t=GpO3AVzquTow00Gj-0) +> + +![image.png](AGW%20Presets%20proposal%20and%20rules/image.png) + +# Categories + +Custom is always open: a user can write any rule by hand in `client.agentic.create`, so a category left out here is not blocked, only not pre-filled. Presets are shortcuts for the common cases. + +**Factors a category must pass to be a preset** + +1. **Fixed strategy, user fills the blanks.** The preset picks the contracts and functions. The user picks the agent, fn params. If the user would have to pick the contracts too, it is Custom. +2. **The receiver can be locked to the wallet.** Every call that moves funds has a "to" argument we can pin. Aggregators, order books and Universal Router hide it inside a bytes blob, so they are out. +3. **Popular.** Top apps by volume or TVL. + +| Category | In v1? | Why | +| --- | --- | --- | +| DEXES | Yes | Swaps on routers with the recipient at a fixed position, 2 to 3 routers. The user names the tokens, the preset pins them (section 7) | +| LENDING | Yes | Supply, withdraw, borrow, repay on 2 to 3 money markets, with the position owner pinned to the wallet | +| STAKING | Yes | Liquid staking and restaking. Pins well: the receipt token goes to `msg.sender`, and the native coin sent is capped per call by `maxValue` | +| VAULTS | No, next | ERC-4626 `deposit`, `withdraw`, `redeem` with the receiver pinned; the most pinnable category. Needs the vault list first | +| PREDICTION | No | The live venues (Polymarket, Kalshi, Limitless) are order books: the user signs an order off-chain and an operator fills it, and a rule allows contract calls, not signed orders. The on-chain AMM-style markets have no volume. Constant ships empty, hidden by the UI | +| PERPS | No | Dynamic order structs (GMX, Drift), so the receiver cannot be pinned; leverage makes the loss case worse | +| AGGREGATORS | No | 1inch, 0x, Paraswap: dynamic calldata by design, nothing to pin. Jupiter `route` on Solana is the exception (user accounts at fixed positions, amounts pinnable from the end of the data) and sits in DEXES as a candidate | +| NFT MARKETS | No | Dynamic order structs (Seaport, Magic Eden) | +| BRIDGES | No | The recipient is on another chain; the AGW already moves funds across chains through Push | +| LAUNCHPADS | No | pump.fun pins fine, but it is the DEXES risk with worse odds | +| PAYMENTS | No, later | ERC-20 `transfer(address,uint256)` and SPL transfer with the recipient pinned to addresses the user passes as a parameter. Pins well and loss is bounded; left out of v1 only because agent payments (vendors, subscriptions) are not a demo case yet. GOVERNANCE (`castVote`, `delegate`) is the same shape with no funds moving and little demand | + +# Chains in scope + + + +| Chain | Mainnet | Testnet | +| --- | --- | --- | +| Ethereum | eip155:1 | Sepolia, eip155:11155111 | +| Base | eip155:8453 | Base Sepolia, eip155:84532 | +| Arbitrum | eip155:42161 | Arbitrum Sepolia, eip155:421614 | +| BNB Chain | eip155:56 | BSC testnet, eip155:97 | +| Solana | mainnet-beta | devnet | + +# DEXES + +One rule per chain, two or three routers per chain, single-hop and `address[]`-path swaps only. Every swap pins its recipient to the wallet. An app's calls are the same on every chain it is listed for; addresses are in section 6. + +| App | Chains | Allowed call | Pin | +| --- | --- | --- | --- | +| Uniswap V3 SwapRouter02 | Ethereum, Base, Arbitrum, BNB | `exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))` | `[0,3]` = WALLET (word 3); `[0,0]` = tokenIn, `[0,1]` = tokenOut from the user's list (after page 1, 6.3) | +| Uniswap V3 SwapRouter02 | same | `exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))` | `[0,3]` = WALLET; `[0,0]` and `[0,1]` = the user's tokens (after 6.3) | +| Uniswap V3 SwapRouter02 | same | `swapExactTokensForTokens(uint256,uint256,address[],address)` (V2 pools through the same router) | `3` = WALLET (word 3); tokens sit inside `path`, not pinnable | +| Uniswap V2 Router02 | Ethereum | `swapExactTokensForTokens(uint256,uint256,address[],address,uint256)` | `3` = WALLET (word 3); tokens not pinnable | +| Uniswap V2 Router02 | Ethereum | `swapTokensForExactTokens(uint256,uint256,address[],address,uint256)` | `3` = WALLET (word 3); tokens not pinnable | +| Curve Router NG | Ethereum | `exchange(address[11],uint256[5][5],uint256,uint256,address[5],address)` | `5` = WALLET (word 43, fixed arrays inlined); `[0,0]` = tokenIn pinnable, tokenOut sits at a variable position in `route`, not pinnable | +| Aerodrome Router | Base | `swapExactTokensForTokens(uint256,uint256,(address,address,bool,address)[],address,uint256)` | `3` = WALLET (word 3); tokens sit inside `routes`, not pinnable | +| Aerodrome Slipstream SwapRouter | Base | `exactInputSingle((address,address,int24,address,uint256,uint256,uint256,uint160))` | `[0,3]` = WALLET; `[0,0]` and `[0,1]` = the user's tokens (after 6.3) | +| Aerodrome Slipstream SwapRouter | Base | `exactOutputSingle((address,address,int24,address,uint256,uint256,uint256,uint160))` | `[0,3]` = WALLET; `[0,0]` and `[0,1]` = the user's tokens (after 6.3) | +| PancakeSwap V3 SmartRouter | Arbitrum, BNB | `exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))` | `[0,3]` = WALLET; `[0,0]` and `[0,1]` = the user's tokens (after 6.3) | +| PancakeSwap V3 SmartRouter | same | `exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))` | `[0,3]` = WALLET; `[0,0]` and `[0,1]` = the user's tokens (after 6.3) | +| PancakeSwap V3 SmartRouter | same | `swapExactTokensForTokens(uint256,uint256,address[],address)` | `3` = WALLET (word 3); tokens not pinnable | +| PancakeSwap V2 Router02 | BNB | `swapExactTokensForTokens(uint256,uint256,address[],address,uint256)` | `3` = WALLET (word 3); tokens not pinnable | +| PancakeSwap V2 Router02 | BNB | `swapTokensForExactTokens(uint256,uint256,address[],address,uint256)` | `3` = WALLET (word 3); tokens not pinnable | +| Camelot V3 SwapRouter | Arbitrum | `exactInputSingle((address,address,address,uint256,uint256,uint256,uint160))` (Algebra: recipient is field 2) | `[0,2]` = WALLET (word 2); `[0,0]` and `[0,1]` = the user's tokens (after 6.3) | +| Camelot V3 SwapRouter | Arbitrum | `exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))` | `[0,3]` = WALLET (word 3); `[0,0]` and `[0,1]` = the user's tokens (after 6.3) | +| Raydium CPMM | Solana | `swap_base_input(u64,u64)`, discriminator `8fbe5adac41e33de`; 13 accounts, `maxAccounts` 13 | account 0 = WALLET; account 5 = WALLET ATA(output mint); data pin: min-out ratio on `(amount_in, minimum_amount_out)` | +| Raydium CPMM | Solana | `swap_base_output(u64,u64)`, discriminator `37d96256a34ab4ad` | same | +| Orca Whirlpool | Solana | `swap(u64,u64,u128,bool,bool)`, discriminator `f8c69e91e17587c8`; 11 accounts plus trailing, `maxAccounts` 0 | account 1 = WALLET; accounts 3 and 5 = WALLET ATA(mint A), WALLET ATA(mint B); data pin: `a_to_b` EQ and the min-out ratio | +| Raydium AMM V4 | Solana | `swapBaseIn(u64,u64)`, 1-byte tag 9; `maxAccounts` 17 | account 16 = WALLET; account 15 = WALLET ATA(output mint); min-out ratio | +| Jupiter v6 (candidate) | Solana | `route(Vec,u64,u64,u16,u8)`, discriminator `e517cb977ae3ad2a`; pools as trailing accounts, `maxAccounts` 0 | account 1 = WALLET; account 3 = WALLET ATA(output mint); amounts pinned from the end of `ix_data` (`fromEnd`), since Borsh writes the vector first | +- Token pins: only the struct-based single-hop calls (`exactInputSingle`, `exactOutputSingle`) can carry them, since `tokenIn` and `tokenOut` are static fields at words 0 and 1. The path-based calls keep the tokens inside a dynamic array, so once 6.3 lands and the user's token list is enforced, the path rows should be dropped or kept with the warning in section 7. Until 6.3 none of the EVM token pins is checked. +- Out on EVM: `exactInput` and `exactOutput` (recipient inside a struct with `bytes path`), Universal Router `execute`, `multicall`, Curve's four- and five-argument `exchange` overloads. +- Solana: the SVM rulebook already exists in the demo-v2 source. An account pin names one key from `ceaAccounts`, so a swap rule allows one output mint; `maxAccounts` 0 admits the trailing tick, bin and pool accounts Orca, Meteora and Jupiter need; the `RATIO_GTE_LE` data pin enforces a minimum output relative to the input. Jupiter `route` is therefore a candidate, to confirm against the program (`shared_accounts_route` uses program-owned intermediates and stays out). Orca, Raydium CLMM and Meteora share the `swap` discriminator `f8c69e91e17587c8`; a rule keys on program and discriminator. + +# LENDING + +Supply, withdraw, borrow and repay on two or three money markets per chain. Every position is the wallet's: the call acts on `msg.sender` (Compound-style markets, where the CEA is the sender) or pins `onBehalfOf` on the way in and `to` or `receiver` on the way out. Solana is supply and withdraw only. + +| App | Chains | Allowed call | Pin | +| --- | --- | --- | --- | +| Aave V3 Pool | Ethereum, Base, Arbitrum, BNB | `supply(address,uint256,address,uint16)` | `2` = WALLET (onBehalfOf, word 2) | +| Aave V3 Pool | same | `withdraw(address,uint256,address)` | `2` = WALLET (to, word 2) | +| Aave V3 Pool | same | `borrow(address,uint256,uint256,uint16,address)` | `4` = WALLET (onBehalfOf, word 4) | +| Aave V3 Pool | same | `repay(address,uint256,uint256,address)` | `3` = WALLET (onBehalfOf, word 3) | +| Compound V3 Comet (cUSDCv3, cWETHv3) | Ethereum, Arbitrum | `supply(address,uint256)` | none; credits `msg.sender` | +| Compound V3 Comet | same | `withdraw(address,uint256)` | none; pays `msg.sender`. Withdrawing the base asset beyond the balance opens a borrow | +| Morpho Blue | Ethereum, Base, Arbitrum | `supply((address,address,address,address,uint256),uint256,uint256,address,bytes)` | `3` = WALLET (onBehalf, word 7) | +| Morpho Blue | same | `supplyCollateral((address,address,address,address,uint256),uint256,address,bytes)` | `2` = WALLET (onBehalf, word 6) | +| Morpho Blue | same | `withdraw((address,address,address,address,uint256),uint256,uint256,address,address)` | `4` = WALLET (receiver, word 8) | +| Morpho Blue | same | `withdrawCollateral((address,address,address,address,uint256),uint256,address,address)` | `3` = WALLET (receiver, word 7) | +| Morpho Blue | same | `borrow((address,address,address,address,uint256),uint256,uint256,address,address)` | `4` = WALLET (receiver, word 8) | +| Morpho Blue | same | `repay((address,address,address,address,uint256),uint256,uint256,address,bytes)` | `3` = WALLET (onBehalf, word 7) | +| Lista Moolah | BNB | the six Morpho Blue calls, same signatures and selectors | as Morpho Blue | +| Moonwell (mUSDC, mWETH) | Base | `mint(uint256)`, `redeem(uint256)`, `redeemUnderlying(uint256)`, `borrow(uint256)`, `repayBorrow(uint256)` | none; every call acts on `msg.sender` | +| Moonwell Comptroller | Base | `enterMarkets(address[])` | none; needed once before borrowing against a market | +| Venus (vUSDT, vUSDC) | BNB | the same five calls as Moonwell | none | +| Venus Unitroller | BNB | `enterMarkets(address[])` | none | +| Kamino Lend | Solana | `deposit_reserve_liquidity(u64)`, discriminator `a9c91e7e06cd6644`; owner 0, reserve liquidity mint 4, reserve collateral mint 6, user source 7, user destination 8 | account 0 = WALLET; account 8 = WALLET ATA(collateral mint at account 6); `maxAccounts` 12 | +| Kamino Lend | Solana | `redeem_reserve_collateral(u64)`, discriminator `ea75b57db98edc1d`; user source 7, user destination 8 | account 0 = WALLET; account 8 = WALLET ATA(liquidity mint at account 4) | +| Jupiter Lend (Earn) | Solana | `deposit(u64)`, discriminator `f223c68952e1f2b6`; signer 0, depositor token account 1, recipient token account 2 | account 0 = WALLET; account 2 = WALLET ATA(fToken mint); `maxAccounts` 17 | +| Jupiter Lend (Earn) | Solana | `withdraw(u64)`, discriminator `b712469c946da122`; signer 0, owner token account 1, recipient 2 | account 0 = WALLET; account 2 = WALLET ATA(underlying mint); `maxAccounts` 18 | + +# PREDICTION, venue by venue + +Every live venue on the five chains, plus Polymarket for reference. "Signed order" means the user signs an EIP-712 order off-chain and an operator-only `matchOrders` settles it: nothing for a rule to allow. + +| Venue | Chain | How a trade happens | Fits a rule? | 30-day volume | +| --- | --- | --- | --- | --- | +| PancakeSwap Prediction | BNB (BNB, BTC, ETH markets), Arbitrum (ETH) | Direct call: `betBull(uint256)` and `betBear(uint256)` payable, stake is the value, `claim(uint256[])`; position = `msg.sender` | Yes: one static argument, stake capped by `maxValue` | $7.8M | +| Predict.fun (absorbed Probable, March 2026) | BNB | Signed order, operator `matchOrders`; CTF `splitPosition`, `mergePositions`, `redeemPositions` are direct | No for trading; mint and redeem only | $314M | +| Opinion | BNB | Signed order ("OPINION CTF Exchange"), positions held in a Safe; CTF `0xAD1a38cEc043e70E83a3eC30443dB285ED10D774` | No for trading | $274M | +| Limitless | Base | Order book for new markets; legacy Gnosis FPMM markets still live: `buy(uint256,uint256,uint256)`, `sell(uint256,uint256,uint256)`, buyer = `msg.sender`; CTF `0xC9c98965297Bc527861c898329Ee280632B76e18` | Partial: the AMM calls fit, but each market is its own contract and the volume is in the order book | $4.9M | +| Overtime (Thales) SportsAMMV2 | Arbitrum, Base, Optimism | Direct call `trade(TradeData[],uint256,uint256,uint256,address,address,bool)`, ticket to `msg.sender` | Weak: the bet is a dynamic `TradeData[]` (odds, merkle proofs) a rule cannot read; only the stake at word 1 and the collateral at word 5 are pinnable | $7.6M (Arbitrum $2.3M, Base $1.4M) | +| Azuro | Base (Arbitrum dead since 2023) | v3: bettor signature plus oracle signature, relayer calls `betFor`; v2 `bet` carries `bytes data` | No | $2.8M (Base $96k) | +| Polymarket (reference) | Polygon only; the Jupiter tie-up is a front end | Signed order, `CTFExchangeV2.matchOrders` is `onlyOperator`; NegRiskAdapter split, merge, redeem are direct | No, and not on a chain in scope | $5.2B | +| Jupiter Predict (Polymarket and Kalshi liquidity) | Solana | Jupiter's API returns an unsigned transaction; a keeper fills on the underlying market; program id not published | No: keeper front end, program unverified | not listed | +| Drift BET | Solana | Perp orders: `place_perp_order(OrderParams)` with Borsh `Option` fields, many remaining accounts | No: variable-length arguments | not broken out | +| Augur, Gnosis v1 and every Ethereum L1 market | Ethereum | AMM-style, direct calls | Would fit, but dead | $0 | + +Out of scope by chain: Myriad (Abstract, Linea), XO Market (own rollup), Kalshi (off-chain). Sport.fun on Base ($4.8M) publishes no contracts. To open the big venues, the wallet's CEA would have to sign orders under a rule (ERC-1271, with maker, assets and amounts pinned): + +# STAKING + +| App | Chains | Allowed call | Pin | +| --- | --- | --- | --- | +| Lido stETH | Ethereum | `submit(address)` payable | none; stETH to `msg.sender` (the referral may be pinned to 0) | +| Lido wstETH | Ethereum | `wrap(uint256)`, `unwrap(uint256)` | none | +| Lido WithdrawalQueue | Ethereum | `requestWithdrawals(uint256[],address)` | `1` = WALLET (owner, word 1) | +| Lido WithdrawalQueue | Ethereum | `claimWithdrawals(uint256[],uint256[])`, `claimWithdrawal(uint256)` | none; owner must be `msg.sender`, ETH paid to `msg.sender` | +| Rocket Pool DepositPool | Ethereum | `deposit()` payable | none; rETH to `msg.sender` | +| Rocket Pool rETH | Ethereum | `burn(uint256)` | none; ETH to `msg.sender` | +| ether.fi LiquidityPool | Ethereum | `deposit()` payable, `deposit(address)` payable | none; eETH to `msg.sender` | +| ether.fi weETH | Ethereum | `wrap(uint256)`, `unwrap(uint256)` | none | +| ether.fi LiquidityPool | Ethereum | `requestWithdraw(address,uint256)` | `0` = WALLET (recipient, word 0) | +| ether.fi WithdrawRequestNFT | Ethereum | `claimWithdraw(uint256)` | none; ETH to the NFT's owner | +| EigenLayer StrategyManager | Ethereum | `depositIntoStrategy(address,address,uint256)` | none needed (shares to `msg.sender`); optional `0` = strategy and `1` = token to lock the pair | +| EigenLayer DelegationManager | Ethereum | `queueWithdrawals(...)`, `completeQueuedWithdrawal(...)` | none; withdrawer is forced to `msg.sender`, assets go to the staker | +| Lista StakeManager | BNB | `deposit()` payable | none; slisBNB to `msg.sender` | +| Lista StakeManager | BNB | `requestWithdraw(uint256)`, `claimWithdraw(uint256)` | none; BNB to `msg.sender` | +| BNB StakeHub (native) | BNB | `delegate(address,bool)` payable | `0` = validator, a user parameter; credit to `msg.sender` | +| BNB StakeHub (native) | BNB | `undelegate(address,uint256)`, `claim(address,uint256)` | `0` = the same validator | +| Jito (SPL stake pool) | Solana | `DepositSol(u64)`, tag 14; 10 accounts | 0 = Jito pool; 3 (lamports source) = WALLET; 4 = WALLET ATA(JitoSOL); 6 (referrer fee) = the same account; `maxAccounts` 10 | +| Jito (SPL stake pool) | Solana | `WithdrawSol(u64)`, tag 16; 12 accounts | 0 = Jito pool; 2 (authority) = WALLET; 3 = WALLET ATA(JitoSOL); 5 (SOL destination) = WALLET; `maxAccounts` 12 | +| Marinade | Solana | `deposit(u64)`, discriminator `f223c68952e1f2b6`; 11 accounts, none remaining | 6 (transfer_from) = WALLET; 7 (mint_to) = WALLET ATA(mSOL); `maxAccounts` 11 | +| Marinade | Solana | `liquid_unstake(u64)`, discriminator `1e1e77f0bfe30c10`; 10 accounts | 5 = WALLET ATA(mSOL); 6 (authority) = WALLET; 7 (transfer_sol_to) = WALLET; `maxAccounts` 10 | +- Out: Lido `claimWithdrawalsTo(uint256[],uint256[],address)` (names another recipient); Stader BNBx (deposits disabled 29 Jan 2026, protocol sunset); Marinade `order_unstake` (needs a fresh ticket account per call); Jito restaking `mint_to` (takes an SPL token in, so it belongs with VAULTS). +- Approvals: `wrap`, `requestWithdrawals`, `requestWithdraw`, `depositIntoStrategy` and Lista `requestWithdraw` pull a token from the wallet. Covered by scoped approval (section 8, item 3). +- Rocket Pool's deposit pool address changes on upgrades (the Saturn release deployed a new one in 2026 and the old one reverts on `deposit()`). The SDK should resolve it from `RocketStorage.getAddress(keccak256("contract.addressrocketDepositPool"))` at release time rather than hard-code it. +- `deposit()` has the same selector on Rocket Pool, ether.fi and WETH, and `wrap` and `unwrap` the same on wstETH and weETH; rules key on target plus selector, so no clash. +- Jito's `DepositSol` requires the pool to have been updated this epoch. BlazeStake, vSOL and the Sanctum pools use the same program and instruction, so adding one is a pool address. The StakeHub validator is a user parameter (categories, factor 1). + +# Addresses + +Read from each protocol's deployment files or docs. + +"none" means no official testnet deployment was found. + + + +### DEXES + +| App | Chain | Mainnet | Testnet | +| --- | --- | --- | --- | +| Uniswap V3 SwapRouter02 | Ethereum | `0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45` | `0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E` | +| Uniswap V3 SwapRouter02 | Base | `0x2626664c2603336E57B271c5C0b26F421741e481` | `0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4` | +| Uniswap V3 SwapRouter02 | Arbitrum | `0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45` | `0x101F443B4d1b059569D643917553c771E1b9663E` | +| Uniswap V3 SwapRouter02 | BNB | `0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2` | none | +| Uniswap V2 Router02 | Ethereum | `0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D` | `0xeE567Fe1712Faf6149d80dA1E6934E354124CfE3` | +| Curve Router NG v1.2 | Ethereum | `0x45312ea0eFf7E09C83CBE249fa1d7598c4C8cd4e` | none | +| Aerodrome Router | Base | `0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43` | none | +| Aerodrome Slipstream SwapRouter | Base | `0x698Cb2b6dd822994581fEa6eA4Fc755d1363A92F` | none | +| PancakeSwap V3 SmartRouter | Arbitrum | `0x32226588378236Fd0c7c4053999F88aC0e5cAc77` | none | +| PancakeSwap V3 SmartRouter | BNB | `0x13f4EA83D0bd40E75C8222255bc855a974568Dd4` | `0x9a489505a00cE272eAa5e07Dba6491314CaE3796` | +| PancakeSwap V2 Router02 | BNB | `0x10ED43C718714eb63d5aA57B78B54704E256024E` | `0xD99D1c33F9fC3444f8101754aBC46c52416550D1` | +| Camelot V3 SwapRouter | Arbitrum | `0x1F721E2E82F6676FCE4eA07A5958cF098D339e18` | none | +| Raydium CPMM | Solana | `CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C` | `DRaycpLY18LhpbydsBWbVJtxpNv9oXPgjRSfpF2bWpYb` | +| Orca Whirlpool | Solana | `whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc` | same id | +| Raydium AMM V4 | Solana | `675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8` | `DRaya7Kj3aMWQSy19kSjvmuwq9docCHofyP9kanQGaav` | + +### LENDING + +| App | Chain | Mainnet | Testnet | +| --- | --- | --- | --- | +| Aave V3 Pool | Ethereum | `0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2` | `0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951` | +| Aave V3 Pool | Base | `0xA238Dd80C259a72e81d7e4664a9801593F98d1c5` | `0x8bAB6d1b75f19e9eD9fCe8b9BD338844fF79aE27` | +| Aave V3 Pool | Arbitrum | `0x794a61358D6845594F94dc1DB02A252b5b4814aD` | `0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff` | +| Aave V3 Pool | BNB | `0x6807dc923806fE8Fd134338EABCA509979a7e0cB` | none | +| Compound V3 cUSDCv3 | Ethereum | `0xc3d688B66703497DAA19211EEdff47f25384cdc3` | `0xAec1F48e02Cfb822Be958B68C7957156EB3F0b6e`, unmaintained since June 2026 | +| Compound V3 cWETHv3 | Ethereum | `0xA17581A9E3356d9A858b789D68B4d866e593aE94` | none | +| Compound V3 cUSDCv3 | Arbitrum | `0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf` | none | +| Compound V3 cWETHv3 | Arbitrum | `0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486` | none | +| Morpho Blue | Ethereum | `0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb` | none | +| Morpho Blue | Base | `0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb` | unconfirmed by Morpho's own sources | +| Morpho Blue | Arbitrum | `0x6c247b1F6182318877311737BaC0844bAa518F5e` | none | +| Lista Moolah | BNB | `0x8F73b65B4caAf64FBA2aF91cC5D4a2A1318E5D8C` | none | +| Moonwell mUSDC | Base | `0xEdc817A28E8B93B03976FBd4a3dDBc9f7D176c22` | mUSDbC `0x876852425331a113d8E432eFFB3aC5BEf38f033a` | +| Moonwell mWETH | Base | `0x628ff693426583D9a7FB391E54366292F509D457` | `0x2F39a349A79492a70E152760ce7123A1933eCf28` | +| Moonwell Comptroller | Base | `0xfBb21d0380beE3312B33c4353c8936a0F13EF26C` | `0xC72ba45f2Ae134F21DAEb2b7B5fd5De0064Ee9bB` | +| Venus vUSDT | BNB | `0xfD5840Cd36d94D7229439859C0112a4185BC0255` | `0xb7526572FFE56AB9D7489838Bf2E18e3323b441A` | +| Venus vUSDC | BNB | `0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8` | `0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7` | +| Venus Unitroller | BNB | `0xfD36E2c2a6789Db23113685031d7F16329158384` | `0x94d1820b2D1c7c7452A163983Dc888CEC546b77D` | +| Kamino Lend | Solana | `KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD` | same id | +| Jupiter Lend (Earn) | Solana | `jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9` | `7tjE28izRUjzmxC1QNXnNwcc4N82CNYCexf3k8mw67s3`, stale since May 2025, do not use | + +### STAKING + +Testnets: Hoodi (eip155:560048) for Lido, Rocket Pool and EigenLayer; EigenLayer is also on Sepolia. ether.fi and Lista have no official testnet deployment. + + + +| App | Chain | Mainnet | Testnet | +| --- | --- | --- | --- | +| Lido stETH | Ethereum | `0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84` | Hoodi `0x3508A952176b3c15387C97BE809eaffB1982176a` | +| Lido wstETH | Ethereum | `0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0` | Hoodi `0x7E99eE3C66636DE415D2d7C880938F2f40f94De4` | +| Lido WithdrawalQueue | Ethereum | `0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1` | Hoodi `0xfe56573178f1bcdf53F01A6E9977670dcBBD9186` | +| Rocket Pool RocketStorage | Ethereum | `0x1d8f8f00cfa6758d7bE78336684788Fb0ee0Fa46` | Hoodi `0x594Fb75D3dc2DFa0150Ad03F99F97817747dd4E1` | +| Rocket Pool DepositPool (current) | Ethereum | `0xCE15294273CFb9D9b628F4D61636623decDF4fdC` | Hoodi `0x425E6f83e27f1676AD78BC39dA79C2C7b33d3Fd8` | +| Rocket Pool rETH | Ethereum | `0xae78736Cd615f374D3085123A210448E74Fc6393` | Hoodi `0x7322c24752f79c05FFD1E2a6FCB97020C1C264F1` | +| ether.fi LiquidityPool | Ethereum | `0x308861A430be4cce5502d0A12724771Fc6DaF216` | none | +| ether.fi weETH | Ethereum | `0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee` | none | +| ether.fi WithdrawRequestNFT | Ethereum | `0x7d5706f6ef3F89B3951E23e557CDFBC3239D4E2c` | none | +| EigenLayer StrategyManager | Ethereum | `0x858646372CC42E1A627fcE94aa7A7033e7CF075A` | Hoodi `0xeE45e76ddbEDdA2918b8C7E3035cd37Eab3b5D41`; Sepolia `0x2E3D6c0744b10eb0A4e6F679F71554a39Ec47a5D` | +| EigenLayer DelegationManager | Ethereum | `0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A` | Hoodi `0x867837a9722C512e0862d8c2E15b8bE220E8b87d`; Sepolia `0xD4A7E1Bd8015057293f0D0A557088c286942e84b` | +| EigenLayer stETH strategy | Ethereum | `0x93c4b944D05dfe6df7645A86cd2206016c51564D` | Hoodi `0xf8a1a66130d614c7360e868576d5e59203475fe0` | +| Lista StakeManager | BNB | `0x1adB950d8bB3dA4bE104211D5AB038628e477fE6` | none published | +| Lista slisBNB | BNB | `0xB0b84D294e0C75A6abe60171b70edEb2EFd14A1B` | unverified | +| BNB StakeHub | BNB | `0x0000000000000000000000000000000000002002` | same (system contract) | +| SPL stake pool program (Jito) | Solana | `SPoo1Ku8WFXoNDMHPsrGSTSG1Y47rzgn41SLUNakuHy` | devnet build `DPoo15wWDqpPJJtS2MUZ49aRxqz5ZaaJCJP4z8bLuib` | +| Jito pool, JitoSOL mint | Solana | `Jito4APyf642JPZPx3hGc6WWJ8zPKtRbRs4P815Awbb`, `J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn` | `JitoY5pcAxWX6iyP2QdFwTznGb8A99PRCUCVVxB46WZ`, `J1tos8mqbhdGcF3pgj4PCKyVjzWSURcpLZU7pPGHxSYi` | +| Marinade program | Solana | `MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD` | same id | +| Marinade state, mSOL mint | Solana | `8szGkuLTAux9XMgZ2vtY39jVSowEcpBfFfD8hXSEqdGC`, `mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So` | state not documented for devnet; mint the same | + +# Open questions and decisions needed + +1. **Approvals.** Scoped approval in URP, or one spender per token per rule for v1, which means one app per chain per preset and an allowance that outlives the rule? (Rules policy owner) +2. **Output tokens.** Until page 1, 6.3 lands no token pin is checked on EVM, and a pin holds one value. Ship DEXES with one output token per rule, or ship LENDING first and DEXES after the set pin +3. **One instruction per transaction on Solana.** Blocks every borrow flow (Kamino, Save, MarginFi need refresh instructions in the same transaction) and creating the output token account before a first swap. Relax to one allowed instruction plus instructions from a fixed list (refresh, create token account, compute budget)? (Rules policy owner) +4. **Missing cap.** Should `presets.get` throw when an asset has no `maxTotal`, since a missing cap means zero and the rule would move nothing? + +# Sources + +Deployment files and interfaces opened on 2026-10-13. Where a docs site was unreachable, the protocol's GitHub deployment file or published npm package was used instead. + +- Uniswap: [V3 Ethereum deployments](https://github.com/Uniswap/docs/blob/main/docs/content/protocols/v3/deployments/v3-ethereum-deployments.mdx), [V3 Base deployments](https://developers.uniswap.org/docs/protocols/v3/deployments/v3-base-deployments), [V3 Arbitrum deployments](https://developers.uniswap.org/docs/protocols/v3/deployments/v3-arbitrum-deployments.md), [sdk-core addresses](https://raw.githubusercontent.com/Uniswap/sdks/main/sdks/sdk-core/src/addresses.ts), [IV3SwapRouter](https://raw.githubusercontent.com/Uniswap/swap-router-contracts/main/contracts/interfaces/IV3SwapRouter.sol), [IV2SwapRouter](https://raw.githubusercontent.com/Uniswap/swap-router-contracts/main/contracts/interfaces/IV2SwapRouter.sol), [IUniswapV2Router02](https://raw.githubusercontent.com/Uniswap/v2-periphery/master/contracts/interfaces/IUniswapV2Router02.sol) +- Curve: [curve-router-ng](https://raw.githubusercontent.com/curvefi/curve-router-ng/master/README.md), [deployed contracts](https://raw.githubusercontent.com/CurveDocs/curve-docs/master/docs/references/deployed-contracts.md) +- Aerodrome: [contracts README](https://raw.githubusercontent.com/aerodrome-finance/contracts/main/README.md), [IRouter](https://raw.githubusercontent.com/aerodrome-finance/contracts/main/contracts/interfaces/IRouter.sol), [Slipstream README](https://raw.githubusercontent.com/aerodrome-finance/slipstream/main/README.md), [Slipstream ISwapRouter](https://raw.githubusercontent.com/aerodrome-finance/slipstream/main/contracts/periphery/interfaces/ISwapRouter.sol) +- PancakeSwap: [v3 addresses](https://raw.githubusercontent.com/pancakeswap/pancake-developer/master/docs/pages/contracts/v3/addresses.md), [v3-periphery deployments](https://raw.githubusercontent.com/pancakeswap/pancake-v3-contracts/main/projects/v3-periphery/deployments/bscMainnet.json), [IPancakeRouter02](https://raw.githubusercontent.com/pancakeswap/pancake-swap-periphery/master/contracts/interfaces/IPancakeRouter02.sol), npm `@pancakeswap/smart-router@7.8.0` +- Camelot: [Algebra V1.9 ISwapRouter](https://raw.githubusercontent.com/cryptoalgebra/AlgebraV1.9/main/src/periphery/contracts/interfaces/ISwapRouter.sol), [verified source mirror, Router v3](https://www.codeslaw.app/contracts/arbitrum/0x1f721e2e82f6676fce4ea07a5958cf098d339e18) +- Aave: [address book, Ethereum](https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3Ethereum.sol), [Sepolia](https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3Sepolia.sol), [Base](https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3Base.sol), [Base Sepolia](https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3BaseSepolia.sol), [Arbitrum](https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3Arbitrum.sol), [Arbitrum Sepolia](https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3ArbitrumSepolia.sol), [BNB](https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3BNB.sol), [IPool](https://raw.githubusercontent.com/aave-dao/aave-v3-origin/main/src/contracts/interfaces/IPool.sol) +- Compound V3: [mainnet USDC roots](https://raw.githubusercontent.com/compound-finance/comet/main/deployments/mainnet/usdc/roots.json), [Arbitrum USDC roots](https://raw.githubusercontent.com/compound-finance/comet/main/deployments/arbitrum/usdc/roots.json), [CometMainInterface](https://raw.githubusercontent.com/compound-finance/comet/main/contracts/CometMainInterface.sol) +- Morpho: [IMorpho](https://raw.githubusercontent.com/morpho-org/morpho-blue/main/src/interfaces/IMorpho.sol), [SDK addresses](https://raw.githubusercontent.com/morpho-org/sdks/main/packages/morpho-ts/src/addresses.ts), [docs addresses](https://docs.morpho.org/get-started/resources/addresses/) +- Moonwell: [Base addresses](https://raw.githubusercontent.com/moonwell-fi/moonwell-contracts-v2/main/chains/8453.json), [Base Sepolia addresses](https://raw.githubusercontent.com/moonwell-fi/moonwell-contracts-v2/main/chains/84532.json), [MToken](https://raw.githubusercontent.com/moonwell-fi/moonwell-contracts-v2/main/src/MToken.sol) +- Venus: [mainnet addresses](https://raw.githubusercontent.com/VenusProtocol/venus-protocol/develop/deployments/bscmainnet_addresses.json), [testnet addresses](https://raw.githubusercontent.com/VenusProtocol/venus-protocol/develop/deployments/bsctestnet_addresses.json), [VBep20](https://raw.githubusercontent.com/VenusProtocol/venus-protocol/develop/contracts/Tokens/VTokens/VBep20.sol) +- Lista: [lista-skills](https://raw.githubusercontent.com/lista-dao/lista-skills/main/skills/lista-lending/SKILL.md), npm `@lista-dao/moolah-sdk-core@1.0.12` +- Raydium: [program addresses](https://docs.raydium.io/reference/program-addresses.md), [CPMM IDL](https://github.com/raydium-io/raydium-idl), [AMM V4 instruction.rs](https://raw.githubusercontent.com/raydium-io/raydium-amm/master/program/src/instruction.rs) +- Orca: [whirlpools](https://github.com/orca-so/whirlpools) +- Meteora: [DLMM overview](https://docs.meteora.ag/developer-guide/guides/dlmm/overview), [dlmm-sdk](https://github.com/MeteoraAg/dlmm-sdk) +- Jupiter: [jupiter-cpi IDL](https://raw.githubusercontent.com/jup-ag/jupiter-cpi/main/idl.json), [development basics](https://developers.jup.ag/docs/get-started/development-basics.md), [Lend program addresses](https://developers.jup.ag/docs/lend/program-addresses.md), [jupiter-lend](https://github.com/jup-ag/jupiter-lend) +- Kamino: [klend](https://github.com/Kamino-Finance/klend), [klend-sdk](https://github.com/Kamino-Finance/klend-sdk) +- MarginFi: [marginfi-v2](https://github.com/mrgnlabs/marginfi-v2) +- Save: [token-lending instruction.rs](https://raw.githubusercontent.com/solendprotocol/solana-program-library/master/token-lending/program/src/instruction.rs) +- Volume and TVL: [DefiLlama DEXes, Ethereum](https://defillama.com/dexs/chains/Ethereum), [Base](https://defillama.com/dexs/chains/base), [Arbitrum](https://defillama.com/dexs/chain/arbitrum), [Arbitrum lending](https://defillama.com/protocols/lending/arbitrum), [prediction markets, Ethereum](https://defillama.com/protocols/prediction-market/ethereum), [Polymarket](https://defillama.com/protocol/polymarket) +- Prediction markets: [Drift BET launch](https://www.theblock.co/post/311888/solana-based-drift-protocol-launches-prediction-market), [Jupiter and Polymarket](https://www.coindesk.com/markets/2026/02/02/jupiter-brings-polymarket-to-solana-and-lands-usd35-million-investment-deal), [Jupiter Forecast](https://solanacompass.com/news/jupiter-launches-forecast-solanas-first-native-prediction-market-with-multi-market-maker-quoting) +- Staking: [Lido deployed contracts](https://raw.githubusercontent.com/lidofinance/docs/main/docs/deployed-contracts/index.md), [Lido Hoodi](https://raw.githubusercontent.com/lidofinance/docs/main/docs/deployed-contracts/hoodi.md), [WithdrawalQueue.sol](https://raw.githubusercontent.com/lidofinance/core/master/contracts/0.8.9/WithdrawalQueue.sol), [Rocket Pool contracts](https://raw.githubusercontent.com/rocket-pool/docs.rocketpool.net/main/docs/en/protocol/contracts-integrations.md), [RocketDepositPool.sol](https://raw.githubusercontent.com/rocket-pool/rocketpool/master/contracts/contract/deposit/RocketDepositPool.sol), [ether.fi deployed contracts](https://etherfi.gitbook.io/etherfi/developers/contracts-and-integrations/deployed-contracts), [LiquidityPool.sol](https://raw.githubusercontent.com/etherfi-protocol/smart-contracts/master/src/core/LiquidityPool.sol), [eigenlayer-contracts README](https://raw.githubusercontent.com/Layr-Labs/eigenlayer-contracts/main/README.md), [Lista smart contracts](https://docs.bsc.lista.org/for-developer/liquid-staking-slisbnb/smart-contract.md), [ListaStakeManager.sol](https://raw.githubusercontent.com/lista-dao/synclub-contracts/master/contracts/ListaStakeManager.sol), [BNB staking developer guide](https://docs.bnbchain.org/bnb-smart-chain/staking/developer-guide/), [StakeHub.sol](https://raw.githubusercontent.com/bnb-chain/bsc-genesis-contract/master/contracts/StakeHub.sol), [Stader BNBx sunset](https://www.staderlabs.com/blogs/sunsetting-bnbx-focusing-stader-on-high-impact-ecosystems/), [SPL stake pool instruction.rs](https://raw.githubusercontent.com/solana-program/stake-pool/main/program/src/instruction.rs), [Jito deployed programs](https://www.jito.network/docs/jitosol/jitosol-liquid-staking/security/deployed-programs/), [Marinade contract addresses](https://docs.marinade.finance/developers/contract-addresses), [Marinade deposit.rs](https://raw.githubusercontent.com/marinade-finance/liquid-staking-program/main/programs/marinade-finance/src/instructions/user/deposit.rs), [BlazeStake addresses](https://stake-docs.solblaze.org/developers/addresses.md) \ No newline at end of file diff --git a/plan/agw/research/preset-catalog-2026-10-15/implementation-status.md b/plan/agw/research/preset-catalog-2026-10-15/implementation-status.md new file mode 100644 index 00000000..c39c6ca0 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/implementation-status.md @@ -0,0 +1,44 @@ +# Testnet preset catalog — October 15, 2026 + +Initial user scope: testnet templates only; subsequently expanded to mainnet templates on October 15 (see ../preset-mainnet-2026-10-15/README.md). Missing caps default to zero. Source body and original native export are retained here; source.json records the Notion URL and observed edit date. The sibling README.md is downloaded EigenLayer documentation, not this implementation report. + +## Implemented + +- DEXES: Uniswap V3 (Sepolia, Base Sepolia, Arbitrum Sepolia), PancakeSwap V3 (BSC testnet). Explicit ERC20 pairs, wallet-recipient pins, amount caps, spender-pinned approvals. +- LENDING: Aave on the three Ethereum testnets, Moonwell Base Sepolia mUSDbC/mWETH, Venus BSC testnet vUSDT/vUSDC and their controllers. +- STAKING: EigenLayer Sepolia deposits only. +- Static tuple/fixed-array argument paths; exact decoded word-offset roundtrips remain supported. +- Explicit optional maxGasPerCall; omitted caps remain zero. + +Section 7 alignment follow-up: the user approved zero-cap review templates followed by regeneration with selected tokens. DEX get now accepts omitted assets, empty lists and a single token. Each incomplete chain returns full-signature calls with a wallet-recipient pin and an explicit zero swap-input cap. A single token also gets an input-token pin and its bounded spender approval. Call get again with two tokens to generate the complete input/output pins; filling rule.assets alone does not enable swaps. Chains without supplied tokens remain visible when no chain filter is set. Two supplied tokens fit; larger expansions exceeding 32 pins fail explicitly. + +The SDK page still needs editorial synchronization for this approved two-stage flow, omitted caps defaulting to zero, the catalog's STAKING category, and tuple paths such as [0,3]. These are documentation differences, not outstanding contract changes. This follow-up does not edit the remote Notion page. + +## Exclusions and limits + +| Entry | Reason | +| --- | --- | +| Mainnet | Initial exclusion superseded by the October 15 scope expansion; verified counterparts now included | +| Prediction | No approved entries | +| Dynamic-path V2 swaps | Cannot statically pin token paths with this policy | +| Solana protocol templates | Required ratios/layouts or multi-instruction flows are not represented by the current template API | +| Hoodi | Not a supported Push destination | +| Morpho, Compound, Jupiter Lend entries | Unconfirmed, unmaintained or stale deployments in the proposal | +| BNB StakeHub | Needs an explicit validator input | +| EigenLayer withdrawals | Proposal omits complete usable signatures; deposit-only template is labelled | + +Protocol sources and rpc-verification.json record official addresses, signatures, code presence and block numbers. These checks are not protocol audits or live trade tests. Aave/Moonwell/Venus testnet mock underlying assets can differ from SDK MOVEABLE tokens. Verify reserves, liquidity, destination balances and PRC20 routes separately. + +## Validation + +- Full unit suite: 2,084 passed, 12 skipped; 124 passing suites, one skipped. +- Targeted real-v6 contract suite: 14 passed, including generated DEX permissions, invalid recipient/token/amount rejection and get-to-update roundtrip. Gateway is a local recording fixture; destination protocols are not executed. +- Library, unit and local-harness TypeScript checks passed. +- No funded protocol transactions or mainnet broadcasts performed for this catalog. + +## Section 7 follow-up validation + +- 35 focused preset unit tests passed. +- 16 real-v6 local contract tests passed. Both exact-input and exact-output review calls reject positive input amounts after adding asset budgets, proving the zero swap-input maximum is enforced by URP. +- No destination protocol trade or new live-network transaction was run for this follow-up. +- Remaining catalog expansion: excluded/unverified protocols, Solana templates requiring additional capabilities, and actual destination-protocol trade acceptance. These do not block the implemented review UI flow. diff --git a/plan/agw/research/preset-catalog-2026-10-15/notion-export.zip b/plan/agw/research/preset-catalog-2026-10-15/notion-export.zip new file mode 100644 index 00000000..c72aac5a Binary files /dev/null and b/plan/agw/research/preset-catalog-2026-10-15/notion-export.zip differ diff --git a/plan/agw/research/preset-catalog-2026-10-15/pancake-package-source.json b/plan/agw/research/preset-catalog-2026-10-15/pancake-package-source.json new file mode 100644 index 00000000..bf9032b4 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/pancake-package-source.json @@ -0,0 +1,8 @@ +{ + "url": "https://registry.npmjs.org/@pancakeswap/smart-router/-/smart-router-7.8.0.tgz", + "integrity": "sha512-sBO48pIdWIsrBsclf/zdYlDJ/7n4f45HLterJW9yLPaLVzAY65/GbJbbFAxbPlIyIByyjwmeq1OB8V/5hIq11w==", + "files": [ + "package/dist/evm/abis/ISwapRouter02.d.ts.map", + "package/dist/evm/abis/ISwapRouter02.d.ts" + ] +} \ No newline at end of file diff --git a/plan/agw/research/preset-catalog-2026-10-15/pancake-router-package.txt b/plan/agw/research/preset-catalog-2026-10-15/pancake-router-package.txt new file mode 100644 index 00000000..3e9fa8d3 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/pancake-router-package.txt @@ -0,0 +1,10233 @@ +'use strict'; + +var chunkZNSTBYLO_js = require('./chunk-ZNSTBYLO.js'); +var chains = require('@pancakeswap/chains'); +var sdk = require('@pancakeswap/sdk'); +var viem = require('viem'); +var infinitySdk = require('@pancakeswap/infinity-sdk'); +var multicall = require('@pancakeswap/multicall'); +var swapSdkCore = require('@pancakeswap/swap-sdk-core'); +var stableSwapSdk = require('@pancakeswap/stable-swap-sdk'); +var v3Sdk = require('@pancakeswap/v3-sdk'); +var invariant6 = require('tiny-invariant'); +var debug = require('debug'); +var FixedReverseHeap = require('mnemonist/fixed-reverse-heap.js'); +var Queue = require('mnemonist/queue.js'); +var graphqlRequest = require('graphql-request'); +var tokenLists = require('@pancakeswap/token-lists'); +var tokens = require('@pancakeswap/tokens'); +var retry = require('async-retry'); +var stats = require('stats-lite'); +var zod = require('zod'); +var sum = require('lodash/sum.js'); + +function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; } + +var invariant6__default = /*#__PURE__*/_interopDefault(invariant6); +var debug__default = /*#__PURE__*/_interopDefault(debug); +var FixedReverseHeap__default = /*#__PURE__*/_interopDefault(FixedReverseHeap); +var Queue__default = /*#__PURE__*/_interopDefault(Queue); +var retry__default = /*#__PURE__*/_interopDefault(retry); +var stats__default = /*#__PURE__*/_interopDefault(stats); +var sum__default = /*#__PURE__*/_interopDefault(sum); + +// evm/abis/FeeOnTransferDetector.ts +var feeOnTransferDetectorAbi = [ + { + inputs: [ + { + internalType: "address", + name: "_factoryV2", + type: "address" + } + ], + stateMutability: "nonpayable", + type: "constructor" + }, + { + inputs: [], + name: "PairLookupFailed", + type: "error" + }, + { + inputs: [], + name: "SameToken", + type: "error" + }, + { + inputs: [ + { + internalType: "address[]", + name: "tokens", + type: "address[]" + }, + { + internalType: "address", + name: "baseToken", + type: "address" + }, + { + internalType: "uint256", + name: "amountToBorrow", + type: "uint256" + } + ], + name: "batchValidate", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "buyFeeBps", + type: "uint256" + }, + { + internalType: "uint256", + name: "sellFeeBps", + type: "uint256" + } + ], + internalType: "struct TokenFees[]", + name: "fotResults", + type: "tuple[]" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address" + }, + { + internalType: "uint256", + name: "amount0", + type: "uint256" + }, + { + internalType: "uint256", + name: "", + type: "uint256" + }, + { + internalType: "bytes", + name: "data", + type: "bytes" + } + ], + name: "pancakeCall", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address" + }, + { + internalType: "address", + name: "baseToken", + type: "address" + }, + { + internalType: "uint256", + name: "amountToBorrow", + type: "uint256" + } + ], + name: "validate", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "buyFeeBps", + type: "uint256" + }, + { + internalType: "uint256", + name: "sellFeeBps", + type: "uint256" + } + ], + internalType: "struct TokenFees", + name: "fotResult", + type: "tuple" + } + ], + stateMutability: "nonpayable", + type: "function" + } +]; + +// evm/fot.ts +var feeOnTransferDetectorAddresses = { + [chains.ChainId.ETHEREUM]: "0xe9200516a475b9e6FD4D1c452858097F345A6760", + [chains.ChainId.SEPOLIA]: "0xD8b14F915b1b4b1c4EE4bF8321Bea018E72E5cf3", + [chains.ChainId.BSC]: "0x003BD52f589F23346E03fA431209C29cD599d693", + [chains.ChainId.BSC_TESTNET]: "0xE83BD854c1fBf54424b4d914163BF855aB1131Aa", + [chains.ChainId.ARBITRUM_ONE]: "0xD8b14F915b1b4b1c4EE4bF8321Bea018E72E5cf3", + [chains.ChainId.ARBITRUM_SEPOLIA]: "0xD8b14F915b1b4b1c4EE4bF8321Bea018E72E5cf3", + [chains.ChainId.BASE]: "0xD8b14F915b1b4b1c4EE4bF8321Bea018E72E5cf3", + [chains.ChainId.BASE_SEPOLIA]: "0xD8b14F915b1b4b1c4EE4bF8321Bea018E72E5cf3", + [chains.ChainId.ZKSYNC]: "0xED87D01674199355CEfC05648d17E037306d7962", + [chains.ChainId.ZKSYNC_TESTNET]: "0x869505373d830104130F95c1E7d578dE7E58C0a8", + [chains.ChainId.LINEA]: "0xD8b14F915b1b4b1c4EE4bF8321Bea018E72E5cf3", + [chains.ChainId.LINEA_TESTNET]: "0x3412378f17B1b44E8bcFD157EcE1a4f59DA5A77a" +}; +var getFeeOnTransferDetectorContract = (publicClient) => { + if (publicClient.chain && publicClient.chain.id in feeOnTransferDetectorAddresses) { + return viem.getContract({ + abi: feeOnTransferDetectorAbi, + address: feeOnTransferDetectorAddresses[publicClient.chain.id], + client: publicClient + }); + } + return null; +}; +var AMOUNT = 100000n; +async function fetchTokenFeeOnTransfer(publicClient, tokenAddress) { + if (!publicClient.chain) { + throw new Error("Chain not found"); + } + const contract = getFeeOnTransferDetectorContract(publicClient); + const baseToken = sdk.WNATIVE[publicClient.chain.id]; + if (!contract) { + throw new Error("Fee on transfer detector contract not found"); + } + if (!baseToken) { + throw new Error("Base token not found"); + } + if (tokenAddress.toLowerCase() === baseToken.address.toLowerCase()) { + throw new Error("Token is base token"); + } + return contract.simulate.validate([tokenAddress, baseToken.address, AMOUNT]); +} +async function fetchTokenFeeOnTransferBatch(publicClient, tokens) { + if (!publicClient.chain) { + throw new Error("Chain not found"); + } + const contract = getFeeOnTransferDetectorContract(publicClient); + if (!contract) { + throw new Error("Fee on transfer detector contract not found"); + } + const baseToken = sdk.WNATIVE[publicClient.chain.id]; + if (!baseToken) { + throw new Error("Base token not found"); + } + const tokensWithoutBaseToken = tokens.filter( + (token) => token.address.toLowerCase() !== baseToken.address.toLowerCase() + ); + return publicClient.multicall({ + allowFailure: true, + contracts: tokensWithoutBaseToken.map( + (token) => ({ + address: contract.address, + abi: feeOnTransferDetectorAbi, + functionName: "validate", + args: [token.address, baseToken.address, AMOUNT] + }) + ) + }); +} + +// evm/infinity-router/index.ts +var infinity_router_exports = {}; +chunkZNSTBYLO_js.__export(infinity_router_exports, { + APISchema: () => schema_exports, + Transformer: () => transformer_exports2, + fillClPoolsWithTicks: () => fillClPoolsWithTicks, + fillPoolsWithBins: () => fillPoolsWithBins, + getBestTrade: () => getBestTrade2, + getInfinityBinCandidatePools: () => getInfinityBinCandidatePools, + getInfinityBinCandidatePoolsWithoutBins: () => getInfinityBinCandidatePoolsWithoutBins, + getInfinityBinPoolsWithoutBins: () => getInfinityBinPoolsWithoutBins, + getInfinityCandidatePools: () => getInfinityCandidatePools, + getInfinityCandidatePoolsLite: () => getInfinityCandidatePoolsLite, + getInfinityClCandidatePools: () => getInfinityClCandidatePools, + getInfinityClCandidatePoolsWithoutTicks: () => getInfinityClCandidatePoolsWithoutTicks, + getInfinityClPoolsWithoutTicks: () => getInfinityClPoolsWithoutTicks, + getInfinityPoolFetchConfig: () => getInfinityPoolFetchConfig, + getInfinityPoolTvl: () => getInfinityPoolTvl, + getTickLensFetchConfig: () => getTickLensFetchConfig, + getTickQueryFetchConfig: () => getTickQueryFetchConfig, + getV3CandidatePools: () => getV3CandidatePools2, + getV3PoolFetchConfig: () => getV3PoolFetchConfig, + getV3Pools: () => getV3Pools, + log: () => log3, + logger: () => logger2, + metric: () => metric2, + parseRemoteInfinityStablePool: () => parseRemoteInfinityStablePool, + parseRemotePool: () => parseRemotePool, + parseRemoteStablePool: () => parseRemoteStablePool, + parseRemoteV2Pool: () => parseRemoteV2Pool, + parseRemoteV3Pool: () => parseRemoteV3Pool, + toLocalInfinityPool: () => toLocalInfinityPool, + toRemoteInfinityPool: () => toRemoteInfinityPool +}); + +// evm/infinity-router/constants/v3PoolFetchGasLimit.ts +var DEFAULT_FETCH_CONFIG = { + gasLimit: 3000000n, + retryGasMultiplier: 2 +}; +var INFI_BIN_POOL_FETCH_CONFIG = { + gasLimit: 300000n, + retryGasMultiplier: 2 +}; +var TICK_QUERY_FETCH_CONFIG = { + gasLimit: 10000000n, + retryGasMultiplier: 2 +}; +var TICK_LENS_FETCH_CONFIG = { + gasLimit: 500000n, + retryGasMultiplier: 2 +}; +var V3_POOL_FETCH_CONFIG = {}; +var INFI_POOL_FETCH_CONFIG = {}; +function getV3PoolFetchConfig(chainId) { + return V3_POOL_FETCH_CONFIG[chainId] || DEFAULT_FETCH_CONFIG; +} +function getInfinityPoolFetchConfig(chainId) { + return INFI_POOL_FETCH_CONFIG[chainId] || INFI_BIN_POOL_FETCH_CONFIG; +} +function getTickQueryFetchConfig() { + return TICK_QUERY_FETCH_CONFIG; +} +function getTickLensFetchConfig() { + return TICK_LENS_FETCH_CONFIG; +} +function getAmountDistribution(amount, distributionPercent) { + const percents = []; + const amounts = []; + for (let i = 1; i <= 100 / distributionPercent; i++) { + percents.push(i * distributionPercent); + amounts.push(amount.multiply(new sdk.Fraction(i * distributionPercent, 100))); + } + return [percents, amounts]; +} + +// ../utils/memoize.ts +function memoize(fn, resolver2) { + const cache = /* @__PURE__ */ new Map(); + const memoized = (...args) => { + const key = resolver2 ? resolver2(...args) : args[0]; + if (cache.has(key)) { + return cache.get(key); + } + const result = fn(...args); + cache.set(key, result); + return result; + }; + memoized.cache = cache; + return memoized; +} + +// ../utils/uniqBy.ts +function uniqBy(array, iteratee) { + const seen = /* @__PURE__ */ new Set(); + const result = []; + const getKey = typeof iteratee === "function" ? iteratee : (item) => item[iteratee]; + for (const item of array) { + const key = getKey(item); + if (!seen.has(key)) { + seen.add(key); + result.push(item); + } + } + return result; +} + +// ../utils/viem/parseUnits.ts +function parseUnits(value, decimals) { + let [integer, fraction = "0"] = value.split("."); + const negative = integer.startsWith("-"); + if (negative) + integer = integer.slice(1); + fraction = fraction.replace(/(0+)$/, ""); + if (decimals === 0) { + if (Math.round(Number(`.${fraction}`)) === 1) + integer = `${BigInt(integer) + 1n}`; + fraction = ""; + } else if (fraction.length > decimals) { + const [left, unit, right] = [ + fraction.slice(0, decimals - 1), + fraction.slice(decimals - 1, decimals), + fraction.slice(decimals) + ]; + const rounded = Math.round(Number(`${unit}.${right}`)); + if (rounded > 9) + fraction = `${BigInt(left) + BigInt(1)}0`.padStart(left.length + 1, "0"); + else + fraction = `${left}${rounded}`; + if (fraction.length > decimals) { + fraction = fraction.slice(1); + integer = `${BigInt(integer) + 1n}`; + } + fraction = fraction.slice(0, decimals); + } else { + fraction = fraction.padEnd(decimals, "0"); + } + return BigInt(`${negative ? "-" : ""}${integer}${fraction}`); +} + +// ../utils/tryParseAmount.ts +function tryParseAmount(value, currency, multiplier) { + if (!value || !currency) { + return void 0; + } + try { + const uiTypedValueParsed = parseUnits(value, currency.decimals).toString(); + const rawAmount = swapSdkCore.fromScaledUIAmount(BigInt(uiTypedValueParsed), multiplier ?? swapSdkCore.SCALED_UI_DENOMINATOR); + if (rawAmount !== 0n) { + if ("chainId" in currency && !("programId" in currency)) { + return swapSdkCore.CurrencyAmount.fromRawAmount(currency, rawAmount); + } + return swapSdkCore.UnifiedCurrencyAmount.fromRawAmount(currency, rawAmount); + } + } catch (error) { + console.debug(`Failed to parse input amount: "${value}"`, error); + } + return void 0; +} +var tryParseAmount_default = tryParseAmount; + +// evm/v3-router/types/infinityMixedQuoter.ts +var InfinityMixedQuoterActions = /* @__PURE__ */ ((InfinityMixedQuoterActions2) => { + InfinityMixedQuoterActions2[InfinityMixedQuoterActions2["SS_2_EXACT_INPUT_SINGLE"] = 0] = "SS_2_EXACT_INPUT_SINGLE"; + InfinityMixedQuoterActions2[InfinityMixedQuoterActions2["SS_3_EXACT_INPUT_SINGLE"] = 1] = "SS_3_EXACT_INPUT_SINGLE"; + InfinityMixedQuoterActions2[InfinityMixedQuoterActions2["V2_EXACT_INPUT_SINGLE"] = 2] = "V2_EXACT_INPUT_SINGLE"; + InfinityMixedQuoterActions2[InfinityMixedQuoterActions2["V3_EXACT_INPUT_SINGLE"] = 3] = "V3_EXACT_INPUT_SINGLE"; + InfinityMixedQuoterActions2[InfinityMixedQuoterActions2["INFI_CL_EXACT_INPUT_SINGLE"] = 4] = "INFI_CL_EXACT_INPUT_SINGLE"; + InfinityMixedQuoterActions2[InfinityMixedQuoterActions2["INFI_BIN_EXACT_INPUT_SINGLE"] = 5] = "INFI_BIN_EXACT_INPUT_SINGLE"; + return InfinityMixedQuoterActions2; +})(InfinityMixedQuoterActions || {}); + +// evm/v3-router/types/pool.ts +var PoolType = /* @__PURE__ */ ((PoolType2) => { + PoolType2[PoolType2["V2"] = 0] = "V2"; + PoolType2[PoolType2["V3"] = 1] = "V3"; + PoolType2[PoolType2["STABLE"] = 2] = "STABLE"; + PoolType2[PoolType2["InfinityCL"] = 3] = "InfinityCL"; + PoolType2[PoolType2["InfinityBIN"] = 4] = "InfinityBIN"; + PoolType2[PoolType2["InfinityStable"] = 5] = "InfinityStable"; + PoolType2[PoolType2["SVM"] = 6] = "SVM"; + PoolType2[PoolType2["MM"] = 7] = "MM"; + return PoolType2; +})(PoolType || {}); + +// evm/v3-router/types/route.ts +var RouteType = /* @__PURE__ */ ((RouteType2) => { + RouteType2[RouteType2["V2"] = 0] = "V2"; + RouteType2[RouteType2["V3"] = 1] = "V3"; + RouteType2[RouteType2["STABLE"] = 2] = "STABLE"; + RouteType2[RouteType2["MIXED"] = 3] = "MIXED"; + RouteType2[RouteType2["MM"] = 4] = "MM"; + RouteType2[RouteType2["InfinityCL"] = 5] = "InfinityCL"; + RouteType2[RouteType2["InfinityBIN"] = 6] = "InfinityBIN"; + RouteType2[RouteType2["InfinityStable"] = 7] = "InfinityStable"; + RouteType2[RouteType2["BRIDGE"] = 8] = "BRIDGE"; + RouteType2[RouteType2["SVM"] = 9] = "SVM"; + return RouteType2; +})(RouteType || {}); + +// evm/v3-router/utils/pool.ts +var INFINITY_STABLE_POOL_FEE_DENOMINATOR = 1e10; +function isV2Pool(pool) { + return pool.type === 0 /* V2 */; +} +function isV3Pool(pool) { + return pool.type === 1 /* V3 */; +} +function isStablePool(pool) { + return pool.type === 2 /* STABLE */ && pool.balances.length >= 2; +} +function isMMPool(pool) { + return pool.type === 7 /* MM */; +} +function isInfinityBinPool(pool) { + return pool.type === 4 /* InfinityBIN */; +} +function isInfinityClPool(pool) { + return pool.type === 3 /* InfinityCL */; +} +function isInfinityStablePool(pool) { + return pool.type === 5 /* InfinityStable */; +} +function involvesCurrency(pool, currency) { + const token = currency.wrapped; + if (isV2Pool(pool)) { + const { reserve0, reserve1 } = pool; + return reserve0.currency.equals(token) || reserve1.currency.equals(token); + } + if (isV3Pool(pool)) { + const { token0, token1 } = pool; + return token0.equals(token) || token1.equals(token); + } + if (isInfinityClPool(pool) || isInfinityBinPool(pool)) { + const { currency0, currency1 } = pool; + return currency0.equals(currency) || currency1.equals(currency) || currency0.wrapped.equals(token) || currency1.wrapped.equals(token); + } + if (isStablePool(pool)) { + const { balances } = pool; + return balances.some((b) => b.currency.equals(token)); + } + if (isMMPool(pool)) { + const { currency0, currency1 } = pool; + return currency0.wrapped.equals(token) || currency1.wrapped.equals(token); + } + if (isInfinityStablePool(pool)) { + const { reserve0, reserve1 } = pool; + return reserve0?.currency.equals(token) || reserve1?.currency.equals(token); + } + return false; +} +function getOutputCurrency(pool, currencyIn) { + const tokenIn = currencyIn.wrapped; + if (isV2Pool(pool)) { + const { reserve0, reserve1 } = pool; + return reserve0.currency.equals(tokenIn) ? reserve1.currency : reserve0.currency; + } + if (isV3Pool(pool)) { + const { token0, token1 } = pool; + return token0.equals(tokenIn) ? token1 : token0; + } + if (isStablePool(pool)) { + const { balances } = pool; + return balances[0].currency.equals(tokenIn) ? balances[1].currency : balances[0].currency; + } + if (isMMPool(pool)) { + const { currency0, currency1 } = pool; + return currency0.wrapped.equals(tokenIn) ? currency1 : currency0; + } + if (isInfinityClPool(pool) || isInfinityBinPool(pool) || isInfinityStablePool(pool)) { + const { currency0, currency1 } = pool; + return currency0.wrapped.equals(tokenIn) ? currency1 : currency0; + } + throw new Error("Cannot get output currency by invalid pool"); +} +var computeV3PoolAddress = memoize( + v3Sdk.computePoolAddress, + ({ deployerAddress, tokenA, tokenB, fee }) => `${tokenA.chainId}_${deployerAddress}_${tokenA.address}_${tokenB.address}_${fee}` +); +var computeV2PoolAddress = memoize( + sdk.Pair.getAddress, + (tokenA, tokenB) => `${tokenA.chainId}_${tokenA.address}_${tokenB.address}` +); +var getPoolAddress = (pool) => { + if (isStablePool(pool) || isV3Pool(pool)) { + return pool.address; + } + if (isV2Pool(pool)) { + const { reserve0, reserve1 } = pool; + return computeV2PoolAddress(reserve0.currency.wrapped, reserve1.currency.wrapped); + } + if (isInfinityBinPool(pool) || isInfinityClPool(pool) || isInfinityStablePool(pool)) { + return pool.id; + } + if (isMMPool(pool)) { + return ""; + } + return ""; +}; +var getPoolCurrency0 = (pool) => { + if (isV2Pool(pool)) { + return pool.reserve0.currency; + } + if (isV3Pool(pool)) { + return pool.token0; + } + if (isInfinityClPool(pool) || isInfinityBinPool(pool) || isInfinityStablePool(pool)) { + return pool.currency0; + } + if (isStablePool(pool)) { + return pool.balances[0].currency; + } + if (isMMPool(pool)) { + return pool.currency0; + } + throw new Error("Cannot get currency0 by invalid pool"); +}; +function getTokenPrice(pool, base, quote) { + if (isMMPool(pool)) { + const { inputAmount, outputAmount } = pool; + const baseIsInput = inputAmount.currency.wrapped.equals(base.wrapped); + return baseIsInput ? new sdk.Price(base, quote, inputAmount.quotient, outputAmount.quotient) : new sdk.Price(base, quote, outputAmount.quotient, inputAmount.quotient); + } + if (isV3Pool(pool)) { + const { token0, token1, fee, liquidity, sqrtRatioX96, tick } = pool; + const v3Pool = new v3Sdk.Pool(token0.wrapped, token1.wrapped, fee, sqrtRatioX96, liquidity, tick); + return v3Pool.priceOf(base.wrapped); + } + if (isInfinityClPool(pool)) { + const { currency0, currency1, fee, liquidity, sqrtRatioX96, tick } = pool; + const v3Pool = new v3Sdk.Pool(currency0.asToken, currency1.asToken, fee, sqrtRatioX96, liquidity, tick); + const baseToken = currency0.wrapped.equals(base.wrapped) ? currency0.asToken : base.wrapped; + const tokenPrice = v3Pool.priceOf(baseToken); + const [baseCurrency, quoteCurrency] = baseToken.equals(currency0.asToken) ? [currency0, currency1] : [currency1, currency0]; + return new sdk.Price(baseCurrency, quoteCurrency, tokenPrice.denominator, tokenPrice.numerator); + } + if (isInfinityBinPool(pool)) { + const { activeId, binStep, currency0, currency1 } = pool; + return infinitySdk.getBinPoolTokenPrice( + { + currencyX: currency0, + currencyY: currency1, + binStep: BigInt(binStep), + activeId: BigInt(activeId) + }, + base + ); + } + if (isV2Pool(pool)) { + const pair = new sdk.Pair(pool.reserve0.wrapped, pool.reserve1.wrapped); + return pair.priceOf(base.wrapped); + } + if (isStablePool(pool) || isInfinityStablePool(pool)) { + const stablePool = isInfinityStablePool(pool) ? convertInfinityStablePoolToStablePool(pool) : pool; + const { amplifier, balances, fee } = stablePool; + const baseBalance = balances.find((b) => b.currency.wrapped.equals(base.wrapped)); + const quoteBalance = balances.find((b) => b.currency.wrapped.equals(quote.wrapped)); + let probeAmountStr = "1"; + if (baseBalance && quoteBalance) { + const baseInTokens = Number(baseBalance.quotient) / 10 ** base.decimals; + const quoteInTokens = Number(quoteBalance.quotient) / 10 ** quote.decimals; + if (baseInTokens < 1 || quoteInTokens < 1) { + const smallerInTokens = baseInTokens < quoteInTokens ? baseInTokens : quoteInTokens; + probeAmountStr = smallerInTokens > 0 ? String(smallerInTokens) : "1"; + } + } + const baseIn = tryParseAmount_default(probeAmountStr, base); + if (!baseIn) { + throw new Error(`Cannot parse amount for ${base.symbol}`); + } + const quoteOut = stableSwapSdk.getSwapOutput({ + amplifier, + balances, + fee, + outputCurrency: quote, + amount: baseIn + }); + return new sdk.Price({ + baseAmount: baseIn, + quoteAmount: quoteOut + }); + } + return new sdk.Price(base, quote, 1n, 0n); +} +function convertInfinityStablePoolToStablePool(pool) { + if (!pool.hooks || pool.type !== 5 /* InfinityStable */) { + throw new Error(`convertInfinityStablePoolToStablePool: Invalid pool type: ${pool.type}`); + } + const balance0 = pool.reserve0 ?? sdk.CurrencyAmount.fromRawAmount(pool.currency0, 0); + const balance1 = pool.reserve1 ?? sdk.CurrencyAmount.fromRawAmount(pool.currency1, 0); + return { + type: 2 /* STABLE */, + address: pool.hooks, + balances: [balance0, balance1], + amplifier: BigInt(pool.amplifier ?? 0), + fee: new sdk.Percent(BigInt(pool.stableFee ?? 0), INFINITY_STABLE_POOL_FEE_DENOMINATOR) + }; +} + +// evm/v3-router/utils/encodeInfinityRouteToPath.ts +function encodeInfinityRouteToPath(route, exactOutput) { + if (route.pools.some((p) => !isInfinityClPool(p) && !isInfinityBinPool(p) && !isInfinityStablePool(p))) { + throw new Error("Failed to encode path keys. Invalid Infinity pool found in route."); + } + const currencyStart = exactOutput ? route.output : route.input; + const pools = exactOutput ? [...route.pools].reverse() : route.pools; + const { path } = pools.reduce( + ({ baseCurrency, path: path2 }, pool) => { + const isInfinityCl = isInfinityClPool(pool); + const isInfinityBin = isInfinityBinPool(pool); + const isInfinityStable = isInfinityStablePool(pool); + if (!isInfinityCl && !isInfinityBin && !isInfinityStable) + throw new Error(`Invalid Infinity pool ${pool}`); + const quoteCurrency = getOutputCurrency(pool, baseCurrency); + const hooksRegistration = pool.hooksRegistrationBitmap !== void 0 ? infinitySdk.decodeHooksRegistration(pool.hooksRegistrationBitmap) : void 0; + const parameters = infinitySdk.encodePoolParameters( + isInfinityCl || isInfinityStable ? { + tickSpacing: pool.tickSpacing, + hooksRegistration + } : { + binStep: pool.binStep, + hooksRegistration + } + ); + return { + baseCurrency: quoteCurrency, + path: [ + ...path2, + { + intermediateCurrency: swapSdkCore.getCurrencyAddress(quoteCurrency), + fee: infinitySdk.isDynamicFeeHook(pool.currency0.chainId, pool.hooks) ? infinitySdk.DYNAMIC_FEE_FLAG : pool.fee, + hooks: pool.hooks ?? viem.zeroAddress, + poolManager: pool.poolManager, + hookData: "0x", + parameters + } + ] + }; + }, + { baseCurrency: currencyStart, path: [] } + ); + return exactOutput ? path.reverse() : path; +} +function encodeMixedRouteToPath(route, exactOutput) { + const firstInputToken = route.input.wrapped; + const { path, types } = route.pools.reduce( + ({ inputToken, path: path2, types: types2 }, pool, index) => { + const outputToken = getOutputCurrency(pool, inputToken).wrapped; + const fee = isV3Pool(pool) ? pool.fee : chunkZNSTBYLO_js.V2_FEE_PATH_PLACEHOLDER; + if (index === 0) { + return { + inputToken: outputToken, + types: ["address", "uint24", "address"], + path: [inputToken.address, fee, outputToken.address] + }; + } + return { + inputToken: outputToken, + types: [...types2, "uint24", "address"], + path: [...path2, fee, outputToken.address] + }; + }, + { inputToken: firstInputToken, path: [], types: [] } + ); + return exactOutput ? viem.encodePacked(types.reverse(), path.reverse()) : viem.encodePacked(types, path); +} + +// evm/v3-router/utils/getCurrenciesOfPool.ts +function getCurrenciesOfPool(pool) { + if (isV2Pool(pool)) { + const { reserve0, reserve1 } = pool; + return [reserve0.currency, reserve1.currency]; + } + if (isV3Pool(pool)) { + const { token0, token1 } = pool; + return [token0, token1]; + } + if (isStablePool(pool)) { + const { balances } = pool; + return balances.map((b) => b.currency); + } + if (isInfinityClPool(pool) || isInfinityBinPool(pool) || isInfinityStablePool(pool)) { + const { currency0, currency1 } = pool; + return [currency0, currency1]; + } + throw new Error("Cannot get tokens by invalid pool"); +} +function getExecutionPrice(trade) { + if (!trade) { + return void 0; + } + const { inputAmount, outputAmount } = trade; + if (!inputAmount || !outputAmount) { + return void 0; + } + if (inputAmount.quotient === sdk.ZERO || outputAmount.quotient === sdk.ZERO) { + return void 0; + } + return new sdk.Price(inputAmount.currency, outputAmount.currency, inputAmount.quotient, outputAmount.quotient); +} +function getGasAccountingToken(chainId) { + const wnative = sdk.WNATIVE[chainId]; + if (wnative) { + return { token: wnative, nativeDecimals: wnative.decimals }; + } + const config = chains.getChainConfig(chainId); + const override = config?.gasTokenOverride; + const nativeDecimals = config?.nativeCurrency?.decimals; + if (!override || nativeDecimals === void 0) { + return null; + } + return { + token: new sdk.ERC20Token(chainId, override.address, override.decimals, override.symbol, override.name), + nativeDecimals + }; +} +function rescaleRawAmount(raw, from, to) { + if (from === to) + return raw; + return from > to ? raw / 10n ** BigInt(from - to) : raw * 10n ** BigInt(to - from); +} + +// evm/v3-router/utils/getOutputOfPools.ts +var getOutputOfPools = (pools, firstInputToken) => { + const { inputToken: outputToken } = pools.reduce( + ({ inputToken }, pool) => { + if (!involvesCurrency(pool, inputToken)) + throw new Error("PATH"); + const output = getOutputCurrency(pool, inputToken); + return { + inputToken: output + }; + }, + { inputToken: firstInputToken } + ); + return outputToken; +}; +function buildBaseRoute(pools, currencyIn, currencyOut) { + const path = [currencyIn]; + let prevIn = path[0]; + let routeType = null; + const updateRouteType = (pool, currentRouteType) => { + if (currentRouteType === null) { + return getRouteTypeFromPool(pool); + } + if (currentRouteType === 3 /* MIXED */ || currentRouteType !== getRouteTypeFromPool(pool)) { + return 3 /* MIXED */; + } + return currentRouteType; + }; + const lastPool = pools[pools.length - 1]; + for (const pool of pools) { + routeType = updateRouteType(pool, routeType); + if (pool === lastPool) { + path.push(currencyOut); + continue; + } + prevIn = getOutputCurrency(pool, prevIn); + path.push(prevIn); + } + if (routeType === null) { + throw new Error(`Invalid route type when constructing base route`); + } + return { + path, + pools, + type: routeType, + input: currencyIn, + output: currencyOut + }; +} +function getRouteTypeFromPool(pool) { + switch (pool.type) { + case 0 /* V2 */: + return 0 /* V2 */; + case 1 /* V3 */: + return 1 /* V3 */; + case 2 /* STABLE */: + return 2 /* STABLE */; + case 7 /* MM */: + return 4 /* MM */; + case 3 /* InfinityCL */: + case 5 /* InfinityStable */: + return 5 /* InfinityCL */; + case 4 /* InfinityBIN */: + return 6 /* InfinityBIN */; + default: + return 3 /* MIXED */; + } +} +function getRouteTypeByPools(pools) { + let routeType; + for (const p of pools) { + if (routeType === void 0) { + routeType = getRouteTypeFromPool(p); + continue; + } + if (routeType === 3 /* MIXED */ || routeType !== getRouteTypeFromPool(p)) { + routeType = 3 /* MIXED */; + continue; + } + } + invariant6__default.default(routeType !== void 0, "INVALID_ROUTE_TYPE"); + return routeType; +} +function getQuoteCurrency({ input, output }, baseCurrency) { + return baseCurrency.equals(input) ? output : input; +} +function wrapPrice(price) { + return new sdk.Price(price.baseCurrency.wrapped, price.quoteCurrency.wrapped, price.denominator, price.numerator); +} +function getMidPrice({ path, pools }) { + let i = 0; + let price = null; + const currencyIn = path[0]; + const currencyOut = path[path.length - 1]; + for (const pool of pools) { + const input = path[i]; + const output = path[i + 1]; + const poolPrice = wrapPrice(getTokenPrice(pool, input, output)); + price = price ? price.multiply(poolPrice) : poolPrice; + i += 1; + } + if (!price) { + throw new Error("Get mid price failed"); + } + return new sdk.Price(currencyIn, currencyOut, price.denominator, price.numerator); +} + +// evm/v3-router/utils/getPriceImpact.ts +function getPriceImpact(trade) { + let spotOutputAmount = sdk.CurrencyAmount.fromRawAmount(trade.outputAmount.currency, 0); + for (const route of trade.routes) { + const { inputAmount } = route; + const midPrice = getMidPrice(route); + spotOutputAmount = spotOutputAmount.add( + sdk.CurrencyAmount.fromRawAmount(trade.outputAmount.currency, midPrice.wrapped.quote(inputAmount.wrapped).quotient) + ); + } + if (spotOutputAmount.equalTo(0)) { + return sdk.ONE_HUNDRED_PERCENT; + } + const priceImpact = spotOutputAmount.subtract(trade.outputAmount).divide(spotOutputAmount); + return new sdk.Percent(priceImpact.numerator, priceImpact.denominator); +} + +// evm/v3-router/utils/getUsdGasToken.ts +function getUsdGasToken(chainId) { + return chunkZNSTBYLO_js.usdGasTokensByChain[chainId]?.[0] ?? null; +} + +// evm/v3-router/utils/isCurrenciesSameChain.ts +function isCurrenciesSameChain(...currencies) { + const chainId = currencies[0]?.chainId; + for (const currency of currencies) { + if (currency.chainId !== chainId) { + return false; + } + } + return true; +} +var SCOPE_PREFIX = "smart-router"; +var SCOPE = { + metric: "metric", + log: "log", + error: "error" +}; +var log_ = debug__default.default(SCOPE_PREFIX); +var metric = log_.extend(SCOPE.metric); +var log = log_.extend(SCOPE.log); +var logger = { + metric, + log, + error: debug__default.default(SCOPE_PREFIX).extend(SCOPE.error), + enable: (namespace) => { + let namespaces = namespace; + if (namespace.includes(",")) { + namespaces = namespace.split(",").map((ns) => `${SCOPE_PREFIX}:${ns}`).join(","); + } else { + namespaces = `${SCOPE_PREFIX}:${namespace}`; + } + debug__default.default.enable(namespaces); + } +}; +function maximumAmountIn(trade, slippage, amountIn = trade.inputAmount) { + if (trade.tradeType === sdk.TradeType.EXACT_INPUT) { + return amountIn; + } + const slippageAdjustedAmountIn = new sdk.Fraction(sdk.ONE).add(slippage).multiply(amountIn.quotient).quotient; + return sdk.CurrencyAmount.fromRawAmount(amountIn.currency, slippageAdjustedAmountIn); +} +function minimumAmountOut(trade, slippage, amountOut = trade.outputAmount) { + if (trade.tradeType === sdk.TradeType.EXACT_OUTPUT) { + return amountOut; + } + const slippageAdjustedAmountOut = new sdk.Fraction(sdk.ONE).add(slippage).invert().multiply(amountOut.quotient).quotient; + return sdk.CurrencyAmount.fromRawAmount(amountOut.currency, slippageAdjustedAmountOut); +} + +// evm/v3-router/utils/partitionMixedRouteByProtocol.ts +var partitionMixedRouteByProtocol = (route) => { + const acc = []; + let left = 0; + let right = 0; + while (right < route.pools.length) { + if (route.pools[left].type !== route.pools[right].type) { + acc.push(route.pools.slice(left, right)); + left = right; + } + right++; + if (right === route.pools.length) { + acc.push(route.pools.slice(left, right)); + } + } + return acc; +}; + +// evm/abis/ISwapRouter02.ts +var swapRouter02Abi = [ + { + inputs: [ + { internalType: "address", name: "_factoryV2", type: "address" }, + { internalType: "address", name: "_deployer", type: "address" }, + { internalType: "address", name: "_factoryV3", type: "address" }, + { internalType: "address", name: "_positionManager", type: "address" }, + { internalType: "address", name: "_stableFactory", type: "address" }, + { internalType: "address", name: "_stableInfo", type: "address" }, + { internalType: "address", name: "_WETH9", type: "address" } + ], + stateMutability: "nonpayable", + type: "constructor" + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "previousOwner", type: "address" }, + { indexed: true, internalType: "address", name: "newOwner", type: "address" } + ], + name: "OwnershipTransferred", + type: "event" + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "factory", type: "address" }, + { indexed: true, internalType: "address", name: "info", type: "address" } + ], + name: "SetStableSwap", + type: "event" + }, + { + inputs: [], + name: "WETH9", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [{ internalType: "address", name: "token", type: "address" }], + name: "approveMax", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [{ internalType: "address", name: "token", type: "address" }], + name: "approveMaxMinusOne", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [{ internalType: "address", name: "token", type: "address" }], + name: "approveZeroThenMax", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [{ internalType: "address", name: "token", type: "address" }], + name: "approveZeroThenMaxMinusOne", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [{ internalType: "bytes", name: "data", type: "bytes" }], + name: "callPositionManager", + outputs: [{ internalType: "bytes", name: "result", type: "bytes" }], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "bytes[]", name: "paths", type: "bytes[]" }, + { internalType: "uint128[]", name: "amounts", type: "uint128[]" }, + { internalType: "uint24", name: "maximumTickDivergence", type: "uint24" }, + { internalType: "uint32", name: "secondsAgo", type: "uint32" } + ], + name: "checkOracleSlippage", + outputs: [], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { internalType: "bytes", name: "path", type: "bytes" }, + { internalType: "uint24", name: "maximumTickDivergence", type: "uint24" }, + { internalType: "uint32", name: "secondsAgo", type: "uint32" } + ], + name: "checkOracleSlippage", + outputs: [], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "deployer", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + components: [ + { internalType: "bytes", name: "path", type: "bytes" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amountIn", type: "uint256" }, + { internalType: "uint256", name: "amountOutMinimum", type: "uint256" } + ], + internalType: "struct IV3SwapRouter.ExactInputParams", + name: "params", + type: "tuple" + } + ], + name: "exactInput", + outputs: [{ internalType: "uint256", name: "amountOut", type: "uint256" }], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + components: [ + { internalType: "address", name: "tokenIn", type: "address" }, + { internalType: "address", name: "tokenOut", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amountIn", type: "uint256" }, + { internalType: "uint256", name: "amountOutMinimum", type: "uint256" }, + { internalType: "uint160", name: "sqrtPriceLimitX96", type: "uint160" } + ], + internalType: "struct IV3SwapRouter.ExactInputSingleParams", + name: "params", + type: "tuple" + } + ], + name: "exactInputSingle", + outputs: [{ internalType: "uint256", name: "amountOut", type: "uint256" }], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "address[]", name: "path", type: "address[]" }, + { internalType: "uint256[]", name: "flag", type: "uint256[]" }, + { internalType: "uint256", name: "amountIn", type: "uint256" }, + { internalType: "uint256", name: "amountOutMin", type: "uint256" }, + { internalType: "address", name: "to", type: "address" } + ], + name: "exactInputStableSwap", + outputs: [{ internalType: "uint256", name: "amountOut", type: "uint256" }], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + components: [ + { internalType: "bytes", name: "path", type: "bytes" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amountOut", type: "uint256" }, + { internalType: "uint256", name: "amountInMaximum", type: "uint256" } + ], + internalType: "struct IV3SwapRouter.ExactOutputParams", + name: "params", + type: "tuple" + } + ], + name: "exactOutput", + outputs: [{ internalType: "uint256", name: "amountIn", type: "uint256" }], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + components: [ + { internalType: "address", name: "tokenIn", type: "address" }, + { internalType: "address", name: "tokenOut", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amountOut", type: "uint256" }, + { internalType: "uint256", name: "amountInMaximum", type: "uint256" }, + { internalType: "uint160", name: "sqrtPriceLimitX96", type: "uint160" } + ], + internalType: "struct IV3SwapRouter.ExactOutputSingleParams", + name: "params", + type: "tuple" + } + ], + name: "exactOutputSingle", + outputs: [{ internalType: "uint256", name: "amountIn", type: "uint256" }], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "address[]", name: "path", type: "address[]" }, + { internalType: "uint256[]", name: "flag", type: "uint256[]" }, + { internalType: "uint256", name: "amountOut", type: "uint256" }, + { internalType: "uint256", name: "amountInMax", type: "uint256" }, + { internalType: "address", name: "to", type: "address" } + ], + name: "exactOutputStableSwap", + outputs: [{ internalType: "uint256", name: "amountIn", type: "uint256" }], + stateMutability: "payable", + type: "function" + }, + { + inputs: [], + name: "factory", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "factoryV2", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" } + ], + name: "getApprovalType", + outputs: [{ internalType: "enum IApproveAndCall.ApprovalType", name: "", type: "uint8" }], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { internalType: "address", name: "token0", type: "address" }, + { internalType: "address", name: "token1", type: "address" }, + { internalType: "uint256", name: "tokenId", type: "uint256" }, + { internalType: "uint256", name: "amount0Min", type: "uint256" }, + { internalType: "uint256", name: "amount1Min", type: "uint256" } + ], + internalType: "struct IApproveAndCall.IncreaseLiquidityParams", + name: "params", + type: "tuple" + } + ], + name: "increaseLiquidity", + outputs: [{ internalType: "bytes", name: "result", type: "bytes" }], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + components: [ + { internalType: "address", name: "token0", type: "address" }, + { internalType: "address", name: "token1", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "int24", name: "tickLower", type: "int24" }, + { internalType: "int24", name: "tickUpper", type: "int24" }, + { internalType: "uint256", name: "amount0Min", type: "uint256" }, + { internalType: "uint256", name: "amount1Min", type: "uint256" }, + { internalType: "address", name: "recipient", type: "address" } + ], + internalType: "struct IApproveAndCall.MintParams", + name: "params", + type: "tuple" + } + ], + name: "mint", + outputs: [{ internalType: "bytes", name: "result", type: "bytes" }], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "bytes32", name: "previousBlockhash", type: "bytes32" }, + { internalType: "bytes[]", name: "data", type: "bytes[]" } + ], + name: "multicall", + outputs: [{ internalType: "bytes[]", name: "", type: "bytes[]" }], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "uint256", name: "deadline", type: "uint256" }, + { internalType: "bytes[]", name: "data", type: "bytes[]" } + ], + name: "multicall", + outputs: [{ internalType: "bytes[]", name: "", type: "bytes[]" }], + stateMutability: "payable", + type: "function" + }, + { + inputs: [{ internalType: "bytes[]", name: "data", type: "bytes[]" }], + name: "multicall", + outputs: [{ internalType: "bytes[]", name: "results", type: "bytes[]" }], + stateMutability: "payable", + type: "function" + }, + { + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { internalType: "int256", name: "amount0Delta", type: "int256" }, + { internalType: "int256", name: "amount1Delta", type: "int256" }, + { internalType: "bytes", name: "_data", type: "bytes" } + ], + name: "pancakeV3SwapCallback", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "positionManager", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "value", type: "uint256" } + ], + name: "pull", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { inputs: [], name: "refundETH", outputs: [], stateMutability: "payable", type: "function" }, + { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "value", type: "uint256" }, + { internalType: "uint256", name: "deadline", type: "uint256" }, + { internalType: "uint8", name: "v", type: "uint8" }, + { internalType: "bytes32", name: "r", type: "bytes32" }, + { internalType: "bytes32", name: "s", type: "bytes32" } + ], + name: "selfPermit", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "nonce", type: "uint256" }, + { internalType: "uint256", name: "expiry", type: "uint256" }, + { internalType: "uint8", name: "v", type: "uint8" }, + { internalType: "bytes32", name: "r", type: "bytes32" }, + { internalType: "bytes32", name: "s", type: "bytes32" } + ], + name: "selfPermitAllowed", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "nonce", type: "uint256" }, + { internalType: "uint256", name: "expiry", type: "uint256" }, + { internalType: "uint8", name: "v", type: "uint8" }, + { internalType: "bytes32", name: "r", type: "bytes32" }, + { internalType: "bytes32", name: "s", type: "bytes32" } + ], + name: "selfPermitAllowedIfNecessary", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "value", type: "uint256" }, + { internalType: "uint256", name: "deadline", type: "uint256" }, + { internalType: "uint8", name: "v", type: "uint8" }, + { internalType: "bytes32", name: "r", type: "bytes32" }, + { internalType: "bytes32", name: "s", type: "bytes32" } + ], + name: "selfPermitIfNecessary", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "address", name: "_factory", type: "address" }, + { internalType: "address", name: "_info", type: "address" } + ], + name: "setStableSwap", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "stableSwapFactory", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "stableSwapInfo", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { internalType: "uint256", name: "amountIn", type: "uint256" }, + { internalType: "uint256", name: "amountOutMin", type: "uint256" }, + { internalType: "address[]", name: "path", type: "address[]" }, + { internalType: "address", name: "to", type: "address" } + ], + name: "swapExactTokensForTokens", + outputs: [{ internalType: "uint256", name: "amountOut", type: "uint256" }], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "uint256", name: "amountOut", type: "uint256" }, + { internalType: "uint256", name: "amountInMax", type: "uint256" }, + { internalType: "address[]", name: "path", type: "address[]" }, + { internalType: "address", name: "to", type: "address" } + ], + name: "swapTokensForExactTokens", + outputs: [{ internalType: "uint256", name: "amountIn", type: "uint256" }], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "amountMinimum", type: "uint256" }, + { internalType: "address", name: "recipient", type: "address" } + ], + name: "sweepToken", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "amountMinimum", type: "uint256" } + ], + name: "sweepToken", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "amountMinimum", type: "uint256" }, + { internalType: "uint256", name: "feeBips", type: "uint256" }, + { internalType: "address", name: "feeRecipient", type: "address" } + ], + name: "sweepTokenWithFee", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "amountMinimum", type: "uint256" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "feeBips", type: "uint256" }, + { internalType: "address", name: "feeRecipient", type: "address" } + ], + name: "sweepTokenWithFee", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [{ internalType: "address", name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { internalType: "uint256", name: "amountMinimum", type: "uint256" }, + { internalType: "address", name: "recipient", type: "address" } + ], + name: "unwrapWETH9", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "uint256", name: "amountMinimum", type: "uint256" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "feeBips", type: "uint256" }, + { internalType: "address", name: "feeRecipient", type: "address" } + ], + name: "unwrapWETH9WithFee", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { internalType: "uint256", name: "amountMinimum", type: "uint256" }, + { internalType: "uint256", name: "feeBips", type: "uint256" }, + { internalType: "address", name: "feeRecipient", type: "address" } + ], + name: "unwrapWETH9WithFee", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [{ internalType: "uint256", name: "value", type: "uint256" }], + name: "wrapETH", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { stateMutability: "payable", type: "receive" } +]; + +// evm/abis/IApproveAndCall.ts +var approveAndCallAbi = [ + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address" + } + ], + name: "approveMax", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address" + } + ], + name: "approveMaxMinusOne", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address" + } + ], + name: "approveZeroThenMax", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address" + } + ], + name: "approveZeroThenMaxMinusOne", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "bytes", + name: "data", + type: "bytes" + } + ], + name: "callPositionManager", + outputs: [ + { + internalType: "bytes", + name: "result", + type: "bytes" + } + ], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "getApprovalType", + outputs: [ + { + internalType: "enum IApproveAndCall.ApprovalType", + name: "", + type: "uint8" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "token0", + type: "address" + }, + { + internalType: "address", + name: "token1", + type: "address" + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256" + }, + { + internalType: "uint256", + name: "amount0Min", + type: "uint256" + }, + { + internalType: "uint256", + name: "amount1Min", + type: "uint256" + } + ], + internalType: "struct IApproveAndCall.IncreaseLiquidityParams", + name: "params", + type: "tuple" + } + ], + name: "increaseLiquidity", + outputs: [ + { + internalType: "bytes", + name: "result", + type: "bytes" + } + ], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "token0", + type: "address" + }, + { + internalType: "address", + name: "token1", + type: "address" + }, + { + internalType: "uint24", + name: "fee", + type: "uint24" + }, + { + internalType: "int24", + name: "tickLower", + type: "int24" + }, + { + internalType: "int24", + name: "tickUpper", + type: "int24" + }, + { + internalType: "uint256", + name: "amount0Min", + type: "uint256" + }, + { + internalType: "uint256", + name: "amount1Min", + type: "uint256" + }, + { + internalType: "address", + name: "recipient", + type: "address" + } + ], + internalType: "struct IApproveAndCall.MintParams", + name: "params", + type: "tuple" + } + ], + name: "mint", + outputs: [ + { + internalType: "bytes", + name: "result", + type: "bytes" + } + ], + stateMutability: "payable", + type: "function" + } +]; + +// evm/v3-router/utils/approveAndCall.ts +function isMint(options) { + return Object.keys(options).some((k) => k === "recipient"); +} +var _ApproveAndCall = class { + /** + * Cannot be constructed. + */ + // eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function + constructor() { + } + static encodeApproveMax(token) { + return viem.encodeFunctionData({ + abi: _ApproveAndCall.ABI, + functionName: "approveMax", + args: [token.address] + }); + } + static encodeApproveMaxMinusOne(token) { + return viem.encodeFunctionData({ + abi: _ApproveAndCall.ABI, + functionName: "approveMaxMinusOne", + args: [token.address] + }); + } + static encodeApproveZeroThenMax(token) { + return viem.encodeFunctionData({ + abi: _ApproveAndCall.ABI, + functionName: "approveZeroThenMax", + args: [token.address] + }); + } + static encodeApproveZeroThenMaxMinusOne(token) { + return viem.encodeFunctionData({ + abi: _ApproveAndCall.ABI, + functionName: "approveZeroThenMaxMinusOne", + args: [token.address] + }); + } + static encodeCallPositionManager(calldatas) { + invariant6__default.default(calldatas.length > 0, "NULL_CALLDATA"); + if (calldatas.length === 1) { + return viem.encodeFunctionData({ + abi: _ApproveAndCall.ABI, + functionName: "callPositionManager", + args: calldatas + }); + } + const encodedMulticall = viem.encodeFunctionData({ + abi: v3Sdk.NonfungiblePositionManager.ABI, + functionName: "multicall", + args: [calldatas] + }); + return viem.encodeFunctionData({ + abi: _ApproveAndCall.ABI, + functionName: "callPositionManager", + args: [encodedMulticall] + }); + } + /** + * Encode adding liquidity to a position in the nft manager contract + * @param position Forcasted position with expected amount out from swap + * @param minimalPosition Forcasted position with custom minimal token amounts + * @param addLiquidityOptions Options for adding liquidity + * @param slippageTolerance Defines maximum slippage + */ + static encodeAddLiquidity(position, minimalPosition, addLiquidityOptions, slippageTolerance) { + let { amount0: amount0Min, amount1: amount1Min } = position.mintAmountsWithSlippage(slippageTolerance); + if (minimalPosition.amount0.quotient < amount0Min) { + amount0Min = minimalPosition.amount0.quotient; + } + if (minimalPosition.amount1.quotient < amount1Min) { + amount1Min = minimalPosition.amount1.quotient; + } + if (isMint(addLiquidityOptions)) { + return viem.encodeFunctionData({ + abi: _ApproveAndCall.ABI, + functionName: "mint", + args: [ + { + token0: position.pool.token0.address, + token1: position.pool.token1.address, + fee: position.pool.fee, + tickLower: position.tickLower, + tickUpper: position.tickUpper, + amount0Min, + amount1Min, + recipient: addLiquidityOptions.recipient + } + ] + }); + } + return viem.encodeFunctionData({ + abi: _ApproveAndCall.ABI, + functionName: "increaseLiquidity", + args: [ + { + token0: position.pool.token0.address, + token1: position.pool.token1.address, + amount0Min, + amount1Min, + tokenId: BigInt(addLiquidityOptions.tokenId) + } + ] + }); + } + static encodeApprove(token, approvalType) { + switch (approvalType) { + case 1 /* MAX */: + return _ApproveAndCall.encodeApproveMax(token.wrapped); + case 2 /* MAX_MINUS_ONE */: + return _ApproveAndCall.encodeApproveMaxMinusOne(token.wrapped); + case 3 /* ZERO_THEN_MAX */: + return _ApproveAndCall.encodeApproveZeroThenMax(token.wrapped); + case 4 /* ZERO_THEN_MAX_MINUS_ONE */: + return _ApproveAndCall.encodeApproveZeroThenMaxMinusOne(token.wrapped); + default: + throw new Error("Error: invalid ApprovalType"); + } + } +}; +var ApproveAndCall = _ApproveAndCall; +ApproveAndCall.ABI = approveAndCallAbi; + +// evm/abis/IMulticallExtended.ts +var multicallExtendedAbi = [ + { + inputs: [ + { + internalType: "bytes32", + name: "previousBlockhash", + type: "bytes32" + }, + { + internalType: "bytes[]", + name: "data", + type: "bytes[]" + } + ], + name: "multicall", + outputs: [ + { + internalType: "bytes[]", + name: "results", + type: "bytes[]" + } + ], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "uint256", + name: "deadline", + type: "uint256" + }, + { + internalType: "bytes[]", + name: "data", + type: "bytes[]" + } + ], + name: "multicall", + outputs: [ + { + internalType: "bytes[]", + name: "results", + type: "bytes[]" + } + ], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "bytes[]", + name: "data", + type: "bytes[]" + } + ], + name: "multicall", + outputs: [ + { + internalType: "bytes[]", + name: "results", + type: "bytes[]" + } + ], + stateMutability: "payable", + type: "function" + } +]; + +// evm/v3-router/utils/multicallExtended.ts +function validateAndParseBytes32(bytes32) { + if (!bytes32.match(/^0x[0-9a-fA-F]{64}$/)) { + throw new Error(`${bytes32} is not valid bytes32.`); + } + return bytes32.toLowerCase(); +} +var _MulticallExtended = class { + /** + * Cannot be constructed. + */ + // eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function + constructor() { + } + static encodeMulticall(calldatas, validation) { + if (typeof validation === "undefined") { + return v3Sdk.Multicall.encodeMulticall(calldatas); + } + if (!Array.isArray(calldatas)) { + calldatas = [calldatas]; + } + if (typeof validation === "string" && validation.startsWith("0x")) { + const previousBlockhash = validateAndParseBytes32(validation); + return viem.encodeFunctionData({ + abi: _MulticallExtended.ABI, + functionName: "multicall", + args: [previousBlockhash, calldatas] + }); + } + const deadline = BigInt(validation); + return viem.encodeFunctionData({ + abi: _MulticallExtended.ABI, + functionName: "multicall", + args: [deadline, calldatas] + }); + } +}; +var MulticallExtended = _MulticallExtended; +MulticallExtended.ABI = multicallExtendedAbi; + +// evm/abis/IPeripheryPaymentsWithFeeExtended.ts +var peripheryPaymentsWithFeeExtendedAbi = [ + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "pull", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [], + name: "refundETH", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address" + }, + { + internalType: "uint256", + name: "amountMinimum", + type: "uint256" + } + ], + name: "sweepToken", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address" + }, + { + internalType: "uint256", + name: "amountMinimum", + type: "uint256" + }, + { + internalType: "address", + name: "recipient", + type: "address" + } + ], + name: "sweepToken", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address" + }, + { + internalType: "uint256", + name: "amountMinimum", + type: "uint256" + }, + { + internalType: "uint256", + name: "feeBips", + type: "uint256" + }, + { + internalType: "address", + name: "feeRecipient", + type: "address" + } + ], + name: "sweepTokenWithFee", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address" + }, + { + internalType: "uint256", + name: "amountMinimum", + type: "uint256" + }, + { + internalType: "address", + name: "recipient", + type: "address" + }, + { + internalType: "uint256", + name: "feeBips", + type: "uint256" + }, + { + internalType: "address", + name: "feeRecipient", + type: "address" + } + ], + name: "sweepTokenWithFee", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountMinimum", + type: "uint256" + } + ], + name: "unwrapWETH9", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountMinimum", + type: "uint256" + }, + { + internalType: "address", + name: "recipient", + type: "address" + } + ], + name: "unwrapWETH9", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountMinimum", + type: "uint256" + }, + { + internalType: "uint256", + name: "feeBips", + type: "uint256" + }, + { + internalType: "address", + name: "feeRecipient", + type: "address" + } + ], + name: "unwrapWETH9WithFee", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountMinimum", + type: "uint256" + }, + { + internalType: "address", + name: "recipient", + type: "address" + }, + { + internalType: "uint256", + name: "feeBips", + type: "uint256" + }, + { + internalType: "address", + name: "feeRecipient", + type: "address" + } + ], + name: "unwrapWETH9WithFee", + outputs: [], + stateMutability: "payable", + type: "function" + }, + { + inputs: [ + { + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "wrapETH", + outputs: [], + stateMutability: "payable", + type: "function" + } +]; + +// evm/v3-router/utils/paymentsExtended.ts +function encodeFeeBips(fee) { + return fee.multiply(1e4).quotient; +} +var _PaymentsExtended = class { + /** + * Cannot be constructed. + */ + // eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function + constructor() { + } + static encodeUnwrapWETH9(amountMinimum, recipient, feeOptions) { + if (typeof recipient === "string") { + return v3Sdk.Payments.encodeUnwrapWETH9(amountMinimum, recipient, feeOptions); + } + if (!!feeOptions) { + const feeBips = encodeFeeBips(feeOptions.fee); + const feeRecipient = sdk.validateAndParseAddress(feeOptions.recipient); + return viem.encodeFunctionData({ + abi: _PaymentsExtended.ABI, + functionName: "unwrapWETH9WithFee", + args: [amountMinimum, feeBips, feeRecipient] + }); + } + return viem.encodeFunctionData({ + abi: _PaymentsExtended.ABI, + functionName: "unwrapWETH9", + args: [amountMinimum] + }); + } + static encodeSweepToken(token, amountMinimum, recipient, feeOptions) { + if (typeof recipient === "string") { + return v3Sdk.Payments.encodeSweepToken(token, amountMinimum, recipient, feeOptions); + } + if (!!feeOptions) { + const feeBips = encodeFeeBips(feeOptions.fee); + const feeRecipient = sdk.validateAndParseAddress(feeOptions.recipient); + return viem.encodeFunctionData({ + abi: _PaymentsExtended.ABI, + functionName: "sweepTokenWithFee", + args: [token.address, amountMinimum, feeBips, feeRecipient] + }); + } + return viem.encodeFunctionData({ + abi: _PaymentsExtended.ABI, + functionName: "sweepToken", + args: [token.address, amountMinimum] + }); + } + static encodePull(token, amount) { + return viem.encodeFunctionData({ abi: _PaymentsExtended.ABI, functionName: "pull", args: [token.address, amount] }); + } + static encodeWrapETH(amount) { + return viem.encodeFunctionData({ abi: _PaymentsExtended.ABI, functionName: "wrapETH", args: [amount] }); + } +}; +var PaymentsExtended = _PaymentsExtended; +PaymentsExtended.ABI = peripheryPaymentsWithFeeExtendedAbi; + +// evm/v3-router/utils/swapRouter.ts +var ZERO2 = 0n; +var REFUND_ETH_PRICE_IMPACT_THRESHOLD = new sdk.Percent(50n, 100n); +var _SwapRouter = class { + /** + * Cannot be constructed. + */ + // eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function + constructor() { + } + /** + * @notice Generates the calldata for a Swap with a V2 Route. + * @param trade The V2Trade to encode. + * @param options SwapOptions to use for the trade. + * @param routerMustCustody Flag for whether funds should be sent to the router + * @param performAggregatedSlippageCheck Flag for whether we want to perform an aggregated slippage check + * @returns A string array of calldatas for the trade. + */ + static encodeV2Swap(trade, options, routerMustCustody, performAggregatedSlippageCheck) { + const amountIn = maximumAmountIn(trade, options.slippageTolerance).quotient; + const amountOut = minimumAmountOut(trade, options.slippageTolerance).quotient; + const route = trade.routes[0]; + const path = route.path.map((token) => token.wrapped.address); + const recipient = routerMustCustody ? chunkZNSTBYLO_js.ADDRESS_THIS : typeof options.recipient === "undefined" ? chunkZNSTBYLO_js.MSG_SENDER : sdk.validateAndParseAddress(options.recipient); + if (trade.tradeType === sdk.TradeType.EXACT_INPUT) { + const exactInputParams = [amountIn, performAggregatedSlippageCheck ? 0n : amountOut, path, recipient]; + return viem.encodeFunctionData({ + abi: _SwapRouter.ABI, + functionName: "swapExactTokensForTokens", + args: exactInputParams + }); + } + const exactOutputParams = [amountOut, amountIn, path, recipient]; + return viem.encodeFunctionData({ + abi: _SwapRouter.ABI, + functionName: "swapTokensForExactTokens", + args: exactOutputParams + }); + } + /** + * @notice Generates the calldata for a Swap with a Stable Route. + * @param trade The Trade to encode. + * @param options SwapOptions to use for the trade. + * @param routerMustCustody Flag for whether funds should be sent to the router + * @param performAggregatedSlippageCheck Flag for whether we want to perform an aggregated slippage check + * @returns A string array of calldatas for the trade. + */ + static encodeStableSwap(trade, options, routerMustCustody, performAggregatedSlippageCheck) { + const amountIn = maximumAmountIn(trade, options.slippageTolerance).quotient; + const amountOut = minimumAmountOut(trade, options.slippageTolerance).quotient; + if (trade.routes.length > 1 || trade.routes[0].pools.some((p) => !isStablePool(p))) { + throw new Error("Unsupported trade to encode"); + } + const route = trade.routes[0]; + const path = route.path.map((token) => token.wrapped.address); + const flags = route.pools.map((p) => BigInt(p.balances.length)); + const recipient = routerMustCustody ? chunkZNSTBYLO_js.ADDRESS_THIS : typeof options.recipient === "undefined" ? chunkZNSTBYLO_js.MSG_SENDER : sdk.validateAndParseAddress(options.recipient); + if (trade.tradeType === sdk.TradeType.EXACT_INPUT) { + const exactInputParams = [ + path, + flags, + amountIn, + performAggregatedSlippageCheck ? 0n : amountOut, + recipient + ]; + return viem.encodeFunctionData({ + abi: _SwapRouter.ABI, + functionName: "exactInputStableSwap", + args: exactInputParams + }); + } + const exactOutputParams = [path, flags, amountOut, amountIn, recipient]; + return viem.encodeFunctionData({ + abi: _SwapRouter.ABI, + functionName: "exactOutputStableSwap", + args: exactOutputParams + }); + } + /** + * @notice Generates the calldata for a Swap with a V3 Route. + * @param trade The V3Trade to encode. + * @param options SwapOptions to use for the trade. + * @param routerMustCustody Flag for whether funds should be sent to the router + * @param performAggregatedSlippageCheck Flag for whether we want to perform an aggregated slippage check + * @returns A string array of calldatas for the trade. + */ + static encodeV3Swap(trade, options, routerMustCustody, performAggregatedSlippageCheck) { + const calldatas = []; + for (const route of trade.routes) { + const { inputAmount, outputAmount, pools, path } = route; + const amountIn = maximumAmountIn(trade, options.slippageTolerance, inputAmount).quotient; + const amountOut = minimumAmountOut(trade, options.slippageTolerance, outputAmount).quotient; + const singleHop = pools.length === 1; + const recipient = routerMustCustody ? chunkZNSTBYLO_js.ADDRESS_THIS : typeof options.recipient === "undefined" ? chunkZNSTBYLO_js.MSG_SENDER : sdk.validateAndParseAddress(options.recipient); + if (singleHop) { + if (trade.tradeType === sdk.TradeType.EXACT_INPUT) { + const exactInputSingleParams = { + tokenIn: path[0].wrapped.address, + tokenOut: path[1].wrapped.address, + fee: pools[0].fee, + recipient, + amountIn, + amountOutMinimum: performAggregatedSlippageCheck ? 0n : amountOut, + sqrtPriceLimitX96: 0n + }; + calldatas.push( + viem.encodeFunctionData({ + abi: _SwapRouter.ABI, + functionName: "exactInputSingle", + args: [exactInputSingleParams] + }) + ); + } else { + const exactOutputSingleParams = { + tokenIn: path[0].wrapped.address, + tokenOut: path[1].wrapped.address, + fee: pools[0].fee, + recipient, + amountOut, + amountInMaximum: amountIn, + sqrtPriceLimitX96: 0n + }; + calldatas.push( + viem.encodeFunctionData({ + abi: _SwapRouter.ABI, + functionName: "exactOutputSingle", + args: [exactOutputSingleParams] + }) + ); + } + } else { + const pathStr = encodeMixedRouteToPath( + { ...route, input: inputAmount.currency, output: outputAmount.currency }, + trade.tradeType === sdk.TradeType.EXACT_OUTPUT + ); + if (trade.tradeType === sdk.TradeType.EXACT_INPUT) { + const exactInputParams = { + path: pathStr, + recipient, + amountIn, + amountOutMinimum: performAggregatedSlippageCheck ? 0n : amountOut + }; + calldatas.push( + viem.encodeFunctionData({ + abi: _SwapRouter.ABI, + functionName: "exactInput", + args: [exactInputParams] + }) + ); + } else { + const exactOutputParams = { + path: pathStr, + recipient, + amountOut, + amountInMaximum: amountIn + }; + calldatas.push( + viem.encodeFunctionData({ + abi: _SwapRouter.ABI, + functionName: "exactOutput", + args: [exactOutputParams] + }) + ); + } + } + } + return calldatas; + } + /** + * @notice Generates the calldata for a MixedRouteSwap. Since single hop routes are not MixedRoutes, we will instead generate + * them via the existing encodeV3Swap and encodeV2Swap methods. + * @param trade The MixedRouteTrade to encode. + * @param options SwapOptions to use for the trade. + * @param routerMustCustody Flag for whether funds should be sent to the router + * @param performAggregatedSlippageCheck Flag for whether we want to perform an aggregated slippage check + * @returns A string array of calldatas for the trade. + */ + static encodeMixedRouteSwap(trade, options, routerMustCustody, performAggregatedSlippageCheck) { + let calldatas = []; + const isExactIn = trade.tradeType === sdk.TradeType.EXACT_INPUT; + for (const route of trade.routes) { + const { inputAmount, outputAmount, pools } = route; + const amountIn = maximumAmountIn(trade, options.slippageTolerance, inputAmount).quotient; + const amountOut = minimumAmountOut(trade, options.slippageTolerance, outputAmount).quotient; + const singleHop = pools.length === 1; + const recipient = routerMustCustody ? chunkZNSTBYLO_js.ADDRESS_THIS : typeof options.recipient === "undefined" ? chunkZNSTBYLO_js.MSG_SENDER : sdk.validateAndParseAddress(options.recipient); + const mixedRouteIsAllV3 = (r) => { + return r.pools.every(isV3Pool); + }; + const mixedRouteIsAllV2 = (r) => { + return r.pools.every(isV2Pool); + }; + const mixedRouteIsAllStable = (r) => { + return r.pools.every(isStablePool); + }; + if (singleHop) { + if (mixedRouteIsAllV3(route)) { + calldatas = [ + ...calldatas, + ..._SwapRouter.encodeV3Swap( + { + ...trade, + routes: [route], + inputAmount, + outputAmount + }, + options, + routerMustCustody, + performAggregatedSlippageCheck + ) + ]; + } else if (mixedRouteIsAllV2(route)) { + calldatas = [ + ...calldatas, + _SwapRouter.encodeV2Swap( + { + ...trade, + routes: [route], + inputAmount, + outputAmount + }, + options, + routerMustCustody, + performAggregatedSlippageCheck + ) + ]; + } else if (mixedRouteIsAllStable(route)) { + calldatas = [ + ...calldatas, + _SwapRouter.encodeStableSwap( + { + ...trade, + routes: [route], + inputAmount, + outputAmount + }, + options, + routerMustCustody, + performAggregatedSlippageCheck + ) + ]; + } else { + throw new Error("Unsupported route to encode"); + } + } else { + const sections = partitionMixedRouteByProtocol(route); + const isLastSectionInRoute = (i) => { + return i === sections.length - 1; + }; + let outputToken; + let inputToken = inputAmount.currency.wrapped; + for (let i = 0; i < sections.length; i++) { + const section = sections[i]; + outputToken = getOutputOfPools(section, inputToken); + const newRoute = buildBaseRoute([...section], inputToken, outputToken); + inputToken = outputToken.wrapped; + const lastSectionInRoute = isLastSectionInRoute(i); + const recipientAddress = lastSectionInRoute ? recipient : chunkZNSTBYLO_js.ADDRESS_THIS; + const inAmount = i === 0 ? amountIn : 0n; + const outAmount = !lastSectionInRoute ? 0n : amountOut; + if (mixedRouteIsAllV3(newRoute)) { + const pathStr = encodeMixedRouteToPath(newRoute, !isExactIn); + if (isExactIn) { + const exactInputParams = { + path: pathStr, + recipient: recipientAddress, + amountIn: inAmount, + amountOutMinimum: outAmount + }; + calldatas.push( + viem.encodeFunctionData({ + abi: _SwapRouter.ABI, + functionName: "exactInput", + args: [exactInputParams] + }) + ); + } else { + const exactOutputParams = { + path: pathStr, + recipient, + amountOut: outAmount, + amountInMaximum: inAmount + }; + calldatas.push( + viem.encodeFunctionData({ + abi: _SwapRouter.ABI, + functionName: "exactOutput", + args: [exactOutputParams] + }) + ); + } + } else if (mixedRouteIsAllV2(newRoute)) { + const path = newRoute.path.map((token) => token.wrapped.address); + if (isExactIn) { + const exactInputParams = [ + inAmount, + // amountIn + outAmount, + // amountOutMin + path, + // path + recipientAddress + // to + ]; + calldatas.push( + viem.encodeFunctionData({ + abi: _SwapRouter.ABI, + functionName: "swapExactTokensForTokens", + args: exactInputParams + }) + ); + } else { + const exactOutputParams = [outAmount, inAmount, path, recipientAddress]; + calldatas.push( + viem.encodeFunctionData({ + abi: _SwapRouter.ABI, + functionName: "swapTokensForExactTokens", + args: exactOutputParams + }) + ); + } + } else if (mixedRouteIsAllStable(newRoute)) { + const path = newRoute.path.map((token) => token.wrapped.address); + const flags = newRoute.pools.map((pool) => BigInt(pool.balances.length)); + if (isExactIn) { + const exactInputParams = [ + path, + // path + flags, + // stable pool types + inAmount, + // amountIn + outAmount, + // amountOutMin + recipientAddress + // to + ]; + calldatas.push( + viem.encodeFunctionData({ + abi: _SwapRouter.ABI, + functionName: "exactInputStableSwap", + args: exactInputParams + }) + ); + } else { + const exactOutputParams = [path, flags, outAmount, inAmount, recipientAddress]; + calldatas.push( + viem.encodeFunctionData({ + abi: _SwapRouter.ABI, + functionName: "exactOutputStableSwap", + args: exactOutputParams + }) + ); + } + } else { + throw new Error("Unsupported route"); + } + } + } + } + return calldatas; + } + static encodeSwaps(anyTrade, options, isSwapAndAdd) { + const trades = !Array.isArray(anyTrade) ? [anyTrade] : anyTrade; + const numberOfTrades = trades.reduce((numOfTrades, trade) => numOfTrades + trade.routes.length, 0); + const sampleTrade = trades[0]; + invariant6__default.default( + trades.every((trade) => trade.inputAmount.currency.equals(sampleTrade.inputAmount.currency)), + "TOKEN_IN_DIFF" + ); + invariant6__default.default( + trades.every((trade) => trade.outputAmount.currency.equals(sampleTrade.outputAmount.currency)), + "TOKEN_OUT_DIFF" + ); + invariant6__default.default( + trades.every((trade) => trade.tradeType === sampleTrade.tradeType), + "TRADE_TYPE_DIFF" + ); + const calldatas = []; + const inputIsNative = sampleTrade.inputAmount.currency.isNative; + const outputIsNative = sampleTrade.outputAmount.currency.isNative; + const performAggregatedSlippageCheck = sampleTrade.tradeType === sdk.TradeType.EXACT_INPUT && numberOfTrades > 2; + const routerMustCustody = outputIsNative || !!options.fee || !!isSwapAndAdd || performAggregatedSlippageCheck; + if (options.inputTokenPermit) { + invariant6__default.default(sampleTrade.inputAmount.currency.isToken, "NON_TOKEN_PERMIT"); + calldatas.push(v3Sdk.SelfPermit.encodePermit(sampleTrade.inputAmount.currency, options.inputTokenPermit)); + } + for (const trade of trades) { + if (trade.routes.length === 1 && trade.routes[0].type === 0 /* V2 */) { + calldatas.push(_SwapRouter.encodeV2Swap(trade, options, routerMustCustody, performAggregatedSlippageCheck)); + } else if (trade.routes.every((r) => r.type === 1 /* V3 */)) { + for (const calldata of _SwapRouter.encodeV3Swap( + trade, + options, + routerMustCustody, + performAggregatedSlippageCheck + )) { + calldatas.push(calldata); + } + } else { + for (const calldata of _SwapRouter.encodeMixedRouteSwap( + trade, + options, + routerMustCustody, + performAggregatedSlippageCheck + )) { + calldatas.push(calldata); + } + } + } + const ZERO_IN = sdk.CurrencyAmount.fromRawAmount(sampleTrade.inputAmount.currency, 0); + const ZERO_OUT = sdk.CurrencyAmount.fromRawAmount(sampleTrade.outputAmount.currency, 0); + const minAmountOut = trades.reduce( + (sum2, trade) => sum2.add(minimumAmountOut(trade, options.slippageTolerance)), + ZERO_OUT + ); + const quoteAmountOut = trades.reduce( + (sum2, trade) => sum2.add(trade.outputAmount), + ZERO_OUT + ); + const totalAmountIn = trades.reduce( + (sum2, trade) => sum2.add(maximumAmountIn(trade, options.slippageTolerance)), + ZERO_IN + ); + return { + calldatas, + sampleTrade, + routerMustCustody, + inputIsNative, + outputIsNative, + totalAmountIn, + minimumAmountOut: minAmountOut, + quoteAmountOut + }; + } + /** + * Produces the on-chain method name to call and the hex encoded parameters to pass as arguments for a given trade. + * @param trades to produce call parameters for + * @param options options for the call parameters + */ + static swapCallParameters(trades, options) { + const { + calldatas, + sampleTrade, + routerMustCustody, + inputIsNative, + outputIsNative, + totalAmountIn, + minimumAmountOut: minAmountOut + } = _SwapRouter.encodeSwaps(trades, options); + if (routerMustCustody) { + if (outputIsNative) { + calldatas.push(PaymentsExtended.encodeUnwrapWETH9(minAmountOut.quotient, options.recipient, options.fee)); + } else { + calldatas.push( + PaymentsExtended.encodeSweepToken( + sampleTrade.outputAmount.currency.wrapped, + minAmountOut.quotient, + options.recipient, + options.fee + ) + ); + } + } + if (inputIsNative && (sampleTrade.tradeType === sdk.TradeType.EXACT_OUTPUT || _SwapRouter.riskOfPartialFill(trades))) { + calldatas.push(v3Sdk.Payments.encodeRefundETH()); + } + return { + calldata: MulticallExtended.encodeMulticall(calldatas, options.deadlineOrPreviousBlockhash), + value: v3Sdk.toHex(inputIsNative ? totalAmountIn.quotient : ZERO2) + }; + } + /** + * Produces the on-chain method name to call and the hex encoded parameters to pass as arguments for a given trade. + * @param trades to produce call parameters for + * @param options options for the call parameters + */ + static swapAndAddCallParameters(trades, options, position, addLiquidityOptions, tokenInApprovalType, tokenOutApprovalType) { + const { + calldatas, + inputIsNative, + outputIsNative, + sampleTrade, + totalAmountIn: totalAmountSwapped, + quoteAmountOut, + minimumAmountOut: minAmountOut + } = _SwapRouter.encodeSwaps(trades, options, true); + if (options.outputTokenPermit) { + invariant6__default.default(quoteAmountOut.currency.isToken, "NON_TOKEN_PERMIT_OUTPUT"); + calldatas.push(v3Sdk.SelfPermit.encodePermit(quoteAmountOut.currency, options.outputTokenPermit)); + } + const { + inputAmount: { + currency: { chainId } + } + } = sampleTrade; + const zeroForOne = position.pool.token0.wrapped.address === totalAmountSwapped.currency.wrapped.address; + const { positionAmountIn, positionAmountOut } = _SwapRouter.getPositionAmounts(position, zeroForOne); + const wnative = sdk.WNATIVE[chainId]; + if ((inputIsNative || outputIsNative) && !wnative) { + throw new Error(`Chain ${chainId} has no wrapped native token; a native swap leg is not encodable`); + } + const tokenIn = inputIsNative && wnative ? wnative : positionAmountIn.currency.wrapped; + const tokenOut = outputIsNative && wnative ? wnative : positionAmountOut.currency.wrapped; + const amountOutRemaining = positionAmountOut.subtract(quoteAmountOut.wrapped); + if (amountOutRemaining.greaterThan(sdk.CurrencyAmount.fromRawAmount(positionAmountOut.currency, 0))) { + if (outputIsNative) { + calldatas.push(PaymentsExtended.encodeWrapETH(amountOutRemaining.quotient)); + } else { + calldatas.push(PaymentsExtended.encodePull(tokenOut, amountOutRemaining.quotient)); + } + } + if (inputIsNative) { + calldatas.push(PaymentsExtended.encodeWrapETH(positionAmountIn.quotient)); + } else { + calldatas.push(PaymentsExtended.encodePull(tokenIn, positionAmountIn.quotient)); + } + if (tokenInApprovalType !== 0 /* NOT_REQUIRED */) + calldatas.push(ApproveAndCall.encodeApprove(tokenIn, tokenInApprovalType)); + if (tokenOutApprovalType !== 0 /* NOT_REQUIRED */) + calldatas.push(ApproveAndCall.encodeApprove(tokenOut, tokenOutApprovalType)); + const minimalPosition = v3Sdk.Position.fromAmounts({ + pool: position.pool, + tickLower: position.tickLower, + tickUpper: position.tickUpper, + amount0: zeroForOne ? position.amount0.quotient.toString() : minAmountOut.quotient.toString(), + amount1: zeroForOne ? minAmountOut.quotient.toString() : position.amount1.quotient.toString(), + useFullPrecision: false + }); + calldatas.push( + ApproveAndCall.encodeAddLiquidity(position, minimalPosition, addLiquidityOptions, options.slippageTolerance) + ); + if (inputIsNative) { + calldatas.push(PaymentsExtended.encodeUnwrapWETH9(ZERO2)); + } else { + calldatas.push(PaymentsExtended.encodeSweepToken(tokenIn, ZERO2)); + } + if (outputIsNative) { + calldatas.push(PaymentsExtended.encodeUnwrapWETH9(ZERO2)); + } else { + calldatas.push(PaymentsExtended.encodeSweepToken(tokenOut, ZERO2)); + } + let value; + if (inputIsNative) { + value = totalAmountSwapped.wrapped.add(positionAmountIn.wrapped).quotient; + } else if (outputIsNative) { + value = amountOutRemaining.quotient; + } else { + value = ZERO2; + } + return { + calldata: MulticallExtended.encodeMulticall(calldatas, options.deadlineOrPreviousBlockhash), + value: v3Sdk.toHex(value.toString()) + }; + } + // if price impact is very high, there's a chance of hitting max/min prices resulting in a partial fill of the swap + static riskOfPartialFill(trades) { + if (Array.isArray(trades)) { + return trades.some((trade) => { + return _SwapRouter.v3TradeWithHighPriceImpact(trade); + }); + } + return _SwapRouter.v3TradeWithHighPriceImpact(trades); + } + static v3TradeWithHighPriceImpact(trade) { + return !(trade.routes.length === 1 && trade.routes[0].type === 0 /* V2 */) && getPriceImpact(trade).greaterThan(REFUND_ETH_PRICE_IMPACT_THRESHOLD); + } + static getPositionAmounts(position, zeroForOne) { + const { amount0, amount1 } = position.mintAmounts; + const currencyAmount0 = sdk.CurrencyAmount.fromRawAmount(position.pool.token0, amount0); + const currencyAmount1 = sdk.CurrencyAmount.fromRawAmount(position.pool.token1, amount1); + const [positionAmountIn, positionAmountOut] = zeroForOne ? [currencyAmount0, currencyAmount1] : [currencyAmount1, currencyAmount0]; + return { positionAmountIn, positionAmountOut }; + } +}; +var SwapRouter = _SwapRouter; +SwapRouter.ABI = swapRouter02Abi; + +// evm/v3-router/utils/transformer.ts +var transformer_exports = {}; +chunkZNSTBYLO_js.__export(transformer_exports, { + parseBinPoolBinReserves: () => parseBinPoolBinReserves, + parseCurrency: () => parseCurrency, + parseCurrencyAmount: () => parseCurrencyAmount, + parsePool: () => parsePool, + parseRoute: () => parseRoute, + parseTick: () => parseTick, + parseTrade: () => parseTrade, + serializeBinPoolBinReserves: () => serializeBinPoolBinReserves, + serializeCurrency: () => serializeCurrency, + serializeCurrencyAmount: () => serializeCurrencyAmount, + serializePool: () => serializePool, + serializeRoute: () => serializeRoute, + serializeTick: () => serializeTick, + serializeTrade: () => serializeTrade +}); +var ONE_HUNDRED = 100n; +function serializeCurrency(currency) { + return { + address: currency.isNative ? v3Sdk.ADDRESS_ZERO : currency.wrapped.address, + decimals: currency.decimals, + symbol: currency.symbol + }; +} +function serializeCurrencyAmount(amount) { + return { + currency: serializeCurrency(amount.currency), + value: amount.quotient.toString() + }; +} +function serializeTick(tick) { + return { + index: tick.index, + liquidityNet: String(tick.liquidityNet), + liquidityGross: String(tick.liquidityGross) + }; +} +function serializePool(pool) { + if (isV2Pool(pool)) { + return { + ...pool, + reserve0: serializeCurrencyAmount(pool.reserve0), + reserve1: serializeCurrencyAmount(pool.reserve1) + }; + } + if (isV3Pool(pool)) { + return { + ...pool, + token0: serializeCurrency(pool.token0), + token1: serializeCurrency(pool.token1), + liquidity: pool.liquidity.toString(), + sqrtRatioX96: pool.sqrtRatioX96.toString(), + token0ProtocolFee: pool.token0ProtocolFee.toFixed(0), + token1ProtocolFee: pool.token1ProtocolFee.toFixed(0), + ticks: pool.ticks?.map(serializeTick), + reserve0: pool.reserve0 && serializeCurrencyAmount(pool.reserve0), + reserve1: pool.reserve1 && serializeCurrencyAmount(pool.reserve1) + }; + } + if (isStablePool(pool)) { + return { + ...pool, + balances: pool.balances.map(serializeCurrencyAmount), + amplifier: pool.amplifier.toString(), + fee: pool.fee.toSignificant(6) + }; + } + if (isInfinityStablePool(pool)) { + return { + currency0: serializeCurrency(pool.currency0), + currency1: serializeCurrency(pool.currency1), + hooks: pool.hooks, + hooksRegistrationBitmap: pool.hooksRegistrationBitmap, + id: pool.id, + poolManager: pool.poolManager, + fee: pool.fee, + amplifier: pool.amplifier || 0, + stableFee: pool.stableFee, + type: 5 /* InfinityStable */, + tickSpacing: pool.tickSpacing, + reserve0: pool.reserve0 && serializeCurrencyAmount(pool.reserve0), + reserve1: pool.reserve1 && serializeCurrencyAmount(pool.reserve1) + }; + } + if (isInfinityClPool(pool)) { + return { + ...pool, + currency0: serializeCurrency(pool.currency0), + currency1: serializeCurrency(pool.currency1), + liquidity: pool.liquidity.toString(), + sqrtRatioX96: pool.sqrtRatioX96.toString(), + ticks: pool.ticks?.map(serializeTick), + reserve0: pool.reserve0 && serializeCurrencyAmount(pool.reserve0), + reserve1: pool.reserve1 && serializeCurrencyAmount(pool.reserve1) + }; + } + if (isInfinityBinPool(pool)) { + return { + ...pool, + reserveOfBin: serializeBinPoolBinReserves(pool.reserveOfBin), + currency0: serializeCurrency(pool.currency0), + currency1: serializeCurrency(pool.currency1), + reserve0: pool.reserve0 && serializeCurrencyAmount(pool.reserve0), + reserve1: pool.reserve1 && serializeCurrencyAmount(pool.reserve1) + }; + } + throw new Error("Cannot serialize unsupoorted pool"); +} +function serializeBinPoolBinReserves(reserveOfBin) { + if (!reserveOfBin) + return void 0; + const binIds = Object.keys(reserveOfBin); + const binReserves = {}; + for (const b of binIds) { + const binId = Number(b); + binReserves[binId] = { + reserveX: String(reserveOfBin[binId].reserveX), + reserveY: String(reserveOfBin[binId].reserveY) + }; + } + return binReserves; +} +function parseBinPoolBinReserves(reserveOfBin) { + if (!reserveOfBin) + return void 0; + const binIds = Object.keys(reserveOfBin); + const binReserves = {}; + for (const b of binIds) { + const binId = Number(b); + binReserves[binId] = { + reserveX: BigInt(reserveOfBin[binId].reserveX), + reserveY: BigInt(reserveOfBin[binId].reserveY) + }; + } + return binReserves; +} +function serializeRoute(route) { + return { + ...route, + pools: route.pools.map(serializePool), + path: route.path.map(serializeCurrency), + inputAmount: serializeCurrencyAmount(route.inputAmount), + outputAmount: serializeCurrencyAmount(route.outputAmount) + }; +} +function serializeTrade(trade) { + return { + ...trade, + inputAmount: serializeCurrencyAmount(trade.inputAmount), + outputAmount: serializeCurrencyAmount(trade.outputAmount), + routes: trade.routes.map(serializeRoute), + gasEstimate: trade.gasEstimate.toString(), + gasEstimateInUSD: trade.gasEstimateInUSD && serializeCurrencyAmount(trade.gasEstimateInUSD) + }; +} +function parseTick(tick) { + return new v3Sdk.Tick(tick); +} +function parseCurrency(chainId, currency) { + if (currency.address === v3Sdk.ADDRESS_ZERO) { + return sdk.Native.onChain(chainId); + } + const { address, decimals, symbol } = currency; + return new sdk.ERC20Token(chainId, address, decimals, symbol); +} +function parseCurrencyAmount(chainId, amount) { + return sdk.CurrencyAmount.fromRawAmount(parseCurrency(chainId, amount.currency), amount.value); +} +function parsePool(chainId, pool) { + if (pool.type === 0 /* V2 */) { + return { + ...pool, + reserve0: parseCurrencyAmount(chainId, pool.reserve0), + reserve1: parseCurrencyAmount(chainId, pool.reserve1) + }; + } + if (pool.type === 1 /* V3 */) { + return { + ...pool, + token0: parseCurrency(chainId, pool.token0), + token1: parseCurrency(chainId, pool.token1), + liquidity: BigInt(pool.liquidity), + sqrtRatioX96: BigInt(pool.sqrtRatioX96), + token0ProtocolFee: new sdk.Percent(pool.token0ProtocolFee, ONE_HUNDRED), + token1ProtocolFee: new sdk.Percent(pool.token1ProtocolFee, ONE_HUNDRED), + ticks: pool.ticks?.map(parseTick), + reserve0: pool.reserve0 && parseCurrencyAmount(chainId, pool.reserve0), + reserve1: pool.reserve1 && parseCurrencyAmount(chainId, pool.reserve1) + }; + } + if (pool.type === 2 /* STABLE */) { + return { + ...pool, + balances: pool.balances.map((b) => parseCurrencyAmount(chainId, b)), + amplifier: BigInt(pool.amplifier), + fee: new sdk.Percent(parseFloat(pool.fee) * 1e6, ONE_HUNDRED * 1000000n) + }; + } + if (pool.type === 5 /* InfinityStable */) { + return { + ...pool, + currency0: parseCurrency(chainId, pool.currency0), + currency1: parseCurrency(chainId, pool.currency1), + reserve0: pool.reserve0 && parseCurrencyAmount(chainId, pool.reserve0), + reserve1: pool.reserve1 && parseCurrencyAmount(chainId, pool.reserve1) + }; + } + if (pool.type === 3 /* InfinityCL */) { + return { + ...pool, + currency0: parseCurrency(chainId, pool.currency0), + currency1: parseCurrency(chainId, pool.currency1), + liquidity: BigInt(pool.liquidity), + sqrtRatioX96: BigInt(pool.sqrtRatioX96), + ticks: pool.ticks?.map(parseTick), + reserve0: pool.reserve0 && parseCurrencyAmount(chainId, pool.reserve0), + reserve1: pool.reserve1 && parseCurrencyAmount(chainId, pool.reserve1) + }; + } + if (pool.type === 4 /* InfinityBIN */) { + return { + ...pool, + reserveOfBin: parseBinPoolBinReserves(pool.reserveOfBin), + currency0: parseCurrency(chainId, pool.currency0), + currency1: parseCurrency(chainId, pool.currency1), + reserve0: pool.reserve0 && parseCurrencyAmount(chainId, pool.reserve0), + reserve1: pool.reserve1 && parseCurrencyAmount(chainId, pool.reserve1) + }; + } + throw new Error("Cannot parse unsupoorted pool"); +} +function parseRoute(chainId, route) { + return { + ...route, + pools: route.pools.map((p) => parsePool(chainId, p)), + path: route.path.map((c) => parseCurrency(chainId, c)), + inputAmount: parseCurrencyAmount(chainId, route.inputAmount), + outputAmount: parseCurrencyAmount(chainId, route.outputAmount) + }; +} +function parseTrade(chainId, trade) { + return { + ...trade, + inputAmount: parseCurrencyAmount(chainId, trade.inputAmount), + outputAmount: parseCurrencyAmount(chainId, trade.outputAmount), + routes: trade.routes.map((r) => parseRoute(chainId, r)), + gasEstimate: trade.gasEstimate ? BigInt(trade.gasEstimate) : 0n, + gasEstimateInUSD: trade.gasEstimateInUSD && parseCurrencyAmount(chainId, trade.gasEstimateInUSD) + }; +} +var fetchConfig = memoize( + async () => { + const url = `https://proofs.pancakeswap.com/cms-config/routing-base-config.json`; + try { + const response = await fetch(url); + const data = await response.json(); + const table = {}; + Object.keys(data).forEach((key) => { + const chainId = Number(key); + table[chainId] = {}; + for (const [address, list] of Object.entries(data[key])) { + const src = viem.checksumAddress(address); + const to = list.map((item) => { + return new swapSdkCore.Token(chainId, viem.checksumAddress(item.address), item.decimals, item.symbol, ""); + }); + table[chainId][src] = to; + } + }); + return table; + } catch { + return chunkZNSTBYLO_js.ADDITIONAL_BASES; + } + }, + () => { + return Math.floor(Date.now() / 601e3); + } +); +async function getAdditionalBases(chainId) { + if (!chainId) { + return {}; + } + const table = await fetchConfig(); + return table[chainId] ?? {}; +} + +// evm/v3-router/functions/getPairCombinations.ts +var resolver = (currencyA, currencyB) => { + if (!currencyA || !currencyB || currencyA.chainId !== currencyB.chainId || currencyA.wrapped.equals(currencyB.wrapped)) { + return `${currencyA?.chainId}_${currencyA?.wrapped?.address}_${currencyB?.wrapped?.address}`; + } + const [token0, token1] = currencyA.wrapped.sortsBefore(currencyB.wrapped) ? [currencyA.wrapped, currencyB.wrapped] : [currencyB.wrapped, currencyA.wrapped]; + return `${token0.chainId}_${token0.address}_${token1.address}`; +}; +async function getAdditionalCheckAgainstBaseTokens(currencyA, currencyB) { + const chainId = currencyA?.chainId; + const additionalBases = await getAdditionalBases(chainId); + const uniq = (tokens) => uniqBy(tokens, (t) => t.address); + const additionalA = currencyA && chainId ? uniq([...additionalBases[currencyA.wrapped.address] || []]) : []; + const additionalB = currencyB && chainId ? uniq([...additionalBases[currencyB.wrapped.address] || []]) : []; + return [...additionalA, ...additionalB]; +} +var getCheckAgainstBaseTokens = memoize( + async (currencyA, currencyB) => { + const chainId = currencyA?.chainId; + if (!chainId || !currencyA || !currencyB || !isCurrenciesSameChain(currencyA, currencyB)) { + return []; + } + const [tokenA, tokenB] = chainId ? [chunkZNSTBYLO_js.wrappedCurrency(currencyA, chainId), chunkZNSTBYLO_js.wrappedCurrency(currencyB, chainId)] : [void 0, void 0]; + if (!tokenA || !tokenB) { + return []; + } + const common = chunkZNSTBYLO_js.BASES_TO_CHECK_TRADES_AGAINST[chainId] ?? []; + return [...common, ...await getAdditionalCheckAgainstBaseTokens(currencyA, currencyB)]; + }, + resolver +); +var getPairCombinations = memoize( + async (currencyA, currencyB) => { + const chainId = currencyA?.chainId; + if (!chainId || !currencyA || !currencyB || !isCurrenciesSameChain(currencyA, currencyB)) { + return []; + } + const [tokenA, tokenB] = chainId ? [chunkZNSTBYLO_js.wrappedCurrency(currencyA, chainId), chunkZNSTBYLO_js.wrappedCurrency(currencyB, chainId)] : [void 0, void 0]; + if (!tokenA || !tokenB) { + return []; + } + const bases = await getCheckAgainstBaseTokens(currencyA, currencyB); + const basePairs = bases.flatMap( + (base) => bases.map((otherBase) => [base, otherBase]) + ); + return [ + // the direct pair + [tokenA, tokenB], + // token A against all bases + ...bases.map((base) => [tokenA, base]), + // token B against all bases + ...bases.map((base) => [tokenB, base]), + // each base against all bases + ...basePairs + ].filter((tokens) => Boolean(tokens[0] && tokens[1])).filter(([t0, t1]) => !t0.equals(t1)).filter(([tokenA_, tokenB_]) => { + if (!chainId) + return true; + const customBases = chunkZNSTBYLO_js.CUSTOM_BASES[chainId]; + const customBasesA = customBases?.[tokenA_.wrapped.address]; + const customBasesB = customBases?.[tokenB_.wrapped.address]; + if (!customBasesA && !customBasesB) + return true; + if (customBasesA && !customBasesA.find((base) => tokenB_.equals(base))) + return false; + if (customBasesB && !customBasesB.find((base) => tokenA_.equals(base))) + return false; + return true; + }); + }, + resolver +); + +// ../utils/RemoteLogger.ts +var ENABLED = process.env.NODE_ENV === "development"; +var _RemoteLogger = class { + constructor(_id) { + this.logs = []; + this.id = ""; + this.createTime = (/* @__PURE__ */ new Date()).getTime(); + this.id = _id; + } + debug(log4, indent = 0) { + if (ENABLED && this.id !== "__dummy__") { + const indentStr = " ".repeat(indent); + this.logs.push(`${indentStr}${log4}`); + } + } + metric(log4, indent = 0) { + if (ENABLED && this.id !== "__dummy__") { + const indentStr = " ".repeat(indent); + const time = (/* @__PURE__ */ new Date()).getTime() - this.createTime; + this.logs.push(`[${time}ms]${indentStr}${log4}`); + } + } + debugJson(obj, indent = 0) { + if (ENABLED && this.id !== "__dummy__") { + try { + const str = JSON.stringify(obj, (_, value) => typeof value === "bigint" ? value.toString() : value, 2); + const lines = str.split("\n"); + const indentStr = " ".repeat(indent); + const logs = lines.map((line) => `${indentStr}${line}`); + this.logs.push(...logs); + } catch (e) { + this.logs.push(`Error in json, ${e}`); + } + } + } + async flush() { + if (ENABLED && this.id !== "__dummy__") { + try { + const origin = self.origin || window.location.origin; + await fetch(`${origin}/api/logger`, { + method: "POST", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify({ + id: this.id, + logs: this.logs + }) + }); + } catch (ex) { + } + } + } + static getLogger(id) { + if (!id) { + return new _RemoteLogger("__dummy__"); + } + if (!_RemoteLogger.__loggers.has(id)) { + _RemoteLogger.__loggers.set(id, new _RemoteLogger(id)); + } + return _RemoteLogger.__loggers.get(id); + } + static generateUniqId(topic) { + const t = (/* @__PURE__ */ new Date()).getTime(); + const rnd = Math.floor(Math.random() * 1e6); + return `${topic}-${t}-${rnd}`; + } +}; +var RemoteLogger = _RemoteLogger; +RemoteLogger.__loggers = /* @__PURE__ */ new Map(); +var logPools = (quoteId, pools, indent = 1) => { + const logger3 = RemoteLogger.getLogger(quoteId); + for (const pool of pools) { + logger3.debug(poolInfoStr(pool), indent); + } +}; +var poolInfoStr = (pool) => { + switch (pool.type) { + case 1 /* V3 */: + return `[V3] id=${pool.address}, ${pool.token0.symbol}/${pool.token1.symbol}`; + case 0 /* V2 */: { + const id = sdk.Pair.getAddress(pool.reserve0.currency.wrapped, pool.reserve1.currency.wrapped); + return `[V2] id=${id}, ${pool.reserve0.currency.symbol}/${pool.reserve1.currency.symbol}`; + } + case 2 /* STABLE */: + return `[Stable] id=${pool.address}, ${pool.balances[0].currency.symbol}/${pool.balances[1].currency.symbol}`; + case 4 /* InfinityBIN */: + return `[InfinityBIN] id=${pool.id}, ${pool.currency0.symbol}/${pool.currency1.symbol}`; + case 3 /* InfinityCL */: + return `[InfinityCL] id=${pool.id}, ${pool.currency0.symbol}/${pool.currency1.symbol}`; + case 5 /* InfinityStable */: + return `[InfinityStable] id=${pool.id}, ${pool.currency0.symbol}/${pool.currency1.symbol}`; + default: + throw new Error("[poolInfoStr]: Unknown pool type"); + } +}; +var logRoutes = (quoteId, routes, indent = 1) => { + for (const [i, route] of Object.entries(routes)) { + const logger3 = RemoteLogger.getLogger(quoteId); + const { type, pools, input, output } = route; + logger3.debug(`- #${i} ${RouteType[type]}, pools=${pools.length}, ${input.symbol}/${output.symbol}`, indent); + logPools(quoteId, pools, indent + 1); + } +}; + +// evm/v3-router/functions/getBestRouteCombinationByQuotes.ts +function getBestRouteCombinationByQuotes(amount, quoteCurrency, routesWithQuote, tradeType, config, quoteId) { + const logger3 = RemoteLogger.getLogger(quoteId); + const chainId = amount.currency.chainId; + const percents = []; + const percentToQuotes = {}; + for (const routeWithQuote of routesWithQuote) { + if (!percentToQuotes[routeWithQuote.percent]) { + percentToQuotes[routeWithQuote.percent] = []; + percents.push(routeWithQuote.percent); + } + percentToQuotes[routeWithQuote.percent].push(routeWithQuote); + } + logger3.debug("--- percentToQuotes ---"); + logger3.debugJson( + Object.fromEntries( + Object.entries(percentToQuotes).map(([key, value]) => [ + key, + value.map((y) => ({ + pools: y.pools.map((pool) => poolInfoStr(pool)), + quoteAdjustedForGas: y.quoteAdjustedForGas.info() + })) + ]) + ), + 2 + ); + logger3.debug("--- END percentToQuotes ---"); + const swapRoute = getBestSwapRouteBy( + tradeType, + percentToQuotes, + percents.sort((a, b) => a - b), + chainId, + (rq) => rq.quoteAdjustedForGas, + config, + quoteId + ); + if (!swapRoute) { + logger3.debug(`Could not find a valid swap route`); + return null; + } + const { routes: routeAmounts } = swapRoute; + const totalAmount = routeAmounts.reduce( + (total, routeAmount) => total.add(routeAmount.amount), + sdk.CurrencyAmount.fromRawAmount(routeAmounts[0].amount.currency, 0) + ); + const missingAmount = amount.subtract(totalAmount); + if (missingAmount.greaterThan(0)) { + logger3.debug( + `Optimal route's amounts did not equal exactIn/exactOut total. Adding missing amount to last route in array. missingAmount=${missingAmount.quotient.toString()}` + ); + routeAmounts[routeAmounts.length - 1].amount = routeAmounts[routeAmounts.length - 1].amount.add(missingAmount); + } + logger3.debug(`Found best swap route. ${routeAmounts.length} split.`); + const _log = { + routes: routeAmounts, + numSplits: routeAmounts.length, + amount: amount.toExact(), + quote: swapRoute.quote.toExact(), + quoteGasAdjusted: swapRoute.quoteGasAdjusted.toFixed(Math.min(swapRoute.quoteGasAdjusted.currency.decimals, 2)), + estimatedGasUSD: swapRoute.estimatedGasUsedUSD.toFixed( + Math.min(swapRoute.estimatedGasUsedUSD.currency.decimals, 2) + ), + estimatedGasToken: swapRoute.estimatedGasUsedQuoteToken.toFixed( + Math.min(swapRoute.estimatedGasUsedQuoteToken.currency.decimals, 2) + ) + }; + logger3.debugJson(_log); + const { routes, quote: quoteAmount, estimatedGasUsed, estimatedGasUsedUSD } = swapRoute; + const quote = sdk.CurrencyAmount.fromRawAmount(quoteCurrency, quoteAmount.quotient); + const isExactIn = tradeType === sdk.TradeType.EXACT_INPUT; + return { + routes: routes.map(({ type, amount: routeAmount, quote: routeQuoteAmount, pools, path, percent }) => { + const routeQuote = sdk.CurrencyAmount.fromRawAmount(quoteCurrency, routeQuoteAmount.quotient); + return { + percent, + type, + pools, + path, + inputAmount: isExactIn ? routeAmount : routeQuote, + outputAmount: isExactIn ? routeQuote : routeAmount + }; + }), + gasEstimate: estimatedGasUsed, + gasEstimateInUSD: estimatedGasUsedUSD, + inputAmount: isExactIn ? amount : quote, + outputAmount: isExactIn ? quote : amount + }; +} +function getBestSwapRouteBy(tradeType, percentToQuotes, percents, chainId, by, { maxSplits = 4, minSplits = 0 }, quoteId) { + const logger3 = RemoteLogger.getLogger(quoteId); + const percentToSortedQuotes = Object.fromEntries( + Object.entries(percentToQuotes).map(([percent, routeQuotes]) => { + const sorted = routeQuotes.sort((routeQuoteA, routeQuoteB) => { + if (tradeType === sdk.TradeType.EXACT_INPUT) { + return by(routeQuoteA).greaterThan(by(routeQuoteB)) ? -1 : 1; + } + return by(routeQuoteA).lessThan(by(routeQuoteB)) ? -1 : 1; + }); + return [percent, sorted]; + }) + ); + const quoteCompFn = tradeType === sdk.TradeType.EXACT_INPUT ? (a, b) => a.greaterThan(b) : (a, b) => a.lessThan(b); + const sumFn = (currencyAmounts) => { + let sum2 = currencyAmounts[0]; + for (let i = 1; i < currencyAmounts.length; i++) { + sum2 = sum2.add(currencyAmounts[i]); + } + return sum2; + }; + let bestQuote; + let bestSwap; + const bestSwapsPerSplit = new FixedReverseHeap__default.default( + Array, + (a, b) => { + return quoteCompFn(a.quote, b.quote) ? -1 : 1; + }, + 3 + ); + if (!percentToSortedQuotes[100] || minSplits > 1) { + logger3.debug(`Did not find a valid route without any splits. Continuing search anyway`); + } else { + bestQuote = by(percentToSortedQuotes[100][0]); + bestSwap = [percentToSortedQuotes[100][0]]; + logger3.debug("---bestQuote---"); + logger3.debugJson(bestQuote, 3); + logger3.debug("---bestSwap---"); + logger3.debugJson(bestSwap, 3); + for (const routeWithQuote of percentToSortedQuotes[100].slice(0, 5)) { + bestSwapsPerSplit.push({ + quote: by(routeWithQuote), + routes: [routeWithQuote] + }); + } + } + logger3.debug("--- start BFS ---"); + const queue = new Queue__default.default(); + for (let i = percents.length; i >= 0; i--) { + const percent = percents[i]; + if (!percentToSortedQuotes[percent]) { + continue; + } + queue.enqueue({ + curRoutes: [percentToSortedQuotes[percent][0]], + percentIndex: i, + remainingPercent: 100 - percent, + special: false + }); + if (!percentToSortedQuotes[percent] || !percentToSortedQuotes[percent][1]) { + continue; + } + queue.enqueue({ + curRoutes: [percentToSortedQuotes[percent][1]], + percentIndex: i, + remainingPercent: 100 - percent, + special: true + }); + } + let splits = 1; + while (queue.size > 0) { + logger3.debug(`bfs loop: queue.size=${queue.size}, splits=${splits}`, 2); + logger3.debugJson( + { + top3: Array.from(bestSwapsPerSplit.consume()).map( + (q) => `${q.quote.toExact()} (${q.routes.map( + (r) => `${r.percent}% ${r.amount.toExact()} ${r.pools.map((p) => { + if (isV2Pool(p)) { + return `V2 ${p.reserve0.currency.symbol}-${p.reserve1.currency.symbol}`; + } + if (isV3Pool(p)) { + return `V3 fee ${p.fee} ${p.token0.symbol}-${p.token1.symbol}`; + } + if (isStablePool(p)) { + return `Stable ${p.balances.map((b) => b.currency).join("-")}`; + } + return `Unsupported pool ${p}`; + }).join(", ")} ${r.quote.toExact()}` + ).join(", ")})` + ), + onQueue: queue.size + }, + 2 + ); + bestSwapsPerSplit.clear(); + let layer = queue.size; + splits++; + if (splits >= 3 && bestSwap && bestSwap.length < splits - 1) { + break; + } + if (splits > maxSplits) { + logger3.debug(`Max splits ${maxSplits} reached. Stopping search.`); + break; + } + while (layer > 0) { + layer--; + const { remainingPercent, curRoutes, percentIndex, special } = queue.dequeue(); + logger3.debug(`dequeue remainingPercent=${remainingPercent}%, percentIndex=${percentIndex}`, 3); + logger3.debug(routesStr(curRoutes), 3); + for (let i = percentIndex; i >= 0; i--) { + const percentA = percents[i]; + if (percentA > remainingPercent) { + continue; + } + if (!percentToSortedQuotes[percentA]) { + continue; + } + const candidateRoutesA = percentToSortedQuotes[percentA]; + const routeWithQuoteA = findFirstRouteNotUsingUsedPools(curRoutes, candidateRoutesA); + if (!routeWithQuoteA) { + continue; + } + const remainingPercentNew = remainingPercent - percentA; + const curRoutesNew = [...curRoutes, routeWithQuoteA]; + if (remainingPercentNew === 0 && splits >= minSplits) { + const quotesNew = curRoutesNew.map((r) => by(r)); + const quoteNew = sumFn(quotesNew); + const gasCostL1QuoteToken2 = sdk.CurrencyAmount.fromRawAmount(quoteNew.currency, 0); + const quoteAfterL1Adjust = tradeType === sdk.TradeType.EXACT_INPUT ? quoteNew.subtract(gasCostL1QuoteToken2) : quoteNew.add(gasCostL1QuoteToken2); + bestSwapsPerSplit.push({ + quote: quoteAfterL1Adjust, + routes: curRoutesNew + }); + if (!bestQuote || quoteCompFn(quoteAfterL1Adjust, bestQuote)) { + bestQuote = quoteAfterL1Adjust; + bestSwap = curRoutesNew; + } + } else { + queue.enqueue({ + curRoutes: curRoutesNew, + remainingPercent: remainingPercentNew, + percentIndex: i, + special + }); + } + } + } + } + if (!bestSwap) { + logger3.debug(`Could not find a valid swap`); + return null; + } + let quoteGasAdjusted = sumFn(bestSwap.map((routeWithValidQuote) => routeWithValidQuote.quoteAdjustedForGas)); + const estimatedGasUsed = bestSwap.map((routeWithValidQuote) => routeWithValidQuote.gasEstimate).reduce((sum2, routeWithValidQuote) => sum2 + routeWithValidQuote, 0n); + if (!chunkZNSTBYLO_js.usdGasTokensByChain[chainId] || !chunkZNSTBYLO_js.usdGasTokensByChain[chainId][0]) { + throw new Error(`Could not find a USD token for computing gas costs on ${chainId}`); + } + const usdToken = chunkZNSTBYLO_js.usdGasTokensByChain[chainId][0]; + const usdTokenDecimals = usdToken.decimals; + const gasCostsL1ToL2 = { + gasUsedL1: 0n, + gasCostL1USD: sdk.CurrencyAmount.fromRawAmount(usdToken, 0), + gasCostL1QuoteToken: sdk.CurrencyAmount.fromRawAmount( + // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain + bestSwap[0]?.quote.currency, + 0 + ) + }; + const { gasCostL1USD, gasCostL1QuoteToken } = gasCostsL1ToL2; + const estimatedGasUsedUSDs = bestSwap.map((routeWithValidQuote) => { + const decimalsDiff = usdTokenDecimals - routeWithValidQuote.gasCostInUSD.currency.decimals; + if (decimalsDiff === 0) { + return sdk.CurrencyAmount.fromRawAmount(usdToken, routeWithValidQuote.gasCostInUSD.quotient); + } + return sdk.CurrencyAmount.fromRawAmount( + usdToken, + routeWithValidQuote.gasCostInUSD.quotient * 10n ** BigInt(decimalsDiff) + ); + }); + let estimatedGasUsedUSD = sumFn(estimatedGasUsedUSDs); + if (!estimatedGasUsedUSD.currency.equals(gasCostL1USD.currency)) { + const decimalsDiff = usdTokenDecimals - gasCostL1USD.currency.decimals; + estimatedGasUsedUSD = estimatedGasUsedUSD.add( + sdk.CurrencyAmount.fromRawAmount(usdToken, gasCostL1USD.quotient * 10n ** BigInt(decimalsDiff)) + ); + } else { + estimatedGasUsedUSD = estimatedGasUsedUSD.add(gasCostL1USD); + } + const estimatedGasUsedQuoteToken = sumFn( + bestSwap.map((routeWithValidQuote) => routeWithValidQuote.gasCostInToken) + ).add(gasCostL1QuoteToken); + const quote = sumFn(bestSwap.map((routeWithValidQuote) => routeWithValidQuote.quote)); + if (tradeType === sdk.TradeType.EXACT_INPUT) { + const quoteGasAdjustedForL1 = quoteGasAdjusted.subtract(gasCostL1QuoteToken); + quoteGasAdjusted = quoteGasAdjustedForL1; + } else { + const quoteGasAdjustedForL1 = quoteGasAdjusted.add(gasCostL1QuoteToken); + quoteGasAdjusted = quoteGasAdjustedForL1; + } + const routeWithQuotes = bestSwap.sort( + (routeAmountA, routeAmountB) => routeAmountB.amount.greaterThan(routeAmountA.amount) ? 1 : -1 + ); + return { + quote, + quoteGasAdjusted, + estimatedGasUsed, + estimatedGasUsedUSD, + estimatedGasUsedQuoteToken, + routes: routeWithQuotes + }; +} +var findFirstRouteNotUsingUsedPools = (usedRoutes, candidateRouteQuotes) => { + const poolAddressSet = /* @__PURE__ */ new Set(); + const usedPoolAddresses = usedRoutes.flatMap(({ pools }) => pools.map(getPoolAddress)); + for (const poolAddress of usedPoolAddresses) { + poolAddressSet.add(poolAddress); + } + for (const routeQuote of candidateRouteQuotes) { + const { pools } = routeQuote; + const poolAddresses = pools.map(getPoolAddress); + if (poolAddresses.some((poolAddress) => poolAddressSet.has(poolAddress))) { + continue; + } + return routeQuote; + } + return null; +}; +var routesStr = (routes) => { + return routes.map((route) => { + return route.pools.map((p) => PoolType[p.type]).join(", "); + }).join(";"); +}; + +// evm/v3-router/providers/poolProviders/poolProviderWithCache.ts +function createPoolProviderWithCache(provider) { + return provider; +} +function formatFraction(fraction, precision = 6, rounding = void 0) { + if (!fraction || fraction.denominator === 0n) { + return void 0; + } + if (precision === 0 || fraction.greaterThan(10n ** BigInt(precision))) { + return fraction.toFixed(0); + } + return fraction.toSignificant(precision, void 0, rounding); +} +function formatPrice(price, precision) { + if (!price) { + return void 0; + } + return formatFraction(price?.asFraction.multiply(price?.scalar), precision); +} + +// evm/utils/withFallback.ts +function withTimeout(fn, duration) { + return function callWithTimeout(...args) { + return Promise.race([ + fn(...args), + new Promise((_, reject) => { + setTimeout(() => reject(new Error(`Request timeout ${duration}ms`)), duration); + }) + ]); + }; +} +function withFallback(calls) { + return async function asyncCall(...args) { + const numOfCalls = calls.length; + if (numOfCalls === 0) { + throw new Error("No valid calls"); + } + for (const [index, { timeout = 2e3, asyncFn }] of calls.entries()) { + const fn = index < numOfCalls - 1 ? withTimeout(asyncFn, timeout) : asyncFn; + try { + const result = await fn(...args); + return result; + } catch (e) { + if (index === numOfCalls - 1) { + throw e; + } + if (process.env.NODE_ENV !== "production") { + console.warn(`Call failed with error %O, try next fallback`, e); + } + } + } + throw new Error("Unexpected end of call"); + }; +} +function createAsyncCallWithFallbacks(defaultCall, options) { + const { fallbacks = [], fallbackTimeout: timeout = 3e3 } = options || {}; + return withFallback( + [defaultCall, ...fallbacks].map((asyncFn) => ({ + asyncFn, + timeout + })) + ); +} +var tokenPriceQuery = graphqlRequest.gql` + query getTokens($pageSize: Int!, $tokenAddrs: [ID!]) { + tokens(first: $pageSize, where: { id_in: $tokenAddrs }) { + id + derivedUSD + } + } +`; +function createCommonTokenPriceProvider(getTokenPrices) { + return async function getCommonTokenPrices2({ currencyA, currencyB, ...rest }) { + const baseTokens = await getCheckAgainstBaseTokens(currencyA, currencyB); + if (!baseTokens) { + return null; + } + const map = /* @__PURE__ */ new Map(); + const idToToken = {}; + const addresses = baseTokens.map((t) => { + const address = viem.getAddress(t.address); + idToToken[address] = t; + return address; + }); + const tokenPrices = await getTokenPrices({ addresses, chainId: currencyA?.chainId, ...rest }); + for (const { address, priceUSD } of tokenPrices) { + const token = idToToken[viem.getAddress(address)]; + if (token) { + map.set(token.wrapped.address, parseFloat(priceUSD) || 0); + } + } + return map; + }; +} +var getTokenUsdPricesBySubgraph = async ({ + addresses, + chainId, + provider +}) => { + const client = provider?.({ chainId }); + if (!client) { + throw new Error("No valid subgraph data provider"); + } + const { tokens: tokenPrices } = await client.request( + tokenPriceQuery, + { + pageSize: 1e3, + tokenAddrs: addresses.map((addr) => addr.toLocaleLowerCase()) + } + ); + return tokenPrices.map(({ id, derivedUSD }) => ({ + address: id, + priceUSD: derivedUSD + })); +}; +var getCommonTokenPricesBySubgraph = createCommonTokenPriceProvider(getTokenUsdPricesBySubgraph); +function withCache(fetchPrices, options) { + const cache = /* @__PURE__ */ new Map(); + const { requireLlamaChain = false } = options || {}; + return async ({ addresses, chainId }) => { + if (!chainId) { + return []; + } + if (requireLlamaChain && !chains.getLlamaChainName(chainId)) { + throw new Error(`Chain ${chainId} is not supported by Llama API`); + } + const [cachedResults, addressesToFetch] = addresses.reduce( + ([cachedAddrs, newAddrs], address) => { + const cached = cache.get(address); + if (!cached) { + newAddrs.push(address); + } else { + cachedAddrs.push(cached); + } + return [cachedAddrs, newAddrs]; + }, + [[], []] + ); + if (!addressesToFetch.length) { + return cachedResults; + } + const freshResults = await fetchPrices({ addresses: addressesToFetch, chainId }); + for (const result of freshResults) { + cache.set(viem.getAddress(result.address), result); + } + return [...cachedResults, ...freshResults]; + }; +} +var createGetTokenPriceFromLlma = ({ endpoint }) => { + return async ({ addresses, chainId }) => { + const list = addresses.map((address) => `${chains.getLlamaChainName(chainId)}:${address.toLocaleLowerCase()}`).join(","); + const result = await fetch(`${endpoint}/${list}`).then( + (res) => res.json() + ); + const { coins = {} } = result; + return Object.entries(coins).map(([key, value]) => { + const [, address] = key.split(":"); + return { address, priceUSD: value.price }; + }); + }; +}; +var getCommonTokenPricesByLlma = createCommonTokenPriceProvider( + withCache( + createGetTokenPriceFromLlma({ + endpoint: "https://coins.llama.fi/prices/current" + }), + { requireLlamaChain: true } + ) +); +var createGetTokenPriceFromWalletApi = ({ endpoint }) => { + return async ({ addresses, chainId }) => { + const list = addresses.map((address) => `${chainId}:${address.toLowerCase()}`).join(","); + const encodedList = encodeURIComponent(list); + const result = await fetch(`${endpoint}/list/${encodedList}`).then((res) => res.json()); + return Object.entries(result).map(([key, price]) => { + const [, address] = key.split(":"); + return { address, priceUSD: String(price) }; + }); + }; +}; +var normalizeEndpoint = (value) => value?.replace(/\/+$/, "") ?? ""; +var WALLET_API_ENDPOINT = normalizeEndpoint(process.env.NEXT_PUBLIC_WALLET_API); +var getCommonTokenPricesByWalletApi = createCommonTokenPriceProvider( + withCache( + createGetTokenPriceFromWalletApi({ + endpoint: `${WALLET_API_ENDPOINT}/v1/prices` + }) + ) +); +var getCommonTokenPrices = withFallback([ + { + asyncFn: ({ currencyA, currencyB }) => getCommonTokenPricesByLlma({ currencyA, currencyB }), + timeout: 3e3 + }, + { + asyncFn: ({ currencyA, currencyB }) => getCommonTokenPricesByWalletApi({ currencyA, currencyB }), + timeout: 3e3 + }, + { + asyncFn: ({ currencyA, currencyB, v3SubgraphProvider }) => getCommonTokenPricesBySubgraph({ currencyA, currencyB, provider: v3SubgraphProvider }) + } +]); +var getV2PoolsOnChain = createOnChainPoolFactory({ + abi: chunkZNSTBYLO_js.pancakePairABI, + getPossiblePoolMetas: async ([currencyA, currencyB]) => { + if (chains.getChainConfig(currencyA.chainId)?.features?.v2 === false) { + return []; + } + return [{ id: computeV2PoolAddress(currencyA.wrapped, currencyB.wrapped), currencyA, currencyB }]; + }, + buildPoolInfoCalls: ({ id: address }) => [ + { + address, + functionName: "getReserves", + args: [] + } + ], + buildPool: ({ currencyA, currencyB }, [reserves]) => { + if (!reserves) { + return null; + } + const [reserve0, reserve1] = reserves; + const [token0, token1] = currencyA.wrapped.sortsBefore(currencyB.wrapped) ? [currencyA, currencyB] : [currencyB, currencyA]; + return { + type: 0 /* V2 */, + reserve0: sdk.CurrencyAmount.fromRawAmount(token0, reserve0.toString()), + reserve1: sdk.CurrencyAmount.fromRawAmount(token1, reserve1.toString()) + }; + } +}); +var getStablePoolsOnChain = createOnChainPoolFactory({ + abi: chunkZNSTBYLO_js.stableSwapPairABI, + getPossiblePoolMetas: async ([currencyA, currencyB]) => { + const poolConfigs = await stableSwapSdk.getStableSwapPools(currencyA.chainId); + return poolConfigs.filter(({ token, quoteToken }) => { + const tokenA = tokenLists.deserializeToken(token); + const tokenB = tokenLists.deserializeToken(quoteToken); + return tokenA.equals(currencyA.wrapped) && tokenB.equals(currencyB.wrapped) || tokenA.equals(currencyB.wrapped) && tokenB.equals(currencyA.wrapped); + }).map(({ stableSwapAddress }) => ({ + id: stableSwapAddress, + currencyA, + currencyB + })); + }, + buildPoolInfoCalls: ({ id: address }) => [ + { + address, + functionName: "balances", + args: [0] + }, + { + address, + functionName: "balances", + args: [1] + }, + { + address, + functionName: "A", + args: [] + }, + { + address, + functionName: "fee", + args: [] + }, + { + address, + functionName: "FEE_DENOMINATOR", + args: [] + } + ], + buildPool: ({ currencyA, currencyB, id: address }, [balance0, balance1, a, fee, feeDenominator]) => { + if (!balance0 || !balance1 || !a || !fee || !feeDenominator) { + return null; + } + const [token0, token1] = currencyA.wrapped.sortsBefore(currencyB.wrapped) ? [currencyA, currencyB] : [currencyB, currencyA]; + return { + address, + type: 2 /* STABLE */, + balances: [ + sdk.CurrencyAmount.fromRawAmount(token0, balance0.toString()), + sdk.CurrencyAmount.fromRawAmount(token1, balance1.toString()) + ], + amplifier: BigInt(a.toString()), + fee: new sdk.Percent(BigInt(fee.toString()), BigInt(feeDenominator.toString())) + }; + } +}); +var getV3PoolsWithoutTicksOnChain = createOnChainPoolFactory({ + abi: v3Sdk.pancakeV3PoolABI, + getPossiblePoolMetas: async ([currencyA, currencyB]) => { + const deployerAddress = v3Sdk.DEPLOYER_ADDRESSES[currencyA.chainId]; + if (chains.getChainConfig(currencyA.chainId)?.features?.v3 === false || !viem.isAddress(deployerAddress ?? "")) { + return []; + } + return [v3Sdk.FeeAmount.LOWEST, v3Sdk.FeeAmount.LOW, v3Sdk.FeeAmount.MEDIUM, v3Sdk.FeeAmount.HIGH].map((fee) => ({ + id: computeV3PoolAddress({ + deployerAddress, + tokenA: currencyA.wrapped, + tokenB: currencyB.wrapped, + fee + }), + currencyA, + currencyB, + fee + })); + }, + buildPoolInfoCalls: ({ id: address, currencyA, currencyB }) => [ + { + address, + functionName: "liquidity" + }, + { + address, + functionName: "slot0" + }, + { + abi: sdk.erc20Abi, + address: currencyA.wrapped.address, + functionName: "balanceOf", + args: [address] + }, + { + abi: sdk.erc20Abi, + address: currencyB.wrapped.address, + functionName: "balanceOf", + args: [address] + } + ], + buildPool: ({ currencyA, currencyB, fee, id: address }, [liquidity, slot0, balanceA, balanceB]) => { + if (!slot0) { + return null; + } + const [sqrtPriceX96, tick, , , , feeProtocol] = slot0; + const sorted = currencyA.wrapped.sortsBefore(currencyB.wrapped); + const [balance0, balance1] = sorted ? [balanceA, balanceB] : [balanceB, balanceA]; + const [token0, token1] = sorted ? [currencyA, currencyB] : [currencyB, currencyA]; + const [token0ProtocolFee, token1ProtocolFee] = v3Sdk.parseProtocolFees(feeProtocol); + return { + type: 1 /* V3 */, + token0, + token1, + reserve0: sdk.CurrencyAmount.fromRawAmount(token0, balance0), + reserve1: sdk.CurrencyAmount.fromRawAmount(token1, balance1), + fee, + liquidity: BigInt(liquidity.toString()), + sqrtRatioX96: BigInt(sqrtPriceX96.toString()), + tick: Number(tick), + address, + token0ProtocolFee, + token1ProtocolFee + }; + } +}); +function createOnChainPoolFactory({ abi, getPossiblePoolMetas, buildPoolInfoCalls, buildPool }) { + return async function poolFactory(pairs, provider, _blockNumber) { + if (!provider) { + throw new Error("No valid onchain data provider"); + } + const chainId = pairs[0]?.[0]?.chainId; + const client = provider({ chainId }); + if (!chainId || !client) { + return []; + } + const poolAddressSet = /* @__PURE__ */ new Set(); + const poolMetas = []; + const allPossibleMetas = await Promise.all(pairs.map((pair) => getPossiblePoolMetas(pair, client))); + for (const possiblePoolMetas of allPossibleMetas) { + for (const meta of possiblePoolMetas) { + if (!poolAddressSet.has(meta.id)) { + poolMetas.push(meta); + poolAddressSet.add(meta.id); + } + } + } + let calls = []; + let poolCallSize = 0; + for (const meta of poolMetas) { + const poolCalls = buildPoolInfoCalls(meta); + if (!poolCallSize) { + poolCallSize = poolCalls.length; + } + if (!poolCallSize || poolCallSize !== poolCalls.length) { + throw new Error("Inconsistent pool data call"); + } + calls = [...calls, ...poolCalls]; + } + if (!calls.length) { + return []; + } + const results = await client.multicall({ + contracts: calls.map((call) => ({ + abi: call.abi || abi, + address: call.address, + functionName: call.functionName, + args: call.args + })), + allowFailure: true + }); + const pools = []; + for (let i = 0; i < poolMetas.length; i += 1) { + const poolResults = results.slice(i * poolCallSize, (i + 1) * poolCallSize); + const pool = buildPool( + poolMetas[i], + poolResults.map((result) => result.result) + ); + if (pool) { + pools.push(pool); + } + } + return pools; + }; +} +var DEFAULT_POOL_SELECTOR_CONFIG = { + topN: 2, + topNDirectSwaps: 2, + topNTokenInOut: 2, + topNSecondHop: 1, + topNWithEachBaseToken: 3, + topNWithBaseToken: 3 +}; +var INFINITY_DEFAULT_POOL_SELECTOR_CONFIG = { + [chains.ChainId.BSC]: { + topN: 1, + topNDirectSwaps: 1, + topNTokenInOut: 1, + topNSecondHop: 1, + topNWithEachBaseToken: 1, + topNWithBaseToken: 1 + }, + [chains.ChainId.BSC_TESTNET]: { + topN: 1, + topNDirectSwaps: 1, + topNTokenInOut: 1, + topNSecondHop: 1, + topNWithEachBaseToken: 1, + topNWithBaseToken: 1 + }, + [chains.ChainId.ETHEREUM]: { + topN: 1, + topNDirectSwaps: 1, + topNTokenInOut: 1, + topNSecondHop: 1, + topNWithEachBaseToken: 1, + topNWithBaseToken: 1 + }, + [chains.ChainId.GOERLI]: { + topN: 1, + topNDirectSwaps: 1, + topNTokenInOut: 1, + topNSecondHop: 1, + topNWithEachBaseToken: 1, + topNWithBaseToken: 1 + } +}; +var V3_DEFAULT_POOL_SELECTOR_CONFIG = { + [chains.ChainId.BSC]: { + topN: 2, + topNDirectSwaps: 2, + topNTokenInOut: 2, + topNSecondHop: 1, + topNWithEachBaseToken: 3, + topNWithBaseToken: 4 + }, + [chains.ChainId.BSC_TESTNET]: { + topN: 2, + topNDirectSwaps: 2, + topNTokenInOut: 2, + topNSecondHop: 1, + topNWithEachBaseToken: 3, + topNWithBaseToken: 4 + }, + [chains.ChainId.ETHEREUM]: { + topN: 2, + topNDirectSwaps: 2, + topNTokenInOut: 2, + topNSecondHop: 1, + topNWithEachBaseToken: 3, + topNWithBaseToken: 4 + }, + [chains.ChainId.GOERLI]: { + topN: 2, + topNDirectSwaps: 2, + topNTokenInOut: 2, + topNSecondHop: 1, + topNWithEachBaseToken: 3, + topNWithBaseToken: 4 + } +}; +var V2_DEFAULT_POOL_SELECTOR_CONFIG = { + [chains.ChainId.BSC]: { + topN: 3, + topNDirectSwaps: 2, + topNTokenInOut: 2, + topNSecondHop: 1, + topNWithEachBaseToken: 3, + topNWithBaseToken: 3 + }, + [chains.ChainId.BSC_TESTNET]: { + topN: 3, + topNDirectSwaps: 2, + topNTokenInOut: 2, + topNSecondHop: 1, + topNWithEachBaseToken: 3, + topNWithBaseToken: 3 + }, + [chains.ChainId.ETHEREUM]: { + topN: 3, + topNDirectSwaps: 2, + topNTokenInOut: 2, + topNSecondHop: 1, + topNWithEachBaseToken: 3, + topNWithBaseToken: 3 + }, + [chains.ChainId.GOERLI]: { + topN: 3, + topNDirectSwaps: 2, + topNTokenInOut: 2, + topNSecondHop: 1, + topNWithEachBaseToken: 3, + topNWithBaseToken: 3 + } +}; +var V3_TOKEN_POOL_SELECTOR_CONFIG = { + [chains.ChainId.BSC]: { + [tokens.bscTokens.ankr.address]: { + topNTokenInOut: 4 + }, + [tokens.bscTokens.ankrbnb.address]: { + topNTokenInOut: 4 + }, + [tokens.bscTokens.ankrETH.address]: { + topNTokenInOut: 4 + }, + [tokens.bscTokens.wbeth.address]: { + topNSecondHop: 3 + } + } +}; +var V2_TOKEN_POOL_SELECTOR_CONFIG = { + [chains.ChainId.BSC]: { + // GEM + "0x701F1ed50Aa5e784B8Fb89d1Ba05cCCd627839a7": { + topNTokenInOut: 4 + } + } +}; +var ROUTE_CONFIG_BY_CHAIN = { + [chains.ChainId.ZKSYNC]: { + distributionPercent: 20 + }, + [chains.ChainId.BASE]: { + distributionPercent: 10 + } +}; + +// evm/v3-router/utils/mergePoolSelectorConfig.ts +function mergePoolSelectorConfig(baseConfig, customConfig) { + if (!customConfig) { + return baseConfig; + } + const merged = { ...baseConfig }; + const keys = Object.keys(merged); + for (const key of keys) { + merged[key] = Math.max(merged[key], customConfig[key] || 0); + } + return merged; +} + +// evm/v3-router/utils/getPoolSelectorConfig.ts +function poolSelectorConfigFactory(poolSelecorConfigMap, tokenPoolSelectorConfigMap) { + return function getPoolSelectorConfig(currencyA, currencyB) { + const chainId = currencyA?.chainId; + if (!chainId || !poolSelecorConfigMap[chainId]) { + return DEFAULT_POOL_SELECTOR_CONFIG; + } + const additionalConfigA = tokenPoolSelectorConfigMap[chainId]?.[currencyA?.wrapped?.address || "0x"]; + const additionalConfigB = tokenPoolSelectorConfigMap[chainId]?.[currencyB?.wrapped?.address || "0x"]; + return mergePoolSelectorConfig( + mergePoolSelectorConfig(poolSelecorConfigMap[chainId], additionalConfigA), + additionalConfigB + ); + }; +} +var getV3PoolSelectorConfig = poolSelectorConfigFactory( + V3_DEFAULT_POOL_SELECTOR_CONFIG, + V3_TOKEN_POOL_SELECTOR_CONFIG +); +var getV2PoolSelectorConfig = poolSelectorConfigFactory( + V2_DEFAULT_POOL_SELECTOR_CONFIG, + V2_TOKEN_POOL_SELECTOR_CONFIG +); +var getInfinityPoolSelectorConfig = poolSelectorConfigFactory(INFINITY_DEFAULT_POOL_SELECTOR_CONFIG, {}); + +// evm/v3-router/providers/poolProviders/poolTvlSelectors.ts +var sortByTvl = (a, b) => a.tvlUSD >= b.tvlUSD ? -1 : 1; +function poolSelectorFactory({ + getPoolSelectorConfig, + getToken0, + getToken1, + getPoolAddress: getPoolAddress2 +}) { + return function tvlSelector(currencyA, currencyB, unorderedPoolsWithTvl) { + const POOL_SELECTION_CONFIG = getPoolSelectorConfig(currencyA, currencyB); + if (!currencyA || !currencyB || !unorderedPoolsWithTvl.length) { + return []; + } + const poolsFromSubgraph = unorderedPoolsWithTvl.sort(sortByTvl); + const { chainId } = getToken0(poolsFromSubgraph[0]); + const baseTokens = chunkZNSTBYLO_js.BASES_TO_CHECK_TRADES_AGAINST[chainId] ?? []; + const poolSet = /* @__PURE__ */ new Set(); + const addToPoolSet = (pools2) => { + for (const pool of pools2) { + poolSet.add(getPoolAddress2(pool)); + } + }; + const topByBaseWithTokenIn = baseTokens.map((token) => { + return poolsFromSubgraph.filter((subgraphPool) => { + return getToken0(subgraphPool).wrapped.equals(token) && getToken1(subgraphPool).wrapped.equals(currencyA.wrapped) || getToken1(subgraphPool).wrapped.equals(token) && getToken0(subgraphPool).wrapped.equals(currencyA.wrapped); + }).sort(sortByTvl).slice(0, POOL_SELECTION_CONFIG.topNWithEachBaseToken); + }).reduce((acc, cur) => { + acc.push(...cur); + return acc; + }, []).sort(sortByTvl).slice(0, POOL_SELECTION_CONFIG.topNWithBaseToken); + addToPoolSet(topByBaseWithTokenIn); + const topByBaseWithTokenOut = baseTokens.map((token) => { + return poolsFromSubgraph.filter((subgraphPool) => { + if (poolSet.has(getPoolAddress2(subgraphPool))) { + return false; + } + return getToken0(subgraphPool).wrapped.equals(token) && getToken1(subgraphPool).wrapped.equals(currencyB.wrapped) || getToken1(subgraphPool).wrapped.equals(token) && getToken0(subgraphPool).wrapped.equals(currencyB.wrapped); + }).sort(sortByTvl).slice(0, POOL_SELECTION_CONFIG.topNWithEachBaseToken); + }).reduce((acc, cur) => { + acc.push(...cur); + return acc; + }, []).sort(sortByTvl).slice(0, POOL_SELECTION_CONFIG.topNWithBaseToken); + addToPoolSet(topByBaseWithTokenOut); + const top2DirectPools = poolsFromSubgraph.filter((subgraphPool) => { + if (poolSet.has(getPoolAddress2(subgraphPool))) { + return false; + } + return getToken0(subgraphPool).wrapped.equals(currencyA.wrapped) && getToken1(subgraphPool).wrapped.equals(currencyB.wrapped) || getToken1(subgraphPool).wrapped.equals(currencyA.wrapped) && getToken0(subgraphPool).wrapped.equals(currencyB.wrapped); + }).slice(0, POOL_SELECTION_CONFIG.topNDirectSwaps); + addToPoolSet(top2DirectPools); + const nativeToken = sdk.WNATIVE[chainId]; + const top2EthBaseTokenPool = nativeToken ? poolsFromSubgraph.filter((subgraphPool) => { + if (poolSet.has(getPoolAddress2(subgraphPool))) { + return false; + } + return getToken0(subgraphPool).wrapped.equals(nativeToken) && getToken1(subgraphPool).wrapped.equals(currencyA.wrapped) || getToken1(subgraphPool).wrapped.equals(nativeToken) && getToken0(subgraphPool).wrapped.equals(currencyA.wrapped); + }).slice(0, 1) : []; + addToPoolSet(top2EthBaseTokenPool); + const top2EthQuoteTokenPool = nativeToken ? poolsFromSubgraph.filter((subgraphPool) => { + if (poolSet.has(getPoolAddress2(subgraphPool))) { + return false; + } + return getToken0(subgraphPool).wrapped.equals(nativeToken) && getToken1(subgraphPool).wrapped.equals(currencyB.wrapped) || getToken1(subgraphPool).wrapped.equals(nativeToken) && getToken0(subgraphPool).wrapped.equals(currencyB.wrapped); + }).slice(0, 1) : []; + addToPoolSet(top2EthQuoteTokenPool); + const topByTVL = poolsFromSubgraph.slice(0, POOL_SELECTION_CONFIG.topN).filter((pool) => !poolSet.has(getPoolAddress2(pool))); + addToPoolSet(topByTVL); + const topByTVLUsingTokenBase = poolsFromSubgraph.filter((subgraphPool) => { + if (poolSet.has(getPoolAddress2(subgraphPool))) { + return false; + } + return getToken0(subgraphPool).wrapped.equals(currencyA.wrapped) || getToken1(subgraphPool).wrapped.equals(currencyA.wrapped); + }).slice(0, POOL_SELECTION_CONFIG.topNTokenInOut); + addToPoolSet(topByTVLUsingTokenBase); + const topByTVLUsingTokenQuote = poolsFromSubgraph.filter((subgraphPool) => { + if (poolSet.has(getPoolAddress2(subgraphPool))) { + return false; + } + return getToken0(subgraphPool).wrapped.equals(currencyB.wrapped) || getToken1(subgraphPool).wrapped.equals(currencyB.wrapped); + }).slice(0, POOL_SELECTION_CONFIG.topNTokenInOut); + addToPoolSet(topByTVLUsingTokenQuote); + const getTopByTVLUsingTokenSecondHops = (base, tokenToCompare) => base.map((subgraphPool) => { + return getToken0(subgraphPool).wrapped.equals(tokenToCompare.wrapped) ? getToken1(subgraphPool) : getToken0(subgraphPool); + }).map((secondHopToken) => { + return poolsFromSubgraph.filter((subgraphPool) => { + if (poolSet.has(getPoolAddress2(subgraphPool))) { + return false; + } + return getToken0(subgraphPool).wrapped.equals(secondHopToken.wrapped) || getToken1(subgraphPool).wrapped.equals(secondHopToken.wrapped); + }); + }).reduce((acc, cur) => { + acc.push(...cur); + return acc; + }, []).reduce((acc, cur) => { + if (!acc.some((p) => p === cur)) { + acc.push(cur); + } + return acc; + }, []).sort(sortByTvl).slice(0, POOL_SELECTION_CONFIG.topNSecondHop); + const topByTVLUsingTokenInSecondHops = getTopByTVLUsingTokenSecondHops( + [...topByTVLUsingTokenBase, ...topByBaseWithTokenIn], + currencyA + ); + addToPoolSet(topByTVLUsingTokenInSecondHops); + const topByTVLUsingTokenOutSecondHops = getTopByTVLUsingTokenSecondHops( + [...topByTVLUsingTokenQuote, ...topByBaseWithTokenOut], + currencyB + ); + addToPoolSet(topByTVLUsingTokenOutSecondHops); + const pools = [ + ...topByBaseWithTokenIn, + ...topByBaseWithTokenOut, + ...top2DirectPools, + ...top2EthBaseTokenPool, + ...top2EthQuoteTokenPool, + ...topByTVL, + ...topByTVLUsingTokenBase, + ...topByTVLUsingTokenQuote, + ...topByTVLUsingTokenInSecondHops, + ...topByTVLUsingTokenOutSecondHops + ]; + return pools.map(({ tvlUSD, ...rest }) => rest); + }; +} +var v3PoolTvlSelector = poolSelectorFactory({ + getPoolSelectorConfig: getV3PoolSelectorConfig, + getToken0: (p) => p.token0, + getToken1: (p) => p.token1, + getPoolAddress: (p) => p.address +}); +var v2PoolTvlSelector = poolSelectorFactory({ + getPoolSelectorConfig: getV2PoolSelectorConfig, + getToken0: (p) => p.reserve0.currency, + getToken1: (p) => p.reserve1.currency, + getPoolAddress: (p) => getPoolAddress(p) || "0x" +}); +var infinityPoolTvlSelector = poolSelectorFactory({ + getPoolSelectorConfig: getInfinityPoolSelectorConfig, + getToken0: (p) => p.currency0, + getToken1: (p) => p.currency1, + getPoolAddress: (p) => p.id +}); + +// evm/v3-router/providers/poolProviders/getV2CandidatePools.ts +function createV2PoolsProviderByCommonTokenPrices(getCommonTokenPrices2) { + return async function getV2Pools({ + currencyA, + currencyB, + pairs: providedPairs, + onChainProvider, + blockNumber, + ...rest + }) { + const pairs = providedPairs || await getPairCombinations(currencyA, currencyB); + const chainId = currencyA?.chainId ?? currencyB?.chainId; + const testnetMode = Boolean(chainId && chains.isTestnetChainId(chainId)); + const poolsFromOnChain = await getV2PoolsOnChain(pairs, onChainProvider, blockNumber); + let baseTokenUsdPrices = null; + if (testnetMode) { + try { + baseTokenUsdPrices = await getCommonTokenPrices2({ currencyA, currencyB, ...rest }); + } catch (error) { + logger.log("[v2] failed to get base token prices on testnet, continue with on-chain pools only", error); + } + } else { + baseTokenUsdPrices = await getCommonTokenPrices2({ currencyA, currencyB, ...rest }); + } + if (!poolsFromOnChain) { + throw new Error("Failed to get v2 candidate pools"); + } + if (!baseTokenUsdPrices) { + logger.log("Failed to get base token prices"); + return poolsFromOnChain.map((pool) => { + return { + ...pool, + tvlUSD: BigInt(0), + address: getPoolAddress(pool) + }; + }); + } + return poolsFromOnChain.map((pool) => { + const getAmountUsd = (amount) => { + if (amount.equalTo(sdk.ZERO)) { + return 0; + } + const price = baseTokenUsdPrices.get(amount.currency.wrapped.address); + if (price !== void 0) { + return parseFloat(amount.toExact()) * price; + } + const againstAmount = pool.reserve0.currency.equals(amount.currency) ? pool.reserve1 : pool.reserve0; + const againstUsdPrice = baseTokenUsdPrices.get(againstAmount.currency.wrapped.address); + if (againstUsdPrice) { + const poolPrice = new sdk.Price({ baseAmount: amount, quoteAmount: againstAmount }); + return parseFloat(amount.toExact()) * parseFloat(formatPrice(poolPrice, 6) || "0"); + } + return 0; + }; + return { + ...pool, + tvlUSD: BigInt(Math.floor(getAmountUsd(pool.reserve0) + getAmountUsd(pool.reserve1))), + address: getPoolAddress(pool) + }; + }); + }; +} +var getV2PoolsWithTvlByCommonTokenPrices = createV2PoolsProviderByCommonTokenPrices(getCommonTokenPrices); +function createGetV2CandidatePools(defaultGetV2Pools, options) { + const getV2PoolsWithFallbacks = createAsyncCallWithFallbacks(defaultGetV2Pools, options); + return async function getV2Pools(params) { + const { currencyA, currencyB } = params; + const pools = await getV2PoolsWithFallbacks(params); + return v2PoolTvlSelector(currencyA, currencyB, pools); + }; +} +async function getV2CandidatePools(params) { + const getV2PoolsWithFallbacks = createGetV2CandidatePools(getV2PoolsWithTvlByCommonTokenPrices); + return getV2PoolsWithFallbacks(params); +} +function subgraphPoolProviderFactory({ + id, + getPoolMetas, + getPoolsFromSubgraph +}) { + return async function subgraphPoolProvider({ + provider, + pairs + }) { + if (!provider) { + throw new Error("No valid subgraph data provider"); + } + const chainId = pairs[0]?.[0]?.chainId; + if (!chainId) { + return []; + } + const client = provider({ chainId }); + if (!client) { + logger.error("No subgraph client found for chainId", chainId); + return []; + } + metric(`SUBGRAPH_POOLS_START(${id})`, pairs); + const metaMap = /* @__PURE__ */ new Map(); + for (const pair of pairs) { + const metas = getPoolMetas(pair); + for (const meta of metas) { + metaMap.set(meta.id.toLocaleLowerCase(), meta); + } + } + const addresses = Array.from(metaMap.keys()); + const pools = await getPoolsFromSubgraph({ + addresses, + getPoolMetaByAddress: (address) => metaMap.get(address.toLocaleLowerCase()) ?? null, + client + }); + metric(`SUBGRAPH_POOLS_END(${id})`, pools); + return pools.filter((p) => !!p); + }; +} +var getV3PoolMeta = memoize( + ([currencyA, currencyB, feeAmount]) => ({ + id: v3Sdk.Pool.getAddress(currencyA.wrapped, currencyB.wrapped, feeAmount), + currencyA, + currencyB, + fee: feeAmount + }), + ([currencyA, currencyB, feeAmount]) => { + if (currencyA.wrapped.equals(currencyB.wrapped)) { + return [currencyA.chainId, currencyA.wrapped.address, feeAmount].join("_"); + } + const [token0, token1] = currencyA.wrapped.sortsBefore(currencyB.wrapped) ? [currencyA.wrapped, currencyB.wrapped] : [currencyB.wrapped, currencyA.wrapped]; + return [token0.chainId, token0.address, token1.address, feeAmount].join("_"); + } +); +var getV3PoolMetas = memoize( + (pair) => [v3Sdk.FeeAmount.LOWEST, v3Sdk.FeeAmount.LOW, v3Sdk.FeeAmount.MEDIUM, v3Sdk.FeeAmount.HIGH].map((fee) => getV3PoolMeta([...pair, fee])), + ([currencyA, currencyB]) => { + if (currencyA.wrapped.equals(currencyB.wrapped)) { + return [currencyA.chainId, currencyA.wrapped.address].join("_"); + } + const [token0, token1] = currencyA.wrapped.sortsBefore(currencyB.wrapped) ? [currencyA.wrapped, currencyB.wrapped] : [currencyB.wrapped, currencyA.wrapped]; + return [token0.chainId, token0.address, token1.address].join("_"); + } +); +var queryV3Pools = graphqlRequest.gql` + query getPools($pageSize: Int!, $poolAddrs: [String]) { + pools(first: $pageSize, where: { id_in: $poolAddrs }) { + id + tick + sqrtPrice + feeTier + liquidity + feeProtocol + totalValueLockedUSD + } + } +`; +var getV3PoolSubgraph = subgraphPoolProviderFactory({ + id: "V3", + getPoolMetas: getV3PoolMetas, + getPoolsFromSubgraph: async ({ addresses, getPoolMetaByAddress, client }) => { + const { pools: poolsFromSubgraph } = await client.request(queryV3Pools, { + pageSize: 1e3, + poolAddrs: addresses + }); + return poolsFromSubgraph.map(({ id, liquidity, sqrtPrice, tick, totalValueLockedUSD, feeProtocol }) => { + const meta = getPoolMetaByAddress(id); + if (!meta) { + return null; + } + const { fee, currencyA, currencyB, id: address } = meta; + const [token0, token1] = currencyA.wrapped.sortsBefore(currencyB.wrapped) ? [currencyA, currencyB] : [currencyB, currencyA]; + const [token0ProtocolFee, token1ProtocolFee] = v3Sdk.parseProtocolFees(feeProtocol); + return { + type: 1 /* V3 */, + fee, + token0, + token1, + liquidity: BigInt(liquidity), + sqrtRatioX96: BigInt(sqrtPrice), + tick: Number(tick), + address, + tvlUSD: BigInt(Number.parseInt(totalValueLockedUSD)), + token0ProtocolFee, + token1ProtocolFee + }; + }); + } +}); +var queryV2Pools = graphqlRequest.gql` + query getPools($pageSize: Int!, $poolAddrs: [ID!]) { + pairs(first: $pageSize, where: { id_in: $poolAddrs }) { + id + reserve0 + reserve1 + reserveUSD + } + } +`; +var getV2PoolSubgraph = subgraphPoolProviderFactory({ + id: "V2", + getPoolMetas: ([currencyA, currencyB]) => [ + { + currencyA, + currencyB, + id: computeV2PoolAddress(currencyA.wrapped, currencyB.wrapped) + } + ], + getPoolsFromSubgraph: async ({ addresses, getPoolMetaByAddress, client }) => { + const { pairs: poolsFromSubgraph } = await client.request(queryV2Pools, { + pageSize: 1e3, + poolAddrs: addresses + }); + return poolsFromSubgraph.map(({ id, reserveUSD, reserve0, reserve1 }) => { + const meta = getPoolMetaByAddress(id); + if (!meta) { + return null; + } + const { currencyA, currencyB, id: address } = meta; + const [token0, token1] = currencyA.wrapped.sortsBefore(currencyB.wrapped) ? [currencyA, currencyB] : [currencyB, currencyA]; + const reserve0Amount = tryParseAmount_default(reserve0, token0); + const reserve1Amount = tryParseAmount_default(reserve1, token1); + if (!reserve0Amount || !reserve1Amount) { + return null; + } + return { + address, + type: 0 /* V2 */, + reserve0: reserve0Amount, + reserve1: reserve1Amount, + tvlUSD: BigInt(Number.parseInt(reserveUSD)) + }; + }); + } +}); +function subgraphAllPoolsQueryFactory({ + getPoolsFromSubgraph, + getPoolId: getPoolId3 +}) { + return async function getAllPools({ + provider, + chainId, + pageSize = 1e3 + }) { + if (!provider || !chainId) { + throw new Error("No valid subgraph data provider"); + } + const client = provider({ chainId }); + if (!client) { + throw new Error(`No subgraph client found for chainId ${chainId}`); + } + let hasMorePools = true; + let lastId = ""; + let pools = []; + while (hasMorePools) { + const poolsAtCurrentPage = await getPoolsFromSubgraph({ client, lastId, pageSize, chainId }); + if (poolsAtCurrentPage.length < pageSize) { + hasMorePools = false; + pools = [...pools, ...poolsAtCurrentPage]; + break; + } + lastId = getPoolId3(poolsAtCurrentPage[poolsAtCurrentPage.length - 1]); + pools = [...pools, ...poolsAtCurrentPage]; + } + return pools; + }; +} +var queryAllV3Pools = graphqlRequest.gql` + query getPools($pageSize: Int!, $id: String) { + pools(first: $pageSize, where: { id_gt: $id }) { + id + tick + token0 { + symbol + id + decimals + } + token1 { + symbol + id + decimals + } + sqrtPrice + feeTier + liquidity + feeProtocol + totalValueLockedUSD + } + } +`; +var getAllV3PoolsFromSubgraph = subgraphAllPoolsQueryFactory({ + id: "getAllV3PoolsFromSubgraph", + getPoolsFromSubgraph: async ({ lastId, pageSize, client, chainId }) => { + const { pools: poolsFromSubgraph } = await client.request( + queryAllV3Pools, + { + pageSize, + id: lastId + } + ); + return poolsFromSubgraph.map( + ({ id, liquidity, sqrtPrice, tick, totalValueLockedUSD, feeProtocol, token0, token1, feeTier }) => { + const [token0ProtocolFee, token1ProtocolFee] = v3Sdk.parseProtocolFees(feeProtocol); + return { + type: 1 /* V3 */, + fee: Number(feeTier), + token0: new sdk.Token(chainId, viem.getAddress(token0.id), Number(token0.decimals), token0.symbol), + token1: new sdk.Token(chainId, viem.getAddress(token1.id), Number(token1.decimals), token1.symbol), + liquidity: BigInt(liquidity), + sqrtRatioX96: BigInt(sqrtPrice), + tick: Number(tick), + address: viem.getAddress(id), + tvlUSD: BigInt(Number.parseInt(totalValueLockedUSD)), + token0ProtocolFee, + token1ProtocolFee + }; + } + ); + }, + getPoolId: (p) => p.address +}); + +// evm/v3-router/providers/poolProviders/getV3CandidatePools.ts +var getV3PoolTvl = memoize( + (pools, poolAddress) => { + const poolWithTvl = pools.find((p) => p.address === poolAddress); + return poolWithTvl?.tvlUSD || 0n; + }, + (_, poolAddress) => poolAddress +); +var v3PoolsOnChainProviderFactory = (tvlReferenceProvider) => { + return async function getV3PoolsWithTvlFromOnChain2(params) { + const { currencyA, currencyB, pairs: providedPairs, onChainProvider, blockNumber } = params; + const pairs = providedPairs || await getPairCombinations(currencyA, currencyB); + const [fromOnChain, tvlReference] = await Promise.allSettled([ + getV3PoolsWithoutTicksOnChain(pairs, onChainProvider, blockNumber), + tvlReferenceProvider(params) + ]); + if (fromOnChain.status === "fulfilled" && tvlReference.status === "fulfilled") { + const { value: poolsFromOnChain } = fromOnChain; + const { value: poolTvlReferences } = tvlReference; + if (!Array.isArray(poolTvlReferences)) { + throw new Error("Failed to get tvl references"); + } + return poolsFromOnChain.map((pool) => { + const tvlUSD = BigInt(getV3PoolTvl(poolTvlReferences, pool.address)); + return { + ...pool, + tvlUSD + }; + }); + } + throw new Error(`Getting v3 pools failed. Onchain ${fromOnChain.status}, tvl references ${tvlReference.status}`); + }; +}; +var getV3PoolsWithTvlFromOnChain = v3PoolsOnChainProviderFactory(async (params) => { + const { currencyA, currencyB, pairs: providedPairs, subgraphProvider } = params; + const pairs = providedPairs || await getPairCombinations(currencyA, currencyB); + return getV3PoolSubgraph({ provider: subgraphProvider, pairs }); +}); +var createFallbackTvlRefGetter = () => { + const cache = /* @__PURE__ */ new Map(); + return async (params) => { + const { currencyA } = params; + if (!currencyA?.chainId) { + throw new Error(`Cannot get tvl references at chain ${currencyA?.chainId}`); + } + if (chains.isTestnetChainId(currencyA?.chainId)) { + return []; + } + const cached = cache.get(currencyA.chainId); + if (cached) { + return cached; + } + const res = await fetch(`https://routing-api.pancakeswap.com/v0/v3-pools-tvl/${currencyA.chainId}`); + const refs = await res.json(); + cache.set(currencyA.chainId, refs); + return refs; + }; +}; +var getV3PoolsWithTvlFromOnChainFallback = v3PoolsOnChainProviderFactory(createFallbackTvlRefGetter()); +var getV3PoolsWithTvlFromOnChainStaticFallback = v3PoolsOnChainProviderFactory(() => Promise.resolve([])); +function createGetV3CandidatePools(defaultGetV3Pools, options) { + const getV3PoolsWithFallbacks = createAsyncCallWithFallbacks(defaultGetV3Pools, options); + return async function getV3Pools2(params) { + const { currencyA, currencyB } = params; + const pools = await getV3PoolsWithFallbacks(params); + return v3PoolTvlSelector(currencyA, currencyB, pools); + }; +} +async function getV3CandidatePools(params) { + const { subgraphFallback = true, staticFallback = true, fallbackTimeout, ...rest } = params; + const fallbacks = []; + if (subgraphFallback) { + fallbacks.push(getV3PoolsWithTvlFromOnChain); + fallbacks.push(async (p) => { + const { currencyA, currencyB, pairs: providedPairs, subgraphProvider } = p; + const pairs = providedPairs || await getPairCombinations(currencyA, currencyB); + return getV3PoolSubgraph({ provider: subgraphProvider, pairs }); + }); + } + if (staticFallback) { + fallbacks.push(getV3PoolsWithTvlFromOnChainStaticFallback); + } + const getV3PoolsWithFallback = createGetV3CandidatePools(getV3PoolsWithTvlFromOnChainFallback, { + fallbacks, + fallbackTimeout + }); + return getV3PoolsWithFallback(rest); +} + +// evm/v3-router/providers/poolProviders/getStableCandidatePools.ts +async function getStableCandidatePools(params) { + const { onChainProvider, currencyA, currencyB, pairs: providedPairs, blockNumber } = params; + const pairs = providedPairs || await getPairCombinations(currencyA, currencyB); + return getStablePoolsOnChain(pairs, onChainProvider, blockNumber); +} + +// evm/v3-router/providers/poolProviders/getCandidatePools.ts +async function getCandidatePools({ + protocols = [1 /* V3 */, 0 /* V2 */, 2 /* STABLE */], + v3SubgraphProvider, + ...rest +}) { + const { currencyA } = rest; + const chainId = currencyA?.chainId; + if (!chainId) { + return []; + } + const poolSets = await Promise.all( + protocols.map((protocol) => { + if (protocol === 0 /* V2 */) { + return getV2CandidatePools({ ...rest, v3SubgraphProvider }); + } + if (protocol === 1 /* V3 */) { + return getV3CandidatePools({ ...rest, subgraphProvider: v3SubgraphProvider }); + } + return getStableCandidatePools(rest); + }) + ); + return poolSets.reduce((acc, cur) => { + acc.push(...cur); + return acc; + }, []); +} + +// evm/v3-router/providers/poolProviders/hybridPoolProvider.ts +function createHybridPoolProvider({ + onChainProvider, + v3SubgraphProvider +}) { + const hybridPoolProvider = { + getCandidatePools: async (params) => { + return getCandidatePools({ ...params, onChainProvider, v3SubgraphProvider }); + } + }; + return createPoolProviderWithCache(hybridPoolProvider); +} + +// evm/v3-router/providers/poolProviders/staticPoolProvider.ts +function createStaticPoolProvider(pools) { + const defaultAllowedProtocols = [0 /* V2 */, 2 /* STABLE */, 1 /* V3 */]; + return { + getCandidatePools: async ({ protocols = defaultAllowedProtocols, pairs }) => { + if (!pools) { + return []; + } + if (!pairs) { + return pools.filter((pool) => protocols.includes(pool.type)); + } + const relatedPools = []; + for (const [currencyA, currencyB] of pairs) { + for (const pool of pools) { + if (involvesCurrency(pool, currencyA) && involvesCurrency(pool, currencyB) && protocols.includes(pool.type)) { + relatedPools.push(pool); + } + } + } + return relatedPools; + } + }; +} + +// evm/v3-router/providers/poolProviders/index.ts +function createPoolProvider(config) { + const hybridPoolProvider = createHybridPoolProvider(config); + return hybridPoolProvider; +} +function createOffChainQuoteProvider() { + const createGetRoutesWithQuotes = (isExactIn = true) => { + const getV2Quote = createGetV2Quote(isExactIn); + const getStableQuote = createGetStableQuote(isExactIn); + const getV3Quote = createGetV3Quote(isExactIn); + function* each(pools) { + let i = isExactIn ? 0 : pools.length - 1; + const hasNext = () => isExactIn ? i < pools.length : i >= 0; + while (hasNext()) { + yield [pools[i], i]; + if (isExactIn) { + i += 1; + } else { + i -= 1; + } + } + } + const adjustQuoteForGas = (quote, gasCostInToken) => { + if (isExactIn) { + return quote.subtract(gasCostInToken); + } + return quote.add(gasCostInToken); + }; + return async function getRoutesWithQuotes(routes, { gasModel }) { + const routesWithQuote = []; + for (const route of routes) { + try { + const { pools, amount, output, input } = route; + const quoteCurrency = amount.currency.wrapped.equals(input.wrapped) ? output : input; + let quote = amount; + const initializedTickCrossedList = Array(pools.length).fill(0); + let quoteSuccess = true; + for (const [pool, i] of each(pools)) { + if (isV2Pool(pool)) { + ; + [quote] = getV2Quote(pool, quote); + continue; + } + if (isStablePool(pool)) { + ; + [quote] = getStableQuote(pool, quote); + continue; + } + if (isV3Pool(pool)) { + const v3QuoteResult = await getV3Quote(pool, quote); + if (!v3QuoteResult || v3QuoteResult.quote.quotient === sdk.ZERO) { + quoteSuccess = false; + break; + } + const { quote: v3Quote, numOfTicksCrossed } = v3QuoteResult; + quote = v3Quote; + initializedTickCrossedList[i] = numOfTicksCrossed; + } + } + if (!quoteSuccess) { + continue; + } + const finalQuote = sdk.CurrencyAmount.fromRawAmount(quoteCurrency, quote.quotient); + const { gasEstimate, gasCostInUSD, gasCostInToken } = gasModel.estimateGasCost( + { + ...route, + quote: finalQuote + }, + { initializedTickCrossedList } + ); + routesWithQuote.push({ + ...route, + quote: finalQuote, + quoteAdjustedForGas: adjustQuoteForGas(finalQuote, gasCostInToken), + gasEstimate, + gasCostInUSD, + gasCostInToken + }); + } catch (e) { + } + } + return routesWithQuote; + }; + }; + return { + getRouteWithQuotesExactIn: createGetRoutesWithQuotes(true), + getRouteWithQuotesExactOut: createGetRoutesWithQuotes(false) + }; +} +function createGetV2Quote(isExactIn = true) { + return function getV2Quote(p, amount) { + const { reserve0, reserve1 } = p; + const pair = new sdk.Pair(reserve0.wrapped, reserve1.wrapped); + const [quote, newPair] = isExactIn ? pair.getOutputAmount(amount.wrapped) : pair.getInputAmount(amount.wrapped); + const newPool = { ...p, reserve0: newPair.reserve0, reserve1: newPair.reserve1 }; + return [quote, newPool]; + }; +} +function createGetStableQuote(isExactIn = true) { + const getQuote = isExactIn ? stableSwapSdk.getQuoteExactIn : stableSwapSdk.getQuoteExactOut; + return function getStableQuote(pool, amount) { + const { amplifier, balances, fee } = pool; + const [quote, { balances: newBalances }] = getQuote({ + amount, + balances, + amplifier, + outputCurrency: getOutputCurrency(pool, amount.currency), + fee + }); + return [quote, { ...pool, balances: newBalances }]; + }; +} +function createGetV3Quote(isExactIn = true) { + return async function getV3Quote(pool, amount) { + const { token0, token1, fee, sqrtRatioX96, liquidity, ticks, tick } = pool; + if (!ticks?.length) { + return null; + } + try { + const v3Pool = new v3Sdk.Pool(token0.wrapped, token1.wrapped, fee, sqrtRatioX96, liquidity, tick, ticks); + const [quote, poolAfter] = isExactIn ? await v3Pool.getOutputAmount(amount.wrapped) : await v3Pool.getInputAmountByExactOut(amount.wrapped); + if (quote.quotient <= 0n) { + return null; + } + const { tickCurrent: tickAfter } = poolAfter; + const newPool = { + ...pool, + tick: tickAfter, + sqrtRatioX96: poolAfter.sqrtRatioX96, + liquidity: poolAfter.liquidity + }; + const numOfTicksCrossed = v3Sdk.TickList.countInitializedTicksCrossed(ticks, tick, tickAfter); + return { + quote, + numOfTicksCrossed, + pool: newPool + }; + } catch (e) { + return null; + } + }; +} +function createPoolQuoteGetter(isExactIn = true) { + const getV2Quote = createGetV2Quote(isExactIn); + const getStableQuote = createGetStableQuote(isExactIn); + const getV3Quote = createGetV3Quote(isExactIn); + return async function getPoolQuote(pool, amount) { + if (isV2Pool(pool)) { + const [quote, newPool] = getV2Quote(pool, amount); + return { quote, pool, poolAfter: newPool }; + } + if (isV3Pool(pool)) { + const quote = await getV3Quote(pool, amount); + return quote ? { quote: quote.quote, pool, poolAfter: quote.pool } : void 0; + } + if (isStablePool(pool)) { + const [quote, newPool] = getStableQuote(pool, amount); + return { quote, pool, poolAfter: newPool }; + } + return void 0; + }; +} + +// ../utils/abortControl.ts +function isAbortError(error) { + return error instanceof Error && error.name === "AbortError"; +} + +// evm/abis/IBinQuoter.ts +var binQuoterAbi = [ + { + inputs: [{ internalType: "address", name: "_poolManager", type: "address" }], + stateMutability: "nonpayable", + type: "constructor" + }, + { inputs: [{ internalType: "PoolId", name: "poolId", type: "bytes32" }], name: "NotEnoughLiquidity", type: "error" }, + { inputs: [], name: "NotSelf", type: "error" }, + { inputs: [], name: "NotVault", type: "error" }, + { inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }], name: "QuoteSwap", type: "error" }, + { inputs: [], name: "UnexpectedCallSuccess", type: "error" }, + { + inputs: [{ internalType: "bytes", name: "revertData", type: "bytes" }], + name: "UnexpectedRevertBytes", + type: "error" + }, + { + inputs: [ + { + components: [ + { internalType: "Currency", name: "exactCurrency", type: "address" }, + { + components: [ + { internalType: "Currency", name: "intermediateCurrency", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "bytes", name: "hookData", type: "bytes" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PathKey[]", + name: "path", + type: "tuple[]" + }, + { internalType: "uint128", name: "exactAmount", type: "uint128" } + ], + internalType: "struct IQuoter.QuoteExactParams", + name: "params", + type: "tuple" + } + ], + name: "_quoteExactInput", + outputs: [{ internalType: "bytes", name: "", type: "bytes" }], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { + components: [ + { internalType: "Currency", name: "currency0", type: "address" }, + { internalType: "Currency", name: "currency1", type: "address" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PoolKey", + name: "poolKey", + type: "tuple" + }, + { internalType: "bool", name: "zeroForOne", type: "bool" }, + { internalType: "uint128", name: "exactAmount", type: "uint128" }, + { internalType: "bytes", name: "hookData", type: "bytes" } + ], + internalType: "struct IQuoter.QuoteExactSingleParams", + name: "params", + type: "tuple" + } + ], + name: "_quoteExactInputSingle", + outputs: [{ internalType: "bytes", name: "", type: "bytes" }], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { internalType: "Currency", name: "exactCurrency", type: "address" }, + { + components: [ + { internalType: "Currency", name: "intermediateCurrency", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "bytes", name: "hookData", type: "bytes" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PathKey[]", + name: "path", + type: "tuple[]" + }, + { internalType: "uint128", name: "exactAmount", type: "uint128" } + ], + internalType: "struct IQuoter.QuoteExactParams", + name: "params", + type: "tuple" + } + ], + name: "_quoteExactOutput", + outputs: [{ internalType: "bytes", name: "", type: "bytes" }], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { + components: [ + { internalType: "Currency", name: "currency0", type: "address" }, + { internalType: "Currency", name: "currency1", type: "address" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PoolKey", + name: "poolKey", + type: "tuple" + }, + { internalType: "bool", name: "zeroForOne", type: "bool" }, + { internalType: "uint128", name: "exactAmount", type: "uint128" }, + { internalType: "bytes", name: "hookData", type: "bytes" } + ], + internalType: "struct IQuoter.QuoteExactSingleParams", + name: "params", + type: "tuple" + } + ], + name: "_quoteExactOutputSingle", + outputs: [{ internalType: "bytes", name: "", type: "bytes" }], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [{ internalType: "bytes", name: "data", type: "bytes" }], + name: "lockAcquired", + outputs: [{ internalType: "bytes", name: "", type: "bytes" }], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "poolManager", + outputs: [{ internalType: "contract IBinPoolManager", name: "", type: "address" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + components: [ + { internalType: "Currency", name: "exactCurrency", type: "address" }, + { + components: [ + { internalType: "Currency", name: "intermediateCurrency", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "bytes", name: "hookData", type: "bytes" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PathKey[]", + name: "path", + type: "tuple[]" + }, + { internalType: "uint128", name: "exactAmount", type: "uint128" } + ], + internalType: "struct IQuoter.QuoteExactParams", + name: "params", + type: "tuple" + } + ], + name: "quoteExactInput", + outputs: [ + { internalType: "uint256", name: "amountOut", type: "uint256" }, + { internalType: "uint256", name: "gasEstimate", type: "uint256" } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { + components: [ + { internalType: "Currency", name: "currency0", type: "address" }, + { internalType: "Currency", name: "currency1", type: "address" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PoolKey", + name: "poolKey", + type: "tuple" + }, + { internalType: "bool", name: "zeroForOne", type: "bool" }, + { internalType: "uint128", name: "exactAmount", type: "uint128" }, + { internalType: "bytes", name: "hookData", type: "bytes" } + ], + internalType: "struct IQuoter.QuoteExactSingleParams", + name: "params", + type: "tuple" + } + ], + name: "quoteExactInputSingle", + outputs: [ + { internalType: "uint256", name: "amountOut", type: "uint256" }, + { internalType: "uint256", name: "gasEstimate", type: "uint256" } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { internalType: "Currency", name: "exactCurrency", type: "address" }, + { + components: [ + { internalType: "Currency", name: "intermediateCurrency", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "bytes", name: "hookData", type: "bytes" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PathKey[]", + name: "path", + type: "tuple[]" + }, + { internalType: "uint128", name: "exactAmount", type: "uint128" } + ], + internalType: "struct IQuoter.QuoteExactParams", + name: "params", + type: "tuple" + } + ], + name: "quoteExactOutput", + outputs: [ + { internalType: "uint256", name: "amountIn", type: "uint256" }, + { internalType: "uint256", name: "gasEstimate", type: "uint256" } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { + components: [ + { internalType: "Currency", name: "currency0", type: "address" }, + { internalType: "Currency", name: "currency1", type: "address" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PoolKey", + name: "poolKey", + type: "tuple" + }, + { internalType: "bool", name: "zeroForOne", type: "bool" }, + { internalType: "uint128", name: "exactAmount", type: "uint128" }, + { internalType: "bytes", name: "hookData", type: "bytes" } + ], + internalType: "struct IQuoter.QuoteExactSingleParams", + name: "params", + type: "tuple" + } + ], + name: "quoteExactOutputSingle", + outputs: [ + { internalType: "uint256", name: "amountIn", type: "uint256" }, + { internalType: "uint256", name: "gasEstimate", type: "uint256" } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "vault", + outputs: [{ internalType: "contract IVault", name: "", type: "address" }], + stateMutability: "view", + type: "function" + } +]; + +// evm/abis/ICLQuoter.ts +var clQuoterAbi = [ + { + inputs: [{ internalType: "address", name: "_poolManager", type: "address" }], + stateMutability: "nonpayable", + type: "constructor" + }, + { inputs: [{ internalType: "PoolId", name: "poolId", type: "bytes32" }], name: "NotEnoughLiquidity", type: "error" }, + { inputs: [], name: "NotSelf", type: "error" }, + { inputs: [], name: "NotVault", type: "error" }, + { inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }], name: "QuoteSwap", type: "error" }, + { inputs: [], name: "UnexpectedCallSuccess", type: "error" }, + { + inputs: [{ internalType: "bytes", name: "revertData", type: "bytes" }], + name: "UnexpectedRevertBytes", + type: "error" + }, + { + inputs: [ + { + components: [ + { internalType: "Currency", name: "exactCurrency", type: "address" }, + { + components: [ + { internalType: "Currency", name: "intermediateCurrency", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "bytes", name: "hookData", type: "bytes" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PathKey[]", + name: "path", + type: "tuple[]" + }, + { internalType: "uint128", name: "exactAmount", type: "uint128" } + ], + internalType: "struct IQuoter.QuoteExactParams", + name: "params", + type: "tuple" + } + ], + name: "_quoteExactInput", + outputs: [{ internalType: "bytes", name: "", type: "bytes" }], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { + components: [ + { internalType: "Currency", name: "currency0", type: "address" }, + { internalType: "Currency", name: "currency1", type: "address" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PoolKey", + name: "poolKey", + type: "tuple" + }, + { internalType: "bool", name: "zeroForOne", type: "bool" }, + { internalType: "uint128", name: "exactAmount", type: "uint128" }, + { internalType: "bytes", name: "hookData", type: "bytes" } + ], + internalType: "struct IQuoter.QuoteExactSingleParams", + name: "params", + type: "tuple" + } + ], + name: "_quoteExactInputSingle", + outputs: [{ internalType: "bytes", name: "", type: "bytes" }], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { internalType: "Currency", name: "exactCurrency", type: "address" }, + { + components: [ + { internalType: "Currency", name: "intermediateCurrency", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "bytes", name: "hookData", type: "bytes" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PathKey[]", + name: "path", + type: "tuple[]" + }, + { internalType: "uint128", name: "exactAmount", type: "uint128" } + ], + internalType: "struct IQuoter.QuoteExactParams", + name: "params", + type: "tuple" + } + ], + name: "_quoteExactOutput", + outputs: [{ internalType: "bytes", name: "", type: "bytes" }], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { + components: [ + { internalType: "Currency", name: "currency0", type: "address" }, + { internalType: "Currency", name: "currency1", type: "address" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PoolKey", + name: "poolKey", + type: "tuple" + }, + { internalType: "bool", name: "zeroForOne", type: "bool" }, + { internalType: "uint128", name: "exactAmount", type: "uint128" }, + { internalType: "bytes", name: "hookData", type: "bytes" } + ], + internalType: "struct IQuoter.QuoteExactSingleParams", + name: "params", + type: "tuple" + } + ], + name: "_quoteExactOutputSingle", + outputs: [{ internalType: "bytes", name: "", type: "bytes" }], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [{ internalType: "bytes", name: "data", type: "bytes" }], + name: "lockAcquired", + outputs: [{ internalType: "bytes", name: "", type: "bytes" }], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "poolManager", + outputs: [{ internalType: "contract ICLPoolManager", name: "", type: "address" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + components: [ + { internalType: "Currency", name: "exactCurrency", type: "address" }, + { + components: [ + { internalType: "Currency", name: "intermediateCurrency", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "bytes", name: "hookData", type: "bytes" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PathKey[]", + name: "path", + type: "tuple[]" + }, + { internalType: "uint128", name: "exactAmount", type: "uint128" } + ], + internalType: "struct IQuoter.QuoteExactParams", + name: "params", + type: "tuple" + } + ], + name: "quoteExactInput", + outputs: [ + { internalType: "uint256", name: "amountOut", type: "uint256" }, + { internalType: "uint256", name: "gasEstimate", type: "uint256" } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { + components: [ + { internalType: "Currency", name: "currency0", type: "address" }, + { internalType: "Currency", name: "currency1", type: "address" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PoolKey", + name: "poolKey", + type: "tuple" + }, + { internalType: "bool", name: "zeroForOne", type: "bool" }, + { internalType: "uint128", name: "exactAmount", type: "uint128" }, + { internalType: "bytes", name: "hookData", type: "bytes" } + ], + internalType: "struct IQuoter.QuoteExactSingleParams", + name: "params", + type: "tuple" + } + ], + name: "quoteExactInputSingle", + outputs: [ + { internalType: "uint256", name: "amountOut", type: "uint256" }, + { internalType: "uint256", name: "gasEstimate", type: "uint256" } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { internalType: "Currency", name: "exactCurrency", type: "address" }, + { + components: [ + { internalType: "Currency", name: "intermediateCurrency", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "bytes", name: "hookData", type: "bytes" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PathKey[]", + name: "path", + type: "tuple[]" + }, + { internalType: "uint128", name: "exactAmount", type: "uint128" } + ], + internalType: "struct IQuoter.QuoteExactParams", + name: "params", + type: "tuple" + } + ], + name: "quoteExactOutput", + outputs: [ + { internalType: "uint256", name: "amountIn", type: "uint256" }, + { internalType: "uint256", name: "gasEstimate", type: "uint256" } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { + components: [ + { internalType: "Currency", name: "currency0", type: "address" }, + { internalType: "Currency", name: "currency1", type: "address" }, + { internalType: "contract IHooks", name: "hooks", type: "address" }, + { internalType: "contract IPoolManager", name: "poolManager", type: "address" }, + { internalType: "uint24", name: "fee", type: "uint24" }, + { internalType: "bytes32", name: "parameters", type: "bytes32" } + ], + internalType: "struct PoolKey", + name: "poolKey", + type: "tuple" + }, + { internalType: "bool", name: "zeroForOne", type: "bool" }, + { internalType: "uint128", name: "exactAmount", type: "uint128" }, + { internalType: "bytes", name: "hookData", type: "bytes" } + ], + internalType: "struct IQuoter.QuoteExactSingleParams", + name: "params", + type: "tuple" + } + ], + name: "quoteExactOutputSingle", + outputs: [ + { internalType: "uint256", name: "amountIn", type: "uint256" }, + { internalType: "uint256", name: "gasEstimate", type: "uint256" } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "vault", + outputs: [{ internalType: "contract IVault", name: "", type: "address" }], + stateMutability: "view", + type: "function" + } +]; + +// evm/abis/IInfinityMixedRouteQuoter.ts +var infinityMixedRouteQuoterAbi = [ + { + type: "constructor", + inputs: [ + { name: "_factoryV3", type: "address", internalType: "address" }, + { name: "_factoryV2", type: "address", internalType: "address" }, + { name: "_factoryStable", type: "address", internalType: "address" }, + { name: "_WETH9", type: "address", internalType: "address" }, + { name: "_clQuoter", type: "address", internalType: "contract ICLQuoter" }, + { name: "_binQuoter", type: "address", internalType: "contract IBinQuoter" } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "WETH9", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view" + }, + { + type: "function", + name: "binQuoter", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "contract IBinQuoter" }], + stateMutability: "view" + }, + { + type: "function", + name: "clQuoter", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "contract ICLQuoter" }], + stateMutability: "view" + }, + { + type: "function", + name: "factoryStable", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view" + }, + { + type: "function", + name: "factoryV2", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view" + }, + { + type: "function", + name: "factoryV3", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view" + }, + { + type: "function", + name: "multicall", + inputs: [{ name: "data", type: "bytes[]", internalType: "bytes[]" }], + outputs: [{ name: "results", type: "bytes[]", internalType: "bytes[]" }], + stateMutability: "payable" + }, + { + type: "function", + name: "pancakeV3SwapCallback", + inputs: [ + { name: "amount0Delta", type: "int256", internalType: "int256" }, + { name: "amount1Delta", type: "int256", internalType: "int256" }, + { name: "data", type: "bytes", internalType: "bytes" } + ], + outputs: [], + stateMutability: "view" + }, + { + type: "function", + name: "quoteExactInputSingleStable", + inputs: [ + { + name: "params", + type: "tuple", + internalType: "struct IMixedQuoter.QuoteExactInputSingleStableParams", + components: [ + { name: "tokenIn", type: "address", internalType: "address" }, + { name: "tokenOut", type: "address", internalType: "address" }, + { name: "amountIn", type: "uint256", internalType: "uint256" }, + { name: "flag", type: "uint256", internalType: "uint256" } + ] + } + ], + outputs: [ + { name: "amountOut", type: "uint256", internalType: "uint256" }, + { name: "gasEstimate", type: "uint256", internalType: "uint256" } + ], + stateMutability: "view" + }, + { + type: "function", + name: "quoteExactInputSingleV2", + inputs: [ + { + name: "params", + type: "tuple", + internalType: "struct IMixedQuoter.QuoteExactInputSingleV2Params", + components: [ + { name: "tokenIn", type: "address", internalType: "address" }, + { name: "tokenOut", type: "address", internalType: "address" }, + { name: "amountIn", type: "uint256", internalType: "uint256" } + ] + } + ], + outputs: [ + { name: "amountOut", type: "uint256", internalType: "uint256" }, + { name: "gasEstimate", type: "uint256", internalType: "uint256" } + ], + stateMutability: "view" + }, + { + type: "function", + name: "quoteExactInputSingleV3", + inputs: [ + { + name: "params", + type: "tuple", + internalType: "struct IMixedQuoter.QuoteExactInputSingleV3Params", + components: [ + { name: "tokenIn", type: "address", internalType: "address" }, + { name: "tokenOut", type: "address", internalType: "address" }, + { name: "amountIn", type: "uint256", internalType: "uint256" }, + { name: "fee", type: "uint24", internalType: "uint24" }, + { name: "sqrtPriceLimitX96", type: "uint160", internalType: "uint160" } + ] + } + ], + outputs: [ + { name: "amountOut", type: "uint256", internalType: "uint256" }, + { name: "sqrtPriceX96After", type: "uint160", internalType: "uint160" }, + { name: "initializedTicksCrossed", type: "uint32", internalType: "uint32" }, + { name: "gasEstimate", type: "uint256", internalType: "uint256" } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "quoteMixedExactInput", + inputs: [ + { name: "paths", type: "address[]", internalType: "address[]" }, + { name: "actions", type: "bytes", internalType: "bytes" }, + { name: "params", type: "bytes[]", internalType: "bytes[]" }, + { name: "amountIn", type: "uint256", internalType: "uint256" } + ], + outputs: [ + { name: "amountOut", type: "uint256", internalType: "uint256" }, + { name: "gasEstimate", type: "uint256", internalType: "uint256" } + ], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "quoteMixedExactInputSharedContext", + inputs: [ + { name: "paths", type: "address[]", internalType: "address[]" }, + { name: "actions", type: "bytes", internalType: "bytes" }, + { name: "params", type: "bytes[]", internalType: "bytes[]" }, + { name: "amountIn", type: "uint256", internalType: "uint256" } + ], + outputs: [ + { name: "amountOut", type: "uint256", internalType: "uint256" }, + { name: "gasEstimate", type: "uint256", internalType: "uint256" } + ], + stateMutability: "nonpayable" + }, + { type: "error", name: "INVALID_ADDRESS", inputs: [] }, + { type: "error", name: "INVALID_SWAP_DIRECTION", inputs: [] }, + { type: "error", name: "InputLengthMismatch", inputs: [] }, + { type: "error", name: "InvalidPath", inputs: [] }, + { type: "error", name: "InvalidPoolKeyCurrency", inputs: [] }, + { type: "error", name: "NoActions", inputs: [] }, + { + type: "error", + name: "SafeCastOverflowedUintDowncast", + inputs: [ + { name: "bits", type: "uint8", internalType: "uint8" }, + { name: "value", type: "uint256", internalType: "uint256" } + ] + }, + { + type: "error", + name: "SafeCastOverflowedUintToInt", + inputs: [{ name: "value", type: "uint256", internalType: "uint256" }] + }, + { type: "error", name: "UnsupportedAction", inputs: [{ name: "action", type: "uint256", internalType: "uint256" }] } +]; + +// evm/abis/IMixedRouteQuoterV1.ts +var mixedRouteQuoterV1ABI = [ + { + inputs: [ + { + internalType: "address", + name: "_deployer", + type: "address" + }, + { + internalType: "address", + name: "_factory", + type: "address" + }, + { + internalType: "address", + name: "_factoryV2", + type: "address" + }, + { + internalType: "address", + name: "_factoryStable", + type: "address" + }, + { + internalType: "address", + name: "_WETH9", + type: "address" + } + ], + stateMutability: "nonpayable", + type: "constructor" + }, + { + inputs: [], + name: "WETH9", + outputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "deployer", + outputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "factory", + outputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "factoryStable", + outputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "factoryV2", + outputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "int256", + name: "amount0Delta", + type: "int256" + }, + { + internalType: "int256", + name: "amount1Delta", + type: "int256" + }, + { + internalType: "bytes", + name: "path", + type: "bytes" + } + ], + name: "pancakeV3SwapCallback", + outputs: [], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "bytes", + name: "path", + type: "bytes" + }, + { + internalType: "uint256[]", + name: "flag", + type: "uint256[]" + }, + { + internalType: "uint256", + name: "amountIn", + type: "uint256" + } + ], + name: "quoteExactInput", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256" + }, + { + internalType: "uint160[]", + name: "v3SqrtPriceX96AfterList", + type: "uint160[]" + }, + { + internalType: "uint32[]", + name: "v3InitializedTicksCrossedList", + type: "uint32[]" + }, + { + internalType: "uint256", + name: "v3SwapGasEstimate", + type: "uint256" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "tokenIn", + type: "address" + }, + { + internalType: "address", + name: "tokenOut", + type: "address" + }, + { + internalType: "uint256", + name: "amountIn", + type: "uint256" + }, + { + internalType: "uint256", + name: "flag", + type: "uint256" + } + ], + internalType: "struct IMixedRouteQuoterV1.QuoteExactInputSingleStableParams", + name: "params", + type: "tuple" + } + ], + name: "quoteExactInputSingleStable", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "tokenIn", + type: "address" + }, + { + internalType: "address", + name: "tokenOut", + type: "address" + }, + { + internalType: "uint256", + name: "amountIn", + type: "uint256" + } + ], + internalType: "struct IMixedRouteQuoterV1.QuoteExactInputSingleV2Params", + name: "params", + type: "tuple" + } + ], + name: "quoteExactInputSingleV2", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "tokenIn", + type: "address" + }, + { + internalType: "address", + name: "tokenOut", + type: "address" + }, + { + internalType: "uint256", + name: "amountIn", + type: "uint256" + }, + { + internalType: "uint24", + name: "fee", + type: "uint24" + }, + { + internalType: "uint160", + name: "sqrtPriceLimitX96", + type: "uint160" + } + ], + internalType: "struct IMixedRouteQuoterV1.QuoteExactInputSingleV3Params", + name: "params", + type: "tuple" + } + ], + name: "quoteExactInputSingleV3", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256" + }, + { + internalType: "uint160", + name: "sqrtPriceX96After", + type: "uint160" + }, + { + internalType: "uint32", + name: "initializedTicksCrossed", + type: "uint32" + }, + { + internalType: "uint256", + name: "gasEstimate", + type: "uint256" + } + ], + stateMutability: "nonpayable", + type: "function" + } +]; + +// evm/abis/IQuoterV2.ts +var quoterV2ABI = [ + { + inputs: [ + { + internalType: "bytes", + name: "path", + type: "bytes" + }, + { + internalType: "uint256", + name: "amountIn", + type: "uint256" + } + ], + name: "quoteExactInput", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256" + }, + { + internalType: "uint160[]", + name: "sqrtPriceX96AfterList", + type: "uint160[]" + }, + { + internalType: "uint32[]", + name: "initializedTicksCrossedList", + type: "uint32[]" + }, + { + internalType: "uint256", + name: "gasEstimate", + type: "uint256" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "tokenIn", + type: "address" + }, + { + internalType: "address", + name: "tokenOut", + type: "address" + }, + { + internalType: "uint256", + name: "amountIn", + type: "uint256" + }, + { + internalType: "uint24", + name: "fee", + type: "uint24" + }, + { + internalType: "uint160", + name: "sqrtPriceLimitX96", + type: "uint160" + } + ], + internalType: "struct IQuoterV2.QuoteExactInputSingleParams", + name: "params", + type: "tuple" + } + ], + name: "quoteExactInputSingle", + outputs: [ + { + internalType: "uint256", + name: "amountOut", + type: "uint256" + }, + { + internalType: "uint160", + name: "sqrtPriceX96After", + type: "uint160" + }, + { + internalType: "uint32", + name: "initializedTicksCrossed", + type: "uint32" + }, + { + internalType: "uint256", + name: "gasEstimate", + type: "uint256" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "bytes", + name: "path", + type: "bytes" + }, + { + internalType: "uint256", + name: "amountOut", + type: "uint256" + } + ], + name: "quoteExactOutput", + outputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256" + }, + { + internalType: "uint160[]", + name: "sqrtPriceX96AfterList", + type: "uint160[]" + }, + { + internalType: "uint32[]", + name: "initializedTicksCrossedList", + type: "uint32[]" + }, + { + internalType: "uint256", + name: "gasEstimate", + type: "uint256" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "tokenIn", + type: "address" + }, + { + internalType: "address", + name: "tokenOut", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + }, + { + internalType: "uint24", + name: "fee", + type: "uint24" + }, + { + internalType: "uint160", + name: "sqrtPriceLimitX96", + type: "uint160" + } + ], + internalType: "struct IQuoterV2.QuoteExactOutputSingleParams", + name: "params", + type: "tuple" + } + ], + name: "quoteExactOutputSingle", + outputs: [ + { + internalType: "uint256", + name: "amountIn", + type: "uint256" + }, + { + internalType: "uint160", + name: "sqrtPriceX96After", + type: "uint160" + }, + { + internalType: "uint32", + name: "initializedTicksCrossed", + type: "uint32" + }, + { + internalType: "uint256", + name: "gasEstimate", + type: "uint256" + } + ], + stateMutability: "nonpayable", + type: "function" + } +]; +function encodeInfinityMixedRouteActions(route) { + return viem.bytesToHex( + new Uint8Array( + route.pools.map((p) => { + if (isV2Pool(p)) { + return 2 /* V2_EXACT_INPUT_SINGLE */; + } + if (isV3Pool(p)) { + return 3 /* V3_EXACT_INPUT_SINGLE */; + } + if (isStablePool(p)) { + return 0 /* SS_2_EXACT_INPUT_SINGLE */; + } + if (isInfinityClPool(p) || isInfinityStablePool(p)) { + return 4 /* INFI_CL_EXACT_INPUT_SINGLE */; + } + if (isInfinityBinPool(p)) { + return 5 /* INFI_BIN_EXACT_INPUT_SINGLE */; + } + throw new Error(`Unrecognized pool type ${p}`); + }) + ) + ); +} +function getPoolCurrencies(pool) { + if (isV2Pool(pool)) { + return [pool.reserve0.currency, pool.reserve1.currency]; + } + if (isV3Pool(pool)) { + return [pool.token0, pool.token1]; + } + if (isStablePool(pool)) { + return pool.balances.map((b) => b.currency); + } + if (isInfinityClPool(pool) || isInfinityBinPool(pool) || isInfinityStablePool(pool)) { + return [pool.currency0, pool.currency1]; + } + throw new Error("Failed to get pool currencies. Unrecognized pool type"); +} +function encodeInfinityMixedRouteCurrencyPath(route) { + const { pools } = route; + const currencyStart = route.path[0]; + const pathStart = swapSdkCore.getMatchedCurrency(currencyStart, getPoolCurrencies(pools[0])); + if (!pathStart) { + throw new Error("Failed to encode path keys. Invalid start currency."); + } + const { path } = pools.reduce( + ({ baseCurrency, path: path2 }, p) => { + const quoteCurrency = getOutputCurrency(p, baseCurrency); + return { + baseCurrency: quoteCurrency, + path: [...path2, swapSdkCore.getCurrencyAddress(quoteCurrency)] + }; + }, + { baseCurrency: pathStart, path: [swapSdkCore.getCurrencyAddress(pathStart)] } + ); + return path; +} +var infinityRouteParamsAbi = [ + { + components: [ + { + components: [ + { name: "currency0", type: "address" }, + { name: "currency1", type: "address" }, + { name: "hooks", type: "address" }, + { name: "poolManager", type: "address" }, + { name: "fee", type: "uint24" }, + { name: "parameters", type: "bytes32" } + ], + name: "poolKey", + type: "tuple" + }, + { name: "hookData", type: "bytes" } + ], + name: "params", + type: "tuple" + } +]; +function encodeInfinityMixedRouteParams(route) { + return route.pools.map((p) => { + if (isV2Pool(p) || isStablePool(p)) { + return "0x"; + } + if (isV3Pool(p)) { + return viem.encodeAbiParameters(viem.parseAbiParameters("uint24"), [p.fee]); + } + if (isInfinityClPool(p) || isInfinityStablePool(p)) { + const poolKey = { + currency0: swapSdkCore.getCurrencyAddress(p.currency0), + currency1: swapSdkCore.getCurrencyAddress(p.currency1), + fee: infinitySdk.isDynamicFeeHook(p.currency0.chainId, p.hooks) ? infinitySdk.DYNAMIC_FEE_FLAG : p.fee, + hooks: p.hooks, + poolManager: p.poolManager, + parameters: { + tickSpacing: p.tickSpacing, + hooksRegistration: p.hooksRegistrationBitmap !== void 0 ? infinitySdk.decodeHooksRegistration(p.hooksRegistrationBitmap) : void 0 + } + }; + return viem.encodeAbiParameters(infinityRouteParamsAbi, [ + { + poolKey: infinitySdk.encodePoolKey(poolKey), + hookData: "0x" + } + ]); + } + if (isInfinityBinPool(p)) { + const poolKey = { + currency0: swapSdkCore.getCurrencyAddress(p.currency0), + currency1: swapSdkCore.getCurrencyAddress(p.currency1), + fee: infinitySdk.isDynamicFeeHook(p.currency0.chainId, p.hooks) ? infinitySdk.DYNAMIC_FEE_FLAG : p.fee, + hooks: p.hooks, + poolManager: p.poolManager, + parameters: { + binStep: Number(p.binStep), + hooksRegistration: p.hooksRegistrationBitmap !== void 0 ? infinitySdk.decodeHooksRegistration(p.hooksRegistrationBitmap) : void 0 + } + }; + return viem.encodeAbiParameters(infinityRouteParamsAbi, [ + { + poolKey: infinitySdk.encodePoolKey(poolKey), + hookData: "0x" + } + ]); + } + throw new Error(`Invalid pool type ${p}`); + }); +} + +// evm/abis/InterfaceMulticall.ts +var InterfaceMulticall_default = [ + { + inputs: [], + name: "getCurrentBlockTimestamp", + outputs: [ + { + internalType: "uint256", + name: "timestamp", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "addr", + type: "address" + } + ], + name: "getEthBalance", + outputs: [ + { + internalType: "uint256", + name: "balance", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "target", + type: "address" + }, + { + internalType: "uint256", + name: "gasLimit", + type: "uint256" + }, + { + internalType: "bytes", + name: "callData", + type: "bytes" + } + ], + internalType: "struct PancakeInterfaceMulticall.Call[]", + name: "calls", + type: "tuple[]" + } + ], + name: "multicall", + outputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256" + }, + { + components: [ + { + internalType: "bool", + name: "success", + type: "bool" + }, + { + internalType: "uint256", + name: "gasUsed", + type: "uint256" + }, + { + internalType: "bytes", + name: "returnData", + type: "bytes" + } + ], + internalType: "struct PancakeInterfaceMulticall.Result[]", + name: "returnData", + type: "tuple[]" + } + ], + stateMutability: "nonpayable", + type: "function" + } +]; + +// evm/v3-router/providers/multicallProvider.ts +var IMulticallProvider = class { +}; + +// evm/v3-router/providers/multicallSwapProvider.ts +var PancakeMulticallProvider = class extends IMulticallProvider { + constructor(chainId, provider, gasLimitPerCall = 1e6) { + super(); + this.chainId = chainId; + this.provider = provider; + this.gasLimitPerCall = gasLimitPerCall; + this.provider = provider; + } + async callSameFunctionOnMultipleContracts(params) { + const { addresses, functionName, functionParams, abi, additionalConfig } = params; + const gasLimitPerCall = additionalConfig?.gasLimitPerCall ?? this.gasLimitPerCall; + const callData = viem.encodeFunctionData({ + abi, + functionName, + args: functionParams + }); + const calls = addresses.map((address) => { + return { + target: address, + callData, + gasLimit: BigInt(gasLimitPerCall) + }; + }); + const { results: result, blockNumber } = await multicall.multicallByGasLimit(calls, { + gasLimit: additionalConfig?.gasLimit, + gasBuffer: additionalConfig?.gasBuffer, + dropUnexecutedCalls: additionalConfig?.dropUnexecutedCalls, + chainId: this.chainId, + client: this.provider, + signal: additionalConfig?.signal + }); + const results = []; + const gasUsedForSuccess = []; + const gasUsedForFail = []; + for (const { result: callResult, success, gasUsed } of result) { + if (callResult === "0x" || !success) { + results.push({ + success: false, + returnData: callResult + }); + gasUsedForFail.push(Number(gasUsed)); + continue; + } + try { + results.push({ + success: true, + result: viem.decodeFunctionResult({ + abi, + functionName, + data: callResult + }) + }); + gasUsedForSuccess.push(Number(gasUsed)); + } catch (e) { + results.push({ + success: false, + returnData: callResult + }); + } + } + return { + blockNumber, + results, + approxGasUsedPerSuccessCall: stats__default.default.percentile(gasUsedForSuccess, 99), + approxGasUsedPerFailCall: stats__default.default.percentile(gasUsedForFail, 99) + }; + } + async callSameFunctionOnContractWithMultipleParams(params) { + const { address, functionName, functionParams, abi, additionalConfig, account } = params; + const gasLimitPerCall = additionalConfig?.gasLimitPerCall ?? this.gasLimitPerCall; + const calls = functionParams.map((functionParam) => { + const callData = viem.encodeFunctionData({ + abi, + functionName, + args: functionParam + }); + return { + target: address, + callData, + gasLimit: BigInt(gasLimitPerCall) + }; + }); + const { results: result, blockNumber } = await multicall.multicallByGasLimit(calls, { + gasLimit: additionalConfig?.gasLimit, + gasBuffer: additionalConfig?.gasBuffer, + dropUnexecutedCalls: additionalConfig?.dropUnexecutedCalls, + chainId: this.chainId, + client: this.provider, + signal: additionalConfig?.signal, + account + }); + const results = []; + const gasUsedForSuccess = []; + const gasUsedForFail = []; + for (const { result: callResult, success, gasUsed } of result) { + if (callResult === "0x" || !success) { + results.push({ + success: false, + returnData: callResult + }); + gasUsedForFail.push(Number(gasUsed)); + continue; + } + try { + results.push({ + success: true, + result: viem.decodeFunctionResult({ + abi, + functionName, + data: callResult + }) + }); + gasUsedForSuccess.push(Number(gasUsed)); + } catch (e) { + results.push({ + success: false, + returnData: callResult + }); + } + } + return { + blockNumber, + results, + approxGasUsedPerSuccessCall: stats__default.default.percentile(gasUsedForSuccess, 99), + approxGasUsedPerFailCall: stats__default.default.percentile(gasUsedForFail, 99) + }; + } + async callMultipleFunctionsOnSameContract(params) { + const { address, functionNames, functionParams, additionalConfig, abi } = params; + const gasLimitPerCall = additionalConfig?.gasLimitPerCall ?? this.gasLimitPerCall; + const calls = functionNames.map((functionName, i) => { + const callData = viem.encodeFunctionData({ + abi, + functionName, + args: functionParams ? functionParams[i] : [] + }); + return { + target: address, + callData, + gasLimit: BigInt(gasLimitPerCall) + }; + }); + const { results: result, blockNumber } = await multicall.multicallByGasLimit(calls, { + gasLimit: additionalConfig?.gasLimit, + gasBuffer: additionalConfig?.gasBuffer, + dropUnexecutedCalls: additionalConfig?.dropUnexecutedCalls, + chainId: this.chainId, + client: this.provider, + signal: additionalConfig?.signal + }); + const results = []; + const gasUsedForSuccess = []; + const gasUsedForFail = []; + for (const [i, { result: callResult, success, gasUsed }] of result.entries()) { + if (callResult === "0x" || !success) { + results.push({ + success: false, + returnData: callResult + }); + gasUsedForFail.push(Number(gasUsed)); + continue; + } + try { + results.push({ + success: true, + result: viem.decodeFunctionResult({ + abi, + functionName: functionNames[i], + data: callResult + }) + }); + gasUsedForSuccess.push(Number(gasUsed)); + } catch (e) { + results.push({ + success: false, + returnData: callResult + }); + } + } + return { + blockNumber, + results, + approxGasUsedPerSuccessCall: stats__default.default.percentile(gasUsedForSuccess, 99), + approxGasUsedPerFailCall: stats__default.default.percentile(gasUsedForFail, 99) + }; + } +}; +PancakeMulticallProvider.abi = InterfaceMulticall_default; + +// evm/v3-router/providers/onChainQuoteProvider.ts +var DEFAULT_BATCH_RETRIES = 2; +var SUCCESS_RATE_CONFIG = { + [chains.ChainId.BSC_TESTNET]: 0.1, + [chains.ChainId.BSC]: 0.1, + [chains.ChainId.ETHEREUM]: 0.1, + [chains.ChainId.GOERLI]: 0.1, + [chains.ChainId.ARBITRUM_ONE]: 0.1, + [chains.ChainId.ARBITRUM_GOERLI]: 0.1, + [chains.ChainId.ZKSYNC]: 0.2, + [chains.ChainId.ZKSYNC_TESTNET]: 0.1, + [chains.ChainId.LINEA]: 0.1, + [chains.ChainId.LINEA_TESTNET]: 0.1, + [chains.ChainId.OPBNB]: 0.1, + [chains.ChainId.OPBNB_TESTNET]: 0.1, + [chains.ChainId.BASE]: 0.1, + [chains.ChainId.BASE_TESTNET]: 0.1, + [chains.ChainId.SCROLL_SEPOLIA]: 0.1, + [chains.ChainId.SEPOLIA]: 0.1, + [chains.ChainId.ARBITRUM_SEPOLIA]: 0.1, + [chains.ChainId.BASE_SEPOLIA]: 0.1, + [chains.ChainId.MONAD_TESTNET]: 0.1, + [chains.ChainId.MONAD_MAINNET]: 0.1, + [chains.ChainId.ROBINHOOD]: 0.1, + [chains.ChainId.ARC]: 0.1 +}; +var BlockConflictError = class extends Error { + constructor() { + super(...arguments); + this.name = "BlockConflictError"; + } +}; +var SuccessRateError = class extends Error { + constructor() { + super(...arguments); + this.name = "SuccessRateError"; + } +}; +var ProviderBlockHeaderError = class extends Error { + constructor() { + super(...arguments); + this.name = "ProviderBlockHeaderError"; + } +}; +var ProviderTimeoutError = class extends Error { + constructor() { + super(...arguments); + this.name = "ProviderTimeoutError"; + } +}; +var ProviderGasError = class extends Error { + constructor() { + super(...arguments); + this.name = "ProviderGasError"; + } +}; +var retryControllerFactory = ({ retries }) => { + const errors = []; + let remainingRetries = retries || 0; + return { + shouldRetry: (error) => !isAbortError(error) && remainingRetries > 0 && errors.every((err) => err.name !== error.name), + onRetry: (error) => { + errors.push(error); + remainingRetries -= 1; + }, + getErrorsOnPreviousRetries: () => errors + }; +}; +var defaultAdjustQuoteForGas = ({ isExactIn, quote, gasCostInToken }) => isExactIn ? quote.subtract(gasCostInToken) : quote.add(gasCostInToken); +function onChainQuoteProviderFactory({ getQuoteFunctionName, getQuoterAddress, abi, getCallInputs }) { + return function createOnChainQuoteProvider({ + onChainProvider, + gasLimit, + multicallConfigs: multicallConfigsOverride, + onAdjustQuoteForGas = defaultAdjustQuoteForGas, + account + }) { + const createGetRoutesWithQuotes = (isExactIn = true) => { + const functionName = getQuoteFunctionName(isExactIn); + const adjustQuoteForGas = ({ quote, gasCostInToken }) => onAdjustQuoteForGas({ quote, gasCostInToken, isExactIn }); + return async function getRoutesWithQuote(routes, { blockNumber: blockNumberFromConfig, gasModel, retry: retryOptions, signal, quoteId }) { + const logger3 = RemoteLogger.getLogger(quoteId); + if (!routes.length) { + return []; + } + const { + amount: { + currency: { chainId } + } + } = routes[0]; + const quoterAddress = getQuoterAddress(chainId); + const minSuccessRate = SUCCESS_RATE_CONFIG[chainId]; + const multicallConfigs = multicallConfigsOverride?.[chainId] || chunkZNSTBYLO_js.BATCH_MULTICALL_CONFIGS[chainId] || chunkZNSTBYLO_js.BATCH_MULTICALL_CONFIGS[chains.ChainId.ETHEREUM]; + const { + defaultConfig: { gasLimitPerCall: defaultGasLimitPerCall, dropUnexecutedCalls } + } = multicallConfigs; + const chainProvider = onChainProvider({ chainId }); + const providerConfig = { blockNumber: blockNumberFromConfig }; + const multicall2Provider = new PancakeMulticallProvider(chainId, chainProvider, defaultGasLimitPerCall); + const inputs = routes.map((route) => getCallInputs(route, isExactIn)); + logger3.debug(`Try quoter with Inputs: ${inputs.length}`, 3); + logger3.debug(`:${quoterAddress} ${functionName}`, 3); + logger3.debugJson(inputs[0], 3); + const retryOptionsWithDefault = { + retries: DEFAULT_BATCH_RETRIES, + minTimeout: 25, + maxTimeout: 250, + ...retryOptions + }; + const { shouldRetry, onRetry } = retryControllerFactory(retryOptionsWithDefault); + async function getQuotes({ gasLimitPerCall }) { + try { + const { results, blockNumber, approxGasUsedPerSuccessCall } = await multicall2Provider.callSameFunctionOnContractWithMultipleParams({ + address: quoterAddress, + abi, + functionName, + functionParams: inputs, + providerConfig, + account, + additionalConfig: { + dropUnexecutedCalls, + gasLimitPerCall, + gasLimit, + signal + } + }); + const successRateError = validateSuccessRate(results, minSuccessRate); + if (successRateError) { + throw successRateError; + } + return { + results, + blockNumber, + approxGasUsedPerSuccessCall + }; + } catch (err) { + if (err instanceof SuccessRateError || err instanceof BlockConflictError || isAbortError(err)) { + throw err; + } + const slicedErrMsg = err.message.slice(0, 500); + if (err.message.includes("header not found")) { + throw new ProviderBlockHeaderError(slicedErrMsg); + } + if (err.message.includes("timeout")) { + throw new ProviderTimeoutError(`Request had ${inputs.length} inputs. ${slicedErrMsg}`); + } + if (err.message.includes("out of gas")) { + throw new ProviderGasError(slicedErrMsg); + } + throw new Error(`Unknown error from provider: ${slicedErrMsg}`); + } + } + const quoteResult = await retry__default.default(async (bail) => { + try { + const quotes = await getQuotes({ + gasLimitPerCall: defaultGasLimitPerCall + }); + return quotes; + } catch (e) { + logger3.debug(`Error getting quotes: ${e}`, 2); + const error = e instanceof Error ? e : new Error(`Unexpected error type ${e}`); + if (!shouldRetry(error)) { + return bail(error); + } + if (error instanceof SuccessRateError) { + onRetry(error); + const { successRateFailureOverrides } = multicallConfigs; + return getQuotes({ + gasLimitPerCall: successRateFailureOverrides.gasLimitPerCall + }); + } + if (error instanceof ProviderGasError) { + onRetry(error); + const { gasErrorFailureOverride } = multicallConfigs; + return getQuotes({ + gasLimitPerCall: gasErrorFailureOverride.gasLimitPerCall + }); + } + throw error; + } + }, retryOptionsWithDefault); + if (!quoteResult) { + logger3.debug(`Empty quote result`, 2); + logger3.debugJson(quoteResult, 2); + throw new Error(`Unexpected empty quote result ${quoteResult}`); + } + const { results: quoteResults } = quoteResult; + const routesWithQuote = processQuoteResults(quoteResults, routes, gasModel, adjustQuoteForGas); + return routesWithQuote; + }; + }; + return { + getRouteWithQuotesExactIn: createGetRoutesWithQuotes(true), + getRouteWithQuotesExactOut: createGetRoutesWithQuotes(false) + }; + }; +} +function validateSuccessRate(allResults, quoteMinSuccessRate) { + const numResults = allResults.length; + const numSuccessResults = allResults.filter((result) => result.success).length; + const successRate = 1 * numSuccessResults / numResults; + if (successRate < quoteMinSuccessRate) { + return new SuccessRateError(`Quote success rate below threshold of ${quoteMinSuccessRate}: ${successRate}`); + } + return void 0; +} +function processQuoteResults(quoteResults, routes, gasModel, adjustQuoteForGas) { + const routesWithQuote = []; + for (let i = 0; i < quoteResults.length; i += 1) { + const route = routes[i]; + const quoteResult = quoteResults[i]; + if (!quoteResult) { + continue; + } + const { success } = quoteResult; + if (!success) { + continue; + } + const [quoteRaw] = quoteResult.result; + const initializedTickCrossedList = quoteResult.result.length === 4 ? quoteResult.result[2] : []; + const quoteCurrency = getQuoteCurrency(route, route.amount.currency); + const quote = swapSdkCore.CurrencyAmount.fromRawAmount(quoteCurrency, quoteRaw.toString()); + const { gasEstimate, gasCostInToken, gasCostInUSD } = gasModel.estimateGasCost( + { + ...route, + quote + }, + { initializedTickCrossedList } + ); + routesWithQuote.push({ + ...route, + quote, + quoteAdjustedForGas: adjustQuoteForGas({ quote, gasCostInToken }), + // sqrtPriceX96AfterList: quoteResult.result[1], + gasEstimate, + gasCostInToken, + gasCostInUSD + }); + } + return routesWithQuote; +} +var createMixedRouteOnChainQuoteProvider = onChainQuoteProviderFactory({ + getQuoterAddress: (chainId) => chunkZNSTBYLO_js.MIXED_ROUTE_QUOTER_ADDRESSES[chainId], + getQuoteFunctionName: () => "quoteExactInput", + abi: mixedRouteQuoterV1ABI, + getCallInputs: (route, isExactIn) => [ + encodeMixedRouteToPath(route, !isExactIn), + route.pools.map((pool) => { + if (isV3Pool(pool)) { + return 0; + } + if (isV2Pool(pool)) { + return 1; + } + if (isStablePool(pool)) { + if (pool.balances.length === 2) { + return 2; + } + if (pool.balances.length === 3) { + return 3; + } + } + return -1; + }).filter((index) => index >= 0), + `0x${route.amount.quotient.toString(16)}` + ] +}); +var createV3OnChainQuoteProvider = onChainQuoteProviderFactory({ + getQuoterAddress: (chainId) => chunkZNSTBYLO_js.V3_QUOTER_ADDRESSES[chainId], + getQuoteFunctionName: (isExactIn) => isExactIn ? "quoteExactInput" : "quoteExactOutput", + abi: quoterV2ABI, + getCallInputs: (route, isExactIn) => [ + encodeMixedRouteToPath(route, !isExactIn), + `0x${route.amount.quotient.toString(16)}` + ] +}); +var createInfinityClOnChainQuoteProvider = onChainQuoteProviderFactory({ + getQuoterAddress: (chainId) => infinitySdk.INFI_CL_QUOTER_ADDRESSES[chainId], + getQuoteFunctionName: (isExactIn) => isExactIn ? "quoteExactInput" : "quoteExactOutput", + abi: clQuoterAbi, + getCallInputs: (route, isExactIn) => { + const firstPool = route.pools[isExactIn ? 0 : route.pools.length - 1]; + const baseCurrency = swapSdkCore.getMatchedCurrency(isExactIn ? route.input : route.output, [ + firstPool.currency0, + firstPool.currency1 + ]); + if (!baseCurrency) { + throw new Error("CL_ONCHAIN_QUOTER_CALL_INPUTS: INVALID_POOL"); + } + const exactCurrency = swapSdkCore.getCurrencyAddress(baseCurrency); + return [ + { + exactCurrency, + path: encodeInfinityRouteToPath(route, !isExactIn), + exactAmount: `0x${route.amount.quotient.toString(16)}` + } + ]; + } +}); +var createMixedRouteOnChainQuoteProviderV2 = onChainQuoteProviderFactory({ + getQuoterAddress: (chainId) => infinitySdk.INFI_MIXED_QUOTER_ADDRESSES[chainId], + getQuoteFunctionName: () => "quoteMixedExactInput", + abi: infinityMixedRouteQuoterAbi, + getCallInputs: (route) => [ + encodeInfinityMixedRouteCurrencyPath(route), + encodeInfinityMixedRouteActions(route), + encodeInfinityMixedRouteParams(route), + `0x${route.amount.quotient.toString(16)}` + ] +}); +var createInfinityBinOnChainQuoteProvider = onChainQuoteProviderFactory({ + getQuoterAddress: (chainId) => infinitySdk.INFI_BIN_QUOTER_ADDRESSES[chainId], + getQuoteFunctionName: (isExactIn) => isExactIn ? "quoteExactInput" : "quoteExactOutput", + abi: binQuoterAbi, + getCallInputs: (route, isExactIn) => { + const firstPool = route.pools[isExactIn ? 0 : route.pools.length - 1]; + const baseCurrency = swapSdkCore.getMatchedCurrency(isExactIn ? route.input : route.output, [ + firstPool.currency0, + firstPool.currency1 + ]); + if (!baseCurrency) { + throw new Error("BIN_ONCHAIN_QUOTER_CALL_INPUTS: INVALID_POOL"); + } + const exactCurrency = swapSdkCore.getCurrencyAddress(baseCurrency); + return [ + { + exactCurrency, + path: encodeInfinityRouteToPath(route, !isExactIn), + exactAmount: `0x${route.amount.quotient.toString(16)}` + } + ]; + } +}); + +// evm/v3-router/providers/quoteProviders.ts +function createQuoteProvider(config) { + const { onChainProvider, multicallConfigs, gasLimit, account } = config; + const offChainQuoteProvider = createOffChainQuoteProvider(); + const mixedRouteOnChainQuoteProviderV1 = createMixedRouteOnChainQuoteProvider({ + onChainProvider, + multicallConfigs, + gasLimit, + account + }); + const mixedRouteOnChainQuoteProviderV2 = createMixedRouteOnChainQuoteProviderV2({ + onChainProvider, + multicallConfigs, + gasLimit, + account + }); + const v3OnChainQuoteProvider = createV3OnChainQuoteProvider({ onChainProvider, multicallConfigs, gasLimit, account }); + const infinityClOnChainQuoteProvider = createInfinityClOnChainQuoteProvider({ + onChainProvider, + multicallConfigs, + gasLimit, + account + }); + const infinityBinOnChainQuoteProvider = createInfinityBinOnChainQuoteProvider({ + onChainProvider, + multicallConfigs, + gasLimit, + account + }); + const createGetRouteWithQuotes = (isExactIn = true) => { + const getOffChainQuotes = isExactIn ? offChainQuoteProvider.getRouteWithQuotesExactIn : offChainQuoteProvider.getRouteWithQuotesExactOut; + const getV3Quotes = isExactIn ? v3OnChainQuoteProvider.getRouteWithQuotesExactIn : v3OnChainQuoteProvider.getRouteWithQuotesExactOut; + const getInfinityClQuotes = isExactIn ? infinityClOnChainQuoteProvider.getRouteWithQuotesExactIn : infinityClOnChainQuoteProvider.getRouteWithQuotesExactOut; + const getInfinityBinQuotes = isExactIn ? infinityBinOnChainQuoteProvider.getRouteWithQuotesExactIn : infinityBinOnChainQuoteProvider.getRouteWithQuotesExactOut; + const createMixedRouteQuoteFetcher = (chainId) => { + const mixedRouteOnChainQuoteProvider = infinitySdk.INFINITY_SUPPORTED_CHAINS.includes(chainId) ? mixedRouteOnChainQuoteProviderV2 : mixedRouteOnChainQuoteProviderV1; + return isExactIn ? mixedRouteOnChainQuoteProvider.getRouteWithQuotesExactIn : mixedRouteOnChainQuoteProvider.getRouteWithQuotesExactOut; + }; + return async function getRoutesWithQuotes(routes, { blockNumber, gasModel, signal, quoteId }) { + const { chainId } = routes[0]?.input || {}; + const getMixedRouteQuotes = createMixedRouteQuoteFetcher(chainId); + const infinityClRoutes = []; + const infinityBinRoutes = []; + const v3SingleHopRoutes = []; + const v3MultihopRoutes = []; + const mixedRoutesHaveV3Pool = []; + const routesCanQuoteOffChain = []; + for (const route of routes) { + if (route.type === 0 /* V2 */ || route.type === 2 /* STABLE */) { + routesCanQuoteOffChain.push(route); + continue; + } + if (route.type === 1 /* V3 */) { + if (route.pools.length === 1) { + v3SingleHopRoutes.push(route); + continue; + } + v3MultihopRoutes.push(route); + continue; + } + if (route.type === 7 /* InfinityStable */) { + if (isExactIn) { + mixedRoutesHaveV3Pool.push(route); + continue; + } + continue; + } + if (route.type === 5 /* InfinityCL */) { + if (isExactIn) { + mixedRoutesHaveV3Pool.push(route); + continue; + } + infinityClRoutes.push(route); + continue; + } + if (route.type === 6 /* InfinityBIN */) { + if (isExactIn) { + mixedRoutesHaveV3Pool.push(route); + continue; + } + infinityBinRoutes.push(route); + continue; + } + const { pools } = route; + if (pools.some( + (pool) => isV3Pool(pool) || isInfinityClPool(pool) || isInfinityBinPool(pool) || isInfinityStablePool(pool) + )) { + mixedRoutesHaveV3Pool.push(route); + continue; + } + routesCanQuoteOffChain.push(route); + } + logQuoters( + quoteId, + routesCanQuoteOffChain, + mixedRoutesHaveV3Pool, + v3SingleHopRoutes, + v3MultihopRoutes, + infinityClRoutes, + infinityBinRoutes + ); + const results = await Promise.allSettled([ + getOffChainQuotes(routesCanQuoteOffChain, { blockNumber, gasModel, signal, quoteId }), + getMixedRouteQuotes(mixedRoutesHaveV3Pool, { blockNumber, gasModel, retry: { retries: 0 }, signal, quoteId }), + getV3Quotes(v3SingleHopRoutes, { blockNumber, gasModel, signal, quoteId }), + getV3Quotes(v3MultihopRoutes, { blockNumber, gasModel, retry: { retries: 1 }, signal, quoteId }), + getInfinityClQuotes(infinityClRoutes, { blockNumber, gasModel, signal, quoteId }), + getInfinityBinQuotes(infinityBinRoutes, { blockNumber, gasModel, signal, quoteId }) + ]); + if (results.every((result) => result.status === "rejected")) { + throw new Error(results.map((result) => result.reason).join(",")); + } + return results.filter((result) => result.status === "fulfilled").reduce((acc, cur) => [...acc, ...cur.value], []); + }; + }; + return { + getRouteWithQuotesExactIn: createGetRouteWithQuotes(true), + getRouteWithQuotesExactOut: createGetRouteWithQuotes(false), + getConfig: () => config + }; +} +function logQuoters(quoteId, routesCanQuoteOffChain, mixedRoutesHaveV3Pool, v3SingleHopRoutes, v3MultihopRoutes, infinityClRoutes, infinityBinRoutes) { + const logger3 = RemoteLogger.getLogger(quoteId); + if (routesCanQuoteOffChain.length) { + logger3.debug(`try getOffChainQuotes=${routesCanQuoteOffChain.length}`, 2); + } + if (mixedRoutesHaveV3Pool.length) { + logger3.debug(`try getMixedRouteQuotes=${mixedRoutesHaveV3Pool.length}`, 2); + } + if (v3SingleHopRoutes.length) { + logger3.debug(`try getV3Quotes=${v3SingleHopRoutes.length}`, 2); + } + if (v3MultihopRoutes.length) { + logger3.debug(`try getV3Quotes=${v3MultihopRoutes.length}`, 2); + } + if (infinityClRoutes.length) { + logger3.debug(`try getInfinityClQuotes=${infinityClRoutes.length}`, 2); + } + if (infinityBinRoutes.length) { + logger3.debug(`try getInfinityBinQuotes=${infinityBinRoutes.length}`, 2); + } +} + +// evm/infinity-router/queries/getInfinityBinPools.ts +async function getInfinityBinCandidatePools({ + currencyA, + currencyB, + clientProvider, + gasLimit +}) { + const pools = await getInfinityBinCandidatePoolsWithoutBins({ + currencyA, + currencyB, + clientProvider + }); + if (!pools.length) { + return []; + } + return fillPoolsWithBins({ + pools, + clientProvider, + gasLimit + }); +} +async function getInfinityBinCandidatePoolsWithoutBins({ + currencyA, + currencyB, + clientProvider +}) { + if (!currencyA || !currencyB) { + throw new Error(`Invalid currencyA ${currencyA} or currencyB ${currencyB}`); + } + const wnative = sdk.getWrappedNative(currencyA.chainId); + const pairs = await getPairCombinations(currencyA, currencyB); + const pairsWithNative = [...pairs]; + if (wnative) { + const native = sdk.Native.onChain(currencyA.chainId); + for (const pair of pairs) { + const index = pair.findIndex((c) => c.wrapped.equals(wnative)); + if (index >= 0) { + const pairWithNative = [...pair]; + pairWithNative[index] = native; + pairsWithNative.push(pairWithNative); + } + } + } + return getInfinityBinPoolsWithoutBins(pairsWithNative, clientProvider); +} +var getInfinityBinPoolsWithoutBins = createOnChainPoolFactory({ + abi: infinitySdk.BinPoolManagerAbi, + getPossiblePoolMetas: async ([currencyA, currencyB]) => { + const { chainId } = currencyA; + if (!infinitySdk.isInfinitySupported(chainId)) + throw new Error(`Failed to get bin pools. Infinity not supported on chain ${chainId}`); + if (!infinitySdk.isInfinityBinSupported(chainId)) + return []; + const [currency0, currency1] = swapSdkCore.sortCurrencies([currencyA, currencyB]); + const poolIdList = /* @__PURE__ */ new Set(); + const metas = []; + const binPresets = chunkZNSTBYLO_js.BIN_PRESETS_BY_CHAIN[chainId]; + for (const { fee, binStep } of binPresets) { + const hookPresets = chunkZNSTBYLO_js.BIN_HOOK_PRESETS_BY_CHAIN[chainId]; + for (const { address: hooks, registrationBitmap, poolKeyOverride } of hookPresets) { + const poolKey = { + currency0: swapSdkCore.getCurrencyAddress(currency0), + currency1: swapSdkCore.getCurrencyAddress(currency1), + fee, + parameters: { + binStep, + hooksRegistration: registrationBitmap !== void 0 ? infinitySdk.decodeHooksRegistration(registrationBitmap) : void 0 + }, + poolManager: infinitySdk.INFI_BIN_POOL_MANAGER_ADDRESSES[chainId], + hooks, + ...poolKeyOverride ?? {} + }; + const id = infinitySdk.getPoolId(poolKey); + if (poolIdList.has(id)) { + continue; + } + poolIdList.add(id); + metas.push({ + currencyA, + currencyB, + fee, + binStep, + hooks, + poolManager: poolKey.poolManager, + id, + hooksRegistrationBitmap: registrationBitmap, + ...poolKeyOverride + }); + } + } + return metas; + }, + buildPoolInfoCalls: ({ id, poolManager: address }) => [ + { + address, + functionName: "getSlot0", + args: [id] + } + ], + buildPool: ({ currencyA, currencyB, id, binStep, poolManager, hooks, hooksRegistrationBitmap }, [slot0]) => { + if (!slot0 || !slot0[0]) { + return null; + } + const [activeId, protocolFee, lpFee] = slot0; + const [currency0, currency1] = swapSdkCore.sortCurrencies([currencyA, currencyB]); + return { + id, + type: 4 /* InfinityBIN */, + currency0, + currency1, + fee: lpFee, + protocolFee, + activeId, + binStep, + poolManager, + hooks, + hooksRegistrationBitmap + }; + } +}); +function getBinIdList({ + activeId, + binStep, + priceRange, + ...rest +}) { + const price = infinitySdk.getPriceFromId(activeId, binStep); + const [idLower, idUpper] = [ + infinitySdk.getIdFromPrice(price * (1 - priceRange), binStep), + infinitySdk.getIdFromPrice(price * (1 + priceRange), binStep) + ]; + const binIds = []; + for (let i = idLower; i <= idUpper; i += 1) { + binIds.push({ + ...rest, + binId: i + }); + } + return binIds; +} +async function fillPoolsWithBins({ + pools, + clientProvider, + gasLimit, + priceRange = 0.05 +}) { + if (!pools.length) { + return []; + } + const chainId = pools[0]?.currency0.chainId; + const client = clientProvider?.({ chainId }); + if (!client) { + throw new Error("Fill pools with ticks failed. No valid public client or tick lens found."); + } + const { gasLimit: gasLimitPerCall, retryGasMultiplier } = getInfinityPoolFetchConfig(chainId); + const binIds = pools.map( + ({ binStep, activeId }, i) => getBinIdList({ activeId, binStep, poolIndex: i, priceRange }) + ).reduce((acc, cur) => { + acc.push(...cur); + return acc; + }, []); + const res = await multicall.multicallByGasLimit( + binIds.map(({ poolIndex, binId }) => ({ + target: pools[poolIndex].poolManager, + callData: viem.encodeFunctionData({ + abi: infinitySdk.BinPoolManagerAbi, + args: [pools[poolIndex].id, binId], + functionName: "getBin" + }), + gasLimit: gasLimitPerCall / 20n + // get Bin is small + })), + { + chainId, + client, + gasLimit, + retryFailedCallsWithGreaterLimit: { + gasLimitMultiplier: retryGasMultiplier + } + } + ); + const poolsWithBins = pools.map((p) => ({ ...p })); + for (const [index, result] of res.results.entries()) { + const { poolIndex, binId } = binIds[index]; + const pool = poolsWithBins[poolIndex]; + const data = result.success ? viem.decodeFunctionResult({ + abi: infinitySdk.BinPoolManagerAbi, + functionName: "getBin", + data: result.result + }) : void 0; + if (!data) { + continue; + } + const [reserveX, reserveY] = data; + if (reserveX === 0n && reserveY === 0n) { + continue; + } + const binReserve = { + reserveX, + reserveY + }; + if (!pool.reserveOfBin) { + pool.reserveOfBin = { + [binId]: binReserve + }; + continue; + } + pool.reserveOfBin[binId] = binReserve; + } + return poolsWithBins.filter((p) => p.reserveOfBin); +} + +// evm/abis/QueryData.ts +var queryDataAbi = [ + { + inputs: [ + { internalType: "address", name: "_infinityClPoolManager", type: "address" }, + { internalType: "address", name: "_infinityClPositionManager", type: "address" }, + { internalType: "address", name: "_owner", type: "address" } + ], + stateMutability: "nonpayable", + type: "constructor" + }, + { inputs: [{ internalType: "address", name: "owner", type: "address" }], name: "OwnableInvalidOwner", type: "error" }, + { + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "OwnableUnauthorizedAccount", + type: "error" + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "previousOwner", type: "address" }, + { indexed: true, internalType: "address", name: "newOwner", type: "address" } + ], + name: "OwnershipTransferStarted", + type: "event" + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "previousOwner", type: "address" }, + { indexed: true, internalType: "address", name: "newOwner", type: "address" } + ], + name: "OwnershipTransferred", + type: "event" + }, + { + anonymous: false, + inputs: [ + { indexed: false, internalType: "address", name: "clPoolManager", type: "address" }, + { indexed: false, internalType: "address", name: "clPositionManager", type: "address" } + ], + name: "SetInfinityContract", + type: "event" + }, + { inputs: [], name: "acceptOwnership", outputs: [], stateMutability: "nonpayable", type: "function" }, + { + inputs: [], + name: "infinityClPoolManager", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "infinityClPositionManager", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "pendingOwner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { internalType: "bytes32", name: "poolId", type: "bytes32" }, + { internalType: "uint256", name: "len", type: "uint256" } + ], + name: "queryPancakeInfinityTicksSuperCompact", + outputs: [{ internalType: "bytes", name: "", type: "bytes" }], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { internalType: "address", name: "pool", type: "address" }, + { internalType: "uint256", name: "len", type: "uint256" } + ], + name: "queryUniv3TicksSuperCompact", + outputs: [{ internalType: "bytes", name: "", type: "bytes" }], + stateMutability: "view", + type: "function" + }, + { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" }, + { + inputs: [ + { internalType: "address", name: "_clPoolManager", type: "address" }, + { internalType: "address", name: "_clPositionManager", type: "address" } + ], + name: "setInfinityContract", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [{ internalType: "address", name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function" + } +]; + +// evm/utils/compactTickQuery.helper.ts +var LIQUIDITY_NET_MASK = (1n << 128n) - 1n; +function decideCompactTickLen(priceRangeBps, tickSpacing, maxLen = 1n) { + const targetTicks = Math.log(1 + priceRangeBps / 1e4) / Math.log(1.0001); + const slotsNeeded = Math.ceil(targetTicks / tickSpacing / 256); + const len = BigInt(slotsNeeded * 2 * 256); + return len > maxLen ? maxLen : len; +} +function decodeTicksFromBytes(data) { + if (!data || data === "0x") { + return []; + } + const tickMap = /* @__PURE__ */ new Map(); + const hexString = data.slice(2); + const chunkSize = 64; + for (let offset = 0; offset + chunkSize <= hexString.length; offset += chunkSize) { + const chunk2 = `0x${hexString.slice(offset, offset + chunkSize)}`; + const raw = BigInt(chunk2); + const tickIndex = Number(BigInt.asIntN(128, raw >> 128n)); + const liquidityNet = BigInt.asIntN(128, raw & LIQUIDITY_NET_MASK); + const liquidityGross = liquidityNet < 0n ? -liquidityNet : liquidityNet; + tickMap.set( + tickIndex, + new v3Sdk.Tick({ + index: tickIndex, + liquidityNet, + liquidityGross + }) + ); + } + return Array.from(tickMap.values()).sort((a, b) => a.index - b.index); +} +function getCompactTickQueryCalldata(pool, len) { + switch (pool.type) { + case 1 /* V3 */: + return viem.encodeFunctionData({ + abi: queryDataAbi, + args: [pool.address, len], + functionName: "queryUniv3TicksSuperCompact" + }); + case 3 /* InfinityCL */: + return viem.encodeFunctionData({ + abi: queryDataAbi, + args: [pool.id, len], + functionName: "queryPancakeInfinityTicksSuperCompact" + }); + default: + throw new Error("Unsupported pool type for tick query"); + } +} +function decodeCompactTickResult(result, pool) { + const rawTicks = viem.decodeFunctionResult({ + abi: queryDataAbi, + functionName: pool.type === 3 /* InfinityCL */ ? "queryPancakeInfinityTicksSuperCompact" : "queryUniv3TicksSuperCompact", + data: result + }); + return decodeTicksFromBytes(rawTicks); +} +function getTickSpacing(pool) { + if (pool.type === 1 /* V3 */) { + return v3Sdk.TICK_SPACINGS[Number(pool.fee)]; + } + return pool.tickSpacing; +} +async function fetchCompactPoolsTick({ + pools, + clientProvider, + gasLimit +}) { + if (!pools.length) + return {}; + const currency = getPoolCurrency0(pools[0]); + const { chainId } = currency; + const client = clientProvider?.({ chainId }); + if (!client) + throw new Error("No valid public client found."); + const queryHelperAddress = chunkZNSTBYLO_js.TICK_QUERY_HELPER_ADDRESSES[chainId]; + if (!queryHelperAddress) + return {}; + const { retryGasMultiplier } = getTickQueryFetchConfig(); + const gasLimitPerCall = 10000000n; + const multiCallArgs = pools.map((pool) => ({ + target: queryHelperAddress, + callData: getCompactTickQueryCalldata(pool, decideCompactTickLen(1e3, getTickSpacing(pool))), + gasLimit: gasLimitPerCall + })); + const res = await multicall.multicallByGasLimit(multiCallArgs, { + chainId, + client, + gasLimit, + retryFailedCallsWithGreaterLimit: { gasLimitMultiplier: retryGasMultiplier } + }); + const ticksByPool = {}; + for (const [i, result] of res.results.entries()) { + if (!result.success || !result.result) + continue; + const decoded = decodeCompactTickResult(result.result, pools[i]); + if (decoded.length) { + if (pools[i].type === 3 /* InfinityCL */) { + ticksByPool[pools[i].id.toLocaleLowerCase()] = decoded; + } else if (pools[i].type === 1 /* V3 */) { + ticksByPool[pools[i].address.toLowerCase()] = decoded; + } + } + } + return ticksByPool; +} + +// evm/abis/IInfinityCLTickLens.ts +var infinityCLTickLensAbi = [ + { + type: "constructor", + inputs: [{ name: "_poolManager", type: "address", internalType: "contract ICLPoolManager" }], + stateMutability: "nonpayable" + }, + { + type: "function", + name: "getPopulatedTicksInWord", + inputs: [ + { + name: "key", + type: "tuple", + internalType: "struct PoolKey", + components: [ + { name: "currency0", type: "address", internalType: "Currency" }, + { name: "currency1", type: "address", internalType: "Currency" }, + { name: "hooks", type: "address", internalType: "contract IHooks" }, + { name: "poolManager", type: "address", internalType: "contract IPoolManager" }, + { name: "fee", type: "uint24", internalType: "uint24" }, + { name: "parameters", type: "bytes32", internalType: "bytes32" } + ] + }, + { name: "tickBitmapIndex", type: "int16", internalType: "int16" } + ], + outputs: [ + { + name: "populatedTicks", + type: "tuple[]", + internalType: "struct ITickLens.PopulatedTick[]", + components: [ + { name: "tick", type: "int24", internalType: "int24" }, + { name: "liquidityNet", type: "int128", internalType: "int128" }, + { name: "liquidityGross", type: "uint128", internalType: "uint128" } + ] + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "getPopulatedTicksInWord", + inputs: [ + { name: "id", type: "bytes32", internalType: "PoolId" }, + { name: "tickBitmapIndex", type: "int16", internalType: "int16" } + ], + outputs: [ + { + name: "populatedTicks", + type: "tuple[]", + internalType: "struct ITickLens.PopulatedTick[]", + components: [ + { name: "tick", type: "int24", internalType: "int24" }, + { name: "liquidityNet", type: "int128", internalType: "int128" }, + { name: "liquidityGross", type: "uint128", internalType: "uint128" } + ] + } + ], + stateMutability: "view" + }, + { + type: "function", + name: "poolManager", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "contract ICLPoolManager" }], + stateMutability: "view" + }, + { type: "error", name: "PoolNotInitialized", inputs: [] } +]; + +// evm/abis/ITickLens.ts +var tickLensAbi = [ + { + inputs: [ + { internalType: "address", name: "pool", type: "address" }, + { internalType: "int16", name: "tickBitmapIndex", type: "int16" } + ], + name: "getPopulatedTicksInWord", + outputs: [ + { + components: [ + { internalType: "int24", name: "tick", type: "int24" }, + { internalType: "int128", name: "liquidityNet", type: "int128" }, + { internalType: "uint128", name: "liquidityGross", type: "uint128" } + ], + internalType: "struct ITickLens.PopulatedTick[]", + name: "populatedTicks", + type: "tuple[]" + } + ], + stateMutability: "view", + type: "function" + } +]; + +// evm/utils/tickLenQuery.helper.ts +var TICK_RANGE_BY_POOL_TYPE = { + [1 /* V3 */]: 1e3, + [3 /* InfinityCL */]: 10 +}; +function getPoolChainId(pool) { + if (pool.type === 1 /* V3 */) { + return pool.token0.chainId; + } + return pool.currency0.chainId; +} +var MIN_TICK = -887272; +var MAX_TICK = 887272; +function getBoundaryBitmapIndexes(tickSpacing) { + const minUsable = Math.ceil(MIN_TICK / tickSpacing) * tickSpacing; + const maxUsable = Math.floor(MAX_TICK / tickSpacing) * tickSpacing; + return [.../* @__PURE__ */ new Set([getBitmapIndex(minUsable, tickSpacing), getBitmapIndex(maxUsable, tickSpacing)])]; +} +function getBitmapIndex(tick, tickSpacing) { + return Math.floor(tick / tickSpacing / 256); +} +function createBitmapIndexListBuilder(tickRange) { + return function buildBitmapIndexList({ currentTick, tickSpacing, ...rest }) { + const minIndex = getBitmapIndex(currentTick - tickRange, tickSpacing); + const maxIndex = getBitmapIndex(currentTick + tickRange, tickSpacing); + return Array.from({ length: maxIndex - minIndex + 1 }, (_, i) => ({ + bitmapIndex: minIndex + i, + ...rest + })); + }; +} +var buildV3BitmapIndexList = createBitmapIndexListBuilder(TICK_RANGE_BY_POOL_TYPE[1 /* V3 */]); +var buildInfinityBitmapIndexList = createBitmapIndexListBuilder(TICK_RANGE_BY_POOL_TYPE[3 /* InfinityCL */]); +function ensureSameChain(pools) { + const [first, ...rest] = pools; + const chainId = getPoolChainId(first); + for (const pool of rest) { + if (getPoolChainId(pool) !== chainId) { + throw new Error("Cannot fetch ticks for pools across different chains in a single call"); + } + } + return chainId; +} +function normalizePoolKey(pool) { + return pool.type === 1 /* V3 */ ? pool.address.toLowerCase() : pool.id.toLowerCase(); +} +async function fetchTickLensTicksInRange({ + pool, + numSurroundingTicks, + clientProvider, + gasLimit +}) { + const client = clientProvider?.({ chainId: pool.chainId }); + if (!client) + throw new Error("Fetch ticks failed. No valid public client found."); + const tickLensAddress = pool.type === 1 /* V3 */ ? chunkZNSTBYLO_js.V3_TICK_LENS_ADDRESSES[pool.chainId] : infinitySdk.INFI_CL_TICK_LENS_ADDRESSES[pool.chainId]; + if (!tickLensAddress) + throw new Error("Fetch ticks failed. No tick lens found."); + const bitmapIndexes = createBitmapIndexListBuilder(numSurroundingTicks * pool.tickSpacing)({ + currentTick: pool.currentTick, + tickSpacing: pool.tickSpacing + }); + const { gasLimit: gasLimitPerCall, retryGasMultiplier } = getTickLensFetchConfig(); + const isV3 = pool.type === 1 /* V3 */; + const abi = isV3 ? tickLensAbi : infinityCLTickLensAbi; + const functionName = "getPopulatedTicksInWord"; + const poolIdentifier = isV3 ? pool.address : pool.poolId; + const res = await multicall.multicallByGasLimit( + bitmapIndexes.map(({ bitmapIndex }) => ({ + target: tickLensAddress, + callData: viem.encodeFunctionData({ + abi, + args: [poolIdentifier, bitmapIndex], + functionName + }), + gasLimit: gasLimitPerCall + })), + { + chainId: pool.chainId, + client, + gasLimit, + retryFailedCallsWithGreaterLimit: { gasLimitMultiplier: retryGasMultiplier } + } + ); + if (res.results.some((result) => !result.success || !result.result)) { + throw new Error("Fetch ticks failed. TickLens returned an incomplete bitmap range."); + } + const ticks = res.results.flatMap((result) => { + if (!result.success || !result.result) + return []; + const data = viem.decodeFunctionResult({ + abi, + functionName, + data: result.result + }); + return data.map(({ tick, liquidityNet, liquidityGross }) => new v3Sdk.Tick({ index: tick, liquidityNet, liquidityGross })); + }); + return ticks.sort((a, b) => a.index - b.index); +} +async function fetchTickLenPoolsTick({ + pools, + clientProvider, + gasLimit, + disableFilterNoTicks +}) { + if (!pools.length) { + return {}; + } + const chainId = ensureSameChain(pools); + const client = clientProvider?.({ chainId }); + if (!client) { + throw new Error("Fill pools with ticks failed. No valid public client found."); + } + const { gasLimit: gasLimitPerCall, retryGasMultiplier } = getTickLensFetchConfig(); + const ticksByPool = {}; + const v3Pools = pools.filter((pool) => pool.type === 1 /* V3 */); + if (v3Pools.length) { + const tickLensAddress = chunkZNSTBYLO_js.V3_TICK_LENS_ADDRESSES[chainId]; + if (!tickLensAddress) { + throw new Error("Fill pools with ticks failed. No V3 tick lens found."); + } + const bitmapIndexes = v3Pools.flatMap( + (pool) => buildV3BitmapIndexList({ + currentTick: pool.tick, + tickSpacing: v3Sdk.TICK_SPACINGS[Number(pool.fee)], + pool + }) + ); + if (bitmapIndexes.length) { + const res = await multicall.multicallByGasLimit( + bitmapIndexes.map(({ pool, bitmapIndex }) => ({ + target: tickLensAddress, + callData: viem.encodeFunctionData({ + abi: tickLensAbi, + args: [pool.address, bitmapIndex], + functionName: "getPopulatedTicksInWord" + }), + gasLimit: gasLimitPerCall + })), + { + chainId, + client, + gasLimit, + retryFailedCallsWithGreaterLimit: { + gasLimitMultiplier: retryGasMultiplier + } + } + ); + for (const [index, result] of res.results.entries()) { + const { pool } = bitmapIndexes[index]; + if (!result.success || !result.result) { + if (disableFilterNoTicks) { + ticksByPool[normalizePoolKey(pool)] = ticksByPool[normalizePoolKey(pool)] ?? []; + } + continue; + } + const data = viem.decodeFunctionResult({ + abi: tickLensAbi, + functionName: "getPopulatedTicksInWord", + data: result.result + }); + const newTicks = data?.map( + ({ tick, liquidityNet, liquidityGross }) => new v3Sdk.Tick({ + index: tick, + liquidityNet, + liquidityGross + }) + ).reverse(); + if (!newTicks?.length) { + if (disableFilterNoTicks) { + ticksByPool[normalizePoolKey(pool)] = ticksByPool[normalizePoolKey(pool)] ?? []; + } + continue; + } + const key = normalizePoolKey(pool); + ticksByPool[key] = [...ticksByPool[key] ?? [], ...newTicks]; + } + } + } + const infinityPools = pools.filter((pool) => pool.type === 3 /* InfinityCL */); + if (infinityPools.length) { + const tickLensAddress = infinitySdk.INFI_CL_TICK_LENS_ADDRESSES[chainId]; + if (!tickLensAddress) { + throw new Error("Fill pools with ticks failed. No Infinity tick lens found."); + } + const bitmapIndexes = infinityPools.flatMap( + (pool) => buildInfinityBitmapIndexList({ + currentTick: pool.tick, + tickSpacing: pool.tickSpacing, + pool + }) + ); + if (bitmapIndexes.length) { + const res = await multicall.multicallByGasLimit( + bitmapIndexes.map(({ pool, bitmapIndex }) => ({ + target: tickLensAddress, + callData: viem.encodeFunctionData({ + abi: infinityCLTickLensAbi, + args: [pool.id, bitmapIndex], + functionName: "getPopulatedTicksInWord" + }), + gasLimit: gasLimitPerCall + })), + { + chainId, + client, + gasLimit, + retryFailedCallsWithGreaterLimit: { + gasLimitMultiplier: retryGasMultiplier + } + } + ); + for (const [index, result] of res.results.entries()) { + const { pool } = bitmapIndexes[index]; + if (!result.success || !result.result) { + if (disableFilterNoTicks) { + ticksByPool[normalizePoolKey(pool)] = ticksByPool[normalizePoolKey(pool)] ?? []; + } + continue; + } + const data = viem.decodeFunctionResult({ + abi: infinityCLTickLensAbi, + functionName: "getPopulatedTicksInWord", + data: result.result + }); + const newTicks = data?.map( + ({ tick, liquidityNet, liquidityGross }) => new v3Sdk.Tick({ + index: tick, + liquidityNet, + liquidityGross + }) + ).reverse(); + if (!newTicks?.length) { + if (disableFilterNoTicks) { + ticksByPool[normalizePoolKey(pool)] = ticksByPool[normalizePoolKey(pool)] ?? []; + } + continue; + } + const key = normalizePoolKey(pool); + ticksByPool[key] = [...ticksByPool[key] ?? [], ...newTicks]; + } + } + const emptyPools = infinityPools.filter((pool) => !ticksByPool[normalizePoolKey(pool)]?.length); + const boundaryCalls = emptyPools.flatMap( + (pool) => getBoundaryBitmapIndexes(pool.tickSpacing).map((bitmapIndex) => ({ pool, bitmapIndex })) + ); + if (boundaryCalls.length) { + const res = await multicall.multicallByGasLimit( + boundaryCalls.map(({ pool, bitmapIndex }) => ({ + target: tickLensAddress, + callData: viem.encodeFunctionData({ + abi: infinityCLTickLensAbi, + args: [pool.id, bitmapIndex], + functionName: "getPopulatedTicksInWord" + }), + gasLimit: gasLimitPerCall + })), + { chainId, client, gasLimit, retryFailedCallsWithGreaterLimit: { gasLimitMultiplier: retryGasMultiplier } } + ); + const boundaryTicksByPool = {}; + for (const [index, result] of res.results.entries()) { + if (!result.success || !result.result) + continue; + const { pool } = boundaryCalls[index]; + const data = viem.decodeFunctionResult({ + abi: infinityCLTickLensAbi, + functionName: "getPopulatedTicksInWord", + data: result.result + }); + const newTicks = data?.map(({ tick, liquidityNet, liquidityGross }) => new v3Sdk.Tick({ index: tick, liquidityNet, liquidityGross })).reverse(); + if (!newTicks?.length) + continue; + const key = normalizePoolKey(pool); + boundaryTicksByPool[key] = [...boundaryTicksByPool[key] ?? [], ...newTicks]; + } + for (const pool of emptyPools) { + const key = normalizePoolKey(pool); + const ticks = boundaryTicksByPool[key]; + if (!ticks?.length) + continue; + const liquidityAtSpot = ticks.filter((t) => t.index <= pool.tick).reduce((acc, t) => acc + t.liquidityNet, 0n); + if (liquidityAtSpot !== pool.liquidity) + continue; + const liquidityNetTotal = ticks.reduce((acc, t) => acc + t.liquidityNet, 0n); + if (liquidityNetTotal !== 0n) + continue; + ticksByPool[key] = [...ticksByPool[key] ?? [], ...ticks]; + } + } + } + if (!disableFilterNoTicks) { + for (const key of Object.keys(ticksByPool)) { + if (!ticksByPool[key]?.length) { + delete ticksByPool[key]; + } + } + } + for (const key of Object.keys(ticksByPool)) { + ticksByPool[key] = ticksByPool[key].sort((a, b) => a.index - b.index); + } + return ticksByPool; +} + +// evm/utils/combinedTickQuery.helper.ts +function getPoolChainId2(pool) { + if (pool.type === 1 /* V3 */) { + return pool.token0.chainId; + } + return pool.currency0.chainId; +} +async function fetchCombinedPoolsTick({ + pools, + clientProvider, + gasLimit, + disableFilterNoTicks +}) { + if (!pools.length) { + return {}; + } + const tickLenTicksByPool = await fetchTickLenPoolsTick({ + pools, + clientProvider, + gasLimit, + disableFilterNoTicks + }); + const poolsNeedingCompactFallback = []; + const finalTicksByPool = {}; + for (const pool of pools) { + const poolKey = getPoolKey(pool); + const tickLenTicks = tickLenTicksByPool[poolKey] || []; + if (tickLenTicks.length === 0) { + poolsNeedingCompactFallback.push(pool); + } else { + finalTicksByPool[poolKey] = tickLenTicks; + } + } + const skipCompactTickFallback = chains.getChainConfig(getPoolChainId2(pools[0]))?.routing?.skipCompactTickFallback; + if (skipCompactTickFallback) { + return finalTicksByPool; + } + if (poolsNeedingCompactFallback.length > 0) { + const compactTicksByPool = await fetchCompactPoolsTick({ + pools: poolsNeedingCompactFallback, + clientProvider, + gasLimit + }); + for (const pool of poolsNeedingCompactFallback) { + const poolKey = getPoolKey(pool); + const compactTicks = compactTicksByPool[poolKey] || []; + if (compactTicks.length > 0) { + finalTicksByPool[poolKey] = compactTicks; + } else if (disableFilterNoTicks) { + finalTicksByPool[poolKey] = []; + } + } + } + return finalTicksByPool; +} +function getPoolKey(pool) { + if (pool.type === 1 /* V3 */) { + return pool.address.toLowerCase(); + } + return pool.id.toLowerCase(); +} + +// evm/infinity-router/queries/getInfinityClPools.ts +async function getInfinityClCandidatePools({ + currencyA, + currencyB, + clientProvider, + gasLimit +}) { + const pools = await getInfinityClCandidatePoolsWithoutTicks({ + currencyA, + currencyB, + clientProvider + }); + return fillClPoolsWithTicks({ + pools, + clientProvider, + gasLimit + }); +} +async function getInfinityClCandidatePoolsWithoutTicks({ + currencyA, + currencyB, + clientProvider +}) { + if (!currencyA || !currencyB) { + throw new Error(`Invalid currencyA ${currencyA} or currencyB ${currencyB}`); + } + const wnative = sdk.getWrappedNative(currencyA.chainId); + const pairs = await getPairCombinations(currencyA, currencyB); + const pairsWithNative = [...pairs]; + if (wnative) { + const native = sdk.Native.onChain(currencyA.chainId); + for (const pair of pairs) { + const index = pair.findIndex((c) => c.wrapped.equals(wnative)); + if (index >= 0) { + const pairWithNative = [...pair]; + pairWithNative[index] = native; + pairsWithNative.push(pairWithNative); + } + } + } + return getInfinityClPoolsWithoutTicks(pairsWithNative, clientProvider); +} +var getInfinityClPoolsWithoutTicks = createOnChainPoolFactory({ + abi: infinitySdk.CLPoolManagerAbi, + getPossiblePoolMetas: async ([currencyA, currencyB]) => { + const { chainId } = currencyA; + if (!infinitySdk.isInfinitySupported(chainId)) + throw new Error(`Failed to get cl pools. Infinity not supported on chain ${chainId}`); + const [currency0, currency1] = swapSdkCore.sortCurrencies([currencyA, currencyB]); + const poolIdList = /* @__PURE__ */ new Set(); + const metas = []; + const presets = chunkZNSTBYLO_js.CL_PRESETS_BY_CHAIN[chainId]; + const defaultHookPresets = chunkZNSTBYLO_js.CL_HOOK_PRESETS_BY_CHAIN[chainId]; + const whitelistLabeledHooksWithoutMetadata = (infinitySdk.whitelistLabeledHooksList[chainId] ?? []).map((hook) => ({ + address: hook, + // Default 0x55 for whitelist labeled hooks + // Similar to 0x9a9B5331ce8d74b2B721291D57DE696E878353fd hook registration bitmap + registrationBitmap: "0x55", + poolKeyOverride: void 0 + })); + const addPoolMeta = (fee, tickSpacing, hooks, registrationBitmap, poolKeyOverride) => { + const poolKey = { + currency0: swapSdkCore.getCurrencyAddress(currency0), + currency1: swapSdkCore.getCurrencyAddress(currency1), + fee, + parameters: { + tickSpacing, + hooksRegistration: registrationBitmap !== void 0 ? infinitySdk.decodeHooksRegistration(registrationBitmap) : void 0 + }, + poolManager: infinitySdk.INFI_CL_POOL_MANAGER_ADDRESSES[chainId], + hooks, + ...poolKeyOverride ?? {} + }; + const id = infinitySdk.getPoolId(poolKey); + if (poolIdList.has(id)) { + return; + } + poolIdList.add(id); + metas.push({ + currencyA, + currencyB, + fee, + tickSpacing, + hooks, + poolManager: poolKey.poolManager, + id, + hooksRegistrationBitmap: registrationBitmap, + ...poolKeyOverride ?? {} + }); + }; + for (const { fee, tickSpacing } of presets) { + for (const { address: hooks, registrationBitmap, poolKeyOverride } of defaultHookPresets) { + addPoolMeta(fee, tickSpacing, hooks, registrationBitmap, poolKeyOverride); + } + } + const fees = presets.map((p) => p.fee); + const tickSpacings = presets.map((p) => p.tickSpacing); + for (const fee of fees) { + for (const tickSpacing of tickSpacings) { + for (const { address: hooks, registrationBitmap, poolKeyOverride } of whitelistLabeledHooksWithoutMetadata) { + addPoolMeta(fee, tickSpacing, hooks, registrationBitmap, poolKeyOverride); + } + } + } + return metas; + }, + buildPoolInfoCalls: ({ id, poolManager: address }) => [ + { + address, + functionName: "getLiquidity", + args: [id] + }, + { + address, + functionName: "getSlot0", + args: [id] + } + ], + buildPool: ({ currencyA, currencyB, id, tickSpacing, poolManager, hooks, hooksRegistrationBitmap }, [liquidity, slot0]) => { + if (!slot0 || !slot0[0]) { + return null; + } + const [sqrtPriceX96, tick, protocolFee, lpFee] = slot0; + const [currency0, currency1] = swapSdkCore.sortCurrencies([currencyA, currencyB]); + const whitelistHook = infinitySdk.findHook(hooks, currencyA.wrapped.chainId); + return { + id, + type: 3 /* InfinityCL */, + currency0, + currency1, + fee: whitelistHook?.defaultFee ?? lpFee, + protocolFee, + liquidity: BigInt(liquidity.toString()), + sqrtRatioX96: BigInt(sqrtPriceX96.toString()), + tick: Number(tick), + tickSpacing, + poolManager, + hooks, + hooksRegistrationBitmap + }; + } +}); +async function fillClPoolsWithTicks({ + pools, + clientProvider, + gasLimit +}) { + if (pools.length === 0) { + return []; + } + const chainId = pools[0]?.currency0.chainId; + const client = clientProvider?.({ chainId }); + if (!client) { + throw new Error("Fill pools with ticks failed. No valid public client found."); + } + const ticksByPool = await fetchCombinedPoolsTick({ pools, clientProvider, gasLimit }); + const poolsWithTicks = pools.map((p) => ({ + ...p, + ticks: ticksByPool[p.id.toLowerCase()] ?? [] + })); + return poolsWithTicks.filter((p) => p.ticks.length); +} + +// evm/infinity-router/queries/getPoolTvl.ts +var getInfinityPoolTvl = (map, poolId) => { + const ref = map[poolId]; + const tvlUsd = BigInt(ref ? ref.tvlUSD : 0n); + return tvlUsd; +}; + +// evm/infinity-router/queries/getInfinityPools.ts +var getInfinityCandidatePools = async (params) => { + const pools = await getInfinityCandidatePoolsLite(params); + const clPools = pools.filter((pool) => pool.type === 3 /* InfinityCL */); + const binPools = pools.filter((pool) => pool.type === 4 /* InfinityBIN */); + const [poolWithTicks, poolWithBins] = await Promise.all([ + fillClPoolsWithTicks({ + pools: clPools, + clientProvider: params.clientProvider, + gasLimit: params.gasLimit + }), + fillPoolsWithBins({ + pools: binPools, + clientProvider: params.clientProvider, + gasLimit: params.gasLimit + }) + ]); + return [...poolWithTicks, ...poolWithBins]; +}; +async function fetchPoolsOnChain(params) { + const [clPools, binPools] = await Promise.all([ + getInfinityClCandidatePoolsWithoutTicks(params), + getInfinityBinCandidatePoolsWithoutBins(params) + ]); + const pools = [...clPools, ...binPools]; + const poolsWithTvl = pools.map((pool) => { + return { + ...pool, + tvlUSD: params.tvlRefMap ? getInfinityPoolTvl(params.tvlRefMap, pool.id) : 0n + }; + }); + return poolsWithTvl; +} +var getInfinityCandidatePoolsLite = async (params) => { + const pools = await fetchPoolsOnChain(params); + const filtered = infinityPoolTvlSelector(params.currencyA, params.currencyB, pools); + return filtered; +}; + +// evm/infinity-router/queries/getV3Pools.ts +async function getV3CandidatePools2({ + currencyA, + currencyB, + clientProvider, + gasLimit, + disableFilterNoTicks +}) { + const pairs = await getPairCombinations(currencyA, currencyB); + return getV3Pools({ pairs, clientProvider, gasLimit, disableFilterNoTicks }); +} +async function getV3Pools({ pairs, clientProvider, gasLimit, disableFilterNoTicks }) { + const pools = await getV3PoolsWithoutTicksOnChain(pairs || [], clientProvider); + if (!pools.length) { + return pools; + } + return fillPoolsWithTicks({ pools, clientProvider, gasLimit, disableFilterNoTicks }); +} +async function fillPoolsWithTicks({ + pools, + clientProvider, + gasLimit, + disableFilterNoTicks +}) { + const finalTicksByPool = await fetchCombinedPoolsTick({ + pools, + clientProvider, + gasLimit, + disableFilterNoTicks + }); + const poolsWithTicks = pools.map((p) => ({ + ...p, + ticks: finalTicksByPool[p.address.toLowerCase()] ?? [] + })); + return disableFilterNoTicks ? poolsWithTicks : poolsWithTicks.filter((p) => p.ticks.length); +} +function getValidToken(chainId, token) { + try { + const raw = { + address: viem.checksumAddress(token.id), + decimals: token.decimals, + symbol: token.symbol + }; + return parseCurrency(chainId, raw); + } catch (ex) { + console.warn("invalid token", token, ex); + throw ex; + } +} +function normalizeTvlUSD(tvlUSD) { + const val = Number(tvlUSD); + return Number.isFinite(val) ? Math.ceil(val).toString() : "0"; +} +function parseRemotePool(remote) { + if (remote.protocol === "infinityCl") { + return toLocalInfinityPool(remote, remote.chainId); + } + if (remote.protocol === "infinityBin") { + return toLocalInfinityPool(remote, remote.chainId); + } + if (remote.protocol === "infinityStable") { + return parseRemoteInfinityStablePool(remote); + } + if (remote.protocol === "v2") { + return parseRemoteV2Pool(remote); + } + if (remote.protocol === "v3") { + if (remote.chainId === chains.NonEVMChainId.SOLANA) + return parseRemoteV3Pool(remote); + return parseRemoteV3Pool(remote); + } + if (remote.protocol === "stable") { + return parseRemoteStablePool(remote); + } + throw new Error(`Unsupported pool protocol`); +} +function parseRemoteStablePool(remote) { + const chainId = remote.chainId; + const currency0 = getValidToken(chainId, remote.token0); + const currency1 = getValidToken(chainId, remote.token1); + return { + type: 2 /* STABLE */, + address: viem.checksumAddress(remote.id), + balances: [swapSdkCore.CurrencyAmount.fromRawAmount(currency0, 0), swapSdkCore.CurrencyAmount.fromRawAmount(currency1, 0)], + amplifier: 0n, + fee: new swapSdkCore.Percent(remote.feeTier || 0, 1e3) + }; +} +function parseRemoteInfinityStablePool(remote) { + const chainId = remote.chainId; + const currency0 = getValidToken(chainId, remote.token0); + const currency1 = getValidToken(chainId, remote.token1); + const tvlUSD = BigInt(normalizeTvlUSD(remote.tvlUSD)); + const poolManagerAddress = infinitySdk.INFI_CL_POOL_MANAGER_ADDRESSES[chainId]; + return { + type: 5 /* InfinityStable */, + id: viem.checksumAddress(remote.id), + chainId, + currency0, + currency1, + fee: remote.feeTier, + tickSpacing: 1, + // NOTE: amplifier and stableFee are not available in the remote pool yet + amplifier: 0, + stableFee: 0, + hooks: remote.hookAddress ? viem.checksumAddress(remote.hookAddress) : void 0, + poolManager: poolManagerAddress, + tvlUSD + }; +} +function parseRemoteV2Pool(remote) { + const chainId = remote.chainId; + const currency0 = getValidToken(chainId, remote.token0); + const currency1 = getValidToken(chainId, remote.token1); + return { + type: 0 /* V2 */, + address: viem.checksumAddress(remote.id), + reserve0: swapSdkCore.CurrencyAmount.fromRawAmount(currency0, 0), + reserve1: swapSdkCore.CurrencyAmount.fromRawAmount(currency1, 0) + }; +} +function parseRemoteV3Pool(remote) { + const { chainId } = remote; + const isSol = chainId === chains.NonEVMChainId.SOLANA; + return { + type: 1 /* V3 */, + token0: isSol ? parseSolanaToken(chainId, remote.token0) : getValidToken(chainId, remote.token0), + token1: isSol ? parseSolanaToken(chainId, remote.token1) : getValidToken(chainId, remote.token1), + fee: remote.feeTier, + liquidity: remote.liquidity ? BigInt(remote.liquidity) : 0n, + sqrtRatioX96: 0n, + token0ProtocolFee: new swapSdkCore.Percent(0, 1e6), + token1ProtocolFee: new swapSdkCore.Percent(0, 1e6) + }; +} +var DEFAULT_SOLANA_PROGRAM_ID = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; +function parseSolanaToken(chainId, token) { + const programId = DEFAULT_SOLANA_PROGRAM_ID; + return new swapSdkCore.SPLToken({ + chainId, + address: token.id, + decimals: token.decimals, + symbol: token.symbol, + logoURI: "", + programId + }); +} +function toLocalInfinityPool(remote, chainId, hooksMap) { + const { id, feeTier, protocol, protocolFee, hookAddress, tvlUSD } = remote; + const type = protocol === "infinityCl" ? 3 /* InfinityCL */ : 4 /* InfinityBIN */; + let relatedHook = infinitySdk.hooksList[chainId]?.find((hook) => hook.address.toLowerCase() === hookAddress?.toLowerCase()); + if (hooksMap && !relatedHook && hookAddress) { + relatedHook = hooksMap?.[hookAddress.toLowerCase()]; + } + const currency0 = getValidToken(chainId, remote.token0); + const currency1 = getValidToken(chainId, remote.token1); + const bnTvlUsd = BigInt(normalizeTvlUSD(tvlUSD)); + const pool = { + id: viem.checksumAddress(id), + chainId, + type, + fee: feeTier, + protocolFee, + hooks: hookAddress ? viem.checksumAddress(hookAddress) : void 0, + hooksRegistrationBitmap: relatedHook ? infinitySdk.encodeHooksRegistration(relatedHook.hooksRegistration) : void 0, + poolManager: type === 4 /* InfinityBIN */ ? infinitySdk.INFI_BIN_POOL_MANAGER_ADDRESSES[chainId] : infinitySdk.INFI_CL_POOL_MANAGER_ADDRESSES[chainId], + currency0, + currency1, + tvlUSD: bnTvlUsd + }; + if (pool.type === 3 /* InfinityCL */) { + const remoteClPool = remote; + return { + ...pool, + type: 3 /* InfinityCL */, + sqrtRatioX96: remoteClPool.sqrtPrice ? BigInt(remoteClPool.sqrtPrice) : 0n, + tick: remoteClPool.tick, + ticks: remoteClPool.ticks ? remoteClPool.ticks.map((x) => parseTick(x)) : [], + tickSpacing: Number(remoteClPool.tickSpacing), + liquidity: remoteClPool.liquidity ? BigInt(remoteClPool.liquidity) : 0n + }; + } + if (pool.type === 4 /* InfinityBIN */) { + const removeBinPool = remote; + const binPool = { + ...pool, + type: 4 /* InfinityBIN */, + binStep: removeBinPool.binStep, + activeId: removeBinPool.activeId, + reserveOfBin: parseBinPoolBinReserves(removeBinPool.reserveOfBin) + }; + return binPool; + } + throw new Error(`Unknown pool type: ${type}`); +} +function toRemoteInfinityPool(pool) { + const base = { + id: pool.id, + chainId: pool.currency0.chainId, + token0: { + id: pool.currency0.wrapped.address, + decimals: pool.currency0.decimals, + symbol: pool.currency0.symbol || "" + }, + token1: { + id: pool.currency1.wrapped.address, + decimals: pool.currency1.decimals, + symbol: pool.currency1.symbol || "" + }, + tvlUSD: pool.tvlUSD.toString(), + apr24h: "0", + volumeUSD24h: "0", + hookAddress: pool.hooks, + isDynamicFee: false, + // Assuming default; adjust based on your logic + protocol: pool.type === 3 /* InfinityCL */ ? "infinityCl" : "infinityBin", + feeTier: pool.fee + }; + if (pool.type === 3 /* InfinityCL */) { + const ticks = pool.ticks ? pool.ticks.map((x) => serializeTick(x)) : []; + return { + ...base, + sqrtPrice: pool.sqrtRatioX96.toString(), + tick: pool.tick, + ticks, + tickSpacing: pool.tickSpacing, + protocolFee: pool.protocolFee || 0, + feeTier: pool.fee + }; + } + if (pool.type === 4 /* InfinityBIN */) { + const bins = serializeBinPoolBinReserves(pool.reserveOfBin); + return { + ...base, + binStep: pool.binStep, + activeId: pool.activeId, + reserveOfBin: bins, + protocolFee: pool.protocolFee || 0, + feeTier: pool.fee + }; + } + throw new Error(`Unsupported pool type: ${pool}`); +} + +// evm/infinity-router/schema.ts +var schema_exports = {}; +chunkZNSTBYLO_js.__export(schema_exports, { + zPools: () => zPools, + zRouterPostParams: () => zRouterPostParams +}); +var zChainId = zod.z.nativeEnum(chains.ChainId); +var zFee = zod.z.number(); +var zTradeType = zod.z.nativeEnum(sdk.TradeType); +var zAddress = zod.z.custom((val) => /^0x[a-fA-F0-9]{40}$/.test(val)); +var zBigNumber = zod.z.string().regex(/^[0-9]+$/); +var zSignedBigInt = zod.z.string().regex(/^-?[0-9]+$/); +var zHex = zod.z.custom((val) => /^0x[a-fA-F0-9]*$/.test(val)); +var zHooksRegistrationBitmap = zod.z.number().or(zHex); +var zCurrency = zod.z.object({ + address: zAddress, + decimals: zod.z.number(), + symbol: zod.z.string() +}).required(); +var zTick = zod.z.object({ + index: zod.z.number(), + liquidityGross: zSignedBigInt, + liquidityNet: zSignedBigInt +}).required(); +var zCurrencyAmountBase = zod.z.object({ + currency: zCurrency.required(), + value: zBigNumber +}); +var zCurrencyAmountOptional = zCurrencyAmountBase.optional(); +var zCurrencyAmount = zCurrencyAmountBase.required(); +var zV2Pool = zod.z.object({ + type: zod.z.literal(0 /* V2 */), + reserve0: zCurrencyAmount, + reserve1: zCurrencyAmount +}).required(); +var zV3Pool = zod.z.object({ + type: zod.z.literal(1 /* V3 */), + token0: zCurrency, + token1: zCurrency, + fee: zFee, + liquidity: zBigNumber, + sqrtRatioX96: zBigNumber, + tick: zod.z.number(), + address: zAddress, + token0ProtocolFee: zod.z.string(), + token1ProtocolFee: zod.z.string(), + reserve0: zCurrencyAmountOptional, + reserve1: zCurrencyAmountOptional, + ticks: zod.z.array(zTick).optional() +}).required({ + type: true, + token0: true, + token1: true, + fee: true, + liquidity: true, + sqrtRatioX96: true, + tick: true, + address: true, + token0ProtocolFee: true, + token1ProtocolFee: true +}); +var zStablePool = zod.z.object({ + type: zod.z.literal(2 /* STABLE */), + balances: zod.z.array(zCurrencyAmount), + amplifier: zBigNumber, + fee: zod.z.string(), + address: zAddress +}).required(); +var zInfinityClPool = zod.z.object({ + type: zod.z.literal(3 /* InfinityCL */), + currency0: zCurrency, + currency1: zCurrency, + fee: zFee, + liquidity: zBigNumber, + sqrtRatioX96: zBigNumber, + tick: zod.z.number(), + tickSpacing: zod.z.number(), + poolManager: zAddress, + id: zHex +}).required().extend({ + protocolFee: zFee.optional(), + reserve0: zCurrencyAmountOptional, + reserve1: zCurrencyAmountOptional, + hooks: zAddress.optional(), + hooksRegistrationBitmap: zHooksRegistrationBitmap.optional(), + ticks: zod.z.array(zTick).optional() +}); +var zBinReserves = zod.z.object({ + reserveX: zBigNumber, + reserveY: zBigNumber +}).required(); +var zInfinityBinPool = zod.z.object({ + type: zod.z.literal(4 /* InfinityBIN */), + currency0: zCurrency, + currency1: zCurrency, + fee: zFee, + activeId: zod.z.number(), + binStep: zod.z.number(), + poolManager: zAddress, + id: zHex +}).required().extend({ + protocolFee: zFee.optional(), + reserve0: zCurrencyAmountOptional, + reserve1: zCurrencyAmountOptional, + hooks: zAddress.optional(), + hooksRegistrationBitmap: zHooksRegistrationBitmap.optional(), + reserveOfBin: zod.z.record(zBigNumber, zBinReserves).optional() +}); +var zInfinityStablePool = zod.z.object({ + type: zod.z.literal(5 /* InfinityStable */), + currency0: zCurrency, + currency1: zCurrency, + fee: zFee, + tickSpacing: zod.z.number(), + id: zHex, + poolManager: zAddress +}).required().extend({ + hooks: zAddress.optional(), + hooksRegistrationBitmap: zHooksRegistrationBitmap.optional(), + reserve0: zCurrencyAmountOptional, + reserve1: zCurrencyAmountOptional, + stableFee: zFee, + amplifier: zod.z.number() +}); +var zPools = zod.z.array( + zod.z.union([zV3Pool, zV2Pool, zStablePool, zInfinityClPool, zInfinityBinPool, zInfinityStablePool]) +); +var zRouterPostParams = zod.z.object({ + chainId: zChainId, + tradeType: zTradeType, + amount: zCurrencyAmount, + currency: zCurrency, + candidatePools: zPools, + gasPriceWei: zBigNumber.optional(), + maxHops: zod.z.number().optional(), + maxSplits: zod.z.number().optional() +}).required({ + chainId: true, + tradeType: true, + amount: true, + currency: true, + candidatePools: true +}); +function estimateGasCost({ pool, poolAfter }) { + if (isV2Pool(pool)) { + return chunkZNSTBYLO_js.BASE_SWAP_COST_V2; + } + if (isV3Pool(pool) && isV3Pool(poolAfter)) { + const { ticks, token0, tick } = pool; + invariant6__default.default(ticks !== void 0, "[Estimate gas]: No valid tick list found"); + const { tick: tickAfter } = poolAfter; + const { chainId } = token0; + const numOfTicksCrossed = v3Sdk.TickList.countInitializedTicksCrossed(ticks, tick, tickAfter); + const tickGasUse = chunkZNSTBYLO_js.COST_PER_INIT_TICK(chainId) * BigInt(numOfTicksCrossed); + return chunkZNSTBYLO_js.BASE_SWAP_COST_V3(chainId) + chunkZNSTBYLO_js.COST_PER_HOP_V3(chainId) + tickGasUse; + } + if (isStablePool(pool)) { + return chunkZNSTBYLO_js.BASE_SWAP_COST_STABLE_SWAP; + } + throw new Error("[Estimate gas]: Unknown pool type"); +} + +// evm/infinity-router/pool.ts +function getCurrencyPairs(p) { + if (isV3Pool(p)) { + return [[p.token0, p.token1]]; + } + if (isV2Pool(p)) { + return [[p.reserve0.currency, p.reserve1.currency]]; + } + if (isStablePool(p)) { + const currencies = p.balances.map((b) => b.currency); + const pairs = []; + for (let i = 0; i < currencies.length; i++) { + for (let j = i + 1; j < currencies.length; j++) { + pairs.push([currencies[i], currencies[j]]); + } + } + return pairs; + } + throw new Error("[Get currency pairs]: Unknown pool type"); +} +function getReserve(p, currency) { + if (isV3Pool(p)) { + return p.token0.equals(currency.wrapped) ? p.reserve0 : p.reserve1; + } + if (isV2Pool(p)) { + return p.reserve0.currency.wrapped.equals(currency.wrapped) ? p.reserve0 : p.reserve1; + } + if (isStablePool(p)) { + return p.balances.find((b) => b.currency.wrapped.equals(currency.wrapped)); + } + throw new Error("[Get reserve]: Unknown pool type"); +} + +// evm/infinity-router/utils/groupPoolsPyType.ts +function groupPoolsByType(pools) { + const poolsByType = /* @__PURE__ */ new Map(); + for (const pool of pools) { + poolsByType.set(pool.type, [...poolsByType.get(pool.type) || [], pool]); + } + return Array.from(poolsByType.values()); +} +function getBetterTrade(tradeA, tradeB) { + if (!tradeA && !tradeB) + return void 0; + if (!tradeA && tradeB) + return tradeB; + if (tradeA && !tradeB) + return tradeA; + const isExactIn = tradeA.tradeType === sdk.TradeType.EXACT_INPUT; + if (isExactIn) { + if (tradeB.outputAmountWithGasAdjusted.greaterThan(tradeA.outputAmountWithGasAdjusted)) { + return tradeB; + } + return tradeA; + } + if (tradeB.inputAmountWithGasAdjusted.lessThan(tradeA.inputAmountWithGasAdjusted)) { + return tradeB; + } + return tradeA; +} + +// evm/infinity-router/graph/edge.ts +function getNeighbour(e, v) { + return e.vertice0.currency.equals(v.currency) ? e.vertice1 : e.vertice0; +} +function createPriceCalculator({ graph, quote, gasPriceWei }) { + const { chainId } = quote.currency; + const priceMap = /* @__PURE__ */ new Map(); + const processedVert = /* @__PURE__ */ new Set(); + const edgeWeight = /* @__PURE__ */ new Map(); + let nextEdges = []; + const getWeight = (e) => { + const weight = edgeWeight.get(e); + if (weight === void 0) { + throw new Error(`Invalid weight for edge ${e}`); + } + return weight; + }; + priceMap.set(quote, new sdk.Price(quote.currency, quote.currency, 1, 1)); + nextEdges = getNextEdges(quote); + processedVert.add(quote); + while (nextEdges.length) { + const bestEdge = nextEdges.pop(); + const [vFrom, vTo] = processedVert.has(bestEdge.vertice1) ? [bestEdge.vertice1, bestEdge.vertice0] : [bestEdge.vertice0, bestEdge.vertice1]; + if (processedVert.has(vTo)) + continue; + const p = getTokenPrice(bestEdge.pool, vTo.currency, vFrom.currency); + const vFromQuotePrice = getQuotePrice(vFrom); + invariant6__default.default(vFromQuotePrice !== void 0, "Invalid quote price"); + priceMap.set(vTo, p.multiply(vFromQuotePrice)); + nextEdges = getNextEdges(vTo); + processedVert.add(vTo); + } + const native = sdk.Native.onChain(chainId).wrapped; + const nativeVertice = graph.getVertice(native); + if (!nativeVertice) { + throw new Error("No valid native currency price found"); + } + const nativePriceInQuote = getQuotePrice(nativeVertice); + const gasPriceInQuote = nativePriceInQuote?.quote(sdk.CurrencyAmount.fromRawAmount(native, gasPriceWei)); + if (!gasPriceInQuote) { + throw new Error("Failed to get gas price in quote"); + } + function getNextEdges(v) { + const price = priceMap.get(v); + if (!price) { + throw new Error("Invalid price"); + } + const newEdges = v.edges.filter((e) => { + if (processedVert.has(getNeighbour(e, v))) { + return false; + } + const tokenReserve = getReserve(e.pool, v.currency); + invariant6__default.default(tokenReserve !== void 0, "Unexpected empty token reserve"); + const liquidity = price.quote(tokenReserve).quotient; + edgeWeight.set(e, liquidity); + return true; + }); + newEdges.sort((e1, e2) => Number(getWeight(e1) - getWeight(e2))); + const res = []; + while (nextEdges.length && newEdges.length) { + if (getWeight(nextEdges[0]) < getWeight(newEdges[0])) { + res.push(nextEdges.shift()); + } else { + res.push(newEdges.shift()); + } + } + return [...res, ...nextEdges, ...newEdges]; + } + function getPrice(base, targetQuote) { + const basePrice = getQuotePrice(base); + const quotePrice = getQuotePrice(targetQuote); + return basePrice && quotePrice ? basePrice.multiply(quotePrice.invert()) : void 0; + } + function getQuotePrice(base) { + return priceMap.get(base); + } + function getGasPriceInBase(base) { + const basePrice = getQuotePrice(base); + return gasPriceInQuote ? basePrice?.invert().quote(gasPriceInQuote) : void 0; + } + return { + graph, + getGasPriceInBase, + getQuotePrice, + getPrice + }; +} + +// evm/infinity-router/graph/route.ts +function isSameRoute(one, another) { + if (one.pools.length !== another.pools.length) { + return false; + } + for (const [index, p] of one.pools.entries()) { + if (p.type !== another.pools[index].type) { + return false; + } + if (getPoolAddress(p) !== getPoolAddress(another.pools[index])) { + return false; + } + } + return true; +} +function mergeRoute(one, another) { + return { + ...one, + inputAmount: one.inputAmount.add(another.inputAmount), + outputAmount: one.outputAmount.add(another.outputAmount), + gasUseEstimateQuote: another.gasUseEstimateQuote ? one.gasUseEstimateQuote?.add(another.gasUseEstimateQuote) : one.gasUseEstimateQuote, + gasUseEstimate: one.gasUseEstimate + another.gasUseEstimate, + inputAmountWithGasAdjusted: another.inputAmountWithGasAdjusted ? one.inputAmountWithGasAdjusted?.add(another.inputAmountWithGasAdjusted) : one.inputAmountWithGasAdjusted, + outputAmountWithGasAdjusted: another.outputAmountWithGasAdjusted ? one.outputAmountWithGasAdjusted?.add(another.outputAmountWithGasAdjusted) : one.outputAmountWithGasAdjusted, + percent: one.percent + another.percent + }; +} + +// evm/infinity-router/graph/graph.ts +function getEdgeKey(p, vertA, vertB) { + const [vert0, vert1] = vertA.currency.wrapped.sortsBefore(vertB.currency.wrapped) ? [vertA, vertB] : [vertB, vertA]; + return `${vert0.currency.chainId}-${vert0.currency.wrapped.address}-${vert1.currency.wrapped.address}-${getPoolAddress(p)}`; +} +function cloneGraph(graph) { + const pools = graph.edges.map((e) => e.pool); + return createGraph({ pools }); +} +function createGraph({ pools, graph }) { + if (graph) { + return cloneGraph(graph); + } + if (!pools) { + throw new Error("[Create graph]: Invalid pools"); + } + const verticeMap = /* @__PURE__ */ new Map(); + const edgeMap = /* @__PURE__ */ new Map(); + for (const p of pools) { + const pairs = getCurrencyPairs(p); + for (const [currency0, currency1] of pairs) { + const vertice0 = createVertice(currency0); + const vertice1 = createVertice(currency1); + const edge = createEdge(p, vertice0, vertice1); + if (!vertice0.edges.includes(edge)) + vertice0.edges.push(edge); + if (!vertice1.edges.includes(edge)) + vertice1.edges.push(edge); + } + } + function getVertice(c) { + return verticeMap.get(c.wrapped.address); + } + function getEdge(p, vert0, vert1) { + return edgeMap.get(getEdgeKey(p, vert0, vert1)); + } + function createVertice(c) { + const vert = getVertice(c); + if (vert) { + return vert; + } + const vertice = { currency: c, edges: [] }; + verticeMap.set(c.wrapped.address, vertice); + return vertice; + } + function createEdge(p, vertice0, vertice1) { + const edgeKey = getEdgeKey(p, vertice0, vertice1); + if (!edgeKey) { + throw new Error(`Create edge failed. Cannot get valid edge key for ${p}`); + } + const e = edgeMap.get(edgeKey); + if (e) { + return e; + } + const edge = { + vertice0, + vertice1, + pool: p + }; + edgeMap.set(edgeKey, edge); + return edge; + } + const hasValidRouteToVerticeWithinHops = memoize( + (vertice, target, hops, visitedVertices) => { + if (vertice === target) { + return true; + } + if (hops <= 0) { + return false; + } + const visited = visitedVertices || /* @__PURE__ */ new Set(); + visited.add(vertice); + for (const edge of vertice.edges) { + const nextVertice = getNeighbour(edge, vertice); + if (nextVertice && !visited.has(nextVertice)) { + if (hasValidRouteToVerticeWithinHops(nextVertice, target, hops - 1, visited)) { + return true; + } + } + } + return false; + }, + (v1, v2, hops) => `${v1.currency.chainId}-${v1.currency.wrapped.address}-${v2.currency.wrapped.address}-${hops}` + ); + return { + vertices: Array.from(verticeMap.values()), + edges: Array.from(edgeMap.values()), + getVertice, + getEdge, + hasValidRouteToVerticeWithinHops, + applySwap: async ({ isExactIn, route }) => { + const getPoolQuote = createPoolQuoteGetter(isExactIn); + function* loopPools() { + let i = isExactIn ? 0 : route.pools.length - 1; + const getNext = () => isExactIn ? i + 1 : i - 1; + const hasNext = isExactIn ? () => i < route.pools.length : () => i >= 0; + for (; hasNext(); i = getNext()) { + yield i; + } + } + const amount = isExactIn ? route.inputAmount : route.outputAmount; + invariant6__default.default(amount !== void 0, "[Apply swap]: Invalid base amount"); + let quote = amount; + let gasCost = 0n; + for (const i of loopPools()) { + const vertA = getVertice(route.path[i]); + const vertB = getVertice(route.path[i + 1]); + const p = route.pools[i]; + invariant6__default.default( + vertA !== void 0 && vertB !== void 0 && p !== void 0, + "[Apply swap]: Invalid vertice and pool" + ); + const edge = getEdge(p, vertA, vertB); + invariant6__default.default(edge !== void 0, "[Apply swap]: No valid edge found"); + const quoteResult = await getPoolQuote(edge.pool, quote); + invariant6__default.default(quoteResult !== void 0, "[Apply swap]: Failed to get quote"); + edge.pool = quoteResult.poolAfter; + quote = quoteResult.quote; + gasCost += estimateGasCost(quoteResult); + } + return { + amount, + quote, + gasCost + }; + } + }; +} +function getStreamedAmounts(amount, streams) { + const streamSum = Array.isArray(streams) ? streams.reduce((sum3, s) => sum3 + s, 0) : streams; + const streamDistributions = Array.isArray(streams) ? streams.map((stream) => new sdk.Fraction(stream, streamSum)) : Array.from({ length: streams }).map(() => new sdk.Fraction(1, streamSum)); + const numOfStreams = streamDistributions.length; + let sum2 = new sdk.Fraction(0); + const amounts = []; + for (const [index, stream] of streamDistributions.entries()) { + const streamAmount = index === numOfStreams - 1 ? amount.subtract(amount.multiply(sum2)) : amount.multiply(stream); + const revisedStream = index === numOfStreams - 1 ? new sdk.Fraction(1).subtract(sum2) : stream; + const percent = Number(formatFraction(revisedStream) || 0) * 100; + amounts.push({ amount: streamAmount, percent }); + sum2 = sum2.add(stream); + } + return amounts; +} +var getGasCostInCurrency = ({ + priceCalculator, + gasCost, + currency +}) => { + const v = priceCalculator.graph.getVertice(currency); + const gasPriceInCurrency = v && priceCalculator.getGasPriceInBase(v); + const gasCostInCurrencyRaw = gasPriceInCurrency?.multiply(gasCost); + return sdk.CurrencyAmount.fromRawAmount(currency, gasCostInCurrencyRaw?.quotient || 0); +}; +async function findBestTrade(params) { + const { tradeType, candidatePools, ...rest } = params; + const isExactIn = tradeType === sdk.TradeType.EXACT_INPUT; + if (isExactIn) { + return getBestTrade(params); + } + const poolsByType = groupPoolsByType(candidatePools).filter((pools) => !isStablePool(pools[0])); + const trades = await Promise.allSettled( + poolsByType.map((pools) => getBestTrade({ tradeType, candidatePools: pools, ...rest })) + ); + let bestTrade; + for (const result of trades) { + if (result.status === "rejected") { + continue; + } + const { value: trade } = result; + if (!trade) { + continue; + } + if (!bestTrade) { + bestTrade = trade; + continue; + } + bestTrade = getBetterTrade(bestTrade, trade); + } + return bestTrade; +} +async function getBestTrade({ + amount: totalAmount, + candidatePools, + quoteCurrency, + gasPriceWei, + streams, + graph: graphOverride, + tradeType, + maxHops = 3 +}) { + const isExactIn = tradeType === sdk.TradeType.EXACT_INPUT; + const baseCurrency = totalAmount.currency; + const inputCurrency = isExactIn ? baseCurrency : quoteCurrency; + const outputCurrency = isExactIn ? quoteCurrency : baseCurrency; + const graph = graphOverride || createGraph({ pools: candidatePools }); + const amounts = getStreamedAmounts(totalAmount, streams); + const getPoolQuote = createPoolQuoteGetter(isExactIn); + const gasPrice = BigInt(typeof gasPriceWei === "function" ? await gasPriceWei() : gasPriceWei); + const start = graph.getVertice(baseCurrency); + const finish = graph.getVertice(quoteCurrency); + if (!start || !finish) { + throw new Error(`Invalid start vertice or finish vertice. Start ${start}, finish ${finish}`); + } + const priceCalculator = createPriceCalculator({ quote: start, gasPriceWei: gasPrice, graph }); + const adjustQuoteByGas = (quote, gasCostInQuote) => isExactIn ? quote.subtract(gasCostInQuote) : quote.add(gasCostInQuote); + const isQuoteBetter = (quote, compareTo) => isExactIn ? quote.greaterThan(compareTo) : quote.lessThan(compareTo); + const getInputAmount = (amount, quote) => isExactIn ? amount : quote; + const getOutputAmount = (amount, quote) => isExactIn ? quote : amount; + const getQuoteAmount = (r) => isExactIn ? r.outputAmount : r.inputAmount; + const buildTrade = (g, routes2) => { + const { + gasUseEstimate, + quoteAmount, + gasUseEstimateQuote, + gasUseEstimateBase, + inputAmountWithGasAdjusted, + outputAmountWithGasAdjusted + } = routes2.reduce( + (result, r) => { + return { + gasUseEstimate: result.gasUseEstimate + r.gasUseEstimate, + quoteAmount: result.quoteAmount.add(getQuoteAmount(r)), + gasUseEstimateBase: result.gasUseEstimateBase.add(r.gasUseEstimateBase), + gasUseEstimateQuote: result.gasUseEstimateQuote.add(r.gasUseEstimateQuote), + inputAmountWithGasAdjusted: result.inputAmountWithGasAdjusted.add(r.inputAmountWithGasAdjusted), + outputAmountWithGasAdjusted: result.outputAmountWithGasAdjusted.add(r.outputAmountWithGasAdjusted) + }; + }, + { + gasUseEstimate: 0n, + quoteAmount: sdk.CurrencyAmount.fromRawAmount(quoteCurrency, 0), + gasUseEstimateBase: sdk.CurrencyAmount.fromRawAmount(baseCurrency, 0), + gasUseEstimateQuote: sdk.CurrencyAmount.fromRawAmount(quoteCurrency, 0), + inputAmountWithGasAdjusted: sdk.CurrencyAmount.fromRawAmount(inputCurrency, 0), + outputAmountWithGasAdjusted: sdk.CurrencyAmount.fromRawAmount(outputCurrency, 0) + } + ); + return { + gasUseEstimate, + gasUseEstimateQuote, + gasUseEstimateBase, + inputAmountWithGasAdjusted, + outputAmountWithGasAdjusted, + inputAmount: getInputAmount(totalAmount, quoteAmount), + outputAmount: getOutputAmount(totalAmount, quoteAmount), + tradeType, + graph: g, + routes: routes2 + }; + }; + async function findBestRoute(amount) { + invariant6__default.default(start !== void 0 && finish !== void 0, "Invalid start/finish vertice"); + const bestResult = /* @__PURE__ */ new Map(); + const processedVert = /* @__PURE__ */ new Set(); + bestResult.set(start, { + hops: 0, + bestAmount: amount, + gasSpent: 0n + }); + const nextVertList = [start]; + const getHops = (vert) => bestResult.get(vert)?.hops || 0; + const getBestAmount = (vert) => bestResult.get(vert)?.bestAmount; + const getBestQuote = (vert) => bestResult.get(vert)?.bestQuote; + const getBestSource = (vert) => bestResult.get(vert)?.bestSource; + const getGasSpent = (vert) => bestResult.get(vert)?.gasSpent || 0n; + const getNextVert = () => { + let vert; + let bestQuote; + let bestVertIndex; + for (const [i, vertice] of nextVertList.entries()) { + const currentBestQuote = getBestQuote(vertice); + if (vert === void 0 || bestQuote === void 0 || currentBestQuote && isQuoteBetter(currentBestQuote, bestQuote)) { + vert = vertice; + bestQuote = currentBestQuote; + bestVertIndex = i; + } + } + return { vert, index: bestVertIndex }; + }; + const getBestRoute = (vert) => { + const pools = []; + const path = [vert.currency]; + for (let v = finish; getBestSource(v); v = getNeighbour(getBestSource(v), v)) { + const bestSource = getBestSource(v); + invariant6__default.default(bestSource !== void 0, "Invalid best source"); + const neighbour = getNeighbour(bestSource, v); + if (isExactIn) { + pools.unshift(bestSource.pool); + path.unshift(neighbour?.currency); + } else { + pools.push(bestSource.pool); + path.push(neighbour?.currency); + } + } + const gasCost = getGasSpent(vert); + const quoteAmountRaw = getBestAmount(vert); + invariant6__default.default(quoteAmountRaw !== void 0, "Invalid quote amount"); + const quoteAmount = sdk.CurrencyAmount.fromRawAmount(quoteCurrency, quoteAmountRaw.quotient); + const gasUseEstimateBase = getGasCostInCurrency({ priceCalculator, gasCost, currency: baseCurrency }); + const gasUseEstimateQuote = getGasCostInCurrency({ priceCalculator, gasCost, currency: quoteCurrency }); + const quoteAmountWithGasAdjusted = sdk.CurrencyAmount.fromRawAmount( + quoteCurrency, + gasUseEstimateQuote ? adjustQuoteByGas(quoteAmount, gasUseEstimateQuote).quotient : 0 + ); + const { type } = buildBaseRoute(pools, start.currency, finish.currency); + return { + type, + path, + pools, + gasUseEstimate: gasCost, + inputAmount: getInputAmount(amount, quoteAmount), + outputAmount: getOutputAmount(amount, quoteAmount), + inputAmountWithGasAdjusted: getInputAmount(amount, quoteAmountWithGasAdjusted), + outputAmountWithGasAdjusted: getOutputAmount(amount, quoteAmountWithGasAdjusted), + gasUseEstimateQuote, + gasUseEstimateBase + }; + }; + for (; ; ) { + const { vert, index } = getNextVert(); + if (!vert || index === void 0) + return void 0; + if (vert === finish) { + return getBestRoute(vert); + } + nextVertList.splice(index, 1); + const currentHop = getHops(vert); + for (const e of vert.edges) { + const v2 = vert === e.vertice0 ? e.vertice1 : e.vertice0; + if (processedVert.has(v2)) + continue; + if (!graph.hasValidRouteToVerticeWithinHops(v2, finish, maxHops - currentHop - 1)) { + continue; + } + try { + const bestAmount = getBestAmount(vert); + invariant6__default.default(bestAmount !== void 0, "Invalid amount"); + const quoteResult = await getPoolQuote(e.pool, bestAmount); + invariant6__default.default(quoteResult !== void 0, "Invalid quote result"); + const { quote } = quoteResult; + const gasPriceInV2 = priceCalculator.getGasPriceInBase(v2); + invariant6__default.default(gasPriceInV2 !== void 0, "Invalid gas price in v2"); + const gasSpent = estimateGasCost(quoteResult) + getGasSpent(vert); + const price = priceCalculator.getPrice(v2, finish); + invariant6__default.default( + price !== void 0, + `Failed to get price, base ${v2.currency.symbol}, quote ${finish.currency.symbol}` + ); + const gasSpentInQuote = price.quote(gasPriceInV2.multiply(gasSpent)); + const newQuote = adjustQuoteByGas(price.quote(quote), gasSpentInQuote); + const bestSource = getBestSource(v2); + const v2BestQuote = getBestQuote(v2); + if (!bestSource) + nextVertList.push(v2); + if (!bestSource || !v2BestQuote || isQuoteBetter(newQuote, v2BestQuote)) { + bestResult.set(v2, { + hops: currentHop + 1, + gasSpent, + bestAmount: quote, + bestSource: e, + bestQuote: newQuote + }); + } + } catch (_err) { + continue; + } + } + processedVert.add(vert); + } + } + let routeMerged = false; + const routes = []; + for (const { amount, percent } of amounts) { + const route = await findBestRoute(amount); + invariant6__default.default( + route !== void 0, + `No valid route found for base amount ${amount.toExact()} ${amount.currency.symbol} and quote currency ${quoteCurrency.symbol}` + ); + await graph.applySwap({ route, isExactIn }); + const newRoute = { + ...route, + percent + }; + const index = routes.findIndex((r) => isSameRoute(r, newRoute)); + if (index < 0) { + routes.push(newRoute); + } else { + routes[index] = mergeRoute(routes[index], newRoute); + routeMerged = true; + } + } + if (!routes.length) { + return void 0; + } + if (!routeMerged) { + return buildTrade(graph, routes); + } + const finalGraph = createGraph({ graph: graphOverride, pools: candidatePools }); + const s = finalGraph.getVertice(baseCurrency); + invariant6__default.default(s !== void 0, "[Graph rebuild]: Invalid start vertice"); + const pc = createPriceCalculator({ quote: s, gasPriceWei: gasPrice, graph: finalGraph }); + const finalRoutes = []; + for (const r of routes) { + const { amount, quote: quoteRaw, gasCost } = await finalGraph.applySwap({ isExactIn, route: r }); + const quote = sdk.CurrencyAmount.fromRawAmount(quoteCurrency, quoteRaw.quotient); + const gasUseEstimateBase = getGasCostInCurrency({ priceCalculator: pc, gasCost, currency: baseCurrency }); + const gasUseEstimateQuote = getGasCostInCurrency({ priceCalculator: pc, gasCost, currency: quoteCurrency }); + const quoteAmountWithGasAdjusted = sdk.CurrencyAmount.fromRawAmount( + quoteCurrency, + gasUseEstimateQuote ? adjustQuoteByGas(quote, gasUseEstimateQuote).quotient : 0 + ); + finalRoutes.push({ + ...r, + gasUseEstimate: gasCost, + inputAmount: getInputAmount(amount, quote), + outputAmount: getOutputAmount(amount, quote), + inputAmountWithGasAdjusted: getInputAmount(amount, quoteAmountWithGasAdjusted), + outputAmountWithGasAdjusted: getOutputAmount(amount, quoteAmountWithGasAdjusted), + gasUseEstimateQuote, + gasUseEstimateBase + }); + } + return buildTrade(finalGraph, finalRoutes); +} + +// evm/infinity-router/trade.ts +var DEFAULT_STREAM = 10; +function getBestStreamsConfig(trade) { + const maxStreams = 100; + if (!trade) { + return DEFAULT_STREAM; + } + const priceImpact = getPriceImpact(trade); + if (!priceImpact) { + return DEFAULT_STREAM; + } + const { gasUseEstimateBase, inputAmount, outputAmount } = trade; + if (!gasUseEstimateBase) { + return DEFAULT_STREAM; + } + const amount = trade.tradeType === sdk.TradeType.EXACT_INPUT ? inputAmount : outputAmount; + const bestFlowAmount = Math.sqrt( + Number(gasUseEstimateBase.toExact()) * Number(amount.toExact()) / Number(formatFraction(priceImpact.asFraction)) + ); + const streams = Math.round(Number(amount.toExact()) / bestFlowAmount); + if (!Number.isFinite(streams)) { + return DEFAULT_STREAM; + } + return Math.max(1, Math.min(streams, maxStreams)); +} +async function getBestTrade2(amount, quoteCurrency, tradeType, { candidatePools, gasPriceWei, maxHops, maxSplits }) { + const splitDisabled = maxSplits !== void 0 && maxSplits === 0; + let bestTrade; + try { + bestTrade = await findBestTrade({ + tradeType, + amount, + quoteCurrency, + gasPriceWei, + candidatePools, + maxHops, + streams: 1 + }); + } catch (e) { + if (splitDisabled) { + throw e; + } + bestTrade = await findBestTrade({ + tradeType, + amount, + quoteCurrency, + gasPriceWei, + candidatePools, + maxHops, + streams: DEFAULT_STREAM + }); + } + if (splitDisabled) { + return bestTrade; + } + const streams = getBestStreamsConfig(bestTrade); + if (streams === 1) { + return bestTrade; + } + const bestTradeWithStreams = await findBestTrade({ + tradeType, + amount, + quoteCurrency, + gasPriceWei, + candidatePools, + maxHops, + streams + }); + return getBetterTrade(bestTrade, bestTradeWithStreams); +} + +// evm/infinity-router/transformer.ts +var transformer_exports2 = {}; +chunkZNSTBYLO_js.__export(transformer_exports2, { + parseRoute: () => parseRoute2, + parseTrade: () => parseTrade2, + serializeRoute: () => serializeRoute2, + serializeTrade: () => serializeTrade2 +}); +function serializeRoute2(route) { + return { + ...route, + pools: route.pools.map(serializePool), + path: route.path.map(serializeCurrency), + inputAmount: serializeCurrencyAmount(route.inputAmount), + outputAmount: serializeCurrencyAmount(route.outputAmount), + gasUseEstimate: String(route.gasUseEstimate), + gasUseEstimateBase: serializeCurrencyAmount(route.gasUseEstimateBase), + gasUseEstimateQuote: serializeCurrencyAmount(route.gasUseEstimateQuote), + inputAmountWithGasAdjusted: serializeCurrencyAmount(route.inputAmountWithGasAdjusted), + outputAmountWithGasAdjusted: serializeCurrencyAmount(route.outputAmountWithGasAdjusted) + }; +} +function parseRoute2(chainId, route) { + return { + ...route, + pools: route.pools.map((p) => parsePool(chainId, p)), + path: route.path.map((c) => parseCurrency(chainId, c)), + inputAmount: parseCurrencyAmount(chainId, route.inputAmount), + outputAmount: parseCurrencyAmount(chainId, route.outputAmount), + gasUseEstimate: BigInt(route.gasUseEstimate), + gasUseEstimateBase: parseCurrencyAmount(chainId, route.gasUseEstimateBase), + gasUseEstimateQuote: parseCurrencyAmount(chainId, route.gasUseEstimateQuote), + inputAmountWithGasAdjusted: parseCurrencyAmount(chainId, route.inputAmountWithGasAdjusted), + outputAmountWithGasAdjusted: parseCurrencyAmount(chainId, route.outputAmountWithGasAdjusted) + }; +} +function serializeTrade2(trade) { + const { graph: _graph, ...rest } = trade; + return { + ...rest, + inputAmount: serializeCurrencyAmount(trade.inputAmount), + outputAmount: serializeCurrencyAmount(trade.outputAmount), + routes: trade.routes.map(serializeRoute2), + gasUseEstimate: trade.gasUseEstimate.toString(), + gasUseEstimateBase: serializeCurrencyAmount(trade.gasUseEstimateBase), + gasUseEstimateQuote: serializeCurrencyAmount(trade.gasUseEstimateQuote), + inputAmountWithGasAdjusted: serializeCurrencyAmount(trade.inputAmountWithGasAdjusted), + outputAmountWithGasAdjusted: serializeCurrencyAmount(trade.outputAmountWithGasAdjusted) + }; +} +function parseTrade2(chainId, trade) { + return { + ...trade, + tradeType: trade.tradeType, + inputAmount: parseCurrencyAmount(chainId, trade.inputAmount), + outputAmount: parseCurrencyAmount(chainId, trade.outputAmount), + routes: trade.routes.map((r) => parseRoute2(chainId, r)), + gasUseEstimate: trade.gasUseEstimate ? BigInt(trade.gasUseEstimate) : 0n, + gasUseEstimateBase: parseCurrencyAmount(chainId, trade.gasUseEstimateBase), + gasUseEstimateQuote: parseCurrencyAmount(chainId, trade.gasUseEstimateQuote), + inputAmountWithGasAdjusted: parseCurrencyAmount(chainId, trade.inputAmountWithGasAdjusted), + outputAmountWithGasAdjusted: parseCurrencyAmount(chainId, trade.outputAmountWithGasAdjusted) + }; +} +var SCOPE_PREFIX2 = "infinity-router"; +var SCOPE2 = { + metric: "metric", + log: "log", + error: "error" +}; +var log_2 = debug__default.default(SCOPE_PREFIX2); +var metric2 = log_2.extend(SCOPE2.metric); +var log3 = log_2.extend(SCOPE2.log); +var logger2 = { + metric: metric2, + log: log3, + error: debug__default.default(SCOPE_PREFIX2).extend(SCOPE2.error), + enable: (namespace) => { + let namespaces = namespace; + if (namespace.includes(",")) { + namespaces = namespace.split(",").map((ns) => `${SCOPE_PREFIX2}:${ns}`).join(","); + } else { + namespaces = `${SCOPE_PREFIX2}:${namespace}`; + } + debug__default.default.enable(namespaces); + } +}; + +// evm/v3-router/smartRouter.ts +var smartRouter_exports = {}; +chunkZNSTBYLO_js.__export(smartRouter_exports, { + APISchema: () => schema_exports2, + PancakeMulticallProvider: () => PancakeMulticallProvider, + Transformer: () => transformer_exports, + buildBaseRoute: () => buildBaseRoute, + createCommonTokenPriceProvider: () => createCommonTokenPriceProvider, + createGetV2CandidatePools: () => createGetV2CandidatePools, + createGetV3CandidatePools: () => createGetV3CandidatePools, + createGetV3CandidatePoolsWithFallbacks: () => createGetV3CandidatePools, + createHybridPoolProvider: () => createHybridPoolProvider, + createOffChainQuoteProvider: () => createOffChainQuoteProvider, + createOnChainPoolFactory: () => createOnChainPoolFactory, + createPoolProvider: () => createPoolProvider, + createPoolQuoteGetter: () => createPoolQuoteGetter, + createQuoteProvider: () => createQuoteProvider, + createStaticPoolProvider: () => createStaticPoolProvider, + createV2PoolsProviderByCommonTokenPrices: () => createV2PoolsProviderByCommonTokenPrices, + encodeInfinityRouteToPath: () => encodeInfinityRouteToPath, + encodeMixedRouteToPath: () => encodeMixedRouteToPath, + getAllV3PoolsFromSubgraph: () => getAllV3PoolsFromSubgraph, + getBestTrade: () => getBestTrade3, + getCandidatePools: () => getCandidatePools, + getCheckAgainstBaseTokens: () => getCheckAgainstBaseTokens, + getCommonTokenPrices: () => getCommonTokenPrices, + getCommonTokenPricesByLlma: () => getCommonTokenPricesByLlma, + getCommonTokenPricesBySubgraph: () => getCommonTokenPricesBySubgraph, + getCommonTokenPricesByWalletApi: () => getCommonTokenPricesByWalletApi, + getCurrenciesOfPool: () => getCurrenciesOfPool, + getExecutionPrice: () => getExecutionPrice, + getMidPrice: () => getMidPrice, + getOutputCurrency: () => getOutputCurrency, + getOutputOfPools: () => getOutputOfPools, + getPairCombinations: () => getPairCombinations, + getPoolAddress: () => getPoolAddress, + getPriceImpact: () => getPriceImpact, + getStableCandidatePools: () => getStableCandidatePools, + getStablePoolsOnChain: () => getStablePoolsOnChain, + getTokenUsdPricesBySubgraph: () => getTokenUsdPricesBySubgraph, + getV2CandidatePools: () => getV2CandidatePools, + getV2PoolSubgraph: () => getV2PoolSubgraph, + getV2PoolsOnChain: () => getV2PoolsOnChain, + getV2PoolsWithTvlByCommonTokenPrices: () => getV2PoolsWithTvlByCommonTokenPrices, + getV3CandidatePools: () => getV3CandidatePools, + getV3PoolSubgraph: () => getV3PoolSubgraph, + getV3PoolsWithTvlFromOnChain: () => getV3PoolsWithTvlFromOnChain, + getV3PoolsWithTvlFromOnChainFallback: () => getV3PoolsWithTvlFromOnChainFallback, + getV3PoolsWithTvlFromOnChainStaticFallback: () => getV3PoolsWithTvlFromOnChainStaticFallback, + getV3PoolsWithoutTicksOnChain: () => getV3PoolsWithoutTicksOnChain, + infinityPoolTvlSelector: () => infinityPoolTvlSelector, + involvesCurrency: () => involvesCurrency, + isInfinityBinPool: () => isInfinityBinPool, + isInfinityClPool: () => isInfinityClPool, + isInfinityStablePool: () => isInfinityStablePool, + isMMPool: () => isMMPool, + isStablePool: () => isStablePool, + isV2Pool: () => isV2Pool, + isV3Pool: () => isV3Pool, + log: () => log, + logger: () => logger, + maximumAmountIn: () => maximumAmountIn, + metric: () => metric, + minimumAmountOut: () => minimumAmountOut, + partitionMixedRouteByProtocol: () => partitionMixedRouteByProtocol, + v2PoolSubgraphSelection: () => v2PoolTvlSelector, + v2PoolTvlSelector: () => v2PoolTvlSelector, + v3PoolSubgraphSelection: () => v3PoolTvlSelector, + v3PoolTvlSelector: () => v3PoolTvlSelector, + v3PoolsOnChainProviderFactory: () => v3PoolsOnChainProviderFactory +}); + +// ../utils/Graph.ts +var Graph = class { + constructor(getVertexKey) { + this.adjacencyMap = /* @__PURE__ */ new Map(); + this.vertexMap = /* @__PURE__ */ new Map(); + this.getVertexKey = getVertexKey; + } + addVertex(vertex) { + const key = this.getVertexKey(vertex); + if (!this.adjacencyMap.has(key)) { + this.adjacencyMap.set(key, []); + this.vertexMap.set(key, vertex); + } + } + addEdge(from, to, edge, cost = 1) { + this.addVertex(from); + this.addVertex(to); + const fromKey = this.getVertexKey(from); + const neighbors = this.adjacencyMap.get(fromKey); + const existingNeighbor = neighbors.find((n) => this.getVertexKey(n.node) === this.getVertexKey(to)); + if (existingNeighbor) { + existingNeighbor.edges.push({ edge, cost }); + } else { + neighbors.push({ + node: to, + edges: [{ edge, cost }] + }); + } + } + findPaths(from, to, type = "dijkstra", maxHops = Infinity) { + switch (type) { + case "dijkstra": + return this.dijkstra(from, to, maxHops); + case "dfs": + return this.dfsAllPaths(from, to, maxHops); + default: + throw new Error(`Unsupported algorithm type: ${type}`); + } + } + dfsAllPaths(from, to, maxHops) { + const fromKey = this.getVertexKey(from); + const toKey = this.getVertexKey(to); + const results = []; + const visited = /* @__PURE__ */ new Set(); + const dfs = (currentKey, path, edges, cost) => { + if (path.length > maxHops + 1) + return; + if (currentKey === toKey) { + results.push({ + path: path.map((key) => this.vertexMap.get(key)), + edges: [...edges], + totalCost: cost + }); + return; + } + visited.add(currentKey); + const neighbors = this.adjacencyMap.get(currentKey) || []; + for (const neighbor of neighbors) { + const neighborKey = this.getVertexKey(neighbor.node); + if (!visited.has(neighborKey)) { + for (const { edge, cost: edgeCost } of neighbor.edges) { + dfs(neighborKey, [...path, neighborKey], [...edges, edge], cost + edgeCost); + } + } + } + visited.delete(currentKey); + }; + dfs(fromKey, [fromKey], [], 0); + return results; + } + dijkstra(from, to, maxHops) { + const fromKey = this.getVertexKey(from); + const toKey = this.getVertexKey(to); + const bestCost = /* @__PURE__ */ new Map(); + const queue = [{ vertexKey: fromKey, cost: 0, path: [fromKey], edges: [] }]; + const results = []; + while (queue.length > 0) { + queue.sort((a, b) => a.cost - b.cost); + const current = queue.shift(); + if ((bestCost.get(current.vertexKey) ?? Infinity) < current.cost) + continue; + bestCost.set(current.vertexKey, current.cost); + if (current.vertexKey === toKey && current.path.length <= maxHops + 1) { + results.push(current); + continue; + } + if (current.path.length > maxHops + 1) + continue; + const neighbors = this.adjacencyMap.get(current.vertexKey) || []; + for (const neighbor of neighbors) { + const neighborKey = this.getVertexKey(neighbor.node); + for (const { edge, cost } of neighbor.edges) { + const newCost = current.cost + cost; + if ((bestCost.get(neighborKey) ?? Infinity) > newCost) { + queue.push({ + vertexKey: neighborKey, + cost: newCost, + path: [...current.path, neighborKey], + edges: [...current.edges, edge] + }); + } + } + } + } + return results.map((res) => ({ + path: res.path.map((key) => this.vertexMap.get(key)), + edges: res.edges, + totalCost: res.cost + })); + } +}; + +// evm/v3-router/functions/computeAllRoutesNew.ts +function computeAllRoutesNew(input, output, candidatePools, maxHops = 3, quoteId) { + const logger3 = RemoteLogger.getLogger(quoteId); + logger3.metric(`computeAllRoutesNew`, 1); + const graph = new Graph((c) => c.wrapped.address); + candidatePools.forEach((pool) => { + const currencies = getCurrenciesOfPool(pool); + const tokenA = currencies[0]; + const tokenB = currencies[1]; + graph.addEdge(tokenA, tokenB, pool); + graph.addEdge(tokenB, tokenA, pool); + logger3.debug(`add pool ${poolInfoStr(pool)}`); + }); + const paths = graph.findPaths(input, output, "dfs", maxHops); + const routes = paths.map(({ edges }) => buildBaseRoute(edges, input, output)); + logger3.metric(`route find`, 1); + return routes; +} +function getTokenPriceByNumber(baseCurrency, quoteCurrency, price) { + const quoteAmount = tryParseAmount_default(String(price), baseCurrency); + const baseAmount = tryParseAmount_default("1", quoteCurrency); + if (!baseAmount || !quoteAmount) { + return void 0; + } + return new sdk.Price({ baseAmount, quoteAmount }); +} +async function createGasModel({ + gasPriceWei, + poolProvider, + quoteCurrency, + blockNumber, + quoteCurrencyUsdPrice, + nativeCurrencyUsdPrice +}) { + const { chainId } = quoteCurrency; + const usdToken = getUsdGasToken(chainId); + if (!usdToken) { + throw new Error(`No valid usd token found on chain ${chainId}`); + } + const gasAccounting = getGasAccountingToken(chainId); + if (!gasAccounting) { + throw new Error(`Unsupported chain ${chainId}. No gas accounting token found.`); + } + const { token: nativeWrappedToken, nativeDecimals } = gasAccounting; + const gasPrice = BigInt(typeof gasPriceWei === "function" ? await gasPriceWei() : gasPriceWei); + const [usdPool, nativePool] = await Promise.all([ + getHighestLiquidityUSDPool(poolProvider, chainId, blockNumber), + getHighestLiquidityNativePool(poolProvider, quoteCurrency, blockNumber) + ]); + const priceInUsd = quoteCurrencyUsdPrice ? getTokenPriceByNumber(usdToken, quoteCurrency, quoteCurrencyUsdPrice) : void 0; + const nativePriceInUsd = nativeCurrencyUsdPrice ? getTokenPriceByNumber(usdToken, nativeWrappedToken, nativeCurrencyUsdPrice) : void 0; + const priceInNative = priceInUsd && nativePriceInUsd ? nativePriceInUsd.multiply(priceInUsd.invert()) : void 0; + const estimateGasCost2 = ({ pools }, { initializedTickCrossedList }) => { + const isQuoteNative = nativeWrappedToken.equals(quoteCurrency.wrapped); + const totalInitializedTicksCrossed = BigInt(Math.max(1, sum__default.default(initializedTickCrossedList))); + const poolTypeSet = /* @__PURE__ */ new Set(); + let baseGasUse = 0n; + for (const pool of pools) { + const { type } = pool; + if (isV2Pool(pool)) { + if (!poolTypeSet.has(type)) { + baseGasUse += chunkZNSTBYLO_js.BASE_SWAP_COST_V2; + poolTypeSet.add(type); + continue; + } + baseGasUse += chunkZNSTBYLO_js.COST_PER_EXTRA_HOP_V2; + continue; + } + if (isV3Pool(pool)) { + if (!poolTypeSet.has(type)) { + baseGasUse += chunkZNSTBYLO_js.BASE_SWAP_COST_V3(chainId); + poolTypeSet.add(type); + } + baseGasUse += chunkZNSTBYLO_js.COST_PER_HOP_V3(chainId); + continue; + } + if (isStablePool(pool) || isInfinityStablePool(pool)) { + if (!poolTypeSet.has(type)) { + baseGasUse += chunkZNSTBYLO_js.BASE_SWAP_COST_STABLE_SWAP; + poolTypeSet.add(type); + continue; + } + baseGasUse += chunkZNSTBYLO_js.COST_PER_EXTRA_HOP_STABLE_SWAP; + continue; + } + } + const tickGasUse = chunkZNSTBYLO_js.COST_PER_INIT_TICK(chainId) * totalInitializedTicksCrossed; + const uninitializedTickGasUse = chunkZNSTBYLO_js.COST_PER_UNINIT_TICK * 0n; + baseGasUse = baseGasUse + tickGasUse + uninitializedTickGasUse; + const baseGasCostWei = gasPrice * baseGasUse; + const totalGasCostNativeCurrency = sdk.CurrencyAmount.fromRawAmount( + nativeWrappedToken, + rescaleRawAmount(baseGasCostWei, nativeDecimals, nativeWrappedToken.decimals) + ); + let gasCostInToken = sdk.CurrencyAmount.fromRawAmount(quoteCurrency.wrapped, 0); + let gasCostInUSD = sdk.CurrencyAmount.fromRawAmount(usdToken, 0); + try { + if (isQuoteNative) { + gasCostInToken = totalGasCostNativeCurrency; + } + if (!isQuoteNative) { + const price = priceInNative || nativePool && getTokenPrice(nativePool, nativeWrappedToken, quoteCurrency.wrapped); + if (price) { + gasCostInToken = price.quote(totalGasCostNativeCurrency); + } + } + const nativeTokenUsdPrice = nativePriceInUsd || usdPool && getTokenPrice(usdPool, nativeWrappedToken, usdToken); + if (nativeTokenUsdPrice) { + gasCostInUSD = nativeTokenUsdPrice.quote(totalGasCostNativeCurrency); + } + } catch (e) { + } + return { + gasEstimate: baseGasUse, + gasCostInToken: isQuoteNative && quoteCurrency.isNative ? sdk.CurrencyAmount.fromRawAmount(sdk.Native.onChain(chainId), gasCostInToken.quotient) : gasCostInToken, + gasCostInUSD + }; + }; + return { + estimateGasCost: estimateGasCost2 + }; +} +async function getHighestLiquidityNativePool(poolProvider, currency, blockNumber) { + const nativeWrappedToken = getGasAccountingToken(currency.chainId)?.token; + if (!nativeWrappedToken || currency.wrapped.equals(nativeWrappedToken)) { + return null; + } + const pools = await poolProvider.getCandidatePools({ + blockNumber, + pairs: [[nativeWrappedToken, currency]], + currencyA: nativeWrappedToken, + currencyB: currency + }); + return pools[0] ?? null; +} +async function getHighestLiquidityUSDPool(poolProvider, chainId, blockNumber) { + const usdToken = getUsdGasToken(chainId); + const nativeWrappedToken = getGasAccountingToken(chainId)?.token; + if (!usdToken || !nativeWrappedToken) { + return null; + } + const pools = await poolProvider.getCandidatePools({ + blockNumber, + pairs: [[nativeWrappedToken, usdToken]], + currencyA: nativeWrappedToken, + currencyB: usdToken + }); + return pools[0] ?? null; +} + +// ../utils/chunk.ts +function chunk(array, size) { + if (size <= 0) + throw new Error("Chunk size must be greater than 0"); + const result = []; + for (let i = 0; i < array.length; i += size) { + result.push(array.slice(i, i + size)); + } + return result; +} + +// evm/v3-router/getRoutesWithValidQuote.ts +async function getRoutesWithValidQuote({ + amount, + baseRoutes, + distributionPercent = 5, + quoteProvider, + tradeType, + blockNumber, + gasModel, + quoterOptimization = true, + signal, + quoteId +}) { + const logger3 = RemoteLogger.getLogger(quoteId); + logger3.debug("run getRoutesWithValidQuote"); + const [percents, amounts] = getAmountDistribution(amount, distributionPercent); + const routesWithoutQuote = amounts.reduce( + (acc, curAmount, i) => [ + ...acc, + ...baseRoutes.map((r) => ({ + ...r, + amount: curAmount, + percent: percents[i] + })) + ], + [] + ); + logger3.debug(`quote calls=${routesWithoutQuote.length}`, 2); + for (const route of routesWithoutQuote) { + logger3.debug( + `quote call, ${route.percent}% ${route.pools.map((x) => getPoolAddress(x)).join(",")} ${route.input.symbol} ${route.output.symbol} ${route.amount.quotient}`, + 3 + ); + } + const getRoutesWithQuote = tradeType === sdk.TradeType.EXACT_INPUT ? quoteProvider.getRouteWithQuotesExactIn : quoteProvider.getRouteWithQuotesExactOut; + if (!quoterOptimization) { + return getRoutesWithQuote(routesWithoutQuote, { blockNumber, gasModel, signal, quoteId }); + } + logger3.debug("via quote optimization", 2); + const requestCallback = typeof window === "undefined" ? setTimeout : window.requestIdleCallback || window.setTimeout; + logger3.debug(`Get quotes from ${routesWithoutQuote.length} routes routesWithoutQuote`, 2); + const getQuotes = (routes) => new Promise((resolve, reject) => { + requestCallback(async () => { + try { + const result2 = await getRoutesWithQuote(routes, { blockNumber, gasModel, signal }); + resolve(result2); + } catch (e) { + reject(e); + } + }); + }); + const chunks = chunk(routesWithoutQuote, 10); + const result = await Promise.all(chunks.map(getQuotes)); + const quotes = result.reduce((acc, cur) => { + acc.push(...cur); + return acc; + }, []); + logger3.debug(`Get quotes success, got, ${quotes.length}`); + return quotes; +} + +// evm/v3-router/getBestTrade.ts +async function getBestTrade3(amount, currency, tradeType, config) { + const logger3 = RemoteLogger.getLogger(config.quoteId); + logger3.debug( + `[SmartRouter] getBestTrade ${config.quoteId}, [${sdk.TradeType[tradeType]}] input=${amount.toExact()} ${currency.symbol} maxSplits=${config.maxSplits} maxHops=${config.maxHops}` + ); + try { + const { blockNumber: blockNumberFromConfig } = config; + const blockNumber = typeof blockNumberFromConfig === "function" ? await blockNumberFromConfig() : blockNumberFromConfig; + const bestRoutes = await getBestRoutes( + amount, + currency, + tradeType, + { + ...config, + blockNumber + }, + config.quoteId + ); + if (!bestRoutes || bestRoutes.outputAmount.equalTo(sdk.ZERO)) { + logger3.debug("No valid route found"); + throw new Error("Cannot find a valid swap route"); + } + const { routes, gasEstimateInUSD, gasEstimate, inputAmount, outputAmount } = bestRoutes; + const trade = { + tradeType, + routes, + gasEstimate, + gasEstimateInUSD, + inputAmount, + outputAmount, + blockNumber + }; + logger3.debug(`find trade`); + return trade; + } catch (ex) { + logger3.debug(`Error in getBestTrade ${ex}`); + throw ex; + } finally { + logger3.flush(); + } +} +async function getBestRoutes(amount, currency, tradeType, routeConfig, quoteId) { + const { chainId } = currency; + const { + maxHops = 3, + maxSplits = 4, + distributionPercent: _distributionPercent = 5, + poolProvider, + quoteProvider, + blockNumber, + gasPriceWei, + allowedPoolTypes, + quoterOptimization, + quoteCurrencyUsdPrice, + nativeCurrencyUsdPrice, + signal + } = { + ...routeConfig, + ...ROUTE_CONFIG_BY_CHAIN[chainId] || {} + }; + const distributionPercent = maxSplits ? _distributionPercent : 100; + const logger3 = RemoteLogger.getLogger(quoteId); + const isExactIn = tradeType === sdk.TradeType.EXACT_INPUT; + const inputCurrency = isExactIn ? amount.currency : currency; + const outputCurrency = isExactIn ? currency : amount.currency; + const candidatePools = await poolProvider?.getCandidatePools({ + currencyA: amount.currency, + currencyB: currency, + blockNumber, + protocols: allowedPoolTypes, + signal + }); + logger3.debug( + `Candidate pools: ${candidatePools.length}, maxSplits=${maxSplits}, maxHops=${maxHops}, distributionPercent=${distributionPercent}` + ); + logPools(quoteId, candidatePools, 2); + let baseRoutes = computeAllRoutesNew(inputCurrency, outputCurrency, candidatePools, maxHops, quoteId); + if (tradeType === sdk.TradeType.EXACT_OUTPUT) { + baseRoutes = baseRoutes.filter(({ type }) => type !== 3 /* MIXED */); + } + logger3.debug(`Discovered ${baseRoutes.length} Base routes, maxShow = 10`); + logRoutes(quoteId, baseRoutes.slice(0, 10), 2); + const gasModel = await createGasModel({ + gasPriceWei, + poolProvider, + quoteCurrency: currency, + blockNumber, + quoteCurrencyUsdPrice, + nativeCurrencyUsdPrice + }); + const routesWithValidQuote = await getRoutesWithValidQuote({ + amount, + baseRoutes, + distributionPercent, + quoteProvider, + tradeType, + blockNumber, + gasModel, + quoterOptimization, + quoteId, + signal + }); + logger3.debug(`valid route=${routesWithValidQuote.length}, maxShow=100`); + return getBestRouteCombinationByQuotes(amount, currency, routesWithValidQuote, tradeType, { maxSplits }, quoteId); +} + +// evm/v3-router/schema.ts +var schema_exports2 = {}; +chunkZNSTBYLO_js.__export(schema_exports2, { + zPools: () => zPools2, + zRouterGetParams: () => zRouterGetParams, + zRouterPostParams: () => zRouterPostParams2 +}); +var zChainId2 = zod.z.nativeEnum(chains.ChainId); +var zFee2 = zod.z.number(); +var zTradeType2 = zod.z.nativeEnum(sdk.TradeType); +var zPoolType = zod.z.nativeEnum(PoolType); +var zPoolTypes = zod.z.array(zPoolType); +var zAddress2 = zod.z.custom((val) => /^0x[a-fA-F0-9]{40}$/.test(val)); +var zHex2 = zod.z.custom((val) => /^0x[a-fA-F0-9]*$/.test(val)); +var zHooksRegistrationBitmap2 = zod.z.number().or(zHex2); +var zBigNumber2 = zod.z.string().regex(/^[0-9]+$/); +var zCurrency2 = zod.z.object({ + address: zAddress2, + decimals: zod.z.number(), + symbol: zod.z.string() +}).required(); +var zCurrencyAmount2 = zod.z.object({ + currency: zCurrency2.required(), + value: zBigNumber2 +}).required(); +var zCurrencyAmountOptional2 = zCurrencyAmount2.optional(); +var zV2Pool2 = zod.z.object({ + type: zod.z.literal(0 /* V2 */), + reserve0: zCurrencyAmount2, + reserve1: zCurrencyAmount2 +}).required(); +var zV3Pool2 = zod.z.object({ + type: zod.z.literal(1 /* V3 */), + token0: zCurrency2, + token1: zCurrency2, + fee: zFee2, + liquidity: zBigNumber2, + sqrtRatioX96: zBigNumber2, + tick: zod.z.number(), + address: zAddress2, + token0ProtocolFee: zod.z.string(), + token1ProtocolFee: zod.z.string() +}).required(); +var zStablePool2 = zod.z.object({ + type: zod.z.literal(2 /* STABLE */), + balances: zod.z.array(zCurrencyAmount2), + amplifier: zBigNumber2, + fee: zod.z.string(), + address: zAddress2 +}).required(); +var zInfinityClPool2 = zod.z.object({ + type: zod.z.literal(3 /* InfinityCL */), + currency0: zCurrency2, + currency1: zCurrency2, + fee: zFee2, + liquidity: zBigNumber2, + sqrtRatioX96: zBigNumber2, + tick: zod.z.number(), + tickSpacing: zod.z.number(), + poolManager: zAddress2, + id: zHex2 +}).required().extend({ + protocolFee: zFee2.optional(), + hooks: zAddress2.optional(), + hooksRegistrationBitmap: zHooksRegistrationBitmap2.optional() +}); +var zInfinityBinPool2 = zod.z.object({ + type: zod.z.literal(4 /* InfinityBIN */), + currency0: zCurrency2, + currency1: zCurrency2, + fee: zFee2, + activeId: zod.z.number(), + binStep: zod.z.number(), + poolManager: zAddress2, + id: zHex2 +}).required().extend({ + protocolFee: zFee2.optional(), + hooks: zAddress2.optional(), + hooksRegistrationBitmap: zHooksRegistrationBitmap2.optional() +}); +var zInfinityStablePool2 = zod.z.object({ + type: zod.z.literal(5 /* InfinityStable */), + currency0: zCurrency2, + currency1: zCurrency2, + fee: zFee2, + tickSpacing: zod.z.number(), + id: zHex2, + poolManager: zAddress2 +}).required().extend({ + hooks: zAddress2.optional(), + hooksRegistrationBitmap: zHooksRegistrationBitmap2.optional(), + reserve0: zCurrencyAmountOptional2, + reserve1: zCurrencyAmountOptional2, + stableFee: zFee2, + amplifier: zod.z.number() +}); +var zPools2 = zod.z.array( + zod.z.union([zV2Pool2, zV3Pool2, zStablePool2, zInfinityClPool2, zInfinityBinPool2, zInfinityStablePool2]) +); +var zRouterGetParams = zod.z.object({ + chainId: zChainId2, + tradeType: zTradeType2, + amount: zCurrencyAmount2, + currency: zCurrency2, + gasPriceWei: zBigNumber2.optional(), + maxHops: zod.z.number().optional(), + maxSplits: zod.z.number().optional(), + blockNumber: zBigNumber2.optional(), + poolTypes: zPoolTypes.optional(), + candidatePools: zPools2 +}).required({ + chainId: true, + tradeType: true, + amount: true, + currency: true, + candidatePools: true +}); +var zRouterPostParams2 = zod.z.object({ + chainId: zChainId2, + tradeType: zTradeType2, + amount: zCurrencyAmount2, + currency: zCurrency2, + candidatePools: zPools2, + gasPriceWei: zBigNumber2.optional(), + maxHops: zod.z.number().optional(), + maxSplits: zod.z.number().optional(), + blockNumber: zBigNumber2.optional(), + poolTypes: zPoolTypes.optional(), + onChainQuoterGasLimit: zBigNumber2.optional(), + nativeCurrencyUsdPrice: zod.z.number().optional(), + quoteCurrencyUsdPrice: zod.z.number().optional(), + account: zAddress2.optional() +}).required({ + chainId: true, + tradeType: true, + amount: true, + currency: true, + candidatePools: true +}); + +Object.defineProperty(exports, 'ADDITIONAL_BASES', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.ADDITIONAL_BASES; } +}); +Object.defineProperty(exports, 'ADDRESS_THIS', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.ADDRESS_THIS; } +}); +Object.defineProperty(exports, 'BASES_TO_CHECK_TRADES_AGAINST', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.BASES_TO_CHECK_TRADES_AGAINST; } +}); +Object.defineProperty(exports, 'BASE_SWAP_COST_STABLE_SWAP', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.BASE_SWAP_COST_STABLE_SWAP; } +}); +Object.defineProperty(exports, 'BASE_SWAP_COST_V2', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.BASE_SWAP_COST_V2; } +}); +Object.defineProperty(exports, 'BASE_SWAP_COST_V3', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.BASE_SWAP_COST_V3; } +}); +Object.defineProperty(exports, 'BATCH_MULTICALL_CONFIGS', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.BATCH_MULTICALL_CONFIGS; } +}); +Object.defineProperty(exports, 'BETTER_TRADE_LESS_HOPS_THRESHOLD', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.BETTER_TRADE_LESS_HOPS_THRESHOLD; } +}); +Object.defineProperty(exports, 'BIG_INT_TEN', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.BIG_INT_TEN; } +}); +Object.defineProperty(exports, 'BIN_HOOK_PRESETS_BY_CHAIN', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.BIN_HOOK_PRESETS_BY_CHAIN; } +}); +Object.defineProperty(exports, 'BIN_PRESETS_BY_CHAIN', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.BIN_PRESETS_BY_CHAIN; } +}); +Object.defineProperty(exports, 'BIPS_BASE', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.BIPS_BASE; } +}); +Object.defineProperty(exports, 'CL_HOOK_PRESETS_BY_CHAIN', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.CL_HOOK_PRESETS_BY_CHAIN; } +}); +Object.defineProperty(exports, 'CL_PRESETS', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.CL_PRESETS; } +}); +Object.defineProperty(exports, 'CL_PRESETS_BY_CHAIN', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.CL_PRESETS_BY_CHAIN; } +}); +Object.defineProperty(exports, 'COST_PER_EXTRA_HOP_STABLE_SWAP', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.COST_PER_EXTRA_HOP_STABLE_SWAP; } +}); +Object.defineProperty(exports, 'COST_PER_EXTRA_HOP_V2', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.COST_PER_EXTRA_HOP_V2; } +}); +Object.defineProperty(exports, 'COST_PER_HOP_V3', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.COST_PER_HOP_V3; } +}); +Object.defineProperty(exports, 'COST_PER_INIT_TICK', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.COST_PER_INIT_TICK; } +}); +Object.defineProperty(exports, 'COST_PER_UNINIT_TICK', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.COST_PER_UNINIT_TICK; } +}); +Object.defineProperty(exports, 'CUSTOM_BASES', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.CUSTOM_BASES; } +}); +Object.defineProperty(exports, 'EMPTY_HOOK', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.EMPTY_HOOK; } +}); +Object.defineProperty(exports, 'InfinityFeeTier', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.InfinityFeeTier; } +}); +Object.defineProperty(exports, 'MIN_BNB', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.MIN_BNB; } +}); +Object.defineProperty(exports, 'MIXED_ROUTE_QUOTER_ADDRESSES', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.MIXED_ROUTE_QUOTER_ADDRESSES; } +}); +Object.defineProperty(exports, 'MSG_SENDER', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.MSG_SENDER; } +}); +Object.defineProperty(exports, 'SMART_ROUTER_ADDRESSES', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.SMART_ROUTER_ADDRESSES; } +}); +Object.defineProperty(exports, 'STABLE_SWAP_INFO_ADDRESS', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.STABLE_SWAP_INFO_ADDRESS; } +}); +Object.defineProperty(exports, 'TICK_QUERY_HELPER_ADDRESSES', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.TICK_QUERY_HELPER_ADDRESSES; } +}); +Object.defineProperty(exports, 'V2_FEE_PATH_PLACEHOLDER', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.V2_FEE_PATH_PLACEHOLDER; } +}); +Object.defineProperty(exports, 'V2_ROUTER_ADDRESS', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.V2_ROUTER_ADDRESS; } +}); +Object.defineProperty(exports, 'V3_QUOTER_ADDRESSES', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.V3_QUOTER_ADDRESSES; } +}); +Object.defineProperty(exports, 'V3_TICK_LENS_ADDRESSES', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.V3_TICK_LENS_ADDRESSES; } +}); +Object.defineProperty(exports, 'usdGasTokensByChain', { + enumerable: true, + get: function () { return chunkZNSTBYLO_js.usdGasTokensByChain; } +}); +exports.InfinityMixedQuoterActions = InfinityMixedQuoterActions; +exports.InfinityRouter = infinity_router_exports; +exports.PoolType = PoolType; +exports.RouteType = RouteType; +exports.SmartRouter = smartRouter_exports; +exports.SwapRouter = SwapRouter; +exports.Transformer = transformer_exports; +exports.feeOnTransferDetectorAddresses = feeOnTransferDetectorAddresses; +exports.fetchTickLensTicksInRange = fetchTickLensTicksInRange; +exports.fetchTokenFeeOnTransfer = fetchTokenFeeOnTransfer; +exports.fetchTokenFeeOnTransferBatch = fetchTokenFeeOnTransferBatch; +exports.getPoolAddress = getPoolAddress; +exports.getRouteTypeByPools = getRouteTypeByPools; +exports.getTokenPrice = getTokenPrice; diff --git a/plan/agw/research/preset-catalog-2026-10-15/protocol-sources.json b/plan/agw/research/preset-catalog-2026-10-15/protocol-sources.json new file mode 100644 index 00000000..fa803d04 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/protocol-sources.json @@ -0,0 +1,67 @@ +[ + { + "url": "https://raw.githubusercontent.com/Uniswap/sdks/main/sdks/sdk-core/src/addresses.ts", + "file": "addresses.ts", + "bytes": 34373 + }, + { + "url": "https://raw.githubusercontent.com/Uniswap/swap-router-contracts/main/contracts/interfaces/IV3SwapRouter.sol", + "file": "IV3SwapRouter.sol", + "bytes": 3104 + }, + { + "url": "https://raw.githubusercontent.com/pancakeswap/pancake-developer/master/docs/pages/contracts/v3/addresses.md", + "file": "addresses.md", + "bytes": 5240 + }, + { + "url": "https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3Sepolia.sol", + "file": "AaveV3Sepolia.sol", + "bytes": 14061 + }, + { + "url": "https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3BaseSepolia.sol", + "file": "AaveV3BaseSepolia.sol", + "bytes": 12139 + }, + { + "url": "https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3ArbitrumSepolia.sol", + "file": "AaveV3ArbitrumSepolia.sol", + "bytes": 6099 + }, + { + "url": "https://raw.githubusercontent.com/aave-dao/aave-v3-origin/main/src/contracts/interfaces/IPool.sol", + "file": "IPool.sol", + "bytes": 36349 + }, + { + "url": "https://raw.githubusercontent.com/moonwell-fi/moonwell-contracts-v2/main/chains/84532.json", + "file": "84532.json", + "bytes": 5954 + }, + { + "url": "https://raw.githubusercontent.com/moonwell-fi/moonwell-contracts-v2/main/src/MToken.sol", + "file": "MToken.sol", + "bytes": 79960 + }, + { + "url": "https://raw.githubusercontent.com/VenusProtocol/venus-protocol/develop/deployments/bsctestnet_addresses.json", + "file": "bsctestnet_addresses.json", + "bytes": 25480 + }, + { + "url": "https://raw.githubusercontent.com/VenusProtocol/venus-protocol/develop/contracts/Tokens/VTokens/VBep20.sol", + "file": "VBep20.sol", + "bytes": 12891 + }, + { + "url": "https://raw.githubusercontent.com/Layr-Labs/eigenlayer-contracts/main/README.md", + "file": "README.md", + "bytes": 61045 + }, + { + "url": "https://raw.githubusercontent.com/bnb-chain/bsc-genesis-contract/master/contracts/StakeHub.sol", + "file": "StakeHub.sol", + "bytes": 53484 + } +] diff --git a/plan/agw/research/preset-catalog-2026-10-15/rpc-verification.json b/plan/agw/research/preset-catalog-2026-10-15/rpc-verification.json new file mode 100644 index 00000000..d2ccbbb2 --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/rpc-verification.json @@ -0,0 +1,148 @@ +[ + { + "chain": "eip155:11155111", + "block": "11917113", + "contracts": [ + { + "name": "uniswap", + "address": "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E", + "bytes": 24497, + "codeHash": "0xe7f98ee73dfe6d5c96cbf8936920f496b1b82f24326d6a415b4144a2252271de" + }, + { + "name": "aave", + "address": "0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951", + "bytes": 2333, + "codeHash": "0xdfd31513a60cc252ec0bbcf0e7bdb7f9ba35fab80c1bb9ce0543436b8fe92e49", + "reserves": [ + "0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357", + "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8", + "0x29f2D40B0605204364af54EC677bD022dA425d03", + "0xC558DBdd856501FCd9aaF1E62eae57A9F0629a3c", + "0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0", + "0x88541670E55cC00bEEFD87eB59EDd1b7C511AC9a", + "0x6d906e526a4e2Ca02097BA9d0caA3c382F52278E", + "0xc4bF5CbDaBE595361438F8c6a187bDc330539c60" + ] + }, + { + "name": "eigen", + "address": "0x2E3D6c0744b10eb0A4e6F679F71554a39Ec47a5D", + "bytes": 2115, + "codeHash": "0x54a3a9ef2209a3bc2f00d3ca72d5b987776a6cb8db96acefb244610d08de0174", + "paused": "0" + } + ], + "actualChainId": 11155111 + }, + { + "chain": "eip155:84532", + "block": "48129503", + "contracts": [ + { + "name": "uniswap", + "address": "0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4", + "bytes": 24497, + "codeHash": "0x60e9352f5af4eee63b41456f85bf80c63044e98123ad599d41d87f2d068de0be" + }, + { + "name": "aave", + "address": "0x8bAB6d1b75f19e9eD9fCe8b9BD338844fF79aE27", + "bytes": 1853, + "codeHash": "0xc97b7e16966b0eafd8bc9eebf8937ee34f1bf0f3d3907d978dedc6148811b0f5", + "reserves": [ + "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f", + "0x0a215D8ba66387DCA84B284D18c3B4ec3de6E54a", + "0x54114591963CF60EF3aA63bEfD6eC263D98145a4", + "0x4200000000000000000000000000000000000006", + "0xD171b9694f7A2597Ed006D41f7509aaD4B485c4B", + "0x810D46F9a9027E28F9B01F75E2bdde839dA61115" + ] + }, + { + "name": "moonwellUSDBC", + "address": "0x876852425331a113d8E432eFFB3aC5BEf38f033a", + "bytes": 7261, + "codeHash": "0x2efdd202d2faf3c6f2e7fcae24b7b42a8ccc39b34691a8817e8765d33d79d569", + "underlying": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2" + }, + { + "name": "moonwellWETH", + "address": "0x2F39a349A79492a70E152760ce7123A1933eCf28", + "bytes": 7261, + "codeHash": "0x2efdd202d2faf3c6f2e7fcae24b7b42a8ccc39b34691a8817e8765d33d79d569", + "underlying": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb" + }, + { + "name": "comptroller", + "address": "0xC72ba45f2Ae134F21DAEb2b7B5fd5De0064Ee9bB", + "bytes": 1391, + "codeHash": "0xe0cfbdabe281c5e3cba2e1670f2f18c96ae98d9c942a5df487200278a79ee40c" + } + ], + "actualChainId": 84532 + }, + { + "chain": "eip155:421614", + "block": "319263861", + "contracts": [ + { + "name": "uniswap", + "address": "0x101F443B4d1b059569D643917553c771E1b9663E", + "bytes": 24497, + "codeHash": "0xb7f0bed5258473e73513f604660efed135a05124470796b6b9fec9ca12e22367" + }, + { + "name": "aave", + "address": "0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff", + "bytes": 1892, + "codeHash": "0xd75b4365d675956c42b20584bb92e557c2a0cd1b692d8c0c2b4fea848bc9a44e", + "reserves": [ + "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "0x1dF462e2712496373A347f8ad10802a5E95f053D" + ] + } + ], + "actualChainId": 421614 + }, + { + "chain": "eip155:97", + "block": "136845129", + "contracts": [ + { + "name": "pancake", + "address": "0x9a489505a00cE272eAa5e07Dba6491314CaE3796", + "bytes": 24316, + "codeHash": "0xb1f063c41d7b1ea99d1d2e4f85bb1ca6e655ec0f028e0d5c41a3338884e169d4" + }, + { + "name": "venusUSDT", + "address": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A", + "bytes": 4744, + "codeHash": "0x064370ceee002fe570b8800e8f1b69231a6448667dc40f65e58047778d408813", + "underlying": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c" + }, + { + "name": "venusUSDC", + "address": "0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7", + "bytes": 4744, + "codeHash": "0x064370ceee002fe570b8800e8f1b69231a6448667dc40f65e58047778d408813", + "underlying": "0x16227D60f7a0e586C66B005219dfc887D13C9531" + }, + { + "name": "comptroller", + "address": "0x94d1820b2D1c7c7452A163983Dc888CEC546b77D", + "bytes": 1508, + "codeHash": "0x4b4e586288eed4781d5ccd0ff329746c38ed2c4bfd4472c1986f5bf663ad0ba0" + }, + { + "name": "stakeHub", + "address": "0x0000000000000000000000000000000000002002", + "bytes": 47087, + "codeHash": "0xdd27dda318f66bdc14973b8a35e7681ead1c1f75228696c2e75f0483bd6ecc64" + } + ], + "actualChainId": 97 + } +] diff --git a/plan/agw/research/preset-catalog-2026-10-15/source.json b/plan/agw/research/preset-catalog-2026-10-15/source.json new file mode 100644 index 00000000..9338136d --- /dev/null +++ b/plan/agw/research/preset-catalog-2026-10-15/source.json @@ -0,0 +1,7 @@ +{ + "url": "https://app.notion.com/p/pushprotocol/AGW-Presets-proposal-and-rules-3f8188aea7f48020a9f0d10ea5325467", + "observed_edit": "2026-10-13 20:57 IST", + "author": "Aman Gupta", + "sha256": "bdbf56ceaad6a46cc7f71286e2094cd698b671a7e1fa77acac121a3587e4a4f4", + "scope": "testnet only, user confirmed" +} diff --git a/plan/agw/research/preset-configuration-2026-10-16/README.md b/plan/agw/research/preset-configuration-2026-10-16/README.md new file mode 100644 index 00000000..e0dc7921 --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/README.md @@ -0,0 +1,58 @@ +# Preset configuration and per-operation limits — October 16, 2026 + +Implemented after Riyanshu's UI feedback and the user's request to complete the SDK-owned changes. Production code was developed on v4; v5 receives non-plan changes separately. No contracts or UI repository were changed. + +## Public API addition + +presets.get now returns { rules, readiness }. The existing rules/create/update call shapes remain. New exported types: PresetResult, PresetChainReadiness, PresetConfigurationIssue, PresetCallIssue. Readiness checks local input completeness and at least one enabled asset operation, not deployment, PRC20 support, funds, reserve caps, pauses or liquidity. + +Per-chain metadata names missing identity/expiry/assets/token pair/gas, zero-cap calls, excluded operations, known catalog token addresses, and zero bridge limits. A positive operation cap with maxTotal zero can be ready for destination-held capital; this does not authorize exporting new tokens from Push. No arbitrary token, 0.1 PC budget or 30-day expiry is chosen. + +## Generated restrictions + +- Aave: reserve token EQ, operation amount MAX and wallet beneficiary EQ. Reserve addresses come from the reviewed official bgd-labs address-book snapshots. Unlisted tokens get no positive operation/approval. +- Moonwell/Venus: fixed underlying-token amounts. redeemUnderlying is bounded; share-denominated redeem is excluded and reported with the alternative. +- EigenLayer: chosen token EQ and deposit amount MAX. +- Lido: stETH/wstETH-specific wrap/unwrap caps; native submit value from a selected native asset cap. Dynamic withdrawal arrays and position-derived claims are excluded from bounded presets, with reasons exposed to the UI. +- Approvals retain spender EQ and per-call MAX. Pin/count ceilings are enforced after expansion; no restrictions are silently dropped. + +Regenerate with presets.get after changing inputs, then replace the old rule with rules.update. Merely assigning rule.assets does not regenerate pins/approvals. Save preset provenance/inputs in the UI; contracts do not retain them. [Consumer guide](../../../../packages/core/AGW.md) contains typechecked create/update examples. + +## Important contract boundary + +Operation MAX pins constrain each allowed call. Two calls each at the maximum can share one transaction. Asset maxTotal meters Push outbound amounts, not destination turnover or a lifetime limit on prefunded assets. Neither the SDK nor bounded approvals can supply missing contract-wide accounting. This is stated in the types and guide; ask product/contracts if a different aggregate policy is required. + +## Validation + +- Full unit suite: 2,111 passed, 12 skipped, no failures. +- Focused preset suite: 54 passed. +- Actual v6 local policy tests: 18/18 passed, including the final batch-scope assertion (local-contracts.log). Covers zero-cap previews, token changes, lower limits, old-token rejection, checkpoint-count change of five on update and zero Push spent for destination-only actions. Gateway and UEA-origin response metadata are fixtures; AGW/URP/engine execution uses actual local contracts. An unrelated getOriginForUEA response lookup initially reached Donut and timed out; the test fixture now isolates that metadata lookup, matching the existing delayed-index harness pattern. These tests do not prove destination execution. +- Build, lib/spec/local typechecks, guide and package/import/declaration checks passed. Source/compiled public API comparison matches. Preset lint has no errors (one test non-null assertion warning). + +## Earlier live attempts: not passing acceptance + +The updated Aave test adds an above-cap refusal, regeneration with a lower cap, refusal of the old amount and two bounded withdrawals in one batch. Market tests now redeem in underlying units and check actual burned shares/payout, allowing residual rounding dust. EigenLayer adds wrong-token and above-cap refusals. + +Live attempts timed out before reaching the new operation assertions: + +| Attempt | Recorded transaction / observation | +| --- | --- | +| Aave first | 0xe685f4205cbe59c3acd52a4b4588ae656b7e23127ca68d96ead0b70df2f00578; later read-only Push receipt success at block 24282737 | +| Aave retry | 0xc8b66f3c89b869f9b047baaf52cccf65e9ee176a368b1889ded77b3a5d816b93; Push receipt success at block 24286115; test timed out during destination wait | +| BNB market setup | 0x52732156d51caf9d3d1aa08fd4397be09508553cc4119fc218b92f50eee126e3; receipt wait timed out; October 16 read-only recheck confirms Push receipt success at block 24289830 | +| Base market setup | 0x72d53c5d0faad5a16eec8f1a1f413757d425ec4237488551b5d2f2436d4e60b2; receipt wait timed out; later Push receipt success at block 24290217 | + +Do not treat these as contract-policy reverts or live passes. Prior successful catalog flows predate these restrictions. Fresh acceptance results are recorded below; the earlier timeouts remain preserved as historical evidence. + +## Fresh live acceptance — October 16 + +Deployment preflight verified v6 wiring on-chain and sufficient testnet funds. SDK source tested: `89d04386` (documentation HEAD `b115b66c`). No production code changes were needed. + +- Aave Sepolia: **passed** (284 seconds). Above-cap supply rejected; permitted supply credited to the CEA; rule regenerated with half the cap; old amount rejected; two withdrawals each at the new cap succeeded, with destination events and balances verified. See [Jest log](live-aave-acceptance.log). +- EigenLayer Sepolia: completed all scenario assertions, including wrong-token/above-cap rejection and deposit shares credited to the CEA. +- BNB PancakeSwap/Venus: completed all scenario assertions, including swap, mint and underlying-unit redemption. Deposited 3,361 raw units, redeemed 3,360, with rounding dust retained. +- Base Aave/Moonwell: stopped at the user’s request after faucet submission, before new operation checks. Transaction `0x05493d40928a9bf8d439502cb60aa09b000c42a661320d60e15546709bf7f4aa` may finish independently; not replayed. + +The expanded Jest process was terminated (exit 143) during Base setup, so there is no successful whole-suite summary. EigenLayer and BNB completion is supported by their terminal evidence entries, emitted after their assertions, and progression to the next scenario. No test process remains running. Base fresh acceptance remains incomplete; no production code was changed or package published. + +Transaction evidence: [fresh live records](live-acceptance-evidence.jsonl). These scenarios exercise generated destination constraints with prefunded CEAs; they do not establish aggregate destination turnover limits or mainnet acceptance. diff --git a/plan/agw/research/preset-configuration-2026-10-16/aave-first-timeout.log b/plan/agw/research/preset-configuration-2026-10-16/aave-first-timeout.log new file mode 100644 index 00000000..6951c118 --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/aave-first-timeout.log @@ -0,0 +1,50 @@ +FAIL core-e2e __e2e__/agw/presets-live.spec.ts (1849.518 s) + agw presets live + ✕ 2. Aave preset supplies and withdraws the wallet position (945264 ms) + ○ skipped 1. Uniswap preset swaps from the wallet CEA and rejects a different recipient + + ● agw presets live › 2. Aave preset supplies and withdraws the wallet position + + AgenticRevertError: Timed out while waiting for transaction with hash "0xe685f4205cbe59c3acd52a4b4588ae656b7e23127ca68d96ead0b70df2f00578" to be confirmed. + + 163 | decodedError?: DecodedErrorPayload; + 164 | }; + > 165 | return new AgenticRevertError(e?.message ?? decoded?.name ?? 'AGW revert', { + | ^ + 166 | decodedError: decoded ?? e?.decodedError, + 167 | gatewayTxHash: e?.gatewayTxHash, + 168 | agenticCode: decoded?.name, + + at wrapSendError (src/lib/agentic/management/common.ts:165:12) + at agenticSend (src/lib/agentic/execution/send.ts:340:34) + at async Object. (__e2e__/agw/presets-live.spec.ts:292:18) + + Cause: + PushChainExecutionError: Timed out while waiting for transaction with hash "0xe685f4205cbe59c3acd52a4b4588ae656b7e23127ca68d96ead0b70df2f00578" to be confirmed. + + 186 | ctx._routeTerminalEmitted = true; + 187 | if (!isUserDecline && !(err instanceof PushChainExecutionError)) { + > 188 | throw new PushChainExecutionError(errMsg, { cause: err }); + | ^ + 189 | } + 190 | throw err; + 191 | } + + at executeStandardPayload (src/lib/orchestrator/internals/execute-standard.ts:188:15) + at async Orchestrator.executeWithPolicy (src/lib/orchestrator/orchestrator.ts:471:11) + at async agenticSend (src/lib/agentic/execution/send.ts:330:9) + at async Object. (__e2e__/agw/presets-live.spec.ts:292:18) + + Cause: + WaitForTransactionReceiptTimeoutError: Timed out while waiting for transaction with hash "0xe685f4205cbe59c3acd52a4b4588ae656b7e23127ca68d96ead0b70df2f00578" to be confirmed. + + Version: viem@2.27.2 + + at Timeout._onTimeout (../../node_modules/viem/actions/public/waitForTransactionReceipt.ts:160:22) + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 1 skipped, 2 total +Snapshots: 0 total +Time: 1849.528 s +Ran all test suites within paths "__e2e__/agw/presets-live.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/preset-configuration-2026-10-16/aave-second-timeout.log b/plan/agw/research/preset-configuration-2026-10-16/aave-second-timeout.log new file mode 100644 index 00000000..692bf77d --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/aave-second-timeout.log @@ -0,0 +1,27 @@ +FAIL core-e2e __e2e__/agw/presets-live.spec.ts (1847.916 s) + agw presets live + ✕ 2. Aave preset supplies and withdraws the wallet position (946467 ms) + ○ skipped 1. Uniswap preset swaps from the wallet CEA and rejects a different recipient + + ● agw presets live › 2. Aave preset supplies and withdraws the wallet position + + thrown: "Exceeded timeout of 900000 ms for a test. + Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout." + + 225 | }); + 226 | }, 900_000); + > 227 | it('2. Aave preset supplies and withdraws the wallet position', async () => { + | ^ + 228 | const mockLINK = '0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5' as Address; + 229 | const faucet = '0xC959483DBa39aa9E78757139af0e9a2EDEb3f42D' as Address; + 230 | const amount = BigInt(10) ** BigInt(12); + + at __e2e__/agw/presets-live.spec.ts:227:3 + at Object. (__e2e__/agw/presets-live.spec.ts:46:1) + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 1 skipped, 2 total +Snapshots: 0 total +Time: 1847.938 s, estimated 1850 s +Ran all test suites within paths "__e2e__/agw/presets-live.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/preset-configuration-2026-10-16/api.json b/plan/agw/research/preset-configuration-2026-10-16/api.json new file mode 100644 index 00000000..a13a6f22 --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/api.json @@ -0,0 +1,11654 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "a77a104b2a9c6d8477851d3b4cb83b8daf542d14", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [ + "AgenticPresets", + "ArgumentPath", + "DecodedSolanaRule", + "Pin", + "Preset", + "PresetAsset", + "PresetCallIssue", + "PresetCategory", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetOptions", + "PresetResult", + "PresetRuleTemplate", + "ReadyPresetOptions", + "RuleInput", + "Spent", + "WalletMarker" + ], + "removedExports": [ + "AgenticNetworkConstants", + "NativeRule", + "UniversalRule" + ], + "changedAgwTypes": [ + "AgenticWallet", + "AgenticError", + "AgenticRevertError", + "AGENTIC_ERROR_CODE", + "Rule", + "RuleInput", + "Pin", + "Spent", + "NativeRule", + "AssetCap", + "AllowedCall", + "UniversalRule", + "RulesRecord", + "CreateOptions", + "AgenticTxMetadata" + ], + "publicTypeChanges": [ + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticRevertError", + "AgenticErrorCode", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "CreateOptions", + "DecodedSolanaRule", + "Rule", + "RuleInput", + "Pin", + "Spent", + "WalletMarker", + "ArgumentPath", + "RulesRecord", + "Preset", + "PresetCategory", + "PresetAsset", + "PresetOptions", + "ReadyPresetOptions", + "PresetRuleTemplate", + "PresetResult", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetCallIssue", + "AgenticPresets" + ], + "transactionMethodChanges": [], + "instanceMethodChanges": [], + "agwConstantsChanged": true, + "before": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address(token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }): {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "after": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticPresets", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "ArgumentPath", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DecodedSolanaRule", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "Pin", + "PreparedRead", + "PreparedUniversalTx", + "Preset", + "PresetAsset", + "PresetCallIssue", + "PresetCategory", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetOptions", + "PresetResult", + "PresetRuleTemplate", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReadyPresetOptions", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RuleInput", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "Spent", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletMarker", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n delete(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n delete(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly DELETE_NEEDS_TARGET: \"DELETE_NEEDS_TARGET\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "DELETE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"DELETE_NEEDS_TARGET\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RuleInput": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[] | import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Pin": { + "type": "{\n account: number;\n arg?: never;\n expected: \"agentic:wallet\" | string;\n max?: never;\n token?: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected: \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint;\n max?: never;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected?: never;\n max: bigint;\n}", + "members": { + "account": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "arg": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath | undefined" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "bigint | string | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "Spent": { + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"native\" | \"universal\"" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall", + "members": { + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Pin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "spent": { + "optional": false, + "readonly": false, + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly DELETE_NEEDS_TARGET: \"DELETE_NEEDS_TARGET\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "DELETE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"DELETE_NEEDS_TARGET\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n delete(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n delete(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall", + "members": { + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Pin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "DecodedSolanaRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[]" + }, + "ceaAccounts": { + "optional": false, + "readonly": false, + "type": "readonly `0x${string}`[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`solana:${string}`" + }, + "dataPins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmDataPinWire[]" + }, + "expectedCEA": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "format": { + "optional": false, + "readonly": false, + "type": "\"decoded\"" + }, + "gatewayProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmAccountPinWire[]" + }, + "programs": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").AllowedProgramWire[]" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RuleInput": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[] | import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Pin": { + "type": "{\n account: number;\n arg?: never;\n expected: \"agentic:wallet\" | string;\n max?: never;\n token?: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected: \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint;\n max?: never;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected?: never;\n max: bigint;\n}", + "members": { + "account": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "arg": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath | undefined" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "bigint | string | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "Spent": { + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"native\" | \"universal\"" + } + } + }, + "WalletMarker": { + "type": "\"agentic:wallet\"", + "members": {} + }, + "ArgumentPath": { + "type": "number | readonly number[]", + "members": {} + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "spent": { + "optional": false, + "readonly": false, + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + }, + "Preset": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").Preset", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace[]" + }, + "constant": { + "optional": false, + "readonly": false, + "type": "\"DEXES\" | \"LENDING\" | \"PREDICTION\" | \"STAKING\"" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"CATEGORY\"" + } + } + }, + "PresetCategory": { + "type": "\"DEXES\" | \"LENDING\" | \"PREDICTION\" | \"STAKING\"", + "members": {} + }, + "PresetAsset": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "PresetOptions": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetOptions", + "members": { + "agent": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadyPresetOptions": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").ReadyPresetOptions", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PresetRuleTemplate": { + "type": "{\n agent?: `0x${string}`;\n validUntil?: number;\n} & Omit", + "members": { + "agent": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "PresetResult": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetResult", + "members": { + "readiness": { + "optional": false, + "readonly": false, + "type": "{\n chains: import(\"sdk/src/lib/agentic/presets/types\").PresetChainReadiness[];\n ready: boolean;\n}" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "T[]" + } + } + }, + "PresetChainReadiness": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetChainReadiness", + "members": { + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "disabledCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetCallIssue[]" + }, + "excludedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetCallIssue[]" + }, + "issues": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetConfigurationIssue[]" + }, + "knownTokens": { + "optional": false, + "readonly": false, + "type": "string[]" + }, + "ready": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "zeroBridgeLimits": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "PresetConfigurationIssue": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetConfigurationIssue", + "members": { + "code": { + "optional": false, + "readonly": false, + "type": "\"AGENT_REQUIRED\" | \"ASSETS_REQUIRED\" | \"EXPIRY_REQUIRED\" | \"GAS_BUDGET_REQUIRED\" | \"NO_ENABLED_OPERATION\" | \"TOKEN_PAIR_REQUIRED\"" + }, + "message": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PresetCallIssue": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetCallIssue", + "members": { + "alternative": { + "optional": true, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector | undefined" + }, + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "reason": { + "optional": false, + "readonly": false, + "type": "\"DYNAMIC_AMOUNT\" | \"POSITION_AMOUNT\" | \"SHARE_AMOUNT\" | \"TOKEN_REQUIRED\" | \"UNSELECTED_TOKEN\" | \"ZERO_CAP\"" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "AgenticPresets": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").AgenticPresets", + "members": { + "get": { + "optional": false, + "readonly": false, + "type": "{\n (preset: import(\"sdk/src/lib/agentic/presets/types\").PresetCategory, options: import(\"sdk/src/lib/agentic/presets/types\").ReadyPresetOptions): import(\"sdk/src/lib/agentic/presets/types\").PresetResult;\n (preset: import(\"sdk/src/lib/agentic/presets/types\").PresetCategory, options?: import(\"sdk/src/lib/agentic/presets/types\").PresetOptions): import(\"sdk/src/lib/agentic/presets/types\").PresetResult;\n}" + }, + "list": { + "optional": false, + "readonly": false, + "type": "(options?: {\n type?: \"CATEGORY\";\n}) => {\n presets: import(\"sdk/src/lib/agentic/presets/types\").Preset[];\n}" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly<{\n PRESETS: Readonly<{\n CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n }>;\n WALLET: \"agentic:wallet\";\n }>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": true, + "type": "{\n readonly presets: import(\"sdk/src/lib/agentic/presets/types\").AgenticPresets;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address: (token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "PRESETS": { + "optional": false, + "readonly": true, + "type": "{\n readonly CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n}" + }, + "WALLET": { + "optional": false, + "readonly": true, + "type": "\"agentic:wallet\"" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly PRESETS: Readonly<{\n CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n }>;\n readonly WALLET: \"agentic:wallet\";\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "scope": "All root exports and declared public members, PushChain static/instance members, universal transaction methods, utility groups, readonly/optional markers and constants. Behavior/default/deployment changes need the written session review." +} diff --git a/plan/agw/research/preset-configuration-2026-10-16/build.log b/plan/agw/research/preset-configuration-2026-10-16/build.log new file mode 100644 index 00000000..72f46153 --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/build.log @@ -0,0 +1,13 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:52492) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core + + diff --git a/plan/agw/research/preset-configuration-2026-10-16/docs.log b/plan/agw/research/preset-configuration-2026-10-16/docs.log new file mode 100644 index 00000000..2755478b --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/docs.log @@ -0,0 +1 @@ +AGW guide: 6 TypeScript blocks typechecked against public exports; no examples executed. diff --git a/plan/agw/research/preset-configuration-2026-10-16/focused-unit.log b/plan/agw/research/preset-configuration-2026-10-16/focused-unit.log new file mode 100644 index 00000000..3e744188 --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/focused-unit.log @@ -0,0 +1,9 @@ +PASS core packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts + +Test Suites: 3 passed, 3 total +Tests: 54 passed, 54 total +Snapshots: 0 total +Time: 3.618 s +Ran all test suites within paths "packages/core/src/lib/agentic/__tests__/presets.spec.ts", "packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts", "packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts". diff --git a/plan/agw/research/preset-configuration-2026-10-16/lint.log b/plan/agw/research/preset-configuration-2026-10-16/lint.log new file mode 100644 index 00000000..71e637df --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/lint.log @@ -0,0 +1,6 @@ + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts + 158:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +✖ 1 problem (0 errors, 1 warning) + diff --git a/plan/agw/research/preset-configuration-2026-10-16/live-aave-acceptance.log b/plan/agw/research/preset-configuration-2026-10-16/live-aave-acceptance.log new file mode 100644 index 00000000..32ec1bf3 --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/live-aave-acceptance.log @@ -0,0 +1,11 @@ +PASS core-e2e __e2e__/agw/presets-live.spec.ts (284.596 s) + agw presets live + ✓ 2. Aave preset supplies and withdraws the wallet position (283628 ms) + ○ skipped 1. Uniswap preset swaps from the wallet CEA and rejects a different recipient + +Test Suites: 1 passed, 1 total +Tests: 1 skipped, 1 passed, 2 total +Snapshots: 0 total +Time: 284.63 s, estimated 1848 s +Ran all test suites within paths "__e2e__/agw/presets-live.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/preset-configuration-2026-10-16/live-acceptance-evidence.jsonl b/plan/agw/research/preset-configuration-2026-10-16/live-acceptance-evidence.jsonl new file mode 100644 index 00000000..858dd39b --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/live-acceptance-evidence.jsonl @@ -0,0 +1,27 @@ +{"name":"preset-aave-stage","at":"2026-10-16T14:19:29.947Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","stage":"mint-submitted","wallet":"0x77a26E59980935e0d7aA125b5d2c95A67F194BCA","cea":"0x864f30c67Ec4703eA9572E3DCCac94d56F82Cbf0","pushTx":"0x8eaf713fb6035522f3fb410e65b20de7dfc90c72359e557835c707250e0c35a5"} +{"name":"preset-aave-stage","at":"2026-10-16T14:20:32.352Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","stage":"mint-completed","wallet":"0x77a26E59980935e0d7aA125b5d2c95A67F194BCA","cea":"0x864f30c67Ec4703eA9572E3DCCac94d56F82Cbf0","externalTx":"0x85ac4ebda4fff38c72a24b6b11ea3698ec9769b223de04e1a5c497ebc56ca00a"} +{"name":"preset-aave-stage","at":"2026-10-16T14:20:46.731Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","stage":"supply-submitted","wallet":"0x77a26E59980935e0d7aA125b5d2c95A67F194BCA","cea":"0x864f30c67Ec4703eA9572E3DCCac94d56F82Cbf0","pushTx":"0x35b8b0eb26f333815e5d34b54cc79dfe71e504c308d8c37edffe69f087555e1d"} +{"name":"preset-aave-stage","at":"2026-10-16T14:21:52.318Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","stage":"supply-completed","wallet":"0x77a26E59980935e0d7aA125b5d2c95A67F194BCA","cea":"0x864f30c67Ec4703eA9572E3DCCac94d56F82Cbf0","externalTx":"0xcfaed8a9efd2ced9d288fb9cbe1d2ad62682870ec277b38e75b18a8cd178ad34"} +{"name":"preset-aave-stage","at":"2026-10-16T14:22:15.800Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","stage":"withdraw-submitted","wallet":"0x77a26E59980935e0d7aA125b5d2c95A67F194BCA","cea":"0x864f30c67Ec4703eA9572E3DCCac94d56F82Cbf0","pushTx":"0x072354349499d529a3564850f6a433bdf32b2685d9dc07e71fa654d779243de3"} +{"name":"preset-expanded-wallet","at":"2026-10-16T14:23:19.346Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","label":"e2e-preset-eigen","chain":"eip155:11155111","wallet":"0xde073E54372C7e0b9E65CC6f99959cE8B0678C6D","cea":"0xD80552eF6A5F2Fa8B4C44D921b343B96d248770e","rulesId":"0xab32de551d4de0e7d6ca0622e9027c6db8f0e628fd2ba03204fa97c5afd613aa"} +{"name":"preset-expanded-stage","at":"2026-10-16T14:23:32.799Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:11155111","wallet":"0xde073E54372C7e0b9E65CC6f99959cE8B0678C6D","cea":"0xD80552eF6A5F2Fa8B4C44D921b343B96d248770e","stage":"wrap-submitted","pushTx":"0xca71ebc2a372d1e634c9979042a4bab44881d0f7ef0e3c9d365bd8b4e1147e6f"} +{"name":"preset-aave-stage","at":"2026-10-16T14:23:33.837Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","stage":"withdraw-completed","wallet":"0x77a26E59980935e0d7aA125b5d2c95A67F194BCA","cea":"0x864f30c67Ec4703eA9572E3DCCac94d56F82Cbf0","externalTx":"0x3ec1e27c54d53fdfc0a4bc25f639afa1c20ec050362abb34ede761ce2823fcc8"} +{"name":"preset-limits-regeneration-live","at":"2026-10-16T14:23:34.365Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x77a26E59980935e0d7aA125b5d2c95A67F194BCA","cea":"0x864f30c67Ec4703eA9572E3DCCac94d56F82Cbf0","oldRulesId":"0x7cfaf096659a570c6f0cb6e837a67fd0afdab36d29a918d34ff422020e4d5662","newRulesId":"0xf78b3459933612f022e11da960904f54af986259b5cff524594d5cd2ee311df1","oldCap":"1000000000000","newCap":"500000000000","rejectedAboveCap":true,"destinationTx":"0x3ec1e27c54d53fdfc0a4bc25f639afa1c20ec050362abb34ede761ce2823fcc8"} +{"name":"preset-aave-live","at":"2026-10-16T14:23:34.365Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x77a26E59980935e0d7aA125b5d2c95A67F194BCA","cea":"0x864f30c67Ec4703eA9572E3DCCac94d56F82Cbf0","rulesId":"0x7cfaf096659a570c6f0cb6e837a67fd0afdab36d29a918d34ff422020e4d5662","mockLINK":"0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5","pool":"0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951","mintTx":"0x8eaf713fb6035522f3fb410e65b20de7dfc90c72359e557835c707250e0c35a5","mintExternal":"0x85ac4ebda4fff38c72a24b6b11ea3698ec9769b223de04e1a5c497ebc56ca00a","supplyTx":"0x35b8b0eb26f333815e5d34b54cc79dfe71e504c308d8c37edffe69f087555e1d","supplyExternal":"0xcfaed8a9efd2ced9d288fb9cbe1d2ad62682870ec277b38e75b18a8cd178ad34","withdrawTx":"0x072354349499d529a3564850f6a433bdf32b2685d9dc07e71fa654d779243de3","withdrawExternal":"0x3ec1e27c54d53fdfc0a4bc25f639afa1c20ec050362abb34ede761ce2823fcc8","amount":"1000000000000"} +{"name":"preset-expanded-stage","at":"2026-10-16T14:24:43.675Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:11155111","wallet":"0xde073E54372C7e0b9E65CC6f99959cE8B0678C6D","cea":"0xD80552eF6A5F2Fa8B4C44D921b343B96d248770e","stage":"wrap-completed","pushTx":"0xca71ebc2a372d1e634c9979042a4bab44881d0f7ef0e3c9d365bd8b4e1147e6f","externalTx":"0xc20682c90056f8b2fc0486391664f8771bbbbe95dc6ba42b08dc0ff8a797000e","status":"success"} +{"name":"preset-expanded-stage","at":"2026-10-16T14:25:01.023Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:11155111","wallet":"0xde073E54372C7e0b9E65CC6f99959cE8B0678C6D","cea":"0xD80552eF6A5F2Fa8B4C44D921b343B96d248770e","stage":"eigen-deposit-submitted","pushTx":"0x753ad504b341d979bdbffae6aad539a301a58c038effbe6de664c59cff1211f0"} +{"name":"preset-expanded-stage","at":"2026-10-16T14:27:07.926Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:11155111","wallet":"0xde073E54372C7e0b9E65CC6f99959cE8B0678C6D","cea":"0xD80552eF6A5F2Fa8B4C44D921b343B96d248770e","stage":"eigen-deposit-completed","pushTx":"0x753ad504b341d979bdbffae6aad539a301a58c038effbe6de664c59cff1211f0","externalTx":"0xb8b74452c5169161186963e4697f4a2dea21573f4c375f9a66bf59e4bfe38398","status":"success"} +{"name":"preset-eigen-live","at":"2026-10-16T14:27:08.298Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xde073E54372C7e0b9E65CC6f99959cE8B0678C6D","cea":"0xD80552eF6A5F2Fa8B4C44D921b343B96d248770e","strategy":"0x424246eF71b01ee33aA33aC590fd9a0855F5eFbc","amount":"1000000000000","shares":"1000000000000"} +{"name":"preset-expanded-wallet","at":"2026-10-16T14:27:45.140Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","label":"e2e-preset-dex-eip155:97","chain":"eip155:97","wallet":"0xbaE2f41FD9DA5cF91C0D63Ef2198858d77ca30E1","cea":"0xfE553E8Ad0A3b06Ed740Db50EEb593C0DF046867","rulesId":"0x9eb3a91361cedd52664ce400263c479525ad22214338d38b0cf1437e77a02934"} +{"name":"preset-expanded-stage","at":"2026-10-16T14:27:57.182Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:97","wallet":"0xbaE2f41FD9DA5cF91C0D63Ef2198858d77ca30E1","cea":"0xfE553E8Ad0A3b06Ed740Db50EEb593C0DF046867","stage":"wrap-submitted","pushTx":"0xa744e0814cf77da4051969fe6ba2bf2e4714dd806ae1e0c4065cd06e19bb7138"} +{"name":"preset-expanded-stage","at":"2026-10-16T14:28:56.306Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:97","wallet":"0xbaE2f41FD9DA5cF91C0D63Ef2198858d77ca30E1","cea":"0xfE553E8Ad0A3b06Ed740Db50EEb593C0DF046867","stage":"wrap-completed","pushTx":"0xa744e0814cf77da4051969fe6ba2bf2e4714dd806ae1e0c4065cd06e19bb7138","externalTx":"0xc2c74937dbb615b443dd31a29a9d9602b07dfaf1661df8dd290e72cb3a86744d","status":"success"} +{"name":"preset-expanded-stage","at":"2026-10-16T14:29:16.568Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:97","wallet":"0xbaE2f41FD9DA5cF91C0D63Ef2198858d77ca30E1","cea":"0xfE553E8Ad0A3b06Ed740Db50EEb593C0DF046867","stage":"dex-swap-submitted","pushTx":"0xa9c678dd1cd4dda0451582626929cd1365b9086a9edf064729033762f7682c3f"} +{"name":"preset-expanded-stage","at":"2026-10-16T14:30:09.124Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:97","wallet":"0xbaE2f41FD9DA5cF91C0D63Ef2198858d77ca30E1","cea":"0xfE553E8Ad0A3b06Ed740Db50EEb593C0DF046867","stage":"dex-swap-completed","pushTx":"0xa9c678dd1cd4dda0451582626929cd1365b9086a9edf064729033762f7682c3f","externalTx":"0x464047db3e50c6a916b01f515bc1dede09d3f7b596296ef66c51ac93144c66a6","status":"success"} +{"name":"preset-expanded-dex","at":"2026-10-16T14:30:09.473Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:97","wallet":"0xbaE2f41FD9DA5cF91C0D63Ef2198858d77ca30E1","cea":"0xfE553E8Ad0A3b06Ed740Db50EEb593C0DF046867","pool":"0xCed0844e421F856D2de472F9e7037f873987887C","router":"0x9a489505a00cE272eAa5e07Dba6491314CaE3796","amountIn":"1000000000000","amountOut":"3361"} +{"name":"preset-expanded-stage","at":"2026-10-16T14:30:32.580Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:97","wallet":"0xbaE2f41FD9DA5cF91C0D63Ef2198858d77ca30E1","cea":"0xfE553E8Ad0A3b06Ed740Db50EEb593C0DF046867","stage":"venus-mint-submitted","pushTx":"0xb517c1bbcdddb1f62c8c3d944a8bfa86f0a50019d66a2a99bec3f542ab0a8381"} +{"name":"preset-expanded-stage","at":"2026-10-16T14:31:22.531Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:97","wallet":"0xbaE2f41FD9DA5cF91C0D63Ef2198858d77ca30E1","cea":"0xfE553E8Ad0A3b06Ed740Db50EEb593C0DF046867","stage":"venus-mint-completed","pushTx":"0xb517c1bbcdddb1f62c8c3d944a8bfa86f0a50019d66a2a99bec3f542ab0a8381","externalTx":"0x9c00687978e2949d665536b59d821e98bbbbe2faae593e4384bec640586faff3","status":"success"} +{"name":"preset-expanded-stage","at":"2026-10-16T14:31:31.590Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:97","wallet":"0xbaE2f41FD9DA5cF91C0D63Ef2198858d77ca30E1","cea":"0xfE553E8Ad0A3b06Ed740Db50EEb593C0DF046867","stage":"venus-redeem-submitted","pushTx":"0x11b96746f5bbc71d97405b40cbe1e0f26dc14032c6745b02f994e21dab9d4698"} +{"name":"preset-expanded-stage","at":"2026-10-16T14:32:30.289Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:97","wallet":"0xbaE2f41FD9DA5cF91C0D63Ef2198858d77ca30E1","cea":"0xfE553E8Ad0A3b06Ed740Db50EEb593C0DF046867","stage":"venus-redeem-completed","pushTx":"0x11b96746f5bbc71d97405b40cbe1e0f26dc14032c6745b02f994e21dab9d4698","externalTx":"0x5540aa0b27c3882deccd2ad854a305d4afaaa11fcbd7c51a6f2ed0e0df193cb2","status":"success"} +{"name":"preset-expanded-venus","at":"2026-10-16T14:32:30.648Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:97","wallet":"0xbaE2f41FD9DA5cF91C0D63Ef2198858d77ca30E1","cea":"0xfE553E8Ad0A3b06Ed740Db50EEb593C0DF046867","deposited":"3361","redeemed":"3360","shares":"16740010","remainingShares":"4981","asset":"0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c"} +{"name":"preset-expanded-wallet","at":"2026-10-16T14:33:05.795Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","label":"e2e-preset-base-lending","chain":"eip155:84532","wallet":"0x10975626FC9757C9D423c34E0280e501b5595f6a","cea":"0xB7FaD9Fc61504C148F8852b87a48d18Ced0906e6","rulesId":"0x37a36763f71f21aa9de1a3575795d336d5916beb34dbad21e97ffc664a75ce89"} +{"name":"preset-expanded-stage","at":"2026-10-16T14:33:11.131Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","chain":"eip155:84532","wallet":"0x10975626FC9757C9D423c34E0280e501b5595f6a","cea":"0xB7FaD9Fc61504C148F8852b87a48d18Ced0906e6","stage":"faucets-submitted","pushTx":"0x05493d40928a9bf8d439502cb60aa09b000c42a661320d60e15546709bf7f4aa"} diff --git a/plan/agw/research/preset-configuration-2026-10-16/live-acceptance-preflight.log b/plan/agw/research/preset-configuration-2026-10-16/live-acceptance-preflight.log new file mode 100644 index 00000000..73068dd6 --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/live-acceptance-preflight.log @@ -0,0 +1,20 @@ +AGW deployment manifest verified on-chain. + +Wallets + EVM master (Sepolia) 0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf + Push master (Donut) 0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf + Solana master (Devnet) 3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb + Shared UEA (Donut) 0x5C70C864Cf1aDfB04A0e107fFA248ba3600EAb8D + UEA CEA PDA (Devnet) Fqp8UeJxEWvN1Ciu5jqrA3opGXwNvRL2HfJxNQotj3Qh + +Group "agw-presets-expanded" — 5 scenarios, headroom ×1.25. + +┌─────────────────────┬───────┬──────────┬─────────────┬────────┐ +│ Scope │ Asset │ Need │ Have │ Status │ +├─────────────────────┼───────┼──────────┼─────────────┼────────┤ +│ Push master (Donut) │ PC │ 689.5000 │ 967918.1059 │ ✓ │ +│ Push master (Donut) │ pETH │ 0.000001 │ 434.3115 │ ✓ │ +└─────────────────────┴───────┴──────────┴─────────────┴────────┘ + +All master wallets can cover this run. +Derived accounts are already at target. Ready to run. diff --git a/plan/agw/research/preset-configuration-2026-10-16/live-attempt-evidence.jsonl b/plan/agw/research/preset-configuration-2026-10-16/live-attempt-evidence.jsonl new file mode 100644 index 00000000..810f4763 --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/live-attempt-evidence.jsonl @@ -0,0 +1,4 @@ +{"name": "preset-aave-stage", "at": "2026-10-15T20:30:20.480Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "stage": "mint-submitted", "wallet": "0xa637F6Cfd678e0681B230EcbB6048DACf99cD879", "cea": "0x9DA9AbEF7385Fc6F29CF043dFf33c37c808E9470", "pushTx": "0xc8b66f3c89b869f9b047baaf52cccf65e9ee176a368b1889ded77b3a5d816b93"} +{"name": "preset-aave-stage", "at": "2026-10-15T20:45:29.813Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "stage": "mint-completed", "wallet": "0xa637F6Cfd678e0681B230EcbB6048DACf99cD879", "cea": "0x9DA9AbEF7385Fc6F29CF043dFf33c37c808E9470"} +{"name": "preset-expanded-wallet", "at": "2026-10-15T23:01:43.644Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "label": "e2e-preset-dex-eip155:97", "chain": "eip155:97", "wallet": "0x428C2015D6dbF89AF39E37749348CF532b0B0aAc", "cea": "0xFA6E5AF18Ad5471801F061e9fB9C8b8213E03731", "rulesId": "0x30b549e4e1a08a9284ff4128632329f07107935a9aff5a6e60222665f0f34a0c"} +{"name": "preset-expanded-wallet", "at": "2026-10-15T23:17:37.769Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "label": "e2e-preset-base-lending", "chain": "eip155:84532", "wallet": "0x688bE5423F3B4b1156A1Cd41E9a7ea77224187FA", "cea": "0xFdb11460F139D3179661278cd4b5d9f7fCD0C4Fd", "rulesId": "0x067f98ef527a453b68ce09206c055734a1c22d67673b449854f35c2494233fe2"} diff --git a/plan/agw/research/preset-configuration-2026-10-16/live-expanded-interrupted.log b/plan/agw/research/preset-configuration-2026-10-16/live-expanded-interrupted.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/preset-configuration-2026-10-16/local-contracts.log b/plan/agw/research/preset-configuration-2026-10-16/local-contracts.log new file mode 100644 index 00000000..d22f47d0 --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/local-contracts.log @@ -0,0 +1,26 @@ +PASS core-agw-local packages/core/__agw-local__/v5-multiasset.spec.ts (7.871 s) + v6 multi-asset SDK management and execution + ✓ v6 EVM alternatives enforce both spender and MAX, and reads update losslessly (299 ms) + ✓ v6 refuses a bare alternative that bypasses a pinned function and too many initial rules (71 ms) + ✓ the shipped DEX catalog enforces tuple receiver/token/amount pins on actual v6 URP (394 ms) + ✓ a review-only DEX exactInputSingle call cannot spend tokens even after asset budgets are filled (200 ms) + ✓ a review-only DEX exactOutputSingle call cannot spend tokens even after asset budgets are filled (176 ms) + ✓ regenerated LENDING presets enforce new token/amount pins through atomic rules.update (694 ms) + ✓ regenerated STAKING presets enforce new token/amount pins through atomic rules.update (470 ms) + ✓ a fixture preset produces rules accepted by public create and enforced by real contracts (211 ms) + ✓ public create encodes two ordered assets; public get reconstructs source-token caps (143 ms) + ✓ a token from the wrong chain fails before deployment (32 ms) + ✓ a same-chain registry identity mismatch fails before deployment (15 ms) + ✓ both tokens execute under one rule and keep independent counters/limits (190 ms) + ✓ omitted and explicit zero totals both prohibit movement (239 ms) + ✓ empty user assets grants one zero-cap gas token and executes a call-only request (213 ms) + ✓ public update resets both counters in one batch and records five checkpoints (262 ms) + ✓ spend on the second asset after snapshot rolls back revoke/grant and checkpoint writes (159 ms) + ✓ out-of-band duplicate contract grants still make sends ambiguous (65 ms) + ✓ a legacy two-field envelope is refused by the actual v6 grant path (28 ms) + +Test Suites: 1 passed, 1 total +Tests: 18 passed, 18 total +Snapshots: 0 total +Time: 7.906 s, estimated 61 s +Ran all test suites within paths "packages/core/__agw-local__/v5-multiasset.spec.ts". diff --git a/plan/agw/research/preset-configuration-2026-10-16/local-origin-lookup-timeout.log b/plan/agw/research/preset-configuration-2026-10-16/local-origin-lookup-timeout.log new file mode 100644 index 00000000..a8e2aa64 --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/local-origin-lookup-timeout.log @@ -0,0 +1,148 @@ +FAIL core-agw-local packages/core/__agw-local__/v5-multiasset.spec.ts (60.45 s) + v6 multi-asset SDK management and execution + ✕ v6 EVM alternatives enforce both spender and MAX, and reads update losslessly (41135 ms) + ✓ v6 refuses a bare alternative that bypasses a pinned function and too many initial rules (30 ms) + ✓ the shipped DEX catalog enforces tuple receiver/token/amount pins on actual v6 URP (2327 ms) + ✓ a review-only DEX exactInputSingle call cannot spend tokens even after asset budgets are filled (406 ms) + ✓ a review-only DEX exactOutputSingle call cannot spend tokens even after asset budgets are filled (424 ms) + ✓ regenerated LENDING presets enforce new token/amount pins through atomic rules.update (911 ms) + ✓ regenerated STAKING presets enforce new token/amount pins through atomic rules.update (1110 ms) + ✓ a fixture preset produces rules accepted by public create and enforced by real contracts (2746 ms) + ✓ public create encodes two ordered assets; public get reconstructs source-token caps (1896 ms) + ✓ a token from the wrong chain fails before deployment (11 ms) + ✓ a same-chain registry identity mismatch fails before deployment (2 ms) + ✓ both tokens execute under one rule and keep independent counters/limits (1810 ms) + ✓ omitted and explicit zero totals both prohibit movement (2050 ms) + ✓ empty user assets grants one zero-cap gas token and executes a call-only request (473 ms) + ✓ public update resets both counters in one batch and records five checkpoints (559 ms) + ✓ spend on the second asset after snapshot rolls back revoke/grant and checkpoint writes (861 ms) + ✓ out-of-band duplicate contract grants still make sends ambiguous (49 ms) + ✓ a legacy two-field envelope is refused by the actual v6 grant path (7 ms) + + ● v6 multi-asset SDK management and execution › v6 EVM alternatives enforce both spender and MAX, and reads update losslessly + + AgenticRevertError: The request took too long to respond. + + 163 | decodedError?: DecodedErrorPayload; + 164 | }; + > 165 | return new AgenticRevertError(e?.message ?? decoded?.name ?? 'AGW revert', { + | ^ + 166 | decodedError: decoded ?? e?.decodedError, + 167 | gatewayTxHash: e?.gatewayTxHash, + 168 | agenticCode: decoded?.name, + + at wrapSendError (src/lib/agentic/management/common.ts:165:12) + at atomicCreateFailure (src/lib/agentic/management/create.ts:201:32) + at createWallet (src/lib/agentic/management/create.ts:123:21) + at async setup (__agw-local__/v5-multiasset.spec.ts:91:21) + at async Object. (__agw-local__/v5-multiasset.spec.ts:166:35) + + Cause: + PushChainExecutionError: The request took too long to respond. + + 186 | ctx._routeTerminalEmitted = true; + 187 | if (!isUserDecline && !(err instanceof PushChainExecutionError)) { + > 188 | throw new PushChainExecutionError(errMsg, { cause: err }); + | ^ + 189 | } + 190 | throw err; + 191 | } + + at executeStandardPayload (src/lib/orchestrator/internals/execute-standard.ts:188:15) + at async Orchestrator.executeWithPolicy (src/lib/orchestrator/orchestrator.ts:471:11) + at async createWallet (src/lib/agentic/management/create.ts:121:10) + at async setup (__agw-local__/v5-multiasset.spec.ts:91:21) + at async Object. (__agw-local__/v5-multiasset.spec.ts:166:35) + + Cause: + ContractFunctionExecutionError: The request took too long to respond. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b0970000000000000000000000008a791620dd6260079bf849dc5567adc3f2fdc318","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Raw Call Arguments: + to: 0x00000000000000000000000000000000000000eA + data: 0xd0f4b0970000000000000000000000008a791620dd6260079bf849dc5567adc3f2fdc318 + + Contract Call: + address: 0x00000000000000000000000000000000000000eA + function: getOriginForUEA(address addr) + args: (0x8a791620dd6260079bf849dc5567adc3f2fdc318) + + Docs: https://viem.sh/docs/contract/readContract + Details: The request timed out. + Version: viem@2.27.2 + + 486 | }); + 487 | + > 488 | const originResult = (await client.readContract({ + | ^ + 489 | address: FACTORY_ADDRESS, + 490 | abi: FACTORY_V1, + 491 | functionName: 'getOriginForUEA', + + at getContractError (../../node_modules/viem/utils/errors/getContractError.ts:78:10) + at readContract (../../node_modules/viem/actions/public/readContract.ts:136:27) + at async convertExecutorToOrigin (src/lib/universal/account/account.ts:488:25) + at async transformToUniversalTxResponse (src/lib/orchestrator/internals/response-builder.ts:625:5) + at async sendPushTx (src/lib/orchestrator/internals/push-chain-tx.ts:321:10) + at async executeStandardPayload (src/lib/orchestrator/internals/execute-standard.ts:173:12) + at async Orchestrator.executeWithPolicy (src/lib/orchestrator/orchestrator.ts:471:11) + at async createWallet (src/lib/agentic/management/create.ts:121:10) + at async setup (__agw-local__/v5-multiasset.spec.ts:91:21) + at async Object. (__agw-local__/v5-multiasset.spec.ts:166:35) + + Cause: + CallExecutionError: The request took too long to respond. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b0970000000000000000000000008a791620dd6260079bf849dc5567adc3f2fdc318","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Raw Call Arguments: + to: 0x00000000000000000000000000000000000000eA + data: 0xd0f4b0970000000000000000000000008a791620dd6260079bf849dc5567adc3f2fdc318 + + Details: The request timed out. + Version: viem@2.27.2 + + 486 | }); + 487 | + > 488 | const originResult = (await client.readContract({ + | ^ + 489 | address: FACTORY_ADDRESS, + 490 | abi: FACTORY_V1, + 491 | functionName: 'getOriginForUEA', + + at getCallError (../../node_modules/viem/utils/errors/getCallError.ts:42:10) + at call (../../node_modules/viem/actions/public/call.ts:282:23) + at async readContract (../../node_modules/viem/actions/public/readContract.ts:120:22) + at async convertExecutorToOrigin (src/lib/universal/account/account.ts:488:25) + at async transformToUniversalTxResponse (src/lib/orchestrator/internals/response-builder.ts:625:5) + at async sendPushTx (src/lib/orchestrator/internals/push-chain-tx.ts:321:10) + at async executeStandardPayload (src/lib/orchestrator/internals/execute-standard.ts:173:12) + at async Orchestrator.executeWithPolicy (src/lib/orchestrator/orchestrator.ts:471:11) + at async createWallet (src/lib/agentic/management/create.ts:121:10) + at async setup (__agw-local__/v5-multiasset.spec.ts:91:21) + at async Object. (__agw-local__/v5-multiasset.spec.ts:166:35) + + Cause: + TimeoutError: The request took too long to respond. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b0970000000000000000000000008a791620dd6260079bf849dc5567adc3f2fdc318","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Details: The request timed out. + Version: viem@2.27.2 + + at Object.request (../../node_modules/viem/utils/rpc/http.ts:124:28) + at fn (../../node_modules/viem/clients/transports/http.ts:145:35) + at request (../../node_modules/viem/clients/transports/http.ts:150:45) + at delay.count.count (../../node_modules/viem/utils/buildRequest.ts:150:28) + at attemptRetry (../../node_modules/viem/utils/promise/withRetry.ts:44:28) + at retry (../../node_modules/viem/utils/promise/withRetry.ts:40:9) + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 17 passed, 18 total +Snapshots: 0 total +Time: 60.487 s +Ran all test suites within paths "packages/core/__agw-local__/v5-multiasset.spec.ts". diff --git a/plan/agw/research/preset-configuration-2026-10-16/markets-timeout.log b/plan/agw/research/preset-configuration-2026-10-16/markets-timeout.log new file mode 100644 index 00000000..23f5e546 --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/markets-timeout.log @@ -0,0 +1,103 @@ +FAIL core-e2e __e2e__/agw/presets-expanded-live.spec.ts (2671.529 s) + agw presets expanded + ✕ 4. DEX swap and Venus round trip on eip155:97 (1719393 ms) + ✕ 5. Base Aave and both Moonwell markets supply and redeem wallet positions (947926 ms) + ○ skipped 1. EigenLayer Sepolia deposit credits shares to the wallet + ○ skipped 2. DEX swap on eip155:84532 + ○ skipped 3. DEX swap and Aave round trip on eip155:421614 + + ● agw presets expanded › 4. DEX swap and Venus round trip on eip155:97 + + AgenticRevertError: Timed out while waiting for transaction with hash "0x52732156d51caf9d3d1aa08fd4397be09508553cc4119fc218b92f50eee126e3" to be confirmed. + + 163 | decodedError?: DecodedErrorPayload; + 164 | }; + > 165 | return new AgenticRevertError(e?.message ?? decoded?.name ?? 'AGW revert', { + | ^ + 166 | decodedError: decoded ?? e?.decodedError, + 167 | gatewayTxHash: e?.gatewayTxHash, + 168 | agenticCode: decoded?.name, + + at wrapSendError (src/lib/agentic/management/common.ts:165:12) + at agenticSend (src/lib/agentic/execution/send.ts:340:34) + at async send (__e2e__/agw/presets-expanded-live.spec.ts:131:14) + at async wrap (__e2e__/agw/presets-expanded-live.spec.ts:250:3) + at async dexAndLend (__e2e__/agw/presets-expanded-live.spec.ts:435:5) + + Cause: + PushChainExecutionError: Timed out while waiting for transaction with hash "0x52732156d51caf9d3d1aa08fd4397be09508553cc4119fc218b92f50eee126e3" to be confirmed. + + 186 | ctx._routeTerminalEmitted = true; + 187 | if (!isUserDecline && !(err instanceof PushChainExecutionError)) { + > 188 | throw new PushChainExecutionError(errMsg, { cause: err }); + | ^ + 189 | } + 190 | throw err; + 191 | } + + at executeStandardPayload (src/lib/orchestrator/internals/execute-standard.ts:188:15) + at async Orchestrator.executeWithPolicy (src/lib/orchestrator/orchestrator.ts:471:11) + at async agenticSend (src/lib/agentic/execution/send.ts:330:9) + at async send (__e2e__/agw/presets-expanded-live.spec.ts:131:14) + at async wrap (__e2e__/agw/presets-expanded-live.spec.ts:250:3) + at async dexAndLend (__e2e__/agw/presets-expanded-live.spec.ts:435:5) + + Cause: + WaitForTransactionReceiptTimeoutError: Timed out while waiting for transaction with hash "0x52732156d51caf9d3d1aa08fd4397be09508553cc4119fc218b92f50eee126e3" to be confirmed. + + Version: viem@2.27.2 + + at Timeout._onTimeout (../../node_modules/viem/actions/public/waitForTransactionReceipt.ts:160:22) + + ● agw presets expanded › 5. Base Aave and both Moonwell markets supply and redeem wallet positions + + AgenticRevertError: Timed out while waiting for transaction with hash "0x72d53c5d0faad5a16eec8f1a1f413757d425ec4237488551b5d2f2436d4e60b2" to be confirmed. + + 163 | decodedError?: DecodedErrorPayload; + 164 | }; + > 165 | return new AgenticRevertError(e?.message ?? decoded?.name ?? 'AGW revert', { + | ^ + 166 | decodedError: decoded ?? e?.decodedError, + 167 | gatewayTxHash: e?.gatewayTxHash, + 168 | agenticCode: decoded?.name, + + at wrapSendError (src/lib/agentic/management/common.ts:165:12) + at agenticSend (src/lib/agentic/execution/send.ts:340:34) + at async send (__e2e__/agw/presets-expanded-live.spec.ts:131:14) + at async Object. (__e2e__/agw/presets-expanded-live.spec.ts:657:5) + + Cause: + PushChainExecutionError: Timed out while waiting for transaction with hash "0x72d53c5d0faad5a16eec8f1a1f413757d425ec4237488551b5d2f2436d4e60b2" to be confirmed. + + 186 | ctx._routeTerminalEmitted = true; + 187 | if (!isUserDecline && !(err instanceof PushChainExecutionError)) { + > 188 | throw new PushChainExecutionError(errMsg, { cause: err }); + | ^ + 189 | } + 190 | throw err; + 191 | } + + at executeStandardPayload (src/lib/orchestrator/internals/execute-standard.ts:188:15) + at async Orchestrator.executeWithPolicy (src/lib/orchestrator/orchestrator.ts:471:11) + at async agenticSend (src/lib/agentic/execution/send.ts:330:9) + at async send (__e2e__/agw/presets-expanded-live.spec.ts:131:14) + at async Object. (__e2e__/agw/presets-expanded-live.spec.ts:657:5) + + Cause: + WaitForTransactionReceiptTimeoutError: Timed out while waiting for transaction with hash "0x72d53c5d0faad5a16eec8f1a1f413757d425ec4237488551b5d2f2436d4e60b2" to be confirmed. + + Version: viem@2.27.2 + + at Timeout._onTimeout (../../node_modules/viem/actions/public/waitForTransactionReceipt.ts:160:22) + +Test Suites: 1 failed, 1 total +Tests: 2 failed, 3 skipped, 5 total +Snapshots: 0 total +Time: 2671.595 s +Ran all test suites within paths "__e2e__/agw/presets-expanded-live.spec.ts". +Test Suites: 1 failed, 1 total +Tests: 2 failed, 3 skipped, 5 total +Snapshots: 0 total +Time: 2671.599 s +Ran all test suites within paths "__e2e__/agw/presets-expanded-live.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/preset-configuration-2026-10-16/unit.log b/plan/agw/research/preset-configuration-2026-10-16/unit.log new file mode 100644 index 00000000..cf916bd8 --- /dev/null +++ b/plan/agw/research/preset-configuration-2026-10-16/unit.log @@ -0,0 +1,179 @@ +PASS core packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/labels.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/public-rule.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts + +Test Suites: 1 skipped, 126 passed, 126 of 127 total +Tests: 12 skipped, 2111 passed, 2123 total +Snapshots: 0 total +Time: 948.807 s +Ran all test suites. diff --git a/plan/agw/research/preset-default-tokens-2026-10-18/README.md b/plan/agw/research/preset-default-tokens-2026-10-18/README.md new file mode 100644 index 00000000..eaf783ba --- /dev/null +++ b/plan/agw/research/preset-default-tokens-2026-10-18/README.md @@ -0,0 +1,34 @@ +# Automatic preset tokens — October 18, 2026 + +> Intermediate stage. Final funding behavior, commits and release checks are recorded in [release readiness](../preset-release-readiness-2026-10-18/README.md). + +Riyanshu clarified that presets must provide token selections per network. SDK-only changes are local on feat/agw-sdk-v4; nothing is committed, pushed or published by this change. + +## Behavior + +- Omitted assets includes curated destination tokens per chain for DEXES, LENDING and STAKING. PREDICTION remains empty. +- DEX includes the complete pair, both directions, exact-input/output constraints and spender-pinned approvals. +- Lending defaults are protocol-specific, including testnet reserve/mock addresses rather than unrelated DEX tokens. +- Every default expansion stays within 8 assets, 32 calls and 32 pins. Base/BNB mainnet lending uses a shared market/reserve token to fit; other markets remain selectable explicitly. The complete Aave reserve list is not selected automatically. +- Explicit assets replaces defaults across all returned chains, including [] or a list limited to one chain. No tokens are appended to explicit selections. +- Returned defaults and metadata cannot mutate subsequent results. +- KnownTokens includes the default subset, including DEX pairs. + +Source selection reuses the reviewed October 15 catalog, Aave reserve snapshots and live protocol fixtures. See default-tokens.ts and the network/token table in packages/core/AGW.md. No new address freshness/liquidity guarantee is made. + +## Remaining permission-policy decision + +Tokens are now preselected, but caps retain the existing zero default. No spending, PC gas budget or expiry is invented. These templates are disabled until a permission policy is applied via get with capped assets. UI can use the SDK-provided selections without asking users to choose tokens per chain; fully automatic execution still needs approved positive caps, a gas budget and expiry. + +Suggested 10 USDC per call, 100 USDC cumulative Push-outbound and 7-day expiry are proposals only. Per-token values/decimals and chain-specific gas budgets need agreement. These numbers are not implemented and are not equivalent to a destination lifetime/batch cap. + +## Verification + +- 62 focused preset tests pass. +- Full unit suite: 2,119 passed, 12 skipped, no failures. +- Local pinned v6 AGW/URP/engine suite: 18 passed. Default DEX token constraints reject positive input under zero MAX even if bridge asset budgets are edited; explicit empty-list preview/regeneration remains covered. +- Build, spec/local typechecks, 6 guide TypeScript blocks and package CJS/ESM/declaration/import checks pass. +- Source/compiled API comparison matches. Lint has no errors; test non-null assertion warnings remain. +- Existing live Sepolia DEX/Aave scenarios now check the default token lists; Aave regenerates its executable rule from returned tokens. They were typechecked, not broadcast again. + +The first local invocation failed setup because its previous temporary build directory had been removed. Rebuilt the pinned ffd567d contracts in /tmp/agw-preset-defaults-v6 using the existing prepare script; the actual local suite then passed. No contract checkout was modified and no live E2E was started. diff --git a/plan/agw/research/preset-default-tokens-2026-10-18/api.json b/plan/agw/research/preset-default-tokens-2026-10-18/api.json new file mode 100644 index 00000000..97ae2de9 --- /dev/null +++ b/plan/agw/research/preset-default-tokens-2026-10-18/api.json @@ -0,0 +1,64 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "b115b66c6888cde5ff4b6a09e6c4b224a8874729", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [ + "AgenticPresets", + "ArgumentPath", + "DecodedSolanaRule", + "Pin", + "Preset", + "PresetAsset", + "PresetCallIssue", + "PresetCategory", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetOptions", + "PresetResult", + "PresetRuleTemplate", + "ReadyPresetOptions", + "RuleInput", + "Spent", + "WalletMarker" + ], + "removedExports": [ + "AgenticNetworkConstants", + "NativeRule", + "UniversalRule" + ], + "publicTypeChanges": [ + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticRevertError", + "AgenticErrorCode", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "CreateOptions", + "DecodedSolanaRule", + "Rule", + "RuleInput", + "Pin", + "Spent", + "WalletMarker", + "ArgumentPath", + "RulesRecord", + "Preset", + "PresetCategory", + "PresetAsset", + "PresetOptions", + "ReadyPresetOptions", + "PresetRuleTemplate", + "PresetResult", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetCallIssue", + "AgenticPresets" + ], + "transactionMethodChanges": [], + "instanceMethodChanges": [], + "agwConstantsChanged": true, + "scope": "Summary of check-agw-api.js output; redundant full source/declaration snapshots omitted." +} diff --git a/plan/agw/research/preset-default-tokens-2026-10-18/build.log b/plan/agw/research/preset-default-tokens-2026-10-18/build.log new file mode 100644 index 00000000..12fa4134 --- /dev/null +++ b/plan/agw/research/preset-default-tokens-2026-10-18/build.log @@ -0,0 +1,11 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:20842) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core diff --git a/plan/agw/research/preset-default-tokens-2026-10-18/docs.log b/plan/agw/research/preset-default-tokens-2026-10-18/docs.log new file mode 100644 index 00000000..2755478b --- /dev/null +++ b/plan/agw/research/preset-default-tokens-2026-10-18/docs.log @@ -0,0 +1 @@ +AGW guide: 6 TypeScript blocks typechecked against public exports; no examples executed. diff --git a/plan/agw/research/preset-default-tokens-2026-10-18/full-unit.log b/plan/agw/research/preset-default-tokens-2026-10-18/full-unit.log new file mode 100644 index 00000000..e9e41eb0 --- /dev/null +++ b/plan/agw/research/preset-default-tokens-2026-10-18/full-unit.log @@ -0,0 +1,180 @@ +PASS core packages/core/src/lib/utils.spec.ts (6.711 s) + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/public-rule.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/labels.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-default-tokens.spec.ts + +Test Suites: 1 skipped, 127 passed, 127 of 128 total +Tests: 12 skipped, 2119 passed, 2131 total +Snapshots: 0 total +Time: 54.207 s +Ran all test suites. diff --git a/plan/agw/research/preset-default-tokens-2026-10-18/lint.log b/plan/agw/research/preset-default-tokens-2026-10-18/lint.log new file mode 100644 index 00000000..6b99786c --- /dev/null +++ b/plan/agw/research/preset-default-tokens-2026-10-18/lint.log @@ -0,0 +1,31 @@ + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts + 46:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 54:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 114:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 189:4 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 191:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 198:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 205:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 234:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 236:32 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 247:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/preset-default-tokens.spec.ts + 19:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 20:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 26:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 48:10 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 51:10 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 56:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 85:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 90:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 100:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 112:10 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 137:3 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 138:3 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts + 159:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +✖ 23 problems (0 errors, 23 warnings) diff --git a/plan/agw/research/preset-default-tokens-2026-10-18/local-contracts.log b/plan/agw/research/preset-default-tokens-2026-10-18/local-contracts.log new file mode 100644 index 00000000..6bfa7232 --- /dev/null +++ b/plan/agw/research/preset-default-tokens-2026-10-18/local-contracts.log @@ -0,0 +1,26 @@ +PASS core-agw-local packages/core/__agw-local__/v5-multiasset.spec.ts + v6 multi-asset SDK management and execution + ✓ v6 EVM alternatives enforce both spender and MAX, and reads update losslessly (105 ms) + ✓ v6 refuses a bare alternative that bypasses a pinned function and too many initial rules (20 ms) + ✓ the shipped DEX catalog enforces tuple receiver/token/amount pins on actual v6 URP (94 ms) + ✓ a default-token DEX exactInputSingle call cannot spend tokens even after asset budgets are filled (41 ms) + ✓ a default-token DEX exactOutputSingle call cannot spend tokens even after asset budgets are filled (42 ms) + ✓ regenerated LENDING presets enforce new token/amount pins through atomic rules.update (112 ms) + ✓ regenerated STAKING presets enforce new token/amount pins through atomic rules.update (119 ms) + ✓ a fixture preset produces rules accepted by public create and enforced by real contracts (42 ms) + ✓ public create encodes two ordered assets; public get reconstructs source-token caps (35 ms) + ✓ a token from the wrong chain fails before deployment (8 ms) + ✓ a same-chain registry identity mismatch fails before deployment (2 ms) + ✓ both tokens execute under one rule and keep independent counters/limits (125 ms) + ✓ omitted and explicit zero totals both prohibit movement (63 ms) + ✓ empty user assets grants one zero-cap gas token and executes a call-only request (118 ms) + ✓ public update resets both counters in one batch and records five checkpoints (153 ms) + ✓ spend on the second asset after snapshot rolls back revoke/grant and checkpoint writes (198 ms) + ✓ out-of-band duplicate contract grants still make sends ambiguous (75 ms) + ✓ a legacy two-field envelope is refused by the actual v6 grant path (34 ms) + +Test Suites: 1 passed, 1 total +Tests: 18 passed, 18 total +Snapshots: 0 total +Time: 3.614 s, estimated 8 s +Ran all test suites within paths "packages/core/__agw-local__/v5-multiasset.spec.ts". diff --git a/plan/agw/research/preset-default-tokens-2026-10-18/package.log b/plan/agw/research/preset-default-tokens-2026-10-18/package.log new file mode 100644 index 00000000..8e1b97e4 --- /dev/null +++ b/plan/agw/research/preset-default-tokens-2026-10-18/package.log @@ -0,0 +1 @@ +AGW package: CJS/ESM imports, compiled declaration examples and npm contents pass. No examples executed/published. diff --git a/plan/agw/research/preset-default-tokens-2026-10-18/unit.log b/plan/agw/research/preset-default-tokens-2026-10-18/unit.log new file mode 100644 index 00000000..903e76ef --- /dev/null +++ b/plan/agw/research/preset-default-tokens-2026-10-18/unit.log @@ -0,0 +1,10 @@ +PASS core packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-default-tokens.spec.ts + +Test Suites: 4 passed, 4 total +Tests: 62 passed, 62 total +Snapshots: 0 total +Time: 3.566 s +Ran all test suites within paths "packages/core/src/lib/agentic/__tests__/presets.spec.ts", "packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts", "packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts", "packages/core/src/lib/agentic/__tests__/preset-default-tokens.spec.ts". diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/MTokenInterfaces.sol b/plan/agw/research/preset-expanded-live-2026-10-15/MTokenInterfaces.sol new file mode 100644 index 00000000..c7ba978a --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/MTokenInterfaces.sol @@ -0,0 +1,316 @@ +// SPDX-License-Identifier: BSD-3-Clause +pragma solidity 0.8.19; + +import "./ComptrollerInterface.sol"; +import "./irm/InterestRateModel.sol"; +import "./EIP20NonStandardInterface.sol"; +import "./TokenErrorReporter.sol"; + +contract MTokenStorage { + /// @dev Guard variable for re-entrancy checks + bool internal _notEntered; + + /// @notice EIP-20 token name for this token + string public name; + + /// @notice EIP-20 token symbol for this token + string public symbol; + + /// @notice EIP-20 token decimals for this token + uint8 public decimals; + + /// @notice Maximum borrow rate that can ever be applied (.0005% / block) + uint internal constant borrowRateMaxMantissa = 0.0005e16; + + // @notice Maximum fraction of interest that can be set aside for reserves + uint internal constant reserveFactorMaxMantissa = 1e18; + + /// @notice Administrator for this contract + address payable public admin; + + /// @notice Pending administrator for this contract + address payable public pendingAdmin; + + /// @notice Contract which oversees inter-mToken operations + ComptrollerInterface public comptroller; + + /// @notice Model which tells what the current interest rate should be + InterestRateModel public interestRateModel; + + // @notice Initial exchange rate used when minting the first MTokens (used when totalSupply = 0) + uint internal initialExchangeRateMantissa; + + /// @notice Fraction of interest currently set aside for reserves + uint public reserveFactorMantissa; + + /// @notice Block number that interest was last accrued at + uint public accrualBlockTimestamp; + + /// @notice Accumulator of the total earned interest rate since the opening of the market + uint public borrowIndex; + + /// @notice Total amount of outstanding borrows of the underlying in this market + uint public totalBorrows; + + /// @notice Total amount of reserves of the underlying held in this market + uint public totalReserves; + + /// @notice Total number of tokens in circulation + uint public totalSupply; + + /// @notice Official record of token balances for each account + mapping(address => uint) internal accountTokens; + + /// @notice Approved token transfer amounts on behalf of others + mapping(address => mapping(address => uint)) internal transferAllowances; + + /** + * @notice Container for borrow balance information + * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action + * @member interestIndex Global borrowIndex as of the most recent balance-changing action + */ + struct BorrowSnapshot { + uint principal; + uint interestIndex; + } + + // @notice Mapping of account addresses to outstanding borrow balances + mapping(address => BorrowSnapshot) internal accountBorrows; + + /// @notice Share of seized collateral that is added to reserves + uint public protocolSeizeShareMantissa; +} + +abstract contract MTokenInterface is MTokenStorage { + /// @notice Indicator that this is a MToken contract (for inspection) + bool public constant isMToken = true; + + /*** Market Events ***/ + + /// @notice Event emitted when interest is accrued + event AccrueInterest( + uint cashPrior, + uint interestAccumulated, + uint borrowIndex, + uint totalBorrows + ); + + /// @notice Event emitted when tokens are minted + event Mint(address minter, uint mintAmount, uint mintTokens); + + /// @notice Event emitted when tokens are redeemed + event Redeem(address redeemer, uint redeemAmount, uint redeemTokens); + + /// @notice Event emitted when underlying is borrowed + event Borrow( + address borrower, + uint borrowAmount, + uint accountBorrows, + uint totalBorrows + ); + + /// @notice Event emitted when a borrow is repaid + event RepayBorrow( + address payer, + address borrower, + uint repayAmount, + uint accountBorrows, + uint totalBorrows + ); + + /// @notice Event emitted when a borrow is liquidated + event LiquidateBorrow( + address liquidator, + address borrower, + uint repayAmount, + address mTokenCollateral, + uint seizeTokens + ); + + /*** Admin Events ***/ + + /// @notice Event emitted when pendingAdmin is changed + event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin); + + /// @notice Event emitted when pendingAdmin is accepted, which means admin is updated + event NewAdmin(address oldAdmin, address newAdmin); + + /// @notice Event emitted when comptroller is changed + event NewComptroller( + ComptrollerInterface oldComptroller, + ComptrollerInterface newComptroller + ); + + /// @notice Event emitted when interestRateModel is changed + event NewMarketInterestRateModel( + InterestRateModel oldInterestRateModel, + InterestRateModel newInterestRateModel + ); + + /// @notice Event emitted when the reserve factor is changed + event NewReserveFactor( + uint oldReserveFactorMantissa, + uint newReserveFactorMantissa + ); + + /// @notice Event emitted when the protocol seize share is changed + event NewProtocolSeizeShare( + uint oldProtocolSeizeShareMantissa, + uint newProtocolSeizeShareMantissa + ); + + /// @notice Event emitted when the reserves are added + event ReservesAdded( + address benefactor, + uint addAmount, + uint newTotalReserves + ); + + /// @notice Event emitted when the reserves are reduced + event ReservesReduced( + address admin, + uint reduceAmount, + uint newTotalReserves + ); + + /// @notice EIP20 Transfer event + event Transfer(address indexed from, address indexed to, uint amount); + + /// @notice EIP20 Approval event + event Approval(address indexed owner, address indexed spender, uint amount); + + /*** User Interface ***/ + + function transfer(address dst, uint amount) external virtual returns (bool); + function transferFrom( + address src, + address dst, + uint amount + ) external virtual returns (bool); + function approve( + address spender, + uint amount + ) external virtual returns (bool); + function allowance( + address owner, + address spender + ) external view virtual returns (uint); + function balanceOf(address owner) external view virtual returns (uint); + function balanceOfUnderlying(address owner) external virtual returns (uint); + function getAccountSnapshot( + address account + ) external view virtual returns (uint, uint, uint, uint); + function borrowRatePerTimestamp() external view virtual returns (uint); + function supplyRatePerTimestamp() external view virtual returns (uint); + function totalBorrowsCurrent() external virtual returns (uint); + function borrowBalanceCurrent( + address account + ) external virtual returns (uint); + function borrowBalanceStored( + address account + ) external view virtual returns (uint); + function exchangeRateCurrent() external virtual returns (uint); + function exchangeRateStored() external view virtual returns (uint); + function getCash() external view virtual returns (uint); + function accrueInterest() external virtual returns (uint); + function seize( + address liquidator, + address borrower, + uint seizeTokens + ) external virtual returns (uint); + + /*** Admin Functions ***/ + + function _setPendingAdmin( + address payable newPendingAdmin + ) external virtual returns (uint); + function _acceptAdmin() external virtual returns (uint); + function _setComptroller( + ComptrollerInterface newComptroller + ) external virtual returns (uint); + function _setReserveFactor( + uint newReserveFactorMantissa + ) external virtual returns (uint); + function _reduceReserves(uint reduceAmount) external virtual returns (uint); + function _setInterestRateModel( + InterestRateModel newInterestRateModel + ) external virtual returns (uint); + function _setProtocolSeizeShare( + uint newProtocolSeizeShareMantissa + ) external virtual returns (uint); +} + +contract MErc20Storage { + /// @notice Underlying asset for this MToken + address public underlying; +} + +abstract contract MErc20Interface is MErc20Storage { + /*** User Interface ***/ + + function mint(uint mintAmount) external virtual returns (uint); + function mintWithPermit( + uint mintAmount, + uint deadline, + uint8 v, + bytes32 r, + bytes32 s + ) external virtual returns (uint); + function redeem(uint redeemTokens) external virtual returns (uint); + function redeemUnderlying( + uint redeemAmount + ) external virtual returns (uint); + function borrow(uint borrowAmount) external virtual returns (uint); + function repayBorrow(uint repayAmount) external virtual returns (uint); + function repayBorrowBehalf( + address borrower, + uint repayAmount + ) external virtual returns (uint); + function liquidateBorrow( + address borrower, + uint repayAmount, + MTokenInterface mTokenCollateral + ) external virtual returns (uint); + function sweepToken(EIP20NonStandardInterface token) external virtual; + + /*** Admin Functions ***/ + + function _addReserves(uint addAmount) external virtual returns (uint); +} + +contract MDelegationStorage { + /// @notice Implementation address for this contract + address public implementation; +} + +abstract contract MDelegatorInterface is MDelegationStorage { + /// @notice Emitted when implementation is changed + event NewImplementation( + address oldImplementation, + address newImplementation + ); + + /** + * @notice Called by the admin to update the implementation of the delegator + * @param implementation_ The address of the new implementation for delegation + * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation + * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation + */ + function _setImplementation( + address implementation_, + bool allowResign, + bytes memory becomeImplementationData + ) external virtual; +} + +abstract contract MDelegateInterface is MDelegationStorage { + /** + * @notice Called by the delegator on a delegate to initialize it for duty + * @dev Should revert if any issues arise which make it unfit for delegation + * @param data The encoded bytes data for any initialization + */ + function _becomeImplementation(bytes memory data) external virtual; + + /// @notice Called by the delegator on a delegate to forfeit its responsibility + function _resignImplementation() external virtual; +} diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/README.md b/plan/agw/research/preset-expanded-live-2026-10-15/README.md new file mode 100644 index 00000000..3ce2a707 --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/README.md @@ -0,0 +1,59 @@ +# Expanded preset live coverage — October 15, 2026 + +## Results + +All five additional scenarios have passing live coverage: EigenLayer 1/1; the initial multi-chain run 2 passed / 2 failed (Base and Arbitrum ETH resolution); corrected Base/Arbitrum rerun 2/2 passed. This is coverage across focused runs, not one clean five-case invocation. Original failures remain in initial-live.log. No prerequisite was silently skipped as a pass. + +Together with the earlier Sepolia Uniswap/Aave scenarios, all ten currently shipped testnet protocol/chain combinations have at least one positive live flow across seven scenarios: DEXes on all four testnets; Aave on Sepolia/Base/Arbitrum; Moonwell on Base; Venus on BNB; EigenLayer on Sepolia. This does not cover every function/market or mainnet. + +Validation: 2,101 unit tests passed / 12 skipped; 16 local contract tests passed; build, library/spec typechecks, guide, package/import/declaration/API checks and scenario-selection verification passed. Runtime lint has no errors; E2E lint has only non-null-assertion warnings. + +## Scope and checks + +Five additional opt-in scenarios under `agw-presets-expanded`. All transactions originate on Donut and execute on supported testnets. No mainnet transactions or protocol deployments. Each new wallet receives at most 100 PC, plus its fresh agent's configured gas allocation. Wrapped-native cases use 10^12 raw native-token units each. `all` continues to exclude AGW groups. + +Each destination receipt must succeed and contain CEA UniversalTxExecuted events matching the wallet, target and exact call bytes. Token balance changes and protocol shares are checked independently; a successful outer receipt alone is insufficient for Compound-style market calls that can return an error code. + +| Scenario | Destination | Assertions | +| --- | --- | --- | +| EigenLayer | Sepolia | WETH deposit, CEA underlying debit, stakerDepositShares increase | +| Uniswap | Base Sepolia | Receiver and amount rejection, actual swap output, input debit | +| Uniswap + Aave | Arbitrum Sepolia | Swap then supply/withdraw received USDC; exact underlying round trip | +| PancakeSwap + Venus | BNB testnet | Swap then mint/redeem Venus vUSDT; positive shares then zero shares; underlying return within rounding tolerance | +| Aave + Moonwell | Base Sepolia | Faucet LINK/USDbC/mock WETH; Aave supply/withdraw, both Moonwell mint/redeem balances | + +The protocol matrices use generated preset calls/pins unchanged, with bridge assets set to [] for destination-held assets. The owner funds CEAs separately. They do not establish arbitrary PRC20 bridge support, borrow/repay coverage, every market, or mainnet execution. EigenLayer withdrawal and Lido's Hoodi flows are outside current supported testnet routes/catalog scope. + +## Prerequisite investigation + +`probe.cjs` is read-only and records protocol state in `prerequisites.json`. Reads use latest state with an observed starting block, not an atomic snapshot. Initial pinned-block reads gave empty data on Base; fresh reads from publicnode and the Base public endpoint agreed on real V3 pools, so no deployment defect is claimed. Pancake's deployed router points to factory 0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865 on BNB testnet; the older documented testnet factory address had no code. Tests read factory() from the included router. Underlying ERC20 mint probes are not proof of faucet effects; live tests assert actual received balances. + +EigenLayer WETH strategy 0x424246eF71b01ee33aA33aC590fd9a0855F5eFbc is listed in the official README retained in ../preset-catalog-2026-10-15/README.md. Its live underlying is 0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9, whitelist is enabled and deposits are unpaused (eigen-prerequisites.json). + +## SDK defect found and corrected + +Explicit Base/Arbitrum ETH token objects resolved globally by symbol/address and selected Sepolia's PRC20. Omitted native funds already used the correct chain. The real AgenticRuntime now resolves plain token objects against the destination chain, and rejects explicit Push PRC20 references with a different source chain. No public signature changed. Unit reproduction: three failures before the fix, all five cases pass after it. The full unit suite passes 2,101 tests / 12 skipped. + +Initial Base/Arbitrum attempts and subsequent corrected live results are recorded separately. Failed attempts are not counted as passing coverage. Live results and hashes are retained in the evidence file when complete. + +## Run + +From packages/core: + +- `npm run e2e:verify -- --group agw-presets-expanded` — five scenarios select five distinct tests. +- `npm run e2e:preflight -- --group agw-presets-expanded --dry-run` — master balance gate. Wrapped-native cases additionally check their chain's actual PRC20 balance before transfer. +- `npm run e2e:ci -- --group agw-presets-expanded` — serial funded run. + +Focused acceptance runs use Jest's `--testNamePattern` to avoid rebroadcasting already-passing cases. Source test names were made explicit for compatibility with the existing static manifest verifier; the initial run used equivalent parameterized names. + +## Additional redemption checks + +`check-redemptions.cjs` independently replays the three successful market redemption receipts. It verifies that all minted shares were redeemed, no shares remain, and the protocol's emitted redeemAmount exactly equals the CEA's underlying balance. These stronger event checks were also added to the E2E assertions and typechecked; they were validated against the already-completed real receipts without funding duplicate redemptions. Venus uses a four-field Redeem event; Moonwell uses three fields, as confirmed in the retained protocol interfaces. + +Observed raw returns: Venus USDT 3,360 (from 3,361 supplied), Moonwell USDbC 9,999 (from 10,000), Moonwell WETH 999,943,876,358 (from 1,000,000,000,000). The tests allow bounded share-rounding loss, and the replay proves full redemption of the position rather than merely an approximately restored balance. See redemptions.json. + +Protocol interface sources: +- https://raw.githubusercontent.com/moonwell-fi/moonwell-contracts-v2/main/src/MTokenInterfaces.sol +- https://raw.githubusercontent.com/VenusProtocol/venus-protocol/develop/contracts/Tokens/VTokens/VTokenInterfaces.sol + +Uniswap Base official source: https://developers.uniswap.org/docs/protocols/v3/deployments/v3-base-deployments. Fresh RPC checks, not just address listings, were used before swaps. diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/VTokenInterfaces.sol b/plan/agw/research/preset-expanded-live-2026-10-15/VTokenInterfaces.sol new file mode 100644 index 00000000..792e3873 --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/VTokenInterfaces.sol @@ -0,0 +1,484 @@ +// SPDX-License-Identifier: BSD-3-Clause + +pragma solidity 0.8.25; + +import { ComptrollerInterface } from "../../Comptroller/ComptrollerInterface.sol"; +import { InterestRateModelV8 } from "../../InterestRateModels/InterestRateModelV8.sol"; + +contract VTokenStorageBase { + /** + * @notice Container for borrow balance information + * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action + * @member interestIndex Global borrowIndex as of the most recent balance-changing action + */ + struct BorrowSnapshot { + uint principal; + uint interestIndex; + } + + /** + * @dev Guard variable for re-entrancy checks + */ + bool internal _notEntered; + + /** + * @notice EIP-20 token name for this token + */ + string public name; + + /** + * @notice EIP-20 token symbol for this token + */ + string public symbol; + + /** + * @notice EIP-20 token decimals for this token + */ + uint8 public decimals; + + /** + * @notice Maximum borrow rate that can ever be applied (.0005% / block) + */ + + uint internal constant borrowRateMaxMantissa = 0.0005e16; + + /** + * @notice Maximum fraction of interest that can be set aside for reserves + */ + uint internal constant reserveFactorMaxMantissa = 1e18; + + /** + * @notice Administrator for this contract + */ + address payable public admin; + + /** + * @notice Pending administrator for this contract + */ + address payable public pendingAdmin; + + /** + * @notice Contract which oversees inter-vToken operations + */ + ComptrollerInterface public comptroller; + + /** + * @notice Model which tells what the current interest rate should be + */ + InterestRateModelV8 public interestRateModel; + + /** + * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0) + */ + uint internal initialExchangeRateMantissa; + + /** + * @notice Fraction of interest currently set aside for reserves + */ + uint public reserveFactorMantissa; + + /** + * @notice Block number that interest was last accrued at + */ + uint public accrualBlockNumber; + + /** + * @notice Accumulator of the total earned interest rate since the opening of the market + */ + uint public borrowIndex; + + /** + * @notice Total amount of outstanding borrows of the underlying in this market + */ + uint public totalBorrows; + + /** + * @notice Total amount of reserves of the underlying held in this market + */ + uint public totalReserves; + + /** + * @notice Total number of tokens in circulation + */ + uint public totalSupply; + + /** + * @notice Official record of token balances for each account + */ + mapping(address => uint) internal accountTokens; + + /** + * @notice Approved token transfer amounts on behalf of others + */ + mapping(address => mapping(address => uint)) internal transferAllowances; + + /** + * @notice Mapping of account addresses to outstanding borrow balances + */ + mapping(address => BorrowSnapshot) internal accountBorrows; + + /** + * @notice Underlying asset for this VToken + */ + address public underlying; + + /** + * @notice Implementation address for this contract + */ + address public implementation; + + /** + * @notice delta block after which reserves will be reduced + */ + uint public reduceReservesBlockDelta; + + /** + * @notice last block number at which reserves were reduced + */ + uint public reduceReservesBlockNumber; + + /** + * @notice address of protocol share reserve contract + */ + address payable public protocolShareReserve; + + /** + * @notice address of accessControlManager + */ + + address public accessControlManager; +} + +contract VTokenStorage is VTokenStorageBase { + /** + * @notice flashLoan is enabled for this market or not + */ + bool public isFlashLoanEnabled; + + /** + * @notice total fee percentage collected on flashLoan (scaled by 1e18) + */ + uint256 public flashLoanFeeMantissa; + + /** + * @notice fee percentage of flashLoan that goes to protocol (scaled by 1e18) + */ + uint256 public flashLoanProtocolShareMantissa; + + /** + * @notice Amount of flashLoan taken by the receiver + * @dev This is used to track the amount of flashLoan taken to correctly calculate the exchange rate + * during the flashLoan process. It is added to the total cash when calculating the exchange rate. + */ + uint256 public flashLoanAmount; + + /** + * @notice Tracked internal cash balance, immune to direct token transfers (donation attacks) + * @dev Updated only via doTransferIn/doTransferOut. Must be initialized via sweepTokenAndSync() after upgrade. + */ + uint256 public internalCash; + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[45] private __gap; +} + +abstract contract VTokenInterface is VTokenStorage { + /** + * @notice Indicator that this is a vToken contract (for inspection) + */ + bool public constant isVToken = true; + + /*** Market Events ***/ + + /** + * @notice Event emitted when interest is accrued + */ + event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows); + + /** + * @notice Event emitted when tokens are minted + */ + event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply); + + /** + * @notice Event emitted when tokens are minted behalf by payer to receiver + */ + event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply); + + /** + * @notice Event emitted when tokens are redeemed + */ + event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply); + + /** + * @notice Event emitted when tokens are redeemed and fee is transferred + */ + event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens); + + /** + * @notice Event emitted when underlying is borrowed + */ + event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows); + + /** + * @notice Event emitted when a borrow is repaid + */ + event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows); + + /** + * @notice Event emitted when a borrow is liquidated + */ + event LiquidateBorrow( + address liquidator, + address borrower, + uint repayAmount, + address vTokenCollateral, + uint seizeTokens + ); + + /*** Admin Events ***/ + + /** + * @notice Event emitted when pendingAdmin is changed + */ + event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin); + + /** + * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated + */ + event NewAdmin(address oldAdmin, address newAdmin); + + /** + * @notice Event emitted when comptroller is changed + */ + event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller); + + /** + * @notice Event emitted when interestRateModel is changed + */ + event NewMarketInterestRateModel( + InterestRateModelV8 oldInterestRateModel, + InterestRateModelV8 newInterestRateModel + ); + + /** + * @notice Event emitted when the reserve factor is changed + */ + event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa); + + /** + * @notice Event emitted when the reserves are added + */ + event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves); + + /** + * @notice Event emitted when the reserves are reduced + */ + event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves); + + /** + * @notice EIP20 Transfer event + */ + event Transfer(address indexed from, address indexed to, uint amount); + + /** + * @notice EIP20 Approval event + */ + event Approval(address indexed owner, address indexed spender, uint amount); + + /** + * @notice Event emitted when block delta for reduce reserves get updated + */ + event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta); + + /** + * @notice Event emitted when address of ProtocolShareReserve contract get updated + */ + event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve); + + /** + * @notice Emitted when access control address is changed by admin + */ + event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress); + + /** + * @notice Event emitted when flashLoanEnabled status is changed + */ + event FlashLoanStatusChanged(bool previousStatus, bool newStatus); + + /** + * @notice Event emitted when asset is transferred to receiver + */ + event TransferOutUnderlyingFlashLoan(address asset, address receiver, uint256 amount); + + /** + * @notice Event emitted when asset is transferred from sender and verified + */ + event TransferInUnderlyingFlashLoan( + address indexed asset, + address indexed sender, + uint256 amount, + uint256 totalFee, + uint256 protocolFee + ); + + /** + * @notice Event emitted when internalCash is synced with actual token balance + */ + event CashSynced(uint256 oldInternalCash, uint256 newInternalCash); + + /** + * @notice Event emitted when excess tokens are swept by admin + */ + event TokenSwept(address indexed recipient, uint256 amount); + + /** + * @notice Event emitted when flashLoan fee mantissa is updated + */ + event FlashLoanFeeUpdated( + uint256 oldFlashLoanFeeMantissa, + uint256 newFlashLoanFeeMantissa, + uint256 oldFlashLoanProtocolShare, + uint256 newFlashLoanProtocolShare + ); + + // @notice Thrown when comptroller is not valid + error InvalidComptroller(); + + // @notice Thrown when there is already an active flashLoan + error FlashLoanAlreadyActive(); + + /// @notice Thrown when flash loan fee exceeds maximum allowed + error FlashLoanFeeTooHigh(uint256 fee, uint256 maxFee); + + /// @notice Thrown when flash loan fee protocol share exceeds maximum allowed + error FlashLoanProtocolShareTooHigh(uint256 fee, uint256 maxFee); + + // @notice Thrown when the vToken does not have enough cash to lend + error InsufficientCash(); + + /// @notice Thrown when the repayment amount is insufficient to cover the total fee + error InsufficientRepayment(uint256 actualAmount, uint256 requiredTotalFee); + + /// @notice Thrown when interest accrual fails; errorCode is the underlying Error code + error AccrueInterestFailed(uint256 errorCode); + + /*** User Interface ***/ + + function transfer(address dst, uint amount) external virtual returns (bool); + + function transferFrom(address src, address dst, uint amount) external virtual returns (bool); + + function approve(address spender, uint amount) external virtual returns (bool); + + function balanceOfUnderlying(address owner) external virtual returns (uint); + + function totalBorrowsCurrent() external virtual returns (uint); + + function borrowBalanceCurrent(address account) external virtual returns (uint); + + function seize(address liquidator, address borrower, uint seizeTokens) external virtual returns (uint); + + /*** Admin Function ***/ + function _setPendingAdmin(address payable newPendingAdmin) external virtual returns (uint); + + /*** Admin Function ***/ + function _acceptAdmin() external virtual returns (uint); + + /*** Admin Function ***/ + function _setReserveFactor(uint newReserveFactorMantissa) external virtual returns (uint); + + /*** Admin Function ***/ + function _reduceReserves(uint reduceAmount) external virtual returns (uint); + + function balanceOf(address owner) external view virtual returns (uint); + + function allowance(address owner, address spender) external view virtual returns (uint); + + function getAccountSnapshot(address account) external view virtual returns (uint, uint, uint, uint); + + function borrowRatePerBlock() external view virtual returns (uint); + + function supplyRatePerBlock() external view virtual returns (uint); + + function getCash() external view virtual returns (uint); + + function exchangeRateCurrent() public virtual returns (uint); + + function accrueInterest() public virtual returns (uint); + + /*** Admin Function ***/ + function _setComptroller(ComptrollerInterface newComptroller) public virtual returns (uint); + + /*** Admin Function ***/ + function _setInterestRateModel(InterestRateModelV8 newInterestRateModel) public virtual returns (uint); + + function borrowBalanceStored(address account) public view virtual returns (uint); + + function exchangeRateStored() public view virtual returns (uint); +} + +interface VBep20Interface { + /*** User Interface ***/ + + function mint(uint mintAmount) external returns (uint); + + function mintBehalf(address receiver, uint mintAmount) external returns (uint); + + function redeem(uint redeemTokens) external returns (uint); + + function redeemUnderlying(uint redeemAmount) external returns (uint); + + function borrow(uint borrowAmount) external returns (uint); + + function repayBorrow(uint repayAmount) external returns (uint); + + function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint); + + function liquidateBorrow( + address borrower, + uint repayAmount, + VTokenInterface vTokenCollateral + ) external returns (uint); + + /*** Admin Functions ***/ + + function _addReserves(uint addAmount) external returns (uint); +} + +interface VDelegatorInterface { + /** + * @notice Emitted when implementation is changed + */ + event NewImplementation(address oldImplementation, address newImplementation); + + /** + * @notice Called by the admin to update the implementation of the delegator + * @param implementation_ The address of the new implementation for delegation + * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation + * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation + */ + function _setImplementation( + address implementation_, + bool allowResign, + bytes memory becomeImplementationData + ) external; +} + +interface VDelegateInterface { + /** + * @notice Called by the delegator on a delegate to initialize it for duty + * @dev Should revert if any issues arise which make it unfit for delegation + * @param data The encoded bytes data for any initialization + */ + function _becomeImplementation(bytes memory data) external; + + /** + * @notice Called by the delegator on a delegate to forfeit its responsibility + */ + function _resignImplementation() external; +} diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/api.json b/plan/agw/research/preset-expanded-live-2026-10-15/api.json new file mode 100644 index 00000000..9557b2b2 --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/api.json @@ -0,0 +1,11537 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "1f74e891c6f84f9c8bfc183c5e3d20d06e30ab48", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [ + "AgenticPresets", + "ArgumentPath", + "DecodedSolanaRule", + "Pin", + "Preset", + "PresetAsset", + "PresetCategory", + "PresetOptions", + "PresetRuleTemplate", + "ReadyPresetOptions", + "RuleInput", + "Spent", + "WalletMarker" + ], + "removedExports": [ + "AgenticNetworkConstants", + "NativeRule", + "UniversalRule" + ], + "changedAgwTypes": [ + "AgenticWallet", + "AgenticError", + "AgenticRevertError", + "AGENTIC_ERROR_CODE", + "Rule", + "RuleInput", + "Pin", + "Spent", + "NativeRule", + "AssetCap", + "AllowedCall", + "UniversalRule", + "RulesRecord", + "CreateOptions", + "AgenticTxMetadata" + ], + "publicTypeChanges": [ + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticRevertError", + "AgenticErrorCode", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "CreateOptions", + "DecodedSolanaRule", + "Rule", + "RuleInput", + "Pin", + "Spent", + "WalletMarker", + "ArgumentPath", + "RulesRecord", + "Preset", + "PresetCategory", + "PresetAsset", + "PresetOptions", + "ReadyPresetOptions", + "PresetRuleTemplate", + "AgenticPresets" + ], + "transactionMethodChanges": [], + "instanceMethodChanges": [], + "agwConstantsChanged": true, + "before": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address(token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }): {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "after": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticPresets", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "ArgumentPath", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DecodedSolanaRule", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "Pin", + "PreparedRead", + "PreparedUniversalTx", + "Preset", + "PresetAsset", + "PresetCategory", + "PresetOptions", + "PresetRuleTemplate", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReadyPresetOptions", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RuleInput", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "Spent", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletMarker", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n delete(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n delete(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly DELETE_NEEDS_TARGET: \"DELETE_NEEDS_TARGET\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "DELETE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"DELETE_NEEDS_TARGET\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RuleInput": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[] | import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Pin": { + "type": "{\n account: number;\n arg?: never;\n expected: \"agentic:wallet\" | string;\n max?: never;\n token?: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected: \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint;\n max?: never;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected?: never;\n max: bigint;\n}", + "members": { + "account": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "arg": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath | undefined" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "bigint | string | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "Spent": { + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"native\" | \"universal\"" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall", + "members": { + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Pin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "spent": { + "optional": false, + "readonly": false, + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly DELETE_NEEDS_TARGET: \"DELETE_NEEDS_TARGET\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "DELETE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"DELETE_NEEDS_TARGET\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n delete(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n delete(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall", + "members": { + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Pin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "DecodedSolanaRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[]" + }, + "ceaAccounts": { + "optional": false, + "readonly": false, + "type": "readonly `0x${string}`[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`solana:${string}`" + }, + "dataPins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmDataPinWire[]" + }, + "expectedCEA": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "format": { + "optional": false, + "readonly": false, + "type": "\"decoded\"" + }, + "gatewayProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmAccountPinWire[]" + }, + "programs": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").AllowedProgramWire[]" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RuleInput": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[] | import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Pin": { + "type": "{\n account: number;\n arg?: never;\n expected: \"agentic:wallet\" | string;\n max?: never;\n token?: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected: \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint;\n max?: never;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected?: never;\n max: bigint;\n}", + "members": { + "account": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "arg": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath | undefined" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "bigint | string | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "Spent": { + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"native\" | \"universal\"" + } + } + }, + "WalletMarker": { + "type": "\"agentic:wallet\"", + "members": {} + }, + "ArgumentPath": { + "type": "number | readonly number[]", + "members": {} + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "spent": { + "optional": false, + "readonly": false, + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + }, + "Preset": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").Preset", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace[]" + }, + "constant": { + "optional": false, + "readonly": false, + "type": "\"DEXES\" | \"LENDING\" | \"PREDICTION\" | \"STAKING\"" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"CATEGORY\"" + } + } + }, + "PresetCategory": { + "type": "\"DEXES\" | \"LENDING\" | \"PREDICTION\" | \"STAKING\"", + "members": {} + }, + "PresetAsset": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "PresetOptions": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetOptions", + "members": { + "agent": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadyPresetOptions": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").ReadyPresetOptions", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PresetRuleTemplate": { + "type": "{\n agent?: `0x${string}`;\n validUntil?: number;\n} & Omit", + "members": { + "agent": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "AgenticPresets": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").AgenticPresets", + "members": { + "get": { + "optional": false, + "readonly": false, + "type": "{\n (preset: import(\"sdk/src/lib/agentic/presets/types\").PresetCategory, options: import(\"sdk/src/lib/agentic/presets/types\").ReadyPresetOptions): {\n rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[];\n };\n (preset: import(\"sdk/src/lib/agentic/presets/types\").PresetCategory, options?: import(\"sdk/src/lib/agentic/presets/types\").PresetOptions): {\n rules: import(\"sdk/src/lib/agentic/presets/types\").PresetRuleTemplate[];\n };\n}" + }, + "list": { + "optional": false, + "readonly": false, + "type": "(options?: {\n type?: \"CATEGORY\";\n}) => {\n presets: import(\"sdk/src/lib/agentic/presets/types\").Preset[];\n}" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly<{\n PRESETS: Readonly<{\n CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n }>;\n WALLET: \"agentic:wallet\";\n }>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": true, + "type": "{\n readonly presets: import(\"sdk/src/lib/agentic/presets/types\").AgenticPresets;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address: (token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "PRESETS": { + "optional": false, + "readonly": true, + "type": "{\n readonly CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n}" + }, + "WALLET": { + "optional": false, + "readonly": true, + "type": "\"agentic:wallet\"" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly PRESETS: Readonly<{\n CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n }>;\n readonly WALLET: \"agentic:wallet\";\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "scope": "All root exports and declared public members, PushChain static/instance members, universal transaction methods, utility groups, readonly/optional markers and constants. Behavior/default/deployment changes need the written session review." +} diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/base-arbitrum-fixed-live.log b/plan/agw/research/preset-expanded-live-2026-10-15/base-arbitrum-fixed-live.log new file mode 100644 index 00000000..62a068a9 --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/base-arbitrum-fixed-live.log @@ -0,0 +1,14 @@ +PASS core-e2e __e2e__/agw/presets-expanded-live.spec.ts (493.47 s) + agw presets expanded + ✓ 2. DEX swap on eip155:84532 (188470 ms) + ✓ 3. DEX swap and Aave round trip on eip155:421614 (302405 ms) + ○ skipped 1. EigenLayer Sepolia deposit credits shares to the wallet + ○ skipped 4. DEX swap and Venus round trip on eip155:97 + ○ skipped 5. Base Aave and both Moonwell markets supply and redeem wallet positions + +Test Suites: 1 passed, 1 total +Tests: 3 skipped, 2 passed, 5 total +Snapshots: 0 total +Time: 493.525 s +Ran all test suites within paths "__e2e__/agw/presets-expanded-live.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/build.log b/plan/agw/research/preset-expanded-live-2026-10-15/build.log new file mode 100644 index 00000000..0c276d11 --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/build.log @@ -0,0 +1,13 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:36080) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core + + diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/check-redemptions.cjs b/plan/agw/research/preset-expanded-live-2026-10-15/check-redemptions.cjs new file mode 100644 index 00000000..4f48cef5 --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/check-redemptions.cjs @@ -0,0 +1,11 @@ +// Read-only receipt and balance checks; no keys loaded. +const fs=require('fs');const {createPublicClient,http,parseAbi,parseEventLogs,erc20Abi}=require(process.cwd()+'/node_modules/viem'); +const events=fs.readFileSync('packages/core/e2e-logs/agw-evidence.jsonl','utf8').trim().split('\n').map(JSON.parse); +const last=n=>events.filter(x=>x.name===n).at(-1); +const venus=last('preset-expanded-venus'),base=last('preset-expanded-base-lending'); +const cases=[ +{chain:'eip155:97',rpc:'https://bsc-testnet-rpc.publicnode.com',wallet:venus.wallet,cea:venus.cea,expectedShares:venus.shares,stage:'venus-redeem-completed',market:'0xb7526572FFE56AB9D7489838Bf2E18e3323b441A',underlying:'0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c'}, +{chain:'eip155:84532',rpc:'https://base-sepolia-rpc.publicnode.com',wallet:base.wallet,cea:base.cea,expectedShares:base.sharesUSDBC,stage:'lending-withdraw-completed',market:'0x876852425331a113d8E432eFFB3aC5BEf38f033a',underlying:'0x4616975f7E6045FD9737e95bC527e9e14c727BD2'}, +{chain:'eip155:84532',rpc:'https://base-sepolia-rpc.publicnode.com',wallet:base.wallet,cea:base.cea,expectedShares:base.sharesWETH,stage:'lending-withdraw-completed',market:'0x2F39a349A79492a70E152760ce7123A1933eCf28',underlying:'0x663A6F02d547dFd639BF689FED298712f2FB69Fb'}, +]; +(async()=>{const result=await Promise.all(cases.map(async x=>{const c=createPublicClient({transport:http(x.rpc)});const stage=events.find(e=>e.wallet===x.wallet&&e.stage===x.stage);const r=await c.getTransactionReceipt({hash:stage.externalTx});const redeemed=parseEventLogs({abi:parseAbi(['event Redeem(address redeemer,uint256 redeemAmount,uint256 redeemTokens)', 'event Redeem(address redeemer,uint256 redeemAmount,uint256 redeemTokens,uint256 totalSupply)']),logs:r.logs}).find(e=>e.address.toLowerCase()===x.market.toLowerCase()&&e.args.redeemer.toLowerCase()===x.cea.toLowerCase());if(!redeemed)throw Error('Missing Redeem event');if(redeemed.args.redeemTokens!==BigInt(x.expectedShares))throw Error('Redeemed shares differ from minted shares');const balance=await c.readContract({address:x.underlying,abi:erc20Abi,functionName:'balanceOf',args:[x.cea]});const shares=await c.readContract({address:x.market,abi:erc20Abi,functionName:'balanceOf',args:[x.cea]});if(balance!==redeemed.args.redeemAmount||shares!==0n)throw Error('Balance does not match redeemed amount / shares remain');return{...x,tx:stage.externalTx,block:String(r.blockNumber),redeemAmount:String(balance),redeemedShares:String(redeemed.args.redeemTokens),remainingShares:String(shares)};}));fs.writeFileSync('plan/agw/research/preset-expanded-live-2026-10-15/redemptions.json',JSON.stringify(result,null,2)+'\n');console.log(result.map(x=>({chain:x.chain,market:x.market,redeemAmount:x.redeemAmount,remainingShares:x.remainingShares})));})().catch(e=>{console.error(e.shortMessage||e.message);process.exitCode=1;}); diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/e2e-lint.log b/plan/agw/research/preset-expanded-live-2026-10-15/e2e-lint.log new file mode 100644 index 00000000..f0c407b5 --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/e2e-lint.log @@ -0,0 +1,10 @@ + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/presets-expanded-live.spec.ts + 440:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 487:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 570:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 572:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 574:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +✖ 5 problems (0 errors, 5 warnings) + diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/eigen-live.log b/plan/agw/research/preset-expanded-live-2026-10-15/eigen-live.log new file mode 100644 index 00000000..b5e5bc27 --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/eigen-live.log @@ -0,0 +1,10 @@ +PASS core-e2e __e2e__/agw/presets-expanded-live.spec.ts (175.399 s) + agw presets expanded + ✓ 1. EigenLayer Sepolia deposit credits shares to the wallet (174162 ms) + +Test Suites: 1 passed, 1 total +Tests: 1 passed, 1 total +Snapshots: 0 total +Time: 175.423 s +Ran all test suites within paths "__e2e__/agw/presets-expanded-live.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/eigen-prerequisites.json b/plan/agw/research/preset-expanded-live-2026-10-15/eigen-prerequisites.json new file mode 100644 index 00000000..a55e3d9f --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/eigen-prerequisites.json @@ -0,0 +1,9 @@ +{ + "block": "11917418", + "strategy": "0x424246eF71b01ee33aA33aC590fd9a0855F5eFbc", + "manager": "0x2E3D6c0744b10eb0A4e6F679F71554a39Ec47a5D", + "underlying": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "whitelisted": true, + "paused": "0", + "wrap": "ok" +} diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/initial-live.log b/plan/agw/research/preset-expanded-live-2026-10-15/initial-live.log new file mode 100644 index 00000000..f7fc1458 --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/initial-live.log @@ -0,0 +1,48 @@ +FAIL core-e2e __e2e__/agw/presets-expanded-live.spec.ts (602.662 s) + agw presets expanded + ✕ 2 DEX swap on eip155:84532 and matching lending round trip where available (41322 ms) + ✕ 3 DEX swap on eip155:421614 and matching lending round trip where available (38665 ms) + ✓ 4 DEX swap on eip155:97 and matching lending round trip where available (303120 ms) + ✓ 5. Base Aave and both Moonwell markets supply and redeem wallet positions (218165 ms) + ○ skipped 1. EigenLayer Sepolia deposit credits shares to the wallet + + ● agw presets expanded › 2 DEX swap on eip155:84532 and matching lending round trip where available + + AgenticError: wallet 0x075524ed04cFa47f28e2e79641c93dc3aDAFeE57 holds 0 of 0x2971824Db68229D087931155C2b8bB820B275809; this outbound burns 1000000000000 + + 275 | } + 276 | if (tokenBalance < out.amount) { + > 277 | throw new AgenticError( + | ^ + 278 | AGENTIC_ERROR_CODE.WALLET_BALANCE_INSUFFICIENT, + 279 | `wallet ${wallet} holds ${tokenBalance} of ${out.token}; this outbound burns ${out.amount}` + 280 | ); + + at agenticSend (src/lib/agentic/execution/send.ts:277:13) + at async send (__e2e__/agw/presets-expanded-live.spec.ts:130:14) + at async wrap (__e2e__/agw/presets-expanded-live.spec.ts:208:3) + at async /Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/presets-expanded-live.spec.ts:366:7 + + ● agw presets expanded › 3 DEX swap on eip155:421614 and matching lending round trip where available + + AgenticError: wallet 0x9Cb7c388E67A94f40aDeFdbF8b09a93a3Bedeb63 holds 0 of 0x2971824Db68229D087931155C2b8bB820B275809; this outbound burns 1000000000000 + + 275 | } + 276 | if (tokenBalance < out.amount) { + > 277 | throw new AgenticError( + | ^ + 278 | AGENTIC_ERROR_CODE.WALLET_BALANCE_INSUFFICIENT, + 279 | `wallet ${wallet} holds ${tokenBalance} of ${out.token}; this outbound burns ${out.amount}` + 280 | ); + + at agenticSend (src/lib/agentic/execution/send.ts:277:13) + at async send (__e2e__/agw/presets-expanded-live.spec.ts:130:14) + at async wrap (__e2e__/agw/presets-expanded-live.spec.ts:208:3) + at async /Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/presets-expanded-live.spec.ts:366:7 + +Test Suites: 1 failed, 1 total +Tests: 2 failed, 1 skipped, 2 passed, 5 total +Snapshots: 0 total +Time: 602.684 s +Ran all test suites within paths "__e2e__/agw/presets-expanded-live.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/live-evidence.jsonl b/plan/agw/research/preset-expanded-live-2026-10-15/live-evidence.jsonl new file mode 100644 index 00000000..6478cb1c --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/live-evidence.jsonl @@ -0,0 +1,44 @@ +{"name": "preset-expanded-wallet", "at": "2026-10-15T02:28:28.946Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "label": "e2e-preset-eigen", "chain": "eip155:11155111", "wallet": "0x14BA212b2079843dE5a1569A3e774237C46971A6", "cea": "0x5Cd0C01Aca68A6Ac8640Bd7373Fb6Ffa5d152564", "rulesId": "0x6dcb90ae819b47920f0c2beeb12f2c17c5b9760897de26db5e078966c76c723a"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:28:41.265Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:11155111", "wallet": "0x14BA212b2079843dE5a1569A3e774237C46971A6", "cea": "0x5Cd0C01Aca68A6Ac8640Bd7373Fb6Ffa5d152564", "stage": "wrap-submitted", "pushTx": "0x6ba0740bcb04790b7ff9d1749e808c7ae3dd181c6ca6622d6e98483911ae9962"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:29:42.350Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:11155111", "wallet": "0x14BA212b2079843dE5a1569A3e774237C46971A6", "cea": "0x5Cd0C01Aca68A6Ac8640Bd7373Fb6Ffa5d152564", "stage": "wrap-completed", "pushTx": "0x6ba0740bcb04790b7ff9d1749e808c7ae3dd181c6ca6622d6e98483911ae9962", "externalTx": "0xc03555c7e6f8d854d137ee06ced983f02b752109b03f70ff83edfc919d1eb049", "status": "success"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:29:51.095Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:11155111", "wallet": "0x14BA212b2079843dE5a1569A3e774237C46971A6", "cea": "0x5Cd0C01Aca68A6Ac8640Bd7373Fb6Ffa5d152564", "stage": "eigen-deposit-submitted", "pushTx": "0xd6bb903bbd0b2ca7219fc823c0b025fa76be3a691d711969053f678f28452df8"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:30:52.565Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:11155111", "wallet": "0x14BA212b2079843dE5a1569A3e774237C46971A6", "cea": "0x5Cd0C01Aca68A6Ac8640Bd7373Fb6Ffa5d152564", "stage": "eigen-deposit-completed", "pushTx": "0xd6bb903bbd0b2ca7219fc823c0b025fa76be3a691d711969053f678f28452df8", "externalTx": "0x0c449911eb4dbaec980af7977fc559097b25a31cb963a659baa81887c6b95646", "status": "success"} +{"name": "preset-eigen-live", "at": "2026-10-15T02:30:52.840Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "wallet": "0x14BA212b2079843dE5a1569A3e774237C46971A6", "cea": "0x5Cd0C01Aca68A6Ac8640Bd7373Fb6Ffa5d152564", "strategy": "0x424246eF71b01ee33aA33aC590fd9a0855F5eFbc", "amount": "1000000000000", "shares": "1000000000000"} +{"name": "preset-expanded-wallet", "at": "2026-10-15T02:31:06.236Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "label": "e2e-preset-dex-eip155:84532", "chain": "eip155:84532", "wallet": "0x075524ed04cFa47f28e2e79641c93dc3aDAFeE57", "cea": "0xBbaA46648c80211a28683F0A5Db819eAe2Aef7f3", "rulesId": "0x9637c535f543a944252d90121392030c30e374696519d255b676b6cdd029ec6e"} +{"name": "preset-expanded-wallet", "at": "2026-10-15T02:31:45.074Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "label": "e2e-preset-dex-eip155:421614", "chain": "eip155:421614", "wallet": "0x9Cb7c388E67A94f40aDeFdbF8b09a93a3Bedeb63", "cea": "0xeb77d934Ed96018dC7c49dD822bc1d8dfe54fB10", "rulesId": "0x135bd125886df267055ef9f828dbb2438b9fa41c237cfb21f05954d16673efa0"} +{"name": "preset-expanded-wallet", "at": "2026-10-15T02:32:23.253Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "label": "e2e-preset-dex-eip155:97", "chain": "eip155:97", "wallet": "0xce76840d3ee4579217D5F2de1d3767b7EAe54605", "cea": "0x3c0a4e2f349059D5d1309d0f57871b1b9a4E1192", "rulesId": "0xa547377731a0265ee2ff0b6d7487d62f5809786f40d6456b18bada4f1e6359e8"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:32:39.150Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:97", "wallet": "0xce76840d3ee4579217D5F2de1d3767b7EAe54605", "cea": "0x3c0a4e2f349059D5d1309d0f57871b1b9a4E1192", "stage": "wrap-submitted", "pushTx": "0x47035167e0106f9b71af4f5ded6e0a27e11293615d847390ad8b2981e25f4120"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:33:26.061Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:97", "wallet": "0xce76840d3ee4579217D5F2de1d3767b7EAe54605", "cea": "0x3c0a4e2f349059D5d1309d0f57871b1b9a4E1192", "stage": "wrap-completed", "pushTx": "0x47035167e0106f9b71af4f5ded6e0a27e11293615d847390ad8b2981e25f4120", "externalTx": "0x9bdfe6e595cd4e2decca63c5065a690015c4d70d9646e5c537fbf6cabf8bb651", "status": "success"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:33:39.236Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:97", "wallet": "0xce76840d3ee4579217D5F2de1d3767b7EAe54605", "cea": "0x3c0a4e2f349059D5d1309d0f57871b1b9a4E1192", "stage": "dex-swap-submitted", "pushTx": "0x9d8fab2f61db2c007e312330165f5bd82a30c53d2a5d63d011b8c01ffcc80f8e"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:34:36.803Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:97", "wallet": "0xce76840d3ee4579217D5F2de1d3767b7EAe54605", "cea": "0x3c0a4e2f349059D5d1309d0f57871b1b9a4E1192", "stage": "dex-swap-completed", "pushTx": "0x9d8fab2f61db2c007e312330165f5bd82a30c53d2a5d63d011b8c01ffcc80f8e", "externalTx": "0x8756031cb1f023066d5b57e9c059ee1beb729666724c509a444d927a7668f3cc", "status": "success"} +{"name": "preset-expanded-dex", "at": "2026-10-15T02:34:37.071Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:97", "wallet": "0xce76840d3ee4579217D5F2de1d3767b7EAe54605", "cea": "0x3c0a4e2f349059D5d1309d0f57871b1b9a4E1192", "pool": "0xCed0844e421F856D2de472F9e7037f873987887C", "router": "0x9a489505a00cE272eAa5e07Dba6491314CaE3796", "amountIn": "1000000000000", "amountOut": "3361"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:34:55.563Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:97", "wallet": "0xce76840d3ee4579217D5F2de1d3767b7EAe54605", "cea": "0x3c0a4e2f349059D5d1309d0f57871b1b9a4E1192", "stage": "venus-mint-submitted", "pushTx": "0xac44b8931e28aa5e06a2bd8c9f06f9a94f7bcb21ea1b70dd18e9c5f275a0d563"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:35:56.666Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:97", "wallet": "0xce76840d3ee4579217D5F2de1d3767b7EAe54605", "cea": "0x3c0a4e2f349059D5d1309d0f57871b1b9a4E1192", "stage": "venus-mint-completed", "pushTx": "0xac44b8931e28aa5e06a2bd8c9f06f9a94f7bcb21ea1b70dd18e9c5f275a0d563", "externalTx": "0x7e647b624e05ef0b4bf31e492e3ccb40af7e1b938cab49f0a52d48181746927d", "status": "success"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:36:03.250Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:97", "wallet": "0xce76840d3ee4579217D5F2de1d3767b7EAe54605", "cea": "0x3c0a4e2f349059D5d1309d0f57871b1b9a4E1192", "stage": "venus-redeem-submitted", "pushTx": "0xe92a338ededec7a88b5740478440bf4e3e2249214912e30159ca943c22238077"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:36:53.420Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:97", "wallet": "0xce76840d3ee4579217D5F2de1d3767b7EAe54605", "cea": "0x3c0a4e2f349059D5d1309d0f57871b1b9a4E1192", "stage": "venus-redeem-completed", "pushTx": "0xe92a338ededec7a88b5740478440bf4e3e2249214912e30159ca943c22238077", "externalTx": "0xc7ab68b6f72171c83a2ec5cce9c3a0df66a53be60e3f46e9a2d4a6c49f25c4e0", "status": "success"} +{"name": "preset-expanded-venus", "at": "2026-10-15T02:36:53.699Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:97", "wallet": "0xce76840d3ee4579217D5F2de1d3767b7EAe54605", "cea": "0x3c0a4e2f349059D5d1309d0f57871b1b9a4E1192", "deposited": "3361", "redeemed": "3360", "shares": "16740010", "asset": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c"} +{"name": "preset-expanded-wallet", "at": "2026-10-15T02:37:29.408Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "label": "e2e-preset-base-lending", "chain": "eip155:84532", "wallet": "0xF3445c8d5557Fab0519dA9c75eaB2B995F42B32f", "cea": "0xe37A1890878CEF71210Be37fae802e234E55eD44", "rulesId": "0xba1a524fc6b81b15581ae23ff882878bd76acd3f81c44c4000e172277bb63aaa"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:37:33.691Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:84532", "wallet": "0xF3445c8d5557Fab0519dA9c75eaB2B995F42B32f", "cea": "0xe37A1890878CEF71210Be37fae802e234E55eD44", "stage": "faucets-submitted", "pushTx": "0x637f532d9b18fbc9437c8ac487523c10249ecd03c5d7dcf1e397d51acd101a8b"} +{"name": "preset-expanded-wallet", "at": "2026-10-15T02:38:22.129Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "label": "e2e-preset-dex-eip155:84532", "chain": "eip155:84532", "wallet": "0x10a330D3FBe1694D78D0DeC0786376B9b82DE6BE", "cea": "0xDC28da449E1fC2e1e59AD25a39D9f044314938fD", "rulesId": "0x7169bc5a5be42589339fbb27afaed1b099c3d19ca8661c93d3c15671721c200d"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:38:27.499Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:84532", "wallet": "0xF3445c8d5557Fab0519dA9c75eaB2B995F42B32f", "cea": "0xe37A1890878CEF71210Be37fae802e234E55eD44", "stage": "faucets-completed", "pushTx": "0x637f532d9b18fbc9437c8ac487523c10249ecd03c5d7dcf1e397d51acd101a8b", "externalTx": "0x45e49ec224ec14f605e6d75d7137666246256abd9edae8e1a353307ec80c4921", "status": "success"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:38:33.116Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:84532", "wallet": "0x10a330D3FBe1694D78D0DeC0786376B9b82DE6BE", "cea": "0xDC28da449E1fC2e1e59AD25a39D9f044314938fD", "stage": "wrap-submitted", "pushTx": "0x3ab252858291f9ffdc8201eff4030e3b60f794eb1b9bfba661c5c96fc1ec8a8f"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:38:34.119Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:84532", "wallet": "0xF3445c8d5557Fab0519dA9c75eaB2B995F42B32f", "cea": "0xe37A1890878CEF71210Be37fae802e234E55eD44", "stage": "lending-supply-submitted", "pushTx": "0xb064c84ae20e1d41896f3391adecfa1e6bb682716ff9ca8d35ac9cc5ea11dd35"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:39:30.588Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:84532", "wallet": "0x10a330D3FBe1694D78D0DeC0786376B9b82DE6BE", "cea": "0xDC28da449E1fC2e1e59AD25a39D9f044314938fD", "stage": "wrap-completed", "pushTx": "0x3ab252858291f9ffdc8201eff4030e3b60f794eb1b9bfba661c5c96fc1ec8a8f", "externalTx": "0x8a1393a60c6e3b22bfbf324fd886186794a086daa2dc84c5eeeb545ac0066f52", "status": "success"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:39:31.511Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:84532", "wallet": "0xF3445c8d5557Fab0519dA9c75eaB2B995F42B32f", "cea": "0xe37A1890878CEF71210Be37fae802e234E55eD44", "stage": "lending-supply-completed", "pushTx": "0xb064c84ae20e1d41896f3391adecfa1e6bb682716ff9ca8d35ac9cc5ea11dd35", "externalTx": "0xde381c409fb2fac33cc973482b2198e3381b93f4e380f1c12784d766550bed91", "status": "success"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:39:40.631Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:84532", "wallet": "0xF3445c8d5557Fab0519dA9c75eaB2B995F42B32f", "cea": "0xe37A1890878CEF71210Be37fae802e234E55eD44", "stage": "lending-withdraw-submitted", "pushTx": "0x562e36fa4ba9e0873e901e643c75564fe193748cf09dedd64e96ae4b84d471a9"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:39:42.525Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:84532", "wallet": "0x10a330D3FBe1694D78D0DeC0786376B9b82DE6BE", "cea": "0xDC28da449E1fC2e1e59AD25a39D9f044314938fD", "stage": "dex-swap-submitted", "pushTx": "0x405b150a79f791b303923c527be9c528e855085d7bd53651e17bd0e4feb467e6"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:40:31.063Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:84532", "wallet": "0xF3445c8d5557Fab0519dA9c75eaB2B995F42B32f", "cea": "0xe37A1890878CEF71210Be37fae802e234E55eD44", "stage": "lending-withdraw-completed", "pushTx": "0x562e36fa4ba9e0873e901e643c75564fe193748cf09dedd64e96ae4b84d471a9", "externalTx": "0x1bc2a2e5849d3e61c7e7927360c6f7936d0399a8c27cc2f988f6f4e54256366e", "status": "success"} +{"name": "preset-expanded-base-lending", "at": "2026-10-15T02:40:31.865Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:84532", "wallet": "0xF3445c8d5557Fab0519dA9c75eaB2B995F42B32f", "cea": "0xe37A1890878CEF71210Be37fae802e234E55eD44", "link": "1000000000000", "usdbc": "10000", "weth": "1000000000000", "sharesUSDBC": "49999832", "sharesWETH": "2945"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:41:01.614Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:84532", "wallet": "0x10a330D3FBe1694D78D0DeC0786376B9b82DE6BE", "cea": "0xDC28da449E1fC2e1e59AD25a39D9f044314938fD", "stage": "dex-swap-completed", "pushTx": "0x405b150a79f791b303923c527be9c528e855085d7bd53651e17bd0e4feb467e6", "externalTx": "0xf09a982297c6f3a65a96270fbbfa304681cd85cb7da1172d4e15045be5fb4be4", "status": "success"} +{"name": "preset-expanded-dex", "at": "2026-10-15T02:41:01.906Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:84532", "wallet": "0x10a330D3FBe1694D78D0DeC0786376B9b82DE6BE", "cea": "0xDC28da449E1fC2e1e59AD25a39D9f044314938fD", "pool": "0x46880b404CD35c165EDdefF7421019F8dD25F4Ad", "router": "0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4", "amountIn": "1000000000000", "amountOut": "4874"} +{"name": "preset-expanded-wallet", "at": "2026-10-15T02:41:35.205Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "label": "e2e-preset-dex-eip155:421614", "chain": "eip155:421614", "wallet": "0x0466A29B7869676f58A78542F6Cb3C1414e5B1fe", "cea": "0xB681934F411c966f38F3AC5A756933AADB7896B9", "rulesId": "0xdf7e3e27d5d114ce4eed4bc2980408d925821b7c9cfa8518255ea4c8798f43bc"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:41:47.811Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:421614", "wallet": "0x0466A29B7869676f58A78542F6Cb3C1414e5B1fe", "cea": "0xB681934F411c966f38F3AC5A756933AADB7896B9", "stage": "wrap-submitted", "pushTx": "0x50a191c8cc5e0675361e9edea2a2dd4c1fe02c63032d6c142b0ee50af4131e27"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:42:37.971Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:421614", "wallet": "0x0466A29B7869676f58A78542F6Cb3C1414e5B1fe", "cea": "0xB681934F411c966f38F3AC5A756933AADB7896B9", "stage": "wrap-completed", "pushTx": "0x50a191c8cc5e0675361e9edea2a2dd4c1fe02c63032d6c142b0ee50af4131e27", "externalTx": "0xe587bce9e3fb2d0e9bc56aad4cb745a7ce8e15ae75a9dcbf7b1e20ddabebe582", "status": "success"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:42:50.383Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:421614", "wallet": "0x0466A29B7869676f58A78542F6Cb3C1414e5B1fe", "cea": "0xB681934F411c966f38F3AC5A756933AADB7896B9", "stage": "dex-swap-submitted", "pushTx": "0xf22eb1c0437c88e663b981653d7b03c173529dc6c43934efce934407c70eda26"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:43:55.500Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:421614", "wallet": "0x0466A29B7869676f58A78542F6Cb3C1414e5B1fe", "cea": "0xB681934F411c966f38F3AC5A756933AADB7896B9", "stage": "dex-swap-completed", "pushTx": "0xf22eb1c0437c88e663b981653d7b03c173529dc6c43934efce934407c70eda26", "externalTx": "0xeb5332e23ef674047cd98742d718bccfa1676c9d78a2d6bfec828373fc56c05c", "status": "success"} +{"name": "preset-expanded-dex", "at": "2026-10-15T02:43:55.766Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:421614", "wallet": "0x0466A29B7869676f58A78542F6Cb3C1414e5B1fe", "cea": "0xB681934F411c966f38F3AC5A756933AADB7896B9", "pool": "0x66EEAB70aC52459Dd74C6AD50D578Ef76a441bbf", "router": "0x101F443B4d1b059569D643917553c771E1b9663E", "amountIn": "1000000000000", "amountOut": "1912"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:44:15.138Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:421614", "wallet": "0x0466A29B7869676f58A78542F6Cb3C1414e5B1fe", "cea": "0xB681934F411c966f38F3AC5A756933AADB7896B9", "stage": "aave-supply-submitted", "pushTx": "0x7dae2ea5715eb04eef41f45960da197f53f5cf26bb7359ae107891c33d4f4c7f"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:45:05.518Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:421614", "wallet": "0x0466A29B7869676f58A78542F6Cb3C1414e5B1fe", "cea": "0xB681934F411c966f38F3AC5A756933AADB7896B9", "stage": "aave-supply-completed", "pushTx": "0x7dae2ea5715eb04eef41f45960da197f53f5cf26bb7359ae107891c33d4f4c7f", "externalTx": "0xcc4c6edfdad9f8daa8a889a07469ef358ecbe26ba914d5c57483c64bda1e6bc2", "status": "success"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:45:14.014Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:421614", "wallet": "0x0466A29B7869676f58A78542F6Cb3C1414e5B1fe", "cea": "0xB681934F411c966f38F3AC5A756933AADB7896B9", "stage": "aave-withdraw-submitted", "pushTx": "0x0ebc129e7f347cdb7680174e646f78139711f3bbe8ef5fa4a82faee2995f4649"} +{"name": "preset-expanded-stage", "at": "2026-10-15T02:46:04.175Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:421614", "wallet": "0x0466A29B7869676f58A78542F6Cb3C1414e5B1fe", "cea": "0xB681934F411c966f38F3AC5A756933AADB7896B9", "stage": "aave-withdraw-completed", "pushTx": "0x0ebc129e7f347cdb7680174e646f78139711f3bbe8ef5fa4a82faee2995f4649", "externalTx": "0xe528d15940c2e8b2b17e0e8bf63927c7b4a75fff7c1c35b515c80de4d32be86a", "status": "success"} +{"name": "preset-expanded-aave", "at": "2026-10-15T02:46:04.312Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "chain": "eip155:421614", "wallet": "0x0466A29B7869676f58A78542F6Cb3C1414e5B1fe", "cea": "0xB681934F411c966f38F3AC5A756933AADB7896B9", "amount": "1912", "asset": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"} diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/local-contracts.log b/plan/agw/research/preset-expanded-live-2026-10-15/local-contracts.log new file mode 100644 index 00000000..749e39e5 --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/local-contracts.log @@ -0,0 +1,24 @@ +PASS core-agw-local packages/core/__agw-local__/v5-multiasset.spec.ts (9.055 s) + v6 multi-asset SDK management and execution + ✓ v6 EVM alternatives enforce both spender and MAX, and reads update losslessly (902 ms) + ✓ v6 refuses a bare alternative that bypasses a pinned function and too many initial rules (31 ms) + ✓ the shipped DEX catalog enforces tuple receiver/token/amount pins on actual v6 URP (404 ms) + ✓ a review-only DEX exactInputSingle call cannot spend tokens even after asset budgets are filled (377 ms) + ✓ a review-only DEX exactOutputSingle call cannot spend tokens even after asset budgets are filled (360 ms) + ✓ a fixture preset produces rules accepted by public create and enforced by real contracts (380 ms) + ✓ public create encodes two ordered assets; public get reconstructs source-token caps (356 ms) + ✓ a token from the wrong chain fails before deployment (9 ms) + ✓ a same-chain registry identity mismatch fails before deployment (3 ms) + ✓ both tokens execute under one rule and keep independent counters/limits (364 ms) + ✓ omitted and explicit zero totals both prohibit movement (350 ms) + ✓ empty user assets grants one zero-cap gas token and executes a call-only request (358 ms) + ✓ public update resets both counters in one batch and records five checkpoints (365 ms) + ✓ spend on the second asset after snapshot rolls back revoke/grant and checkpoint writes (367 ms) + ✓ out-of-band duplicate contract grants still make sends ambiguous (22 ms) + ✓ a legacy two-field envelope is refused by the actual v6 grant path (6 ms) + +Test Suites: 1 passed, 1 total +Tests: 16 passed, 16 total +Snapshots: 0 total +Time: 9.082 s +Ran all test suites within paths "packages/core/__agw-local__/v5-multiasset.spec.ts". diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/preflight.log b/plan/agw/research/preset-expanded-live-2026-10-15/preflight.log new file mode 100644 index 00000000..e398218a --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/preflight.log @@ -0,0 +1,20 @@ +AGW deployment manifest verified on-chain. + +Wallets + EVM master (Sepolia) 0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf + Push master (Donut) 0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf + Solana master (Devnet) 3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb + Shared UEA (Donut) 0x5C70C864Cf1aDfB04A0e107fFA248ba3600EAb8D + UEA CEA PDA (Devnet) Fqp8UeJxEWvN1Ciu5jqrA3opGXwNvRL2HfJxNQotj3Qh + +Group "agw-presets-expanded" — 5 scenarios, headroom ×1.25. + +┌─────────────────────┬───────┬──────────┬─────────────┬────────┐ +│ Scope │ Asset │ Need │ Have │ Status │ +├─────────────────────┼───────┼──────────┼─────────────┼────────┤ +│ Push master (Donut) │ PC │ 689.5000 │ 968752.1300 │ ✓ │ +│ Push master (Donut) │ pETH │ 0.000001 │ 434.3115 │ ✓ │ +└─────────────────────┴───────┴──────────┴─────────────┴────────┘ + +All master wallets can cover this run. +Derived accounts are already at target. Ready to run. diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/prerequisites.json b/plan/agw/research/preset-expanded-live-2026-10-15/prerequisites.json new file mode 100644 index 00000000..67188b03 --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/prerequisites.json @@ -0,0 +1,203 @@ +[ + { + "chain": 84532, + "actualChain": 84532, + "observedStartBlock": "48131419", + "wrapped": "0x4200000000000000000000000000000000000006", + "pools": [ + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "fee": 100, + "pool": "0x57183717A087d2fe3Ad890873877244c3B96156c", + "liquidity": "2890001491047" + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "fee": 500, + "pool": "0x94bfc0574FF48E92cE43d495376C477B1d0EEeC0", + "liquidity": "5303698200342" + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "fee": 3000, + "pool": "0x46880b404CD35c165EDdefF7421019F8dD25F4Ad", + "liquidity": "315598590516394" + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "fee": 10000, + "pool": "0x4664755562152EDDa3a3073850FB62835451926a", + "liquidity": "57734017049" + }, + { + "token": "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f", + "fee": 100, + "pool": "0x068e0DF9DFcCe57df2C2b60BdB2318CE49A07a31", + "liquidity": "8639839568058" + }, + { + "token": "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f", + "fee": 500, + "pool": "0x9d9203f8a29c600D567b240692DB569B77D1F4A9", + "liquidity": "0" + }, + { + "token": "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f", + "fee": 3000, + "pool": "0x92266210FacF124f190fbad79AA230dfB85926Ce", + "liquidity": "4957986963561" + }, + { + "token": "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f", + "fee": 10000, + "pool": "0xC8AaD20fA4278886e64d279Fe39B1E7a2d6E10E8", + "liquidity": "0" + } + ], + "mints": [ + { + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "owner": "0xD9145b5F45Ad4519c7ACcD6E0A4A82e83bB8A6Dc", + "mint(address,uint256)": "The contract function \"mint\" reverted with the following reason:\nOwnable: caller is not the owner", + "mint(uint256)": "The contract function \"mint\" reverted with the following reason:\nOwnable: caller is not the owner", + "allocateTo(address,uint256)": "The contract function \"allocateTo\" reverted.", + "faucet": "ok", + "supply": "The contract function \"supply\" reverted with the following reason:\nERC20: transfer amount exceeds balance" + }, + { + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "mint(address,uint256)": "The contract function \"mint\" reverted.", + "mint(uint256)": "The contract function \"mint\" reverted.", + "allocateTo(address,uint256)": "ok", + "supply": "The contract function \"supply\" reverted." + }, + { + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "mint(address,uint256)": "ok", + "mint(uint256)": "The contract function \"mint\" reverted.", + "allocateTo(address,uint256)": "The contract function \"allocateTo\" reverted.", + "supply": "The contract function \"supply\" reverted." + } + ] + }, + { + "chain": 421614, + "actualChain": 421614, + "observedStartBlock": "319278801", + "wrapped": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "pools": [ + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "fee": 100, + "pool": "0x152c469626C706E201721F13eb470691E4E81c5D", + "liquidity": "0" + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "fee": 500, + "pool": "0x6F112d524DC998381C09b4e53C7e5e2cc260f877", + "liquidity": "122" + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "fee": 3000, + "pool": "0x66EEAB70aC52459Dd74C6AD50D578Ef76a441bbf", + "liquidity": "40704947517717" + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "fee": 10000, + "pool": "0x3eCedaB7E9479E29B694d8590dc34e0Ce6059868", + "liquidity": "3225673603183" + } + ], + "mints": [ + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "owner": "0xaB7Dbf0Fc9d32349c484419073098DcD52C14798", + "mint(address,uint256)": "The contract function \"mint\" reverted with the following reason:\nFiatToken: caller is not a minter", + "mint(uint256)": "The contract function \"mint\" reverted.", + "allocateTo(address,uint256)": "The contract function \"allocateTo\" reverted.", + "faucet": "ok", + "supply": "The contract function \"supply\" reverted with the following reason:\nERC20: transfer amount exceeds allowance" + }, + { + "token": "0x1dF462e2712496373A347f8ad10802a5E95f053D", + "mint(address,uint256)": "The contract function \"mint\" reverted.", + "mint(uint256)": "The contract function \"mint\" reverted.", + "allocateTo(address,uint256)": "The contract function \"allocateTo\" reverted.", + "supply": "The contract function \"supply\" reverted." + } + ] + }, + { + "chain": 97, + "actualChain": 97, + "observedStartBlock": "136853649", + "wrapped": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "pools": [ + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "fee": 100, + "pool": "0xCed0844e421F856D2de472F9e7037f873987887C", + "liquidity": "229529662705916" + }, + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "fee": 500, + "pool": "0xc2F0629Dd29AB0EcfF7476560bc8FD5c0c4D19Cd", + "liquidity": "0" + }, + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "fee": 3000, + "pool": "0x0000000000000000000000000000000000000000", + "liquidity": "0" + }, + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "fee": 10000, + "pool": "0xa5316a3418e0643BB977A97689E584a3b6c35080", + "liquidity": "0" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "fee": 100, + "pool": "0x0000000000000000000000000000000000000000", + "liquidity": "0" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "fee": 500, + "pool": "0x0000000000000000000000000000000000000000", + "liquidity": "0" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "fee": 3000, + "pool": "0x0000000000000000000000000000000000000000", + "liquidity": "0" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "fee": 10000, + "pool": "0x0000000000000000000000000000000000000000", + "liquidity": "0" + } + ], + "mints": [ + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "mint(address,uint256)": "The contract function \"mint\" reverted.", + "mint(uint256)": "The contract function \"mint\" reverted.", + "allocateTo(address,uint256)": "ok" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "mint(address,uint256)": "The contract function \"mint\" reverted.", + "mint(uint256)": "The contract function \"mint\" reverted.", + "allocateTo(address,uint256)": "ok" + } + ] + } +] diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/probe.cjs b/plan/agw/research/preset-expanded-live-2026-10-15/probe.cjs new file mode 100644 index 00000000..d1166673 --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/probe.cjs @@ -0,0 +1,9 @@ +// Read-only prerequisites. Run from repository root; never loads signer keys. +const {createPublicClient,http,parseAbi,erc20Abi}=require(process.cwd()+'/node_modules/viem');const fs=require('fs'); +const dummy='0x0000000000000000000000000000000000001234'; +const configs=[ +{chain:84532,rpc:'https://base-sepolia-rpc.publicnode.com',factory:'0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24',router:'0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4',tokens:['0x036CbD53842c5426634e7929541eC2318f3dCF7e','0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f'],mintTokens:['0x810D46F9a9027E28F9B01F75E2bdde839dA61115','0x4616975f7E6045FD9737e95bC527e9e14c727BD2','0x663A6F02d547dFd639BF689FED298712f2FB69Fb'],aave:'0x8bAB6d1b75f19e9eD9fCe8b9BD338844fF79aE27'}, +{chain:421614,rpc:'https://arbitrum-sepolia-rpc.publicnode.com',factory:'0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e',router:'0x101F443B4d1b059569D643917553c771E1b9663E',tokens:['0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d'],mintTokens:['0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d','0x1dF462e2712496373A347f8ad10802a5E95f053D'],aave:'0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff'}, +{chain:97,rpc:'https://bsc-testnet-rpc.publicnode.com',factory:'0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865',router:'0x9a489505a00cE272eAa5e07Dba6491314CaE3796',tokens:['0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c','0x16227D60f7a0e586C66B005219dfc887D13C9531'],mintTokens:['0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c','0x16227D60f7a0e586C66B005219dfc887D13C9531']}, +]; +(async()=>{const results=await Promise.all(configs.map(async cfg=>{try{const c=createPublicClient({transport:http(cfg.rpc,{timeout:20000,retryCount:1})});const block=await c.getBlockNumber();const read=(address,sig,fn,args=[])=>c.readContract({address,abi:parseAbi([sig]),functionName:fn,args});const simulate=async(address,sig,fn,args,value)=>{try{await c.simulateContract({address,abi:parseAbi([sig]),functionName:fn,args,account:dummy,value});return 'ok';}catch(e){return e.shortMessage||e.message;}};const wrapped=await read(cfg.router,'function WETH9() view returns(address)','WETH9');const pools=[];for(const token of cfg.tokens)for(const fee of [100,500,3000,10000]){try{const pool=await read(cfg.factory,'function getPool(address,address,uint24) view returns(address)','getPool',[wrapped,token,fee]);let liquidity='0';if(!/^0x0+$/.test(pool))liquidity=String(await read(pool,'function liquidity() view returns(uint128)','liquidity'));pools.push({token,fee,pool,liquidity});}catch(e){pools.push({token,fee,error:e.shortMessage||e.message});}}const mints=[];for(const token of cfg.mintTokens){let owner;try{owner=await read(token,'function owner() view returns(address)','owner');}catch{}const r={token,owner};for(const [sig,args]of [['mint(address,uint256)',[dummy,1000000n]],['mint(uint256)',[1000000n]],['allocateTo(address,uint256)',[dummy,1000000n]]])r[sig]=await simulate(token,'function '+sig,sig.split('(')[0],args);if(owner&&!/^0x0+$/.test(owner))r.faucet=await simulate(owner,'function mint(address,address,uint256)','mint',[token,dummy,1000000n]);if(cfg.aave)r.supply=await simulate(cfg.aave,'function supply(address,uint256,address,uint16)','supply',[token,1000000n,dummy,0]);mints.push(r);}return {chain:cfg.chain,actualChain:await c.getChainId(),observedStartBlock:String(block),wrapped,pools,mints};}catch(e){return {chain:cfg.chain,error:e.shortMessage||e.message};}}));fs.writeFileSync('plan/agw/research/preset-expanded-live-2026-10-15/prerequisites.json',JSON.stringify(results,null,2)+'\n');console.log(JSON.stringify(results,null,2));})().catch(e=>{console.error(e.shortMessage||e.message);process.exitCode=1;}); diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/redemptions.json b/plan/agw/research/preset-expanded-live-2026-10-15/redemptions.json new file mode 100644 index 00000000..531464aa --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/redemptions.json @@ -0,0 +1,47 @@ +[ + { + "chain": "eip155:97", + "rpc": "https://bsc-testnet-rpc.publicnode.com", + "wallet": "0xce76840d3ee4579217D5F2de1d3767b7EAe54605", + "cea": "0x3c0a4e2f349059D5d1309d0f57871b1b9a4E1192", + "expectedShares": "16740010", + "stage": "venus-redeem-completed", + "market": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A", + "underlying": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "tx": "0xc7ab68b6f72171c83a2ec5cce9c3a0df66a53be60e3f46e9a2d4a6c49f25c4e0", + "block": "136855138", + "redeemAmount": "3360", + "redeemedShares": "16740010", + "remainingShares": "0" + }, + { + "chain": "eip155:84532", + "rpc": "https://base-sepolia-rpc.publicnode.com", + "wallet": "0xF3445c8d5557Fab0519dA9c75eaB2B995F42B32f", + "cea": "0xe37A1890878CEF71210Be37fae802e234E55eD44", + "expectedShares": "49999832", + "stage": "lending-withdraw-completed", + "market": "0x876852425331a113d8E432eFFB3aC5BEf38f033a", + "underlying": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "tx": "0x1bc2a2e5849d3e61c7e7927360c6f7936d0399a8c27cc2f988f6f4e54256366e", + "block": "48131861", + "redeemAmount": "9999", + "redeemedShares": "49999832", + "remainingShares": "0" + }, + { + "chain": "eip155:84532", + "rpc": "https://base-sepolia-rpc.publicnode.com", + "wallet": "0xF3445c8d5557Fab0519dA9c75eaB2B995F42B32f", + "cea": "0xe37A1890878CEF71210Be37fae802e234E55eD44", + "expectedShares": "2945", + "stage": "lending-withdraw-completed", + "market": "0x2F39a349A79492a70E152760ce7123A1933eCf28", + "underlying": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "tx": "0x1bc2a2e5849d3e61c7e7927360c6f7936d0399a8c27cc2f988f6f4e54256366e", + "block": "48131861", + "redeemAmount": "999943876358", + "redeemedShares": "2945", + "remainingShares": "0" + } +] diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/runtime-lint.log b/plan/agw/research/preset-expanded-live-2026-10-15/runtime-lint.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/runtime-regression-before.log b/plan/agw/research/preset-expanded-live-2026-10-15/runtime-regression-before.log new file mode 100644 index 00000000..e4eba1e8 --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/runtime-regression-before.log @@ -0,0 +1,62 @@ +FAIL core packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts + ✓ resolves explicit native ETH on eip155:11155111 to the same burn token as omitted native funds (1 ms) + ✕ resolves explicit native ETH on eip155:84532 to the same burn token as omitted native funds (2 ms) + ✕ resolves explicit native ETH on eip155:421614 to the same burn token as omitted native funds + ✕ does not infer a token from a different destination chain + ✓ preserves an explicit Push PRC20 reference for subsequent source-chain validation + + ● resolves explicit native ETH on eip155:84532 to the same burn token as omitted native funds + + expect(received).toBe(expected) // Object.is equality + + Expected: "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21" + Received: "0x2971824Db68229D087931155C2b8bB820B275809" + + 16 | ] as const)('resolves explicit native ETH on %s to the same burn token as omitted native funds', (chain, token, expected) => { + 17 | const rt = runtime(); + > 18 | expect(rt.resolvePrc20(token, chain)).toBe(getAddress(expected)); + | ^ + 19 | expect(rt.resolvePrc20({ ...token }, chain)).toBe(rt.resolvePrc20(undefined, chain)); + 20 | expect(rt.resolvePrc20(token.address, chain)).toBe(getAddress(expected)); + 21 | }); + + at src/lib/agentic/__tests__/runtime-token-chain.spec.ts:18:41 + + ● resolves explicit native ETH on eip155:421614 to the same burn token as omitted native funds + + expect(received).toBe(expected) // Object.is equality + + Expected: "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e" + Received: "0x2971824Db68229D087931155C2b8bB820B275809" + + 16 | ] as const)('resolves explicit native ETH on %s to the same burn token as omitted native funds', (chain, token, expected) => { + 17 | const rt = runtime(); + > 18 | expect(rt.resolvePrc20(token, chain)).toBe(getAddress(expected)); + | ^ + 19 | expect(rt.resolvePrc20({ ...token }, chain)).toBe(rt.resolvePrc20(undefined, chain)); + 20 | expect(rt.resolvePrc20(token.address, chain)).toBe(getAddress(expected)); + 21 | }); + + at src/lib/agentic/__tests__/runtime-token-chain.spec.ts:18:41 + + ● does not infer a token from a different destination chain + + expect(received).toThrow() + + Received function did not throw + + 21 | }); + 22 | it('does not infer a token from a different destination chain', () => { + > 23 | expect(() => runtime().resolvePrc20(MOVEABLE_TOKEN_CONSTANTS.BASE_SEPOLIA.USDC, CHAIN.ARBITRUM_SEPOLIA)).toThrow(); + | ^ + 24 | }); + 25 | it('preserves an explicit Push PRC20 reference for subsequent source-chain validation', () => { + 26 | const token: PushChainMoveableToken = { symbol: 'pETH_ARB', decimals: 18, mechanism: 'approve', address: addresses.pETH_ARB, prc20Address: addresses.pETH_ARB, sourceChain: CHAIN.ARBITRUM_SEPOLIA }; + + at Object. (src/lib/agentic/__tests__/runtime-token-chain.spec.ts:23:108) + +Test Suites: 1 failed, 1 total +Tests: 3 failed, 2 passed, 5 total +Snapshots: 0 total +Time: 2.386 s +Ran all test suites within paths "packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts". diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/runtime-regression-focused.log b/plan/agw/research/preset-expanded-live-2026-10-15/runtime-regression-focused.log new file mode 100644 index 00000000..a00fe23c --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/runtime-regression-focused.log @@ -0,0 +1,10 @@ +PASS core packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/public-rule.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts + +Test Suites: 4 passed, 4 total +Tests: 64 passed, 64 total +Snapshots: 0 total +Time: 4.339 s +Ran all test suites within paths "packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts", "packages/core/src/lib/agentic/__tests__/send.spec.ts", "packages/core/src/lib/agentic/__tests__/public-rule.spec.ts", "packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts". diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/scenario-selection.log b/plan/agw/research/preset-expanded-live-2026-10-15/scenario-selection.log new file mode 100644 index 00000000..caa0c9ed --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/scenario-selection.log @@ -0,0 +1,8 @@ +✓ agw-preset-eigen-sepolia 1 test +✓ agw-preset-dex-base 1 test +✓ agw-preset-dex-aave-arbitrum 1 test +✓ agw-preset-dex-venus-bnb 1 test +✓ agw-preset-base-aave-moonwell 1 test + +5 scenarios, 1 spec files, 5 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/research/preset-expanded-live-2026-10-15/unit.log b/plan/agw/research/preset-expanded-live-2026-10-15/unit.log new file mode 100644 index 00000000..59e2c577 --- /dev/null +++ b/plan/agw/research/preset-expanded-live-2026-10-15/unit.log @@ -0,0 +1,178 @@ +PASS core packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/public-rule.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/labels.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts + +Test Suites: 1 skipped, 125 passed, 125 of 126 total +Tests: 12 skipped, 2101 passed, 2113 total +Snapshots: 0 total +Time: 29.698 s +Ran all test suites. diff --git a/plan/agw/research/preset-funding-removal-2026-10-20.md b/plan/agw/research/preset-funding-removal-2026-10-20.md new file mode 100644 index 00000000..e4b28eee --- /dev/null +++ b/plan/agw/research/preset-funding-removal-2026-10-20.md @@ -0,0 +1,25 @@ +# Preset funding option removal — 20 October 2026 + +The user requested removal of the public `funding` extension, which is not in the target SDK specification. This supersedes the destination-mode advice in the earlier creation-error review. + +## Behavior + +- `presets.get` retains all selected assets and their caps. There is no mode that silently empties rule assets. +- The input option and readiness funding field are removed. JavaScript callers still passing the option receive `INVALID_RULE` with migration guidance rather than silently changing their permissions. +- Missing mappings remain `BRIDGE_ASSET_UNAVAILABLE` in readiness and `TOKEN_ROUTE_UNAVAILABLE` during preparation. Error guidance no longer recommends the removed option. +- Existing integrations omitting the option need no call-shape change. They must respect readiness; this change does not enable missing routes. +- Local and live protocol tests use explicitly labeled prefunded fixtures where bridge assets are cleared. They do not establish default-preset bridge acceptance. + +## Route work required + +For each unsupported exact chain/token address, the core/gateway team must confirm an existing compatible PRC20 route or deploy/register the missing route. Verify source chain, source address and decimals, along with the route configuration required for actual outbound delivery. The SDK can then register the verified mapping and test rule creation and bounded destination delivery. Existing supported assets are alternatives only if the target protocol actually supports those exact assets. A shared symbol is insufficient. + +This change did not re-audit current deployments or perform transactions. Previously reported blockers include Aave faucet LINK, Circle testnet USDC variants, EigenLayer Sepolia WETH and Arbitrum WETH. Sepolia DEX WETH has a registry mapping already; not every WETH address is interchangeable. + +## Validation + +- 54 focused unit regressions passed. +- 21 real-contract local tests passed, with a stub gateway. +- Core build, spec and local-harness typechecks passed. +- Package imports/declarations/content checks and seven guide examples passed. +- No live transactions, publishing, commits or pushes performed for this change. diff --git a/plan/agw/research/preset-live-2026-10-15/AaveErrors.sol b/plan/agw/research/preset-live-2026-10-15/AaveErrors.sol new file mode 100644 index 00000000..990069e0 --- /dev/null +++ b/plan/agw/research/preset-live-2026-10-15/AaveErrors.sol @@ -0,0 +1,100 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.0; + +/** + * @title Errors library + * @author Aave + * @notice Defines the error messages emitted by the different contracts of the Aave protocol + */ +library Errors { + string public constant CALLER_NOT_POOL_ADMIN = '1'; // 'The caller of the function is not a pool admin' + string public constant CALLER_NOT_EMERGENCY_ADMIN = '2'; // 'The caller of the function is not an emergency admin' + string public constant CALLER_NOT_POOL_OR_EMERGENCY_ADMIN = '3'; // 'The caller of the function is not a pool or emergency admin' + string public constant CALLER_NOT_RISK_OR_POOL_ADMIN = '4'; // 'The caller of the function is not a risk or pool admin' + string public constant CALLER_NOT_ASSET_LISTING_OR_POOL_ADMIN = '5'; // 'The caller of the function is not an asset listing or pool admin' + string public constant CALLER_NOT_BRIDGE = '6'; // 'The caller of the function is not a bridge' + string public constant ADDRESSES_PROVIDER_NOT_REGISTERED = '7'; // 'Pool addresses provider is not registered' + string public constant INVALID_ADDRESSES_PROVIDER_ID = '8'; // 'Invalid id for the pool addresses provider' + string public constant NOT_CONTRACT = '9'; // 'Address is not a contract' + string public constant CALLER_NOT_POOL_CONFIGURATOR = '10'; // 'The caller of the function is not the pool configurator' + string public constant CALLER_NOT_ATOKEN = '11'; // 'The caller of the function is not an AToken' + string public constant INVALID_ADDRESSES_PROVIDER = '12'; // 'The address of the pool addresses provider is invalid' + string public constant INVALID_FLASHLOAN_EXECUTOR_RETURN = '13'; // 'Invalid return value of the flashloan executor function' + string public constant RESERVE_ALREADY_ADDED = '14'; // 'Reserve has already been added to reserve list' + string public constant NO_MORE_RESERVES_ALLOWED = '15'; // 'Maximum amount of reserves in the pool reached' + string public constant EMODE_CATEGORY_RESERVED = '16'; // 'Zero eMode category is reserved for volatile heterogeneous assets' + string public constant INVALID_EMODE_CATEGORY_ASSIGNMENT = '17'; // 'Invalid eMode category assignment to asset' + string public constant RESERVE_LIQUIDITY_NOT_ZERO = '18'; // 'The liquidity of the reserve needs to be 0' + string public constant FLASHLOAN_PREMIUM_INVALID = '19'; // 'Invalid flashloan premium' + string public constant INVALID_RESERVE_PARAMS = '20'; // 'Invalid risk parameters for the reserve' + string public constant INVALID_EMODE_CATEGORY_PARAMS = '21'; // 'Invalid risk parameters for the eMode category' + string public constant BRIDGE_PROTOCOL_FEE_INVALID = '22'; // 'Invalid bridge protocol fee' + string public constant CALLER_MUST_BE_POOL = '23'; // 'The caller of this function must be a pool' + string public constant INVALID_MINT_AMOUNT = '24'; // 'Invalid amount to mint' + string public constant INVALID_BURN_AMOUNT = '25'; // 'Invalid amount to burn' + string public constant INVALID_AMOUNT = '26'; // 'Amount must be greater than 0' + string public constant RESERVE_INACTIVE = '27'; // 'Action requires an active reserve' + string public constant RESERVE_FROZEN = '28'; // 'Action cannot be performed because the reserve is frozen' + string public constant RESERVE_PAUSED = '29'; // 'Action cannot be performed because the reserve is paused' + string public constant BORROWING_NOT_ENABLED = '30'; // 'Borrowing is not enabled' + string public constant STABLE_BORROWING_NOT_ENABLED = '31'; // 'Stable borrowing is not enabled' + string public constant NOT_ENOUGH_AVAILABLE_USER_BALANCE = '32'; // 'User cannot withdraw more than the available balance' + string public constant INVALID_INTEREST_RATE_MODE_SELECTED = '33'; // 'Invalid interest rate mode selected' + string public constant COLLATERAL_BALANCE_IS_ZERO = '34'; // 'The collateral balance is 0' + string public constant HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD = '35'; // 'Health factor is lesser than the liquidation threshold' + string public constant COLLATERAL_CANNOT_COVER_NEW_BORROW = '36'; // 'There is not enough collateral to cover a new borrow' + string public constant COLLATERAL_SAME_AS_BORROWING_CURRENCY = '37'; // 'Collateral is (mostly) the same currency that is being borrowed' + string public constant AMOUNT_BIGGER_THAN_MAX_LOAN_SIZE_STABLE = '38'; // 'The requested amount is greater than the max loan size in stable rate mode' + string public constant NO_DEBT_OF_SELECTED_TYPE = '39'; // 'For repayment of a specific type of debt, the user needs to have debt that type' + string public constant NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF = '40'; // 'To repay on behalf of a user an explicit amount to repay is needed' + string public constant NO_OUTSTANDING_STABLE_DEBT = '41'; // 'User does not have outstanding stable rate debt on this reserve' + string public constant NO_OUTSTANDING_VARIABLE_DEBT = '42'; // 'User does not have outstanding variable rate debt on this reserve' + string public constant UNDERLYING_BALANCE_ZERO = '43'; // 'The underlying balance needs to be greater than 0' + string public constant INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET = '44'; // 'Interest rate rebalance conditions were not met' + string public constant HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '45'; // 'Health factor is not below the threshold' + string public constant COLLATERAL_CANNOT_BE_LIQUIDATED = '46'; // 'The collateral chosen cannot be liquidated' + string public constant SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '47'; // 'User did not borrow the specified currency' + string public constant INCONSISTENT_FLASHLOAN_PARAMS = '49'; // 'Inconsistent flashloan parameters' + string public constant BORROW_CAP_EXCEEDED = '50'; // 'Borrow cap is exceeded' + string public constant SUPPLY_CAP_EXCEEDED = '51'; // 'Supply cap is exceeded' + string public constant UNBACKED_MINT_CAP_EXCEEDED = '52'; // 'Unbacked mint cap is exceeded' + string public constant DEBT_CEILING_EXCEEDED = '53'; // 'Debt ceiling is exceeded' + string public constant UNDERLYING_CLAIMABLE_RIGHTS_NOT_ZERO = '54'; // 'Claimable rights over underlying not zero (aToken supply or accruedToTreasury)' + string public constant STABLE_DEBT_NOT_ZERO = '55'; // 'Stable debt supply is not zero' + string public constant VARIABLE_DEBT_SUPPLY_NOT_ZERO = '56'; // 'Variable debt supply is not zero' + string public constant LTV_VALIDATION_FAILED = '57'; // 'Ltv validation failed' + string public constant INCONSISTENT_EMODE_CATEGORY = '58'; // 'Inconsistent eMode category' + string public constant PRICE_ORACLE_SENTINEL_CHECK_FAILED = '59'; // 'Price oracle sentinel validation failed' + string public constant ASSET_NOT_BORROWABLE_IN_ISOLATION = '60'; // 'Asset is not borrowable in isolation mode' + string public constant RESERVE_ALREADY_INITIALIZED = '61'; // 'Reserve has already been initialized' + string public constant USER_IN_ISOLATION_MODE_OR_LTV_ZERO = '62'; // 'User is in isolation mode or ltv is zero' + string public constant INVALID_LTV = '63'; // 'Invalid ltv parameter for the reserve' + string public constant INVALID_LIQ_THRESHOLD = '64'; // 'Invalid liquidity threshold parameter for the reserve' + string public constant INVALID_LIQ_BONUS = '65'; // 'Invalid liquidity bonus parameter for the reserve' + string public constant INVALID_DECIMALS = '66'; // 'Invalid decimals parameter of the underlying asset of the reserve' + string public constant INVALID_RESERVE_FACTOR = '67'; // 'Invalid reserve factor parameter for the reserve' + string public constant INVALID_BORROW_CAP = '68'; // 'Invalid borrow cap for the reserve' + string public constant INVALID_SUPPLY_CAP = '69'; // 'Invalid supply cap for the reserve' + string public constant INVALID_LIQUIDATION_PROTOCOL_FEE = '70'; // 'Invalid liquidation protocol fee for the reserve' + string public constant INVALID_EMODE_CATEGORY = '71'; // 'Invalid eMode category for the reserve' + string public constant INVALID_UNBACKED_MINT_CAP = '72'; // 'Invalid unbacked mint cap for the reserve' + string public constant INVALID_DEBT_CEILING = '73'; // 'Invalid debt ceiling for the reserve + string public constant INVALID_RESERVE_INDEX = '74'; // 'Invalid reserve index' + string public constant ACL_ADMIN_CANNOT_BE_ZERO = '75'; // 'ACL admin cannot be set to the zero address' + string public constant INCONSISTENT_PARAMS_LENGTH = '76'; // 'Array parameters that should be equal length are not' + string public constant ZERO_ADDRESS_NOT_VALID = '77'; // 'Zero address not valid' + string public constant INVALID_EXPIRATION = '78'; // 'Invalid expiration' + string public constant INVALID_SIGNATURE = '79'; // 'Invalid signature' + string public constant OPERATION_NOT_SUPPORTED = '80'; // 'Operation not supported' + string public constant DEBT_CEILING_NOT_ZERO = '81'; // 'Debt ceiling is not zero' + string public constant ASSET_NOT_LISTED = '82'; // 'Asset is not listed' + string public constant INVALID_OPTIMAL_USAGE_RATIO = '83'; // 'Invalid optimal usage ratio' + string public constant INVALID_OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO = '84'; // 'Invalid optimal stable to total debt ratio' + string public constant UNDERLYING_CANNOT_BE_RESCUED = '85'; // 'The underlying asset cannot be rescued' + string public constant ADDRESSES_PROVIDER_ALREADY_ADDED = '86'; // 'Reserve has already been added to reserve list' + string public constant POOL_ADDRESSES_DO_NOT_MATCH = '87'; // 'The token implementation pool address and the pool address provided by the initializing pool do not match' + string public constant STABLE_BORROWING_ENABLED = '88'; // 'Stable borrowing is enabled' + string public constant SILOED_BORROWING_VIOLATION = '89'; // 'User is trying to borrow multiple assets including a siloed one' + string public constant RESERVE_DEBT_NOT_ZERO = '90'; // the total debt of the reserve needs to be 0 + string public constant FLASHLOAN_DISABLED = '91'; // FlashLoaning for this asset is disabled +} diff --git a/plan/agw/research/preset-live-2026-10-15/README.md b/plan/agw/research/preset-live-2026-10-15/README.md new file mode 100644 index 00000000..3604eecf --- /dev/null +++ b/plan/agw/research/preset-live-2026-10-15/README.md @@ -0,0 +1,40 @@ +# Preset live acceptance — October 15, 2026 + +## Scope + +Real Donut v6 wallets and real Sepolia protocol contracts; no mainnet broadcasts. Test group `agw-presets` is opt-in and excluded from `all`. It contains two distinct scenarios, verified against the actual test names. + +The tests generate allowed calls through public presets.get and preserve their pins/approvals. They intentionally set the rule's bridge assets to []: Uniswap's WETH/Circle USDC and Aave's mock LINK do not form a supported SDK PRC20 pair. Destination accounts are prefunded separately (owner bridges ETH and wraps WETH; owner calls Aave's official testnet faucet). These tests prove destination balances can be used under preset permissions, not support for bridging arbitrary preset tokens. + +## Uniswap — passed + +- Fresh AGW, owner outbound wraps 0.000002 Sepolia ETH in its CEA. +- Agent uses the catalog's approval and exactInputSingle calls, with token, amount and wallet-recipient pins. +- Different recipient rejected by URP. +- 0.000001 WETH consumed; Circle USDC balance increased by 45,586 raw units. +- Destination success receipt and CEA UniversalTxExecuted event attribute the exact swap to the wallet. Exact output amount is observed evidence, not a future expectation. + +Transaction hashes are retained in live-evidence.jsonl. No mainnet or mocked destination execution is included in this result. + +## Aave — LINK passed; original USDC prerequisite failure retained + +The initial USDC supply reverted on Sepolia with Error(51), SUPPLY_CAP_EXCEEDED in the official Aave Errors.sol. DAI and USDT also fail this gate. Read-only probes are in aave-prerequisites.json (block is an observed head, not a pinned snapshot across the calls). The test now uses faucet LINK and fails before funding if an unfunded supply probe cannot reach the expected token-balance check. The revised LINK test passed: faucet funding, agent approval/supply, and withdrawal of the same 10^12 raw LINK units all succeeded. Supply/Withdraw events identify the wallet CEA as user/beneficiary, and balances independently confirm the round trip. Direct mint on the underlying token is owner-restricted and is not used. + +Error source: https://raw.githubusercontent.com/aave/aave-v3-core/master/contracts/protocol/libraries/helpers/Errors.sol. This is a protocol capacity issue, not a passing test or a silent skip. + +Both scenarios passed in separate focused runs, not one combined invocation. The USDC attempt failed and remains in the evidence; the LINK result does not assert USDC capacity. + +## Commands + +From packages/core: + +- `node ../../node_modules/ts-node/dist/bin.js --transpile-only __e2e__/ci/preflight.ts --group agw-presets --dry-run` (run with initial one-scenario manifest; balances exceeded the subsequent combined budget). +- `node ../../node_modules/ts-node/dist/bin.js --transpile-only __e2e__/ci/run.ts --group agw-presets` (initial Uniswap-only run). +- `AGW_E2E=1 node ../../node_modules/jest/bin/jest.js --config jest.e2e.config.ts --runInBand --forceExit --runTestsByPath __e2e__/agw/presets-live.spec.ts --testNamePattern 'agw presets live 2'` (Aave focused follow-up). +- `node ../../node_modules/ts-node/dist/bin.js --transpile-only __e2e__/ci/run.ts --group agw-presets --list --verify` (two scenarios, two distinct tests). + +Root validation: full unit suite 2,096 passed / 12 skipped; build, library/spec typechecks, public guide typecheck, package import/declaration check and source/compiled API check passed. No full old AGW live rerun was needed for the catalog-only additions. + +## Remaining coverage + +These original Sepolia results do not establish other-chain coverage. A subsequent [expanded run](../preset-expanded-live-2026-10-15/README.md) now establishes Base/Arbitrum Uniswap, BNB PancakeSwap/Venus, Base/Arbitrum Aave, Base Moonwell and Sepolia EigenLayer flows. Mainnet templates have official-source and read-only code checks only. Unsupported/unverified proposal entries are documented in the mainnet catalog review. No external protocol address was deployed or changed by this work. diff --git a/plan/agw/research/preset-live-2026-10-15/aave-link-live.log b/plan/agw/research/preset-live-2026-10-15/aave-link-live.log new file mode 100644 index 00000000..a260ae82 --- /dev/null +++ b/plan/agw/research/preset-live-2026-10-15/aave-link-live.log @@ -0,0 +1,11 @@ +PASS core-e2e __e2e__/agw/presets-live.spec.ts (276.918 s) + agw presets live + ✓ 2. Aave preset supplies and withdraws the wallet position (275014 ms) + ○ skipped 1. Uniswap preset swaps from the wallet CEA and rejects a different recipient + +Test Suites: 1 passed, 1 total +Tests: 1 skipped, 1 passed, 2 total +Snapshots: 0 total +Time: 276.939 s +Ran all test suites within paths "__e2e__/agw/presets-live.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/preset-live-2026-10-15/aave-prerequisites.json b/plan/agw/research/preset-live-2026-10-15/aave-prerequisites.json new file mode 100644 index 00000000..8db9f159 --- /dev/null +++ b/plan/agw/research/preset-live-2026-10-15/aave-prerequisites.json @@ -0,0 +1,50 @@ +{ + "block": "11917343", + "rows": [ + { + "token": "0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357", + "symbol": "DAI", + "result": "The contract function \"supply\" reverted with the following reason:\n51" + }, + { + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "symbol": "LINK", + "result": "The contract function \"supply\" reverted with the following reason:\nERC20: transfer amount exceeds balance" + }, + { + "token": "0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8", + "symbol": "USDC", + "result": "The contract function \"supply\" reverted with the following reason:\n51" + }, + { + "token": "0x29f2D40B0605204364af54EC677bD022dA425d03", + "symbol": "WBTC", + "result": "The contract function \"supply\" reverted with the following reason:\nERC20: transfer amount exceeds balance" + }, + { + "token": "0xC558DBdd856501FCd9aaF1E62eae57A9F0629a3c", + "symbol": "WETH", + "result": "The contract function \"supply\" reverted." + }, + { + "token": "0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0", + "symbol": "USDT", + "result": "The contract function \"supply\" reverted with the following reason:\n51" + }, + { + "token": "0x88541670E55cC00bEEFD87eB59EDd1b7C511AC9a", + "symbol": "AAVE", + "result": "The contract function \"supply\" reverted with the following reason:\nERC20: transfer amount exceeds balance" + }, + { + "token": "0x6d906e526a4e2Ca02097BA9d0caA3c382F52278E", + "symbol": "EURS", + "result": "The contract function \"supply\" reverted with the following reason:\nERC20: transfer amount exceeds balance" + }, + { + "token": "0xc4bF5CbDaBE595361438F8c6a187bDc330539c60", + "symbol": "GHO", + "result": "The contract function \"supply\" reverted with the following reason:\nArithmetic operation resulted in underflow or overflow." + } + ] +} diff --git a/plan/agw/research/preset-live-2026-10-15/aave-usdc-cap-failure.log b/plan/agw/research/preset-live-2026-10-15/aave-usdc-cap-failure.log new file mode 100644 index 00000000..1937ba3d --- /dev/null +++ b/plan/agw/research/preset-live-2026-10-15/aave-usdc-cap-failure.log @@ -0,0 +1,28 @@ +FAIL core-e2e __e2e__/agw/presets-live.spec.ts (211.735 s) + agw presets live + ✕ 2. Aave preset supplies and withdraws the wallet position (209529 ms) + ○ skipped 1. Uniswap preset swaps from the wallet CEA and rejects a different recipient + + ● agw presets live › 2. Aave preset supplies and withdraws the wallet position + + expect(received).toBe(expected) // Object.is equality + + Expected: "success" + Received: "reverted" + + 321 | hash: supplied.externalTxHash as Hex, + 322 | }); + > 323 | expect(supplyReceipt.status).toBe('success'); + | ^ + 324 | expect(await balance()).toBe(BigInt(0)); + 325 | const events = parseEventLogs({ + 326 | abi, + + at Object. (__e2e__/agw/presets-live.spec.ts:323:34) + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 1 skipped, 2 total +Snapshots: 0 total +Time: 211.754 s, estimated 218 s +Ran all test suites within paths "__e2e__/agw/presets-live.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/preset-live-2026-10-15/api.json b/plan/agw/research/preset-live-2026-10-15/api.json new file mode 100644 index 00000000..337e2bd8 --- /dev/null +++ b/plan/agw/research/preset-live-2026-10-15/api.json @@ -0,0 +1,11537 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "0e40221567a16b26b123f1440d6ccb025803ed39", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [ + "AgenticPresets", + "ArgumentPath", + "DecodedSolanaRule", + "Pin", + "Preset", + "PresetAsset", + "PresetCategory", + "PresetOptions", + "PresetRuleTemplate", + "ReadyPresetOptions", + "RuleInput", + "Spent", + "WalletMarker" + ], + "removedExports": [ + "AgenticNetworkConstants", + "NativeRule", + "UniversalRule" + ], + "changedAgwTypes": [ + "AgenticWallet", + "AgenticError", + "AgenticRevertError", + "AGENTIC_ERROR_CODE", + "Rule", + "RuleInput", + "Pin", + "Spent", + "NativeRule", + "AssetCap", + "AllowedCall", + "UniversalRule", + "RulesRecord", + "CreateOptions", + "AgenticTxMetadata" + ], + "publicTypeChanges": [ + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticRevertError", + "AgenticErrorCode", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "CreateOptions", + "DecodedSolanaRule", + "Rule", + "RuleInput", + "Pin", + "Spent", + "WalletMarker", + "ArgumentPath", + "RulesRecord", + "Preset", + "PresetCategory", + "PresetAsset", + "PresetOptions", + "ReadyPresetOptions", + "PresetRuleTemplate", + "AgenticPresets" + ], + "transactionMethodChanges": [], + "instanceMethodChanges": [], + "agwConstantsChanged": true, + "before": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address(token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }): {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "after": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticPresets", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "ArgumentPath", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DecodedSolanaRule", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "Pin", + "PreparedRead", + "PreparedUniversalTx", + "Preset", + "PresetAsset", + "PresetCategory", + "PresetOptions", + "PresetRuleTemplate", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReadyPresetOptions", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RuleInput", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "Spent", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletMarker", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n delete(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n delete(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly DELETE_NEEDS_TARGET: \"DELETE_NEEDS_TARGET\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "DELETE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"DELETE_NEEDS_TARGET\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RuleInput": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[] | import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Pin": { + "type": "{\n account: number;\n arg?: never;\n expected: \"agentic:wallet\" | string;\n max?: never;\n token?: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected: \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint;\n max?: never;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected?: never;\n max: bigint;\n}", + "members": { + "account": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "arg": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath | undefined" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "bigint | string | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "Spent": { + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"native\" | \"universal\"" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall", + "members": { + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Pin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "spent": { + "optional": false, + "readonly": false, + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly DELETE_NEEDS_TARGET: \"DELETE_NEEDS_TARGET\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "DELETE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"DELETE_NEEDS_TARGET\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n delete(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n delete(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall", + "members": { + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Pin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "DecodedSolanaRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[]" + }, + "ceaAccounts": { + "optional": false, + "readonly": false, + "type": "readonly `0x${string}`[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`solana:${string}`" + }, + "dataPins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmDataPinWire[]" + }, + "expectedCEA": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "format": { + "optional": false, + "readonly": false, + "type": "\"decoded\"" + }, + "gatewayProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmAccountPinWire[]" + }, + "programs": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").AllowedProgramWire[]" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RuleInput": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[] | import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Pin": { + "type": "{\n account: number;\n arg?: never;\n expected: \"agentic:wallet\" | string;\n max?: never;\n token?: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected: \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint;\n max?: never;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected?: never;\n max: bigint;\n}", + "members": { + "account": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "arg": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath | undefined" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "bigint | string | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "Spent": { + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"native\" | \"universal\"" + } + } + }, + "WalletMarker": { + "type": "\"agentic:wallet\"", + "members": {} + }, + "ArgumentPath": { + "type": "number | readonly number[]", + "members": {} + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "spent": { + "optional": false, + "readonly": false, + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + }, + "Preset": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").Preset", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace[]" + }, + "constant": { + "optional": false, + "readonly": false, + "type": "\"DEXES\" | \"LENDING\" | \"PREDICTION\" | \"STAKING\"" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"CATEGORY\"" + } + } + }, + "PresetCategory": { + "type": "\"DEXES\" | \"LENDING\" | \"PREDICTION\" | \"STAKING\"", + "members": {} + }, + "PresetAsset": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "PresetOptions": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetOptions", + "members": { + "agent": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadyPresetOptions": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").ReadyPresetOptions", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PresetRuleTemplate": { + "type": "{\n agent?: `0x${string}`;\n validUntil?: number;\n} & Omit", + "members": { + "agent": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "AgenticPresets": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").AgenticPresets", + "members": { + "get": { + "optional": false, + "readonly": false, + "type": "{\n (preset: import(\"sdk/src/lib/agentic/presets/types\").PresetCategory, options: import(\"sdk/src/lib/agentic/presets/types\").ReadyPresetOptions): {\n rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[];\n };\n (preset: import(\"sdk/src/lib/agentic/presets/types\").PresetCategory, options?: import(\"sdk/src/lib/agentic/presets/types\").PresetOptions): {\n rules: import(\"sdk/src/lib/agentic/presets/types\").PresetRuleTemplate[];\n };\n}" + }, + "list": { + "optional": false, + "readonly": false, + "type": "(options?: {\n type?: \"CATEGORY\";\n}) => {\n presets: import(\"sdk/src/lib/agentic/presets/types\").Preset[];\n}" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly<{\n PRESETS: Readonly<{\n CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n }>;\n WALLET: \"agentic:wallet\";\n }>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": true, + "type": "{\n readonly presets: import(\"sdk/src/lib/agentic/presets/types\").AgenticPresets;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address: (token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "PRESETS": { + "optional": false, + "readonly": true, + "type": "{\n readonly CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n}" + }, + "WALLET": { + "optional": false, + "readonly": true, + "type": "\"agentic:wallet\"" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly PRESETS: Readonly<{\n CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n }>;\n readonly WALLET: \"agentic:wallet\";\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "scope": "All root exports and declared public members, PushChain static/instance members, universal transaction methods, utility groups, readonly/optional markers and constants. Behavior/default/deployment changes need the written session review." +} diff --git a/plan/agw/research/preset-live-2026-10-15/build.log b/plan/agw/research/preset-live-2026-10-15/build.log new file mode 100644 index 00000000..cdeb4133 --- /dev/null +++ b/plan/agw/research/preset-live-2026-10-15/build.log @@ -0,0 +1,13 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:34057) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core + + diff --git a/plan/agw/research/preset-live-2026-10-15/lint.log b/plan/agw/research/preset-live-2026-10-15/lint.log new file mode 100644 index 00000000..d062426e --- /dev/null +++ b/plan/agw/research/preset-live-2026-10-15/lint.log @@ -0,0 +1,20 @@ + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts + 46:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 54:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 114:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 189:4 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 191:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 198:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 217:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 219:32 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 230:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 287:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/presets.spec.ts + 156:10 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 170:3 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 171:4 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +✖ 13 problems (0 errors, 13 warnings) + diff --git a/plan/agw/research/preset-live-2026-10-15/live-evidence.jsonl b/plan/agw/research/preset-live-2026-10-15/live-evidence.jsonl new file mode 100644 index 00000000..ed2212d1 --- /dev/null +++ b/plan/agw/research/preset-live-2026-10-15/live-evidence.jsonl @@ -0,0 +1,8 @@ +{"name": "preset-uniswap-live", "at": "2026-10-15T02:00:31.874Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "wallet": "0xAF1B9f6f6886E5B5285Bafa7b5d87b1B5A79644E", "cea": "0x35143BA539fF5D08D1bcBdB4C9497A0E689F4240", "rulesId": "0x1a4ebcc3cd970147b1245f25382d829cfebb4faae7907b24357e5febc8528963", "pool": "0x3289680dD4d6C10bb19b899729cda5eEF58AEfF1", "prerequisiteBlock": "11917290", "wrapTx": "0xc114250b2a72346e8769cbcf87d48f2a91fd50738bdeedbcfe43fc81e0d1dae1", "wrapExternal": "0x51ea353350c19a24c790c314c5ddff2df46d5f13c06b9a229bb143baa97ca41e", "pushTx": "0x43205feedddf38d0cbeb6196d35d30842af81c3c38b80f2b5fdcb77f04e3c442", "externalTx": "0x8947cea1b51592f2fc81deecc20ae544dad411bc2a4ff28a50567fff31816a5d", "amountIn": "1000000000000", "amountOut": "45586"} +{"name": "preset-aave-stage", "at": "2026-10-15T02:09:22.276Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "stage": "mint-submitted", "wallet": "0x6b109E94A8fdEe0569F49d0C9E9CEAE5a059b6DF", "cea": "0xc7DF2D3D45EF0cE6a77faDB902009F1874C32Aa4", "pushTx": "0x8b08b6a71a13de857e98b833625165a1d5ee8ecf17948078b822aad07720a541"} +{"name": "preset-aave-stage", "at": "2026-10-15T02:10:52.152Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "stage": "mint-completed", "wallet": "0x6b109E94A8fdEe0569F49d0C9E9CEAE5a059b6DF", "cea": "0xc7DF2D3D45EF0cE6a77faDB902009F1874C32Aa4", "externalTx": "0xfcca437b61ee2689e0f1d69807aa65d4c0bd1d92466a2453c8258de81311cdeb"} +{"name": "preset-aave-stage", "at": "2026-10-15T02:11:00.956Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "stage": "supply-submitted", "wallet": "0x6b109E94A8fdEe0569F49d0C9E9CEAE5a059b6DF", "cea": "0xc7DF2D3D45EF0cE6a77faDB902009F1874C32Aa4", "pushTx": "0x1e96a7b1f2d31ab88d6530ef6de9d4fdaf239eeb64f305773750eb54c86739a9"} +{"name": "preset-aave-stage", "at": "2026-10-15T02:12:09.280Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "stage": "supply-completed", "wallet": "0x6b109E94A8fdEe0569F49d0C9E9CEAE5a059b6DF", "cea": "0xc7DF2D3D45EF0cE6a77faDB902009F1874C32Aa4", "externalTx": "0x02782e8343a429db7548e9fe973f2869cda0376ad89fa1e1d84caf9a27d9bc8a"} +{"name": "preset-aave-stage", "at": "2026-10-15T02:12:20.943Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "stage": "withdraw-submitted", "wallet": "0x6b109E94A8fdEe0569F49d0C9E9CEAE5a059b6DF", "cea": "0xc7DF2D3D45EF0cE6a77faDB902009F1874C32Aa4", "pushTx": "0x7dcc019ae3c0683052e1cab3b7e373ab18b85f199b2c15afb0b729d743e51a1d"} +{"name": "preset-aave-stage", "at": "2026-10-15T02:13:18.389Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "stage": "withdraw-completed", "wallet": "0x6b109E94A8fdEe0569F49d0C9E9CEAE5a059b6DF", "cea": "0xc7DF2D3D45EF0cE6a77faDB902009F1874C32Aa4", "externalTx": "0x9a93286cf1803bd8572ad4a838ee63e6f5d8bdc4b63ffc2db0c7e0b9d14be7fd"} +{"name": "preset-aave-live", "at": "2026-10-15T02:13:18.672Z", "network": "TESTNET_DONUT", "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", "wallet": "0x6b109E94A8fdEe0569F49d0C9E9CEAE5a059b6DF", "cea": "0xc7DF2D3D45EF0cE6a77faDB902009F1874C32Aa4", "rulesId": "0xc5f18cd898ba56f4de71a607985b69859edfd28bc28a34111887652602f267dc", "mockLINK": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", "pool": "0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951", "mintTx": "0x8b08b6a71a13de857e98b833625165a1d5ee8ecf17948078b822aad07720a541", "mintExternal": "0xfcca437b61ee2689e0f1d69807aa65d4c0bd1d92466a2453c8258de81311cdeb", "supplyTx": "0x1e96a7b1f2d31ab88d6530ef6de9d4fdaf239eeb64f305773750eb54c86739a9", "supplyExternal": "0x02782e8343a429db7548e9fe973f2869cda0376ad89fa1e1d84caf9a27d9bc8a", "withdrawTx": "0x7dcc019ae3c0683052e1cab3b7e373ab18b85f199b2c15afb0b729d743e51a1d", "withdrawExternal": "0x9a93286cf1803bd8572ad4a838ee63e6f5d8bdc4b63ffc2db0c7e0b9d14be7fd", "amount": "1000000000000"} diff --git a/plan/agw/research/preset-live-2026-10-15/preflight.log b/plan/agw/research/preset-live-2026-10-15/preflight.log new file mode 100644 index 00000000..7f935e2e --- /dev/null +++ b/plan/agw/research/preset-live-2026-10-15/preflight.log @@ -0,0 +1,20 @@ +AGW deployment manifest verified on-chain. + +Wallets + EVM master (Sepolia) 0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf + Push master (Donut) 0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf + Solana master (Devnet) 3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb + Shared UEA (Donut) 0x5C70C864Cf1aDfB04A0e107fFA248ba3600EAb8D + UEA CEA PDA (Devnet) Fqp8UeJxEWvN1Ciu5jqrA3opGXwNvRL2HfJxNQotj3Qh + +Group "agw-presets" — 1 scenarios, headroom ×1.25. + +┌─────────────────────┬───────┬──────────┬─────────────┬────────┐ +│ Scope │ Asset │ Need │ Have │ Status │ +├─────────────────────┼───────┼──────────┼─────────────┼────────┤ +│ Push master (Donut) │ PC │ 95.7500 │ 969150.1424 │ ✓ │ +│ Push master (Donut) │ pETH │ 0.000003 │ 434.3115 │ ✓ │ +└─────────────────────┴───────┴──────────┴─────────────┴────────┘ + +All master wallets can cover this run. +Derived accounts are already at target. Ready to run. diff --git a/plan/agw/research/preset-live-2026-10-15/preset-focused.log b/plan/agw/research/preset-live-2026-10-15/preset-focused.log new file mode 100644 index 00000000..1899543c --- /dev/null +++ b/plan/agw/research/preset-live-2026-10-15/preset-focused.log @@ -0,0 +1,8 @@ +PASS core packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts + +Test Suites: 2 passed, 2 total +Tests: 44 passed, 44 total +Snapshots: 0 total +Time: 2.029 s +Ran all test suites within paths "packages/core/src/lib/agentic/__tests__/presets.spec.ts", "packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts". diff --git a/plan/agw/research/preset-live-2026-10-15/scenario-selection.log b/plan/agw/research/preset-live-2026-10-15/scenario-selection.log new file mode 100644 index 00000000..19f2b167 --- /dev/null +++ b/plan/agw/research/preset-live-2026-10-15/scenario-selection.log @@ -0,0 +1,5 @@ +✓ agw-preset-uniswap-live 1 test +✓ agw-preset-aave-live 1 test + +2 scenarios, 1 spec files, 2 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/research/preset-live-2026-10-15/uniswap-live.log b/plan/agw/research/preset-live-2026-10-15/uniswap-live.log new file mode 100644 index 00000000..7c474c3a --- /dev/null +++ b/plan/agw/research/preset-live-2026-10-15/uniswap-live.log @@ -0,0 +1,12 @@ +Running 1 scenarios (group: agw-presets) across 1 spec files. + +PASS core-e2e __e2e__/agw/presets-live.spec.ts (217.711 s) + agw presets live + ✓ 1. Uniswap preset swaps from the wallet CEA and rejects a different recipient (212684 ms) + +Test Suites: 1 passed, 1 total +Tests: 1 passed, 1 total +Snapshots: 0 total +Time: 217.735 s +Ran all test suites within paths "__e2e__/agw/presets-live.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/preset-live-2026-10-15/unit.log b/plan/agw/research/preset-live-2026-10-15/unit.log new file mode 100644 index 00000000..1c91bfaa --- /dev/null +++ b/plan/agw/research/preset-live-2026-10-15/unit.log @@ -0,0 +1,177 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/public-rule.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/labels.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts + +Test Suites: 1 skipped, 124 passed, 124 of 125 total +Tests: 12 skipped, 2096 passed, 2108 total +Snapshots: 0 total +Time: 25.163 s +Ran all test suites. diff --git a/plan/agw/research/preset-mainnet-2026-10-15/AaveV3Arbitrum.sol b/plan/agw/research/preset-mainnet-2026-10-15/AaveV3Arbitrum.sol new file mode 100644 index 00000000..1c8b2838 --- /dev/null +++ b/plan/agw/research/preset-mainnet-2026-10-15/AaveV3Arbitrum.sol @@ -0,0 +1,613 @@ +// AUTOGENERATED - MANUAL CHANGES WILL BE REVERTED BY THE GENERATOR +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.0; + +import {IPoolAddressesProvider, IPool, IPoolConfigurator, IAaveOracle, IPoolDataProvider, IACLManager, ICollector} from './AaveV3.sol'; +library AaveV3Arbitrum { + // https://arbiscan.io/address/0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb + IPoolAddressesProvider internal constant POOL_ADDRESSES_PROVIDER = + IPoolAddressesProvider(0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb); + + // https://arbiscan.io/address/0x794a61358D6845594F94dc1DB02A252b5b4814aD + IPool internal constant POOL = IPool(0x794a61358D6845594F94dc1DB02A252b5b4814aD); + + // https://arbiscan.io/address/0x8145eddDf43f50276641b55bd3AD95944510021E + IPoolConfigurator internal constant POOL_CONFIGURATOR = + IPoolConfigurator(0x8145eddDf43f50276641b55bd3AD95944510021E); + + // https://arbiscan.io/address/0xb56c2F0B653B2e0b10C9b928C8580Ac5Df02C7C7 + IAaveOracle internal constant ORACLE = IAaveOracle(0xb56c2F0B653B2e0b10C9b928C8580Ac5Df02C7C7); + + // https://arbiscan.io/address/0xFF1137243698CaA18EE364Cc966CF0e02A4e6327 + address internal constant ACL_ADMIN = 0xFF1137243698CaA18EE364Cc966CF0e02A4e6327; + + // https://arbiscan.io/address/0xa72636CbcAa8F5FF95B2cc47F3CDEe83F3294a0B + IACLManager internal constant ACL_MANAGER = + IACLManager(0xa72636CbcAa8F5FF95B2cc47F3CDEe83F3294a0B); + + // https://arbiscan.io/address/0x243Aa95cAC2a25651eda86e80bEe66114413c43b + IPoolDataProvider internal constant AAVE_PROTOCOL_DATA_PROVIDER = + IPoolDataProvider(0x243Aa95cAC2a25651eda86e80bEe66114413c43b); + + // https://arbiscan.io/address/0xF05Fd3cC911b4c5E36e53c00354F645E22922C9A + address internal constant POOL_IMPL = 0xF05Fd3cC911b4c5E36e53c00354F645E22922C9A; + + // https://arbiscan.io/address/0xFF42Ce30054dcE7dc7C1282a9a497aa58eaBCe99 + address internal constant POOL_CONFIGURATOR_IMPL = 0xFF42Ce30054dcE7dc7C1282a9a497aa58eaBCe99; + + // https://arbiscan.io/address/0x929EC64c34a17401F460460D4B9390518E5B473e + address internal constant DEFAULT_INCENTIVES_CONTROLLER = + 0x929EC64c34a17401F460460D4B9390518E5B473e; + + // https://arbiscan.io/address/0x048f2228D7Bf6776f99aB50cB1b1eaB4D1d4cA73 + address internal constant EMISSION_MANAGER = 0x048f2228D7Bf6776f99aB50cB1b1eaB4D1d4cA73; + + // https://arbiscan.io/address/0x053D55f9B5AF8694c503EB288a1B7E552f590710 + ICollector internal constant COLLECTOR = ICollector(0x053D55f9B5AF8694c503EB288a1B7E552f590710); + + // https://arbiscan.io/address/0xadcb7e98A462AA2375D03145083eE68A2148F077 + address internal constant DEFAULT_A_TOKEN_IMPL = 0xadcb7e98A462AA2375D03145083eE68A2148F077; + + // https://arbiscan.io/address/0xC0442C25FE517ac37D6a0D485446307D97d24712 + address internal constant DEFAULT_VARIABLE_DEBT_TOKEN_IMPL = + 0xC0442C25FE517ac37D6a0D485446307D97d24712; + + // https://arbiscan.io/address/0xC5762E5A5c12886D4F6768549A9C605823d029E9 + address internal constant RISK_STEWARD = 0xC5762E5A5c12886D4F6768549A9C605823d029E9; + + // https://arbiscan.io/address/0x3Be327F22eB4BD8042e6944073b8826dCf357Aa2 + address internal constant RISK_COUNCIL = 0x3Be327F22eB4BD8042e6944073b8826dCf357Aa2; + + // https://arbiscan.io/address/0x085E34722e04567Df9E6d2c32e82fd74f3342e79 + address internal constant EDGE_RISK_STEWARD_CAPS = 0x085E34722e04567Df9E6d2c32e82fd74f3342e79; + + // https://arbiscan.io/address/0x35d53dEB2F6f40Ea7af32B6F8BEd88eA966DF1D9 + address internal constant EDGE_INJECTOR_CAPS = 0x35d53dEB2F6f40Ea7af32B6F8BEd88eA966DF1D9; + + // https://arbiscan.io/address/0x861eeAdB55E41f161F31Acb1BFD4c70E3a964Aed + address internal constant EDGE_RISK_ORACLE = 0x861eeAdB55E41f161F31Acb1BFD4c70E3a964Aed; + + // https://arbiscan.io/address/0x63dfa7c09Dc2Ff4030d6B8Dc2ce6262BF898C8A4 + address internal constant DEBT_SWAP_ADAPTER = 0x63dfa7c09Dc2Ff4030d6B8Dc2ce6262BF898C8A4; + + // https://arbiscan.io/address/0x9abADECD08572e0eA5aF4d47A9C7984a5AA503dC + address internal constant L2_ENCODER = 0x9abADECD08572e0eA5aF4d47A9C7984a5AA503dC; + + // https://arbiscan.io/address/0xFaEe011b679330A42fFc33c6444800F78b69Dc58 + address internal constant CONFIG_ENGINE = 0xFaEe011b679330A42fFc33c6444800F78b69Dc58; + + // https://arbiscan.io/address/0x770ef9f4fe897e59daCc474EF11238303F9552b6 + address internal constant POOL_ADDRESSES_PROVIDER_REGISTRY = + 0x770ef9f4fe897e59daCc474EF11238303F9552b6; + + // https://arbiscan.io/address/0xcC47c4Fe1F7f29ff31A8b62197023aC8553C7896 + address internal constant RATES_FACTORY = 0xcC47c4Fe1F7f29ff31A8b62197023aC8553C7896; + + // https://arbiscan.io/address/0xE28E2c8d240dd5eBd0adcab86fbD79df7a052034 + address internal constant REPAY_WITH_COLLATERAL_ADAPTER = + 0xE28E2c8d240dd5eBd0adcab86fbD79df7a052034; + + // https://arbiscan.io/address/0x411D79b8cC43384FDE66CaBf9b6a17180c842511 + address internal constant LEGACY_STATIC_A_TOKEN_FACTORY = + 0x411D79b8cC43384FDE66CaBf9b6a17180c842511; + + // https://arbiscan.io/address/0xD61BF98649EA8F8D09e184184777b1867F00E5CB + address internal constant LEGACY_STATIC_A_TOKEN_ORACLE = + 0xD61BF98649EA8F8D09e184184777b1867F00E5CB; + + // https://arbiscan.io/address/0xF3C3F14dd7BDb7E03e6EBc3bc5Ffc6D66De12251 + address internal constant SWAP_COLLATERAL_ADAPTER = 0xF3C3F14dd7BDb7E03e6EBc3bc5Ffc6D66De12251; + + // https://arbiscan.io/address/0x68100bD5345eA474D93577127C11F39FF8463e93 + address internal constant UI_INCENTIVE_DATA_PROVIDER = 0x68100bD5345eA474D93577127C11F39FF8463e93; + + // https://arbiscan.io/address/0x91E04cf78e53aEBe609e8a7f2003e7EECD743F2B + address internal constant UI_POOL_DATA_PROVIDER = 0x91E04cf78e53aEBe609e8a7f2003e7EECD743F2B; + + // https://arbiscan.io/address/0xBc790382B3686abffE4be14A030A96aC6154023a + address internal constant WALLET_BALANCE_PROVIDER = 0xBc790382B3686abffE4be14A030A96aC6154023a; + + // https://arbiscan.io/address/0x5283BEcEd7ADF6D003225C13896E536f2D4264FF + address internal constant WETH_GATEWAY = 0x5283BEcEd7ADF6D003225C13896E536f2D4264FF; + + // https://arbiscan.io/address/0x5598BbFA2f4fE8151f45bBA0a3edE1b54B51a0a9 + address internal constant WITHDRAW_SWAP_ADAPTER = 0x5598BbFA2f4fE8151f45bBA0a3edE1b54B51a0a9; + + // https://arbiscan.io/address/0xd85922fFF51ba4130cEC7c499db4Ac3Eb9981EaD + address internal constant STATA_FACTORY = 0xd85922fFF51ba4130cEC7c499db4Ac3Eb9981EaD; + + // https://arbiscan.io/address/0x897c76905A3d17F71d5ea033916B65154Cf4b4f0 + address internal constant DUST_BIN = 0x897c76905A3d17F71d5ea033916B65154Cf4b4f0; + + // https://arbiscan.io/address/0x7B58055fC6bE4B23cF8c9287b7d3C4adBE919a9c + address internal constant CLINIC_STEWARD = 0x7B58055fC6bE4B23cF8c9287b7d3C4adBE919a9c; + + // https://arbiscan.io/address/0xfB1D12D7C9c3Eb6b40fe0502801CdFCE816a0d18 + address internal constant POOL_EXPOSURE_STEWARD = 0xfB1D12D7C9c3Eb6b40fe0502801CdFCE816a0d18; +} +library AaveV3ArbitrumAssets { + // https://arbiscan.io/address/0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1 + address internal constant DAI_UNDERLYING = 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1; + + uint8 internal constant DAI_DECIMALS = 18; + + // https://arbiscan.io/address/0x82E64f49Ed5EC1bC6e43DAD4FC8Af9bb3A2312EE + address internal constant DAI_A_TOKEN = 0x82E64f49Ed5EC1bC6e43DAD4FC8Af9bb3A2312EE; + + // https://arbiscan.io/address/0x8619d80FB0141ba7F184CbF22fd724116D9f7ffC + address internal constant DAI_V_TOKEN = 0x8619d80FB0141ba7F184CbF22fd724116D9f7ffC; + + // https://arbiscan.io/address/0xF44a2B5605b07a1CBA7CF3907A9D0bB4A515C3F1 + address internal constant DAI_ORACLE = 0xF44a2B5605b07a1CBA7CF3907A9D0bB4A515C3F1; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant DAI_INTEREST_RATE_STRATEGY = 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0xc91c5297d7E161aCC74b482aAfCc75B85cc0bfeD + address internal constant DAI_STATIC_A_TOKEN = 0xc91c5297d7E161aCC74b482aAfCc75B85cc0bfeD; + + // https://arbiscan.io/address/0xf253BD61aEd0E9D62523eA76CD6F38B4a51dA145 + address internal constant DAI_STATA_TOKEN = 0xf253BD61aEd0E9D62523eA76CD6F38B4a51dA145; + + // https://arbiscan.io/address/0xf97f4df75117a78c1A5a0DBb814Af92458539FB4 + address internal constant LINK_UNDERLYING = 0xf97f4df75117a78c1A5a0DBb814Af92458539FB4; + + uint8 internal constant LINK_DECIMALS = 18; + + // https://arbiscan.io/address/0x191c10Aa4AF7C30e871E70C95dB0E4eb77237530 + address internal constant LINK_A_TOKEN = 0x191c10Aa4AF7C30e871E70C95dB0E4eb77237530; + + // https://arbiscan.io/address/0x953A573793604aF8d41F306FEb8274190dB4aE0e + address internal constant LINK_V_TOKEN = 0x953A573793604aF8d41F306FEb8274190dB4aE0e; + + // https://arbiscan.io/address/0x2C1C5eaB455A91cEAD280B12650faaA7bfDd59e6 + address internal constant LINK_ORACLE = 0x2C1C5eaB455A91cEAD280B12650faaA7bfDd59e6; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant LINK_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0x27dE098EF2772386cBCf1a4c8BEb886368b7F9a9 + address internal constant LINK_STATIC_A_TOKEN = 0x27dE098EF2772386cBCf1a4c8BEb886368b7F9a9; + + // https://arbiscan.io/address/0xEAB84053B99f2ec4433F5121A1CB1524c8c998F8 + address internal constant LINK_STATA_TOKEN = 0xEAB84053B99f2ec4433F5121A1CB1524c8c998F8; + + // https://arbiscan.io/address/0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8 + address internal constant USDCe_UNDERLYING = 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8; + + uint8 internal constant USDCe_DECIMALS = 6; + + // https://arbiscan.io/address/0x625E7708f30cA75bfd92586e17077590C60eb4cD + address internal constant USDCe_A_TOKEN = 0x625E7708f30cA75bfd92586e17077590C60eb4cD; + + // https://arbiscan.io/address/0xFCCf3cAbbe80101232d343252614b6A3eE81C989 + address internal constant USDCe_V_TOKEN = 0xFCCf3cAbbe80101232d343252614b6A3eE81C989; + + // https://arbiscan.io/address/0xB0C9A7122aaB68F75CffD9851E867144DBFF113b + address internal constant USDCe_ORACLE = 0xB0C9A7122aaB68F75CffD9851E867144DBFF113b; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant USDCe_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0x0Bc9E52051f553E75550CA22C196bf132c52Cf0B + address internal constant USDCe_STATIC_A_TOKEN = 0x0Bc9E52051f553E75550CA22C196bf132c52Cf0B; + + // https://arbiscan.io/address/0xE6D5923281c89DC989D00817387292387552d5C1 + address internal constant USDCe_STATA_TOKEN = 0xE6D5923281c89DC989D00817387292387552d5C1; + + // https://arbiscan.io/address/0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f + address internal constant WBTC_UNDERLYING = 0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f; + + uint8 internal constant WBTC_DECIMALS = 8; + + // https://arbiscan.io/address/0x078f358208685046a11C85e8ad32895DED33A249 + address internal constant WBTC_A_TOKEN = 0x078f358208685046a11C85e8ad32895DED33A249; + + // https://arbiscan.io/address/0x92b42c66840C7AD907b4BF74879FF3eF7c529473 + address internal constant WBTC_V_TOKEN = 0x92b42c66840C7AD907b4BF74879FF3eF7c529473; + + // https://arbiscan.io/address/0xDe4Af8b4747192Ea29339D0FeB36d9830d399134 + address internal constant WBTC_ORACLE = 0xDe4Af8b4747192Ea29339D0FeB36d9830d399134; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant WBTC_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0x32B95Fbe04e5a51cF99FeeF4e57Cf7e3FC9c5A93 + address internal constant WBTC_STATIC_A_TOKEN = 0x32B95Fbe04e5a51cF99FeeF4e57Cf7e3FC9c5A93; + + // https://arbiscan.io/address/0x52Dc1FEeFA4f9a99221F93D79da46Ae89b8c0967 + address internal constant WBTC_STATA_TOKEN = 0x52Dc1FEeFA4f9a99221F93D79da46Ae89b8c0967; + + // https://arbiscan.io/address/0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 + address internal constant WETH_UNDERLYING = 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1; + + uint8 internal constant WETH_DECIMALS = 18; + + // https://arbiscan.io/address/0xe50fA9b3c56FfB159cB0FCA61F5c9D750e8128c8 + address internal constant WETH_A_TOKEN = 0xe50fA9b3c56FfB159cB0FCA61F5c9D750e8128c8; + + // https://arbiscan.io/address/0x0c84331e39d6658Cd6e6b9ba04736cC4c4734351 + address internal constant WETH_V_TOKEN = 0x0c84331e39d6658Cd6e6b9ba04736cC4c4734351; + + // https://arbiscan.io/address/0xbD41b1548a5A06544cBcf87c0c54864312842C00 + address internal constant WETH_ORACLE = 0xbD41b1548a5A06544cBcf87c0c54864312842C00; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant WETH_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0x352F3475716261dCC991Bd5F2aF973eB3D0F5878 + address internal constant WETH_STATIC_A_TOKEN = 0x352F3475716261dCC991Bd5F2aF973eB3D0F5878; + + // https://arbiscan.io/address/0x4cE13a79f45C1Be00BdABD38B764aC28C082704E + address internal constant WETH_STATA_TOKEN = 0x4cE13a79f45C1Be00BdABD38B764aC28C082704E; + + // https://arbiscan.io/address/0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9 + address internal constant USDT_UNDERLYING = 0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9; + + uint8 internal constant USDT_DECIMALS = 6; + + // https://arbiscan.io/address/0x6ab707Aca953eDAeFBc4fD23bA73294241490620 + address internal constant USDT_A_TOKEN = 0x6ab707Aca953eDAeFBc4fD23bA73294241490620; + + // https://arbiscan.io/address/0xfb00AC187a8Eb5AFAE4eACE434F493Eb62672df7 + address internal constant USDT_V_TOKEN = 0xfb00AC187a8Eb5AFAE4eACE434F493Eb62672df7; + + // https://arbiscan.io/address/0x03f1203a32DF3a941D41dE07F5fD2E71D2a70172 + address internal constant USDT_ORACLE = 0x03f1203a32DF3a941D41dE07F5fD2E71D2a70172; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant USDT_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0xb165a74407fE1e519d6bCbDeC1Ed3202B35a4140 + address internal constant USDT_STATIC_A_TOKEN = 0xb165a74407fE1e519d6bCbDeC1Ed3202B35a4140; + + // https://arbiscan.io/address/0xa6D12574eFB239FC1D2099732bd8b5dC6306897F + address internal constant USDT_STATA_TOKEN = 0xa6D12574eFB239FC1D2099732bd8b5dC6306897F; + + // https://arbiscan.io/address/0xba5DdD1f9d7F570dc94a51479a000E3BCE967196 + address internal constant AAVE_UNDERLYING = 0xba5DdD1f9d7F570dc94a51479a000E3BCE967196; + + uint8 internal constant AAVE_DECIMALS = 18; + + // https://arbiscan.io/address/0xf329e36C7bF6E5E86ce2150875a84Ce77f477375 + address internal constant AAVE_A_TOKEN = 0xf329e36C7bF6E5E86ce2150875a84Ce77f477375; + + // https://arbiscan.io/address/0xE80761Ea617F66F96274eA5e8c37f03960ecC679 + address internal constant AAVE_V_TOKEN = 0xE80761Ea617F66F96274eA5e8c37f03960ecC679; + + // https://arbiscan.io/address/0xf97eEAac36bdd096bb2445c7582F9095bfCE04C7 + address internal constant AAVE_ORACLE = 0xf97eEAac36bdd096bb2445c7582F9095bfCE04C7; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant AAVE_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0x1C0c8EcED17aE093b3C1a1a8fFeBE2E9513a9346 + address internal constant AAVE_STATIC_A_TOKEN = 0x1C0c8EcED17aE093b3C1a1a8fFeBE2E9513a9346; + + // https://arbiscan.io/address/0xd3642A6e9fa95961130497727DC3aE6c38D625E7 + address internal constant AAVE_STATA_TOKEN = 0xd3642A6e9fa95961130497727DC3aE6c38D625E7; + + // https://arbiscan.io/address/0xD22a58f79e9481D1a88e00c343885A588b34b68B + address internal constant EURS_UNDERLYING = 0xD22a58f79e9481D1a88e00c343885A588b34b68B; + + uint8 internal constant EURS_DECIMALS = 2; + + // https://arbiscan.io/address/0x6d80113e533a2C0fe82EaBD35f1875DcEA89Ea97 + address internal constant EURS_A_TOKEN = 0x6d80113e533a2C0fe82EaBD35f1875DcEA89Ea97; + + // https://arbiscan.io/address/0x4a1c3aD6Ed28a636ee1751C69071f6be75DEb8B8 + address internal constant EURS_V_TOKEN = 0x4a1c3aD6Ed28a636ee1751C69071f6be75DEb8B8; + + // https://arbiscan.io/address/0xA14d53bC1F1c0F31B4aA3BD109344E5009051a84 + address internal constant EURS_ORACLE = 0xA14d53bC1F1c0F31B4aA3BD109344E5009051a84; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant EURS_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0x9a40747BE51185A416B181789B671E78a8d045dD + address internal constant EURS_STATIC_A_TOKEN = 0x9a40747BE51185A416B181789B671E78a8d045dD; + + // https://arbiscan.io/address/0x5979D7b546E38E414F7E9822514be443A4800529 + address internal constant wstETH_UNDERLYING = 0x5979D7b546E38E414F7E9822514be443A4800529; + + uint8 internal constant wstETH_DECIMALS = 18; + + // https://arbiscan.io/address/0x513c7E3a9c69cA3e22550eF58AC1C0088e918FFf + address internal constant wstETH_A_TOKEN = 0x513c7E3a9c69cA3e22550eF58AC1C0088e918FFf; + + // https://arbiscan.io/address/0x77CA01483f379E58174739308945f044e1a764dc + address internal constant wstETH_V_TOKEN = 0x77CA01483f379E58174739308945f044e1a764dc; + + // https://arbiscan.io/address/0xb4a28DF1b926646f94e6fE6f15828c491b4def5F + address internal constant wstETH_ORACLE = 0xb4a28DF1b926646f94e6fE6f15828c491b4def5F; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant wstETH_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0x7775d4Ae4Dbb79a624fB96AAcDB8Ca74F671c0DF + address internal constant wstETH_STATIC_A_TOKEN = 0x7775d4Ae4Dbb79a624fB96AAcDB8Ca74F671c0DF; + + // https://arbiscan.io/address/0xe98fc055c99DECD8Da0c111B090885d5d15C774E + address internal constant wstETH_STATA_TOKEN = 0xe98fc055c99DECD8Da0c111B090885d5d15C774E; + + // https://arbiscan.io/address/0x3F56e0c36d275367b8C502090EDF38289b3dEa0d + address internal constant MAI_UNDERLYING = 0x3F56e0c36d275367b8C502090EDF38289b3dEa0d; + + uint8 internal constant MAI_DECIMALS = 18; + + // https://arbiscan.io/address/0xc45A479877e1e9Dfe9FcD4056c699575a1045dAA + address internal constant MAI_A_TOKEN = 0xc45A479877e1e9Dfe9FcD4056c699575a1045dAA; + + // https://arbiscan.io/address/0x34e2eD44EF7466D5f9E0b782B5c08b57475e7907 + address internal constant MAI_V_TOKEN = 0x34e2eD44EF7466D5f9E0b782B5c08b57475e7907; + + // https://arbiscan.io/address/0x80e8F4b3698A079d7f2397cd71ab4bb17a12924e + address internal constant MAI_ORACLE = 0x80e8F4b3698A079d7f2397cd71ab4bb17a12924e; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant MAI_INTEREST_RATE_STRATEGY = 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0xB4a0a2692D82301703B27082Cda45B083F68CAcE + address internal constant MAI_STATIC_A_TOKEN = 0xB4a0a2692D82301703B27082Cda45B083F68CAcE; + + // https://arbiscan.io/address/0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8 + address internal constant rETH_UNDERLYING = 0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8; + + uint8 internal constant rETH_DECIMALS = 18; + + // https://arbiscan.io/address/0x8Eb270e296023E9D92081fdF967dDd7878724424 + address internal constant rETH_A_TOKEN = 0x8Eb270e296023E9D92081fdF967dDd7878724424; + + // https://arbiscan.io/address/0xCE186F6Cccb0c955445bb9d10C59caE488Fea559 + address internal constant rETH_V_TOKEN = 0xCE186F6Cccb0c955445bb9d10C59caE488Fea559; + + // https://arbiscan.io/address/0x0E82D4e66B8C41c532184BCd0d89781c0040d07A + address internal constant rETH_ORACLE = 0x0E82D4e66B8C41c532184BCd0d89781c0040d07A; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant rETH_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0x68235105d6d33A19369D24b746cb7481FB2b34fd + address internal constant rETH_STATIC_A_TOKEN = 0x68235105d6d33A19369D24b746cb7481FB2b34fd; + + // https://arbiscan.io/address/0xbB8A61425DFE172AA3a6f882aAFaBA00B32b7d59 + address internal constant rETH_STATA_TOKEN = 0xbB8A61425DFE172AA3a6f882aAFaBA00B32b7d59; + + // https://arbiscan.io/address/0x93b346b6BC2548dA6A1E7d98E9a421B42541425b + address internal constant LUSD_UNDERLYING = 0x93b346b6BC2548dA6A1E7d98E9a421B42541425b; + + uint8 internal constant LUSD_DECIMALS = 18; + + // https://arbiscan.io/address/0x8ffDf2DE812095b1D19CB146E4c004587C0A0692 + address internal constant LUSD_A_TOKEN = 0x8ffDf2DE812095b1D19CB146E4c004587C0A0692; + + // https://arbiscan.io/address/0xA8669021776Bc142DfcA87c21b4A52595bCbB40a + address internal constant LUSD_V_TOKEN = 0xA8669021776Bc142DfcA87c21b4A52595bCbB40a; + + // https://arbiscan.io/address/0x0EB34b917D500a7736555f4508BFE77452cb261d + address internal constant LUSD_ORACLE = 0x0EB34b917D500a7736555f4508BFE77452cb261d; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant LUSD_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0xDbB6314b5b07E63B7101844c0346309B79f8C20A + address internal constant LUSD_STATIC_A_TOKEN = 0xDbB6314b5b07E63B7101844c0346309B79f8C20A; + + // https://arbiscan.io/address/0xaf88d065e77c8cC2239327C5EDb3A432268e5831 + address internal constant USDCn_UNDERLYING = 0xaf88d065e77c8cC2239327C5EDb3A432268e5831; + + uint8 internal constant USDCn_DECIMALS = 6; + + // https://arbiscan.io/address/0x724dc807b04555b71ed48a6896b6F41593b8C637 + address internal constant USDCn_A_TOKEN = 0x724dc807b04555b71ed48a6896b6F41593b8C637; + + // https://arbiscan.io/address/0xf611aEb5013fD2c0511c9CD55c7dc5C1140741A6 + address internal constant USDCn_V_TOKEN = 0xf611aEb5013fD2c0511c9CD55c7dc5C1140741A6; + + // https://arbiscan.io/address/0xB0C9A7122aaB68F75CffD9851E867144DBFF113b + address internal constant USDCn_ORACLE = 0xB0C9A7122aaB68F75CffD9851E867144DBFF113b; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant USDCn_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0x7CFaDFD5645B50bE87d546f42699d863648251ad + address internal constant USDCn_STATIC_A_TOKEN = 0x7CFaDFD5645B50bE87d546f42699d863648251ad; + + // https://arbiscan.io/address/0x7F6501d3B98eE91f9b9535E4b0ac710Fb0f9e0bc + address internal constant USDCn_STATA_TOKEN = 0x7F6501d3B98eE91f9b9535E4b0ac710Fb0f9e0bc; + + // https://arbiscan.io/address/0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F + address internal constant FRAX_UNDERLYING = 0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F; + + uint8 internal constant FRAX_DECIMALS = 18; + + // https://arbiscan.io/address/0x38d693cE1dF5AaDF7bC62595A37D667aD57922e5 + address internal constant FRAX_A_TOKEN = 0x38d693cE1dF5AaDF7bC62595A37D667aD57922e5; + + // https://arbiscan.io/address/0x5D557B07776D12967914379C71a1310e917C7555 + address internal constant FRAX_V_TOKEN = 0x5D557B07776D12967914379C71a1310e917C7555; + + // https://arbiscan.io/address/0xC3B102d52dB93fE3B22B356085C5854c6Bcc2091 + address internal constant FRAX_ORACLE = 0xC3B102d52dB93fE3B22B356085C5854c6Bcc2091; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant FRAX_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0x89AEc2023f89E26Dbb7eaa7a98fe3996f9d112A8 + address internal constant FRAX_STATIC_A_TOKEN = 0x89AEc2023f89E26Dbb7eaa7a98fe3996f9d112A8; + + // https://arbiscan.io/address/0x912CE59144191C1204E64559FE8253a0e49E6548 + address internal constant ARB_UNDERLYING = 0x912CE59144191C1204E64559FE8253a0e49E6548; + + uint8 internal constant ARB_DECIMALS = 18; + + // https://arbiscan.io/address/0x6533afac2E7BCCB20dca161449A13A32D391fb00 + address internal constant ARB_A_TOKEN = 0x6533afac2E7BCCB20dca161449A13A32D391fb00; + + // https://arbiscan.io/address/0x44705f578135cC5d703b4c9c122528C73Eb87145 + address internal constant ARB_V_TOKEN = 0x44705f578135cC5d703b4c9c122528C73Eb87145; + + // https://arbiscan.io/address/0x339a66699167D8bc7105C4B9772492D2576E5183 + address internal constant ARB_ORACLE = 0x339a66699167D8bc7105C4B9772492D2576E5183; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant ARB_INTEREST_RATE_STRATEGY = 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0x9b5637d7952BC9fa2D693aAE51f3103760Bf2693 + address internal constant ARB_STATIC_A_TOKEN = 0x9b5637d7952BC9fa2D693aAE51f3103760Bf2693; + + // https://arbiscan.io/address/0xf09EDbF2655B2A56753bD60D22CeAB2AC5D04188 + address internal constant ARB_STATA_TOKEN = 0xf09EDbF2655B2A56753bD60D22CeAB2AC5D04188; + + // https://arbiscan.io/address/0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe + address internal constant weETH_UNDERLYING = 0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe; + + uint8 internal constant weETH_DECIMALS = 18; + + // https://arbiscan.io/address/0x8437d7C167dFB82ED4Cb79CD44B7a32A1dd95c77 + address internal constant weETH_A_TOKEN = 0x8437d7C167dFB82ED4Cb79CD44B7a32A1dd95c77; + + // https://arbiscan.io/address/0x3ca5FA07689F266e907439aFd1fBB59c44fe12f6 + address internal constant weETH_V_TOKEN = 0x3ca5FA07689F266e907439aFd1fBB59c44fe12f6; + + // https://arbiscan.io/address/0x258a576895DC50c990500775d6591ff2D52059f2 + address internal constant weETH_ORACLE = 0x258a576895DC50c990500775d6591ff2D52059f2; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant weETH_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0xD9E3Ef2c12de90E3b03F7b7E3964956a71920d40 + address internal constant weETH_STATA_TOKEN = 0xD9E3Ef2c12de90E3b03F7b7E3964956a71920d40; + + // https://arbiscan.io/address/0x7dfF72693f6A4149b17e7C6314655f6A9F7c8B33 + address internal constant GHO_UNDERLYING = 0x7dfF72693f6A4149b17e7C6314655f6A9F7c8B33; + + uint8 internal constant GHO_DECIMALS = 18; + + // https://arbiscan.io/address/0xeBe517846d0F36eCEd99C735cbF6131e1fEB775D + address internal constant GHO_A_TOKEN = 0xeBe517846d0F36eCEd99C735cbF6131e1fEB775D; + + // https://arbiscan.io/address/0x18248226C16BF76c032817854E7C83a2113B4f06 + address internal constant GHO_V_TOKEN = 0x18248226C16BF76c032817854E7C83a2113B4f06; + + // https://arbiscan.io/address/0xB05984aD83C20b3ADE7bf97a9a0Cb539DDE28DBb + address internal constant GHO_ORACLE = 0xB05984aD83C20b3ADE7bf97a9a0Cb539DDE28DBb; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant GHO_INTEREST_RATE_STRATEGY = 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0xD9FBA68D89178e3538e708939332c79efC540179 + address internal constant GHO_STATIC_A_TOKEN = 0xD9FBA68D89178e3538e708939332c79efC540179; + + // https://arbiscan.io/address/0xD089B4cb88Dacf4e27be869A00e9f7e2E3C18193 + address internal constant GHO_STATA_TOKEN = 0xD089B4cb88Dacf4e27be869A00e9f7e2E3C18193; + + // https://arbiscan.io/address/0x2416092f143378750bb29b79eD961ab195CcEea5 + address internal constant ezETH_UNDERLYING = 0x2416092f143378750bb29b79eD961ab195CcEea5; + + uint8 internal constant ezETH_DECIMALS = 18; + + // https://arbiscan.io/address/0xEA1132120ddcDDA2F119e99Fa7A27a0d036F7Ac9 + address internal constant ezETH_A_TOKEN = 0xEA1132120ddcDDA2F119e99Fa7A27a0d036F7Ac9; + + // https://arbiscan.io/address/0x1fFD28689DA7d0148ff0fCB669e9f9f0Fc13a219 + address internal constant ezETH_V_TOKEN = 0x1fFD28689DA7d0148ff0fCB669e9f9f0Fc13a219; + + // https://arbiscan.io/address/0x3c4B37b69E7e1FFD1669fe085C74a89c6C79D908 + address internal constant ezETH_ORACLE = 0x3c4B37b69E7e1FFD1669fe085C74a89c6C79D908; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant ezETH_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0x4ff50C17df0D1b788d021ACd85039810a1aA68A1 + address internal constant ezETH_STATA_TOKEN = 0x4ff50C17df0D1b788d021ACd85039810a1aA68A1; + + // https://arbiscan.io/address/0x4186BFC76E2E237523CBC30FD220FE055156b41F + address internal constant rsETH_UNDERLYING = 0x4186BFC76E2E237523CBC30FD220FE055156b41F; + + uint8 internal constant rsETH_DECIMALS = 18; + + // https://arbiscan.io/address/0x6b030Ff3FB9956B1B69f475B77aE0d3Cf2CC5aFa + address internal constant rsETH_A_TOKEN = 0x6b030Ff3FB9956B1B69f475B77aE0d3Cf2CC5aFa; + + // https://arbiscan.io/address/0x80cA0d8C38d2e2BcbaB66aA1648Bd1C7160500FE + address internal constant rsETH_V_TOKEN = 0x80cA0d8C38d2e2BcbaB66aA1648Bd1C7160500FE; + + // https://arbiscan.io/address/0x9F54122B14dAf2211989446868B9aa1CF207292B + address internal constant rsETH_ORACLE = 0x9F54122B14dAf2211989446868B9aa1CF207292B; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant rsETH_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; + + // https://arbiscan.io/address/0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40 + address internal constant tBTC_UNDERLYING = 0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40; + + uint8 internal constant tBTC_DECIMALS = 18; + + // https://arbiscan.io/address/0x62fC96b27a510cF4977B59FF952Dc32378Cc221d + address internal constant tBTC_A_TOKEN = 0x62fC96b27a510cF4977B59FF952Dc32378Cc221d; + + // https://arbiscan.io/address/0xB5b46F918C2923fC7f26DB76e8a6A6e9C4347Cf9 + address internal constant tBTC_V_TOKEN = 0xB5b46F918C2923fC7f26DB76e8a6A6e9C4347Cf9; + + // https://arbiscan.io/address/0xDe4Af8b4747192Ea29339D0FeB36d9830d399134 + address internal constant tBTC_ORACLE = 0xDe4Af8b4747192Ea29339D0FeB36d9830d399134; + + // https://arbiscan.io/address/0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F + address internal constant tBTC_INTEREST_RATE_STRATEGY = + 0x429F16dBA3B9e1900087Cbaa7b50D38Bc60fB73F; +} +library AaveV3ArbitrumEModes { + uint8 internal constant NONE = 0; + + uint8 internal constant DAI_USDCe_USDT_EURS_USDCn__ = 1; + + uint8 internal constant WETH_wstETH_weETH__WETH = 2; + + uint8 internal constant ezETH__WETH_wstETH = 3; + + uint8 internal constant ezETH__USDT_USDCn = 4; + + uint8 internal constant rsETH__WETH_wstETH = 5; + + uint8 internal constant rsETH__USDCe_USDT = 6; + + uint8 internal constant wstETH__WETH = 7; + + uint8 internal constant AAVE__USDT_USDCn = 8; + + uint8 internal constant ARB__USDT_USDCn = 9; + + uint8 internal constant tBTC__USDT_USDCn = 10; +} +library AaveV3ArbitrumExternalLibraries { + // https://arbiscan.io/address/0x6D414cd0d5eAf8C43200ac0c325A7E2Ad83B8be6 + address internal constant FLASHLOAN_LOGIC = 0x6D414cd0d5eAf8C43200ac0c325A7E2Ad83B8be6; + + // https://arbiscan.io/address/0x52Da0ce88202D1542543598D1e1e27F0d344726A + address internal constant BORROW_LOGIC = 0x52Da0ce88202D1542543598D1e1e27F0d344726A; + + // https://arbiscan.io/address/0x96D5686812e33Ab509ECCDb38C89d15607B2a413 + address internal constant LIQUIDATION_LOGIC = 0x96D5686812e33Ab509ECCDb38C89d15607B2a413; + + // https://arbiscan.io/address/0xD70593841C57cbaA04957cc3EAcE95708e48853b + address internal constant POOL_LOGIC = 0xD70593841C57cbaA04957cc3EAcE95708e48853b; + + // https://arbiscan.io/address/0x584C7d8c4cb05304FE5Ac7fbc97f20A10Fb07564 + address internal constant SUPPLY_LOGIC = 0x584C7d8c4cb05304FE5Ac7fbc97f20A10Fb07564; +} diff --git a/plan/agw/research/preset-mainnet-2026-10-15/AaveV3BNB.sol b/plan/agw/research/preset-mainnet-2026-10-15/AaveV3BNB.sol new file mode 100644 index 00000000..f19bebe3 --- /dev/null +++ b/plan/agw/research/preset-mainnet-2026-10-15/AaveV3BNB.sol @@ -0,0 +1,303 @@ +// AUTOGENERATED - MANUAL CHANGES WILL BE REVERTED BY THE GENERATOR +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.0; + +import {IPoolAddressesProvider, IPool, IPoolConfigurator, IAaveOracle, IPoolDataProvider, IACLManager, ICollector} from './AaveV3.sol'; +library AaveV3BNB { + // https://bscscan.com/address/0xff75B6da14FfbbfD355Daf7a2731456b3562Ba6D + IPoolAddressesProvider internal constant POOL_ADDRESSES_PROVIDER = + IPoolAddressesProvider(0xff75B6da14FfbbfD355Daf7a2731456b3562Ba6D); + + // https://bscscan.com/address/0x6807dc923806fE8Fd134338EABCA509979a7e0cB + IPool internal constant POOL = IPool(0x6807dc923806fE8Fd134338EABCA509979a7e0cB); + + // https://bscscan.com/address/0x67bdF23C7fCE7C65fF7415Ba3F2520B45D6f9584 + IPoolConfigurator internal constant POOL_CONFIGURATOR = + IPoolConfigurator(0x67bdF23C7fCE7C65fF7415Ba3F2520B45D6f9584); + + // https://bscscan.com/address/0x39bc1bfDa2130d6Bb6DBEfd366939b4c7aa7C697 + IAaveOracle internal constant ORACLE = IAaveOracle(0x39bc1bfDa2130d6Bb6DBEfd366939b4c7aa7C697); + + // https://bscscan.com/address/0x9390B1735def18560c509E2d0bc090E9d6BA257a + address internal constant ACL_ADMIN = 0x9390B1735def18560c509E2d0bc090E9d6BA257a; + + // https://bscscan.com/address/0x2D97F8FA96886Fd923c065F5457F9DDd494e3877 + IACLManager internal constant ACL_MANAGER = + IACLManager(0x2D97F8FA96886Fd923c065F5457F9DDd494e3877); + + // https://bscscan.com/address/0xc90Df74A7c16245c5F5C5870327Ceb38Fe5d5328 + IPoolDataProvider internal constant AAVE_PROTOCOL_DATA_PROVIDER = + IPoolDataProvider(0xc90Df74A7c16245c5F5C5870327Ceb38Fe5d5328); + + // https://bscscan.com/address/0x5e2B0FcC5b9734C7Ec0A03401ee9e6805F783B6d + address internal constant POOL_IMPL = 0x5e2B0FcC5b9734C7Ec0A03401ee9e6805F783B6d; + + // https://bscscan.com/address/0xFF42Ce30054dcE7dc7C1282a9a497aa58eaBCe99 + address internal constant POOL_CONFIGURATOR_IMPL = 0xFF42Ce30054dcE7dc7C1282a9a497aa58eaBCe99; + + // https://bscscan.com/address/0xC206C2764A9dBF27d599613b8F9A63ACd1160ab4 + address internal constant DEFAULT_INCENTIVES_CONTROLLER = + 0xC206C2764A9dBF27d599613b8F9A63ACd1160ab4; + + // https://bscscan.com/address/0x6eD1c70aa357fB8a7e1Eac85aa59e33287Df8f85 + address internal constant EMISSION_MANAGER = 0x6eD1c70aa357fB8a7e1Eac85aa59e33287Df8f85; + + // https://bscscan.com/address/0x25Ec457d1778b0E5316e7f38f3c22baF413F1A8C + ICollector internal constant COLLECTOR = ICollector(0x25Ec457d1778b0E5316e7f38f3c22baF413F1A8C); + + // https://bscscan.com/address/0x7e199Fc666368d95B9EaEfA7D2d8081AcAb74134 + address internal constant DEFAULT_A_TOKEN_IMPL = 0x7e199Fc666368d95B9EaEfA7D2d8081AcAb74134; + + // https://bscscan.com/address/0x929CD8EE3d0b6e04324Ee1171D4f594a2c47166d + address internal constant DEFAULT_VARIABLE_DEBT_TOKEN_IMPL = + 0x929CD8EE3d0b6e04324Ee1171D4f594a2c47166d; + + // https://bscscan.com/address/0x42ca9E62C9B61d01Bb222d6E69f095eE98e61cE8 + address internal constant RISK_STEWARD = 0x42ca9E62C9B61d01Bb222d6E69f095eE98e61cE8; + + // https://bscscan.com/address/0x126dc589cc75f17385dD95516F3F1788d862E7bc + address internal constant RISK_COUNCIL = 0x126dc589cc75f17385dD95516F3F1788d862E7bc; + + // https://bscscan.com/address/0x5d4D4007A4c6336550DdAa2a7c0d5e7972eebd16 + address internal constant DEBT_SWAP_ADAPTER = 0x5d4D4007A4c6336550DdAa2a7c0d5e7972eebd16; + + // https://bscscan.com/address/0xAdDb96Fb6A795faf042DD25BD4710267C41D1F74 + address internal constant CONFIG_ENGINE = 0xAdDb96Fb6A795faf042DD25BD4710267C41D1F74; + + // https://bscscan.com/address/0x117684358D990E42Eb1649E7e8C4691951dc1E71 + address internal constant POOL_ADDRESSES_PROVIDER_REGISTRY = + 0x117684358D990E42Eb1649E7e8C4691951dc1E71; + + // https://bscscan.com/address/0x5598BbFA2f4fE8151f45bBA0a3edE1b54B51a0a9 + address internal constant REPAY_WITH_COLLATERAL_ADAPTER = + 0x5598BbFA2f4fE8151f45bBA0a3edE1b54B51a0a9; + + // https://bscscan.com/address/0x33E0b3fc976DC9C516926BA48CfC0A9E10a2aAA5 + address internal constant SWAP_COLLATERAL_ADAPTER = 0x33E0b3fc976DC9C516926BA48CfC0A9E10a2aAA5; + + // https://bscscan.com/address/0x5c5228aC8BC1528482514aF3e27E692495148717 + address internal constant UI_INCENTIVE_DATA_PROVIDER = 0x5c5228aC8BC1528482514aF3e27E692495148717; + + // https://bscscan.com/address/0x68100bD5345eA474D93577127C11F39FF8463e93 + address internal constant UI_POOL_DATA_PROVIDER = 0x68100bD5345eA474D93577127C11F39FF8463e93; + + // https://bscscan.com/address/0x36616cf17557639614c1cdDb356b1B83fc0B2132 + address internal constant WALLET_BALANCE_PROVIDER = 0x36616cf17557639614c1cdDb356b1B83fc0B2132; + + // https://bscscan.com/address/0x0c2C95b24529664fE55D4437D7A31175CFE6c4f7 + address internal constant WETH_GATEWAY = 0x0c2C95b24529664fE55D4437D7A31175CFE6c4f7; + + // https://bscscan.com/address/0x5E2d083417D12d4B0824E14Ecd48D26831F4Da7D + address internal constant WITHDRAW_SWAP_ADAPTER = 0x5E2d083417D12d4B0824E14Ecd48D26831F4Da7D; + + // https://bscscan.com/address/0x326aB0868bD279382Be2DF5E228Cb8AF38649AB4 + address internal constant LEGACY_STATIC_A_TOKEN_FACTORY = + 0x326aB0868bD279382Be2DF5E228Cb8AF38649AB4; + + // https://bscscan.com/address/0x3870D459d2fC2Edbb03E0DdeE6c0Ccb268caf202 + address internal constant DUST_BIN = 0x3870D459d2fC2Edbb03E0DdeE6c0Ccb268caf202; + + // https://bscscan.com/address/0x9e842f55Fdbb8F332D7c7aCe2B67fa5e4CCAAc43 + address internal constant CLINIC_STEWARD = 0x9e842f55Fdbb8F332D7c7aCe2B67fa5e4CCAAc43; + + // https://bscscan.com/address/0x58AfE45eE7D7f2AE9c26827F33A6f319Feb68Df8 + address internal constant POOL_EXPOSURE_STEWARD = 0x58AfE45eE7D7f2AE9c26827F33A6f319Feb68Df8; + + // https://bscscan.com/address/0x929B8a21a604b93DD7e95d5b9aAa3aDf5bE250ae + address internal constant STATA_FACTORY = 0x929B8a21a604b93DD7e95d5b9aAa3aDf5bE250ae; + + // https://bscscan.com/address/0x239d3Bc5fa247337287cb03f53B8bc63DBBc332D + address internal constant EDGE_RISK_ORACLE = 0x239d3Bc5fa247337287cb03f53B8bc63DBBc332D; + + // https://bscscan.com/address/0x655252250f4A453854040A49E8280951A76f3033 + address internal constant EDGE_RISK_STEWARD_CAPS = 0x655252250f4A453854040A49E8280951A76f3033; + + // https://bscscan.com/address/0x54714FAc85b0bf627288CC3a186dE81A42f1D635 + address internal constant EDGE_INJECTOR_CAPS = 0x54714FAc85b0bf627288CC3a186dE81A42f1D635; +} +library AaveV3BNBAssets { + // https://bscscan.com/address/0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82 + address internal constant Cake_UNDERLYING = 0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82; + + uint8 internal constant Cake_DECIMALS = 18; + + // https://bscscan.com/address/0x4199CC1F5ed0d796563d7CcB2e036253E2C18281 + address internal constant Cake_A_TOKEN = 0x4199CC1F5ed0d796563d7CcB2e036253E2C18281; + + // https://bscscan.com/address/0xE20dBC7119c635B1B51462f844861258770e0699 + address internal constant Cake_V_TOKEN = 0xE20dBC7119c635B1B51462f844861258770e0699; + + // https://bscscan.com/address/0xB6064eD41d4f67e353768aA239cA86f4F73665a1 + address internal constant Cake_ORACLE = 0xB6064eD41d4f67e353768aA239cA86f4F73665a1; + + // https://bscscan.com/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant Cake_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://bscscan.com/address/0x3854354CE3681da1D7F550073061E92a4a7d1B27 + address internal constant Cake_STATIC_A_TOKEN = 0x3854354CE3681da1D7F550073061E92a4a7d1B27; + + // https://bscscan.com/address/0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c + address internal constant WBNB_UNDERLYING = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c; + + uint8 internal constant WBNB_DECIMALS = 18; + + // https://bscscan.com/address/0x9B00a09492a626678E5A3009982191586C444Df9 + address internal constant WBNB_A_TOKEN = 0x9B00a09492a626678E5A3009982191586C444Df9; + + // https://bscscan.com/address/0x0E76414d433ddfe8004d2A7505d218874875a996 + address internal constant WBNB_V_TOKEN = 0x0E76414d433ddfe8004d2A7505d218874875a996; + + // https://bscscan.com/address/0x0567F2323251f0Aab15c8dFb1967E4e8A7D42aeE + address internal constant WBNB_ORACLE = 0x0567F2323251f0Aab15c8dFb1967E4e8A7D42aeE; + + // https://bscscan.com/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant WBNB_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://bscscan.com/address/0x436baCb4C66583de4Cb16e13a1A0D9A3075DE425 + address internal constant WBNB_STATIC_A_TOKEN = 0x436baCb4C66583de4Cb16e13a1A0D9A3075DE425; + + // https://bscscan.com/address/0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c + address internal constant BTCB_UNDERLYING = 0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c; + + uint8 internal constant BTCB_DECIMALS = 18; + + // https://bscscan.com/address/0x56a7ddc4e848EbF43845854205ad71D5D5F72d3D + address internal constant BTCB_A_TOKEN = 0x56a7ddc4e848EbF43845854205ad71D5D5F72d3D; + + // https://bscscan.com/address/0x7b1E82F4f542fbB25D64c5523Fe3e44aBe4F2702 + address internal constant BTCB_V_TOKEN = 0x7b1E82F4f542fbB25D64c5523Fe3e44aBe4F2702; + + // https://bscscan.com/address/0x264990fbd0A4796A3E3d8E37C4d5F87a3aCa5Ebf + address internal constant BTCB_ORACLE = 0x264990fbd0A4796A3E3d8E37C4d5F87a3aCa5Ebf; + + // https://bscscan.com/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant BTCB_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://bscscan.com/address/0x1F66b530084079d35478A069d9c4424F9c9C320c + address internal constant BTCB_STATIC_A_TOKEN = 0x1F66b530084079d35478A069d9c4424F9c9C320c; + + // https://bscscan.com/address/0x2170Ed0880ac9A755fd29B2688956BD959F933F8 + address internal constant ETH_UNDERLYING = 0x2170Ed0880ac9A755fd29B2688956BD959F933F8; + + uint8 internal constant ETH_DECIMALS = 18; + + // https://bscscan.com/address/0x2E94171493fAbE316b6205f1585779C887771E2F + address internal constant ETH_A_TOKEN = 0x2E94171493fAbE316b6205f1585779C887771E2F; + + // https://bscscan.com/address/0x8FDea7891b4D6dbdc746309245B316aF691A636C + address internal constant ETH_V_TOKEN = 0x8FDea7891b4D6dbdc746309245B316aF691A636C; + + // https://bscscan.com/address/0x9ef1B8c0E4F7dc8bF5719Ea496883DC6401d5b2e + address internal constant ETH_ORACLE = 0x9ef1B8c0E4F7dc8bF5719Ea496883DC6401d5b2e; + + // https://bscscan.com/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant ETH_INTEREST_RATE_STRATEGY = 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://bscscan.com/address/0x52077433fB7053D747E2846aD0C18ff5015C368E + address internal constant ETH_STATIC_A_TOKEN = 0x52077433fB7053D747E2846aD0C18ff5015C368E; + + // https://bscscan.com/address/0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d + address internal constant USDC_UNDERLYING = 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d; + + uint8 internal constant USDC_DECIMALS = 18; + + // https://bscscan.com/address/0x00901a076785e0906d1028c7d6372d247bec7d61 + address internal constant USDC_A_TOKEN = 0x00901a076785e0906d1028c7d6372d247bec7d61; + + // https://bscscan.com/address/0xcDBBEd5606d9c5C98eEedd67933991dC17F0c68d + address internal constant USDC_V_TOKEN = 0xcDBBEd5606d9c5C98eEedd67933991dC17F0c68d; + + // https://bscscan.com/address/0x9102a9553B470dbD0dC74009a870A5886C92902C + address internal constant USDC_ORACLE = 0x9102a9553B470dbD0dC74009a870A5886C92902C; + + // https://bscscan.com/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant USDC_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://bscscan.com/address/0x3906cDdfb781f02B21f21BD81ed7Fd8DC37075E1 + address internal constant USDC_STATIC_A_TOKEN = 0x3906cDdfb781f02B21f21BD81ed7Fd8DC37075E1; + + // https://bscscan.com/address/0x55d398326f99059fF775485246999027B3197955 + address internal constant USDT_UNDERLYING = 0x55d398326f99059fF775485246999027B3197955; + + uint8 internal constant USDT_DECIMALS = 18; + + // https://bscscan.com/address/0xa9251ca9DE909CB71783723713B21E4233fbf1B1 + address internal constant USDT_A_TOKEN = 0xa9251ca9DE909CB71783723713B21E4233fbf1B1; + + // https://bscscan.com/address/0xF8bb2Be50647447Fb355e3a77b81be4db64107cd + address internal constant USDT_V_TOKEN = 0xF8bb2Be50647447Fb355e3a77b81be4db64107cd; + + // https://bscscan.com/address/0xee845A7A40A090Da256420A293803C35B7F436b6 + address internal constant USDT_ORACLE = 0xee845A7A40A090Da256420A293803C35B7F436b6; + + // https://bscscan.com/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant USDT_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://bscscan.com/address/0x0471D185cc7Be61E154277cAB2396cD397663da6 + address internal constant USDT_STATIC_A_TOKEN = 0x0471D185cc7Be61E154277cAB2396cD397663da6; + + // https://bscscan.com/address/0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409 + address internal constant FDUSD_UNDERLYING = 0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409; + + uint8 internal constant FDUSD_DECIMALS = 18; + + // https://bscscan.com/address/0x75bd1A659bdC62e4C313950d44A2416faB43E785 + address internal constant FDUSD_A_TOKEN = 0x75bd1A659bdC62e4C313950d44A2416faB43E785; + + // https://bscscan.com/address/0xE628B8a123e6037f1542e662B9F55141a16945C8 + address internal constant FDUSD_V_TOKEN = 0xE628B8a123e6037f1542e662B9F55141a16945C8; + + // https://bscscan.com/address/0x72Cb7a00D439296A6fC3c9face9Eca96bfdEf825 + address internal constant FDUSD_ORACLE = 0x72Cb7a00D439296A6fC3c9face9Eca96bfdEf825; + + // https://bscscan.com/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant FDUSD_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://bscscan.com/address/0x4d074aAa0821073dA827f7bf6a02cF905b394ed0 + address internal constant FDUSD_STATIC_A_TOKEN = 0x4d074aAa0821073dA827f7bf6a02cF905b394ed0; + + // https://bscscan.com/address/0x26c5e01524d2E6280A48F2c50fF6De7e52E9611C + address internal constant wstETH_UNDERLYING = 0x26c5e01524d2E6280A48F2c50fF6De7e52E9611C; + + uint8 internal constant wstETH_DECIMALS = 18; + + // https://bscscan.com/address/0xBDFd4E51D3c14a232135f04988a42576eFb31519 + address internal constant wstETH_A_TOKEN = 0xBDFd4E51D3c14a232135f04988a42576eFb31519; + + // https://bscscan.com/address/0x2c391998308c56D7572A8F501D58CB56fB9Fe1C5 + address internal constant wstETH_V_TOKEN = 0x2c391998308c56D7572A8F501D58CB56fB9Fe1C5; + + // https://bscscan.com/address/0xc1377B4cdF9116bf7b3d7F72A4f8A7Be8506cE80 + address internal constant wstETH_ORACLE = 0xc1377B4cdF9116bf7b3d7F72A4f8A7Be8506cE80; + + // https://bscscan.com/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant wstETH_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; +} +library AaveV3BNBEModes { + uint8 internal constant NONE = 0; + + uint8 internal constant wstETH__ETH = 1; +} +library AaveV3BNBExternalLibraries { + // https://bscscan.com/address/0x6D414cd0d5eAf8C43200ac0c325A7E2Ad83B8be6 + address internal constant FLASHLOAN_LOGIC = 0x6D414cd0d5eAf8C43200ac0c325A7E2Ad83B8be6; + + // https://bscscan.com/address/0x52Da0ce88202D1542543598D1e1e27F0d344726A + address internal constant BORROW_LOGIC = 0x52Da0ce88202D1542543598D1e1e27F0d344726A; + + // https://bscscan.com/address/0x96D5686812e33Ab509ECCDb38C89d15607B2a413 + address internal constant LIQUIDATION_LOGIC = 0x96D5686812e33Ab509ECCDb38C89d15607B2a413; + + // https://bscscan.com/address/0xD70593841C57cbaA04957cc3EAcE95708e48853b + address internal constant POOL_LOGIC = 0xD70593841C57cbaA04957cc3EAcE95708e48853b; + + // https://bscscan.com/address/0x584C7d8c4cb05304FE5Ac7fbc97f20A10Fb07564 + address internal constant SUPPLY_LOGIC = 0x584C7d8c4cb05304FE5Ac7fbc97f20A10Fb07564; +} diff --git a/plan/agw/research/preset-mainnet-2026-10-15/AaveV3Base.sol b/plan/agw/research/preset-mainnet-2026-10-15/AaveV3Base.sol new file mode 100644 index 00000000..704c4f9f --- /dev/null +++ b/plan/agw/research/preset-mainnet-2026-10-15/AaveV3Base.sol @@ -0,0 +1,503 @@ +// AUTOGENERATED - MANUAL CHANGES WILL BE REVERTED BY THE GENERATOR +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.0; + +import {IPoolAddressesProvider, IPool, IPoolConfigurator, IAaveOracle, IPoolDataProvider, IACLManager, ICollector} from './AaveV3.sol'; +library AaveV3Base { + // https://basescan.org/address/0xe20fCBdBfFC4Dd138cE8b2E6FBb6CB49777ad64D + IPoolAddressesProvider internal constant POOL_ADDRESSES_PROVIDER = + IPoolAddressesProvider(0xe20fCBdBfFC4Dd138cE8b2E6FBb6CB49777ad64D); + + // https://basescan.org/address/0xA238Dd80C259a72e81d7e4664a9801593F98d1c5 + IPool internal constant POOL = IPool(0xA238Dd80C259a72e81d7e4664a9801593F98d1c5); + + // https://basescan.org/address/0x5731a04B1E775f0fdd454Bf70f3335886e9A96be + IPoolConfigurator internal constant POOL_CONFIGURATOR = + IPoolConfigurator(0x5731a04B1E775f0fdd454Bf70f3335886e9A96be); + + // https://basescan.org/address/0x2Cc0Fc26eD4563A5ce5e8bdcfe1A2878676Ae156 + IAaveOracle internal constant ORACLE = IAaveOracle(0x2Cc0Fc26eD4563A5ce5e8bdcfe1A2878676Ae156); + + // https://basescan.org/address/0x9390B1735def18560c509E2d0bc090E9d6BA257a + address internal constant ACL_ADMIN = 0x9390B1735def18560c509E2d0bc090E9d6BA257a; + + // https://basescan.org/address/0x43955b0899Ab7232E3a454cf84AedD22Ad46FD33 + IACLManager internal constant ACL_MANAGER = + IACLManager(0x43955b0899Ab7232E3a454cf84AedD22Ad46FD33); + + // https://basescan.org/address/0x0F43731EB8d45A581f4a36DD74F5f358bc90C73A + IPoolDataProvider internal constant AAVE_PROTOCOL_DATA_PROVIDER = + IPoolDataProvider(0x0F43731EB8d45A581f4a36DD74F5f358bc90C73A); + + // https://basescan.org/address/0xA4AbC5FcBA6D0d7E3D144d6dbF6cb6128599dFdB + address internal constant POOL_IMPL = 0xA4AbC5FcBA6D0d7E3D144d6dbF6cb6128599dFdB; + + // https://basescan.org/address/0xFF42Ce30054dcE7dc7C1282a9a497aa58eaBCe99 + address internal constant POOL_CONFIGURATOR_IMPL = 0xFF42Ce30054dcE7dc7C1282a9a497aa58eaBCe99; + + // https://basescan.org/address/0xf9cc4F0D883F1a1eb2c253bdb46c254Ca51E1F44 + address internal constant DEFAULT_INCENTIVES_CONTROLLER = + 0xf9cc4F0D883F1a1eb2c253bdb46c254Ca51E1F44; + + // https://basescan.org/address/0x6533A273F3aC84Df91DCD654D6EBAbA73687e246 + address internal constant EMISSION_MANAGER = 0x6533A273F3aC84Df91DCD654D6EBAbA73687e246; + + // https://basescan.org/address/0xBA9424d650A4F5c80a0dA641254d1AcCE2A37057 + ICollector internal constant COLLECTOR = ICollector(0xBA9424d650A4F5c80a0dA641254d1AcCE2A37057); + + // https://basescan.org/address/0x273E4B97C3f5280AFf4949Aa19a27fF54968458D + address internal constant DEFAULT_A_TOKEN_IMPL = 0x273E4B97C3f5280AFf4949Aa19a27fF54968458D; + + // https://basescan.org/address/0x7354Dc700A1A2ab9622f2292B60Ca1ceD5B204D0 + address internal constant DEFAULT_VARIABLE_DEBT_TOKEN_IMPL = + 0x7354Dc700A1A2ab9622f2292B60Ca1ceD5B204D0; + + // https://basescan.org/address/0x494bcfd3937aBdebEF3D2c2eae1CE8A2Fb629032 + address internal constant RISK_STEWARD = 0x494bcfd3937aBdebEF3D2c2eae1CE8A2Fb629032; + + // https://basescan.org/address/0xfbeB4AcB31340bA4de9C87B11dfBf7e2bc8C0bF1 + address internal constant RISK_COUNCIL = 0xfbeB4AcB31340bA4de9C87B11dfBf7e2bc8C0bF1; + + // https://basescan.org/address/0xB892202d9Ce2C16C565A492a5168689b215Eb269 + address internal constant EDGE_RISK_STEWARD_CAPS = 0xB892202d9Ce2C16C565A492a5168689b215Eb269; + + // https://basescan.org/address/0x4f84A364B66Eb6280350da011829a6BD02B4712f + address internal constant EDGE_INJECTOR_CAPS = 0x4f84A364B66Eb6280350da011829a6BD02B4712f; + + // https://basescan.org/address/0x239d3Bc5fa247337287cb03f53B8bc63DBBc332D + address internal constant EDGE_RISK_ORACLE = 0x239d3Bc5fa247337287cb03f53B8bc63DBBc332D; + + // https://basescan.org/address/0xb12e82DF057BF16ecFa89D7D089dc7E5C1Dc057B + address internal constant DEBT_SWAP_ADAPTER = 0xb12e82DF057BF16ecFa89D7D089dc7E5C1Dc057B; + + // https://basescan.org/address/0x5598BbFA2f4fE8151f45bBA0a3edE1b54B51a0a9 + address internal constant WITHDRAW_SWAP_ADAPTER = 0x5598BbFA2f4fE8151f45bBA0a3edE1b54B51a0a9; + + // https://basescan.org/address/0x2E549104c516b8657A7D888494DfbAbD7C70b464 + address internal constant SWAP_COLLATERAL_ADAPTER = 0x2E549104c516b8657A7D888494DfbAbD7C70b464; + + // https://basescan.org/address/0x63dfa7c09Dc2Ff4030d6B8Dc2ce6262BF898C8A4 + address internal constant REPAY_WITH_COLLATERAL_ADAPTER = + 0x63dfa7c09Dc2Ff4030d6B8Dc2ce6262BF898C8A4; + + // https://basescan.org/address/0x940F9a5d5F9ED264990D0eaee1F3DD60B4Cb9A22 + address internal constant LEGACY_STATIC_A_TOKEN_FACTORY = + 0x940F9a5d5F9ED264990D0eaee1F3DD60B4Cb9A22; + + // https://basescan.org/address/0xe63eAf6DAb1045689BD3a332bC596FfcF54A5C88 + address internal constant LEGACY_STATIC_A_TOKEN_ORACLE = + 0xe63eAf6DAb1045689BD3a332bC596FfcF54A5C88; + + // https://basescan.org/address/0xa5008BC7Fd697F458482205Ed52Dc51e91d37446 + address internal constant CONFIG_ENGINE = 0xa5008BC7Fd697F458482205Ed52Dc51e91d37446; + + // https://basescan.org/address/0x39e97c588B2907Fb67F44fea256Ae3BA064207C5 + address internal constant L2_ENCODER = 0x39e97c588B2907Fb67F44fea256Ae3BA064207C5; + + // https://basescan.org/address/0x2f6571d3Eb9a4e350C68C36bCD2afe39530078E2 + address internal constant POOL_ADDRESSES_PROVIDER_REGISTRY = + 0x2f6571d3Eb9a4e350C68C36bCD2afe39530078E2; + + // https://basescan.org/address/0x91E04cf78e53aEBe609e8a7f2003e7EECD743F2B + address internal constant UI_INCENTIVE_DATA_PROVIDER = 0x91E04cf78e53aEBe609e8a7f2003e7EECD743F2B; + + // https://basescan.org/address/0x0C6BC4a12039788be08F87e87Cff87FEDbd1D386 + address internal constant UI_POOL_DATA_PROVIDER = 0x0C6BC4a12039788be08F87e87Cff87FEDbd1D386; + + // https://basescan.org/address/0x5779b29B0a34577d927E8D511B595ef9abbFAE82 + address internal constant WALLET_BALANCE_PROVIDER = 0x5779b29B0a34577d927E8D511B595ef9abbFAE82; + + // https://basescan.org/address/0xa0d9C1E9E48Ca30c8d8C3B5D69FF5dc1f6DFfC24 + address internal constant WETH_GATEWAY = 0xa0d9C1E9E48Ca30c8d8C3B5D69FF5dc1f6DFfC24; + + // https://basescan.org/address/0x78d33BF0014ab169725F2Ea5a62b200F2977faeE + address internal constant STATA_FACTORY = 0x78d33BF0014ab169725F2Ea5a62b200F2977faeE; + + // https://basescan.org/address/0x3870D459d2fC2Edbb03E0DdeE6c0Ccb268caf202 + address internal constant DUST_BIN = 0x3870D459d2fC2Edbb03E0DdeE6c0Ccb268caf202; + + // https://basescan.org/address/0x1a79098C3149020ACdEfb3EE44AA1d9509305530 + address internal constant CLINIC_STEWARD = 0x1a79098C3149020ACdEfb3EE44AA1d9509305530; + + // https://basescan.org/address/0x4f1F3E32f20847a4c9F002882eB607aD750b6115 + address internal constant POOL_EXPOSURE_STEWARD = 0x4f1F3E32f20847a4c9F002882eB607aD750b6115; +} +library AaveV3BaseAssets { + // https://basescan.org/address/0x4200000000000000000000000000000000000006 + address internal constant WETH_UNDERLYING = 0x4200000000000000000000000000000000000006; + + uint8 internal constant WETH_DECIMALS = 18; + + // https://basescan.org/address/0xD4a0e0b9149BCee3C920d2E00b5dE09138fd8bb7 + address internal constant WETH_A_TOKEN = 0xD4a0e0b9149BCee3C920d2E00b5dE09138fd8bb7; + + // https://basescan.org/address/0x24e6e0795b3c7c71D965fCc4f371803d1c1DcA1E + address internal constant WETH_V_TOKEN = 0x24e6e0795b3c7c71D965fCc4f371803d1c1DcA1E; + + // https://basescan.org/address/0x9dA00D23465282005DB222a441a663eE7B9dfCc8 + address internal constant WETH_ORACLE = 0x9dA00D23465282005DB222a441a663eE7B9dfCc8; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant WETH_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0x468973e3264F2aEba0417A8f2cD0Ec397E738898 + address internal constant WETH_STATIC_A_TOKEN = 0x468973e3264F2aEba0417A8f2cD0Ec397E738898; + + // https://basescan.org/address/0xe298b938631f750DD409fB18227C4a23dCdaab9b + address internal constant WETH_STATA_TOKEN = 0xe298b938631f750DD409fB18227C4a23dCdaab9b; + + // https://basescan.org/address/0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22 + address internal constant cbETH_UNDERLYING = 0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22; + + uint8 internal constant cbETH_DECIMALS = 18; + + // https://basescan.org/address/0xcf3D55c10DB69f28fD1A75Bd73f3D8A2d9c595ad + address internal constant cbETH_A_TOKEN = 0xcf3D55c10DB69f28fD1A75Bd73f3D8A2d9c595ad; + + // https://basescan.org/address/0x1DabC36f19909425f654777249815c073E8Fd79F + address internal constant cbETH_V_TOKEN = 0x1DabC36f19909425f654777249815c073E8Fd79F; + + // https://basescan.org/address/0xB6E9fbba669763BD811B10A761110C449824b5BB + address internal constant cbETH_ORACLE = 0xB6E9fbba669763BD811B10A761110C449824b5BB; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant cbETH_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0x16A004065dfb11276DcB29Dc03fb8A85f9A43C6e + address internal constant cbETH_STATIC_A_TOKEN = 0x16A004065dfb11276DcB29Dc03fb8A85f9A43C6e; + + // https://basescan.org/address/0x5e8B674127B321DC344c078e58BBACc3f3008962 + address internal constant cbETH_STATA_TOKEN = 0x5e8B674127B321DC344c078e58BBACc3f3008962; + + // https://basescan.org/address/0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA + address internal constant USDbC_UNDERLYING = 0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA; + + uint8 internal constant USDbC_DECIMALS = 6; + + // https://basescan.org/address/0x0a1d576f3eFeF75b330424287a95A366e8281D54 + address internal constant USDbC_A_TOKEN = 0x0a1d576f3eFeF75b330424287a95A366e8281D54; + + // https://basescan.org/address/0x7376b2F323dC56fCd4C191B34163ac8a84702DAB + address internal constant USDbC_V_TOKEN = 0x7376b2F323dC56fCd4C191B34163ac8a84702DAB; + + // https://basescan.org/address/0xf52D010c7d4ecBfda92c2509900593CE34535D86 + address internal constant USDbC_ORACLE = 0xf52D010c7d4ecBfda92c2509900593CE34535D86; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant USDbC_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0x6fCe2756794128B1771324caA860965801DCbCdB + address internal constant USDbC_STATIC_A_TOKEN = 0x6fCe2756794128B1771324caA860965801DCbCdB; + + // https://basescan.org/address/0x74D4D1D440c9679b1013999Bd91507eAa2fff651 + address internal constant USDbC_STATA_TOKEN = 0x74D4D1D440c9679b1013999Bd91507eAa2fff651; + + // https://basescan.org/address/0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452 + address internal constant wstETH_UNDERLYING = 0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452; + + uint8 internal constant wstETH_DECIMALS = 18; + + // https://basescan.org/address/0x99CBC45ea5bb7eF3a5BC08FB1B7E56bB2442Ef0D + address internal constant wstETH_A_TOKEN = 0x99CBC45ea5bb7eF3a5BC08FB1B7E56bB2442Ef0D; + + // https://basescan.org/address/0x41A7C3f5904ad176dACbb1D99101F59ef0811DC1 + address internal constant wstETH_V_TOKEN = 0x41A7C3f5904ad176dACbb1D99101F59ef0811DC1; + + // https://basescan.org/address/0x1AFC5010Fb182B6e62D6a3B522F09F644Fb62EfD + address internal constant wstETH_ORACLE = 0x1AFC5010Fb182B6e62D6a3B522F09F644Fb62EfD; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant wstETH_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0x03916e49f794Ab877eFA23597627eE8094E6cbB0 + address internal constant wstETH_STATIC_A_TOKEN = 0x03916e49f794Ab877eFA23597627eE8094E6cbB0; + + // https://basescan.org/address/0x0830820D1A9aa1554364752d6D8F55C836871B74 + address internal constant wstETH_STATA_TOKEN = 0x0830820D1A9aa1554364752d6D8F55C836871B74; + + // https://basescan.org/address/0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 + address internal constant USDC_UNDERLYING = 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913; + + uint8 internal constant USDC_DECIMALS = 6; + + // https://basescan.org/address/0x4e65fE4DbA92790696d040ac24Aa414708F5c0AB + address internal constant USDC_A_TOKEN = 0x4e65fE4DbA92790696d040ac24Aa414708F5c0AB; + + // https://basescan.org/address/0x59dca05b6c26dbd64b5381374aAaC5CD05644C28 + address internal constant USDC_V_TOKEN = 0x59dca05b6c26dbd64b5381374aAaC5CD05644C28; + + // https://basescan.org/address/0xf52D010c7d4ecBfda92c2509900593CE34535D86 + address internal constant USDC_ORACLE = 0xf52D010c7d4ecBfda92c2509900593CE34535D86; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant USDC_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0x4EA71A20e655794051D1eE8b6e4A3269B13ccaCc + address internal constant USDC_STATIC_A_TOKEN = 0x4EA71A20e655794051D1eE8b6e4A3269B13ccaCc; + + // https://basescan.org/address/0xC768c589647798a6EE01A91FdE98EF2ed046DBD6 + address internal constant USDC_STATA_TOKEN = 0xC768c589647798a6EE01A91FdE98EF2ed046DBD6; + + // https://basescan.org/address/0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A + address internal constant weETH_UNDERLYING = 0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A; + + uint8 internal constant weETH_DECIMALS = 18; + + // https://basescan.org/address/0x7C307e128efA31F540F2E2d976C995E0B65F51F6 + address internal constant weETH_A_TOKEN = 0x7C307e128efA31F540F2E2d976C995E0B65F51F6; + + // https://basescan.org/address/0x8D2e3F1f4b38AA9f1ceD22ac06019c7561B03901 + address internal constant weETH_V_TOKEN = 0x8D2e3F1f4b38AA9f1ceD22ac06019c7561B03901; + + // https://basescan.org/address/0x0A0fFc2952B682eb36cde5Bdb03169C2c5F5305c + address internal constant weETH_ORACLE = 0x0A0fFc2952B682eb36cde5Bdb03169C2c5F5305c; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant weETH_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0x588159E0d360ffAA978330812f9234818ab46E8E + address internal constant weETH_STATIC_A_TOKEN = 0x588159E0d360ffAA978330812f9234818ab46E8E; + + // https://basescan.org/address/0x6acD0a165fD70A84b6b50d955ff3628700bAAf4b + address internal constant weETH_STATA_TOKEN = 0x6acD0a165fD70A84b6b50d955ff3628700bAAf4b; + + // https://basescan.org/address/0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf + address internal constant cbBTC_UNDERLYING = 0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf; + + uint8 internal constant cbBTC_DECIMALS = 8; + + // https://basescan.org/address/0xBdb9300b7CDE636d9cD4AFF00f6F009fFBBc8EE6 + address internal constant cbBTC_A_TOKEN = 0xBdb9300b7CDE636d9cD4AFF00f6F009fFBBc8EE6; + + // https://basescan.org/address/0x05e08702028de6AaD395DC6478b554a56920b9AD + address internal constant cbBTC_V_TOKEN = 0x05e08702028de6AaD395DC6478b554a56920b9AD; + + // https://basescan.org/address/0x3A932b286715abc4A86a4ACAF68A6cdD89E0d446 + address internal constant cbBTC_ORACLE = 0x3A932b286715abc4A86a4ACAF68A6cdD89E0d446; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant cbBTC_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0xeaCFa728623d0958e3C386bACed79138BCAfC50F + address internal constant cbBTC_STATIC_A_TOKEN = 0xeaCFa728623d0958e3C386bACed79138BCAfC50F; + + // https://basescan.org/address/0xFA2A03b6f4A65fB1Af64f7d935fDBf78693df9aF + address internal constant cbBTC_STATA_TOKEN = 0xFA2A03b6f4A65fB1Af64f7d935fDBf78693df9aF; + + // https://basescan.org/address/0x2416092f143378750bb29b79eD961ab195CcEea5 + address internal constant ezETH_UNDERLYING = 0x2416092f143378750bb29b79eD961ab195CcEea5; + + uint8 internal constant ezETH_DECIMALS = 18; + + // https://basescan.org/address/0xDD5745756C2de109183c6B5bB886F9207bEF114D + address internal constant ezETH_A_TOKEN = 0xDD5745756C2de109183c6B5bB886F9207bEF114D; + + // https://basescan.org/address/0xbc4f5631f2843488792e4F1660d0A51Ba489bdBd + address internal constant ezETH_V_TOKEN = 0xbc4f5631f2843488792e4F1660d0A51Ba489bdBd; + + // https://basescan.org/address/0x0B472c80cAf27B3238Ae6cF0f13a362D2522bf6d + address internal constant ezETH_ORACLE = 0x0B472c80cAf27B3238Ae6cF0f13a362D2522bf6d; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant ezETH_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0xF8F10f39116716e89498c1c5E94137ADa11b2BC7 + address internal constant ezETH_STATA_TOKEN = 0xF8F10f39116716e89498c1c5E94137ADa11b2BC7; + + // https://basescan.org/address/0x6Bb7a212910682DCFdbd5BCBb3e28FB4E8da10Ee + address internal constant GHO_UNDERLYING = 0x6Bb7a212910682DCFdbd5BCBb3e28FB4E8da10Ee; + + uint8 internal constant GHO_DECIMALS = 18; + + // https://basescan.org/address/0x067ae75628177FD257c2B1e500993e1a0baBcBd1 + address internal constant GHO_A_TOKEN = 0x067ae75628177FD257c2B1e500993e1a0baBcBd1; + + // https://basescan.org/address/0x38e59ADE183BbEb94583d44213c8f3297e9933e9 + address internal constant GHO_V_TOKEN = 0x38e59ADE183BbEb94583d44213c8f3297e9933e9; + + // https://basescan.org/address/0xfc421aD3C883Bf9E7C4f42dE845C4e4405799e73 + address internal constant GHO_ORACLE = 0xfc421aD3C883Bf9E7C4f42dE845C4e4405799e73; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant GHO_INTEREST_RATE_STRATEGY = 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0x88b1Cd4b430D95b406E382C3cDBaE54697a0286E + address internal constant GHO_STATA_TOKEN = 0x88b1Cd4b430D95b406E382C3cDBaE54697a0286E; + + // https://basescan.org/address/0xEDfa23602D0EC14714057867A78d01e94176BEA0 + address internal constant wrsETH_UNDERLYING = 0xEDfa23602D0EC14714057867A78d01e94176BEA0; + + uint8 internal constant wrsETH_DECIMALS = 18; + + // https://basescan.org/address/0x80a94C36747CF51b2FbabDfF045f6D22c1930eD1 + address internal constant wrsETH_A_TOKEN = 0x80a94C36747CF51b2FbabDfF045f6D22c1930eD1; + + // https://basescan.org/address/0xe9541C77a111bCAa5dF56839bbC50894eba7aFcb + address internal constant wrsETH_V_TOKEN = 0xe9541C77a111bCAa5dF56839bbC50894eba7aFcb; + + // https://basescan.org/address/0x87445df51b4A2E5BbD2F0F8564C5bfe65cC3dB61 + address internal constant wrsETH_ORACLE = 0x87445df51b4A2E5BbD2F0F8564C5bfe65cC3dB61; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant wrsETH_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0xCa79190050739D27B61e24B085DD4Af990254Ec2 + address internal constant wrsETH_STATA_TOKEN = 0xCa79190050739D27B61e24B085DD4Af990254Ec2; + + // https://basescan.org/address/0xecAc9C5F704e954931349Da37F60E39f515c11c1 + address internal constant LBTC_UNDERLYING = 0xecAc9C5F704e954931349Da37F60E39f515c11c1; + + uint8 internal constant LBTC_DECIMALS = 8; + + // https://basescan.org/address/0x90072A4aA69B5Eb74984Ab823EFC5f91e90b3a72 + address internal constant LBTC_A_TOKEN = 0x90072A4aA69B5Eb74984Ab823EFC5f91e90b3a72; + + // https://basescan.org/address/0xa2525b3f058846075506903d792d58C5a0D834c9 + address internal constant LBTC_V_TOKEN = 0xa2525b3f058846075506903d792d58C5a0D834c9; + + // https://basescan.org/address/0x7a52aEb0461Ff4De29D5849A9E9885ca4E0d62D0 + address internal constant LBTC_ORACLE = 0x7a52aEb0461Ff4De29D5849A9E9885ca4E0d62D0; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant LBTC_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42 + address internal constant EURC_UNDERLYING = 0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42; + + uint8 internal constant EURC_DECIMALS = 6; + + // https://basescan.org/address/0x90DA57E0A6C0d166Bf15764E03b83745Dc90025B + address internal constant EURC_A_TOKEN = 0x90DA57E0A6C0d166Bf15764E03b83745Dc90025B; + + // https://basescan.org/address/0x03D01595769333174036832e18fA2f17C74f8161 + address internal constant EURC_V_TOKEN = 0x03D01595769333174036832e18fA2f17C74f8161; + + // https://basescan.org/address/0x8438ee84b847FA4e462d906bbdf4B11341434d13 + address internal constant EURC_ORACLE = 0x8438ee84b847FA4e462d906bbdf4B11341434d13; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant EURC_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0x729F75Aff28c726e32403e80cef2aFb518CFbfa7 + address internal constant EURC_STATA_TOKEN = 0x729F75Aff28c726e32403e80cef2aFb518CFbfa7; + + // https://basescan.org/address/0x63706e401c06ac8513145b7687A14804d17f814b + address internal constant AAVE_UNDERLYING = 0x63706e401c06ac8513145b7687A14804d17f814b; + + uint8 internal constant AAVE_DECIMALS = 18; + + // https://basescan.org/address/0x67EAF2BeE4384a2f84Da9Eb8105C661C123736BA + address internal constant AAVE_A_TOKEN = 0x67EAF2BeE4384a2f84Da9Eb8105C661C123736BA; + + // https://basescan.org/address/0xcEC1Ea95dDEF7CFC27D3D9615E05b035af460978 + address internal constant AAVE_V_TOKEN = 0xcEC1Ea95dDEF7CFC27D3D9615E05b035af460978; + + // https://basescan.org/address/0xAAEbc0287EC3BF3fe56fCA1E4bcC793b219De551 + address internal constant AAVE_ORACLE = 0xAAEbc0287EC3BF3fe56fCA1E4bcC793b219De551; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant AAVE_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0x4170aa42631d60160171C60d523A2783565261b9 + address internal constant AAVE_STATA_TOKEN = 0x4170aa42631d60160171C60d523A2783565261b9; + + // https://basescan.org/address/0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b + address internal constant tBTC_UNDERLYING = 0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b; + + uint8 internal constant tBTC_DECIMALS = 18; + + // https://basescan.org/address/0xbcFFB4B3beADc989Bd1458740952aF6EC8fBE431 + address internal constant tBTC_A_TOKEN = 0xbcFFB4B3beADc989Bd1458740952aF6EC8fBE431; + + // https://basescan.org/address/0x182cDEEC1D52ccad869d621bA422F449FA5809f5 + address internal constant tBTC_V_TOKEN = 0x182cDEEC1D52ccad869d621bA422F449FA5809f5; + + // https://basescan.org/address/0x3A932b286715abc4A86a4ACAF68A6cdD89E0d446 + address internal constant tBTC_ORACLE = 0x3A932b286715abc4A86a4ACAF68A6cdD89E0d446; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant tBTC_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0x660975730059246A68521a3e2FBD4740173100f5 + address internal constant syrupUSDC_UNDERLYING = 0x660975730059246A68521a3e2FBD4740173100f5; + + uint8 internal constant syrupUSDC_DECIMALS = 6; + + // https://basescan.org/address/0xD7424238CcbE7b7198Ab3cFE232e0271E22da7bd + address internal constant syrupUSDC_A_TOKEN = 0xD7424238CcbE7b7198Ab3cFE232e0271E22da7bd; + + // https://basescan.org/address/0x57B8C05ee2cD9d0143eBC21FBD9288C39B9F716c + address internal constant syrupUSDC_V_TOKEN = 0x57B8C05ee2cD9d0143eBC21FBD9288C39B9F716c; + + // https://basescan.org/address/0x5e9eCce4aCBBc8172A40f7b8A7c086A4bb5CDeac + address internal constant syrupUSDC_ORACLE = 0x5e9eCce4aCBBc8172A40f7b8A7c086A4bb5CDeac; + + // https://basescan.org/address/0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5 + address internal constant syrupUSDC_INTEREST_RATE_STRATEGY = + 0x86AB1C62A8bf868E1b3E1ab87d587Aba6fbCbDC5; + + // https://basescan.org/address/0xaD785bd1666c582FcAb74088ce73BDF4c9da1f20 + address internal constant syrupUSDC_STATA_TOKEN = 0xaD785bd1666c582FcAb74088ce73BDF4c9da1f20; +} +library AaveV3BaseEModes { + uint8 internal constant NONE = 0; + + uint8 internal constant WETH_cbETH_wstETH_weETH__WETH = 1; + + uint8 internal constant ezETH__wstETH = 2; + + uint8 internal constant ezETH__USDC = 3; + + uint8 internal constant LBTC__cbBTC = 4; + + uint8 internal constant wrsETH__WETH_wstETH = 5; + + uint8 internal constant wrsETH__USDC = 6; + + uint8 internal constant weETH__WETH = 7; + + uint8 internal constant wstETH__WETH = 8; + + uint8 internal constant cbETH__WETH = 9; + + uint8 internal constant cbBTC__USDC_GHO = 10; + + uint8 internal constant syrupUSDC__USDC_GHO = 11; + + uint8 internal constant AAVE__USDC_GHO = 12; + + uint8 internal constant EURC__USDC_GHO = 13; + + uint8 internal constant LBTC__USDC_GHO = 14; + + uint8 internal constant tBTC__USDC_GHO = 15; +} +library AaveV3BaseExternalLibraries { + // https://basescan.org/address/0x6D414cd0d5eAf8C43200ac0c325A7E2Ad83B8be6 + address internal constant FLASHLOAN_LOGIC = 0x6D414cd0d5eAf8C43200ac0c325A7E2Ad83B8be6; + + // https://basescan.org/address/0x52Da0ce88202D1542543598D1e1e27F0d344726A + address internal constant BORROW_LOGIC = 0x52Da0ce88202D1542543598D1e1e27F0d344726A; + + // https://basescan.org/address/0x96D5686812e33Ab509ECCDb38C89d15607B2a413 + address internal constant LIQUIDATION_LOGIC = 0x96D5686812e33Ab509ECCDb38C89d15607B2a413; + + // https://basescan.org/address/0xD70593841C57cbaA04957cc3EAcE95708e48853b + address internal constant POOL_LOGIC = 0xD70593841C57cbaA04957cc3EAcE95708e48853b; + + // https://basescan.org/address/0x584C7d8c4cb05304FE5Ac7fbc97f20A10Fb07564 + address internal constant SUPPLY_LOGIC = 0x584C7d8c4cb05304FE5Ac7fbc97f20A10Fb07564; +} diff --git a/plan/agw/research/preset-mainnet-2026-10-15/AaveV3Ethereum.sol b/plan/agw/research/preset-mainnet-2026-10-15/AaveV3Ethereum.sol new file mode 100644 index 00000000..75c7b74e --- /dev/null +++ b/plan/agw/research/preset-mainnet-2026-10-15/AaveV3Ethereum.sol @@ -0,0 +1,1602 @@ +// AUTOGENERATED - MANUAL CHANGES WILL BE REVERTED BY THE GENERATOR +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.0; + +import {IPoolAddressesProvider, IPool, IPoolConfigurator, IAaveOracle, IPoolDataProvider, IACLManager, ICollector} from './AaveV3.sol'; +library AaveV3Ethereum { + // https://etherscan.io/address/0x2f39d218133AFaB8F2B819B1066c7E434Ad94E9e + IPoolAddressesProvider internal constant POOL_ADDRESSES_PROVIDER = + IPoolAddressesProvider(0x2f39d218133AFaB8F2B819B1066c7E434Ad94E9e); + + // https://etherscan.io/address/0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2 + IPool internal constant POOL = IPool(0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2); + + // https://etherscan.io/address/0x64b761D848206f447Fe2dd461b0c635Ec39EbB27 + IPoolConfigurator internal constant POOL_CONFIGURATOR = + IPoolConfigurator(0x64b761D848206f447Fe2dd461b0c635Ec39EbB27); + + // https://etherscan.io/address/0x54586bE62E3c3580375aE3723C145253060Ca0C2 + IAaveOracle internal constant ORACLE = IAaveOracle(0x54586bE62E3c3580375aE3723C145253060Ca0C2); + + // https://etherscan.io/address/0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A + address internal constant ACL_ADMIN = 0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A; + + // https://etherscan.io/address/0xc2aaCf6553D20d1e9d78E365AAba8032af9c85b0 + IACLManager internal constant ACL_MANAGER = + IACLManager(0xc2aaCf6553D20d1e9d78E365AAba8032af9c85b0); + + // https://etherscan.io/address/0x0a16f2FCC0D44FaE41cc54e079281D84A363bECD + IPoolDataProvider internal constant AAVE_PROTOCOL_DATA_PROVIDER = + IPoolDataProvider(0x0a16f2FCC0D44FaE41cc54e079281D84A363bECD); + + // https://etherscan.io/address/0x728a138A4823392C2EFA55e028d434F526fE03CF + address internal constant POOL_IMPL = 0x728a138A4823392C2EFA55e028d434F526fE03CF; + + // https://etherscan.io/address/0xFF42Ce30054dcE7dc7C1282a9a497aa58eaBCe99 + address internal constant POOL_CONFIGURATOR_IMPL = 0xFF42Ce30054dcE7dc7C1282a9a497aa58eaBCe99; + + // https://etherscan.io/address/0x8164Cc65827dcFe994AB23944CBC90e0aa80bFcb + address internal constant DEFAULT_INCENTIVES_CONTROLLER = + 0x8164Cc65827dcFe994AB23944CBC90e0aa80bFcb; + + // https://etherscan.io/address/0x223d844fc4B006D67c0cDbd39371A9F73f69d974 + address internal constant EMISSION_MANAGER = 0x223d844fc4B006D67c0cDbd39371A9F73f69d974; + + // https://etherscan.io/address/0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c + ICollector internal constant COLLECTOR = ICollector(0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c); + + // https://etherscan.io/address/0xadC45Df3cf1584624C97338BEF33363BF5b97AdA + address internal constant DEFAULT_A_TOKEN_IMPL = 0xadC45Df3cf1584624C97338BEF33363BF5b97AdA; + + // https://etherscan.io/address/0xb27C52c7f84819e3157993489741cB60786aE330 + address internal constant DEFAULT_VARIABLE_DEBT_TOKEN_IMPL = + 0xb27C52c7f84819e3157993489741cB60786aE330; + + // https://etherscan.io/address/0x13a9CC64344b02bACC5AD9Cf38B5711F1B9ec3d4 + address internal constant RISK_STEWARD = 0x13a9CC64344b02bACC5AD9Cf38B5711F1B9ec3d4; + + // https://etherscan.io/address/0x47c71dFEB55Ebaa431Ae3fbF99Ea50e0D3d30fA8 + address internal constant RISK_COUNCIL = 0x47c71dFEB55Ebaa431Ae3fbF99Ea50e0D3d30fA8; + + // https://etherscan.io/address/0xd7852E139a7097E119623de0751AE53a61efb442 + address internal constant DEBT_SWAP_ADAPTER = 0xd7852E139a7097E119623de0751AE53a61efb442; + + // https://etherscan.io/address/0x21714092D90c7265F52fdfDae068EC11a23C6248 + address internal constant DELEGATION_AWARE_A_TOKEN_IMPL_REV_1 = + 0x21714092D90c7265F52fdfDae068EC11a23C6248; + + // https://etherscan.io/address/0xEaFAeFa93c6aaBd5ab7E76F4c37Aebe9da1e8318 + address internal constant CONFIG_ENGINE = 0xEaFAeFa93c6aaBd5ab7E76F4c37Aebe9da1e8318; + + // https://etherscan.io/address/0xbaA999AC55EAce41CcAE355c77809e68Bb345170 + address internal constant POOL_ADDRESSES_PROVIDER_REGISTRY = + 0xbaA999AC55EAce41CcAE355c77809e68Bb345170; + + // https://etherscan.io/address/0x35bb522b102326ea3F1141661dF4626C87000e3E + address internal constant REPAY_WITH_COLLATERAL_ADAPTER = + 0x35bb522b102326ea3F1141661dF4626C87000e3E; + + // https://etherscan.io/address/0x411D79b8cC43384FDE66CaBf9b6a17180c842511 + address internal constant LEGACY_STATIC_A_TOKEN_FACTORY = + 0x411D79b8cC43384FDE66CaBf9b6a17180c842511; + + // https://etherscan.io/address/0xADC0A53095A0af87F3aa29FE0715B5c28016364e + address internal constant SWAP_COLLATERAL_ADAPTER = 0xADC0A53095A0af87F3aa29FE0715B5c28016364e; + + // https://etherscan.io/address/0xe3dFf4052F0bF6134ACb73bEaE8fe2317d71F047 + address internal constant UI_INCENTIVE_DATA_PROVIDER = 0xe3dFf4052F0bF6134ACb73bEaE8fe2317d71F047; + + // https://etherscan.io/address/0x2dAd8162A989cd99D673dE4425Bb2298Db1E1aA2 + address internal constant UI_POOL_DATA_PROVIDER = 0x2dAd8162A989cd99D673dE4425Bb2298Db1E1aA2; + + // https://etherscan.io/address/0xC7be5307ba715ce89b152f3Df0658295b3dbA8E2 + address internal constant WALLET_BALANCE_PROVIDER = 0xC7be5307ba715ce89b152f3Df0658295b3dbA8E2; + + // https://etherscan.io/address/0xd01607c3C5eCABa394D8be377a08590149325722 + address internal constant WETH_GATEWAY = 0xd01607c3C5eCABa394D8be377a08590149325722; + + // https://etherscan.io/address/0x78F8Bd884C3D738B74B420540659c82f392820e0 + address internal constant WITHDRAW_SWAP_ADAPTER = 0x78F8Bd884C3D738B74B420540659c82f392820e0; + + // https://etherscan.io/address/0xE28E2c8d240dd5eBd0adcab86fbD79df7a052034 + address internal constant SAVINGS_DAI_TOKEN_WRAPPER = 0xE28E2c8d240dd5eBd0adcab86fbD79df7a052034; + + // https://etherscan.io/address/0xCb0b5cA20b6C5C02A9A3B2cE433650768eD2974F + address internal constant STATA_FACTORY = 0xCb0b5cA20b6C5C02A9A3B2cE433650768eD2974F; + + // https://etherscan.io/address/0x5513224daaEABCa31af5280727878d52097afA05 + address internal constant GHO_DIRECT_MINTER = 0x5513224daaEABCa31af5280727878d52097afA05; + + // https://etherscan.io/address/0x31a0Ba3C2242a095dBF58A7C53751eCBd27dBA9b + address internal constant DUST_BIN = 0x31a0Ba3C2242a095dBF58A7C53751eCBd27dBA9b; + + // https://etherscan.io/address/0xf00E2de0E78DFf055A92AD4719a179CE275b6Ef7 + address internal constant CLINIC_STEWARD = 0xf00E2de0E78DFf055A92AD4719a179CE275b6Ef7; + + // https://etherscan.io/address/0x8b493f416F5F7933cC146b1899c069F2361cad60 + address internal constant SVR_STEWARD = 0x8b493f416F5F7933cC146b1899c069F2361cad60; + + // https://etherscan.io/address/0x22aC12a6937BBBC0a301AF9154d08EaD95673122 + address internal constant POOL_EXPOSURE_STEWARD = 0x22aC12a6937BBBC0a301AF9154d08EaD95673122; + + // https://etherscan.io/address/0x7ABB46C690C52E919687D19ebF89C81A6136C1F2 + address internal constant EDGE_RISK_ORACLE = 0x7ABB46C690C52E919687D19ebF89C81A6136C1F2; + + // https://etherscan.io/address/0xf721bE7AA57a987F3e4D05DAc6fcb5aBF9F7cE9A + address internal constant EDGE_RISK_STEWARD_PENDLE_EMODE = + 0xf721bE7AA57a987F3e4D05DAc6fcb5aBF9F7cE9A; + + // https://etherscan.io/address/0x9F76954f5b55B4908d178f31C07F9537AC8328E7 + address internal constant EDGE_RISK_STEWARD_DISCOUNT_RATE = + 0x9F76954f5b55B4908d178f31C07F9537AC8328E7; + + // https://etherscan.io/address/0x83ab600cE8a61b43e1757b89C0589928f765c1C4 + address internal constant EDGE_INJECTOR_PENDLE_EMODE = 0x83ab600cE8a61b43e1757b89C0589928f765c1C4; + + // https://etherscan.io/address/0x15885A83936EB943e98EeFFb91e9A49040d93993 + address internal constant EDGE_INJECTOR_DISCOUNT_RATE = + 0x15885A83936EB943e98EeFFb91e9A49040d93993; + + // https://etherscan.io/address/0x80CFd14236409107c220d1D0a3dE845b48fdcDfc + address internal constant EDGE_RISK_STEWARD_RATES = 0x80CFd14236409107c220d1D0a3dE845b48fdcDfc; + + // https://etherscan.io/address/0x74dc6321A338420238CBD77abA5fEa8679393A66 + address internal constant EDGE_INJECTOR_RATES = 0x74dc6321A338420238CBD77abA5fEa8679393A66; + + // https://etherscan.io/address/0xb7D402138Cb01BfE97d95181C849379d6AD14d19 + address internal constant COLLECTOR_SWAP_STEWARD = 0xb7D402138Cb01BfE97d95181C849379d6AD14d19; +} +library AaveV3EthereumAssets { + // https://etherscan.io/address/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 + address internal constant WETH_UNDERLYING = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; + + uint8 internal constant WETH_DECIMALS = 18; + + // https://etherscan.io/address/0x4d5F47FA6A74757f35C14fD3a6Ef8E3C9BC514E8 + address internal constant WETH_A_TOKEN = 0x4d5F47FA6A74757f35C14fD3a6Ef8E3C9BC514E8; + + // https://etherscan.io/address/0xeA51d7853EEFb32b6ee06b1C12E6dcCA88Be0fFE + address internal constant WETH_V_TOKEN = 0xeA51d7853EEFb32b6ee06b1C12E6dcCA88Be0fFE; + + // https://etherscan.io/address/0x5424384B256154046E9667dDFaaa5e550145215e + address internal constant WETH_ORACLE = 0x5424384B256154046E9667dDFaaa5e550145215e; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant WETH_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x252231882FB38481497f3C767469106297c8d93b + address internal constant WETH_STATIC_A_TOKEN = 0x252231882FB38481497f3C767469106297c8d93b; + + // https://etherscan.io/address/0x0bfc9d54Fc184518A81162F8fB99c2eACa081202 + address internal constant WETH_STATA_TOKEN = 0x0bfc9d54Fc184518A81162F8fB99c2eACa081202; + + // https://etherscan.io/address/0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0 + address internal constant wstETH_UNDERLYING = 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0; + + uint8 internal constant wstETH_DECIMALS = 18; + + // https://etherscan.io/address/0x0B925eD163218f6662a35e0f0371Ac234f9E9371 + address internal constant wstETH_A_TOKEN = 0x0B925eD163218f6662a35e0f0371Ac234f9E9371; + + // https://etherscan.io/address/0xC96113eED8cAB59cD8A66813bCB0cEb29F06D2e4 + address internal constant wstETH_V_TOKEN = 0xC96113eED8cAB59cD8A66813bCB0cEb29F06D2e4; + + // https://etherscan.io/address/0xe1D97bF61901B075E9626c8A2340a7De385861Ef + address internal constant wstETH_ORACLE = 0xe1D97bF61901B075E9626c8A2340a7De385861Ef; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant wstETH_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x322AA5F5Be95644d6c36544B6c5061F072D16DF5 + address internal constant wstETH_STATIC_A_TOKEN = 0x322AA5F5Be95644d6c36544B6c5061F072D16DF5; + + // https://etherscan.io/address/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599 + address internal constant WBTC_UNDERLYING = 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599; + + uint8 internal constant WBTC_DECIMALS = 8; + + // https://etherscan.io/address/0x5Ee5bf7ae06D1Be5997A1A72006FE6C607eC6DE8 + address internal constant WBTC_A_TOKEN = 0x5Ee5bf7ae06D1Be5997A1A72006FE6C607eC6DE8; + + // https://etherscan.io/address/0x40aAbEf1aa8f0eEc637E0E7d92fbfFB2F26A8b7B + address internal constant WBTC_V_TOKEN = 0x40aAbEf1aa8f0eEc637E0E7d92fbfFB2F26A8b7B; + + // https://etherscan.io/address/0xDaa4B74C6bAc4e25188e64ebc68DB5050b690cAc + address internal constant WBTC_ORACLE = 0xDaa4B74C6bAc4e25188e64ebc68DB5050b690cAc; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant WBTC_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xB07E357cc262E92eee03D8B81464D596B258eA7a + address internal constant WBTC_STATIC_A_TOKEN = 0xB07E357cc262E92eee03D8B81464D596B258eA7a; + + // https://etherscan.io/address/0x2A5D51e22A8010701674E0c3D45E9aCf7b9C8a62 + address internal constant WBTC_STATA_TOKEN = 0x2A5D51e22A8010701674E0c3D45E9aCf7b9C8a62; + + // https://etherscan.io/address/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 + address internal constant USDC_UNDERLYING = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; + + uint8 internal constant USDC_DECIMALS = 6; + + // https://etherscan.io/address/0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c + address internal constant USDC_A_TOKEN = 0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c; + + // https://etherscan.io/address/0x72E95b8931767C79bA4EeE721354d6E99a61D004 + address internal constant USDC_V_TOKEN = 0x72E95b8931767C79bA4EeE721354d6E99a61D004; + + // https://etherscan.io/address/0x3f73F03aa83B2A48ed27E964eD0fDb590332095B + address internal constant USDC_ORACLE = 0x3f73F03aa83B2A48ed27E964eD0fDb590332095B; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant USDC_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x73edDFa87C71ADdC275c2b9890f5c3a8480bC9E6 + address internal constant USDC_STATIC_A_TOKEN = 0x73edDFa87C71ADdC275c2b9890f5c3a8480bC9E6; + + // https://etherscan.io/address/0xD4fa2D31b7968E448877f69A96DE69f5de8cD23E + address internal constant USDC_STATA_TOKEN = 0xD4fa2D31b7968E448877f69A96DE69f5de8cD23E; + + // https://etherscan.io/address/0x6B175474E89094C44Da98b954EedeAC495271d0F + address internal constant DAI_UNDERLYING = 0x6B175474E89094C44Da98b954EedeAC495271d0F; + + uint8 internal constant DAI_DECIMALS = 18; + + // https://etherscan.io/address/0x018008bfb33d285247A21d44E50697654f754e63 + address internal constant DAI_A_TOKEN = 0x018008bfb33d285247A21d44E50697654f754e63; + + // https://etherscan.io/address/0xcF8d0c70c850859266f5C338b38F9D663181C314 + address internal constant DAI_V_TOKEN = 0xcF8d0c70c850859266f5C338b38F9D663181C314; + + // https://etherscan.io/address/0x5c66322CA59bB61e867B28195576DbD8dA4b08dE + address internal constant DAI_ORACLE = 0x5c66322CA59bB61e867B28195576DbD8dA4b08dE; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant DAI_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xaf270C38fF895EA3f95Ed488CEACe2386F038249 + address internal constant DAI_STATIC_A_TOKEN = 0xaf270C38fF895EA3f95Ed488CEACe2386F038249; + + // https://etherscan.io/address/0x5caF5a86f39073637Ac7c8A7b5290871de80cb9b + address internal constant DAI_STATA_TOKEN = 0x5caF5a86f39073637Ac7c8A7b5290871de80cb9b; + + // https://etherscan.io/address/0x514910771AF9Ca656af840dff83E8264EcF986CA + address internal constant LINK_UNDERLYING = 0x514910771AF9Ca656af840dff83E8264EcF986CA; + + uint8 internal constant LINK_DECIMALS = 18; + + // https://etherscan.io/address/0x5E8C8A7243651DB1384C0dDfDbE39761E8e7E51a + address internal constant LINK_A_TOKEN = 0x5E8C8A7243651DB1384C0dDfDbE39761E8e7E51a; + + // https://etherscan.io/address/0x4228F8895C7dDA20227F6a5c6751b8Ebf19a6ba8 + address internal constant LINK_V_TOKEN = 0x4228F8895C7dDA20227F6a5c6751b8Ebf19a6ba8; + + // https://etherscan.io/address/0xC7e9b623ed51F033b32AE7f1282b1AD62C28C183 + address internal constant LINK_ORACLE = 0xC7e9b623ed51F033b32AE7f1282b1AD62C28C183; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant LINK_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x57bd8C73838d1781b4f6E0d5Cf89eb676488d3df + address internal constant LINK_STATIC_A_TOKEN = 0x57bd8C73838d1781b4f6E0d5Cf89eb676488d3df; + + // https://etherscan.io/address/0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9 + address internal constant AAVE_UNDERLYING = 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9; + + uint8 internal constant AAVE_DECIMALS = 18; + + // https://etherscan.io/address/0xA700b4eB416Be35b2911fd5Dee80678ff64fF6C9 + address internal constant AAVE_A_TOKEN = 0xA700b4eB416Be35b2911fd5Dee80678ff64fF6C9; + + // https://etherscan.io/address/0xBae535520Abd9f8C85E58929e0006A2c8B372F74 + address internal constant AAVE_V_TOKEN = 0xBae535520Abd9f8C85E58929e0006A2c8B372F74; + + // https://etherscan.io/address/0xF02C1e2A3B77c1cacC72f72B44f7d0a4c62e4a85 + address internal constant AAVE_ORACLE = 0xF02C1e2A3B77c1cacC72f72B44f7d0a4c62e4a85; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant AAVE_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xFEB859A50f92C6D5ad7C9eF7C2c060D164B3280f + address internal constant AAVE_STATIC_A_TOKEN = 0xFEB859A50f92C6D5ad7C9eF7C2c060D164B3280f; + + // https://etherscan.io/address/0xBe9895146f7AF43049ca1c1AE358B0541Ea49704 + address internal constant cbETH_UNDERLYING = 0xBe9895146f7AF43049ca1c1AE358B0541Ea49704; + + uint8 internal constant cbETH_DECIMALS = 18; + + // https://etherscan.io/address/0x977b6fc5dE62598B08C85AC8Cf2b745874E8b78c + address internal constant cbETH_A_TOKEN = 0x977b6fc5dE62598B08C85AC8Cf2b745874E8b78c; + + // https://etherscan.io/address/0x0c91bcA95b5FE69164cE583A2ec9429A569798Ed + address internal constant cbETH_V_TOKEN = 0x0c91bcA95b5FE69164cE583A2ec9429A569798Ed; + + // https://etherscan.io/address/0x889399C34461b25d70d43931e6cE9E40280E617B + address internal constant cbETH_ORACLE = 0x889399C34461b25d70d43931e6cE9E40280E617B; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant cbETH_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xe2a6863C8f043457B497667Ef3c43073e2D69089 + address internal constant cbETH_STATIC_A_TOKEN = 0xe2a6863C8f043457B497667Ef3c43073e2D69089; + + // https://etherscan.io/address/0xdAC17F958D2ee523a2206206994597C13D831ec7 + address internal constant USDT_UNDERLYING = 0xdAC17F958D2ee523a2206206994597C13D831ec7; + + uint8 internal constant USDT_DECIMALS = 6; + + // https://etherscan.io/address/0x23878914EFE38d27C4D67Ab83ed1b93A74D4086a + address internal constant USDT_A_TOKEN = 0x23878914EFE38d27C4D67Ab83ed1b93A74D4086a; + + // https://etherscan.io/address/0x6df1C1E379bC5a00a7b4C6e67A203333772f45A8 + address internal constant USDT_V_TOKEN = 0x6df1C1E379bC5a00a7b4C6e67A203333772f45A8; + + // https://etherscan.io/address/0x260326c220E469358846b187eE53328303Efe19C + address internal constant USDT_ORACLE = 0x260326c220E469358846b187eE53328303Efe19C; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant USDT_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x862c57d48becB45583AEbA3f489696D22466Ca1b + address internal constant USDT_STATIC_A_TOKEN = 0x862c57d48becB45583AEbA3f489696D22466Ca1b; + + // https://etherscan.io/address/0x7Bc3485026Ac48b6cf9BaF0A377477Fff5703Af8 + address internal constant USDT_STATA_TOKEN = 0x7Bc3485026Ac48b6cf9BaF0A377477Fff5703Af8; + + // https://etherscan.io/address/0xae78736Cd615f374D3085123A210448E74Fc6393 + address internal constant rETH_UNDERLYING = 0xae78736Cd615f374D3085123A210448E74Fc6393; + + uint8 internal constant rETH_DECIMALS = 18; + + // https://etherscan.io/address/0xCc9EE9483f662091a1de4795249E24aC0aC2630f + address internal constant rETH_A_TOKEN = 0xCc9EE9483f662091a1de4795249E24aC0aC2630f; + + // https://etherscan.io/address/0xae8593DD575FE29A9745056aA91C4b746eee62C8 + address internal constant rETH_V_TOKEN = 0xae8593DD575FE29A9745056aA91C4b746eee62C8; + + // https://etherscan.io/address/0x6929706c42d637DF5Ebf7F0BcfF2aF47F84Ea69D + address internal constant rETH_ORACLE = 0x6929706c42d637DF5Ebf7F0BcfF2aF47F84Ea69D; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant rETH_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x867Cf025B5dA438c4e215c60B59bBB3aFe896Fda + address internal constant rETH_STATIC_A_TOKEN = 0x867Cf025B5dA438c4e215c60B59bBB3aFe896Fda; + + // https://etherscan.io/address/0x5f98805A4E8be255a32880FDeC7F6728C6568bA0 + address internal constant LUSD_UNDERLYING = 0x5f98805A4E8be255a32880FDeC7F6728C6568bA0; + + uint8 internal constant LUSD_DECIMALS = 18; + + // https://etherscan.io/address/0x3Fe6a295459FAe07DF8A0ceCC36F37160FE86AA9 + address internal constant LUSD_A_TOKEN = 0x3Fe6a295459FAe07DF8A0ceCC36F37160FE86AA9; + + // https://etherscan.io/address/0x33652e48e4B74D18520f11BfE58Edd2ED2cEc5A2 + address internal constant LUSD_V_TOKEN = 0x33652e48e4B74D18520f11BfE58Edd2ED2cEc5A2; + + // https://etherscan.io/address/0xc6E7e1ff334313CeBDe98b7a8A487119CFb6e654 + address internal constant LUSD_ORACLE = 0xc6E7e1ff334313CeBDe98b7a8A487119CFb6e654; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant LUSD_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xDBf5E36569798D1E39eE9d7B1c61A7409a74F23A + address internal constant LUSD_STATIC_A_TOKEN = 0xDBf5E36569798D1E39eE9d7B1c61A7409a74F23A; + + // https://etherscan.io/address/0xD533a949740bb3306d119CC777fa900bA034cd52 + address internal constant CRV_UNDERLYING = 0xD533a949740bb3306d119CC777fa900bA034cd52; + + uint8 internal constant CRV_DECIMALS = 18; + + // https://etherscan.io/address/0x7B95Ec873268a6BFC6427e7a28e396Db9D0ebc65 + address internal constant CRV_A_TOKEN = 0x7B95Ec873268a6BFC6427e7a28e396Db9D0ebc65; + + // https://etherscan.io/address/0x1b7D3F4b3c032a5AE656e30eeA4e8E1Ba376068F + address internal constant CRV_V_TOKEN = 0x1b7D3F4b3c032a5AE656e30eeA4e8E1Ba376068F; + + // https://etherscan.io/address/0xCd627aA160A6fA45Eb793D19Ef54f5062F20f33f + address internal constant CRV_ORACLE = 0xCd627aA160A6fA45Eb793D19Ef54f5062F20f33f; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant CRV_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x149EE12310D499F701B6A5714eDAd2C832008fd2 + address internal constant CRV_STATIC_A_TOKEN = 0x149EE12310D499F701B6A5714eDAd2C832008fd2; + + // https://etherscan.io/address/0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2 + address internal constant MKR_UNDERLYING = 0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2; + + uint8 internal constant MKR_DECIMALS = 18; + + // https://etherscan.io/address/0x8A458A9dc9048e005d22849F470891b840296619 + address internal constant MKR_A_TOKEN = 0x8A458A9dc9048e005d22849F470891b840296619; + + // https://etherscan.io/address/0x6Efc73E54E41b27d2134fF9f98F15550f30DF9B1 + address internal constant MKR_V_TOKEN = 0x6Efc73E54E41b27d2134fF9f98F15550f30DF9B1; + + // https://etherscan.io/address/0x44Bb2a64bAf94210B583338D3D97b1e8288Bd478 + address internal constant MKR_ORACLE = 0x44Bb2a64bAf94210B583338D3D97b1e8288Bd478; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant MKR_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F + address internal constant SNX_UNDERLYING = 0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F; + + uint8 internal constant SNX_DECIMALS = 18; + + // https://etherscan.io/address/0xC7B4c17861357B8ABB91F25581E7263E08DCB59c + address internal constant SNX_A_TOKEN = 0xC7B4c17861357B8ABB91F25581E7263E08DCB59c; + + // https://etherscan.io/address/0x8d0de040e8aAd872eC3c33A3776dE9152D3c34ca + address internal constant SNX_V_TOKEN = 0x8d0de040e8aAd872eC3c33A3776dE9152D3c34ca; + + // https://etherscan.io/address/0xDC3EA94CD0AC27d9A86C180091e7f78C683d3699 + address internal constant SNX_ORACLE = 0xDC3EA94CD0AC27d9A86C180091e7f78C683d3699; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant SNX_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xaECEbdfE454d869A626cAb38226C52a1575D1866 + address internal constant SNX_STATIC_A_TOKEN = 0xaECEbdfE454d869A626cAb38226C52a1575D1866; + + // https://etherscan.io/address/0xba100000625a3754423978a60c9317c58a424e3D + address internal constant BAL_UNDERLYING = 0xba100000625a3754423978a60c9317c58a424e3D; + + uint8 internal constant BAL_DECIMALS = 18; + + // https://etherscan.io/address/0x2516E7B3F76294e03C42AA4c5b5b4DCE9C436fB8 + address internal constant BAL_A_TOKEN = 0x2516E7B3F76294e03C42AA4c5b5b4DCE9C436fB8; + + // https://etherscan.io/address/0x3D3efceb4Ff0966D34d9545D3A2fa2dcdBf451f2 + address internal constant BAL_V_TOKEN = 0x3D3efceb4Ff0966D34d9545D3A2fa2dcdBf451f2; + + // https://etherscan.io/address/0xfFa88E79E6be7AB1048F44112f56C8F1Cfc33F66 + address internal constant BAL_ORACLE = 0xfFa88E79E6be7AB1048F44112f56C8F1Cfc33F66; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant BAL_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 + address internal constant UNI_UNDERLYING = 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984; + + uint8 internal constant UNI_DECIMALS = 18; + + // https://etherscan.io/address/0xF6D2224916DDFbbab6e6bd0D1B7034f4Ae0CaB18 + address internal constant UNI_A_TOKEN = 0xF6D2224916DDFbbab6e6bd0D1B7034f4Ae0CaB18; + + // https://etherscan.io/address/0xF64178Ebd2E2719F2B1233bCb5Ef6DB4bCc4d09a + address internal constant UNI_V_TOKEN = 0xF64178Ebd2E2719F2B1233bCb5Ef6DB4bCc4d09a; + + // https://etherscan.io/address/0x553303d460EE0afB37EdFf9bE42922D8FF63220e + address internal constant UNI_ORACLE = 0x553303d460EE0afB37EdFf9bE42922D8FF63220e; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant UNI_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x78fb5E79D5cb59729D0cd72bEA7879aD2683454D + address internal constant UNI_STATIC_A_TOKEN = 0x78fb5E79D5cb59729D0cd72bEA7879aD2683454D; + + // https://etherscan.io/address/0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32 + address internal constant LDO_UNDERLYING = 0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32; + + uint8 internal constant LDO_DECIMALS = 18; + + // https://etherscan.io/address/0x9A44fd41566876A39655f74971a3A6eA0a17a454 + address internal constant LDO_A_TOKEN = 0x9A44fd41566876A39655f74971a3A6eA0a17a454; + + // https://etherscan.io/address/0xc30808705C01289A3D306ca9CAB081Ba9114eC82 + address internal constant LDO_V_TOKEN = 0xc30808705C01289A3D306ca9CAB081Ba9114eC82; + + // https://etherscan.io/address/0xb01e6C9af83879B8e06a092f0DD94309c0D497E4 + address internal constant LDO_ORACLE = 0xb01e6C9af83879B8e06a092f0DD94309c0D497E4; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant LDO_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x1eA6E1ba21601258401d0B9DB24eA0a07948458e + address internal constant LDO_STATIC_A_TOKEN = 0x1eA6E1ba21601258401d0B9DB24eA0a07948458e; + + // https://etherscan.io/address/0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72 + address internal constant ENS_UNDERLYING = 0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72; + + uint8 internal constant ENS_DECIMALS = 18; + + // https://etherscan.io/address/0x545bD6c032eFdde65A377A6719DEF2796C8E0f2e + address internal constant ENS_A_TOKEN = 0x545bD6c032eFdde65A377A6719DEF2796C8E0f2e; + + // https://etherscan.io/address/0xd180D7fdD4092f07428eFE801E17BC03576b3192 + address internal constant ENS_V_TOKEN = 0xd180D7fdD4092f07428eFE801E17BC03576b3192; + + // https://etherscan.io/address/0x5C00128d4d1c2F4f652C267d7bcdD7aC99C16E16 + address internal constant ENS_ORACLE = 0x5C00128d4d1c2F4f652C267d7bcdD7aC99C16E16; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant ENS_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x2767C27Eeaf3566082E74b963B6A0f5c9a46C8a1 + address internal constant ENS_STATIC_A_TOKEN = 0x2767C27Eeaf3566082E74b963B6A0f5c9a46C8a1; + + // https://etherscan.io/address/0x111111111117dC0aa78b770fA6A738034120C302 + address internal constant ONE_INCH_UNDERLYING = 0x111111111117dC0aa78b770fA6A738034120C302; + + uint8 internal constant ONE_INCH_DECIMALS = 18; + + // https://etherscan.io/address/0x71Aef7b30728b9BB371578f36c5A1f1502a5723e + address internal constant ONE_INCH_A_TOKEN = 0x71Aef7b30728b9BB371578f36c5A1f1502a5723e; + + // https://etherscan.io/address/0xA38fCa8c6Bf9BdA52E76EB78f08CaA3BE7c5A970 + address internal constant ONE_INCH_V_TOKEN = 0xA38fCa8c6Bf9BdA52E76EB78f08CaA3BE7c5A970; + + // https://etherscan.io/address/0xc929ad75B72593967DE83E7F7Cda0493458261D9 + address internal constant ONE_INCH_ORACLE = 0xc929ad75B72593967DE83E7F7Cda0493458261D9; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant ONE_INCH_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xB490fF18e55b8881C9527FE7E358dd363780449F + address internal constant ONE_INCH_STATIC_A_TOKEN = 0xB490fF18e55b8881C9527FE7E358dd363780449F; + + // https://etherscan.io/address/0x853d955aCEf822Db058eb8505911ED77F175b99e + address internal constant FRAX_UNDERLYING = 0x853d955aCEf822Db058eb8505911ED77F175b99e; + + uint8 internal constant FRAX_DECIMALS = 18; + + // https://etherscan.io/address/0xd4e245848d6E1220DBE62e155d89fa327E43CB06 + address internal constant FRAX_A_TOKEN = 0xd4e245848d6E1220DBE62e155d89fa327E43CB06; + + // https://etherscan.io/address/0x88B8358F5BC87c2D7E116cCA5b65A9eEb2c5EA3F + address internal constant FRAX_V_TOKEN = 0x88B8358F5BC87c2D7E116cCA5b65A9eEb2c5EA3F; + + // https://etherscan.io/address/0xE7A4a6fCB1E7d5052e64E70aEd37b0fD2548bAE7 + address internal constant FRAX_ORACLE = 0xE7A4a6fCB1E7d5052e64E70aEd37b0fD2548bAE7; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant FRAX_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xEE66abD4D0f9908A48E08AE354B0f425De3e237E + address internal constant FRAX_STATIC_A_TOKEN = 0xEE66abD4D0f9908A48E08AE354B0f425De3e237E; + + // https://etherscan.io/address/0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f + address internal constant GHO_UNDERLYING = 0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f; + + uint8 internal constant GHO_DECIMALS = 18; + + // https://etherscan.io/address/0x00907f9921424583e7ffBfEdf84F92B7B2Be4977 + address internal constant GHO_A_TOKEN = 0x00907f9921424583e7ffBfEdf84F92B7B2Be4977; + + // https://etherscan.io/address/0x786dBff3f1292ae8F92ea68Cf93c30b34B1ed04B + address internal constant GHO_V_TOKEN = 0x786dBff3f1292ae8F92ea68Cf93c30b34B1ed04B; + + // https://etherscan.io/address/0xD110cac5d8682A3b045D5524a9903E031d70FCCd + address internal constant GHO_ORACLE = 0xD110cac5d8682A3b045D5524a9903E031d70FCCd; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant GHO_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x048459E4fb3402e58d8900aF7283Ad574B91d742 + address internal constant GHO_STATIC_A_TOKEN = 0x048459E4fb3402e58d8900aF7283Ad574B91d742; + + // https://etherscan.io/address/0xD33526068D116cE69F19A9ee46F0bd304F21A51f + address internal constant RPL_UNDERLYING = 0xD33526068D116cE69F19A9ee46F0bd304F21A51f; + + uint8 internal constant RPL_DECIMALS = 18; + + // https://etherscan.io/address/0xB76CF92076adBF1D9C39294FA8e7A67579FDe357 + address internal constant RPL_A_TOKEN = 0xB76CF92076adBF1D9C39294FA8e7A67579FDe357; + + // https://etherscan.io/address/0x8988ECA19D502fd8b9CCd03fA3bD20a6f599bc2A + address internal constant RPL_V_TOKEN = 0x8988ECA19D502fd8b9CCd03fA3bD20a6f599bc2A; + + // https://etherscan.io/address/0x3455c45D29f022Ba9367c2c2Ad95432A5d1E9Ed0 + address internal constant RPL_ORACLE = 0x3455c45D29f022Ba9367c2c2Ad95432A5d1E9Ed0; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant RPL_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x95EF7cb3494e65dA4926bA330dBf540a13afFD17 + address internal constant RPL_STATIC_A_TOKEN = 0x95EF7cb3494e65dA4926bA330dBf540a13afFD17; + + // https://etherscan.io/address/0x91ad1f5443cF356010D2171D6D26B11C309c4b16 + address internal constant RPL_STATA_TOKEN = 0x91ad1f5443cF356010D2171D6D26B11C309c4b16; + + // https://etherscan.io/address/0x83F20F44975D03b1b09e64809B757c47f942BEeA + address internal constant sDAI_UNDERLYING = 0x83F20F44975D03b1b09e64809B757c47f942BEeA; + + uint8 internal constant sDAI_DECIMALS = 18; + + // https://etherscan.io/address/0x4C612E3B15b96Ff9A6faED838F8d07d479a8dD4c + address internal constant sDAI_A_TOKEN = 0x4C612E3B15b96Ff9A6faED838F8d07d479a8dD4c; + + // https://etherscan.io/address/0x8Db9D35e117d8b93C6Ca9b644b25BaD5d9908141 + address internal constant sDAI_V_TOKEN = 0x8Db9D35e117d8b93C6Ca9b644b25BaD5d9908141; + + // https://etherscan.io/address/0xf83B85205241c3BCCA0a09D32FaE65c16e0CF236 + address internal constant sDAI_ORACLE = 0xf83B85205241c3BCCA0a09D32FaE65c16e0CF236; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant sDAI_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xFa7E3571786CE9489bBC58d9Cb8ecE8aAe6B56F3 + address internal constant sDAI_STATIC_A_TOKEN = 0xFa7E3571786CE9489bBC58d9Cb8ecE8aAe6B56F3; + + // https://etherscan.io/address/0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6 + address internal constant STG_UNDERLYING = 0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6; + + uint8 internal constant STG_DECIMALS = 18; + + // https://etherscan.io/address/0x1bA9843bD4327c6c77011406dE5fA8749F7E3479 + address internal constant STG_A_TOKEN = 0x1bA9843bD4327c6c77011406dE5fA8749F7E3479; + + // https://etherscan.io/address/0x655568bDd6168325EC7e58Bf39b21A856F906Dc2 + address internal constant STG_V_TOKEN = 0x655568bDd6168325EC7e58Bf39b21A856F906Dc2; + + // https://etherscan.io/address/0x30efE459B6A08a8E92b41e0563bdB15a29DA377e + address internal constant STG_ORACLE = 0x30efE459B6A08a8E92b41e0563bdB15a29DA377e; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant STG_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xdeFA4e8a7bcBA345F687a2f1456F5Edd9CE97202 + address internal constant KNC_UNDERLYING = 0xdeFA4e8a7bcBA345F687a2f1456F5Edd9CE97202; + + uint8 internal constant KNC_DECIMALS = 18; + + // https://etherscan.io/address/0x5b502e3796385E1e9755d7043B9C945C3aCCeC9C + address internal constant KNC_A_TOKEN = 0x5b502e3796385E1e9755d7043B9C945C3aCCeC9C; + + // https://etherscan.io/address/0x253127Ffc04981cEA8932F406710661c2f2c3fD2 + address internal constant KNC_V_TOKEN = 0x253127Ffc04981cEA8932F406710661c2f2c3fD2; + + // https://etherscan.io/address/0xfbBa1Fd5dFce36860e46738dc9b83bb0A99551e2 + address internal constant KNC_ORACLE = 0xfbBa1Fd5dFce36860e46738dc9b83bb0A99551e2; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant KNC_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0 + address internal constant FXS_UNDERLYING = 0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0; + + uint8 internal constant FXS_DECIMALS = 18; + + // https://etherscan.io/address/0x82F9c5ad306BBa1AD0De49bB5FA6F01bf61085ef + address internal constant FXS_A_TOKEN = 0x82F9c5ad306BBa1AD0De49bB5FA6F01bf61085ef; + + // https://etherscan.io/address/0x68e9f0aD4e6f8F5DB70F6923d4d6d5b225B83b16 + address internal constant FXS_V_TOKEN = 0x68e9f0aD4e6f8F5DB70F6923d4d6d5b225B83b16; + + // https://etherscan.io/address/0x4124b23341FcEa31CF098FE9d801D59BB9F4B3F7 + address internal constant FXS_ORACLE = 0x4124b23341FcEa31CF098FE9d801D59BB9F4B3F7; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant FXS_INTEREST_RATE_STRATEGY = 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E + address internal constant crvUSD_UNDERLYING = 0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E; + + uint8 internal constant crvUSD_DECIMALS = 18; + + // https://etherscan.io/address/0xb82fa9f31612989525992FCfBB09AB22Eff5c85A + address internal constant crvUSD_A_TOKEN = 0xb82fa9f31612989525992FCfBB09AB22Eff5c85A; + + // https://etherscan.io/address/0x028f7886F3e937f8479efaD64f31B3fE1119857a + address internal constant crvUSD_V_TOKEN = 0x028f7886F3e937f8479efaD64f31B3fE1119857a; + + // https://etherscan.io/address/0x9Dc30dc58c72f5B669aEa01d02A2e4da194eE893 + address internal constant crvUSD_ORACLE = 0x9Dc30dc58c72f5B669aEa01d02A2e4da194eE893; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant crvUSD_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x848107491E029AFDe0AC543779c7790382f15929 + address internal constant crvUSD_STATIC_A_TOKEN = 0x848107491E029AFDe0AC543779c7790382f15929; + + // https://etherscan.io/address/0x6c3ea9036406852006290770BEdFcAbA0e23A0e8 + address internal constant PYUSD_UNDERLYING = 0x6c3ea9036406852006290770BEdFcAbA0e23A0e8; + + uint8 internal constant PYUSD_DECIMALS = 6; + + // https://etherscan.io/address/0x0C0d01AbF3e6aDfcA0989eBbA9d6e85dD58EaB1E + address internal constant PYUSD_A_TOKEN = 0x0C0d01AbF3e6aDfcA0989eBbA9d6e85dD58EaB1E; + + // https://etherscan.io/address/0x57B67e4DE077085Fd0AF2174e9c14871BE664546 + address internal constant PYUSD_V_TOKEN = 0x57B67e4DE077085Fd0AF2174e9c14871BE664546; + + // https://etherscan.io/address/0x36964C0579D02E0a5AaAb89E24Cf8d7CDF3549EE + address internal constant PYUSD_ORACLE = 0x36964C0579D02E0a5AaAb89E24Cf8d7CDF3549EE; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PYUSD_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x00F2a835758B33f3aC53516Ebd69f3dc77B0D152 + address internal constant PYUSD_STATIC_A_TOKEN = 0x00F2a835758B33f3aC53516Ebd69f3dc77B0D152; + + // https://etherscan.io/address/0xb51EDdDD8c47856D81C8681EA71404Cec93E92c6 + address internal constant PYUSD_STATA_TOKEN = 0xb51EDdDD8c47856D81C8681EA71404Cec93E92c6; + + // https://etherscan.io/address/0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee + address internal constant weETH_UNDERLYING = 0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee; + + uint8 internal constant weETH_DECIMALS = 18; + + // https://etherscan.io/address/0xBdfa7b7893081B35Fb54027489e2Bc7A38275129 + address internal constant weETH_A_TOKEN = 0xBdfa7b7893081B35Fb54027489e2Bc7A38275129; + + // https://etherscan.io/address/0x77ad9BF13a52517AD698D65913e8D381300c8Bf3 + address internal constant weETH_V_TOKEN = 0x77ad9BF13a52517AD698D65913e8D381300c8Bf3; + + // https://etherscan.io/address/0x87625393534d5C102cADB66D37201dF24cc26d4C + address internal constant weETH_ORACLE = 0x87625393534d5C102cADB66D37201dF24cc26d4C; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant weETH_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x867b0CDC4B39a19945E616c29639b0390b39db3B + address internal constant weETH_STATIC_A_TOKEN = 0x867b0CDC4B39a19945E616c29639b0390b39db3B; + + // https://etherscan.io/address/0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38 + address internal constant osETH_UNDERLYING = 0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38; + + uint8 internal constant osETH_DECIMALS = 18; + + // https://etherscan.io/address/0x927709711794F3De5DdBF1D176bEE2D55Ba13c21 + address internal constant osETH_A_TOKEN = 0x927709711794F3De5DdBF1D176bEE2D55Ba13c21; + + // https://etherscan.io/address/0x8838eefF2af391863E1Bb8b1dF563F86743a8470 + address internal constant osETH_V_TOKEN = 0x8838eefF2af391863E1Bb8b1dF563F86743a8470; + + // https://etherscan.io/address/0x2b86D519eF34f8Adfc9349CDeA17c09Aa9dB60E2 + address internal constant osETH_ORACLE = 0x2b86D519eF34f8Adfc9349CDeA17c09Aa9dB60E2; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant osETH_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xE5248968166206d14ab57345971E32facD839aDA + address internal constant osETH_STATIC_A_TOKEN = 0xE5248968166206d14ab57345971E32facD839aDA; + + // https://etherscan.io/address/0x4c9EDD5852cd905f086C759E8383e09bff1E68B3 + address internal constant USDe_UNDERLYING = 0x4c9EDD5852cd905f086C759E8383e09bff1E68B3; + + uint8 internal constant USDe_DECIMALS = 18; + + // https://etherscan.io/address/0x4F5923Fc5FD4a93352581b38B7cD26943012DECF + address internal constant USDe_A_TOKEN = 0x4F5923Fc5FD4a93352581b38B7cD26943012DECF; + + // https://etherscan.io/address/0x015396E1F286289aE23a762088E863b3ec465145 + address internal constant USDe_V_TOKEN = 0x015396E1F286289aE23a762088E863b3ec465145; + + // https://etherscan.io/address/0xC26D4a1c46d884cfF6dE9800B6aE7A8Cf48B4Ff8 + address internal constant USDe_ORACLE = 0xC26D4a1c46d884cfF6dE9800B6aE7A8Cf48B4Ff8; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant USDe_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x46e5d6A33C8Bd8eD38F3c95991C78C9B2FF3bC99 + address internal constant USDe_STATIC_A_TOKEN = 0x46e5d6A33C8Bd8eD38F3c95991C78C9B2FF3bC99; + + // https://etherscan.io/address/0x5F9D59db355b4A60501544637b00e94082cA575b + address internal constant USDe_STATA_TOKEN = 0x5F9D59db355b4A60501544637b00e94082cA575b; + + // https://etherscan.io/address/0xA35b1B31Ce002FBF2058D22F30f95D405200A15b + address internal constant ETHx_UNDERLYING = 0xA35b1B31Ce002FBF2058D22F30f95D405200A15b; + + uint8 internal constant ETHx_DECIMALS = 18; + + // https://etherscan.io/address/0x1c0E06a0b1A4c160c17545FF2A951bfcA57C0002 + address internal constant ETHx_A_TOKEN = 0x1c0E06a0b1A4c160c17545FF2A951bfcA57C0002; + + // https://etherscan.io/address/0x08a8Dc81AeA67F84745623aC6c72CDA3967aab8b + address internal constant ETHx_V_TOKEN = 0x08a8Dc81AeA67F84745623aC6c72CDA3967aab8b; + + // https://etherscan.io/address/0xd7b163B671f8cE9379DF8Ff7F75fA72Ccec1841c + address internal constant ETHx_ORACLE = 0xd7b163B671f8cE9379DF8Ff7F75fA72Ccec1841c; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant ETHx_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x7CC6694CF75C18D488d16FB4bf3c71A3B31cc7FB + address internal constant ETHx_STATIC_A_TOKEN = 0x7CC6694CF75C18D488d16FB4bf3c71A3B31cc7FB; + + // https://etherscan.io/address/0x9D39A5DE30e57443BfF2A8307A4256c8797A3497 + address internal constant sUSDe_UNDERLYING = 0x9D39A5DE30e57443BfF2A8307A4256c8797A3497; + + uint8 internal constant sUSDe_DECIMALS = 18; + + // https://etherscan.io/address/0x4579a27aF00A62C0EB156349f31B345c08386419 + address internal constant sUSDe_A_TOKEN = 0x4579a27aF00A62C0EB156349f31B345c08386419; + + // https://etherscan.io/address/0xeFFDE9BFA8EC77c14C364055a200746d6e12BeD6 + address internal constant sUSDe_V_TOKEN = 0xeFFDE9BFA8EC77c14C364055a200746d6e12BeD6; + + // https://etherscan.io/address/0x42bc86f2f08419280a99d8fbEa4672e7c30a86ec + address internal constant sUSDe_ORACLE = 0x42bc86f2f08419280a99d8fbEa4672e7c30a86ec; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant sUSDe_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x54D612b000697bd8B0094889D7d6A92bA0Bf2DEa + address internal constant sUSDe_STATIC_A_TOKEN = 0x54D612b000697bd8B0094889D7d6A92bA0Bf2DEa; + + // https://etherscan.io/address/0x18084fbA666a33d37592fA2633fD49a74DD93a88 + address internal constant tBTC_UNDERLYING = 0x18084fbA666a33d37592fA2633fD49a74DD93a88; + + uint8 internal constant tBTC_DECIMALS = 18; + + // https://etherscan.io/address/0x10Ac93971cdb1F5c778144084242374473c350Da + address internal constant tBTC_A_TOKEN = 0x10Ac93971cdb1F5c778144084242374473c350Da; + + // https://etherscan.io/address/0xAC50890a80A2731eb1eA2e9B4F29569CeB06D960 + address internal constant tBTC_V_TOKEN = 0xAC50890a80A2731eb1eA2e9B4F29569CeB06D960; + + // https://etherscan.io/address/0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A + address internal constant tBTC_ORACLE = 0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant tBTC_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf + address internal constant cbBTC_UNDERLYING = 0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf; + + uint8 internal constant cbBTC_DECIMALS = 8; + + // https://etherscan.io/address/0x5c647cE0Ae10658ec44FA4E11A51c96e94efd1Dd + address internal constant cbBTC_A_TOKEN = 0x5c647cE0Ae10658ec44FA4E11A51c96e94efd1Dd; + + // https://etherscan.io/address/0xeB284A70557EFe3591b9e6D9D720040E02c54a4d + address internal constant cbBTC_V_TOKEN = 0xeB284A70557EFe3591b9e6D9D720040E02c54a4d; + + // https://etherscan.io/address/0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A + address internal constant cbBTC_ORACLE = 0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant cbBTC_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xdC035D45d973E3EC169d2276DDab16f1e407384F + address internal constant USDS_UNDERLYING = 0xdC035D45d973E3EC169d2276DDab16f1e407384F; + + uint8 internal constant USDS_DECIMALS = 18; + + // https://etherscan.io/address/0x32a6268f9Ba3642Dda7892aDd74f1D34469A4259 + address internal constant USDS_A_TOKEN = 0x32a6268f9Ba3642Dda7892aDd74f1D34469A4259; + + // https://etherscan.io/address/0x490E0E6255bF65b43E2e02F7acB783c5e04572Ff + address internal constant USDS_V_TOKEN = 0x490E0E6255bF65b43E2e02F7acB783c5e04572Ff; + + // https://etherscan.io/address/0x94C7FD62fd0506e71d8142E9D36687fC72A86B02 + address internal constant USDS_ORACLE = 0x94C7FD62fd0506e71d8142E9D36687fC72A86B02; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant USDS_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xb80B3215EA8183a064073f9892eb64236160a4dF + address internal constant USDS_STATA_TOKEN = 0xb80B3215EA8183a064073f9892eb64236160a4dF; + + // https://etherscan.io/address/0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7 + address internal constant rsETH_UNDERLYING = 0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7; + + uint8 internal constant rsETH_DECIMALS = 18; + + // https://etherscan.io/address/0x2D62109243b87C4bA3EE7bA1D91B0dD0A074d7b1 + address internal constant rsETH_A_TOKEN = 0x2D62109243b87C4bA3EE7bA1D91B0dD0A074d7b1; + + // https://etherscan.io/address/0x6De3E52A1B7294A34e271a508082b1Ff4a37E30e + address internal constant rsETH_V_TOKEN = 0x6De3E52A1B7294A34e271a508082b1Ff4a37E30e; + + // https://etherscan.io/address/0x7292C95A5f6A501a9c4B34f6393e221F2A0139c3 + address internal constant rsETH_ORACLE = 0x7292C95A5f6A501a9c4B34f6393e221F2A0139c3; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant rsETH_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x8236a87084f8B84306f72007F36F2618A5634494 + address internal constant LBTC_UNDERLYING = 0x8236a87084f8B84306f72007F36F2618A5634494; + + uint8 internal constant LBTC_DECIMALS = 8; + + // https://etherscan.io/address/0x65906988ADEe75306021C417a1A3458040239602 + address internal constant LBTC_A_TOKEN = 0x65906988ADEe75306021C417a1A3458040239602; + + // https://etherscan.io/address/0x68aeB290C7727D899B47c56d1c96AEAC475cD0dD + address internal constant LBTC_V_TOKEN = 0x68aeB290C7727D899B47c56d1c96AEAC475cD0dD; + + // https://etherscan.io/address/0xf8c04B50499872A5B5137219DEc0F791f7f620D0 + address internal constant LBTC_ORACLE = 0xf8c04B50499872A5B5137219DEc0F791f7f620D0; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant LBTC_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x657e8C867D8B37dCC18fA4Caead9C45EB088C642 + address internal constant eBTC_UNDERLYING = 0x657e8C867D8B37dCC18fA4Caead9C45EB088C642; + + uint8 internal constant eBTC_DECIMALS = 8; + + // https://etherscan.io/address/0x5fefd7069a7D91d01f269DADE14526CCF3487810 + address internal constant eBTC_A_TOKEN = 0x5fefd7069a7D91d01f269DADE14526CCF3487810; + + // https://etherscan.io/address/0x47eD0509e64615c0d5C6d39AF1B38D02Bc9fE58f + address internal constant eBTC_V_TOKEN = 0x47eD0509e64615c0d5C6d39AF1B38D02Bc9fE58f; + + // https://etherscan.io/address/0x03bB418e89B75407585f8198178f253DA3216218 + address internal constant eBTC_ORACLE = 0x03bB418e89B75407585f8198178f253DA3216218; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant eBTC_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x8292Bb45bf1Ee4d140127049757C2E0fF06317eD + address internal constant RLUSD_UNDERLYING = 0x8292Bb45bf1Ee4d140127049757C2E0fF06317eD; + + uint8 internal constant RLUSD_DECIMALS = 18; + + // https://etherscan.io/address/0xFa82580c16A31D0c1bC632A36F82e83EfEF3Eec0 + address internal constant RLUSD_A_TOKEN = 0xFa82580c16A31D0c1bC632A36F82e83EfEF3Eec0; + + // https://etherscan.io/address/0xBdFe7aD7976d5d7E0965ea83a81Ca1bCfF7e84a9 + address internal constant RLUSD_V_TOKEN = 0xBdFe7aD7976d5d7E0965ea83a81Ca1bCfF7e84a9; + + // https://etherscan.io/address/0xf0eaC18E908B34770FDEe46d069c846bDa866759 + address internal constant RLUSD_ORACLE = 0xf0eaC18E908B34770FDEe46d069c846bDa866759; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant RLUSD_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x6A1792a91C08e9f0bFe7a990871B786643237f0F + address internal constant RLUSD_STATA_TOKEN = 0x6A1792a91C08e9f0bFe7a990871B786643237f0F; + + // https://etherscan.io/address/0x50D2C7992b802Eef16c04FeADAB310f31866a545 + address internal constant PT_eUSDE_29MAY2025_UNDERLYING = + 0x50D2C7992b802Eef16c04FeADAB310f31866a545; + + uint8 internal constant PT_eUSDE_29MAY2025_DECIMALS = 18; + + // https://etherscan.io/address/0x4B0821e768Ed9039a70eD1E80E15E76a5bE5Df5F + address internal constant PT_eUSDE_29MAY2025_A_TOKEN = 0x4B0821e768Ed9039a70eD1E80E15E76a5bE5Df5F; + + // https://etherscan.io/address/0x3c20fbFD32243Dd9899301C84bCe17413EeE0A0C + address internal constant PT_eUSDE_29MAY2025_V_TOKEN = 0x3c20fbFD32243Dd9899301C84bCe17413EeE0A0C; + + // https://etherscan.io/address/0x5292AB3292D076271f853Ed8e05e61cc02F0A2C6 + address internal constant PT_eUSDE_29MAY2025_ORACLE = 0x5292AB3292D076271f853Ed8e05e61cc02F0A2C6; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_eUSDE_29MAY2025_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x3b3fB9C57858EF816833dC91565EFcd85D96f634 + address internal constant PT_sUSDE_31JUL2025_UNDERLYING = + 0x3b3fB9C57858EF816833dC91565EFcd85D96f634; + + uint8 internal constant PT_sUSDE_31JUL2025_DECIMALS = 18; + + // https://etherscan.io/address/0xDE6eF6CB4aBd3A473ffC2942eEf5D84536F8E864 + address internal constant PT_sUSDE_31JUL2025_A_TOKEN = 0xDE6eF6CB4aBd3A473ffC2942eEf5D84536F8E864; + + // https://etherscan.io/address/0x8C6FeaF5d58BA1A6541F9c4aF685f62bFCBaC3b1 + address internal constant PT_sUSDE_31JUL2025_V_TOKEN = 0x8C6FeaF5d58BA1A6541F9c4aF685f62bFCBaC3b1; + + // https://etherscan.io/address/0x759B9B72700A129CD7AD8e53F9c99cb48Fd57105 + address internal constant PT_sUSDE_31JUL2025_ORACLE = 0x759B9B72700A129CD7AD8e53F9c99cb48Fd57105; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_sUSDE_31JUL2025_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xC139190F447e929f090Edeb554D95AbB8b18aC1C + address internal constant USDtb_UNDERLYING = 0xC139190F447e929f090Edeb554D95AbB8b18aC1C; + + uint8 internal constant USDtb_DECIMALS = 18; + + // https://etherscan.io/address/0xEc4ef66D4fCeEba34aBB4dE69dB391Bc5476ccc8 + address internal constant USDtb_A_TOKEN = 0xEc4ef66D4fCeEba34aBB4dE69dB391Bc5476ccc8; + + // https://etherscan.io/address/0xeA85a065F87FE28Aa8Fbf0D6C7deC472b106252C + address internal constant USDtb_V_TOKEN = 0xeA85a065F87FE28Aa8Fbf0D6C7deC472b106252C; + + // https://etherscan.io/address/0x88025072A7dB6Db5e54E46d43850bb44CA93D6C0 + address internal constant USDtb_ORACLE = 0x88025072A7dB6Db5e54E46d43850bb44CA93D6C0; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant USDtb_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x2FE4dC166ADbc0B39EdB47F4324F00A7374daBF7 + address internal constant USDtb_STATA_TOKEN = 0x2FE4dC166ADbc0B39EdB47F4324F00A7374daBF7; + + // https://etherscan.io/address/0x917459337CaAC939D41d7493B3999f571D20D667 + address internal constant PT_USDe_31JUL2025_UNDERLYING = + 0x917459337CaAC939D41d7493B3999f571D20D667; + + uint8 internal constant PT_USDe_31JUL2025_DECIMALS = 18; + + // https://etherscan.io/address/0x312ffC57778CEfa11989733e6E08143E7E229c1c + address internal constant PT_USDe_31JUL2025_A_TOKEN = 0x312ffC57778CEfa11989733e6E08143E7E229c1c; + + // https://etherscan.io/address/0xd90DA2Df915B87fE1621A7F2201FbF4ff2cCA031 + address internal constant PT_USDe_31JUL2025_V_TOKEN = 0xd90DA2Df915B87fE1621A7F2201FbF4ff2cCA031; + + // https://etherscan.io/address/0x6b99e86B48Fee533B7Bee602e7959f024051Eca0 + address internal constant PT_USDe_31JUL2025_ORACLE = 0x6b99e86B48Fee533B7Bee602e7959f024051Eca0; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_USDe_31JUL2025_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x14Bdc3A3AE09f5518b923b69489CBcAfB238e617 + address internal constant PT_eUSDE_14AUG2025_UNDERLYING = + 0x14Bdc3A3AE09f5518b923b69489CBcAfB238e617; + + uint8 internal constant PT_eUSDE_14AUG2025_DECIMALS = 18; + + // https://etherscan.io/address/0x2eDff5AF94334fBd7C38ae318edf1c40e072b73B + address internal constant PT_eUSDE_14AUG2025_A_TOKEN = 0x2eDff5AF94334fBd7C38ae318edf1c40e072b73B; + + // https://etherscan.io/address/0x22517fE16DEd08e52E7EA3423A2EA4995b1f1731 + address internal constant PT_eUSDE_14AUG2025_V_TOKEN = 0x22517fE16DEd08e52E7EA3423A2EA4995b1f1731; + + // https://etherscan.io/address/0x03f9bA9A897241985c1f12bCe97fAC1B0bd4a7A7 + address internal constant PT_eUSDE_14AUG2025_ORACLE = 0x03f9bA9A897241985c1f12bCe97fAC1B0bd4a7A7; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_eUSDE_14AUG2025_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x90D2af7d622ca3141efA4d8f1F24d86E5974Cc8F + address internal constant eUSDe_UNDERLYING = 0x90D2af7d622ca3141efA4d8f1F24d86E5974Cc8F; + + uint8 internal constant eUSDe_DECIMALS = 18; + + // https://etherscan.io/address/0x5F9190496e0DFC831C3bd307978de4a245E2F5cD + address internal constant eUSDe_A_TOKEN = 0x5F9190496e0DFC831C3bd307978de4a245E2F5cD; + + // https://etherscan.io/address/0x48351fCc9536dA440AE9471220F6dC921b0eB703 + address internal constant eUSDe_V_TOKEN = 0x48351fCc9536dA440AE9471220F6dC921b0eB703; + + // https://etherscan.io/address/0xc7Ad695ac0ae38Ae308640897E51468977A862a2 + address internal constant eUSDe_ORACLE = 0xc7Ad695ac0ae38Ae308640897E51468977A862a2; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant eUSDe_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xC96dE26018A54D51c097160568752c4E3BD6C364 + address internal constant FBTC_UNDERLYING = 0xC96dE26018A54D51c097160568752c4E3BD6C364; + + uint8 internal constant FBTC_DECIMALS = 8; + + // https://etherscan.io/address/0xcCA43ceF272c30415866914351fdfc3E881bb7c2 + address internal constant FBTC_A_TOKEN = 0xcCA43ceF272c30415866914351fdfc3E881bb7c2; + + // https://etherscan.io/address/0x4A35FD7F93324Cc48bc12190D3F37493437b1Eff + address internal constant FBTC_V_TOKEN = 0x4A35FD7F93324Cc48bc12190D3F37493437b1Eff; + + // https://etherscan.io/address/0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A + address internal constant FBTC_ORACLE = 0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant FBTC_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c + address internal constant EURC_UNDERLYING = 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c; + + uint8 internal constant EURC_DECIMALS = 6; + + // https://etherscan.io/address/0xAA6e91C82942aeAE040303Bf96c15a6dBcB82CA0 + address internal constant EURC_A_TOKEN = 0xAA6e91C82942aeAE040303Bf96c15a6dBcB82CA0; + + // https://etherscan.io/address/0x6c82c66622Eb360FC973D3F492f9D8E9eA538b08 + address internal constant EURC_V_TOKEN = 0x6c82c66622Eb360FC973D3F492f9D8E9eA538b08; + + // https://etherscan.io/address/0xa6aB031A4d189B24628EC9Eb155F0a0f1A0E55a3 + address internal constant EURC_ORACLE = 0xa6aB031A4d189B24628EC9Eb155F0a0f1A0E55a3; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant EURC_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x476a2D04AB8A7fb93E13aC14f2c077866ff13500 + address internal constant EURC_STATA_TOKEN = 0x476a2D04AB8A7fb93E13aC14f2c077866ff13500; + + // https://etherscan.io/address/0x9F56094C450763769BA0EA9Fe2876070c0fD5F77 + address internal constant PT_sUSDE_25SEP2025_UNDERLYING = + 0x9F56094C450763769BA0EA9Fe2876070c0fD5F77; + + uint8 internal constant PT_sUSDE_25SEP2025_DECIMALS = 18; + + // https://etherscan.io/address/0x5f4a0873a3A02f7C0CB0e13a1d4362a1AD90e751 + address internal constant PT_sUSDE_25SEP2025_A_TOKEN = 0x5f4a0873a3A02f7C0CB0e13a1d4362a1AD90e751; + + // https://etherscan.io/address/0xc9AD8Dd111e6384128146467aAf92B81EC422848 + address internal constant PT_sUSDE_25SEP2025_V_TOKEN = 0xc9AD8Dd111e6384128146467aAf92B81EC422848; + + // https://etherscan.io/address/0x7585693910f39df4959912B27D09EAEef06C1a93 + address internal constant PT_sUSDE_25SEP2025_ORACLE = 0x7585693910f39df4959912B27D09EAEef06C1a93; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_sUSDE_25SEP2025_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xBC6736d346a5eBC0dEbc997397912CD9b8FAe10a + address internal constant PT_USDe_25SEP2025_UNDERLYING = + 0xBC6736d346a5eBC0dEbc997397912CD9b8FAe10a; + + uint8 internal constant PT_USDe_25SEP2025_DECIMALS = 18; + + // https://etherscan.io/address/0x38A5357Ce55c81add62aBc84Fb32981e2626ADEf + address internal constant PT_USDe_25SEP2025_A_TOKEN = 0x38A5357Ce55c81add62aBc84Fb32981e2626ADEf; + + // https://etherscan.io/address/0x0D8486E1CAbf3C9407B3DdA0cfc4d9C3101fB683 + address internal constant PT_USDe_25SEP2025_V_TOKEN = 0x0D8486E1CAbf3C9407B3DdA0cfc4d9C3101fB683; + + // https://etherscan.io/address/0x8B17C02d22EE7D6B8D6829ceB710A458de41E84a + address internal constant PT_USDe_25SEP2025_ORACLE = 0x8B17C02d22EE7D6B8D6829ceB710A458de41E84a; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_USDe_25SEP2025_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xD11c452fc99cF405034ee446803b6F6c1F6d5ED8 + address internal constant tETH_UNDERLYING = 0xD11c452fc99cF405034ee446803b6F6c1F6d5ED8; + + uint8 internal constant tETH_DECIMALS = 18; + + // https://etherscan.io/address/0x481a2acf3A72ffDc602A9541896Ca1DB87f86cf7 + address internal constant tETH_A_TOKEN = 0x481a2acf3A72ffDc602A9541896Ca1DB87f86cf7; + + // https://etherscan.io/address/0x7EC9Afe70f8FD603282eBAcbc9058A83623E2899 + address internal constant tETH_V_TOKEN = 0x7EC9Afe70f8FD603282eBAcbc9058A83623E2899; + + // https://etherscan.io/address/0x85968026294b8f8Fb86d6bF3Cda079f9376aD05A + address internal constant tETH_ORACLE = 0x85968026294b8f8Fb86d6bF3Cda079f9376aD05A; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant tETH_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xbf5495Efe5DB9ce00f80364C8B423567e58d2110 + address internal constant ezETH_UNDERLYING = 0xbf5495Efe5DB9ce00f80364C8B423567e58d2110; + + uint8 internal constant ezETH_DECIMALS = 18; + + // https://etherscan.io/address/0x4E2a4d9B3DF7Aae73b418Bd39F3af9e148E3F479 + address internal constant ezETH_A_TOKEN = 0x4E2a4d9B3DF7Aae73b418Bd39F3af9e148E3F479; + + // https://etherscan.io/address/0x730318dB7b830d324fC3fEDDB1d212Ec64bD3141 + address internal constant ezETH_V_TOKEN = 0x730318dB7b830d324fC3fEDDB1d212Ec64bD3141; + + // https://etherscan.io/address/0xF3d49021fF3bbBFDfC1992A4b09E5D1d141D044C + address internal constant ezETH_ORACLE = 0xF3d49021fF3bbBFDfC1992A4b09E5D1d141D044C; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant ezETH_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x68749665FF8D2d112Fa859AA293F07A622782F38 + address internal constant XAUt_UNDERLYING = 0x68749665FF8D2d112Fa859AA293F07A622782F38; + + uint8 internal constant XAUt_DECIMALS = 6; + + // https://etherscan.io/address/0x8A2b6f94Ff3A89a03E8c02Ee92b55aF90c9454A2 + address internal constant XAUt_A_TOKEN = 0x8A2b6f94Ff3A89a03E8c02Ee92b55aF90c9454A2; + + // https://etherscan.io/address/0xa665bB258D2a732C170dFD505924214c0b1AC74F + address internal constant XAUt_V_TOKEN = 0xa665bB258D2a732C170dFD505924214c0b1AC74F; + + // https://etherscan.io/address/0x214eD9Da11D2fbe465a6fc601a91E62EbEc1a0D6 + address internal constant XAUt_ORACLE = 0x214eD9Da11D2fbe465a6fc601a91E62EbEc1a0D6; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant XAUt_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xe6A934089BBEe34F832060CE98848359883749B3 + address internal constant PT_sUSDE_27NOV2025_UNDERLYING = + 0xe6A934089BBEe34F832060CE98848359883749B3; + + uint8 internal constant PT_sUSDE_27NOV2025_DECIMALS = 18; + + // https://etherscan.io/address/0x285866acB0d60105B4Ed350a463361c2d9afA0E2 + address internal constant PT_sUSDE_27NOV2025_A_TOKEN = 0x285866acB0d60105B4Ed350a463361c2d9afA0E2; + + // https://etherscan.io/address/0x690Df181701C11C53EA33bBF303C25834b66bD14 + address internal constant PT_sUSDE_27NOV2025_V_TOKEN = 0x690Df181701C11C53EA33bBF303C25834b66bD14; + + // https://etherscan.io/address/0x8B8B73598a2c4b1de6d3b075618434CfC4826632 + address internal constant PT_sUSDE_27NOV2025_ORACLE = 0x8B8B73598a2c4b1de6d3b075618434CfC4826632; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_sUSDE_27NOV2025_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x62C6E813b9589C3631Ba0Cdb013acdB8544038B7 + address internal constant PT_USDe_27NOV2025_UNDERLYING = + 0x62C6E813b9589C3631Ba0Cdb013acdB8544038B7; + + uint8 internal constant PT_USDe_27NOV2025_DECIMALS = 18; + + // https://etherscan.io/address/0x38C503a438185cDE29b5cF4dC1442FD6F074F1cc + address internal constant PT_USDe_27NOV2025_A_TOKEN = 0x38C503a438185cDE29b5cF4dC1442FD6F074F1cc; + + // https://etherscan.io/address/0x2CE7e7b238985A8aD3863De03F200B245B0c1216 + address internal constant PT_USDe_27NOV2025_V_TOKEN = 0x2CE7e7b238985A8aD3863De03F200B245B0c1216; + + // https://etherscan.io/address/0x6A196A7B498C4EFBFEfB55364106EC80CceF0C3F + address internal constant PT_USDe_27NOV2025_ORACLE = 0x6A196A7B498C4EFBFEfB55364106EC80CceF0C3F; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_USDe_27NOV2025_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x1F84a51296691320478c98b8d77f2Bbd17D34350 + address internal constant PT_USDe_5FEB2026_UNDERLYING = + 0x1F84a51296691320478c98b8d77f2Bbd17D34350; + + uint8 internal constant PT_USDe_5FEB2026_DECIMALS = 18; + + // https://etherscan.io/address/0xE728577e9a1Fe7032bc309B4541F58f45443866e + address internal constant PT_USDe_5FEB2026_A_TOKEN = 0xE728577e9a1Fe7032bc309B4541F58f45443866e; + + // https://etherscan.io/address/0x9D244A99801dc05cbC04183769c17056B8A1Ad53 + address internal constant PT_USDe_5FEB2026_V_TOKEN = 0x9D244A99801dc05cbC04183769c17056B8A1Ad53; + + // https://etherscan.io/address/0xc35D319FA5FEc2BBE0eB4d0a826465b60f821F81 + address internal constant PT_USDe_5FEB2026_ORACLE = 0xc35D319FA5FEc2BBE0eB4d0a826465b60f821F81; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_USDe_5FEB2026_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xE8483517077afa11A9B07f849cee2552f040d7b2 + address internal constant PT_sUSDE_5FEB2026_UNDERLYING = + 0xE8483517077afa11A9B07f849cee2552f040d7b2; + + uint8 internal constant PT_sUSDE_5FEB2026_DECIMALS = 18; + + // https://etherscan.io/address/0xbe54767735fB7Acca2aa7E2d209a6f705073536D + address internal constant PT_sUSDE_5FEB2026_A_TOKEN = 0xbe54767735fB7Acca2aa7E2d209a6f705073536D; + + // https://etherscan.io/address/0xA803414f84fCEF00e745bE7CC2A315908927f15D + address internal constant PT_sUSDE_5FEB2026_V_TOKEN = 0xA803414f84fCEF00e745bE7CC2A315908927f15D; + + // https://etherscan.io/address/0x4e89f87F24C13819bBDDb56f99b38746C91677D8 + address internal constant PT_sUSDE_5FEB2026_ORACLE = 0x4e89f87F24C13819bBDDb56f99b38746C91677D8; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_sUSDE_5FEB2026_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xacA92E438df0B2401fF60dA7E4337B687a2435DA + address internal constant mUSD_UNDERLYING = 0xacA92E438df0B2401fF60dA7E4337B687a2435DA; + + uint8 internal constant mUSD_DECIMALS = 6; + + // https://etherscan.io/address/0xAa0200d169fF3ba9385c12E073c5d1d30434AE7b + address internal constant mUSD_A_TOKEN = 0xAa0200d169fF3ba9385c12E073c5d1d30434AE7b; + + // https://etherscan.io/address/0xE35e6A0D3AbC28289f5d4C2d262a133Df936b98D + address internal constant mUSD_V_TOKEN = 0xE35e6A0D3AbC28289f5d4C2d262a133Df936b98D; + + // https://etherscan.io/address/0x8adb5187695F773513dEC4b569d21db0341931dA + address internal constant mUSD_ORACLE = 0x8adb5187695F773513dEC4b569d21db0341931dA; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant mUSD_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x356B8d89c1e1239Cbbb9dE4815c39A1474d5BA7D + address internal constant syrupUSDT_UNDERLYING = 0x356B8d89c1e1239Cbbb9dE4815c39A1474d5BA7D; + + uint8 internal constant syrupUSDT_DECIMALS = 6; + + // https://etherscan.io/address/0x24Ab03a9a5Bc2C49E5523e8d915A3536ac38B91D + address internal constant syrupUSDT_A_TOKEN = 0x24Ab03a9a5Bc2C49E5523e8d915A3536ac38B91D; + + // https://etherscan.io/address/0xAEf73b04654931B94920a3D7AE62032b79fB6d0c + address internal constant syrupUSDT_V_TOKEN = 0xAEf73b04654931B94920a3D7AE62032b79fB6d0c; + + // https://etherscan.io/address/0x982aC260B5a4e5bCAb6A437e79168390cFbDe70D + address internal constant syrupUSDT_ORACLE = 0x982aC260B5a4e5bCAb6A437e79168390cFbDe70D; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant syrupUSDT_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xe343167631d89B6Ffc58B88d6b7fB0228795491D + address internal constant USDG_UNDERLYING = 0xe343167631d89B6Ffc58B88d6b7fB0228795491D; + + uint8 internal constant USDG_DECIMALS = 6; + + // https://etherscan.io/address/0x7c0477d085ECb607CF8429f3eC91Ae5E1e460F4F + address internal constant USDG_A_TOKEN = 0x7c0477d085ECb607CF8429f3eC91Ae5E1e460F4F; + + // https://etherscan.io/address/0x4f97B950a30321c181E974971E156E19fAD184A3 + address internal constant USDG_V_TOKEN = 0x4f97B950a30321c181E974971E156E19fAD184A3; + + // https://etherscan.io/address/0x83D20dEEdcd4aC1313496c8CBcAad0fa298c0CE4 + address internal constant USDG_ORACLE = 0x83D20dEEdcd4aC1313496c8CBcAad0fa298c0CE4; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant USDG_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x2DF6DfbD281F127a3690c87E4572076778a9EDa5 + address internal constant USDG_STATA_TOKEN = 0x2DF6DfbD281F127a3690c87E4572076778a9EDa5; + + // https://etherscan.io/address/0xAeBf0Bb9f57E89260d57f31AF34eB58657d96Ce0 + address internal constant PT_USDe_7MAY2026_UNDERLYING = + 0xAeBf0Bb9f57E89260d57f31AF34eB58657d96Ce0; + + uint8 internal constant PT_USDe_7MAY2026_DECIMALS = 18; + + // https://etherscan.io/address/0xE036478Da9A7ed89b56FE39A06e1FC1a4b38D4Ea + address internal constant PT_USDe_7MAY2026_A_TOKEN = 0xE036478Da9A7ed89b56FE39A06e1FC1a4b38D4Ea; + + // https://etherscan.io/address/0x04142fc546D59838852873bba5C8827601A13FC8 + address internal constant PT_USDe_7MAY2026_V_TOKEN = 0x04142fc546D59838852873bba5C8827601A13FC8; + + // https://etherscan.io/address/0x0a72df02CE3E4185b6CEDf561f0AE651E9BeE235 + address internal constant PT_USDe_7MAY2026_ORACLE = 0x0a72df02CE3E4185b6CEDf561f0AE651E9BeE235; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_USDe_7MAY2026_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x3de0ff76E8b528C092d47b9DaC775931cef80F49 + address internal constant PT_sUSDE_7MAY2026_UNDERLYING = + 0x3de0ff76E8b528C092d47b9DaC775931cef80F49; + + uint8 internal constant PT_sUSDE_7MAY2026_DECIMALS = 18; + + // https://etherscan.io/address/0x81b76ff3FeD28BA0B4a5D4c76Bd5C13Bd0641d86 + address internal constant PT_sUSDE_7MAY2026_A_TOKEN = 0x81b76ff3FeD28BA0B4a5D4c76Bd5C13Bd0641d86; + + // https://etherscan.io/address/0x762Edb8D79b97487F82093f85059e42EeEf61E9e + address internal constant PT_sUSDE_7MAY2026_V_TOKEN = 0x762Edb8D79b97487F82093f85059e42EeEf61E9e; + + // https://etherscan.io/address/0xa0dc0249c32fa79e8B9b17c735908a60b1141B40 + address internal constant PT_sUSDE_7MAY2026_ORACLE = 0xa0dc0249c32fa79e8B9b17c735908a60b1141B40; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_sUSDE_7MAY2026_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x9Bf45ab47747F4B4dD09B3C2c73953484b4eB375 + address internal constant PT_srUSDe_2APR2026_UNDERLYING = + 0x9Bf45ab47747F4B4dD09B3C2c73953484b4eB375; + + uint8 internal constant PT_srUSDe_2APR2026_DECIMALS = 18; + + // https://etherscan.io/address/0x1241ec22C9BdF16BA1Eb636F2a8de7e28A4343Cf + address internal constant PT_srUSDe_2APR2026_A_TOKEN = 0x1241ec22C9BdF16BA1Eb636F2a8de7e28A4343Cf; + + // https://etherscan.io/address/0xacD3d3FaCeA0424984F662827B988f4581a3cE31 + address internal constant PT_srUSDe_2APR2026_V_TOKEN = 0xacD3d3FaCeA0424984F662827B988f4581a3cE31; + + // https://etherscan.io/address/0xB539C6C0fc36ff1572B13ACec343B854937db576 + address internal constant PT_srUSDe_2APR2026_ORACLE = 0xB539C6C0fc36ff1572B13ACec343B854937db576; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_srUSDe_2APR2026_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0xB0F70C0bD6FD87dbEb7C10dC692a2a6106817072 + address internal constant BTCb_UNDERLYING = 0xB0F70C0bD6FD87dbEb7C10dC692a2a6106817072; + + uint8 internal constant BTCb_DECIMALS = 8; + + // https://etherscan.io/address/0x12b70410D60f926558245f769059eA3Fc7A7353E + address internal constant BTCb_A_TOKEN = 0x12b70410D60f926558245f769059eA3Fc7A7353E; + + // https://etherscan.io/address/0x6C67e666BB954d4bE23e9F1cE20e7E8699d29339 + address internal constant BTCb_V_TOKEN = 0x6C67e666BB954d4bE23e9F1cE20e7E8699d29339; + + // https://etherscan.io/address/0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A + address internal constant BTCb_ORACLE = 0xb41E773f507F7a7EA890b1afB7d2b660c30C8B0A; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant BTCb_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x619D75E3b790eBC21c289f2805Bb7177A7D732E2 + address internal constant PT_srUSDe_25JUN2026_UNDERLYING = + 0x619D75E3b790eBC21c289f2805Bb7177A7D732E2; + + uint8 internal constant PT_srUSDe_25JUN2026_DECIMALS = 18; + + // https://etherscan.io/address/0xA78Eba24D89e70A03ddB7AC195A15E53315aA5b4 + address internal constant PT_srUSDe_25JUN2026_A_TOKEN = + 0xA78Eba24D89e70A03ddB7AC195A15E53315aA5b4; + + // https://etherscan.io/address/0x9Ba896531F878Ed5f0A4F73E82d63bA7b424F910 + address internal constant PT_srUSDe_25JUN2026_V_TOKEN = + 0x9Ba896531F878Ed5f0A4F73E82d63bA7b424F910; + + // https://etherscan.io/address/0x9f336eB940730596548C342A8BF1fC530B10cc96 + address internal constant PT_srUSDe_25JUN2026_ORACLE = 0x9f336eB940730596548C342A8BF1fC530B10cc96; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_srUSDe_25JUN2026_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x9db38D74a0D29380899aD354121DfB521aDb0548 + address internal constant PT_USDG_28MAY2026_UNDERLYING = + 0x9db38D74a0D29380899aD354121DfB521aDb0548; + + uint8 internal constant PT_USDG_28MAY2026_DECIMALS = 6; + + // https://etherscan.io/address/0xA9ecb0503075124cc0B786096849A331FBe9EE6D + address internal constant PT_USDG_28MAY2026_A_TOKEN = 0xA9ecb0503075124cc0B786096849A331FBe9EE6D; + + // https://etherscan.io/address/0x1a83eCA2d3b0cea2595Fb11Ec60cb2D428217C2e + address internal constant PT_USDG_28MAY2026_V_TOKEN = 0x1a83eCA2d3b0cea2595Fb11Ec60cb2D428217C2e; + + // https://etherscan.io/address/0x83D20dEEdcd4aC1313496c8CBcAad0fa298c0CE4 + address internal constant PT_USDG_28MAY2026_ORACLE = 0x83D20dEEdcd4aC1313496c8CBcAad0fa298c0CE4; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_USDG_28MAY2026_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; + + // https://etherscan.io/address/0x59bC9FaE5D62B19d4f8d07D758047aCb9EE19d34 + address internal constant PT_srUSDe_22OCT2026_UNDERLYING = + 0x59bC9FaE5D62B19d4f8d07D758047aCb9EE19d34; + + uint8 internal constant PT_srUSDe_22OCT2026_DECIMALS = 18; + + // https://etherscan.io/address/0x01E69a58ca3ddc695820ce6f66FBdf3fA55D0545 + address internal constant PT_srUSDe_22OCT2026_A_TOKEN = + 0x01E69a58ca3ddc695820ce6f66FBdf3fA55D0545; + + // https://etherscan.io/address/0x4Af166c6F2CF882f7B196E3625c3E8f2Fe2a8083 + address internal constant PT_srUSDe_22OCT2026_V_TOKEN = + 0x4Af166c6F2CF882f7B196E3625c3E8f2Fe2a8083; + + // https://etherscan.io/address/0xBD1bc41479D0b58167584980fE57fDA913d4fB73 + address internal constant PT_srUSDe_22OCT2026_ORACLE = 0xBD1bc41479D0b58167584980fE57fDA913d4fB73; + + // https://etherscan.io/address/0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB + address internal constant PT_srUSDe_22OCT2026_INTEREST_RATE_STRATEGY = + 0x9ec6F08190DeA04A54f8Afc53Db96134e5E3FdFB; +} +library AaveV3EthereumEModes { + uint8 internal constant NONE = 0; + + uint8 internal constant WETH_wstETH_cbETH_rETH_weETH_osETH_ETHx__WETH = 1; + + uint8 internal constant USDe_sUSDe__USDC_USDT = 2; + + uint8 internal constant rsETH__WETH_wstETH_ETHx = 3; + + uint8 internal constant LBTC__WBTC = 4; + + uint8 internal constant LBTC__cbBTC = 5; + + uint8 internal constant LBTC__tBTC = 6; + + uint8 internal constant eBTC__WBTC = 7; + + uint8 internal constant sUSDe_PT_sUSDE_31JUL2025__USDC_USDT = 8; + + uint8 internal constant PT_eUSDE_29MAY2025_eUSDe__USDC_USDT = 9; + + uint8 internal constant USDe_PT_USDe_31JUL2025__USDC_USDT = 10; + + uint8 internal constant USDe__USDC_USDT = 11; + + uint8 internal constant USDe_PT_USDe_31JUL2025__USDe = 12; + + uint8 internal constant PT_eUSDE_14AUG2025_eUSDe__USDC_USDT = 13; + + uint8 internal constant PT_eUSDE_14AUG2025_eUSDe__USDe = 14; + + uint8 internal constant eUSDe__USDC_USDT = 15; + + uint8 internal constant FBTC__WBTC = 16; + + uint8 internal constant sUSDe_PT_sUSDE_31JUL2025_PT_sUSDE_25SEP2025__USDC_USDT_USDe_USDtb = 17; + + uint8 internal constant PT_sUSDE_25SEP2025__USDe = 18; + + uint8 + internal constant USDe_PT_USDe_31JUL2025_PT_eUSDE_14AUG2025_PT_USDe_25SEP2025__USDC_USDT_USDe = + 19; + + uint8 internal constant USDe_PT_USDe_31JUL2025_PT_eUSDE_14AUG2025_PT_USDe_25SEP2025__USDe = 20; + + uint8 internal constant tETH__USDC_USDT = 21; + + uint8 internal constant ezETH__wstETH = 22; + + uint8 internal constant ezETH__USDC_USDT = 23; + + uint8 internal constant sUSDe_PT_sUSDE_25SEP2025_PT_sUSDE_27NOV2025__USDC_USDT_USDe_USDtb = 24; + + uint8 internal constant PT_sUSDE_25SEP2025_PT_sUSDE_27NOV2025__USDe = 25; + + uint8 internal constant weETH__WETH_wstETH = 26; + + uint8 internal constant PT_USDe_25SEP2025_PT_USDe_27NOV2025__USDC_USDT_USDe_USDtb = 27; + + uint8 internal constant PT_USDe_25SEP2025_PT_USDe_27NOV2025__USDe = 28; + + uint8 internal constant USDe_PT_USDe_27NOV2025_PT_USDe_5FEB2026__USDC_USDT_USDe_USDtb = 29; + + uint8 internal constant USDe_PT_USDe_27NOV2025_PT_USDe_5FEB2026__USDe = 30; + + uint8 internal constant sUSDe_PT_sUSDE_27NOV2025_PT_sUSDE_5FEB2026__USDC_USDT_USDe_USDtb = 31; + + uint8 internal constant sUSDe_PT_sUSDE_27NOV2025_PT_sUSDE_5FEB2026__USDe = 32; + + uint8 internal constant syrupUSDT__USDT_GHO = 33; + + uint8 internal constant USDe_PT_USDe_5FEB2026_PT_USDe_7MAY2026__USDC_USDT_USDe_USDtb = 34; + + uint8 internal constant USDe_PT_USDe_5FEB2026_PT_USDe_7MAY2026__USDe = 35; + + uint8 internal constant sUSDe_PT_sUSDE_5FEB2026_PT_sUSDE_7MAY2026__USDC_USDT_USDe_USDtb = 36; + + uint8 internal constant sUSDe_PT_sUSDE_5FEB2026_PT_sUSDE_7MAY2026__USDe = 37; + + uint8 internal constant sUSDe_PT_srUSDe_2APR2026__USDC_USDT_USDe = 38; + + uint8 internal constant sUSDe_PT_srUSDe_2APR2026__USDe = 39; + + uint8 internal constant LINK__USDC_USDT = 40; + + uint8 internal constant EURC__USDC_USDT_GHO = 41; + + uint8 internal constant rsETH__USDC_USDT = 42; + + uint8 internal constant XAUt__USDC_USDT_GHO = 43; + + uint8 internal constant sUSDe_PT_srUSDe_2APR2026_PT_srUSDe_25JUN2026__USDC_USDT_USDe = 44; + + uint8 internal constant sUSDe_PT_srUSDe_2APR2026_PT_srUSDe_25JUN2026__USDe = 45; + + uint8 internal constant PT_USDG_28MAY2026__USDC_USDT_USDe_USDG = 46; + + uint8 internal constant sUSDe_PT_srUSDe_22OCT2026__USDC_USDT_USDe = 47; + + uint8 internal constant sUSDe_PT_srUSDe_22OCT2026__USDe = 48; +} +library AaveV3EthereumExternalLibraries { + // https://etherscan.io/address/0x6D414cd0d5eAf8C43200ac0c325A7E2Ad83B8be6 + address internal constant FLASHLOAN_LOGIC = 0x6D414cd0d5eAf8C43200ac0c325A7E2Ad83B8be6; + + // https://etherscan.io/address/0x52Da0ce88202D1542543598D1e1e27F0d344726A + address internal constant BORROW_LOGIC = 0x52Da0ce88202D1542543598D1e1e27F0d344726A; + + // https://etherscan.io/address/0x96D5686812e33Ab509ECCDb38C89d15607B2a413 + address internal constant LIQUIDATION_LOGIC = 0x96D5686812e33Ab509ECCDb38C89d15607B2a413; + + // https://etherscan.io/address/0xD70593841C57cbaA04957cc3EAcE95708e48853b + address internal constant POOL_LOGIC = 0xD70593841C57cbaA04957cc3EAcE95708e48853b; + + // https://etherscan.io/address/0x584C7d8c4cb05304FE5Ac7fbc97f20A10Fb07564 + address internal constant SUPPLY_LOGIC = 0x584C7d8c4cb05304FE5Ac7fbc97f20A10Fb07564; +} diff --git a/plan/agw/research/preset-mainnet-2026-10-15/README.md b/plan/agw/research/preset-mainnet-2026-10-15/README.md new file mode 100644 index 00000000..9be17f8d --- /dev/null +++ b/plan/agw/research/preset-mainnet-2026-10-15/README.md @@ -0,0 +1,27 @@ +# Mainnet preset templates — October 15, 2026 + +The user expanded the earlier testnet-only scope to include mainnet templates. Execution tests remain testnet-only. No mainnet signatures, approvals or transactions were made. + +## Included + +| Category | Mainnet coverage | +| --- | --- | +| DEXES | Uniswap SwapRouter02: Ethereum, Base, Arbitrum; PancakeSwap V3 SmartRouter: BNB | +| LENDING | Aave V3: Ethereum, Base, Arbitrum, BNB; Moonwell USDC/WETH + controller: Base; Venus USDT/USDC + controller: BNB | +| STAKING | Ethereum: EigenLayer deposits; Lido stake/wrap/unwrap/request withdrawal/claim | + +Existing testnet entries remain. `list` and unfiltered `get` now include both environments. Use a chainNamespace filter for a specific environment. Catalog discovery is pure: it does not imply the connected Push network supports a destination or that every token has a PRC20 mapping. + +## Verification + +Official protocol address/source snapshots are in sources.json and ../preset-catalog-2026-10-15/protocol-sources.json. Uniswap addresses.ts supplies the default Ethereum/Arbitrum SwapRouter02 at its fallback and the explicit Base address. PancakeSwap addresses.md supplies the BNB SmartRouter. EigenLayer README.md names the StrategyManager proxy. Aave, Moonwell and Venus mainnet address files are retained here. + +rpc-verification.json records chain IDs, pinned blocks, code hashes/lengths and money-market underlying addresses. All 18 included mainnet contract addresses had code (15 in rpc-verification.json, three Lido contracts in lido-rpc-verification.json). These are read-only presence/wiring checks, not an audit or proof of execution/liquidity. Existing call shapes are reused, with Lido additions checked against its official method documentation. Lido request ownership is pinned to WALLET; claim methods require/payout to msg.sender. ETH submit has maxValue zero until a caller explicitly supplies a value cap. + +## Exclusions + +This adds mainnet counterparts of the verified/representable testnet catalog. It does not activate every proposal row. Compound, Morpho/Lista, Rocket Pool/ether.fi, additional routers and prediction venues still require independent deployment/function/permission review. Dynamic-path swaps and currently unrepresentable Solana protocol flows remain excluded. One V3 router per chain keeps the two-token expansion below the 32-pin policy limit; two routers with both exact-input/output and both directions would exceed it. + +## Validation + +44 focused preset tests pass, including full-signature pin offsets for all eight DEX chains, one-rule-per-chain discovery, review templates and complete-pair generation. No mainnet transaction was used as validation. diff --git a/plan/agw/research/preset-mainnet-2026-10-15/lido-rpc-verification.json b/plan/agw/research/preset-mainnet-2026-10-15/lido-rpc-verification.json new file mode 100644 index 00000000..cf8c62e8 --- /dev/null +++ b/plan/agw/research/preset-mainnet-2026-10-15/lido-rpc-verification.json @@ -0,0 +1,24 @@ +{ + "chainId": 1, + "block": "26194814", + "contracts": [ + { + "name": "Lido stETH", + "address": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84", + "bytes": 1035, + "codeHash": "0xb9c1c929064cd21734c102a698e68bf617feefcfa5a9f62407c45401546736bf" + }, + { + "name": "Lido wstETH", + "address": "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0", + "bytes": 6492, + "codeHash": "0x630181884786c962140041cffa3acffbf39d8c93bde1a62b7b55046e57400557" + }, + { + "name": "Lido withdrawal queue", + "address": "0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1", + "bytes": 2497, + "codeHash": "0x9bc25fa4b2f98d56db4aa4156a6dc98360ccd4ef9c7bc7f891797b0024272100" + } + ] +} diff --git a/plan/agw/research/preset-mainnet-2026-10-15/moonwell-8453.json b/plan/agw/research/preset-mainnet-2026-10-15/moonwell-8453.json new file mode 100644 index 00000000..e333831d --- /dev/null +++ b/plan/agw/research/preset-mainnet-2026-10-15/moonwell-8453.json @@ -0,0 +1,1677 @@ +[ + { + "addr": "0x76e1e2F2E3239A15bAD01f027B5A4bcDE5797f3C", + "isContract": true, + "name": "JUMP_RATE_IRM_USDC_MIP_X61" + }, + { + "addr": "0xc6845C053d29396DA966be052CF4F6b08453dbbD", + "isContract": true, + "name": "JUMP_RATE_IRM_MAMO_MIP_X61" + }, + { + "addr": "0x9c4b2B98b24F36f906517139F5f9bAca732a3cF0", + "isContract": true, + "name": "JUMP_RATE_IRM_BASE_FLAT_MIP_X55" + }, + { + "addr": "0x4DdD7968113A037e84034eDDEc4524497B77d200", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_USDC_EURC_MIP_X50" + }, + { + "addr": "0xF203236B9CEf1FaaEa4aCE8e8e2EB65431ef7697", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_USDC_MIP_X46" + }, + { + "addr": "0xc3831D840243C4Df57F52C063eEE2a6b44d1840e", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_cbETH_MIP_X46" + }, + { + "addr": "0x2D0c1616CaeD53e3d161e53Fe0Ca1402017f2766", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_cbBTC_LBTC_TBTC_MIP_X42" + }, + { + "addr": "0x1b2a5f458b627Fb995F834A7B40112c27c2f77e8", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_VIRTUAL_MIP_B53" + }, + { + "addr": "0x6515fAb53Ab28D179CFf4258CdDb8f4745EBb348", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_USDC_MIP_X35" + }, + { + "addr": "0xB290615c4f5348aEFDC301a42896906212C80e46", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_USDC_EURC_MIP_X33" + }, + { + "addr": "0x4e41B935f49eB4F82A4F41B0a4b19c36A35DA4DA", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_USDC_MIP_X31" + }, + { + "addr": "0xDcB85eCF9746302aC59d4BA565dc322BB0b173B3", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_cbXRP_MIP_X29" + }, + { + "addr": "0x0F704fD3A00780779551046D492B1c64d15e6cab", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_USDC_MIP_X29" + }, + { + "addr": "0x86CBee66b3FF313Af153e697f4DC02d423ACD5CE", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_WETH_MIP_X24" + }, + { + "addr": "0xc27e9327a81bfAF33e5b0CC3Edc7112cC259b96b", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_cbBTC_MIP_X24" + }, + { + "addr": "0xbcC4D66cFFbF3A5D75669984700FbC1FeaBE8487", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_LBTC_MIP_X24" + }, + { + "addr": "0x670136DBdb194b051fc9A5e973ccfB825E7f45F6", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_TBTC_MIP_X24" + }, + { + "addr": "0xe8A41eC7fE1C991E7cfBa7f5AA1b5895EAc8307D", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_AERO_MIP_X24" + }, + { + "addr": "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb", + "isContract": true, + "name": "MORPHO_BLUE" + }, + { + "addr": "0xe770BD40b6976Efbbb095174395DD2cb794c938a", + "name": "ERC20_FACTORY_4626", + "isContract": true + }, + { + "addr": "0x6250e204bA6f722c7d498f659f8d3C5550Ec811E", + "name": "ETH_FACTORY_4626", + "isContract": true + }, + { + "addr": "0xc095cb1A6B41A5Cd7dAaF993a904afDD74758D71", + "name": "ETH_ROUTER_4626", + "isContract": true + }, + { + "addr": "0xA9c3D3a366466Fa809d1Ae982Fb2c46E5fC41101", + "name": "META_MORPHO_FACTORY", + "isContract": true + }, + { + "addr": "0x4756c26E01E61c7c2F86b10f4316e179db8F9425", + "name": "MORPHO_CHAINLINK_cbETH_ORACLE", + "isContract": true + }, + { + "addr": "0x46415998764C29aB2a25CbeA6254146D50D22687", + "name": "MORPHO_ADAPTIVE_CURVE_IRM", + "isContract": true + }, + { + "addr": "0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6", + "name": "WORMHOLE_CORE", + "isContract": true + }, + { + "addr": "0x9E1936E91A4a5AE5A5F75fFc472D6cb8e93597ea", + "isContract": true, + "name": "WORMHOLE_EXECUTOR" + }, + { + "addr": "0x265fd0500a430d65d6D79Cd8707F24C048604658", + "isContract": true, + "name": "WORMHOLE_QUOTER_ROUTER" + }, + { + "addr": "0xA25862D222Eb8343505c12d96e097e4332468D60", + "isContract": true, + "name": "WORMHOLE_QUOTER" + }, + { + "addr": "0xa54008017941EcE968623a0Dd8Ee907E2b133596", + "isContract": false, + "name": "WORMHOLE_QUOTER_SIGNER" + }, + { + "addr": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA", + "name": "USDBC", + "isContract": true + }, + { + "addr": "0x9e3380f8B29E8f85cA19EFFA80Fb41149417D943", + "isContract": true, + "name": "MOONWELL_METAMORPHO_URD" + }, + { + "addr": "0x1e1b4a620d1A840bcD56706d87903e3583c8B26f", + "isContract": true, + "name": "USDC_METAMORPHO_FEE_SPLITTER" + }, + { + "addr": "0xd5F9BaE72F6D8334ac4BB6C14463A81A43037E1C", + "isContract": true, + "name": "WETH_METAMORPHO_FEE_SPLITTER" + }, + { + "addr": "0xEB59E94B48B0fa68f8dD981a4b4CD9E30ebB44Cd", + "isContract": true, + "name": "EURC_METAMORPHO_FEE_SPLITTER" + }, + { + "addr": "0x5E868C8C6Fd597f436fBE60f1eBd5A3A07B3C320", + "isContract": true, + "name": "USDC_METAMORPHO_FEE_SPLITTER_V2" + }, + { + "addr": "0x1f0221cF50B97e1B503fb4D616eC1D883e04a7D4", + "isContract": true, + "name": "WETH_METAMORPHO_FEE_SPLITTER_V2" + }, + { + "addr": "0xc75cd0991778143089B69d0AA89E8d50763259ef", + "isContract": true, + "name": "EURC_METAMORPHO_FEE_SPLITTER_V2" + }, + { + "addr": "0x5994f9a49E9a5203A63daB2d4a7893F7fe9510ec", + "isContract": true, + "name": "cbBTC_METAMORPHO_FEE_SPLITTER" + }, + { + "addr": "0x1a8ae46098FF418E2054243491544ed8564c3CDB", + "isContract": true, + "name": "meUSDC_METAMORPHO_FEE_SPLITTER" + }, + { + "addr": "0x543257eF2161176D7C8cD90BA65C2d4CaEF5a796", + "isContract": true, + "name": "cbBTC_METAMORPHO_VAULT" + }, + { + "addr": "0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca", + "isContract": true, + "name": "USDC_METAMORPHO_VAULT" + }, + { + "addr": "0xa0E430870c4604CcfC7B38Ca7845B1FF653D0ff1", + "isContract": true, + "name": "WETH_METAMORPHO_VAULT" + }, + { + "addr": "0xf24608E0CCb972b0b0f4A6446a0BBf58c701a026", + "isContract": true, + "name": "EURC_METAMORPHO_VAULT" + }, + { + "addr": "0x89BeDBB1C4837444Da215A377275Ff96A84D6f53", + "isContract": true, + "name": "WETH_FLAGSHIP_METAMORPHO_VAULT" + }, + { + "addr": "0x48a90E85be5C56b0A669985A12ee7C449fC79965", + "isContract": true, + "name": "USDC_FLAGSHIP_METAMORPHO_VAULT" + }, + { + "addr": "0x5083b1387Ec3d4Ee6467B83890D98f1AF93F7c48", + "isContract": true, + "name": "EURC_FLAGSHIP_METAMORPHO_VAULT" + }, + { + "addr": "0xdbA76Bc542bb07538e046B40F2e8a215B409F7A8", + "isContract": true, + "name": "cbBTC_FRONTIER_METAMORPHO_VAULT" + }, + { + "addr": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "name": "USDC", + "isContract": true + }, + { + "addr": "0x4200000000000000000000000000000000000006", + "name": "WETH", + "isContract": true + }, + { + "addr": "0xFF8adeC2221f9f4D8dfbAFa6B9a297d17603493D", + "name": "GOVTOKEN", + "isContract": true + }, + { + "addr": "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb", + "name": "DAI", + "isContract": true + }, + { + "addr": "0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22", + "name": "cbETH", + "isContract": true + }, + { + "addr": "0x04c0599ae5a44757c0af6f9ec3b93da8976c150a", + "name": "weETH", + "isContract": true + }, + { + "addr": "0xFC1415403EbB0c693f9a7844b92aD2Ff24775C65", + "name": "CHAINLINK_WEETH_ORACLE", + "isContract": true + }, + { + "addr": "0xe44b816FE6bc5047C22b9fA5e4D4c5c9747476b3", + "isContract": true, + "name": "CHAINLINK_WEETH_USD_COMPOSITE_ORACLE" + }, + { + "addr": "0x6ac79dF84FA8A704711a2fb8c3763e48Ed2c0Ed6", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_weETH" + }, + { + "addr": "0x7e860098F58bBFC8648a4311b374B1D669a2bc6B", + "name": "USDC_ORACLE", + "isContract": true + }, + { + "addr": "0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70", + "name": "ETH_ORACLE", + "isContract": true + }, + { + "addr": "0x591e79239a7d679378eC8c847e5038150364C78F", + "name": "DAI_ORACLE", + "isContract": true + }, + { + "addr": "0xf586d0728a47229e747d824a939000Cf21dEF5A0", + "name": "stETHETH_ORACLE", + "isContract": true + }, + { + "addr": "0x806b4Ac04501c29769051e42783cF04dCE41440b", + "name": "cbETHETH_ORACLE", + "isContract": true + }, + { + "addr": "0xD791292655A1d382FcC1a6Cb9171476cf91F2caa", + "name": "DEPRECATED_WARDEN_EMISSIONS_ADMIN", + "isContract": false + }, + { + "addr": "0x8b621804a7637b781e2BbD58e256a591F2dF7d51", + "name": "EMISSIONS_ADMIN", + "isContract": true + }, + { + "addr": "0xB9d4acf113a423Bc4A64110B8738a52E51C2AB38", + "name": "PAUSE_GUARDIAN_DEPRECATED", + "isContract": true + }, + { + "addr": "0x446342AF4F3bCD374276891C6bb3411bf2F8779E", + "name": "SECURITY_COUNCIL", + "isContract": true + }, + { + "addr": "0x35b3314EA652899154BbfE937E3cCC2775ba712e", + "name": "BORROW_SUPPLY_GUARDIAN", + "isContract": true + }, + { + "addr": "0x8b621804a7637b781e2BbD58e256a591F2dF7d51", + "name": "TEMPORAL_GOVERNOR", + "isContract": true + }, + { + "addr": "0xB0Ba0C5D7DA4ec400C1C3E5ef2485134F89918C5", + "name": "cbETH_COMPOSITE_ORACLE", + "isContract": true + }, + { + "addr": "0xdC649f4fa047a3C98e8705E85B8b1BafCbCFef0f", + "name": "MRD_IMPL", + "isContract": true + }, + { + "addr": "0x73D8A3bF62aACa6690791E57EBaEE4e1d875d8Fe", + "name": "COMPTROLLER", + "isContract": true + }, + { + "addr": "0xfBb21d0380beE3312B33c4353c8936a0F13EF26C", + "name": "UNITROLLER", + "isContract": true + }, + { + "addr": "0xe9005b078701e2A0948D2EaC43010D35870Ad9d2", + "name": "MRD_PROXY", + "isContract": true + }, + { + "addr": "0x8D7d2230A2d195F023588eDd13dBAd56dd69770F", + "name": "MRD_PROXY_ADMIN", + "isContract": true + }, + { + "addr": "0x1FADFF493529C3Fcc7EE04F1f15D19816ddA45B7", + "name": "MTOKEN_IMPLEMENTATION", + "isContract": true + }, + { + "addr": "0xF22c8255eA615b3Da6CA5CF5aeCc8956bfF07Aa8", + "name": "JUMP_RATE_IRM_MOONWELL_USDBC", + "isContract": true + }, + { + "addr": "0x73b06D8d18De422E269645eaCe15400DE7462417", + "name": "MOONWELL_DAI", + "isContract": true + }, + { + "addr": "0x32f3A6134590fc2d9440663d35a2F0a6265F04c4", + "name": "JUMP_RATE_IRM_MOONWELL_DAI", + "isContract": true + }, + { + "addr": "0x703843C3379b52F9FF486c9f5892218d2a065cC8", + "name": "MOONWELL_USDBC", + "isContract": true + }, + { + "addr": "0x54dC357F7461BcEEE5BdbA80996f5CB7d7512445", + "name": "JUMP_RATE_IRM_MOONWELL_USDC", + "isContract": true + }, + { + "addr": "0x97E310638D59d2464b39328DBbFdAbc307aB00E2", + "name": "JUMP_RATE_IRM_MOONWELL_USDC_MIP_B27", + "isContract": true + }, + { + "addr": "0x6182b94bF494eb796C476a4Cf549f2bDD249Bf09", + "name": "JUMP_RATE_IRM_MOONWELL_USDC_MIP_B32", + "isContract": true + }, + { + "addr": "0xEdc817A28E8B93B03976FBd4a3dDBc9f7D176c22", + "name": "MOONWELL_USDC", + "isContract": true + }, + { + "addr": "0x22aD8a160e4785223cD03A86d02c3ccc2838E9FF", + "name": "JUMP_RATE_IRM_MOONWELL_USDC_MIP_X07", + "isContract": true + }, + { + "addr": "0x01635c141C070944EAE7919443ff61dB2a6a4597", + "name": "JUMP_RATE_IRM_MOONWELL_USDC_EURC_MIP_X10", + "isContract": true + }, + { + "addr": "0xBAB813eB17de29137dBe292a82ad6b50464D948f", + "name": "JUMP_RATE_IRM_MOONWELL_USDC_MIP_X12", + "isContract": true + }, + { + "addr": "0xB7056D2Dd2eb1681Ee838E79d2E742642b0c76b0", + "name": "JUMP_RATE_IRM_MOONWELL_USDC_MIP_X15", + "isContract": true + }, + { + "addr": "0xa4a1B5033F8a5B6455310bD8e1943CC5f08f9Cab", + "name": "JUMP_RATE_IRM_MOONWELL_USDC_MIP_X22", + "isContract": true + }, + { + "addr": "0x5828fE276f2238EAd59537bfFD6B82a676770061", + "name": "JUMP_RATE_IRM_MOONWELL_cbBTC_MIP_X22", + "isContract": true + }, + { + "addr": "0xB878bF6a87888b06FEDBc76B5D7557adaA1DFC18", + "name": "JUMP_RATE_IRM_MOONWELL_LBTC_MIP_X22", + "isContract": true + }, + { + "addr": "0x284c0755F1e102f0E334Dea2cc0e8f2bd6ABcBB0", + "name": "JUMP_RATE_IRM_MOONWELL_TBTC_MIP_X22", + "isContract": true + }, + { + "addr": "0xd1AbF6615767DA1Fa9b944194C68E3e0ca16B83B", + "name": "JUMP_RATE_IRM_MOONWELL_VIRTUAL_MIP_X22", + "isContract": true + }, + { + "addr": "0xfC7b55cc7C5BD3aE89aC679c7250AB30754C5cC5", + "name": "JUMP_RATE_IRM_MOONWELL_DAI_MIP_B14", + "isContract": true + }, + { + "addr": "0x8781110995cBdC58EFf7425D4A31BDc9DB8B3Cdd", + "name": "JUMP_RATE_IRM_MOONWELL_DAI_MIP_B34", + "isContract": true + }, + { + "addr": "0x0568a3aeb8E78262dEFf75ee68fAC20ae35ffA91", + "name": "JUMP_RATE_IRM_MOONWELL_WETH_MIP_B14", + "isContract": true + }, + { + "addr": "0xF5C73A4198941b49831cc95C5E407571851fbA4b", + "name": "JUMP_RATE_IRM_MOONWELL_WETH_MIP_B19", + "isContract": true + }, + { + "addr": "0x822d0b61d7d79d0AC2170D0A5bd634d7E11df06e", + "name": "JUMP_RATE_IRM_MOONWELL_WETH_MIP_B22", + "isContract": true + }, + { + "addr": "0x0FC39BF0dEA1ce1bEE4Be77680f4F55f4ef3f8eF", + "name": "JUMP_RATE_IRM_MOONWELL_WETH_MIP_B34", + "isContract": true + }, + { + "addr": "0x9249c9E427F14f78A332DC67400d1E4D36472191", + "name": "JUMP_RATE_IRM_MOONWELL_WETH_MIP_X15", + "isContract": true + }, + { + "addr": "0x628ff693426583D9a7FB391E54366292F509D457", + "name": "MOONWELL_WETH", + "isContract": true + }, + { + "addr": "0xff374aD1be52fF54Cf576586253a113d3F48D4B7", + "name": "JUMP_RATE_IRM_MOONWELL_CBETH_MIP_B18", + "isContract": true + }, + { + "addr": "0x9c3431faf6aF953815893ca4661B8F437ce0Ee22", + "name": "JUMP_RATE_IRM_MOONWELL_CBETH_MIP_B22", + "isContract": true + }, + { + "addr": "0x3bf93770f2d4a794c3d9EBEfBAeBAE2a8f09A5E5", + "name": "MOONWELL_cbETH", + "isContract": true + }, + { + "addr": "0x70778cfcFC475c7eA0f24cC625Baf6EaE475D0c9", + "name": "WETH_ROUTER", + "isContract": true + }, + { + "addr": "0xEC942bE8A8114bFD0396A5052c36027f2cA6a9d0", + "name": "CHAINLINK_ORACLE", + "isContract": true + }, + { + "addr": "0x1382cFf3CeE10D283DccA55A30496187759e4cAf", + "name": "WETH_UNWRAPPER", + "isContract": true + }, + { + "addr": "0x599D4a1538d686814eE11b331EACBBa166D7C41a", + "name": "MWETH_IMPLEMENTATION", + "isContract": true + }, + { + "addr": "0x74Cbb1E8B68dDD13B28684ECA202a351afD45EAa", + "name": "FOUNDATION_MULTISIG", + "isContract": true + }, + { + "addr": "0x4942E15F4B3B684EEbB7eE28C922fc634Cc751B1", + "name": "C-BASE", + "isContract": true + }, + { + "addr": "0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70", + "name": "CHAINLINK_ETH_USD", + "isContract": true + }, + { + "addr": "0xf586d0728a47229e747d824a939000Cf21dEF5A0", + "name": "CHAINLINK_STETH_ETH", + "isContract": true + }, + { + "addr": "0xB88BAc61a4Ca37C43a3725912B1f472c9A5bc061", + "name": "CHAINLINK_WSTETH_STETH", + "isContract": true + }, + { + "addr": "0xa5A5892bCfca4642c6bD789Ca75f27774309Dcb7", + "name": "CHAINLINK_WSTETH_STETH_COMPOSITE_ORACLE", + "isContract": true + }, + { + "addr": "0x1E6c22AAA11F507af12034A5Dc4126A6A25DC8d2", + "name": "CHAINLINK_LBTC_MARKET", + "isContract": true + }, + { + "addr": "0x5C4c8d6f6Bf79B718F3e8399AaBdFEd01cB7e48f", + "name": "REDSTONE_LBTC_BTC", + "isContract": true + }, + { + "addr": "0x497e43aF113e71929871C85C56022893B9Ac968C", + "name": "REDSTONE_LBTC_BTC_CHAINLINK_BOUNDED_ORACLE_IMPL", + "isContract": true + }, + { + "addr": "0x31d099C106cd73E731972Fdf1390Cab77F59DaDe", + "name": "REDSTONE_LBTC_BTC_CHAINLINK_BOUNDED_ORACLE_PROXY", + "isContract": true + }, + { + "addr": "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452", + "name": "wstETH", + "isContract": true + }, + { + "addr": "0xb96887502797c07Fc5b0F0938C61cC3D46e16e18", + "name": "JUMP_RATE_IRM_MOONWELL_WSTETH_MIP_B18", + "isContract": true + }, + { + "addr": "0x1dA5101eD155750FAF18beB51B17d1ffcEFc8D52", + "name": "JUMP_RATE_IRM_MOONWELL_WSTETH_MIP_B22", + "isContract": true + }, + { + "addr": "0x627Fe393Bc6EdDA28e99AE648fD6fF362514304b", + "name": "MOONWELL_wstETH", + "isContract": true + }, + { + "addr": "0x706f82e9bb5b0813501714ab5974216704980e31", + "name": "WORMHOLE_BRIDGE_RELAYER_PROXY", + "isContract": true + }, + { + "addr": "0x29eA8B56341EE95C819F4438bc048C6239AE5b71", + "name": "MOONWELL_VIEWS_IMPLEMENTATION", + "isContract": true + }, + { + "addr": "0xFf0731337F615aC5403cb243623283BC04cDe121", + "name": "MOONWELL_VIEWS_PROXY_ADMIN", + "isContract": true + }, + { + "addr": "0x6834770ABA6c2028f448E3259DDEE4BCB879d459", + "name": "MOONWELL_VIEWS_PROXY", + "isContract": true + }, + { + "addr": "0xB6fe221Fe9EeF5aBa221c348bA20A1Bf5e73624c", + "name": "rETH", + "isContract": true + }, + { + "addr": "0xf397bF97280B488cA19ee3093E81C0a77F02e9a5", + "name": "CHAINLINK_RETH_ETH", + "isContract": true + }, + { + "addr": "0x106c7f4f7f0F1B1B5973dD7b89CF3ac46420945F", + "name": "CHAINLINK_RETH_ETH_COMPOSITE_ORACLE", + "isContract": true + }, + { + "addr": "0x9260fa4D0284549ffEDc7B7003489a2837B3121d", + "name": "JUMP_RATE_IRM_MOONWELL_RETH_MIP_B18", + "isContract": true + }, + { + "addr": "0x6147Be7E92242B9119Da9aE81a6a14e64caCe094", + "name": "JUMP_RATE_IRM_MOONWELL_RETH_MIP_B22", + "isContract": true + }, + { + "addr": "0xCB1DaCd30638ae38F2B94eA64F066045B7D45f44", + "name": "MOONWELL_rETH", + "isContract": true + }, + { + "addr": "0x734AbBCe07679C9A6B4Fe3bC16325e028fA6DbB7", + "name": "WORMHOLE_BRIDGE_ADAPTER_PROXY", + "isContract": true + }, + { + "addr": "0xEF68C8f8BDeEF8e938F519ee818DeC80e320CE6b", + "name": "WORMHOLE_BRIDGE_ADAPTER_LOGIC", + "isContract": true + }, + { + "addr": "0xBe08A91ADe130aD61193bE2321ea06c4c39E124A", + "name": "xWELL_LOGIC", + "isContract": true + }, + { + "addr": "0xA88594D404727625A9437C3f886C7643872296AE", + "name": "xWELL_PROXY", + "isContract": true + }, + { + "addr": "0x65A633E8E379F9358C389c75ff1D913a92ab95B8", + "isContract": true, + "name": "ECOSYSTEM_RESERVE_PROXY" + }, + { + "addr": "0x3343b3EFeBB99B543da30d272d6363d672372aF1", + "isContract": true, + "name": "ECOSYSTEM_RESERVE_IMPL" + }, + { + "addr": "0x938FD93CBc45eCC4Bb8f2d1A69F45e593EEed514", + "isContract": true, + "name": "ECOSYSTEM_RESERVE_CONTROLLER" + }, + { + "addr": "0xe66E3A37C3274Ac24FE8590f7D84A2427194DC17", + "isContract": true, + "name": "STK_GOVTOKEN_PROXY" + }, + { + "addr": "0x4439640C018E541eC6b29a5828bc876327cf556C", + "isContract": true, + "name": "STK_GOVTOKEN_IMPL" + }, + { + "addr": "0xe0278B32c627FF6fFbbe7de6A18Ade145603e949", + "isContract": true, + "name": "VOTE_COLLECTION_PROXY" + }, + { + "addr": "0x98E708bbce1f158C1bde25f206afA7562fd0157f", + "isContract": true, + "name": "VOTE_COLLECTION_IMPL" + }, + { + "addr": "0x940181a94a35a4569e4529a3cdfb74e38fd98631", + "isContract": true, + "name": "AERO" + }, + { + "addr": "0x4EC5970fC728C5f65ba413992CD5fF6FD70fcfF0", + "isContract": true, + "name": "CHAINLINK_AERO_ORACLE" + }, + { + "addr": "0x0A72A4c3c9FC1345C1Cdaf52E0195367F8b688d0", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_AERO_MIP_B19" + }, + { + "addr": "0x78aCeC1B92dF516DA14B3dbed91219772180330A", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_AERO_MIP_B22" + }, + { + "addr": "0xF50eFEAA85E101b32E11944D6b45b61EF2C5bFeb", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_AERO_MIP_B24" + }, + { + "addr": "0x745e8CC80E30F4497c56bc5E010FbBD23079049C", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_AERO_MIP_B27" + }, + { + "addr": "0x73902f619CEB9B31FD8EFecf435CbDf89E369Ba6", + "isContract": true, + "name": "MOONWELL_AERO" + }, + { + "addr": "0x4393277B02ef3cA293990A772B7160a8c76F2443", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_WETH_MIP_B01" + }, + { + "addr": "0x6bcE15B789e537f3abA3C60CB183F0E8737f05eC", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_WETH_MIP_B05" + }, + { + "addr": "0x33DeAc0861FD6a9235b86172AA939E79085c6f52", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_USD_MIP_B05" + }, + { + "addr": "0x142DCAEC322aAA25141B2597bf348487aDBd596d", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_WETH_MIP_B06" + }, + { + "addr": "0x492dcEF1fc5253413fC5576B9522840a1A774DCe", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_USD_MIP_B06" + }, + { + "addr": "0x78Fe5d0427E669ba9F964C3495fF381a805a0487", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_CBETH_MIP_B06" + }, + { + "addr": "0x1Cdb984008dcEe9d06c28654ed31cf82680EeA62", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_CBETH_MIP_B12" + }, + { + "addr": "0xE1Dd796dBEB5A67CE37CbC52dCD164D0535c901E", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_CBETH_MIP_B13" + }, + { + "addr": "0x24bdAcf6bbEBAf567123Da16CDb79A266597e92B", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_USD_MIP_B13" + }, + { + "addr": "0x0f36Dda2b47984434051AeCAa5F9587DEA7f95B7", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_USD_MIP_B15" + }, + { + "addr": "0xAf3642bAc06cDA85340ECf18D40b8Bf89958B69E", + "isContract": false, + "name": "DEX_RELAYER" + }, + { + "addr": "0xb8051464C8c92209C92F3a4CD9C73746C4c3CFb3", + "isContract": true, + "name": "MOONWELL_weETH" + }, + { + "addr": "0xE9fFd686Ca83CeB308962f4e50c5Fd7F2E3c037e", + "isContract": true, + "name": "MARKET_ADD_CHECKER" + }, + { + "addr": "0x3b23090F40b6Dc9919942396386FC0977055cdB5", + "isContract": true, + "name": "DEPRECATED_MARKET_ADD_CHECKER" + }, + { + "addr": "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf", + "isContract": true, + "name": "cbBTC" + }, + { + "addr": "0x64c911996D3c6aC71f9b455B1E8E7266BcbD848F", + "isContract": true, + "name": "CHAINLINK_BTC_USD" + }, + { + "addr": "0x0738483Add6ab8620B731aEc0121d1d3A70BD6EA", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_cbBTC" + }, + { + "addr": "0x61e0dEC383Ef2E4be7e198F0e33605A553Da281d", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_cbBTC_MIP_B32" + }, + { + "addr": "0x2B42e79f46e4E5d8966b098140915d1E7355E1E6", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_cbBTC_MIP_X10" + }, + { + "addr": "0x2aC1a1bb4B1c05f4410c1a76318a966d9f063236", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_cbBTC_MIP_X12" + }, + { + "addr": "0xF877ACaFA28c19b96727966690b2f44d35aD5976", + "isContract": true, + "name": "MOONWELL_cbBTC" + }, + { + "addr": "0xDAe398520e2B67cd3f27aeF9Cf14D93D927f8250", + "isContract": true, + "name": "CHAINLINK_EURC_USD" + }, + { + "addr": "0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42", + "isContract": true, + "name": "EURC" + }, + { + "addr": "0x7830f646E6cb7460eF1069E4Fec8CF5B10F7BBea", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_EURC" + }, + { + "addr": "0xb682c840B5F4FC58B20769E691A6fa1305A501a2", + "isContract": true, + "name": "MOONWELL_EURC" + }, + { + "addr": "0x5a4E19842e09000a582c20A4f524C26Fb48Dd4D0", + "isContract": true, + "name": "GAUNTLET_MULTISIG" + }, + { + "addr": "0xEDfa23602D0EC14714057867A78d01e94176BEA0", + "isContract": true, + "name": "wrsETH" + }, + { + "addr": "0xd7221b10FBBC1e1ba95Fd0B4D031C15f7F365296", + "name": "CHAINLINK_rsETH_ETH", + "isContract": true + }, + { + "addr": "0x79C613B4f07080963C3B0CA58Eb2745dD4C744A5", + "name": "CHAINLINK_wrsETH_COMPOSITE_ORACLE_DEPRECATED", + "isContract": true + }, + { + "addr": "0x63f9f904CE2912853C2F7bb43dD1c1A6136F09b1", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_wrsETH" + }, + { + "addr": "0xfC41B49d064Ac646015b459C522820DB9472F4B5", + "isContract": true, + "name": "MOONWELL_wrsETH" + }, + { + "addr": "0xAf3642bAc06cDA85340ECf18D40b8Bf89958B69E", + "isContract": false, + "name": "DEFENDER_RELAYER" + }, + { + "addr": "0x84eAF5e855514685927B75876e0C9798895C249A", + "isContract": true, + "name": "PROPOSAL_VIEW" + }, + { + "addr": "0x7CEEf5D34448E127252f621EDfFCb57DCDBac5b1", + "isContract": true, + "name": "F-AERO_MULTISIG" + }, + { + "addr": "0xA090dD1a701408Df1d4d0B85b716c87565f90467", + "isContract": true, + "name": "MORPHO_PUBLIC_ALLOCATOR" + }, + { + "addr": "0x996a5b8d983FA76A1555730E01c6117D90A4E6a3", + "name": "CYPHER_EXECUTOR", + "isContract": false + }, + { + "addr": "0x3cb7367aC1E6a439dA1f1717f8055f02E3C9d56e", + "name": "CYPHER_BENEFICIARY", + "isContract": false + }, + { + "addr": "0xDE9255FB1A82dAAaCEFCE845dAdAf6635734FC58", + "name": "CYPHER_ADMIN", + "isContract": true + }, + { + "addr": "0x9E3ca32B18316f022fdFae503edA7E788e112AC6", + "isContract": true, + "name": "CYPHER_AUTO_LOAD" + }, + { + "addr": "0xF08CEF2EE2e5BE584a581209637B02637F312072", + "isContract": true, + "name": "CYPHER_ERC4626_RATE_LIMITED_ALLOWANCE" + }, + { + "addr": "0xc15d9944dAefE2dB03e53bef8DDA25a56832C5fe", + "isContract": true, + "name": "CHAINLINK_WELL_USD" + }, + { + "addr": "0x2A62AC4f8BE9E07bB0686c070A811027452D4dA1", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_WELL" + }, + { + "addr": "0xdC7810B47eAAb250De623F0eE07764afa5F71ED1", + "isContract": true, + "name": "MOONWELL_WELL" + }, + { + "addr": "0x2330aaE3bca5F05169d5f4597964D44522F62930", + "isContract": true, + "name": "CHAINLINK_USDS_USD" + }, + { + "addr": "0x820c137fa70c8691f0e44dc420a5e53c168921dc", + "isContract": true, + "name": "USDS" + }, + { + "addr": "0x310FBf531Ba386B0f4Cc207dcdE9f8BDBfdBdB52", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_USDS" + }, + { + "addr": "0xb6419c6C2e60c4025D6D06eE4F913ce89425a357", + "isContract": true, + "name": "MOONWELL_USDS" + }, + { + "addr": "0x236aa50979d5f3de3bd1eeb40e81137f22ab794b", + "isContract": true, + "name": "TBTC" + }, + { + "addr": "0x6D75BFB5A5885f841b132198C9f0bE8c872057BF", + "isContract": true, + "name": "CHAINLINK_TBTC_USD" + }, + { + "addr": "0x13820AA528Dc5Ce2dE39F9A4495272e9500452C2", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_TBTC" + }, + { + "addr": "0x9A858ebfF1bEb0D3495BB0e2897c1528eD84A218", + "isContract": true, + "name": "MOONWELL_TBTC" + }, + { + "addr": "0xecac9c5f704e954931349da37f60e39f515c11c1", + "isContract": true, + "name": "LBTC" + }, + { + "addr": "0xb9059d6ace87b699e67ec750fe4399d29797d232", + "isContract": true, + "name": "CHAINLINK_LBTC_BTC_COMPOSITE_ORACLE" + }, + { + "addr": "0x01177F591C4D4fC89cDEE039f7E17d7412CE9A7b", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_LBTC" + }, + { + "addr": "0x10fF57877b79e9bd949B3815220eC87B9fc5D2ee", + "isContract": true, + "name": "MOONWELL_LBTC" + }, + { + "addr": "0x0b3e328455c4059EEb9e3f84b5543F74E24e7E1b", + "isContract": true, + "name": "VIRTUAL" + }, + { + "addr": "0xEaf310161c9eF7c813A14f8FEF6Fb271434019F7", + "isContract": true, + "name": "CHAINLINK_VIRTUAL_USD" + }, + { + "addr": "0x048442d10E4c54655440f1C580bfcd27961b5bD8", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_VIRTUAL" + }, + { + "addr": "0xdE8Df9d942D78edE3Ca06e60712582F79CFfFC64", + "isContract": true, + "name": "MOONWELL_VIRTUAL" + }, + { + "addr": "0xE1bBF1304584895A215eB3478eAdEF2AaFF5D63f", + "isContract": true, + "name": "RESERVE_WELL_HOLDING_DEPOSIT" + }, + { + "addr": "0x8373155335839e3D078f3F224E8B6618Fc26eF17", + "isContract": true, + "name": "RESERVE_AUTOMATION_USDC" + }, + { + "addr": "0x89b89c30E2f60Bd30059c3924eF5b8c0Fcd1B64A", + "isContract": true, + "name": "RESERVE_AUTOMATION_USDBC" + }, + { + "addr": "0x9f2ca3c6Cd1dddb7aD473a0a893C3104E2af15Ad", + "isContract": true, + "name": "RESERVE_AUTOMATION_DAI" + }, + { + "addr": "0x064D8Cb3B7a22F4cFBdd602eBC7E722Bb71405D8", + "isContract": true, + "name": "RESERVE_AUTOMATION_WETH" + }, + { + "addr": "0x48bc4876D33Db30929c373c3B949b66CB8d641F3", + "isContract": true, + "name": "RESERVE_AUTOMATION_cbETH" + }, + { + "addr": "0xbd22DaFeF550094A32f388CD256FE133a0A14387", + "isContract": true, + "name": "RESERVE_AUTOMATION_wstETH" + }, + { + "addr": "0xEfE30785362225106367039971d82715dcB35192", + "isContract": true, + "name": "RESERVE_AUTOMATION_rETH" + }, + { + "addr": "0xc7840e86A0aa22c23BCbC153CE61f6009733bf2C", + "isContract": true, + "name": "RESERVE_AUTOMATION_AERO" + }, + { + "addr": "0x75494780E76bB41c0fDf29DBA4b2Ce82501c12b0", + "isContract": true, + "name": "RESERVE_AUTOMATION_weETH" + }, + { + "addr": "0x83D37e3df05F1507667AF4dfc83Ec8A38Cf2dA08", + "isContract": true, + "name": "RESERVE_AUTOMATION_cbBTC" + }, + { + "addr": "0x7bBe5972e01BAc64fE3AD7EFfBa6D164f0a1F15f", + "isContract": true, + "name": "RESERVE_AUTOMATION_EURC" + }, + { + "addr": "0xe34D7D109B97e1b1DAc9A9920e6A6769814Ac7eE", + "isContract": true, + "name": "RESERVE_AUTOMATION_wrsETH" + }, + { + "addr": "0xA078017f827DC7B8540C98A3bF7b2153B2aF6cB3", + "isContract": true, + "name": "RESERVE_AUTOMATION_USDS" + }, + { + "addr": "0x84C74431200Bcd3Ba4b557024734891857b43354", + "isContract": true, + "name": "RESERVE_AUTOMATION_TBTC" + }, + { + "addr": "0xf8f7b937a4CC6Cc16b600B3611ce0c1152a5b3F9", + "isContract": true, + "name": "RESERVE_AUTOMATION_LBTC" + }, + { + "addr": "0x665B7dD0260AE7a7Dd57E7F4278efdb6262c6993", + "isContract": true, + "name": "RESERVE_AUTOMATION_VIRTUAL" + }, + { + "addr": "0xc2dA00D538237822e3c7dcb95114FA1474e4c884", + "isContract": true, + "name": "CHAINLINK_ETH_USD_OEV_WRAPPER_DEPRECATED" + }, + { + "addr": "0xfEA70a74d94A6b6F9764DB9C4867bBE4678A5Da6", + "isContract": true, + "name": "CHAINLINK_BTC_USD_OEV_WRAPPER" + }, + { + "addr": "0x945ab3891D7963214833B4D51F54f068c8e6b55e", + "isContract": true, + "name": "CHAINLINK_EURC_USD_OEV_WRAPPER" + }, + { + "addr": "0x605F14438A6B44a78975FA6BEC37F041687a8bAe", + "isContract": true, + "name": "CHAINLINK_WELL_USD_OEV_WRAPPER" + }, + { + "addr": "0xF655eeDeDE0cD9f7a3de5E8018909c429dCfbf9B", + "isContract": true, + "name": "CHAINLINK_USDS_USD_OEV_WRAPPER" + }, + { + "addr": "0xd46e01f8517319784c58dFe2004440999a75Ea66", + "isContract": true, + "name": "CHAINLINK_TBTC_USD_OEV_WRAPPER" + }, + { + "addr": "0xF6475307E139d77BaCEf384eeEbbC2424C059c8F", + "name": "JUMP_RATE_IRM_MOONWELL_USDC_MIP_X18", + "isContract": true + }, + { + "addr": "0x59427E4e2EEDC6E7366a72CC91Bf324d2d35E88c", + "name": "JUMP_RATE_IRM_MOONWELL_USDC_MIP_X20", + "isContract": true + }, + { + "addr": "0xc57723C94e9F7524aaDD2F6eeeC6D640BCd1FDca", + "name": "JUMP_RATE_IRM_MOONWELL_WETH_MIP_X20", + "isContract": true + }, + { + "addr": "0xC19B9FF59E445E267283ca6618Ea647268F200b0", + "isContract": true, + "name": "CHAINLINK_VIRTUAL_USD_OEV_WRAPPER" + }, + { + "addr": "0xBAa5CC21fd487B8Fcc2F632f3F4E8D37262a0842", + "isContract": true, + "name": "MORPHO" + }, + { + "addr": "0xe95e258bb6615d47515Fc849f8542dA651f12bF6", + "isContract": true, + "name": "CHAINLINK_MORPHO_USD" + }, + { + "addr": "0xfeA5a5927645C0DC5C1E740Ec1B24AD320c7e58f", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_MORPHO" + }, + { + "addr": "0x6308204872BdB7432dF97b04B42443c714904F3E", + "isContract": true, + "name": "MOONWELL_MORPHO" + }, + { + "addr": "0xcb585250f852c6c6bf90434ab21a00f02833a4af", + "isContract": true, + "name": "cbXRP" + }, + { + "addr": "0x9f0C1dD78C4CBdF5b9cf923a549A201EdC676D34", + "isContract": true, + "name": "CHAINLINK_cbXRP_USD" + }, + { + "addr": "0xcB95579c706144f3150f7C3b1BD3F24A48d3463e", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_cbXRP" + }, + { + "addr": "0xb4fb8fed5b3AaA8434f0B19b1b623d977e07e86d", + "isContract": true, + "name": "MOONWELL_cbXRP" + }, + { + "addr": "0x08eDEbFFaE68970DCf751baa826182b3a4aCFC05", + "isContract": true, + "name": "ANTHIAS_MULTISIG" + }, + { + "addr": "0x09f96462CA418aCf8f4570149d1533Ab5030EAdC", + "isContract": false, + "name": "ANTHIAS_EOA" + }, + { + "addr": "0x8BB4C975Ff3c250e0ceEA271728547f3802B36Fd", + "isContract": true, + "name": "MERKLE_CAMPAIGN_CREATOR" + }, + { + "addr": "0xFf62A7c278C62eD665133147129245053Bbf5918", + "isContract": true, + "name": "MORPHO_FACTORY_V1_1" + }, + { + "addr": "0x2DC205F24BCb6B311E5cdf0745B0741648Aebd3d", + "isContract": true, + "name": "MORPHO_CHAINLINK_ORACLE_FACTORY" + }, + { + "addr": "0x7e860098F58bBFC8648a4311b374B1D669a2bc6B", + "isContract": true, + "name": "CHAINLINK_USDC_USD" + }, + { + "addr": "0x245951c8a17Dd700a35a3CB6E2007C3E8D133F0b", + "isContract": true, + "name": "MORPHO_CHAINLINK_WELL_USD_ORACLE_DEPRECATED" + }, + { + "addr": "0xd4669fCee3BE73b51438ad1f1debEB3505Eab308", + "isContract": false, + "name": "LUKE_EOA" + }, + { + "addr": "0xF4d4fCDdE388408C7A295E1C34C7B204bC0b4BAC", + "isContract": true, + "name": "llUSDC_METAMORPHO_VAULT" + }, + { + "addr": "0xE1bA476304255353aEF290e6474A417D06e7b773", + "isContract": true, + "name": "meUSDC_METAMORPHO_VAULT" + }, + { + "addr": "0x7300B37DfdfAb110d83290A29DfB31B1740219fE", + "isContract": true, + "name": "MAMO" + }, + { + "addr": "0xeF7541b388a77C1709a3d44BfBfC5c1ED3F0Ac94", + "isContract": true, + "name": "CHAINLINK_MAMO_USD" + }, + { + "addr": "0x6D8CB0C4C5caA9876939cB6e5EED8ca84d474c0c", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_MAMO" + }, + { + "addr": "0x2F90Bb22eB3979f5FfAd31EA6C3F0792ca66dA32", + "isContract": true, + "name": "MOONWELL_MAMO" + }, + { + "addr": "0xb62f6CcE22d414483c3BC4Dea6f4Fe6B6dF50239", + "isContract": true, + "name": "CHAINLINK_WELL_USD_ORACLE_IMPL_DEPRECATED" + }, + { + "addr": "0x3fCA08493283E79cbD1E733Ca3Cb8eC8C6074deC", + "isContract": true, + "name": "CHAINLINK_ORACLE_PROXY_ADMIN" + }, + { + "addr": "0xAEeE6335f50e1f8aF924DF0742b1879C9761F5f5", + "isContract": true, + "name": "CHAINLINK_WELL_USD_ORACLE_PROXY" + }, + { + "addr": "0x71FBaD6c2200C8A5B89380f9B6bb8a35d411c852", + "isContract": true, + "name": "MORPHO_CHAINLINK_WELL_USD_ORACLE" + }, + { + "addr": "0x4073bA1AF0bD159BF5c6F85D2FC9f43EEf43b02A", + "isContract": true, + "name": "CHAINLINK_MAMO_USD_ORACLE_IMPL" + }, + { + "addr": "0xF4DCcaE864EDF2b218B40A950c4407C3383Dadb9", + "isContract": true, + "name": "CHAINLINK_MAMO_USD_ORACLE_PROXY" + }, + { + "addr": "0x18d1325e8528E3ceafBf9a77F3bE3f76Fec42D5C", + "isContract": true, + "name": "MORPHO_CHAINLINK_MAMO_USD_ORACLE" + }, + { + "addr": "0xFf37a7467a80EF462Ad5d73f67F619Ca2dbb2D4B", + "isContract": true, + "name": "CHAINLINK_stkWELL_USD_ORACLE_IMPL" + }, + { + "addr": "0x593355Faef3075AF1b20Ca22FeDAbF6F3D2FD66C", + "isContract": true, + "name": "CHAINLINK_stkWELL_USD_ORACLE_PROXY" + }, + { + "addr": "0xc842d95b9C35bf97842110408A8C501645Fb1722", + "isContract": true, + "name": "MORPHO_CHAINLINK_stkWELL_USD_ORACLE" + }, + { + "addr": "0x74Cbb1E8B68dDD13B28684ECA202a351afD45EAa", + "isContract": true, + "name": "F-DEVGRANT" + }, + { + "addr": "0xe8dD07CCf5BC4922424140E44Eb970F5950725ef", + "isContract": true, + "name": "CHAINLINK_wrsETH_ETH_EXCHANGE_RATE" + }, + { + "addr": "0xccC994a46c0d81c934fd6c82d89f626aee336ade", + "isContract": true, + "name": "CHAINLINK_wrsETH_COMPOSITE_ORACLE" + }, + { + "addr": "0xadcC226082E878371a3fc33c1f914dad7FB6a28D", + "isContract": false, + "name": "BAD_DEBT_REPAYER_EOA" + }, + { + "addr": "0x1796720C9441F8f18a3AA570aB7c10597a57C08e", + "isContract": true, + "name": "MWETH_OWNER_WRAPPER_IMPL" + }, + { + "addr": "0x82e5e038A1D93f371f02768b09B2C6C4b98f6250", + "isContract": true, + "name": "MWETH_OWNER_WRAPPER" + }, + { + "addr": "0xab05F7216B4ecD0594E703F21fb0dE6183BFeCF3", + "isContract": true, + "name": "OEV_PROTOCOL_FEE_REDEEMER" + }, + { + "addr": "0x57DA741aD933869cC9EBfb9668288053A0738f3c", + "isContract": true, + "name": "CHAINLINK_ETH_USD_OEV_WRAPPER" + }, + { + "addr": "0xB5421a112f07C31820f413852E7e39E2d765e4B8", + "isContract": true, + "name": "CHAINLINK_OEV_MORPHO_WRAPPER_IMPL" + }, + { + "addr": "0x1E6A29666288a310326B37d823Fe4Ea3937424D2", + "isContract": true, + "name": "CHAINLINK_RETH_ETH_EXCHANGE_RATE" + }, + { + "addr": "0x98819cC6C48eE912508454b0f1f4e68BD35ca313", + "isContract": true, + "name": "CHAINLINK_RETH_ETH_EXCHANGE_RATE_ORACLE" + }, + { + "addr": "0x24b53b15dca212d7ba6da287b5e2b801db37c24e", + "isContract": true, + "name": "MORPHO_VIEWS_V2_IMPLEMENTATION" + }, + { + "addr": "0x7465c2cfa4a9ab6acaacbf8eaa28257f6a1d1486", + "isContract": true, + "name": "MORPHO_VIEWS_V2_PROXY_ADMIN" + }, + { + "addr": "0x7fc0dbc713649b96e984b2a5935016d3a5d1ed31", + "isContract": true, + "name": "MORPHO_VIEWS_V2_PROXY" + }, + { + "addr": "0xbB2F06CeAE42CBcF5559Ed0713538c8892D977c9", + "isContract": true, + "name": "MORPHO_meUSDC_VAULT_V2" + }, + { + "addr": "0xF03499F8AE0b883e630558F23760a6A89b1dae7e", + "isContract": true, + "name": "MORPHO_VAULT_V2_VIEWS_IMPLEMENTATION" + }, + { + "addr": "0x8D189997ccD6ab6909eF89836e5bcEf94599Cce0", + "isContract": true, + "name": "MORPHO_VAULT_V2_VIEWS_PROXY" + }, + { + "addr": "0x0eaB3B9aE08B43077aD1Aeb9820462FAF99BCEc8", + "isContract": true, + "name": "DAI_ORACLE_OEV_WRAPPER" + }, + { + "addr": "0xb7967D184907737a955f39a8067Bc1a0CC313292", + "isContract": true, + "name": "CHAINLINK_USDC_USD_OEV_WRAPPER" + }, + { + "addr": "0x67996D1ff7a3711a91E2839d1059Fcb950C0495D", + "isContract": true, + "name": "cbETHETH_ORACLE_OEV_WRAPPER" + }, + { + "addr": "0x3623c921bfD9d7E9D88E5CBb436B68bE2C2Bc0B7", + "isContract": true, + "name": "CHAINLINK_AERO_ORACLE_OEV_WRAPPER" + }, + { + "addr": "0x6F0cC02e5a7640B28F538fcc06bCA3BdFA57d1BB", + "isContract": true, + "name": "CHAINLINK_BTC_USD_OEV_WRAPPER_DEPRECATED" + }, + { + "addr": "0x48F86A23aDE243F7a1028108aA65274FC84f382F", + "isContract": true, + "name": "CHAINLINK_EURC_USD_OEV_WRAPPER_DEPRECATED" + }, + { + "addr": "0x1E0E8bcFb5FFa86749B8b89fb6e055337Ba74A39", + "isContract": true, + "name": "CHAINLINK_WELL_USD_OEV_WRAPPER_DEPRECATED" + }, + { + "addr": "0xAeC8E8E3696fc5fcd954eb3ebC26B72FC2FE8E8e", + "isContract": true, + "name": "CHAINLINK_USDS_USD_OEV_WRAPPER_DEPRECATED" + }, + { + "addr": "0x94423903EaAf8638bDE262c417fEEf5E2Ec507E5", + "isContract": true, + "name": "CHAINLINK_TBTC_USD_OEV_WRAPPER_DEPRECATED" + }, + { + "addr": "0x6aa41dF8FB0deC976B59bf0824FC5fFB88ccA958", + "isContract": true, + "name": "CHAINLINK_VIRTUAL_USD_OEV_WRAPPER_DEPRECATED" + }, + { + "addr": "0x769E8D347C75502878c1844eAFaCEa3547D9a225", + "isContract": true, + "name": "CHAINLINK_MORPHO_USD_OEV_WRAPPER" + }, + { + "addr": "0xE5C91119dFF7e04cd6834a9c9D0A66380EdB4aF5", + "isContract": true, + "name": "CHAINLINK_cbXRP_USD_OEV_WRAPPER" + }, + { + "addr": "0xDBD37C274A70A8A3f92A227c843a6a8d3203afe6", + "isContract": true, + "name": "CHAINLINK_MAMO_USD_OEV_WRAPPER" + }, + { + "addr": "0xe2747A3f7dD8585eB04c7632a9561D9616454B29", + "isContract": true, + "name": "STK_GOVTOKEN_IMPL_V2" + }, + { + "addr": "0x5B710010586C1b728B047c3E42473c700eeA4026", + "isContract": true, + "name": "PAUSE_GUARDIAN" + }, + { + "addr": "0xb84543e036054E2cD5394A9D99fa701Eef666df4", + "isContract": true, + "name": "WORMHOLE_BRIDGE_ADAPTER_IMPL_V3" + }, + { + "addr": "0xf81094eedd37DA759E837D727D940f14b18b6c76", + "isContract": true, + "name": "VOTE_COLLECTION_IMPL_V2" + }, + { + "addr": "0xacfE6019Ed1A7Dc6f7B508C02d1b04ec88cC21bf", + "isContract": true, + "name": "VVV" + }, + { + "addr": "0xaABc55Ca55D70B034e4daA2551A224239890282F", + "isContract": true, + "name": "CHAINLINK_VVV_USD" + }, + { + "addr": "0xCF1A3322977ef557899ad2BF3056d8411EdC87A1", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_VVV" + }, + { + "addr": "0xD64BCb70C613a6D1F4D7D57Ba64bb4a0767A9682", + "isContract": true, + "name": "MOONWELL_VVV" + }, + { + "addr": "0x0208810d9d0D639D6e212Ad1B42cFB22Ab3E51A2", + "isContract": true, + "name": "CHAINLINK_VVV_USD_OEV_WRAPPER" + }, + { + "addr": "0x7599aa7F32bda9Ef644f6cB0482c64fC26f68799", + "isContract": true, + "name": "WORMHOLE_BRIDGE_ADAPTER_IMPL_V4" + }, + { + "addr": "0x3fBB877C8d5cF56b30FD29D21E865cA58f127472", + "isContract": true, + "name": "VOTE_COLLECTION_IMPL_V3" + }, + { + "addr": "0x78Feb72aeA00B912ac45438e0764A02213266568", + "isContract": true, + "name": "WORMHOLE_BRIDGE_ADAPTER_IMPL_V5" + }, + { + "addr": "0x2481BFB0DfA54Dc155011eF2E90ADAB9556b8D99", + "isContract": true, + "name": "WORMHOLE_BRIDGE_ADAPTER_IMPL_V6" + }, + { + "addr": "0x4916EC6773e14CA873be3d65022BB122CB8b89a2", + "isContract": true, + "name": "DAI_ORACLE_OEV_WRAPPER_DEPRECATED_V3" + }, + { + "addr": "0x7600b9068bB0aFEA6adf70eD6CD0f8492117236d", + "isContract": true, + "name": "CHAINLINK_USDC_USD_OEV_WRAPPER_DEPRECATED_V3" + }, + { + "addr": "0xeb083d234ec636A10325ea42bCbbE09Aa56d1547", + "isContract": true, + "name": "CHAINLINK_ETH_USD_OEV_WRAPPER_DEPRECATED_V3" + }, + { + "addr": "0xdC79C7D5D4dA3b237D2d078a1ee06F2FD1FfEf98", + "isContract": true, + "name": "CHAINLINK_AERO_ORACLE_OEV_WRAPPER_DEPRECATED_V3" + }, + { + "addr": "0x6a3c960Bcfb69BAe78f706c9c6B168bB7693E119", + "isContract": true, + "name": "CHAINLINK_BTC_USD_OEV_WRAPPER_DEPRECATED_V3" + }, + { + "addr": "0xd5669e0175D01cc5F6Be9607129668D0833DcbEC", + "isContract": true, + "name": "CHAINLINK_EURC_USD_OEV_WRAPPER_DEPRECATED_V3" + }, + { + "addr": "0xBA5220805E43194Ff12A434fBb745f3a2E1a09db", + "isContract": true, + "name": "CHAINLINK_WELL_USD_OEV_WRAPPER_DEPRECATED_V3" + }, + { + "addr": "0x6621069673C61a143DaDF376389e82DA372BF405", + "isContract": true, + "name": "CHAINLINK_USDS_USD_OEV_WRAPPER_DEPRECATED_V3" + }, + { + "addr": "0xBfAaA8B347dA80B909504d403CB4C8F245e921ab", + "isContract": true, + "name": "CHAINLINK_TBTC_USD_OEV_WRAPPER_DEPRECATED_V3" + }, + { + "addr": "0x12EC8CfEbCF5728774925feC1502733f906CB6e3", + "isContract": true, + "name": "CHAINLINK_VIRTUAL_USD_OEV_WRAPPER_DEPRECATED_V3" + }, + { + "addr": "0x09793267120dbF519B2B0e8Ea77A689e2Ba453F0", + "isContract": true, + "name": "CHAINLINK_MORPHO_USD_OEV_WRAPPER_DEPRECATED_V3" + }, + { + "addr": "0xf2Ac6F14A094A82A6f9489364CdE9e1ba2548d49", + "isContract": true, + "name": "CHAINLINK_cbXRP_USD_OEV_WRAPPER_DEPRECATED_V3" + }, + { + "addr": "0xfbA86a013f7FD93B5454e147242CF2Bf419e120D", + "isContract": true, + "name": "CHAINLINK_MAMO_USD_OEV_WRAPPER_DEPRECATED_V3" + }, + { + "addr": "0xD6aFC41DD78043C55273e217f69E5e1248793B7A", + "isContract": true, + "name": "CHAINLINK_VVV_USD_OEV_WRAPPER_DEPRECATED_V3" + }, + { + "addr": "0xb22694F7280DB8832B37240C4e40C240a4eecC8a", + "isContract": true, + "name": "CHAINLINK_OEV_MORPHO_WRAPPER_IMPL_V2" + }, + { + "addr": "0x701551a3cd30A29cCC012e8f160fB2Cac9b0f5Af", + "isContract": true, + "name": "VOTING_POWER_AGGREGATOR_IMPL" + }, + { + "addr": "0xb3a9E0DCf37658a48aa9f018C44f90378ddD4357", + "isContract": true, + "name": "VOTING_POWER_AGGREGATOR" + }, + { + "addr": "0x9d465d56d235674693A158Af40c8d53ddE59B0CE", + "isContract": true, + "name": "VOTE_COLLECTION_V2_IMPL" + }, + { + "addr": "0xcD6b4B047e55A513b8efc2B61F58B9f7Fa6096FC", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_USDC_MIP_X66" + }, + { + "addr": "0xa1a0cD8f2A37689a84B93814Cb4BFAF356620933", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_wstETH_MIP_X66" + }, + { + "addr": "0xaa144B847f55efb63C8a8651541fD6af1cb23BB1", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_cbBTC_MIP_X66" + }, + { + "addr": "0x1fB29b6632Ad7c590Df8Cf1498D4952B95170101", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_EURC_MIP_X66" + }, + { + "addr": "0xe214B2BC13DCf0FCf1481f75918C84Eb5Bd7c2Db", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_MAMO_MIP_X66" + }, + { + "addr": "0x1e55782FeDC3e09c40A90f5A67DEcFfB55EcD412", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_MORPHO_MIP_X66" + }, + { + "addr": "0x3C10e4B6d60d4b2ec88aBb5aa1F613f030872B5a", + "isContract": true, + "name": "JUMP_RATE_IRM_MOONWELL_USDS_MIP_X66" + } +] diff --git a/plan/agw/research/preset-mainnet-2026-10-15/read-only-probe.cjs b/plan/agw/research/preset-mainnet-2026-10-15/read-only-probe.cjs new file mode 100644 index 00000000..04ca3a0d --- /dev/null +++ b/plan/agw/research/preset-mainnet-2026-10-15/read-only-probe.cjs @@ -0,0 +1,8 @@ +const {createPublicClient,http,keccak256,getAddress,parseAbi}=require(process.cwd()+'/node_modules/viem');const fs=require('fs'); +const configs=[ +[1,'https://ethereum-rpc.publicnode.com',{'Uniswap V3':'0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45','Aave V3':'0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2','EigenLayer':'0x858646372CC42E1A627fcE94aa7A7033e7CF075A'}], +[8453,'https://base-rpc.publicnode.com',{'Uniswap V3':'0x2626664c2603336E57B271c5C0b26F421741e481','Aave V3':'0xA238Dd80C259a72e81d7e4664a9801593F98d1c5','Moonwell USDC':'0xEdc817A28E8B93B03976FBd4a3dDBc9f7D176c22','Moonwell WETH':'0x628ff693426583D9a7FB391E54366292F509D457','Moonwell controller':'0xfBb21d0380beE3312B33c4353c8936a0F13EF26C'}], +[42161,'https://arbitrum-one-rpc.publicnode.com',{'Uniswap V3':'0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45','Aave V3':'0x794a61358D6845594F94dc1DB02A252b5b4814aD'}], +[56,'https://bsc-rpc.publicnode.com',{'PancakeSwap V3':'0x13f4EA83D0bd40E75C8222255bc855a974568Dd4','Aave V3':'0x6807dc923806fE8Fd134338EABCA509979a7e0cB','Venus USDT':'0xfD5840Cd36d94D7229439859C0112a4185BC0255','Venus USDC':'0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8','Venus controller':'0xfD36E2c2a6789Db23113685031d7F16329158384'}], +]; +(async()=>{const result=await Promise.all(configs.map(async([chainId,rpc,entries])=>{const c=createPublicClient({transport:http(rpc,{timeout:15000,retryCount:1})});if(await c.getChainId()!==chainId)throw Error('Wrong chain');const block=await c.getBlockNumber();const contracts=await Promise.all(Object.entries(entries).map(async([name,a])=>{const address=getAddress(a.toLowerCase());const code=await c.getCode({address,blockNumber:block});if(!code||code==='0x')throw Error('No code '+name);const r={name,address,bytes:(code.length-2)/2,codeHash:keccak256(code)};if(/(Moonwell|Venus) (USDT|USDC|WETH)/.test(name))r.underlying=await c.readContract({address,abi:parseAbi(['function underlying() view returns(address)']),functionName:'underlying',blockNumber:block});return r;}));return{chainId,rpc,block:String(block),contracts};}));fs.writeFileSync('plan/agw/research/preset-mainnet-2026-10-15/rpc-verification.json',JSON.stringify(result,null,2)+'\n');console.log(result.map(x=>({chainId:x.chainId,block:x.block,contracts:x.contracts.length})));})().catch(e=>{console.error(e.shortMessage||e.message);process.exitCode=1;}); diff --git a/plan/agw/research/preset-mainnet-2026-10-15/rpc-verification.json b/plan/agw/research/preset-mainnet-2026-10-15/rpc-verification.json new file mode 100644 index 00000000..068bef48 --- /dev/null +++ b/plan/agw/research/preset-mainnet-2026-10-15/rpc-verification.json @@ -0,0 +1,124 @@ +[ + { + "chainId": 1, + "rpc": "https://ethereum-rpc.publicnode.com", + "block": "26194775", + "contracts": [ + { + "name": "Uniswap V3", + "address": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", + "bytes": 24497, + "codeHash": "0x6ec798e80f3a19de650826338677604e54d6664f44a33b53a20b22b1939f402e" + }, + { + "name": "Aave V3", + "address": "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2", + "bytes": 2400, + "codeHash": "0x96107dc4006b4c7fecd1827cfb275ffeef31e6194cd50466f85f8eb24ccf2679" + }, + { + "name": "EigenLayer", + "address": "0x858646372CC42E1A627fcE94aa7A7033e7CF075A", + "bytes": 2151, + "codeHash": "0x073c6ec3b11b1c79a5e70af69992743e1f9857ca449d45cf954c164b0e464a9a" + } + ] + }, + { + "chainId": 8453, + "rpc": "https://base-rpc.publicnode.com", + "block": "52620057", + "contracts": [ + { + "name": "Uniswap V3", + "address": "0x2626664c2603336E57B271c5C0b26F421741e481", + "bytes": 24497, + "codeHash": "0x38bd640f47df62b2fd5a6755a63f4976ad847dc9b946ae0d145d21d16bb124e4" + }, + { + "name": "Aave V3", + "address": "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5", + "bytes": 1933, + "codeHash": "0xffcb26fbebbe09d9b0d8baef76a1fa218989be6c279b7acf9865d8fb6e0718ce" + }, + { + "name": "Moonwell USDC", + "address": "0xEdc817A28E8B93B03976FBd4a3dDBc9f7D176c22", + "bytes": 7544, + "codeHash": "0xcd7e22e6eef009b831781d4de03f20777094f437a9719c597c45cf9725a7dca9", + "underlying": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" + }, + { + "name": "Moonwell WETH", + "address": "0x628ff693426583D9a7FB391E54366292F509D457", + "bytes": 7544, + "codeHash": "0x041dbd5067f87816c0c8d6af9992f04e71aa99c87d1a8e9fb1d27e3e7ed99985", + "underlying": "0x4200000000000000000000000000000000000006" + }, + { + "name": "Moonwell controller", + "address": "0xfBb21d0380beE3312B33c4353c8936a0F13EF26C", + "bytes": 1412, + "codeHash": "0x86a2f6bebe3e171b8d4231544a9925e94e586139762d0164d37c34831a3d0240" + } + ] + }, + { + "chainId": 42161, + "rpc": "https://arbitrum-one-rpc.publicnode.com", + "block": "514919525", + "contracts": [ + { + "name": "Uniswap V3", + "address": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", + "bytes": 24497, + "codeHash": "0x209f9820ed7257d51c2f96ee837e8ec057b44774899f4be16fc45bd30cbb16f6" + }, + { + "name": "Aave V3", + "address": "0x794a61358D6845594F94dc1DB02A252b5b4814aD", + "bytes": 2400, + "codeHash": "0xf168c2e9e4d04292c7d5d526a9a917175a44369ab63a2f9997537acf0ffaaf2e" + } + ] + }, + { + "chainId": 56, + "rpc": "https://bsc-rpc.publicnode.com", + "block": "127702568", + "contracts": [ + { + "name": "PancakeSwap V3", + "address": "0x13f4EA83D0bd40E75C8222255bc855a974568Dd4", + "bytes": 24316, + "codeHash": "0x25cbde77f2ef6d474c31f738e67ab99e604471170d8a0ab4f544cbaba969d078" + }, + { + "name": "Aave V3", + "address": "0x6807dc923806fE8Fd134338EABCA509979a7e0cB", + "bytes": 1933, + "codeHash": "0xa2aac688c1cbeae86c0b468a926632c775c7a40f1b5dec59948f9f1562c53e9e" + }, + { + "name": "Venus USDT", + "address": "0xfD5840Cd36d94D7229439859C0112a4185BC0255", + "bytes": 4744, + "codeHash": "0xd6e00b8c8f24fb40df4eaeb95fcce7f605177339f239d1b04b2c21664c1b3ab2", + "underlying": "0x55d398326f99059fF775485246999027B3197955" + }, + { + "name": "Venus USDC", + "address": "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8", + "bytes": 4744, + "codeHash": "0xd6e00b8c8f24fb40df4eaeb95fcce7f605177339f239d1b04b2c21664c1b3ab2", + "underlying": "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d" + }, + { + "name": "Venus controller", + "address": "0xfD36E2c2a6789Db23113685031d7F16329158384", + "bytes": 1508, + "codeHash": "0x7fc5c25e2e62f7d22d3340e21d5faf867c0039b404c02bb26ba8972e0be2ac97" + } + ] + } +] diff --git a/plan/agw/research/preset-mainnet-2026-10-15/sources.json b/plan/agw/research/preset-mainnet-2026-10-15/sources.json new file mode 100644 index 00000000..0de18f79 --- /dev/null +++ b/plan/agw/research/preset-mainnet-2026-10-15/sources.json @@ -0,0 +1,48 @@ +[ + { + "url": "https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3Ethereum.sol", + "file": "AaveV3Ethereum.sol", + "sha256": "afe8adbbf8fe7d709ae1d2168b8d97ccb8110fdedb572fc2120ecae10ae7588b" + }, + { + "url": "https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3Base.sol", + "file": "AaveV3Base.sol", + "sha256": "135e2f325b53140c5a82895cf40debc80323fed77bd3ebb240a8d00248ba02ae" + }, + { + "url": "https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3Arbitrum.sol", + "file": "AaveV3Arbitrum.sol", + "sha256": "6b8f9a12a904a2c13d59423fe9c60fd66ec868761704cbcc776d0c2fe1510b1c" + }, + { + "url": "https://raw.githubusercontent.com/bgd-labs/aave-address-book/main/src/AaveV3BNB.sol", + "file": "AaveV3BNB.sol", + "sha256": "190523aa7f4bd0654e4155eed60a88852b374f3bc28855750a497b45f2efd36b" + }, + { + "url": "https://raw.githubusercontent.com/moonwell-fi/moonwell-contracts-v2/main/chains/8453.json", + "file": "moonwell-8453.json", + "sha256": "9c57bfb2bd1c17e384c4113b6c82de05b2b4bc4671c2fb25202babe90dd2079d" + }, + { + "url": "https://raw.githubusercontent.com/VenusProtocol/venus-protocol/develop/deployments/bscmainnet_addresses.json", + "file": "venus-bscmainnet.json", + "sha256": "d126b3cb0ac0221cbeb20ac20f5f63bfec458fd79f03ab92c7ccee1bb63aedc0" + }, + { + "url": "https://docs.lido.fi/deployed-contracts/", + "purpose": "Official Lido deployed addresses and caller/recipient/function semantics; read October 15" + }, + { + "url": "https://docs.lido.fi/contracts/lido/", + "purpose": "Official Lido deployed addresses and caller/recipient/function semantics; read October 15" + }, + { + "url": "https://docs.lido.fi/contracts/wsteth/", + "purpose": "Official Lido deployed addresses and caller/recipient/function semantics; read October 15" + }, + { + "url": "https://docs.lido.fi/contracts/withdrawal-queue-erc721/", + "purpose": "Official Lido deployed addresses and caller/recipient/function semantics; read October 15" + } +] diff --git a/plan/agw/research/preset-mainnet-2026-10-15/venus-bscmainnet.json b/plan/agw/research/preset-mainnet-2026-10-15/venus-bscmainnet.json new file mode 100644 index 00000000..5faf322a --- /dev/null +++ b/plan/agw/research/preset-mainnet-2026-10-15/venus-bscmainnet.json @@ -0,0 +1,324 @@ +{ + "name": "bscmainnet", + "chainId": "56", + "addresses": { + "AAVE": "0xfb6115445Bff7b52FeB98650C87f44907E58f802", + "ADA": "0x3EE2200Efb3400fAbB9AacF31297cBdD1d435D47", + "BCH": "0x8fF795a6F4D97E7887C79beA79aba5cc76444aDf", + "BETH": "0x250632378E573c6Be1AC2f97Fcdf00515d0Aa91B", + "BStockLiquidator": "0x5974Badab6911a78Ba15229045514C2C1bD42343", + "BStockLiquidator_Implementation": "0xde9734DD7AEad610Dd41FFE9Abc25C5cCf142487", + "BStockLiquidator_Proxy": "0x5974Badab6911a78Ba15229045514C2C1bD42343", + "BTCB": "0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c", + "BUSD": "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56", + "CAKE": "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump20000bps_kink7500bps_bpy10512000_To_bpy21024000_At_1745903100": "0x747943C45eB782Db9E04f6f54Ea5f27Cc6627e4A", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump20000bps_kink7500bps_bpy21024000_To_bpy42048000_At_1751250600": "0xd7079bCE4A9cA17a71787928E40252547444C3D3", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump20000bps_kink7500bps_bpy42048000_To_bpy70080000_At_1768357800": "0x0c61acDC057e894eC7c282EC779b67ef654ADDCe", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps_bpy10512000_To_bpy21024000_At_1745903100": "0xF8e641695f89A5919DF03Edd9ECdA3D0dc89aAA9", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps_bpy21024000_To_bpy42048000_At_1751250600": "0xBB951B0B38ae86CeF2f3d642F5ac7591FD5D2f4b", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps_bpy42048000_To_bpy70080000_At_1768357800": "0x8AFaE0979c793411648e476388C83E190285c9b1", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump50000bps_kink8000bps_bpy21024000_To_bpy42048000_At_1751250600": "0x8D3A052b88acF368Da24f5313901e4e63E0E78Cf", + "CheckpointView_From_JumpRateModel_base0bps_slope1000bps_jump50000bps_kink8000bps_bpy42048000_To_bpy70080000_At_1768357800": "0xdba6A250027049c4033970e224E61EDCD84eA630", + "CheckpointView_From_JumpRateModel_base0bps_slope1500bps_jump30000bps_kink6000bps_bpy10512000_To_bpy21024000_At_1745903100": "0x7857738486E813b5BCb6cA62B46F6b2ee029609B", + "CheckpointView_From_JumpRateModel_base0bps_slope1500bps_jump30000bps_kink6000bps_bpy21024000_To_bpy42048000_At_1751250600": "0x968D2f613F0517eaE22f898529c4658Db8C578BC", + "CheckpointView_From_JumpRateModel_base0bps_slope1500bps_jump30000bps_kink6000bps_bpy42048000_To_bpy70080000_At_1768357800": "0xC3723cf801cDbb8C9A79bD67B17d20cA9d5ec3ed", + "CheckpointView_From_JumpRateModel_base0bps_slope1750bps_jump25000bps_kink8000bps_bpy10512000_To_bpy21024000_At_1745903100": "0x42Ef8ecCEe0782a4E644B3EB39761fb6c696ccF2", + "CheckpointView_From_JumpRateModel_base0bps_slope2000bps_jump30000bps_kink5000bps_bpy10512000_To_bpy21024000_At_1745903100": "0x83671a928e8D4c34F9f8faD06bd8356Fdb524A0F", + "CheckpointView_From_JumpRateModel_base0bps_slope2000bps_jump30000bps_kink5000bps_bpy21024000_To_bpy42048000_At_1751250600": "0x107F2b97dcd259Aa373709bF1021aD120a2FED98", + "CheckpointView_From_JumpRateModel_base0bps_slope2000bps_jump30000bps_kink5000bps_bpy42048000_To_bpy70080000_At_1768357800": "0x30457D82246512B891DAD51ecC1deAbFB1870f8C", + "CheckpointView_From_JumpRateModel_base0bps_slope300bps_jump45000bps_kink9000bps_bpy10512000_To_bpy21024000_At_1745903100": "0xEBb072c6336f1d0a7d8BBf1c82d9C9F7D6485Fa4", + "CheckpointView_From_JumpRateModel_base0bps_slope300bps_jump45000bps_kink9000bps_bpy21024000_To_bpy42048000_At_1751250600": "0x38Dd273fE7590403f554F350a7c3c592e8227EB7", + "CheckpointView_From_JumpRateModel_base0bps_slope300bps_jump45000bps_kink9000bps_bpy42048000_To_bpy70080000_At_1768357800": "0x7c164b24B4393fe5cf5b8A1E1EBb6496EC7Db4EF", + "CheckpointView_From_JumpRateModel_base0bps_slope750bps_jump50000bps_kink8000bps_bpy10512000_To_bpy21024000_At_1745903100": "0x717dbabeCc502c8712e7646ab6801F802a997C20", + "CheckpointView_From_JumpRateModel_base0bps_slope750bps_jump5000bps_kink8000bps_bpy10512000_To_bpy21024000_At_1745903100": "0xa91617Ba1a6CCF61a70c7e4b0a2A36c7726bb3f6", + "CheckpointView_From_JumpRateModel_base0bps_slope750bps_jump5000bps_kink8000bps_bpy21024000_To_bpy42048000_At_1751250600": "0xfEA1ca128dDbAf830EFC4e0d5CD5E152AE504cC7", + "CheckpointView_From_JumpRateModel_base0bps_slope750bps_jump5000bps_kink8000bps_bpy42048000_To_bpy70080000_At_1768357800": "0x4F0cfA4a97ee2E99D58724ae8cC169F9704d458d", + "CheckpointView_From_JumpRateModel_base0bps_slope900bps_jump20000bps_kink5000bps_bpy10512000_To_bpy21024000_At_1745903100": "0x3BA66110c585Cb4032A0289bf4Cd8F983d556b10", + "CheckpointView_From_JumpRateModel_base0bps_slope900bps_jump20000bps_kink5000bps_bpy21024000_To_bpy42048000_At_1751250600": "0x44a94a5e96bc6e36f4775E6229e2487860d4b7F0", + "CheckpointView_From_JumpRateModel_base0bps_slope900bps_jump20000bps_kink5000bps_bpy42048000_To_bpy70080000_At_1768357800": "0x1Ef3b851CE40B663dBbF91B86A4EE51A4a0999C5", + "CheckpointView_From_JumpRateModel_base0bps_slope900bps_jump20000bps_kink7500bps_bpy10512000_To_bpy21024000_At_1745903100": "0x4a03AbcC888020c779bB362b4C1D2869485bDEe4", + "CheckpointView_From_JumpRateModel_base0bps_slope900bps_jump20000bps_kink7500bps_bpy21024000_To_bpy42048000_At_1751250600": "0xa84189107aF59BF132F3e7dd45DD201C0bb25bF4", + "CheckpointView_From_JumpRateModel_base0bps_slope900bps_jump35000bps_kink4500bps_bpy10512000_To_bpy21024000_At_1745903100": "0xc6cC40ca4e90d151261f6524b97C3D4997479621", + "CheckpointView_From_JumpRateModel_base0bps_slope900bps_jump35000bps_kink4500bps_bpy21024000_To_bpy42048000_At_1751250600": "0x44C49a0Df8bBfA49ED967C65db0E92BA7B40DF65", + "CheckpointView_From_JumpRateModel_base0bps_slope900bps_jump35000bps_kink4500bps_bpy42048000_To_bpy70080000_At_1768357800": "0x6F869480eEEbB66b58a930892AddC0067Fb43B20", + "CheckpointView_From_JumpRateModel_base200bps_slope10000bps_jump30000bps_kink100bps_bpy10512000_To_bpy21024000_At_1745903100": "0x06Da1E5e6Ba1E0CA26ac92907b5b30D32789426A", + "CheckpointView_From_JumpRateModel_base200bps_slope10000bps_jump30000bps_kink100bps_bpy21024000_To_bpy42048000_At_1751250600": "0xb2bd70eD38E928470B5aF2F01E799c1d3b4d8796", + "CheckpointView_From_JumpRateModel_base200bps_slope10000bps_jump30000bps_kink100bps_bpy42048000_To_bpy70080000_At_1768357800": "0x6d967293192E9Cc395f4F6D2327C09A1F3F2C920", + "CheckpointView_From_JumpRateModel_base200bps_slope1200bps_jump30000bps_kink6000bps_bpy10512000_To_bpy21024000_At_1745903100": "0xD574F5186cEEf3f4801A9A8C6fe257ef71493371", + "CheckpointView_From_JumpRateModel_base200bps_slope1200bps_jump30000bps_kink6000bps_bpy21024000_To_bpy42048000_At_1751250600": "0xf7B5F7856E0520D66c03F32D576eECD9156dAb29", + "CheckpointView_From_JumpRateModel_base200bps_slope1200bps_jump30000bps_kink6000bps_bpy42048000_To_bpy70080000_At_1768357800": "0xb0B318816537Aa1a63fb30CEca9F5f39F8bB9770", + "CheckpointView_From_JumpRateModel_base200bps_slope1500bps_jump30000bps_kink6000bps_bpy10512000_To_bpy21024000_At_1745903100": "0x0E6F99766c947F85c242b8328837b39c8bB887c6", + "CheckpointView_From_JumpRateModel_base200bps_slope1500bps_jump30000bps_kink6000bps_bpy21024000_To_bpy42048000_At_1751250600": "0x1326346bDA0BFC3AC7F5BFb0F6eA7f4302A65bCd", + "CheckpointView_From_JumpRateModel_base200bps_slope1500bps_jump30000bps_kink6000bps_bpy42048000_To_bpy70080000_At_1768357800": "0x6125BC439EE2caa2Fd737b14d0f68B364099a19E", + "CheckpointView_From_JumpRateModel_base200bps_slope2000bps_jump30000bps_kink5000bps_bpy10512000_To_bpy21024000_At_1745903100": "0xEd279B5eAde8E54175941F188d16067c6341Cd1A", + "CheckpointView_From_JumpRateModel_base200bps_slope2000bps_jump30000bps_kink5000bps_bpy21024000_To_bpy42048000_At_1751250600": "0x7611a9A201524594633B2eb5A8Ea42A9418c9811", + "CheckpointView_From_JumpRateModel_base200bps_slope2000bps_jump30000bps_kink5000bps_bpy42048000_To_bpy70080000_At_1768357800": "0xD6B3A3e73860A5b75C130bE1AfB9D76C2E572373", + "CheckpointView_From_JumpRateModel_base25bps_slope367bps_jump20000bps_kink7500bps_bpy42048000_To_bpy70080000_At_1768357800": "0x7D47671514A1b13F0E376D70fcF13B2eb2694c3A", + "CheckpointView_From_JumpRateModel_base5000bps_slope3000bps_jump30000bps_kink6000bps_bpy10512000_To_bpy21024000_At_1745903100": "0xE508AF8fE95D508EF284DDFd76610EDBef8Cb8E9", + "CheckpointView_From_JumpRateModel_base5000bps_slope3000bps_jump30000bps_kink6000bps_bpy21024000_To_bpy42048000_At_1751250600": "0xbF6BdB41dbCB5ABA54189767d113e7c5155aB70A", + "CheckpointView_From_JumpRateModel_base5000bps_slope3000bps_jump30000bps_kink6000bps_bpy42048000_To_bpy70080000_At_1768357800": "0x4E1fE613E8cE7d0DF1E2F5BC48F50a18Ef4d353c", + "CheckpointView_From_TwoKinks_base0bps_slope1000bps_kink8000bps_slope27000bps_base20bps_kink29000bps_jump30000bps_bpy21024000_To_bpy42048000_At_1751250600": "0x08437b3C0BeA58fE6eC696a04c9675E0980b9469", + "CheckpointView_From_TwoKinks_base0bps_slope1500bps_kink8000bps_slope29000bps_base20bps_kink29000bps_jump30000bps_bpy10512000_To_bpy21024000_At_1745903100": "0x81d6ae3EEa177d5D052B329dc74d39B935569359", + "CheckpointView_From_TwoKinks_base0bps_slope312bps_kink8000bps_slope28499bps_base20bps_kink29000bps_jump34000bps_bpy42048000_To_bpy70080000_At_1768357800": "0x650b2F1DC7F6E6734909Ad1Df2367537219584b8", + "CheckpointView_From_TwoKinks_base0bps_slope350bps_kink8000bps_slope217500bps_base20bps_kink29000bps_jump30000bps_bpy10512000_To_bpy21024000_At_1745903100": "0xfCFE909330FF50D2c72715cBEC4E54c476c27CEC", + "CheckpointView_From_TwoKinks_base0bps_slope450bps_kink7000bps_slope214000bps_base20bps_kink28000bps_jump30000bps_bpy21024000_To_bpy42048000_At_1751250600": "0xF78db86E58dc1b76569a0b3105EF5186033911A1", + "CheckpointView_From_TwoKinks_base0bps_slope624bps_kink8000bps_slope26001bps_base20bps_kink29000bps_jump34000bps_bpy42048000_To_bpy70080000_At_1768357800": "0x979566A212460cA7EC767C9BF3dEB3D6585A2b38", + "CheckpointView_From_TwoKinks_base0bps_slope625bps_kink8000bps_slope26000bps_base20bps_kink29000bps_jump34000bps_bpy42048000_To_bpy70080000_At_1768357800": "0x381829DBb51cD74F3172574f4111F2F58d8b0E53", + "CheckpointView_From_TwoKinks_base0bps_slope654bps_kink8400bps_slope22499bps_base20bps_kink29200bps_jump40625bps_bpy42048000_To_bpy70080000_At_1768357800": "0x2CF0e211c99dFd28892cf80D142aA27a9042Dbf4", + "CheckpointView_From_WhitePaperInterestRateModel_base0bps_slope0bps_bpy10512000_To_bpy21024000_At_1745903100": "0x4088e11DF221314896c2Aaed72074F89928e5b59", + "CheckpointView_From_WhitePaperInterestRateModel_base0bps_slope0bps_bpy21024000_To_bpy42048000_At_1751250600": "0x02448c05fdd44c1dCcdc54A29fe02E8f43f31BF7", + "CheckpointView_From_WhitePaperInterestRateModel_base0bps_slope0bps_bpy42048000_To_bpy70080000_At_1768357800": "0xa60b28FDDaAB87240C3AF319892e7A4ad6FbF41F", + "CheckpointView_From_WhitePaperInterestRateModel_base0bps_slope24000bps_bpy10512000_To_bpy21024000_At_1745903100": "0x9318f66729007281D4C4545c04b046C437bD77E5", + "CheckpointView_From_WhitePaperInterestRateModel_base0bps_slope24000bps_bpy21024000_To_bpy42048000_At_1751250600": "0x170bE58D5C1983f03DC287AB9aBffC7DA16f862b", + "CheckpointView_From_WhitePaperInterestRateModel_base0bps_slope24000bps_bpy42048000_To_bpy70080000_At_1768357800": "0x9E3f9A97285E2694Ea32c37EBFfE427492888edD", + "ComptrollerLens": "0xd5DEb631cB6c6a667e926a482aadc95a471b120c", + "DAI": "0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3", + "DOGE": "0xbA2aE424d960c26247Dd6c32edC70B295c744C43", + "DOT": "0x7083609fCE4d1d8Dc0C979AAb8c869Ea2C873402", + "DefaultProxyAdmin": "0x6beb6D2695B67FEb73ad4f172E8E2975497187e4", + "ETH": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8", + "FIL": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", + "FlashLoanFacet": "0xAC54A4D148690b7FDA22B1D29c4439aCBF668fb2", + "JumpRateModel_base0bps_slope10000bps_jump25000bps_kink8000bps_bpy10512000": "0x9e8fbACBfbD811Fc561af3Af7df8e38dEd4c52F3", + "JumpRateModel_base0bps_slope10000bps_jump50000bps_kink8000bps_bpy10512000": "0x958F4C84d3ad523Fa9936Dc465A123C7AD43D69B", + "JumpRateModel_base0bps_slope1000bps_jump20000bps_kink7500bps_bpy10512000": "0x871A82082482657B9df62Dea21509023F28c147C", + "JumpRateModel_base0bps_slope1000bps_jump20000bps_kink7500bps_bpy21024000": "0xd1E1f4Fc02cAe664893a227E7CAAdc50D655f8f7", + "JumpRateModel_base0bps_slope1000bps_jump20000bps_kink7500bps_bpy42048000": "0xcc542643521D5e4dE63f48682e7f577f805e7651", + "JumpRateModel_base0bps_slope1000bps_jump20000bps_kink7500bps_bpy70080000": "0xe678399CF9A5964604DD055A4aDd1982d3F7d23F", + "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps_bpy10512000": "0x62A8919C4C413fd4F9aef7348540Bc4B1b5CC805", + "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps_bpy21024000": "0x4eFbf2f6E63eCad12dE015E5be2a1094721633EE", + "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps_bpy42048000": "0x6D7c746D4A9170F1731F89580414235dA47787fc", + "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps_bpy70080000": "0xad6aa8Bb4829560412A94AA930745f407BF8000B", + "JumpRateModel_base0bps_slope1000bps_jump50000bps_kink8000bps_bpy10512000": "0x05c68eE7c9c66BE3a42476fe3838DE65ddE968f1", + "JumpRateModel_base0bps_slope1000bps_jump50000bps_kink8000bps_bpy21024000": "0x76cB08c25EF426F5444C28179D05F77cB1a6aBD0", + "JumpRateModel_base0bps_slope1000bps_jump50000bps_kink8000bps_bpy42048000": "0xE3394c5A871bf893B41196F0aa843C64C2Da0A5C", + "JumpRateModel_base0bps_slope1000bps_jump50000bps_kink8000bps_bpy70080000": "0xF2F2aE5480c4527787Fb7Cde1Ed9A3EdfD40A60d", + "JumpRateModel_base0bps_slope1250bps_jump25000bps_kink8000bps_bpy10512000": "0x1485A27D95D3d2878a6641055dD3a643F296CCf6", + "JumpRateModel_base0bps_slope1250bps_jump50000bps_kink8000bps_bpy10512000": "0x9Fca5d66Cc0DF990080825051E825A8104a7ffA4", + "JumpRateModel_base0bps_slope1500bps_jump30000bps_kink6000bps_bpy10512000": "0xEa464DfB1B0BB8964c250427bb5B0DD4f315141A", + "JumpRateModel_base0bps_slope1500bps_jump30000bps_kink6000bps_bpy21024000": "0x927EA36cE0a926b0Ed9358A0ed899EFCE4574fC0", + "JumpRateModel_base0bps_slope1500bps_jump30000bps_kink6000bps_bpy42048000": "0x7B91a129A4C58c1Ea9b805e4D7ef677C290A003a", + "JumpRateModel_base0bps_slope1500bps_jump30000bps_kink6000bps_bpy70080000": "0xaBdE9599a4aEcE4fEC59fBF2b8445149bc8B2c70", + "JumpRateModel_base0bps_slope1750bps_jump25000bps_kink8000bps_bpy10512000": "0x0be3ca99FBBE16b86C3b00E2C4c30C3892F31647", + "JumpRateModel_base0bps_slope1750bps_jump25000bps_kink8000bps_bpy21024000": "0x16d55426f0439613260e1F4b2A76B493B36f8ba5", + "JumpRateModel_base0bps_slope2000bps_jump30000bps_kink5000bps_bpy10512000": "0x637e19b6EE87758506d6eA34bF11BE8F43AD8d61", + "JumpRateModel_base0bps_slope2000bps_jump30000bps_kink5000bps_bpy21024000": "0xb831F6aC79121d0a7Cf11a452E4254516899Ea16", + "JumpRateModel_base0bps_slope2000bps_jump30000bps_kink5000bps_bpy42048000": "0x06FF3190895aec1656b99Acdb3A4D556b4205669", + "JumpRateModel_base0bps_slope2000bps_jump30000bps_kink5000bps_bpy70080000": "0x1D5F9752bA40cF7047db2E24Cb6Aa196E3c334DA", + "JumpRateModel_base0bps_slope200bps_jump400bps_kink8000bps_bpy70080000": "0xCDAE733D8aB71cdD4D183CD25685500e8F502329", + "JumpRateModel_base0bps_slope300bps_jump45000bps_kink9000bps_bpy10512000": "0x3aa125788FC6b9F801772baEa887aA40328015e9", + "JumpRateModel_base0bps_slope300bps_jump45000bps_kink9000bps_bpy21024000": "0xFFB9d1556Cb6323115c0E8658edfB4c090a427e8", + "JumpRateModel_base0bps_slope300bps_jump45000bps_kink9000bps_bpy42048000": "0x5D1dd238F70854F4914Db67035f79F42a38c79C2", + "JumpRateModel_base0bps_slope300bps_jump45000bps_kink9000bps_bpy70080000": "0xCe1a0389767cF155b0f3c475c1283e1951923770", + "JumpRateModel_base0bps_slope667bps_jump62700bps_kink7500bps_bpy70080000": "0xe589E884f69dF3137B43A760C4Ec9E55D944439D", + "JumpRateModel_base0bps_slope687bps_jump25000bps_kink8000bps_bpy10512000": "0xB105F9B511836cc7dF9F3dD0Ec4873766b5b6660", + "JumpRateModel_base0bps_slope750bps_jump50000bps_kink8000bps_bpy10512000": "0xdEf4b9462223c9a44E61d217a145063C7836FD7B", + "JumpRateModel_base0bps_slope750bps_jump50000bps_kink8000bps_bpy21024000": "0x76EdDEfad0C348B0075217EE8d9E5c1Eb4bB4Fd3", + "JumpRateModel_base0bps_slope750bps_jump5000bps_kink8000bps_bpy10512000": "0xF874A969d504e0b1b2021d76A2c438B841124715", + "JumpRateModel_base0bps_slope750bps_jump5000bps_kink8000bps_bpy21024000": "0x8c60091fdE10BC44143cB7C306Ff954E047e164c", + "JumpRateModel_base0bps_slope750bps_jump5000bps_kink8000bps_bpy42048000": "0xaf1618C88b1C6304f0F9c76ab722088A4268fd3D", + "JumpRateModel_base0bps_slope750bps_jump5000bps_kink8000bps_bpy70080000": "0xCf4C75398DaD73f16c762026144a1496f6869CD1", + "JumpRateModel_base0bps_slope875bps_jump25000bps_kink8000bps_bpy10512000": "0xBe4609d972FdEBAa9DC870F4A957F40C301bEb1D", + "JumpRateModel_base0bps_slope875bps_jump50000bps_kink8000bps_bpy10512000": "0xE19C14171C2aC6CA63E008133e4B0D8571164BA3", + "JumpRateModel_base0bps_slope900bps_jump20000bps_kink5000bps_bpy10512000": "0xf092558eD27Df036144f6d92cC657BAc9682A324", + "JumpRateModel_base0bps_slope900bps_jump20000bps_kink5000bps_bpy21024000": "0x52F63686D09d92c367c90BCDBF79A562f81bd6BF", + "JumpRateModel_base0bps_slope900bps_jump20000bps_kink5000bps_bpy42048000": "0x68Cb22f8664546E19B7BfCC4F86Fd0fCbDd0b02e", + "JumpRateModel_base0bps_slope900bps_jump20000bps_kink5000bps_bpy70080000": "0x6463ab803FF081616ac4daC31B9B66854cc28Bc0", + "JumpRateModel_base0bps_slope900bps_jump20000bps_kink7500bps_bpy10512000": "0xAA69D9B80B5b303F66227932489669538027783F", + "JumpRateModel_base0bps_slope900bps_jump20000bps_kink7500bps_bpy21024000": "0xbB32a50FeA5AB822A1B52245D1Fbea7fC49659fc", + "JumpRateModel_base0bps_slope900bps_jump20000bps_kink7500bps_bpy42048000": "0x8AD7D983196cEB75dC4B28d0b1fE64F95547692e", + "JumpRateModel_base0bps_slope900bps_jump35000bps_kink4500bps_bpy10512000": "0x77C50b4d5d8b84511a4787aaF5BC22E5A496B1Ef", + "JumpRateModel_base0bps_slope900bps_jump35000bps_kink4500bps_bpy21024000": "0x4699bA39B8E7da3ef178020b69dcb9E25103D0a3", + "JumpRateModel_base0bps_slope900bps_jump35000bps_kink4500bps_bpy42048000": "0x2349decE4B56541DE2dc7F2C3F433F95095D4B8B", + "JumpRateModel_base0bps_slope900bps_jump35000bps_kink4500bps_bpy70080000": "0x8ecfD11473C30a508a386bea715F0cd7B9baD7a5", + "JumpRateModel_base200bps_slope10000bps_jump30000bps_kink100bps_bpy10512000": "0x6b7C3d1ced49604c66e2C8125989E78B1E5356F5", + "JumpRateModel_base200bps_slope10000bps_jump30000bps_kink100bps_bpy21024000": "0xe42B289b630930EdF126cA944C0FC6899a0b249b", + "JumpRateModel_base200bps_slope10000bps_jump30000bps_kink100bps_bpy42048000": "0xCb7f4fe025eE97c544c8ad367a497B54911f0026", + "JumpRateModel_base200bps_slope10000bps_jump30000bps_kink100bps_bpy70080000": "0x875535EEEb75c5Cd392708796c618cdaC787A3CF", + "JumpRateModel_base200bps_slope1200bps_jump30000bps_kink6000bps_bpy10512000": "0xda6cdE1F47AE792FA40Aa85C9F6901d5E64a6769", + "JumpRateModel_base200bps_slope1200bps_jump30000bps_kink6000bps_bpy21024000": "0x02555201356B063Cf2ff83D02D91af6529a69627", + "JumpRateModel_base200bps_slope1200bps_jump30000bps_kink6000bps_bpy42048000": "0xd26FfBa546e0447668f8C7b86811f31F010C7803", + "JumpRateModel_base200bps_slope1200bps_jump30000bps_kink6000bps_bpy70080000": "0xbcA3d5E7a66D97E0415662c2394Ed2605944b614", + "JumpRateModel_base200bps_slope1500bps_jump30000bps_kink6000bps_bpy10512000": "0x32450305D6c692269B3cBf9730d99104f80fce23", + "JumpRateModel_base200bps_slope1500bps_jump30000bps_kink6000bps_bpy21024000": "0xFDA9274718c1C64F0631396eB8CaC12625309BFE", + "JumpRateModel_base200bps_slope1500bps_jump30000bps_kink6000bps_bpy42048000": "0x5Ef791b3B73cBb1b961CD0136d0EBc3F9309710E", + "JumpRateModel_base200bps_slope1500bps_jump30000bps_kink6000bps_bpy70080000": "0xdB1869CA9E008E102350f2e0c356500503A4d043", + "JumpRateModel_base200bps_slope2000bps_jump30000bps_kink5000bps_bpy10512000": "0x2dE4739a9C68B02B54C0d8323752551d724b3cc2", + "JumpRateModel_base200bps_slope2000bps_jump30000bps_kink5000bps_bpy21024000": "0x1063A02E500Ae1448DDd6767ead97368FEeCafE7", + "JumpRateModel_base200bps_slope2000bps_jump30000bps_kink5000bps_bpy42048000": "0x6BBb4FAAE927Df5a299892217dFB354E5F5000A2", + "JumpRateModel_base200bps_slope2000bps_jump30000bps_kink5000bps_bpy70080000": "0x905006DCD5DbAa9B67359bcB341a0C49AfC8d0A6", + "JumpRateModel_base25bps_slope367bps_jump20000bps_kink7500bps_bpy42048000": "0xE74FE49e07c8f0Cc4398a481206e2d835b88b8F4", + "JumpRateModel_base25bps_slope367bps_jump20000bps_kink7500bps_bpy70080000": "0xae5A30d694DFF2268C864834DEDa745B784c48bD", + "JumpRateModel_base30000bps_slope0bps_jump36364bps_kink4500bps_bpy70080000": "0xc255352947ef3594C45b0Fe8bcB690e51C3D744A", + "JumpRateModel_base5000bps_slope3000bps_jump30000bps_kink6000bps_bpy10512000": "0x91475A3f288841bce074Ec7edF27ec3fE58e18d1", + "JumpRateModel_base5000bps_slope3000bps_jump30000bps_kink6000bps_bpy21024000": "0xF34AfA5B6a9F828da41f146321221B60977F20E0", + "JumpRateModel_base5000bps_slope3000bps_jump30000bps_kink6000bps_bpy42048000": "0x3DC78Fe78fd3084CAAd0DC881b4Eb98B6151A5f3", + "JumpRateModel_base5000bps_slope3000bps_jump30000bps_kink6000bps_bpy70080000": "0xE1Ac99E486EBEcD40Ab4C9FF29Fe4d28be244D33", + "LINK": "0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD", + "LTC": "0x4338665CBB7B2485A8855A139b75D5e34AB0DB94", + "LUNA": "0x156ab3346823B651294766e23e6Cf87254d68962", + "Liquidator": "0x0870793286aada55d39ce7f82fb2766e8004cf43", + "Liquidator_Implementation": "0xC8c6f55DEBb47f724761920B79DC3ab5399DBC62", + "Liquidator_Proxy": "0x0870793286aada55d39ce7f82fb2766e8004cf43", + "MATIC": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD", + "MarketFacet": "0x21f8E1471b153f49BE1d645A008E4a57434eEd23", + "MoveDebtDelegate": "0x89621C48EeC04A85AfadFD37d32077e65aFe2226", + "MoveDebtDelegate_Implementation": "0x8439932C45e646FcC1009690417A65BF48f68Ce7", + "MoveDebtDelegate_Proxy": "0x89621C48EeC04A85AfadFD37d32077e65aFe2226", + "PSMProxyAdmin": "0x3f918bA9446552AB184C6Ffd2e2fcB1FA5ee1e59", + "PegStability_USDT": "0xC138aa4E424D1A8539e8F38Af5a754a2B7c3Cc36", + "PegStability_USDT_Implementation": "0x9664568e5131e85f67d87fCD55B249F5D25fa43e", + "PegStability_USDT_Proxy": "0xC138aa4E424D1A8539e8F38Af5a754a2B7c3Cc36", + "PolicyFacet": "0x8930B02c69EDd37464B50991680D306Bb9B8FDBD", + "Prime": "0xBbCD063efE506c3D42a0Fa2dB5C08430288C71FC", + "PrimeLeaderboard": "0x55e2ccF68B7A276dc28AfA107997b8B1Be932c0b", + "PrimeLeaderboard_Implementation": "0xD80de9EcB6596dF95dd67aF73b67122054C2d1a1", + "PrimeLeaderboard_Proxy": "0x55e2ccF68B7A276dc28AfA107997b8B1Be932c0b", + "PrimeLens": "0x2f8c5e4562E22DB7908C56Bf99961C053436473c", + "PrimeLiquidityProvider": "0x23c4F844ffDdC6161174eB32c770D4D8C07833F2", + "PrimeLiquidityProvider_Implementation": "0x46BED43b29D73835fF075bBa1A0002A1eD1E4de8", + "PrimeLiquidityProvider_Proxy": "0x23c4F844ffDdC6161174eB32c770D4D8C07833F2", + "PrimeV2": "0x059EabA8676b03e4e8f009eFb7F587C28450F50f", + "PrimeV2_Implementation": "0x18cB7198CBB6D6e94001458CF3Cf47C106D83a1B", + "PrimeV2_Proxy": "0x059EabA8676b03e4e8f009eFb7F587C28450F50f", + "Prime_Implementation": "0x1a6660059E61e88402bD34FC96C2332c5EeAF195", + "Prime_Proxy": "0xBbCD063efE506c3D42a0Fa2dB5C08430288C71FC", + "RewardFacet": "0x9e0CCD70b5E0030472D5013bbBd37B6E868d416f", + "SXP": "0x47BEAd2563dCBf3bF2c9407fEa4dC236fAbA485A", + "SetCheckpointBscmainnet": "0x8f4C73dDb18875979803f9416bD42d8A1002457d", + "SetterFacet": "0xbc4885e5A27050E321d094503597aC6734AB1871", + "SnapshotLens": "0x4556a5eDf9AbA75669EB23842BC4318b5ED5e1E0", + "SwapRouterCorePool": "0x8938E6dA30b59c1E27d5f70a94688A89F7c815a4", + "TRX": "0xCE7de646e7208a4Ef112cb6ed5038FA6cC6b12e3", + "TRXOLD": "0x85EAC5Ac2F758618dFa09bDbe0cf174e7d574D5B", + "TUSD": "0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9", + "TUSDOLD": "0x14016E85a25aeb13065688cAFB43044C2ef86784", + "TokenRedeemer": "0xC53ffda840B51068C64b2E052a5715043f634bcd", + "TwoKinks_base0bps_slope1000bps_kink8000bps_slope27000bps_base20bps_kink29000bps_jump30000bps_bpy21024000": "0x31d20C36A4804AB30F04fB606555f545b2bAE3b3", + "TwoKinks_base0bps_slope1000bps_kink8000bps_slope27000bps_base20bps_kink29000bps_jump30000bps_bpy42048000": "0xa7581334a8131a45bCc3A07D5988F586108947f7", + "TwoKinks_base0bps_slope1500bps_kink8000bps_slope29000bps_base20bps_kink29000bps_jump30000bps_bpy10512000": "0x4D712A88Ff15a7147a9966c5ED2ccb392F1760c9", + "TwoKinks_base0bps_slope1500bps_kink8000bps_slope29000bps_base20bps_kink29000bps_jump30000bps_bpy21024000": "0x66fA99894aEbB83180a052ef4Cc8cCFaD0F8f8aB", + "TwoKinks_base0bps_slope312bps_kink8000bps_slope28499bps_base20bps_kink29000bps_jump34000bps_bpy42048000": "0x5dff09a6D241eac6ccc63A7665CaC6eff55b38E7", + "TwoKinks_base0bps_slope312bps_kink8000bps_slope28499bps_base20bps_kink29000bps_jump34000bps_bpy70080000": "0xBE4166675172545aAae830BeEe6c01C2514d40B8", + "TwoKinks_base0bps_slope350bps_kink8000bps_slope217500bps_base20bps_kink29000bps_jump30000bps_bpy10512000": "0x01B1DA0D0e7c92BE46405565e34fc7C23f0a5A2A", + "TwoKinks_base0bps_slope350bps_kink8000bps_slope217500bps_base20bps_kink29000bps_jump30000bps_bpy21024000": "0xb0a41574C87318265BC4c93acC8D32299dAdF022", + "TwoKinks_base0bps_slope450bps_kink6500bps_slope214000bps_base20bps_kink28000bps_jump30000bps_bpy21024000": "0x939c9458Bee63Bc21031be3d56dDD30Af7f2230A", + "TwoKinks_base0bps_slope450bps_kink7000bps_slope214000bps_base20bps_kink28000bps_jump30000bps_bpy21024000": "0x66C928605F123d91462dCB3859811eC8403977a9", + "TwoKinks_base0bps_slope450bps_kink7000bps_slope214000bps_base20bps_kink28000bps_jump30000bps_bpy42048000": "0xE82B36f4CE8A9B769036B74354588D427a724763", + "TwoKinks_base0bps_slope624bps_kink8000bps_slope26001bps_base20bps_kink29000bps_jump34000bps_bpy42048000": "0xb1c97b14dE87928845FCf0016b48B3a61aa3e1AD", + "TwoKinks_base0bps_slope624bps_kink8000bps_slope26001bps_base20bps_kink29000bps_jump34000bps_bpy70080000": "0x04f928517736A57840F0fD544fF2a1819B1bDcE0", + "TwoKinks_base0bps_slope625bps_kink8000bps_slope26000bps_base20bps_kink29000bps_jump34000bps_bpy42048000": "0x846883aC2AFdaeF9d226182e82f3640d3D6D4d3f", + "TwoKinks_base0bps_slope625bps_kink8000bps_slope26000bps_base20bps_kink29000bps_jump34000bps_bpy70080000": "0x8c3D5f698005B40B48e729938bdDC405Aad28872", + "TwoKinks_base0bps_slope654bps_kink8400bps_slope22499bps_base20bps_kink29200bps_jump40625bps_bpy42048000": "0x1AAADE04A970043756D90e11af57e03A3A10E2c4", + "TwoKinks_base0bps_slope654bps_kink8400bps_slope22499bps_base20bps_kink29200bps_jump40625bps_bpy70080000": "0x857ebb8CAcb97DE5ab719320c9FB3aa16076bFe3", + "TwoKinks_base0bps_slope812bps_kink8000bps_slope22000bps_base20bps_kink29000bps_jump30000bps_bpy42048000": "0xF48508A44da9C7D210a668eCe4d31Bc98702602b", + "TwoKinks_base0bps_slope875bps_kink8000bps_slope22000bps_base20bps_kink29000bps_jump30000bps_bpy42048000": "0x1a7c9091973CABc491e361A9eaEFD047b48a3647", + "USDC": "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d", + "USDT": "0x55d398326f99059fF775485246999027B3197955", + "UST": "0x3d4350cD54aeF9f9b2C29435e0fa809957B3F30a", + "Unitroller": "0xfD36E2c2a6789Db23113685031d7F16329158384", + "Unitroller_Implementation": "0xA66B2b5D50ce68A125bBad6B2265b637868c6E66", + "Unitroller_Proxy": "0xfD36E2c2a6789Db23113685031d7F16329158384", + "VAI": "0x4BD17003473389A42DAF6a0a729f6Fdb328BbBd7", + "VAIVault": "0x0B4d7776b87deD4a0958E32D5155598057D2620D", + "VAIVaultProxy": "0x0667Eed0a0aAb930af74a3dfeDD263A73994f216", + "VAIVaultProxy_Implementation": "0xa52f2a56abb7cbdd378bc36c6088fafeaf9ac423", + "VAIVaultProxy_Proxy": "0x0667Eed0a0aAb930af74a3dfeDD263A73994f216", + "VBNBAdmin": "0x9A7890534d9d91d473F28cB97962d176e2B65f1d", + "VBNBAdmin_Implementation": "0xae2713FbdF95d914182f7055ec1Ff6C64F41c275", + "VBNBAdmin_Proxy": "0x9A7890534d9d91d473F28cB97962d176e2B65f1d", + "VBep20Delegate": "0xCDfea50f7CECCB24Fe804657DB8E6c93b689941e", + "VRT": "0x5f84ce30dc3cf7909101c69086c50de191895883", + "VRTConverterProxy": "0x92572fB60f4874d37917C53599cAe5b085B9Facd", + "VRTConverterProxy_Implementation": "0x3192d0fb11c15629c403a6416abfcd7587b180b7", + "VRTConverterProxy_Proxy": "0x92572fB60f4874d37917C53599cAe5b085B9Facd", + "VRTVault": "0x1405899732Cfe963EaB935a8bBa49c47FE996048", + "VRTVaultProxy": "0x98bF4786D72AAEF6c714425126Dd92f149e3F334", + "VRTVaultProxy_Implementation": "0xea98e94d35120b23f9f9f20a7314804d4ab491f1", + "VRTVaultProxy_Proxy": "0x98bF4786D72AAEF6c714425126Dd92f149e3F334", + "VTreasury": "0xF322942f644A996A617BD29c16bd7d231d9F35E9", + "VaiUnitroller": "0x004065D34C6b18cE4370ced1CeBDE94865DbFAFE", + "VaiUnitroller_Implementation": "0x8A7d8589A597619A7842d3BC284b9a5a276FaE56", + "VaiUnitroller_Proxy": "0x004065D34C6b18cE4370ced1CeBDE94865DbFAFE", + "VenusChainlinkOracle": "0x7FabdD617200C9CB4dcf3dd2C41273e60552068A", + "VenusLens": "0xe797804c5d4410777c70EF8769c4eB9C39BEF662", + "WBETH": "0xa2e3356610840701bdf5611a53974510ae27e2e1", + "WBNB": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", + "WhitePaperInterestRateModel_base0bps_slope0bps_bpy10512000": "0x93FBc248e83bc8931141ffC7f457EC882595135A", + "WhitePaperInterestRateModel_base0bps_slope0bps_bpy21024000": "0xAdA65304DDDC86d2873CfC018486b7f4F53edb7E", + "WhitePaperInterestRateModel_base0bps_slope0bps_bpy42048000": "0xB66d19E4bFF26eaE1c5C14E1dAAB418B9573B875", + "WhitePaperInterestRateModel_base0bps_slope0bps_bpy70080000": "0x42Ec3Eb6F23460dFDfa3aE5688f3415CDfE0C6AD", + "WhitePaperInterestRateModel_base0bps_slope24000bps_bpy10512000": "0xa166Ca91a570747708a318A771F0C9AB84DD984b", + "WhitePaperInterestRateModel_base0bps_slope24000bps_bpy21024000": "0x2d0A2955C3321743ea3B63109Ce2d7E388Bb35DB", + "WhitePaperInterestRateModel_base0bps_slope24000bps_bpy42048000": "0x92cdF922902440Fdcdd1c987F984Bf86eEd10397", + "WhitePaperInterestRateModel_base0bps_slope24000bps_bpy70080000": "0xF83362aF1722b1762e21369225901B90D9b980d9", + "WhitePaperInterestRateModel_base2629bps_slope30000bps_bpy10512000": "0xb53504Cb74e395Ec10B9BcEc7089Bdaef1CcA042", + "WhitepaperInterestRateModel": "0x49fADE95f94e5EC7C1f4AE13a6d6f9ca18B2F430", + "XRP": "0x1D2F0da169ceB9fC7B3144628dB156f3F6c60dBE", + "XVS": "0xcF6BB5389c92Bdda8a3747Ddb454cB7a64626C63", + "XVSStore": "0x1e25CF968f12850003Db17E0Dba32108509C4359", + "XVSVaultProxy": "0x051100480289e704d20e9DB4804837068f3f9204", + "XVSVaultProxy_Implementation": "0x74c8a97BE672db3e9a224648bE566AdA5F43B378", + "XVSVaultProxy_Proxy": "0x051100480289e704d20e9DB4804837068f3f9204", + "XVSVesting": "0xA9dD0536Ab0699D60c28CE369Ff366a1e621BFf1", + "XVSVestingProxy": "0xb28Dec7C7Ac80f4D0B6a1B711c39e444cDE8B2cE", + "XVSVestingProxy_Implementation": "0xa9dd0536ab0699d60c28ce369ff366a1e621bff1", + "XVSVestingProxy_Proxy": "0xb28Dec7C7Ac80f4D0B6a1B711c39e444cDE8B2cE", + "pancakeFactory": "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73", + "vAAVE": "0x26DA28954763B92139ED49283625ceCAf52C6f94", + "vADA": "0x9A0AF7FDb2065Ce470D72664DE73cAE409dA28Ec", + "vBCH": "0x5F0388EBc2B94FA8E123F404b79cCF5f40b29176", + "vBETH": "0x972207A639CC1B374B893cc33Fa251b55CEB7c07", + "vBNB": "0xA07c5b74C9B40447a954e1466938b865b6BBea36", + "vBTC": "0x882C173bC7Ff3b7786CA16dfeD3DFFfb9Ee7847B", + "vBUSD": "0x95c78222B3D6e262426483D42CfA53685A67Ab9D", + "vCAKE": "0x86aC3974e2BD0d60825230fa6F355fF11409df5c", + "vDAI": "0x334b3eCB4DCa3593BCCC3c7EBD1A1C1d1780FBF1", + "vDOGE": "0xec3422Ef92B2fb59e84c8B02Ba73F1fE84Ed8D71", + "vDOT": "0x1610bc33319e9398de5f57B33a5b184c806aD217", + "vETH": "0xf508fCD89b8bd15579dc79A6827cB4686A3592c8", + "vFDUSD": "0xC4eF4229FEc74Ccfe17B2bdeF7715fAC740BA0ba", + "vFIL": "0xf91d58b5aE142DAcC749f58A49FCBac340Cb0343", + "vLINK": "0x650b940a1033B8A1b1873f78730FcFC73ec11f1f", + "vLTC": "0x57A5297F2cB2c0AaC9D554660acd6D385Ab50c6B", + "vLUNA": "0xb91A659E88B51474767CD97EF3196A3e7cEDD2c8", + "vMATIC": "0x5c9476FcD6a4F9a3654139721c949c2233bBbBc8", + "vNVDAB": "0xEb8Ca841cBe1BC4832A10b15c7dAB1081eDaD371", + "vPT-USDe-30OCT2025": "0x6D0cDb3355c93A0cD20071aBbb3622731a95c73E", + "vPT-clisBNB-25JUN2026": "0x6d3BD68E90B42615cb5abF4B8DE92b154ADc435e", + "vPT-sUSDE-26JUN2025": "0x9e4E5fed5Ac5B9F732d0D850A615206330Bf1866", + "vSKHYB": "0x3E281461efb3D53EC20DB207674373Ed8Ef3BbA9", + "vSOL": "0xBf515bA4D1b52FFdCeaBF20d31D705Ce789F2cEC", + "vSPCXB": "0xC36dFaCc7a125859C106F29b9F2d874CCF29A55A", + "vSXP": "0x2fF3d0F6990a40261c66E1ff2017aCBc282EB6d0", + "vSolvBTC": "0xf841cb62c19fCd4fF5CD0AaB5939f3140BaaC3Ea", + "vTHE": "0x86e06EAfa6A1eA631Eab51DE500E3D474933739f", + "vTRX": "0xC5D3466aA484B040eE977073fcF337f2c00071c1", + "vTRXOLD": "0x61eDcFe8Dd6bA3c891CB9bEc2dc7657B3B422E93", + "vTSLAB": "0x97421799419Eb782628e73e7220d8E0A207469a3", + "vTUSD": "0xBf762cd5991cA1DCdDaC9ae5C638F5B5Dc3Bee6E", + "vTUSDOLD": "0x08CEB3F4a7ed3500cA0982bcd0FC7816688084c3", + "vTWT": "0x4d41a36D04D97785bcEA57b057C412b278e6Edcc", + "vU": "0x3d5E269787d562b74aCC55F18Bd26C5D09Fa245E", + "vUNI": "0x27FF564707786720C71A2e5c1490A63266683612", + "vUSD1": "0x0C1DA220D301155b87318B90692Da8dc43B67340", + "vUSDC": "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8", + "vUSDT": "0xfD5840Cd36d94D7229439859C0112a4185BC0255", + "vUSDe": "0x74ca6930108F775CC667894EEa33843e691680d7", + "vUST": "0x78366446547D062f45b4C0f320cDaa6d710D87bb", + "vWBETH": "0x6CFdEc747f37DAf3b87a35a1D9c8AD3063A1A8A0", + "vWBNB": "0x6bCa74586218dB34cdB402295796b79663d816e9", + "vXAUM": "0x92e6Ea74a1A3047DabF4186405a21c7D63a0612A", + "vXRP": "0xB248a295732e0225acd3337607cc01068e3b9c10", + "vXVS": "0x151B1e2635A717bcDc836ECd6FbB62B674FE3E1D", + "vasBNB": "0xCC1dB43a06d97f736C7B045AedD03C6707c09BDF", + "vlisUSD": "0x689E0daB47Ab16bcae87Ec18491692BF621Dc6Ab", + "vsUSDe": "0x699658323d58eE25c69F1a29d476946ab011bD18", + "vslisBNB": "0x89c910Eb8c90df818b4649b508Ba22130Dc73Adc", + "vvhU": "0x80a5694441810d2b871BEeD644b6d16D113ce06E", + "vvhUSDC": "0xb1AB0399766997C5d66a30b2f2055277B7FA5D6C", + "vvhUSDT": "0xc0768948e668B7BacFf8b4BD1BaBe0eD2b512d3c", + "vxSolvBTC": "0xd804dE60aFD05EE6B89aab5D152258fD461B07D5" + } +} diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/README.md b/plan/agw/research/preset-permission-policy-2026-10-18/README.md new file mode 100644 index 00000000..224491be --- /dev/null +++ b/plan/agw/research/preset-permission-policy-2026-10-18/README.md @@ -0,0 +1,31 @@ +# Preset permission defaults — October 18, 2026 + +> Intermediate stage. Final funding behavior, commits and release checks are recorded in [release readiness](../preset-release-readiness-2026-10-18/README.md). + +User authorization: after confirming the SDK can supply spending caps, gas ceilings and expiry centrally, the user requested implementation. This supersedes the earlier pending-policy notes. Changes remain local on feat/agw-sdk-v4; no commit, push, package publication or live transaction is part of this task. + +## Delivered policy + +Omitted assets selects the curated tokens and explicit caps: stablecoins 10 per call / 100 cumulative Push outbound; ETH/WETH/stETH/wstETH 0.001 / 0.01; WBNB 0.01 / 0.1; LINK 1 / 10. Values are fixed token quantities, not USD equivalents. Every token is matched by chain and address; no symbol-based or unknown-token inference runs in production. + +Omitted validUntil becomes seven days from the current get call, computed once for all returned rules. Omitted maxGasPerCall uses an explicit chain profile, currently 20 PC for the eight catalog EVM chains. This is an URP value ceiling, not an actual fee or guaranteed sufficient quote. Testnet protocol flows previously used this ceiling; mainnet policy templates have no funded execution acceptance. Each send still obtains a fresh quote and is subject to contract policy and wallet funds. + +An agent alone now narrows the get result to Rule[]. The existing editable-template type remains compatible. The get API stays synchronous and performs no token metadata, price or quote fetch. Missing identity remains an actionable readiness issue. PREDICTION remains empty and no Solana preset is introduced. + +Explicit assets replaces all selected-chain defaults. Omitted caps inside explicit assets still mean zero. Explicit gas zero stays zero, and explicit expiry is validated/preserved. These defaults do not alter ordinary rules, produce unlimited allowances, aggregate destination batches or meter destination lifetime spend. A new default token without a reviewed budget fails instead of receiving a guessed policy. + +## Evidence + +- Read-only RPC metadata checks covered 25 unique chain/token pairs across eight networks. Network, block and symbol/decimals are in token-metadata.json. No account/credential access was needed. +- Compiled policy compared against all 25 RPC metadata entries: metadata-comparison.json. BNB mainnet USDT uses 18 decimals; BSC testnet USDT uses 6. +- Focused preset tests: 72 passed. +- Full units: 2,129 passed, 12 skipped, no failures. +- Actual pinned v6 local AGW/URP/engine suite: 18 passed. Default DEX gas and expiry survive grant/read; amount above the generated policy MAX is rejected by the contract even after bridge budgets are edited. Gateway/core/token/origin metadata remain local fixtures; these are not destination-protocol execution tests. +- Build, spec and local typechecks pass. Six guide TypeScript examples and package CJS/ESM/declaration/import checks pass. Compiled API matches source; production policy and new policy tests have no lint errors/warnings. +- Existing funded E2E scenarios now assert the default configuration and then apply their small fixture-specific execution caps. They were typechecked, not broadcast again. + +## Execution prerequisites remain + +Configuration readiness is not full execution readiness. An offline Donut registry check (registry.json) found only 1 of 33 category/chain/token entries mapped; this count includes mainnet templates, which Donut does not support, and duplicate assets across categories. This is mapping evidence only, not an on-chain source-identity check or proof all unmapped tokens are deployable. + +Most testnet protocol mock/wrapped tokens have no usable current SDK PRC20 mapping. The earlier live tests therefore prefunded destination accounts and granted the generated call constraints with bridge assets empty. The SDK cannot silently drop a default asset or pretend a different token has the same source identity. Passing unmodified generated default assets into create can fail preparation when those mappings are unavailable. The user must have a supported token route or use the documented destination-only grant workflow. Further bridge-token coverage depends on actual supported assets/deployments and registry validation, not permission-policy constants. diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/api.json b/plan/agw/research/preset-permission-policy-2026-10-18/api.json new file mode 100644 index 00000000..97ae2de9 --- /dev/null +++ b/plan/agw/research/preset-permission-policy-2026-10-18/api.json @@ -0,0 +1,64 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "b115b66c6888cde5ff4b6a09e6c4b224a8874729", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [ + "AgenticPresets", + "ArgumentPath", + "DecodedSolanaRule", + "Pin", + "Preset", + "PresetAsset", + "PresetCallIssue", + "PresetCategory", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetOptions", + "PresetResult", + "PresetRuleTemplate", + "ReadyPresetOptions", + "RuleInput", + "Spent", + "WalletMarker" + ], + "removedExports": [ + "AgenticNetworkConstants", + "NativeRule", + "UniversalRule" + ], + "publicTypeChanges": [ + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticRevertError", + "AgenticErrorCode", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "CreateOptions", + "DecodedSolanaRule", + "Rule", + "RuleInput", + "Pin", + "Spent", + "WalletMarker", + "ArgumentPath", + "RulesRecord", + "Preset", + "PresetCategory", + "PresetAsset", + "PresetOptions", + "ReadyPresetOptions", + "PresetRuleTemplate", + "PresetResult", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetCallIssue", + "AgenticPresets" + ], + "transactionMethodChanges": [], + "instanceMethodChanges": [], + "agwConstantsChanged": true, + "scope": "Summary of check-agw-api.js output; redundant full source/declaration snapshots omitted." +} diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/api.log b/plan/agw/research/preset-permission-policy-2026-10-18/api.log new file mode 100644 index 00000000..a4e4152e --- /dev/null +++ b/plan/agw/research/preset-permission-policy-2026-10-18/api.log @@ -0,0 +1 @@ +{"compiledMatchesSource":true,"addedExports":["AgenticPresets","ArgumentPath","DecodedSolanaRule","Pin","Preset","PresetAsset","PresetCallIssue","PresetCategory","PresetChainReadiness","PresetConfigurationIssue","PresetOptions","PresetResult","PresetRuleTemplate","ReadyPresetOptions","RuleInput","Spent","WalletMarker"],"removedExports":["AgenticNetworkConstants","NativeRule","UniversalRule"],"changedAgwTypes":["AgenticWallet","AgenticError","AgenticRevertError","AGENTIC_ERROR_CODE","Rule","RuleInput","Pin","Spent","NativeRule","AssetCap","AllowedCall","UniversalRule","RulesRecord","CreateOptions","AgenticTxMetadata"],"publicTypeChanges":["AGENTIC_ERROR_CODE","AgenticError","AgenticRevertError","AgenticErrorCode","AgenticTxMetadata","AgenticWallet","AllowedCall","AssetCap","CreateOptions","DecodedSolanaRule","Rule","RuleInput","Pin","Spent","WalletMarker","ArgumentPath","RulesRecord","Preset","PresetCategory","PresetAsset","PresetOptions","ReadyPresetOptions","PresetRuleTemplate","PresetResult","PresetChainReadiness","PresetConfigurationIssue","PresetCallIssue","AgenticPresets"],"transactionMethodChanges":[],"instanceMethodChanges":[],"initializeSignatureChanged":false,"agwConstantsChanged":true} diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/build.log b/plan/agw/research/preset-permission-policy-2026-10-18/build.log new file mode 100644 index 00000000..2e1f5af4 --- /dev/null +++ b/plan/agw/research/preset-permission-policy-2026-10-18/build.log @@ -0,0 +1,11 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:23736) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/docs.log b/plan/agw/research/preset-permission-policy-2026-10-18/docs.log new file mode 100644 index 00000000..2755478b --- /dev/null +++ b/plan/agw/research/preset-permission-policy-2026-10-18/docs.log @@ -0,0 +1 @@ +AGW guide: 6 TypeScript blocks typechecked against public exports; no examples executed. diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/focused.log b/plan/agw/research/preset-permission-policy-2026-10-18/focused.log new file mode 100644 index 00000000..7932c173 --- /dev/null +++ b/plan/agw/research/preset-permission-policy-2026-10-18/focused.log @@ -0,0 +1,11 @@ +PASS core packages/core/src/lib/agentic/__tests__/preset-default-policy.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-default-tokens.spec.ts + +Test Suites: 5 passed, 5 total +Tests: 72 passed, 72 total +Snapshots: 0 total +Time: 2.495 s, estimated 3 s +Ran all test suites within paths "packages/core/src/lib/agentic/__tests__/presets.spec.ts", "packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts", "packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts", "packages/core/src/lib/agentic/__tests__/preset-default-tokens.spec.ts", "packages/core/src/lib/agentic/__tests__/preset-default-policy.spec.ts". diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/full-unit.log b/plan/agw/research/preset-permission-policy-2026-10-18/full-unit.log new file mode 100644 index 00000000..10563a2c --- /dev/null +++ b/plan/agw/research/preset-permission-policy-2026-10-18/full-unit.log @@ -0,0 +1,181 @@ +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/agentic/__tests__/preset-default-policy.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/labels.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/public-rule.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-default-tokens.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts + +Test Suites: 1 skipped, 128 passed, 128 of 129 total +Tests: 12 skipped, 2129 passed, 2141 total +Snapshots: 0 total +Time: 32.905 s, estimated 56 s +Ran all test suites. diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/lint.log b/plan/agw/research/preset-permission-policy-2026-10-18/lint.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/local-types.log b/plan/agw/research/preset-permission-policy-2026-10-18/local-types.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/local.log b/plan/agw/research/preset-permission-policy-2026-10-18/local.log new file mode 100644 index 00000000..29864221 --- /dev/null +++ b/plan/agw/research/preset-permission-policy-2026-10-18/local.log @@ -0,0 +1,26 @@ +PASS core-agw-local packages/core/__agw-local__/v5-multiasset.spec.ts (5.049 s) + v6 multi-asset SDK management and execution + ✓ v6 EVM alternatives enforce both spender and MAX, and reads update losslessly (168 ms) + ✓ v6 refuses a bare alternative that bypasses a pinned function and too many initial rules (25 ms) + ✓ the shipped DEX catalog enforces tuple receiver/token/amount pins on actual v6 URP (151 ms) + ✓ a default-token DEX exactInputSingle call rejects spending above its policy cap despite edited bridge budgets (111 ms) + ✓ a default-token DEX exactOutputSingle call rejects spending above its policy cap despite edited bridge budgets (91 ms) + ✓ regenerated LENDING presets enforce new token/amount pins through atomic rules.update (171 ms) + ✓ regenerated STAKING presets enforce new token/amount pins through atomic rules.update (136 ms) + ✓ a fixture preset produces rules accepted by public create and enforced by real contracts (63 ms) + ✓ public create encodes two ordered assets; public get reconstructs source-token caps (53 ms) + ✓ a token from the wrong chain fails before deployment (13 ms) + ✓ a same-chain registry identity mismatch fails before deployment (2 ms) + ✓ both tokens execute under one rule and keep independent counters/limits (99 ms) + ✓ omitted and explicit zero totals both prohibit movement (80 ms) + ✓ empty user assets grants one zero-cap gas token and executes a call-only request (101 ms) + ✓ public update resets both counters in one batch and records five checkpoints (110 ms) + ✓ spend on the second asset after snapshot rolls back revoke/grant and checkpoint writes (82 ms) + ✓ out-of-band duplicate contract grants still make sends ambiguous (28 ms) + ✓ a legacy two-field envelope is refused by the actual v6 grant path (38 ms) + +Test Suites: 1 passed, 1 total +Tests: 18 passed, 18 total +Snapshots: 0 total +Time: 5.092 s, estimated 8 s +Ran all test suites within paths "packages/core/__agw-local__/v5-multiasset.spec.ts". diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/metadata-comparison.json b/plan/agw/research/preset-permission-policy-2026-10-18/metadata-comparison.json new file mode 100644 index 00000000..09e5b64b --- /dev/null +++ b/plan/agw/research/preset-permission-policy-2026-10-18/metadata-comparison.json @@ -0,0 +1,256 @@ +{ + "readOnly": true, + "verified": [ + { + "chain": "eip155:1", + "block": "26217257", + "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + "symbol": "WETH", + "decimals": 18, + "perCall": "0.001", + "total": "0.01", + "presetUses": 2 + }, + { + "chain": "eip155:1", + "block": "26217257", + "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "symbol": "USDC", + "decimals": 6, + "perCall": "10", + "total": "100", + "presetUses": 2 + }, + { + "chain": "eip155:1", + "block": "26217257", + "address": "0x0000000000000000000000000000000000000000", + "symbol": "ETH", + "decimals": 18, + "native": true, + "perCall": "0.001", + "total": "0.01", + "presetUses": 1 + }, + { + "chain": "eip155:1", + "block": "26217257", + "address": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84", + "symbol": "stETH", + "decimals": 18, + "perCall": "0.001", + "total": "0.01", + "presetUses": 1 + }, + { + "chain": "eip155:1", + "block": "26217257", + "address": "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0", + "symbol": "wstETH", + "decimals": 18, + "perCall": "0.001", + "total": "0.01", + "presetUses": 1 + }, + { + "chain": "eip155:8453", + "block": "52755391", + "address": "0x4200000000000000000000000000000000000006", + "symbol": "WETH", + "decimals": 18, + "perCall": "0.001", + "total": "0.01", + "presetUses": 1 + }, + { + "chain": "eip155:8453", + "block": "52755391", + "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "symbol": "USDC", + "decimals": 6, + "perCall": "10", + "total": "100", + "presetUses": 2 + }, + { + "chain": "eip155:42161", + "block": "515879645", + "address": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + "symbol": "WETH", + "decimals": 18, + "perCall": "0.001", + "total": "0.01", + "presetUses": 2 + }, + { + "chain": "eip155:42161", + "block": "515879645", + "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + "symbol": "USDC", + "decimals": 6, + "perCall": "10", + "total": "100", + "presetUses": 2 + }, + { + "chain": "eip155:56", + "block": "128303716", + "address": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", + "symbol": "WBNB", + "decimals": 18, + "perCall": "0.01", + "total": "0.1", + "presetUses": 1 + }, + { + "chain": "eip155:56", + "block": "128303716", + "address": "0x55d398326f99059fF775485246999027B3197955", + "symbol": "USDT", + "decimals": 18, + "perCall": "10", + "total": "100", + "presetUses": 2 + }, + { + "chain": "eip155:11155111", + "block": "11938903", + "address": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "symbol": "WETH", + "decimals": 18, + "perCall": "0.001", + "total": "0.01", + "presetUses": 1 + }, + { + "chain": "eip155:11155111", + "block": "11938903", + "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "symbol": "USDC", + "decimals": 6, + "perCall": "10", + "total": "100", + "presetUses": 1 + }, + { + "chain": "eip155:11155111", + "block": "11938903", + "address": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "symbol": "LINK", + "decimals": 18, + "perCall": "1", + "total": "10", + "presetUses": 1 + }, + { + "chain": "eip155:11155111", + "block": "11938903", + "address": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "symbol": "WETH", + "decimals": 18, + "perCall": "0.001", + "total": "0.01", + "presetUses": 1 + }, + { + "chain": "eip155:84532", + "block": "48265921", + "address": "0x4200000000000000000000000000000000000006", + "symbol": "WETH", + "decimals": 18, + "perCall": "0.001", + "total": "0.01", + "presetUses": 1 + }, + { + "chain": "eip155:84532", + "block": "48265921", + "address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "symbol": "USDC", + "decimals": 6, + "perCall": "10", + "total": "100", + "presetUses": 1 + }, + { + "chain": "eip155:84532", + "block": "48265921", + "address": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "symbol": "LINK", + "decimals": 18, + "perCall": "1", + "total": "10", + "presetUses": 1 + }, + { + "chain": "eip155:84532", + "block": "48265921", + "address": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "symbol": "USDBC", + "decimals": 6, + "perCall": "10", + "total": "100", + "presetUses": 1 + }, + { + "chain": "eip155:84532", + "block": "48265921", + "address": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "symbol": "WETH", + "decimals": 18, + "perCall": "0.001", + "total": "0.01", + "presetUses": 1 + }, + { + "chain": "eip155:421614", + "block": "320300290", + "address": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "symbol": "WETH", + "decimals": 18, + "perCall": "0.001", + "total": "0.01", + "presetUses": 1 + }, + { + "chain": "eip155:421614", + "block": "320300290", + "address": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "symbol": "USDC", + "decimals": 6, + "perCall": "10", + "total": "100", + "presetUses": 2 + }, + { + "chain": "eip155:97", + "block": "137451289", + "address": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "symbol": "WBNB", + "decimals": 18, + "perCall": "0.01", + "total": "0.1", + "presetUses": 1 + }, + { + "chain": "eip155:97", + "block": "137451289", + "address": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "symbol": "USDT", + "decimals": 6, + "perCall": "10", + "total": "100", + "presetUses": 2 + }, + { + "chain": "eip155:97", + "block": "137451289", + "address": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "symbol": "USDC", + "decimals": 6, + "perCall": "10", + "total": "100", + "presetUses": 1 + } + ] +} \ No newline at end of file diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/package.log b/plan/agw/research/preset-permission-policy-2026-10-18/package.log new file mode 100644 index 00000000..8e1b97e4 --- /dev/null +++ b/plan/agw/research/preset-permission-policy-2026-10-18/package.log @@ -0,0 +1 @@ +AGW package: CJS/ESM imports, compiled declaration examples and npm contents pass. No examples executed/published. diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/registry.json b/plan/agw/research/preset-permission-policy-2026-10-18/registry.json new file mode 100644 index 00000000..c4b28893 --- /dev/null +++ b/plan/agw/research/preset-permission-policy-2026-10-18/registry.json @@ -0,0 +1,204 @@ +{ + "network": "TESTNET_DONUT", + "scope": "Offline mapping only; no on-chain source check", + "rows": [ + { + "category": "DEXES", + "chain": "eip155:1", + "token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + "unavailable": "Unsupported token symbol: WETH" + }, + { + "category": "DEXES", + "chain": "eip155:1", + "token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "DEXES", + "chain": "eip155:8453", + "token": "0x4200000000000000000000000000000000000006", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "DEXES", + "chain": "eip155:8453", + "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "DEXES", + "chain": "eip155:42161", + "token": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "DEXES", + "chain": "eip155:42161", + "token": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "DEXES", + "chain": "eip155:56", + "token": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "DEXES", + "chain": "eip155:56", + "token": "0x55d398326f99059fF775485246999027B3197955", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "DEXES", + "chain": "eip155:11155111", + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "DEXES", + "chain": "eip155:11155111", + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "DEXES", + "chain": "eip155:84532", + "token": "0x4200000000000000000000000000000000000006", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "DEXES", + "chain": "eip155:84532", + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "DEXES", + "chain": "eip155:421614", + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "unavailable": "Unsupported token symbol: WETH" + }, + { + "category": "DEXES", + "chain": "eip155:421614", + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "DEXES", + "chain": "eip155:97", + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "DEXES", + "chain": "eip155:97", + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "LENDING", + "chain": "eip155:1", + "token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + "unavailable": "Unsupported token symbol: WETH" + }, + { + "category": "LENDING", + "chain": "eip155:1", + "token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "LENDING", + "chain": "eip155:8453", + "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "LENDING", + "chain": "eip155:42161", + "token": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "LENDING", + "chain": "eip155:42161", + "token": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "LENDING", + "chain": "eip155:56", + "token": "0x55d398326f99059fF775485246999027B3197955", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "LENDING", + "chain": "eip155:11155111", + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "LENDING", + "chain": "eip155:421614", + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "LENDING", + "chain": "eip155:84532", + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "LENDING", + "chain": "eip155:84532", + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "LENDING", + "chain": "eip155:84532", + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "LENDING", + "chain": "eip155:97", + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "LENDING", + "chain": "eip155:97", + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "STAKING", + "chain": "eip155:1", + "token": "0x0000000000000000000000000000000000000000", + "prc20": "0x2971824Db68229D087931155C2b8bB820B275809" + }, + { + "category": "STAKING", + "chain": "eip155:1", + "token": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "STAKING", + "chain": "eip155:1", + "token": "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0", + "unavailable": "Unable to infer origin chain or token symbol for token" + }, + { + "category": "STAKING", + "chain": "eip155:11155111", + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "unavailable": "Unable to infer origin chain or token symbol for token" + } + ] +} \ No newline at end of file diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/token-metadata.json b/plan/agw/research/preset-permission-policy-2026-10-18/token-metadata.json new file mode 100644 index 00000000..fc3c5f10 --- /dev/null +++ b/plan/agw/research/preset-permission-policy-2026-10-18/token-metadata.json @@ -0,0 +1,188 @@ +{ + "at": "2026-10-18T05:08:51.736Z", + "readOnly": true, + "results": [ + { + "chain": "eip155:1", + "rpc": "https://ethereum-rpc.publicnode.com", + "blockNumber": "26217257", + "entries": [ + { + "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + "symbol": "WETH", + "decimals": 18 + }, + { + "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "symbol": "USDC", + "decimals": 6 + }, + { + "address": "0x0000000000000000000000000000000000000000", + "symbol": "ETH", + "decimals": 18, + "native": true + }, + { + "address": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84", + "symbol": "stETH", + "decimals": 18 + }, + { + "address": "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0", + "symbol": "wstETH", + "decimals": 18 + } + ] + }, + { + "chain": "eip155:8453", + "rpc": "https://base-rpc.publicnode.com", + "blockNumber": "52755391", + "entries": [ + { + "address": "0x4200000000000000000000000000000000000006", + "symbol": "WETH", + "decimals": 18 + }, + { + "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "symbol": "USDC", + "decimals": 6 + } + ] + }, + { + "chain": "eip155:42161", + "rpc": "https://arbitrum-one-rpc.publicnode.com", + "blockNumber": "515879645", + "entries": [ + { + "address": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + "symbol": "WETH", + "decimals": 18 + }, + { + "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + "symbol": "USDC", + "decimals": 6 + } + ] + }, + { + "chain": "eip155:56", + "rpc": "https://bsc-rpc.publicnode.com", + "blockNumber": "128303716", + "entries": [ + { + "address": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", + "symbol": "WBNB", + "decimals": 18 + }, + { + "address": "0x55d398326f99059fF775485246999027B3197955", + "symbol": "USDT", + "decimals": 18 + } + ] + }, + { + "chain": "eip155:11155111", + "rpc": "https://ethereum-sepolia-rpc.publicnode.com", + "blockNumber": "11938903", + "entries": [ + { + "address": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "symbol": "WETH", + "decimals": 18 + }, + { + "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "symbol": "USDC", + "decimals": 6 + }, + { + "address": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "symbol": "LINK", + "decimals": 18 + }, + { + "address": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "symbol": "WETH", + "decimals": 18 + } + ] + }, + { + "chain": "eip155:84532", + "rpc": "https://base-sepolia-rpc.publicnode.com", + "blockNumber": "48265921", + "entries": [ + { + "address": "0x4200000000000000000000000000000000000006", + "symbol": "WETH", + "decimals": 18 + }, + { + "address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "symbol": "USDC", + "decimals": 6 + }, + { + "address": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "symbol": "LINK", + "decimals": 18 + }, + { + "address": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "symbol": "USDBC", + "decimals": 6 + }, + { + "address": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "symbol": "WETH", + "decimals": 18 + } + ] + }, + { + "chain": "eip155:421614", + "rpc": "https://arbitrum-sepolia-rpc.publicnode.com", + "blockNumber": "320300290", + "entries": [ + { + "address": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "symbol": "WETH", + "decimals": 18 + }, + { + "address": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "symbol": "USDC", + "decimals": 6 + } + ] + }, + { + "chain": "eip155:97", + "rpc": "https://bsc-testnet-rpc.publicnode.com", + "blockNumber": "137451289", + "entries": [ + { + "address": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "symbol": "WBNB", + "decimals": 18 + }, + { + "address": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "symbol": "USDT", + "decimals": 6 + }, + { + "address": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "symbol": "USDC", + "decimals": 6 + } + ] + } + ] +} \ No newline at end of file diff --git a/plan/agw/research/preset-permission-policy-2026-10-18/types.log b/plan/agw/research/preset-permission-policy-2026-10-18/types.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/README.md b/plan/agw/research/preset-release-readiness-2026-10-18/README.md new file mode 100644 index 00000000..645c9898 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/README.md @@ -0,0 +1,54 @@ +# Preset alpha release readiness — October 18, 2026 + +Source commit: v4 `2d16bfe0`; equivalent v5 `83f9a713`. V5 keeps its existing 6.0.27-alpha.2 version/changelog/lockfile. Publication remains the user's manual workflow action. No package was published or workflow dispatched by this work. + +## Shipped behavior + +- Curated tokens, explicit modest raw-unit caps, 20 PC value ceiling and seven-day expiry. Explicit overrides/zeros are preserved. General rules and supplied-asset missing caps remain zero. +- Funding defaults to Push: unmapped assets stay in the output and yield BRIDGE_ASSET_UNAVAILABLE instead of a misleading ready result. Unsupported gateway destinations and unadvertised AGW networks are reported separately. +- Explicit destination funding returns rules with empty bridge assets and unchanged token/call constraints. Selected tokens/limits remain visible in readiness.chains[].selectedAssets. These rules grant no Push token-export budget and require destination balances already funded. +- ConfigurationReady is separate from Ready: Ready additionally requires offline release-network, destination and registry support for the selected mode. It is not a live balance/liquidity/current-chain guarantee. Mainnet templates remain discoverable and unavailable for Donut execution. +- Sepolia WETH/stETH registry resolutions now use already-deployed mappings, verified by exact chain/source identity. EVM casing is normalized without changing case-sensitive Solana matching. Explicit mainnet references cannot alias a Sepolia source. String and address-word PRC20 source metadata are supported. +- No source token, route or deployment was invented; unavailable mocks/Circle tokens are not aliased to same-symbol registered tokens. + +## Verification + +| Check | Result | +| --- | --- | +| Full unit suite | 2,142 passed, 12 skipped, no failures | +| Actual v6 local policy suite | 21 passed; includes direct get → create for destination-funded DEX/lending/staking without rewriting the rules | +| Donut factory simulations | 9/9 destination-funded testnet preset cases passed, including preparation, CEA lookup and index-bound create calldata | +| Source identity | WETH and stETH resolutions verified against actual PRC20 metadata | +| Build / spec and local typechecks | Passed | +| Guide | Six TypeScript blocks typechecked | +| API comparison | Compiled matches source | +| Production lint | No errors/warnings in changed production modules | +| Package | CJS/ESM imports and declaration examples pass; no plan/E2E/local-harness/scripts/.env folders in npm contents; built preset smoke checks pass | +| V5 | Build/package checks pass; core sources identical to v4 except preserved package version and changelog | +| V5 immutable install | Passed in an isolated workspace copied from release manifests/lockfile; builds skipped. Existing peer/optional TypeScript patch warnings remain, no lockfile rewrite | + +Donut read-only evidence pins block 24381571 and factory 0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc. The checker initializes a read-mode UniversalAccount with no key. Calls are RPC reads and eth_call; simulated wallet deployments/grants are transient, not broadcasts. Reports are acceptance.json and routes.json. The initial standalone checker had a wrong relative build path and used a non-exported enum import; both were corrected before these final passing results. + +No funded live E2E was repeated for this release. Previous Aave/EigenLayer/BNB live flows remain historical execution evidence, with fresh Base/Moonwell acceptance incomplete at the user's stop request. Nine factory simulations establish default grant acceptance, not actual cross-chain settlement/protocol execution, funding, reserves or liquidity. + +## UI handoff + +Use presets.get(category, { agent, chainNamespace, funding: 'destination' }) for prefunded destination execution. Display selectedAssets as token permissions; returned rules.assets is Push bridge authority and intentionally empty in that mode. Check readiness.ready and show issues. Use default Push mode only with registered, verified source routes. Missing routes and mainnet execution remain external availability limits, not reasons to invent registry entries. + +The repository read-only checker is packages/core/scripts/check-agw-preset-routes.js. It runs against built artifacts, never loads keys, and is excluded from the npm package. Publishing remains manual; select feat/agw-sdk-v5 and an alpha release. + +## CI repair and complete unfunded command + +The first pushed workflow was rejected before starting jobs: runner.temp was used at job-level env where that context is unavailable. Actionlint reproduced the exact diagnostic; moving the value to step env validates. The checkout was also still pinned to 2e61e1 while the harness defaults to deployed v6 ffd567d. Both were aligned. Workflow fix commits: v4 089a0b51 / v5 21857417. GitHub's [context availability reference](https://docs.github.com/en/actions/reference/workflows-and-actions/contexts) confirms the distinction. + +Once jobs could start, GitHub's hardened public-PR install exposed two pre-existing invalid merged lock descriptors: babel-plugin-macros ^3.1.0 resolving to 2.8.0, and commander ^4.0.0 resolving to 13.1.0. Kept the older versions for their compatible consumers, split the incompatible descriptors and regenerated through Yarn with hardened mode enabled. Yarn resolved macros 3.1.0, commander 4.1.1 and their required transitive entries. V4 5eee8bbb and v5 66dc81f8 contain the correction; hardened checking stays enabled in CI. V5 preserves its alpha.2 workspace/version-specific resolution. Clean hardened immutable install passed against the exact v5 lock. The earlier ordinary immutable-install result did not exercise public-PR hardened validation. + +The full repository agw-verify.js command also passed locally: 417 focused units, all three typechecks, docs, pinned contract preparation, **107 real local contract tests across 13 suites**, build, package and public API checks. This broadens the earlier 21-test subset. The command loads no .env, broadcasts no transactions and invokes no publish action. Full unit coverage separately remains 2,142 passed / 12 skipped. + +## User-requested lighter CI + +The user clarified that CI is lower priority and should be faster. V4 6108348f / v5 b291b873 switches PR validation to agw-verify.js --sdk-only: **421 focused units**, spec typecheck, build (including library types) and compiled package/guide checks. This command passed locally. It skips the external contract checkout, Foundry setup/compilation, full contract suites, duplicate standalone guide check and full API comparison. Full unit coverage separately remains 2,142 and all local contracts separately passed 107. + +The full unfunded path remains manual via workflow_dispatch with contracts=true. Yarn package archives are cached; hardened immutable install remains enabled. The fresh hosted full run passed installation, units, types and docs but failed at contract preparation; its hidden artifact folder was not uploaded, so the exact nested error was not available. Added failed-command output to the console, enabled upload of the explicit validation folder, and allowed downloading the pinned compiler on fresh manual CI runners. Default local preparation remains offline. The manual fresh-run path is not represented as remotely passing; local full verification passed. No funded run or publish was dispatched. + +Publishing the next alpha is based on the completed local tests, 9/9 read-only factory simulations, package checks and hardened v5 lock validation. We are not waiting on the optional heavy CI job at the user's request. Publishing remains the user's manual action from feat/agw-sdk-v5. diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/acceptance.json b/plan/agw/research/preset-release-readiness-2026-10-18/acceptance.json new file mode 100644 index 00000000..02be6759 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/acceptance.json @@ -0,0 +1,652 @@ +{ + "at": "2026-10-18T13:16:48.622Z", + "readOnly": true, + "network": "TESTNET_DONUT", + "cases": [ + { + "category": "DEXES", + "chainNamespace": "eip155:11155111", + "pushReadiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:11155111", + "ready": false, + "configurationReady": true, + "funding": "push", + "selectedAssets": [ + { + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "prc20": "0x0d0dF7E8807430A81104EA84d926139816eC7586", + "status": "registered" + }, + { + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "message": "No SDK PRC20 mapping for eip155:11155111:0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238 on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238" + ], + "zeroBridgeLimits": [] + } + ] + }, + "destinationFactorySimulation": "passed", + "selectedAssets": [ + { + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "pushPreparation": "unavailable-in-registry" + }, + { + "category": "DEXES", + "chainNamespace": "eip155:84532", + "pushReadiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:84532", + "ready": false, + "configurationReady": true, + "funding": "push", + "selectedAssets": [ + { + "token": "0x4200000000000000000000000000000000000006", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0x4200000000000000000000000000000000000006", + "status": "unavailable" + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x4200000000000000000000000000000000000006", + "message": "No SDK PRC20 mapping for eip155:84532:0x4200000000000000000000000000000000000006 on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "message": "No SDK PRC20 mapping for eip155:84532:0x036CbD53842c5426634e7929541eC2318f3dCF7e on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0x4200000000000000000000000000000000000006", + "0x036CbD53842c5426634e7929541eC2318f3dCF7e" + ], + "zeroBridgeLimits": [] + } + ] + }, + "destinationFactorySimulation": "passed", + "selectedAssets": [ + { + "token": "0x4200000000000000000000000000000000000006", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "pushPreparation": "unavailable-in-registry" + }, + { + "category": "DEXES", + "chainNamespace": "eip155:421614", + "pushReadiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:421614", + "ready": false, + "configurationReady": true, + "funding": "push", + "selectedAssets": [ + { + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "status": "unavailable" + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "message": "No SDK PRC20 mapping for eip155:421614:0x980B62Da83eFf3D4576C647993b0c1D7faf17c73 on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "message": "No SDK PRC20 mapping for eip155:421614:0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d" + ], + "zeroBridgeLimits": [] + } + ] + }, + "destinationFactorySimulation": "passed", + "selectedAssets": [ + { + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "pushPreparation": "unavailable-in-registry" + }, + { + "category": "DEXES", + "chainNamespace": "eip155:97", + "pushReadiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:97", + "ready": false, + "configurationReady": true, + "funding": "push", + "selectedAssets": [ + { + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "maxPerCall": "10000000000000000", + "maxTotal": "100000000000000000" + }, + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "status": "unavailable" + }, + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "message": "No SDK PRC20 mapping for eip155:97:0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "message": "No SDK PRC20 mapping for eip155:97:0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c" + ], + "zeroBridgeLimits": [] + } + ] + }, + "destinationFactorySimulation": "passed", + "selectedAssets": [ + { + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "maxPerCall": "10000000000000000", + "maxTotal": "100000000000000000" + }, + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "pushPreparation": "unavailable-in-registry" + }, + { + "category": "LENDING", + "chainNamespace": "eip155:11155111", + "pushReadiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:11155111", + "ready": false, + "configurationReady": true, + "funding": "push", + "selectedAssets": [ + { + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "maxPerCall": "1000000000000000000", + "maxTotal": "10000000000000000000" + } + ], + "bridgeAssets": [ + { + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "message": "No SDK PRC20 mapping for eip155:11155111:0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5 on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357", + "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d5E4C8", + "0x29f2D40B0605204364af54EC677bD022dA425d03", + "0xC558DBdd856501FCd9aaF1E62eae57A9F0629a3c", + "0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0", + "0x88541670E55cC00bEEFD87eB59EDd1b7C511AC9a", + "0x6d906e526a4e2Ca02097BA9d0caA3c382F52278E", + "0xc4bF5CbDaBE595361438F8c6a187bDc330539c60" + ], + "zeroBridgeLimits": [] + } + ] + }, + "destinationFactorySimulation": "passed", + "selectedAssets": [ + { + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "maxPerCall": "1000000000000000000", + "maxTotal": "10000000000000000000" + } + ], + "pushPreparation": "unavailable-in-registry" + }, + { + "category": "LENDING", + "chainNamespace": "eip155:421614", + "pushReadiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:421614", + "ready": false, + "configurationReady": true, + "funding": "push", + "selectedAssets": [ + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "message": "No SDK PRC20 mapping for eip155:421614:0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "0x1dF462e2712496373A347f8ad10802a5E95f053D" + ], + "zeroBridgeLimits": [] + } + ] + }, + "destinationFactorySimulation": "passed", + "selectedAssets": [ + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "pushPreparation": "unavailable-in-registry" + }, + { + "category": "LENDING", + "chainNamespace": "eip155:84532", + "pushReadiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:84532", + "ready": false, + "configurationReady": true, + "funding": "push", + "selectedAssets": [ + { + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "maxPerCall": "1000000000000000000", + "maxTotal": "10000000000000000000" + }, + { + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "maxPerCall": "10000000", + "maxTotal": "100000000" + }, + { + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + } + ], + "bridgeAssets": [ + { + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "status": "unavailable" + }, + { + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "status": "unavailable" + }, + { + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "message": "No SDK PRC20 mapping for eip155:84532:0x810D46F9a9027E28F9B01F75E2bdde839dA61115 on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "message": "No SDK PRC20 mapping for eip155:84532:0x4616975f7E6045FD9737e95bC527e9e14c727BD2 on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "message": "No SDK PRC20 mapping for eip155:84532:0x663A6F02d547dFd639BF689FED298712f2FB69Fb on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + } + ], + "disabledCalls": [], + "excludedCalls": [ + { + "target": "0x876852425331a113d8E432eFFB3aC5BEf38f033a", + "selector": "redeem(uint256)", + "app": "Moonwell mUSDbC", + "reason": "SHARE_AMOUNT", + "alternative": "redeemUnderlying(uint256)" + }, + { + "target": "0x2F39a349A79492a70E152760ce7123A1933eCf28", + "selector": "redeem(uint256)", + "app": "Moonwell mWETH", + "reason": "SHARE_AMOUNT", + "alternative": "redeemUnderlying(uint256)" + } + ], + "knownTokens": [ + "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f", + "0x0a215D8ba66387DCA84B284D18c3B4ec3de6E54a", + "0x54114591963CF60EF3aA63bEfD6eC263D98145a4", + "0x4200000000000000000000000000000000000006", + "0xD171b9694f7A2597Ed006D41f7509aaD4B485c4B", + "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "0x663A6F02d547dFd639BF689FED298712f2FB69Fb" + ], + "zeroBridgeLimits": [] + } + ] + }, + "destinationFactorySimulation": "passed", + "selectedAssets": [ + { + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "maxPerCall": "1000000000000000000", + "maxTotal": "10000000000000000000" + }, + { + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "maxPerCall": "10000000", + "maxTotal": "100000000" + }, + { + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + } + ], + "pushPreparation": "unavailable-in-registry" + }, + { + "category": "LENDING", + "chainNamespace": "eip155:97", + "pushReadiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:97", + "ready": false, + "configurationReady": true, + "funding": "push", + "selectedAssets": [ + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "maxPerCall": "10000000", + "maxTotal": "100000000" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "bridgeAssets": [ + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "status": "unavailable" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "message": "No SDK PRC20 mapping for eip155:97:0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "message": "No SDK PRC20 mapping for eip155:97:0x16227D60f7a0e586C66B005219dfc887D13C9531 on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + } + ], + "disabledCalls": [], + "excludedCalls": [ + { + "target": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A", + "selector": "redeem(uint256)", + "app": "Venus vUSDT", + "reason": "SHARE_AMOUNT", + "alternative": "redeemUnderlying(uint256)" + }, + { + "target": "0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7", + "selector": "redeem(uint256)", + "app": "Venus vUSDC", + "reason": "SHARE_AMOUNT", + "alternative": "redeemUnderlying(uint256)" + } + ], + "knownTokens": [ + "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "0x16227D60f7a0e586C66B005219dfc887D13C9531" + ], + "zeroBridgeLimits": [] + } + ] + }, + "destinationFactorySimulation": "passed", + "selectedAssets": [ + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "maxPerCall": "10000000", + "maxTotal": "100000000" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "maxPerCall": "10000000", + "maxTotal": "100000000" + } + ], + "pushPreparation": "unavailable-in-registry" + }, + { + "category": "STAKING", + "chainNamespace": "eip155:11155111", + "pushReadiness": { + "ready": false, + "chains": [ + { + "chainNamespace": "eip155:11155111", + "ready": false, + "configurationReady": true, + "funding": "push", + "selectedAssets": [ + { + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + } + ], + "bridgeAssets": [ + { + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "message": "No SDK PRC20 mapping for eip155:11155111:0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9 on TESTNET_DONUT. Use a supported source asset or explicitly choose destination funding for assets already at the CEA." + } + ], + "disabledCalls": [], + "excludedCalls": [], + "knownTokens": [ + "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9" + ], + "zeroBridgeLimits": [] + } + ] + }, + "destinationFactorySimulation": "passed", + "selectedAssets": [ + { + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "maxPerCall": "1000000000000000", + "maxTotal": "10000000000000000" + } + ], + "pushPreparation": "unavailable-in-registry" + } + ], + "blockNumber": "24381571", + "factory": "0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc", + "verifiedERC20Mappings": [ + { + "source": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "prc20": "0x0d0dF7E8807430A81104EA84d926139816eC7586", + "status": "source-identity-verified" + }, + { + "source": "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af", + "prc20": "0xaf89E805949c628ebde3262e91dc4ab9eA12668E", + "status": "source-identity-verified" + } + ], + "counterfactualWallet": "0xED6bFE825b8d84A1E6f4F7c9067398F8985CC372" +} \ No newline at end of file diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/acceptance.log b/plan/agw/research/preset-release-readiness-2026-10-18/acceptance.log new file mode 100644 index 00000000..a22cb1f0 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/acceptance.log @@ -0,0 +1,10 @@ +DEXES eip155:11155111: destination factory eth_call passed; Push unavailable-in-registry +DEXES eip155:84532: destination factory eth_call passed; Push unavailable-in-registry +DEXES eip155:421614: destination factory eth_call passed; Push unavailable-in-registry +DEXES eip155:97: destination factory eth_call passed; Push unavailable-in-registry +LENDING eip155:11155111: destination factory eth_call passed; Push unavailable-in-registry +LENDING eip155:421614: destination factory eth_call passed; Push unavailable-in-registry +LENDING eip155:84532: destination factory eth_call passed; Push unavailable-in-registry +LENDING eip155:97: destination factory eth_call passed; Push unavailable-in-registry +STAKING eip155:11155111: destination factory eth_call passed; Push unavailable-in-registry +Read-only report: /tmp/preset-release-acceptance.json; 9/9 passed. diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/all-local-contracts.log b/plan/agw/research/preset-release-readiness-2026-10-18/all-local-contracts.log new file mode 100644 index 00000000..383986cc --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/all-local-contracts.log @@ -0,0 +1,31 @@ +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts (8.504 s) +PASS core-agw-local packages/core/__agw-local__/svm-public.spec.ts (5.283 s) +PASS core-agw-local packages/core/__agw-local__/svm-backend.spec.ts (7.266 s) +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-differential.spec.ts + ● Console + + console.log + {"corpus":"svm-grant","seed":23063,"cases":107,"accepted":37,"rejected":70,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:226:13) + + console.log + {"corpus":"svm-payload","seed":23063,"cases":88,"accepted":6,"rejected":82,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:407:13) + +PASS core-agw-local packages/core/__agw-local__/svm-internals.spec.ts +PASS core-agw-local packages/core/__agw-local__/delayed-index.spec.ts +PASS core-agw-local packages/core/__agw-local__/native-multi-action.spec.ts +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-races.spec.ts +PASS core-agw-local packages/core/__agw-local__/labels.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-batch.spec.ts +PASS core-agw-local packages/core/__agw-local__/v5-multiasset.spec.ts (8.595 s) + +Test Suites: 13 passed, 13 total +Tests: 107 passed, 107 total +Snapshots: 0 total +Time: 47.355 s +Ran all test suites. diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/api.json b/plan/agw/research/preset-release-readiness-2026-10-18/api.json new file mode 100644 index 00000000..4837405e --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/api.json @@ -0,0 +1,64 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "2d16bfe0429fd680558eca1a48bf983358940698", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [ + "AgenticPresets", + "ArgumentPath", + "DecodedSolanaRule", + "Pin", + "Preset", + "PresetAsset", + "PresetCallIssue", + "PresetCategory", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetOptions", + "PresetResult", + "PresetRuleTemplate", + "ReadyPresetOptions", + "RuleInput", + "Spent", + "WalletMarker" + ], + "removedExports": [ + "AgenticNetworkConstants", + "NativeRule", + "UniversalRule" + ], + "publicTypeChanges": [ + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticRevertError", + "AgenticErrorCode", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "CreateOptions", + "DecodedSolanaRule", + "Rule", + "RuleInput", + "Pin", + "Spent", + "WalletMarker", + "ArgumentPath", + "RulesRecord", + "Preset", + "PresetCategory", + "PresetAsset", + "PresetOptions", + "ReadyPresetOptions", + "PresetRuleTemplate", + "PresetResult", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetCallIssue", + "AgenticPresets" + ], + "transactionMethodChanges": [], + "instanceMethodChanges": [], + "agwConstantsChanged": true, + "scope": "Summary of check-agw-api.js output; redundant full source/declaration snapshots omitted." +} diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/build.log b/plan/agw/research/preset-release-readiness-2026-10-18/build.log new file mode 100644 index 00000000..8eff7773 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/build.log @@ -0,0 +1,11 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:42929) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/ci-focused-unit.log b/plan/agw/research/preset-release-readiness-2026-10-18/ci-focused-unit.log new file mode 100644 index 00000000..6e60d573 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/ci-focused-unit.log @@ -0,0 +1,38 @@ +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-default-tokens.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-default-policy.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-routes.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/labels.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/public-rule.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/prc20-source-encoding.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts + +Test Suites: 32 passed, 32 total +Tests: 417 passed, 417 total +Snapshots: 0 total +Time: 7.869 s, estimated 8 s +Ran all test suites matching /agentic|outbound-(confirmation-gate|svm-confirmation)|svm-idl|evm-client.batch-gas/i. diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/docs.log b/plan/agw/research/preset-release-readiness-2026-10-18/docs.log new file mode 100644 index 00000000..2755478b --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/docs.log @@ -0,0 +1 @@ +AGW guide: 6 TypeScript blocks typechecked against public exports; no examples executed. diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/full-unfunded.log b/plan/agw/research/preset-release-readiness-2026-10-18/full-unfunded.log new file mode 100644 index 00000000..baec7036 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/full-unfunded.log @@ -0,0 +1,11 @@ +AGW validation: units +AGW validation: types-lib +AGW validation: types-spec +AGW validation: types-agw-local +AGW validation: docs +AGW validation: prepare-contracts +AGW validation: local-contracts +AGW validation: build +AGW validation: package +AGW validation: public-api +AGW unfunded validation completed. diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/full-unit.log b/plan/agw/research/preset-release-readiness-2026-10-18/full-unit.log new file mode 100644 index 00000000..2e996935 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/full-unit.log @@ -0,0 +1,184 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts (6.588 s) + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/universal/prc20-address.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/public-rule.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-routes.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-default-policy.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-default-tokens.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/labels.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/prc20-source-encoding.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts + +Test Suites: 1 skipped, 131 passed, 131 of 132 total +Tests: 12 skipped, 2142 passed, 2154 total +Snapshots: 0 total +Time: 36.23 s, estimated 40 s +Ran all test suites. diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/hardened-lock-regeneration.log b/plan/agw/research/preset-release-readiness-2026-10-18/hardened-lock-regeneration.log new file mode 100644 index 00000000..c4f79841 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/hardened-lock-regeneration.log @@ -0,0 +1,27 @@ +➤ YN0000: · Yarn 4.2.2 +➤ YN0000: ┌ Project validation +➤ YN0057: │ @pushprotocol/common-components: Resolutions field will be ignored +➤ YN0057: │ @pushchain/ui-kit: Resolutions field will be ignored +➤ YN0000: └ Completed +➤ YN0000: ┌ Resolution step +➤ YN0085: │ + @babel/runtime@npm:7.29.10, babel-plugin-macros@npm:3.1.0, commander@npm:4.1.1, cosmiconfig@npm:7.1.0, hasown@npm:2.0.4, is-core-module@npm:2.17.0, and 3 more. +➤ YN0000: └ Completed in 50s 376ms +➤ YN0000: ┌ Post-resolution validation +➤ YN0002: │ @pushchain/core@workspace:packages/core [a1d04] doesn't provide @types/node (pd8231), requested by ts-node. +➤ YN0002: │ @pushchain/core@workspace:packages/core [a1d04] doesn't provide typescript (p4f093), requested by ts-node. +➤ YN0002: │ @pushchain/core@workspace:packages/core doesn't provide @types/node (p360d1), requested by ts-node. +➤ YN0002: │ @pushchain/core@workspace:packages/core doesn't provide typescript (p97602), requested by ts-node. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide eslint (p05da2), requested by typescript-eslint. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide eslint (p7d515), requested by eslint-plugin-react-refresh. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide eslint (pafac7), requested by eslint-plugin-react-hooks. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide typescript (pc5a0d), requested by typescript-eslint. +➤ YN0002: │ @pushprotocol/common-components@workspace:packages/shared-components doesn't provide react-is (p3a3ff), requested by styled-components. +➤ YN0086: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code. +➤ YN0000: └ Completed +➤ YN0000: ┌ Fetch step +➤ YN0013: │ 9 packages were added to the project (+ 475 KiB). +➤ YN0000: └ Completed in 0s 458ms +➤ YN0000: ┌ Link step +➤ YN0073: │ Skipped due to mode=update-lockfile +➤ YN0000: └ Completed +➤ YN0000: · Done with warnings in 50s 984ms diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/lint.log b/plan/agw/research/preset-release-readiness-2026-10-18/lint.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/local-types.log b/plan/agw/research/preset-release-readiness-2026-10-18/local-types.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/local.log b/plan/agw/research/preset-release-readiness-2026-10-18/local.log new file mode 100644 index 00000000..17518deb --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/local.log @@ -0,0 +1,29 @@ +PASS core-agw-local packages/core/__agw-local__/v5-multiasset.spec.ts (9.483 s) + v6 multi-asset SDK management and execution + ✓ v6 EVM alternatives enforce both spender and MAX, and reads update losslessly (300 ms) + ✓ v6 refuses a bare alternative that bypasses a pinned function and too many initial rules (53 ms) + ✓ the shipped DEX catalog enforces tuple receiver/token/amount pins on actual v6 URP (231 ms) + ✓ a default-token DEX exactInputSingle call rejects spending above its policy cap despite edited bridge budgets (107 ms) + ✓ a default-token DEX exactOutputSingle call rejects spending above its policy cap despite edited bridge budgets (106 ms) + ✓ public DEXES destination-funded defaults create directly without rewriting returned rules (222 ms) + ✓ public LENDING destination-funded defaults create directly without rewriting returned rules (110 ms) + ✓ public STAKING destination-funded defaults create directly without rewriting returned rules (130 ms) + ✓ regenerated LENDING presets enforce new token/amount pins through atomic rules.update (353 ms) + ✓ regenerated STAKING presets enforce new token/amount pins through atomic rules.update (254 ms) + ✓ a fixture preset produces rules accepted by public create and enforced by real contracts (107 ms) + ✓ public create encodes two ordered assets; public get reconstructs source-token caps (67 ms) + ✓ a token from the wrong chain fails before deployment (12 ms) + ✓ a same-chain registry identity mismatch fails before deployment (4 ms) + ✓ both tokens execute under one rule and keep independent counters/limits (117 ms) + ✓ omitted and explicit zero totals both prohibit movement (101 ms) + ✓ empty user assets grants one zero-cap gas token and executes a call-only request (113 ms) + ✓ public update resets both counters in one batch and records five checkpoints (135 ms) + ✓ spend on the second asset after snapshot rolls back revoke/grant and checkpoint writes (144 ms) + ✓ out-of-band duplicate contract grants still make sends ambiguous (81 ms) + ✓ a legacy two-field envelope is refused by the actual v6 grant path (19 ms) + +Test Suites: 1 passed, 1 total +Tests: 21 passed, 21 total +Snapshots: 0 total +Time: 9.524 s +Ran all test suites within paths "packages/core/__agw-local__/v5-multiasset.spec.ts". diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/lock-audit.json b/plan/agw/research/preset-release-readiness-2026-10-18/lock-audit.json new file mode 100644 index 00000000..3fbc6fc7 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/lock-audit.json @@ -0,0 +1,10 @@ +[ + { + "descriptor": "@pushchain/core@npm:^6.0.26", + "version": "0.0.0-use.local" + }, + { + "descriptor": "commander@npm:^4.0.0", + "version": "13.1.0" + } +] \ No newline at end of file diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/manual-compiler-prepare.log b/plan/agw/research/preset-release-readiness-2026-10-18/manual-compiler-prepare.log new file mode 100644 index 00000000..a347e8ba --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/manual-compiler-prepare.log @@ -0,0 +1 @@ +/tmp/agw-preset-defaults-v6 diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/package.log b/plan/agw/research/preset-release-readiness-2026-10-18/package.log new file mode 100644 index 00000000..8e1b97e4 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/package.log @@ -0,0 +1 @@ +AGW package: CJS/ESM imports, compiled declaration examples and npm contents pass. No examples executed/published. diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/routes.json b/plan/agw/research/preset-release-readiness-2026-10-18/routes.json new file mode 100644 index 00000000..3d6d0600 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/routes.json @@ -0,0 +1,130 @@ +{ + "network": "TESTNET_DONUT", + "chainId": 42101, + "blockNumber": "24369907", + "at": "2026-10-18T05:22:00.084Z", + "readOnly": true, + "records": [ + { + "key": "pETH", + "address": "0x2971824Db68229D087931155C2b8bB820B275809", + "chain": "eip155:11155111", + "source": "0x0000000000000000000000000000000000000000", + "decimals": 18, + "sourceEncoding": "address" + }, + { + "key": "pETH_ARB", + "address": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "chain": "eip155:421614", + "source": "0x0000000000000000000000000000000000000000", + "decimals": 18 + }, + { + "key": "pETH_BASE", + "address": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "chain": "eip155:84532", + "source": "0x0000000000000000000000000000000000000000", + "decimals": 18 + }, + { + "key": "pBNB", + "address": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "chain": "eip155:97", + "source": "0x0000000000000000000000000000000000000000", + "decimals": 18 + }, + { + "key": "pSOL", + "address": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "error": "Position `32` is out of bounds (`0 < position < 32`)." + }, + { + "key": "USDT_ETH", + "address": "0x0f97A213207703923F5f0C613C9827f7C9A0f96B", + "chain": "eip155:11155111", + "source": "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876", + "decimals": 6 + }, + { + "key": "USDC_ETH", + "address": "0x7A58048036206bB898008b5bBDA85697DB1e5d66", + "chain": "eip155:11155111", + "source": "0x97F477B7f970D47a87B42869ceeace218106152a", + "decimals": 6 + }, + { + "key": "USDT_ARB", + "address": "0xFE6E9DF2BbC9ce05D98b83B1365df6DcA9951891", + "chain": "eip155:421614", + "source": "0xE30928528f52CAEeB75fB07837e22d77D47e9c07", + "decimals": 6 + }, + { + "key": "USDC_ARB", + "address": "0x1091cCBA2FF8d2A131AE4B35e34cf3308C48572C", + "chain": "eip155:421614", + "source": "0x5dd39b0b3610F666F631a6506b7713EF83e1Ac5C", + "decimals": 6 + }, + { + "key": "USDT_SOL", + "address": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34", + "error": "Position `32` is out of bounds (`0 < position < 32`)." + }, + { + "key": "USDC_SOL", + "address": "0x04B8F634ABC7C879763F623e0f0550a4b5c4426F", + "error": "Position `32` is out of bounds (`0 < position < 32`)." + }, + { + "key": "USDT_BSC", + "address": "0x731aF1Da5365259d27528557EE4aFBA4baC90ef2", + "chain": "eip155:97", + "source": "0xE935d9c9C24D02E61186c640cc01d713C876d40F", + "decimals": 6 + }, + { + "key": "USDC_BSC", + "address": "0x120EBf25Dad7D6a09Ad2316f23f9Be95DBb90639", + "chain": "eip155:97", + "source": "0xA8802F96cAd0d45343d9bc660B6f7d80050A660b", + "decimals": 6 + }, + { + "key": "USDT_BASE", + "address": "0x148823809B853e1db187BC09A9ac909BC42F971a", + "chain": "eip155:84532", + "source": "0x4D7646B9eE3D68F4b0F135B5cbc66B00819F6b61", + "decimals": 6 + }, + { + "key": "USDC_BASE", + "address": "0xD7C6cA1e2c0CE260BE0c0AD39C1540de460e3Be1", + "chain": "eip155:84532", + "source": "0x5c3504F0E3bA28FDc1F74234fE936518276AaBB8", + "decimals": 6 + }, + { + "key": "WETH_ETH", + "address": "0x0d0dF7E8807430A81104EA84d926139816eC7586", + "chain": "eip155:11155111", + "source": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "decimals": 18, + "sourceEncoding": "address" + }, + { + "key": "stETH_ETH", + "address": "0xaf89E805949c628ebde3262e91dc4ab9eA12668E", + "chain": "eip155:11155111", + "source": "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af", + "decimals": 18, + "sourceEncoding": "address" + }, + { + "key": "DAI_SOL", + "address": "0x5861f56A556c990358cc9cccd8B5baa3767982A8", + "error": "Position `32` is out of bounds (`0 < position < 32`)." + } + ] +} \ No newline at end of file diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/sdk-only-units.log b/plan/agw/research/preset-release-readiness-2026-10-18/sdk-only-units.log new file mode 100644 index 00000000..611e28df --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/sdk-only-units.log @@ -0,0 +1,39 @@ +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-default-policy.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/public-rule.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-default-tokens.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/labels.spec.ts +PASS core packages/core/src/lib/universal/prc20-address.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/preset-routes.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/prc20-source-encoding.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts + +Test Suites: 33 passed, 33 total +Tests: 421 passed, 421 total +Snapshots: 0 total +Time: 6.953 s, estimated 8 s +Ran all test suites matching /agentic|prc20-address|outbound-(confirmation-gate|svm-confirmation)|svm-idl|evm-client.batch-gas/i. diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/sdk-only-validation.log b/plan/agw/research/preset-release-readiness-2026-10-18/sdk-only-validation.log new file mode 100644 index 00000000..30ba6576 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/sdk-only-validation.log @@ -0,0 +1,5 @@ +AGW validation: units +AGW validation: types-spec +AGW validation: build +AGW validation: package +AGW SDK-only validation completed. diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/sdk-only-workflow-lint.log b/plan/agw/research/preset-release-readiness-2026-10-18/sdk-only-workflow-lint.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/types.log b/plan/agw/research/preset-release-readiness-2026-10-18/types.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/v5-build.log b/plan/agw/research/preset-release-readiness-2026-10-18/v5-build.log new file mode 100644 index 00000000..e9cb362e --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/v5-build.log @@ -0,0 +1,11 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:47418) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/v5-hardened-immutable.log b/plan/agw/research/preset-release-readiness-2026-10-18/v5-hardened-immutable.log new file mode 100644 index 00000000..d07d0731 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/v5-hardened-immutable.log @@ -0,0 +1,22 @@ +➤ YN0000: · Yarn 4.2.2 +➤ YN0000: ┌ Project validation +➤ YN0057: │ @pushprotocol/common-components: Resolutions field will be ignored +➤ YN0057: │ @pushchain/ui-kit: Resolutions field will be ignored +➤ YN0000: └ Completed +➤ YN0000: ┌ Resolution step +➤ YN0000: └ Completed in 1m 25s +➤ YN0000: ┌ Post-resolution validation +➤ YN0002: │ @pushchain/core@workspace:packages/core doesn't provide @types/node (p360d1), requested by ts-node. +➤ YN0002: │ @pushchain/core@workspace:packages/core doesn't provide typescript (p97602), requested by ts-node. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide eslint (p05da2), requested by typescript-eslint. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide eslint (p7d515), requested by eslint-plugin-react-refresh. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide eslint (pafac7), requested by eslint-plugin-react-hooks. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide typescript (pc5a0d), requested by typescript-eslint. +➤ YN0002: │ @pushprotocol/common-components@workspace:packages/shared-components doesn't provide react-is (p3a3ff), requested by styled-components. +➤ YN0086: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code. +➤ YN0000: └ Completed +➤ YN0000: ┌ Fetch step +➤ YN0000: └ Completed in 0s 204ms +➤ YN0000: ┌ Link step +➤ YN0000: └ Completed in 10s 84ms +➤ YN0000: · Done with warnings in 1m 35s diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/v5-immutable.log b/plan/agw/research/preset-release-readiness-2026-10-18/v5-immutable.log new file mode 100644 index 00000000..95471b88 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/v5-immutable.log @@ -0,0 +1,26 @@ +➤ YN0000: · Yarn 4.2.2 +➤ YN0000: ┌ Project validation +➤ YN0057: │ @pushprotocol/common-components: Resolutions field will be ignored +➤ YN0057: │ @pushchain/ui-kit: Resolutions field will be ignored +➤ YN0000: └ Completed +➤ YN0000: ┌ Resolution step +➤ YN0000: └ Completed in 0s 346ms +➤ YN0000: ┌ Post-resolution validation +➤ YN0002: │ @pushchain/core@workspace:packages/core doesn't provide @types/node (p360d1), requested by ts-node. +➤ YN0002: │ @pushchain/core@workspace:packages/core doesn't provide typescript (p97602), requested by ts-node. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide eslint (p05da2), requested by typescript-eslint. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide eslint (p7d515), requested by eslint-plugin-react-refresh. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide eslint (pafac7), requested by eslint-plugin-react-hooks. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide typescript (pc5a0d), requested by typescript-eslint. +➤ YN0002: │ @pushprotocol/common-components@workspace:packages/shared-components doesn't provide react-is (p3a3ff), requested by styled-components. +➤ YN0086: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code. +➤ YN0000: └ Completed +➤ YN0000: ┌ Fetch step +➤ YN0066: │ typescript@patch:typescript@npm%3A5.5.4#optional!builtin::version=5.5.4&hash=b45daf: Cannot apply hunk #11 +➤ YN0066: │ typescript@patch:typescript@npm%3A5.6.3#optional!builtin::version=5.6.3&hash=b45daf: Cannot apply hunk #11 +➤ YN0066: │ typescript@patch:typescript@npm%3A5.8.2#optional!builtin::version=5.8.2&hash=b45daf: Cannot apply hunk #1 +➤ YN0013: │ 1675 packages were added to the project (+ 221.38 MiB). +➤ YN0000: └ Completed in 55s 412ms +➤ YN0000: ┌ Link step +➤ YN0000: └ Completed in 9s 365ms +➤ YN0000: · Done with warnings in 1m 6s diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/v5-package.log b/plan/agw/research/preset-release-readiness-2026-10-18/v5-package.log new file mode 100644 index 00000000..8e1b97e4 --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/v5-package.log @@ -0,0 +1 @@ +AGW package: CJS/ESM imports, compiled declaration examples and npm contents pass. No examples executed/published. diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/workflow-after.log b/plan/agw/research/preset-release-readiness-2026-10-18/workflow-after.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/preset-release-readiness-2026-10-18/workflow-before.log b/plan/agw/research/preset-release-readiness-2026-10-18/workflow-before.log new file mode 100644 index 00000000..fe5b33bc --- /dev/null +++ b/plan/agw/research/preset-release-readiness-2026-10-18/workflow-before.log @@ -0,0 +1,4 @@ +../../../../../../tmp/agw-validation-before.yml:18:26: context "runner" is not allowed here. available contexts are "github", "inputs", "matrix", "needs", "secrets", "strategy", "vars". see https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability for more details [expression] + | +18 | AGW_LOCAL_DIR: ${{ runner.temp }}/agw-v5-build + | ^~~~~~~~~~~ diff --git a/plan/agw/research/product-alignment-2026-10-04/README.md b/plan/agw/research/product-alignment-2026-10-04/README.md new file mode 100644 index 00000000..b86ef7a2 --- /dev/null +++ b/plan/agw/research/product-alignment-2026-10-04/README.md @@ -0,0 +1,39 @@ +# Product scope alignment validation October 4 + +Implements the clear [Harsh decisions](../../product-decisions-2026-10-04.md) on the worktree based at a852777. H3 defaults are byte-for-byte unchanged. No live-network transactions or deployments were performed. + +## Changes + +- Removed SDK approval-selector deny-lists and mandatory spender-pin policy. Explicit pins still use ABI/type validation. +- Kept generation-dependent rulesId/deriveWallet/encodeRules and RulesEncodeContext internal. Public utils contain actionId/configId/decodeRules; client.agentic.derive is unchanged. +- Removed public Spent/RulesRecord.spent. Internal readNativeSpend and expected-spend assertions remain. Tests query real policy counters directly for independent verification. +- Active-only rules.list/get; unknown/revoked IDs return RULE_NOT_FOUND. Historical log reconstruction and its capability are removed. +- Removed compileCard and its capability from AGW. +- Native agent arrays encode one executeAsAgent per action under the selected rule. UEA uses its existing multicall; native EOA uses an atomic-only 7702 path. Missing signer/executor or failed authorization cannot trigger sequential fallback. Ordinary core batching retains its previous fallback behavior. +- Native batch replay recognizes verified UEA or delegated-EOA wrappers, preserves signer origin, and reports the ordered actions in agentic.nativeCalls. An arbitrary forwarding contract is not recognized as a trusted batch sender. + +## Results + +| Check | Result | +| --- | --- | +| Full unit config | 1,917 passed; 12 skipped; 112 suites passed and 1 skipped | +| Local AGW config | 36 passed in 5 suites | +| Library, spec/E2E and local test typechecks | Passed | +| Core build | Passed | +| Core lint | Seven pre-existing errors in unchanged read-example/PC20 files; no new errors | +| AGW manifest | 23 scenarios / 8 files / 23 selected tests | +| Default all manifest | 76 scenarios / 40 files / 81 selected tests, unchanged | + +Logs are retained in this directory. [Evidence metadata](evidence.json) records commands and checksums. Lint's seven-error baseline is recorded as such, not reported as a clean run. + +## Real-contract batch test scope + +The new local suite uses actual e704d5b wallet/factory/engine/policy contracts and real Anvil type-4 transactions signed by public development keys. It verifies the outer sender is the agent account, two calls consume two call counts, and a mined later-call failure rolls back both target state and counters. + +The ERC-7821-shaped executor is a small test-only self-call/CALL dispatcher, not a bytecode verification of the deployed OpenZeppelin executor. Existing gateway/fee fixtures remain stubbed. There is no Cosmos, UEA relay, TSS or destination chain in this harness. UEA shaping/replay is unit-tested and reuses the existing transport; live UEA acceptance is still required. + +Two opt-in live cases were added for atomic native success and rollback. They use the existing verified deployment gate and have not been executed. SVM destinations, final multi-asset artifacts, deployment, H3 defaults and public raw-offset type approval remain outstanding. + +## Reproduction + +From the SDK root, run the core Jest config with --runInBand, both standard tsc --noEmit configs and tsconfig.agw-local.json, then core:build/core:lint through Nx. For local contracts, run scripts/agw-local/prepare.sh and set AGW_LOCAL_DIR to its output before running jest.agw-local.config.ts. From packages/core, use e2e:verify --group agw and --group all; these inspect scenario selection without broadcasting. diff --git a/plan/agw/research/product-alignment-2026-10-04/build.log b/plan/agw/research/product-alignment-2026-10-04/build.log new file mode 100644 index 00000000..b07bc2a3 --- /dev/null +++ b/plan/agw/research/product-alignment-2026-10-04/build.log @@ -0,0 +1,13 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:40634) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core + + diff --git a/plan/agw/research/product-alignment-2026-10-04/e2e-agw.log b/plan/agw/research/product-alignment-2026-10-04/e2e-agw.log new file mode 100644 index 00000000..faefb9d3 --- /dev/null +++ b/plan/agw/research/product-alignment-2026-10-04/e2e-agw.log @@ -0,0 +1,26 @@ +✓ agw-create-bare 1 test +✓ agw-create-rules 1 test +✓ agw-funding-pc 1 test +✓ agw-funding-allowance 1 test +✓ agw-native-batch 1 test +✓ agw-native-batch-rollback 1 test +✓ agw-native-agent 1 test +✓ agw-native-owner 1 test +✓ agw-native-over-cap 1 test +✓ agw-native-stranger 1 test +✓ agw-native-revoked 1 test +✓ agw-native-expired 1 test +✓ agw-lifecycle-add 1 test +✓ agw-lifecycle-update 1 test +✓ agw-lifecycle-checkpoints 1 test +✓ agw-lifecycle-revoke-all 1 test +✓ agw-universal-outbound 1 test +✓ agw-universal-dest-revert 1 test +✓ agw-identity-evm 1 test +✓ agw-identity-first-use 1 test +✓ agw-identity-solana 1 test +✓ agw-responses-hooks 1 test +✓ agw-responses-replay 1 test + +23 scenarios, 8 spec files, 23 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/research/product-alignment-2026-10-04/e2e-all.log b/plan/agw/research/product-alignment-2026-10-04/e2e-all.log new file mode 100644 index 00000000..dfa5f250 --- /dev/null +++ b/plan/agw/research/product-alignment-2026-10-04/e2e-all.log @@ -0,0 +1,79 @@ +✓ smoke-uea-derive-evm 1 test +✓ smoke-read-track-lookup 1 test +✓ smoke-cea-derive-evm 1 test +✓ smoke-roundtrip-evm 1 test +✓ smoke-roundtrip-svm 1 test +✓ smoke-cea-pda-svm 1 test +✓ smoke-gasfee-reads 2 tests +✓ smoke-gas-sizer 2 tests +✓ smoke-pc20-registry 2 tests +✓ smoke-pc20-resolve 1 test +✓ evm-r1-transfer 1 test +✓ evm-r1-funds-usdt 1 test +✓ evm-r1-funds-native 1 test +✓ evm-r1-value-funds-data 1 test +✓ evm-r1-bridge-multicall 1 test +✓ evm-r1-fresh-value-native 1 test +✓ evm-r2-funds-erc20 1 test +✓ evm-r2-payload 1 test +✓ evm-r2-multicall 1 test +✓ evm-r2-funds-payload 1 test +✓ evm-r2-native-funds 1 test +✓ evm-r2-native-funds-payload 1 test +✓ evm-r3-funds-erc20 1 test +✓ evm-r3-payload 1 test +✓ evm-r3-multicall 1 test +✓ evm-r3-funds-payload 1 test +✓ evm-r3-native-funds 1 test +✓ evm-r3-eoa-native-funds 1 test +✓ svm-r1-transfer 1 test +✓ svm-r1-funds-sol-self 1 test +✓ svm-r1-value-self 1 test +✓ svm-r1-data-contract 1 test +✓ svm-r1-fresh-key-repro 1 test +✓ svm-r2-funds-sol 1 test +✓ svm-r2-funds-spl 1 test +✓ svm-r2-payload-cpi 1 test +✓ svm-r2-sol-cpi 1 test +✓ svm-r3-drain-sol 1 test +✓ svm-r3-drain-spl 1 test +✓ pc20-export-deployed-wrapper 1 test +✓ pc20-export-predicts-wrapper 1 test +✓ pc20-inbound-burn-unlock 1 test +✓ pc20-r3-cea-burn 1 test +✓ pc20-svm-r1-direct-burn 1 test +✓ pc20-svm-r3-cea-ata-burn 1 test +✓ push-send-transaction 1 test +✓ push-value-own-uea 1 test +✓ push-multicall-no-funds 1 test +✓ push-track-r1-sepolia-parity 1 test +✓ push-track-r3-funds-roundtrip 1 test +✓ push-track-source-leg-hashes 2 tests +✓ xc-multi-child-r3 1 test +✓ xc-fresh-wallet-r3 1 test +✓ xc-peth-bridge-back 1 test +✓ xc-cascade-6hop 1 test +✓ read-evm-balance-eoa 1 test +✓ read-canonical-registry 1 test +✓ read-evm-balance-uea 1 test +✓ read-evm-contract-call 1 test +✓ read-evm-callback-reverts 1 test +✓ read-expiry 1 test +✓ read-svm-lamports 1 test +✓ read-web2-json 1 test +✓ read-docs-example 1 test +✓ read-docs-evm-balance 1 test +✓ read-docs-batch 1 test +✓ read-docs-resume 2 tests +✓ read-app-batch-eoa 1 test +✓ read-app-batch-uea 1 test +✓ read-app-batch-recovery 1 test +✓ read-api-token 1 test +✓ read-api-mixed-outcomes 1 test +✓ read-svm-token-auto 1 test +✓ read-svm-idl 1 test +✓ read-evm-any-mutability 1 test +✓ read-svm-raw 1 test + +76 scenarios, 40 spec files, 81 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/research/product-alignment-2026-10-04/evidence.json b/plan/agw/research/product-alignment-2026-10-04/evidence.json new file mode 100644 index 00000000..0be90d2c --- /dev/null +++ b/plan/agw/research/product-alignment-2026-10-04/evidence.json @@ -0,0 +1,43 @@ +{ + "base_commit": "a8527778d1f50728fffc0f096b583da5b8c068dc", + "date": "2026-10-04", + "defaults_unchanged": true, + "live_broadcasts": false, + "commands": [ + { + "command": "node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand", + "result": "1917 passed, 12 skipped" + }, + { + "command": "AGW_LOCAL_DIR= node node_modules/jest/bin/jest.js --config packages/core/jest.agw-local.config.ts --runInBand --forceExit", + "result": "36 passed; local only" + }, + { + "command": "node node_modules/typescript/bin/tsc -p packages/core/tsconfig.spec.json --noEmit (also lib and agw-local configs)", + "result": "passed" + }, + { + "command": "yarn nx run core:build --skip-nx-cache", + "result": "passed" + }, + { + "command": "yarn nx run core:lint --skip-nx-cache", + "result": "7 errors in unchanged files" + }, + { + "command": "cd packages/core; yarn e2e:verify --group agw; yarn e2e:verify --group all", + "result": "23 / 76 scenarios consistent" + } + ], + "sha256": { + "README.md": "8652e06f9a5dd2c2586ea5f7488adc020b82f5acb12f5a5448a1fdf028ece0a6", + "build.log": "93e5781b460036e4a44f98f9e48a141e8c196336ab6ddf563e49a2c09bc9c2cb", + "e2e-agw.log": "55cd2e786526bfeb13acc79e8b94c6fa6baa9b3b52bde105f8034c6638c6c77c", + "e2e-all.log": "3d1649d660267693725f167772c8cfc6b0c51a385e1043d203efe1459798f6ff", + "local.log": "1a68e623f593dccfea0dc7b48a3f4311f77a7fb0d5d18b15c2faee9e1df2baf0", + "types-lib.log": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "types-local.log": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "types-spec.log": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "unit.log": "42d2d759193a3b9f68e69e6b1ef0b1684be8045823832e2809866af01fcc0691" + } +} diff --git a/plan/agw/research/product-alignment-2026-10-04/local.log b/plan/agw/research/product-alignment-2026-10-04/local.log new file mode 100644 index 00000000..43bfa197 --- /dev/null +++ b/plan/agw/research/product-alignment-2026-10-04/local.log @@ -0,0 +1,12 @@ +PASS core-agw-local packages/core/__agw-local__/agw-local-batch.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-races.spec.ts +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts + +Test Suites: 5 passed, 5 total +Tests: 36 passed, 36 total +Snapshots: 0 total +Time: 11.364 s, estimated 12 s +Ran all test suites. +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/product-alignment-2026-10-04/types-lib.log b/plan/agw/research/product-alignment-2026-10-04/types-lib.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/product-alignment-2026-10-04/types-local.log b/plan/agw/research/product-alignment-2026-10-04/types-local.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/product-alignment-2026-10-04/types-spec.log b/plan/agw/research/product-alignment-2026-10-04/types-spec.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/product-alignment-2026-10-04/unit.log b/plan/agw/research/product-alignment-2026-10-04/unit.log new file mode 100644 index 00000000..d11b37f2 --- /dev/null +++ b/plan/agw/research/product-alignment-2026-10-04/unit.log @@ -0,0 +1,165 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts + +Test Suites: 1 skipped, 112 passed, 112 of 113 total +Tests: 12 skipped, 1917 passed, 1929 total +Snapshots: 0 total +Time: 23.357 s, estimated 27 s +Ran all test suites. diff --git a/plan/agw/research/question-source-recheck-2026-10-06/README.md b/plan/agw/research/question-source-recheck-2026-10-06/README.md new file mode 100644 index 00000000..4e5908a6 --- /dev/null +++ b/plan/agw/research/question-source-recheck-2026-10-06/README.md @@ -0,0 +1,59 @@ +# Remaining-question source recheck + +October 6, 2026; the evidence capture timestamp is recorded in [evidence.json](evidence.json). SDK baseline feat/agw-sdk-v4@9e9d8424. This review verifies whether our team-question drafts ask for information already supplied. It changes planning documents only; no production code, contract checkout, remote document or team message is changed. + +## Result + +The technical definitions are supplied. Four existing decision areas remain: native PC defaults/token intent, raw-offset public representation, multiple-rule send selection and ref/label release scope. The public Solana representation also needs joint SDK/product/contract review and is now explicit as H4.4. The representative SVM fixture request is optional supporting evidence, not a hard external blocker. + +The defaults and decoded-rule implementation remain provisional; this review does not approve them or silently change runtime behavior. The SDK team can prepare a concrete public Solana proposal and perform wire-level live validation while these decisions are pending. + +## Sources checked and freshness + +| Source | Inspection | +| --- | --- | +| All 12 registered Notion snapshots | Searched relevant defaults, rule selection, metadata, offsets and SVM sections. Stable inventory/hashes remain in [source-manifest](../../source-manifest.json). Marketplace/job/evaluator designs do not select standalone send rules or supply the missing public SVM input. | +| Live Notion page 5 | Opened through connected Chrome; reviewed current rules/types, agent selection, label scope and All discussions, including resolved/deleted-context threads. Native maxValueTotal remains optional; inputs remain arg-based and AllowedCall EVM-shaped. No new substantive answer beyond the recorded October 5 comments was visible. Header displayed Edited 23h ago; this is a UI observation, not a body-diff result. | +| Live Notion page 1 | Reviewed current metadata/SVM proposals and All discussions. Header displayed Edited Oct 2. Editable labels remain proposed; no release inclusion/deferral answer was visible. | +| Harsh's supplied replies | Re-read the [recorded product decisions](../../product-decisions-2026-10-04.md), preserving clear scope decisions and the tentative/default-revision wording. No Slack search or new Slack messages were accessed. | +| AGW public remote | Fetched all eight current branch heads from the explicit public repository into isolated local refs; [fetch evidence](evidence.json). deploy-agw=10a24f1 and pushAgenticWallet_v3=e8db748 are unchanged. Other heads are historical and do not supersede the delivered generation. No refs in the contract checkout were changed. | +| Current AGW docs/source/ABI | Re-read owner guide §§3–4, 9–10; design/policy docs; wallet interface/implementation; SVM tests; saved verified ABIs. deploy-agw src is identical to the reported deployment source. This pass did not re-probe live wiring or assert bytecode freshness. | +| SDK implementation/evidence | Public types, defaults, native encoder/decoder, rule selector, SVM capability gate, internal backend and actual-contract evidence. Existing local tests prove contract enforcement with a fixture gateway, not live Solana settlement. | +| Sibling core/gateway documents | Searched 11 core and 24 gateway docs in the existing checkouts for direct NativeRule/default/metadata/SVM public-schema/selection definitions. No direct answer to these product questions. These repositories were not freshly fetched; prior baseline pins remain authoritative only for earlier inspections. | + +This was not a full Notion export or a fresh inspection of every live Notion page. The last full export remains October 3; only pages 1 and 5 and their discussions were freshly inspected. No claim that all twelve live bodies are unchanged. + +## Question-by-question disposition + +| Item | What the sources already answer | What still needs agreement | Draft change | +| --- | --- | --- | --- | +| H3 limits | Owner guide §§4.3/4.5 defines uint256 maximum/zero, retains NativeTerms.maxValueTotal, maxCalls=0 unlimited, and destination maxValue=0 non-payable. Live NativeRule still retains maxValueTotal. Universal omitted total is supplied. | Exact omitted native PC limits; Harsh's reference to a changed field/default has no matching revised specification. | Removed the separate retained-field and wire-sentinel questions; asks about the two PC omission rows, preserving maxValueTotal unless an explicit revision is supplied. Other defaults are shown as SDK conventions, not newly confirmed product decisions. | +| H3 token intent | Owner guide §4.3: caps per token, each listed asset usable with every allowed call. Target page still contains assets[]. | Whether the token-independence comment requests a public-model change. | Keep one clarification; do not infer permission to remove token enforcement. | +| H4.5 offsets | Wire structs store offsets without ABI signatures. Historical SDK already used raw offsets; current public target uses arg indexes. Raw decoded values are necessary for lossless representation. | Whether raw-offset authoring is public, or decoded records are distinct from ABI-based authoring inputs. | Correct the implication that raw offsets are an invented contract feature; retain the current public API choice. | +| H6 multiplicity | Owner guide §9 explicitly allows several same-agent/same-chain rules; Harsh's comment accepts multiplicity. | Selection under overlapping rules/arrays. Current target lookup assumes uniqueness; no source defines a replacement algorithm. | Keep selection only; do not re-ask capacity or silently pick the first match. | +| Z1.3 metadata | Page 1 already proposes grant ref and setLabel/LabelSet, with labels excluded from checkpoints. Delivered IAGW has grantRules(Session) and a four-field RulesGranted event, without job ref or setLabel. | Include these in this release or defer with product. | Ask release scope and confirm the existing proposal if included; remove the broad request to redesign parameter/event shapes. | +| H4.4 public SVM | Owner guide §4.4 and Types.sol supply SvmTerms, programs, account/data pins, CEA/ATA derivation obligations. Internal SDK backend is complete. | Public authoring and decoded-record representation: current AllowedCall cannot express those constraints. | Add an explicit joint review item; this is SDK design agreement, not missing contract structs. | +| Z1.4 fixture | SDK chain constants contain a devnet gateway; a counter IDL exists. Contract SVM tests deliberately use synthetic keys. | Live program/IDL/configuration compatibility must be checked. | Mark fixture optional. Read-only preflight and a bounded internal wire test are SDK-owned work; a fixture is useful independent evidence. | + +## Exact evidence pointers + +Paths below are relative to the SDK repository; contract line numbers refer to the saved deploy-agw source whose relevant files match the freshly fetched head. + +- Public target: plan/agw/notion/5-sdk-agw.md:484 (unique lookup), :582 (NativeRule), :610 (EVM AllowedCall), :633 (setLabel proposal). The live page still shows those relevant declarations. +- Historical raw inputs: plan/agw/notion/legacy-agw-sdk-v1.md:205 and :206. They describe an older, different public API; they do not authorize the current extension by themselves. +- Owner guide: plan/agw/research/deployment-review-2026-10-06/source/docs/5_SDK_Owner_Integration.md:142, :167, :176, :179, :212, :422, :433. +- Delivered metadata: same bundle src/interfaces/IAGW.sol:57 and :107; src/AGW.sol:483 and :636. Grant checkpoint ref names the rulesId, not an application job reference. +- SVM wire responsibilities: same bundle src/libraries/Types.sol:486–525. Remote test/unit/9_svmRulebook.t.sol at 10a24f1:72 explicitly describes synthetic Solana keys; the fixture has hash-generated CEA/ATA/program values. +- Runtime defaults: packages/core/src/lib/agentic/codec/defaults.ts:21–56; native PC omission is still 0, with provisional markers. +- Raw inputs/outputs: packages/core/src/lib/agentic/agentic.types.ts:43–71; codec/native.ts:147 and :255. Arbitrary raw authoring and ABI-generated pins have different validation boundaries; H1's UI approval direction does not answer this API question. +- Rule selection: packages/core/src/lib/agentic/reads/rules.ts:131–169; public SVM read gate :179–183. +- Existing SVM candidate config: packages/core/src/lib/constants/chain.ts:399 (devnet gateway CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS); orchestrator/svm-idl/__fixtures__/test_counter.idl.json:2 (program 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx). These are candidate fixture inputs, not new live acceptance proof. +- Completed backend and limits: [nine-item completion report](../sdk-independent-completion-2026-10-06/README.md), qualified by the newer [hardening report](../sdk-hardening-2026-10-06/README.md). + +Primary remote links: [owner guide](https://github.com/pushchain/push-agentic-wallets/blob/10a24f101e2e6e0a9b76517b29f5cdb1aa967796/docs/5_SDK_Owner_Integration.md), [wallet interface](https://github.com/pushchain/push-agentic-wallets/blob/10a24f101e2e6e0a9b76517b29f5cdb1aa967796/src/interfaces/IAGW.sol), [SVM contract test](https://github.com/pushchain/push-agentic-wallets/blob/10a24f101e2e6e0a9b76517b29f5cdb1aa967796/test/unit/9_svmRulebook.t.sol), [live SDK spec](https://app.notion.com/p/pushprotocol/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9), [live contract target](https://app.notion.com/p/pushprotocol/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d). + +## What not to send as questions + +Do not re-open deployment/address delivery, the validator/engine design, checkpoint storage, the universal envelope or multi-asset layouts, EVM CEA width, internal spend accounting, same-agent capacity, revoked history, approval-screening ownership or compileCard. Those are supplied, accepted, implemented or explicitly out of standalone scope. + +creditRevert remains a documented Push-core executor dependency. It is a tracked platform limitation, not another unanswered AGW design question. No live Solana test or refund-credit integration is claimed by this source review. diff --git a/plan/agw/research/question-source-recheck-2026-10-06/evidence.json b/plan/agw/research/question-source-recheck-2026-10-06/evidence.json new file mode 100644 index 00000000..d353a87e --- /dev/null +++ b/plan/agw/research/question-source-recheck-2026-10-06/evidence.json @@ -0,0 +1,125 @@ +{ + "checked_at_utc": "2026-10-06T06:59:51.261182+00:00", + "sdk_baseline": "9e9d842415c87f088df15b13782027ffbfc1e085", + "contract_repository": "https://github.com/pushchain/push-agentic-wallets", + "branch_heads": [ + { + "branch": "demo-v1", + "sha": "94e0ad21f5dcf353bc792b3fbf5ae31f63949483", + "committed_at": "2026-09-18T06:35:12+05:30", + "subject": "deployed contracts" + }, + { + "branch": "demo-v1-backup", + "sha": "b3f53297bb38176b72611e0b58487f20a68f6912", + "committed_at": "2026-09-08T08:42:10+05:30", + "subject": "demo-cross-chain-workflow" + }, + { + "branch": "deploy-agw", + "sha": "10a24f101e2e6e0a9b76517b29f5cdb1aa967796", + "committed_at": "2026-10-05T19:29:43+05:30", + "subject": "sdk-doc" + }, + { + "branch": "main", + "sha": "9ddd95402b9a2dbf494f6ebfdb477e9a0fb1408a", + "committed_at": "2026-09-04T10:23:32+05:30", + "subject": "Merge pull request #3 from pushchain/pushAgenticWallet_v3" + }, + { + "branch": "pushAgenticWallet_v1", + "sha": "7dc20e4f3087810be107294350c97e723cb64e8d", + "committed_at": "2026-08-07T12:59:33+05:30", + "subject": "Merge pull request #1 from pushchain/v0-review-fixes" + }, + { + "branch": "pushAgenticWallet_v2", + "sha": "83d568cc484b28f86113a5dd954d06a7ac540232", + "committed_at": "2026-08-07T18:54:06+05:30", + "subject": "docs and claude.md" + }, + { + "branch": "pushAgenticWallet_v3", + "sha": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "committed_at": "2026-10-05T18:38:15+05:30", + "subject": "Merge pull request #16 from pushchain/multi-asset-grantRule" + }, + { + "branch": "urp-fixes", + "sha": "eb5961721017475042d5199687cb46f4733fe3a8", + "committed_at": "2026-09-14T11:34:20+05:30", + "subject": "added docs" + } + ], + "deployed_source": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "documentation_source": "10a24f101e2e6e0a9b76517b29f5cdb1aa967796", + "src_identical": true, + "verified_files": [ + { + "path": "docs/5_SDK_Owner_Integration.md", + "sha256": "a77c3cdc4dbbb791ed1c9df6bdaa9e01b85f221fb7173bfa7e73f89f9eeb4175", + "matches_saved_snapshot": true + }, + { + "path": "docs/addresses/donut.md", + "sha256": "aaab188fbc2bf52afc4aaf2f99ec02c99a34dd5ba006e1f55f7c922f85c6ad3c", + "matches_saved_snapshot": true + }, + { + "path": "docs/1_AGW.md", + "sha256": "6b111652c2ce78b3e227b0838fc3ed2f32b6f0f7eb10146f2352730e327abe45", + "matches_saved_snapshot": true + }, + { + "path": "docs/2_UniversalRulesPolicy.md", + "sha256": "3a5d943dda72396b46d38ef72ea6b7c456368bfd8fee11334675457d4dc42b1b", + "matches_saved_snapshot": true + }, + { + "path": "src/interfaces/IAGW.sol", + "sha256": "72ba3f081c5ad454fdee29aa313216f47d3a1759afccde0ad2360e3af03cf1bb", + "matches_saved_snapshot": true + }, + { + "path": "src/AGW.sol", + "sha256": "9d3fa4c96e7ed0fa74e155aa11c96ffaa0d80fe9a45683ba433a8ba49d30e821", + "matches_saved_snapshot": true + }, + { + "path": "src/libraries/Types.sol", + "sha256": "37ff942bd22e03e3868282381a030423773f16988f4463433e8068cf04ccb552", + "matches_saved_snapshot": true + } + ], + "notion": { + "full_export_refreshed": false, + "last_full_export": "2026-10-03T07:53:10.278902+00:00", + "saved_pages_reviewed": [ + "notion/overview.md", + "notion/1-agw-contract-changes.md", + "notion/2-universal-marketplace.md", + "notion/3-8183-job-kernel-and-hook.md", + "notion/4-universal-evaluation.md", + "notion/5-sdk-agw.md", + "notion/6-sdk-universal-marketplace.md", + "notion/7-sdk-8183-job.md", + "notion/8-sdk-universal-evaluation.md", + "notion/legacy-agw-sdk-v1.md", + "notion/agw-address-book-donut-2026-09-04.md", + "notion/agentic-wallet-flow-2026-09-07.md" + ], + "live_pages_inspected": [ + "3e9188aea7f481cf8e8de324956549b9", + "3e9188aea7f4813aa31fc95ceb4e684d" + ], + "discussion_scope": "All discussions including resolved threads; no new substantive replies visible" + }, + "limits": { + "new_live_probe": false, + "funded_transactions": false, + "tests_rerun": false, + "sibling_repositories_fetched": false, + "production_code_changed": false + } +} diff --git a/plan/agw/research/release-lockfile-2026-10-15/README.md b/plan/agw/research/release-lockfile-2026-10-15/README.md new file mode 100644 index 00000000..55418a42 --- /dev/null +++ b/plan/agw/research/release-lockfile-2026-10-15/README.md @@ -0,0 +1,20 @@ +# Publish dependency-install correction — October 15, 2026 + +Failed job: https://github.com/pushchain/push-chain-sdk/actions/runs/38673825795/job/116222785501, at feat/agw-sdk-v5@574a4002. + +The install failed with YN0028. Release commit 6eafa004 changed core 6.0.26 to 6.0.27-alpha.0 without refreshing yarn.lock. UI kit's ^6.0.26 no longer matches the local prerelease. Yarn needs a separate npm 6.0.26 resolution alongside the workspace entry; immutable installation correctly rejected the stale combined entry. + +## Changes + +- Regenerated v5 yarn.lock using pinned Yarn 4.2.2, install --mode=update-lockfile. Exactly one entry split; existing workspace/package versions preserved. +- Both release scripts now deliberately refresh the lockfile after version bumps, before building/publishing, and stage yarn.lock in their release commit. +- The workflow's initial immutable check stays enabled. No workflow dispatch or real package publication was performed. +- V4 stays on core 6.0.26, so its existing lockfile remains correct. The lockfiles intentionally differ between branches, just like the existing release version/changelog. + +## Validation + +- Bash syntax checks passed for both scripts. +- A copy of v5's root and workspace manifests, lockfile and Yarn configuration passed install --immutable --mode=skip-build in a temporary node-modules workspace. Lifecycle scripts were disabled and no existing workspace node_modules was changed. Local Node 20.19.2/Yarn 4.2.2; CI uses Node 24.18.0/Yarn 4.2.2. +- An isolated miniature workspace reproduced YN0028 with the original automated release script on stable-to-alpha transition. +- The corrected automated script passed stable-to-alpha and alpha-to-alpha transitions. The fixture used real Yarn/semver and verified immutable consistency at the simulated publish boundary and yarn.lock staging. npm publish and every git operation were intercepted; no real package, tag or push was produced by the test. +- The scripts' real publish commands were not executed. The user will trigger the action. diff --git a/plan/agw/research/release-lockfile-2026-10-15/immutable-install.log b/plan/agw/research/release-lockfile-2026-10-15/immutable-install.log new file mode 100644 index 00000000..709b14bb --- /dev/null +++ b/plan/agw/research/release-lockfile-2026-10-15/immutable-install.log @@ -0,0 +1,23 @@ +➤ YN0000: · Yarn 4.2.2 +➤ YN0000: ┌ Project validation +➤ YN0057: │ @pushprotocol/common-components: Resolutions field will be ignored +➤ YN0057: │ @pushchain/ui-kit: Resolutions field will be ignored +➤ YN0000: └ Completed +➤ YN0000: ┌ Resolution step +➤ YN0000: └ Completed +➤ YN0000: ┌ Post-resolution validation +➤ YN0002: │ @pushchain/core@workspace:packages/core doesn't provide @types/node (p360d1), requested by ts-node. +➤ YN0002: │ @pushchain/core@workspace:packages/core doesn't provide typescript (p97602), requested by ts-node. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide eslint (p05da2), requested by typescript-eslint. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide eslint (p7d515), requested by eslint-plugin-react-refresh. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide eslint (pafac7), requested by eslint-plugin-react-hooks. +➤ YN0002: │ @pushchain/ui-kit@workspace:packages/ui-kit doesn't provide typescript (pc5a0d), requested by typescript-eslint. +➤ YN0002: │ @pushprotocol/common-components@workspace:packages/shared-components doesn't provide react-is (p3a3ff), requested by styled-components. +➤ YN0086: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code. +➤ YN0000: └ Completed +➤ YN0000: ┌ Fetch step +➤ YN0013: │ A package was added to the project (+ 605.19 KiB). +➤ YN0000: └ Completed in 0s 201ms +➤ YN0000: ┌ Link step +➤ YN0000: └ Completed in 9s 392ms +➤ YN0000: · Done with warnings in 9s 857ms diff --git a/plan/agw/research/release-lockfile-2026-10-15/release-regression.log b/plan/agw/research/release-lockfile-2026-10-15/release-regression.log new file mode 100644 index 00000000..855b07dd --- /dev/null +++ b/plan/agw/research/release-lockfile-2026-10-15/release-regression.log @@ -0,0 +1,5 @@ +Original script: reproduced YN0028 after stable-to-alpha bump +Fixed script: 7.0.1-alpha.0 immutable install passed; lock included in release commit +Fixed script: 7.0.1-alpha.1 immutable install passed; lock included in release commit +No publish/tag/push occurred: npm and git were intercepted in isolated fixtures +Fixture logs: /var/folders/4_/d47r2_4s1wb3x2dvmt2ghp800000gp/T/release-lock-regression-9io04tzg diff --git a/plan/agw/research/sdk-alignment-fixes-2026-10-07/README.md b/plan/agw/research/sdk-alignment-fixes-2026-10-07/README.md new file mode 100644 index 00000000..29161d8d --- /dev/null +++ b/plan/agw/research/sdk-alignment-fixes-2026-10-07/README.md @@ -0,0 +1,48 @@ +# SDK alignment fixes — G27/G28 + +Both findings from the [source refresh](../source-refresh-2026-10-07/README.md) are implemented. No contract changes or new team questions are required. `setLabel` remains gated on its verified ABI/deployment. + +## Behavior + +**G27:** production Solana sends resolve and encode the request without evaluating granted expiry, amounts, account pins, data pins or program allow-lists locally. The contract/simulation enforces the chosen rule. Refusals flow through `wrapSendError` to `AgenticRevertError` with `decodedError`. EVM local PC-cap and asset-membership rejection was also removed; actual contract failures use the mapper there too. + +SDK shape, context, asset-chain, wallet/signer balance and gateway-allowance guards remain. These are `AgenticError`s and do not pretend to be contract reverts. The strict pure SVM validators remain internal diagnostic tools; production sends do not use them to decide permissions. + +**G28:** the owner door can send native SOL or SPL funds without an IDL/instruction. Requests have the specified 32-byte recipient, a positive amount and empty payload. The agent door still requires an encoded instruction. Neither door changes allowances automatically. + +Send/wait/replay preserve wallet identity. Funds-only metadata adds `agentic.destinationTransfer = {recipient, token, amount}`; token is the burned Push PRC20. Native SOL transfers show the amount in `value`, SPL transfers show zero native value. Instruction metadata is absent for funds-only sends. A historical metadata-read failure retains the actual gateway summary and outbound polling rather than inventing transfer details. + +Solana fee quoting now reuses core's finalization/rent budget with the AGW as execution identity and the actual source SPL mint. This covers conditional token-account rent without accidentally quoting the signer's CEA. + +## Validation + +| Check | Result | +| --- | --- | +| Full units | 2,003 passed, 0 failed; 12 existing skips | +| Actual contract harness | 85 passed, 0 failed; 11 suites | +| Public Solana live suite | Six scenarios have passing selected-run coverage | +| Owner funds-only SOL delivery | Passed: recipient balance increase, wallet debit, successful external receipt, wait/replay identity and amount | +| Contract refusal mapping | Passed live: account/data gates decoded as AgenticRevertError; balances, spend counters, checkpoints and nonce unchanged | +| Owner SPL funds-only | Passed locally: actual wallet/gateway pull+burn, quote mint/wallet context and zero native display value; no new live SPL transfer claimed | +| Build and types | Core build; lib/spec/local-contract/AGW-E2E typechecks pass | +| Package/API/docs | Packed imports, declarations, compiled API comparison and nine guide TypeScript blocks pass | +| Lint | Zero errors in changed TypeScript files; test-fixture non-null assertion warnings retained | +| Manifest | AGW: 48 scenarios/12 files/48 tests; default all remains 76/40/81 | + +The first full six-case live run passed five cases, including funds-only delivery, and failed the refusal case with a non-policy SDK AgenticError while using an omitted/default gasLimit instead of the successful request’s gasLimit=0. Matching the quote parameters isolated the intended policy gate. The original assertion output did not record the SDK error code, so no more specific cause is claimed. The targeted retry passed with exact error-type/decoded-gate and state invariants. This is selected-run coverage, not a claimed single six-pass invocation. [Logs](logs/), [public evidence](live-evidence.json). + +One intermediate full unit run hit the existing wall-clock timeout assertion (5,101ms against a 1,500ms limit). Its focused recheck and the final full run passed; no code in that timeout path was changed. Both logs are retained. + +The actual-contract harness proves data-limit, PC-cap and expiry refusals using the real AGW/engine/URP. Its gateway/core/token are fixtures and do not prove relay/destination execution. Live SOL transfer checks independently prove the real destination result. Internal wire refusal E2Es were updated to assert mapped simulation errors; the historical three-case wire group was not rerun funded during this follow-up. + +The live scenarios used previously authorized bounded Donut/devnet funds. Unit and local-contract runs were unfunded. No mainnet action, deployment, publication or team message was sent. Environment secrets are absent from the evidence. + +## Reproduction + +```sh +node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand +AGW_LOCAL_DIR=/path/to/isolated-v4-build node node_modules/jest/bin/jest.js --config packages/core/jest.agw-local.config.ts --runInBand +node node_modules/ts-node/dist/bin.js --transpile-only packages/core/__e2e__/ci/run.ts --verify --group agw +``` + +Use the established verified manifest and preflight before a funded E2E rerun; the `agw` group remains opt-in. The SDK consumer guide contains the public SOL/SPL transfer examples and supported-layout limits. diff --git a/plan/agw/research/sdk-alignment-fixes-2026-10-07/live-evidence.json b/plan/agw/research/sdk-alignment-fixes-2026-10-07/live-evidence.json new file mode 100644 index 00000000..6dc255d2 --- /dev/null +++ b/plan/agw/research/sdk-alignment-fixes-2026-10-07/live-evidence.json @@ -0,0 +1,38 @@ +[ + { + "name": "public-svm-owner-transfer-submitted", + "at": "2026-10-07T11:06:05.551Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x5cB3010690333eeb45e58E15642Ba9B729A8d5dF", + "hash": "0xa0075b4de284986f8fbd52fd971caccd36472e8753a81c5427485aa34a69e8a4" + }, + { + "name": "public-svm-owner-transfer-delivered", + "at": "2026-10-07T11:07:17.900Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x5cB3010690333eeb45e58E15642Ba9B729A8d5dF", + "hash": "0xa0075b4de284986f8fbd52fd971caccd36472e8753a81c5427485aa34a69e8a4", + "destinationHash": "5ZbGd54mA92QzFGvFzBQsMQSW6CTxXamygfjcXUmojUgeLf37oD2G4DX8xxrGdr8zjdYnUFA81YSeV41v6h7Tvwm", + "recipient": "3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb", + "amount": "10000" + }, + { + "name": "public-svm-contract-refusals", + "at": "2026-10-07T11:15:29.566Z", + "network": "TESTNET_DONUT", + "sourceCommit": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "wallet": "0x698f72F39B62C3eb7132B2fC09fe4F075231f48f", + "id": "0x3cd5a73a0e021dd2e63e004169565050e92400e8ccf0e7f78c5e98fc9b9d8e82", + "agentNonce": 0, + "state": { + "tokens": "20000", + "pcBalance": "41000000000000000000", + "checkpoints": "2", + "spent": [ + "0" + ] + } + } +] diff --git a/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/build.log b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/build.log new file mode 100644 index 00000000..25bafda6 --- /dev/null +++ b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/build.log @@ -0,0 +1,11 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:54370) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core diff --git a/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/lint.log b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/lint.log new file mode 100644 index 00000000..34b187df --- /dev/null +++ b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/lint.log @@ -0,0 +1,43 @@ + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/svm-public.spec.ts + 78:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 117:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 159:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 160:11 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 161:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 184:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 213:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 247:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 248:11 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 249:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 277:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 278:11 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 279:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 302:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 395:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 448:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 462:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 474:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 504:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw-svm-wire/outbound.spec.ts + 114:38 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 126:56 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 127:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 127:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 128:28 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 129:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 129:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 133:30 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 146:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 170:50 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 170:50 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/svm-public.spec.ts + 138:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 139:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 224:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 297:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 297:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +✖ 35 problems (0 errors, 35 warnings) diff --git a/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/live-contract-refusals-final.log b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/live-contract-refusals-final.log new file mode 100644 index 00000000..9b178165 --- /dev/null +++ b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/live-contract-refusals-final.log @@ -0,0 +1,15 @@ +PASS core-e2e __e2e__/agw/svm-public.spec.ts (120.743 s) + agw public svm + ✓ 3. contract simulation maps account and data refusals without state changes (22204 ms) + ○ skipped 1. named IDL grant reads exact constraints and replaces atomically + ○ skipped 2. public send confirms actual CEA transfer and preserves replay identity + ○ skipped 4. public revoke removes the Solana rule and subsequent sends are refused + ○ skipped 5. owner funds-only transfer reaches the recipient and replays with the same amount + ○ skipped 6. agents still require an instruction and owner allowance failures do not sign + +Test Suites: 1 passed, 1 total +Tests: 5 skipped, 1 passed, 6 total +Snapshots: 0 total +Time: 120.764 s +Ran all test suites within paths "__e2e__/agw/svm-public.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/live-error-types-recheck.log b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/live-error-types-recheck.log new file mode 100644 index 00000000..6521f568 --- /dev/null +++ b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/live-error-types-recheck.log @@ -0,0 +1,15 @@ +PASS core-e2e __e2e__/agw/svm-public.spec.ts (117.578 s) + agw public svm + ✓ 3. contract simulation maps account and data refusals without state changes (33789 ms) + ○ skipped 1. named IDL grant reads exact constraints and replaces atomically + ○ skipped 2. public send confirms actual CEA transfer and preserves replay identity + ○ skipped 4. public revoke removes the Solana rule and subsequent sends are refused + ○ skipped 5. owner funds-only transfer reaches the recipient and replays with the same amount + ○ skipped 6. agents still require an instruction and owner allowance failures do not sign + +Test Suites: 1 passed, 1 total +Tests: 5 skipped, 1 passed, 6 total +Snapshots: 0 total +Time: 117.603 s, estimated 366 s +Ran all test suites within paths "__e2e__/agw/svm-public.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/live-initial.log b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/live-initial.log new file mode 100644 index 00000000..63c493c6 --- /dev/null +++ b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/live-initial.log @@ -0,0 +1,41 @@ +FAIL core-e2e __e2e__/agw/svm-public.spec.ts (365.387 s) + agw public svm + ✓ 1. named IDL grant reads exact constraints and replaces atomically (94872 ms) + ✓ 2. public send confirms actual CEA transfer and preserves replay identity (85612 ms) + ✕ 3. contract simulation maps account and data refusals without state changes (8726 ms) + ✓ 4. public revoke removes the Solana rule and subsequent sends are refused (9615 ms) + ✓ 5. owner funds-only transfer reaches the recipient and replays with the same amount (87056 ms) + ✓ 6. agents still require an instruction and owner allowance failures do not sign (14818 ms) + + ● agw public svm › 3. contract simulation maps account and data refusals without state changes + + expect(received).rejects.toMatchObject(expected) + + - Expected - 4 + + Received + 1 + + Object { + - "decodedError": Object { + - "name": "PolicyCheckReverted(SvmAccountPinMismatch)", + - }, + - "name": "AgenticRevertError", + + "name": "AgenticError", + } + + 266 | to: { chain: SVM_WIRE_CHAIN, address: SVM_WIRE_PROGRAM }, + 267 | data: data(BigInt(1), wrong), + > 268 | }) + | ^ + 269 | ).rejects.toMatchObject({ + 270 | name: 'AgenticRevertError', + 271 | decodedError: { name: 'PolicyCheckReverted(SvmAccountPinMismatch)' }, + + at Object.toMatchObject (../../node_modules/expect/build/index.js:218:22) + at Object. (__e2e__/agw/svm-public.spec.ts:268:15) + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 5 passed, 6 total +Snapshots: 0 total +Time: 365.408 s +Ran all test suites within paths "__e2e__/agw/svm-public.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/local-contracts.log b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/local-contracts.log new file mode 100644 index 00000000..635e8dd4 --- /dev/null +++ b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/local-contracts.log @@ -0,0 +1,29 @@ +PASS core-agw-local packages/core/__agw-local__/svm-public.spec.ts (8.425 s) +PASS core-agw-local packages/core/__agw-local__/svm-backend.spec.ts (8.839 s) +PASS core-agw-local packages/core/__agw-local__/v4-multiasset.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts (5.947 s) +PASS core-agw-local packages/core/__agw-local__/svm-differential.spec.ts + ● Console + + console.log + {"corpus":"svm-grant","seed":23063,"cases":107,"accepted":38,"rejected":69,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:226:13) + + console.log + {"corpus":"svm-payload","seed":23063,"cases":88,"accepted":6,"rejected":82,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:407:13) + +PASS core-agw-local packages/core/__agw-local__/agw-local-races.spec.ts +PASS core-agw-local packages/core/__agw-local__/delayed-index.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-internals.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-batch.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts + +Test Suites: 11 passed, 11 total +Tests: 85 passed, 85 total +Snapshots: 0 total +Time: 40.453 s +Ran all test suites. diff --git a/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/unit-timeout-recheck.log b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/unit-timeout-recheck.log new file mode 100644 index 00000000..cf80019e --- /dev/null +++ b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/unit-timeout-recheck.log @@ -0,0 +1,10 @@ +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts + waitForOutboundTx initial-wait clamp + ✓ throws OutboundTimeoutError within the clamped budget (100ms) (102 ms) + ✓ throws with elapsedMs matching the override (not the default) (201 ms) + +Test Suites: 1 passed, 1 total +Tests: 2 passed, 2 total +Snapshots: 0 total +Time: 2.606 s, estimated 6 s +Ran all test suites within paths "packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts". diff --git a/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/unit-timing-assertion-initial.log b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/unit-timing-assertion-initial.log new file mode 100644 index 00000000..4e5dfd65 --- /dev/null +++ b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/unit-timing-assertion-initial.log @@ -0,0 +1,209 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +FAIL core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts (5.455 s) + ● waitForOutboundTx initial-wait clamp › throws OutboundTimeoutError within the clamped budget (100ms) + + expect(received).toBeLessThan(expected) + + Expected: < 1500 + Received: 5101 + + 51 | // Allow generous slack for jest scheduler jitter — the point is that + 52 | // elapsed should be FAR less than the default 20s initial wait. + > 53 | expect(elapsed).toBeLessThan(1_500); + | ^ + 54 | }); + 55 | + 56 | it('throws with elapsedMs matching the override (not the default)', async () => { + + at Object. (src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts:53:21) + +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts + +Summary of all failing tests +FAIL src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts (5.455 s) + ● waitForOutboundTx initial-wait clamp › throws OutboundTimeoutError within the clamped budget (100ms) + + expect(received).toBeLessThan(expected) + + Expected: < 1500 + Received: 5101 + + 51 | // Allow generous slack for jest scheduler jitter — the point is that + 52 | // elapsed should be FAR less than the default 20s initial wait. + > 53 | expect(elapsed).toBeLessThan(1_500); + | ^ + 54 | }); + 55 | + 56 | it('throws with elapsedMs matching the override (not the default)', async () => { + + at Object. (src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts:53:21) + + +Test Suites: 1 failed, 1 skipped, 118 passed, 119 of 120 total +Tests: 1 failed, 12 skipped, 2002 passed, 2015 total +Snapshots: 0 total +Time: 44.161 s +Ran all test suites. diff --git a/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/units.log b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/units.log new file mode 100644 index 00000000..86e64c8d --- /dev/null +++ b/plan/agw/research/sdk-alignment-fixes-2026-10-07/logs/units.log @@ -0,0 +1,172 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts (7.392 s) + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts + +Test Suites: 1 skipped, 119 passed, 119 of 120 total +Tests: 12 skipped, 2003 passed, 2015 total +Snapshots: 0 total +Time: 29.984 s, estimated 36 s +Ran all test suites. diff --git a/plan/agw/research/sdk-hardening-2026-10-06/README.md b/plan/agw/research/sdk-hardening-2026-10-06/README.md new file mode 100644 index 00000000..af717f89 --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/README.md @@ -0,0 +1,38 @@ +# Selected SDK hardening — October 6, 2026 + +Shoaib approved items 2, 3, 4 and 5 only. Hosted CI execution and release preparation were excluded and were not performed. This batch changes tests and developer verification scripts, not production SDK API/transaction behavior. + +## Completed items + +| Item | Evidence | +| --- | --- | +| 2 Differential SVM validation | A reproducible seeded corpus (seed 23063) compares SDK validation directly with actual v4 URP initialization and authorization. 107 grant-shape cases (38 accepted/69 rejected), including uint64/uint256 cap boundaries, and 88 payload cases (6 accepted/82 rejected), including truncation/trailing bytes, pin substitution, aliasing, account counts and data floors. Zero accept/reject mismatches. Successful eth_call probes leave token balances unchanged. | +| 3 Races/faults | Five new actual-contract cases cover allowance revocation, token balance withdrawal and rule revocation after preflight, plus RPC failure during reads and receipt loss after a mined grant. Failures are checked by expected code/revert selector, agent nonce, spend counters and checkpoints. Receipt loss preserves the submitted hash and does not retry. Existing replacement/spend/initialization/nonce races remain. | +| 4 Broader API audit | Comparison now covers all root exports and their public declared members, static/instance PushChain members, universal transaction/tracking methods, utility groups, constants and optional/readonly markers. Transparent aliases, barrel forwarding, const-assertion readonly state, property/union ordering and compiler-generated symbol IDs are canonicalized. Source public declarations match built declarations. | +| 5 Runtime matrix | Node 20.19.2 and 24.14.0 pass the full unit run and the unfunded verification command: targeted units, lib/spec/local types, guide, local contracts, build, CJS/ESM consumer imports, built declaration examples, npm dry-run and API comparison. These are local macOS arm64 results, not a hosted Linux CI result. | + +## Results + +Both runtime entries: 1,975 unit passes (12 existing skips, 115 passed suites/1 skipped), 75 actual-contract passes in 10 suites, no open-handle warning or forceExit. Differential cases are probes inside two Jest tests; they are not reported as 195 additional Jest passes. Changed-file lint: 0 errors, 11 conventional non-null assertion warnings in tests. + +[Runtime versions/results](runtime-results.json). Logs are in [node20/](node20/) and [node24/](node24/). The runtime runner takes explicit binary paths and copies per-runtime results before the next run; it dispatches no GitHub jobs, loads no .env keys, funds no live E2Es and publishes nothing. + +## API findings + +[Full comparison](api-comparison.json) against session baseline b1597b9: no added/removed root exports, no initialize signature change, no universal transaction/tracking method changes and no instance-member changes. Root-visible type differences are AGENTIC_ERROR_CODE, its dependent AgenticErrorCode/AgenticError code types, AllowedCall.beneficiaryOffset and AgenticNetworkConstants.ENVELOPE_VERSION. These arose in the earlier v4 migration. Native defaults, raw-offset authoring and rule selection remain externally unresolved. This batch adds no public SDK field/method. + +## Actual live E2E status + +**Actual funded runs have happened.** [The registered scenario matrix](../live-acceptance-2026-10-06/scenario-results.json) records 25 distinct passing AGW scenarios across selected sequential Donut runs, including native/UEA identities, grants/update/revoke/checkpoints, native batching/rollback, allowance, progress/replay and Sepolia call-only/positive-amount success and destination failure. It is not a claim that one complete group invocation passed without any initial failures. + +The positive outbound independently checked wallet PRC20 debit, gateway allowance reduction and burn events, successful Sepolia receipt, CEA balance increase and the CEA-emitted execution event with AGW originCaller and intended target/data. [Previous live evidence](../live-acceptance-2026-10-06/README.md). + +This batch performs a **read-only recheck**, not a new funded run: the Push and Sepolia receipts for both positive-amount and call-only sends remain successful. [Hashes, blocks and results](live-receipt-recheck.json). No new live transaction was submitted. The 75 local cases use actual contracts on Anvil with transport/metadata/destination fixtures; they are separate from live bridge/settlement evidence. No live AGW Solana-destination E2E has run because public mapping/cluster input and enablement are pending. + +## Reproduce + +```sh +AGW_LOCAL_DIR="${TMPDIR:-/tmp}/push-agw-local-v4" node packages/core/scripts/check-agw-runtimes.js --node20 /path/to/node20 --node24 /path/to/node24 +``` + +Outputs default to .agw-runtime-validation/, ignored by Git. No runtime is installed automatically. Hosted CI and release/changelog/PR preparation remain outside this approved batch. diff --git a/plan/agw/research/sdk-hardening-2026-10-06/api-comparison.json b/plan/agw/research/sdk-hardening-2026-10-06/api-comparison.json new file mode 100644 index 00000000..7101c160 --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/api-comparison.json @@ -0,0 +1,11306 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "4d2c4d2891b6f068ad8605feb1fda29fce47a1c3", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [], + "removedExports": [], + "changedAgwTypes": [ + "AgenticError", + "AGENTIC_ERROR_CODE", + "AllowedCall" + ], + "publicTypeChanges": [ + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticErrorCode", + "AgenticNetworkConstants", + "AllowedCall" + ], + "transactionMethodChanges": [], + "instanceMethodChanges": [], + "agwConstantsChanged": true, + "before": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address(token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }): {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "after": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "beneficiaryOffset": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": false, + "readonly": false, + "type": "number" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "beneficiaryOffset": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address: (token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": false, + "readonly": false, + "type": "number" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "scope": "All root exports and declared public members, PushChain static/instance members, universal transaction methods, utility groups, readonly/optional markers and constants. Behavior/default/deployment changes need the written session review." +} diff --git a/plan/agw/research/sdk-hardening-2026-10-06/changed-lint.log b/plan/agw/research/sdk-hardening-2026-10-06/changed-lint.log new file mode 100644 index 00000000..842c60cd --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/changed-lint.log @@ -0,0 +1,17 @@ + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/svm-backend.spec.ts + 142:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 170:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 229:28 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 403:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 427:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 471:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 543:61 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/svm-differential.spec.ts + 74:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 212:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 265:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 384:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +✖ 11 problems (0 errors, 11 warnings) diff --git a/plan/agw/research/sdk-hardening-2026-10-06/live-receipt-recheck.json b/plan/agw/research/sdk-hardening-2026-10-06/live-receipt-recheck.json new file mode 100644 index 00000000..e0fdca95 --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/live-receipt-recheck.json @@ -0,0 +1,31 @@ +{ + "checkedAt": "2026-10-06T05:36:02.227Z", + "readOnly": true, + "transactionsSubmitted": false, + "receipts": [ + { + "name": "positive-push", + "hash": "0x3236bbc8f2029f53a2aa09d0c0d3cd291568bbaccf4de70061ecd085d4adcb3e", + "status": "success", + "block": "23935801" + }, + { + "name": "positive-sepolia", + "hash": "0x1dac9f08f651c30e0c2de11c42c8df8bbcbd12484575b536e4d42f40819989ea", + "status": "success", + "block": "11851537" + }, + { + "name": "call-only-push", + "hash": "0x7fb0792747909149da3c8975aaba43a80224a20544c41ac88c04a3cf899c9926", + "status": "success", + "block": "23935113" + }, + { + "name": "call-only-sepolia", + "hash": "0xadb89cd9cfb70fd33b9eaa2e05b109b0a9a26d3fb9221e8dc28cd8cf8d4f27fe", + "status": "success", + "block": "11851391" + } + ] +} diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node20/build.log b/plan/agw/research/sdk-hardening-2026-10-06/node20/build.log new file mode 100644 index 00000000..b75e1983 --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node20/build.log @@ -0,0 +1,13 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". + + + + NX Successfully ran target build for project core + + +(node:39395) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node20/docs.log b/plan/agw/research/sdk-hardening-2026-10-06/node20/docs.log new file mode 100644 index 00000000..5996134d --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node20/docs.log @@ -0,0 +1 @@ +AGW guide: 7 TypeScript blocks typechecked against public exports; no examples executed. diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node20/full-unit.log b/plan/agw/research/sdk-hardening-2026-10-06/node20/full-unit.log new file mode 100644 index 00000000..da3d0edb --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node20/full-unit.log @@ -0,0 +1,168 @@ +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts + +Test Suites: 1 skipped, 115 passed, 115 of 116 total +Tests: 12 skipped, 1975 passed, 1987 total +Snapshots: 0 total +Time: 26.399 s, estimated 38 s +Ran all test suites. diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node20/local-contracts.log b/plan/agw/research/sdk-hardening-2026-10-06/node20/local-contracts.log new file mode 100644 index 00000000..c66392fd --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node20/local-contracts.log @@ -0,0 +1,28 @@ +PASS core-agw-local packages/core/__agw-local__/svm-backend.spec.ts (10.541 s) +PASS core-agw-local packages/core/__agw-local__/v4-multiasset.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-differential.spec.ts + ● Console + + console.log + {"corpus":"svm-grant","seed":23063,"cases":107,"accepted":38,"rejected":69,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:224:13) + + console.log + {"corpus":"svm-payload","seed":23063,"cases":88,"accepted":6,"rejected":82,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:405:13) + +PASS core-agw-local packages/core/__agw-local__/delayed-index.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-batch.spec.ts +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-internals.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-races.spec.ts + +Test Suites: 10 passed, 10 total +Tests: 75 passed, 75 total +Snapshots: 0 total +Time: 29.867 s, estimated 35 s +Ran all test suites. diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node20/package.log b/plan/agw/research/sdk-hardening-2026-10-06/node20/package.log new file mode 100644 index 00000000..8e1b97e4 --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node20/package.log @@ -0,0 +1 @@ +AGW package: CJS/ESM imports, compiled declaration examples and npm contents pass. No examples executed/published. diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node20/prepare-contracts.log b/plan/agw/research/sdk-hardening-2026-10-06/node20/prepare-contracts.log new file mode 100644 index 00000000..626bb23a --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node20/prepare-contracts.log @@ -0,0 +1 @@ +/var/folders/4_/d47r2_4s1wb3x2dvmt2ghp800000gp/T//push-agw-local-v4 diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node20/public-api.log b/plan/agw/research/sdk-hardening-2026-10-06/node20/public-api.log new file mode 100644 index 00000000..ec908eca --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node20/public-api.log @@ -0,0 +1 @@ +{"compiledMatchesSource":true,"addedExports":[],"removedExports":[],"changedAgwTypes":["AgenticError","AGENTIC_ERROR_CODE","AllowedCall"],"publicTypeChanges":["AGENTIC_ERROR_CODE","AgenticError","AgenticErrorCode","AgenticNetworkConstants","AllowedCall"],"transactionMethodChanges":[],"instanceMethodChanges":[],"initializeSignatureChanged":false,"agwConstantsChanged":true} diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node20/types-agw-local.log b/plan/agw/research/sdk-hardening-2026-10-06/node20/types-agw-local.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node20/types-lib.log b/plan/agw/research/sdk-hardening-2026-10-06/node20/types-lib.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node20/types-spec.log b/plan/agw/research/sdk-hardening-2026-10-06/node20/types-spec.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node20/units.log b/plan/agw/research/sdk-hardening-2026-10-06/node20/units.log new file mode 100644 index 00000000..375cc743 --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node20/units.log @@ -0,0 +1,23 @@ +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts + +Test Suites: 17 passed, 17 total +Tests: 254 passed, 254 total +Snapshots: 0 total +Time: 4.769 s +Ran all test suites matching /agentic|outbound-(confirmation-gate|svm-confirmation)|svm-idl/i. diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node20/verification.log b/plan/agw/research/sdk-hardening-2026-10-06/node20/verification.log new file mode 100644 index 00000000..baec7036 --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node20/verification.log @@ -0,0 +1,11 @@ +AGW validation: units +AGW validation: types-lib +AGW validation: types-spec +AGW validation: types-agw-local +AGW validation: docs +AGW validation: prepare-contracts +AGW validation: local-contracts +AGW validation: build +AGW validation: package +AGW validation: public-api +AGW unfunded validation completed. diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node20/version.log b/plan/agw/research/sdk-hardening-2026-10-06/node20/version.log new file mode 100644 index 00000000..8407009b --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node20/version.log @@ -0,0 +1 @@ +{"version":"v20.19.2","major":20,"platform":"darwin","arch":"arm64"} diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node24/build.log b/plan/agw/research/sdk-hardening-2026-10-06/node24/build.log new file mode 100644 index 00000000..a7ae5c2f --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node24/build.log @@ -0,0 +1,13 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". + + + + NX Successfully ran target build for project core + + +(node:44042) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node24/docs.log b/plan/agw/research/sdk-hardening-2026-10-06/node24/docs.log new file mode 100644 index 00000000..5996134d --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node24/docs.log @@ -0,0 +1 @@ +AGW guide: 7 TypeScript blocks typechecked against public exports; no examples executed. diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node24/full-unit.log b/plan/agw/research/sdk-hardening-2026-10-06/node24/full-unit.log new file mode 100644 index 00000000..951289e2 --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node24/full-unit.log @@ -0,0 +1,168 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts + +Test Suites: 1 skipped, 115 passed, 115 of 116 total +Tests: 12 skipped, 1975 passed, 1987 total +Snapshots: 0 total +Time: 22.365 s, estimated 25 s +Ran all test suites. diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node24/local-contracts.log b/plan/agw/research/sdk-hardening-2026-10-06/node24/local-contracts.log new file mode 100644 index 00000000..94d08296 --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node24/local-contracts.log @@ -0,0 +1,28 @@ +PASS core-agw-local packages/core/__agw-local__/svm-backend.spec.ts (9.619 s) +PASS core-agw-local packages/core/__agw-local__/v4-multiasset.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-differential.spec.ts + ● Console + + console.log + {"corpus":"svm-grant","seed":23063,"cases":107,"accepted":38,"rejected":69,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:224:13) + + console.log + {"corpus":"svm-payload","seed":23063,"cases":88,"accepted":6,"rejected":82,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:405:13) + +PASS core-agw-local packages/core/__agw-local__/agw-local-batch.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-races.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-internals.spec.ts +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts +PASS core-agw-local packages/core/__agw-local__/delayed-index.spec.ts + +Test Suites: 10 passed, 10 total +Tests: 75 passed, 75 total +Snapshots: 0 total +Time: 24.855 s, estimated 30 s +Ran all test suites. diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node24/package.log b/plan/agw/research/sdk-hardening-2026-10-06/node24/package.log new file mode 100644 index 00000000..8e1b97e4 --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node24/package.log @@ -0,0 +1 @@ +AGW package: CJS/ESM imports, compiled declaration examples and npm contents pass. No examples executed/published. diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node24/prepare-contracts.log b/plan/agw/research/sdk-hardening-2026-10-06/node24/prepare-contracts.log new file mode 100644 index 00000000..626bb23a --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node24/prepare-contracts.log @@ -0,0 +1 @@ +/var/folders/4_/d47r2_4s1wb3x2dvmt2ghp800000gp/T//push-agw-local-v4 diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node24/public-api.log b/plan/agw/research/sdk-hardening-2026-10-06/node24/public-api.log new file mode 100644 index 00000000..ec908eca --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node24/public-api.log @@ -0,0 +1 @@ +{"compiledMatchesSource":true,"addedExports":[],"removedExports":[],"changedAgwTypes":["AgenticError","AGENTIC_ERROR_CODE","AllowedCall"],"publicTypeChanges":["AGENTIC_ERROR_CODE","AgenticError","AgenticErrorCode","AgenticNetworkConstants","AllowedCall"],"transactionMethodChanges":[],"instanceMethodChanges":[],"initializeSignatureChanged":false,"agwConstantsChanged":true} diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node24/types-agw-local.log b/plan/agw/research/sdk-hardening-2026-10-06/node24/types-agw-local.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node24/types-lib.log b/plan/agw/research/sdk-hardening-2026-10-06/node24/types-lib.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node24/types-spec.log b/plan/agw/research/sdk-hardening-2026-10-06/node24/types-spec.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node24/units.log b/plan/agw/research/sdk-hardening-2026-10-06/node24/units.log new file mode 100644 index 00000000..62fbe838 --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node24/units.log @@ -0,0 +1,23 @@ +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts + +Test Suites: 17 passed, 17 total +Tests: 254 passed, 254 total +Snapshots: 0 total +Time: 4.22 s +Ran all test suites matching /agentic|outbound-(confirmation-gate|svm-confirmation)|svm-idl/i. diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node24/verification.log b/plan/agw/research/sdk-hardening-2026-10-06/node24/verification.log new file mode 100644 index 00000000..baec7036 --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node24/verification.log @@ -0,0 +1,11 @@ +AGW validation: units +AGW validation: types-lib +AGW validation: types-spec +AGW validation: types-agw-local +AGW validation: docs +AGW validation: prepare-contracts +AGW validation: local-contracts +AGW validation: build +AGW validation: package +AGW validation: public-api +AGW unfunded validation completed. diff --git a/plan/agw/research/sdk-hardening-2026-10-06/node24/version.log b/plan/agw/research/sdk-hardening-2026-10-06/node24/version.log new file mode 100644 index 00000000..8b26aafb --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/node24/version.log @@ -0,0 +1 @@ +{"version":"v24.14.0","major":24,"platform":"darwin","arch":"arm64"} diff --git a/plan/agw/research/sdk-hardening-2026-10-06/runtime-results.json b/plan/agw/research/sdk-hardening-2026-10-06/runtime-results.json new file mode 100644 index 00000000..60c94d59 --- /dev/null +++ b/plan/agw/research/sdk-hardening-2026-10-06/runtime-results.json @@ -0,0 +1,21 @@ +{ + "results": [ + { + "version": "v20.19.2", + "major": 20, + "platform": "darwin", + "arch": "arm64", + "passed": true + }, + { + "version": "v24.14.0", + "major": 24, + "platform": "darwin", + "arch": "arm64", + "passed": true + } + ], + "hostedCi": false, + "published": false, + "fundedE2Es": false +} diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/README.md b/plan/agw/research/sdk-independent-completion-2026-10-06/README.md new file mode 100644 index 00000000..059c29d2 --- /dev/null +++ b/plan/agw/research/sdk-independent-completion-2026-10-06/README.md @@ -0,0 +1,56 @@ +# Nine SDK-owned items — completion report + +October 6, 2026. Branch feat/agw-sdk-v4. This completes the nine approved SDK-owned tasks without selecting H3/H4.5/H6 behavior or enabling public Solana destinations. Contract source remains e8db748; no contract checkout was edited. + +| Item | Completion and files | +| --- | --- | +| 1 Internal SVM reads | reads/svm.ts decodes the verified getter, verifies mode/action/config shape, retains expired enabled rules and returns ordered counters and the pinned block. Actual-contract round-trip/read/revoke coverage passes. | +| 2 Context/asset resolution | management/svm-context.ts and svm-metadata.ts validate PRC20 source chains, native gas-token identity, mint ownership/initialization, configured cluster genesis, and registry/mint substitutions. Every listed/output mint contributes its correctly resolved SPL/Token-2022 ATA. Missing cluster/gateway configuration fails explicitly. | +| 3 Instruction integration | execution/svm-instruction.ts connects the existing IDL resolver with the wallet's configured CEA authority. Explicit wire-account input supports non-Anchor/dataless instructions. The existing payload/pin/alias validator is applied to both. No guessed public authoring form. | +| 4 Internal lifecycle | management/svm.ts verifies wallet generation/version and owner, prepares explicit-wire grants, and performs all-asset assert/revoke/grant in one owner execution. Revoke uses the existing owner path. Receipt events provide actual IDs if another owner grant advances the nonce. Atomic update, five checkpoints, second-asset race rollback and initialization failure rollback pass against real contracts. | +| 5 Prepared execution | execution/svm-send.ts connects verified wallet/rule/signer identity, resolved context, payload, current quote, PC/token/allowance/gas checks and executeAsAgent wrapping. It returns raw signer response plus internal wire context; public SVM display/types are not invented. No automatic approval. | +| 6 Confirmation/tracking | Shared outbound-sync now verifies pending Solana observations through the selected cluster's RPC, supporting base58 and raw 64-byte hex signatures. Only confirmed/finalized outcomes settle; processed/missing/wrong-cluster/RPC-error cases keep polling. Confirmed errors preserve failure/hash. Authoritative Cosmos failure still wins. | +| 7 Automated regression | agw-sdk-validation.yml adds an unfunded PR/manual job with a pinned public contract checkout and Foundry version. agw-verify.js runs focused units, types, guide, prepared contracts, actual local tests, build and package/API checks. Logs capture stdout/stderr. Existing funded workflow stays manual. | +| 8 Harness cleanup | Waits for SDK account-status reads and Anvil exit, with bounded SIGKILL fallback. The warning was traced to viem's scheduled 4-second poll sleeps surviving unwatch, not unclosed contract transactions. Local clients use 25ms polling through real RPC/actions; production defaults stay unchanged. All nine suites exit without warning or forceExit. | +| 9 Package/API checks | check-agw-package.js validates CJS/ESM imports, guide examples against built declarations and npm dry-run contents. check-agw-api.js compares source/declarations and reports session-baseline root exports, AGW types, initialize and constants. These tools report changes rather than approving pending API decisions. | + +All listed code paths are internal except the shared Solana confirmation improvement and developer tooling. Internal files are not exported from the package root; UNIVERSAL_SVM_RULES is still absent from advertised capabilities. + +## Validation + +| Check | Final result | +| --- | --- | +| Full unfiltered unit suite | 1,975 passed, 0 failed; 12 existing skips; 115 suites passed, 1 skipped | +| New focused SVM/confirmation unit cases | 28 passed | +| Actual local contracts | 68 passed, 0 failed; 9 suites; no open-handle warning/forceExit | +| New backend actual-contract cases | 9 passed | +| Library/spec/local typechecks | Pass via unfunded command | +| Guide | 7 blocks typecheck without execution | +| Build, package imports/declarations/contents | Pass | +| Changed-file lint | 0 errors; 49 existing-style non-null/unused warnings across inspected tests/shared files | +| Workflow definition | YAML parses; read-only permissions; no wallet-key secrets; pinned contract source/Foundry | +| Local CI-equivalent command | Completes successfully; GitHub-hosted job has not been run yet | +| Prior live acceptance | 25 distinct registered native/EVM/UEA scenarios passed previously; not repeated or counted as new SVM settlement | + +[Logs](logs/). Local tests use actual factory/wallet/engine/validator/URP; token/core/gateway and metadata/indexer/destination observations are fixtures. They prove SDK preflight, wrapping and contract enforcement, not Solana CPI/TSS settlement. This work did not load .env keys, broadcast funded transactions, deploy live contracts or publish npm. + +The cluster check follows [Solana CAIP-2 genesis-prefix resolution](https://namespaces.chainagnostic.org/solana/caip2). CI uses the official [Foundry toolchain action](https://github.com/foundry-rs/foundry-toolchain) and the pinned [public contract source](https://github.com/pushchain/push-agentic-wallets/tree/e8db74815cfbbf5389593805e464fe8d85f7f735). + +## API impact + +[Automated comparison](api-comparison.json) against b1597b9: no added/removed root exports and no changed initialize signature. The changed root-visible AGW types are AGENTIC_ERROR_CODE (DUPLICATE_RULE → AMBIGUOUS_RULE) and AllowedCall (beneficiaryOffset). Donut agentic constants also changed. Those differences were introduced in the earlier v4 migration, not this backend batch. Native defaults/public raw authoring/multiple-rule selection remain unresolved. + +Behavioral changes in this batch: Solana observations can settle from a confirmed/finalized destination RPC while Cosmos lags; wrong-cluster or processed observations cannot settle. The existing public method/receipt shapes remain. Internal wire requests can be executed by the backend tests, but public AGW Solana sends remain capability-gated. Existing public IDL resolution retains its default authority; only the internal AGW seam supplies the wallet's authority. + +## What still needs external input or later integration + +H3 native defaults/token wording, H4.5 public raw-offset shape, H6 multi-rule selection, ref/label v1 delivery/deferral and live SVM cluster fixtures remain. Once the SVM authoring/read model is agreed, connect it to the completed backend, agree public response presentation, enable the capability and run live Solana destination acceptance. creditRevert still needs the platform executor; nothing here restores spend automatically. + +## Reproduction + +```sh +AGW_LOCAL_DIR="${TMPDIR:-/tmp}/push-agw-local-v4" node packages/core/scripts/agw-verify.js +node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand +``` + +The verification command never invokes funded E2Es or publication. AGW_REPO can point at the read-only pinned contract checkout; an absent local build is prepared in an isolated output directory. diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/api-comparison.json b/plan/agw/research/sdk-independent-completion-2026-10-06/api-comparison.json new file mode 100644 index 00000000..28ed42bd --- /dev/null +++ b/plan/agw/research/sdk-independent-completion-2026-10-06/api-comparison.json @@ -0,0 +1,1360 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "7356346dad53cf8031a0e06732050576a1d05d77", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [], + "removedExports": [], + "changedAgwTypes": [ + "AGENTIC_ERROR_CODE", + "AllowedCall" + ], + "agwConstantsChanged": true, + "before": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/index\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "type": "(label: string, options: import(\"sdk/src/lib/index\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "type": "(opts?: { index?: number; }) => Promise<{ address: import(\"sdk/src/lib/index\").AgenticAddress; index: number; deployed: boolean; }>" + }, + "list": { + "optional": false, + "type": "() => Promise<{ wallets: import(\"sdk/src/lib/index\").WalletSummary[]; }>" + }, + "wallet": { + "optional": false, + "type": "(address: import(\"sdk/src/lib/index\").AgenticAddress) => import(\"sdk/src/lib/index\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/index\").AgenticWallet", + "members": { + "address": { + "optional": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "type": "(opts?: { sinceBlock?: bigint; }) => Promise<{ checkpoints: import(\"sdk/src/lib/index\").Checkpoint[]; }>" + }, + "info": { + "optional": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "type": "() => Promise<{ owner: import(\"sdk/src/lib/index\").AgenticAddress; }>" + }, + "rules": { + "optional": false, + "type": "{ list(): Promise<{ rules: import(\"sdk/src/lib/index\").RulesRecord[]; }>; get(rulesId: import(\"sdk/src/lib/index\").AgenticHex): Promise; add(rules: import(\"sdk/src/lib/index\").Rule[], opts?: { progressHook?: import(\"sdk/src/lib/index\").AgenticProgressHook; }): Promise<{ rulesIds: import(\"sdk/src/lib/index\").AgenticHex[]; tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse; }>; update(params: { rules: { rulesId: import(\"sdk/src/lib/index\").AgenticHex; rule: import(\"sdk/src/lib/index\").Rule; }[]; progressHook?: import(\"sdk/src/lib/index\").AgenticProgressHook; }): Promise<{ rules: { rulesId: import(\"sdk/src/lib/index\").AgenticHex; replaced: import(\"sdk/src/lib/index\").AgenticHex; }[]; tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse; }>; revoke(rulesIds: import(\"sdk/src/lib/index\").AgenticHex[], opts?: { progressHook?: import(\"sdk/src/lib/index\").AgenticProgressHook; }): Promise; revoke(params: { all: true; progressHook?: import(\"sdk/src/lib/index\").AgenticProgressHook; }): Promise; }" + }, + "setLabel": { + "optional": false, + "type": "(label: string, opts?: { progressHook?: import(\"sdk/src/lib/index\").AgenticProgressHook; }) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/index\").AgenticError", + "members": { + "cause": { + "optional": true, + "type": "unknown" + }, + "code": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").AgenticErrorCode" + }, + "details": { + "optional": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "type": "string | undefined" + }, + "message": { + "optional": false, + "type": "string" + }, + "name": { + "optional": false, + "type": "string" + }, + "stack": { + "optional": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/index\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "type": "unknown" + }, + "code": { + "optional": false, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "type": "import(\"sdk/src/lib/index\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "type": "string | undefined" + }, + "message": { + "optional": false, + "type": "string" + }, + "name": { + "optional": false, + "type": "string" + }, + "pendingTransactionHash": { + "optional": true, + "type": "`0x${string}` | undefined" + }, + "stack": { + "optional": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{ readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\"; readonly DUPLICATE_RULE: \"DUPLICATE_RULE\"; readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\"; readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\"; readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\"; readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\"; readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\"; readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\"; readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\"; readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\"; readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\"; readonly INVALID_RULE: \"INVALID_RULE\"; readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\"; readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\"; readonly READ_ONLY: \"READ_ONLY\"; readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\"; readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\"; readonly RULE_READ_FAILED: \"RULE_READ_FAILED\"; readonly INCONSISTENT_READ: \"INCONSISTENT_READ\"; readonly INDEX_RACE: \"INDEX_RACE\"; readonly CREATE_PARTIAL: \"CREATE_PARTIAL\"; readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\"; readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\"; readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\"; readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\"; readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\"; readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\"; }", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/index\").NativeRule", + "members": { + "agent": { + "optional": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").Selector | \"value-only\"" + }, + "target": { + "optional": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/index\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/index\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").Selector" + }, + "target": { + "optional": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/index\").UniversalRule", + "members": { + "agent": { + "optional": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").AllowedCall[]" + }, + "assets": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").ForeignChainNamespace" + }, + "maxGasPerCall": { + "optional": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/index\").RulesRecord", + "members": { + "agent": { + "optional": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "type": "string" + }, + "enabled": { + "optional": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").Rule" + }, + "rulesId": { + "optional": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/index\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "type": "import(\"sdk/src/lib/index\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/index\").CreateResult", + "members": { + "index": { + "optional": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/index\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "type": "readonly { to: import(\"sdk/src/lib/index\").AgenticAddress; data: import(\"sdk/src/lib/index\").AgenticHex; value: bigint; }[] | undefined" + }, + "door": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").AgenticDoor" + }, + "nativeCalls": { + "optional": true, + "type": "readonly { to: import(\"sdk/src/lib/index\").AgenticAddress; data: import(\"sdk/src/lib/index\").AgenticHex; value: bigint; }[] | undefined" + }, + "rawData": { + "optional": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "type": "`0x${string}`" + } + } + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/index\").UniversalSigner | import(\"sdk/src/lib/index\").UniversalAccount, options?: import(\"sdk/src/lib/index\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": true, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "type": "`0x${string}`" + } + } + }, + "after": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/index\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "type": "(label: string, options: import(\"sdk/src/lib/index\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "type": "(opts?: { index?: number; }) => Promise<{ address: import(\"sdk/src/lib/index\").AgenticAddress; index: number; deployed: boolean; }>" + }, + "list": { + "optional": false, + "type": "() => Promise<{ wallets: import(\"sdk/src/lib/index\").WalletSummary[]; }>" + }, + "wallet": { + "optional": false, + "type": "(address: import(\"sdk/src/lib/index\").AgenticAddress) => import(\"sdk/src/lib/index\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/index\").AgenticWallet", + "members": { + "address": { + "optional": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "type": "(opts?: { sinceBlock?: bigint; }) => Promise<{ checkpoints: import(\"sdk/src/lib/index\").Checkpoint[]; }>" + }, + "info": { + "optional": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "type": "() => Promise<{ owner: import(\"sdk/src/lib/index\").AgenticAddress; }>" + }, + "rules": { + "optional": false, + "type": "{ list(): Promise<{ rules: import(\"sdk/src/lib/index\").RulesRecord[]; }>; get(rulesId: import(\"sdk/src/lib/index\").AgenticHex): Promise; add(rules: import(\"sdk/src/lib/index\").Rule[], opts?: { progressHook?: import(\"sdk/src/lib/index\").AgenticProgressHook; }): Promise<{ rulesIds: import(\"sdk/src/lib/index\").AgenticHex[]; tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse; }>; update(params: { rules: { rulesId: import(\"sdk/src/lib/index\").AgenticHex; rule: import(\"sdk/src/lib/index\").Rule; }[]; progressHook?: import(\"sdk/src/lib/index\").AgenticProgressHook; }): Promise<{ rules: { rulesId: import(\"sdk/src/lib/index\").AgenticHex; replaced: import(\"sdk/src/lib/index\").AgenticHex; }[]; tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse; }>; revoke(rulesIds: import(\"sdk/src/lib/index\").AgenticHex[], opts?: { progressHook?: import(\"sdk/src/lib/index\").AgenticProgressHook; }): Promise; revoke(params: { all: true; progressHook?: import(\"sdk/src/lib/index\").AgenticProgressHook; }): Promise; }" + }, + "setLabel": { + "optional": false, + "type": "(label: string, opts?: { progressHook?: import(\"sdk/src/lib/index\").AgenticProgressHook; }) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/index\").AgenticError", + "members": { + "cause": { + "optional": true, + "type": "unknown" + }, + "code": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").AgenticErrorCode" + }, + "details": { + "optional": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "type": "string | undefined" + }, + "message": { + "optional": false, + "type": "string" + }, + "name": { + "optional": false, + "type": "string" + }, + "stack": { + "optional": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/index\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "type": "unknown" + }, + "code": { + "optional": false, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "type": "import(\"sdk/src/lib/index\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "type": "string | undefined" + }, + "message": { + "optional": false, + "type": "string" + }, + "name": { + "optional": false, + "type": "string" + }, + "pendingTransactionHash": { + "optional": true, + "type": "`0x${string}` | undefined" + }, + "stack": { + "optional": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{ readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\"; readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\"; readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\"; readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\"; readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\"; readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\"; readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\"; readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\"; readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\"; readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\"; readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\"; readonly INVALID_RULE: \"INVALID_RULE\"; readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\"; readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\"; readonly READ_ONLY: \"READ_ONLY\"; readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\"; readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\"; readonly RULE_READ_FAILED: \"RULE_READ_FAILED\"; readonly INCONSISTENT_READ: \"INCONSISTENT_READ\"; readonly INDEX_RACE: \"INDEX_RACE\"; readonly CREATE_PARTIAL: \"CREATE_PARTIAL\"; readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\"; readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\"; readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\"; readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\"; readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\"; readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\"; }", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "type": "\"CREATE_PARTIAL\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/index\").NativeRule", + "members": { + "agent": { + "optional": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").Selector | \"value-only\"" + }, + "target": { + "optional": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/index\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/index\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "type": "number | undefined" + }, + "beneficiaryOffset": { + "optional": true, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").Selector" + }, + "target": { + "optional": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/index\").UniversalRule", + "members": { + "agent": { + "optional": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").AllowedCall[]" + }, + "assets": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").ForeignChainNamespace" + }, + "maxGasPerCall": { + "optional": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/index\").RulesRecord", + "members": { + "agent": { + "optional": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "type": "string" + }, + "enabled": { + "optional": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").Rule" + }, + "rulesId": { + "optional": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/index\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "type": "import(\"sdk/src/lib/index\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/index\").CreateResult", + "members": { + "index": { + "optional": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/index\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "type": "readonly { to: import(\"sdk/src/lib/index\").AgenticAddress; data: import(\"sdk/src/lib/index\").AgenticHex; value: bigint; }[] | undefined" + }, + "door": { + "optional": false, + "type": "import(\"sdk/src/lib/index\").AgenticDoor" + }, + "nativeCalls": { + "optional": true, + "type": "readonly { to: import(\"sdk/src/lib/index\").AgenticAddress; data: import(\"sdk/src/lib/index\").AgenticHex; value: bigint; }[] | undefined" + }, + "rawData": { + "optional": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "type": "`0x${string}`" + } + } + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/index\").UniversalSigner | import(\"sdk/src/lib/index\").UniversalAccount, options?: import(\"sdk/src/lib/index\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": false, + "type": "number" + }, + "FACTORY": { + "optional": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "type": "`0x${string}`" + } + } + }, + "scope": "Root exports, AGW types, initialize and agentic constants. Behavioral/default/deployment changes need the written session review." +} diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/logs/build.log b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/build.log new file mode 100644 index 00000000..96b66883 --- /dev/null +++ b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/build.log @@ -0,0 +1,13 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". + + + + NX Successfully ran target build for project core + + +(node:68414) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/logs/changed-lint.log b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/changed-lint.log new file mode 100644 index 00000000..75806793 --- /dev/null +++ b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/changed-lint.log @@ -0,0 +1,75 @@ + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local-advanced.spec.ts + 73:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 85:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 295:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 311:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 337:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 426:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local-batch.spec.ts + 44:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 90:37 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 91:46 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 98:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 106:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local-races.spec.ts + 54:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 99:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 117:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 145:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local.spec.ts + 47:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 48:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/delayed-index.spec.ts + 81:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 95:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 112:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 194:24 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 246:26 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 254:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/harness.ts + 234:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 253:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 262:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 400:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/svm-backend.spec.ts + 136:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 164:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 223:28 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/svm-internals.spec.ts + 86:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 119:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 189:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/v4-multiasset.spec.ts + 12:10 warning 'createWallet' is defined but never used @typescript-eslint/no-unused-vars + 78:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 92:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 176:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 188:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 325:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 335:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 353:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/vectors.spec.ts + 56:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 57:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 98:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 207:25 warning '_a' is assigned a value but never used @typescript-eslint/no-unused-vars + 208:25 warning '_b' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/outbound-sync.ts + 133:40 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 134:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/svm-idl/resolve.ts + 10:6 warning 'AccountItem' is defined but never used @typescript-eslint/no-unused-vars + +✖ 49 problems (0 errors, 49 warnings) diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/logs/docs.log b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/docs.log new file mode 100644 index 00000000..5996134d --- /dev/null +++ b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/docs.log @@ -0,0 +1 @@ +AGW guide: 7 TypeScript blocks typechecked against public exports; no examples executed. diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/logs/focused-svm-unit.log b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/focused-svm-unit.log new file mode 100644 index 00000000..dbc07dd3 --- /dev/null +++ b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/focused-svm-unit.log @@ -0,0 +1,8 @@ +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts + +Test Suites: 2 passed, 2 total +Tests: 28 passed, 28 total +Snapshots: 0 total +Time: 3.034 s +Ran all test suites within paths "packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts", "packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts". diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/logs/full-unit.log b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/full-unit.log new file mode 100644 index 00000000..49747bae --- /dev/null +++ b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/full-unit.log @@ -0,0 +1,168 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts + +Test Suites: 1 skipped, 115 passed, 115 of 116 total +Tests: 12 skipped, 1975 passed, 1987 total +Snapshots: 0 total +Time: 37.497 s, estimated 58 s +Ran all test suites. diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/logs/local-contracts.log b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/local-contracts.log new file mode 100644 index 00000000..583271c0 --- /dev/null +++ b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/local-contracts.log @@ -0,0 +1,15 @@ +PASS core-agw-local packages/core/__agw-local__/svm-backend.spec.ts (9.995 s) +PASS core-agw-local packages/core/__agw-local__/v4-multiasset.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts +PASS core-agw-local packages/core/__agw-local__/delayed-index.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-races.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-internals.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-batch.spec.ts +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts + +Test Suites: 9 passed, 9 total +Tests: 68 passed, 68 total +Snapshots: 0 total +Time: 25.23 s, estimated 28 s +Ran all test suites. diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/logs/package.log b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/package.log new file mode 100644 index 00000000..8e1b97e4 --- /dev/null +++ b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/package.log @@ -0,0 +1 @@ +AGW package: CJS/ESM imports, compiled declaration examples and npm contents pass. No examples executed/published. diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/logs/prepare-contracts.log b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/prepare-contracts.log new file mode 100644 index 00000000..626bb23a --- /dev/null +++ b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/prepare-contracts.log @@ -0,0 +1 @@ +/var/folders/4_/d47r2_4s1wb3x2dvmt2ghp800000gp/T//push-agw-local-v4 diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/logs/public-api.log b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/public-api.log new file mode 100644 index 00000000..51254108 --- /dev/null +++ b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/public-api.log @@ -0,0 +1 @@ +{"compiledMatchesSource":true,"addedExports":[],"removedExports":[],"changedAgwTypes":["AGENTIC_ERROR_CODE","AllowedCall"],"initializeSignatureChanged":false,"agwConstantsChanged":true} diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/logs/types-agw-local.log b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/types-agw-local.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/logs/types-lib.log b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/types-lib.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/logs/types-spec.log b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/types-spec.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/logs/units.log b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/units.log new file mode 100644 index 00000000..b6d5cf43 --- /dev/null +++ b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/units.log @@ -0,0 +1,23 @@ +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts (5.151 s) +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts + +Test Suites: 17 passed, 17 total +Tests: 254 passed, 254 total +Snapshots: 0 total +Time: 8.468 s, estimated 10 s +Ran all test suites matching /agentic|outbound-(confirmation-gate|svm-confirmation)|svm-idl/i. diff --git a/plan/agw/research/sdk-independent-completion-2026-10-06/logs/verification.log b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/verification.log new file mode 100644 index 00000000..baec7036 --- /dev/null +++ b/plan/agw/research/sdk-independent-completion-2026-10-06/logs/verification.log @@ -0,0 +1,11 @@ +AGW validation: units +AGW validation: types-lib +AGW validation: types-spec +AGW validation: types-agw-local +AGW validation: docs +AGW validation: prepare-contracts +AGW validation: local-contracts +AGW validation: build +AGW validation: package +AGW validation: public-api +AGW unfunded validation completed. diff --git a/plan/agw/research/sdk-independent-followup-2026-10-06/README.md b/plan/agw/research/sdk-independent-followup-2026-10-06/README.md new file mode 100644 index 00000000..ccde172f --- /dev/null +++ b/plan/agw/research/sdk-independent-followup-2026-10-06/README.md @@ -0,0 +1,53 @@ +# SDK-owned follow-up — October 6, 2026 + +This follow-up completes work that does not require new product or contract decisions. It changes tests, developer documentation and package metadata, not public SDK method signatures, exported types or transaction behavior. + +## Completed + +1. **Delayed-index replay/wait acceptance.** Six cases run real AGW/factory/engine/validator/URP transactions and obtain actual Anvil EVM receipts. Public `trackTransaction` first sees a root-only universal record that core identifies as Push-only. The AGW adapter restores the outbound route from verified wallet calldata. Public `wait()` then runs the actual indexer poller across missing/root-only records into destination success, destination failure or timeout, on both owner and agent doors. Wallet/signer identity stays correct, terminal hooks fire once to each callback, both actors' pending nonces stay unchanged, and Cosmos sub-ID extraction is cached. This closes the prior mock-poller-only coverage limit. +2. **Consumer guide with checked examples.** [packages/core/AGW.md](../../../../packages/core/AGW.md) covers owner/agent identity, native rules, independent funding, lifecycle, EVM token caps, explicit bounded gateway allowance, receipts/replay/partial-create recovery and current scope. Seven TypeScript blocks are checked together against public exports without evaluation. The examples use explicit native limits and one matching rule. They do not choose H3/H4.5/H6 behavior. Existing transaction return types are inferred; no new root type export was added for the documentation. +3. **Documentation packaging and status cleanup.** The guide is linked from the package README and included in the npm files list. `docs:check:agw` invokes its checker from the SDK checkout. The checker uses the root workspace's TypeScript compiler as developer tooling; only this unshipped script is excluded from Nx's runtime-dependency check, keeping compiler dependencies out of the published SDK. Stale network-blocked, unfinished-native-batch and unrun-funded statements were removed from active blocker/question/design documents. Web2 alias/literal migration notes are supplied. + +## Validation + +| Check | Result | +| --- | --- | +| Full actual-contract local suite | 59 passed in 8 suites (previous 53 plus 6 delayed-index cases) | +| Focused suite after strengthening the no-resubmission nonce check | 6 passed | +| Guide examples | 7 TypeScript blocks typecheck using public exports; not executed | +| Local harness typecheck | Pass | +| Changed-file lint | 0 errors; 6 conventional non-null assertion warnings in tests | +| Core build | Pass | +| npm dry-run | [Guide included in proposed package contents](package-inspection.json); no publication | +| Prior production unit evidence | 1,947 passed, 12 existing skips; production source unchanged by this follow-up | +| Prior live acceptance | All 25 registered AGW scenarios have passing coverage; no new live scenario/funding is needed for this follow-up | + +Logs are in [logs/](logs/). Log trailing whitespace and EOF blank lines are normalized. The six new cases control origin lookup and indexer responses; gateway/core/token/destination lookup remain local fixtures. The destination hashes/outcomes are fixture observations, not live TSS or destination receipts. Existing [live acceptance](../live-acceptance-2026-10-06/README.md) remains the production gateway/UEA/Sepolia evidence. No `.env` keys were loaded, no funded transactions were submitted and no contract checkout was changed by this follow-up. + +## API impact + +**This follow-up:** no public SDK API or default/authorization behavior changes. The package gains a guide and a developer command; tests gain deterministic delayed-index coverage. + +**Earlier AGW work:** the target agentic namespace and agenticWallet initialization remain; v4 enables the specified EVM assets[] model and native arrays. AGW responses add wallet/signature-origin metadata. Raw native offsets and EVM beneficiaryOffset remain the previously introduced public type extensions awaiting H4.5. Multiple matches return AMBIGUOUS_RULE; no caller selection parameter was added. Web2 public constants use web2 while the old web2:https literal remains accepted. Spend/history/generation helpers and compileCard follow Harsh's accepted removals/deferrals. These are not new decisions in this follow-up. + +## Remaining work + +- H3 native defaults/public maxValueTotal and token wording. +- H4.5 public raw-offset authoring/read shape. +- H6 selecting among multiple matching rules, including arrays. +- Ref/editable-label v1 delivery or deferral. +- Public Solana destination mapping, registry/IDL integration, dispatch/tracking and live acceptance. +- Platform executor support for creditRevert; refunds currently do not restore policy spend. + +None of these choices is silently settled by the new guide or tests. Standalone history/compiler scope stays deferred. + +## Reproduce + +```sh +node packages/core/scripts/check-agw-docs.js +AGW_LOCAL_DIR="${TMPDIR:-/tmp}/push-agw-local-v4" node node_modules/jest/bin/jest.js --config packages/core/jest.agw-local.config.ts --runInBand +node node_modules/typescript/bin/tsc --project packages/core/tsconfig.agw-local.json --noEmit +NX_DAEMON=false node node_modules/nx/bin/nx.js run core:build --skip-nx-cache +``` + +The package inspection uses npm pack --dry-run --json --ignore-scripts from dist/packages/core after the build. It is a local content inspection, not an npm publish. diff --git a/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-consumer-docs.log b/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-consumer-docs.log new file mode 100644 index 00000000..5996134d --- /dev/null +++ b/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-consumer-docs.log @@ -0,0 +1 @@ +AGW guide: 7 TypeScript blocks typechecked against public exports; no examples executed. diff --git a/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-delayed-index.log b/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-delayed-index.log new file mode 100644 index 00000000..faeca34b --- /dev/null +++ b/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-delayed-index.log @@ -0,0 +1,17 @@ +PASS core-agw-local packages/core/__agw-local__/delayed-index.spec.ts + AGW replay with delayed Cosmos indexing + ✓ owner door: real Push receipt then delayed external success (48 ms) + ✓ agent door: real Push receipt then delayed external success (43 ms) + ✓ owner door: real Push receipt then delayed external failed (36 ms) + ✓ agent door: real Push receipt then delayed external failed (38 ms) + ✓ owner door: real Push receipt then delayed external timeout (130 ms) + ✓ agent door: real Push receipt then delayed external timeout (137 ms) + +Test Suites: 1 passed, 1 total +Tests: 6 passed, 6 total +Snapshots: 0 total +Time: 3.644 s +Ran all test suites within paths "packages/core/__agw-local__/delayed-index.spec.ts". +Jest did not exit one second after the test run has completed. + +'This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue. diff --git a/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-independent-build.log b/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-independent-build.log new file mode 100644 index 00000000..15743dd0 --- /dev/null +++ b/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-independent-build.log @@ -0,0 +1,11 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:29017) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core diff --git a/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-independent-lint.log b/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-independent-lint.log new file mode 100644 index 00000000..ad88f953 --- /dev/null +++ b/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-independent-lint.log @@ -0,0 +1,10 @@ + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/delayed-index.spec.ts + 81:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 95:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 112:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 194:24 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 246:26 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 254:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +✖ 6 problems (0 errors, 6 warnings) diff --git a/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-independent-local-tsc.log b/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-independent-local-tsc.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-independent-local.log b/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-independent-local.log new file mode 100644 index 00000000..3c8f8b91 --- /dev/null +++ b/plan/agw/research/sdk-independent-followup-2026-10-06/logs/agw-independent-local.log @@ -0,0 +1,17 @@ +PASS core-agw-local packages/core/__agw-local__/svm-internals.spec.ts (5.324 s) +PASS core-agw-local packages/core/__agw-local__/v4-multiasset.spec.ts +PASS core-agw-local packages/core/__agw-local__/delayed-index.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-races.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-batch.spec.ts +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts + +Test Suites: 8 passed, 8 total +Tests: 59 passed, 59 total +Snapshots: 0 total +Time: 19.139 s, estimated 33 s +Ran all test suites. +Jest did not exit one second after the test run has completed. + +'This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue. diff --git a/plan/agw/research/sdk-independent-followup-2026-10-06/package-inspection.json b/plan/agw/research/sdk-independent-followup-2026-10-06/package-inspection.json new file mode 100644 index 00000000..972eb9ca --- /dev/null +++ b/plan/agw/research/sdk-independent-followup-2026-10-06/package-inspection.json @@ -0,0 +1,14 @@ +{ + "name": "@pushchain/core", + "version": "6.0.26", + "entryCount": 390, + "guideIncluded": true, + "guide": { + "path": "AGW.md", + "size": 12631, + "mode": 420 + }, + "dryRun": true, + "ignoreScripts": true, + "published": false +} diff --git a/plan/agw/research/sdk-owned-review-2026-10-03/AllowanceReview.t.sol b/plan/agw/research/sdk-owned-review-2026-10-03/AllowanceReview.t.sol new file mode 100644 index 00000000..bd32286f --- /dev/null +++ b/plan/agw/research/sdk-owned-review-2026-10-03/AllowanceReview.t.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +// Review-only: copy into test/review of push-agentic-wallets@e704d5b. +// Real wallet/engine/policy; authored ERC20 and gateway pull/burn fixtures. +// This proves the owner approval mechanism, not production gateway/node settlement. +import { E2ETest } from "../integration/8_e2e.t.sol"; +import { MockPRC20 } from "../mocks/MockUniversalGateway.sol"; +import { UniversalOutboundTxRequest } from "../../src/libraries/Types.sol"; +import { ExecutionLib } from "../../src/libraries/ExecutionLib.sol"; +import { AGWErrors } from "../../src/libraries/Errors.sol"; +import { ISmartSession } from "smartsessions/ISmartSession.sol"; +import { PermissionId } from "smartsessions/DataTypes.sol"; + +contract ReviewPullToken is MockPRC20 { + error InsufficientAllowance(); + function transferFrom(address from, address to, uint256 amount) external returns (bool) { + uint256 allowed = allowance[from][msg.sender]; + if (allowed < amount) revert InsufficientAllowance(); + if (balanceOf[from] < amount) revert InsufficientBalance(); + allowance[from][msg.sender] = allowed - amount; + balanceOf[from] -= amount; + balanceOf[to] += amount; + return true; + } + function burn(uint256 amount) external returns (bool) { + if (balanceOf[msg.sender] < amount) revert InsufficientBalance(); + balanceOf[msg.sender] -= amount; + return true; + } +} + +contract ReviewPullGateway { + // Mirrors the transferFrom -> burn sequence at gateway bcbf7df, + // UniversalGatewayPC.sol:430-434. Other gateway behavior is not modeled. + function sendUniversalTxOutbound(UniversalOutboundTxRequest calldata req) external payable { + ReviewPullToken token = ReviewPullToken(req.token); + require(token.transferFrom(msg.sender, address(this), req.amount)); + require(token.burn(req.amount)); + } +} + +contract AllowanceReviewTest is E2ETest { + function _setupAllowance() internal { + pUSDC = new ReviewPullToken(); + vm.etch(GATEWAY, type(ReviewPullGateway).runtimeCode); + _deployAndGrant(); + } + + function _approval(uint256 amount) internal view returns (bytes memory) { + return ExecutionLib.encodeSingle(address(pUSDC), 0, + abi.encodeCall(MockPRC20.approve, (GATEWAY, amount))); + } + + function _ownerApprove(uint256 amount) internal { + bytes memory call = _approval(amount); + bytes32 mode = _singleMode(); + vm.prank(BOB_UEA); + bobAgw.execute(mode, call); + } + + function test_Allowance_MissingApprovalRevertsAndRollsBackSpend() public { + _setupAllowance(); + bytes memory call = _executionCalldata(10e6, 0); + bytes32 mode = _singleMode(); + uint64 beforeCount = bobAgw.checkpointCount(); + vm.prank(agentAddr); + vm.expectRevert(ReviewPullToken.InsufficientAllowance.selector); + bobAgw.executeAsAgent(permissionId, mode, call); + assertEq(_spent(permissionId), 0); + assertEq(pUSDC.balanceOf(address(bobAgw)), HUNDRED_USDC); + assertEq(bobAgw.checkpointCount(), beforeCount); + } + + function test_Allowance_OwnerApprovalEnablesPullBurnAndCanBeRemoved() public { + _setupAllowance(); + uint64 beforeCount = bobAgw.checkpointCount(); + _ownerApprove(20e6); + assertEq(bobAgw.checkpointCount(), beforeCount + 1); + assertEq(pUSDC.allowance(address(bobAgw), GATEWAY), 20e6); + _submitRequest(_executionCalldata(10e6, 0)); + assertEq(pUSDC.balanceOf(address(bobAgw)), 90e6); + assertEq(pUSDC.balanceOf(GATEWAY), 0, "pulled tokens burned"); + assertEq(pUSDC.allowance(address(bobAgw), GATEWAY), 10e6); + assertEq(_spent(permissionId), 10e6); + assertEq(bobAgw.checkpointCount(), beforeCount + 1, "agent spend adds no checkpoint"); + _ownerApprove(0); + assertEq(pUSDC.allowance(address(bobAgw), GATEWAY), 0); + bytes memory call = _executionCalldata(1e6, 0); + bytes32 mode = _singleMode(); + vm.prank(agentAddr); + vm.expectRevert(ReviewPullToken.InsufficientAllowance.selector); + bobAgw.executeAsAgent(permissionId, mode, call); + assertEq(_spent(permissionId), 10e6); + assertEq(pUSDC.balanceOf(address(bobAgw)), 90e6); + } + + function test_Allowance_AgentCannotUseOwnerDoor() public { + _setupAllowance(); + bytes memory call = _approval(20e6); + bytes32 mode = _singleMode(); + vm.prank(agentAddr); + vm.expectRevert(AGWErrors.CallerIsNotOwner.selector); + bobAgw.execute(mode, call); + assertEq(pUSDC.allowance(address(bobAgw), GATEWAY), 0); + } + + function test_Allowance_UniversalRuleCannotApproveThroughAgentDoor() public { + _setupAllowance(); + bytes memory call = _approval(20e6); + bytes32 mode = _singleMode(); + vm.prank(agentAddr); + vm.expectRevert(abi.encodeWithSelector(ISmartSession.NoPoliciesSet.selector, + PermissionId.wrap(permissionId))); + bobAgw.executeAsAgent(permissionId, mode, call); + assertEq(pUSDC.allowance(address(bobAgw), GATEWAY), 0); + assertEq(_spent(permissionId), 0); + } +} diff --git a/plan/agw/research/sdk-owned-review-2026-10-03/README.md b/plan/agw/research/sdk-owned-review-2026-10-03/README.md new file mode 100644 index 00000000..45eaa742 --- /dev/null +++ b/plan/agw/research/sdk-owned-review-2026-10-03/README.md @@ -0,0 +1,28 @@ +# SDK owned review evidence + +October 3, 2026. SDK production source is 167fdc6 (planning branch 46f9e66). The [test summary](test-summary.json) records the commands and checksums. Existing SDK unit suites: 183 passed, 0 failed, ten suites. These exercise existing behavior with mocks; they do not test a completed AGW SDK. + +## New allowance experiments + +Four review-only tests pass against AGW e704d5b in an isolated copy. [Source](AllowanceReview.t.sol), [Forge output](allowance.log). The AGW, factory, policy and E2E harness source files were byte-compared to the pinned Git objects before running. The initial fixture attempted to override the harness's non-virtual setUp; it was corrected to use a helper invoked by each test, without changing the harness or production source. + +| Test | What it proves locally | +| --- | --- | +| Missing approval | transferFrom fails; wallet balance and URP spend roll back | +| Owner approval, spend and removal | execute establishes allowance; agent outbound consumes it, burns the pulled tokens and increments spend; owner can zero it and prevent further pulls | +| Agent using owner door | Exact CallerIsNotOwner error; no allowance created | +| Agent approving through universal rule | Exact engine NoPoliciesSet error; no allowance created | + +The real gateway at bcbf7df calls transferFrom(from, gateway, amount), then burn(amount), in UniversalGatewayPC.sol:430–434. The fixture models that sequence with an authored token/gateway. It does not validate production fee logic, token peculiarities, routing, node/TSS acceptance or destination execution. A live compatible-deployment test remains required. + +To reproduce: initialize pinned contract dependencies in an isolated e704d5b copy, copy AllowanceReview.t.sol into test/review/, then run: + +```sh +forge test --offline --match-contract AllowanceReviewTest --match-test test_Allowance_ -vv +``` + +Forge 1.5.1-stable, solc 0.8.26, optimizer 833, via IR, Cancun, as in the existing e704d5b validation. No source checkout was changed and no transaction was broadcast. + +## Freshness + +[Remote refs](remote-refs.json) were rechecked with git ls-remote and remain at the recorded pins. The sibling AGW checkout is on old main; this was not mistaken for the active reviewed branch. Notion was not re-exported; its last complete snapshot remains October 3 at 13:23 IST. This report does not certify later page edits or current deployment state. diff --git a/plan/agw/research/sdk-owned-review-2026-10-03/allowance.log b/plan/agw/research/sdk-owned-review-2026-10-03/allowance.log new file mode 100644 index 00000000..afcf549c --- /dev/null +++ b/plan/agw/research/sdk-owned-review-2026-10-03/allowance.log @@ -0,0 +1,42 @@ +Compiling 1 files with Solc 0.8.26 +Solc 0.8.26 finished in 21.31s +Compiler run successful with warnings: +Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning. + --> lib/smartsessions/contracts/lib/ConfigLib.sol:77:9: + | +77 | bool useRegistry + | ^^^^^^^^^^^^^^^^ + +Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning. + --> lib/smartsessions/contracts/lib/ConfigLib.sol:123:9: + | +123 | bool useRegistry + | ^^^^^^^^^^^^^^^^ + +Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning. + --> lib/smartsessions/contracts/lib/ConfigLib.sol:203:9: + | +203 | bool useRegistry + | ^^^^^^^^^^^^^^^^ + +Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning. + --> lib/smartsessions/contracts/core/SmartSessionBase.sol:270:9: + | +270 | bool useRegistry + | ^^^^^^^^^^^^^^^^ + +Warning (2018): Function state mutability can be restricted to view + --> src/AGWFactory.sol:352:5: + | +352 | function _authorizeUpgrade(address newImplementation) internal override onlyRole(DEFAULT_ADMIN_ROLE) { + | ^ (Relevant source part starts here and spans across multiple lines). + + +Ran 4 tests for test/review/AllowanceReview.t.sol:AllowanceReviewTest +[PASS] test_Allowance_AgentCannotUseOwnerDoor() (gas: 1381739) +[PASS] test_Allowance_MissingApprovalRevertsAndRollsBackSpend() (gas: 1461500) +[PASS] test_Allowance_OwnerApprovalEnablesPullBurnAndCanBeRemoved() (gas: 1557294) +[PASS] test_Allowance_UniversalRuleCannotApproveThroughAgentDoor() (gas: 1418195) +Suite result: ok. 4 passed; 0 failed; 0 skipped; finished in 8.06ms (5.25ms CPU time) + +Ran 1 test suite in 16.14ms (8.06ms CPU time): 4 tests passed, 0 failed, 0 skipped (4 total tests) diff --git a/plan/agw/research/sdk-owned-review-2026-10-03/jest.log b/plan/agw/research/sdk-owned-review-2026-10-03/jest.log new file mode 100644 index 00000000..e177d77b --- /dev/null +++ b/plan/agw/research/sdk-owned-review-2026-10-03/jest.log @@ -0,0 +1,13 @@ +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts + +Test Suites: 6 passed, 6 total +Tests: 126 passed, 126 total +Snapshots: 0 total +Time: 6.207 s +Ran all test suites within paths "packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts", "packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts", "packages/core/src/lib/orchestrator/__tests__/errors.spec.ts", "packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts", "packages/core/src/lib/read-state/__tests__/public-surface.spec.ts", "packages/core/src/lib/read-state/__tests__/read-params.spec.ts". +Test results written to: plan/agw/research/sdk-owned-review-2026-10-03/jest-results.json diff --git a/plan/agw/research/sdk-owned-review-2026-10-03/remote-refs.json b/plan/agw/research/sdk-owned-review-2026-10-03/remote-refs.json new file mode 100644 index 00000000..9b0e9692 --- /dev/null +++ b/plan/agw/research/sdk-owned-review-2026-10-03/remote-refs.json @@ -0,0 +1,16 @@ +{ + "checked_at": "2026-10-03T09:30:23.568072+00:00", + "method": "git ls-remote origin with explicit branch refs; no checkout changes", + "agw": { + "pushAgenticWallet_v3": "e704d5b58fd1d30ce02bc0ad74dccfbdb37804f9", + "main": "9ddd95402b9a2dbf494f6ebfdb477e9a0fb1408a" + }, + "core": { + "universalMarketplace_v1": "cb69e0ba101bef1bb4440e54b2c45396be3e92ce" + }, + "gateway": { + "pc20-3rd-iteration": "bcbf7df42e8e6dd11088a43bcc0b056a54ea0a18", + "main": "d02070dc11aeb3a081d5d6363aa0d75d63eb7c1c" + }, + "notion": "No new export in this pass; source-manifest retains 2026-10-03T07:53:10.278902+00:00." +} diff --git a/plan/agw/research/sdk-owned-review-2026-10-03/response.log b/plan/agw/research/sdk-owned-review-2026-10-03/response.log new file mode 100644 index 00000000..58666fb2 --- /dev/null +++ b/plan/agw/research/sdk-owned-review-2026-10-03/response.log @@ -0,0 +1,11 @@ +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts + +Test Suites: 4 passed, 4 total +Tests: 57 passed, 57 total +Snapshots: 0 total +Time: 4.238 s +Ran all test suites within paths "packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts", "packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts", "packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts", "packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts". +Test results written to: plan/agw/research/sdk-owned-review-2026-10-03/response-results.json diff --git a/plan/agw/research/sdk-owned-review-2026-10-03/test-summary.json b/plan/agw/research/sdk-owned-review-2026-10-03/test-summary.json new file mode 100644 index 00000000..6607df99 --- /dev/null +++ b/plan/agw/research/sdk-owned-review-2026-10-03/test-summary.json @@ -0,0 +1,43 @@ +{ + "review_date": "2026-10-03", + "sdk_production_revision": "167fdc6243ecfe5d97735a6124662c7d2084d126", + "planning_commit": "46f9e669d001624cb8b7a594bfed3a9aafb139f1", + "agw_source_pin": "e704d5b58fd1d30ce02bc0ad74dccfbdb37804f9", + "runs": [ + { + "log": "jest.log", + "command": "node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand --runTestsByPath packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts packages/core/src/lib/read-state/__tests__/read-params.spec.ts packages/core/src/lib/orchestrator/__tests__/errors.spec.ts packages/core/src/lib/read-state/__tests__/public-surface.spec.ts packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts", + "suites": 6, + "passed": 126, + "failed": 0, + "success": true, + "duration_seconds": 6.048, + "sha256": "2135a06ef43a05dff8c33e8e359c76bf64075eaabca57171b45fe75c929ee308" + }, + { + "log": "response.log", + "command": "node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand --runTestsByPath packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts", + "suites": 4, + "passed": 57, + "failed": 0, + "success": true, + "duration_seconds": 4.191, + "sha256": "71e516304406ec21b9ae1939f1251a589ec1c15230838b6fab6aad7e072cc729" + } + ], + "total_tests": 183, + "passed": 183, + "failed": 0, + "scope": "Existing mock-based SDK unit tests; no AGW implementation or live settlement verified.", + "allowance_experiment": { + "command": "forge test --offline --root --match-contract AllowanceReviewTest --match-test test_Allowance_ -vv", + "passed": 4, + "failed": 0, + "skipped": 0, + "fixture": "AllowanceReview.t.sol", + "fixture_sha256": "06857f3941be26f73981682108e6a95c29caa64b4432156fbb53c2cfb8cc02bd", + "log": "allowance.log", + "log_sha256": "f80c94f78a2d829cd1eb35e2fcae1b75fa9e1fc0569a3370e7023f5d60764451", + "scope": "Real pinned AGW/engine/URP with authored token/gateway transferFrom and burn fixtures; not production gateway or live settlement." + } +} diff --git a/plan/agw/research/section6-feedback-2026-10-12/contracts-export.zip b/plan/agw/research/section6-feedback-2026-10-12/contracts-export.zip new file mode 100644 index 00000000..e2769d05 Binary files /dev/null and b/plan/agw/research/section6-feedback-2026-10-12/contracts-export.zip differ diff --git a/plan/agw/research/section6-feedback-2026-10-12/contracts-latest.md b/plan/agw/research/section6-feedback-2026-10-12/contracts-latest.md new file mode 100644 index 00000000..0db4e6a6 --- /dev/null +++ b/plan/agw/research/section6-feedback-2026-10-12/contracts-latest.md @@ -0,0 +1,502 @@ +# 1. AGW Contract Changes (nomenclature standard + change set) + + + +# 0. Before the naming: AGW will break when the gateway is upgraded + +**What happened.** The gateway team changed the outbound request struct on GitHub main. Two fields are gone (`gasPrice`, `maxPCForGas`). AGW copied the old struct into its own repo and URP checks one of the removed fields (gate 9: `maxPCForGas` must be non-zero). + +**Why it still works today.** Donut is still running the old gateway (implementation `0x1e41...a659` has the old eight fields). + +**What breaks.** The day the new gateway is deployed on Donut, every cross-chain rule set stops working: URP rejects every request. + +**Fix, two rules.** + +1. AGW never copies a gateway or core struct. It imports them from the gateway and core packages, so a change upstream fails the build instead of failing on-chain. +2. The URP upgrade and the gateway upgrade go out together, not separately. + +Same rule for the selector: derive `sendUniversalTxOutbound.selector` from the interface, do not hardcode `0x77b86bec`. + +# 1. How core and gateway name things (the standard AGW follows) + +These conventions already exist in `push-chain-core-contracts` and `push-chain-gateway-contracts`. AGW adopts them as is. Where the two repos disagree, the AGW column says which one wins. + +| Area | Convention | Example | AGW | +| --- | --- | --- | --- | +| Contract names | Chain-agnostic components spell out Universal. Push-side variants add PC. Accounts are 3-letter acronyms. | `UniversalCore`, `UniversalGatewayPC`, `UEA`, `CEAFactory` | `AGW`, `AGWFactory`, `UniversalRulesPolicy` | +| Errors | One `libraries/Errors.sol` per repo, one error library per contract, PascalCase, arguments only when the caller needs them. Caller checks are `CallerIsNotX`. | `UEAErrors.InvalidCall()`, `CommonErrors.ZeroAddress()`, `CallerIsNotUEModule()` | `AGWErrors`, `AGWFactoryErrors`, `UniversalRulesPolicyErrors` | +| Types and constants | One `libraries/Types.sol`, plain file-level structs, `UPPER_SNAKE` constants, selectors derived not hardcoded. | `struct Multicall`, `MULTICALL_SELECTOR = bytes4(keccak256("UEA_MULTICALL"))` | `libraries/Types.sol`; gateway and core structs imported, never copied | +| Request shape | One `XRequest` struct as the single argument; the contract infers the kind. Users never state a type. | `sendUniversalTxOutbound(UniversalOutboundTxRequest req)` infers `TX_TYPE` | `grantRules(Session)` infers `NATIVE` vs `UNIVERSAL` from `chainNamespace` | +| Interface sections | Tag plus number banners, events first, NatSpec on everything. | `UGPC_1: EVENTS`, `UGPC_2: OUTBOUND TX`, `UGPC_3: VIEW FUNCTIONS` | `AGW_1: EVENTS` ... `AGW_5: VIEWS`, `URP_1` ... `URP_3` | +| Functions | `setX`, `getX`, `isX`. Set-once wiring is read through `UPPER_CASE()` getters. | `isSupportedToken()`, `UNIVERSAL_CORE()` | `SESSION_ENGINE()`, `RULES_POLICY()`, `UNIVERSAL_GATEWAY_PC()` | +| Storage | Internal state is underscore-prefixed. | `_walletCount` | `_` everywhere; drop URP's `$` prefix | +| Roles | `UPPER_SNAKE_ROLE`. | `DEFAULT_ADMIN_ROLE`, `PAUSER_ROLE`, `TSS_ROLE` | same; `PAUSER` and `OPERATOR` split kept, documented | +| Chain identity | Full CAIP-2 string, field named `chainNamespace`. | `"eip155:1"` | envelope field renamed `chain` to `chainNamespace` | +| Events | No consistent rule upstream. | `SetChainMeta` (imperative), `VaultPCUpdated` (past) | past tense: `RulesGranted`, `WalletDeployed` | +| Layout | `src/` with `interfaces/` and `libraries/`; numbered docs and tests; addresses per network; `CLAUDE.md` in every package. | `docs/1_PUSH_CHAIN.md`, `test/gateway/1_adminActions.t.sol`, `docs/addresses/sepolia.md` | same, see rename map | + +#### Where each convention was seen (open only if you want the receipts) + +Core repo, folder layout: + +``` +src/ + Interfaces/ IUniversalCore.sol, IUEA.sol, ICEA.sol + libraries/ Errors.sol, Types.sol, Utils.sol + uea/ UEAFactory.sol, UEA_EVM.sol, UEA_SVM.sol + cea/ CEAFactory.sol, CEA.sol + UniversalCore.sol, PRC20.sol, WPC.sol +``` + +Gateway repo, folder layout: + +``` +contracts/evm-gateway/ + src/ UniversalGateway.sol, UniversalGatewayPC.sol, Vault.sol, VaultPC.sol + src/interfaces/ IUniversalGatewayPC.sol, IVault.sol + src/libraries/ Errors.sol, Types.sol, TypesUG.sol, TypesUGPC.sol + docs/ 1_PUSH_CHAIN.md, 2_UniversalGateway.md, 3_UniversalGatewayPC.md + docs/addresses/ sepolia.md, bsc-testnet.md + test/gateway/ 1_adminActions.t.sol ... 14_gatewayPC.t.sol + script/ 1_DeployGatewayWithProxy.sol, 3_UpgradeGatewayNewImpl.sol + CLAUDE.md +``` + +Errors (core, `libraries/Errors.sol`): + +```solidity +library CommonErrors { error ZeroAddress(); error Unauthorized(); error InvalidInput(); } +library UniversalCoreErrors { error CallerIsNotUEModule(); error GasLimitBelowBase(uint256 provided, uint256 minimum); } +library UEAErrors { error InvalidCall(); error ExecutionFailed(); } +``` + +Types (core, `libraries/Types.sol`): + +```solidity +struct UniversalAccountId { string chainNamespace; string chainId; bytes owner; } +struct Multicall { address to; uint256 value; bytes data; } +bytes4 constant MULTICALL_SELECTOR = bytes4(keccak256("UEA_MULTICALL")); +``` + +Request shape (gateway, `TypesUGPC.sol` and `IUniversalGatewayPC.sol`): + +```solidity +struct UniversalOutboundTxRequest { bytes recipient; address token; uint256 amount; uint256 gasLimit; bytes payload; address revertRecipient; } +function sendUniversalTxOutbound(UniversalOutboundTxRequest calldata req) external payable; // TX_TYPE inferred inside +``` + +Interface sections and wiring getters (gateway, `IUniversalGatewayPC.sol`): + +```solidity +// UGPC_1: EVENTS +// UGPC_2: OUTBOUND TX +// UGPC_3: VIEW FUNCTIONS +function UNIVERSAL_CORE() external view returns (address); +``` + +Events (both repos, no single rule): + +```solidity +event SetChainMeta(...); // core, imperative +event PauserRoleGranted(...); // core, past tense +event UniversalTxOutbound(...); // gateway, noun +event VaultPCUpdated(...); // gateway, past tense +``` + +Chain identity, the same field name with two meanings: + +```solidity +gasPriceByChainNamespace("eip155:1") // UniversalCore: full CAIP-2 string +UniversalAccountId({ chainNamespace: "eip155", chainId: "1" }) // Read State: split +``` + +# 2. Decisions + +| # | Decision | Outcome | +| --- | --- | --- | +| D1 | Wallet contract name | **AGW.sol** (account acronym like UEA, CEA). Full form "Agentic Wallet" in the NatSpec title only. Factory stays `AGWFactory.sol`. | +| D2 | Policy contract name | **UniversalRulesPolicy.sol**. `URP` stays as the short form in comments, events and the SDK constant, the way `UGPC` stands for `UniversalGatewayPC`. | +| D3 | Validator contract name | PROPOSED 2026-09-29: **no validator.** The agent is a Push address: a native key is its own EOA, any external key (EVM, Solana, anything) is its UEA, deterministic from (chain, owner). Cross-VM signature verification already happens inside the UEA, so the agent door checks `msg.sender == rules.agent` and hands the calls to URP. `PushSessionValidator.sol` is removed rather than renamed. Pending one check against the v3 branch: how deep SmartSession's signature path is wired into the engine calls URP relies on, and whether the policy engine can be driven from a sender check without forking it. | +| D4 | Vocabulary for the granted object | **rules, one word everywhere.** On-chain: `grantRules`, `revokeRules`, `revokeAllRules`, `rulesId`, `RulesGranted`, `RulesRevoked`, `RulesActionAuthorized`. Layer: Universal Rules. SDK: `client.agentic.rules`. `permissionId` remains the SmartSession-internal name and is exposed as `rulesId`. `mandate` is retired from code, docs and copy. +**Rename boundary (2026-09-29).** Three vocabularies live in the fork; only ours is renamed. ERC-7579 names stay (`execute(mode, executionCalldata)`, `ModeCode`, module types, `installModule`). SmartSession names stay inside the engine and on the interfaces URP implements (`Session`, `permissionId`, `PolicyData`, `ActionData`, `ConfigId`, `enableSessions`, `isPermissionEnabled`, `IPolicy.checkAction`, `initializeWithMultiplexer`): audit history and upstream diffs attach to those names. Push's own words (`mandate`, `PushAgentWallet`, our events, envelope, docs, SDK) become rules. The seam is the AGW ABI: `rulesId` is computed by the engine's `getPermissionId(Session)` and the NatSpec states `rulesId == permissionId`. If the engine is vendored with edits, it lives in `src/vendor/smartsession/` with a note naming the upstream commit and every local change. If D3 ends with the engine dropped, SmartSession vocabulary leaves with it. | +| D5 | Door functions | Keep `execute` (owner door). Agent door becomes `executeAsAgent(bytes32 rulesId, bytes32 mode, bytes executionCalldata)`, gated on `msg.sender == rules.agent`, replacing `executeWithSession` and its signature blob (follows D3). "Owner door" and "agent door" stay as NatSpec language. | +| D6 | Chain field in the envelope | Rename `chain` to `chainNamespace`, full CAIP-2 string, matching `UniversalCore` and gateway events. Read State keeps its split fields; the SDK converts. | +| D7 | Mode names | `NATIVE` and `UNIVERSAL` stay. The SVM rulebook is selected by the `solana` namespace inside `UNIVERSAL`; no new mode name. | + +# 3. Rename map (current to proposed) + +| Area | Today | Proposed | +| --- | --- | --- | +| Inherited names (7579, SmartSession) | `execute(mode, executionCalldata)`, `Session`, `permissionId`, `PolicyData`, `ActionData`, `ConfigId`, `checkAction`, `initializeWithMultiplexer` | unchanged (see D4 rename boundary) | +| Wallet | `PushAgentWallet.sol` | `AGW.sol` | +| Factory | `AGWFactory.sol` | `AGWFactory.sol` (unchanged) | +| Policy | `policies/URP.sol` | `UniversalRulesPolicy.sol` | +| Validator | `validators/PushSessionValidator.sol` | removed (D3): agent identity is a Push address, verification lives in the UEA | +| Interfaces | `IPushAgentWallet`, `IURP`, `IPushSessionValidator`, local `IUniversalGatewayPC`, `IPRC20Source` | `IAGW`, `IUniversalRulesPolicy`; gateway and core interfaces imported (`IUEAFactory` for `computeUEA` in tests and tooling) | +| Errors | `libraries/PushWalletErrors.sol` plus errors declared in `IURP` and `IAGWFactory` | `libraries/Errors.sol` with `AGWErrors`, `AGWFactoryErrors`, `UniversalRulesPolicyErrors`; reuse `CommonErrors` names (`ZeroAddress`, `Unauthorized`, `AlreadyInitialized`); `AGWErrors.CallerIsNotAgent()` | +| Types | `libraries/PushWalletTypes.sol` re-declares `UniversalOutboundTxRequest`, `Multicall` | `libraries/Types.sol` with AGW-owned structs only (`RulesEnvelope`, `NativeTerms`, `UniversalTerms`, `AllowedCall`, `ArgPin`, `AmountRule`); gateway and core types imported | +| Grant / revoke | `grantMandate`, `stopMandate`, `stopAll` | `grantRules`, `revokeRules`, `revokeAllRules` | +| Events | `MandateGranted`, `MandateRevoked`, `MandateActionAuthorized`, `URPPolicySet` | `RulesGranted`, `RulesRevoked`, `RulesActionAuthorized`, `RulesConfigured` | +| Ids | `permissionId` in wallet ABI | `rulesId` in wallet ABI (engine keeps `permissionId` internally) | +| Wiring getters | `sessionEngine()`, `urp()`, `sessionValidator()`, `universalGateway()` | `SESSION_ENGINE()`, `RULES_POLICY()`, `UNIVERSAL_GATEWAY_PC()` (no validator getter, D3) | +| Storage prefix | `_` in wallet and factory, `$` in URP | `_` everywhere | +| Envelope | `abi.encode(string chain, bytes body)` | `abi.encode(uint16 version, string chainNamespace, bytes body)` | +| Interface banners | none | `AGW_1: EVENTS`, `AGW_2: OWNER DOOR`, `AGW_3: AGENT DOOR`, `AGW_4: RULES LIFECYCLE`, `AGW_5: VIEWS`; `URP_1: EVENTS`, `URP_2: POLICY`, `URP_3: VIEWS`; `AGWF_1: EVENTS`, `AGWF_2: DEPLOY`, `AGWF_3: VIEWS` | +| Selector constant | `SEND_OUTBOUND_SELECTOR = 0x77b86bec` | derived from `IUniversalGatewayPC` | +| Roles | `PAUSER_ROLE` pauses, `OPERATOR_ROLE` unpauses | keep the split, document it as a deliberate deviation from gateway | +| Event tense | past tense | past tense, written down as the rule | +| Docs | `docs/v3-architecture.md`, `agentic_wallet_flow.md`, `push_native_agentic_wallet_flow.md` | `docs/1_AGW.md`, `2_UniversalRulesPolicy.md`, `3_Universal_Flow.md`, `4_Native_Flow.md` | +| Addresses | `deployments/address-book-v3/ADDRESSES.md` | `docs/addresses/donut.md` | +| Tests | `test/unit/*.t.sol`, `test/integration/*.t.sol` | numbered by area: `1_factory`, `2_ownerDoor`, `3_rulesLifecycle`, `4_agentDoor`, `5_universalRulebook`, `6_nativeRulebook`, `7_externalAgentViaUEA`, `8_e2e` | + +# 4. Structural changes that ride along with the rename + +Agreed on 2026-09-28. Listed here so the rename and the additions land in one change set and one audit, before the permanent deployment. + +1. **Signature-authorized variants**: `deployWalletWithSig`, `grantRulesWithSig`, `executeWithSig`. One EIP-712 domain per contract. Digest includes chainid, contract, nonce (the wallet's grant nonce for grants; a per-owner nonce on the factory), deadline. Verify ECDSA, and ERC-1271 when the owner has code (a UEA). +2. **Checkpoints**: the wallet records owner-side changes an evaluator needs: principal moved out (owner-door value or token transfer out, and every outbound), rules granted, revoked or replaced, key changed. Per-wallet monotonic counter plus `Checkpointed(kind, ref, blockNumber)`, so an evaluator can ask "any checkpoint after block N" with one read. +3. **`bytes32 ref` on `grantRules`**, emitted in `RulesGranted`, so a job binds to a rules id and an indexer goes rules to job without the hook. +4. **Stop-only role: dropped for v1** (2026-10-01). A binder address that could call `revokeRules` and nothing else was considered so a job hook could end rules at job end. Not needed: rules expire by `validUntil`, which the fund hook requires to be at or after the job's `expiredAt`, caps bound the gap, and the hook keeps its own one-live-job slot. Additive to bring back later. +5. **Envelope version word**: `abi.encode(uint16 version, string chainNamespace, bytes body)`. +6. **`creditRevert` reachability**: wire the real executor module or replace the credit path. Today spend never decreases on Donut. +7. **SVM rulebook** in the policy, keyed by the `solana` namespace: 32-byte `expectedCEA` and targets, program plus instruction discriminator allow-list, beneficiary check over the accounts array, SVM payload gate. +8. **Import gateway and core types**, derive the outbound selector, sequence the URP upgrade with the gateway's struct change. +9. **Agent identity is a Push address** (2026-09-29). The rules name an address: an EOA, or the UEA of an external key. The agent door checks the sender instead of verifying a session signature; the validator contract goes. One identity for rules, card and 8183 provider, so the fund hook matches by equality. Sizing against the v3 branch pending (D3). +10. **Editable label** (2026-10-01). `setLabel(string label)` on AGW, owner only, emits `LabelSet(string label)`. Today the label is only passed at `deployWallet` and emitted in `WalletDeployed`. Not a checkpoint kind: cosmetic metadata, evaluators ignore it. SDK: `w.setLabel(label)` on page 5. + +# 4b. Contract surface, as a diff + +Read `+` as added, `-` as removed, `~` as changed in place, `=` as unchanged. Names are the post-rename names. Storage slots never move; renames are labels only. + +**AGWFactory** + +```diff += deployWallet(string label) returns (address wallet) // caller is the owner ++ deployWalletWithSig(address owner, uint96 index, string label, ++ uint48 deadline, bytes ownerSig) returns (address) // EIP-712; index must equal walletCount(owner) ++ // ownerSig: ECDSA, or ERC-1271 when owner has code (UEA) ++ DOMAIN_SEPARATOR() view returns (bytes32) += predictWallet(address owner, uint256 index) view returns (address, bool deployed) += walletCount / ownerOf / isWallet / indexOf / walletImplementation += pause() PAUSER_ROLE, unpause() OPERATOR_ROLE += event WalletDeployed(owner, index, wallet, label) +``` + +**AGW** (was PushAgentWallet) + +```diff +// owner door += execute(bytes32 mode, bytes executionCalldata) payable // owner only, no policy +~ execute now emits Checkpointed(seq, OWNER_ACTION, keccak(calldata), block) ++ executeWithSig(bytes32 mode, bytes executionCalldata, ++ uint64 ownerNonce, uint48 deadline, bytes ownerSig) // owner door by signature, same effects as execute ++ ownerNonce() view returns (uint64) ++ setLabel(string label) // owner only; emits LabelSet; not a checkpoint + +// rules lifecycle +- grantMandate(Session) returns (bytes32 permissionId) ++ grantRules(Session session, bytes32 ref) returns (bytes32 rulesId) // ref: job or card reference, emitted, not interpreted ++ grantRulesWithSig(Session session, bytes32 ref, uint48 deadline, bytes ownerSig) returns (bytes32 rulesId) ++ // digest includes grantNonce, so a signed grant cannot replay +- stopMandate(bytes32 permissionId) ++ revokeRules(bytes32 rulesId) // owner or self +- stopAll() ++ revokeAllRules() // owner or self + +// agent door (D3, D5) +- executeWithSession(address validator, bytes32 mode, bytes executionCalldata, +- bytes signature, uint192 nonceKey, uint64 nonceSeq, uint48 requestExpiry) ++ executeAsAgent(bytes32 rulesId, bytes32 mode, bytes executionCalldata) ++ requires msg.sender == agentOf(rulesId); replay and expiry come from the sender's own tx (EOA nonce, or the UEA's) ++ URP checks every call exactly as before; no signature blob, no validator address ++ agentOf(bytes32 rulesId) view returns (address) + +// checkpoints ++ checkpointCount() view returns (uint64) ++ lastCheckpointBlock() view returns (uint64) ++ event Checkpointed(uint64 indexed seq, uint8 kind, bytes32 ref, uint64 blockNumber) ++ kind: 0 OWNER_ACTION (any owner-door execute), 1 RULES_GRANTED, 2 RULES_REVOKED ++ emitted from execute, executeWithSig, grantRules*, revokeRules, revokeAllRules + +// views (wiring, renamed to UPPER_CASE) +- sessionEngine() urp() sessionValidator() universalGateway() ++ SESSION_ENGINE() RULES_POLICY() UNIVERSAL_GATEWAY_PC() += owner() factory() grantNonce() getNonce(uint192) accountId() ++ DOMAIN_SEPARATOR() view returns (bytes32) + +// events +- MandateGranted(permissionId, mandateType, chainHash, chain) ++ RulesGranted(bytes32 indexed rulesId, uint8 mode, bytes32 indexed chainHash, string chainNamespace, bytes32 ref) +- MandateRevoked(permissionId) ++ RulesRevoked(bytes32 indexed rulesId, address by) +- MandateActionAuthorized(permissionId, nonceKey, nonceSeq, opHash) ++ RulesActionAuthorized(bytes32 indexed rulesId, address indexed agent, bytes32 callsHash) ++ event LabelSet(string label) +``` + +**UniversalRulesPolicy** (was URP) + +```diff +~ initializeWithMultiplexer(address account, ConfigId id, bytes initData) +~ initData = abi.encode(uint16 version, string chainNamespace, bytes body) // was (string chain, bytes body) +~ rulebook chosen by namespace: this chain => native; eip155:* => universal EVM; solana:* => universal SVM ++ SVM rulebook ++ struct SvmTerms { uint48 validUntil; bytes32 expectedCEA; address asset; uint256 maxAmountPerCall; ++ uint256 maxAmountTotal; uint256 maxPCPerCall; SvmAllowedCall[] allowedCalls; } ++ struct SvmAllowedCall { bytes32 program; bytes8 discriminator; uint8 beneficiaryAccountIndex; bool hasBeneficiary; uint64 maxLamports; } ++ gates mirror the EVM list; beneficiary checked in the accounts array, payload gate for the SVM outbound format +~ checkAction: UniversalOutboundTxRequest imported from the gateway package +~ gate 4c MIN_OUTBOUND_BODY_LEN recomputed from the imported struct +~ gate 9 (maxPCForGas != 0) removed when the six-field gateway struct lands; deploy in the same window +~ creditRevert(id, account, outboundTxId, amount): caller is the real executor module, set at initialize += or removed if the credit path is replaced (decision pending) += assertSpent (both overloads), getConfig, getNativeConfig, getMode, pushChainHash, isCredited ++ getSvmConfig(ConfigId, address) view +- event URPPolicySet(...) ++ event RulesConfigured(bytes32 indexed configId, address indexed multiplexer, address indexed account, uint8 mode, bytes32 chainHash) += OutboundMetered, NativeCallMetered, RevertCredited +~ storage variables renamed $configs, $credited, $mode, $native to _configs, _credited, _mode, _native (labels only, slots unchanged) ++ _svm mapping appended after _native; __gap shrinks by one +~ version() returns "2.0.0" +``` + +**PushSessionValidator** + +```diff +- validateConfig(bytes keyConfig) +- validateSignatureWithData(bytes32 hash, bytes sig, bytes keyConfig) +- contract removed (D3). Session.sessionValidator and keyConfig are replaced by a single address in the rules: the agent. +``` + +**Not in this change set** (belongs to 8183, listed so nobody looks for it here): the fund hook's key-match and expiry checks, the marketplace, the evaluator. + +# 4c. What the SDK rule shape changes in the contracts (PROPOSED 2026-10-02) + +Page 5 (SDK: AGW) settled the shape of a cross-chain rule in `client.agentic.create`. Three of those SDK changes touch the contracts. Nothing else on page 5 does. Names are the post-rename names from section 3; struct changes are to the universal terms URP decodes from the rules envelope. + +**1. One rule can move several tokens: `assets: AssetCap[]` replaces `asset`, `maxAmountPerCall`, `maxAmountTotal`.** + +The SDK takes each asset as the token's address on the rule's chain (`MOVEABLE.TOKEN..` or the native marker) and resolves it to the PRC20 on Push before encoding, so the contract keeps storing PRC20 addresses. The spend counter becomes per asset. + +```diff +// universal EVM terms (and SvmTerms, same change) +- address asset; uint256 maxAmountPerCall; uint256 maxAmountTotal; ++ AssetCap[] assets; // 0..MAX_ASSETS; empty = call contracts, move nothing ++ struct AssetCap { address token; uint256 maxPerCall; uint256 maxTotal; } // token: PRC20 on Push; maxTotal 0 = no total cap ++ uint8 constant MAX_ASSETS = 8; + +// metering +~ amount gate: the token being moved must be one of assets[]; per-call and running total checked against that entry +~ _spent[configId] becomes per token: mapping(address token => uint256 spent) +~ assertSpent(configId, account) returns the per-token totals; the existing single-amount overload goes +~ OutboundMetered carries the token +``` + +**2. `maxGasPerCall` replaces `maxPCPerCall`.** + +Rename only. Same meaning: the PC (wei) the wallet may pass as `msg.value` on one outbound for the destination leg. The gate that checks it does not change. + +```diff +- uint256 maxPCPerCall; ++ uint256 maxGasPerCall; +``` + +**3. The struct, as it ends up.** + +SDK side, what `create` takes per rule (page 5, 3.b). `agent` and `ref` go to `grantRules`, the rest is encoded into the rules envelope. + +```tsx +interface UniversalRule { + agent: Address; // Push address: EOA, or the UEA of an external key + ref?: Hex; // emitted in RulesGranted, not interpreted + chainNamespace: ForeignChainNamespace; + assets: AssetCap[]; // tokens the agent may move on chainNamespace; 0..8 + maxGasPerCall: bigint; // PC (wei) per outbound for the destination leg + validUntil: number; + allowedCalls: AllowedCall[]; +} + +interface AssetCap { + token: MoveableToken | Address; // the other chain's token address (MOVEABLE.TOKEN..) or the native marker + maxPerCall: bigint; + maxTotal?: bigint; +} +``` + +Contract side, what URP decodes from the envelope body for an `eip155` namespace (`SvmTerms` takes the same `assets` and `maxGasPerCall` fields). + +```solidity +struct AssetCap { + address token; // PRC20 on Push, resolved by the SDK from the other chain's address + uint256 maxPerCall; + uint256 maxTotal; // 0 = no running cap +} + +struct UniversalTerms { + uint48 validUntil; + bytes32 expectedCEA; + AssetCap[] assets; // 0..MAX_ASSETS; empty = call contracts, move nothing + uint256 maxGasPerCall; // PC (wei) per outbound + AllowedCall[] allowedCalls; // unchanged +} + +uint8 constant MAX_ASSETS = 8; +``` + +# 5. Open for review on this page + +1. D3: removing the validator. Needs the v3 branch check on how SmartSession's engine is entered (signature path vs a sender-gated call into the same policy checks). If the engine cannot be entered without a signature, the fallback is a validator that accepts a trivial signature from the sender, which keeps the identity model and loses nothing but elegance. +2. Checkpoint kinds, since they are the evaluator's contract with the wallet. +3. `creditRevert`: wire the executor module, or replace the credit path. +4. Anything in the rename map or the diff that should stay as is. + +The SDK surface lives on page 5 (SDK: AGW). + +# 6. Changes proposed on 12 Oct 2026 + +These come from the review of the first SDK implementation, [push-chain-sdk PR #291](https://github.com/pushchain/push-chain-sdk/pull/291), which runs against the v5 contracts on Donut. Sections 0 to 5 above are left exactly as they were. Where an entry here differs from them, the entry here is the current one. The SDK side of each change is on [5. SDK: AGW](https://app.notion.com/p/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9?pvs=21) (page 5), section 6. + +Struct and field names below are shown by meaning. Where the v5 source names a field differently, the source name wins. + +| # | Change | Contract | Replaces above | SDK side (page 5) | +| --- | --- | --- | --- | --- | +| 6.1 | The wallet approves the gateway itself, for the exact amount, inside each outbound | AGW | new | 6.g | +| 6.2 | One factory call deploys the wallet and grants its rules | AGWFactory, AGW | new (page 5 called this "item 11") | 6.b | +| 6.3 | Pins on EVM destination calls | UniversalRulesPolicy | new | 6.a | +| 6.4 | `ref` removed from `grantRules` | AGW | section 4 item 3, and the `ref` lines in 4b and 4c | 6.b, 6.c, 6.d | +| 6.5 | A cap of 0 means nothing moves | UniversalRulesPolicy | "0 = no total cap" in 4c | 6.b | + +### 6.1 The wallet approves the gateway itself, for the exact amount, inside each outbound + +**What happens today.** When the wallet sends a token to another chain, `UniversalGatewayPC` takes the token out of the wallet. That needs an ERC20 approval from the wallet to the gateway. Nothing in the wallet sets it, so the owner has to send `approve(gateway, amount)` through the owner door before the agent's first cross-chain send. If the owner skips it, the agent's send fails. + +**Why that is wrong.** + +- Granting a rule with an asset cap already says how much the agent may move. A second, separate permission is a step no user expects. +- The approval goes through the owner door, so it records an `OWNER_ACTION` checkpoint. An owner who raises the allowance during a job is treated as having changed something mid-job. +- `revokeRules` and `revokeAllRules` do not clear the allowance. It stays on the wallet. +- When the allowance runs out, the agent stops until the owner returns. + +**Change.** The wallet sets the approval itself, for the exact amount of the outbound, in the same transaction, on both doors. + +```diff +// AGW, owner door and agent door +~ execute / executeWithSig / executeAsAgent +~ when a call's target is UNIVERSAL_GATEWAY_PC and its selector is sendUniversalTxOutbound(req): ++ before the call: approve req.token to UNIVERSAL_GATEWAY_PC for req.amount ++ after the call: allowance is 0 again (the gateway took exactly req.amount; reset it if anything is left) +~ agent door order: the rules policy checks req against the rules first, then the approval, then the gateway call += a native-coin outbound (no token pulled) is untouched +``` + +No standing allowance exists at any point outside the call. There is nothing to top up, nothing left after a revoke, and no checkpoint, because the owner did nothing. + +To confirm while implementing: whether the gateway takes anything from the wallet beyond `req.amount` (a fee in the token). If it does, the approval must cover that amount as well. + +### 6.2 One factory call deploys the wallet and grants its rules + +**What happens today.** An external owner sends deploy and grants as one UEA multicall. A Push EOA owner cannot (core rejects a multicall from a Push-native sender), so the SDK sends the deploy and then each grant as its own transaction. If a later grant fails, the wallet exists with only some of its rules. + +**Change.** A factory entry that does both in one transaction, for any owner. Either the wallet exists with every rule passed, or the transaction reverts as a whole. + +```diff +// AGWFactory ++ createWallet(string label, Session[] rules) returns (address wallet, bytes32[] rulesIds) ++ caller is the owner ++ deploys the wallet, then grants every rule, in order; reverts as a whole if any grant fails ++ rules may be empty, in which case it behaves as deployWallet ++ rulesIds are the same ids grantRules would have returned, in the order passed += deployWallet(string label) // unchanged += deployWalletWithSig(...) // unchanged + +// AGW ++ the wallet accepts its first rules from the factory, and only during its own deployment +~ each rule granted this way emits RulesGranted and records a RULES_GRANTED checkpoint, exactly as grantRules does +``` + +To decide: whether a signed variant (`createWalletWithSig`, same digest rules as `deployWalletWithSig` with the rules hashed in) lands in the same change. The marketplace's `startJob` deploys a wallet with rules for the user, so it would use that variant. + +### 6.3 Pins on EVM destination calls + +**What happens today.** All rule checks run on Push, in the rules policy, before the wallet is allowed to call the gateway. For an outbound to an EVM chain the policy unpacks the payload and checks each destination call's target, selector, beneficiary and value. It has no field for a general pin. A rule cannot say "argument 0 of `supply` must be USDC", so an agent allowed to call `supply` can pass any asset the wallet's CEA holds. The Push rulebook has argument pins, and the Solana rulebook has account and data pins. The EVM destination rulebook is the only one without them. + +**Change.** The EVM allowed call gains a list of pins, read from the destination call's calldata the same way the beneficiary already is. A pin either requires an argument to equal a value or to not exceed a value. + +```diff +// libraries/Types.sol + struct ArgPin { += offset; // byte position of the argument in the call's calldata ++ uint8 op; // 0 = EQ: the 32 bytes at offset must equal value ++ // 1 = MAX: the 32 bytes at offset, read as uint256, must not exceed value += bytes32 value; + } + +// universal EVM terms + struct AllowedCall { += target; selector; beneficiary offset and flag; maxValue; ++ ArgPin[] pins; // 0..MAX_PINS (8) + } + +// UniversalRulesPolicy, EVM rulebook +~ checkAction: for each destination call in the payload, after the target, selector, beneficiary and value checks, ++ check every pin of the matching allowed call against that call's calldata ++ reverts reuse the Push rulebook's pin error (ArgPinMismatch) for EQ, and add one for MAX + +// UniversalRulesPolicy, Push rulebook ++ the same op on its pins, so a MAX pin is an ordinary pin there too += the metered argument and the call counter stay in the contract; the SDK no longer exposes them +``` + +The SDK now has one rule shape for every chain, with pins inside each allowed call (page 5, 6.a). Until this lands, the SDK rejects a pin on an EVM destination call before signing, and compiles a `max` pin on a Push call to the existing metered argument (one per call). + +The SDK also folds `beneficiary` into pins: it is written as a pin whose expected value is the wallet itself (page 5, 6.a). Until this change lands, the SDK compiles that pin to the existing beneficiary check, one per call. Once pins exist on EVM destination calls, the same check is an ordinary EQ pin against the wallet's CEA, and the dedicated beneficiary offset and flag on `AllowedCall` can be retired. To decide: retire them in this change, or keep them. + +### 6.4 `ref` removed from `grantRules` + +Section 4 item 3 added a `bytes32 ref` to `grantRules` so a job could bind to a rules id. It is not needed: `rulesId` is generated at grant, and that id is what a job, a card or an indexer latches on to. The v5 contracts on Donut already grant without it. + +```diff +// AGW +- grantRules(Session session, bytes32 ref) returns (bytes32 rulesId) ++ grantRules(Session session) returns (bytes32 rulesId) +- grantRulesWithSig(Session session, bytes32 ref, uint48 deadline, bytes ownerSig) returns (bytes32 rulesId) ++ grantRulesWithSig(Session session, uint48 deadline, bytes ownerSig) returns (bytes32 rulesId) +- RulesGranted(bytes32 indexed rulesId, uint8 mode, bytes32 indexed chainHash, string chainNamespace, bytes32 ref) ++ RulesGranted(bytes32 indexed rulesId, uint8 mode, bytes32 indexed chainHash, string chainNamespace) += Checkpointed(uint64 indexed seq, uint8 kind, bytes32 ref, uint64 blockNumber) // keeps its ref: the checkpoint's own reference +``` + +The `ref?: Hex` field on the SDK struct in 4c goes with it. + +### 6.5 A cap of 0 means nothing moves + +4c says `maxTotal: 0` means no total cap. That is reversed. A wallet whose purpose is to limit an agent must not hand out an unlimited budget because a field was left empty. + +```diff +// universal terms (EVM and SVM) + struct AssetCap { += address token; += uint256 maxPerCall; +- uint256 maxTotal; // 0 = no running cap ++ uint256 maxTotal; // 0 = the agent cannot move this token + } +// same reading for the native coin caps on a Push call: 0 = no native coin may be sent +``` + +The v5 contracts on Donut already treat an explicit zero as "cannot move". The gap was in the SDK, which sent the largest possible number when `maxTotal` was left out. It now sends 0 (page 5, 6.b). + +### 6.6 Checked, no contract change needed + +- **`setLabel` is not a checkpoint.** Item 10 in section 4 already says so and the v5 contract behaves that way. The first SDK implementation routed the rename through the owner door, which does record a checkpoint. The fix is in the SDK: it calls `setLabel` on the wallet directly (page 5, 6.f). +- **First-use destination gas.** The 500,000 default that fails when a CEA is deployed on first use is an SDK default. No contract change (page 5, 6.g). +- **`spent` on rule records.** The counters are already readable from the policy. The SDK puts them back on the record (page 5, 6.c and 6.d). +- **Deleting a rule.** The SDK renames `rules.revoke` to `rules.delete` (page 5, 6.m). `revokeRules` and `revokeAllRules` already remove the rule from the session engine for good, so the contract does what the new name says. The contract names stay as they are. \ No newline at end of file diff --git a/plan/agw/research/section6-feedback-2026-10-12/contracts-previous.md b/plan/agw/research/section6-feedback-2026-10-12/contracts-previous.md new file mode 100644 index 00000000..029e3e82 --- /dev/null +++ b/plan/agw/research/section6-feedback-2026-10-12/contracts-previous.md @@ -0,0 +1,362 @@ +# 1. AGW Contract Changes (nomenclature standard + change set) + + + +# 0. Before the naming: AGW will break when the gateway is upgraded + +**What happened.** The gateway team changed the outbound request struct on GitHub main. Two fields are gone (`gasPrice`, `maxPCForGas`). AGW copied the old struct into its own repo and URP checks one of the removed fields (gate 9: `maxPCForGas` must be non-zero). + +**Why it still works today.** Donut is still running the old gateway (implementation `0x1e41...a659` has the old eight fields). + +**What breaks.** The day the new gateway is deployed on Donut, every cross-chain rule set stops working: URP rejects every request. + +**Fix, two rules.** + +1. AGW never copies a gateway or core struct. It imports them from the gateway and core packages, so a change upstream fails the build instead of failing on-chain. +2. The URP upgrade and the gateway upgrade go out together, not separately. + +Same rule for the selector: derive `sendUniversalTxOutbound.selector` from the interface, do not hardcode `0x77b86bec`. + +# 1. How core and gateway name things (the standard AGW follows) + +These conventions already exist in `push-chain-core-contracts` and `push-chain-gateway-contracts`. AGW adopts them as is. Where the two repos disagree, the AGW column says which one wins. + +| Area | Convention | Example | AGW | +| --- | --- | --- | --- | +| Contract names | Chain-agnostic components spell out Universal. Push-side variants add PC. Accounts are 3-letter acronyms. | `UniversalCore`, `UniversalGatewayPC`, `UEA`, `CEAFactory` | `AGW`, `AGWFactory`, `UniversalRulesPolicy` | +| Errors | One `libraries/Errors.sol` per repo, one error library per contract, PascalCase, arguments only when the caller needs them. Caller checks are `CallerIsNotX`. | `UEAErrors.InvalidCall()`, `CommonErrors.ZeroAddress()`, `CallerIsNotUEModule()` | `AGWErrors`, `AGWFactoryErrors`, `UniversalRulesPolicyErrors` | +| Types and constants | One `libraries/Types.sol`, plain file-level structs, `UPPER_SNAKE` constants, selectors derived not hardcoded. | `struct Multicall`, `MULTICALL_SELECTOR = bytes4(keccak256("UEA_MULTICALL"))` | `libraries/Types.sol`; gateway and core structs imported, never copied | +| Request shape | One `XRequest` struct as the single argument; the contract infers the kind. Users never state a type. | `sendUniversalTxOutbound(UniversalOutboundTxRequest req)` infers `TX_TYPE` | `grantRules(Session)` infers `NATIVE` vs `UNIVERSAL` from `chainNamespace` | +| Interface sections | Tag plus number banners, events first, NatSpec on everything. | `UGPC_1: EVENTS`, `UGPC_2: OUTBOUND TX`, `UGPC_3: VIEW FUNCTIONS` | `AGW_1: EVENTS` ... `AGW_5: VIEWS`, `URP_1` ... `URP_3` | +| Functions | `setX`, `getX`, `isX`. Set-once wiring is read through `UPPER_CASE()` getters. | `isSupportedToken()`, `UNIVERSAL_CORE()` | `SESSION_ENGINE()`, `RULES_POLICY()`, `UNIVERSAL_GATEWAY_PC()` | +| Storage | Internal state is underscore-prefixed. | `_walletCount` | `_` everywhere; drop URP's `$` prefix | +| Roles | `UPPER_SNAKE_ROLE`. | `DEFAULT_ADMIN_ROLE`, `PAUSER_ROLE`, `TSS_ROLE` | same; `PAUSER` and `OPERATOR` split kept, documented | +| Chain identity | Full CAIP-2 string, field named `chainNamespace`. | `"eip155:1"` | envelope field renamed `chain` to `chainNamespace` | +| Events | No consistent rule upstream. | `SetChainMeta` (imperative), `VaultPCUpdated` (past) | past tense: `RulesGranted`, `WalletDeployed` | +| Layout | `src/` with `interfaces/` and `libraries/`; numbered docs and tests; addresses per network; `CLAUDE.md` in every package. | `docs/1_PUSH_CHAIN.md`, `test/gateway/1_adminActions.t.sol`, `docs/addresses/sepolia.md` | same, see rename map | + +#### Where each convention was seen (open only if you want the receipts) + +Core repo, folder layout: + +``` +src/ + Interfaces/ IUniversalCore.sol, IUEA.sol, ICEA.sol + libraries/ Errors.sol, Types.sol, Utils.sol + uea/ UEAFactory.sol, UEA_EVM.sol, UEA_SVM.sol + cea/ CEAFactory.sol, CEA.sol + UniversalCore.sol, PRC20.sol, WPC.sol +``` + +Gateway repo, folder layout: + +``` +contracts/evm-gateway/ + src/ UniversalGateway.sol, UniversalGatewayPC.sol, Vault.sol, VaultPC.sol + src/interfaces/ IUniversalGatewayPC.sol, IVault.sol + src/libraries/ Errors.sol, Types.sol, TypesUG.sol, TypesUGPC.sol + docs/ 1_PUSH_CHAIN.md, 2_UniversalGateway.md, 3_UniversalGatewayPC.md + docs/addresses/ sepolia.md, bsc-testnet.md + test/gateway/ 1_adminActions.t.sol ... 14_gatewayPC.t.sol + script/ 1_DeployGatewayWithProxy.sol, 3_UpgradeGatewayNewImpl.sol + CLAUDE.md +``` + +Errors (core, `libraries/Errors.sol`): + +```solidity +library CommonErrors { error ZeroAddress(); error Unauthorized(); error InvalidInput(); } +library UniversalCoreErrors { error CallerIsNotUEModule(); error GasLimitBelowBase(uint256 provided, uint256 minimum); } +library UEAErrors { error InvalidCall(); error ExecutionFailed(); } +``` + +Types (core, `libraries/Types.sol`): + +```solidity +struct UniversalAccountId { string chainNamespace; string chainId; bytes owner; } +struct Multicall { address to; uint256 value; bytes data; } +bytes4 constant MULTICALL_SELECTOR = bytes4(keccak256("UEA_MULTICALL")); +``` + +Request shape (gateway, `TypesUGPC.sol` and `IUniversalGatewayPC.sol`): + +```solidity +struct UniversalOutboundTxRequest { bytes recipient; address token; uint256 amount; uint256 gasLimit; bytes payload; address revertRecipient; } +function sendUniversalTxOutbound(UniversalOutboundTxRequest calldata req) external payable; // TX_TYPE inferred inside +``` + +Interface sections and wiring getters (gateway, `IUniversalGatewayPC.sol`): + +```solidity +// UGPC_1: EVENTS +// UGPC_2: OUTBOUND TX +// UGPC_3: VIEW FUNCTIONS +function UNIVERSAL_CORE() external view returns (address); +``` + +Events (both repos, no single rule): + +```solidity +event SetChainMeta(...); // core, imperative +event PauserRoleGranted(...); // core, past tense +event UniversalTxOutbound(...); // gateway, noun +event VaultPCUpdated(...); // gateway, past tense +``` + +Chain identity, the same field name with two meanings: + +```solidity +gasPriceByChainNamespace("eip155:1") // UniversalCore: full CAIP-2 string +UniversalAccountId({ chainNamespace: "eip155", chainId: "1" }) // Read State: split +``` + +# 2. Decisions + +| # | Decision | Outcome | +| --- | --- | --- | +| D1 | Wallet contract name | **AGW.sol** (account acronym like UEA, CEA). Full form "Agentic Wallet" in the NatSpec title only. Factory stays `AGWFactory.sol`. | +| D2 | Policy contract name | **UniversalRulesPolicy.sol**. `URP` stays as the short form in comments, events and the SDK constant, the way `UGPC` stands for `UniversalGatewayPC`. | +| D3 | Validator contract name | PROPOSED 2026-09-29: **no validator.** The agent is a Push address: a native key is its own EOA, any external key (EVM, Solana, anything) is its UEA, deterministic from (chain, owner). Cross-VM signature verification already happens inside the UEA, so the agent door checks `msg.sender == rules.agent` and hands the calls to URP. `PushSessionValidator.sol` is removed rather than renamed. Pending one check against the v3 branch: how deep SmartSession's signature path is wired into the engine calls URP relies on, and whether the policy engine can be driven from a sender check without forking it. | +| D4 | Vocabulary for the granted object | **rules, one word everywhere.** On-chain: `grantRules`, `revokeRules`, `revokeAllRules`, `rulesId`, `RulesGranted`, `RulesRevoked`, `RulesActionAuthorized`. Layer: Universal Rules. SDK: `client.agentic.rules`. `permissionId` remains the SmartSession-internal name and is exposed as `rulesId`. `mandate` is retired from code, docs and copy. +**Rename boundary (2026-09-29).** Three vocabularies live in the fork; only ours is renamed. ERC-7579 names stay (`execute(mode, executionCalldata)`, `ModeCode`, module types, `installModule`). SmartSession names stay inside the engine and on the interfaces URP implements (`Session`, `permissionId`, `PolicyData`, `ActionData`, `ConfigId`, `enableSessions`, `isPermissionEnabled`, `IPolicy.checkAction`, `initializeWithMultiplexer`): audit history and upstream diffs attach to those names. Push's own words (`mandate`, `PushAgentWallet`, our events, envelope, docs, SDK) become rules. The seam is the AGW ABI: `rulesId` is computed by the engine's `getPermissionId(Session)` and the NatSpec states `rulesId == permissionId`. If the engine is vendored with edits, it lives in `src/vendor/smartsession/` with a note naming the upstream commit and every local change. If D3 ends with the engine dropped, SmartSession vocabulary leaves with it. | +| D5 | Door functions | Keep `execute` (owner door). Agent door becomes `executeAsAgent(bytes32 rulesId, bytes32 mode, bytes executionCalldata)`, gated on `msg.sender == rules.agent`, replacing `executeWithSession` and its signature blob (follows D3). "Owner door" and "agent door" stay as NatSpec language. | +| D6 | Chain field in the envelope | Rename `chain` to `chainNamespace`, full CAIP-2 string, matching `UniversalCore` and gateway events. Read State keeps its split fields; the SDK converts. | +| D7 | Mode names | `NATIVE` and `UNIVERSAL` stay. The SVM rulebook is selected by the `solana` namespace inside `UNIVERSAL`; no new mode name. | + +# 3. Rename map (current to proposed) + +| Area | Today | Proposed | +| --- | --- | --- | +| Inherited names (7579, SmartSession) | `execute(mode, executionCalldata)`, `Session`, `permissionId`, `PolicyData`, `ActionData`, `ConfigId`, `checkAction`, `initializeWithMultiplexer` | unchanged (see D4 rename boundary) | +| Wallet | `PushAgentWallet.sol` | `AGW.sol` | +| Factory | `AGWFactory.sol` | `AGWFactory.sol` (unchanged) | +| Policy | `policies/URP.sol` | `UniversalRulesPolicy.sol` | +| Validator | `validators/PushSessionValidator.sol` | removed (D3): agent identity is a Push address, verification lives in the UEA | +| Interfaces | `IPushAgentWallet`, `IURP`, `IPushSessionValidator`, local `IUniversalGatewayPC`, `IPRC20Source` | `IAGW`, `IUniversalRulesPolicy`; gateway and core interfaces imported (`IUEAFactory` for `computeUEA` in tests and tooling) | +| Errors | `libraries/PushWalletErrors.sol` plus errors declared in `IURP` and `IAGWFactory` | `libraries/Errors.sol` with `AGWErrors`, `AGWFactoryErrors`, `UniversalRulesPolicyErrors`; reuse `CommonErrors` names (`ZeroAddress`, `Unauthorized`, `AlreadyInitialized`); `AGWErrors.CallerIsNotAgent()` | +| Types | `libraries/PushWalletTypes.sol` re-declares `UniversalOutboundTxRequest`, `Multicall` | `libraries/Types.sol` with AGW-owned structs only (`RulesEnvelope`, `NativeTerms`, `UniversalTerms`, `AllowedCall`, `ArgPin`, `AmountRule`); gateway and core types imported | +| Grant / revoke | `grantMandate`, `stopMandate`, `stopAll` | `grantRules`, `revokeRules`, `revokeAllRules` | +| Events | `MandateGranted`, `MandateRevoked`, `MandateActionAuthorized`, `URPPolicySet` | `RulesGranted`, `RulesRevoked`, `RulesActionAuthorized`, `RulesConfigured` | +| Ids | `permissionId` in wallet ABI | `rulesId` in wallet ABI (engine keeps `permissionId` internally) | +| Wiring getters | `sessionEngine()`, `urp()`, `sessionValidator()`, `universalGateway()` | `SESSION_ENGINE()`, `RULES_POLICY()`, `UNIVERSAL_GATEWAY_PC()` (no validator getter, D3) | +| Storage prefix | `_` in wallet and factory, `$` in URP | `_` everywhere | +| Envelope | `abi.encode(string chain, bytes body)` | `abi.encode(uint16 version, string chainNamespace, bytes body)` | +| Interface banners | none | `AGW_1: EVENTS`, `AGW_2: OWNER DOOR`, `AGW_3: AGENT DOOR`, `AGW_4: RULES LIFECYCLE`, `AGW_5: VIEWS`; `URP_1: EVENTS`, `URP_2: POLICY`, `URP_3: VIEWS`; `AGWF_1: EVENTS`, `AGWF_2: DEPLOY`, `AGWF_3: VIEWS` | +| Selector constant | `SEND_OUTBOUND_SELECTOR = 0x77b86bec` | derived from `IUniversalGatewayPC` | +| Roles | `PAUSER_ROLE` pauses, `OPERATOR_ROLE` unpauses | keep the split, document it as a deliberate deviation from gateway | +| Event tense | past tense | past tense, written down as the rule | +| Docs | `docs/v3-architecture.md`, `agentic_wallet_flow.md`, `push_native_agentic_wallet_flow.md` | `docs/1_AGW.md`, `2_UniversalRulesPolicy.md`, `3_Universal_Flow.md`, `4_Native_Flow.md` | +| Addresses | `deployments/address-book-v3/ADDRESSES.md` | `docs/addresses/donut.md` | +| Tests | `test/unit/*.t.sol`, `test/integration/*.t.sol` | numbered by area: `1_factory`, `2_ownerDoor`, `3_rulesLifecycle`, `4_agentDoor`, `5_universalRulebook`, `6_nativeRulebook`, `7_externalAgentViaUEA`, `8_e2e` | + +# 4. Structural changes that ride along with the rename + +Agreed on 2026-09-28. Listed here so the rename and the additions land in one change set and one audit, before the permanent deployment. + +1. **Signature-authorized variants**: `deployWalletWithSig`, `grantRulesWithSig`, `executeWithSig`. One EIP-712 domain per contract. Digest includes chainid, contract, nonce (the wallet's grant nonce for grants; a per-owner nonce on the factory), deadline. Verify ECDSA, and ERC-1271 when the owner has code (a UEA). +2. **Checkpoints**: the wallet records owner-side changes an evaluator needs: principal moved out (owner-door value or token transfer out, and every outbound), rules granted, revoked or replaced, key changed. Per-wallet monotonic counter plus `Checkpointed(kind, ref, blockNumber)`, so an evaluator can ask "any checkpoint after block N" with one read. +3. **`bytes32 ref` on `grantRules`**, emitted in `RulesGranted`, so a job binds to a rules id and an indexer goes rules to job without the hook. +4. **Stop-only role: dropped for v1** (2026-10-01). A binder address that could call `revokeRules` and nothing else was considered so a job hook could end rules at job end. Not needed: rules expire by `validUntil`, which the fund hook requires to be at or after the job's `expiredAt`, caps bound the gap, and the hook keeps its own one-live-job slot. Additive to bring back later. +5. **Envelope version word**: `abi.encode(uint16 version, string chainNamespace, bytes body)`. +6. **`creditRevert` reachability**: wire the real executor module or replace the credit path. Today spend never decreases on Donut. +7. **SVM rulebook** in the policy, keyed by the `solana` namespace: 32-byte `expectedCEA` and targets, program plus instruction discriminator allow-list, beneficiary check over the accounts array, SVM payload gate. +8. **Import gateway and core types**, derive the outbound selector, sequence the URP upgrade with the gateway's struct change. +9. **Agent identity is a Push address** (2026-09-29). The rules name an address: an EOA, or the UEA of an external key. The agent door checks the sender instead of verifying a session signature; the validator contract goes. One identity for rules, card and 8183 provider, so the fund hook matches by equality. Sizing against the v3 branch pending (D3). +10. **Editable label** (2026-10-01). `setLabel(string label)` on AGW, owner only, emits `LabelSet(string label)`. Today the label is only passed at `deployWallet` and emitted in `WalletDeployed`. Not a checkpoint kind: cosmetic metadata, evaluators ignore it. SDK: `w.setLabel(label)` on page 5. + +# 4b. Contract surface, as a diff + +Read `+` as added, `-` as removed, `~` as changed in place, `=` as unchanged. Names are the post-rename names. Storage slots never move; renames are labels only. + +**AGWFactory** + +```diff += deployWallet(string label) returns (address wallet) // caller is the owner ++ deployWalletWithSig(address owner, uint96 index, string label, ++ uint48 deadline, bytes ownerSig) returns (address) // EIP-712; index must equal walletCount(owner) ++ // ownerSig: ECDSA, or ERC-1271 when owner has code (UEA) ++ DOMAIN_SEPARATOR() view returns (bytes32) += predictWallet(address owner, uint256 index) view returns (address, bool deployed) += walletCount / ownerOf / isWallet / indexOf / walletImplementation += pause() PAUSER_ROLE, unpause() OPERATOR_ROLE += event WalletDeployed(owner, index, wallet, label) +``` + +**AGW** (was PushAgentWallet) + +```diff +// owner door += execute(bytes32 mode, bytes executionCalldata) payable // owner only, no policy +~ execute now emits Checkpointed(seq, OWNER_ACTION, keccak(calldata), block) ++ executeWithSig(bytes32 mode, bytes executionCalldata, ++ uint64 ownerNonce, uint48 deadline, bytes ownerSig) // owner door by signature, same effects as execute ++ ownerNonce() view returns (uint64) ++ setLabel(string label) // owner only; emits LabelSet; not a checkpoint + +// rules lifecycle +- grantMandate(Session) returns (bytes32 permissionId) ++ grantRules(Session session, bytes32 ref) returns (bytes32 rulesId) // ref: job or card reference, emitted, not interpreted ++ grantRulesWithSig(Session session, bytes32 ref, uint48 deadline, bytes ownerSig) returns (bytes32 rulesId) ++ // digest includes grantNonce, so a signed grant cannot replay +- stopMandate(bytes32 permissionId) ++ revokeRules(bytes32 rulesId) // owner or self +- stopAll() ++ revokeAllRules() // owner or self + +// agent door (D3, D5) +- executeWithSession(address validator, bytes32 mode, bytes executionCalldata, +- bytes signature, uint192 nonceKey, uint64 nonceSeq, uint48 requestExpiry) ++ executeAsAgent(bytes32 rulesId, bytes32 mode, bytes executionCalldata) ++ requires msg.sender == agentOf(rulesId); replay and expiry come from the sender's own tx (EOA nonce, or the UEA's) ++ URP checks every call exactly as before; no signature blob, no validator address ++ agentOf(bytes32 rulesId) view returns (address) + +// checkpoints ++ checkpointCount() view returns (uint64) ++ lastCheckpointBlock() view returns (uint64) ++ event Checkpointed(uint64 indexed seq, uint8 kind, bytes32 ref, uint64 blockNumber) ++ kind: 0 OWNER_ACTION (any owner-door execute), 1 RULES_GRANTED, 2 RULES_REVOKED ++ emitted from execute, executeWithSig, grantRules*, revokeRules, revokeAllRules + +// views (wiring, renamed to UPPER_CASE) +- sessionEngine() urp() sessionValidator() universalGateway() ++ SESSION_ENGINE() RULES_POLICY() UNIVERSAL_GATEWAY_PC() += owner() factory() grantNonce() getNonce(uint192) accountId() ++ DOMAIN_SEPARATOR() view returns (bytes32) + +// events +- MandateGranted(permissionId, mandateType, chainHash, chain) ++ RulesGranted(bytes32 indexed rulesId, uint8 mode, bytes32 indexed chainHash, string chainNamespace, bytes32 ref) +- MandateRevoked(permissionId) ++ RulesRevoked(bytes32 indexed rulesId, address by) +- MandateActionAuthorized(permissionId, nonceKey, nonceSeq, opHash) ++ RulesActionAuthorized(bytes32 indexed rulesId, address indexed agent, bytes32 callsHash) ++ event LabelSet(string label) +``` + +**UniversalRulesPolicy** (was URP) + +```diff +~ initializeWithMultiplexer(address account, ConfigId id, bytes initData) +~ initData = abi.encode(uint16 version, string chainNamespace, bytes body) // was (string chain, bytes body) +~ rulebook chosen by namespace: this chain => native; eip155:* => universal EVM; solana:* => universal SVM ++ SVM rulebook ++ struct SvmTerms { uint48 validUntil; bytes32 expectedCEA; address asset; uint256 maxAmountPerCall; ++ uint256 maxAmountTotal; uint256 maxPCPerCall; SvmAllowedCall[] allowedCalls; } ++ struct SvmAllowedCall { bytes32 program; bytes8 discriminator; uint8 beneficiaryAccountIndex; bool hasBeneficiary; uint64 maxLamports; } ++ gates mirror the EVM list; beneficiary checked in the accounts array, payload gate for the SVM outbound format +~ checkAction: UniversalOutboundTxRequest imported from the gateway package +~ gate 4c MIN_OUTBOUND_BODY_LEN recomputed from the imported struct +~ gate 9 (maxPCForGas != 0) removed when the six-field gateway struct lands; deploy in the same window +~ creditRevert(id, account, outboundTxId, amount): caller is the real executor module, set at initialize += or removed if the credit path is replaced (decision pending) += assertSpent (both overloads), getConfig, getNativeConfig, getMode, pushChainHash, isCredited ++ getSvmConfig(ConfigId, address) view +- event URPPolicySet(...) ++ event RulesConfigured(bytes32 indexed configId, address indexed multiplexer, address indexed account, uint8 mode, bytes32 chainHash) += OutboundMetered, NativeCallMetered, RevertCredited +~ storage variables renamed $configs, $credited, $mode, $native to _configs, _credited, _mode, _native (labels only, slots unchanged) ++ _svm mapping appended after _native; __gap shrinks by one +~ version() returns "2.0.0" +``` + +**PushSessionValidator** + +```diff +- validateConfig(bytes keyConfig) +- validateSignatureWithData(bytes32 hash, bytes sig, bytes keyConfig) +- contract removed (D3). Session.sessionValidator and keyConfig are replaced by a single address in the rules: the agent. +``` + +**Not in this change set** (belongs to 8183, listed so nobody looks for it here): the fund hook's key-match and expiry checks, the marketplace, the evaluator. + +# 4c. What the SDK rule shape changes in the contracts (PROPOSED 2026-10-02) + +Page 5 (SDK: AGW) settled the shape of a cross-chain rule in `client.agentic.create`. Three of those SDK changes touch the contracts. Nothing else on page 5 does. Names are the post-rename names from section 3; struct changes are to the universal terms URP decodes from the rules envelope. + +**1. One rule can move several tokens: `assets: AssetCap[]` replaces `asset`, `maxAmountPerCall`, `maxAmountTotal`.** + +The SDK takes each asset as the token's address on the rule's chain (`MOVEABLE.TOKEN..` or the native marker) and resolves it to the PRC20 on Push before encoding, so the contract keeps storing PRC20 addresses. The spend counter becomes per asset. + +```diff +// universal EVM terms (and SvmTerms, same change) +- address asset; uint256 maxAmountPerCall; uint256 maxAmountTotal; ++ AssetCap[] assets; // 0..MAX_ASSETS; empty = call contracts, move nothing ++ struct AssetCap { address token; uint256 maxPerCall; uint256 maxTotal; } // token: PRC20 on Push; maxTotal 0 = no total cap ++ uint8 constant MAX_ASSETS = 8; + +// metering +~ amount gate: the token being moved must be one of assets[]; per-call and running total checked against that entry +~ _spent[configId] becomes per token: mapping(address token => uint256 spent) +~ assertSpent(configId, account) returns the per-token totals; the existing single-amount overload goes +~ OutboundMetered carries the token +``` + +**2. `maxGasPerCall` replaces `maxPCPerCall`.** + +Rename only. Same meaning: the PC (wei) the wallet may pass as `msg.value` on one outbound for the destination leg. The gate that checks it does not change. + +```diff +- uint256 maxPCPerCall; ++ uint256 maxGasPerCall; +``` + +**3. The struct, as it ends up.** + +SDK side, what `create` takes per rule (page 5, 3.b). `agent` and `ref` go to `grantRules`, the rest is encoded into the rules envelope. + +```tsx +interface UniversalRule { + agent: Address; // Push address: EOA, or the UEA of an external key + ref?: Hex; // emitted in RulesGranted, not interpreted + chainNamespace: ForeignChainNamespace; + assets: AssetCap[]; // tokens the agent may move on chainNamespace; 0..8 + maxGasPerCall: bigint; // PC (wei) per outbound for the destination leg + validUntil: number; + allowedCalls: AllowedCall[]; +} + +interface AssetCap { + token: MoveableToken | Address; // the other chain's token address (MOVEABLE.TOKEN..) or the native marker + maxPerCall: bigint; + maxTotal?: bigint; +} +``` + +Contract side, what URP decodes from the envelope body for an `eip155` namespace (`SvmTerms` takes the same `assets` and `maxGasPerCall` fields). + +```solidity +struct AssetCap { + address token; // PRC20 on Push, resolved by the SDK from the other chain's address + uint256 maxPerCall; + uint256 maxTotal; // 0 = no running cap +} + +struct UniversalTerms { + uint48 validUntil; + bytes32 expectedCEA; + AssetCap[] assets; // 0..MAX_ASSETS; empty = call contracts, move nothing + uint256 maxGasPerCall; // PC (wei) per outbound + AllowedCall[] allowedCalls; // unchanged +} + +uint8 constant MAX_ASSETS = 8; +``` + +# 5. Open for review on this page + +1. D3: removing the validator. Needs the v3 branch check on how SmartSession's engine is entered (signature path vs a sender-gated call into the same policy checks). If the engine cannot be entered without a signature, the fallback is a validator that accepts a trivial signature from the sender, which keeps the identity model and loses nothing but elegance. +2. Checkpoint kinds, since they are the evaluator's contract with the wallet. +3. `creditRevert`: wire the executor module, or replace the credit path. +4. Anything in the rename map or the diff that should stay as is. + +The SDK surface lives on page 5 (SDK: AGW). \ No newline at end of file diff --git a/plan/agw/research/section6-feedback-2026-10-12/contracts.diff b/plan/agw/research/section6-feedback-2026-10-12/contracts.diff new file mode 100644 index 00000000..1a763256 --- /dev/null +++ b/plan/agw/research/section6-feedback-2026-10-12/contracts.diff @@ -0,0 +1,147 @@ +--- previous/1-agw-contract-changes.md ++++ latest/1-agw-contract-changes.md +@@ -359,4 +359,144 @@ + 3. `creditRevert`: wire the executor module, or replace the credit path. + 4. Anything in the rename map or the diff that should stay as is. + +-The SDK surface lives on page 5 (SDK: AGW).+The SDK surface lives on page 5 (SDK: AGW). ++ ++# 6. Changes proposed on 12 Oct 2026 ++ ++These come from the review of the first SDK implementation, [push-chain-sdk PR #291](https://github.com/pushchain/push-chain-sdk/pull/291), which runs against the v5 contracts on Donut. Sections 0 to 5 above are left exactly as they were. Where an entry here differs from them, the entry here is the current one. The SDK side of each change is on [5. SDK: AGW](https://app.notion.com/p/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9?pvs=21) (page 5), section 6. ++ ++Struct and field names below are shown by meaning. Where the v5 source names a field differently, the source name wins. ++ ++| # | Change | Contract | Replaces above | SDK side (page 5) | ++| --- | --- | --- | --- | --- | ++| 6.1 | The wallet approves the gateway itself, for the exact amount, inside each outbound | AGW | new | 6.g | ++| 6.2 | One factory call deploys the wallet and grants its rules | AGWFactory, AGW | new (page 5 called this "item 11") | 6.b | ++| 6.3 | Pins on EVM destination calls | UniversalRulesPolicy | new | 6.a | ++| 6.4 | `ref` removed from `grantRules` | AGW | section 4 item 3, and the `ref` lines in 4b and 4c | 6.b, 6.c, 6.d | ++| 6.5 | A cap of 0 means nothing moves | UniversalRulesPolicy | "0 = no total cap" in 4c | 6.b | ++ ++### 6.1 The wallet approves the gateway itself, for the exact amount, inside each outbound ++ ++**What happens today.** When the wallet sends a token to another chain, `UniversalGatewayPC` takes the token out of the wallet. That needs an ERC20 approval from the wallet to the gateway. Nothing in the wallet sets it, so the owner has to send `approve(gateway, amount)` through the owner door before the agent's first cross-chain send. If the owner skips it, the agent's send fails. ++ ++**Why that is wrong.** ++ ++- Granting a rule with an asset cap already says how much the agent may move. A second, separate permission is a step no user expects. ++- The approval goes through the owner door, so it records an `OWNER_ACTION` checkpoint. An owner who raises the allowance during a job is treated as having changed something mid-job. ++- `revokeRules` and `revokeAllRules` do not clear the allowance. It stays on the wallet. ++- When the allowance runs out, the agent stops until the owner returns. ++ ++**Change.** The wallet sets the approval itself, for the exact amount of the outbound, in the same transaction, on both doors. ++ ++```diff ++// AGW, owner door and agent door ++~ execute / executeWithSig / executeAsAgent ++~ when a call's target is UNIVERSAL_GATEWAY_PC and its selector is sendUniversalTxOutbound(req): +++ before the call: approve req.token to UNIVERSAL_GATEWAY_PC for req.amount +++ after the call: allowance is 0 again (the gateway took exactly req.amount; reset it if anything is left) ++~ agent door order: the rules policy checks req against the rules first, then the approval, then the gateway call ++= a native-coin outbound (no token pulled) is untouched ++``` ++ ++No standing allowance exists at any point outside the call. There is nothing to top up, nothing left after a revoke, and no checkpoint, because the owner did nothing. ++ ++To confirm while implementing: whether the gateway takes anything from the wallet beyond `req.amount` (a fee in the token). If it does, the approval must cover that amount as well. ++ ++### 6.2 One factory call deploys the wallet and grants its rules ++ ++**What happens today.** An external owner sends deploy and grants as one UEA multicall. A Push EOA owner cannot (core rejects a multicall from a Push-native sender), so the SDK sends the deploy and then each grant as its own transaction. If a later grant fails, the wallet exists with only some of its rules. ++ ++**Change.** A factory entry that does both in one transaction, for any owner. Either the wallet exists with every rule passed, or the transaction reverts as a whole. ++ ++```diff ++// AGWFactory +++ createWallet(string label, Session[] rules) returns (address wallet, bytes32[] rulesIds) +++ caller is the owner +++ deploys the wallet, then grants every rule, in order; reverts as a whole if any grant fails +++ rules may be empty, in which case it behaves as deployWallet +++ rulesIds are the same ids grantRules would have returned, in the order passed ++= deployWallet(string label) // unchanged ++= deployWalletWithSig(...) // unchanged ++ ++// AGW +++ the wallet accepts its first rules from the factory, and only during its own deployment ++~ each rule granted this way emits RulesGranted and records a RULES_GRANTED checkpoint, exactly as grantRules does ++``` ++ ++To decide: whether a signed variant (`createWalletWithSig`, same digest rules as `deployWalletWithSig` with the rules hashed in) lands in the same change. The marketplace's `startJob` deploys a wallet with rules for the user, so it would use that variant. ++ ++### 6.3 Pins on EVM destination calls ++ ++**What happens today.** All rule checks run on Push, in the rules policy, before the wallet is allowed to call the gateway. For an outbound to an EVM chain the policy unpacks the payload and checks each destination call's target, selector, beneficiary and value. It has no field for a general pin. A rule cannot say "argument 0 of `supply` must be USDC", so an agent allowed to call `supply` can pass any asset the wallet's CEA holds. The Push rulebook has argument pins, and the Solana rulebook has account and data pins. The EVM destination rulebook is the only one without them. ++ ++**Change.** The EVM allowed call gains a list of pins, read from the destination call's calldata the same way the beneficiary already is. A pin either requires an argument to equal a value or to not exceed a value. ++ ++```diff ++// libraries/Types.sol ++ struct ArgPin { ++= offset; // byte position of the argument in the call's calldata +++ uint8 op; // 0 = EQ: the 32 bytes at offset must equal value +++ // 1 = MAX: the 32 bytes at offset, read as uint256, must not exceed value ++= bytes32 value; ++ } ++ ++// universal EVM terms ++ struct AllowedCall { ++= target; selector; beneficiary offset and flag; maxValue; +++ ArgPin[] pins; // 0..MAX_PINS (8) ++ } ++ ++// UniversalRulesPolicy, EVM rulebook ++~ checkAction: for each destination call in the payload, after the target, selector, beneficiary and value checks, +++ check every pin of the matching allowed call against that call's calldata +++ reverts reuse the Push rulebook's pin error (ArgPinMismatch) for EQ, and add one for MAX ++ ++// UniversalRulesPolicy, Push rulebook +++ the same op on its pins, so a MAX pin is an ordinary pin there too ++= the metered argument and the call counter stay in the contract; the SDK no longer exposes them ++``` ++ ++The SDK now has one rule shape for every chain, with pins inside each allowed call (page 5, 6.a). Until this lands, the SDK rejects a pin on an EVM destination call before signing, and compiles a `max` pin on a Push call to the existing metered argument (one per call). ++ ++The SDK also folds `beneficiary` into pins: it is written as a pin whose expected value is the wallet itself (page 5, 6.a). Until this change lands, the SDK compiles that pin to the existing beneficiary check, one per call. Once pins exist on EVM destination calls, the same check is an ordinary EQ pin against the wallet's CEA, and the dedicated beneficiary offset and flag on `AllowedCall` can be retired. To decide: retire them in this change, or keep them. ++ ++### 6.4 `ref` removed from `grantRules` ++ ++Section 4 item 3 added a `bytes32 ref` to `grantRules` so a job could bind to a rules id. It is not needed: `rulesId` is generated at grant, and that id is what a job, a card or an indexer latches on to. The v5 contracts on Donut already grant without it. ++ ++```diff ++// AGW ++- grantRules(Session session, bytes32 ref) returns (bytes32 rulesId) +++ grantRules(Session session) returns (bytes32 rulesId) ++- grantRulesWithSig(Session session, bytes32 ref, uint48 deadline, bytes ownerSig) returns (bytes32 rulesId) +++ grantRulesWithSig(Session session, uint48 deadline, bytes ownerSig) returns (bytes32 rulesId) ++- RulesGranted(bytes32 indexed rulesId, uint8 mode, bytes32 indexed chainHash, string chainNamespace, bytes32 ref) +++ RulesGranted(bytes32 indexed rulesId, uint8 mode, bytes32 indexed chainHash, string chainNamespace) ++= Checkpointed(uint64 indexed seq, uint8 kind, bytes32 ref, uint64 blockNumber) // keeps its ref: the checkpoint's own reference ++``` ++ ++The `ref?: Hex` field on the SDK struct in 4c goes with it. ++ ++### 6.5 A cap of 0 means nothing moves ++ ++4c says `maxTotal: 0` means no total cap. That is reversed. A wallet whose purpose is to limit an agent must not hand out an unlimited budget because a field was left empty. ++ ++```diff ++// universal terms (EVM and SVM) ++ struct AssetCap { ++= address token; ++= uint256 maxPerCall; ++- uint256 maxTotal; // 0 = no running cap +++ uint256 maxTotal; // 0 = the agent cannot move this token ++ } ++// same reading for the native coin caps on a Push call: 0 = no native coin may be sent ++``` ++ ++The v5 contracts on Donut already treat an explicit zero as "cannot move". The gap was in the SDK, which sent the largest possible number when `maxTotal` was left out. It now sends 0 (page 5, 6.b). ++ ++### 6.6 Checked, no contract change needed ++ ++- **`setLabel` is not a checkpoint.** Item 10 in section 4 already says so and the v5 contract behaves that way. The first SDK implementation routed the rename through the owner door, which does record a checkpoint. The fix is in the SDK: it calls `setLabel` on the wallet directly (page 5, 6.f). ++- **First-use destination gas.** The 500,000 default that fails when a CEA is deployed on first use is an SDK default. No contract change (page 5, 6.g). ++- **`spent` on rule records.** The counters are already readable from the policy. The SDK puts them back on the record (page 5, 6.c and 6.d). ++- **Deleting a rule.** The SDK renames `rules.revoke` to `rules.delete` (page 5, 6.m). `revokeRules` and `revokeAllRules` already remove the rule from the session engine for good, so the contract does what the new name says. The contract names stay as they are. \ No newline at end of file diff --git a/plan/agw/research/section6-feedback-2026-10-12/download-manifest.json b/plan/agw/research/section6-feedback-2026-10-12/download-manifest.json new file mode 100644 index 00000000..8df178fa --- /dev/null +++ b/plan/agw/research/section6-feedback-2026-10-12/download-manifest.json @@ -0,0 +1,18 @@ +[ + { + "page": "sdk", + "export_entry": "Private & Shared/5 SDK AGW 3e9188aea7f481cf8e8de324956549b9.md", + "sha256": "7f8e6e892686fc298bd0a40d66d7e21cb457711e18a272e563322403bc0380ec", + "exported_at": "2026-10-12T14:53:27.075673+00:00", + "local_file": "plan/agw/notion/5-sdk-agw.md", + "native_export_includes_comments": false + }, + { + "page": "contracts", + "export_entry": "Private & Shared/1 AGW Contract Changes (nomenclature standard + ch 3e9188aea7f4813aa31fc95ceb4e684d.md", + "sha256": "7d1690747f52a32a2e3c9eac64422db8dbc673729f370156da2c83c06634bac4", + "exported_at": "2026-10-12T14:53:27.077622+00:00", + "local_file": "plan/agw/notion/1-agw-contract-changes.md", + "native_export_includes_comments": false + } +] diff --git a/plan/agw/research/section6-feedback-2026-10-12/previous-latest-refresh.json b/plan/agw/research/section6-feedback-2026-10-12/previous-latest-refresh.json new file mode 100644 index 00000000..b0d1334c --- /dev/null +++ b/plan/agw/research/section6-feedback-2026-10-12/previous-latest-refresh.json @@ -0,0 +1,135 @@ +{ + "run_id": "20261007T102718466408Z", + "pulled_at": "2026-10-07T10:27:18.466408+00:00", + "complete": true, + "missing_page_ids": [], + "unknown_export_entries": [], + "archives": [ + "notion/exports/20261007T102718466408Z/export-1.zip", + "notion/exports/20261007T102718466408Z/export-2.zip", + "notion/exports/20261007T102718466408Z/export-3.zip", + "notion/exports/20261007T102718466408Z/export-4.zip" + ], + "pages": [ + { + "page_id": "3e9188aea7f481c8b38ccba332b0afa2", + "title": "AGW design overview", + "local_file": "notion/overview.md", + "changed": false, + "previous_sha256": "f2d7954e018324a937282ca190f397cc12a27973a07c891f3edfd6e89383c53e", + "sha256": "f2d7954e018324a937282ca190f397cc12a27973a07c891f3edfd6e89383c53e", + "raw_export_sha256": "99b727bd58cf588b2c766dc1b93eff402c47e918718b69c2a456b119ad43435b" + }, + { + "page_id": "3e9188aea7f4813aa31fc95ceb4e684d", + "title": "1 AGW Contract Changes", + "local_file": "notion/1-agw-contract-changes.md", + "changed": false, + "previous_sha256": "f1301d8ff1cf370968b90a3d53037ece8fa4c6783c45a402f9be6998928e3631", + "sha256": "f1301d8ff1cf370968b90a3d53037ece8fa4c6783c45a402f9be6998928e3631", + "raw_export_sha256": "f1301d8ff1cf370968b90a3d53037ece8fa4c6783c45a402f9be6998928e3631" + }, + { + "page_id": "3e9188aea7f48118b90ac9b267496295", + "title": "2 Universal Marketplace", + "local_file": "notion/2-universal-marketplace.md", + "changed": false, + "previous_sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18", + "sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18", + "raw_export_sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18" + }, + { + "page_id": "3e9188aea7f48188a838c3a740d8c858", + "title": "3 ERC-8183 job kernel and hook", + "local_file": "notion/3-8183-job-kernel-and-hook.md", + "changed": false, + "previous_sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90", + "sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90", + "raw_export_sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90" + }, + { + "page_id": "3e9188aea7f4817bb03ef4c78c883f8b", + "title": "4 Universal Evaluation", + "local_file": "notion/4-universal-evaluation.md", + "changed": false, + "previous_sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f", + "sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f", + "raw_export_sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f" + }, + { + "page_id": "3e9188aea7f481cf8e8de324956549b9", + "title": "5 SDK AGW", + "local_file": "notion/5-sdk-agw.md", + "changed": true, + "previous_sha256": "e407ee77cdf874db7ef4697f84e9945ff3a12a2f2e07e8a7f90bd24e93ea32f1", + "sha256": "d3bc55b08a37d762c49173149fd8d554a8551682c0956de3e91394a54bfed9a6", + "raw_export_sha256": "8d024eb2bd2955fc772d2194f50a02d601a2d5bf903b0c9cc74882ee11348130" + }, + { + "page_id": "3ea188aea7f481e2961ed97129f3a4e6", + "title": "6 SDK Universal Marketplace", + "local_file": "notion/6-sdk-universal-marketplace.md", + "changed": false, + "previous_sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c", + "sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c", + "raw_export_sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c" + }, + { + "page_id": "3ea188aea7f481e0a137f5a896723376", + "title": "7 SDK ERC-8183 Job", + "local_file": "notion/7-sdk-8183-job.md", + "changed": false, + "previous_sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c", + "sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c", + "raw_export_sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c" + }, + { + "page_id": "3ea188aea7f48197a3b3cfdedfa74fee", + "title": "8 SDK Universal Evaluation", + "local_file": "notion/8-sdk-universal-evaluation.md", + "changed": false, + "previous_sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e", + "sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e", + "raw_export_sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e" + }, + { + "page_id": "d2d188aea7f4825cbcea81ef86eca607", + "title": "Legacy PUSH AGW SDK Doc v1", + "local_file": "notion/legacy-agw-sdk-v1.md", + "changed": false, + "previous_sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916", + "sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916", + "raw_export_sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916" + }, + { + "page_id": "3d1188aea7f480ddbb4af6d0efb211e6", + "title": "AGW Address Book PC Donut", + "local_file": "notion/agw-address-book-donut-2026-09-04.md", + "changed": false, + "previous_sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742", + "sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742", + "raw_export_sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742" + }, + { + "page_id": "3d1188aea7f4801f9cb3fbd9318ec536", + "title": "Agentic wallet flow updated", + "local_file": "notion/agentic-wallet-flow-2026-09-07.md", + "changed": false, + "previous_sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0", + "sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0", + "raw_export_sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0" + } + ], + "review_status": "Review required", + "contract_deployment_followup": { + "checked_on": "2026-10-07", + "documentation_commit": "bd230d20dbf778d9994b1f1082f79b1a8829a10f", + "deployed_source_commit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", + "generation": "v5", + "chain_id": 42101, + "readonly_block": 23991912, + "evidence": "research/deployment-review-2026-10-07-v5/README.md", + "sdk_validation": "research/v5-implementation-2026-10-07/README.md", + "notion_reexported_for_this_followup": false + } +} diff --git a/plan/agw/research/section6-feedback-2026-10-12/previous-questions-harsh.md b/plan/agw/research/section6-feedback-2026-10-12/previous-questions-harsh.md new file mode 100644 index 00000000..612b716a --- /dev/null +++ b/plan/agw/research/section6-feedback-2026-10-12/previous-questions-harsh.md @@ -0,0 +1,25 @@ +# AGW SDK — product decisions confirmed + +Updated October 7, 2026 from Shoaib’s relayed team answers and SDK-owned decision approval. There are no remaining product questions in this document. + + +## 1–2. Defaults and token model + +Omitted native `maxValuePerCall` and `maxValueTotal` are `0`: no native PC value allowance. Retain the current `assets[]` model and independent per-token budgets. The SDK matches these decisions. + + +## 3. Solana rules + +Use named inputs from an IDL. The SDK now exposes `SolanaRule`, compiles supported Anchor layouts, derives wallet accounts, and returns exact decoded constraints. Unsupported layouts fail explicitly. See the [consumer guide](../../packages/core/AGW.md#solana-rules-using-named-idl-inputs). + + +## 4. Native/EVM argument restrictions + +Keep both ABI argument-index and raw-offset inputs, with exact offsets on reads. Shoaib approved this SDK-owned choice. Inputs that specify both forms are rejected; normal examples should prefer argument indexes. + + +## 5. Contract validation and SDK errors — clarified + +The intended behavior is that the existing contract rejects unauthorized functions/actions under the supplied rule, and the SDK maps those errors. This does not request automatic rule selection or a new contract interface. The SDK retains `AMBIGUOUS_RULE` when multiple enabled rules match the agent and chain, without submitting a transaction. No caller-facing rule selector is being added. + +Rule `ref` is removed from scope; editable labels are delivered and implemented against v5. [Zaryab delivery items](questions-zaryab.md). diff --git a/plan/agw/research/section6-feedback-2026-10-12/previous-questions-zaryab.md b/plan/agw/research/section6-feedback-2026-10-12/previous-questions-zaryab.md new file mode 100644 index 00000000..dc44347a --- /dev/null +++ b/plan/agw/research/section6-feedback-2026-10-12/previous-questions-zaryab.md @@ -0,0 +1,12 @@ +# AGW SDK — contract delivery status + +Updated October 7, 2026 after the v5 deployment. **No remaining standalone AGW contract question needs an answer from Zaryab.** + + + +The label interface and compatible deployment are delivered in `deploy-agw@bd230d2` (deployed source `2e61e13`). The SDK now uses the new factory, reads stored labels and implements owner-only `setLabel` with empty reset and the 64-byte limit. [Deployment verification](research/deployment-review-2026-10-07-v5/README.md) · [SDK migration and acceptance](research/v5-implementation-2026-10-07/README.md). + + +Named-IDL Solana authoring, removal of rule `ref`, zero native PC defaults and the existing token model remain settled. Native/EVM inputs accept argument indexes or raw offsets. The SDK retains AMBIGUOUS_RULE; the contract validates the supplied rule. No automatic-selection interface change is requested. + +Push-core spend credit and bridge retry timing remain separate downstream follow-ups. They do not block the label integration. diff --git a/plan/agw/research/section6-feedback-2026-10-12/sdk-export.zip b/plan/agw/research/section6-feedback-2026-10-12/sdk-export.zip new file mode 100644 index 00000000..bab91a19 Binary files /dev/null and b/plan/agw/research/section6-feedback-2026-10-12/sdk-export.zip differ diff --git a/plan/agw/research/section6-feedback-2026-10-12/sdk-latest.md b/plan/agw/research/section6-feedback-2026-10-12/sdk-latest.md new file mode 100644 index 00000000..c87d0fec --- /dev/null +++ b/plan/agw/research/section6-feedback-2026-10-12/sdk-latest.md @@ -0,0 +1,1352 @@ +# 5. SDK: AGW + + + +# List of changes + +New + +- `client.agentic.derive` +- `client.agentic.create` +- `client.agentic.list` +- `client.agentic.wallet`, + - a management handle with + - `info`, + - `owner`, + - `setLabel` (PROPOSED), + - `checkpoints`, + - `rules.list`, + - `rules.get`, + - `rules.add`, + - `rules.update`, + - `rules.revoke` +- `PushChain.CONSTANTS.AGENTIC` +- `~~PushChain.utils.agentic~~` (dropped 12 Oct 2026, see 6.h) + +Updated + +- `PushChain.initialize`, new option `agenticWallet` +- `PushChain.CONSTANTS.READ.CHAIN`, outside change confirmed 2026-09-28 + +Initialize is unchanged on the owner side: + +```tsx +const client = await PushChain.initialize(universalSigner, { network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET }); +``` + +| Signer | Door | Rules checked | +| --- | --- | --- | +| The wallet's owner | Owner door (`execute`) | No. Every send is recorded as a checkpoint | +| An address named as `agent` in one of the wallet's rules | Agent door (`executeAsAgent`) | Yes, by URP (UniversalRulesPolicy, the on-chain rule checker) | +| Anyone else | None | Never reached: `initialize` throws `NOT_OWNER_OR_AGENT` | + +An agentic wallet involves three parties, and it helps to have them straight before reading the functions. + +The **owner** is whoever created the wallet. When the owner sends through the wallet, no rules are checked; this is called the owner door, and the contract records every such action as a checkpoint so that an evaluator can later tell whether the owner touched anything mid-job. + +The **agent** is the address the owner allows to act on its behalf. It is always a Push address. If the agent's key is a Push EOA, that EOA is the agent. If the key lives on another chain (an EVM key on Ethereum, a Solana key, anything else), the agent is that key's UEA on Push, which exists deterministically for every external key. The SDK never asks for a curve, a chain or a key type. When the agent sends through the wallet, the rules are checked; this is the agent door. + +The **rules** say what an agent may do. Each rule names its agent and its destination chain, and there is one rule per chain per agent, so a wallet can have one agent for Ethereum and a different one for Solana. The `chainNamespace` on a rule decides which rulebook applies: leave it out and the rule governs calls on Push itself; set it to an `eip155` or `solana` chain and the rule governs cross-chain calls to that chain. + +Two ways to touch a wallet from the SDK. `PushChain.initialize(signer, { agenticWallet })` returns a client that acts as the wallet, and whether it goes through the owner door or the agent door depends on who the signer is. `client.agentic.wallet(address)` returns a handle for managing the wallet (rules, label, checkpoints) and never sends as it. + +# 1. Owner side, by example + +The owner side is everything the person who owns the wallet does: create it, fund it, write and revoke the rules, look at what happened. The agent side (section 2) is what the agent does: act through the wallet within those rules. + +### 1.a Derive an agentic wallet address - `client.agentic.derive` + +Gives you the address a wallet will have before it is deployed. The address depends only on the owner and an index. + +```tsx +// Function +const first = await client.agentic.derive({ options? }) + +// Usage and Params +const next = await client.agentic.derive(); // the owner's next wallet +const first = await client.agentic.derive({ index: 0 }); // a specific slot +// options.index number, optional which wallet slot to derive; default is the owner's next unused index + +// Returns +// { address, index, deployed } +{ + address: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + index: 0, + deployed: false +} +``` + +Because the address depends only on the owner and an index, it is the same whether you deploy first or later. That lets you send funds to it first (from any chain) and deploy afterwards, or show the address in a UI before anything is on-chain. Same idea as `deriveExecutorAccount` for a UEA. + +### 1.b Create an agentic wallet - `client.agentic.create` + +Deploys the wallet and grants the rules. The label is the only wallet-level input; the agent and an optional `ref` are named on each rule, because that is where the contract binds them. + +```tsx +// Function +const created = await client.agentic.create(label, { options }) + +// Usage and Params +const created = await client.agentic.create('aave-optimiser', { // wallet with one cross-chain rule + rules: [{ // one entry per chain per agent + agent: '0xAgentOnPush', // a Push address: the agent's EOA, or its UEA if the key lives on another chain. Never the owner + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, // foreign chain => universal rulebook + assets: [ + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, maxPerCall: parseUnits('100', 6), maxTotal: parseUnits('1000', 6) }, + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.WETH, maxPerCall: parseUnits('0.5', 18) }, + ], + maxGasPerCall: parseUnits('1', 18), // PC (wei) per outbound for the destination leg + validUntil: now + 30 * 86400, + allowedCalls: [ + { target: aavePool, selector: 'supply(address,uint256,address,uint16)', beneficiary: 2 }, // arg index, not offset: onBehalfOf must be the AGW's CEA + { target: usdcSepolia, selector: 'approve(address,uint256)' }, + ], + }], + progressHook: (p) => console.log(p.id, p.message), // AGENTIC-TX-1xx +}); +const bare = await client.agentic.create('scratch', { rules: [] }); // wallet first, rules later with rules.add +// label string, required shown in list() and info(); the contract stores it +// options.rules Rule[], required one per chain per agent, may be empty; each rule carries its own agent and optional ref +// options.progressHook function, optional progress events, AGENTIC-TX-1xx; default none +// rules[].agent Address, required the Push address allowed to act under this rule; never the owner +// rules[].ref Hex, optional emitted in RulesGranted, not interpreted; default zero +// rules[].assets AssetCap[], required on a universal rule tokens the agent may move, as the other chain's address (MOVEABLE constants); the SDK resolves each to its PRC20 on Push; each cap is { token, maxPerCall, maxTotal? } +// rules[].maxGasPerCall bigint, required on a universal rule PC (wei) the wallet may spend per outbound for the destination leg + +// Returns +// { wallet, index, rulesIds, tx } +{ + wallet: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + index: 0, + rulesIds: ['0x9c1e...'], // in the order of the rules you passed; empty for rules: [] + tx: { // UniversalTxResponse + hash: '0xb527...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + blockNumber: 1290n, + wait // await tx.wait() for the receipt; status lives on the receipt + } +} +``` + +One rule per chain per agent. A wallet may have different agents on different chains. If an agent needs to act on two chains, `rules` has two entries with the same `agent`; two agents on one chain are two entries with the same `chainNamespace`. Nobody states a rule type; the SDK reads it from `chainNamespace`. `rules: []` is allowed: create the wallet first and grant rules later with `rules.add` (1.k). + +Before asking for a signature the SDK checks that no rule's agent is the owner (`AGENT_IS_OWNER`), that no two rules share both agent and chain (`DUPLICATE_RULE`), that every `allowedCalls[].target` is on the rule's chain (`TARGET_NOT_ON_RULE_CHAIN`), and that every `assets[].token` resolves to a PRC20 whose `SOURCE_CHAIN_NAMESPACE` matches the rule's chain (`ASSET_CHAIN_MISMATCH`). + +Under the hood this is `deployWallet` (or reuse of a derived address) and one `grantRules` per rule. For an external owner they go as one UEA multicall under one signature. Funding is not part of `create`: the wallet is a normal Push account, so send tokens and PC to its address the way you would to any account (1.a shows the address before deployment). + +For a Push EOA owner the same thing needs a batching entry on the factory, because core rejects multicall from a Push-native sender: [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) item 11, **PROPOSED** (`createWallet(label, rules[])` on the factory). Until it lands the SDK sends deploy and grant as separate transactions and says so through progress events (AGENTIC-TX-102 and 104); `tx` is then the last of them. + +A `progressHook` passed to `PushChain.initialize` receives the same events alongside the per-call one, as in core. + +Warning for an agent whose key lives on another chain: the same EVM key initialized against two chains yields two UEAs, because a UEA is derived from namespace, chainId and owner. Grant the rule to the UEA of the chain the agent will run against. `PushChain.utils.account.deriveExecutorAccount(PushChain.utils.account.toUniversal(address, { chain }))` gives it. + +### 1.c List an owner's wallets - `client.agentic.list` + +Lists the wallets owned by the connected signer. It takes no arguments and only reads the connected account. + +```tsx +// Function +const res = await client.agentic.list() + +// Usage and Params +const { wallets } = await client.agentic.list(); // the connected signer's wallets +// no params + +// Returns +// { wallets: Array<{ address, index, label, deployed, rulesCount }> } +{ + wallets: [ + { address: '0x2Fd9...', index: 0, label: 'aave-optimiser', deployed: true, rulesCount: 1 }, + { address: '0x81aB...', index: 1, label: '', deployed: false, rulesCount: 0 }, + ] +} +``` + +Client methods act on the connected account; reads about any other account live in `PushChain.utils`. If a read-only view is needed later (a marketplace or explorer page showing the wallets of an address with no signer), it becomes `PushChain.utils.agentic.wallets(owner: Address)` taking a Push address; an external owner passes its UEA. Not in v1. + +### 1.d Get a wallet handle - `client.agentic.wallet` + +Returns a handle for one wallet: the reads that are specific to an agentic wallet, plus the rule writes only an owner can do. It is not a client and never sends as the wallet. + +```tsx +// Function +const w = client.agentic.wallet(address) + +// Usage and Params +const w = client.agentic.wallet('0xWallet'); // handle for one wallet; nothing is sent +// address Address, required the AGW to manage, a Push address + +// Returns +// { address, info(), owner(), setLabel(), checkpoints(), rules.* } +{ + address: '0xWallet', + info, owner, setLabel, checkpoints, // 1.e to 1.h + rules: { list, get, add, update, revoke } // 1.i to 1.m +} +``` + +There is one way to send as the wallet: `PushChain.initialize(signer, { agenticWallet })` (section 2). The handle only manages. To send as the wallet, move funds, reach the wallet's CEA on another chain, or read balances, initialize with `agenticWallet` and use the normal account tooling: `sendTransaction`, `universal.read`, or viem and ethers against `client.universal.account`. That gives the owner the full `sendTransaction` with every route the SDK already has, the same receipts, and the wallet's CEA reachable exactly as it is for any other account. + +Balance reads are deliberately not on the handle: they are not agentic, and every account is read the same way. There is no `w.execute` for the same reason. The handle stays what its name says: management. + +### 1.e Read wallet info - `w.info` + +Returns the wallet's summary in one read: the fields `list()` shows for each wallet, plus the owner. It is how you read the label from the handle. + +```tsx +// Function +const info = await w.info() + +// Usage and Params +const { label, deployed } = await w.info(); // one wallet's summary +// no params + +// Returns +// { address, label, index, owner, deployed, rulesCount } +{ + address: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + label: 'aave-optimiser', + index: 0, + owner: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + deployed: true, + rulesCount: 1 +} +``` + +### 1.f Read the owner - `w.owner` + +Returns the owner's Push address, as the contract stores it. + +```tsx +// Function +const res = await w.owner() + +// Usage and Params +const { owner } = await w.owner(); // the Push address stored as owner +// no params + +// Returns +// { owner } +{ + owner: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9' +} +``` + +If the owner is a UEA and you need the controlling origin behind it (the chain and the external key), use `resolveControllerAccount` on the returned address. + +Page rule: identities going in and out of the agentic namespace are Push addresses (owner, agent, wallet). + +### 1.g Set the wallet label - `w.setLabel` + +**PROPOSED**, contract change, see [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) item 10. Changes the label shown in `list()` and `info()`; owner only. + +```tsx +// Function +const tx = await w.setLabel(label, { options? }) + +// Usage and Params +const tx = await w.setLabel('aave-optimiser-v2'); // rename the wallet +const tracked = await w.setLabel('aave-optimiser-v2', { progressHook: (p) => console.log(p.id) }); // with progress events +// label string, required the new label; stored by the contract and emitted in LabelSet +// options.progressHook function, optional progress events, AGENTIC-TX-106; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +{ + hash: '0x3b8d...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet + blockNumber: 1488n, + wait // await tx.wait() for the receipt; status lives on the receipt +} +``` + +Emits `LabelSet(string label)`. It is not a checkpoint: the label is cosmetic metadata and evaluators ignore it. Today the label can only be set once, at `deployWallet`, and is emitted in `WalletDeployed`. + +### 1.h Read checkpoints - `w.checkpoints` + +Every owner-side change the wallet has recorded: owner-door sends, rules granted, rules revoked. An evaluator reads these to know whether the owner changed anything after a job started (page 4). + +```tsx +// Function +const res = await w.checkpoints({ options? }) + +// Usage and Params +const all = await w.checkpoints(); // every checkpoint +const recent = await w.checkpoints({ sinceBlock: 1234n }); // from a block onward +// options.sinceBlock bigint, optional only checkpoints at or after this block; default all + +// Returns +// { checkpoints: Array<{ seq, kind, ref, blockNumber, txHash }> } +{ + checkpoints: [ + { seq: 3, kind: 'RULES_GRANTED', ref: '0x9c1e...', blockNumber: 1290n, txHash: '0x...' }, + { seq: 4, kind: 'OWNER_ACTION', ref: '0x5a7b...', blockNumber: 1402n, txHash: '0x...' }, + ] +} +``` + +### 1.i List rules - `w.rules.list` + +Returns every rule on the wallet as a decoded record, including what each rule has spent so far. + +```tsx +// Function +const res = await w.rules.list() + +// Usage and Params +const { rules } = await w.rules.list(); // the wallet's rules +// no params + +// Returns +// { rules: RulesRecord[] } +{ + rules: [ + { + rulesId: '0x9c1e...', + enabled: true, + chainNamespace: 'eip155:11155111', + agent: '0xAgentOnPush', + validUntil: 1767225600, + ref: '0x4a2f...', + rule: { /* decoded UniversalRule, as passed to create */ }, + spent: { kind: 'universal', amountSpent: 25000000n } // shape PROPOSED, see 3.b + } + ] +} +``` + +### 1.j Get one rule - `w.rules.get` + +Returns one rule by id, decoded, with what it has spent. + +```tsx +// Function +const record = await w.rules.get(rulesId) + +// Usage and Params +const record = await w.rules.get('0x9c1e...'); // one rule by id +// rulesId Hex, required the id returned by create or rules.add + +// Returns +// RulesRecord +{ + rulesId: '0x9c1e...', + enabled: true, + chainNamespace: 'eip155:11155111', + agent: '0xAgentOnPush', + validUntil: 1767225600, + ref: '0x4a2f...', + rule: { /* decoded UniversalRule */ }, + spent: { kind: 'universal', amountSpent: 25000000n } // shape PROPOSED, see 3.b +} +``` + +`spent` is a field on the record, so `get` and `list` both carry it. There is no separate spent call. + +### 1.k Add rules - `w.rules.add` + +Grants new rules on an existing wallet under one signature. The rules array comes first; `agent` and `ref` live on each rule. + +```tsx +// Function +const res = await w.rules.add(rules, { options? }) + +// Usage and Params +const one = await w.rules.add([nativeRule]); // one rule +const many = await w.rules.add([ruleOnSepolia, ruleOnPush]); // several rules, one signature +const tracked = await w.rules.add([nativeRule], { progressHook: (p) => console.log(p.id, p.message) }); // with progress events +// rules Rule[], required one per chain per agent; each rule carries its own agent and optional ref +// options.progressHook function, optional progress events, AGENTIC-TX-104; default none + +// Returns +// { rulesIds, tx } +{ + rulesIds: ['0x7d3a...'], // in the order of the rules you passed + tx: { // UniversalTxResponse + hash: '0x4c19...', + origin: 'eip155:11155111:0x31dC...', + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + blockNumber: 1501n, + wait + } +} +``` + +Records a `RULES_GRANTED` checkpoint. + +### 1.l Update rules - `w.rules.update` + +Replaces rules in a batch: each pair names one old rule and the one new rule that takes its place. + +```tsx +// Function +const res = await w.rules.update({ rules, progressHook? }) + +// Usage and Params +const one = await w.rules.update({ rules: [{ rulesId: '0x9c1e...', rule: newRule }] }); // replace one rule +const many = await w.rules.update({ rules: [{ rulesId: idA, rule: ruleA }, { rulesId: idB, rule: ruleB }] }); // replace several, one signature +const tracked = await w.rules.update({ rules: [{ rulesId: idA, rule: ruleA }], progressHook: (p) => console.log(p.id) }); // with progress events +// rules Array<{ rulesId, rule }>, required one old rule to one new rule per pair +// rules[].rulesId Hex, required the rule being replaced +// rules[].rule Rule, required the replacement; one rule per agent per chain still applies +// progressHook function, optional progress events, AGENTIC-TX-105 and 104; default none + +// Returns +// { rules: Array<{ rulesId, replaced }>, tx } +{ + rules: [ + { rulesId: '0x51c0...', replaced: '0x9c1e...' }, // new id, old id + ], + tx: { // UniversalTxResponse + hash: '0x7a02...', + origin: 'eip155:11155111:0x31dC...', + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + blockNumber: 1507n, + wait + } +} +``` + +Rules are immutable on-chain, so an update is a revoke plus a grant: for each pair the SDK asserts the old rule's spend, revokes it and grants the new one, all pairs in one multicall. The result is a new `rulesId` per pair, and the spend counters reset on the new rule: what the old rule had spent does not carry over. This is accepted for v1 (open item 1); an in-place update would be a contract change and there is no demand for it yet. + +### 1.m Revoke rules - `w.rules.revoke` + +Revokes some rules by id, or all of them in one atomic call. + +```tsx +// Function +const tx = await w.rules.revoke(rulesIds, { options? }) +const tx = await w.rules.revoke({ all, progressHook? }) + +// Usage and Params +const some = await w.rules.revoke(['0x9c1e...', '0x7d3a...']); // revoke these rules +const all = await w.rules.revoke({ all: true }); // revoke every rule, on-chain revokeAllRules +const tracked = await w.rules.revoke(['0x9c1e...'], { progressHook: (p) => console.log(p.id) }); // with progress events +// rulesIds Hex[], required unless all is set the rules to revoke +// options.progressHook function, optional progress events, AGENTIC-TX-105; default none +// all true, required unless rulesIds given revoke every rule on the wallet in one atomic call +// progressHook function, optional same events, in the { all: true } form; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +{ + hash: '0x8e01...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet + blockNumber: 1512n, + wait // await tx.wait() for the receipt; status lives on the receipt +} +``` + +A bare `revoke()` is not allowed and throws `REVOKE_NEEDS_TARGET`: a call with no argument that wipes every rule is too easy to make by mistake. Records `RULES_REVOKED` checkpoints. + +# 2. Agent side, by example + +There is no new method on the agent side. The agent uses its own signer and tells `initialize` which wallet to act through. It does not name a rule: which rule applies is decided per transaction, from the destination chain. + +### 2.a Act as the wallet - `PushChain.initialize` with `agenticWallet` (updated) + +Returns a client whose account is the wallet. Whether its sends go through the owner door or the agent door depends on who the signer is. + +```tsx +// Function +const client = await PushChain.initialize(signer, { options }) + +// Usage and Params +const agentClient = await PushChain.initialize(agentSigner, { // agent door: the signer is named as agent in a rule + network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET, + agenticWallet: '0xWallet', +}); +const ownerClient = await PushChain.initialize(ownerSigner, { // owner door: the signer owns the wallet + network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET, + agenticWallet: '0xWallet', +}); +``` + +`agentSigner` is any signer `initialize` accepts today. If the key lives on another chain, the SDK derives its UEA and everything goes through that, as it does for every external user. + +Which door the client uses depends on who the signer is. If the signer is the wallet's owner, sends go through the owner door: no rules, and every send is recorded as a checkpoint. If the signer is an address named as agent in one of the wallet's rules, sends go through the agent door and the rules apply. If it is neither, `initialize` throws `NOT_OWNER_OR_AGENT`. If the address has no wallet deployed yet it throws `WALLET_NOT_DEPLOYED`, and if the address is not an agentic wallet it throws `NOT_AGENTIC_WALLET`. This is also how an owner acts as the wallet with the full client: `PushChain.initialize(ownerSigner, { agenticWallet })`. There is one way to send as a wallet and the signer decides the door. + +On the agent door the SDK sends; URP on-chain is the only rule checker. Before sending, the SDK only looks up the `rulesId` for the destination chain: the rule that is enabled, whose `agent` equals the signer, and whose `chainNamespace` equals the destination. The lookup is one read on every send, not cached at initialize. If none is found it throws `NO_RULES_FOR_CHAIN` before any signature, so it costs nothing; otherwise it calls `executeAsAgent(rulesId, ...)` on the wallet. That is the agent door from D3 on [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21): there is no session validator, and the wallet only checks that `msg.sender` is the rule's agent. There is one rule per (agent, chain), so a signer and a destination match at most one rule. If the action breaks a rule, it reverts on-chain and the agent pays that gas. `sendTransaction` then throws `AgenticRevertError`, which extends core's `PushChainExecutionError` and carries URP's custom error in `decodedError`, so the agent sees which gate failed (3.f). + +From an external key, the call arrives through the agent's UEA. If the agent's UEA is not yet deployed, the first action takes the origin-chain fee lock once (minimum $1), which deploys the UEA and funds it with PC. Every later action requires PC in the UEA and is a direct Push transaction paid from that balance, with no origin transaction and no cross-chain wait. + +Two things for whoever runs the agent. The agent's UEA is a second balance to keep funded: the AGW's PC covers the wallet's outbound fees, not the agent's gas. And in `agenticWallet` mode the SDK turns `enforceGasCheck` on for every action except that one first action while the agent's UEA is not yet deployed, so an empty UEA fails loudly instead of silently falling back to a $1 origin lock and a confirmation wait on every action. + +Routing. In `agenticWallet` mode every send is wrapped as `executeAsAgent` (agent door) or `execute` (owner door), and for cross-chain legs the AGW itself calls the gateway. So the AGW's CEA executes on the destination and the AGW's PC pays as `msg.value`. The SDK never uses the signer's own Route 2, which would run through the agent's CEA instead of the wallet's. Any `from` (Routes 3 and 4) is rejected in `agenticWallet` mode with `FROM_NOT_ALLOWED`: it makes `msg.sender` a CEA, and the agent door check fails. + +What changes on the client in this mode: + +- `universal.account` is the wallet address string, so receipts show the AGW as `from`. `universal.origin` stays the signer's origin account. +- `getAccountStatus()` reports the signer's own UEA, not the wallet. +- The signer is whatever was passed to `initialize`. To top up the agent's UEA, find it with `PushChain.utils.account.deriveExecutorAccount(signer.account)` and send PC to it from a client initialized without `agenticWallet`. +- A Solana-keyed agent can act on Push and `eip155` destinations now, and on `solana:` destinations once the SVM rulebook ships. +- Agents read their own rules through `client.agentic.wallet(addr).rules.list()`. +- `tx.data` arrays and `tx.funds` (moving the AGW's PRC20) work as they do for any account. +- `payGasWith`, `migrateCEA`, `rescueFunds`, `prepareTransaction` and `executeTransactions` throw `NOT_ALLOWED_IN_AGENTIC_MODE`. + +```tsx +const tx = await agentClient.universal.sendTransaction({ // agent door, rule picked by the destination chain + to: { address: aavePool, chain: CHAIN.ETHEREUM_SEPOLIA }, + data: supplyData, +}); + +// tx: UniversalTxResponse +{ + hash: '0x6f2a...', + origin: 'eip155:11155111:0x7Be1...', // the agent's key, CAIP-10 + from: '0xWallet', // the AGW, not the signer + blockNumber: 1530n, + wait +} + +const receipt = await tx.wait(); +// receipt: UniversalTxReceipt +{ + status: 1, + hash: '0x6f2a...', + from: '0xWallet', + blockNumber: 1530n, + externalTxHash: '0x91c4...' // the leg executed by the AGW's CEA on Sepolia +} +``` + +The same EVM key initialized against two chains yields two UEAs (derived from namespace, chainId and owner), so the rule must name the UEA of the chain this client initializes against (see 1.b). + +# 3. Types + +### 3.a Client, options and namespace + +```tsx +type Address = `0x${string}`; +type Hex = `0x${string}`; +type ForeignChainNamespace = `eip155:${string}` | `solana:${string}`; +type ProgressHook = (p: ProgressEvent) => void; // ProgressEvent is core's shape: { id, title, message, level, response, timestamp } + +interface PushChainClient { + universal: UniversalNamespace; // in agenticWallet mode: account is the wallet + agentic: AgenticNamespace; // this page + market: MarketNamespace; // page 6 + job: JobNamespace; // page 7 + evaluation: EvaluationNamespace; // page 8 +} + +interface InitializeOptions { + network?: PUSH_NETWORK; + rpcUrls?: Partial>; + agenticWallet?: Address; // NEW: act as the wallet; door chosen by the signer's Push address + // enforceGasCheck is on when agenticWallet is set, except for the first action while the agent's UEA is not yet deployed (2.a) +} + +interface AgenticNamespace { + derive(opts?: { index?: number }): Promise<{ address: Address; index: number; deployed: boolean }>; + create(label: string, options: CreateOptions): Promise; + list(): Promise<{ wallets: WalletSummary[] }>; // connected signer only + wallet(address: Address): AgenticWallet; +} + +interface CreateOptions { + rules: Rule[]; // one entry per chain per agent, may be empty; each rule names its agent and optional ref + progressHook?: ProgressHook; // AGENTIC-TX-1xx +} + +// No AgentKey type, no curve, no chain. The agent is a Push address. A native key is its own EOA; any external key +// (EVM, Solana, anything) is its UEA, deterministic from (chain, owner), deployed lazily on first use. The AGW's agent +// door checks msg.sender == rules.agent; cross-VM signature verification already happened inside the UEA (page 1, D3). + +interface CreateResult { wallet: Address; index: number; rulesIds: Hex[]; tx: UniversalTxResponse } +interface WalletSummary { address: Address; index: number; label: string; deployed: boolean; rulesCount: number } +``` + +### 3.b Rules + +```tsx +type Rule = NativeRule | UniversalRule; // chainNamespace decides the rulebook: omitted = native, foreign = universal + +interface NativeRule { + agent: Address; // Push address: EOA, or the UEA of an external key (PushChain.utils.account.deriveExecutorAccount) + ref?: Hex; // emitted in RulesGranted, not interpreted + chainNamespace?: never; // omitted = the connected Push chain + target: Address; + selector: Selector | 'value-only'; + validUntil: number; + maxValuePerCall?: bigint; maxValueTotal?: bigint; maxCalls?: number; + pins?: { arg: number; expected: Hex | Address | bigint }[]; + amount?: { arg: number; maxPerCall: bigint; maxTotal?: bigint }; +} + +interface UniversalRule { + agent: Address; // same as NativeRule.agent + ref?: Hex; // same as NativeRule.ref + chainNamespace: ForeignChainNamespace; // "eip155:..." now; "solana:..." once the SVM rulebook ships + assets: AssetCap[]; // tokens the agent may move on chainNamespace; SDK resolves each to its PRC20 and asserts SOURCE_CHAIN_NAMESPACE + maxGasPerCall: bigint; // PC (wei) per outbound for the destination leg + validUntil: number; + allowedCalls: AllowedCall[]; // 1..32, all on chainNamespace +} + +interface AssetCap { + token: MoveableToken | Address; // the other chain's token address (MOVEABLE.TOKEN..) or the native marker; the contract stores the PRC20 + maxPerCall: bigint; + maxTotal?: bigint; +} + +type Selector = Hex | `${string}(${string})`; // '0x617ba037' or 'supply(address,uint256,address,uint16)' + +interface AllowedCall { target: Address; selector: Selector; beneficiary?: number; maxValue?: bigint } // beneficiary = arg index + +interface RulesRecord { + rulesId: Hex; + enabled: boolean; + chainNamespace: string; + agent: Address; // the Push address granted + validUntil: number; + ref: Hex; + rule: Rule; // decoded terms; NativeRule or UniversalRule + spent: Spent; // carried by rules.get and rules.list; no separate call +} + +type Spent = { kind: 'universal'; amountSpent: bigint } | { kind: 'native'; valueSpent: bigint; amountSpent: bigint; callsUsed: number }; // PROPOSED: one self-describing object, readable without knowing the rulebook +``` + +### 3.c Wallet handle and checkpoints + +```tsx +interface AgenticWallet { + address: Address; + info(): Promise; + owner(): Promise<{ owner: Address }>; // Push address as stored + setLabel(label: string, opts?: { progressHook?: ProgressHook }): Promise; // PROPOSED, page 1 item 10 + checkpoints(opts?: { sinceBlock?: bigint }): Promise<{ checkpoints: Checkpoint[] }>; + rules: { + list(): Promise<{ rules: RulesRecord[] }>; + get(rulesId: Hex): Promise; + add(rules: Rule[], opts?: { progressHook?: ProgressHook }): Promise<{ rulesIds: Hex[]; tx: UniversalTxResponse }>; + update(params: { rules: { rulesId: Hex; rule: Rule }[]; progressHook?: ProgressHook }): Promise<{ rules: { rulesId: Hex; replaced: Hex }[]; tx: UniversalTxResponse }>; // revoke plus grant; spend counters reset + revoke(rulesIds: Hex[], opts?: { progressHook?: ProgressHook }): Promise; + revoke(params: { all: true; progressHook?: ProgressHook }): Promise; + }; +} + +interface WalletInfo { address: Address; label: string; index: number; owner: Address; deployed: boolean; rulesCount: number } + +interface Checkpoint { seq: number; kind: 'OWNER_ACTION' | 'RULES_GRANTED' | 'RULES_REVOKED'; ref: Hex; blockNumber: bigint; txHash: Hex } +``` + +### ~~3.d Constants, PushChain.CONSTANTS.AGENTIC (new)~~ + +Dropped on 12 Oct 2026, except `WALLET`. See 6.h. + +```tsx +PushChain.CONSTANTS.AGENTIC[PUSH_NETWORK.TESTNET_DONUT] = { + FACTORY, RULES_POLICY, // RULES_POLICY is URP; no validator address (page 1, D3) + MAX_PINS: 8, MAX_ALLOWED_CALLS: 32, ENVELOPE_VERSION: 1, +}; +``` + +### ~~3.e Helpers, PushChain.utils.agentic (new)~~ + +Dropped on 12 Oct 2026. See 6.h. + +~~Pure functions with the same output as the on-chain views.~~ + +```tsx +PushChain.utils.agentic = { + rulesId(agent, chainNamespace, grantNonce), // the id a grant produces, same as the contract assigns + actionId(target, selector), // id of one allowed call: hash of its target and selector + configId(wallet, rulesId, actionId), // key of one allowed call's stored config, under one rule on one wallet + encodeRules(rules, ctx), // ctx = wallet and chain context needed to resolve beneficiary offsets + decodeRules(bytes), + deriveWallet(owner, index), // any-owner variant of client.agentic.derive + compileCard(card, userInput, ctx), // used by page 6; lives here because it produces Rule[] +}; +``` + +### 3.f Errors and progress + +```tsx +class AgenticError extends Error { code: string; hint?: string } +class AgenticRevertError extends PushChainExecutionError {} +// decoded custom error from the AGW, URP or the factory; uses core's fields: +// code string +// decodedError { name, hint, selector, decoded } + +// codes +// create: AGENT_IS_OWNER, DUPLICATE_RULE, TARGET_NOT_ON_RULE_CHAIN, ASSET_CHAIN_MISMATCH +// initialize (agenticWallet): NOT_OWNER_OR_AGENT, WALLET_NOT_DEPLOYED, NOT_AGENTIC_WALLET +// rules.revoke: REVOKE_NEEDS_TARGET (bare revoke) +// sendTransaction: NO_RULES_FOR_CHAIN, FROM_NOT_ALLOWED (any from, Routes 3 and 4) +// agentic mode: NOT_ALLOWED_IN_AGENTIC_MODE (prepareTransaction, executeTransactions, payGasWith, migrateCEA, rescueFunds) + +// progress events, AGENTIC-TX (PROPOSED) +// AGENTIC-TX-101 wallet derived { address, index, deployed } +// AGENTIC-TX-102 deploy step added +// AGENTIC-TX-104 rules granted { rulesIds } +// AGENTIC-TX-105 rules revoked { rulesIds | all } +// AGENTIC-TX-106 label set +// AGENTIC-TX-107 rule resolved for a send { rulesId, chainNamespace, door } +// AGENTIC-TX-199-01 done +// AGENTIC-TX-199-02 failed { code, decodedError } +// The Push leg of any agentic send also emits core's SEND-TX-1xx events. +// A cross-chain leg sent by the AGW emits 209-xx and 299-xx, never 201 to 204 (the signer's own Route 2 is never used). +``` + +**PROPOSED:** the AGENTIC-TX event list. Every write (`create`, `setLabel`, `rules.add`, `rules.update`, `rules.revoke`) takes a per-call `progressHook`; a `progressHook` passed to `PushChain.initialize` runs alongside it, as in core. + +`NO_RULES_FOR_CHAIN` is thrown before any signature and costs nothing. The rules lookup is one read on every send, not cached at initialize. A URP revert is thrown from `sendTransaction` as `AgenticRevertError` and also lands as `decodedError` on AGENTIC-TX-199-02. A destination-chain revert after URP passed still counts the spend, because the spend is counted when the outbound leaves Push; whether it is credited back depends on [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) item 6 (`creditRevert`). + +# 4. Outside change: [PushChain.CONSTANTS.READ](http://PushChain.CONSTANTS.READ).CHAIN (confirmed 2026-09-28) + +Problem: `read()` takes `chain: PushChain.CONSTANTS.CHAIN.X`, but `CHAIN` is the set of blockchains the SDK signs for and routes to. Web2 is not one, so `CHAIN.WEB2` exists as a hidden (non-enumerable) member: it works if you know it is there and never appears in any listing. Reads have a wider domain than transactions: anything validators can observe. + +Change: a read-specific constant that is a superset of `CHAIN`. The field name stays `chain`, so nothing breaks, and `CHAIN` values remain valid because the strings are identical. + +```tsx +PushChain.CONSTANTS.READ.CHAIN = { + ...PushChain.CONSTANTS.CHAIN, // every real chain, same string values + WEB2: 'web2', // non-chain source, first-class here, enumerable +}; +type ReadChain = CHAIN | 'web2'; // ReadParams.chain: ReadChain + +read({ chain: PushChain.CONSTANTS.READ.CHAIN.WEB2, ... }) +read({ chain: PushChain.CONSTANTS.CHAIN.ETHEREUM_SEPOLIA, ... }) // still compiles +``` + +- `CHAIN.WEB2` becomes a deprecated alias of `READ.CHAIN.WEB2` for one release (the docs listed it on 2026-09-22), then goes. +- Anything that iterates `CHAIN` stops seeing a fake chain; anything that iterates `READ.CHAIN` sees every read source. +- The evaluator's `Read.chain` (page 8) takes the same values, so `READ.CHAIN` is the one constant the read SDK and the criteria compiler share. + +# 5. Open for review + +1. `rules.update` resets spend counters because it is revoke plus grant. Accepted for v1 and stated in 1.l; an in-place update is a contract change with no demand yet. +2. `setLabel` assumes [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) item 10 lands. Pointer for the team. + +# 6. Changes proposed on 12 Oct 2026 + +These come from the review of the first SDK implementation, [push-chain-sdk PR #291](https://github.com/pushchain/push-chain-sdk/pull/291). Sections 1 to 5 above are left exactly as they were. Where an entry here differs from them, the entry here is the current one. Every function whose call or result changes is written out again in full, so the change can be read without scrolling up. + +Contract changes are written on [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) (page 1), section 6, and are referenced from here by item number. + +| # | Change | Replaces above | Contract change (page 1) | +| --- | --- | --- | --- | +| 6.a | One rule shape for every chain, pins inside `allowedCalls`, `beneficiary` folded into pins | 3.b `NativeRule`, `UniversalRule` | 6.3 | +| 6.b | `create` is one transaction for every owner; `ref` removed; omitted caps are 0 | 1.b | 6.2, 6.4, 6.5 | +| 6.c, 6.d | `rules.list` and `rules.get`: `spent` per asset, no `ref`, arguments read back as `arg` | 1.i, 1.j | none | +| 6.e | `rules.add` and `rules.update`: call unchanged, new rule shape | 1.k, 1.l | none | +| 6.f | `setLabel` is never a checkpoint | 1.g | none | +| 6.g | Sending as the wallet: no gateway approval step, first-use gas default | 2.a | 6.1 | +| 6.h | Types, as they end up | 3.b, `RulesRecord`, `Spent`, 3.d, 3.e | none | +| 6.i | Solana: same rule shape, pins on arguments and on accounts, no IDL in a rule | new | none | +| 6.l | Response fields and error codes added by the first implementation: accepted, with four codes removed | 3.f | none | +| 6.m | `rules.revoke` is renamed `rules.delete` | 1.m | none | + +### 6.a One rule shape for every chain + +There is one rule shape. A rule for calls on Push is the same object as a cross-chain rule with `chainNamespace` left out. What the agent may call is always a list of `allowedCalls`, and restrictions on a function's arguments sit inside each allowed call as `pins`. + +A pin restricts one argument of the allowed function. It is either `expected` (the argument must equal this constant) or `max` (the argument must not exceed this number). To require that an argument is the wallet itself, the expected value is `PushChain.CONSTANTS.AGENTIC.WALLET`. A minimum on an argument (for example a minimum amount out on a swap) is not part of v1 and is deferred to the next version. + +```tsx +// a rule on Push: chainNamespace left out +{ + agent: '0xAgentOnPush', + validUntil: now + 30 * 86400, + allowedCalls: [ + { target: vault, selector: 'deposit(address,uint256)', + pins: [ + { arg: 0, expected: beneficiary }, // argument 0 must be this address + { arg: 1, max: parseUnits('10', 18) }, // argument 1 must not exceed this, per call + ] }, + ], +} + +// a rule on Ethereum Sepolia: same shape, plus the tokens the agent may move +{ + agent: '0xAgentOnPush', + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, + assets: [ + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, maxPerCall: parseUnits('100', 6), maxTotal: parseUnits('1000', 6) }, + ], + maxGasPerCall: parseUnits('1', 18), + validUntil: now + 30 * 86400, + allowedCalls: [ + { target: aavePool, selector: 'supply(address,uint256,address,uint16)', + pins: [ + { arg: 0, expected: usdcSepolia }, // asset must be USDC + { arg: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }, // onBehalfOf must be this wallet + ] }, + { target: usdcSepolia, selector: 'approve(address,uint256)' }, + ], +} +``` + +What is gone from the shape: the separate `NativeRule` type with `target`, `selector`, `pins` and `amount` at the top of the rule, and the fields `amount.maxTotal`, `maxValueTotal` and `maxCalls`. A `max` pin limits each call only. The SDK has no per-argument lifetime total and no call counter. On a cross-chain rule the lifetime limit on a token is the asset's `maxTotal`. On a Push call the lifetime limit is what the owner funds the wallet with, plus `validUntil`. + +`beneficiary` is now a pin. On page sections above, `beneficiary: 2` meant that argument 2 must be the wallet's own account. That is a pin whose expected value is the wallet, so it is written as `{ arg: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }` and the separate field is removed. `WALLET` stands for the wallet's own account on the rule's chain: the AGW address for a call on Push, and the wallet's CEA for a call on another chain. The SDK fills in the real address when the rule is granted, so nobody has to look up a CEA. It is a marker and not an address (its value is the string `'agentic:wallet'`), because an agent card lists its rules before any wallet exists. On read, a pin whose stored value is the wallet's own account comes back as `WALLET`. + +Where each part is checked. Every check runs on Push, in the rules policy, before the wallet is allowed to make the call or hand it to the gateway. + +| On an allowed call | Call on Push | Call on an EVM destination | +| --- | --- | --- | +| `target`, `selector`, `maxValue` | Checked | Checked | +| A pin with `expected: WALLET` | Checked | Checked. One per call until page 1, 6.3 lands | +| Any other pin | Checked. Up to 8 `expected` pins and one `max` pin per call | Needs page 1, 6.3. Until it lands the SDK rejects it before signing | + +### 6.b Create an agentic wallet - `client.agentic.create` (changed) + +Deploys the wallet and grants the rules in one transaction, for every kind of owner. Either the wallet exists with every rule that was passed, or nothing happened. + +```tsx +// Function +const created = await client.agentic.create(label, { options }) + +// Usage and Params +const created = await client.agentic.create('aave-optimiser', { // wallet with one cross-chain rule + rules: [{ // one entry per chain per agent + agent: '0xAgentOnPush', // a Push address: the agent's EOA, or its UEA if the key lives on another chain. Never the owner + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, // left out = a rule for calls on Push + assets: [ + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, maxPerCall: parseUnits('100', 6), maxTotal: parseUnits('1000', 6) }, + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.WETH, maxPerCall: parseUnits('0.5', 18), maxTotal: parseUnits('2', 18) }, + ], + maxGasPerCall: parseUnits('1', 18), // PC (wei) per outbound for the destination leg + validUntil: now + 30 * 86400, + allowedCalls: [ + { target: aavePool, selector: 'supply(address,uint256,address,uint16)', + pins: [{ arg: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }] }, // onBehalfOf must be this wallet (its CEA on Sepolia) + { target: usdcSepolia, selector: 'approve(address,uint256)' }, + ], + }], + progressHook: (p) => console.log(p.id, p.message), // AGENTIC-TX-1xx +}); +const bare = await client.agentic.create('scratch', { rules: [] }); // wallet first, rules later with rules.add +// label string, required shown in list() and info(); the contract stores it +// options.rules Rule[], required one per chain per agent, may be empty; shape in 6.a +// options.progressHook function, optional progress events, AGENTIC-TX-1xx; default none +// rules[].agent Address, required the Push address allowed to act under this rule; never the owner +// rules[].chainNamespace string, optional the chain the rule governs; left out = Push +// rules[].assets AssetCap[], cross-chain rules tokens the agent may move; each cap is { token, maxPerCall, maxTotal } +// rules[].assets[].maxTotal bigint, optional lifetime cap for that token; left out = 0, and 0 means the agent cannot move it +// rules[].maxGasPerCall bigint, cross-chain rules PC (wei) the wallet may spend per outbound for the destination leg +// rules[].allowedCalls AllowedCall[], required what the agent may call; each is { target, selector, pins?, maxValue? } +// rules[].allowedCalls[].maxValue bigint, optional native coin per call; left out = 0 +// rules[].allowedCalls[].pins Pin[], optional { arg, expected } or { arg, max }; expected may be PushChain.CONSTANTS.AGENTIC.WALLET; see 6.a + +// Returns +// { wallet, index, rulesIds, tx } +{ + wallet: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + index: 0, + rulesIds: ['0x9c1e...'], // in the order of the rules you passed; empty for rules: [] + tx: { // UniversalTxResponse, always a single transaction + hash: '0xb527...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + blockNumber: 1290n, + wait // await tx.wait() for the receipt; status lives on the receipt + } +} +``` + +What changed from 1.b: + +- **One transaction for every owner.** 1.b said a Push EOA owner gets separate deploy and grant transactions until a factory entry lands. That fallback is removed. The factory entry is page 1, 6.2. There is no partial result to reconcile. +- **`ref` is removed** from every rule. The `rulesId` the grant returns is what a job, a card or an indexer latches on to. Page 1, 6.4. +- **A cap that is left out is 0, never unlimited.** That covers `assets[].maxTotal` and `allowedCalls[].maxValue`. A forgotten cap means the agent cannot move that asset, which shows up on the first send. Page 1, 6.5. Note that the WETH line in 1.b had no `maxTotal`; under this rule it would move nothing, so the example here sets one. +- **Rules use the single shape from 6.a.** +- **The beneficiary field is a pin.** `beneficiary: 2` is written as a pin on argument 2 whose expected value is `PushChain.CONSTANTS.AGENTIC.WALLET` (6.a). + +### 6.c List rules - `w.rules.list` (changed) + +Returns every enabled rule on the wallet as a decoded record, including what each rule has spent so far. + +```tsx +// Function +const res = await w.rules.list() + +// Usage and Params +const { rules } = await w.rules.list(); // the wallet's rules +// no params + +// Returns +// { rules: RulesRecord[] } +{ + rules: [ + { + rulesId: '0x9c1e...', + enabled: true, + chainNamespace: 'eip155:11155111', + agent: '0xAgentOnPush', + validUntil: 1767225600, + rule: { /* the rule in the 6.a shape, accepted as is by rules.update */ }, + spent: { // one entry per asset, same order as rule.assets + kind: 'universal', + assets: [ + { token: '0x1c7D...7238', spent: 25000000n }, // USDC + { token: '0xfFf9...6B14', spent: 0n }, // WETH + ] + } + } + ] +} +``` + +### 6.d Get one rule - `w.rules.get` (changed) + +Returns one rule by id, decoded, with what it has spent. + +```tsx +// Function +const record = await w.rules.get(rulesId) + +// Usage and Params +const record = await w.rules.get('0x9c1e...'); // one rule by id +// rulesId Hex, required the id returned by create or rules.add + +// Returns +// RulesRecord +{ + rulesId: '0x51c0...', + enabled: true, + chainNamespace: 'eip155:42101', // a rule on Push + agent: '0xAgentOnPush', + validUntil: 1767225600, + rule: { + agent: '0xAgentOnPush', + validUntil: 1767225600, + allowedCalls: [ + { target: '0xVault', selector: 'deposit(address,uint256)', + pins: [ + { arg: 0, expected: '0x00000000000000000000000000000000000000000000000000000000000b0b0b' }, + { arg: 1, max: 10000000000000000000n }, + ] }, + ], + }, + spent: { kind: 'native', valueSpent: 0n, amountSpent: 5000000000000000000n, callsUsed: 1 } +} +``` + +What changed from 1.i and 1.j: + +- **`spent` is on every record**, as 1.i and 1.j already said. The first implementation dropped it; it goes back. For a cross-chain rule it is now a list with one entry per asset, because each asset has its own budget. 1.i showed a single `amountSpent`, which predates per-asset budgets. +- **`ref` is removed** from the record, following 6.b. +- **Arguments read back as `arg`, never as a byte offset.** The contract stores a pin and a beneficiary as a byte position in the calldata (argument 0 is byte 4, argument 1 is byte 36). The SDK converts that back, so a developer who wrote `arg: 0` reads `arg: 0`. A pin on the wallet itself reads back as `WALLET`. +- **The record is accepted by `rules.update` without edits.** The test is: read a rule, change `validUntil`, pass it back. An `expected` value reads back as 32-byte hex, because the contract keeps the function selector and not the argument types; it is accepted as input in that form. + +### 6.e Add and update rules - `w.rules.add`, `w.rules.update` (call unchanged) + +The calls and results in 1.k and 1.l stay as they are. Two things change through the rule itself: rules are in the 6.a shape, and they carry no `ref`. + +### 6.f Set the wallet label - `w.setLabel` (changed) + +Changes the label shown in `list()` and `info()`. Owner only. + +```tsx +// Function +const tx = await w.setLabel(label, { options? }) + +// Usage and Params +const tx = await w.setLabel('aave-optimiser-v2'); // rename the wallet +const reset = await w.setLabel(''); // back to the default label +const tracked = await w.setLabel('aave-optimiser-v2', { progressHook: (p) => console.log(p.id) }); // with progress events +// label string, required the new label, at most 64 bytes of UTF-8; an empty string resets it to the default "AGW " +// options.progressHook function, optional progress events, AGENTIC-TX-106; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +{ + hash: '0x3b8d...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet + blockNumber: 1488n, + wait // await tx.wait() for the receipt; status lives on the receipt +} +``` + +What changed from 1.g: the function is live in the contract, so it is no longer proposed. The rule that a rename is not a checkpoint now binds the SDK too. The first implementation sent the rename through the owner door, and every owner door call records an `OWNER_ACTION` checkpoint. With the checkpoint rule for 8183 jobs, a user who renamed a wallet during a job would hand the fee to the agent over a label. The SDK must call the wallet's `setLabel` directly, for a Push EOA owner and for a UEA owner, so that the checkpoint count is the same before and after a rename. + +### 6.g Send as the wallet - `sendTransaction` with `agenticWallet` (changed) + +The call is the one in 2.a. Two things around it change. + +```tsx +// Function +const tx = await client.universal.sendTransaction({ options }) + +// Usage and Params +const agentClient = await PushChain.initialize(agentSigner, { // agent door: the signer is named as agent in a rule + network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET, + agenticWallet: '0xWallet', +}); +const tx = await agentClient.universal.sendTransaction({ // rule picked by the destination chain + to: { address: aavePool, chain: CHAIN.ETHEREUM_SEPOLIA }, + data: [ + { to: usdcSepolia, value: 0n, data: approveData }, + { to: aavePool, value: 0n, data: supplyData }, + ], + funds: { amount: parseUnits('100', 6), token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC }, +}); +// to { address, chain }, required the destination call and its chain +// data Hex or call array, optional the destination call data +// funds { amount, token }, optional the token the wallet moves with this send +// gasLimit bigint, optional destination gas; left out = the SDK default, which covers first use on a chain (see below) + +// Returns +// { hash, origin, from, blockNumber, wait() } +{ + hash: '0x6f2a...', + origin: 'eip155:11155111:0x7Be1...', // the agent's key, CAIP-10 + from: '0xWallet', // the AGW, not the signer + blockNumber: 1530n, + wait +} +``` + +What changed from 2.a: + +- **No gateway approval step.** When the wallet sends a token to another chain, the gateway on Push takes the token out of the wallet, which needs an ERC20 approval from the wallet. The first implementation left that to the owner as a separate transaction through the owner door before the agent's first send. That step is removed: the wallet approves the exact amount inside its own outbound call (page 1, 6.1). Funding a wallet is two plain transfers to its address, PC and the token. The SDK has no allowance check and no allowance error. +- **The default destination gas covers first use on a chain.** The first time a wallet sends to a chain, its account there (the CEA) is deployed as part of the call, which took about 1.3 million gas on Sepolia against a core default of 500,000. When the CEA is not deployed yet and the caller gave no `gasLimit`, the SDK uses a first-use default large enough for the deployment. When the CEA exists, the normal default applies. A `gasLimit` from the caller always wins, and `maxGasPerCall` on the rule still bounds what the agent can spend. + +### 6.h Types, as they end up + +These replace `NativeRule`, `UniversalRule`, `AllowedCall`, `RulesRecord` and `Spent` in 3.b. Everything else in section 3 stands. + +```tsx +interface Rule { + agent: Address; // Push address: EOA, or the UEA of an external key + chainNamespace?: ChainNamespace; // left out = the connected Push chain + validUntil: number; + assets?: AssetCap[]; // cross-chain rules: tokens the agent may move on chainNamespace + maxGasPerCall?: bigint; // cross-chain rules: PC (wei) per outbound for the destination leg + allowedCalls: AllowedCall[]; // 1..32 +} + +interface AssetCap { + token: MoveableToken | Address; // the other chain's token address, or the native marker + maxPerCall: bigint; + maxTotal?: bigint; // left out = 0; 0 means the agent cannot move this token +} + +interface AllowedCall { + target: Address | string; // a contract; on Solana, the program address + selector: Selector | 'value-only'; // on Solana, the instruction name with its argument types + pins?: Pin[]; + maxValue?: bigint; // native coin per call; left out = 0 +} + +type Pin = + | { arg: number; expected: Hex | Address | bigint | WalletMarker } // the argument must equal this constant, or be the wallet itself + | { arg: number; max: bigint } // the argument must not exceed this + | { account: number; expected: string | WalletMarker; token?: MoveableToken | string }; // Solana only: the account at this position must be this address, or the wallet itself; with token, the wallet's token account for that token + +type WalletMarker = typeof PushChain.CONSTANTS.AGENTIC.WALLET; // 'agentic:wallet': the wallet's own account on the rule's chain + +interface RulesRecord { + rulesId: Hex; + enabled: boolean; + chainNamespace: string; + agent: Address; + validUntil: number; + rule: Rule; // accepted as is by rules.update + spent: Spent; +} + +type Spent = + | { kind: 'native'; valueSpent: bigint; amountSpent: bigint; callsUsed: number } + | { kind: 'universal'; assets: { token: Address; spent: bigint }[] }; // one entry per asset, same order as rule.assets +``` + +`Checkpoint` in 3.c keeps its `ref` field. That one is the checkpoint's own reference (a rules id or a call hash) and has nothing to do with the rule `ref` removed in 6.b. + +`PushChain.CONSTANTS.AGENTIC` has one member, `WALLET` (6.a). The rest of 3.d (`FACTORY`, `RULES_POLICY`, `MAX_PINS`, `MAX_ALLOWED_CALLS`, `ENVELOPE_VERSION`) is dropped. Contract addresses and limits stay inside the SDK and are not exposed. The first implementation exposes all five on `PushChain.CONSTANTS.AGENTIC`; they are removed. + +`PushChain.utils.agentic` (3.e) is dropped. The ids and the encoders stay inside the SDK, `client.agentic.derive` covers deriving a wallet address, and `compileCard` is left to the marketplace page (page 6). The first implementation exposes `actionId`, `configId` and `decodeRules` on `PushChain.utils.agentic`; they are removed. + +### 6.i Solana, decided for v1 + +A Solana rule uses the same `allowedCalls` and `pins` shape as every other chain (6.a). The separate `allowedInstructions` shape of the first implementation, with an IDL and named accounts and fields, is replaced. + +```tsx +// a rule on Solana devnet +{ + agent: '0xAgentOnPush', + chainNamespace: CHAIN.SOLANA_DEVNET, + assets: [ + { token: '0x0000000000000000000000000000000000000000', maxPerCall: 10_000n, maxTotal: 20_000n }, // native SOL, in lamports + ], + maxGasPerCall: parseUnits('1', 18), + validUntil: now + 30 * 86400, + allowedCalls: [ + { target: program, // the program address + selector: 'receive_sol(u64)', // instruction name and argument types + pins: [ + { arg: 0, max: 10_000n }, // the amount + { account: 1, expected: recipient }, // account 1 must be this address + { account: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }, // account 2 must be this wallet (its CEA on Solana) + ] }, + ], +} +``` + +The selector is the instruction's name with its argument types, the same idea as an EVM function signature. It is enough to identify the instruction and to locate each argument, so a rule carries no IDL. A program that does not follow the Anchor naming is written with a raw hex selector, as on EVM. + +A Solana instruction carries two separate lists: its arguments (the values in the instruction data) and its accounts (the addresses it touches, passed beside the data). A pin says which list it means: `arg` is a position in the arguments and `account` is a position in the accounts list, both counted from 0. EVM rules only use `arg`, because an EVM call carries its addresses as arguments. + +Tokens on Solana are not held at the wallet's own address. For each token it holds, the wallet has a separate token account, whose address is derived from the wallet and the token. To require that an account is the wallet's token account for a given token, the pin names the token as well: + +```tsx +{ account: 1, expected: PushChain.CONSTANTS.AGENTIC.WALLET, token: MOVEABLE.TOKEN.SOLANA_DEVNET.USDT } // account 1 must be this wallet's USDT token account +``` + +Without `token`, `WALLET` on an account means the wallet's CEA itself, which is where native SOL sits. + +The IDL is still used where it is used today: when the call data for a send is built with `PushChain.utils.helpers.encodeTxData`, where it is passed in place of an ABI. + +Accepted for v1: + +- **A Solana rule reads back in the form it was written.** Positions go in and positions come out, so the read, change, pass back test of 6.d holds for Solana too. +- **An agent sends one Solana instruction per transaction.** Arrays of instructions are not supported on the agent door. +- **Only instructions with fixed-size arguments can be put under a rule.** Numbers up to u64, public keys, booleans and fixed-length arrays work, with top-level, non-optional accounts. Lists, strings, optional values and nested structs are rejected before signing. A deposit of an amount works; a routed swap that takes a list of hops does not. + +### 6.j Contract changes these depend on + +All on [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21), section 6. + +| Page 1 item | Contract change | Needed by | +| --- | --- | --- | +| 6.1 | The wallet approves the gateway for the exact amount inside each outbound | 6.g | +| 6.2 | One factory call that deploys the wallet and grants its rules | 6.b | +| 6.3 | Pins on EVM destination calls in the rules policy | 6.a | +| 6.4 | `ref` removed from `grantRules` | 6.b, 6.c, 6.d | +| 6.5 | A cap of 0 means nothing moves | 6.b | + +### 6.k Still open + +1. Whether the rules policy can enforce the wallet token account pin of 6.i in every case. To confirm with the contracts owner. + +### 6.l Response fields and error codes added by the first implementation + +The first implementation adds response fields and error codes that are not in 3.f. They are accepted as listed here. Four codes are removed, each for the reason given below. + +**The `agentic` object on a response.** Every send made as the wallet carries an `agentic` object on its response, so the caller can see which wallet, which door and which rule the send used. Only the fields that apply to that send are present. + +```tsx +// tx.agentic, on the UniversalTxResponse of a send made as the wallet +{ + wallet: '0xWallet', // the AGW + door: 'agent', // 'owner' or 'agent' + rulesId: '0x9c1e...', // the rule used; agent door only + chainNamespace: 'eip155:11155111', // destination chain of a cross-chain send + destinationAccount: '0xCEA...', // the wallet's CEA on that chain + destinationCalls: [{ to, data, value }], // the ordered calls run on an EVM destination + destinationInstruction: { program, data, accounts }, // the instruction run on Solana + destinationTransfer: { recipient, token, amount }, // a plain transfer of SOL or a token on Solana + nativeCalls: [{ to, data, value }], // the ordered calls of a batch on Push + rawTo: '0xWallet', // what the signer's transaction actually called + rawData: '0x...' // the calldata it actually carried +} +``` + +**Error codes that stay.** All are thrown before anything is signed, unless the row says otherwise. + +| Code | Thrown when | +| --- | --- | +| `INDEX_RACE` | Another `create` took the wallet slot first. Nothing was committed; call `create` again | +| `NOT_WALLET_OWNER` | The signer tries to change a wallet it does not own | +| `READ_ONLY` | A client with no signer tries to write | +| `RULE_NOT_FOUND` | The rule id is not an enabled rule on the wallet | +| `INVALID_RULE` | A rule or a label is malformed, for example a label over 64 bytes | +| `AMBIGUOUS_RULE` | More than one enabled rule matches the agent and the destination chain. The SDK does not pick one | +| `RULE_READ_FAILED` | The rules could not be read from the chain, so the SDK does not send | +| `INCONSISTENT_READ` | Two reads from the chain disagree with each other, so the SDK does not act on them | +| `AGENT_GAS_INSUFFICIENT` | The agent's own Push account has no PC for gas. The wallet's PC pays for the outbound, not for the agent's gas | +| `WALLET_BALANCE_INSUFFICIENT` | The wallet does not hold enough PC or enough of the token for the send | +| `CAPABILITY_UNAVAILABLE` | The network cannot do what was asked, for example a batch as the agent where no atomic batch is available | +| `RECEIPT_UNAVAILABLE` | After sending: the transaction was submitted but its receipt could not be read. It may still land | +| `RECEIPT_MISMATCH` | After sending: the receipt does not match what was sent, for example rule ids in a different order | + +**Error codes that are removed.** + +| Code | Why it goes | +| --- | --- | +| `CREATE_PARTIAL` | `create` is one transaction (6.b), so it cannot end half done | +| `GATEWAY_ALLOWANCE_INSUFFICIENT` | The wallet approves the gateway itself (6.g, page 1 item 6.1) | +| `GENERATION_UNSUPPORTED` | There are no earlier wallet versions to support | +| `RULE_LIMIT_EXCEEDED` | Only raised by a local preview of a Solana send. The on-chain rules policy is the only rule checker (2.a), so this is not a public code | + +**`DUPLICATE_RULE` is restored.** 3.f lists `DUPLICATE_RULE`: two rules for the same agent and chain are rejected before signing. The first implementation does not have it and only notices the overlap later, when the agent sends (`AMBIGUOUS_RULE`). The check goes back into `create` and `rules.add`. `AMBIGUOUS_RULE` stays for a wallet that already has overlapping rules. + +**Fields on the error classes.** `AgenticError` also carries `details` and `cause`, and both stay. `AgenticRevertError` carries `transactionHashes` and `pendingTransactionHash`, and a returned `tx` carries an `atomic` flag. These three report a write that was split across several transactions. They are removed once every write is a single transaction (6.b). + +The progress events of the first implementation are the ones in 3.f, with nothing added. + +### 6.m Delete rules - `w.rules.delete` (renamed from `w.rules.revoke`) + +Removes some rules by id, or all of them in one atomic call. This is 1.m under a new name. The call shape and the result are unchanged. + +```tsx +// Function +const tx = await w.rules.delete(rulesIds, { options? }) +const tx = await w.rules.delete({ all, progressHook? }) + +// Usage and Params +const some = await w.rules.delete(['0x9c1e...', '0x7d3a...']); // delete these rules +const all = await w.rules.delete({ all: true }); // delete every rule on the wallet +const tracked = await w.rules.delete(['0x9c1e...'], { progressHook: (p) => console.log(p.id) }); // with progress events +// rulesIds Hex[], required unless all is set the rules to delete +// options.progressHook function, optional progress events, AGENTIC-TX-105; default none +// all true, required unless rulesIds given delete every rule on the wallet in one atomic call +// progressHook function, optional same events, in the { all: true } form; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +{ + hash: '0x8e01...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet + blockNumber: 1512n, + wait // await tx.wait() for the receipt; status lives on the receipt +} +``` + +What changed from 1.m: + +- **The method is delete, not revoke.** The handle now reads `rules.add`, `rules.update`, `rules.delete`. Delete is also what happens on-chain: the wallet removes the rule from the session engine for good. A deleted rule cannot be switched back on, and granting the same rule again produces a new `rulesId`. +- **The bare-call error is renamed.** A bare `delete()` still throws. The code is `DELETE_NEEDS_TARGET` (was `REVOKE_NEEDS_TARGET`). +- **Contract names do not change.** The wallet functions stay `revokeRules` and `revokeAllRules`, the event stays `RulesRevoked`, and the checkpoint kind stays `RULES_REVOKED`. `w.checkpoints()` returns that kind as the contract records it. + +# 7. Changes proposed on 12 Oct 2026: Presets + +A preset is a ready-made set of rules for a common use case, such as trading on popular DEXes. The wallet UI and developers both read presets from the SDK, so there is one source for them. A preset only produces rules. The rules are then passed to `client.agentic.create` in the normal way, and can be edited before that. App ABIs are not part of presets and stay in the wallet UI, because the UI can update them without an SDK release. + +List of changes: + +- New constants: `PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY` with `DEXES`, `LENDING` and `PREDICTION`. An app level (`PushChain.CONSTANTS.AGENTIC.PRESETS.APP`) can be added later without changing the functions. +- New function: `PushChain.utils.agentic.presets.list`, which lists every preset the SDK ships. +- New function: `PushChain.utils.agentic.presets.get`, which returns the rules for one preset. +- This brings back `PushChain.CONSTANTS.AGENTIC` members beyond `WALLET` and the `PushChain.utils.agentic` namespace, for presets only. Both were dropped earlier on this page (6.h). + +### 7.a Preset constants - `PushChain.CONSTANTS.AGENTIC.PRESETS` + +```tsx +PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.DEXES +PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.LENDING +PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.PREDICTION +// later: PushChain.CONSTANTS.AGENTIC.PRESETS.APP. +``` + +The constants object must be enumerable so that tools which iterate constants can list it. + +### 7.b List available presets - `PushChain.utils.agentic.presets.list` + +Returns every preset the SDK ships, so a UI can show them as cards and a developer can discover them. + +```tsx +// Function +const res = PushChain.utils.agentic.presets.list({ options? }) + +// Usage and Params +const { presets } = PushChain.utils.agentic.presets.list(); // every preset the SDK ships +// options.type string, optional 'CATEGORY' today, 'APP' later; omit to list everything + +// Returns +// { presets: Preset[] } +{ + presets: [ + { + type: 'CATEGORY', // later 'APP' + constant: PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.DEXES, + name: 'Popular DEXes', + chains: ['eip155:11155111', 'eip155:84532'] // chains this preset has rules for (Ethereum Sepolia, Base Sepolia) + } + ] +} +``` + +A preset with an empty `chains` list has nothing behind it yet (`PREDICTION` today, since its main apps are on a chain Push does not support yet), and the wallet UI should hide it. + +### 7.c Get the rules of a preset - `PushChain.utils.agentic.presets.get` + +Returns one rule per chain for the chosen preset. Each rule already contains the allowed contracts, the allowed calls with their full signatures, and the pins that keep funds going back to the wallet. The agent, assets and expiry are optional: pass them to get rules that are ready for `create`, or leave them out to pre-fill a review screen and add them later. + +```tsx +// Function +const res = PushChain.utils.agentic.presets.get(preset, { options? }) + +// Usage and Params +const { rules } = PushChain.utils.agentic.presets.get( + PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.DEXES, // a category constant now, an app constant later + { + chainNamespace: PushChain.CONSTANTS.CHAIN.ETHEREUM_SEPOLIA, // optional, omit to get every chain of the preset + agent: '0xAgentOnPush', // optional, the agent's Push address, applied to every rule + assets: [{ chainNamespace, token, maxPerCall, maxTotal }], // optional, each asset is placed on the rule of its chain + validUntil: now + 30 * 86400, // optional, applied to every rule; omit to set it later + } +); + +await client.agentic.create('My DEX agent', { rules }); + +// Returns +// { rules: Rule[] }, one rule per chain, in the same shape client.agentic.create takes +{ + rules: [ + { + agent: '0xAgentOnPush', + chainNamespace: 'eip155:11155111', + assets: [{ token: '0x1c7D...7238', maxPerCall: 100000000n, maxTotal: 1000000000n }], // from options.assets, without its chainNamespace + validUntil: 1767225600, + allowedCalls: [ + { + target: '0x...', + selector: 'exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))', + pins: [{ arg: 3, expected: PushChain.CONSTANTS.AGENTIC.WALLET }], + app: 'Uniswap V3', // display only, ignored by create + label: 'Swap exact input' // display only, ignored by create + } + // plus one approve(address,uint256) per asset, spender pinned to the app's contract (see Behaviour) + ] + } + ] +} +``` + +**Behaviour** + +| Case | What happens | +| --- | --- | +| `chainNamespace` omitted | One rule is returned for every chain the preset covers. | +| `agent`, `assets` or `validUntil` omitted | The rule is returned without that field. The caller adds it before `create`, and `create` rejects a rule with no agent as it already does. | +| `assets` passed | Each asset is placed on the rule of its chain. If `chainNamespace` is set in the options, the `chainNamespace` on each asset can be left out. For each asset, an approve call is added to that rule, with the spender pinned to the app's contract on that chain, because a swap or deposit fails without it. | +| Asset passed without a cap | Proposed: `get` throws. An omitted cap means 0 in the rules policy, so the rule would allow nothing, and a preset should never silently produce a rule that cannot act. | +| Selectors | Always the full signature, never the bare name, because apps overload function names (for example two different execute functions on the same router). | +| Grouping | One rule per chain per category, not one rule per app. Each category stays at two or three apps per chain so the rule stays inside the 32 allowed calls limit of a universal rule. | +| Display fields | `app` and `label` on each allowed call are for showing names in a UI. `create` ignores them. | + +### 7.d Notes for the wallet UI + +- Call `get` with only the preset to pre-fill the review screen, then let the user add the agent, tokens, limits and expiry. +- A blank limit shown as infinity in the UI must be sent as an explicit maximum value. Leaving the cap out means 0, not unlimited. +- The preset data (contract addresses, calls and pins) ships inside the SDK. An app upgrade becomes a new app entry, and the old one keeps working because the older contract still exists. + +### 7.e Open questions + +- Can a pin's arg index reach a field inside a struct argument? The Uniswap `exactInputSingle` example depends on it, because the recipient sits inside a struct. (Rules policy contract owner) +- Routers that hide the recipient inside encoded bytes, such as Uniswap Universal Router `execute`, cannot be pinned, so they should not be preset targets. Confirm the list of apps and functions per chain with this in mind. (SDK owner with the rules policy contract owner) +- Is the agent one Push address for every chain, including Solana rules? If not, `agent` becomes a per-chain map. (SDK owner) +- Should `get` throw when an asset has no cap, as proposed above? (Page owner) +- First preset list for testnet: which apps on which chains for `DEXES` and `LENDING`. (SDK owner with the rules policy contract owner) \ No newline at end of file diff --git a/plan/agw/research/section6-feedback-2026-10-12/sdk-previous.md b/plan/agw/research/section6-feedback-2026-10-12/sdk-previous.md new file mode 100644 index 00000000..06c7346f --- /dev/null +++ b/plan/agw/research/section6-feedback-2026-10-12/sdk-previous.md @@ -0,0 +1,731 @@ +# 5. SDK: AGW + + + +# List of changes + +New + +- `client.agentic.derive` +- `client.agentic.create` +- `client.agentic.list` +- `client.agentic.wallet`, + - a management handle with + - `info`, + - `owner`, + - `setLabel` (PROPOSED), + - `checkpoints`, + - `rules.list`, + - `rules.get`, + - `rules.add`, + - `rules.update`, + - `rules.revoke` +- `PushChain.CONSTANTS.AGENTIC` +- `PushChain.utils.agentic` + +Updated + +- `PushChain.initialize`, new option `agenticWallet` +- `PushChain.CONSTANTS.READ.CHAIN`, outside change confirmed 2026-09-28 + +Initialize is unchanged on the owner side: + +```tsx +const client = await PushChain.initialize(universalSigner, { network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET }); +``` + +| Signer | Door | Rules checked | +| --- | --- | --- | +| The wallet's owner | Owner door (`execute`) | No. Every send is recorded as a checkpoint | +| An address named as `agent` in one of the wallet's rules | Agent door (`executeAsAgent`) | Yes, by URP (UniversalRulesPolicy, the on-chain rule checker) | +| Anyone else | None | Never reached: `initialize` throws `NOT_OWNER_OR_AGENT` | + +An agentic wallet involves three parties, and it helps to have them straight before reading the functions. + +The **owner** is whoever created the wallet. When the owner sends through the wallet, no rules are checked; this is called the owner door, and the contract records every such action as a checkpoint so that an evaluator can later tell whether the owner touched anything mid-job. + +The **agent** is the address the owner allows to act on its behalf. It is always a Push address. If the agent's key is a Push EOA, that EOA is the agent. If the key lives on another chain (an EVM key on Ethereum, a Solana key, anything else), the agent is that key's UEA on Push, which exists deterministically for every external key. The SDK never asks for a curve, a chain or a key type. When the agent sends through the wallet, the rules are checked; this is the agent door. + +The **rules** say what an agent may do. Each rule names its agent and its destination chain, and there is one rule per chain per agent, so a wallet can have one agent for Ethereum and a different one for Solana. The `chainNamespace` on a rule decides which rulebook applies: leave it out and the rule governs calls on Push itself; set it to an `eip155` or `solana` chain and the rule governs cross-chain calls to that chain. + +Two ways to touch a wallet from the SDK. `PushChain.initialize(signer, { agenticWallet })` returns a client that acts as the wallet, and whether it goes through the owner door or the agent door depends on who the signer is. `client.agentic.wallet(address)` returns a handle for managing the wallet (rules, label, checkpoints) and never sends as it. + +# 1. Owner side, by example + +The owner side is everything the person who owns the wallet does: create it, fund it, write and revoke the rules, look at what happened. The agent side (section 2) is what the agent does: act through the wallet within those rules. + +### 1.a Derive an agentic wallet address - `client.agentic.derive` + +Gives you the address a wallet will have before it is deployed. The address depends only on the owner and an index. + +```tsx +// Function +const first = await client.agentic.derive({ options? }) + +// Usage and Params +const next = await client.agentic.derive(); // the owner's next wallet +const first = await client.agentic.derive({ index: 0 }); // a specific slot +// options.index number, optional which wallet slot to derive; default is the owner's next unused index + +// Returns +// { address, index, deployed } +{ + address: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + index: 0, + deployed: false +} +``` + +Because the address depends only on the owner and an index, it is the same whether you deploy first or later. That lets you send funds to it first (from any chain) and deploy afterwards, or show the address in a UI before anything is on-chain. Same idea as `deriveExecutorAccount` for a UEA. + +### 1.b Create an agentic wallet - `client.agentic.create` + +Deploys the wallet and grants the rules. The label is the only wallet-level input; the agent and an optional `ref` are named on each rule, because that is where the contract binds them. + +```tsx +// Function +const created = await client.agentic.create(label, { options }) + +// Usage and Params +const created = await client.agentic.create('aave-optimiser', { // wallet with one cross-chain rule + rules: [{ // one entry per chain per agent + agent: '0xAgentOnPush', // a Push address: the agent's EOA, or its UEA if the key lives on another chain. Never the owner + chainNamespace: CHAIN.ETHEREUM_SEPOLIA, // foreign chain => universal rulebook + assets: [ + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, maxPerCall: parseUnits('100', 6), maxTotal: parseUnits('1000', 6) }, + { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.WETH, maxPerCall: parseUnits('0.5', 18) }, + ], + maxGasPerCall: parseUnits('1', 18), // PC (wei) per outbound for the destination leg + validUntil: now + 30 * 86400, + allowedCalls: [ + { target: aavePool, selector: 'supply(address,uint256,address,uint16)', beneficiary: 2 }, // arg index, not offset: onBehalfOf must be the AGW's CEA + { target: usdcSepolia, selector: 'approve(address,uint256)' }, + ], + }], + progressHook: (p) => console.log(p.id, p.message), // AGENTIC-TX-1xx +}); +const bare = await client.agentic.create('scratch', { rules: [] }); // wallet first, rules later with rules.add +// label string, required shown in list() and info(); the contract stores it +// options.rules Rule[], required one per chain per agent, may be empty; each rule carries its own agent and optional ref +// options.progressHook function, optional progress events, AGENTIC-TX-1xx; default none +// rules[].agent Address, required the Push address allowed to act under this rule; never the owner +// rules[].ref Hex, optional emitted in RulesGranted, not interpreted; default zero +// rules[].assets AssetCap[], required on a universal rule tokens the agent may move, as the other chain's address (MOVEABLE constants); the SDK resolves each to its PRC20 on Push; each cap is { token, maxPerCall, maxTotal? } +// rules[].maxGasPerCall bigint, required on a universal rule PC (wei) the wallet may spend per outbound for the destination leg + +// Returns +// { wallet, index, rulesIds, tx } +{ + wallet: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + index: 0, + rulesIds: ['0x9c1e...'], // in the order of the rules you passed; empty for rules: [] + tx: { // UniversalTxResponse + hash: '0xb527...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + blockNumber: 1290n, + wait // await tx.wait() for the receipt; status lives on the receipt + } +} +``` + +One rule per chain per agent. A wallet may have different agents on different chains. If an agent needs to act on two chains, `rules` has two entries with the same `agent`; two agents on one chain are two entries with the same `chainNamespace`. Nobody states a rule type; the SDK reads it from `chainNamespace`. `rules: []` is allowed: create the wallet first and grant rules later with `rules.add` (1.k). + +Before asking for a signature the SDK checks that no rule's agent is the owner (`AGENT_IS_OWNER`), that no two rules share both agent and chain (`DUPLICATE_RULE`), that every `allowedCalls[].target` is on the rule's chain (`TARGET_NOT_ON_RULE_CHAIN`), and that every `assets[].token` resolves to a PRC20 whose `SOURCE_CHAIN_NAMESPACE` matches the rule's chain (`ASSET_CHAIN_MISMATCH`). + +Under the hood this is `deployWallet` (or reuse of a derived address) and one `grantRules` per rule. For an external owner they go as one UEA multicall under one signature. Funding is not part of `create`: the wallet is a normal Push account, so send tokens and PC to its address the way you would to any account (1.a shows the address before deployment). + +For a Push EOA owner the same thing needs a batching entry on the factory, because core rejects multicall from a Push-native sender: [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 11, **PROPOSED** (`createWallet(label, rules[])` on the factory). Until it lands the SDK sends deploy and grant as separate transactions and says so through progress events (AGENTIC-TX-102 and 104); `tx` is then the last of them. + +A `progressHook` passed to `PushChain.initialize` receives the same events alongside the per-call one, as in core. + +Warning for an agent whose key lives on another chain: the same EVM key initialized against two chains yields two UEAs, because a UEA is derived from namespace, chainId and owner. Grant the rule to the UEA of the chain the agent will run against. `PushChain.utils.account.deriveExecutorAccount(PushChain.utils.account.toUniversal(address, { chain }))` gives it. + +### 1.c List an owner's wallets - `client.agentic.list` + +Lists the wallets owned by the connected signer. It takes no arguments and only reads the connected account. + +```tsx +// Function +const res = await client.agentic.list() + +// Usage and Params +const { wallets } = await client.agentic.list(); // the connected signer's wallets +// no params + +// Returns +// { wallets: Array<{ address, index, label, deployed, rulesCount }> } +{ + wallets: [ + { address: '0x2Fd9...', index: 0, label: 'aave-optimiser', deployed: true, rulesCount: 1 }, + { address: '0x81aB...', index: 1, label: '', deployed: false, rulesCount: 0 }, + ] +} +``` + +Client methods act on the connected account; reads about any other account live in `PushChain.utils`. If a read-only view is needed later (a marketplace or explorer page showing the wallets of an address with no signer), it becomes `PushChain.utils.agentic.wallets(owner: Address)` taking a Push address; an external owner passes its UEA. Not in v1. + +### 1.d Get a wallet handle - `client.agentic.wallet` + +Returns a handle for one wallet: the reads that are specific to an agentic wallet, plus the rule writes only an owner can do. It is not a client and never sends as the wallet. + +```tsx +// Function +const w = client.agentic.wallet(address) + +// Usage and Params +const w = client.agentic.wallet('0xWallet'); // handle for one wallet; nothing is sent +// address Address, required the AGW to manage, a Push address + +// Returns +// { address, info(), owner(), setLabel(), checkpoints(), rules.* } +{ + address: '0xWallet', + info, owner, setLabel, checkpoints, // 1.e to 1.h + rules: { list, get, add, update, revoke } // 1.i to 1.m +} +``` + +There is one way to send as the wallet: `PushChain.initialize(signer, { agenticWallet })` (section 2). The handle only manages. To send as the wallet, move funds, reach the wallet's CEA on another chain, or read balances, initialize with `agenticWallet` and use the normal account tooling: `sendTransaction`, `universal.read`, or viem and ethers against `client.universal.account`. That gives the owner the full `sendTransaction` with every route the SDK already has, the same receipts, and the wallet's CEA reachable exactly as it is for any other account. + +Balance reads are deliberately not on the handle: they are not agentic, and every account is read the same way. There is no `w.execute` for the same reason. The handle stays what its name says: management. + +### 1.e Read wallet info - `w.info` + +Returns the wallet's summary in one read: the fields `list()` shows for each wallet, plus the owner. It is how you read the label from the handle. + +```tsx +// Function +const info = await w.info() + +// Usage and Params +const { label, deployed } = await w.info(); // one wallet's summary +// no params + +// Returns +// { address, label, index, owner, deployed, rulesCount } +{ + address: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', + label: 'aave-optimiser', + index: 0, + owner: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + deployed: true, + rulesCount: 1 +} +``` + +### 1.f Read the owner - `w.owner` + +Returns the owner's Push address, as the contract stores it. + +```tsx +// Function +const res = await w.owner() + +// Usage and Params +const { owner } = await w.owner(); // the Push address stored as owner +// no params + +// Returns +// { owner } +{ + owner: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9' +} +``` + +If the owner is a UEA and you need the controlling origin behind it (the chain and the external key), use `resolveControllerAccount` on the returned address. + +Page rule: identities going in and out of the agentic namespace are Push addresses (owner, agent, wallet). + +### 1.g Set the wallet label - `w.setLabel` + +**PROPOSED**, contract change, see [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 10. Changes the label shown in `list()` and `info()`; owner only. + +```tsx +// Function +const tx = await w.setLabel(label, { options? }) + +// Usage and Params +const tx = await w.setLabel('aave-optimiser-v2'); // rename the wallet +const tracked = await w.setLabel('aave-optimiser-v2', { progressHook: (p) => console.log(p.id) }); // with progress events +// label string, required the new label; stored by the contract and emitted in LabelSet +// options.progressHook function, optional progress events, AGENTIC-TX-106; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +{ + hash: '0x3b8d...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet + blockNumber: 1488n, + wait // await tx.wait() for the receipt; status lives on the receipt +} +``` + +Emits `LabelSet(string label)`. It is not a checkpoint: the label is cosmetic metadata and evaluators ignore it. Today the label can only be set once, at `deployWallet`, and is emitted in `WalletDeployed`. + +### 1.h Read checkpoints - `w.checkpoints` + +Every owner-side change the wallet has recorded: owner-door sends, rules granted, rules revoked. An evaluator reads these to know whether the owner changed anything after a job started (page 4). + +```tsx +// Function +const res = await w.checkpoints({ options? }) + +// Usage and Params +const all = await w.checkpoints(); // every checkpoint +const recent = await w.checkpoints({ sinceBlock: 1234n }); // from a block onward +// options.sinceBlock bigint, optional only checkpoints at or after this block; default all + +// Returns +// { checkpoints: Array<{ seq, kind, ref, blockNumber, txHash }> } +{ + checkpoints: [ + { seq: 3, kind: 'RULES_GRANTED', ref: '0x9c1e...', blockNumber: 1290n, txHash: '0x...' }, + { seq: 4, kind: 'OWNER_ACTION', ref: '0x5a7b...', blockNumber: 1402n, txHash: '0x...' }, + ] +} +``` + +### 1.i List rules - `w.rules.list` + +Returns every rule on the wallet as a decoded record, including what each rule has spent so far. + +```tsx +// Function +const res = await w.rules.list() + +// Usage and Params +const { rules } = await w.rules.list(); // the wallet's rules +// no params + +// Returns +// { rules: RulesRecord[] } +{ + rules: [ + { + rulesId: '0x9c1e...', + enabled: true, + chainNamespace: 'eip155:11155111', + agent: '0xAgentOnPush', + validUntil: 1767225600, + ref: '0x4a2f...', + rule: { /* decoded UniversalRule, as passed to create */ }, + spent: { kind: 'universal', amountSpent: 25000000n } // shape PROPOSED, see 3.b + } + ] +} +``` + +### 1.j Get one rule - `w.rules.get` + +Returns one rule by id, decoded, with what it has spent. + +```tsx +// Function +const record = await w.rules.get(rulesId) + +// Usage and Params +const record = await w.rules.get('0x9c1e...'); // one rule by id +// rulesId Hex, required the id returned by create or rules.add + +// Returns +// RulesRecord +{ + rulesId: '0x9c1e...', + enabled: true, + chainNamespace: 'eip155:11155111', + agent: '0xAgentOnPush', + validUntil: 1767225600, + ref: '0x4a2f...', + rule: { /* decoded UniversalRule */ }, + spent: { kind: 'universal', amountSpent: 25000000n } // shape PROPOSED, see 3.b +} +``` + +`spent` is a field on the record, so `get` and `list` both carry it. There is no separate spent call. + +### 1.k Add rules - `w.rules.add` + +Grants new rules on an existing wallet under one signature. The rules array comes first; `agent` and `ref` live on each rule. + +```tsx +// Function +const res = await w.rules.add(rules, { options? }) + +// Usage and Params +const one = await w.rules.add([nativeRule]); // one rule +const many = await w.rules.add([ruleOnSepolia, ruleOnPush]); // several rules, one signature +const tracked = await w.rules.add([nativeRule], { progressHook: (p) => console.log(p.id, p.message) }); // with progress events +// rules Rule[], required one per chain per agent; each rule carries its own agent and optional ref +// options.progressHook function, optional progress events, AGENTIC-TX-104; default none + +// Returns +// { rulesIds, tx } +{ + rulesIds: ['0x7d3a...'], // in the order of the rules you passed + tx: { // UniversalTxResponse + hash: '0x4c19...', + origin: 'eip155:11155111:0x31dC...', + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + blockNumber: 1501n, + wait + } +} +``` + +Records a `RULES_GRANTED` checkpoint. + +### 1.l Update rules - `w.rules.update` + +Replaces rules in a batch: each pair names one old rule and the one new rule that takes its place. + +```tsx +// Function +const res = await w.rules.update({ rules, progressHook? }) + +// Usage and Params +const one = await w.rules.update({ rules: [{ rulesId: '0x9c1e...', rule: newRule }] }); // replace one rule +const many = await w.rules.update({ rules: [{ rulesId: idA, rule: ruleA }, { rulesId: idB, rule: ruleB }] }); // replace several, one signature +const tracked = await w.rules.update({ rules: [{ rulesId: idA, rule: ruleA }], progressHook: (p) => console.log(p.id) }); // with progress events +// rules Array<{ rulesId, rule }>, required one old rule to one new rule per pair +// rules[].rulesId Hex, required the rule being replaced +// rules[].rule Rule, required the replacement; one rule per agent per chain still applies +// progressHook function, optional progress events, AGENTIC-TX-105 and 104; default none + +// Returns +// { rules: Array<{ rulesId, replaced }>, tx } +{ + rules: [ + { rulesId: '0x51c0...', replaced: '0x9c1e...' }, // new id, old id + ], + tx: { // UniversalTxResponse + hash: '0x7a02...', + origin: 'eip155:11155111:0x31dC...', + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', + blockNumber: 1507n, + wait + } +} +``` + +Rules are immutable on-chain, so an update is a revoke plus a grant: for each pair the SDK asserts the old rule's spend, revokes it and grants the new one, all pairs in one multicall. The result is a new `rulesId` per pair, and the spend counters reset on the new rule: what the old rule had spent does not carry over. This is accepted for v1 (open item 1); an in-place update would be a contract change and there is no demand for it yet. + +### 1.m Revoke rules - `w.rules.revoke` + +Revokes some rules by id, or all of them in one atomic call. + +```tsx +// Function +const tx = await w.rules.revoke(rulesIds, { options? }) +const tx = await w.rules.revoke({ all, progressHook? }) + +// Usage and Params +const some = await w.rules.revoke(['0x9c1e...', '0x7d3a...']); // revoke these rules +const all = await w.rules.revoke({ all: true }); // revoke every rule, on-chain revokeAllRules +const tracked = await w.rules.revoke(['0x9c1e...'], { progressHook: (p) => console.log(p.id) }); // with progress events +// rulesIds Hex[], required unless all is set the rules to revoke +// options.progressHook function, optional progress events, AGENTIC-TX-105; default none +// all true, required unless rulesIds given revoke every rule on the wallet in one atomic call +// progressHook function, optional same events, in the { all: true } form; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +{ + hash: '0x8e01...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account + to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet + blockNumber: 1512n, + wait // await tx.wait() for the receipt; status lives on the receipt +} +``` + +A bare `revoke()` is not allowed and throws `REVOKE_NEEDS_TARGET`: a call with no argument that wipes every rule is too easy to make by mistake. Records `RULES_REVOKED` checkpoints. + +# 2. Agent side, by example + +There is no new method on the agent side. The agent uses its own signer and tells `initialize` which wallet to act through. It does not name a rule: which rule applies is decided per transaction, from the destination chain. + +### 2.a Act as the wallet - `PushChain.initialize` with `agenticWallet` (updated) + +Returns a client whose account is the wallet. Whether its sends go through the owner door or the agent door depends on who the signer is. + +```tsx +// Function +const client = await PushChain.initialize(signer, { options }) + +// Usage and Params +const agentClient = await PushChain.initialize(agentSigner, { // agent door: the signer is named as agent in a rule + network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET, + agenticWallet: '0xWallet', +}); +const ownerClient = await PushChain.initialize(ownerSigner, { // owner door: the signer owns the wallet + network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET, + agenticWallet: '0xWallet', +}); +``` + +`agentSigner` is any signer `initialize` accepts today. If the key lives on another chain, the SDK derives its UEA and everything goes through that, as it does for every external user. + +Which door the client uses depends on who the signer is. If the signer is the wallet's owner, sends go through the owner door: no rules, and every send is recorded as a checkpoint. If the signer is an address named as agent in one of the wallet's rules, sends go through the agent door and the rules apply. If it is neither, `initialize` throws `NOT_OWNER_OR_AGENT`. If the address has no wallet deployed yet it throws `WALLET_NOT_DEPLOYED`, and if the address is not an agentic wallet it throws `NOT_AGENTIC_WALLET`. This is also how an owner acts as the wallet with the full client: `PushChain.initialize(ownerSigner, { agenticWallet })`. There is one way to send as a wallet and the signer decides the door. + +On the agent door the SDK sends; URP on-chain is the only rule checker. Before sending, the SDK only looks up the `rulesId` for the destination chain: the rule that is enabled, whose `agent` equals the signer, and whose `chainNamespace` equals the destination. The lookup is one read on every send, not cached at initialize. If none is found it throws `NO_RULES_FOR_CHAIN` before any signature, so it costs nothing; otherwise it calls `executeAsAgent(rulesId, ...)` on the wallet. That is the agent door from D3 on [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md): there is no session validator, and the wallet only checks that `msg.sender` is the rule's agent. There is one rule per (agent, chain), so a signer and a destination match at most one rule. If the action breaks a rule, it reverts on-chain and the agent pays that gas. `sendTransaction` then throws `AgenticRevertError`, which extends core's `PushChainExecutionError` and carries URP's custom error in `decodedError`, so the agent sees which gate failed (3.f). + +From an external key, the call arrives through the agent's UEA. If the agent's UEA is not yet deployed, the first action takes the origin-chain fee lock once (minimum $1), which deploys the UEA and funds it with PC. Every later action requires PC in the UEA and is a direct Push transaction paid from that balance, with no origin transaction and no cross-chain wait. + +Two things for whoever runs the agent. The agent's UEA is a second balance to keep funded: the AGW's PC covers the wallet's outbound fees, not the agent's gas. And in `agenticWallet` mode the SDK turns `enforceGasCheck` on for every action except that one first action while the agent's UEA is not yet deployed, so an empty UEA fails loudly instead of silently falling back to a $1 origin lock and a confirmation wait on every action. + +Routing. In `agenticWallet` mode every send is wrapped as `executeAsAgent` (agent door) or `execute` (owner door), and for cross-chain legs the AGW itself calls the gateway. So the AGW's CEA executes on the destination and the AGW's PC pays as `msg.value`. The SDK never uses the signer's own Route 2, which would run through the agent's CEA instead of the wallet's. Any `from` (Routes 3 and 4) is rejected in `agenticWallet` mode with `FROM_NOT_ALLOWED`: it makes `msg.sender` a CEA, and the agent door check fails. + +What changes on the client in this mode: + +- `universal.account` is the wallet address string, so receipts show the AGW as `from`. `universal.origin` stays the signer's origin account. +- `getAccountStatus()` reports the signer's own UEA, not the wallet. +- The signer is whatever was passed to `initialize`. To top up the agent's UEA, find it with `PushChain.utils.account.deriveExecutorAccount(signer.account)` and send PC to it from a client initialized without `agenticWallet`. +- A Solana-keyed agent can act on Push and `eip155` destinations now, and on `solana:` destinations once the SVM rulebook ships. +- Agents read their own rules through `client.agentic.wallet(addr).rules.list()`. +- `tx.data` arrays and `tx.funds` (moving the AGW's PRC20) work as they do for any account. +- `payGasWith`, `migrateCEA`, `rescueFunds`, `prepareTransaction` and `executeTransactions` throw `NOT_ALLOWED_IN_AGENTIC_MODE`. + +```tsx +const tx = await agentClient.universal.sendTransaction({ // agent door, rule picked by the destination chain + to: { address: aavePool, chain: CHAIN.ETHEREUM_SEPOLIA }, + data: supplyData, +}); + +// tx: UniversalTxResponse +{ + hash: '0x6f2a...', + origin: 'eip155:11155111:0x7Be1...', // the agent's key, CAIP-10 + from: '0xWallet', // the AGW, not the signer + blockNumber: 1530n, + wait +} + +const receipt = await tx.wait(); +// receipt: UniversalTxReceipt +{ + status: 1, + hash: '0x6f2a...', + from: '0xWallet', + blockNumber: 1530n, + externalTxHash: '0x91c4...' // the leg executed by the AGW's CEA on Sepolia +} +``` + +The same EVM key initialized against two chains yields two UEAs (derived from namespace, chainId and owner), so the rule must name the UEA of the chain this client initializes against (see 1.b). + +# 3. Types + +### 3.a Client, options and namespace + +```tsx +type Address = `0x${string}`; +type Hex = `0x${string}`; +type ForeignChainNamespace = `eip155:${string}` | `solana:${string}`; +type ProgressHook = (p: ProgressEvent) => void; // ProgressEvent is core's shape: { id, title, message, level, response, timestamp } + +interface PushChainClient { + universal: UniversalNamespace; // in agenticWallet mode: account is the wallet + agentic: AgenticNamespace; // this page + market: MarketNamespace; // page 6 + job: JobNamespace; // page 7 + evaluation: EvaluationNamespace; // page 8 +} + +interface InitializeOptions { + network?: PUSH_NETWORK; + rpcUrls?: Partial>; + agenticWallet?: Address; // NEW: act as the wallet; door chosen by the signer's Push address + // enforceGasCheck is on when agenticWallet is set, except for the first action while the agent's UEA is not yet deployed (2.a) +} + +interface AgenticNamespace { + derive(opts?: { index?: number }): Promise<{ address: Address; index: number; deployed: boolean }>; + create(label: string, options: CreateOptions): Promise; + list(): Promise<{ wallets: WalletSummary[] }>; // connected signer only + wallet(address: Address): AgenticWallet; +} + +interface CreateOptions { + rules: Rule[]; // one entry per chain per agent, may be empty; each rule names its agent and optional ref + progressHook?: ProgressHook; // AGENTIC-TX-1xx +} + +// No AgentKey type, no curve, no chain. The agent is a Push address. A native key is its own EOA; any external key +// (EVM, Solana, anything) is its UEA, deterministic from (chain, owner), deployed lazily on first use. The AGW's agent +// door checks msg.sender == rules.agent; cross-VM signature verification already happened inside the UEA (page 1, D3). + +interface CreateResult { wallet: Address; index: number; rulesIds: Hex[]; tx: UniversalTxResponse } +interface WalletSummary { address: Address; index: number; label: string; deployed: boolean; rulesCount: number } +``` + +### 3.b Rules + +```tsx +type Rule = NativeRule | UniversalRule; // chainNamespace decides the rulebook: omitted = native, foreign = universal + +interface NativeRule { + agent: Address; // Push address: EOA, or the UEA of an external key (PushChain.utils.account.deriveExecutorAccount) + ref?: Hex; // emitted in RulesGranted, not interpreted + chainNamespace?: never; // omitted = the connected Push chain + target: Address; + selector: Selector | 'value-only'; + validUntil: number; + maxValuePerCall?: bigint; maxValueTotal?: bigint; maxCalls?: number; + pins?: { arg: number; expected: Hex | Address | bigint }[]; + amount?: { arg: number; maxPerCall: bigint; maxTotal?: bigint }; +} + +interface UniversalRule { + agent: Address; // same as NativeRule.agent + ref?: Hex; // same as NativeRule.ref + chainNamespace: ForeignChainNamespace; // "eip155:..." now; "solana:..." once the SVM rulebook ships + assets: AssetCap[]; // tokens the agent may move on chainNamespace; SDK resolves each to its PRC20 and asserts SOURCE_CHAIN_NAMESPACE + maxGasPerCall: bigint; // PC (wei) per outbound for the destination leg + validUntil: number; + allowedCalls: AllowedCall[]; // 1..32, all on chainNamespace +} + +interface AssetCap { + token: MoveableToken | Address; // the other chain's token address (MOVEABLE.TOKEN..) or the native marker; the contract stores the PRC20 + maxPerCall: bigint; + maxTotal?: bigint; +} + +type Selector = Hex | `${string}(${string})`; // '0x617ba037' or 'supply(address,uint256,address,uint16)' + +interface AllowedCall { target: Address; selector: Selector; beneficiary?: number; maxValue?: bigint } // beneficiary = arg index + +interface RulesRecord { + rulesId: Hex; + enabled: boolean; + chainNamespace: string; + agent: Address; // the Push address granted + validUntil: number; + ref: Hex; + rule: Rule; // decoded terms; NativeRule or UniversalRule + spent: Spent; // carried by rules.get and rules.list; no separate call +} + +type Spent = { kind: 'universal'; amountSpent: bigint } | { kind: 'native'; valueSpent: bigint; amountSpent: bigint; callsUsed: number }; // PROPOSED: one self-describing object, readable without knowing the rulebook +``` + +### 3.c Wallet handle and checkpoints + +```tsx +interface AgenticWallet { + address: Address; + info(): Promise; + owner(): Promise<{ owner: Address }>; // Push address as stored + setLabel(label: string, opts?: { progressHook?: ProgressHook }): Promise; // PROPOSED, page 1 item 10 + checkpoints(opts?: { sinceBlock?: bigint }): Promise<{ checkpoints: Checkpoint[] }>; + rules: { + list(): Promise<{ rules: RulesRecord[] }>; + get(rulesId: Hex): Promise; + add(rules: Rule[], opts?: { progressHook?: ProgressHook }): Promise<{ rulesIds: Hex[]; tx: UniversalTxResponse }>; + update(params: { rules: { rulesId: Hex; rule: Rule }[]; progressHook?: ProgressHook }): Promise<{ rules: { rulesId: Hex; replaced: Hex }[]; tx: UniversalTxResponse }>; // revoke plus grant; spend counters reset + revoke(rulesIds: Hex[], opts?: { progressHook?: ProgressHook }): Promise; + revoke(params: { all: true; progressHook?: ProgressHook }): Promise; + }; +} + +interface WalletInfo { address: Address; label: string; index: number; owner: Address; deployed: boolean; rulesCount: number } + +interface Checkpoint { seq: number; kind: 'OWNER_ACTION' | 'RULES_GRANTED' | 'RULES_REVOKED'; ref: Hex; blockNumber: bigint; txHash: Hex } +``` + +### 3.d Constants, PushChain.CONSTANTS.AGENTIC (new) + +```tsx +PushChain.CONSTANTS.AGENTIC[PUSH_NETWORK.TESTNET_DONUT] = { + FACTORY, RULES_POLICY, // RULES_POLICY is URP; no validator address (page 1, D3) + MAX_PINS: 8, MAX_ALLOWED_CALLS: 32, ENVELOPE_VERSION: 1, +}; +``` + +### 3.e Helpers, PushChain.utils.agentic (new) + +Pure functions with the same output as the on-chain views. + +```tsx +PushChain.utils.agentic = { + rulesId(agent, chainNamespace, grantNonce), // the id a grant produces, same as the contract assigns + actionId(target, selector), // id of one allowed call: hash of its target and selector + configId(wallet, rulesId, actionId), // key of one allowed call's stored config, under one rule on one wallet + encodeRules(rules, ctx), // ctx = wallet and chain context needed to resolve beneficiary offsets + decodeRules(bytes), + deriveWallet(owner, index), // any-owner variant of client.agentic.derive + compileCard(card, userInput, ctx), // used by page 6; lives here because it produces Rule[] +}; +``` + +### 3.f Errors and progress + +```tsx +class AgenticError extends Error { code: string; hint?: string } +class AgenticRevertError extends PushChainExecutionError {} +// decoded custom error from the AGW, URP or the factory; uses core's fields: +// code string +// decodedError { name, hint, selector, decoded } + +// codes +// create: AGENT_IS_OWNER, DUPLICATE_RULE, TARGET_NOT_ON_RULE_CHAIN, ASSET_CHAIN_MISMATCH +// initialize (agenticWallet): NOT_OWNER_OR_AGENT, WALLET_NOT_DEPLOYED, NOT_AGENTIC_WALLET +// rules.revoke: REVOKE_NEEDS_TARGET (bare revoke) +// sendTransaction: NO_RULES_FOR_CHAIN, FROM_NOT_ALLOWED (any from, Routes 3 and 4) +// agentic mode: NOT_ALLOWED_IN_AGENTIC_MODE (prepareTransaction, executeTransactions, payGasWith, migrateCEA, rescueFunds) + +// progress events, AGENTIC-TX (PROPOSED) +// AGENTIC-TX-101 wallet derived { address, index, deployed } +// AGENTIC-TX-102 deploy step added +// AGENTIC-TX-104 rules granted { rulesIds } +// AGENTIC-TX-105 rules revoked { rulesIds | all } +// AGENTIC-TX-106 label set +// AGENTIC-TX-107 rule resolved for a send { rulesId, chainNamespace, door } +// AGENTIC-TX-199-01 done +// AGENTIC-TX-199-02 failed { code, decodedError } +// The Push leg of any agentic send also emits core's SEND-TX-1xx events. +// A cross-chain leg sent by the AGW emits 209-xx and 299-xx, never 201 to 204 (the signer's own Route 2 is never used). +``` + +**PROPOSED:** the AGENTIC-TX event list. Every write (`create`, `setLabel`, `rules.add`, `rules.update`, `rules.revoke`) takes a per-call `progressHook`; a `progressHook` passed to `PushChain.initialize` runs alongside it, as in core. + +`NO_RULES_FOR_CHAIN` is thrown before any signature and costs nothing. The rules lookup is one read on every send, not cached at initialize. A URP revert is thrown from `sendTransaction` as `AgenticRevertError` and also lands as `decodedError` on AGENTIC-TX-199-02. A destination-chain revert after URP passed still counts the spend, because the spend is counted when the outbound leaves Push; whether it is credited back depends on [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 6 (`creditRevert`). + +# 4. Outside change: [PushChain.CONSTANTS.READ](http://PushChain.CONSTANTS.READ).CHAIN (confirmed 2026-09-28) + +Problem: `read()` takes `chain: PushChain.CONSTANTS.CHAIN.X`, but `CHAIN` is the set of blockchains the SDK signs for and routes to. Web2 is not one, so `CHAIN.WEB2` exists as a hidden (non-enumerable) member: it works if you know it is there and never appears in any listing. Reads have a wider domain than transactions: anything validators can observe. + +Change: a read-specific constant that is a superset of `CHAIN`. The field name stays `chain`, so nothing breaks, and `CHAIN` values remain valid because the strings are identical. + +```tsx +PushChain.CONSTANTS.READ.CHAIN = { + ...PushChain.CONSTANTS.CHAIN, // every real chain, same string values + WEB2: 'web2', // non-chain source, first-class here, enumerable +}; +type ReadChain = CHAIN | 'web2'; // ReadParams.chain: ReadChain + +read({ chain: PushChain.CONSTANTS.READ.CHAIN.WEB2, ... }) +read({ chain: PushChain.CONSTANTS.CHAIN.ETHEREUM_SEPOLIA, ... }) // still compiles +``` + +- `CHAIN.WEB2` becomes a deprecated alias of `READ.CHAIN.WEB2` for one release (the docs listed it on 2026-09-22), then goes. +- Anything that iterates `CHAIN` stops seeing a fake chain; anything that iterates `READ.CHAIN` sees every read source. +- The evaluator's `Read.chain` (page 8) takes the same values, so `READ.CHAIN` is the one constant the read SDK and the criteria compiler share. + +# 5. Open for review + +1. `rules.update` resets spend counters because it is revoke plus grant. Accepted for v1 and stated in 1.l; an in-place update is a contract change with no demand yet. +2. `setLabel` assumes [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 10 lands. Pointer for the team. \ No newline at end of file diff --git a/plan/agw/research/section6-feedback-2026-10-12/sdk.diff b/plan/agw/research/section6-feedback-2026-10-12/sdk.diff new file mode 100644 index 00000000..2fc36e41 --- /dev/null +++ b/plan/agw/research/section6-feedback-2026-10-12/sdk.diff @@ -0,0 +1,695 @@ +--- previous/5-sdk-agw.md ++++ latest/5-sdk-agw.md +@@ -30,7 +30,7 @@ + - `rules.update`, + - `rules.revoke` + - `PushChain.CONSTANTS.AGENTIC` +-- `PushChain.utils.agentic` ++- `~~PushChain.utils.agentic~~` (dropped 12 Oct 2026, see 6.h) + + Updated + +@@ -144,7 +144,7 @@ + + Under the hood this is `deployWallet` (or reuse of a derived address) and one `grantRules` per rule. For an external owner they go as one UEA multicall under one signature. Funding is not part of `create`: the wallet is a normal Push account, so send tokens and PC to its address the way you would to any account (1.a shows the address before deployment). + +-For a Push EOA owner the same thing needs a batching entry on the factory, because core rejects multicall from a Push-native sender: [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 11, **PROPOSED** (`createWallet(label, rules[])` on the factory). Until it lands the SDK sends deploy and grant as separate transactions and says so through progress events (AGENTIC-TX-102 and 104); `tx` is then the last of them. ++For a Push EOA owner the same thing needs a batching entry on the factory, because core rejects multicall from a Push-native sender: [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) item 11, **PROPOSED** (`createWallet(label, rules[])` on the factory). Until it lands the SDK sends deploy and grant as separate transactions and says so through progress events (AGENTIC-TX-102 and 104); `tx` is then the last of them. + + A `progressHook` passed to `PushChain.initialize` receives the same events alongside the per-call one, as in core. + +@@ -248,7 +248,7 @@ + + ### 1.g Set the wallet label - `w.setLabel` + +-**PROPOSED**, contract change, see [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 10. Changes the label shown in `list()` and `info()`; owner only. ++**PROPOSED**, contract change, see [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) item 10. Changes the label shown in `list()` and `info()`; owner only. + + ```tsx + // Function +@@ -480,7 +480,7 @@ + + Which door the client uses depends on who the signer is. If the signer is the wallet's owner, sends go through the owner door: no rules, and every send is recorded as a checkpoint. If the signer is an address named as agent in one of the wallet's rules, sends go through the agent door and the rules apply. If it is neither, `initialize` throws `NOT_OWNER_OR_AGENT`. If the address has no wallet deployed yet it throws `WALLET_NOT_DEPLOYED`, and if the address is not an agentic wallet it throws `NOT_AGENTIC_WALLET`. This is also how an owner acts as the wallet with the full client: `PushChain.initialize(ownerSigner, { agenticWallet })`. There is one way to send as a wallet and the signer decides the door. + +-On the agent door the SDK sends; URP on-chain is the only rule checker. Before sending, the SDK only looks up the `rulesId` for the destination chain: the rule that is enabled, whose `agent` equals the signer, and whose `chainNamespace` equals the destination. The lookup is one read on every send, not cached at initialize. If none is found it throws `NO_RULES_FOR_CHAIN` before any signature, so it costs nothing; otherwise it calls `executeAsAgent(rulesId, ...)` on the wallet. That is the agent door from D3 on [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md): there is no session validator, and the wallet only checks that `msg.sender` is the rule's agent. There is one rule per (agent, chain), so a signer and a destination match at most one rule. If the action breaks a rule, it reverts on-chain and the agent pays that gas. `sendTransaction` then throws `AgenticRevertError`, which extends core's `PushChainExecutionError` and carries URP's custom error in `decodedError`, so the agent sees which gate failed (3.f). ++On the agent door the SDK sends; URP on-chain is the only rule checker. Before sending, the SDK only looks up the `rulesId` for the destination chain: the rule that is enabled, whose `agent` equals the signer, and whose `chainNamespace` equals the destination. The lookup is one read on every send, not cached at initialize. If none is found it throws `NO_RULES_FOR_CHAIN` before any signature, so it costs nothing; otherwise it calls `executeAsAgent(rulesId, ...)` on the wallet. That is the agent door from D3 on [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21): there is no session validator, and the wallet only checks that `msg.sender` is the rule's agent. There is one rule per (agent, chain), so a signer and a destination match at most one rule. If the action breaks a rule, it reverts on-chain and the agent pays that gas. `sendTransaction` then throws `AgenticRevertError`, which extends core's `PushChainExecutionError` and carries URP's custom error in `decodedError`, so the agent sees which gate failed (3.f). + + From an external key, the call arrives through the agent's UEA. If the agent's UEA is not yet deployed, the first action takes the origin-chain fee lock once (minimum $1), which deploys the UEA and funds it with PC. Every later action requires PC in the UEA and is a direct Push transaction paid from that balance, with no origin transaction and no cross-chain wait. + +@@ -646,7 +646,9 @@ + interface Checkpoint { seq: number; kind: 'OWNER_ACTION' | 'RULES_GRANTED' | 'RULES_REVOKED'; ref: Hex; blockNumber: bigint; txHash: Hex } + ``` + +-### 3.d Constants, PushChain.CONSTANTS.AGENTIC (new) ++### ~~3.d Constants, PushChain.CONSTANTS.AGENTIC (new)~~ ++ ++Dropped on 12 Oct 2026, except `WALLET`. See 6.h. + + ```tsx + PushChain.CONSTANTS.AGENTIC[PUSH_NETWORK.TESTNET_DONUT] = { +@@ -655,9 +657,11 @@ + }; + ``` + +-### 3.e Helpers, PushChain.utils.agentic (new) +- +-Pure functions with the same output as the on-chain views. ++### ~~3.e Helpers, PushChain.utils.agentic (new)~~ ++ ++Dropped on 12 Oct 2026. See 6.h. ++ ++~~Pure functions with the same output as the on-chain views.~~ + + ```tsx + PushChain.utils.agentic = { +@@ -702,7 +706,7 @@ + + **PROPOSED:** the AGENTIC-TX event list. Every write (`create`, `setLabel`, `rules.add`, `rules.update`, `rules.revoke`) takes a per-call `progressHook`; a `progressHook` passed to `PushChain.initialize` runs alongside it, as in core. + +-`NO_RULES_FOR_CHAIN` is thrown before any signature and costs nothing. The rules lookup is one read on every send, not cached at initialize. A URP revert is thrown from `sendTransaction` as `AgenticRevertError` and also lands as `decodedError` on AGENTIC-TX-199-02. A destination-chain revert after URP passed still counts the spend, because the spend is counted when the outbound leaves Push; whether it is credited back depends on [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 6 (`creditRevert`). ++`NO_RULES_FOR_CHAIN` is thrown before any signature and costs nothing. The rules lookup is one read on every send, not cached at initialize. A URP revert is thrown from `sendTransaction` as `AgenticRevertError` and also lands as `decodedError` on AGENTIC-TX-199-02. A destination-chain revert after URP passed still counts the spend, because the spend is counted when the outbound leaves Push; whether it is credited back depends on [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) item 6 (`creditRevert`). + + # 4. Outside change: [PushChain.CONSTANTS.READ](http://PushChain.CONSTANTS.READ).CHAIN (confirmed 2026-09-28) + +@@ -728,4 +732,621 @@ + # 5. Open for review + + 1. `rules.update` resets spend counters because it is revoke plus grant. Accepted for v1 and stated in 1.l; an in-place update is a contract change with no demand yet. +-2. `setLabel` assumes [1. AGW Contract Changes (nomenclature standard + change set)](1-agw-contract-changes.md) item 10 lands. Pointer for the team.+2. `setLabel` assumes [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) item 10 lands. Pointer for the team. ++ ++# 6. Changes proposed on 12 Oct 2026 ++ ++These come from the review of the first SDK implementation, [push-chain-sdk PR #291](https://github.com/pushchain/push-chain-sdk/pull/291). Sections 1 to 5 above are left exactly as they were. Where an entry here differs from them, the entry here is the current one. Every function whose call or result changes is written out again in full, so the change can be read without scrolling up. ++ ++Contract changes are written on [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21) (page 1), section 6, and are referenced from here by item number. ++ ++| # | Change | Replaces above | Contract change (page 1) | ++| --- | --- | --- | --- | ++| 6.a | One rule shape for every chain, pins inside `allowedCalls`, `beneficiary` folded into pins | 3.b `NativeRule`, `UniversalRule` | 6.3 | ++| 6.b | `create` is one transaction for every owner; `ref` removed; omitted caps are 0 | 1.b | 6.2, 6.4, 6.5 | ++| 6.c, 6.d | `rules.list` and `rules.get`: `spent` per asset, no `ref`, arguments read back as `arg` | 1.i, 1.j | none | ++| 6.e | `rules.add` and `rules.update`: call unchanged, new rule shape | 1.k, 1.l | none | ++| 6.f | `setLabel` is never a checkpoint | 1.g | none | ++| 6.g | Sending as the wallet: no gateway approval step, first-use gas default | 2.a | 6.1 | ++| 6.h | Types, as they end up | 3.b, `RulesRecord`, `Spent`, 3.d, 3.e | none | ++| 6.i | Solana: same rule shape, pins on arguments and on accounts, no IDL in a rule | new | none | ++| 6.l | Response fields and error codes added by the first implementation: accepted, with four codes removed | 3.f | none | ++| 6.m | `rules.revoke` is renamed `rules.delete` | 1.m | none | ++ ++### 6.a One rule shape for every chain ++ ++There is one rule shape. A rule for calls on Push is the same object as a cross-chain rule with `chainNamespace` left out. What the agent may call is always a list of `allowedCalls`, and restrictions on a function's arguments sit inside each allowed call as `pins`. ++ ++A pin restricts one argument of the allowed function. It is either `expected` (the argument must equal this constant) or `max` (the argument must not exceed this number). To require that an argument is the wallet itself, the expected value is `PushChain.CONSTANTS.AGENTIC.WALLET`. A minimum on an argument (for example a minimum amount out on a swap) is not part of v1 and is deferred to the next version. ++ ++```tsx ++// a rule on Push: chainNamespace left out ++{ ++ agent: '0xAgentOnPush', ++ validUntil: now + 30 * 86400, ++ allowedCalls: [ ++ { target: vault, selector: 'deposit(address,uint256)', ++ pins: [ ++ { arg: 0, expected: beneficiary }, // argument 0 must be this address ++ { arg: 1, max: parseUnits('10', 18) }, // argument 1 must not exceed this, per call ++ ] }, ++ ], ++} ++ ++// a rule on Ethereum Sepolia: same shape, plus the tokens the agent may move ++{ ++ agent: '0xAgentOnPush', ++ chainNamespace: CHAIN.ETHEREUM_SEPOLIA, ++ assets: [ ++ { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, maxPerCall: parseUnits('100', 6), maxTotal: parseUnits('1000', 6) }, ++ ], ++ maxGasPerCall: parseUnits('1', 18), ++ validUntil: now + 30 * 86400, ++ allowedCalls: [ ++ { target: aavePool, selector: 'supply(address,uint256,address,uint16)', ++ pins: [ ++ { arg: 0, expected: usdcSepolia }, // asset must be USDC ++ { arg: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }, // onBehalfOf must be this wallet ++ ] }, ++ { target: usdcSepolia, selector: 'approve(address,uint256)' }, ++ ], ++} ++``` ++ ++What is gone from the shape: the separate `NativeRule` type with `target`, `selector`, `pins` and `amount` at the top of the rule, and the fields `amount.maxTotal`, `maxValueTotal` and `maxCalls`. A `max` pin limits each call only. The SDK has no per-argument lifetime total and no call counter. On a cross-chain rule the lifetime limit on a token is the asset's `maxTotal`. On a Push call the lifetime limit is what the owner funds the wallet with, plus `validUntil`. ++ ++`beneficiary` is now a pin. On page sections above, `beneficiary: 2` meant that argument 2 must be the wallet's own account. That is a pin whose expected value is the wallet, so it is written as `{ arg: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }` and the separate field is removed. `WALLET` stands for the wallet's own account on the rule's chain: the AGW address for a call on Push, and the wallet's CEA for a call on another chain. The SDK fills in the real address when the rule is granted, so nobody has to look up a CEA. It is a marker and not an address (its value is the string `'agentic:wallet'`), because an agent card lists its rules before any wallet exists. On read, a pin whose stored value is the wallet's own account comes back as `WALLET`. ++ ++Where each part is checked. Every check runs on Push, in the rules policy, before the wallet is allowed to make the call or hand it to the gateway. ++ ++| On an allowed call | Call on Push | Call on an EVM destination | ++| --- | --- | --- | ++| `target`, `selector`, `maxValue` | Checked | Checked | ++| A pin with `expected: WALLET` | Checked | Checked. One per call until page 1, 6.3 lands | ++| Any other pin | Checked. Up to 8 `expected` pins and one `max` pin per call | Needs page 1, 6.3. Until it lands the SDK rejects it before signing | ++ ++### 6.b Create an agentic wallet - `client.agentic.create` (changed) ++ ++Deploys the wallet and grants the rules in one transaction, for every kind of owner. Either the wallet exists with every rule that was passed, or nothing happened. ++ ++```tsx ++// Function ++const created = await client.agentic.create(label, { options }) ++ ++// Usage and Params ++const created = await client.agentic.create('aave-optimiser', { // wallet with one cross-chain rule ++ rules: [{ // one entry per chain per agent ++ agent: '0xAgentOnPush', // a Push address: the agent's EOA, or its UEA if the key lives on another chain. Never the owner ++ chainNamespace: CHAIN.ETHEREUM_SEPOLIA, // left out = a rule for calls on Push ++ assets: [ ++ { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, maxPerCall: parseUnits('100', 6), maxTotal: parseUnits('1000', 6) }, ++ { token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.WETH, maxPerCall: parseUnits('0.5', 18), maxTotal: parseUnits('2', 18) }, ++ ], ++ maxGasPerCall: parseUnits('1', 18), // PC (wei) per outbound for the destination leg ++ validUntil: now + 30 * 86400, ++ allowedCalls: [ ++ { target: aavePool, selector: 'supply(address,uint256,address,uint16)', ++ pins: [{ arg: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }] }, // onBehalfOf must be this wallet (its CEA on Sepolia) ++ { target: usdcSepolia, selector: 'approve(address,uint256)' }, ++ ], ++ }], ++ progressHook: (p) => console.log(p.id, p.message), // AGENTIC-TX-1xx ++}); ++const bare = await client.agentic.create('scratch', { rules: [] }); // wallet first, rules later with rules.add ++// label string, required shown in list() and info(); the contract stores it ++// options.rules Rule[], required one per chain per agent, may be empty; shape in 6.a ++// options.progressHook function, optional progress events, AGENTIC-TX-1xx; default none ++// rules[].agent Address, required the Push address allowed to act under this rule; never the owner ++// rules[].chainNamespace string, optional the chain the rule governs; left out = Push ++// rules[].assets AssetCap[], cross-chain rules tokens the agent may move; each cap is { token, maxPerCall, maxTotal } ++// rules[].assets[].maxTotal bigint, optional lifetime cap for that token; left out = 0, and 0 means the agent cannot move it ++// rules[].maxGasPerCall bigint, cross-chain rules PC (wei) the wallet may spend per outbound for the destination leg ++// rules[].allowedCalls AllowedCall[], required what the agent may call; each is { target, selector, pins?, maxValue? } ++// rules[].allowedCalls[].maxValue bigint, optional native coin per call; left out = 0 ++// rules[].allowedCalls[].pins Pin[], optional { arg, expected } or { arg, max }; expected may be PushChain.CONSTANTS.AGENTIC.WALLET; see 6.a ++ ++// Returns ++// { wallet, index, rulesIds, tx } ++{ ++ wallet: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', ++ index: 0, ++ rulesIds: ['0x9c1e...'], // in the order of the rules you passed; empty for rules: [] ++ tx: { // UniversalTxResponse, always a single transaction ++ hash: '0xb527...', ++ origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 ++ from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account ++ blockNumber: 1290n, ++ wait // await tx.wait() for the receipt; status lives on the receipt ++ } ++} ++``` ++ ++What changed from 1.b: ++ ++- **One transaction for every owner.** 1.b said a Push EOA owner gets separate deploy and grant transactions until a factory entry lands. That fallback is removed. The factory entry is page 1, 6.2. There is no partial result to reconcile. ++- **`ref` is removed** from every rule. The `rulesId` the grant returns is what a job, a card or an indexer latches on to. Page 1, 6.4. ++- **A cap that is left out is 0, never unlimited.** That covers `assets[].maxTotal` and `allowedCalls[].maxValue`. A forgotten cap means the agent cannot move that asset, which shows up on the first send. Page 1, 6.5. Note that the WETH line in 1.b had no `maxTotal`; under this rule it would move nothing, so the example here sets one. ++- **Rules use the single shape from 6.a.** ++- **The beneficiary field is a pin.** `beneficiary: 2` is written as a pin on argument 2 whose expected value is `PushChain.CONSTANTS.AGENTIC.WALLET` (6.a). ++ ++### 6.c List rules - `w.rules.list` (changed) ++ ++Returns every enabled rule on the wallet as a decoded record, including what each rule has spent so far. ++ ++```tsx ++// Function ++const res = await w.rules.list() ++ ++// Usage and Params ++const { rules } = await w.rules.list(); // the wallet's rules ++// no params ++ ++// Returns ++// { rules: RulesRecord[] } ++{ ++ rules: [ ++ { ++ rulesId: '0x9c1e...', ++ enabled: true, ++ chainNamespace: 'eip155:11155111', ++ agent: '0xAgentOnPush', ++ validUntil: 1767225600, ++ rule: { /* the rule in the 6.a shape, accepted as is by rules.update */ }, ++ spent: { // one entry per asset, same order as rule.assets ++ kind: 'universal', ++ assets: [ ++ { token: '0x1c7D...7238', spent: 25000000n }, // USDC ++ { token: '0xfFf9...6B14', spent: 0n }, // WETH ++ ] ++ } ++ } ++ ] ++} ++``` ++ ++### 6.d Get one rule - `w.rules.get` (changed) ++ ++Returns one rule by id, decoded, with what it has spent. ++ ++```tsx ++// Function ++const record = await w.rules.get(rulesId) ++ ++// Usage and Params ++const record = await w.rules.get('0x9c1e...'); // one rule by id ++// rulesId Hex, required the id returned by create or rules.add ++ ++// Returns ++// RulesRecord ++{ ++ rulesId: '0x51c0...', ++ enabled: true, ++ chainNamespace: 'eip155:42101', // a rule on Push ++ agent: '0xAgentOnPush', ++ validUntil: 1767225600, ++ rule: { ++ agent: '0xAgentOnPush', ++ validUntil: 1767225600, ++ allowedCalls: [ ++ { target: '0xVault', selector: 'deposit(address,uint256)', ++ pins: [ ++ { arg: 0, expected: '0x00000000000000000000000000000000000000000000000000000000000b0b0b' }, ++ { arg: 1, max: 10000000000000000000n }, ++ ] }, ++ ], ++ }, ++ spent: { kind: 'native', valueSpent: 0n, amountSpent: 5000000000000000000n, callsUsed: 1 } ++} ++``` ++ ++What changed from 1.i and 1.j: ++ ++- **`spent` is on every record**, as 1.i and 1.j already said. The first implementation dropped it; it goes back. For a cross-chain rule it is now a list with one entry per asset, because each asset has its own budget. 1.i showed a single `amountSpent`, which predates per-asset budgets. ++- **`ref` is removed** from the record, following 6.b. ++- **Arguments read back as `arg`, never as a byte offset.** The contract stores a pin and a beneficiary as a byte position in the calldata (argument 0 is byte 4, argument 1 is byte 36). The SDK converts that back, so a developer who wrote `arg: 0` reads `arg: 0`. A pin on the wallet itself reads back as `WALLET`. ++- **The record is accepted by `rules.update` without edits.** The test is: read a rule, change `validUntil`, pass it back. An `expected` value reads back as 32-byte hex, because the contract keeps the function selector and not the argument types; it is accepted as input in that form. ++ ++### 6.e Add and update rules - `w.rules.add`, `w.rules.update` (call unchanged) ++ ++The calls and results in 1.k and 1.l stay as they are. Two things change through the rule itself: rules are in the 6.a shape, and they carry no `ref`. ++ ++### 6.f Set the wallet label - `w.setLabel` (changed) ++ ++Changes the label shown in `list()` and `info()`. Owner only. ++ ++```tsx ++// Function ++const tx = await w.setLabel(label, { options? }) ++ ++// Usage and Params ++const tx = await w.setLabel('aave-optimiser-v2'); // rename the wallet ++const reset = await w.setLabel(''); // back to the default label ++const tracked = await w.setLabel('aave-optimiser-v2', { progressHook: (p) => console.log(p.id) }); // with progress events ++// label string, required the new label, at most 64 bytes of UTF-8; an empty string resets it to the default "AGW " ++// options.progressHook function, optional progress events, AGENTIC-TX-106; default none ++ ++// Returns ++// { hash, origin, from, to, blockNumber, wait() } ++{ ++ hash: '0x3b8d...', ++ origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 ++ from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account ++ to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet ++ blockNumber: 1488n, ++ wait // await tx.wait() for the receipt; status lives on the receipt ++} ++``` ++ ++What changed from 1.g: the function is live in the contract, so it is no longer proposed. The rule that a rename is not a checkpoint now binds the SDK too. The first implementation sent the rename through the owner door, and every owner door call records an `OWNER_ACTION` checkpoint. With the checkpoint rule for 8183 jobs, a user who renamed a wallet during a job would hand the fee to the agent over a label. The SDK must call the wallet's `setLabel` directly, for a Push EOA owner and for a UEA owner, so that the checkpoint count is the same before and after a rename. ++ ++### 6.g Send as the wallet - `sendTransaction` with `agenticWallet` (changed) ++ ++The call is the one in 2.a. Two things around it change. ++ ++```tsx ++// Function ++const tx = await client.universal.sendTransaction({ options }) ++ ++// Usage and Params ++const agentClient = await PushChain.initialize(agentSigner, { // agent door: the signer is named as agent in a rule ++ network: PushChain.CONSTANTS.PUSH_NETWORK.TESTNET, ++ agenticWallet: '0xWallet', ++}); ++const tx = await agentClient.universal.sendTransaction({ // rule picked by the destination chain ++ to: { address: aavePool, chain: CHAIN.ETHEREUM_SEPOLIA }, ++ data: [ ++ { to: usdcSepolia, value: 0n, data: approveData }, ++ { to: aavePool, value: 0n, data: supplyData }, ++ ], ++ funds: { amount: parseUnits('100', 6), token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC }, ++}); ++// to { address, chain }, required the destination call and its chain ++// data Hex or call array, optional the destination call data ++// funds { amount, token }, optional the token the wallet moves with this send ++// gasLimit bigint, optional destination gas; left out = the SDK default, which covers first use on a chain (see below) ++ ++// Returns ++// { hash, origin, from, blockNumber, wait() } ++{ ++ hash: '0x6f2a...', ++ origin: 'eip155:11155111:0x7Be1...', // the agent's key, CAIP-10 ++ from: '0xWallet', // the AGW, not the signer ++ blockNumber: 1530n, ++ wait ++} ++``` ++ ++What changed from 2.a: ++ ++- **No gateway approval step.** When the wallet sends a token to another chain, the gateway on Push takes the token out of the wallet, which needs an ERC20 approval from the wallet. The first implementation left that to the owner as a separate transaction through the owner door before the agent's first send. That step is removed: the wallet approves the exact amount inside its own outbound call (page 1, 6.1). Funding a wallet is two plain transfers to its address, PC and the token. The SDK has no allowance check and no allowance error. ++- **The default destination gas covers first use on a chain.** The first time a wallet sends to a chain, its account there (the CEA) is deployed as part of the call, which took about 1.3 million gas on Sepolia against a core default of 500,000. When the CEA is not deployed yet and the caller gave no `gasLimit`, the SDK uses a first-use default large enough for the deployment. When the CEA exists, the normal default applies. A `gasLimit` from the caller always wins, and `maxGasPerCall` on the rule still bounds what the agent can spend. ++ ++### 6.h Types, as they end up ++ ++These replace `NativeRule`, `UniversalRule`, `AllowedCall`, `RulesRecord` and `Spent` in 3.b. Everything else in section 3 stands. ++ ++```tsx ++interface Rule { ++ agent: Address; // Push address: EOA, or the UEA of an external key ++ chainNamespace?: ChainNamespace; // left out = the connected Push chain ++ validUntil: number; ++ assets?: AssetCap[]; // cross-chain rules: tokens the agent may move on chainNamespace ++ maxGasPerCall?: bigint; // cross-chain rules: PC (wei) per outbound for the destination leg ++ allowedCalls: AllowedCall[]; // 1..32 ++} ++ ++interface AssetCap { ++ token: MoveableToken | Address; // the other chain's token address, or the native marker ++ maxPerCall: bigint; ++ maxTotal?: bigint; // left out = 0; 0 means the agent cannot move this token ++} ++ ++interface AllowedCall { ++ target: Address | string; // a contract; on Solana, the program address ++ selector: Selector | 'value-only'; // on Solana, the instruction name with its argument types ++ pins?: Pin[]; ++ maxValue?: bigint; // native coin per call; left out = 0 ++} ++ ++type Pin = ++ | { arg: number; expected: Hex | Address | bigint | WalletMarker } // the argument must equal this constant, or be the wallet itself ++ | { arg: number; max: bigint } // the argument must not exceed this ++ | { account: number; expected: string | WalletMarker; token?: MoveableToken | string }; // Solana only: the account at this position must be this address, or the wallet itself; with token, the wallet's token account for that token ++ ++type WalletMarker = typeof PushChain.CONSTANTS.AGENTIC.WALLET; // 'agentic:wallet': the wallet's own account on the rule's chain ++ ++interface RulesRecord { ++ rulesId: Hex; ++ enabled: boolean; ++ chainNamespace: string; ++ agent: Address; ++ validUntil: number; ++ rule: Rule; // accepted as is by rules.update ++ spent: Spent; ++} ++ ++type Spent = ++ | { kind: 'native'; valueSpent: bigint; amountSpent: bigint; callsUsed: number } ++ | { kind: 'universal'; assets: { token: Address; spent: bigint }[] }; // one entry per asset, same order as rule.assets ++``` ++ ++`Checkpoint` in 3.c keeps its `ref` field. That one is the checkpoint's own reference (a rules id or a call hash) and has nothing to do with the rule `ref` removed in 6.b. ++ ++`PushChain.CONSTANTS.AGENTIC` has one member, `WALLET` (6.a). The rest of 3.d (`FACTORY`, `RULES_POLICY`, `MAX_PINS`, `MAX_ALLOWED_CALLS`, `ENVELOPE_VERSION`) is dropped. Contract addresses and limits stay inside the SDK and are not exposed. The first implementation exposes all five on `PushChain.CONSTANTS.AGENTIC`; they are removed. ++ ++`PushChain.utils.agentic` (3.e) is dropped. The ids and the encoders stay inside the SDK, `client.agentic.derive` covers deriving a wallet address, and `compileCard` is left to the marketplace page (page 6). The first implementation exposes `actionId`, `configId` and `decodeRules` on `PushChain.utils.agentic`; they are removed. ++ ++### 6.i Solana, decided for v1 ++ ++A Solana rule uses the same `allowedCalls` and `pins` shape as every other chain (6.a). The separate `allowedInstructions` shape of the first implementation, with an IDL and named accounts and fields, is replaced. ++ ++```tsx ++// a rule on Solana devnet ++{ ++ agent: '0xAgentOnPush', ++ chainNamespace: CHAIN.SOLANA_DEVNET, ++ assets: [ ++ { token: '0x0000000000000000000000000000000000000000', maxPerCall: 10_000n, maxTotal: 20_000n }, // native SOL, in lamports ++ ], ++ maxGasPerCall: parseUnits('1', 18), ++ validUntil: now + 30 * 86400, ++ allowedCalls: [ ++ { target: program, // the program address ++ selector: 'receive_sol(u64)', // instruction name and argument types ++ pins: [ ++ { arg: 0, max: 10_000n }, // the amount ++ { account: 1, expected: recipient }, // account 1 must be this address ++ { account: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }, // account 2 must be this wallet (its CEA on Solana) ++ ] }, ++ ], ++} ++``` ++ ++The selector is the instruction's name with its argument types, the same idea as an EVM function signature. It is enough to identify the instruction and to locate each argument, so a rule carries no IDL. A program that does not follow the Anchor naming is written with a raw hex selector, as on EVM. ++ ++A Solana instruction carries two separate lists: its arguments (the values in the instruction data) and its accounts (the addresses it touches, passed beside the data). A pin says which list it means: `arg` is a position in the arguments and `account` is a position in the accounts list, both counted from 0. EVM rules only use `arg`, because an EVM call carries its addresses as arguments. ++ ++Tokens on Solana are not held at the wallet's own address. For each token it holds, the wallet has a separate token account, whose address is derived from the wallet and the token. To require that an account is the wallet's token account for a given token, the pin names the token as well: ++ ++```tsx ++{ account: 1, expected: PushChain.CONSTANTS.AGENTIC.WALLET, token: MOVEABLE.TOKEN.SOLANA_DEVNET.USDT } // account 1 must be this wallet's USDT token account ++``` ++ ++Without `token`, `WALLET` on an account means the wallet's CEA itself, which is where native SOL sits. ++ ++The IDL is still used where it is used today: when the call data for a send is built with `PushChain.utils.helpers.encodeTxData`, where it is passed in place of an ABI. ++ ++Accepted for v1: ++ ++- **A Solana rule reads back in the form it was written.** Positions go in and positions come out, so the read, change, pass back test of 6.d holds for Solana too. ++- **An agent sends one Solana instruction per transaction.** Arrays of instructions are not supported on the agent door. ++- **Only instructions with fixed-size arguments can be put under a rule.** Numbers up to u64, public keys, booleans and fixed-length arrays work, with top-level, non-optional accounts. Lists, strings, optional values and nested structs are rejected before signing. A deposit of an amount works; a routed swap that takes a list of hops does not. ++ ++### 6.j Contract changes these depend on ++ ++All on [1. AGW Contract Changes (nomenclature standard + change set)](https://app.notion.com/p/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d?pvs=21), section 6. ++ ++| Page 1 item | Contract change | Needed by | ++| --- | --- | --- | ++| 6.1 | The wallet approves the gateway for the exact amount inside each outbound | 6.g | ++| 6.2 | One factory call that deploys the wallet and grants its rules | 6.b | ++| 6.3 | Pins on EVM destination calls in the rules policy | 6.a | ++| 6.4 | `ref` removed from `grantRules` | 6.b, 6.c, 6.d | ++| 6.5 | A cap of 0 means nothing moves | 6.b | ++ ++### 6.k Still open ++ ++1. Whether the rules policy can enforce the wallet token account pin of 6.i in every case. To confirm with the contracts owner. ++ ++### 6.l Response fields and error codes added by the first implementation ++ ++The first implementation adds response fields and error codes that are not in 3.f. They are accepted as listed here. Four codes are removed, each for the reason given below. ++ ++**The `agentic` object on a response.** Every send made as the wallet carries an `agentic` object on its response, so the caller can see which wallet, which door and which rule the send used. Only the fields that apply to that send are present. ++ ++```tsx ++// tx.agentic, on the UniversalTxResponse of a send made as the wallet ++{ ++ wallet: '0xWallet', // the AGW ++ door: 'agent', // 'owner' or 'agent' ++ rulesId: '0x9c1e...', // the rule used; agent door only ++ chainNamespace: 'eip155:11155111', // destination chain of a cross-chain send ++ destinationAccount: '0xCEA...', // the wallet's CEA on that chain ++ destinationCalls: [{ to, data, value }], // the ordered calls run on an EVM destination ++ destinationInstruction: { program, data, accounts }, // the instruction run on Solana ++ destinationTransfer: { recipient, token, amount }, // a plain transfer of SOL or a token on Solana ++ nativeCalls: [{ to, data, value }], // the ordered calls of a batch on Push ++ rawTo: '0xWallet', // what the signer's transaction actually called ++ rawData: '0x...' // the calldata it actually carried ++} ++``` ++ ++**Error codes that stay.** All are thrown before anything is signed, unless the row says otherwise. ++ ++| Code | Thrown when | ++| --- | --- | ++| `INDEX_RACE` | Another `create` took the wallet slot first. Nothing was committed; call `create` again | ++| `NOT_WALLET_OWNER` | The signer tries to change a wallet it does not own | ++| `READ_ONLY` | A client with no signer tries to write | ++| `RULE_NOT_FOUND` | The rule id is not an enabled rule on the wallet | ++| `INVALID_RULE` | A rule or a label is malformed, for example a label over 64 bytes | ++| `AMBIGUOUS_RULE` | More than one enabled rule matches the agent and the destination chain. The SDK does not pick one | ++| `RULE_READ_FAILED` | The rules could not be read from the chain, so the SDK does not send | ++| `INCONSISTENT_READ` | Two reads from the chain disagree with each other, so the SDK does not act on them | ++| `AGENT_GAS_INSUFFICIENT` | The agent's own Push account has no PC for gas. The wallet's PC pays for the outbound, not for the agent's gas | ++| `WALLET_BALANCE_INSUFFICIENT` | The wallet does not hold enough PC or enough of the token for the send | ++| `CAPABILITY_UNAVAILABLE` | The network cannot do what was asked, for example a batch as the agent where no atomic batch is available | ++| `RECEIPT_UNAVAILABLE` | After sending: the transaction was submitted but its receipt could not be read. It may still land | ++| `RECEIPT_MISMATCH` | After sending: the receipt does not match what was sent, for example rule ids in a different order | ++ ++**Error codes that are removed.** ++ ++| Code | Why it goes | ++| --- | --- | ++| `CREATE_PARTIAL` | `create` is one transaction (6.b), so it cannot end half done | ++| `GATEWAY_ALLOWANCE_INSUFFICIENT` | The wallet approves the gateway itself (6.g, page 1 item 6.1) | ++| `GENERATION_UNSUPPORTED` | There are no earlier wallet versions to support | ++| `RULE_LIMIT_EXCEEDED` | Only raised by a local preview of a Solana send. The on-chain rules policy is the only rule checker (2.a), so this is not a public code | ++ ++**`DUPLICATE_RULE` is restored.** 3.f lists `DUPLICATE_RULE`: two rules for the same agent and chain are rejected before signing. The first implementation does not have it and only notices the overlap later, when the agent sends (`AMBIGUOUS_RULE`). The check goes back into `create` and `rules.add`. `AMBIGUOUS_RULE` stays for a wallet that already has overlapping rules. ++ ++**Fields on the error classes.** `AgenticError` also carries `details` and `cause`, and both stay. `AgenticRevertError` carries `transactionHashes` and `pendingTransactionHash`, and a returned `tx` carries an `atomic` flag. These three report a write that was split across several transactions. They are removed once every write is a single transaction (6.b). ++ ++The progress events of the first implementation are the ones in 3.f, with nothing added. ++ ++### 6.m Delete rules - `w.rules.delete` (renamed from `w.rules.revoke`) ++ ++Removes some rules by id, or all of them in one atomic call. This is 1.m under a new name. The call shape and the result are unchanged. ++ ++```tsx ++// Function ++const tx = await w.rules.delete(rulesIds, { options? }) ++const tx = await w.rules.delete({ all, progressHook? }) ++ ++// Usage and Params ++const some = await w.rules.delete(['0x9c1e...', '0x7d3a...']); // delete these rules ++const all = await w.rules.delete({ all: true }); // delete every rule on the wallet ++const tracked = await w.rules.delete(['0x9c1e...'], { progressHook: (p) => console.log(p.id) }); // with progress events ++// rulesIds Hex[], required unless all is set the rules to delete ++// options.progressHook function, optional progress events, AGENTIC-TX-105; default none ++// all true, required unless rulesIds given delete every rule on the wallet in one atomic call ++// progressHook function, optional same events, in the { all: true } form; default none ++ ++// Returns ++// { hash, origin, from, to, blockNumber, wait() } ++{ ++ hash: '0x8e01...', ++ origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 ++ from: '0xFd6C2fE69bE13d8bE379CCB6c9306e74193EC1A9', // the owner's Push account ++ to: '0x2Fd904d6f2C0b34d58426C8Ae9c5267E845CE98f', // the wallet ++ blockNumber: 1512n, ++ wait // await tx.wait() for the receipt; status lives on the receipt ++} ++``` ++ ++What changed from 1.m: ++ ++- **The method is delete, not revoke.** The handle now reads `rules.add`, `rules.update`, `rules.delete`. Delete is also what happens on-chain: the wallet removes the rule from the session engine for good. A deleted rule cannot be switched back on, and granting the same rule again produces a new `rulesId`. ++- **The bare-call error is renamed.** A bare `delete()` still throws. The code is `DELETE_NEEDS_TARGET` (was `REVOKE_NEEDS_TARGET`). ++- **Contract names do not change.** The wallet functions stay `revokeRules` and `revokeAllRules`, the event stays `RulesRevoked`, and the checkpoint kind stays `RULES_REVOKED`. `w.checkpoints()` returns that kind as the contract records it. ++ ++# 7. Changes proposed on 12 Oct 2026: Presets ++ ++A preset is a ready-made set of rules for a common use case, such as trading on popular DEXes. The wallet UI and developers both read presets from the SDK, so there is one source for them. A preset only produces rules. The rules are then passed to `client.agentic.create` in the normal way, and can be edited before that. App ABIs are not part of presets and stay in the wallet UI, because the UI can update them without an SDK release. ++ ++List of changes: ++ ++- New constants: `PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY` with `DEXES`, `LENDING` and `PREDICTION`. An app level (`PushChain.CONSTANTS.AGENTIC.PRESETS.APP`) can be added later without changing the functions. ++- New function: `PushChain.utils.agentic.presets.list`, which lists every preset the SDK ships. ++- New function: `PushChain.utils.agentic.presets.get`, which returns the rules for one preset. ++- This brings back `PushChain.CONSTANTS.AGENTIC` members beyond `WALLET` and the `PushChain.utils.agentic` namespace, for presets only. Both were dropped earlier on this page (6.h). ++ ++### 7.a Preset constants - `PushChain.CONSTANTS.AGENTIC.PRESETS` ++ ++```tsx ++PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.DEXES ++PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.LENDING ++PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.PREDICTION ++// later: PushChain.CONSTANTS.AGENTIC.PRESETS.APP. ++``` ++ ++The constants object must be enumerable so that tools which iterate constants can list it. ++ ++### 7.b List available presets - `PushChain.utils.agentic.presets.list` ++ ++Returns every preset the SDK ships, so a UI can show them as cards and a developer can discover them. ++ ++```tsx ++// Function ++const res = PushChain.utils.agentic.presets.list({ options? }) ++ ++// Usage and Params ++const { presets } = PushChain.utils.agentic.presets.list(); // every preset the SDK ships ++// options.type string, optional 'CATEGORY' today, 'APP' later; omit to list everything ++ ++// Returns ++// { presets: Preset[] } ++{ ++ presets: [ ++ { ++ type: 'CATEGORY', // later 'APP' ++ constant: PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.DEXES, ++ name: 'Popular DEXes', ++ chains: ['eip155:11155111', 'eip155:84532'] // chains this preset has rules for (Ethereum Sepolia, Base Sepolia) ++ } ++ ] ++} ++``` ++ ++A preset with an empty `chains` list has nothing behind it yet (`PREDICTION` today, since its main apps are on a chain Push does not support yet), and the wallet UI should hide it. ++ ++### 7.c Get the rules of a preset - `PushChain.utils.agentic.presets.get` ++ ++Returns one rule per chain for the chosen preset. Each rule already contains the allowed contracts, the allowed calls with their full signatures, and the pins that keep funds going back to the wallet. The agent, assets and expiry are optional: pass them to get rules that are ready for `create`, or leave them out to pre-fill a review screen and add them later. ++ ++```tsx ++// Function ++const res = PushChain.utils.agentic.presets.get(preset, { options? }) ++ ++// Usage and Params ++const { rules } = PushChain.utils.agentic.presets.get( ++ PushChain.CONSTANTS.AGENTIC.PRESETS.CATEGORY.DEXES, // a category constant now, an app constant later ++ { ++ chainNamespace: PushChain.CONSTANTS.CHAIN.ETHEREUM_SEPOLIA, // optional, omit to get every chain of the preset ++ agent: '0xAgentOnPush', // optional, the agent's Push address, applied to every rule ++ assets: [{ chainNamespace, token, maxPerCall, maxTotal }], // optional, each asset is placed on the rule of its chain ++ validUntil: now + 30 * 86400, // optional, applied to every rule; omit to set it later ++ } ++); ++ ++await client.agentic.create('My DEX agent', { rules }); ++ ++// Returns ++// { rules: Rule[] }, one rule per chain, in the same shape client.agentic.create takes ++{ ++ rules: [ ++ { ++ agent: '0xAgentOnPush', ++ chainNamespace: 'eip155:11155111', ++ assets: [{ token: '0x1c7D...7238', maxPerCall: 100000000n, maxTotal: 1000000000n }], // from options.assets, without its chainNamespace ++ validUntil: 1767225600, ++ allowedCalls: [ ++ { ++ target: '0x...', ++ selector: 'exactInputSingle((address,address,uint24,address,uint256,uint256,uint160))', ++ pins: [{ arg: 3, expected: PushChain.CONSTANTS.AGENTIC.WALLET }], ++ app: 'Uniswap V3', // display only, ignored by create ++ label: 'Swap exact input' // display only, ignored by create ++ } ++ // plus one approve(address,uint256) per asset, spender pinned to the app's contract (see Behaviour) ++ ] ++ } ++ ] ++} ++``` ++ ++**Behaviour** ++ ++| Case | What happens | ++| --- | --- | ++| `chainNamespace` omitted | One rule is returned for every chain the preset covers. | ++| `agent`, `assets` or `validUntil` omitted | The rule is returned without that field. The caller adds it before `create`, and `create` rejects a rule with no agent as it already does. | ++| `assets` passed | Each asset is placed on the rule of its chain. If `chainNamespace` is set in the options, the `chainNamespace` on each asset can be left out. For each asset, an approve call is added to that rule, with the spender pinned to the app's contract on that chain, because a swap or deposit fails without it. | ++| Asset passed without a cap | Proposed: `get` throws. An omitted cap means 0 in the rules policy, so the rule would allow nothing, and a preset should never silently produce a rule that cannot act. | ++| Selectors | Always the full signature, never the bare name, because apps overload function names (for example two different execute functions on the same router). | ++| Grouping | One rule per chain per category, not one rule per app. Each category stays at two or three apps per chain so the rule stays inside the 32 allowed calls limit of a universal rule. | ++| Display fields | `app` and `label` on each allowed call are for showing names in a UI. `create` ignores them. | ++ ++### 7.d Notes for the wallet UI ++ ++- Call `get` with only the preset to pre-fill the review screen, then let the user add the agent, tokens, limits and expiry. ++- A blank limit shown as infinity in the UI must be sent as an explicit maximum value. Leaving the cap out means 0, not unlimited. ++- The preset data (contract addresses, calls and pins) ships inside the SDK. An app upgrade becomes a new app entry, and the old one keeps working because the older contract still exists. ++ ++### 7.e Open questions ++ ++- Can a pin's arg index reach a field inside a struct argument? The Uniswap `exactInputSingle` example depends on it, because the recipient sits inside a struct. (Rules policy contract owner) ++- Routers that hide the recipient inside encoded bytes, such as Uniswap Universal Router `execute`, cannot be pinned, so they should not be preset targets. Confirm the list of apps and functions per chain with this in mind. (SDK owner with the rules policy contract owner) ++- Is the agent one Push address for every chain, including Solana rules? If not, `agent` becomes a per-chain map. (SDK owner) ++- Should `get` throw when an asset has no cap, as proposed above? (Page owner) ++- First preset list for testnet: which apps on which chains for `DEXES` and `LENDING`. (SDK owner with the rules policy contract owner) \ No newline at end of file diff --git a/plan/agw/research/section7-presets-2026-10-12/api.json b/plan/agw/research/section7-presets-2026-10-12/api.json new file mode 100644 index 00000000..c9f8ff6b --- /dev/null +++ b/plan/agw/research/section7-presets-2026-10-12/api.json @@ -0,0 +1,11558 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "7115c59474af6304905ad3e4466732b0530dc791", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [ + "AgenticPresets", + "DecodedSolanaRule", + "Pin", + "Preset", + "PresetAsset", + "PresetCategory", + "PresetOptions", + "PresetRuleTemplate", + "ReadyPresetOptions", + "RuleInput", + "Spent", + "WalletMarker" + ], + "removedExports": [ + "AgenticNetworkConstants", + "NativeRule", + "UniversalRule" + ], + "changedAgwTypes": [ + "AgenticWallet", + "AgenticError", + "AGENTIC_ERROR_CODE", + "Rule", + "RuleInput", + "Pin", + "Spent", + "NativeRule", + "AssetCap", + "AllowedCall", + "UniversalRule", + "RulesRecord", + "CreateOptions", + "AgenticTxMetadata" + ], + "publicTypeChanges": [ + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticErrorCode", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "CreateOptions", + "DecodedSolanaRule", + "Rule", + "RuleInput", + "Pin", + "Spent", + "WalletMarker", + "RulesRecord", + "Preset", + "PresetCategory", + "PresetAsset", + "PresetOptions", + "ReadyPresetOptions", + "PresetRuleTemplate", + "AgenticPresets" + ], + "transactionMethodChanges": [], + "instanceMethodChanges": [], + "agwConstantsChanged": true, + "before": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address(token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }): {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "after": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticPresets", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DecodedSolanaRule", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "Pin", + "PreparedRead", + "PreparedUniversalTx", + "Preset", + "PresetAsset", + "PresetCategory", + "PresetOptions", + "PresetRuleTemplate", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReadyPresetOptions", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RuleInput", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "Spent", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletMarker", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n delete(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n delete(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DELETE_NEEDS_TARGET: \"DELETE_NEEDS_TARGET\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DELETE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"DELETE_NEEDS_TARGET\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RuleInput": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[] | import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Pin": { + "type": "{\n account: number;\n arg?: never;\n expected: \"agentic:wallet\" | string;\n max?: never;\n token?: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n} | {\n account?: never;\n arg: number;\n expected: \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint;\n max?: never;\n} | {\n account?: never;\n arg: number;\n expected?: never;\n max: bigint;\n}", + "members": { + "account": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "arg": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "bigint | string | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "Spent": { + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"native\" | \"universal\"" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall", + "members": { + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Pin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "spent": { + "optional": false, + "readonly": false, + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DELETE_NEEDS_TARGET: \"DELETE_NEEDS_TARGET\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DELETE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"DELETE_NEEDS_TARGET\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n delete(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n delete(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall", + "members": { + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Pin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "DecodedSolanaRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[]" + }, + "ceaAccounts": { + "optional": false, + "readonly": false, + "type": "readonly `0x${string}`[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`solana:${string}`" + }, + "dataPins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmDataPinWire[]" + }, + "expectedCEA": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "format": { + "optional": false, + "readonly": false, + "type": "\"decoded\"" + }, + "gatewayProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmAccountPinWire[]" + }, + "programs": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").AllowedProgramWire[]" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RuleInput": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[] | import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Pin": { + "type": "{\n account: number;\n arg?: never;\n expected: \"agentic:wallet\" | string;\n max?: never;\n token?: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n} | {\n account?: never;\n arg: number;\n expected: \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint;\n max?: never;\n} | {\n account?: never;\n arg: number;\n expected?: never;\n max: bigint;\n}", + "members": { + "account": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "arg": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "bigint | string | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "Spent": { + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"native\" | \"universal\"" + } + } + }, + "WalletMarker": { + "type": "\"agentic:wallet\"", + "members": {} + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "spent": { + "optional": false, + "readonly": false, + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + }, + "Preset": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").Preset", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace[]" + }, + "constant": { + "optional": false, + "readonly": false, + "type": "\"DEXES\" | \"LENDING\" | \"PREDICTION\"" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"CATEGORY\"" + } + } + }, + "PresetCategory": { + "type": "\"DEXES\" | \"LENDING\" | \"PREDICTION\"", + "members": {} + }, + "PresetAsset": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "PresetOptions": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetOptions", + "members": { + "agent": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadyPresetOptions": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").ReadyPresetOptions", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PresetRuleTemplate": { + "type": "{\n agent?: `0x${string}`;\n validUntil?: number;\n} & Omit", + "members": { + "agent": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "AgenticPresets": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").AgenticPresets", + "members": { + "get": { + "optional": false, + "readonly": false, + "type": "{\n (preset: import(\"sdk/src/lib/agentic/presets/types\").PresetCategory, options: import(\"sdk/src/lib/agentic/presets/types\").ReadyPresetOptions): {\n rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[];\n };\n (preset: import(\"sdk/src/lib/agentic/presets/types\").PresetCategory, options?: import(\"sdk/src/lib/agentic/presets/types\").PresetOptions): {\n rules: import(\"sdk/src/lib/agentic/presets/types\").PresetRuleTemplate[];\n };\n}" + }, + "list": { + "optional": false, + "readonly": false, + "type": "(options?: {\n type?: \"CATEGORY\";\n}) => {\n presets: import(\"sdk/src/lib/agentic/presets/types\").Preset[];\n}" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly<{\n PRESETS: Readonly<{\n CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n }>;\n }>;\n WALLET: \"agentic:wallet\";\n }>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": true, + "type": "{\n readonly presets: import(\"sdk/src/lib/agentic/presets/types\").AgenticPresets;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address: (token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "PRESETS": { + "optional": false, + "readonly": true, + "type": "{\n readonly CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n }>;\n}" + }, + "WALLET": { + "optional": false, + "readonly": true, + "type": "\"agentic:wallet\"" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly PRESETS: Readonly<{\n CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n }>;\n }>;\n readonly WALLET: \"agentic:wallet\";\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "scope": "All root exports and declared public members, PushChain static/instance members, universal transaction methods, utility groups, readonly/optional markers and constants. Behavior/default/deployment changes need the written session review." +} diff --git a/plan/agw/research/section7-presets-2026-10-12/commands.md b/plan/agw/research/section7-presets-2026-10-12/commands.md new file mode 100644 index 00000000..a5b1d458 --- /dev/null +++ b/plan/agw/research/section7-presets-2026-10-12/commands.md @@ -0,0 +1,12 @@ +# Preset validation commands + +No app addresses were added to the production catalog. No new funded app-preset E2E was run. + +- Unit: `node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand --runTestsByPath packages/core/src/lib/agentic/__tests__/presets.spec.ts packages/core/src/lib/agentic/__tests__/response-surface.spec.ts` +- Local contracts: `AGW_LOCAL_DIR=/tmp/agw-oct12-v5 node node_modules/jest/bin/jest.js --config packages/core/jest.agw-local.config.ts --runInBand --runTestsByPath packages/core/__agw-local__/v5-multiasset.spec.ts` +- Library, spec and local typechecks use their existing packages/core tsconfig files with `--noEmit`. +- Build: `NX_DAEMON=false node node_modules/nx/bin/nx.js run core:build --skip-nx-cache` +- Consumer checks: `node packages/core/scripts/check-agw-docs.js`, `check-agw-package.js`, `check-agw-api.js --output /tmp/agw-presets-api.json`. +- Full unit regression uses the normal core Jest config. An initial run had 2,074 passes and one existing 100ms outbound-SVM timeout test failure while other checks ran. The unchanged test passed on retry. A subsequent isolated full run is recorded separately. + +The prior section-6 funded acceptance covered 68 scenarios across a 65/3 full run and a 3/3 targeted rerun. That evidence is distinct from this pure preset framework and fixture-only contract integration. diff --git a/plan/agw/research/section7-presets-2026-10-12/docs.log b/plan/agw/research/section7-presets-2026-10-12/docs.log new file mode 100644 index 00000000..7f37e7a9 --- /dev/null +++ b/plan/agw/research/section7-presets-2026-10-12/docs.log @@ -0,0 +1 @@ +AGW guide: 5 TypeScript blocks typechecked against public exports; no examples executed. diff --git a/plan/agw/research/section7-presets-2026-10-12/full-unit.log b/plan/agw/research/section7-presets-2026-10-12/full-unit.log new file mode 100644 index 00000000..ef6dd277 --- /dev/null +++ b/plan/agw/research/section7-presets-2026-10-12/full-unit.log @@ -0,0 +1,176 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/labels.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/public-rule.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts + +Test Suites: 1 skipped, 123 passed, 123 of 124 total +Tests: 12 skipped, 2075 passed, 2087 total +Snapshots: 0 total +Time: 23.719 s, estimated 33 s +Ran all test suites. diff --git a/plan/agw/research/section7-presets-2026-10-12/local-contract.log b/plan/agw/research/section7-presets-2026-10-12/local-contract.log new file mode 100644 index 00000000..ee5d39d0 --- /dev/null +++ b/plan/agw/research/section7-presets-2026-10-12/local-contract.log @@ -0,0 +1,19 @@ +PASS core-agw-local packages/core/__agw-local__/v5-multiasset.spec.ts (9.845 s) + v5 multi-asset SDK management and execution + ✓ a fixture preset produces rules accepted by public create and enforced by real contracts (528 ms) + ✓ public create encodes two ordered assets; public get reconstructs source-token caps (359 ms) + ✓ a token from the wrong chain fails before deployment (7 ms) + ✓ a same-chain registry identity mismatch fails before deployment (3 ms) + ✓ both tokens execute under one rule and keep independent counters/limits (374 ms) + ✓ omitted and explicit zero totals both prohibit movement (363 ms) + ✓ empty user assets grants one zero-cap gas token and executes a call-only request (357 ms) + ✓ public update resets both counters in one batch and records five checkpoints (375 ms) + ✓ spend on the second asset after snapshot rolls back revoke/grant and checkpoint writes (363 ms) + ✓ out-of-band duplicate contract grants still make sends ambiguous (330 ms) + ✓ a legacy two-field envelope is refused by the actual v5 grant path (314 ms) + +Test Suites: 1 passed, 1 total +Tests: 11 passed, 11 total +Snapshots: 0 total +Time: 9.875 s +Ran all test suites within paths "packages/core/__agw-local__/v5-multiasset.spec.ts". diff --git a/plan/agw/research/section7-presets-2026-10-12/package.log b/plan/agw/research/section7-presets-2026-10-12/package.log new file mode 100644 index 00000000..8e1b97e4 --- /dev/null +++ b/plan/agw/research/section7-presets-2026-10-12/package.log @@ -0,0 +1 @@ +AGW package: CJS/ESM imports, compiled declaration examples and npm contents pass. No examples executed/published. diff --git a/plan/agw/research/section7-presets-2026-10-12/preset-unit.log b/plan/agw/research/section7-presets-2026-10-12/preset-unit.log new file mode 100644 index 00000000..b1d3e1cb --- /dev/null +++ b/plan/agw/research/section7-presets-2026-10-12/preset-unit.log @@ -0,0 +1,8 @@ +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts + +Test Suites: 2 passed, 2 total +Tests: 30 passed, 30 total +Snapshots: 0 total +Time: 2.314 s, estimated 5 s +Ran all test suites within paths "packages/core/src/lib/agentic/__tests__/presets.spec.ts", "packages/core/src/lib/agentic/__tests__/response-surface.spec.ts". diff --git a/plan/agw/research/section7-presets-2026-10-12/timing-test-rerun.log b/plan/agw/research/section7-presets-2026-10-12/timing-test-rerun.log new file mode 100644 index 00000000..0e5113b4 --- /dev/null +++ b/plan/agw/research/section7-presets-2026-10-12/timing-test-rerun.log @@ -0,0 +1,17 @@ +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts + ✓ confirms pending Cosmos signature EyFYDWDhksPYpRk3DLzeW4izQagJZte6bKCQFagLYBdtJyaEyjbQpAWCbqDhHVymzjPJ4vdeHG1HHQp1qi6FhZD through Solana RPC (3 ms) + ✓ confirms pending Cosmos signature 0x0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c through Solana RPC (4 ms) + ✓ waits through processed status before finalization (2 ms) + ✓ reports a confirmed signature error as failure, preserving the hash (1 ms) + ✓ keeps wrong-cluster pending until timeout (21 ms) + ✓ keeps missing pending until timeout (21 ms) + ✓ keeps processed-error pending until timeout (20 ms) + ✓ keeps rpc-error pending until timeout (20 ms) + ✓ keeps malformed-hash pending until timeout (20 ms) + ✓ keeps an authoritative Cosmos revert ahead of the RPC tiebreaker (1 ms) + +Test Suites: 1 passed, 1 total +Tests: 10 passed, 10 total +Snapshots: 0 total +Time: 2.544 s +Ran all test suites within paths "packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts". diff --git a/plan/agw/research/source-refresh-2026-10-07/README.md b/plan/agw/research/source-refresh-2026-10-07/README.md new file mode 100644 index 00000000..4d233be7 --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/README.md @@ -0,0 +1,90 @@ +# AGW source refresh and SDK alignment — October 7, 2026 + +Reviewed SDK `898eda17` against fresh Notion exports, fetched AGW/core/gateway refs, and read-only deployment probes. No runtime files were changed and no transactions were broadcast during this review. + +**Review baseline/result:** no new AGW contract/deployment drift. `setLabel` remains the only pending standalone AGW contract-delivery item. At that reviewed commit, two SDK-owned alignment follow-ups were found: policy-preflight/error consistency and Solana owner funds-only parity. Several Notion sections also lag the agreed decisions. + +**Subsequent disposition:** G27/G28 have been fixed and validated. [SDK fix report](../sdk-alignment-fixes-2026-10-07/README.md). The findings and reproduction below preserve the pre-fix evidence; they do not describe current production send paths. + +## Freshness and evidence + +| Source | Fresh result | +| --- | --- | +| All 12 registered Notion bodies | Exported and imported at 2026-10-07 10:27:18 UTC (15:57 IST); 1 changed, 11 unchanged; no missing/unknown pages | +| SDK page 5 | Only body change: removal of `ref: jobRef` from the create example | +| Primary Notion discussions | Pages 1 and 5, including resolved threads, inspected through All discussions | +| AGW | `deploy-agw@10a24f1`, source `pushAgenticWallet_v3@e8db748`; unchanged | +| Core marketplace | `universalMarketplace_v1@9479aef`; only three documentation files added since prior pin `cb69e0b`; code unchanged | +| Gateway | `pc20-3rd-iteration@bcbf7df`; unchanged. All remote refs were fetched; the alternative SVM audit branch is not assumed to replace the configured deployment | +| Donut | Chain 42101, block 23989371: code hashes, proxy slots, version, pause state and wiring match the prior probe | +| Solana devnet | Slot 508426857: gateway and test-counter ProgramData fingerprints match October 6; gateway remains unpaused | + +[Notion comparison and hashes](../../notion/history/20261007T102718466408Z/refresh.json), [page-5 body diff](../../notion/history/20261007T102718466408Z/5-sdk-agw.diff), [raw exports](../../notion/exports/20261007T102718466408Z/), [contract refs/diffs](contract-refresh.json), [Donut probe](donut-probe.json), [Solana probe](solana-probe.json). + +The new core docs clarify the already-reviewed per-token caps, job/rule expiry equality and marketplace rejection of approval selectors. They do not change standalone AGW contract behavior. Current copies are retained under [contracts/](contracts/). + +## SDK findings at reviewed commit 898eda17 + +### G27 — Policy preflight and error shape differ from the spec (SDK-owned, P1) + +The refreshed SDK spec §2.a says URP is the rule checker and rule failures surface as `AgenticRevertError` with `decodedError`. The user’s latest clarification also puts rule enforcement at the contract, with SDK error mapping. + +The public Solana route evaluates stored policy constraints locally before entering its send/error-mapping block: + +- `execution/svm-public.ts:95` awaits `prepareSvmAgentExecution`; its `wrapSendError` catch is later, around the actual execution (`222`). +- `execution/svm-outbound.ts:26–50` evaluates expiry, asset amounts, cumulative spend and PC limits. Refusals are `AgenticError` / `RULE_LIMIT_EXCEEDED`, with a string in `details.contractError`. +- `execution/svm-payload.ts:22–25, 102–135` evaluates allowed programs and account/data pins. Refusals are `AgenticError` / `INVALID_RULE`, without `decodedError`. +- The EVM route also performs a local `maxGasPerCall` check in `execution/send.ts`; align the distinction consistently across both VMs. + +Reproduced expiry and wrong-account refusals: neither is an `AgenticRevertError`, and `decodedError` is absent. This concerns validation placement and the public error contract; authorization is still enforced by URP. Existing passing refusal E2Es do not establish error-type parity because some assert only the message. + +**Recommended SDK action:** retain structural/context/funding validation, but obtain policy rejections from the contract/simulation and pass them through the existing mapper. Do not fabricate an on-chain revert for a purely local decision. Add public-path tests for error class, decoded gate and no state change. If retaining local policy checks deliberately, their distinct behavior needs an explicit documented public contract rather than a claim of spec parity. + +### G28 — Solana owner funds-only sends are unavailable (SDK-owned scope gap, P2) + +The spec §1.d promises the owner ordinary wallet send tooling. The contract owner door checks no policy (`docs/5_SDK_Owner_Integration.md:307–323`). Gateway classification already supports amount > 0 with an empty payload as FUNDS. + +`execution/svm-public.ts:54–61` rejects absent instruction data for both owner and agent doors. A public owner-route reproduction with funds and no instruction returns `INVALID_RULE` before execution. The ordinary core SVM payload builder accepts the corresponding no-execution shape. Our consumer guide already discloses this restriction, so it is an existing scope limitation rather than a newly broken deployment. + +**Recommended SDK action:** support funds-only sends on the owner door using the normal gateway route, with balance/allowance checks and receipt/replay coverage. Preserve the agent rulebook’s instruction requirement. No contract change is needed for the owner route. + +[Read-only source reproductions](reproduce-sdk-findings.cjs), [results](sdk-findings.json). These isolate SDK branches with local inputs; they are not additional live delivery tests. Run against an isolated SDK checkout at `898eda17` using AGW_REVIEW_SDK_ROOT; the public path has since changed: + +```sh +AGW_REVIEW_SDK_ROOT=/path/to/isolated-sdk-at-898eda17 TS_NODE_PROJECT=packages/core/tsconfig.lib.json node -r ts-node/register/transpile-only plan/agw/research/source-refresh-2026-10-07/reproduce-sdk-findings.cjs +``` + +## Notion text needing reconciliation + +The new “omitting ref” comment and example edit agree with our removal. However, page 5 still contains: + +| Stale text | Current agreed/implemented position | +| --- | --- | +| `ref` in NativeRule, UniversalRule, RulesRecord and prose | Rule ref removed; checkpoint ref retained | +| One rule per agent/chain and `DUPLICATE_RULE` | Multiple grants allowed; SDK retains AMBIGUOUS_RULE when lookup finds several candidates | +| Public `spent` and `compileCard` | Excluded from standalone v1 by Harsh’s earlier replies | +| Public generation-dependent helpers | Kept internal under the earlier approved scope | +| Push EOAs cannot batch / require a new factory method | Existing sender-preserving 7702 batching is implemented and tested | +| Solana rulebook “once it ships,” without final public IDL types | v4 rulebook deployed; public supported-IDL integration implemented | +| No validator at all | Sender-bound AgentValidator remains as the SmartSession adapter; no engine fork | + +Page 1 still describes the previously corrected six-field gateway migration direction. Fresh sources and live slots support the currently integrated eight-field request. Its proposed grant refs also lag the removal decision. These are documentation corrections, not reasons to revert the SDK to historical behavior. + +The contract owner guide’s `beneficiaryOffset = 4 + 32 * argIndex` is valid for the simple scalar ABI example, but is not a general formula for arbitrary static arrays/tuples. Keep the SDK’s ABI-layout calculation and exact offset reads. + +## Visible discussion review + +- Page 5: new Harsh comment “omitting ref,” shown as 2h old, attached to the create-example thread. The earlier multiple-rules, token-independence and deleted-content limit discussions remain visible. No newer substantive answer changes the user-relayed decisions. +- Page 1: latest visible substantive label comment remains October 1: owner-only setLabel / LabelSet, not a checkpoint. No delivery announcement/ABI appears in the thread. +- Overview and pages 2/3/4/6/7/8: loaded header showed no Comments button. This is a visibility observation, not proof that no hidden/resolved discussions exist. +- Historical SDK: September 18 WIP comment; no current-scope change. +- Historical address book: no Comments button; body still describes an older deployment and is kept historical. +- Historical wallet flow: September 7 tooling question, no new reply. + +Native exports exclude comments; these observations are separate evidence and no comment was posted or edited. + +## Remaining external work and limits + +`setLabel` still needs Zaryab’s implemented ABI/deployment. Automatic-selection delivery is **not** requested; existing contract enforcement and SDK ambiguity handling remain the clarified design. `creditRevert` remains a separate platform executor dependency, with ordinary refunds not restoring spent. + +Supported public IDL layouts remain a documented subset (fixed Anchor fields, flat non-optional accounts, eight-byte discriminators; one instruction per SVM send). This refresh did not expand that scope or rerun funded suites. It is an alignment review, not a full security audit. diff --git a/plan/agw/research/source-refresh-2026-10-07/contract-refresh.json b/plan/agw/research/source-refresh-2026-10-07/contract-refresh.json new file mode 100644 index 00000000..b957509d --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/contract-refresh.json @@ -0,0 +1,82 @@ +{ + "fetched_at": "2026-10-07T10:26:01.543177+00:00", + "sdk_commit": "898eda17911133faa155899ac8e1276a589c4564", + "repositories": [ + { + "repository": "push-agentic-wallets", + "ref": "origin/deploy-agw", + "commit": "10a24f101e2e6e0a9b76517b29f5cdb1aa967796", + "previous_pin": "10a24f101e2e6e0a9b76517b29f5cdb1aa967796", + "diff_stat": "", + "source_changed": false, + "remote_refs": [ + "origin 9ddd95402b9a2dbf494f6ebfdb477e9a0fb1408a", + "origin/demo-v1 94e0ad21f5dcf353bc792b3fbf5ae31f63949483", + "origin/demo-v1-backup b3f53297bb38176b72611e0b58487f20a68f6912", + "origin/deploy-agw 10a24f101e2e6e0a9b76517b29f5cdb1aa967796", + "origin/main 9ddd95402b9a2dbf494f6ebfdb477e9a0fb1408a", + "origin/pushAgenticWallet_v1 7dc20e4f3087810be107294350c97e723cb64e8d", + "origin/pushAgenticWallet_v2 83d568cc484b28f86113a5dd954d06a7ac540232", + "origin/pushAgenticWallet_v3 e8db74815cfbbf5389593805e464fe8d85f7f735", + "origin/urp-fixes eb5961721017475042d5199687cb46f4733fe3a8" + ] + }, + { + "repository": "push-chain-core-contracts", + "ref": "origin/universalMarketplace_v1", + "commit": "9479aeff5291bb06fa306f7efa98be9c45324cb0", + "previous_pin": "cb69e0ba101bef1bb4440e54b2c45396be3e92ce", + "diff_stat": " docs/universalmarketplace/README.md | 645 +++++++++++++++++++++++++++++++++\n docs/universalmarketplace/criteria.md | 324 +++++++++++++++++\n docs/universalmarketplace/reference.md | 426 ++++++++++++++++++++++\n 3 files changed, 1395 insertions(+)\n", + "source_changed": false, + "remote_refs": [ + "origin/8183-v1 01439d1eea61b03d9bf478cc238fce3423081b46", + "origin b2f22241681c6587a1c130e638949856dfcbd33f", + "origin/audit-main 15b70544feba1586f488a90e38650bf33ea3c634", + "origin/audit-main-e2e 72052a449588e6be387e0bfa60395ecc1cebba6c", + "origin/audit-main-fixes 281acf7c28f824926e6a2f9443f3bfd9babcbeb1", + "origin/audit-main-test 0e22d52de7e7e710e099303e35937e393d1bf656", + "origin/core-testnet 2edec979eefd0dee1baad1571e1f5457a9d05190", + "origin/deployment-v2 bf5de2ba88002fd9ce7ac56c1e21974a80907825", + "origin/e2e-push-node 49bbd35c9eb9bd602f6d9eff57ee2056327981ec", + "origin/feat-cea-as-origin 7d1144a45632d68fc8c295276df9e365eea640ed", + "origin/feat-read-state b5f5fbfd62d914d2a42b082f6043c75dd2ad3587", + "origin/main b2f22241681c6587a1c130e638949856dfcbd33f", + "origin/node-e2e 71e88ab335a4fc24586806049f287ac6e62ddfd1", + "origin/pc20-3rd-iteration c4f9c51f463a74ba84ad4a28dc467bf100486b0c", + "origin/read-state-fixes-v1 833ae81702e7a8933b71b770c5e837445023136d", + "origin/temp/e2e-test 205970d6cf13b32b777c9f2f486083e3108015c7", + "origin/temp/outbound-local-creation 80104f4f4ace8643467feedd02c939cba81d553c", + "origin/universalMarketplace_v1 9479aeff5291bb06fa306f7efa98be9c45324cb0" + ] + }, + { + "repository": "push-chain-gateway-contracts", + "ref": "origin/pc20-3rd-iteration", + "commit": "bcbf7df42e8e6dd11088a43bcc0b056a54ea0a18", + "previous_pin": "bcbf7df42e8e6dd11088a43bcc0b056a54ea0a18", + "diff_stat": "", + "source_changed": false, + "remote_refs": [ + "origin/121_pc20_feature d68d5ab2078c4cce070f2d0d5976b6f7a8e816ac", + "origin/14-add-multichain-support 1550cd9af457f4cd443256aff386a7e4bcb0659a", + "origin d02070dc11aeb3a081d5d6363aa0d75d63eb7c1c", + "origin/audit-main d40c1b9dccd01dbb6f38d1797bf90580aec554c3", + "origin/audit-main-e2e 483ee4c8a36c0a9f208b34bc55a6385bef7ccf9d", + "origin/audit-main-fixes 6062f9f80445fa1261aa602b891c0a0af26ff7bf", + "origin/deployment-main 8962a8168c05fd2cae7bc028bb9cff3eb004d5d5", + "origin/docs/examples 8dfbfff32daafe7a746c22f1e14df11be0e0dfd2", + "origin/e2e-push-node 47fbab3e608d799a188fdea7987832f8a1fbffdc", + "origin/gateway-testnet b205770f2c65df090eb282fd2f3b4234d30faa1f", + "origin/main d02070dc11aeb3a081d5d6363aa0d75d63eb7c1c", + "origin/optimized-gateway-testnet-pc20 1c1ea609629366fe3a9c4e478e8c921f0ea8405a", + "origin/pc20-3rd-iteration bcbf7df42e8e6dd11088a43bcc0b056a54ea0a18", + "origin/pc20-token-implementation 60fdcd012b997227a6105aa151df493231d8186d", + "origin/pc20Metadata_removal 5655a10a61a2f063ebc4766ac745f844856afe46", + "origin/rate-limit-outbound 9cab39905209915b3c38c4618f71bf001b9fe106", + "origin/svm-hacken-proof-fixes 9f49df8c28a0234054155007f0797486bbb01a11", + "origin/svm-outbound-flow 76bcba1610e1b52484c6cc03c74ec0ff32ed0a0e", + "origin/temp/outbound-local-creation eb78f1a0c9e39d09d829cd9f8c2560da68109377" + ] + } + ] +} diff --git a/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/1_AGW.md b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/1_AGW.md new file mode 100644 index 00000000..a77beaac --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/1_AGW.md @@ -0,0 +1,570 @@ +# AGW (Agentic Wallet) — v3 Architecture + +# 1 · What this is +## The problem +- A user wants to let an automated agent trade or move funds for them, with the user's money — on another blockchain, or on Push Chain itself — without handing over their account. +- The user needs three things at once: +\t- The agent can act **without asking the user each time**. +\t- The agent can never spend **more than the user allowed**, on anything the user did not allow, for longer than the user allowed. +\t- The user can **shut it off instantly**, and take their money out at any time, no matter what state anything else is in. +- All of this runs on Push Chain, which reaches other blockchains through its own cross-chain gateway. Push Chain has no shared "transaction entry point" contract of the kind other chains use for smart accounts — so our wallet must do that job itself. +## The shape of the answer +- The user gets a **dedicated agent wallet** — a small, cheap contract created just for one purpose. It is not the user's main account. It only ever holds the money the user chooses to put at risk. +- The user grants the wallet a **permission**: a fixed bundle of limits binding one agent. A permission is one of **two kinds**, and the user never states which: they name the **chain** the permission is for, and the kind follows from it — Push Chain itself means native, anywhere else means universal. It is fixed at grant and never changes. A **universal** permission bounds cross-chain actions: which token, which destination protocol and functions, how much per action, how much in total, and until when. The far chain may be an EVM chain or Solana; the chain's namespace decides which, and with it the format in which the far-chain action is written and checked. A **native** permission bounds actions on Push Chain itself: which Push contracts and functions, which arguments are pinned to which values, how much native value, how many calls, and until when. +- Every action the agent takes is checked against that permission **by contracts, at execution time**. The agent's honesty is never assumed and never needed. +- The single most important contract in the system is **URP — the Universal Rules Policy**. It carries three rulebooks: two for universal permissions — one for EVM destination chains, one for Solana, because the far-chain action inside the call is written in that chain's own format — and one for native permissions. For a universal permission, every agent action, whatever it claims to be, is one and the same kind of call on Push Chain — the wallet calling the cross-chain gateway — and only URP looks inside that call to check what the agent is *really* doing on the far chain. For a native permission the target and function are already visible to the engine, and URP checks the three things the engine cannot see: the arguments, the value, and the count. `2_UniversalRulesPolicy.md` is devoted to it. +## What we build, and what we adopt +| Piece | Build or adopt | What it is | +| -------------------------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Wallet factory** (AGWFactory) | Build | Creates agent wallets at predictable addresses | +| **Agent wallet** (AGW) | Build | The account itself: holds funds, admits only the permission's agent, executes | +| **URP** | **Build — the only genuinely novel contract** | The policy that inspects and limits every agent action — cross-chain through its universal rulebooks (EVM chains, Solana), Push-native through its native rulebook | +| **Session validator** (AgentValidator) | Carry forward — stateless sender validator | Confirms the caller the wallet names is the permission's agent. Verifies no signature | +| **SmartSession** | Adopt, unmodified | An existing open-source permission engine that stores permissions and runs policies | +| **Cross-chain gateway** | Adopt (Push Chain's) | The contract that carries value and instructions to other chains | +| **Destination account** | Adopt (Push Chain's) | The user's account on the far chain, controlled from Push Chain. Universal permissions only | +| **Push-native protocol** | Adopt (whatever the owner names) | Any contract on Push Chain a native permission allows the agent to call — a staking pool, a vault, a token. Nothing is built or trusted; the wallet simply calls it | +## What this system deliberately does not have +Read this list before reading anything else. None of these is an oversight. +- **No editing of a granted permission.** A permission is frozen at grant. Any change means revoking it and granting a new one — in one combined step. +- **No upgrade of a deployed wallet.** A wallet's code is fixed forever at creation. A new wallet version means creating a fresh wallet. +- **No guardian, no recovery contact, and no pause on any wallet.** Nobody but the owner can act on a wallet, and nobody at all can freeze one. *(The **factory** has an operational pause that can stop **new wallets being created**. It cannot touch a wallet that exists, its funds, or its rules sets — see chapter 9, item 22.)* +- **No paymaster and no gas sponsorship.** The agent calls the wallet itself and pays its own gas — an EOA agent from its own balance, a UEA agent through its UEA's gas path. +- **No deny-list.** The permission names what is allowed; everything else is refused. There is no list of specially forbidden functions. *(The fixed targets URP refuses even when allow-listed — the loopbacks of gate 14, and on Solana the programs of gate S15 — are not a deny-list of functions: each is a target that would hand the agent the destination account itself.)* +- **No limit on how far in the future a permission may expire.** The user's choice of expiry is respected as given. +- **No mixed permission.** A permission is universal or native, never both. An owner who wants an agent to do both grants two permissions on the same wallet — they coexist, meter independently, and are revoked independently. +## Glossary +| Term | Meaning | +| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Owner** | The user's own key. Created the wallet, controls it absolutely. | +| **Agent** | An automated service identified by a Push address — its own EOA, or the UEA of an external key. It calls the agent door itself; it never holds the user's funds. | +| **Agent wallet** | The contract this document is about. Holds the budgeted funds on Push Chain. | +| **Permission** | One frozen bundle of limits binding one agent, of one **kind** — universal or native. A wallet can hold several, of either kind. | +| **Universal permission** | A permission whose every action travels through the gateway to a far chain. One token, one destination chain, an allow-list of far-chain calls, one destination account. The far chain is an EVM chain or Solana. | +| **Destination family** | Which kind of far chain a universal permission targets — EVM or Solana. Derived from the chain's namespace (`eip155:` or `solana:`); any other namespace is refused at grant. It decides which universal rulebook runs. | +| **Account pin** | A Solana limit: the account at a fixed position in an instruction's account list must equal a key frozen at grant. The Solana counterpart of the beneficiary check — how a source, a destination or an authority is locked. | +| **Data pin** | A Solana limit on an instruction's data: a little-endian integer at a fixed offset must equal, stay at or above, stay at or below a frozen value, or stand in a minimum ratio to another field. How a fee, a slippage ceiling or a price floor is locked. | +| **Native permission** | A permission whose actions are calls to contracts on Push Chain itself. One to eight (contract, function) pairs, each with its own pins, caps and call limit. Nothing leaves Push Chain. | +| **Action** | One (contract, function) pair the engine recognises as a unit. A universal permission has exactly one — the gateway's send. A native permission has one to eight. | +| **Argument pin** | A native limit: a 32-byte word at a fixed position in a call's data that must equal a value frozen at grant. This is how a beneficiary, a spender or a pool id is locked. | +| **Policy** | A contract that checks one aspect of a request. URP is the main one. | +| **SmartSession** | The adopted engine that stores permissions and calls each policy in turn. | +| **Gateway** | Push Chain's cross-chain transport. The only thing a **universal** action is ever allowed to call — and the one thing a **native** action never may. | +| **Destination account** | The user's account on the far chain. Its address is known in advance: on an EVM chain Push Chain computes it; on Solana it is a program-derived address of the gateway program, derived by tooling. | +| **PC** | Push Chain's native token, used for gas. | +--- +# 2 · The pieces +Six things make up the system. This chapter says what each one is, what it stores, and where it runs. How they interact comes in chapters 3 to 6. +## 2.1 The wallet factory +- A single contract on Push Chain that creates agent wallets. +- Whoever calls it becomes the owner of the wallet it creates. There is no way to create a wallet owned by someone else — the factory does not accept an owner as input; it uses the caller's address, full stop. +- Wallet addresses are **predictable before creation**. The factory uses deterministic deployment (CREATE2): the address is computed from the owner's address plus a per-owner counter. Creating two wallets in a row gives two different, but individually predictable, addresses. +- The factory itself sits behind an upgradeable proxy, so its logic can be improved — **but the address computation must never change**. If it changed, any address a user had computed in advance (and possibly already sent funds to) would become unreachable. A permanent regression test pins this. +- The factory stores: the wallet implementation address, and each owner's wallet counter. +## 2.2 The agent wallet +- A **minimal clone**: a tiny contract that delegates all logic to one fixed implementation. Cheap to create, and **not upgradeable — ever**. The owner's address is baked into the clone's own bytecode at creation and can never be reassigned. +- It is a modular smart account following an existing standard (ERC-7579), reduced to the minimum: it supports exactly **one kind of module — a validator** (a contract that checks signatures and permissions). Attempts to install any other module kind (executors, hooks, fallbacks) are refused by the wallet itself. +- It has two doors: +\t- **The owner door.** The owner can make the wallet do anything, send anything anywhere, with no checks at all. This is deliberate and is covered in chapter 3. +\t- **The agent door** — a function called `executeAsAgent`. Only the permission's agent may call it, and the call only passes if every check in chapters 5 and 6 passes. +- What the wallet stores: a grant counter used to make every permission unique (chapter 4), replay counters used only by the owner's own relayable signed-intent door, and a checkpoint counter that every owner-side change advances (chapter 4.5). The agent door keeps no state of its own. +- What it holds: the budgeted funds — the tokens the owner has decided to put under agent management, plus a little PC for gas on cross-chain calls. +## 2.3 The permission +- A permission is **not a single record in one place**. It is written across three storage locations in one grant transaction: +\t- **SmartSession's storage** holds: that the permission exists, which agent may act under it — the agent's Push address — and the list of policy contracts to run. +\t- **URP's storage** holds everything about what the agent may actually do, in one of three shapes chosen by the permission's kind and, for a universal permission, its destination family. For a universal permission to an EVM chain: the allowed protocol functions on the far chain, the token, the caps, the counters, and the destination account address. For a universal permission to Solana: the same token, caps and counters, the destination account and the gateway program, the allowed (program, instruction) rules with their account and data pins, and the list of destination-side accounts that hold value. For a native permission, one record **per action**: the Push contract and function, the argument pins, the value and amount caps, the call limit, and the counters. `2_UniversalRulesPolicy.md` lists every field of all three. +\t- **URP also records the kind itself**, in a small mode record written in the same transaction — and, for a universal permission, the destination family beside it. On every later request URP consults that record — not the shape of the data — to choose which rulebook runs. +\t- *(There is no separate time-window policy in v3: the expiry lives inside URP, so URP is the sole action policy — see `2_UniversalRulesPolicy.md` §1.1.)* +- A permission is identified by a unique id computed from its contents plus a salt the wallet supplies from its own grant counter. Granting the same terms twice therefore produces two distinct permissions — they never collide, and revoking one never touches the other. +- A permission is **immutable**. Nothing in the system can modify one after grant. The only operations that exist are: create one, and remove one. +## 2.4 The agent +- An agent is a **Push address**. A Push-native key is its own EOA; any external key — EVM, Solana, anything Push Chain supports — acts through its UEA, the account Push Chain derives for that key, which verifies the key's signature before it ever calls the wallet. The wallet itself verifies no signature: it checks only who the caller is. +- Any address may be an agent, including a smart contract such as a multisig. +- **An agent is attached to one permission, not to the wallet.** A wallet with three permissions can have three different agents, each locked to its own limits. There is no wallet-level "the agent" and no way to swap the agent inside an existing permission — a new agent means a new permission. +- The agent holds no funds of the user's and has no standing power. Its only ability is to call the agent door, naming one of its permissions, and have the wallet check that call. +## 2.5 URP — introduced +- URP is the contract where the user's real intent is enforced: *this protocol, these functions, this token, this much, for me, until then*. +- It exists because of a structural blind spot in the adopted engine, explained fully in `2_UniversalRulesPolicy.md`: from Push Chain's point of view, every agent action looks identical — a call to the gateway. URP is the contract that opens that call up and inspects what is inside — an EVM instruction list for an EVM chain, a single program instruction for Solana. +- For a native permission it does the complementary job: the engine already sees the target and function, so URP checks how the function is called — which arguments are pinned, how much value rides along, how much of a metered amount, and how many times. +- It is the one contract in the system that is **upgradeable** — it sits behind a proxy at a permanent address, so its rules can be corrected or extended without moving any wallet or reissuing any permission. That is a deliberate trade, and it is what limit 27 in chapter 9 is about: the address is fixed forever, the logic behind it is not. +- One paragraph is all it gets here. **`2_UniversalRulesPolicy.md` is its chapter.** +## 2.6 The destination account +- *(Universal permissions only. A native permission has no destination account: its actions never leave Push Chain, and whatever they produce is credited to the wallet itself.)* +- The user's account on the far chain (Ethereum, Solana, or any chain Push supports). Push Chain's existing infrastructure creates it and controls it; we adopt it as-is. +- **On an EVM chain** its address is **computable in advance** on Push Chain, before the account even exists on the far chain (`getCEAForPushAccount` forward, `ceaToPushAccount` reverse). +- **On Solana** it is a program-derived address of the gateway program, seeded by the wallet's own Push address (`["push_identity", wallet]`). A Solidity contract cannot run that derivation, so the tooling derives it — along with the destination account's token accounts for each mint the permission touches — and the owner commits the 32-byte keys at grant. A wrong key fails closed: the pins never match. +- At grant time, the tooling computes this address and freezes it into the permission. From then on, URP requires that everything the agent does on the far chain benefits **that address and no other**. The agent can trade with the user's money; everything it buys lands in the user's own far-chain account — on Solana, in that account's own token accounts. +- **On Solana the destination account is also the signer.** The gateway hands it the bridged funds and then makes one call into the target program with the destination account as the only signer — and that signing authority carries into whatever the target program itself calls. `2_UniversalRulesPolicy.md` §1.4c is how URP narrows what that authority can reach; chapter 9 states what it cannot narrow. +## 2.7 The Push-native protocol +- Any contract on Push Chain that a native permission names: a staking pool, a vault, a token, a registry. Nothing is built, adopted or trusted — it is whatever the owner chose to allow. +- The wallet calls it **directly, as itself**. The protocol sees the wallet as the caller, so whatever the call produces — a staked position, shares, a claim — is the wallet's, never the agent's. This is the native counterpart of the destination account's "for the user only" rule, one hop shorter. +- To the engine it is an (address, function) pair and nothing more. To URP it is that pair plus the pins, caps and counters the owner attached. Neither contract knows what the function *means*; both only know what the owner allowed. +## Diagram — the system map +```mermaid +flowchart TB + subgraph PUSH["Push Chain"] + OWNER["Owner\ +(the user's key)"] + FACTORY["Wallet factory\ +(upgradeable, frozen address math)"] + WALLET["Agent wallet\ +(minimal clone, never upgradeable)\ +owner door + agent door"] + SS["SmartSession\ +(adopted permission engine)"] + URP["URP\ +(the limits — 2_UniversalRulesPolicy.md)\ +upgradeable behind a proxy"] + VAL["Session validator\ +(confirms the caller is the agent)"] + GW["Cross-chain gateway\ +(adopted transport)"] + NP["Push-native protocol\ +(any contract a native permission names)"] + end + subgraph FAR["Destination chain"] + CEA["Destination account\ +(the user's far-chain account)"] + PROTO["Allowed protocol\ +(e.g. a market, a lending pool)"] + end + AGENT["Agent\ +(a Push address: an EOA,\ +or the UEA of an external key)"] + + OWNER -- "creates, one call" --> FACTORY + FACTORY -- "deploys" --> WALLET + OWNER -- "grants / revokes permissions\ +and can execute anything" --> WALLET + AGENT -- "calls the agent door itself" --> WALLET + WALLET -- "asks: is this allowed?" --> SS + SS --> URP + SS --> VAL + WALLET -- "universal action, only if every check passed" --> GW + WALLET -- "native action, only if every check passed\ +(the wallet is the caller)" --> NP + GW -- "bridges value + instruction" --> CEA + CEA -- "calls, for the user's benefit only" --> PROTO +``` +--- +# 3 · Who controls what +## The single chain of authority +There is exactly one chain of control in this system, and it starts and ends with the user. +- **The user's key owns the wallet.** Ownership is fixed at creation, inside the wallet's own bytecode. It cannot be transferred, stolen by code, or reassigned by any function — no function to do so exists. +- **The wallet owns its permissions.** Only the owner, through the wallet, can create or remove a permission. An agent cannot grant itself anything, extend anything, or remove anything. +- **A permission bounds one agent.** The agent can call the agent door within the permission's limits. That is the entirety of its power. +- **The wallet's Push-side identity owns the destination account.** The far-chain account obeys instructions that arrive through Push Chain's gateway from the wallet. The agent never controls the destination account; it can only cause the wallet to send it instructions that URP has already approved. +- **For a native permission the same rule holds one hop shorter.** The wallet calls the Push contract as itself, so the position, the shares, the claim — whatever the call produces — is credited to the wallet. The agent never controls the target contract; it can only cause the wallet to call it in exactly the way URP has already approved, with the arguments the owner pinned. +## The owner door has no checks — on purpose +- The owner can execute anything from the wallet at any time: withdraw every token, send to any address, call any contract, on Push or (via the gateway) beyond. +- **No policy, no cap, no expiry, no destination rule applies to the owner.** All of `2_UniversalRulesPolicy.md` applies to the agent door only. +- Why: every safety mechanism on the owner's own exit is also a way for the owner to be locked out of their own money. The design refuses that trade. The wallet must remain drainable *by its owner* in every degraded state the rest of the system could ever reach — engine misconfigured, policy bricked, permission wedged, bridge down. A standing test executes an owner withdrawal in each of these states and must always pass. +- The cost of this choice is stated plainly: **a stolen owner key drains the wallet completely.** There is no guardian and no delay to stop it. Defence against key theft belongs to the layer that holds keys — the user's identity and key-management setup — not to this wallet. This is the first entry in chapter 9's list of accepted limits. +- **The owner door records, but never asks.** Each call through it advances the wallet's checkpoint counter (chapter 4.5), so a job's evaluator can tell whether the owner touched the wallet during the job. The write consults nothing and cannot revert, so the door stays unblockable. +## What the agent's call is — and is not +- The agent's authority is **being the sender**. The wallet admits a call only from the address the named permission records as its agent, so there is no bearer request: nothing the agent produces can be submitted by anyone else. +- A call grants nothing durable. Each one spends from the permission's remaining budget once, as the transaction it is; replay is prevented by the sender's own nonce (chapter 5). +- The agent never touches custody. At no point in any flow do funds sit in an account the agent controls. Universally, they move from the wallet, through the gateway, to the user's own destination account, and anything bought lands in that same account. Natively, they move from the wallet straight into a Push contract as the wallet's own position, and come back to the wallet. +## Diagram — the chain of ownership +```mermaid +flowchart TB + KEY["The user's key\ +absolute control, no checks on its path"] + W["Agent wallet on Push Chain\ +owner fixed at creation, forever"] + P1["Permission 1\ +agent A · its own limits"] + P2["Permission 2\ +agent B · its own limits"] + CEA["Destination account on the far chain\ +obeys the wallet, via the gateway"] + NP["Push-native protocol\ +credits whoever calls it — the wallet"] + A1["Agent A — may only act\ +within Permission 1"] + A2["Agent B — may only act\ +within Permission 2"] + + KEY -- "owns, unconditionally" --> W + W -- "creates / removes" --> P1 + W -- "creates / removes" --> P2 + P1 -.-> A1 + P2 -.-> A2 + W -- "its Push identity controls" --> CEA + A1 -. "universal: can only trigger wallet→gateway calls\ +that URP approves, benefiting the\ +destination account only" .-> CEA + A2 -. "native: can only trigger wallet→contract calls\ +that URP approves, with the owner's pins,\ +credited to the wallet only" .-> NP +``` +--- +# 4 · The life of a permission +## 4.1 Birth — the grant +- The owner (or the tooling acting for the owner, with the owner signing) composes the terms. **The first term is the chain** — a CAIP-2 identifier such as `eip155:11155111` or `solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1` — and it decides the kind and, for a universal permission, the destination family, which together decide the shape of everything after it. Common to both kinds: +\t- the agent's Push address — its own EOA, or the UEA of its external key; +\t- the expiry — one value, held inside URP. +- **For a universal permission to an EVM chain:** +\t- the far-chain protocol: each allowed contract address and function, and — for each function — where in its arguments the *beneficiary* sits, so URP can later check that the beneficiary is the user's destination account. These argument positions are **generated from the protocol's interface by tooling, never typed by hand** (a promise the contracts cannot check — chapter 10); +\t- one token, and with it one destination chain — a permission never spans tokens or chains; +\t- the caps: a per-action maximum, a lifetime maximum, and a maximum of native PC per action; +\t- the destination account's computed address. +- **For a universal permission to Solana:** +\t- the same token, the same three caps, and the expiry — these terms do not depend on the far chain; +\t- the destination account and the **gateway program** on the declared cluster — both 32-byte keys, both supplied by tooling: the destination account derived from the wallet's address, the gateway program taken from the chain registry, never from user input; +\t- one to thirty-two **program rules**, each a far-chain program and one instruction on it, identified by its leading bytes — eight for an Anchor program, one for an SPL-style program — or marked as an instruction that carries no data. A rule may also fix the instruction's exact account count; +\t- up to sixteen **account pins**: for a given rule, the account at a given position in the instruction's account list must be a given key. This is how the destination account is locked in as the authority, its token account as the source, and its token accounts as every destination. Every rule must carry at least one; +\t- up to eight **data pins** on the instruction data: a little-endian integer at a fixed offset — from the start, or from the end, because Borsh puts variable-length fields first — compared for equality, a floor, a ceiling, or a minimum ratio against a second field. This is how a fee is locked at zero, slippage is capped, and a swap's output is held to a floor *relative to its input*; +\t- up to eight **destination-side accounts that hold value** — the destination account itself, which must be on the list, and its token accounts. At validation, any of these that appears in a request's account list must sit exactly where the matched rule pins it; +\t- **all of it is generated from the program's published interface by tooling, never typed by hand** (chapter 10). A wrong pin fails closed; a missing pin guards nothing. +- **For a native permission:** +\t- one to **eight** actions — eight is a fixed wallet constant, a sanity bound rather than a gas bound — each a Push contract and one function on it. A function may be *value-only*: a bare transfer of native PC with empty call data; +\t- per action, the **argument pins**: up to eight positions in the call data, each frozen to the exact 32-byte word that must appear there. This is how a beneficiary is locked to the wallet, a spender to one contract, a pool to one id. **Positions are generated from the contract's interface by tooling, never typed by hand** (chapter 10) — a wrong position fails closed, but a *missing* pin guards nothing; +\t- per action, the native-value caps: a per-call maximum and a lifetime maximum; +\t- per action, optionally, a **metered amount**: one argument position read as a number, with its own per-call and lifetime maximum — the native counterpart of the bridged-amount cap; +\t- per action, a **call limit**: how many times the action may run, where zero means unlimited; +\t- and nothing else. There is no token, no destination chain, and no destination account: a native permission has no far side. +- The owner sends one transaction through the wallet. The wallet supplies a salt from its internal grant counter — this is what makes every permission unique — and calls the engine's standard enable function. In the same transaction, URP's configuration — including the permission's expiry — is written: one record for a universal permission, one record **per action** for a native one, and beside them the record of which kind this is. +- **Before anything reaches the engine, the wallet derives the kind from the chain and asserts it against the actions.** Every action must name the same chain, or the grant is refused naming the action that differs — which is what makes a mixed permission unrepresentable rather than merely forbidden. A universal permission must name exactly one action, and it must be the gateway's outbound send — whatever its destination family; the wallet never tells an EVM permission from a Solana one, and does not need to. A native permission may name anything on Push Chain **except** the gateway — and except seven addresses that would turn the agent into the owner: the zero address, the engine's wildcard marker, the wallet itself, the engine, URP, the validator, and the factory. It may not name the engine's two wildcard function markers, and it may not name the same (contract, function) pair twice. Every one of these refusals carries its own named error, and the two that matter most — the wallet and the engine as targets — are pinned by permanent tests. +- The wallet exposes exactly **two** permission operations to the owner: *enable* and *remove*. The engine underneath offers more; the wallet deliberately does not surface them. *Enable* takes the session and nothing else; it records the **derived** kind and the chain in the grant event, so an indexer can tell a native permission from a universal one, and which chain it is for, without opening the session. +- A failed grant does not undo a wallet. A wallet with zero permissions is a valid, safe object: with no permission there is no agent authority of any kind, and every agent request fails before any policy even runs. +## 4.2 Life — what the counters mean +- **The lifetime cap counts what is bridged, not what is deployed.** When the agent moves 40 of an allowed 100 to the far chain, the counter reads 40. If it then trades those 40 into 80 and back again on the far chain, the counter still reads 40 — redeployment at the destination is not new spending from the wallet. The cap bounds the user's exposure *from the wallet*; the expiry bounds how long the agent can keep working with what is already across. +- **An unlimited cap is allowed and is expressed as the largest representable number.** There is no special "unlimited" flag; the comparison simply never trips. The product must display this honestly — "unlimited", never a huge number (chapter 10). The one exception is a native action's **call limit, where zero means unlimited** — a call limit of zero calls would be a permission that authorises nothing. +- **A native action keeps three counters, not one:** native value sent, the metered amount (if the action has one), and calls made. **Every successful call counts as a call, even one that sends no value and meters no amount.** A call limit that zero-value calls could slip past would be advisory, so the counter always moves — this is the one place the native rulebook deliberately differs from the universal one, whose counter does not move on a zero-amount request. +- *(Universal only.)* **If a cross-chain action fails on the far side, the spent amount is credited back** — the wallet's funds return and the counter should not stay inflated. This credit is issued by Push Chain's own executor module calling URP. It is **designed but not yet functional**: it needs a change on the Push core side that has not landed. Until it lands, a failed far-side action leaves the counter inflated, and the remedy is to revoke and regrant. Both halves of this are stated again in chapters 9 and 11. +## 4.3 Change — there is no change +- **A permission is never edited. Every "change" is: revoke the old one, grant a new one, in one atomic owner transaction.** If any part fails, the whole transaction fails, and the old permission remains exactly as it was. There is no window where the wallet is half-configured. +- One race is guarded explicitly. Between the owner composing the change and the transaction landing, the agent may spend. The owner's change transaction therefore begins with an **assertion of the expected spent amount**: "I am replacing this permission believing it has consumed X." If the agent moved money in the gap, the assertion fails, the whole change reverts, and the owner re-reads and retries with current numbers. Stale beliefs never silently become new budgets. For a native action the assertion names **all three counters** — value, amount, calls — and every one must match exactly; and it refuses to run against a permission of the other kind, or against one that does not exist, so a stale belief can never pass by reading zeros from the wrong place. +- **Counters restart from zero on the new permission.** This is a real, accepted sharp edge: replacing a 100-cap permission that had 80 spent with a "tighter" 50-cap permission yields 50 of *fresh* authority — more than the 20 that remained. The contracts do not compensate for prior spend, and the product is obliged to show the owner what the old permission had consumed before the new cap is chosen (chapter 10). +- Because no permission can ever be widened in place, an entire class of problems disappears structurally: there is no "widening inside the expiry window" to delay, timelock, or guard. The mechanism that would have needed guarding does not exist. +## 4.4 Death — revocation and expiry +- **Revocation is one owner call, effective immediately on Push Chain.** The permission's storage is removed; the very next agent request against it fails. Nothing the agent does can delay or contest this. Removal performs pure storage deletion — it calls out to nothing, so no external contract can make revocation fail (`SmartSessionBase.sol:329-355`, `ConfigLib.sol:274-284`). +- **One honest limit:** revocation stops new instructions. An instruction that already left through the gateway — already in flight across the bridge — still completes on the far chain. The window is bridge latency. The revoke screen must say this (chapter 10). +- **Expiry needs no transaction.** Past the expiry, URP's expiry gate — the second gate of every rulebook (2, N2, S2) — fails every request. The permission's storage still exists until removed, but it is inert. +- Removing a permission also ends its agent's power under it: removal clears the agent the permission named, so the very next call under that id is refused before any policy runs. A regrant produces a new id — the wallet's grant counter salts it — so a request built for the old id fails against the new permission too. A permanent test pins this. +## 4.5 Checkpoints — what the owner side did, for whoever needs to know +- The wallet keeps one **checkpoint counter**, read through `checkpointCount()`, with the block of the latest checkpoint beside it (`lastCheckpointBlock()`). A job records the count when it is funded; its evaluator compares later. Same number: the result is the agent's alone. Different number: the owner side touched the wallet. +- **What advances it:** every call made through an owner door — `execute` or `executeWithSig`, one tick per call, a batch of five ticks five times — every grant, and every revoked permission (once per id). **What never does:** the agent door and everything it dispatches, module install and uninstall, factory set-up, and any call that reverts. +- **One tick per call, taken before the call.** A job is funded from inside an owner-door call — the wallet itself calls the job contract — and the job's hook reads the counter during that call. Ticking before each call means a clean funding batch ends exactly at the hook's snapshot, while a withdrawal batched after the funding call moves the counter past it. A tick once per batch would either make every job look tampered with or hide that withdrawal. +- **Compare counts, not blocks.** Several checkpoints can share a block — including the funding call's own — so "anything after block N" misses them; a changed count never does. +- **It cannot block anything.** A tick is one write to the wallet's own storage and one event: no external call, no condition that can fail. The owner door and revocation stay unblockable. +- One counter for every kind of change. The event (`Checkpointed`) also carries the kind — `OWNER_ACTION`, `RULES_GRANTED` or `RULES_REVOKED` — and a reference (the call's hash, or the permission's id) for indexers. +## Diagram — the permission lifecycle +```mermaid +stateDiagram-v2 + [*] --> Composed: owner + tooling assemble terms + Composed --> Active: one grant transaction\ +(engine + URP + expiry written together) + Active --> Active: agent request passes\ +counters advance + Active --> Active: far-side failure\ +credit back (designed — not yet functional) + Active --> Expired: expiry passes\ +no transaction needed + Active --> Removed: owner revokes\ +immediate, unconditional + Active --> Replaced: CHANGE = revoke + regrant\ +one atomic transaction,\ +gated by the spent-amount assertion + Replaced --> [*]: old id dead — requests for it die with it\ +new permission starts at zero + Expired --> Removed: cleanup, optional + Removed --> [*] +``` +--- +# 5 · One action, end to end +This chapter walks a single agent action from the agent's call to funds moving. It is the spine of the whole system; `2_UniversalRulesPolicy.md` then zooms into the deepest step. +## 5.1 Why the wallet does so much itself +- On chains that follow the account-abstraction standard, a shared system contract (the "EntryPoint") receives signed account operations, checks replay protection, and dispatches them. **Push Chain has no such contract.** So our wallet performs those jobs itself, inside one function — the agent door, `executeAsAgent`. +- The wallet keeps the standard's *packaging* (the operation format), because the adopted permission engine speaks it. But the packaging is just a shape; there is no shared dispatcher behind it. The wallet is its own dispatcher and never leaves the call stack — which has one important consequence used later: **when the wallet finally calls the gateway, the gateway sees the wallet itself as the caller**, not the agent. +## 5.2 The request the agent sends +What the agent sends depends on the permission's kind — but only in the innermost part. The call around it is identical for both. +**A universal request has nested layers.** The agent composes the action innermost first: +- **Innermost — the far-chain call.** The actual thing the user wanted: for example, *buy these shares, for this much of the token, with the user's destination account as beneficiary*. +- **Around it — the instruction list.** The far-chain calls are packed as an instruction list for the destination account, between one and **ten** entries — ten is a fixed contract constant. Each entry is: a target address, a native-value amount, and call data. +- **Around that — the gateway request.** The message to Push Chain's gateway: which token and how much to bridge, the instruction list as payload, and two routing fields URP will pin (`2_UniversalRulesPolicy.md`): the bridged-funds recipient field, and the refund destination. +- **Outermost — the execution payload.** The gateway request as the single call the wallet will make: the gateway as target, the PC for far-side gas as value. +**A universal request to Solana has the same layers, with a different middle.** There is no instruction list: the gateway makes exactly one call into one program per request, so the payload is a **single Solana instruction** — the account list (each a key and a writable flag), the instruction data, and the target program — in the byte format Push Chain's validators decode, not ABI. The gateway request's recipient field, which must be empty for an EVM chain, carries the **target program** here, and must equal the program named inside the payload. A flow that needs two instructions is two requests, the later ones bridging nothing. +**A native request has one layer.** There is no far-chain call, no instruction list and no gateway request. The agent names a Push contract, a native-value amount, and the call data — and that flat call *is* the execution payload. Three nested envelopes become one call; nothing else changes. +Then the agent calls the agent door itself with three things: **the permission's id, the execution mode, and the execution payload.** There is no signature to attach — the agent's authority is being the sender. +## 5.3 Who may call — the sender check +- The wallet looks up the agent the named permission records — the address stored in it at grant — and compares it with the caller. Anyone else is refused, by name, before the engine is ever called: the owner, a stranger, another permission's agent. An id that is unknown, revoked, or names a session validator other than the canonical one records no agent, so a call under it is refused the same way. +- **An external key acts through its UEA.** The UEA verifies the key — secp256k1, Ed25519 or whatever that chain uses — and then calls the wallet; the UEA is the agent the permission names. The external key calling the wallet directly is just another stranger. +- The wallet then writes the caller's address into the operation it hands the engine, in the field the engine treats as the signature. Nobody outside the wallet can supply that field: the engine accepts an operation only from the account it is for, so only the wallet can obtain a verdict for the wallet. At the end of validation the session validator compares that address with the agent stored in the permission — a second, independent check behind the first. +## 5.4 Replay protection — the sender's own +- Each agent action is a transaction of the agent's own. An EOA agent's transaction carries its nonce; a UEA agent's action is a UEA payload with its own nonce and deadline. A transaction that has been mined cannot be mined again, so no request runs twice — and the wallet keeps no replay state for agents at all. +- The same call submitted twice is two actions: each is checked against the permission and each is metered. +- If execution reverts, the whole transaction unwinds — every counter, everything — leaving no half-spent state. A failed action costs the agent gas and changes nothing else. +- Expiry is the permission's own, checked inside URP. There is no separate per-request deadline at the wallet; a UEA payload carries one, an EOA transaction does not. +- One honest note: an EOA agent has a single sequential nonce, so a stuck transaction blocks that agent's next one until it is mined or replaced. Accepted, and an agent-side problem only. +## 5.5 The walk, in order +What happens when the agent calls, step by step. Every step is on Push Chain, inside one transaction, until the bridge. +1. **The agent calls the agent door**, naming the permission. **The wallet's first acts are to confirm the engine is still installed — the owner switches the agent door off entirely by revoking everything and uninstalling it — and that the caller is the agent the permission names.** Both are checked before anything else costs gas; a wrong caller is refused by name. +2. **The wallet builds the operation**: the execution as an `execute` call, and in the signature field the use-mode marker, the permission's id and the caller's address — written by the wallet, never supplied from outside. +3. **The wallet asks the permission engine to validate.** SmartSession looks up the permission by its id: does it exist on this wallet? Which policies are attached? +4. **The engine runs every attached policy, in order, on the raw request.** First it identifies the action by the call's target and function; a native request naming any pair the permission did not grant dies here, at the engine, before any policy runs. Then, for this system, exactly one policy: **URP — the whole of `2_UniversalRulesPolicy.md`**, which reads the permission's kind and runs the matching rulebook, and which carries the expiry check itself. Every policy must pass; any failure ends everything with nothing spent. Two engine facts matter here: +\t- **Action policies have a minimum count of one, but the engine's other policy class (checks on the outer operation) has a minimum of zero** (`SmartSession.sol:237-247, 285-299`). Rule for this system: **no mandatory guarantee may live only in that zero-minimum class**, because a configuration with none of them is legal. Everything mandatory lives in URP. +\t- **Policies run before the session validator is consulted** — an engine ordering we adopt, not choose (`SmartSession.sol:340-352`). The wallet has already checked the caller at step 1, but the rule stands for every policy: it must be safe to run on arbitrary calldata the engine has not yet authenticated. URP holds no state that validation mutates, so a bad request can waste gas and nothing else. +5. **The session validator is consulted last.** It compares the address the wallet wrote into the signature field with the agent stored in the permission. Wrong address, no execution. +6. **The wallet enforces the verdict explicitly.** Because there is no EntryPoint to do it, the wallet itself unpacks the engine's answer and enforces both the pass/fail result and the validity window it returns. +7. **The wallet refuses two targets whatever the engine said.** After validation and before dispatch, if the approved call targets the wallet itself or the engine, the wallet reverts. Neither can ever be granted (chapter 4.1), so on a permission the wallet created this never fires — it exists for a permission the owner enabled on the engine *directly*, bypassing the wallet's grant check, which the owner door permits. It is the last of four independent refusals of a self-call, it runs deliberately **after** validation and not before (chapter 11), and two permanent tests pin it — one of them reaching the engine as a target through the engine's own wildcard. +8. **The wallet makes the approved call, with the exact validated bytes.** For a universal permission that is **the gateway**: it sees the wallet as the caller, pulls the bridged token amount from the wallet's balance, takes the PC provided for far-side gas, and emits the cross-chain message. For a native permission it is **the named Push contract**, called by the wallet as itself, carrying the approved value and call data: the contract sees the wallet as the caller, and whatever the call produces is the wallet's. **A native action is complete here** — one Push transaction, no bridge, nothing in flight. The two steps below are universal only. +9. **On the far chain**, the destination account receives the message and runs the instruction list, entry by entry, each call made *by the user's own account* — which is why anything bought lands as the user's. **On Solana** the gateway moves the bridged funds to the destination account and makes the one approved call into the target program, with the destination account as signer; whatever the instruction produces lands in the token accounts the pins named. +10. **If the far side fails**, the funds return through Push Chain's infrastructure, and the credit path of chapter 4.2 applies (designed — not yet functional). Gas is never refunded: it was genuinely consumed. **A refund credit must not move any gas counter** — a permanent rule. +## Diagram — one agent action +```mermaid +sequenceDiagram + participant AG as Agent (EOA, or UEA of an external key) + participant W as Agent wallet + participant SS as SmartSession (engine) + participant U as URP + participant V as Session validator + participant GW as Gateway + participant DA as Destination account (far chain) + participant NP as Push-native protocol + + AG->>AG: universal (EVM): build nested layers:
far-chain call → instruction list (≤10) → gateway request → payload
universal (Solana): one program instruction → gateway request → payload
native: one flat call (contract, value, data) = payload + AG->>W: executeAsAgent(permission id, mode, payload) — the agent is the sender + W->>W: 1. engine still installed? caller == the permission's agent?
(refused by name otherwise, before the engine runs) + W->>W: 2. build the operation; write USE ‖ id ‖ caller into the signature field + W->>SS: 3. validate against the named permission + SS->>SS: identify the action by (target, function);
an ungranted pair dies here + SS->>U: 4. the whole of 2_UniversalRulesPolicy.md —
read the kind, run its rulebook, check every limit + U-->>SS: pass / fail (nothing spent on fail) + SS->>V: 5. LAST: is the address in the signature field the permission's agent? + V-->>SS: agent confirmed / rejected + SS-->>W: verdict + W->>W: 6. enforce the verdict and its validity window itself + W->>W: 7. refuse the wallet or the engine as target, whatever the verdict + alt universal permission + W->>GW: 8. call with the exact approved payload
(gateway sees the WALLET as caller) + GW->>DA: bridge token + instruction list + DA->>DA: EVM: run each instruction as the user's own account
Solana: one call into the target program, the user's account signing + Note over U,DA: far-side failure → funds return, spend credited back
(designed — not yet functional) · gas never refunded + else native permission + W->>NP: 8. call the named Push contract with the exact approved bytes
(the WALLET is the caller) + NP-->>W: whatever the call produced is the wallet's — done, one transaction + end +``` +--- +# 6 · The rules policy +URP — the Universal Rules Policy (`UniversalRulesPolicy`) — has its own document: [`2_UniversalRulesPolicy.md`](2_UniversalRulesPolicy.md). It covers why the contract exists, what it stores for each kind of rules set, what it opens, every gate of the universal EVM, Solana and native rulebooks, what it counts, what it deliberately does not do, and how a rules set's kind is fixed — with the flow diagrams. +--- +# 7 · What we adopted, and what that costs +Four external systems are load-bearing. For each: what we rely on it for, and the exact exposure that reliance creates. Nothing here is hidden as a footnote. +## 7.1 The permission engine (SmartSession) +- **Relied on for:** storing permissions and each one's agent, deriving their ids, running every policy, and consulting the session validator — the whole of chapter 5, steps 3–5. +- **What we get for free:** battle-tested storage and lifecycle code; removal that is pure storage deletion and cannot be blocked by any external call (`SmartSessionBase.sol:329-355`, `ConfigLib.sol:274-284`). +- **The costs, each one carried knowingly:** +\t- **Policies run before authentication** (`SmartSession.sol:340-352`). Every policy we ever attach must be safe on arbitrary calldata from anyone. This is a standing constraint on all future policy work, not just on URP. The wallet authenticates the sender before the engine runs, but the engine's own ordering is unchanged. +\t- **One policy class may legally be empty** (`SmartSession.sol:237-247`) — hence the wiring rule that nothing mandatory lives there. +\t- **The engine ships an owner-only function that resets a policy's counters in place.** v3 tooling never calls it, and the agent structurally cannot (it is owner-path only) — a named test proves the agent cannot reach it. But it survives upstream, and a future tool that called it would silently refill a budget. +\t- **At grant, the engine refuses only two targets: the zero address and itself** (`ConfigLib.sol:139-143`). It does **not** refuse its own wildcard marker at grant — only at validation. The wallet is therefore the only grant-time layer keeping that marker, and the two wildcard function markers, out of a native permission. The wallet refuses all three by name; a constant-mirror test pins each value against the vendored engine so a fork bump cannot silently move them. +\t- **The engine identifies an action by (contract, function) alone**, so two entries naming the same pair collapse to one configuration, and the second initialisation would be refused by URP with an error naming an opaque id. The wallet refuses duplicates first, naming the pair. +\t- **The engine truncates a policy's revert data to 32 bytes** before re-wrapping it — a selector and 28 bytes of the first argument. Every native-rulebook error is therefore ordered with its diagnostic value first (`2_UniversalRulesPolicy.md` §1.4b). Wallet errors do not pass through the engine and are not truncated. +## 7.2 The cross-chain gateway +- **Relied on for:** carrying value and instructions to the far chain, and being the *only* thing a universal agent action can touch (gate 3) — and the one thing a native action never may (gate N3, and the wallet's grant check). +- **The costs:** +\t- We inherit the gateway's availability and its bridge latency — the revocation window of chapter 4.4 is exactly this latency. +\t- The gateway's refund behaviour for our outbound direction is documented for the *inbound* direction only (`Revert_Handling.md:14` covers inbound; outbound is handled by Push core's own modules). Our exposure analysis of refund edge-cases is complete except for this one gap, recorded as an open question (chapter 11). It blocks nothing we build. +\t- **On Solana the far side is Push Chain's gateway program**, whose id differs per cluster. URP has no registry for it, so it is committed by the owner at grant from the chain registry (chapter 10). A wrong value weakens only that owner's permission, and fails closed on the pins. +\t- **On Solana the gateway makes one call per outbound.** A flow that needs two instructions — create a token account, then swap — is two outbounds, the later ones bridging nothing. A limit of the gateway, not of URP. +\t- **On Solana URP must parse exactly what Push Chain's validators parse.** The payload grammar of `2_UniversalRulesPolicy.md` §1.3 is theirs; a change to it on their side is a change URP must follow, and until it does every Solana request fails closed at S12. +## 7.3 The destination-account system +- **Relied on for:** the user's far-chain account — its creation, its address computation in both directions, and its obedience to gateway messages. +- **The costs, inherited not owned:** +\t- **Its factory is upgradeable by Push governance,** and the account templates can be rotated. Our guarantee that "the committed destination address is the user's account" is therefore inherited from Push's own governance discipline. We accept this on admin trust — Push's governance is our platform, not our adversary. One operational duty watches it (chapter 10): monitoring compares each permission's committed destination address against the current prediction, so a rotation that changes derivations is *detected* even though nothing on-chain prevents it. +\t- **A paused destination-account factory blocks a first outbound to a chain where the user's account does not yet exist.** Availability only; no funds at risk. +\t- **The account's own instruction loop is unbounded** in Push's code — our ten-entry bound (gate 13) is enforced on our side, and a note is open with Push core about theirs (chapter 11). +\t- **On Solana the destination account is a signer, not a caller.** Whatever program it is handed may act with its signature on every account in the list, including through that program's own inner calls. This is the one way the Solana rulebook is structurally weaker than the EVM one; `2_UniversalRulesPolicy.md` §1.4c's S17 and S18 narrow it, and chapter 9 states the remainder. +\t- **On Solana only the bridged token's account is created for the user automatically.** The gateway creates the destination account's token account for the bridged mint on first use; any other token account — a swap's output, say — must exist beforehand (chapter 10). +## 7.4 Push Chain's executor module +- **Relied on for:** the credit-back path — it is the one caller URP will believe about far-side failure. +- **The costs:** +\t- The whole credit-back feature is **gated on Push core work that has not landed** — the module does not yet call URP on failure. Until it does, the feature is inert and the counter-inflation limit of chapter 9 applies. +\t- Its on-chain address is written in Push's platform code (`UniversalCore.sol:50`) but **unconfirmed against a live deployment** — one of the two facts that must be confirmed before URP hardcodes anything (chapter 11). +\t- URP cannot verify the amounts it reports — trusted, with damage bounded by once-per-id and never-below-zero. +--- +# 8 · Guarantees +Every promise the system makes, with the mechanism behind it and the test that proves it. A promise with no mechanism is marketing; each of these names its enforcement. +| The promise | The mechanism | Proven by | +| ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| Nobody but you can ever own your wallet | Owner = creator, baked into the clone's bytecode; no function to change it | No code path accepts another owner — deployment attempts prove it | +| The agent can never spend a token you did not name | Gate 5: the one-token pin | A request naming any other token reverts | +| …never more per action than you set | Gate 6 | An over-cap request reverts | +| …never more in total than you set | Gate 7 + spend recorded before dispatch | Requests summing past the cap revert at the crossing point | +| …never for anyone's benefit but yours | Gate 15's beneficiary pin; on Solana, gate S17's account pins | A request naming any other beneficiary — on Solana, any other destination token account — reverts | +| …never touching any protocol you did not allow | Gate 15: the allow-list — on Solana, gate S16's exact (program, instruction) match | A request to an unlisted target or function — on Solana, an unlisted program or instruction — reverts | +| …never after the end date | Gate 2 — the expiry inside URP (N2 native, S2 on Solana) | A request after expiry reverts with no state change | +| …never instructing your far-chain account directly | Gate 14, including the destination account, checked before the allow-list; on Solana, gate S15, which adds the token, system, stake, loader and lookup-table programs and the gateway program | **Must revert even when that address is in the allow-list** — permanent tests, at grant and at validation on Solana | +| *Solana:* …never handing your account's other balances to the program | Gate S18: every value-holding account appears only where the matched rule pins it; the list always contains the destination account | A value-holding account at an unpinned position reverts — permanent test; a list without the destination account is refused at grant — permanent test | +| *Solana:* …never swapping below the floor you set | Gate S17's data pins — a floor relative to the input, a slippage ceiling, a zero fee | A swap whose output falls short of the ratio reverts, including one that raises the input to beat a static floor — permanent test | +| *Solana:* …never more per action than Solana can carry | Gate S6b | An amount above 64 bits reverts | +| A "failed" action can never deliver funds to the agent | Gate 10 (refunds come home) + gate 11 (no side recipient); on Solana, S10 + S11 and S14 (the recipient is the target program, nothing else) | A request with any of these fields wrong reverts | +| Only the permission's agent can act under it | The wallet checks the caller against the agent the permission names before the engine runs; the session validator checks the address the wallet wrote, last | Every other caller — the owner included — is refused by name | +| No request runs twice | Each agent action is the agent's own transaction — an EOA's nonce, or the UEA payload's nonce; the wallet keeps no agent replay state | A mined transaction cannot be mined again; the same call sent twice is two actions, each checked and metered | +| A request dies with its permission | Removal clears the permission's agent; a regrant gets a new id from the wallet's grant counter | **A request for the old id fails after revoke-and-regrant** — permanent test | +| One permission's request can never be charged to another | The call names its permission, whose agent must be the caller; URP keys every counter on that id | An agent acting under another agent's permission reverts | +| Revocation is immediate and unblockable | One owner call; removal is pure storage deletion, no external calls | Revocation succeeds with a hostile policy installed; next request fails | +| A change never mixes old and new states | Atomic revoke + regrant; spent-amount assertion gates it | The change reverts when the agent spent in the composition window | +| A failed action costs gas and nothing else | Whole-transaction revert unwinds every counter | Counters identical before and after a failed action | +| You can always withdraw everything | The owner door has no checks | Owner withdrawal succeeds in every degraded state we can construct | +| A module can never block its own removal | The uninstall callback runs defensively with a fixed 100,000-gas stipend; on revert or burn-out an event is emitted and removal proceeds anyway | A callback that reverts and one that burns all its gas are both still removed | +| The agent can never refill its own budget | The engine's reset is owner-path only; v3 tooling never invokes it | **The agent-cannot-reset negative test** — permanent | +| Your wallet address, once computed, stays valid | Address math frozen across factory upgrades | **The address-stability regression test** — permanent | +| *Native:* the agent can never call a Push contract or function you did not name | The engine's action identity, plus gates N4 and N5 asserting URP's own copies | A request to an ungranted pair dies at the engine; a mismatched copy reverts at URP | +| *Native:* …never with a pinned argument set to anything else | Gate N7 — full 32-byte equality at the frozen position | A request with any pinned word different reverts, including a correct address with dirty padding | +| *Native:* …never more native value, per call or in total | Gate N6 | An over-cap call reverts; calls summing past the lifetime cap revert at the crossing point | +| *Native:* …never more of a metered amount, per call or in total | Gate N8 | The same, on the metered argument | +| *Native:* …never more calls than you allowed | Gate N9, with every successful call counted | The (n+1)th call reverts; a zero-value call still consumes one | +| The agent can never make your wallet call itself or its engine | Refused at grant — never grantable — and refused again at dispatch, after validation, whatever the engine said | **Two permanent tests**, one of which reaches the engine as a target through the engine's own wildcard, enabled through the owner door | +| A native permission can never reach the gateway; a universal one can never reach anything else | The kind is derived from the chain and asserted against every target at grant; gate 3 and gate N3 mirror it at validation | A gateway target under this chain, and a non-gateway target under a foreign chain, both revert at grant — **permanent tests** | +| Two permissions of different kinds on one wallet never touch each other's counters | Separate storage per kind, keyed by action id | A native call moves no universal counter — asserted on the raw storage slot, not through a getter | +| A permission for a chain URP cannot check is never granted | The destination family is derived from the chain's namespace at grant; any namespace but `eip155:` and `solana:` is refused | A grant naming any other namespace reverts at initialisation | +| An 8183 evaluator can tell whether the owner touched the wallet during a job | Checkpoint counter: every owner-door call, grant and revoke advances it, before the call; agent actions never do | The checkpoint suite, including three permanent tests | +## The permanent tests +Thirty-one tests across the build documents and suites are marked permanent — **never to be deleted or weakened**. The four below are the ones this table's universal promises rest on directly. The other twenty-seven pin promises made elsewhere in this document: the owner path surviving every degraded state; the two routing pins; the session validator calling nothing — both of its entry points are pure, so no external call can reach the agent check; the agent door never touching the owner's replay lanes; the owner door touching only the checkpoint slot; the checkpoint taken before each owner call; a withdrawal batched after a snapshot made visible; agent actions never moving the checkpoint; the enable-mode-is-dead test; the request-body length constant; the seven native-permission tests (the wallet and the engine refused as targets at grant, the wallet and the engine refused at dispatch, a gateway target refused as native, a non-gateway target refused as universal, the wildcard markers refused, and gate N3 proven live); URP's exact external-function set; the refusal to re-initialise a universal configuration that has no mode record; and the eight Solana-rulebook tests (forbidden programs refused at grant, and again at validation; the value-holding list must contain the destination account; vacuous or impossible data-pin values refused; a redirected destination token account refused; the price floor relative to the input; a value-holding account at an unpinned position refused; and the forbidden program ids pinned against their published base58 forms). Each is the only thing pinning a promise that some future refactor will be tempted to break: +1. **Address stability** — the factory's address math never changes. Breaking it strands counterfactually funded addresses, with no migration remedy in existence. +2. **The forbidden destination-account rule beats the allow-list** — remove this and one owner mistake (allow-listing their own far-chain account) hands the agent everything that account holds. On Solana the same rule covers the forbidden programs of gate S15. +3. **A request for a revoked permission fails after regrant** — remove this and a revoke-and-regrant could leave the old id usable against the new budget. +4. **The agent cannot reset counters** — remove this and the lifetime cap is advisory. +--- +# 9 · What this system does not protect against +Thirty-four accepted limits. Each is a deliberate choice, stated without softening. A builder who "fixes" one of these is reverting a decision, not fixing a bug. Where an open question could change one, it is named in plain words. +## Keys and people +1. **A stolen owner key drains the wallet completely.** Deliberate: any brake on the owner is also a lock-out of the owner. Defence belongs to the user's key-management and identity layer — and what that layer actually guarantees is itself still an open question (chapter 11). +2. **Nobody can act while the owner is unreachable.** No guardian, no emergency contact. Deliberate. The open question "should an emergency contact return?" would change this. +3. ~~Whoever holds a signed request may submit it.~~ **CLOSED.** The agent door admits only the permission's agent as the caller; there is no signed request for anyone else to hold. +## Timing +4. **Revocation cannot recall an instruction already in flight.** The window is bridge latency. Deliberate — physics of bridging. The revoke screen must disclose it. +5. **There is no ceiling on how far ahead a permission may expire.** The user's choice is respected as given. The residual is the agent acting late within the authorised window — never theft, never an amount or target the user did not allow. Deliberate. +## Budgets +6. **Replacing a permission starts its counters at zero — tightening a cap can increase remaining authority.** Deliberate: silent compensation was judged worse than an honest reset. The product must show prior consumption before a new cap is set. +7. **The lifetime cap bounds bridging, not redeployment.** Money already across can be redeployed endlessly until expiry. Deliberate — the cap is exposure-from-the-wallet; the expiry is the time bound. +8. **The adopted engine contains an owner-only counter reset that survives upstream.** Our tooling never calls it; the agent structurally cannot. Deliberate adoption cost, held by a permanent test. +9. **There is no deny-list, so an owner may allow-list a token-approval function** — which hands the agent spending power outside every cap. Deliberate: the model is allow-list-only, and the owner's list is the owner's responsibility. The open question "should the contract refuse approval-granting functions?" would change this. +10. **Until Push core's failure-reporting lands, a failed far-side action leaves the spent counter inflated.** Deliberate and *temporary*. Remedy meanwhile: revoke and regrant. +11. **A refund credit's amount cannot be verified by URP.** Trusted from Push core; damage bounded by once-per-id and never-below-zero. +12. **Gas is never credited back on failure.** The gas was genuinely consumed. Deliberate, with a rule that no credit path may ever touch a gas counter. +## Mechanics +13. **An EOA agent has one sequential nonce and no per-request expiry.** A stuck transaction blocks that agent's next one, and a broadcast transaction stays valid until it is mined or replaced. Bounded by the permission's own expiry and by revocation; a UEA agent's payloads carry the UEA's own nonce and a deadline. Deliberate: replay protection is the sender's own, and the wallet keeps none for agents. +14. ~~Two relayers racing the same request: the loser wastes its gas.~~ **CLOSED.** There are no relayers on the agent door: only the agent submits its own call. +15. **Policies run before the engine consults the session validator** — an adopted-engine ordering. The wallet has already checked the caller, but the standing constraint holds: every policy, forever, must be safe on arbitrary calldata from any caller. +## Platform inheritance +16. **The destination-account templates can be rotated by Push governance.** Accepted on admin trust; monitoring detects derivation changes; nothing on-chain prevents them. +17. **The destination-account factory is upgradeable — our address-verifiability guarantee is inherited, not owned.** Accepted: Push governance is our platform. +18. **A paused destination-account factory blocks a first outbound to a new chain.** Availability only; funds are never at risk. +## Permanence +19. **If the wallet's creation bytecode ever drifted, every pre-computed and pre-funded address would be stranded, with no remedy.** That is why the address-stability test is permanent and the address math is frozen forever. +20. **Deployed v3 wallets can never be migrated.** No upgrade path exists by construction. The open question "when does that stop being acceptable?" records the revisit trigger — nothing more. +21. **Adding any wallet-wide guard later means every user moves to a fresh wallet.** The direct consequence of shipping a validator-only wallet. The product obligation to walk users through far-chain balances exists for exactly this future. + +## Operations + +22. **The factory can be paused, which temporarily blocks new wallet creation.** A user who computed and funded a wallet address in advance cannot deploy it while the pause is on, so those funds are unreachable until it is lifted. **Availability only** — nothing is lost, no existing wallet is affected, and no deployed wallet can be frozen by anyone. Deliberate: it is the system's only incident lever, and its blast radius is limited to signups. + +23. **A misbehaving agent can burn the wallet's native gas balance in fees, within its caps.** Every action costs the wallet native gas up to the per-action ceiling, and a redeploy-only rules set lets an agent act repeatedly without ever moving the spend counter. Bounded by exactly two things: **the gas balance the owner funded, and the expiry.** Deliberate — the alternative is a second counter on a second asset, and the wallet's own funding is already the honest limit. Obligation 15 makes the number visible before the user commits. + +## The limits contract itself + +27. **URP is upgradeable, so whoever holds its proxy admin can rewrite every limit in this document.** This is the most powerful role in the system, and it is stated here rather than left to be discovered. What that role *can* do: replace URP's logic, and with it every gate, cap and pin described in `2_UniversalRulesPolicy.md`. What it *cannot* do: reach into a permission's stored configuration or its counters directly, or touch a wallet's funds — an existing permission keeps its caps until new logic says otherwise, and the owner door never consults URP at all. The trust anchors URP was initialised with (the gateway, the credit-back caller, the engine) have no setter; the only route to changing them is a full implementation swap. **Deliberate, and a genuine trade:** URP previously held those anchors in bytecode and needed no admin trust at all, but a policy that cannot be corrected is a policy whose first mistake is permanent — and its storage layout is frozen and append-only precisely so that a correction cannot silently reinterpret permissions already granted. The mitigation is procedural, not structural: the admin should be a multisig behind a timelock, so a change is visible before it lands. Until it is, this item reads exactly as written. + +## Native permissions + +24. **An unpinned argument guards nothing.** The native rulebook locks the words the owner pinned and nothing else; an argument the owner did not pin is the agent's to choose. Allow-listing a token approval without pinning the spender hands the agent that approval — the native form of the no-deny-list rule (item 9). Deliberate: the contract compares words, it does not understand functions. Obligation 16 makes the SDK refuse to emit the unpinned form. +25. ~~The kind the wallet was told and the kind URP recorded can disagree.~~ **CLOSED.** The premise was that the wallet never decodes URP's initialisation data. It now decodes exactly one field of it — the chain — and both contracts derive the kind from that same value, so there is nothing for them to disagree about and the grant event reports a derived fact rather than a claim. The narrow exception this required is bounded and stated in `2_UniversalRulesPolicy.md` §1.7: one field, read only after the policy has been proven to be URP's, used only to choose which shape rules apply. The terms themselves remain URP's sole business. +26. **A native call limit counts calls, not effects.** An action with a call limit of ten lets the agent spend those ten on calls that move nothing. Deliberate — the alternative, not counting a zero-value call, makes the limit bypassable by exactly such calls. Obligation 18 says so on the grant screen. + +## Solana permissions + +28. **An account pin bounds where value is delivered, not what an allow-listed program may take.** On Solana the destination account signs the whole call, and that authority carries into every call the target program makes on the accounts it is handed. The forbidden set guards the top-level target only. S18, the data pins and a fixed account count narrow what the program is handed; obligation 20 narrows which programs are allowed at all. The remainder is trust in the allow-listed program's code — and Solana programs are commonly upgradeable, the same class of trust as an EVM proxy. +29. **The loss ceiling on Solana is not the lifetime cap.** The caps meter what is bridged per request. Swap outputs, leftovers, and anything anyone sends to the destination account or its token accounts are reachable by any allow-listed program handed those accounts. The honest ceiling is the wallet's balance plus everything the destination account holds. Accounts the owner did not list as value-holding are not judged by S18 at all — deliberately: the list is the owner's statement of what is worth protecting. +30. **A price floor is policy without an oracle.** A ratio floor set at grant goes stale as the market moves — refusing honest trades in one direction, permitting worse ones in the other. Deliberate: URP holds no price feed and makes no external call at validation. The remedy is a regrant, and obligation 21 makes the cadence part of the grant. +31. **Rent is a leak.** A program that creates accounts with the destination account as payer spends its SOL. Not preventable by pins; bounded only by which programs the owner allows. +32. **Swap outputs stay on Solana until the owner brings them home.** Gate S5 pins the outbound token to the permission's listed assets, so the agent can repatriate only a listed asset, never what it bought. The owner door can repatriate anything. Deliberate. Whether listing the output token as a second asset is a safe remedy is open — see `docs/multi-asset-review.md`. + +## Checkpoints + +33. **The checkpoint counter is coarse.** Any owner-door call advances it, harmless or not; the wallet cannot tell whether an arbitrary call moved value. Deliberate. +34. **The checkpoint counter is blind to what needs no wallet call.** An allowance the wallet granted before a job's snapshot can be pulled without the owner touching the wallet, and plain transfers in never tick. The evaluator decides how to treat balances. Deliberate. +--- +# 10 · What the product must do that the contracts cannot +Twenty-three obligations. The contracts cannot check any of them; each names what goes wrong if it is skipped. **Twenty-one of the twenty-three currently have no test anywhere — this is the largest untested surface in the design, and it is the surface users actually experience.** +## The grant and change screens +1. **Argument positions for beneficiary checks are generated from each protocol's interface by tooling — never typed by hand.** A wrong position makes gate 15's beneficiary pin check the wrong bytes: the beneficiary pin silently guards nothing. +2. **Every newly supported protocol ships a rejection test** — a wrong beneficiary and an oversized amount must be shown to revert before that protocol is offered to users. This obligation is itself the test for the previous one. +3. **The destination account address is derived by tooling, never pasted, and the grant screen shows it — and whether it is deployed yet.** A pasted address puts the beneficiary pin under a typo's control. +4. **The grant screen gives the expiry the same prominence as the cap.** Users who see "100" but not "90 days" are authorising more time than they know. +5. **The grant screen shows the destination account's current idle balance.** The agent's instructions can use whatever sits there — the user should see the real exposure, not just the new budget. +6. **An unlimited cap is displayed unmistakably as unlimited — never as a huge number.** A number that means "no limit" printed as digits is a deception. +7. **On a change, show what the old permission consumed before the owner picks the new cap.** Without it, the counters-reset edge (chapter 9, item 6) catches owners silently. The change flow's stale-state assertion forces the tooling to read the old value anyway — showing it costs nothing. +8. **The change flow must never silently shrink the owner's chosen new cap to compensate for prior spend.** The reset is honest; a hidden adjustment would be a lie in the other direction. +9. **The revoke screen states that an already-dispatched instruction still completes.** Otherwise revocation reads as a guarantee it is not (chapter 9, item 4). +## Partners and operations +10. **Launch partners are told, before integration, that rotating an agent's key means a new agent address — revoking and regranting every permission naming the old one, counters resetting with it.** A partner who rotates keys casually will burn its users' budgets. +11. **The agent funds its own gas** — an EOA agent holds PC, a UEA agent's gas path is funded — separate from any wallet balance. If it runs dry, every user's agent stops at once: an outage, not a security event, but an outage the product owns. +12. **A user moving to a new wallet version is told their far-chain balances do not move automatically, and is walked through each one.** No tooling for this exists yet; until it does, this is a support-ticket generator (and chapter 9, item 21, is why it will happen). +13. **Monitoring compares each permission's committed destination address against the current derivation.** This is the detection half of the admin-trust acceptances (chapter 9, items 16–17): drift is caught by operations, or not at all. + +## Wallet creation + +14. **At wallet creation, the interface shows the destination-chain account address this wallet will have on each supported chain.** Every new wallet the user creates means a new account on every chain they may reach. If that cost is not shown before they commit, they discover it later — usually when they find balances stranded on a wallet they stopped using. + +## Gas funding + +15. **The grant screen states how much native gas token the wallet holds, and how many actions that funds at the chosen per-action gas ceiling.** The wallet spends its own gas balance on every cross-chain action — **including actions that bridge nothing**, which is the redeployment path. So the gas balance is a second, independent budget that no cap in the rules set bounds. A user who funds a wallet generously with gas and grants a long expiry has authorised more agent activity than the token caps alone suggest. + +## Native permissions + +16. **Argument pins are generated from the Push contract's interface by tooling — never typed by hand — and an approval-granting function is refused unless its spender argument is pinned.** A wrong pin position fails closed: the word will not match and every call reverts. A *missing* pin fails open: the argument is unchecked (chapter 9, item 24). The SDK is the layer that knows what a function means; the contract only knows what was pinned. +17. **The chain is stated once, and the tooling states it exactly as the asset reports it.** The kind is no longer a variable tooling can carry two copies of — it is derived, by both contracts, from the one chain string in the policy blob (`2_UniversalRulesPolicy.md` §1.7). What remains is a *transcription* obligation: for a universal permission the string must be byte-exact what the asset's own chain view returns, or the grant is refused at initialisation; for a native one it is this chain's own identifier. A near-miss such as a different letter case is not corrected — it derives the other kind and is refused against the targets. +18. **The native grant screen shows, per action, the contract, the function, every pinned argument in human terms, the value and amount caps, and the call limit — and states that a call limit is consumed by any successful call, including one that moves nothing.** Eight actions with eight pins each is the ceiling on what a user may be asked to approve at once; the ceiling exists so that this screen stays readable, not for gas. + +## Solana permissions + +19. **Program rules, account pins and data pins are compiled from the program's interface, fetched at grant — never typed by hand — and the interface's hash is recorded on the grant.** Rules are exact to one instruction and never share a data-pin set with a sibling instruction: two instructions with fields of the same widths at the same offsets can mean opposite things. Every value-carrying account — the authority, the source, every destination, every fee account — is pinned, and every fixed-layout instruction has its exact account count set. An instruction whose value-carrying accounts, input amount or minimum output cannot be identified from the interface, or whose scalar fields sit between two variable-length fields, is refused rather than approximated. A program upgrade that shifts an instruction's layout silently moves every pin measured from the end; the pins are re-verified after any upgrade of an allow-listed program. A missing pin fails open (chapter 9, item 28); URP's "every rule has a pin" check is hygiene, not completeness. +20. **An aggregator is allowed only through its shared-accounts instruction**, so that the inner legs run under the aggregator's own authority and the destination account is never handed to a downstream exchange as signer. The variants that put the user's intermediate token accounts in the account list are never allowed. Each aggregator card is gated on a fork test showing the aggregator refuses a substituted downstream program. +21. **Every swap rule carries a price floor relative to its input, a slippage ceiling, and a zero fee** — a ratio floor (or an exact input plus a floor), an at-most pin on slippage, an equal-zero pin on every fee field. A static floor on the output alone is beaten by raising the input. The grant screen states the floor as a price and the regrant cadence it implies (chapter 9, item 30). +22. **The destination account and its token accounts are derived by tooling from the wallet's address and the gateway program, and the gateway program is taken from the chain registry — never from user input.** The value-holding list is the destination account plus its token account for the asset and for every output token the permission allows. A pasted key puts every pin under a typo's control. +23. **Output token accounts exist before the agent needs them.** The gateway creates only the bridged token's account. Others are created off-band, or by allowing the associated-token program's idempotent create instruction in one exact shape — fixed account count, the owner position pinned to the destination account and the mint position pinned to one allowed output token, one rule per token. Never as an instruction-less rule, which would match the program's other instructions too. +--- +# 11 · Open questions, and what must not be "fixed" +## 11.1 The two items that gate implementation +These are facts to confirm, not decisions to make. Nothing else in this chapter blocks code — only the executor module's address still gates implementation. +- **RESOLVED — the Ed25519 precompile is no longer used by this system.** A Solana-keyed agent acts through its UEA, which verifies the key itself; the wallet verifies no signature. +- **The executor module's address.** Written in Push's platform code but unconfirmed against a live deployment. Confirm before URP hardcodes its one trusted caller. +## 11.2 Design questions for the team — none blocks v3 +- **Should the contract refuse approval-granting functions outright?** Would close chapter 9, items 9 and 24 — for a native permission, the unpinned-spender form. Today: allow-list-only, owner's responsibility, with the SDK refusing the unpinned form (obligation 16). +- **Should an emergency contact return to the design?** Would close chapter 9, item 2. +- **Should the destination and refund locks also exist at the gateway layer?** Our layer locks both regardless; a second lock would be belt-and-braces. +- **When does "no wallet migration, ever" stop being acceptable?** The recorded revisit trigger for chapter 9, item 20. +## 11.3 With Push core +- **The executor module must call URP on outbound failure.** The one piece of Push-core work the credit-back feature waits on. Not agentic-wallet work. +- **The destination account's own instruction loop is unbounded** in Push's code. Ours is bounded at ten; theirs should be bounded too. +- **The gateway's refund behaviour for the outbound direction** is undocumented in the public revert-handling notes (inbound only). Completeness of our exposure analysis, nothing more. +- **Two admin-only paths can pay an agent-chosen refund destination for funds coming back from a destination account.** Push Chain never issues an automatic refund for an inbound that originates at a destination account, so on every automatic path the agent's choice of refund destination is never used. But the stuck-inbound revert and the rescue path, both of which need an admin action, pay that destination without checking where the inbound came from. The agent cannot trigger either alone. The fix is node-side — for such inbounds, refund to the destination account of the originating Push account, or refuse — and is not URP work. +## 11.4 Conventions and text +- **A UEA agent's payload deadline: 15 minutes recommended.** A convention of the agent's own tooling, not a wallet rule — the wallet sees only the sender. +- **The identity layer's recovery guarantees are not yet enumerated.** They are the only defence against chapter 9, item 1. Not this system's work, but this system's users' exposure. +- **One sentence in the internal rules document still overclaims** that no counter reset exists anywhere; it must be narrowed to "no agent-reachable reset" (chapter 7.1 has the truth). +## 11.5 Do not "fix" these +Sixteen things in this design look like mistakes to a fresh reader. Each is a decision. Every implementation task touching one of these must carry this list. +1. **Gas is never credited back on a failed action** — and no refund path may touch a gas counter. The asymmetry is correct: the gas was consumed. +2. **There is no paymaster and none is planned.** Agents submit their own calls and pay their own gas. Do not add sponsorship. +3. **The empty-recipient pin (gate 11) guards a path the current far-side code does not even read.** It is defence in depth against that code changing. Do not remove it as "dead". On Solana the same field is required and is the target program (S11, S14) — the opposite rule for the same field is correct for each family. +4. **The forbidden-target rule compares against the destination account, and it beats the allow-list.** Not a bug that it overrides the owner's own list — the permanent test demands exactly that. +5. **Widening and narrowing a permission share one path: revoke and regrant.** There is no separate, "safer" narrow-only edit. Do not add one. +6. **The configured destination chain is stored but never compared at validation.** The chain is pinned transitively by the token. The unused field is known and documented (`2_UniversalRulesPolicy.md` §1.6), not forgotten. +7. **The wallet's refusal of itself and the engine as dispatch targets runs after validation, not before.** Placed earlier it would pre-empt the engine's own refusals and change which error surfaces, and the engine-as-target case is only reachable at all through the engine's wildcard, which validation has to resolve first. Two permanent tests pin its position; do not move it. +8. **A native call limit is consumed by a call that sends no value and meters nothing.** Not a metering bug. The universal counter ignores a zero-amount request because it counts bridging; the native call counter counts calls, and a limit zero-value calls could slip past would be advisory. +9. **A value-only native action accepts empty call data and nothing else.** The engine buckets one to three bytes under the same action id; URP refuses them by name. That is what value-only means, not overreach. +10. **URP's kind-specific getters revert on a record of the other kind, and return zeros on an empty slot.** Both halves are deliberate: an empty slot is a state, a wrong-kind read is a caller bug. The mode getter never reverts and is the first call for anything that does not already know the kind. +11. **Eight actions, eight pins, thirty-two allow-list entries are sanity bounds, not gas bounds** — and so are a Solana permission's thirty-two program rules, sixteen account pins, eight data pins and eight value-holding accounts. They cap what a human is asked to approve and audit at once. Raising any of them is a design change, not a tuning. +12. **The gateway program is a forbidden Solana target, although calling it is not a drain.** It returns the permission's asset to the owner's own wallet, and the agent's refund destination is never paid on that path. It stays forbidden because under a one-asset permission it can bring home only leftover input — never what the agent bought — while spending the owner's gas and inbound capacity for nothing. Outputs come home through the owner door. A permanent test refuses it at grant and at validation. +13. **URP refuses a Solana rule with no account pin, though a single pin proves nothing.** One authority pin always passes. The check is hygiene; completeness is the tooling's job (obligation 19). A test deliberately grants a rule with one useless pin and shows URP accepts it, so nobody reads the check as a guarantee. +14. **A Solana permission's value-holding list must contain the destination account.** That is what keeps gate S18 always on. Do not relax it to allow an empty list "for simple permissions" — an empty list switches the defence off silently. Permanent test. +15. **Two Solana rules that could match the same instruction are refused at grant, though first-match would simply pick one.** It would pick the first, and the second rule's pins would never run — an owner would believe they had granted limits that do not exist. +16. **The owner door writes one storage slot — the checkpoint.** That is the only exception to "the owner door touches nothing"; it consults nothing and cannot revert, and a permanent test pins that it touches slot 0 and nothing else. +--- +*End of the architecture document. The decision register holds the checkable form of every ruling above; the phase planning document holds the reasoning. Changes to this document follow the same rule as the system it describes: nothing is edited silently — a change names the ruling it implements.* diff --git a/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/2_UniversalRulesPolicy.md b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/2_UniversalRulesPolicy.md new file mode 100644 index 00000000..b1909996 --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/2_UniversalRulesPolicy.md @@ -0,0 +1,326 @@ +# UniversalRulesPolicy (URP) + +*The rules-policy chapter of the AGW architecture, kept as its own document. References to other chapters point to [`1_AGW.md`](1_AGW.md).* + +# 1 · URP — where the limits live +*URP — the Universal Rules Policy. One contract, three rulebooks: the **universal EVM** rulebook (§1.2–§1.4) descends from a v2 contract that has since been removed from the repository; the line references in those sections point into that removed file and are kept only as provenance for the reviewed logic URP reproduces. The **native** rulebook (§1.2b, §1.4b) and the **universal Solana** rulebook (§1.2c, §1.4c) are referenced by function name into `src/policies/UniversalRulesPolicy.sol`. **The authoritative specification is the contract itself, `src/policies/UniversalRulesPolicy.sol`, together with its test suite.** Every v3 extension to the universal rulebook is marked below.* +## 1.1 Why this contract exists +- The adopted permission engine identifies "what action is this?" by hashing **the target contract and the function being called on Push Chain**. +- But every agent action in this system is the *same* Push-side call: the wallet calling the gateway's send function. A market trade, a lending deposit, a transfer to a thief's address — **identical**, from the engine's point of view. +- The things the user actually cares about — which protocol, which function, whose benefit, how much — live *inside the call's data*, nested two layers deep, where the engine never looks. +- **URP is the contract that looks.** It is registered as the action policy for the one action that exists, and it unwraps the call data and checks everything inside — in the far chain's own format: an EVM instruction list for an EVM chain, a Solana instruction for Solana. Remove URP and the user's real limits are not enforced anywhere. That is why the engine's own floor — **at least one action policy per action** (`SmartSession.sol:285-299`) — combined with URP being that one policy, means the system fails closed: strip URP from a permission and the permission validates nothing at all, so every request dies. +- **For a native permission the blind spot is different, and smaller.** Here the engine's identity — the Push contract and the function — is exactly what the user cares about, so the engine itself already refuses a call to any contract or function the permission did not name. What the engine still cannot see is *how* the function is called: the arguments, the value attached, and how many times. URP's native rulebook checks those three. It is registered as the action policy on **each** of the permission's one to eight actions, and the fail-closed property is identical and per action: strip URP from any action and that action validates nothing. +- **URP decides which rulebook to run from a record it wrote at grant, not from the request.** §1.7 explains how that record is set, and why a request can never reach the wrong rulebook. +- Two wiring rules protect the fail-closed property. **Both are enforced in code, by the wallet's grant-shape check — a grant violating either one reverts:** +\t- **Never configure a fallback action policy** on an agent wallet. The engine supports a wildcard policy that catches unmatched actions; installing one would absorb requests that should die. For a universal permission this follows from the one-action shape; for a native permission the wallet refuses the engine's wildcard target and its two wildcard function markers **by name**, because the engine itself does not refuse the wildcard target at grant time (`1_AGW.md` chapter 7.1). +\t- **Never rely on the engine's other policy class** (checks on the outer operation) for anything mandatory — that class is allowed to be empty (`SmartSession.sol:237-247`). Everything mandatory lives in URP. +## 1.2 What URP stores — a universal permission's configuration (EVM chains) +Frozen at grant, per permission, written at initialisation: +| Field | Meaning | +| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| the tokens | One to eight PRC20s on Push (`assets`, at most `MAX_ASSETS`), each with its own caps and its own spent counter. No token twice. Every request must name one of them, **even at zero amount**: the token is what pins the destination chain — see §1.5. A permission with no token is refused at grant, on every grant path; a permission that should move nothing lists one token (the chain's gas token) with both limits at zero | +| per-action cap, per token | The most that one request may bridge in that token. Zero is legal: the token may route a request but never moves (the move-nothing permission) | +| lifetime cap, per token | The most that all requests together may bridge in that token. The largest representable number means unlimited; zero means nothing may move | +| PC-per-action cap | `maxGasPerCall`: the most native PC one request may carry — it pays the protocol fee and the gas swap, despite the name | +| the spent counters | One per token: the running total bridged in that token. Starts at zero. Money coming back to the wallet never lowers it | +| the expiry | The permission's end. Held **inside URP** so this one contract carries the complete mandatory set — no other policy needs to exist for the user to be safe | +| the destination account address | Computed and committed at grant. Everything must benefit this address | +| the allowed-calls list | Per entry: a far-chain contract address, a function on it, where that function's beneficiary argument sits, whether it has one, and a per-entry native-value cap. One to thirty-two entries | +## 1.2b What URP stores — a native permission's configuration, per action +A native permission holds one of these records **per action** — a permission with eight actions holds eight, each under its own action id. Frozen at grant, written at initialisation: +| Field | Meaning | +| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| the target | A defensive copy of the action's Push contract. The engine already routes by it; URP asserts it again at N4 so a mis-wired engine entry cannot pair one contract's rules with another's call | +| the function | A defensive copy of the action's function selector, asserted at N5. The value `0xFFFFFFFF` means **value-only**: a bare transfer of PC with **empty** call data — a function that merely takes no arguments is a normal four-byte selector, not value-only | +| the argument pins | Zero to eight. Each is a byte position in the call data — counted from byte zero, selector included, so 4 is the first argument — and the exact 32-byte word that must sit there. **Full-word equality**, so an address argument with anything in its upper twelve bytes is a mismatch, deliberately: the pin proves the padding is clean as well as the value | +| per-call value cap | The most native PC one call may carry | +| lifetime value cap | The most all calls together may carry. Largest number means unlimited | +| the value-spent counter | Running total of native PC sent. Starts at zero | +| the metered amount | Optional: on/off, a position in the call data read as a number, a per-call cap and a lifetime cap. Off is a flag, not "position zero" — position zero is a legal position, inside the selector | +| the amount-spent counter | Running total of the metered amount. Starts at zero | +| the call limit | How many successful calls the action permits. **Zero means unlimited** — the one cap in the system where zero is not "nothing" | +| the calls-used counter | Successful calls so far. **Moves on every successful call**, including one that sends no value and meters nothing | +| the expiry | The permission's end, held inside URP for the same reason as in the universal rulebook | +Two refusals happen at grant, not at validation: a native record may never name the gateway as its target, and a value-only record may carry neither pins nor a metered amount — such a record could never authorise anything, so it is a misconfiguration the owner believes they granted, not a valid strict one. +## 1.2c What URP stores — a universal permission's configuration (Solana) +Frozen at grant, per permission, written at initialisation. The first five fields mean exactly what they mean in §1.2; everything after them replaces §1.2's destination account and allowed-calls list: +| Field | Meaning | +| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| the tokens | One to eight, with per-token caps and counters, exactly as in §1.2. Each pins the destination chain | +| per-action and lifetime caps | In the token's base units — on Solana, lamports or the SPL token's base units | +| PC-per-action cap | The most native gas value one request may carry | +| the spent counters | One per token, as in §1.2 | +| the expiry | The permission's end, held inside URP | +| the destination account | The 32-byte key of the wallet's Solana account, derived by tooling and committed by the owner. Never a valid target | +| the gateway program | The 32-byte id of the gateway program on the declared cluster, from the chain registry. Never a valid target | +| the program rules | One to thirty-two. Per rule: a program, an instruction tag (its leading one to eight bytes) or the marker that the instruction carries no data, and optionally the exact account count the instruction must have | +| the account pins | Up to sixteen. Per pin: which rule, which position in the account list, and the key that must sit there. Every rule must carry at least one, and a position may be pinned only once per rule | +| the data pins | Up to eight. Per pin: which rule, an offset — from the start or from the end of the instruction data — a width of one to eight bytes (up to thirty-two for equality), and a comparison: equal, at least, at most, or a minimum ratio to a second field at its own offset | +| the value-holding accounts | Up to sixteen destination-side accounts the owner declares worth protecting: the destination account itself, which must be present, one token account per listed token and up to seven swap-output accounts. Each may appear in a request only where the matched rule pins it; a listed account no rule pins can never be passed. URP cannot check that every listed token's account is here (it cannot derive Solana token accounts), so tooling must list them. Gas grows with the number listed: about 6,000 per extra account on a ten-account request | +Refusals at grant, each with its own named error: no program rule may name a program the rulebook forbids as a target (§1.4c, gate S15); two rules on one program may not both be able to match the same instruction — an instruction-less rule against another instruction-less rule, or one tag a prefix of the other — so the first-match lookup is always exact; a fixed account count may not exceed the request bound, and no pin may sit beyond it; a data pin may not sit on an instruction-less rule, and its comparison value must be one the field can actually fail — a ceiling above the field's range, a ratio with a zero numerator, or an equality value encoded in the wrong alignment is refused; and the value-holding list may not contain the zero key, a duplicate, or an allow-listed program, and must contain the destination account. + +**One input per instruction.** Because two rules may not match the same instruction, each (program, instruction) has exactly one rule, and each position one pinned key. If a swap rule pins its input to the USDC account, USDT can never be that instruction's input. Using several listed tokens through one instruction means leaving the input position unpinned and those token accounts off the value-holding list, so only the output and price pins protect them. Several tokens in one Solana permission work best when different tokens are used by different instructions. +**And, beside any of the three configurations, the mode record**: whether this permission's URP record exists at all, which kind it is, and — for a universal permission — which destination family. §1.7. +## 1.3 What URP opens +Each validation performs a **two-level unwrap**: +- **Level one — the gateway request.** URP decodes the wallet's call to the gateway: the token, the amount, the native value, the routing fields, and the payload. +- **Level two — the instruction list.** Inside the payload sits the destination account's instruction list: up to **ten** entries of *(target, value, data)*. URP walks **every** entry. One bad entry — even the last — kills the whole request. +- **For Solana, level two is one instruction, not a list.** URP parses the payload in exactly the byte grammar Push Chain's validators decode — a four-byte account count, that many 33-byte account entries, a four-byte data length, the instruction data, an instruction id and the target program — and requires it to be **consumed exactly**: a short field or a trailing byte is refused, so URP and the validators can never read the same bytes two ways. Every length is checked before the read it guards; the parse is bounded at sixty-four accounts and 1,024 bytes of instruction data. Writable flags are read past, never judged — a wrong flag fails on Solana, not here. +- **A native validation opens nothing.** The call is already flat. URP reads 32-byte words out of the call data at the positions the permission froze, and never decodes it as a structure — it does not know, and does not need to know, what the function's arguments mean. Every read is bounds-checked in 256-bit arithmetic, so a crafted position can neither wrap nor read past the end. +## 1.4 The universal gauntlet — every gate, in order (EVM chains) +Run for a universal permission whose destination family is EVM (`_checkUniversal`). Each gate: what it demands, and what it stops. Any failure reverts the whole request with nothing spent. +| # | Gate | Demands | Stops | +| --- | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1 | **Configured** | This permission's configuration exists and is initialised (`:141`) | Requests against ghosts — ids never granted on this wallet | +| 2 | **Not expired** | The permission's own end date has not passed — **the expiry lives here, in URP** | Everything, after the deadline the user set. This is why URP alone is the complete mandatory set | +| 3 | **Gateway only** | The Push-side call target is the gateway, nothing else (`:143`) | The agent calling any Push contract directly — a token, the wallet, anything. The entire far-chain rulebook below is only sound because *everything* must pass through the gateway | +| 4 | **Send function only** | The gateway function is the outbound send, nothing else (`:145-147`) | Reaching any other gateway capability | +| 5 | **A listed token** | The bridged token is one of the permission's tokens — on **every** request, zero amount included | Spending any asset the user did not budget, and — because the gateway routes by the token — sending the permission's calls to a chain the user never approved | +| 6 | **Per-action cap** | Amount within **that token's** per-action cap | One oversized request | +| 7 | **Lifetime cap** | Amount plus everything already spent **in that token** within that token's lifetime cap | Death by a thousand cuts — many small requests. One token running out never limits another | +| 8 | **Gas-value cap** | Native PC attached within its cap (`:177`) | Draining the wallet's gas balance through the value field | +| 9 | **No uncapped gas swap** | The request's own gas-swap ceiling is non-zero *(v3 addition)* | An agent authoring the field's "no cap" value. The **owner** may set unlimited caps in the rules set; an **agent** may not author an unlimited request field | +| 10 | **Refunds come home** | The refund destination is the wallet itself (`:178-180`) | A "failed" transfer whose refund lands at the agent's address — failure as an exfiltration route | +| 11 | **No side recipient** | The bridged-funds recipient field is empty — funds may only travel with the instruction payload *(v3 addition)* | Any use of the gateway's direct-transfer mode. Defence in depth: the current far-side code ignores this field on the payload path, but URP does not lean on that staying true | +| 12 | **Instruction list only** | The payload is exactly a destination-account instruction list | Smuggling any other payload shape past the gates below | +| 13 | **At most ten** | Between one and ten instructions *(v3 constant)* | Unbounded lists that could exhaust validation gas | +| 14 | **No loopbacks** | No instruction may target the wallet, URP itself, the gateway — **or the destination account** (`:253-255`; the last is a v3 addition). **Checked before gate 15** | Self-calls and re-entry tricks; and — the v3 addition — the agent instructing the user's own account directly, which would hand it arbitrary control of everything that account holds. **This gate wins even if the owner allow-listed that address** — a permanent test pins exactly that | +| 15 | **The allow-list, and for the user only** | Every instruction's far-chain target *and* function appear in the allowed-calls list; and where the matched rule names a beneficiary argument, that argument equals the destination account (`:264-265`) | Everything. This is the only place in the entire system that checks the far-chain destination — and the beneficiary pin is what stops the agent trading honestly but making *itself* the beneficiary | +| 16 | **Per-entry value cap** | Each instruction's native value within its own cap | Value-draining through individual entries | + +> **There is no zero-amount gate.** v2 rejected a bridged amount of zero; v3 permits it, because that is the *redeployment* path — instructions travelling to capital already at the destination, with nothing new bridged. The counter correctly does not move. Without it an agent could buy but never sell. + +After every gate passes, URP **records the spend before the bridge is called** — effects first, so no ordering trick can spend twice against a stale counter. +## 1.4b The native gates — every gate, in order +Run only for a native permission (`_checkNative`). The same discipline as the universal gauntlet, for the same reason: this runs before the engine consults the session validator, on call data the engine has not yet authenticated. The wallet has already checked that the caller is the permission's agent, but URP does not rely on that. No external calls; every counter written last; any failure reverts the whole request with nothing spent. +| # | Gate | Demands | Stops | +| --- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| N1 | **Configured** | This action's native record exists and is initialised | Requests against ghosts — action ids never granted on this wallet | +| N2 | **Not expired** | The permission's end date has not passed — the expiry lives here, as in the universal rulebook | Everything, after the deadline the user set | +| N3 | **Never the gateway** | The call's target is not the gateway | The mirror of gate 3. A native permission cannot be written against the gateway (§1.2b), so on a permission the wallet created this cannot fire — it is defence in depth against a mis-wired grant, and a named test manufactures the state the wallet forbids to prove the gate is live | +| N4 | **The named contract** | The call's target equals the record's own copy of the target | A record reached through any action id but its own | +| N5 | **The named function** | The call's function equals the record's copy. Call data under four bytes counts as value-only — matching how the engine itself buckets short calls — and **a value-only call must carry empty call data, not one to three stray bytes** | Reaching any function but the one granted; and smuggling bytes under a value-only action | +| N6 | **Value caps** | Native PC attached within the per-call cap; attached plus everything already sent within the lifetime cap | Draining the wallet's PC through one large or many small calls | +| N7 | **The argument pins** | For every pin: the call data is long enough to hold the word at that position, and the word there equals the frozen value exactly | A beneficiary that is not the wallet; a spender that is not the intended contract; a pool id the owner did not choose; a correct address with dirty padding. **This is the only place a native call's arguments are checked**, and a missing pin is an unchecked argument (`1_AGW.md` chapter 9) | +| N8 | **The metered amount** | If the action meters an amount: the call data reaches it, the amount is within the per-call cap, and amount plus everything already metered is within the lifetime cap | Staking, approving, transferring or depositing more than the user allowed, per call or over the permission's life | +| N9 | **The call limit** | If the action has a limit: calls used so far are below it | The (n+1)th call — including a zero-value one, because every successful call counts | +After every gate passes, URP writes all three counters — value, amount, calls — **and only then**, so a request that fails at N9 has moved nothing at N6 or N8. It emits a metering event on every success, even when both value and amount are zero, because the call counter still moved. +**Every native error puts the value you debug with first.** The engine truncates a policy's revert data to 32 bytes — a selector plus 28 bytes of the first argument (`1_AGW.md` chapter 7.1). A native error therefore leads with the offending value (the word that did not match, the amount that was too large) rather than an index or a length, which would surface as zeros and tell nobody anything. The universal rulebook's errors predate this ordering and keep their reviewed shape; wallet errors are not truncated at all and do not follow it. +## 1.4c The Solana gauntlet — every gate, in order +Run for a universal permission whose destination family is Solana (`_checkSvm`). The same discipline as the other two: no external calls, the spend written last, any failure reverts the whole request with nothing spent. **Gates S1–S10 are gates 1–10 of §1.4, unchanged in meaning** — configured, not expired, gateway only, send function only, a listed token, the per-action cap, the lifetime cap, the gas-value cap, no uncapped gas swap, refunds come home — run against the Solana configuration. They do not depend on the far chain. From S11 on, the gates replace §1.4's 11–16: +| # | Gate | Demands | Stops | +| --- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| S6b | **Fits Solana's amount** | The bridged amount fits in 64 bits — Solana's amount type | An amount the far side would truncate. Runs beside S6 | +| S11 | **Recipient is a program** | The recipient field is exactly 32 bytes and not zero | The inverse of gate 11: on Solana the recipient is required, and is the program to call. An address in any other form — including a base58 string — fails closed | +| S12 | **One well-formed instruction** | The payload is non-empty and parses exactly in the validators' grammar (§1.3) — no short field, no trailing byte | A funds-only outbound, and any payload URP and the validators could read differently | +| S13 | **Execute only, within bounds** | The instruction id is *execute*; at most sixty-four accounts and 1,024 bytes of instruction data | The *withdraw* form, which no rule below can inspect — the Solana counterpart of gate 12 — and unbounded parsing | +| S14 | **Recipient and target agree** | The program named in the payload equals the recipient field | An ambiguity in the far-side path: the validators sign over one and build the transaction from the other. Two different values fail on Solana at the owner's gas cost; URP refuses the shape instead | +| S15 | **Never a forbidden program** | The target is not the System program, SPL Token, Token-2022, Stake, the upgradeable BPF loader, the address lookup table program, **the gateway program, or the destination account**. **Checked before S16** | Direct drains: each of these, called with the destination account as signer, can move or burn what it holds. The gateway program routes funds back to Push and is refused for the reason in 11.5. **This gate wins even if the owner allow-listed the program** — grant refuses it too, and a permanent test pins both | +| S16 | **The allow-list — exact match** | The (program, instruction tag) matches a rule; an instruction-less rule matches only empty instruction data; and if the rule fixes an account count, the request has exactly that many | Every program and instruction the owner did not name. Because grant forbids two rules that could match the same instruction, the first match is the only match — a rule can never be reached by an instruction its pins were not written for | +| S17 | **Account pins and data pins** | Every account pin of the matched rule: the position exists and holds the frozen key. Every data pin: the instruction data reaches the field, and the field equals, meets the floor, stays under the ceiling, or meets the ratio | A destination that is not the user's token account, an authority that is not the destination account; a non-zero fee, an over-wide slippage, a price floor not met. **The ratio form is what a swap needs**: a static floor on the output is beaten by raising the input to the whole balance | +| S18 | **Value-holding accounts only where pinned** | Any account on the permission's value-holding list that appears anywhere in the account list sits at a position the matched rule pins | Handing the program the destination account's *other* balances as extra accounts. On Solana the destination account signs the whole call, so an account passed is an account the program may spend from. The list must contain the destination account, so this gate is never off | +> **There is no zero-amount gate here either.** A zero-amount request is the Solana counterpart of the redeployment path — one instruction acting on capital already at the destination — and the counter does not move. + +After every gate passes, URP **records the spend** — the same counter discipline as §1.4. +## 1.5 What URP counts +- **The spent counters** — one per listed token — advance by the bridged amount, before dispatch, and only count bridging — `1_AGW.md` chapter 4.2's "bridged, not deployed" rule lives here. **They count what was sent out, never what came back**: URP cannot see money arriving at the wallet, and could not tell an agent's return from the owner's top-up, so a limit of 1000 with 600 sent and 300 returned leaves 400. Everything in this section applies to EVM and Solana alike. +- **The credit-back** *(v3 addition — designed, not yet functional)*: when a far-side execution fails and Push Chain's executor module reports it, URP reduces the named token's spent counter by the failed amount (the module passes the token; a credit can never touch another token's counter). Three properties bound this path: +\t- **module-only** — a single fixed caller, Push Chain's own executor module, may invoke it; the agent cannot fabricate a failure; +\t- **idempotent** — each failed cross-chain transaction id credits at most once; a second credit for the same id reverts (a named test); +\t- **saturating** — the counter never goes below zero. +\t- One honest limit: URP cannot verify the *amount* the module hands it; it trusts Push core. Idempotency and saturation bound the damage of a wrong amount. This is an accepted limit (`1_AGW.md` chapter 9). +- **Gas is never credited.** A failed action's gas was genuinely consumed. **A refund credit must not move any gas counter** — a permanent rule with its own test. +- **A native action counts three things**, all written after every gate passes: native value sent, the metered amount if the action has one, and calls. There is no credit-back and nothing to credit: a native call either succeeds or reverts inside one Push transaction, and a revert unwinds every counter with it. The credit-back path refuses to run against a native record. +## 1.6 What URP deliberately does not do +- **No expiry-distance ceiling.** It rejects the expired; it never rejects the distant-future. The user's chosen horizon is respected as given. +- **No deny-list.** Nothing rejects a function by name. If an owner allow-lists a token-approval function, that is permitted — and hands the agent spending power outside every cap. The product must warn; the contract will not refuse. Gate S15's forbidden programs are the Solana form of gate 14's loopbacks, not an exception: on Solana the token programs *are* the destination account's balances, so calling them directly with its signature is instructing that account directly. (An open question records whether this should change — `1_AGW.md` chapter 11.) +- **No direct destination-chain check.** The configured chain is stored but not compared at validation. The chain is pinned *transitively*: the one allowed token is a Push-side mirror specific to one origin chain, so fixing the token fixes the chain. A builder who notices the stored-but-unchecked field has found a known fact, not a bug. +- **No opinion about the owner.** URP runs only on the agent door. The owner's door never meets it. +- **No verification of Solana keys.** The destination account, its token accounts and the gateway program are 32-byte keys the owner commits; URP cannot run Solana's address derivation and does not try. A wrong key fails closed — the pins never match. +- **No bound on what an allow-listed Solana program does inside its own call.** Account pins bound *where value is delivered*; they cannot bound what a program the owner allow-listed takes from the accounts it is handed, because the destination account's signature carries into every call that program makes. The forbidden set guards the top-level target only. S18, the data pins and the fixed account count narrow this; the rest is trust in the allow-listed program's code — the same trust an EVM allow-list already expresses (`1_AGW.md` chapter 9). +- **No reading of Solana writable flags.** A pinned account passed read-only fails on Solana, not here. +- **No understanding of native calls.** The native rulebook compares words at positions; it does not know what a function does. A pinned argument is locked; an unpinned one is the agent's to choose. So allow-listing a token approval without pinning its spender hands the agent that approval — the native form of the no-deny-list rule. The SDK refuses to emit an unpinned approval (`1_AGW.md` chapter 10); the contract will not. +## 1.7 Which rulebook — how the kind is fixed, and locked three ways +- **The chain travels inside URP's initialisation data, and the kind is derived from it.** The engine passes each policy an opaque blob at grant; URP's blob is a chain identifier followed by the configuration body. URP hashes the chain, compares it to this chain's own identifier — computed from the chain id, never configured — and derives the kind exactly as the wallet did, from the same bytes. An empty chain produces a named error; a blob in any other shape reverts rather than mis-decoding. +- **For a universal permission URP derives one more thing: the destination family.** It reads the chain's namespace — the first seven bytes, `eip155:` or `solana:` — and chooses the EVM or the Solana configuration body and rulebook accordingly. Any other namespace is refused at grant with a named error, so a permission for a chain URP has no rulebook for can never be granted and then fail every request. The kind still comes from the full chain hash; the family is a second, narrower classification inside the universal kind, and URP never asks it of a native chain. The wallet does not derive the family at all: both universal families look identical to it — one action, the gateway's send. +- **URP writes a mode record beside the configuration** — initialised, which kind, and for a universal permission which destination family — and consults that record on every validation. It does not infer the kind from the data's shape, and it does not trust the request. Universal is the record's zero value, so an *empty* record cannot be told from a universal one by its kind field alone; the initialised flag is what is authoritative, and the mode field is meaningless without it. EVM is likewise the family's zero value, so a universal record whose family was never written is an EVM one — which is what every such record is. +- **A permission initialised as one kind can never be re-initialised as the other, or as itself.** The re-initialisation refusal reads the mode record and, beneath it, the universal configuration — so a universal configuration written before its mode record existed is still recognised, and is still protected. URP is upgradeable behind a proxy and its storage is append-only: the universal configuration, the credit-back set, the mode record, the native configuration and the Solana configuration each hold their own slot, and a later implementation may add state only after them. +- **The wallet and URP cannot disagree about the kind, because neither one authors it.** Both derive it from the same chain string in the same blob, with the same rule. The wallet reads that one field — and only that field, only after it has proven the policy is URP's — to choose which shape rules to apply; it still never inspects the terms, which remain URP's sole business. There is therefore no second author for the two to disagree with, and the grant event now reports a derived fact rather than a claim. +- **Three further layers remain, as defence in depth.** Gate 3 requires a universal request to target the gateway. Gate N3 refuses a native request that does. Native initialisation refuses a gateway target outright. Between them there is no shape in which a gateway call reaches a native record, and none in which a native call reaches a universal one. +- **And for a universal permission the chain is checked against the money** — identically for both families, which is what makes a Solana permission over an EVM chain's asset impossible to grant. At initialisation URP asks the asset which chain it came from — the same view the gateway reads on every outbound to decide where to route — and refuses the grant if it disagrees with the declared chain, or if the asset cannot answer. Because every request then pins that same asset, one check at grant makes the declared chain true for the permission's whole life, with no external call at validation time. +- **The mode is readable.** A getter returns the mode record — kind, family and chain — and never reverts; it is the documented first call for anything that does not already know a permission's kind. The universal EVM, universal Solana and native getters each revert, with the actual kind or family named, when asked about a record of another shape — a wrong-kind read is a caller bug — and each returns an all-zero record for an empty slot, which is a state, not an error. +## Diagram — the full agentic flow, Push Chain to an EVM chain, every gate +```mermaid +flowchart TB + subgraph OFF["Off-chain"] + AG["Agent builds the request\ +and calls the agent door itself"] + end + subgraph PUSH["Push Chain — one transaction"] + DOOR["Wallet: agent door\ +caller must be the permission's agent"] + ENG["Permission engine: look up the permission,\ +run its policies"] + subgraph GAUNTLET["URP — the gauntlet (any failure: revert, nothing spent)"] + G1["1 configured?"] --> G2["2 NOT EXPIRED"] --> G3["3 gateway only"] + G3 --> G4["4 send function only"] --> G5["5 the one token"] --> G6["6 per-action cap"] + G6 --> G7["7 lifetime cap"] --> G8["8 gas-value cap"] --> G9["9 gas-swap field non-zero"] + G9 --> G10["10 refunds come home"] --> G11["11 recipient EMPTY"] --> G12["12 instruction list only"] + G12 --> G13["13 at most ten entries"] + G13 --> G14["14 no loopbacks —\ +not the wallet, not URP, not the gateway,\ +not the destination account · BEFORE the allow-list"] + G14 --> G15["15 the allow-list + beneficiary:\ +target + function every entry,\ +beneficiary = destination account"] + G15 --> G16["16 per-entry value cap"] + end + SIGN["Session validator LAST:\ +the sender is the permission's agent"] + SPEND["URP records the spend\ +(before the bridge)"] + GW["Gateway: pulls the token,\ +emits the cross-chain message"] + end + subgraph FARC["Destination chain"] + DA["Destination account\ +runs each instruction as the user"] + PR["Allowed protocol\ +(the only reachable far-chain code)"] + end + EXE["Push Chain's executor module"] + + AG --> DOOR --> ENG --> G1 + G16 --> SIGN --> SPEND --> GW --> DA --> PR + DA -. "far-side failure: funds return" .-> EXE + EXE -. "credit the spend back\ +(module-only · once per tx id · never below zero)\ +DESIGNED — NOT YET FUNCTIONAL" .-> SPEND +``` +## Diagram — the native flow, every gate +```mermaid +flowchart TB + subgraph OFF["Off-chain"] + AG["Agent builds the request — one flat call —\ +and calls the agent door itself"] + end + subgraph PUSH["Push Chain — one transaction, start to finish"] + DOOR["Wallet: agent door\ +caller must be the permission's agent"] + ENG["Permission engine: identify the action by\ +(contract, function) — an ungranted pair dies here"] + subgraph NGATES["URP — the native gates (any failure: revert, nothing spent)"] + N1["N1 configured?"] --> N2["N2 NOT EXPIRED"] --> N3["N3 never the gateway"] + N3 --> N4["N4 the named contract\ +(record's own copy)"] --> N5["N5 the named function\ +value-only = EMPTY call data"] + N5 --> N6["N6 value caps\ +per call · lifetime"] + N6 --> N7["N7 every argument pin:\ +in bounds · exact 32-byte word"] + N7 --> N8["N8 metered amount:\ +in bounds · per call · lifetime"] + N8 --> N9["N9 call limit\ +(every call counts)"] + end + SIGN["Session validator LAST:\ +the sender is the permission's agent"] + METER["URP writes value · amount · calls\ +(all three, after every gate)"] + GUARD["Wallet refuses the wallet or the engine\ +as target, whatever the verdict"] + NP["The named Push contract\ +called by the WALLET, as itself"] + RES["Position · shares · claim →\ +credited to the wallet. Done."] + end + + AG --> DOOR --> ENG --> N1 + N9 --> SIGN --> METER --> GUARD --> NP --> RES +``` +## Diagram — the Solana flow, every gate +```mermaid +flowchart TB + subgraph OFF["Off-chain"] + AG["Agent builds the request — one Solana instruction —\ +and calls the agent door itself"] + end + subgraph PUSH["Push Chain — one transaction"] + DOOR["Wallet: agent door\ +caller must be the permission's agent"] + ENG["Permission engine: look up the permission,\ +run its policies"] + subgraph SGATES["URP — the Solana gauntlet (any failure: revert, nothing spent)"] + S1["S1–S10 = gates 1–10\ +configured · NOT EXPIRED · gateway · send ·\ +token · caps · gas · refunds home"] --> S6b["S6b amount fits 64 bits"] + S6b --> S11["S11 recipient = a 32-byte program"] --> S12["S12 one instruction,\ +parsed exactly"] + S12 --> S13["S13 execute only · bounded"] --> S14["S14 recipient = target program"] + S14 --> S15["S15 never a forbidden program —\ +system, token, stake, loader, lookup table,\ +gateway program, destination account · BEFORE the allow-list"] + S15 --> S16["S16 the allow-list:\ +(program, tag) exact match · account count"] + S16 --> S17["S17 account pins + data pins\ +(source · destination · authority ·\ +fee · slippage · price floor)"] + S17 --> S18["S18 value-holding accounts\ +only where pinned"] + end + SIGN["Session validator LAST:\ +the sender is the permission's agent"] + SPEND["URP records the spend"] + GW["Gateway: pulls the token,\ +emits the cross-chain message"] + end + subgraph SOL["Solana"] + DA["Destination account\ +(gateway PDA of the wallet) receives the funds"] + PR["The one allow-listed program,\ +called with the destination account signing"] + end + EXE["Push Chain's executor module"] + + AG --> DOOR --> ENG --> S1 + S18 --> SIGN --> SPEND --> GW --> DA --> PR + DA -. "far-side failure: funds return" .-> EXE + EXE -. "credit the spend back\ +DESIGNED — NOT YET FUNCTIONAL" .-> SPEND +``` +## Diagram — when things fail +```mermaid +flowchart TB + REQ["Agent request submitted"] + V{"Validation on Push Chain\ +(the agent check, gates 1–16, S1–S18 or N1–N9,\ +expiry, the session validator)"} + REV["Whole transaction reverts.\ +Nothing bridged, nothing spent,\ +counters unwound.\ +The agent paid gas — nothing else happened."] + OK["Dispatched through the gateway.\ +Spend recorded. Token bridged."] + NOK["Native: the Push contract was called.\ +Value · amount · calls recorded.\ +Complete — nothing in flight, nothing to credit."] + F{"Far-chain execution"} + DONE["Instructions ran as the user's account.\ +Proceeds sit in the user's destination account\ +(on Solana, its pinned token accounts)."] + FAIL["Far side failed.\ +Funds return via Push infrastructure."] + CREDIT["Executor module reports the failure to URP →\ +spent counter credited back.\ +DESIGNED — NOT YET FUNCTIONAL.\ +Until it lands: counter stays inflated;\ +remedy is revoke + regrant.\ +Gas is never credited — it was consumed."] + + REQ --> V + V -- "any gate fails" --> REV + V -- "all pass · native" --> NOK + V -- "all pass · universal" --> OK --> F + F -- "succeeds" --> DONE + F -- "fails" --> FAIL --> CREDIT +``` diff --git a/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/3_Universal_Flow.md b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/3_Universal_Flow.md new file mode 100644 index 00000000..652d5b79 --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/3_Universal_Flow.md @@ -0,0 +1,394 @@ +# Bob Lends 100 USDC — End-to-End Flow on Push Chain (Architecture v3) + +**Assumes:** the v3 contract set is live — `AGWFactory` + `AGW` + `SmartSession` (adopted) + `URP` + `AgentValidator`. + +**Bob's intent:** *"Find the best-yielding stablecoin lending vault and deploy 100 USDC into it."* + +> **This is one of the two agentic workflows v3 supports — the UNIVERSAL one.** Bob's agent acts on a *far* chain, through Push Chain's gateway, under a `UNIVERSAL` rules set. The other workflow — the agent acting on *Push Chain itself*, under a `NATIVE` rules set, with no gateway and no far side — is walked in `4_Native_Flow.md`. The wallet, the engine, URP and the validator are the same contracts in both; what differs is the kind of rules set Bob grants, which of URP's rulebooks runs, and where the money ends up. Both kinds may live on one wallet at once. +> +> **Bob's far chain here is an EVM chain.** A universal rules set for Solana walks the same seven stages through the same contracts; what changes is inside URP. The `solana:` namespace selects URP's Solana rulebook instead of the EVM one, the payload is a single program instruction instead of an instruction list, and account and data pins take the place of beneficiary offsets. `2_UniversalRulesPolicy.md` §1.2c and §1.4c walk it gate by gate. + +> **⚠ THIS DOCUMENT IS v3. It supersedes every earlier flow description.** +> If anything you read elsewhere in this repo contradicts this file, this file wins. In particular: **there is no OutboundExecutor module, no wallet-level "provider" slot, no guardian, no pause on any wallet, and no in-place editing of a granted permission.** *(The factory alone has a pause, and it only blocks new wallet creation.)* The companion document `1_AGW.md` carries the full reasoning. + +--- + +## Cast + +| Handle | What it is | Where | +| --- | --- | --- | +| `0xbob` | Bob's EOA — holds USDC | Ethereum | +| `0xbobuea` | Bob's Universal Executor Account — his identity | Push Chain | +| `0xbobagw` | Bob's **agent wallet** — holds the budgeted funds, owned by `0xbobuea`. **One of several Bob may own** | Push Chain | +| `0xbobagwcea` | `0xbobagw`'s Chain Executor Account — the execution hand | Ethereum | +| `0xagent` | The agent's **Push address** — its own EOA, or the UEA of an external key (EVM, Solana, …). It calls the agent door itself | Push Chain | +| `AGWFactory` | Deploys agent wallets at predictable addresses; the registry of record | Push Chain | +| `SmartSession` | The adopted permission engine — the wallet's only installed module | Push Chain | +| `URP` | Universal Rules Policy — **the only contract that inspects what the agent really does on the far chain.** Its universal EVM rulebook runs here; its Solana rulebook is in `2_UniversalRulesPolicy.md` §1.4c, its native rulebook is the other document's subject | Push Chain | +| `AgentValidator` | Stateless sender validator — confirms the sender is the agent. **Never installed** — named inside each permission | Push Chain | +| `UniversalGatewayPC` | The frozen outbound gateway — the only thing a **universal** agent action may call, and the one thing a native action never may | Push Chain | + +All of Bob's addresses are **deterministic and computable before anything is deployed.** + +**Not in v3, and deliberately absent from this flow:** any executor module (module type 2 is refused by the wallet), any hook or fallback module, any job/escrow/evaluator layer, any fee split. Those are separate product concerns with no contract in the v3 set. + +--- + +## STAGE 1 — Intent capture *(off-chain, zero transactions)* + +- Bob types his intent. The tooling resolves `0xbobuea`, and — critically — **asks Bob a v3-specific question**: + + > *"Put this in a **new** agent wallet, or add it as another rules set on an **existing** one?"* + + A new wallet is a new blast-radius boundary and a new account on every external chain. An extra rules set on an existing wallet shares the pool and the accounts. **This choice is Bob's, and it exists only in v3** (Rule 1). + +- The tooling also settles the rules set's **kind** from the intent, and it is not a question Bob is asked: the vaults are on Ethereum, so this is a `UNIVERSAL` rules set — gateway, bridge, destination account. Had the vault been on Push Chain, it would be `NATIVE`, and the rest of this document would read as the other one does. + +- Bob chooses a new wallet. The tooling derives `0xbobagw` from `(owner, index)` via `AGWFactory.predictWallet`, then derives `0xbobagwcea` from it — **before either exists**. +- The tooling composes the rules set. Every line below becomes an on-chain policy parameter inside URP: + + | | | + | --- | --- | + | Capital | 100 USDC into a wallet only Bob can withdraw from | + | Agent may call | `supply()` on Aave v3 / Morpho Blue / Spark — Ethereum only | + | Ceiling | 100 USDC lifetime, 100 USDC per action | + | Gas ceiling | a bounded amount of PC per action | + | Expires | 60 minutes — **an explicit, non-zero value**; URP rejects a zero or past expiry at grant | + | Beneficiary | forced to `0xbobagwcea` — derived, never typed | + | Revoke | instantly, one signature, unblockable | + +- **Argument offsets are generated from each protocol's ABI by tooling, never hand-typed** — a wrong offset silently disarms the beneficiary check. +- The tooling calls `AgentValidator.validateConfig` on the agent config, and shows Bob the resolved `0xbobagwcea` and whether it is deployed yet. +- Bob reviews and approves. **This is the last human decision point.** + +--- + +## STAGE 2 — One signature on Ethereum + +**💰 FUND MOVEMENT #1 — USDC leaves Bob's wallet** + +- Bob signs a single EIP-712 payload in his own wallet. +- `UniversalGateway.sendUniversalTx()` on Ethereum locks **100 USDC** into the Vault, takes a small extra amount auto-swapped to $PC for gas, and carries the Push Chain payload. + +``` +0xbob ──100 USDC──▶ UniversalGateway (Ethereum) [LOCKED] +``` + +- **Bob needs no $PC, never visits Push Chain, and signs exactly once.** + +--- + +## STAGE 3 — Inbound: identity, wallet, rules set — one atomic multicall + +- Universal Validators observe the Ethereum event → ballot reaches quorum → `x/uexecutor` dispatches: + - `UEAFactory.deployUEA()` → **`0xbobuea` created** (first time only) + - gas auto-swapped to $PC, UEA credited + - **100 pUSDC minted to `0xbobuea`** + - `0xbobuea.executeUniversalTx(payload, sig)` → signature verified → multicall runs + +**💰 FUND MOVEMENT #2 — 100 USDC arrives as 100 pUSDC** + +### The multicall, step by step + +| # | Call | Effect | +| --- | --- | --- | +| 1 | `AGWFactory.deployWallet("lending")` | **`0xbobagw` deployed** at the predicted address; owner = `0xbobuea`, baked into bytecode. **Inside the same call the factory invokes `initializeAccount()`, which installs SmartSession** — atomic, no uninitialised state | +| 2 | `0xbobagw.grantRules(session)` | 🔑 **RULES GRANTED** — see below | +| 3 | `pUSDC.transfer(0xbobagw, 100e6)` | 💰 funds → the agent wallet | +| 4 | `PC.transfer(0xbobagw, …)` | ⛽ the wallet needs its own PC — it pays for the outbound gas swap | + +**There is no `installModule(2, OutboundExecutor)` step.** v3 supports **module type 1 only**. The wallet calls the gateway itself; nothing else is installed, ever. + +### 🔑 The rules set grant (step 2) in detail + +`grantRules` takes **one argument**. Nobody tells it what kind of rules set this is: it reads the **chain** the policy envelope declares, and derives the kind from that. Sepolia is not Push, so this is a `UNIVERSAL` rules set — one that leaves the chain through the gateway. URP then reads the namespace: `eip155:` means an EVM destination and URP's EVM rulebook (`solana:` would select its Solana rulebook). The wallet makes no such distinction; to it, both are the same one-action gateway rules set. + +It then does exactly three things: it **overwrites the salt** with the wallet's own monotonic `grantNonce`, it **enforces the canonical session shape** for the derived kind, and it **asserts that kind against the action** — under `UNIVERSAL`, exactly one action, and it must be the gateway's outbound send. A wrong policy, an extra action or a stray user-op policy reverts `MalformedSessionShape`; a target that is wrong *for the kind* — anything but the gateway here — reverts `RulesTypeMismatch(UNIVERSAL, 0, target)`, naming what was tried. + +**Why the chain and not a flag.** Bob is choosing a chain, a contract, some functions and a budget. The kind of rules set that implies is a *consequence*, not a fifth decision — so the system computes it rather than asking. It used to be declared twice, once to the wallet and once inside the policy data, with nothing comparing the two at grant; a mismatch produced a rules set that looked granted, described itself wrongly in its own event, and died at first use. + +``` +sessionValidator = AgentValidator +sessionValidatorInitData = abi.encode(0xagent) ← the agent's Push address +salt = bytes32(grantNonce++) ← WALLET-SUPPLIED, never the caller's + +userOpPolicies: [ ] ← ALWAYS EMPTY (that class has a floor of zero) +erc7739Policies: [ ] ← ALWAYS EMPTY +permitERC4337Paymaster: false ← ALWAYS FALSE + +actions: [ EXACTLY ONE — the UNIVERSAL shape ] + actionTarget = UniversalGatewayPC + actionTargetSelector = sendUniversalTxOutbound.selector + actionPolicies: [ URP AND ONLY URP ] + initData = (version = 1, chainNamespace = "eip155:11155111", body = ↓) ← THE CHAIN. Not Push ⇒ UNIVERSAL; eip155: ⇒ EVM rulebook. + validUntil = now + 60 min ← THE EXPIRY LIVES INSIDE URP + expectedCEA = 0xbobagwcea ← DERIVED at grant, committed forever + assets = [ { token: PRC20_USDC, maxPerCall: 100e6, maxTotal: 100e6 } ] + ← 1..8 tokens; EACH checked AT GRANT against the declared chain + maxGasPerCall = ← PC per outbound: protocol fee + gas swap + allowedCalls = { Aave v3, Morpho Blue, Spark } × { supply } + beneficiary offsets +``` + +**The chain is not just a label — it is checked against the money.** When URP writes this config it asks the asset itself which chain it came from (`PRC20_USDC.SOURCE_CHAIN_NAMESPACE()`, the very view the gateway reads on every outbound to decide where to route) and **refuses the grant** if that disagrees with the declared chain (`ChainMismatch`), or if the asset cannot answer at all (`InvalidAsset`). So Bob cannot accidentally authorise "Sepolia" while funding the rules set with a token bound somewhere else. And because gate 5 pins the token on every request, that one check at grant makes the chain true for the rules set's whole life — with no extra work at execution time. + +**Why URP is the *only* action policy.** The engine requires at least one action policy per action. With URP as the only one, **removing URP leaves zero policies and every request dies**. Add a second policy — a separate time-window policy, say — and that property is gone: stripping URP would leave one policy standing and the request would pass. **This is why the expiry lives inside URP and not in a policy of its own.** + +**The rules set identity.** `permissionId = keccak256(sessionValidator, initData, salt)`. Because the wallet supplies the salt, granting byte-identical terms twice yields two independent rules sets. Because the agent config is in the hash, **the agent cannot be swapped inside a rules set — a different agent is a different rules set** (Rule 4). + +**What the agent can do:** exactly one function, on exactly one Push contract, for one asset, up to two ceilings, into three possible pools, until the expiry, with the beneficiary forced to Bob's own CEA. + +**What it cannot do:** move funds anywhere else · call any other contract · redirect the position · exceed either cap · act after expiry · install or remove modules · call the wallet, URP, the gateway, **or `0xbobagwcea` itself** · touch `0xbobuea` · grant or extend anything · **call anything on Push Chain directly** — that is what a `NATIVE` rules set is for, and this one is not that. + +### State after Stage 3 + +``` +0xbobuea : 0 pUSDC ← identity only, clean +0xbobagw : 100 pUSDC + PC ← owned by 0xbobuea; one rules set live +URP.assets[0].spent : 0 +``` + +**Bob signed once. He has an identity, an agent wallet, a bounded rules set, and zero exposure beyond 100 USDC.** + +--- + +## STAGE 4 — The agent works *(off-chain, no funds move)* + +- The agent's runtime researches yields off-chain → **Morpho Blue USDC vault, 5.2% APY**. +- It composes the request as **four nested layers**, innermost first: + +``` +Layer 4 the far-chain call supply(USDC, 100e6, 0xbobagwcea, 0) +Layer 3 the instruction list Multicall[] — 1 to 10 entries, mandatory envelope +Layer 2 the gateway request token, amount, EMPTY recipient, revertRecipient = 0xbobagw, + non-zero maxPCForGas, payload = layer 3 +Layer 1 the execution payload one single call: target = the gateway, value = PC for far-side gas +``` + +- **It composes instructions; it does not move money.** It signs nothing for the wallet: its authority is being the sender. + +--- + +## STAGE 5 — Execution via the agent door + +**🔑 THE AGENT ACTS — the only time it acts in the entire lifecycle** + +- The agent **cannot** call `UniversalGatewayPC` itself. If it did, `msg.sender` would be the agent, the Vault would derive the *agent's* CEA, and the agent would hold Bob's position. Structurally blocked. +- Instead it calls **Bob's wallet** itself — from `0xagent`, or, for an external key, by driving its UEA, which verifies that key and then calls the wallet. + +> **The caller is the authority.** +> `executeAsAgent` admits only the agent the named rules set records. Anyone else — Bob included — is refused `CallerIsNotAgent` before the engine runs. There is no signature and no relayer: the agent pays the Push gas itself (an EOA from its own PC balance, a UEA through its gas path) — a separate balance from the wallet's. + +``` +0xagent + └─▶ 0xbobagw.executeAsAgent(rulesId, mode, execCalldata) + │ + │ ── THE WALLET DOES THE ENTRYPOINT'S JOBS ITSELF (Push Chain has none) ── + ├─ 1. session engine still installed? ✓ + ├─ 2. msg.sender == agentOf(rulesId)? else CallerIsNotAgent — before the engine runs + ├─ 3. build PackedUserOperation in memory (ABI shape only) + │ sender = address(this) · paymasterAndData = "" · gas fields and nonce zeroed + │ signature = USE ‖ rulesId ‖ msg.sender ← written by the wallet, never supplied + │ + └─▶ SmartSession.validateUserOp + ├─ permission enabled? + ├─ URP.checkAction ── reads the mode record: UNIVERSAL · EVM ── + │ ── the 16-gate gauntlet, in order ── + │ 1 configured · 2 NOT EXPIRED · 3 gateway only · 4 send selector + │ 5 token == USDC · 6 per-call cap · 7 lifetime cap · 8 PC value cap + │ 9 maxPCForGas != 0 · 10 revertRecipient == wallet · 11 recipient EMPTY + │ 12 multicall envelope · 13 1..10 entries + │ per entry: 14 not wallet/URP/gateway/CEA ← beats the allow-list + │ 15 (target, selector) allow-listed + beneficiary == 0xbobagwcea + │ 16 per-entry value cap + │ EFFECTS LAST: spent += amount · emit OutboundMetered + │ + └─ AgentValidator.validateSignatureWithData ← LAST, after every policy + the 20 bytes the wallet wrote == the agent stored in the rules set? + │ + ├─ 4. the wallet enforces the verdict itself (authorizer, validAfter/validUntil) + ├─ 5. the wallet refuses itself and the engine as target, whatever the verdict + ├─▶ 6. dispatch THE EXACT VALIDATED BYTES ──▶ UniversalGatewayPC.sendUniversalTxOutbound + │ ▲ + │ msg.sender == 0xbobagw + │ ← decides which CEA executes + └─ 7. emit RulesActionAuthorized(rulesId, 0xagent, keccak256(execCalldata)) +``` + +- **Any single gate failing reverts the whole transaction** — counters, everything. A failed action costs the agent gas and changes nothing else. The agent's runtime is never trusted; URP is the trust boundary. +- **Replay** is the sender's own nonce — the EOA's, or the UEA payload's. The wallet keeps no agent replay state: the same call sent twice is two actions, each checked and metered. +- **Ordering note that looks wrong and is not:** the engine consults the session validator **after** the policies. The wallet has already checked the caller, but every policy, forever, must still be safe against arbitrary calldata the engine has not yet authenticated. URP is safe by construction: no external calls, effects last, revert on every failure. + +### 💰 FUND MOVEMENT #3 — 100 pUSDC burns on Push Chain + +``` +0xbobagw [100 pUSDC] ──BURN──▶ ∅ emit UniversalTxOutbound(sender = 0xbobagw, …) +URP.assets[0].spent: 0 → 100e6 emit OutboundMetered(..., token, amount) ← the correlation record +``` + +--- + +## STAGE 6 — Cross-chain settlement + +- `PostTxProcessing` creates a pending outbound; Universal Validators produce a **DKLS23 threshold signature**; TSS calls `Vault.finalizeUniversalTx(pushAccount = 0xbobagw, …)` on Ethereum. + +### 💰 FUND MOVEMENT #4 — 100 USDC released to the wallet's CEA + +- Vault: `getCEAForPushAccount(0xbobagw)` → not deployed → **deploys `0xbobagwcea`** (first contact) +- Vault: `USDC.safeTransfer(0xbobagwcea, 100e6)` +- Vault: `CEA.executeUniversalTx(..., originCaller = 0xbobagw, payload)` → checks `originCaller == pushAccount` ✓ → runs the instruction list: + +| # | Call | Result | +| --- | --- | --- | +| 1 | `USDC.approve(MORPHO_BLUE, 100e6)` | allowance set | +| 2 | `MORPHO_BLUE.supply(USDC, 100e6, 0xbobagwcea, 0)` | **deposit executed** | + +### 🎯 What Morpho sees + +``` +msg.sender = 0xbobagwcea · onBehalfOf = 0xbobagwcea · shares → 0xbobagwcea +``` + +**The agent appears nowhere.** It never held a cent, never appeared as depositor, and cannot withdraw. + +### If the far side fails + +- Funds return to `0xbobagw` — because URP pinned `revertRecipient` to the wallet, gate 10. +- Push's Universal Executor Module then calls `URP.creditRevert(...)`, which reduces `spent` — **module-only, once per outbound id, saturating**. +- **STATUS: designed and shipped, NOT YET FUNCTIONAL** — the Push-core callback has not landed. Until it does, a failed far leg leaves `spent` inflated and the remedy is revoke-and-regrant. **Gas is never credited back; it was genuinely consumed.** + +--- + +## STAGE 7 — After the action + +### The control chain — transitive, and single-parent at every hop + +``` +0xbobuea ──owns──▶ 0xbobagw ──is pushAccount of──▶ 0xbobagwcea + (identity) (agent wallet) (Ethereum hand) +``` + +- **The UEA cannot command the CEA directly.** To withdraw from Morpho, `0xbobuea` calls `0xbobagw.execute(...)`, which originates an outbound, which the TSS routes to `0xbobagwcea`. Always two hops. +- **The agent cannot withdraw** — `withdraw()` is not in the allow-list, so the owner path is the only exit by construction. +- **The CEA has no independent security.** It is a projection of the agent wallet, not a second line of defence. + +| Actor | Can do | Cannot do | +| --- | --- | --- | +| **`0xbobuea`** (Bob) | anything, unconditionally — withdraw anywhere, revoke, replace a rules set, install/uninstall a validator | — | +| **`0xagent`** | exactly what the rules set permits, until expiry | everything else | +| **Push governance** | — | reach `0xbobagwcea`; the only path in is a TSS outbound originating from `0xbobagw` | + +### The owner's three operations, in full + +- **Withdraw** — `execute([...])`. **There is no `withdraw()` function**; the owner path *is* withdrawal, with no destination restriction and no policy in the path. It must succeed in every degraded state — zero rules sets, engine uninstalled, hostile validator installed. +- **Revoke** — `revokeRules(pid)` (existence-checked, so a typo reverts loudly instead of silently "succeeding") or `revokeAllRules()`. Immediate on Push, unblockable, no callbacks on the path. **One honest limit:** an instruction already dispatched across the bridge still completes. +- **Change a rules set** — **it cannot be edited.** A change is one owner transaction batching: `URP.assertSpent(expected[] — one per token)` → `revokeRules(old)` → `grantRules(new)`. If the agent spent in the composition window, the assertion reverts the whole change. **Counters restart at zero on the new rules set**, and any request for the old id is dead: removal cleared its agent, and the new rules set has a new id. +- **Every one of these advances the wallet's checkpoint counter** — one tick per owner-door call, per grant and per revoked id — so a job's evaluator can tell the owner acted. Agent actions never move it. + +### STAGE 7b — the second action, and why it may carry zero USDC + +- Bob's agent later wants to move the position from Morpho into Aave. **No new USDC is bridged** — the capital is already at `0xbobagwcea`. +- So the outbound carries `amount == 0` with a payload of allow-listed instructions. **v3 permits this**; `spent` does not move, because the lifetime cap counts what is **bridged**, not what is **redeployed**. +- The exposure is bounded elsewhere: the per-call PC ceiling, the requirement that every instruction be allow-listed, and the wallet's own small PC balance. + +--- + +## Fund movement — the whole ledger + +| # | Stage | Movement | Amount | +| --- | --- | --- | --- | +| 1 | 2 | `0xbob` → UniversalGateway (Ethereum) | 100 USDC locked | +| 2 | 3 | mint on Push Chain → `0xbobuea` | 100 pUSDC | +| 3 | 3 | `0xbobuea` → `0xbobagw` | 100 pUSDC + PC for gas | +| 4 | 5 | `0xbobagw` burn | −100 pUSDC | +| 5 | 6 | Ethereum Vault → `0xbobagwcea` | 100 USDC | +| 6 | 6 | `0xbobagwcea` → Morpho Blue | 100 USDC → vault shares | + +**The agent never appears as a holder in any row.** + +--- + +## Diagram + +``` + ┌─────────────────────────────────────────┐ + STAGE 1 intent │ Bob: "best stablecoin yield, 100 USDC" │ + (off-chain) └──────────────────┬──────────────────────┘ + │ NEW wallet or EXISTING? ← v3 choice + │ derive addresses · compose rules set + ▼ + ┌───────────────────┐ + │ Bob approves │ ← last human decision + │ ONE SIGNATURE │ + └─────────┬─────────┘ +═══════ ETHEREUM ═══════════════════════════════════════│═══════════════════════════════ + STAGE 2 ▼ + 0xbob ──────100 USDC──────▶ UniversalGateway ────[LOCKED in Vault] + │ emit UniversalTx +═══════ PUSH CHAIN ═════════════════════│═══════════════════════════════════════════════ + STAGE 3 ▼ + Universal Validators ──vote──▶ quorum ──▶ x/uexecutor + │ + ┌─────────────────────────────────────┘ + ▼ + deploy 0xbobuea + mint 100 pUSDC + credit gas + │ + │ ONE ATOMIC MULTICALL + ├──1─▶ AGWFactory.deployWallet → 0xbobagw (owner baked in) + │ └─ factory calls initializeAccount() → SmartSession installed + │ NO executor module · NO hook · NO fallback + ├──2─▶ 🔑 grantRules(session) — kind DERIVED from the chain, + │ salt from grantNonce, shape enforced + │ URP: expiry · asset · caps · allow-list · expectedCEA + ├──3─▶ 💰 100 pUSDC ──▶ 0xbobagw + └──4─▶ ⛽ PC ──▶ 0xbobagw (pays its own outbound gas swap) + + STAGE 4 agent researches off-chain · composes 4 nested layers + │ + STAGE 5 ▼ + 0xagent calls ──▶ 0xbobagw.executeAsAgent(rulesId, …) + │ + ┌───────────┴────────────────────────┐ + │ WALLET: engine installed · │ + │ caller == the agent · userOp │ + ├────────────────────────────────────┤ + │ URP: 16 gates, fail closed │ + │ gateway only · asset · caps │ + │ recipient EMPTY · refund → wallet │ + │ ≤10 entries · NOT the CEA │ + │ allow-list · beneficiary == CEA │ + ├────────────────────────────────────┤ + │ SENDER CHECKED AGAIN, LAST │ + └───────────┬────────────────────────┘ + ▼ + UniversalGatewayPC.sendUniversalTxOutbound + 💰 BURN 100 pUSDC (msg.sender = 0xbobagw) + │ + Universal Validators ──▶ DKLS23 TSS signature +═══════ ETHEREUM ═══════════════│═══════════════════════════════════════════════════════ + STAGE 6 ▼ + Vault.finalizeUniversalTx(pushAccount = 0xbobagw) + ├─▶ deploy 0xbobagwcea (first contact) + ├─▶ 💰 100 USDC ──▶ 0xbobagwcea + └─▶ CEA multicall: approve + supply + │ + ┌───────────────▼────────────────┐ + │ MORPHO BLUE │ + │ msg.sender = 0xbobagwcea │ + │ shares → 0xbobagwcea │ + │ the agent appears NOWHERE │ + └────────────────────────────────┘ +``` + +--- + +## The five things to remember + +1. **One signature — and the wallet is Bob's forever.** Identity, wallet, rules set and funding land atomically. The wallet's owner is baked into its bytecode at creation and can never be reassigned. +2. **The agent authorises; it never holds.** It triggers one function under sixteen simultaneous gates. Funds move only from Bob's own accounts, only to Bob's own CEA. +3. **The caller is the authority.** `executeAsAgent` admits only the agent the rules set names; an external key acts through its UEA, which verifies the key. There is no bearer request and no relayer. +4. **`msg.sender` at the gateway decides everything.** Because `0xbobagw` originates the outbound, the CEA is Bob's — so Morpho credits Bob. Had the agent originated it, the position would have been the agent's. **That single fact is the design.** +5. **URP is the only contract that can see what the agent is really doing.** To the engine, every universal agent action looks identical — the wallet calling the gateway. Everything Bob actually cares about lives two decode levels down, and URP is what opens it. Remove URP and the rules set enforces nothing. + +--- + +*This document walked the universal workflow. For the same wallet, the same engine and the same URP running a Push-native rules set — no gateway, no bridge, no destination account, the agent's every argument pinned by the owner — read `4_Native_Flow.md`.* diff --git a/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/4_Native_Flow.md b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/4_Native_Flow.md new file mode 100644 index 00000000..e78da6f1 --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/4_Native_Flow.md @@ -0,0 +1,422 @@ +# Bob Stakes 100 USDC on Push Chain — End-to-End Native Flow (Architecture v3) + +**Assumes:** the v3 contract set is live — `AGWFactory` + `AGW` + `SmartSession` (adopted) + `URP` + `AgentValidator`. + +**Bob's intent:** *"Put 100 USDC to work in a Push-native staking vault and let an agent manage the position — stake, claim, compound — without ever holding my keys."* + +> **This is one of the two agentic workflows v3 supports — the PUSH-NATIVE one.** Bob's agent acts on *Push Chain itself*, calling a Push contract directly from Bob's wallet, under a `NATIVE` rules set. There is no gateway, no bridge, no far chain and no destination account anywhere in this document. The other workflow — the agent acting on a *far* chain through the gateway, under a `UNIVERSAL` rules set — is walked in `3_Universal_Flow.md`. The wallet, the engine, URP and the validator are the same contracts in both; what differs is the kind of rules set Bob grants, which of URP's rulebooks runs — native here; for a universal rules set, the EVM or the Solana one, according to the far chain — and where the money ends up. Both kinds may live on one wallet at once. + +> **⚠ THIS DOCUMENT IS v3.** If anything you read elsewhere in this repo contradicts this file, this file wins. In particular: **there is no OutboundExecutor module, no wallet-level "provider" slot, no guardian, no pause on any wallet, and no in-place editing of a granted permission.** The companion document `1_AGW.md` carries the full reasoning. + +--- + +## Cast + +| Handle | What it is | Where | +| --- | --- | --- | +| `0xbob` | Bob's EOA — holds USDC | Ethereum | +| `0xbobuea` | Bob's Universal Executor Account — his identity | Push Chain | +| `0xbobagw` | Bob's **agent wallet** — holds the budgeted funds, owned by `0xbobuea`. **One of several Bob may own** | Push Chain | +| `0xagent` | The agent's **Push address** — its own EOA, or the UEA of an external key (EVM, Solana, …). It calls the agent door itself | Push Chain | +| `0xpushstake` | **The Push-native protocol** — a staking vault on Push Chain. Any contract Bob chooses to name; nothing about it is built, adopted or trusted | Push Chain | +| `pUSDC` | Bob's USDC, as it exists on Push Chain | Push Chain | +| `AGWFactory` | Deploys agent wallets at predictable addresses; the registry of record | Push Chain | +| `SmartSession` | The adopted permission engine — the wallet's only installed module | Push Chain | +| `URP` | Universal Rules Policy — **the only contract that checks how the agent calls a Push contract: which arguments, how much value, how many times.** Its native rulebook runs here | Push Chain | +| `AgentValidator` | Stateless sender validator — confirms the sender is the agent. **Never installed** — named inside each permission | Push Chain | + +**Deliberately absent from this cast, and from every stage below:** `UniversalGatewayPC` and `0xbobagwcea`. A native rules set may never name the gateway — the wallet refuses it at grant and URP refuses it again at validation — and without the gateway there is no outbound, no TSS, no destination account and no far side. **Everything in this document happens on Push Chain, and every agent action is one Push transaction, start to finish.** + +**Not in v3, and deliberately absent from this flow:** any executor module (module type 2 is refused by the wallet), any hook or fallback module, any job/escrow/evaluator layer, any fee split. + +--- + +## STAGE 1 — Intent capture *(off-chain, zero transactions)* + +- Bob types his intent. The tooling resolves `0xbobuea`, and asks Bob the v3 question: + + > *"Put this in a **new** agent wallet, or add it as another rules set on an **existing** one?"* + + A new wallet is a new blast-radius boundary. An extra rules set on an existing wallet shares the pool. **This choice is Bob's** (Rule 1). + +- The tooling also settles the rules set's **kind** from the intent, and it is not a question Bob is asked: the vault is on Push Chain, so this is a `NATIVE` rules set — the wallet calls `0xpushstake` directly, as itself. Had the vault been on Ethereum, it would be `UNIVERSAL`, and the rest of this document would read as the other one does. + +- Bob chooses a new wallet. The tooling derives `0xbobagw` from `(owner, index)` via `AGWFactory.predictWallet` — **before it exists**. There is no second address to derive: a native rules set has no far-chain hand. + +- The tooling composes the rules set. A native rules set is **one to eight actions**, each a `(contract, function)` pair with its own rulebook. Bob's has five: + + | # | Agent may call | Pinned arguments | Caps | Call limit | + | --- | --- | --- | --- | --- | + | 1 | `0xpushstake.stakeFor(beneficiary, amount)` | `beneficiary` **= `0xbobagw`** — forced, never typed | `amount` ≤ 50 pUSDC per call, 60 pUSDC lifetime | unlimited | + | 2 | `0xpushstake.unstake()` | — | — | **2** | + | 3 | `0xpushstake.claim()` | — | — | unlimited | + | 4 | `0xpushstake.depositFor(beneficiary)` *payable* | `beneficiary` **= `0xbobagw`** | ≤ 5 PC per call, 20 PC lifetime | unlimited | + | 5 | a bare PC transfer to `0xpushstake` — **value-only, empty calldata** | — | ≤ 5 PC per call, 20 PC lifetime | unlimited | + + | | | + | --- | --- | + | Capital | 100 pUSDC in a wallet only Bob can withdraw from | + | Expires | 7 days — **an explicit, non-zero value**; URP rejects a zero or past expiry at grant | + | Revoke | instantly, one signature, unblockable | + +- **Argument pins — the position and the exact 32-byte word — are generated from `0xpushstake`'s ABI by tooling, never hand-typed.** A wrong position fails closed (the word will never match); a *missing* pin fails open (that argument is the agent's to choose). Note what is **not** granted: `pUSDC.approve`. Bob approves the vault himself, once, through the owner door in Stage 3. Had the agent needed an approval, the SDK would have insisted on pinning the spender — an unpinned approval is the native form of allow-listing `approve` on the far chain. +- The tooling calls `AgentValidator.validateConfig` on the agent config, and shows Bob the five actions in human terms — contract, function, every pin, every cap, and that **a call limit is consumed by any successful call, even one that moves nothing**. +- Bob reviews and approves. **This is the last human decision point.** + +--- + +## STAGE 2 — One signature on Ethereum + +**💰 FUND MOVEMENT #1 — USDC leaves Bob's wallet** + +- Bob signs a single EIP-712 payload in his own wallet. +- `UniversalGateway.sendUniversalTx()` on Ethereum locks **100 USDC** into the Vault, takes a small extra amount auto-swapped to $PC for gas, and carries the Push Chain payload. + +``` +0xbob ──100 USDC──▶ UniversalGateway (Ethereum) [LOCKED] +``` + +- **Bob needs no $PC, never visits Push Chain, and signs exactly once.** This is the only moment the gateway appears in this document — on the way *in*, funding Bob. The agent will never touch it. + +--- + +## STAGE 3 — Inbound: identity, wallet, rules set, approval — one atomic multicall + +- Universal Validators observe the Ethereum event → ballot reaches quorum → `x/uexecutor` dispatches: + - `UEAFactory.deployUEA()` → **`0xbobuea` created** (first time only) + - gas auto-swapped to $PC, UEA credited + - **100 pUSDC minted to `0xbobuea`** + - `0xbobuea.executeUniversalTx(payload, sig)` → signature verified → multicall runs + +**💰 FUND MOVEMENT #2 — 100 USDC arrives as 100 pUSDC** + +### The multicall, step by step + +| # | Call | Effect | +| --- | --- | --- | +| 1 | `AGWFactory.deployWallet("staking")` | **`0xbobagw` deployed** at the predicted address; owner = `0xbobuea`, baked into bytecode. **Inside the same call the factory invokes `initializeAccount()`, which installs SmartSession** — atomic, no uninitialised state | +| 2 | `0xbobagw.grantRules(session)` | 🔑 **RULES GRANTED** — see below | +| 3 | `pUSDC.transfer(0xbobagw, 100e6)` | 💰 funds → the agent wallet | +| 4 | `PC.transfer(0xbobagw, …)` | ⛽ PC for the two payable actions — the wallet's own value, capped per action by URP | +| 5 | `0xbobagw.execute(pUSDC.approve(0xpushstake, 100e6))` | 🔓 **the owner approves the vault, through the owner door.** No policy in the path — the owner may do anything. The agent was never granted `approve` | + +**There is no `installModule(2, OutboundExecutor)` step.** v3 supports **module type 1 only**. The wallet calls the vault itself; nothing else is installed, ever. + +### 🔑 The rules set grant (step 2) in detail + +`grantRules` takes **one argument**. Nobody tells it what kind of rules set this is: it reads the **chain** each action's policy envelope declares, and derives the kind from that. These actions declare Push's own chain, so this is a `NATIVE` rules set — one that never leaves the chain. + +It then does exactly three things: it **overwrites the salt** with the wallet's own monotonic `grantNonce`, it **enforces the canonical session shape** for the derived kind, and it **asserts that kind against every action** — under `NATIVE`, one to eight actions, none of them the gateway. + +**Every action must name the same chain**, or the grant reverts `InconsistentChain(i)` naming the odd one out. That is what makes a mixed rules set *unrepresentable* rather than merely forbidden: one chain per rules set means one kind per rules set, so there is no shape in which a cross-chain action could hide among Push-side ones. + +``` +sessionValidator = AgentValidator +sessionValidatorInitData = abi.encode(0xagent) ← the agent's Push address +salt = bytes32(grantNonce++) ← WALLET-SUPPLIED, never the caller's + +userOpPolicies: [ ] ← ALWAYS EMPTY (that class has a floor of zero) +erc7739Policies: [ ] ← ALWAYS EMPTY +permitERC4337Paymaster: false ← ALWAYS FALSE + +actions: [ ONE TO EIGHT — the NATIVE shape; five here ] + + [0] actionTarget = 0xpushstake · actionTargetSelector = stakeFor.selector + actionPolicies: [ URP AND ONLY URP ] + initData = (chainNamespace = "eip155:42101", body = ↓) ← THIS chain ⇒ NATIVE + validUntil = now + 7 days ← THE EXPIRY LIVES INSIDE URP, per action + target, selector = 0xpushstake, stakeFor ← defensive copies, asserted again at N4/N5 + pins = [ { offset 4, expected = 0xbobagw } ] ← the beneficiary, FORCED + amount = { on, offset 36, maxPerCall 50e6, maxTotal 60e6 } + maxValuePerCall = 0 · maxValueTotal = 0 ← stakeFor is not payable + maxCalls = 0 ← zero means UNLIMITED + + [1] unstake() — no pins, no amount, maxCalls = 2 + [2] claim() — no pins, no amount, no value, no limit: the strictest shape there is — + only the expiry, and the function may take no arguments at all + [3] depositFor(beneficiary) payable — pin beneficiary = 0xbobagw · 5 PC per call · 20 PC lifetime + [4] VALUE-ONLY — selector 0xFFFFFFFF, meaning EMPTY calldata · 5 PC per call · 20 PC lifetime + (a bare PC transfer; NOT the same as a function with no arguments) +``` + +**What the wallet refuses before the engine ever sees the session.** Every native action's target is checked against seven addresses that would turn the agent into the owner — the zero address, the engine's wildcard marker `address(1)`, **the wallet itself**, **the engine**, URP, the validator, the factory — and any of them reverts `ForbiddenActionTarget`, naming it. The engine's two wildcard function markers revert `ForbiddenActionSelector`. The gateway reverts `RulesTypeMismatch(NATIVE, i, gateway)` — a gateway target is not *forbidden*, it is the wrong kind for the chain these actions declare. The same target under a foreign chain is perfectly grantable; it would simply be a `UNIVERSAL` rules set. The same `(contract, function)` twice reverts `DuplicateAction`. A wrong policy, an extra user-op policy, a wrong validator: `MalformedSessionShape`, exactly as under `UNIVERSAL`. Zero actions or nine: `TooManyActions(n)`. + +**Why URP is the *only* action policy — per action.** The engine requires at least one action policy per action. With URP as the only one on each of the five, **removing URP from any action leaves that action with zero policies and every request against it dies**. The property is per action; a rules set holding eight of them holds it eight times over. + +**What URP refuses at initialisation.** A native config may not name the gateway as its target (the mirror of the wallet's check, one layer down). A value-only config may carry neither pins nor an amount rule — it could never authorise anything, so it is a misconfiguration Bob believes he granted, not a valid strict one. More than eight pins, a zero target, a zero or past expiry: refused, each by name. + +**The rules set identity.** `permissionId = keccak256(sessionValidator, initData, salt)`. Because the wallet supplies the salt, granting byte-identical terms twice yields two independent rules sets. Because the agent config is in the hash, **the agent cannot be swapped inside a rules set — a different agent is a different rules set** (Rule 4). Each of the five actions has its own action id under that one permission id, and its own URP record under that action id. + +**What the agent can do:** five functions, on exactly one Push contract, with the beneficiary forced to Bob's own wallet wherever there is one, up to two amount ceilings and two value ceilings, at most two unstakes, until the expiry. + +**What it cannot do:** call any other contract · call any sixth function · stake for anyone but the wallet · deposit for anyone but the wallet · exceed any cap · unstake a third time · act after expiry · call `approve` at all · install or remove modules · call the wallet, the engine, URP, the validator, the factory, **or the gateway** · touch `0xbobuea` · grant or extend anything. + +### State after Stage 3 + +``` +0xbobuea : 0 pUSDC ← identity only, clean +0xbobagw : 100 pUSDC + PC ← owned by 0xbobuea; one NATIVE rules set live (five actions) +pUSDC : allowance(0xbobagw → 0xpushstake) = 100e6 ← the OWNER's approval, not the agent's +URP.stakeFor: amountSpent 0 · callsUsed 0 (and four more records, all at zero) +``` + +**Bob signed once. He has an identity, an agent wallet, a five-action bounded rules set, and zero exposure beyond 100 pUSDC and the PC he funded.** + +--- + +## STAGE 4 — The agent works *(off-chain, no funds move)* + +- The agent's runtime decides to stake **40 pUSDC** now and keep 60 in reserve. +- It composes the request as **one flat call** — there are no nested layers, no instruction list and no gateway envelope in the native workflow: + +``` +Layer 1 the execution payload mode = single · executionCalldata = (0xpushstake, value 0, stakeFor(0xbobagw, 40e6)) +``` + +- **It composes a call; it does not move money.** It signs nothing for the wallet — exactly as in the universal workflow, its authority is being the sender. + +--- + +## STAGE 5 — Execution via the agent door + +**🔑 THE AGENT ACTS — the only time it acts in the entire lifecycle** + +- The agent **cannot** call `0xpushstake` itself. If it did, `msg.sender` would be the agent, `stakeFor` would pull pUSDC from the *agent's* balance — it has none — and any position would be the agent's. Structurally pointless and structurally blocked. +- Instead it calls **Bob's wallet** itself — from `0xagent`, or, for an external key, by driving its UEA, which verifies that key and then calls the wallet. + +> **The caller is the authority.** +> `executeAsAgent` admits only the agent the named rules set records. Anyone else — Bob included — is refused `CallerIsNotAgent` before the engine runs. There is no signature and no relayer: the agent pays the Push transaction gas itself; the wallet pays only the `value` URP allowed. + +``` +0xagent + └─▶ 0xbobagw.executeAsAgent(rulesId, mode, execCalldata) + │ + │ ── THE WALLET DOES THE ENTRYPOINT'S JOBS ITSELF (Push Chain has none) ── + ├─ 1. session engine still installed? ✓ + ├─ 2. msg.sender == agentOf(rulesId)? else CallerIsNotAgent — before the engine runs + ├─ 3. build PackedUserOperation in memory (ABI shape only) + │ signature = USE ‖ rulesId ‖ msg.sender ← written by the wallet, never supplied + │ + └─▶ SmartSession.validateUserOp + ├─ permission enabled? + ├─ actionId = keccak(0xpushstake, stakeFor) ← THE ENGINE ROUTES BY (contract, function) + │ an ungranted pair dies HERE, before any policy runs + ├─ URP.checkAction ── reads the mode record: NATIVE ── + │ ── the native gates, in order ── + │ N1 configured · N2 NOT EXPIRED · N3 never the gateway + │ N4 target == the record's own copy · N5 selector == the record's copy + │ (under 4 bytes = value-only, and value-only demands EMPTY calldata) + │ N6 value ≤ per-call cap · value + valueSpent ≤ lifetime cap + │ N7 every pin: calldata long enough · word at offset 4 == 0xbobagw, ALL 32 BYTES + │ N8 amount at offset 36 ≤ 50e6 · amount + amountSpent ≤ 60e6 + │ N9 callsUsed < maxCalls (0 = unlimited) + │ EFFECTS LAST: valueSpent · amountSpent += 40e6 · callsUsed += 1 + │ emit NativeCallMetered(id, …, value 0, amount 40e6) + │ + └─ AgentValidator.validateSignatureWithData ← LAST, after every policy + the 20 bytes the wallet wrote == the agent stored in the rules set? + │ + ├─ 4. the wallet enforces the verdict itself (authorizer, validAfter/validUntil) + ├─ 5. the wallet refuses ITSELF and THE ENGINE as target, whatever the verdict + ├─▶ 6. dispatch THE EXACT VALIDATED BYTES ──▶ 0xpushstake.stakeFor(0xbobagw, 40e6) + │ ▲ + │ msg.sender == 0xbobagw + │ ← the vault pulls pUSDC from the WALLET + │ and credits the WALLET + └─ 7. emit RulesActionAuthorized(rulesId, 0xagent, keccak256(execCalldata)) +``` + +- **Any single gate failing reverts the whole transaction** — counters, everything. A failed action costs the agent gas and changes nothing else. The agent's runtime is never trusted; URP is the trust boundary. +- **The engine does half the work here that URP does in the universal flow.** Because the call is flat, its target and function are the engine's own action identity: a request to `0xpushstake.withdrawAll()` or to any other contract never reaches URP at all — it dies at the engine with `NoPoliciesSet`. URP's job is what the engine cannot see: the arguments, the value, the count. +- **Ordering note that looks wrong and is not:** the engine consults the session validator **after** the policies. The wallet has already checked the caller, but URP's native gates still treat the calldata as unauthenticated — so, like the universal gauntlet, they make no external calls, write every counter last, and revert on every failure. Every pin and the metered amount are read straight out of the calldata at a frozen position, bounds-checked in 256-bit arithmetic; nothing is decoded as a structure. +- **Step 5 is the last of four refusals of a self-call.** The wallet and the engine were refused at grant (Stage 3); the engine's own minimum-one-policy floor refuses them a second way; and here the wallet refuses them a fourth time, **after** validation, whatever the engine concluded. This one exists for a session the owner enabled on the engine *directly*, bypassing `grantRules` — a thing the owner door permits. Two permanent tests pin it, one of them reaching the engine as a target through the engine's own wildcard. Do not move it before validation. +- **How a failure surfaces.** The engine re-wraps a policy's revert as `PolicyCheckReverted(bytes32)` and keeps only 32 bytes — the URP error's selector and the first 28 bytes of its first argument. That is why every native error leads with the value you debug with: `ArgPinMismatch(actual, index, expected)` shows you the word that did not match; `NativeAmountExceedsCap(amount, cap)` shows you the amount. + +### 💰 FUND MOVEMENT #3 — 40 pUSDC moves from the wallet into the vault + +``` +0xbobagw [100 pUSDC] ──transferFrom, under the OWNER's approval──▶ 0xpushstake [40 pUSDC, credited to 0xbobagw] +URP.stakeFor: amountSpent 0 → 40e6 · callsUsed 0 → 1 emit NativeCallMetered(...) ← the correlation record +``` + +--- + +## STAGE 6 — There is no Stage 6 + +- In the universal workflow, Stage 6 is cross-chain settlement: validators, a threshold signature, a Vault on the far chain, a destination account deployed on first contact. **None of that exists here.** The agent action was one Push transaction, and it is over. + +| | Universal | Native | +| --- | --- | --- | +| After Stage 5 | a burn, an event, and a pending outbound | **the position exists, credited to the wallet** | +| Something in flight? | yes — bridge latency | **no** | +| A far side that can fail? | yes — funds return, spend credited back (designed, not yet functional) | **no** — the call either succeeded inside the transaction or the whole transaction reverted, counters included | +| Gas on failure | consumed, never credited | consumed by the agent, never credited | +| Revocation window | bridge latency | **zero** — the next request is refused | + +### 🎯 What `0xpushstake` sees + +``` +msg.sender = 0xbobagw · beneficiary = 0xbobagw · stake credited → 0xbobagw +``` + +**The agent appears nowhere.** It never held a cent, never appeared as staker, and cannot unstake to itself — `unstake()` returns funds to `msg.sender`, and `msg.sender` is always the wallet. + +### If the call fails + +- `stakeFor` reverts inside the vault — insufficient allowance, a paused vault, anything — and **the whole wallet transaction reverts with it**: all three counters, the metering event, everything. Nothing to credit back, because nothing was recorded. The agent paid gas; that is the entire consequence. + +--- + +## STAGE 7 — After the action + +### The control chain — one hop shorter than universal + +``` +0xbobuea ──owns──▶ 0xbobagw ──is msg.sender at──▶ 0xpushstake (position credited to 0xbobagw) + (identity) (agent wallet) (the Push-native protocol) +``` + +- **The UEA cannot command the vault directly** — it is not the staker. To unstake, `0xbobuea` calls `0xbobagw.execute(0xpushstake.unstake())` through the owner door, with no policy in the path, and the pUSDC lands back in the wallet. Always one hop, always the wallet. +- **The agent can unstake, twice, to the wallet only** — `unstake()` is granted with a call limit of two, and it pays `msg.sender`, which is the wallet. It cannot redirect the proceeds because there is no argument to redirect. +- **The vault has no idea a rules set exists.** It sees an ordinary contract calling it. All of the enforcement is behind that call, in the wallet, the engine and URP. + +| Actor | Can do | Cannot do | +| --- | --- | --- | +| **`0xbobuea`** (Bob) | anything, unconditionally — unstake, withdraw anywhere, revoke, replace a rules set, install/uninstall a validator | — | +| **`0xagent`** | exactly the five actions, under their pins, caps and limits, until expiry | everything else — including a sixth function on the same contract | +| **`0xpushstake`** | credit and pay whoever calls it | tell the agent from the owner — both arrive as `0xbobagw` | + +### The owner's three operations, in full + +- **Withdraw** — `execute([...])`. **There is no `withdraw()` function**; the owner path *is* withdrawal. `execute(0xpushstake.unstake())` then `execute(pUSDC.transfer(anywhere, …))`, with no destination restriction and no policy in the path. It must succeed in every degraded state — zero rules sets, engine uninstalled, hostile validator installed. +- **Revoke** — `revokeRules(pid)` (existence-checked, so a typo reverts loudly instead of silently "succeeding") or `revokeAllRules()`. Immediate, unblockable, no callbacks on the path. Removing the permission removes all five action records' standing at once. **There is no in-flight window** — a native rules set has nothing in flight. +- **Change a rules set** — **it cannot be edited.** A change is one owner transaction batching: `URP.assertSpent(id, wallet, valueSpent, amountSpent, calls)` → `revokeRules(old)` → `grantRules(new)`. The native assertion names **all three counters** of the action being replaced and every one must match exactly; it refuses to run against a universal record or a ghost, so a stale belief can never pass by reading zeros from the wrong place. If the agent acted in the composition window, the assertion reverts the whole change. **Counters restart at zero on the new rules set**, and any request for the old id is dead: removal cleared its agent, and the new rules set has a new id. +- **Every one of these advances the wallet's checkpoint counter** — one tick per owner-door call, per grant and per revoked id — so a job's evaluator can tell the owner acted. Agent actions never move it. + +### STAGE 7b — the second action, and why it still counts + +- A week on, the agent calls `claim()` to harvest rewards into the wallet. `claim()` takes no arguments, sends no value, meters no amount. It is the strictest native shape: only the expiry stands between the agent and the call. +- **The call counter still moves.** `claim()` has no limit, so it does not matter here — but it would on `unstake()`, whose limit is two: a zero-value, zero-amount `unstake()` consumes one of the two. **Every successful call is a use.** A limit that a zero-value call could slip past would be advisory, and this is the one place the native rulebook deliberately differs from the universal one, whose spend counter ignores a zero-amount request. + +### STAGE 7c — the six requests that fail, and where + +| The agent tries | Dies at | Error, as the agent sees it | +| --- | --- | --- | +| `stakeFor(0xagent, 10e6)` — stake for itself | URP, gate **N7** | `ArgPinMismatch(0xagent…, 0, …)` — the pin is what stops the agent staking to itself | +| `stakeFor(0xbobagw, 25e6)` after 40 already staked | URP, gate **N8** | `TotalNativeAmountExceeded(65e6, 60e6)` — the lifetime amount cap | +| a third `unstake()` | URP, gate **N9** | `CallLimitReached(2, 2)` | +| `0xpushstake.withdrawAll()` — a function Bob never granted | **the engine**, before URP | `NoPoliciesSet(pid)` — no action id, no policy, nothing to run | +| `pUSDC.approve(0xagent, …)` — a contract Bob never granted | **the engine**, before URP | the same | +| `0xbobagw.grantRules(…)` — the wallet itself | **the wallet, at grant** — it was never grantable; and again at dispatch if it were somehow enabled | `ForbiddenActionTarget(0xbobagw)` · `ForbiddenDispatchTarget(0xbobagw)` | + +--- + +## Fund movement — the whole ledger + +| # | Stage | Movement | Amount | +| --- | --- | --- | --- | +| 1 | 2 | `0xbob` → UniversalGateway (Ethereum) | 100 USDC locked | +| 2 | 3 | mint on Push Chain → `0xbobuea` | 100 pUSDC | +| 3 | 3 | `0xbobuea` → `0xbobagw` | 100 pUSDC + PC | +| 4 | 5 | `0xbobagw` → `0xpushstake`, **credited to `0xbobagw`** | 40 pUSDC | +| 5 | 7b | `0xpushstake` → `0xbobagw` | rewards | + +**The agent never appears as a holder in any row. Rows 1–3 are Bob funding himself; rows 4–5 are the wallet moving its own money in and out of a Push contract, on the agent's call, under Bob's pins.** + +--- + +## Diagram + +``` + ┌─────────────────────────────────────────┐ + STAGE 1 intent │ Bob: "stake 100 USDC on Push, agent │ + (off-chain) │ manages the position" │ + └──────────────────┬──────────────────────┘ + │ NEW wallet or EXISTING? ← v3 choice + │ kind = NATIVE (the vault is on Push) + │ derive 0xbobagw · compose 5 actions + pins + ▼ + ┌───────────────────┐ + │ Bob approves │ ← last human decision + │ ONE SIGNATURE │ + └─────────┬─────────┘ +═══════ ETHEREUM ═══════════════════════════════════════│═══════════════════════════════ + STAGE 2 ▼ + 0xbob ──────100 USDC──────▶ UniversalGateway ────[LOCKED in Vault] + │ emit UniversalTx ← the gateway's ONLY appearance +═══════ PUSH CHAIN ═════════════════════│═══════════════════════════════════════════════ + STAGE 3 ▼ + Universal Validators ──vote──▶ quorum ──▶ x/uexecutor + │ + ┌─────────────────────────────────────┘ + ▼ + deploy 0xbobuea + mint 100 pUSDC + credit gas + │ + │ ONE ATOMIC MULTICALL + ├──1─▶ AGWFactory.deployWallet → 0xbobagw (owner baked in) + │ └─ factory calls initializeAccount() → SmartSession installed + ├──2─▶ 🔑 grantRules(session) — NATIVE derived from the chain, + │ salt from grantNonce + │ wallet: 5 actions · none the gateway · none the wallet/engine/URP/… + │ URP: 5 records — expiry · pins · caps · call limits · kind = NATIVE + ├──3─▶ 💰 100 pUSDC ──▶ 0xbobagw + ├──4─▶ ⛽ PC ──▶ 0xbobagw (for the two payable actions) + └──5─▶ 🔓 OWNER DOOR: pUSDC.approve(0xpushstake) ← Bob's, not the agent's + + STAGE 4 agent decides · composes ONE FLAT CALL + │ + STAGE 5 ▼ + 0xagent calls ──▶ 0xbobagw.executeAsAgent(rulesId, …) + │ + ┌───────────┴────────────────────────┐ + │ WALLET: engine installed · │ + │ caller == the agent · userOp │ + ├────────────────────────────────────┤ + │ ENGINE: actionId = (0xpushstake, │ + │ stakeFor) — ungranted pair dies │ + ├────────────────────────────────────┤ + │ URP: mode = NATIVE · 9 gates │ + │ never the gateway · target copy │ + │ selector copy · value caps │ + │ PINS (beneficiary = 0xbobagw) │ + │ amount caps · call limit │ + │ EFFECTS LAST: 3 counters │ + ├────────────────────────────────────┤ + │ SENDER CHECKED AGAIN, LAST │ + ├────────────────────────────────────┤ + │ WALLET: not itself, not the engine │ + └───────────┬────────────────────────┘ + ▼ + 0xpushstake.stakeFor(0xbobagw, 40e6) + 💰 40 pUSDC wallet ──▶ vault (msg.sender = 0xbobagw) + │ + ┌───────────▼────────────────────┐ + │ 0xpushstake │ + │ msg.sender = 0xbobagw │ + │ stake credited → 0xbobagw │ + │ the agent appears NOWHERE │ + └────────────────────────────────┘ + │ + ONE TRANSACTION. DONE. + no bridge · no TSS · no far side · nothing in flight +``` + +--- + +## Both kinds on one wallet + +Bob may hold this native rules set and the universal one from `3_Universal_Flow.md` on the **same** wallet, granted by the same owner, naming the same agent or different ones. They meter in disjoint storage — a native call moves no universal counter, and the reverse — and revoking one leaves the other enabled. The only thing they share is the wallet's balance, which is exactly the blast-radius boundary Bob chose in Stage 1. + +--- + +## The five things to remember + +1. **One signature — and the wallet is Bob's forever.** Identity, wallet, rules set, funding and the owner's approval land atomically. The wallet's owner is baked into its bytecode at creation and can never be reassigned. +2. **The agent authorises; it never holds.** It triggers five named functions on one named contract, under nine simultaneous gates each. Funds move only from Bob's own wallet, only into positions credited to Bob's own wallet. +3. **The caller is the authority.** `executeAsAgent` admits only the agent the rules set names; an external key acts through its UEA, which verifies the key. There is no bearer request and no relayer. +4. **`msg.sender` at the protocol decides everything.** Because `0xbobagw` makes the call, the vault credits `0xbobagw`. Had the agent called the vault, the position would have been the agent's — and it has nothing to stake. **That single fact is the design, one hop shorter than universal.** +5. **The engine sees the door; URP sees what walks through it.** The engine already knows which contract and which function — that is its action identity, and an ungranted pair never reaches URP. What the engine cannot see is *how* the function is called: URP's native rulebook pins the arguments, caps the value and the amount, and counts the calls. Remove URP from an action and that action enforces nothing. + +--- + +*This document walked the Push-native workflow. For the same wallet, the same engine and the same URP running a universal rules set — the gateway, the bridge, the destination account on the far chain, and URP's sixteen-gate gauntlet opening the payload two levels deep — read `3_Universal_Flow.md`.* diff --git a/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/5_SDK_Owner_Integration.md b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/5_SDK_Owner_Integration.md new file mode 100644 index 00000000..264778d6 --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/5_SDK_Owner_Integration.md @@ -0,0 +1,488 @@ +# AGW for the SDK — owner side + +What the SDK needs to create agentic wallets, grant and revoke rules, act as the owner, and read state, against the +**v4 deployment on Donut**. Owner side only: the agent side (`executeAsAgent`, building outbound requests) is out of +scope here. + +Everything below is taken from the deployed contracts (commit `e8db748`). ABIs: use the verified contracts on +[donut.push.network](https://donut.push.network), or the build artifacts in this repo (`out/.sol/.json`). + +--- + +## 1. The contracts the SDK talks to + +| Contract | Address (Donut, chain id `42101`) | What the SDK does with it | +|---|---|---| +| **AGWFactory** (proxy) | `0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF` | Predict, deploy and look up wallets | +| **AGW** (one per user) | address from `predictWallet` | Grant / revoke rules, owner actions, reads | +| **URP** (proxy) | `0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af` | Named inside every rule; read rule terms and spend | +| **SmartSession** (engine) | `0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a` | Read only: list a wallet's rules | +| **AgentValidator** | `0x068EE2388475A98EE1f5a434C58bFF3444fffFe6` | Named inside every rule; never called | +| UniversalGatewayPC (Push core) | `0x00000000000000000000000000000000000000C1` | Named as the target of every cross-chain rule | +| UniversalCore (Push core) | `0x00000000000000000000000000000000000000C0` | Look up a chain's gas token (`gasTokenPRC20ByChainNamespace`) | + +`AGW.SESSION_ENGINE()`, `AGW.RULES_POLICY()`, `AGW.SESSION_VALIDATOR()` and `AGW.UNIVERSAL_GATEWAY_PC()` return the +engine, URP, validator and gateway a wallet expects. Prefer reading them from the wallet over hard-coding. + +## 2. Five terms + +- **Owner**: the Push address that owns a wallet (an EOA, or the UEA of an external key). Fixed at deploy. +- **Wallet (AGW)**: a small contract account. It holds the funds the agent may use; its balance is the hard ceiling. +- **Rule**: what one agent may do from one wallet. Granted by the owner, stored in the engine and URP, immutable once + granted. Identified by a `rulesId` (`bytes32`). +- **Agent**: the Push address a rule names (an EOA, or the UEA of an external key). Never the owner. +- **Checkpoint**: a counter on the wallet that moves on every owner-side action (owner calls, grants, revokes), never + on agent actions. Evaluators compare it before and after a job. + +--- + +## 3. Wallets: predict, fund, deploy + +### Predict + +```solidity +function walletCount(address owner) external view returns (uint256); // also the next index +function predictWallet(address owner, uint256 index) external view returns (address wallet, bool deployed); +``` + +The address depends only on `(owner, index)` and never changes, so it can be shown and **funded before deployment** +(PC and PRC20s sent to it are there when it deploys). The next wallet is `predictWallet(owner, walletCount(owner))`. +`index` may be at most `walletCount(owner)`: predicting further ahead reverts `IndexOutOfRange(index, next)`. + +### Deploy + +```solidity +function deployWallet(string calldata label) external returns (address wallet); // caller = owner +function deployWalletWithSig(OwnerIntent calldata intent, bytes calldata sig, string calldata label) + external returns (address wallet); // relayed, see §7 +``` + +- `deployWallet` makes **the caller** the owner; there is no owner parameter. +- `label` is emitted in `WalletDeployed`, **not stored** on-chain. Read it from events. +- Deploys revert while the factory is paused (`EnforcedPause`). + +### Look up + +```solidity +function isWallet(address account) external view returns (bool); +function ownerOf(address wallet) external view returns (address); // address(0) if not a factory wallet +function indexOf(address wallet) external view returns (uint256); // reverts NotAWallet for a non-wallet +``` + +To list an owner's wallets: indices `0 .. walletCount(owner)-1` through `predictWallet`, or the `WalletDeployed` +events filtered by `owner`. + +--- + +## 4. Granting a rule + +```solidity +function grantRules(Session calldata session) external returns (bytes32 rulesId); // owner, or the wallet itself +``` + +One call grants one rule. A rule is a **`Session`** (the engine's struct) whose one policy is URP, carrying the terms +in an **envelope**. + +### 4.1 The Session, field by field + +```solidity +struct Session { + address sessionValidator; // AgentValidator 0x068E…FfFe6 (must equal wallet.SESSION_VALIDATOR()) + bytes sessionValidatorInitData; // abi.encode(address agent), agent != address(0) + bytes32 salt; // anything; the wallet overwrites it with its grant nonce + PolicyData[] userOpPolicies; // MUST be empty + ERC7739Data erc7739Policies; // MUST be empty: { allowedERC7739Content: [], erc1271Policies: [] } + ActionData[] actions; // see below + bool permitERC4337Paymaster; // MUST be false +} +struct PolicyData { address policy; bytes initData; } +struct ActionData { bytes4 actionTargetSelector; address actionTarget; PolicyData[] actionPolicies; } +struct ERC7739Data { ERC7739Context[] allowedERC7739Content; PolicyData[] erc1271Policies; } +struct ERC7739Context { bytes32 appDomainSeparator; string[] contentNames; } +``` + +Every action has **exactly one** policy: `{ policy: URP, initData: }`. Anything else reverts +`MalformedSessionShape`. + +Actions by rule kind: + +| Kind | `actions` | +|---|---| +| **Cross-chain** (EVM or Solana destination) | Exactly 1 action: `actionTarget = UniversalGatewayPC`, `actionTargetSelector = 0x77b86bec` (the gateway's `sendUniversalTxOutbound`) | +| **Native** (Push-side calls) | 1 to 8 actions, one per `(target, selector)` the agent may call; no duplicates; every action's envelope names the same chain | + +The **kind is never declared**: it is derived from the envelope's chain string. This chain (`"eip155:42101"`) means +native; any other `eip155:` or `solana:` chain means cross-chain. + +### 4.2 The envelope (`initData` of the URP policy) + +```solidity +initData = abi.encode(uint16 version, string chainNamespace, bytes body) +``` + +- `version` = **1** (`ENVELOPE_VERSION`). Anything else is refused (`UnsupportedEnvelopeVersion`). +- `chainNamespace`: CAIP-2 string, byte-exact. Destination chain for cross-chain rules (e.g. `"eip155:11155111"`, + `"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"`); `"eip155:42101"` for native rules on Donut. + (`URP.pushChainHash()` returns `keccak256("eip155:42101")` if you want to confirm.) +- `body`: `abi.encode(UniversalTerms)`, `abi.encode(SvmTerms)` or `abi.encode(NativeTerms)`, by kind. + +### 4.3 Cross-chain rule, EVM destination: `UniversalTerms` + +```solidity +struct UniversalTerms { + uint48 validUntil; // unix seconds, in the future; "never" = type(uint48).max + address expectedCEA; // the wallet's account on the destination chain + AssetCap[] assets; // 1..8 tokens the agent may move + uint256 maxGasPerCall; // PC (wei) the wallet may spend per outbound (protocol fee + gas) + AllowedCall[] allowedCalls; // 1..32 destination-chain calls the agent may make +} +struct AssetCap { + address token; // PRC20 ON PUSH (e.g. USDC.eth), never the destination chain's address + uint256 maxPerCall; // per request; 0 = this token can never move + uint256 maxTotal; // lifetime amount sent out; type(uint256).max = unlimited; 0 = nothing +} +struct AllowedCall { + address target; // destination-chain contract + bytes4 selector; // destination-chain function + uint16 beneficiaryOffset; // byte offset of the beneficiary argument: 4 + 32 * argIndex + bool hasBeneficiary; // if true, that argument must equal expectedCEA + uint256 maxValue; // native value per call, in DESTINATION-chain units; 0 = non-payable +} +``` + +ABI tuple: `(uint48,address,(address,uint256,uint256)[],uint256,(address,bytes4,uint16,bool,uint256)[])` + +Rules the contracts enforce at grant (each with a named error, §10): + +- **At least one token, at most 8, no duplicates.** A rule with no token is refused (`AssetListOutOfRange(0)`): the + gateway picks the destination chain from the request's token, so a rule without a token has no chain. +- **Every token's chain must equal the rule's chain**: URP calls `token.SOURCE_CHAIN_NAMESPACE()` and compares + (`ChainMismatch`, `InvalidAsset`). It checks the chain, **not which token**, so picking the right PRC20 is the SDK's job. +- `expectedCEA` non-zero; `allowedCalls` 1..32; `validUntil` non-zero and in the future. + +What the SDK has to resolve: + +- **Token → PRC20**: users give the destination chain's token (e.g. `MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC`); convert + with `PushChain.utils.tokens.getPRC20Address(...)` and confirm `SOURCE_CHAIN_NAMESPACE()` equals the rule's chain. +- **A rule that moves no tokens**: the contracts refuse an empty list, so the SDK adds the destination chain's gas + token with both limits at 0: `UniversalCore.gasTokenPRC20ByChainNamespace(chain)` (Sepolia: pETH + `0x2971824Db68229D087931155C2b8bB820B275809`). Add it only when the user lists no token, or it would duplicate. +- **"No total limit"**: encode `maxTotal = type(uint256).max`. Do not encode 0; 0 means nothing may move. +- **`expectedCEA`**: the wallet's CEA on the destination chain, from that chain's CEA factory: + `getCEAForPushAccount(walletAddress) returns (address cea, bool isDeployed)`. +- **`beneficiaryOffset`**: from the function ABI, `4 + 32 * argIndex` (e.g. Aave `supply(address,uint256,address,uint16)`, + `onBehalfOf` is argument 2, offset 68). + +One rule may list several tokens and several protocols. Limits are **per token**; there is no combined limit across +tokens, and every listed token may be used with every allowed call. Different scopes need separate rules. + +### 4.4 Cross-chain rule, Solana destination: `SvmTerms` + +```solidity +struct SvmTerms { + uint48 validUntil; + bytes32 expectedCEA; // PDA(["push_identity", wallet], gatewayProgram) + bytes32 gatewayProgram; // the Push gateway program on that cluster (from the chain registry) + AssetCap[] assets; // 1..8, same as §4.3; request amounts must fit u64 + uint256 maxGasPerCall; + bytes32[] ceaAccounts; // the CEA's value-holding accounts, max 16, MUST include expectedCEA + AllowedProgram[] programs; // 1..32 allowed (program, instruction) pairs + SvmAccountPin[] pins; // max 16 account pins + SvmDataPin[] dataPins; // max 8 instruction-data pins +} +struct AllowedProgram { bytes32 program; bytes8 discriminator; uint8 discriminatorLen; bool dataless; uint8 maxAccounts; } +struct SvmAccountPin { uint8 ruleIndex; uint8 accountIndex; bytes32 expected; } +struct SvmDataPin { uint8 ruleIndex; bool fromEnd; uint16 offset; uint16 offsetB; uint8 len; + uint8 mode /* 0 EQ, 1 GTE_LE, 2 LTE_LE, 3 RATIO_GTE_LE */; bytes32 expected; uint64 num; uint64 den; } +``` + +What the SDK must get right (all checked at grant, named errors): + +- `ceaAccounts`: the CEA plus **the CEA's token account for every listed token** and any swap-output accounts. URP + cannot derive Solana token accounts, so it cannot check this; an unlisted account is unprotected. +- **One rule per (program, instruction).** Each position takes one pinned key, so if a swap rule pins its input to the + USDC account, USDT cannot be that instruction's input. Plan Solana rules so different tokens use different instructions. +- Every program rule needs at least one account pin; `discriminatorLen` is 1..8, or 0 exactly when `dataless`. +- System, SPL Token, Token-2022, Stake, the upgradeable loader, the lookup-table program, the gateway program and the + CEA itself can never be allowed programs. + +Field-level detail: `docs/2_UniversalRulesPolicy.md` §1.2c. + +### 4.5 Native rule (Push-side calls): `NativeTerms`, one per action + +```solidity +struct NativeTerms { + uint48 validUntil; + address target; // MUST equal this action's actionTarget + bytes4 selector; // MUST equal this action's actionTargetSelector; 0xFFFFFFFF = plain PC transfer + uint256 maxValuePerCall; // PC (wei) per call + uint256 maxValueTotal; // lifetime PC; type(uint256).max = unlimited + AmountRule amount; // optional metering of one uint256 argument + uint32 maxCalls; // 0 = unlimited + ArgPin[] pins; // 0..8 arguments that must equal a fixed word +} +struct AmountRule { bool enabled; uint16 offset; uint256 maxPerCall; uint256 maxTotal; } +struct ArgPin { uint16 offset; bytes32 expected; } // offset counts from byte 0, selector included: 4 = first argument +``` + +ABI tuple: `(uint48,address,bytes4,uint256,uint256,(bool,uint16,uint256,uint256),uint32,(uint16,bytes32)[])` + +- `target`/`selector` must match the action they sit in. The contracts do not cross-check at grant, and a mismatch + makes the rule unusable. +- Targets that can never be granted: the gateway (use a cross-chain rule), the wallet, the factory, the engine, URP, + the validator, `address(0)`, `address(1)`. +- A plain PC transfer (`0xFFFFFFFF`) carries no pins and no amount rule. + +### 4.6 The `rulesId` + +`grantRules` returns it, and `RulesGranted(rulesId, …)` carries it. It is also predictable before sending: + +``` +rulesId = keccak256(abi.encode(address sessionValidator, bytes sessionValidatorInitData, bytes32(grantNonce))) + // grantNonce = wallet.grantNonce() at the moment of the grant; it advances by 1 on every grant +``` + +Equivalently, call `SmartSession.getPermissionId(session)` with `salt = bytes32(grantNonce)`. Ids never repeat, even +for byte-identical rules granted twice. + +### 4.7 Encoding a cross-chain rule (viem) + +```ts +import { encodeAbiParameters, parseAbiParameters, parseEther, maxUint256, zeroHash } from 'viem'; + +const terms = encodeAbiParameters( + parseAbiParameters('(uint48,address,(address,uint256,uint256)[],uint256,(address,bytes4,uint16,bool,uint256)[])'), + [[validUntil, expectedCEA, + [[USDC_ETH, 100_000000n, 1000_000000n], [USDT_ETH, 50_000000n, maxUint256]], + parseEther('1'), + [[aavePool, '0x617ba037', 68, true, 0n], [usdcSepolia, '0x095ea7b3', 0, false, 0n]]]], +); +const initData = encodeAbiParameters(parseAbiParameters('uint16, string, bytes'), [1, 'eip155:11155111', terms]); + +const session = { + sessionValidator: wallet.SESSION_VALIDATOR, // 0x068E…FfFe6 + sessionValidatorInitData: encodeAbiParameters([{ type: 'address' }], [agent]), + salt: zeroHash, + userOpPolicies: [], + erc7739Policies: { allowedERC7739Content: [], erc1271Policies: [] }, + actions: [{ + actionTargetSelector: '0x77b86bec', // gateway sendUniversalTxOutbound + actionTarget: '0x00000000000000000000000000000000000000C1', // UniversalGatewayPC + actionPolicies: [{ policy: URP, initData }], + }], + permitERC4337Paymaster: false, +}; +// wallet.grantRules(session), from the owner +``` + +--- + +## 5. Revoking and replacing rules + +```solidity +function revokeRules(bytes32 rulesId) external; // owner, or the wallet itself; UnknownPermission if not live +function revokeAllRules() external; // owner, or the wallet itself +``` + +Revocation is immediate on Push and cannot be blocked. An outbound already sent across the bridge still completes. + +**Rules are immutable.** To "update" one, the owner sends **one batch through the owner door** (§6): + +1. `URP.assertSpent(configId, wallet, expectedSpent)` — reverts if the agent spent since the SDK read the counters; +2. `wallet.revokeRules(oldRulesId)`; +3. `wallet.grantRules(newSession)`. + +If step 1 reverts, nothing changes. Counters start at zero on the new rule. `assertSpent` forms: + +```solidity +// cross-chain (EVM or Solana): one expected value per listed token, IN THE ORDER THE RULE LISTED THEM +function assertSpent(ConfigId id, address account, uint256[] calldata expectedSpent) external view; +// native: per action +function assertSpent(ConfigId id, address account, uint256 expectedValueSpent, uint256 expectedAmountSpent, uint32 expectedCalls) + external view; +``` + +--- + +## 6. The owner door: `execute` + +```solidity +function execute(bytes32 mode, bytes calldata executionCalldata) external payable; // owner only +``` + +The owner acts as the wallet with **no rule checked**: withdraw, approve, call anything, or call the wallet's own +`grantRules` / `revokeRules` in a batch. + +| | `mode` | `executionCalldata` | +|---|---|---| +| Single call | `0x0000…00` (32 zero bytes) | `abi.encodePacked(address target, uint256 value, bytes callData)` | +| Batch | `0x01` followed by 31 zero bytes | `abi.encode(Execution[])`, `Execution = (address target, uint256 value, bytes callData)` | + +Other modes (delegatecall, try) revert `UnsupportedExecutionMode`. Every call in an owner action records one +checkpoint. Withdraw PC: single call to the destination address with `value = amount, callData = 0x`. Withdraw a +token: single call to the token with `transfer(to, amount)`. + +--- + +## 7. Relayed owner actions: `OwnerIntent` + +For owners who sign but do not send (a Push EOA without gas, or a relayer-driven flow). The owner signs one EIP-712 +`OwnerIntent`; the named `executor` submits it. + +```solidity +struct OwnerIntent { + address owner; // the wallet owner + address wallet; // the wallet (its predicted address if not deployed yet) + address executor; // the ONLY address allowed to submit this intent + uint96 index; // deploy: must equal factory.walletCount(owner) + bytes32 sessionHash; // grant: keccak256(abi.encode(session)) of the session AS SUBMITTED; 0 = no grant + bytes32 mode; // execute: the mode word + bytes32 execCalldataHash; // execute: keccak256(executionCalldata); 0 = no execute + uint192 nonceKey; // execute: lane key; the top bit (1 << 191) MUST be set + uint64 nonceSeq; // execute: must equal wallet.getNonce(nonceKey) + uint64 grantNonce; // grant: must equal wallet.grantNonce() + uint48 deadline; // unix seconds; every door rejects after it + uint256 signerChainId; // the chain id the owner's wallet signs under (their home chain) +} +``` + +EIP-712 type string (fields in this order): + +``` +OwnerIntent(address owner,address wallet,address executor,uint96 index,bytes32 sessionHash,bytes32 mode,bytes32 execCalldataHash,uint192 nonceKey,uint64 nonceSeq,uint64 grantNonce,uint48 deadline,uint256 signerChainId) +``` + +Domain: `name "AGWFactory"`, `version "1"`, `chainId = signerChainId`, `verifyingContract = factory proxy` +(`0xaF88…1aaF`, also for wallet doors), `salt = bytes32(uint256(42101))`. Check the local derivation against +`factory.domainSeparator(signerChainId)` (or `wallet.domainSeparator(...)`, identical) before prompting. + +| Door | Contract | Fields it checks | +|---|---|---| +| `deployWalletWithSig(intent, sig, label)` | factory | `owner`, `index`, `wallet` (= predicted), `executor`, `deadline` | +| `grantRulesWithSig(session, intent, sig)` | wallet | `wallet`, `owner`, `executor`, `deadline`, `sessionHash`, `grantNonce` | +| `executeWithSig(mode, executionCalldata, intent, sig)` | wallet | `wallet`, `owner`, `executor`, `deadline`, `mode`, `execCalldataHash`, `nonceKey`, `nonceSeq` | + +- **One signature can cover all three doors**: each door checks only its own fields, and each is single-use (deploy: + the index advances; grant: the grant nonce advances; execute: the lane sequence advances). +- **Several rules in one signature**: put a batch of the wallet's own `grantRules` calls in `executeWithSig` + (`grantRulesWithSig` grants exactly one). +- `executeWithSig` is **not payable**; value comes from the wallet's balance. +- Signature check: an owner with no code is verified by ECDSA; a contract owner by its UEA method + (`verifyUniversalPayloadSignature`), then ERC-1271. A **Solana-key owner's UEA must already exist on Push** before + its first signed intent. +- If the owner calls `deployWalletWithSig` directly, no signature is needed. + +--- + +## 8. "Create a wallet with rules" in practice + +| Owner | How | +|---|---| +| **UEA** (external key) | One UEA multicall, one signature: `factory.deployWallet(label)` then `predictedWallet.grantRules(session)` per rule. | +| **Push EOA**, sends its own txs | Two transactions: `factory.deployWallet(label)`, then `wallet.execute(batch of wallet.grantRules(...))`. | +| **Push EOA via a relayer** | One signature: an `OwnerIntent` with the deploy fields plus an execute batch of self-grants. The relayer sends `deployWalletWithSig`, then `executeWithSig`. | + +Fund the wallet with PC (for the agent's per-call fees) and the tokens the rules allow, at its address, before or after +deployment. + +--- + +## 9. Reading state + +| To get | Call | +|---|---| +| A wallet's live rules | `SmartSession.getPermissionIDs(wallet)` → `bytes32[]` | +| Is a rule live | `SmartSession.isPermissionEnabled(rulesId, wallet)` | +| The rule's agent | `wallet.agentOf(rulesId)` (zero if revoked or unknown) | +| Kind, VM family, chain | `URP.getMode(configId, wallet)` → `{initialized, mode (0 cross-chain, 1 native), vm (0 EVM, 1 Solana), chainHash}` | +| Cross-chain EVM terms + spend | `URP.getConfig(configId, wallet)` → `{initialized, validUntil, expectedCEA, maxGasPerCall, assets[], allowedCalls[]}`, each asset `{token, maxPerCall, maxTotal, spent}` | +| Solana terms + spend | `URP.getSvmConfig(configId, wallet)` (same `assets[]` with `spent`) | +| Native terms + spend | `URP.getNativeConfig(configId, wallet)` → `{…, valueSpent, amountSpent, callsUsed, …}` | +| Checkpoints | `wallet.checkpointCount()`, `wallet.lastCheckpointBlock()`, `Checkpointed` events | +| Owner / factory | `wallet.owner()`, `wallet.factory()` | +| Next grant nonce | `wallet.grantNonce()` | +| Owner lane position | `wallet.getNonce(nonceKey)` | + +**`configId`** (the key URP reads take), per action: + +``` +actionId = keccak256(abi.encodePacked(address target, bytes4 selector)) +actionPolicyId = keccak256(abi.encodePacked(bytes32 rulesId, actionId)) +configId = keccak256(abi.encodePacked(address wallet, actionPolicyId)) +``` + +- Cross-chain rule: one action, `target = UniversalGatewayPC`, `selector = 0x77b86bec`, so the `configId` follows from + `rulesId` alone. +- Native rule: one `configId` per action; use each action's `(target, selector)` from the session the SDK built (or + decode the grant transaction's input). +- `getConfig` reverts `WrongModeForCall` / `WrongVmForCall` if called on the wrong kind; call `getMode` first when + unsure. An empty slot returns a zeroed struct. +- `spent` counts what was **sent out**. Money coming back to the wallet does not lower it. + +The contracts do not enforce one rule per agent per chain. A wallet can hold several rules for the same agent and +chain, so a lookup by `(agent, chain)` can return more than one. + +--- + +## 10. Events + +| Contract | Event | Notes | +|---|---|---| +| Factory | `WalletDeployed(address indexed owner, uint256 indexed index, address indexed wallet, string label)` | The only place `label` lives | +| Wallet | `AccountInitialized(address indexed owner, address indexed engine)` | Emitted once at deploy | +| Wallet | `RulesGranted(bytes32 indexed rulesId, uint8 mode, bytes32 indexed chainHash, string chainNamespace)` | `mode`: 0 cross-chain, 1 native | +| Wallet | `RulesRevoked(bytes32 indexed rulesId)` | Once per revoked id | +| Wallet | `OwnerExecuted(bytes32 indexed mode, bytes32 executionCalldataHash)` | `execute` | +| Wallet | `OwnerExecutedWithSig(bytes32 indexed mode, bytes32 executionCalldataHash, uint192 nonceKey, uint64 nonceSeq)` | `executeWithSig` | +| Wallet | `Checkpointed(uint64 indexed seq, uint8 kind, bytes32 ref, uint64 blockNumber)` | `kind`: 0 owner action (`ref` = `keccak256(abi.encode(target, value, callData))`), 1 rules granted, 2 rules revoked (`ref` = `rulesId`) | +| Wallet | `RulesActionAuthorized(bytes32 indexed rulesId, address indexed agent, bytes32 callsHash)` | An agent action passed (agent side) | +| URP | `OutboundMetered(bytes32 indexed id, address indexed multiplexer, address indexed account, address token, uint256 amount)` | A cross-chain spend was counted | +| URP | `NativeCallMetered(bytes32 indexed id, address indexed multiplexer, address indexed account, uint256 value, uint256 amount)` | A native call was counted | + +--- + +## 11. Errors the owner side can hit + +All are custom errors with arguments; decode with the contract ABIs. URP errors raised during a grant reach the caller +in full (they come through the wallet). + +| When | Errors | +|---|---| +| **Deploy** | `IndexMismatch(expected, provided)`, `IntentWalletMismatch`, `ExecutorMismatch`, `SignatureExpired`, `InvalidOwnerSignature`, `EnforcedPause` | +| **Grant: session shape** (wallet) | `MalformedSessionShape`, `TooManyActions(n)`, `DuplicateAction(target, selector)`, `ForbiddenActionTarget(target)`, `ForbiddenActionSelector(selector)`, `RulesTypeMismatch(mode, actionIndex, target)`, `EmptyChain`, `InconsistentChain(actionIndex)`, `CallerIsNotOwner` | +| **Grant: envelope** (URP) | `UnsupportedEnvelopeVersion(firstWord)`, `EmptyChain`, `UnsupportedNamespace(chainHash)` (chain is neither `eip155:` nor `solana:`; declared in `PushChainLib`) | +| **Grant: cross-chain terms** (URP) | `AssetListOutOfRange(length)`, `DuplicateAsset(token)`, `InvalidAsset(token)`, `ChainMismatch(declared, assetChain)`, `InvalidConfigField`, `AllowListOutOfRange(length)`, `InvalidExpiry(validUntil)` | +| **Grant: Solana terms** (URP) | `InvalidSvmConfigField`, `ProgramListOutOfRange`, `TooManySvmPins`, `TooManySvmDataPins`, `TooManyCeaAccounts`, `DiscriminatorLenOutOfRange`, `AmbiguousRule`, `ForbiddenProgramInAllowList`, `SvmPinRuleOutOfRange`, `SvmPinIndexOutOfRange`, `SvmMaxAccountsOutOfRange`, `DuplicateSvmPin`, `InvalidCeaAccount`, `CeaAccountsMissExpectedCEA`, `SvmDataPinInvalid`, `RuleWithoutPin` | +| **Grant: native terms** (URP) | `NativeTargetZero`, `NativeTargetIsGateway`, `TooManyPins`, `ValueOnlyWithPins`, `ValueOnlyWithAmountRule`, `InvalidExpiry` | +| **Revoke** | `UnknownPermission(rulesId)`, `CallerIsNotOwner` | +| **Update batch** | `AssetSpentMismatch(token, expected, actual)`, `SpentLengthMismatch(expected, actual)`, `SpentMismatch(expected, actual)` (native), `NotInitialized`, `WrongModeForCall` | +| **Owner door / signed doors** | `CallerIsNotOwner`, `UnsupportedExecutionMode`, `MalformedBatchCalldata`, `OwnerSigExpired`, `IntentWalletMismatch`, `ExecutorMismatch`, `InvalidOwnerSignature`, `IntentSessionMismatch`, `IntentGrantNonceMismatch`, `IntentExecMismatch`, `OwnerLaneRequired`, `InvalidNonce` | +| **Reads** | `WrongModeForCall(actual)`, `WrongVmForCall(actual)`, `NotAWallet(account)`, `IndexOutOfRange(index, next)` | + +A call made inside an owner action that reverts bubbles its own revert data up unchanged. + +--- + +## 12. Limits + +| Limit | Value | +|---|---| +| Tokens per cross-chain rule | 1 to 8 | +| Allowed calls per EVM rule | 1 to 32 | +| Actions per native rule | 1 to 8 | +| Argument pins per native action | 0 to 8 | +| Solana: programs / account pins / data pins / value-holding accounts | 1–32 / ≤16 / ≤8 / ≤16 | +| `validUntil` | non-zero, in the future; `type(uint48).max` = never | +| Unlimited total | `type(uint256).max` (0 means nothing) | +| Envelope version | 1 | + +## 13. Checklist before sending a grant + +- [ ] `sessionValidator` is the wallet's `SESSION_VALIDATOR()`; `sessionValidatorInitData = abi.encode(agent)`; agent ≠ owner. +- [ ] Every action has exactly one policy, URP, with a version-1 envelope. +- [ ] Cross-chain: one action, gateway + `0x77b86bec`; 1–8 PRC20 tokens, each on the rule's chain; a gas-token entry + at 0/0 if the user listed none; `maxTotal` is `type(uint256).max` when the user set no total. +- [ ] `expectedCEA` is the wallet's CEA on that chain; beneficiary offsets are `4 + 32 * argIndex`. +- [ ] Native: each `NativeTerms.target/selector` equals its action's. +- [ ] Solana: `ceaAccounts` includes the CEA and the CEA's account for every listed token. +- [ ] Record the `rulesId` from the receipt (or predict it from `grantNonce`) and keep the token order for `assertSpent`. diff --git a/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/addresses/donut.md b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/addresses/donut.md new file mode 100644 index 00000000..b153465a --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/docs/addresses/donut.md @@ -0,0 +1,83 @@ +# Push Agentic Wallet — deployed addresses (Donut) + +**Generation `v4` (multi-asset rules, versioned envelope, agent sender door, checkpoints)** · Chain ID `42101` · +explorer [donut.push.network](https://donut.push.network) · deployed in blocks `23923806`–`23923810` · +commit `e8db748` (branch `deploy-agw` = `pushAgenticWallet_v3`) · `forge 1.5.1-stable` + +## The two addresses you need + +| | Address | +| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | +| **Factory**: deploy and look up wallets | [`0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF`](https://donut.push.network/address/0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF) | +| **URP**: name this as every rule's action policy | [`0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af`](https://donut.push.network/address/0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af) | + +Both are **proxies**. Point integrations at these, never at an implementation. + +## Everything + +| Contract | Address | Size (B) | Verified | +| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------: | :------: | +| `factoryProxy` (ERC-1967, UUPS) | [`0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF`](https://donut.push.network/address/0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF) | 141 | ✅ | +| `factoryLogic` (`AGWFactory`) | [`0xe138Dc6EfC10233BE1e6c8aF1Caf8cABe599cfC2`](https://donut.push.network/address/0xe138Dc6EfC10233BE1e6c8aF1Caf8cABe599cfC2) | 9,992 | ✅ | +| `walletImplementation` (`AGW`) | [`0x96D69ec7e6cDdaD414e656B5c9DCA24587DF713c`](https://donut.push.network/address/0x96D69ec7e6cDdaD414e656B5c9DCA24587DF713c) | 16,564 | ✅ | +| `urp` (Transparent proxy) | [`0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af`](https://donut.push.network/address/0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af) | 830 | ✅ | +| `urpImplementation` (`UniversalRulesPolicy` 3.1.0) | [`0xA2391eee4C9EA1B32AEB3A460B77296EA709F02F`](https://donut.push.network/address/0xA2391eee4C9EA1B32AEB3A460B77296EA709F02F) | 24,326 | ✅ | +| `urpProxyAdmin` (`ProxyAdmin`) | [`0x0b7a31ec85117892aEA90AA5cB6514e2F97c2295`](https://donut.push.network/address/0x0b7a31ec85117892aEA90AA5cB6514e2F97c2295) | 926 | ✅ | +| `sessionValidator` (`AgentValidator`) | [`0x068EE2388475A98EE1f5a434C58bFF3444fffFe6`](https://donut.push.network/address/0x068EE2388475A98EE1f5a434C58bFF3444fffFe6) | 806 | ✅ | +| `sessionEngine` (`SmartSession`, fork `7dc20e4`) | [`0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a`](https://donut.push.network/address/0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a) | 22,581 | ✅ | + +**All eight verified** on Blockscout. Keep `urpProxyAdmin`: without it URP can never be upgraded. + +### Push core contracts this deployment points at (not deployed by this repo) + +| | Address | +| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `UniversalGatewayPC` | `0x00000000000000000000000000000000000000C1` (implementation `0x1e41…a659`, 8-field outbound request, selector `0x77b86bec`) | +| `UniversalCore` | `0x00000000000000000000000000000000000000C0` | +| `UEAFactory` | `0x00000000000000000000000000000000000000eA` | +| `UNIVERSAL_EXECUTOR_MODULE` | `0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7` (the address core's UniversalCore and PRC20s use; an account with no code) | + +## How to grant a rule (what changed from v3.2) + +| | v3.2 | v4 | +| --------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| Policy `initData` | `abi.encode(string chainNamespace, bytes body)` | **`abi.encode(uint16 version, string chainNamespace, bytes body)`**, `version = 1` | +| Tokens per cross-chain rule | exactly 1 (`asset`, `maxAmountPerCall`, `maxAmountTotal`) | **1 to 8** (`assets: AssetCap[]`), each with its own limits and spend counter | +| PC fee limit | `maxPCPerCall` | **`maxGasPerCall`** (same meaning: PC per outbound for protocol fee + gas) | +| Agent door | session signature through a validator | **`executeAsAgent(rulesId, mode, executionCalldata)`**, callable only by the rule's agent | +| Owner-side changes | not recorded | **checkpoint counter** (`checkpointCount()`, `Checkpointed` event) | + +Cross-chain body (EVM destination): + +```solidity +struct AssetCap { address token; uint256 maxPerCall; uint256 maxTotal; } // token = PRC20 on Push +struct UniversalTerms { + uint48 validUntil; address expectedCEA; AssetCap[] assets; uint256 maxGasPerCall; AllowedCall[] allowedCalls; +} +// ABI tuple: (uint48,address,(address,uint256,uint256)[],uint256,(address,bytes4,uint16,bool,uint256)[]) +``` + +``` +cast call 0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af 'pushChainHash()(bytes32)' --rpc-url +# -> 0x3d6bc1f1d3fb03065860265a8e93840b586e57075d956cd41b4319d040be87f9 == keccak256("eip155:42101") +``` + +Full design notes: `docs/1_AGW.md`, `docs/2_UniversalRulesPolicy.md`, `docs/multi-asset-review.md`. + +## Admin + +| Authority | Holder | How to change it | +| ----------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| Factory `DEFAULT_ADMIN_ROLE` (factory upgrades) | deployer EOA `0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7` | `beginDefaultAdminTransfer(new)`, then the new admin calls `acceptDefaultAdminTransfer()` after the **48-hour** delay | +| URP `ProxyAdmin` owner (URP upgrades) | deployer EOA `0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7` | `transferOwnership(new)` on `0x0b7a…2295`, immediate | +| Factory `PAUSER_ROLE` / `OPERATOR_ROLE` | **nobody yet** | the default admin must `grantRole` before the factory can be paused or unpaused | + +These are different powers, and for production they belong in different multisigs: the factory admin can strand +counterfactually funded addresses; the URP ProxyAdmin owner can rewrite every gate in the security boundary. + + +## Previous generation (retired) + +`v3.2` (factory `0x2578041963f692f8b51A137A1c7ddc0c84a8226A`, URP `0xeAd99E254ACD64219d057400cdC2A2390bC74372`) stays on +chain but is no longer current. Its wallets and rules do not carry over; owners withdraw through the owner door. Its +record is in `deployments/address-book-v3/`. diff --git a/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/src/AGW.sol b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/src/AGW.sol new file mode 100644 index 00000000..e0f635a5 --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/src/AGW.sol @@ -0,0 +1,1176 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { Clones } from "@openzeppelin/contracts/proxy/Clones.sol"; +import { ReentrancyGuardTransient } from "@openzeppelin/contracts/utils/ReentrancyGuardTransient.sol"; +import { IERC165 } from "forge-std/interfaces/IERC165.sol"; + +import { ISmartSession } from "smartsessions/ISmartSession.sol"; +import { Session, ActionData, PermissionId, ValidationData, SmartSessionMode } from "smartsessions/DataTypes.sol"; +import { PackedUserOperation } from "account-abstraction/interfaces/PackedUserOperation.sol"; +import { IModule as IERC7579Module } from "erc7579/interfaces/IERC7579Module.sol"; + +import { IAgentValidator } from "./interfaces/IAgentValidator.sol"; +import { IAGW } from "./interfaces/IAGW.sol"; +import { ISmartSessionConfigReader } from "./interfaces/ISmartSessionConfigReader.sol"; +import { AGWErrors } from "./libraries/Errors.sol"; +import { AgentConfigLib } from "./libraries/AgentConfigLib.sol"; +import { PushChainLib } from "./libraries/PushChainLib.sol"; +import { OwnerAuthLib } from "./libraries/OwnerAuthLib.sol"; +import { + OwnerIntent, + OWNER_LANE_FLAG, + SEND_OUTBOUND_SELECTOR, + RulesType, + CheckpointKind, + ENGINE_FALLBACK_TARGET, + ENGINE_FALLBACK_SELECTOR, + ENGINE_FALLBACK_SELECTOR_SMARTSESSION +} from "./libraries/Types.sol"; +import { + ModeCode, + CallType, + ExecType, + ModeLib, + CALLTYPE_SINGLE, + CALLTYPE_BATCH, + EXECTYPE_DEFAULT +} from "./libraries/ModeLib.sol"; +import { ExecutionLib, Execution } from "./libraries/ExecutionLib.sol"; + +/** + * @title AGW — Agentic Wallet + * @notice The user's per-purpose agent wallet on Push Chain. It holds the budgeted funds and is + * `msg.sender` at the gateway, which is what binds it to its destination-chain account. + * + * @dev - Push Chain has no ERC-4337 EntryPoint, so this wallet builds the operation and enforces + * the engine's verdict itself in `executeAsAgent`. + * - An ERC-7579 modular account restricted to validator modules; executor, fallback and + * hook modules are refused. A hook would run on the owner path and could block it. + * - `execute` is the owner door: no policy is ever consulted on it. + * - `executeAsAgent` is the agent door: callable only by the rules set's agent — a Push + * address (an EOA, or the UEA of an external key) — and every call is checked by the + * rules set's policy. + * - Deliberately near-stateless. A request exists only for the transaction that carries it. + */ +contract AGW is IAGW, ReentrancyGuardTransient { + using ModeLib for ModeCode; + + /// @dev ERC-7579 account id, in vendor.account.semver form. + string internal constant ACCOUNT_ID = "push.agw.1.0.0"; + + /// @dev The only ERC-7579 module type this account supports. + uint256 internal constant MODULE_TYPE_VALIDATOR = 1; + + /// @dev Gas stipend for a module's uninstall callback. + uint256 internal constant UNINSTALL_CALLBACK_GAS_STIPEND = 100_000; + + /// @dev Gas cap on the pre-uninstall state probe of the session engine. + uint256 internal constant ENGINE_STATE_PROBE_GAS = 30_000; + + /** + * @dev Maximum actions in one NATIVE rules set. `UNIVERSAL` is always exactly one. + * + * A SANITY BOUND, NOT A GAS BOUND — measured, a maximal 8x8 grant sits far inside the + * budget. It caps the O(n^2) duplicate scan below, the per-rules-set audit and UI surface a + * human has to reason about, and `revokeRules`'s engine-side cleanup cost. + * + * Lives HERE, not in `Types.sol`, because it is a wallet policy number that URP never + * reads — unlike the engine mirrors, which are shared. Do not confuse it with URP's + * `MAX_ACTIONS_PER_REQUEST` (10): that bounds multicall ENTRIES inside one universal + * payload, two layers down. Different layers, different numbers, never conflated. + */ + uint256 internal constant MAX_NATIVE_ACTIONS = 8; + + // The four wiring addresses, read through their UPPER_CASE() auto-getters. Resolved from the + // implementation's runtime bytecode, so every clone reads them correctly through delegatecall. + + /// @notice The permission engine this wallet installs as its default validator. + address public immutable SESSION_ENGINE; + + /// @notice The canonical action policy (URP) every rules set on this wallet must name. + address public immutable RULES_POLICY; + + /// @notice The canonical session validator every rules set on this wallet must name — the sender + /// validator that confirms the caller is the rules set's agent. + address public immutable SESSION_VALIDATOR; + + /// @notice The Push-side outbound gateway, the only target a universal agent action may reach. + address public immutable UNIVERSAL_GATEWAY_PC; + + /// @dev One-shot latch for initializeAccount. + bool private _initialized; + + /// @dev Monotonic salt source for permission ids; never reused. + uint64 private _grantNonce; + + /// @dev Owner-side checkpoints so far; also the `seq` of the latest `Checkpointed`. Packed in slot 0. + uint64 private _checkpointCount; + + /// @dev `block.number` of the latest checkpoint; zero before the first. Packed in slot 0. + uint64 private _lastCheckpointBlock; + + /// @dev The account's entire module registry. + mapping(address => bool) private _installedValidators; + + /// @dev Owner replay lanes for `executeWithSig`: lane key => next expected sequence number. + mapping(uint192 => uint64) private _nonces; + + /** + * @notice Sets the wallet's permanent wiring and locks the implementation itself. + * + * @dev - Reverts with `InvalidModuleAddress` if any of the four addresses is zero. + * - Sets the initialised latch, so the implementation can never be initialised or + * driven directly; only clones of it can. + * + * @param sessionEngine_ Permission engine installed as the default validator. + * @param rulesPolicy_ Canonical action policy every rules set must name. + * @param sessionValidator_ Canonical session validator every rules set must name. + * @param universalGatewayPC_ Push-side outbound gateway. + */ + constructor(address sessionEngine_, address rulesPolicy_, address sessionValidator_, address universalGatewayPC_) { + if ( + sessionEngine_ == address(0) || rulesPolicy_ == address(0) || sessionValidator_ == address(0) + || universalGatewayPC_ == address(0) + ) { + revert AGWErrors.InvalidModuleAddress(); + } + SESSION_ENGINE = sessionEngine_; + RULES_POLICY = rulesPolicy_; + SESSION_VALIDATOR = sessionValidator_; + UNIVERSAL_GATEWAY_PC = universalGatewayPC_; + + _initialized = true; + } + + /// @dev Reverts unless the caller is the clone's immutable-args owner. + modifier onlyOwner() { + if (msg.sender != _owner()) revert AGWErrors.CallerIsNotOwner(); + _; + } + + /** + * @dev Reverts unless the caller is the owner or the wallet itself. Applied to the three + * lifecycle functions only. + * + * - A batch entry targeting the wallet arrives with `msg.sender == address(this)`, so + * without this the owner's own one-signature change batch reverts against itself. + * - Widening to self is safe because self is reachable only through the owner door. From + * the agent door it is refused FOUR ways, in the order they fire: + * (a) at grant time, by `_requireGrantableTarget` — the wallet is never a grantable + * native action target; + * (b) at dispatch time, by the guard in `_gateAndDispatch` — which holds even for a + * session the owner enabled on the engine directly through the owner door, + * bypassing `grantRules` entirely; + * (c) by the engine's `NoPoliciesSet`, because (a) guarantees the wallet is never a + * configured action — true regardless of how many actions a rules set holds; + * (d) by the engine's `InvalidSelfCall`, for the `execute` selector specifically. + * (a) and (b) are never-delete tests. + * - Not applied to installModule or uninstallModule; nothing needs them batched. + */ + modifier onlyOwnerOrSelf() { + if (msg.sender != _owner() && msg.sender != address(this)) revert AGWErrors.CallerIsNotOwner(); + _; + } + + /** + * @dev Reads the owner out of the clone's immutable args. + * + * - Clone args are 40 bytes: owner at 0-19, factory at 20-39. + * - Read from bytecode on every call and never cached; a storage mirror of an immutable is + * drift surface. + * - Meaningful only on a clone. `Clones.fetchCloneArgs` is undefined on a non-clone, and on + * the implementation it returns a slice of that contract's own runtime bytecode. + * - No guard is added for the implementation case: every door on the implementation is + * already inert for an independent reason. + * + * @return The clone's owner. + */ + function _owner() internal view returns (address) { + return address(bytes20(Clones.fetchCloneArgs(address(this)))); + } + + /** + * @dev Reads the deploying factory out of the clone's immutable args. + * @return The factory recorded at clone creation. + */ + function _factory() internal view returns (address) { + bytes memory args = Clones.fetchCloneArgs(address(this)); + return address(bytes20(_slice20(args, 20))); + } + + /** + * @dev Reads 20 bytes at `start` out of a memory blob, without assuming a length. The + * short-blob branch is unreachable from the single call site and is expected to show as + * uncovered. + * + * @param data Blob to read from. + * @param start Byte offset to read at. + * @return out The 20 bytes at `start`, or zero if the blob is too short. + */ + function _slice20(bytes memory data, uint256 start) private pure returns (bytes20 out) { + if (data.length < start + 20) return bytes20(0); + assembly { + out := mload(add(add(data, 0x20), start)) + } + } + + /** + * @notice Factory-only, callable exactly once. Installs the session engine as the account's + * sole validator. + * + * @dev - Reverts with `CallerIsNotFactory` unless the caller is the clone's recorded factory. + * - Reverts with `AlreadyInitialized` if the latch is already set. + * - Sets the latch, marks the engine installed, then calls `onInstall("")` with full gas + * and bubbles any revert, so the factory's deploy transaction unwinds atomically. + * - Emits `ModuleInstalled`, then `AccountInitialized`. + * - Session data is never passed here; grants travel only through `grantRules`. + */ + function initializeAccount() external { + if (msg.sender != _factory()) revert AGWErrors.CallerIsNotFactory(); + if (_initialized) revert AGWErrors.AlreadyInitialized(); + + _initialized = true; + _installedValidators[SESSION_ENGINE] = true; + + IERC7579Module(SESSION_ENGINE).onInstall(""); + + emit ModuleInstalled(MODULE_TYPE_VALIDATOR, SESSION_ENGINE); + emit AccountInitialized(_owner(), SESSION_ENGINE); + } + + /** + * @notice The owner door. Executes a single call or a batch on the owner's behalf; no policy is + * ever consulted. + * + * @dev - Reverts unless the caller is the owner; reentrancy-guarded. + * - Reverts on any execution type other than default, and on any call type other than + * single or batch. + * - Reads no module, policy or engine state — only the immutable-args owner, its calldata, + * and the wallet's own checkpoint slot — so the door still works with the engine + * uninstalled, with a hostile validator installed, or in ghost-rules state. + * - Records one checkpoint per call, before the call (`_checkpointOwnerCall`). The write + * cannot revert. + * - The signature is frozen at `execute(bytes32,bytes)`: the session engine branches on + * this exact selector, and any other shape routes validation down a path where the + * action policy sees a hardcoded zero value instead of the real one. + * - Batch is required product surface: the permission-change flow is one owner signature + * batching a spend assertion, a revoke and a grant. + * - Dispatches through `_execute` and emits `OwnerExecuted`. + * - There is no separate withdraw function; withdrawal, revocation escort and incident + * response all run through this door. + * + * @param mode ERC-7579 mode word; call type and execution type are decoded from it. + * @param executionCalldata Encoded execution, single or batch according to `mode`. + */ + function execute(bytes32 mode, bytes calldata executionCalldata) external payable onlyOwner nonReentrant { + ModeCode m = ModeCode.wrap(mode); + (CallType callType, ExecType execType,,) = m.decode(); + + if (execType != EXECTYPE_DEFAULT) revert AGWErrors.UnsupportedExecutionMode(); + if (callType == CALLTYPE_SINGLE) { + (address target, uint256 value, bytes calldata callData) = ExecutionLib.decodeSingle(executionCalldata); + _checkpointOwnerCall(target, value, callData); + _execute(target, value, callData); + } else if (callType == CALLTYPE_BATCH) { + Execution[] calldata execs = ExecutionLib.decodeBatch(executionCalldata); + uint256 len = execs.length; + for (uint256 i; i < len;) { + _checkpointOwnerCall(execs[i].target, execs[i].value, execs[i].callData); + _execute(execs[i].target, execs[i].value, execs[i].callData); + unchecked { + ++i; + } + } + } else { + revert AGWErrors.UnsupportedExecutionMode(); + } + + emit OwnerExecuted(mode, keccak256(executionCalldata)); + } + + /** + * @dev Plain call, bubbling the callee's revert data verbatim. Shared by both doors so the agent + * path executes the exact validated bytes. + * + * @param target Address to call. + * @param value Native PC to send with the call. + * @param callData Calldata to pass, forwarded unchanged. + */ + function _execute(address target, uint256 value, bytes calldata callData) internal { + (bool ok, bytes memory ret) = target.call{ value: value }(callData); + if (!ok) { + assembly { + revert(add(ret, 0x20), mload(ret)) + } + } + } + + /** + * @dev Records one owner-side change: advances the counter, stamps the block, emits `Checkpointed`. + * + * - CANNOT REVERT except by running out of gas: an unchecked increment of a uint64 that cannot + * realistically reach 2^64, one write to the wallet's own slot 0, one event. No external call. + * That is what lets it sit on the owner doors and on the revocation path. + * - NEVER called from `_execute` or anywhere the agent door reaches. A checkpoint means "the + * owner side touched this wallet"; an agent that could tick it could always fake owner + * interference. + * + * @param kind What changed. + * @param ref Per-kind reference (see `IAGW.Checkpointed`). + */ + function _checkpoint(CheckpointKind kind, bytes32 ref) private { + uint64 seq; + unchecked { + seq = _checkpointCount + 1; + } + // forge-lint: disable-next-line(unsafe-typecast) + uint64 blockNumber = uint64(block.number); // a block number does not exceed 2^64 in practice + _checkpointCount = seq; + _lastCheckpointBlock = blockNumber; + emit Checkpointed(seq, kind, ref, blockNumber); + } + + /** + * @dev The owner-door tick for one call, taken BEFORE the call runs, so a consumer snapshotting the + * counter during that call already sees it, and any later call in the same batch moves it again. + * + * @param target The call's target. + * @param value The call's native value. + * @param callData The call's calldata. + */ + function _checkpointOwnerCall(address target, uint256 value, bytes calldata callData) private { + _checkpoint(CheckpointKind.OWNER_ACTION, keccak256(abi.encode(target, value, callData))); + } + + /** + * @notice The owner door, authorised by a signed OwnerIntent instead of `msg.sender`. Relayable. + * + * @dev - A THIRD door, separate from `execute`. `execute` reads no module, policy or engine + * state — only the immutable-args owner, its calldata and its own checkpoint slot — and + * remains the unblockable fallback. This door reads storage (the nonce lane) and may + * therefore fail where `execute` cannot. + * - The mode switch below is DUPLICATED from `execute`, not shared with it, so that no + * refactor can ever add a check to `execute`. + * - Checks, in order: deadline · `intent.wallet == this` · owner · presenter is + * `intent.executor` · owner lane · `mode` and a non-zero `execCalldataHash` match · + * nonce (consumed before the signature check; any revert unwinds it) · the owner's + * signature under the FACTORY's domain. + * - Single or batch, default exec type. No dispatch guard: this is owner authority, so a + * batch may call the wallet's own lifecycle functions through `onlyOwnerOrSelf`. + * - Records one checkpoint per call, before the call, exactly as `execute` does. + * - Emits `OwnerExecutedWithSig`. + * + * @param mode ERC-7579 mode word; must equal `intent.mode`. + * @param executionCalldata Encoded execution; its hash must equal `intent.execCalldataHash`. + * @param intent The owner's intent; the grant fields are ignored here. + * @param sig The owner's signature over `intent`. + */ + function executeWithSig( + bytes32 mode, + bytes calldata executionCalldata, + OwnerIntent calldata intent, + bytes calldata sig + ) external nonReentrant { + address owner_ = _requireIntentPresenter(intent); + + uint192 nonceKey = intent.nonceKey; + if (nonceKey & OWNER_LANE_FLAG == 0) revert AGWErrors.OwnerLaneRequired(nonceKey); + + bytes32 calldataHash = keccak256(executionCalldata); + if (intent.execCalldataHash == bytes32(0) || intent.execCalldataHash != calldataHash || intent.mode != mode) { + revert AGWErrors.IntentExecMismatch(calldataHash); + } + + uint64 expected = _nonces[nonceKey]; + if (intent.nonceSeq != expected) revert AGWErrors.InvalidNonce(nonceKey, expected, intent.nonceSeq); + _nonces[nonceKey] = expected + 1; + + _requireOwnerSig(owner_, intent, sig); + + (CallType callType, ExecType execType,,) = ModeCode.wrap(mode).decode(); + if (execType != EXECTYPE_DEFAULT) revert AGWErrors.UnsupportedExecutionMode(); + if (callType == CALLTYPE_SINGLE) { + (address target, uint256 value, bytes calldata callData) = ExecutionLib.decodeSingle(executionCalldata); + _checkpointOwnerCall(target, value, callData); + _execute(target, value, callData); + } else if (callType == CALLTYPE_BATCH) { + Execution[] calldata execs = ExecutionLib.decodeBatch(executionCalldata); + uint256 len = execs.length; + for (uint256 i; i < len;) { + _checkpointOwnerCall(execs[i].target, execs[i].value, execs[i].callData); + _execute(execs[i].target, execs[i].value, execs[i].callData); + unchecked { + ++i; + } + } + } else { + revert AGWErrors.UnsupportedExecutionMode(); + } + + emit OwnerExecutedWithSig(mode, calldataHash, nonceKey, intent.nonceSeq); + } + + /** + * @dev The checks every intent door shares, in order: deadline, wallet, owner, presenter. + * Returns the owner so the caller does not re-read the immutable args. + */ + function _requireIntentPresenter(OwnerIntent calldata intent) internal view returns (address owner_) { + if (block.timestamp > intent.deadline) revert AGWErrors.OwnerSigExpired(intent.deadline); + if (intent.wallet != address(this)) { + revert AGWErrors.IntentWalletMismatch(address(this), intent.wallet); + } + owner_ = _owner(); + if (intent.owner != owner_) revert AGWErrors.CallerIsNotOwner(); + if (intent.executor == address(0) || msg.sender != intent.executor) { + revert AGWErrors.ExecutorMismatch(intent.executor, msg.sender); + } + } + + /// @dev The owner's signature over `intent`, under the factory's domain. Last check before effects. + function _requireOwnerSig(address owner_, OwnerIntent calldata intent, bytes calldata sig) internal view { + if (!OwnerAuthLib.isOwnerSig(owner_, OwnerAuthLib.intentDigest(_factory(), intent), sig)) { + revert AGWErrors.InvalidOwnerSignature(); + } + } + + /** + * @notice Grants one rules set to an agent. One of exactly two lifecycle operations. + * + * @dev - Reverts unless the caller is the owner or the wallet itself. + * - Rejects any session that is not the one shape this wallet permits, all with + * `MalformedSessionShape`: any user-op policy present, any ERC-7739 content or policy, + * the ERC-4337 paymaster permit set, an action count other than one, an action whose + * target is not the gateway or whose selector is not the outbound send, an action + * policy set that is not exactly the canonical policy, or a session validator that is + * not the canonical one. + * - Rejects an agent config the session validator does not accept — anything but + * `abi.encode(address agent)` with a non-zero agent. The canonical validator's check + * never reverts; the call is still wrapped in a bare catch rather than a typed one, so a + * future validator's revert or compiler panic is absorbed as a refusal. Wrapping is + * correct here only because the external call already exists; the action policy's own + * decode is deliberately not wrapped, since there it would introduce one. + * - Refusing the paymaster permit keeps dead surface dead: setting it would write a live + * permit row into engine storage, and that row decides whether a non-empty + * `paymasterAndData` is rejected outright or instead requires a user-op policy to run, + * which this shape forbids. + * - Overwrites the caller's salt with the wallet's monotonic grant counter, so identical + * terms granted twice yield distinct permission ids and a replaced id never recurs. + * That is what makes a request built for a revoked rules set die on regrant. + * - Enables the session on the engine and emits `RulesGranted`. + * - Records a checkpoint (`RULES_GRANTED`). + * - Validates the session's shape only. The caps, allow-list and expiry inside the policy + * config are the policy's own concern; do not extend this into term validation. + * - Carries no reentrancy guard: the guard would trip on the owner's own change batch, + * and the engine's enable path never calls back into the account. + * + * - TAKES NO MANDATE TYPE. The kind of a rules set is DERIVED, not declared: each action's + * URP policy envelope is `abi.encode(uint16 version, string chain, bytes body)`, and the chain decides + * the rulebook — this chain means a Push-side call (NATIVE), any other means a call + * through the gateway (UNIVERSAL). The owner states a chain once, where they were + * already stating the terms; nobody states a mode anywhere. Every action must name the + * same chain, which is what makes a mixed rules set unrepresentable rather than merely + * forbidden. + * - The envelope is NOT REWRITTEN. The wallet reads one field and passes the caller's + * bytes to the engine untouched, so what URP validates is exactly what the owner + * reviewed. + * + * @param session The session to enable. Its `salt` field is ignored and overwritten. + * @return rulesId The engine's id for the newly enabled rules set. + * + * `rulesId` is the engine's `permissionId`. + */ + function grantRules(Session calldata session) external onlyOwnerOrSelf returns (bytes32 rulesId) { + return _grantRules(session); + } + + /** + * @notice `grantRules`, authorised by the owner's signed OwnerIntent instead of `msg.sender`. + * + * @dev - Checks, in order: deadline · `intent.wallet == this` · `intent.owner` is this wallet's + * owner · presenter is `intent.executor` (non-zero) · `sessionHash` is non-zero and is the + * hash of `session` · `grantNonce` is the current `_grantNonce` · the owner's signature under + * the FACTORY's domain. Then the entire `grantRules` body, unchanged. + * - `_grantNonce` advances on every grant, so an intent grants at most once and dies on any + * other grant. No new storage. + * - `sessionHash` covers the session AS SUPPLIED, salt included; the salt is then overwritten + * with the grant nonce exactly as on the owner path. + * - Unreachable from the agent door: the wallet is never a grantable action target, and the + * dispatch guard refuses `address(this)` whatever the selector. + * - No reentrancy guard, for the same reason `grantRules` has none. + * + * @param session The session to enable. + * @param intent The owner's intent; the exec fields are ignored here. + * @param sig The owner's signature over `intent`. + * @return rulesId The engine's id for the newly enabled rules set. + * + * `rulesId` is the engine's `permissionId`. + */ + function grantRulesWithSig(Session calldata session, OwnerIntent calldata intent, bytes calldata sig) + external + returns (bytes32 rulesId) + { + address owner_ = _requireIntentPresenter(intent); + + bytes32 sessionHash = keccak256(abi.encode(session)); + if (intent.sessionHash == bytes32(0) || intent.sessionHash != sessionHash) { + revert AGWErrors.IntentSessionMismatch(sessionHash); + } + if (intent.grantNonce != _grantNonce) { + revert AGWErrors.IntentGrantNonceMismatch(_grantNonce, intent.grantNonce); + } + _requireOwnerSig(owner_, intent, sig); + + return _grantRules(session); + } + + /** + * @dev The entire body `grantRules` always had, moved here unchanged so both entry points run the + * same checks in the same order with the same errors. See `grantRules` for the rules. + */ + function _grantRules(Session calldata session) internal returns (bytes32 rulesId) { + // ─── rules COMMON to both types, first ─── + + if (session.userOpPolicies.length != 0) revert AGWErrors.MalformedSessionShape(); + + if ( + session.erc7739Policies.allowedERC7739Content.length != 0 + || session.erc7739Policies.erc1271Policies.length != 0 + ) revert AGWErrors.MalformedSessionShape(); + + if (session.permitERC4337Paymaster) revert AGWErrors.MalformedSessionShape(); + + uint256 n = session.actions.length; + + // BEFORE THE DECODE, AND FOR BOTH MODES. The mode is derived from action 0's envelope, so + // action 0 must exist before anything can be derived: with no actions there is no envelope, + // no chain, and therefore no mode to report. A universal session with zero actions + // consequently reports `TooManyActions(0)`, not `MalformedSessionShape`. + if (n == 0) revert AGWErrors.TooManyActions(0); + + // THE POLICY-SHAPE CHECK RUNS BEFORE THE DECODE, ALWAYS. Decoding first would read an + // arbitrary policy's `initData` as though it were URP's. This ordering is load-bearing. + _requirePolicyShape(session.actions[0]); + (string memory chain, bytes32 chainHash) = _chainNamespaceOf(session.actions[0]); + + // ─── THE ENTIRE MODE DECISION. Nobody declared it. ─── + RulesType mode = PushChainLib.deriveMode(chainHash); + + // THE INVARIANT, STATED ONCE: a wrong POLICY is always `MalformedSessionShape`; a target + // wrong FOR THE DERIVED TYPE is always `RulesTypeMismatch`. Between the two branches + // there is no shape in which a gateway call reaches a native config, and none in which a + // native call reaches a universal one — which, with URP's N3 and gate 3 at runtime, is the + // whole consistency argument. One chain per rules set makes mixed rules sets unrepresentable. + + if (mode == RulesType.UNIVERSAL) { + // `n != 1` BEFORE the target check, as before. A malformed chain string on a + // multi-action session therefore reports `MalformedSessionShape`, not a type mismatch. + if (n != 1) revert AGWErrors.MalformedSessionShape(); + + ActionData calldata a = session.actions[0]; + if (a.actionTarget != UNIVERSAL_GATEWAY_PC || a.actionTargetSelector != SEND_OUTBOUND_SELECTOR) { + revert AGWErrors.RulesTypeMismatch(mode, 0, a.actionTarget); + } + } else { + if (n > MAX_NATIVE_ACTIONS) revert AGWErrors.TooManyActions(n); + + // Hoisted: `_factory()` does an extcodecopy of the clone's own bytecode on every call. + address factoryAddr = _factory(); + + for (uint256 i; i < n;) { + ActionData calldata a = session.actions[i]; + + _requireGrantableTarget(a.actionTarget, factoryAddr, i); + _requireGrantableSelector(a.actionTargetSelector); + + // Action 0's shape and chain were read above; re-reading would waste ~900 gas. + // EVERY action must name the same chain — that is what makes "one rules set, one + // mode" true by construction rather than by a rule. + if (i != 0) { + _requirePolicyShape(a); + (, bytes32 h) = _chainNamespaceOf(a); + if (h != chainHash) revert AGWErrors.InconsistentChain(i); + } + + // O(n^2) by design: 28 comparisons at the n=8 ceiling, which beats a mapping and its + // clear-down. Two identical (target, selector) pairs would hash to one actionId. + for (uint256 j; j < i;) { + if ( + session.actions[j].actionTarget == a.actionTarget + && session.actions[j].actionTargetSelector == a.actionTargetSelector + ) { + revert AGWErrors.DuplicateAction(a.actionTarget, a.actionTargetSelector); + } + unchecked { + ++j; + } + } + + unchecked { + ++i; + } + } + } + + if (address(session.sessionValidator) != SESSION_VALIDATOR) { + revert AGWErrors.MalformedSessionShape(); + } + + try IAgentValidator(SESSION_VALIDATOR).validateConfig(session.sessionValidatorInitData) returns (bool ok) { + if (!ok) revert AGWErrors.MalformedSessionShape(); + } catch { + revert AGWErrors.MalformedSessionShape(); + } + + Session memory sessionMem = session; + sessionMem.salt = bytes32(uint256(_grantNonce)); + // Checked on purpose: a wrapping counter would mean silent salt reuse. + _grantNonce++; + + Session[] memory sessions = new Session[](1); + sessions[0] = sessionMem; + PermissionId[] memory ids = ISmartSession(SESSION_ENGINE).enableSessions(sessions); + + rulesId = PermissionId.unwrap(ids[0]); + _checkpoint(CheckpointKind.RULES_GRANTED, rulesId); + emit RulesGranted(rulesId, mode, chainHash, chain); + } + + /** + * @dev The policy-shape rule, hoisted so it can run before each envelope decode. + * + * A SHAPE rule, so it raises `MalformedSessionShape` like every other shape rule. It is + * also the precondition for `_chainNamespaceOf`: without it, the decode below would be reading an + * arbitrary policy's `initData` as though URP had authored it. + * + * @param a The action whose policy slot is vetted. + */ + function _requirePolicyShape(ActionData calldata a) internal view { + if (a.actionPolicies.length != 1 || a.actionPolicies[0].policy != RULES_POLICY) { + revert AGWErrors.MalformedSessionShape(); + } + } + + /** + * @dev Reads ONE field of the policy envelope — the bounded exception to "the skeleton, not the + * organs". + * + * WHAT THIS IS NOT: it is not term validation. The wallet does not check caps, expiry, + * allow-list contents or anything else inside the body, and must never start. It reads the + * label on the jar: the one field that decides WHICH RULEBOOK the action belongs to, which + * is the wallet's own business because the wallet's target rules depend on it. URP + * re-derives the same value from the same bytes and remains the sole judge of the terms. + * + * CALLER MUST HAVE RUN `_requirePolicyShape` FIRST. + * + * Same decoder as URP's, deliberately (`abi.decode(initData, (uint16, string, bytes))`): + * two different readers of one security-relevant field is the drift this design exists to + * prevent. A malformed envelope reverts here, unnamed, and fails closed. The version is + * URP's to judge: it refuses anything but `ENVELOPE_VERSION` at init, inside this grant. + * + * @param a The action to read. + * @return chain The declared CAIP-2 string, e.g. `"eip155:11155111"`. + * @return chainHash Its keccak256, the value everything downstream compares. + */ + function _chainNamespaceOf(ActionData calldata a) internal pure returns (string memory chain, bytes32 chainHash) { + (, chain,) = abi.decode(a.actionPolicies[0].initData, (uint16, string, bytes)); + if (bytes(chain).length == 0) revert AGWErrors.EmptyChain(); + chainHash = keccak256(bytes(chain)); + } + + /** + * @dev Every grant-time target rule for a NATIVE action, in one place. + * + * TWO RULES, TWO ERRORS, AND THE DISTINCTION IS THE POINT: + * + * - **The gateway → `RulesTypeMismatch`.** The session is well-formed; the CHAIN the + * envelope declares is this chain, and a gateway call is not a Push-side call. A gateway + * target is perfectly grantable — under a foreign chain, as `UNIVERSAL`. Carries the + * action index, because with up to eight actions "something was wrong" is not a usable + * diagnostic. This is one half of the consistency lock; URP's N3 is the runtime mirror. + * - **The other seven → `ForbiddenActionTarget`.** Never grantable, under any type. + * + * Of those seven the severe pair is the wallet and the engine: from the agent door, + * `_execute(wallet, 0, grantRules(...))` would arrive with `msg.sender == address(this)`, + * pass `onlyOwnerOrSelf`, and the agent would have granted itself a rules set of its own + * design. `revokeAllRules` is the mirror. + * + * LAYER CREDIT, so nobody deletes the wrong one as redundant: the engine independently + * refuses `address(0)` and ITSELF at enable time (`ConfigLib.sol:139-143`), but it does NOT + * refuse `address(1)` there — only at check time. **This is the only grant-time layer for + * the fallback flag.** + * + * The action-policy check is deliberately NOT here. That is a SHAPE rule — it raises + * `MalformedSessionShape`, and the UNIVERSAL branch and the common rules raise the same + * error for the same class of defect. It belongs with them, not inside a target helper. + * + * @param t Action target to vet. + * @param factoryAddr The clone's factory, hoisted by the caller so the loop reads it once. + * `_factory()` does an extcodecopy of the clone's own bytecode; the other + * six comparands are immutables and are free to read here. + * @param index Index of this action, reported by `RulesTypeMismatch`. + */ + function _requireGrantableTarget(address t, address factoryAddr, uint256 index) internal view { + if (t == UNIVERSAL_GATEWAY_PC) { + revert AGWErrors.RulesTypeMismatch(RulesType.NATIVE, index, t); + } + if ( + t == address(0) || t == ENGINE_FALLBACK_TARGET || t == address(this) || t == SESSION_ENGINE + || t == RULES_POLICY || t == SESSION_VALIDATOR || t == factoryAddr + ) { + revert AGWErrors.ForbiddenActionTarget(t); + } + } + + /** + * @dev The grant-time forbidden-selector list for NATIVE actions. + * + * Refuses the engine's two fallback selectors by name. `0xFFFFFFFF` (value-only) is + * PERMITTED and is deliberately not on this list. + * + * @param s Action selector to vet. + */ + function _requireGrantableSelector(bytes4 s) internal pure { + if (s == ENGINE_FALLBACK_SELECTOR || s == ENGINE_FALLBACK_SELECTOR_SMARTSESSION) { + revert AGWErrors.ForbiddenActionSelector(s); + } + } + + /** + * @notice Revoke one rules set. The other lifecycle operation, and the emergency lever. + * + * @dev - Reverts unless the caller is the owner or the wallet itself. + * - Reverts with `UnknownPermission` if the id is not enabled, because the upstream + * removal silently no-ops on a ghost id and an operator must never read "revoked" + * while the rules set lives. + * - Removes the session and emits `RulesRevoked`. Revocation is immediate: removal clears + * the agent, so any request under the id fails `CallerIsNotAgent`. + * - Deliberately carries no reentrancy guard and no health probe: nothing that can fail + * belongs on the stop path, since blockable removal is the one regression this + * function can develop. It records a checkpoint (`RULES_REVOKED`) per removed id; that + * write cannot revert. + * + * @param rulesId The rules set to revoke. + * + * `rulesId` is the engine's `permissionId`. + */ + function revokeRules(bytes32 rulesId) external onlyOwnerOrSelf { + if (!ISmartSession(SESSION_ENGINE).isPermissionEnabled(PermissionId.wrap(rulesId), address(this))) { + revert AGWErrors.UnknownPermission(rulesId); + } + + ISmartSession(SESSION_ENGINE).removeSession(PermissionId.wrap(rulesId)); + + _checkpoint(CheckpointKind.RULES_REVOKED, rulesId); + emit RulesRevoked(rulesId); + } + + /** + * @notice Revokes every rules set on this wallet in one call. The incident-response lever. + * + * @dev - Reverts unless the caller is the owner or the wallet itself. + * - Snapshots the permission ids, removes each by id, and emits `RulesRevoked` per id. + * Removal is by id, so engine-side array shifting cannot disturb the snapshot. + * - Deliberately carries no reentrancy guard and no health probe, for the same reason as + * `revokeRules`. It records a checkpoint (`RULES_REVOKED`) per removed id; that write + * cannot revert. + * - Gas grows with permission count; wallets hold few permissions by design. + */ + function revokeAllRules() external onlyOwnerOrSelf { + PermissionId[] memory ids = ISmartSession(SESSION_ENGINE).getPermissionIDs(address(this)); + + uint256 len = ids.length; + for (uint256 i; i < len;) { + ISmartSession(SESSION_ENGINE).removeSession(ids[i]); + _checkpoint(CheckpointKind.RULES_REVOKED, PermissionId.unwrap(ids[i])); + emit RulesRevoked(PermissionId.unwrap(ids[i])); + unchecked { + ++i; + } + } + } + + /** + * @notice The agent door. Callable only by the rules set's agent; every call is checked by the + * rules set's policy before it runs. + * + * @dev This chain has no EntryPoint, so this function does the EntryPoint's work, in order: + * 1. reject if the session engine is no longer installed + * 2. reject unless `msg.sender` is the agent `rulesId` names on this wallet + * 3. build the operation, validate it through the engine, and enforce the verdict + * 4. reject any mode other than single and default, and the two forbidden targets + * 5. dispatch the exact validated bytes + * 6. emit `RulesActionAuthorized` + * + * - The agent is a Push address. An external key (EVM, Solana, anything) acts through its + * UEA, which verifies that key before calling here; this wallet verifies no signature. + * - Replay protection is the sender's own transaction nonce (an EOA's nonce, or the UEA + * payload's nonce). Expiry is the rules set's own (policy gate 2 / N2 / S2); an EOA + * transaction carries no per-request expiry, a UEA payload carries its `deadline`. + * - A request against a revoked rules set fails at step 2: removal clears the agent. + * - Not payable, but a validated request does move PC out of the wallet's own balance, + * bounded by the policy's per-call ceiling. + * - Any revert unwinds the whole transaction, including the policy's counters; dispatch + * is never wrapped in try/catch. + * - Mode is single-only here: batching lives inside the multicall payload, bounded by the + * policy. + * + * @param rulesId The rules set this call acts under. `rulesId` is the engine's + * `permissionId`. + * @param mode ERC-7579 mode word; must decode to single and default. + * @param executionCalldata Encoded single execution, dispatched byte-for-byte once validated. + */ + function executeAsAgent(bytes32 rulesId, bytes32 mode, bytes calldata executionCalldata) external nonReentrant { + if (!_installedValidators[SESSION_ENGINE]) { + revert AGWErrors.ValidatorNotInstalled(SESSION_ENGINE); + } + + if (msg.sender != _agentOf(rulesId)) revert AGWErrors.CallerIsNotAgent(rulesId, msg.sender); + + bytes32 callsHash = keccak256(executionCalldata); + + _validate(rulesId, mode, executionCalldata, callsHash); + + _gateAndDispatch(mode, executionCalldata); + + emit RulesActionAuthorized(rulesId, msg.sender, callsHash); + } + + /** + * @dev Gates the mode to single and default, then dispatches the validated execution unchanged. + * + * - The agent path never batches at the ERC-7579 layer; batching lives inside the multicall + * payload instead, bounded by the policy. + * - Split out for stack depth only. Inlined, this does not compile with the optimizer off, + * which is the configuration `forge coverage` uses. + * + * @param mode ERC-7579 mode word. + * @param executionCalldata Encoded single execution to dispatch. + */ + function _gateAndDispatch(bytes32 mode, bytes calldata executionCalldata) internal { + (CallType callType, ExecType execType,,) = ModeCode.wrap(mode).decode(); + if (callType != CALLTYPE_SINGLE || execType != EXECTYPE_DEFAULT) { + revert AGWErrors.UnsupportedExecutionMode(); + } + (address target, uint256 value, bytes calldata callData) = ExecutionLib.decodeSingle(executionCalldata); + + // ⚠️ THE DISPATCH GUARD — never-delete, and it belongs HERE, after validation. + // + // Two comparisons, no storage, no module or policy state. It holds regardless of how the + // session was enabled — including a session the owner enabled on the engine DIRECTLY + // through the owner door, bypassing `grantRules` and its forbidden-target list entirely. + // That path exists today and is legitimate; this is what stops it reaching the wallet's own + // lifecycle functions from the agent side. + // + // DO NOT MOVE IT BEFORE `_validate`. Placed earlier it would pre-empt the engine's own + // refusals and change which error surfaces, and the engine-target case only ever reaches + // this point through the fallback sentinel, which validation has to run to resolve. + if (target == address(this) || target == SESSION_ENGINE) { + revert AGWErrors.ForbiddenDispatchTarget(target); + } + + _execute(target, value, callData); + } + + /** + * @dev Builds the operation, validates it through the engine, and enforces the verdict. + * + * - Builds a `PackedUserOperation` for its ABI shape only, since there is no EntryPoint. The + * engine requires `sender` to equal `msg.sender` (the wallet); that is what makes the + * signature field below unforgeable. + * - The callData selector must be `execute(bytes32,bytes)`, because that is the only engine + * branch that decodes the mode and forwards the real decoded value to the action policy. + * Every other selector reaches the policy with the account as target and a hardcoded zero + * value, which would make the policy's value gate compare against nothing. + * - The signature field is `USE ‖ rulesId ‖ msg.sender`, written here and nowhere else. The + * session validator accepts it only when those 20 bytes are the rules set's agent. + * - `callsHash` is passed as the operation hash. Nothing verifies a signature over it; it is + * what the engine forwards to the validator, which ignores it. + * - Gas fields are zero and `paymasterAndData` must stay empty, or the engine's paymaster + * permit check reverts. The nonce field is zero: replay protection is the sender's own. + * - Enforces the returned authorizer and time window itself — the EntryPoint's job, and what + * makes the policy's expiry gate real rather than decorative. + * - The engine runs the action policy before it consults the session validator, so policies + * still see calldata the engine has not yet authenticated; the wallet's own agent check + * has already run by then. + * - Performs exactly one external call, to the engine. Split out for stack depth. + * + * @param rulesId The rules set, written into the signature field. + * @param mode ERC-7579 mode word, re-encoded into the operation's calldata. + * @param executionCalldata Execution calldata, re-encoded into the operation's calldata. + * @param callsHash `keccak256(executionCalldata)`, passed as the operation hash. + */ + function _validate(bytes32 rulesId, bytes32 mode, bytes calldata executionCalldata, bytes32 callsHash) internal { + PackedUserOperation memory op; + op.sender = address(this); + op.nonce = 0; + op.initCode = ""; + op.callData = abi.encodeWithSelector(this.execute.selector, mode, executionCalldata); + op.accountGasLimits = bytes32(0); + op.preVerificationGas = 0; + op.gasFees = bytes32(0); + op.paymasterAndData = ""; + op.signature = abi.encodePacked(SmartSessionMode.USE, rulesId, msg.sender); + + uint256 vd = ValidationData.unwrap(ISmartSession(SESSION_ENGINE).validateUserOp(op, callsHash)); + + address authorizer = address(uint160(vd)); + uint48 validUntil = uint48(vd >> 160); // 0 = unbounded + uint48 validAfter = uint48(vd >> 208); + + if (authorizer != address(0)) revert AGWErrors.ValidationFailed(authorizer); + if (block.timestamp < validAfter) revert AGWErrors.OutsideTimeWindow(validAfter, validUntil); + if (validUntil != 0 && block.timestamp > validUntil) { + revert AGWErrors.OutsideTimeWindow(validAfter, validUntil); + } + } + + /** + * @dev The agent `rulesId` names on this wallet, or `address(0)` if it names none. + * Zero when the id is unknown or revoked (removal clears the config), when its session + * validator is not the canonical one, or when its config is malformed. One external view + * call to the engine; decodes through the same library the validator enforces with. + * @param rulesId The rules set to look up. + * @return The agent's Push address, or zero. + */ + function _agentOf(bytes32 rulesId) internal view returns (address) { + (address sessionValidator_, bytes memory config) = ISmartSessionConfigReader(SESSION_ENGINE) + .getSessionValidatorAndConfig(address(this), PermissionId.wrap(rulesId)); + if (sessionValidator_ != SESSION_VALIDATOR) return address(0); + return AgentConfigLib.decode(config); + } + + /** + * @notice Installs a validator module. + * + * @dev - Reverts unless the caller is the owner; reentrancy-guarded. + * - Rejects any module type but validator, the zero address, an address with no code, + * and a module that is already installed. + * - Marks the module installed, calls `onInstall` with full gas and bubbles any revert, + * then emits `ModuleInstalled`. + * - Exists as the recovery lever: a corrected validator can be installed on an existing + * wallet without moving addresses or funds. + * + * @param moduleTypeId ERC-7579 module type; only the validator type is accepted. + * @param module Module to install. + * @param initData Opaque data forwarded to the module's `onInstall`. + */ + function installModule(uint256 moduleTypeId, address module, bytes calldata initData) + external + onlyOwner + nonReentrant + { + if (moduleTypeId != MODULE_TYPE_VALIDATOR) { + revert AGWErrors.UnsupportedModuleType(moduleTypeId); + } + if (module == address(0) || module.code.length == 0) revert AGWErrors.InvalidModuleAddress(); + if (_installedValidators[module]) revert AGWErrors.ModuleAlreadyInstalled(module); + + _installedValidators[module] = true; + + IERC7579Module(module).onInstall(initData); + + emit ModuleInstalled(moduleTypeId, module); + } + + /** + * @notice Uninstalls a validator module. Removal always proceeds. + * + * @dev - Reverts unless the caller is the owner; reentrancy-guarded. + * - Rejects any module type but validator, and a module that is not installed. + * - If and only if the module is the session engine, probes its initialised state under + * a gas cap and refuses removal while it still holds permissions. Uninstalling the + * engine with live permissions would run its cleanup loop out of gas and leave rows it + * then refuses to reinstall over, so the guard forces a `revokeAllRules` first. + * - Unmarks the module before calling back, so a module can never block its own removal. + * - Calls `onUninstall` under a stipend inside try/catch, emitting + * `UninstallCallbackFailed` if it reverts or exhausts the stipend, then emits + * `ModuleUninstalled`. + * - The probe is scoped to the engine alone, so a hostile third-party validator can + * never block its own removal. + * - A probe that reverts or runs out of gas proceeds with removal: the guard exists to + * prevent an ordering mistake, not to make a broken engine permanent. + * + * @param moduleTypeId ERC-7579 module type; only the validator type is accepted. + * @param module Module to uninstall. + * @param deInitData Opaque data forwarded to the module's `onUninstall`. + */ + function uninstallModule(uint256 moduleTypeId, address module, bytes calldata deInitData) + external + onlyOwner + nonReentrant + { + if (moduleTypeId != MODULE_TYPE_VALIDATOR) { + revert AGWErrors.UnsupportedModuleType(moduleTypeId); + } + if (!_installedValidators[module]) revert AGWErrors.ValidatorNotInstalled(module); + + if (module == SESSION_ENGINE) { + (bool ok, bytes memory ret) = module.staticcall{ gas: ENGINE_STATE_PROBE_GAS }( + abi.encodeCall(ISmartSession.isInitialized, (address(this))) + ); + if (ok && ret.length >= 32 && abi.decode(ret, (bool))) { + revert AGWErrors.EngineStillHoldsPermissions(); + } + } + + _installedValidators[module] = false; + + try IERC7579Module(module).onUninstall{ gas: UNINSTALL_CALLBACK_GAS_STIPEND }(deInitData) { } + catch { + emit UninstallCallbackFailed(module); + } + + emit ModuleUninstalled(moduleTypeId, module); + } + + /** + * @notice Whether `module` is installed under `moduleTypeId`. + * @param moduleTypeId ERC-7579 module type to query. + * @param module Module to query. + * @return True only for an installed validator. + */ + function isModuleInstalled(uint256 moduleTypeId, address module, bytes calldata) external view returns (bool) { + return moduleTypeId == MODULE_TYPE_VALIDATOR && _installedValidators[module]; + } + + /** + * @notice Whether this account supports an ERC-7579 module type. + * @param moduleTypeId Module type to query. + * @return True only for the validator type. + */ + function supportsModule(uint256 moduleTypeId) external pure returns (bool) { + return moduleTypeId == MODULE_TYPE_VALIDATOR; + } + + /** + * @notice Whether this account supports an ERC-7579 execution mode. + * @dev Answers for the account as a whole; the agent door additionally restricts itself to + * single calls. + * @param mode ERC-7579 mode word to query. + * @return True for default execution in single or batch call type. + */ + function supportsExecutionMode(bytes32 mode) external pure returns (bool) { + (CallType callType, ExecType execType,,) = ModeCode.wrap(mode).decode(); + if (execType != EXECTYPE_DEFAULT) return false; + return callType == CALLTYPE_SINGLE || callType == CALLTYPE_BATCH; + } + + /// @notice The wallet's owner, read from the clone's immutable args. + function owner() external view returns (address) { + return _owner(); + } + + /// @notice The factory that deployed this wallet. + function factory() external view returns (address) { + return _factory(); + } + + /** + * @notice Next expected sequence number in an owner lane (`OWNER_LANE_FLAG` set), consumed by + * `executeWithSig`. The agent door uses no nonce lanes. + * @param nonceKey Replay lane to query. + * @return The sequence number the next intent in that lane must carry. + */ + function getNonce(uint192 nonceKey) external view returns (uint64) { + return _nonces[nonceKey]; + } + + /// @notice The salt the next grant will use. + function grantNonce() external view returns (uint64) { + return _grantNonce; + } + + /** + * @notice The agent a rules set names on this wallet, or zero if it names none. + * @dev Zero for an unknown or revoked id, for a session the owner enabled on the engine + * directly with a non-canonical session validator, and for a malformed config. Such a + * rules set cannot be used through `executeAsAgent`. + * @param rulesId The rules set to look up. `rulesId` is the engine's `permissionId`. + * @return The agent's Push address, or zero. + */ + function agentOf(bytes32 rulesId) external view returns (address) { + return _agentOf(rulesId); + } + + /** + * @notice Owner-side checkpoints so far. Compare against a snapshot to learn whether the owner side + * touched this wallet since: any owner-door call, grant or revoke moves it; agent actions + * never do. + * @return The number of checkpoints recorded. + */ + function checkpointCount() external view returns (uint64) { + return _checkpointCount; + } + + /** + * @notice `block.number` of the latest checkpoint, or zero if none. A convenience only: consumers + * must compare COUNTS, because several checkpoints can share a block with their snapshot. + * @return The block number of the latest checkpoint. + */ + function lastCheckpointBlock() external view returns (uint64) { + return _lastCheckpointBlock; + } + + /// @notice The OwnerIntent domain separator this wallet verifies against, for a signer on + /// `signerChainId`. Identical to the factory's: the factory is the verifying contract. + function domainSeparator(uint256 signerChainId) external view returns (bytes32) { + return OwnerAuthLib.domainSeparator(_factory(), signerChainId); + } + + /// @notice The ERC-7579 account id, in vendor.account.semver form. + function accountId() external pure returns (string memory) { + return ACCOUNT_ID; + } + + /// @dev Accepts PC with no logic; the wallet pays outbound gas swaps from its own balance and + /// refunds land here. + receive() external payable { } + + /// @notice Accepts ERC-721 transfers, so destination-side refunds and NFTs can land. + function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) { + return this.onERC721Received.selector; + } + + /// @notice Accepts ERC-1155 transfers, so destination-side refunds and NFTs can land. + function onERC1155Received(address, address, uint256, uint256, bytes calldata) external pure returns (bytes4) { + return this.onERC1155Received.selector; + } + + /// @notice Accepts batched ERC-1155 transfers, so destination-side refunds and NFTs can land. + function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata) + external + pure + returns (bytes4) + { + return this.onERC1155BatchReceived.selector; + } + + /** + * @notice ERC-165 support check. + * + * @dev - Reports ERC-165 and the two token-receiver interfaces only. + * - Deliberately does not report `IERC7579Account`: this account implements that + * interface partially, so advertising it would mislead the tooling that probes for it. + * Tooling detects the account through `accountId`, `supportsModule` and + * `supportsExecutionMode` instead. + * + * @param interfaceId Interface id to query. + * @return True for the three supported interfaces. + */ + function supportsInterface(bytes4 interfaceId) external pure returns (bool) { + return interfaceId == type(IERC165).interfaceId // 0x01ffc9a7 + || interfaceId == 0x150b7a02 // IERC721Receiver + || interfaceId == 0x4e2312e0; // IERC1155Receiver + } + + /** + * @notice Always invalid: the wallet never signs as an ERC-1271 party. + * @dev A constant return, with no logic and no future hook. This is also what makes the + * engine's enable-mode grant path dead on these wallets. + * @return The ERC-1271 failure magic value. + */ + function isValidSignature(bytes32, bytes calldata) external pure returns (bytes4) { + return 0xffffffff; + } +} diff --git a/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/src/AGWFactory.sol b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/src/AGWFactory.sol new file mode 100644 index 00000000..704f1068 --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/src/AGWFactory.sol @@ -0,0 +1,355 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { AGWFactoryErrors } from "./libraries/Errors.sol"; + +import { Clones } from "@openzeppelin/contracts/proxy/Clones.sol"; + +import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import { + AccessControlDefaultAdminRulesUpgradeable +} from "@openzeppelin/contracts-upgradeable/access/extensions/AccessControlDefaultAdminRulesUpgradeable.sol"; +import { PausableUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; +import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; + +import { IAGWFactory } from "./interfaces/IAGWFactory.sol"; +import { IAGWInit } from "./interfaces/IAGWInit.sol"; +import { OwnerIntent } from "./libraries/Types.sol"; +import { OwnerAuthLib } from "./libraries/OwnerAuthLib.sol"; + +/** + * @title AGWFactory + * @notice Deploys `AGW` clones at addresses computable before deployment, and is the + * root of trust for wallet identity. + * + * @dev - Wallet addresses are deterministic and predictable before deployment, so counterfactual + * funding is a supported flow. + * - This registry is the only proof of a wallet's provenance: anyone can deploy a contract + * with a lying `owner()` view. The audit chain is destination account, wallet, this + * registry, owner. + * - The owner is the caller, or the signer of an `OwnerIntent` naming this owner, index and + * wallet, presented by the intent's `executor`. Deploying a wallet owned by someone else + * without that owner's signature is impossible. + * - Holds no funds, never touches a wallet after deployment, and has no setter for the + * wallet implementation. + * - Deployed behind an ERC-1967 UUPS proxy; the proxy address is the permanent, + * user-facing factory address and never changes across logic upgrades. + */ +contract AGWFactory is + Initializable, + AccessControlDefaultAdminRulesUpgradeable, + PausableUpgradeable, + UUPSUpgradeable, + IAGWFactory +{ + /// @dev Holder may pause wallet deployment. + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + /// @dev Holder may unpause wallet deployment. + bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); + + /** + * @dev Delay on the two-step admin transfer. + * + * - The admin's one real power is authorising a UUPS upgrade of this logic, which is the + * single action that can permanently strand counterfactually funded addresses. + * - The extension makes `grantRole` and `renounceRole` on the admin role revert, forcing + * the scheduled flow. + */ + uint48 internal constant DEFAULT_ADMIN_DELAY = 2 days; + + /// @dev All bases use ERC-7201 namespaced storage, so these three variables occupy slots 0, 1 + /// and 2. Order is frozen, and a layout test asserts it from `forge inspect` output. + + /// @dev owner => wallets deployed for them, doubling as the next index so a count and an index + /// can never drift apart. `uint96` matches `WalletRecord.index`, so no narrowing cast + /// exists anywhere in this contract. + mapping(address => uint96) internal _walletCount; + + /// @dev wallet => its record; a zero owner means not deployed by this factory. This is the + /// entire registry: existence, owner and index from one packed slot per wallet. + mapping(address => IAGWFactory.WalletRecord) internal _records; + + /** + * @notice The canonical AGW logic contract all clones delegate to. + * + * @dev - Written once, in `initialize`. There is no setter: a function able to rewrite this + * would silently move every predicted address and strand counterfactually funded + * wallets, with no migration path to recover them. + * - Declared last and appended to only. Every future variable goes after it, and nothing + * is inserted or reordered before it, or address derivation breaks with no remedy. + * - `internal`, exposed only through `walletImplementation()`, so no second + * auto-generated getter with a different selector exists. + */ + address internal _walletImplementation; + + // No storage gap: this is a leaf UUPS implementation, so a future version simply appends after + // _walletImplementation. + + /// @dev Locks the logic contract so it can never be initialised directly. + constructor() { + _disableInitializers(); + } + + /** + * @notice Configures the proxy. Callable once, at deployment. + * + * @dev - Reverts with `ZeroAddress` if either address is zero. + * - Sets the admin with the two-day transfer delay, initialises pausable, and records + * the wallet implementation. + * - Makes no external calls and deploys nothing. Pauser and operator membership are + * granted afterwards by the admin through the standard `grantRole`. + * + * @param admin Receives the default admin role. + * @param walletImplementation_ Logic contract every wallet clone will delegate to. + */ + function initialize(address admin, address walletImplementation_) external initializer { + if (admin == address(0) || walletImplementation_ == address(0)) revert AGWFactoryErrors.ZeroAddress(); + + __AccessControlDefaultAdminRules_init(DEFAULT_ADMIN_DELAY, admin); + __Pausable_init(); + // UUPSUpgradeable in OZ 5.7.0 has no initializer; calling one does not compile. + + _walletImplementation = walletImplementation_; + } + + /** + * @notice Deploys the caller's next agent wallet and initialises it. + * + * @dev - Reverts while paused, and with `ImplementationNotSet` if the wallet implementation + * is unset. The latter is reachable only on a proxy deployed without its atomic init + * call; without it, `Clones` would deploy a permanently uninitialisable clone. + * - Advances the caller's wallet count and writes the registry record before the single + * external call, which is what makes a reentrant deploy unable to reuse an index. + * There is deliberately no reentrancy guard; the effect ordering is the protection. + * - Salt is the owner and the factory-assigned sequential index only. Nothing + * rules-related enters the derivation. + * - The owner appears twice, in the salt and in the immutable args, on purpose; + * removing either changes every future address. + * - Calls `initializeAccount` on the new clone. Any revert bubbles and the whole + * deployment unwinds, so an uninitialised wallet can never exist on-chain. + * - Emits `WalletDeployed`. + * + * @param label Free-form label, emitted in the event and never stored. + * @return wallet Address of the newly deployed wallet. + */ + function deployWallet(string calldata label) external whenNotPaused returns (address wallet) { + address implementation = _walletImplementation; + if (implementation == address(0)) revert AGWFactoryErrors.ImplementationNotSet(); + + address owner = msg.sender; + wallet = _deploy(implementation, owner, _walletCount[owner], label); + } + + /** + * @notice Deploys wallet `intent.index` for `intent.owner`, on the owner's signature. + * + * @dev - The index is EXPLICIT and must equal the owner's current count, and `intent.wallet` must + * be the address this call deploys. So a signed intent is idempotent and unmovable: a + * replay fails on the index, and nobody can advance an owner's count without the owner's + * signature. + * - `msg.sender == intent.owner` needs no signature (the caller is the owner, exactly as in + * the single-argument form). Any other caller must be `intent.executor` (non-zero) and + * must carry the owner's signature, before the deadline. + * - Grant and exec fields of the intent are ignored here; the wallet checks those. + * - Every check runs before `_deploy`, which advances the count before its one external + * call — the same effect ordering the single-argument form relies on. + * + * @param intent The owner's intent. Only `owner`, `wallet`, `executor`, `index`, `deadline` and + * `signerChainId` are read here. + * @param sig The owner's signature over `intent`; ignored when the caller is the owner. + * @param label Free-form label, emitted and never stored. Not signed. + * @return wallet The deployed wallet. + */ + function deployWalletWithSig(OwnerIntent calldata intent, bytes calldata sig, string calldata label) + external + whenNotPaused + returns (address wallet) + { + address implementation = _walletImplementation; + if (implementation == address(0)) revert AGWFactoryErrors.ImplementationNotSet(); + + address owner = intent.owner; + if (owner == address(0)) revert AGWFactoryErrors.ZeroAddress(); + + uint96 index = intent.index; + uint96 next = _walletCount[owner]; + if (index != next) revert AGWFactoryErrors.IndexMismatch(next, index); + + address predicted = _predict(implementation, owner, index); + if (intent.wallet != predicted) revert AGWFactoryErrors.IntentWalletMismatch(predicted, intent.wallet); + + if (msg.sender != owner) { + if (intent.executor == address(0) || msg.sender != intent.executor) { + revert AGWFactoryErrors.ExecutorMismatch(intent.executor, msg.sender); + } + if (block.timestamp > intent.deadline) revert AGWFactoryErrors.SignatureExpired(intent.deadline); + if (!OwnerAuthLib.isOwnerSig(owner, OwnerAuthLib.intentDigest(address(this), intent), sig)) { + revert AGWFactoryErrors.InvalidOwnerSignature(); + } + } + + wallet = _deploy(implementation, owner, index, label); + } + + /// @inheritdoc IAGWFactory + function domainSeparator(uint256 signerChainId) external view returns (bytes32) { + return OwnerAuthLib.domainSeparator(address(this), signerChainId); + } + + /** + * @dev The deployment tail shared by `deployWallet` and `deployWalletWithSig`. BYTE-FOR-BYTE the logic the + * single-argument form always had: count advance → salt → args → clone → record → + * initializeAccount → event. Every caller has run all of its checks before calling this. + * + * - The count advances and the record is written before the single external call, which is + * what makes a reentrant deploy unable to reuse an index. + * - Salt and args are frozen forever: counterfactual funding relies on them. + */ + function _deploy(address implementation, address owner, uint96 index, string calldata label) + internal + returns (address wallet) + { + _walletCount[owner] = index + 1; + + bytes32 salt = keccak256(abi.encode(owner, index)); + // 40 bytes: owner at 0-19, factory at 20-39. Frozen forever. + bytes memory args = abi.encodePacked(owner, address(this)); + + wallet = Clones.cloneDeterministicWithImmutableArgs(implementation, args, salt); + + _records[wallet] = WalletRecord({ owner: owner, index: index }); + + IAGWInit(wallet).initializeAccount(); + + emit WalletDeployed(owner, index, wallet, label); + } + + /** + * @dev The address derivation, shared by `predictWallet` and `deployWalletWithSig`. + * Mirrors `_deploy`'s salt and args exactly; any divergence is a critical bug. + */ + function _predict(address implementation, address owner, uint96 index) internal view returns (address) { + bytes32 salt = keccak256(abi.encode(owner, index)); + bytes memory args = abi.encodePacked(owner, address(this)); + return Clones.predictDeterministicAddressWithImmutableArgs(implementation, args, salt, address(this)); + } + + /** + * @notice The address wallet `index` of `owner` has, or will have. + * + * @dev - Reverts with `ImplementationNotSet` if the implementation is unset, and with + * `IndexOutOfRange` if `index` is beyond the next deployable one. Funding an address + * further out than that would put money in a permanent hole. + * - Mirrors `deployWallet`'s salt and args derivation exactly. Any divergence between + * the two is a critical bug, because counterfactual funding relies on this answer. + * - `deployed` is derived from the sequential index rather than `extcodesize`, which + * would misreport during construction and cost more. + * + * @param owner Wallet owner to predict for. + * @param index Wallet index under that owner. + * @return wallet The deterministic address for that owner and index. + * @return deployed True if that wallet already exists. + */ + function predictWallet(address owner, uint256 index) external view returns (address wallet, bool deployed) { + address implementation = _walletImplementation; + if (implementation == address(0)) revert AGWFactoryErrors.ImplementationNotSet(); + + uint256 next = _walletCount[owner]; + if (index > next) revert AGWFactoryErrors.IndexOutOfRange(index, next); + + wallet = _predict(implementation, owner, uint96(index)); + deployed = index < next; + } + + /** + * @notice How many wallets `owner` has; also the index the next deploy will use. + * @dev Full enumeration is this call plus `predictWallet(owner, 0..count-1)`, which is why no + * per-owner wallet array is stored: it cannot be lost or desynced. + * @param owner Owner to count wallets for. + * @return The number of wallets deployed for that owner. + */ + function walletCount(address owner) external view returns (uint256) { + return _walletCount[owner]; + } + + /** + * @notice The owner of `wallet`, or address(0) if this factory did not deploy it. + * @param wallet Wallet to look up. + * @return The recorded owner, or the zero address. + */ + function ownerOf(address wallet) external view returns (address) { + return _records[wallet].owner; + } + + /** + * @notice True only for wallets this factory deployed. + * @param account Address to test. + * @return Whether this factory deployed it. + */ + function isWallet(address account) external view returns (bool) { + return _records[account].owner != address(0); + } + + /** + * @notice The wallet's index under its owner. + * @dev Reverts with `NotAWallet` rather than returning zero, because zero is a valid index. + * @param wallet Wallet to look up. + * @return Its index under its owner. + */ + function indexOf(address wallet) external view returns (uint256) { + WalletRecord memory record = _records[wallet]; + if (record.owner == address(0)) revert AGWFactoryErrors.NotAWallet(wallet); + return record.index; + } + + /** + * @notice The canonical wallet logic contract. + * @dev The only getter for it; the variable is `internal` precisely so no second, + * auto-generated getter exists. Exposed so the SDK can verify its local derivation + * mirror before showing a user an address to fund. + * @return The wallet implementation every clone delegates to. + */ + function walletImplementation() external view returns (address) { + return _walletImplementation; + } + + /** + * @notice Pauses wallet deployment. + * @dev - Gates `deployWallet` only. Views are never gated, and deployed wallets are + * unaffected, since the factory has no reach into them. + * - While paused, a user who funded a predicted address cannot deploy it. Availability + * only; funds are never lost. + */ + function pause() external onlyRole(PAUSER_ROLE) { + _pause(); + } + + /** + * @notice Resumes wallet deployment. + * @dev The role split is deliberate: pause is a cheap panic button, unpause a considered + * operational act. A pauser cannot unpause, and an operator cannot pause. + */ + function unpause() external onlyRole(OPERATOR_ROLE) { + _unpause(); + } + + /** + * @dev Authorises a UUPS upgrade of this logic contract. + * + * - Restricted to the default admin role; reverts with `ZeroAddress` on a zero + * implementation. + * - Every future logic upgrade must leave the salt formula, the immutable-args encoding, + * the value of `_walletImplementation` and the storage layout unchanged. Upgrades exist + * for logic bugs only; the address derivation is frozen forever. + * - New variables are appended after `_walletImplementation`; base contracts are never + * added, removed or reordered, and nothing may come to share that slot. + * - Not `view` although solc suggests it: the base declares `_authorizeUpgrade` non-view, + * and an override cannot add mutability restrictions the base does not have. + * + * @param newImplementation The logic contract being upgraded to. + */ + function _authorizeUpgrade(address newImplementation) internal override onlyRole(DEFAULT_ADMIN_ROLE) { + if (newImplementation == address(0)) revert AGWFactoryErrors.ZeroAddress(); + } +} diff --git a/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/src/libraries/Types.sol b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/src/libraries/Types.sol new file mode 100644 index 00000000..efef214a --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/src/libraries/Types.sol @@ -0,0 +1,544 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +/** + * @notice Mirror of push-chain-gateway .../libraries/TypesUGPC.sol + * @dev MUST match field-for-field and in order. Verified against + * contracts/evm-gateway/src/libraries/TypesUGPC.sol. + */ +struct UniversalOutboundTxRequest { + bytes recipient; // raw destination address on source chain (bytes for SVM compat) + address token; // PRC20 token address on Push Chain + uint256 amount; // amount to withdraw (burn on Push, unlock at origin) + uint256 gasLimit; // gas limit for fee quote; 0 = per-chain default + uint256 gasPrice; // gas price override; 0 = per-chain default + uint256 maxPCForGas; // max native PC for gas swap; 0 = no cap + bytes payload; // ABI-encoded calldata to execute on origin chain + address revertRecipient; // address to receive funds in case of revert +} + +/** + * @notice Mirror of push-chain-core .../libraries/Types.sol + * @dev Batch call entry for multicall execution. + */ +struct Multicall { + address to; + uint256 value; + bytes data; +} + +/// @dev bytes4(keccak256("UEA_MULTICALL")) — magic prefix for multicall payloads. +bytes4 constant MULTICALL_SELECTOR = bytes4(keccak256("UEA_MULTICALL")); + +/** + * @dev The two kinds of rules set. Declared by the owner at grant, asserted by the wallet, stored by + * URP as the config's mode. + * + * DECLARED ONCE, HERE, AND IMPORTED BY BOTH THE WALLET AND `IUniversalRulesPolicy`. Two enums with identical + * values that must always agree is the duplication this file exists to prevent — see the note + * on `SEND_OUTBOUND_SELECTOR` below. The wallet asserts the declared type against the action + * set at grant; URP stores it and branches on it at validation. They must be the same type. + * + * `UNIVERSAL` is the zero value, so an uninitialised slot reads as `UNIVERSAL`. That is why + * URP's `ModeSlot` carries an explicit `initialized` flag and never infers emptiness from the + * mode alone. + */ +enum RulesType { + UNIVERSAL, + NATIVE +} + +/** + * @dev Which destination VM a UNIVERSAL rules set targets. Derived by URP from the envelope's chain + * namespace prefix (`eip155:` / `solana:`) at config init; the wallet never reads it, because + * its grant rules are identical for every non-Push chain. + * + * `EVM` MUST STAY THE ZERO VALUE. URP's `ModeSlot` entries written before this enum existed + * read 0 in the byte that now holds it, and every one of them is an EVM rules set. + */ +enum VmFamily { + EVM, + SVM +} + +/** + * @dev Mirrors of engine constants that are not importable — `IdLib.VALUE_SELECTOR` is `internal` + * to a library, and the fallback flags are file-level constants in the vendored fork. + * + * MIRRORED, NOT GUESSED: each is pinned by a constant-mirror test against the upstream value, + * exactly as `MULTICALL_SELECTOR` is. If the fork moves, the test fails rather than the wallet + * silently permitting an action it means to forbid. + */ + +/// @dev `IdLib.VALUE_SELECTOR` — the action selector the engine assigns when calldata is under four +/// bytes. A native action carrying this selector is a value-only transfer with EMPTY calldata; +/// a no-argument function like `unstake()` still carries its own four bytes and is a normal +/// selector action. +bytes4 constant VALUE_SELECTOR = 0xFFFFFFFF; + +/// @dev `DataTypes.FALLBACK_TARGET_FLAG`. Refused by name at grant time: the engine does NOT reject +/// it at enable time (only at check time, `PolicyLib.sol:200`), so the wallet is the only +/// grant-time layer for this value. +address constant ENGINE_FALLBACK_TARGET = address(1); + +/// @dev `DataTypes.FALLBACK_TARGET_SELECTOR_FLAG` — the wildcard action's selector. +bytes4 constant ENGINE_FALLBACK_SELECTOR = 0x00000001; + +/// @dev `DataTypes.FALLBACK_TARGET_SELECTOR_FLAG_PERMITTED_TO_CALL_SMARTSESSION` — the sentinel that +/// routes a request to the engine itself. An agent reaching this could configure sessions. +bytes4 constant ENGINE_FALLBACK_SELECTOR_SMARTSESSION = 0x00000002; + +/** + * @dev The gateway's outbound entry point — the ONE selector an agent rules set may ever name. + * + * DECLARED HERE, BESIDE THE STRUCT IT TAKES, AND NOWHERE ELSE. The wallet's grant-shape check + * and the policy's request-decode gate must agree on this value exactly: the wallet refuses to + * grant a rules set naming any other selector, and the policy refuses to validate a request + * carrying any other selector. Two independently hand-typed copies of the same signature + * string is the kind of duplication that stays correct only until one of them is edited, and + * the failure would be silent in the safe direction for one contract and open in the other. + * + * The signature string spells out `UniversalOutboundTxRequest` field-for-field because that is + * how Solidity encodes a struct parameter into a selector. It is therefore load-bearing on the + * mirror above: reorder or retype a field there without editing this string and the selector + * silently stops matching the deployed gateway. + */ +bytes4 constant SEND_OUTBOUND_SELECTOR = + bytes4(keccak256("sendUniversalTxOutbound((bytes,address,uint256,uint256,uint256,uint256,bytes,address))")); + +/** + * @dev The owner's signed authorisation for up to three actions: deploy, grant, execute. + * + * SIGNED ONCE under the FACTORY's EIP-712 domain and verified by the factory and by every wallet + * it deploys. Each door checks only its own fields and advances its own nonce, so one signature + * serves each door exactly once. + * + * - Presentable ONLY by `executor`: every door, on its signature path, requires + * `intent.executor != address(0) && msg.sender == intent.executor`. Without that, anyone who saw + * the intent in calldata could drive the doors out of order and burn the owner's signature. + * - A zero `sessionHash` / `execCalldataHash` means "not authorised for that action". + * - EVERY FIELD IS IN THE TYPEHASH, IN DECLARATION ORDER. A field outside the typed data would + * guarantee the SDK and the contract disagree about what was signed. + * + * DECLARED HERE, beside the other values the factory and the wallet must agree on exactly. + */ +struct OwnerIntent { + address owner; // the wallet owner (UEA or EOA) + address wallet; // the wallet this intent is for — the predicted address if not yet deployed + address executor; // the ONLY msg.sender allowed to present this intent to a door + uint96 index; // wallet index under owner; deployWallet requires index == walletCount(owner) + bytes32 sessionHash; // keccak256(abi.encode(Session)) for grantRulesWithSig; 0 = no grant + bytes32 mode; // ERC-7579 mode word for executeWithSig + bytes32 execCalldataHash; // keccak256(executionCalldata) for executeWithSig; 0 = no exec + uint192 nonceKey; // owner lane for executeWithSig; must have OWNER_LANE_FLAG set + uint64 nonceSeq; // expected _nonces[nonceKey] at execution + uint64 grantNonce; // expected _grantNonce at grant + uint48 deadline; // unix seconds; all three doors reject after this + uint256 signerChainId; // EIP-712 domain.chainId the signer's wallet accepts — the owner's HOME chain +} + +/// @dev The struct string must list every OwnerIntent field, in declaration order, with its exact type. +bytes32 constant OWNER_INTENT_TYPEHASH = keccak256( + "OwnerIntent(address owner,address wallet,address executor,uint96 index,bytes32 sessionHash," + "bytes32 mode,bytes32 execCalldataHash,uint192 nonceKey,uint64 nonceSeq,uint64 grantNonce," + "uint48 deadline,uint256 signerChainId)" +); + +/** + * @dev The intent's EIP-712 domain. Five fields: + * - `chainId` is the SIGNER's home chain (`intent.signerChainId`), not Push: MetaMask refuses to + * sign typed data whose `domain.chainId` differs from the active chain. + * - `salt` is `bytes32(block.chainid)` — the Push chain id — which is what isolates one Push chain + * from another. + * - `verifyingContract` is the FACTORY PROXY for both the factory and every wallet; the wallet + * reads it from its immutable args. The `wallet` field stops cross-wallet replay. + */ +bytes32 constant OWNER_INTENT_DOMAIN_TYPEHASH = + keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)"); +bytes32 constant OWNER_INTENT_DOMAIN_NAME_HASH = keccak256("AGWFactory"); +bytes32 constant OWNER_INTENT_DOMAIN_VERSION_HASH = keccak256("1"); + +/** + * @dev Top bit of a uint192 nonce key. `executeWithSig` requires it SET: only owner lanes are ever + * consumed, and keys with it CLEAR are never touched. The agent door uses no nonce lanes at all — + * its replay protection is the sender's own transaction nonce. + */ +uint192 constant OWNER_LANE_FLAG = uint192(1) << 191; + +/** + * @dev The kinds of owner-side change the wallet records as a checkpoint (`IAGW.Checkpointed`). + * + * ORDINALS ARE A FROZEN WIRE FORMAT: indexers and evaluators read them. Append only — never + * reorder, never remove. A future kind (e.g. a binder) is appended as the next ordinal. + */ +enum CheckpointKind { + OWNER_ACTION, + RULES_GRANTED, + RULES_REVOKED +} + +// ─────────────────────── policy types (moved from IURP) ─────────────────────── + +/** + * @dev Maximum pinned arguments per native action. Bounds the N7 loop. + * + * FILE-LEVEL, NOT INSIDE THE INTERFACE — Solidity forbids variables in interfaces (solc 8274), + * and unlike `MAX_ACTIONS_PER_REQUEST` / `MAX_ALLOWED_CALLS` (which are `internal` to URP + * because they bound loops nobody off-chain constructs) this one bounds an array THE SDK + * BUILDS, so an encoder has to be able to see it. Parallel to `MULTICALL_SELECTOR` in + * `Types.sol`. + */ +uint256 constant MAX_PINS = 8; + +/** + * @dev Maximum tokens one UNIVERSAL rules set may list (EVM and SVM alike). Bounds the init duplicate + * check and the gate-5 scan. + * + * FILE-LEVEL FOR THE SAME REASON AS `MAX_PINS`: it bounds an array THE SDK BUILDS. + */ +uint256 constant MAX_ASSETS = 8; + +/** + * @dev The rules-envelope version URP accepts. Every action policy's `initData` is + * `abi.encode(uint16 version, string chainNamespace, bytes body)`, the same shape in every mode. + * URP reads the version from the FIRST WORD before decoding anything else and refuses any other + * value, so a body layout can change later under a new version without being misread. + * FILE-LEVEL so the SDK, which writes the envelope, can read it. + */ +uint16 constant ENVELOPE_VERSION = 1; + +/** + * @notice WIRE TYPE — one token a UNIVERSAL rules set may move, with its own caps. + * @param token The PRC20 ON PUSH (e.g. USDC.eth), never the destination chain's address: the + * gateway request carries the PRC20 and routes by it. Its `SOURCE_CHAIN_NAMESPACE()` + * must equal the rules set's chain, checked at init for every entry. + * @param maxPerCall Per-request ceiling, PRC20 base units. ZERO IS LEGAL and means "this token may + * route a request but never moves": the move-nothing rules set is one entry with a + * zero `maxPerCall`, never an empty list (an empty list would pin no chain). + * @param maxTotal Lifetime ceiling on the amount SENT OUT in this token. `type(uint256).max` = + * unlimited, with no special branch; zero means nothing may move. + */ +struct AssetCap { + address token; + uint256 maxPerCall; + uint256 maxTotal; +} + +/** + * @notice STORAGE TYPE — an `AssetCap` plus the counter URP owns. Never a wire type: a caller-set + * counter would be a granted head start on the cap. + * @param spent Lifetime amount sent out in this token, recorded before dispatch. Money coming back + * to the wallet never lowers it (URP cannot see inflows, and could not tell an agent's + * return from the owner's top-up); only `creditRevert` does. + */ +struct AssetCapState { + address token; + uint256 maxPerCall; + uint256 maxTotal; + uint256 spent; +} + +/// @param target far-chain contract +/// @param selector far-chain function +/// @param beneficiaryOffset byte offset of the beneficiary word in the inner calldata +/// @param hasBeneficiary false for calls with no beneficiary argument +/// @param maxValue per-entry native ceiling, DESTINATION-chain units (0 = non-payable) +struct AllowedCall { + address target; + bytes4 selector; + uint16 beneficiaryOffset; + bool hasBeneficiary; + uint256 maxValue; +} + +/** + * @notice WIRE TYPE — what a UNIVERSAL envelope's body encodes. Not a storage type. + * + * @dev ABSENT BY DESIGN, and each absence is the point: `initialized` (URP sets it), `spent` + * (URP owns it), and the chain (the envelope carries it, exactly once). The SDK used to + * type all three and URP overwrote them — a field whose only legal value is a + * placeholder is a field the caller fills in believing it matters. + * + * Mapped field-by-field onto the storage `Config` by `_store`. The storage struct's + * layout never moves; this one is free to change with the wire format. + */ +struct UniversalTerms { + uint48 validUntil; + address expectedCEA; + AssetCap[] assets; + uint256 maxGasPerCall; + AllowedCall[] allowedCalls; +} + +/// @param initialized set once, at initialisation; re-initialisation is refused +/// @param validUntil non-zero always (enforced at init); "never" = type(uint48).max, explicit +/// @param expectedCEA the wallet's destination account, committed at grant. The rules set's +/// chain is not stored here: it lives on `getMode(id, account).chainHash` +/// @param maxGasPerCall Push-native per-call ceiling on `msg.value`, in PC wei. It pays the protocol +/// fee AND the gas swap, despite the name (renamed from `maxPCPerCall` to +/// match the SDK) +/// @param assets 1..MAX_ASSETS permitted PRC20s, each with its own caps and its own `spent` +struct Config { + bool initialized; + uint48 validUntil; + address expectedCEA; + uint256 maxGasPerCall; + AssetCapState[] assets; + AllowedCall[] allowedCalls; +} + +// ───────────────────────── native mode structs ───────────────────────── + +/** + * @dev Per-config mode record. THE MODE DISCRIMINATOR, and the reason it is a struct rather than + * a bare enum: `RulesType.UNIVERSAL` is the zero value, so an empty storage slot reads as + * `UNIVERSAL` and could not be told apart from a real universal rules set. `initialized` is + * authoritative; `mode` is MEANINGLESS when it is false. + * @param initialized true once any rulebook has been written for this config + * @param mode which rulebook; only meaningful when `initialized` + * @param vm which destination VM a UNIVERSAL config targets; meaningless for NATIVE + */ +struct ModeSlot { + bool initialized; + RulesType mode; + /// @dev ADDED for the SVM rulebook, PLACED HERE ON PURPOSE. Declared between `mode` and + /// `chainHash` it packs into slot 0 at byte 2 — a byte no earlier implementation ever + /// wrote, so every existing entry reads 0 = `EVM`, which is what every existing entry + /// is. No existing member moves: `chainHash` stays at slot 1. Appending it after + /// `chainHash` would be equally safe and cost one more slot per grant; the layout test + /// pins label, slot, offset and type of all four members either way. + VmFamily vm; + /// @dev keccak256(bytes(chain)) as declared in the policy envelope. THE single chain record + /// for BOTH modes — universal stores the destination chain, native stores this chain's + /// own hash. Written at init, never zero on an initialised entry. + bytes32 chainHash; +} + +/** + * @dev One pinned argument of a native call. + * @param offset ABSOLUTE byte offset from byte 0 of the calldata, SELECTOR INCLUDED — so 4 is + * the first argument word, 36 the second, and so on. + * @param expected The full 32-byte word that must appear there. An address argument is + * left-padded by the ABI, so a non-zero high half is a MISMATCH, deliberately: + * full-word equality also proves the padding is clean, which masking would + * silently accept. + */ +struct ArgPin { + uint16 offset; + bytes32 expected; +} + +/** + * @dev Optional metering of a `uint256` argument read out of native calldata. + * @param enabled Whether to meter at all. A BOOL rather than "offset 0 means off", because + * offset 0 is a legal position — it just points inside the selector. + * @param offset Absolute byte offset of the amount word, selector included. + * @param maxPerCall Per-call ceiling. Zero is legal (a call that must carry amount zero). + * @param maxTotal Lifetime ceiling; `type(uint256).max` = unlimited, with no special branch. + */ +struct AmountRule { + bool enabled; + uint16 offset; + uint256 maxPerCall; + uint256 maxTotal; +} + +/** + * @dev The native rulebook for ONE (target, selector) action. One of these per action, so a + * rules set with eight actions holds eight of them under eight distinct config ids. + * + * @param initialized set once; re-initialisation is refused, as in universal mode + * @param validUntil non-zero and future (enforced at init); "never" = type(uint48).max + * @param target defensive copy of the action target, asserted at N4 + * @param selector defensive copy, asserted at N5. `0xFFFFFFFF` = value-only, which means + * EMPTY calldata — a no-argument function still carries four bytes + * @param maxValuePerCall Push-native per-call ceiling + * @param maxValueTotal Push-native lifetime ceiling; type(uint256).max = unlimited + * @param valueSpent lifetime native value metered, written effects-last + * @param amount optional calldata-amount metering + * @param amountSpent lifetime metered amount, written effects-last + * @param maxCalls 0 = unlimited; otherwise the lifetime call ceiling + * @param callsUsed calls consumed. ALWAYS increments on a successful check, including a + * zero-value zero-amount call — a call is a use, and the alternative + * makes `maxCalls` bypassable + * @param pins 0..MAX_PINS pinned argument words + */ +struct NativeConfig { + bool initialized; + uint48 validUntil; + address target; + bytes4 selector; + uint256 maxValuePerCall; + uint256 maxValueTotal; + uint256 valueSpent; + AmountRule amount; + uint256 amountSpent; + uint32 maxCalls; + uint32 callsUsed; + ArgPin[] pins; +} + +/** + * @notice WIRE TYPE — what a NATIVE envelope's body encodes. Not a storage type. + * + * @dev ABSENT BY DESIGN: `initialized`, `valueSpent`, `amountSpent` and `callsUsed` are all + * URP's own counters, zeroed at init. The SDK had to type four zeroes it did not own. + * + * SPLIT EVEN THOUGH ONLY THE UNIVERSAL SIDE FORCES IT. The SDK builds both; one struct + * with dead input fields sitting beside one without is precisely the inconsistency that + * let a since-removed chain field acquire four different conventions in one repository. + */ +struct NativeTerms { + uint48 validUntil; + address target; + bytes4 selector; + uint256 maxValuePerCall; + uint256 maxValueTotal; + AmountRule amount; + uint32 maxCalls; + ArgPin[] pins; +} + +// ───────────────────────── svm mode structs ───────────────────────── +// +// The third rulebook: a UNIVERSAL rules set whose destination is a `solana:*` chain. On Solana an +// outbound is ONE cross-program invocation — a target program, an ordered account list, and an +// instruction byte string — signed by the wallet's CEA (a PDA), not an EVM multicall. Every +// EVM-shaped gate (multicall walk, `address` target, `bytes4` selector, beneficiary word, per-entry +// value) is replaced by the shapes below. See `URP._checkSvm` for the gate list. + +/** + * @dev One allow-listed (program, instruction) pair. + * @param program Target program id, 32 bytes. + * @param discriminator Left-aligned instruction tag; only the first `discriminatorLen` bytes + * are compared. 8 for Anchor (`sha256("global:")[..8]`), 1 for + * SPL-style instruction indexes. + * @param discriminatorLen 1..8, or 0 iff `dataless`. + * @param dataless The instruction carries NO data. The only way to get a length-0 tag, + * and it forces `ix_data` to be EMPTY at check time — so a rule can never + * match an instruction its pins were not written for. + * @param maxAccounts 0 = unbounded; otherwise the request's account count must EQUAL it. + * Set to the IDL count for fixed-layout instructions so nothing can be + * appended behind the pinned positions. + */ +struct AllowedProgram { + bytes32 program; + bytes8 discriminator; + uint8 discriminatorLen; + bool dataless; + uint8 maxAccounts; +} + +/** + * @dev `accounts[accountIndex]` of a request matching rule `ruleIndex` must equal `expected`. + * The SVM counterpart of the EVM beneficiary pin: programs read accounts by POSITION, so a + * value-carrying position is pinned to an owner-committed key (the CEA, or one of its ATAs). + */ +struct SvmAccountPin { + uint8 ruleIndex; + uint8 accountIndex; + bytes32 expected; +} + +/// @dev How an `SvmDataPin` compares. Integers are LITTLE-ENDIAN (Borsh), `len` bytes wide. +enum SvmDataPinMode { + EQ, + GTE_LE, + LTE_LE, + RATIO_GTE_LE +} + +/** + * @dev A constraint on the `ix_data` of a request matching rule `ruleIndex`. + * - EQ `ix_data[off : off+len] == expected[0 : len]`, `len` 1..32, raw bytes, + * LEFT-ALIGNED: bytes of `expected` past `len` must be zero. + * - GTE_LE `uintLE(ix_data[off : off+len]) >= uint256(expected)`, `len` 1..8, + * RIGHT-ALIGNED integer: `expected` must fit in `len` bytes. + * - LTE_LE `uintLE(ix_data[off : off+len]) <= uint256(expected)`, same encoding. + * - RATIO_GTE_LE `uintLE(A) * den >= uintLE(B) * num`, A at `offset`, B at `offsetB`, both + * `len` bytes and both addressed with the same `fromEnd`; `expected` unused; + * `num` and `den` both non-zero. + * This is the min-out floor RELATIVE to the input amount — a static floor on + * the output alone is bypassed by an input equal to the whole balance. + * - fromEnd `offset` counts back from the END of `ix_data` to the field's START. + * Borsh serialises vectors before scalars, so trailing scalar arguments have + * stable from-end offsets and unstable from-start ones. Requires + * `offset >= len`. + */ +struct SvmDataPin { + uint8 ruleIndex; + bool fromEnd; + uint16 offset; + uint16 offsetB; + uint8 len; + SvmDataPinMode mode; + bytes32 expected; + uint64 num; + uint64 den; +} + +/** + * @notice WIRE TYPE — what a `solana:*` UNIVERSAL envelope's body encodes. Not a storage type. + * + * @dev ABSENT BY DESIGN, as in `UniversalTerms`: `initialized` and `spent` are URP's. + * + * @param validUntil non-zero, in the future (enforced at init); "never" = type(uint48).max + * @param expectedCEA the wallet's CEA on the destination: `PDA(["push_identity", wallet], + * gatewayProgram)`. Owner-committed — Solidity cannot derive a PDA. + * @param gatewayProgram the Push gateway program on the declared cluster. Owner-committed; the + * SDK sources it from the chain registry. Forbidden as a target: that + * route only returns the permitted asset to the owner's wallet, at the + * owner's rate-limit and gas cost. + * @param assets 1..MAX_ASSETS permitted PRC20s with their caps, exactly as `UniversalTerms`; + * amounts are PRC20 base units (lamports / SPL base units), and a request's + * amount must also fit Solana's u64 (S6b) + * @param maxGasPerCall Push-native per-call ceiling (protocol fee + gas swap budget), PC wei + * @param ceaAccounts every CEA-controlled account that HOLDS VALUE: the CEA, its ATA for EACH + * listed asset, its ATAs for allowed outputs. At most MAX_CEA_ACCOUNTS (16, + * the CEA included: room for all 8 assets plus 7 outputs). Each may appear in + * a request ONLY at a position the matched rule pins to it; a listed account + * no rule pins can never be passed at all. Unlisted accounts are not + * protected — the list is the owner's statement of what is worth taking. + * URP CANNOT CHECK that each listed asset's ATA is here (it cannot derive a + * Solana token account, and does not know a PRC20's mint): listing them is + * the SDK's job. Must contain `expectedCEA`; no zero, duplicate, or program + * entries. + * @param programs the allow-list; first match wins, made exact by the init ambiguity rule. + * ONE RULE PER (program, instruction), so ONE PINNED KEY PER POSITION: if a + * swap rule pins its input to the USDC account, USDT can never be that + * instruction's input. Using several listed tokens through one instruction + * means leaving the input unpinned and those token accounts unlisted, so + * only the output and price pins protect them. Multi-asset on Solana is + * strongest when different tokens are used by different instructions. + * @param pins account pins, each naming its rule + * @param dataPins `ix_data` pins, each naming its rule + */ +struct SvmTerms { + uint48 validUntil; + bytes32 expectedCEA; + bytes32 gatewayProgram; + AssetCap[] assets; + uint256 maxGasPerCall; + bytes32[] ceaAccounts; + AllowedProgram[] programs; + SvmAccountPin[] pins; + SvmDataPin[] dataPins; +} + +/** + * @dev The SVM rulebook — STORAGE type, lives inside `_svm`. + * @param initialized set once; re-initialisation is refused + * @param assets per-token caps and per-token `spent`, exactly as `Config.assets` + */ +struct SvmConfig { + bool initialized; + uint48 validUntil; + bytes32 expectedCEA; + bytes32 gatewayProgram; + uint256 maxGasPerCall; + AssetCapState[] assets; + bytes32[] ceaAccounts; + AllowedProgram[] programs; + SvmAccountPin[] pins; + SvmDataPin[] dataPins; +} diff --git a/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/src/policies/UniversalRulesPolicy.sol b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/src/policies/UniversalRulesPolicy.sol new file mode 100644 index 00000000..17799758 --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/contracts/push-agentic-wallets/src/policies/UniversalRulesPolicy.sol @@ -0,0 +1,1881 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { UniversalRulesPolicyErrors } from "../libraries/Errors.sol"; + +import { VALIDATION_SUCCESS } from "erc7579/interfaces/IERC7579Module.sol"; +import { ConfigId } from "smartsessions/DataTypes.sol"; +import { IActionPolicy, IPolicy } from "smartsessions/interfaces/IPolicy.sol"; +import { IERC165 } from "forge-std/interfaces/IERC165.sol"; +import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +import { IUniversalRulesPolicy } from "../interfaces/IUniversalRulesPolicy.sol"; +import { IPRC20Source } from "../interfaces/IPRC20Source.sol"; +import { PushChainLib } from "../libraries/PushChainLib.sol"; +import { + AllowedCall, + AllowedProgram, + ArgPin, + AssetCap, + AssetCapState, + Config, + MAX_ASSETS, + ENVELOPE_VERSION, + MAX_PINS, + ModeSlot, + Multicall, + MULTICALL_SELECTOR, + NativeConfig, + NativeTerms, + RulesType, + SEND_OUTBOUND_SELECTOR as GATEWAY_SEND_OUTBOUND_SELECTOR, + SvmAccountPin, + SvmConfig, + SvmDataPin, + SvmDataPinMode, + SvmTerms, + UniversalOutboundTxRequest, + UniversalTerms, + VALUE_SELECTOR, + VmFamily +} from "../libraries/Types.sol"; + +// Cluster-independent Solana program ids, never targets. Decoded from their base58 ids by tooling and +// pinned by `test_svm_forbiddenProgramConstantsMatchBase58` — do not hand-edit a hex word. FILE-LEVEL, +// not inside the contract, so that test can import them without inheriting all of URP: a harness that +// did so grew past the 24,576-byte limit and failed `make sizes`. Inlined either way; no runtime cost. +/// @dev `11111111111111111111111111111111` — a system transfer with the CEA as funder drains it. +bytes32 constant SYSTEM_PROGRAM = bytes32(0); +/// @dev `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA` — transfer/approve/close with CEA authority. +bytes32 constant SPL_TOKEN_PROGRAM = 0x06ddf6e1d765a193d9cbe146ceeb79ac1cb485ed5f5b37913a8cf5857eff00a9; +/// @dev `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb` — the same surface on Token-2022. +bytes32 constant TOKEN_2022_PROGRAM = 0x06ddf6e1ee758fde18425dbce46ccddab61afc4d83b90d27febdf928d8a18bfc; +/// @dev `Stake11111111111111111111111111111111111111` — withdraw with the CEA as authority. +bytes32 constant STAKE_PROGRAM = 0x06a1d8179137542a983437bdfe2a7ab2557f535c8a78722b68a49dc000000000; +/// @dev `BPFLoaderUpgradeab1e11111111111111111111111` — never a CEA action; refused outright. +bytes32 constant BPF_LOADER_UPGRADEABLE = 0x02a8f6914e88a1b0e210153ef763ae2b00c2b93d16c124d2c0537a1004800000; +/// @dev `AddressLookupTab1e1111111111111111111111111` — rent drain with the CEA as payer. +bytes32 constant ADDRESS_LOOKUP_TABLE = 0x0277a6af97339b7ac88d1892c90446f50002309266f62e53c118244982000000; + +/** + * @title UniversalRulesPolicy (URP) + * @notice The security boundary of the whole system: the only contract that ever inspects what an + * agent really does on the far chain. Everything else routes, stores, or signs. + * + * @dev - The engine identifies actions by hashing the Push-side target and selector, and every + * agent action is the same Push-side call, so to the engine a trade, a deposit and a theft + * are identical. What the user actually authorised lives two decode levels down, inside + * the payload. This policy opens it. + * - It is the fail-closed anchor: the engine requires at least one action policy per action + * (`PolicyLib.check`), so removing this one does not weaken a rules set, it kills every + * request under it. + * - No owner, no setters, no pause. Its three trust anchors are written once, at + * initialisation, and there is no function that can change them afterwards. + * - It never makes an external call, and writes only after every gate has passed. + * + * UPGRADEABLE, BEHIND A TRANSPARENT PROXY, AND THAT IS A DELIBERATE TRADE. This contract + * used to hold its trust anchors in immutables and describe itself as needing no trust at + * all. Immutables live in the implementation's bytecode, which a `delegatecall` never + * executes the constructor of, so upgradeability and immutables are mutually exclusive — + * they had to become storage. The consequence is worth stating plainly rather than + * discovering later: **URP's guarantees now hold subject to the proxy admin not being + * malicious.** An admin able to install new logic can rewrite every gate in this file. + * + * What that means in practice, and what it does NOT mean: + * - No function here can move `SESSION_ENGINE`, the gateway or the executor module. The + * only route to changing them is a full implementation swap by the admin. + * - The admin cannot reach `_configs` or `_credited` directly; it can only replace the code + * that reads them. Existing rules sets keep their caps until an upgrade says otherwise. + * - Storage layout is therefore load-bearing FOREVER. See the layout note on `__gap`. + * + * THE IMPLEMENTATION MUST NEVER BE INITIALISED DIRECTLY. Its constructor disables the + * initialiser for exactly that reason; an initialised implementation is a contract with a + * live config that the proxy does not know about. + */ +contract UniversalRulesPolicy is IUniversalRulesPolicy, Initializable { + /// @dev Maximum inner calls in one request. Bounds the gate-13 loop. + uint256 internal constant MAX_ACTIONS_PER_REQUEST = 10; + + /// @dev Maximum allow-list entries per config. Bounds the allow-list scan. + uint256 internal constant MAX_ALLOWED_CALLS = 32; + + /// @notice The gateway selector every agent action must carry. + /// @dev Part of this contract's ABI, so it stays a public constant. The value comes from the + /// shared gateway constant, so this policy and the wallet's grant-shape check cannot + /// disagree. + bytes4 public constant SEND_OUTBOUND_SELECTOR = GATEWAY_SEND_OUTBOUND_SELECTOR; + + /// @dev Smallest valid ABI encoding of a UniversalOutboundTxRequest argument list: + /// 32 (outer offset) + 256 (eight head words) + 32 + 32 (length words for the two empty + /// bytes fields). Do not hand-maintain: a test pins this against abi.encode of an empty + /// request, so a new struct field fails the build rather than loosening gate 4c. + uint256 internal constant MIN_OUTBOUND_BODY_LEN = 352; + + // ───────────────────────────── svm rulebook bounds ───────────────────────────── + + /// @dev Maximum allow-list entries per SVM config. Mirrors MAX_ALLOWED_CALLS. + uint256 internal constant MAX_ALLOWED_PROGRAMS = 32; + /// @dev Maximum account pins per SVM config. Bounds the S17 and S18 loops. + uint256 internal constant MAX_SVM_PINS = 16; + /// @dev Maximum ix_data pins per SVM config. + uint256 internal constant MAX_SVM_DATA_PINS = 8; + /// @dev Maximum CEA-controlled accounts an owner may list. Bounds the S18 loop. 16 = the CEA, one + /// token account per listed asset (MAX_ASSETS = 8) and up to 7 swap-output accounts. S18 gas + /// grows with the number actually listed, never with this bound. + uint256 internal constant MAX_CEA_ACCOUNTS = 16; + /// @dev Loop bound on a request's account list. Solana's transaction size limit bites first. + uint256 internal constant MAX_SVM_ACCOUNTS = 64; + /// @dev Loop bound on a request's instruction data. + uint256 internal constant MAX_SVM_IX_DATA = 1024; + + // The SVM payload grammar — the node's `decodePayload`, byte for byte: + // [u32 BE count][count × (pubkey32 ‖ is_writable u8)][u32 BE len][ix_data][u8 id][target32] + uint256 internal constant SVM_HEADER_LEN = 4; + uint256 internal constant SVM_ACCOUNT_LEN = 33; + uint256 internal constant SVM_LEN_FIELD = 4; + uint256 internal constant SVM_TRAILER_LEN = 33; + uint8 internal constant SVM_INSTRUCTION_EXECUTE = 2; + + // ───────────────────────────────── storage ───────────────────────────────── + // + // THE LAYOUT BELOW IS FROZEN. Behind a proxy, storage belongs to the proxy and outlives every + // implementation, so a new version may only APPEND — never reorder, never remove, never change + // a type. Doing so does not fail the build: it silently reinterprets live rules sets, which is + // the worst failure mode this system has. + // + // slot 0 UNIVERSAL_GATEWAY_PC + // slot 1 UNIVERSAL_EXECUTOR_MODULE + // slot 2 SESSION_ENGINE + // slot 3 _configs + // slot 4 _credited + // slot 5 _mode APPENDED 2026-09-09 (native mode) + // slot 6 _native APPENDED 2026-09-09 (native mode) + // slot 7 _svm APPENDED 2026-09-30 (svm rulebook) + // slots 8..49 __gap (uint256[42]) + // + // THE 2026-09-09 APPEND, AND WHY IT IS SAFE. `_mode` and `_native` were added AFTER `_credited` + // and `__gap` was shrunk 45 -> 43 in the same commit, so slots 0-4 are byte-identical to the + // deployed layout and `__gap` still ends at slot 49. Nothing that holds data moved. The + // alternative that was rejected — renaming `_configs` to `_universal` and inserting `_native` + // beside it — would have shifted `_credited` and silently reinterpreted the live idempotency + // set. Measured with `forge inspect` before the change, not assumed. + // + // `Initializable` adds nothing here: OZ 5.x keeps its initialisation flags in an ERC-7201 + // namespaced slot, not slot 0. A test pins this exact layout against solc's own output. + + /// @notice The one Push-side target any agent action may reach. + /// @dev Written once by `initialize`. No setter exists, here or anywhere. + address public UNIVERSAL_GATEWAY_PC; + + /// @notice The sole caller permitted to credit a failed outbound. + /// @dev Address unconfirmed against a live deployment; confirm before mainnet. It is an + /// initialiser argument, so nothing about building or testing depends on the real one. + address public UNIVERSAL_EXECUTOR_MODULE; + + /// @notice The multiplexer this contract trusts on every non-engine-driven path. + /// @dev Never accepted as a call argument: a wrong value would silently address an empty + /// slice. It is set once at initialisation and read from storage thereafter. + address public SESSION_ENGINE; + + /// @dev configId => multiplexer (the engine) => account (the wallet) => config. + /// @dev The configId already binds the account and the permission, so the middle level isolates + /// callers, not permissions. + /// @dev On the two engine-driven entry points the multiplexer is msg.sender; every other + /// function keys on SESSION_ENGINE. + mapping(ConfigId => mapping(address => mapping(address => Config))) internal _configs; + + /// @dev outbound tx id => credited already; idempotency for the refund path. + mapping(bytes32 => bool) internal _credited; + + /// @dev configId => multiplexer => account => which rulebook this config uses. + /// @dev THE MODE DISCRIMINATOR. Stored rather than derived from `_native[...].initialized`, + /// because a one-bit derived mode cannot grow: URP is upgradeable behind a proxy, and the + /// register's extensibility item points at MORE MODES. `ModeSlot.initialized` is + /// authoritative for emptiness; `mode` is meaningless when it is false. + mapping(ConfigId => mapping(address => mapping(address => ModeSlot))) internal _mode; + + /// @dev configId => multiplexer => account => the native rulebook. + /// @dev One entry per ACTION, not per rules set: a native rules set with eight actions writes eight + /// of these under eight distinct config ids. + mapping(ConfigId => mapping(address => mapping(address => NativeConfig))) internal _native; + + /// @dev configId => multiplexer => account => the SVM rulebook. + /// @dev APPENDED 2026-09-30 after `_native`; `__gap` shrunk 43 -> 42 in the same commit so it + /// still ends at slot 49. Slots 0-6 are byte-identical to the deployed layout. `ModeSlot` + /// gained a packed byte in the same change (see `ModeSlot.vm`); no member of any live + /// struct moved. Measured with the layout tests, not assumed. + mapping(ConfigId => mapping(address => mapping(address => SvmConfig))) internal _svm; + + /** + * @dev Reserved so a later version can add state without shifting anything above. + * + * Adding a variable means DECREMENTING this by exactly the number of slots consumed, in + * the same commit. A mapping or dynamic array costs one slot; a struct costs its packed + * size. `Config` itself lives inside a mapping, so APPENDING a field to that struct is + * safe and costs nothing here — reordering or removing one is not. + * + * Was `uint256[45]` before the 2026-09-09 native-mode append; `_mode` and `_native` took + * two slots, so it became 43. `_svm` took one more on 2026-09-30, so it is 42. `__gap` + * still ends at slot 49. + */ + uint256[42] private __gap; + + /** + * @notice Locks the implementation so it can never be initialised in its own context. + * + * @dev An implementation left initialisable is a live contract holding a config the proxy + * has no knowledge of. This is the standard guard and it is not optional. + */ + constructor() { + _disableInitializers(); + } + + /** + * @notice Pins the three addresses this policy trusts for its whole lifetime. + * + * @dev Runs once, in the PROXY's context, immediately after deployment. Reverts with + * `ZeroAddress` if any argument is zero, and with `InvalidInitialization` on any + * second call. + * + * Deploy and initialise atomically — pass this call as the TransparentUpgradeableProxy + * constructor's `_data`. A proxy deployed uninitialised is front-runnable: whoever + * calls `initialize` first chooses the engine this policy trusts. + * + * @param universalGatewayPC The one Push-side target agent actions may reach. + * @param universalExecutorModule The only caller permitted to credit a failed outbound. + * @param sessionEngine The multiplexer trusted on non-engine-driven paths. + */ + function initialize(address universalGatewayPC, address universalExecutorModule, address sessionEngine) + external + initializer + { + if (universalGatewayPC == address(0)) revert UniversalRulesPolicyErrors.ZeroAddress(); + if (universalExecutorModule == address(0)) revert UniversalRulesPolicyErrors.ZeroAddress(); + if (sessionEngine == address(0)) revert UniversalRulesPolicyErrors.ZeroAddress(); + + UNIVERSAL_GATEWAY_PC = universalGatewayPC; + UNIVERSAL_EXECUTOR_MODULE = universalExecutorModule; + SESSION_ENGINE = sessionEngine; + } + + /** + * @dev The mode of a config, from its `ModeSlot`, which every init writes. Read by every + * mode-sensitive entry point that is not `checkAction`. + * + * @return initialized true once any rulebook has been written for this config + * @return mode the rulebook; meaningless when `initialized` is false + */ + function _modeOf(ConfigId id, address mux, address account) + internal + view + returns (bool initialized, RulesType mode) + { + ModeSlot storage slot = _mode[id][mux][account]; + return (slot.initialized, slot.mode); + } + + /// @dev The family of a UNIVERSAL config. Meaningless for NATIVE and for empty slots; callers check + /// the mode first. + function _vmOf(ConfigId id, address mux, address account) internal view returns (VmFamily) { + return _mode[id][mux][account].vm; + } + + /** + * @notice Writes one permission's configuration. Reached inside `enableSessions` during the + * wallet's `grantRules`, where `msg.sender` becomes the multiplexer key. + * + * @dev - Refuses re-initialisation, a deliberate deviation from the upstream policy + * interface, which says a repeat call must overwrite. Do not restore overwrite + * semantics for interface fidelity. + * - This cannot break a legitimate regrant: the wallet supplies a fresh salt on every + * grant, so a regranted rules set has a new permission id and therefore an untouched + * config slot. The refusal only ever fires on a path this system does not use. + * - Rejects an allow-list that is empty or longer than the cap, an expiry that is zero + * or already past, a zero expected destination account, and an asset list that is + * empty, longer than MAX_ASSETS, repeats a token, or names a token whose source chain + * is not the declared chain. An owner consent term has no meaningful silence, so + * "never expires" is written as the maximum value. + * - Deliberately does not validate cap values (zero and max are both legal, a zero + * per-call cap being a valid move-nothing entry), `beneficiaryOffset`, or + * allow-list contents. A wrong offset fails closed at validation time; it cannot widen + * a rules set, only break it. Offsets must be generated from each protocol's ABI by + * tooling rather than hand-typed, and each newly supported protocol must ship a test + * rejecting a wrong beneficiary and an oversized amount. + * - Anyone may call this with themselves as the multiplexer; that writes into their own + * keyed slice and the engine never reads it. + * - Writes the config, sets the initialised flag, and emits `RulesConfigured` and + * `PolicySet`. + * + * - THE ENVELOPE. `initData` is `abi.encode(uint16 version, string chain, bytes body)` — + * IDENTICAL IN SHAPE FOR EVERY MODE, which is what lets the chain be read before the + * mode is known. Nobody declares the mode: URP derives it from the chain with + * `PushChainLib.deriveMode`, and the wallet derived the same value from the same bytes + * at grant. There is no mode byte and therefore no `InvalidPolicyMode`. + * - THE VERSION is read from the first word BEFORE anything else is decoded, and anything + * but `ENVELOPE_VERSION` is refused `UnsupportedEnvelopeVersion`. So a body layout can + * change later under a new version, and almost every malformed or pre-version blob is + * refused NAMED: a two-field `(string, bytes)` envelope reports version 64 (its string + * offset), a bare struct 32, a zeroed blob 0. Blobs shorter than one word, and a + * version-1 envelope whose body is the wrong `Terms` type, revert unnamed. Nothing + * mis-decodes into a live config — measured, one test per shape. + * - Re-initialisation is refused ACROSS MODES, and the guard runs BEFORE the decode, so + * a malformed blob aimed at a live config still gets a named `AlreadyInitialized`. + * + * @param account The wallet this config belongs to. + * @param configId Engine-derived id binding the account and the permission. + * @param initData `abi.encode(uint16 version, string chain, bytes body)`, body being + * `abi.encode(UniversalTerms)`, `abi.encode(SvmTerms)` or `abi.encode(NativeTerms)` + * according to the DERIVED mode and family. + */ + function initializeWithMultiplexer(address account, ConfigId configId, bytes calldata initData) external { + ModeSlot storage slot = _mode[configId][msg.sender][account]; + + // Re-initialisation would let the owner door reset a spend counter or flip a mode. + if (slot.initialized) revert UniversalRulesPolicyErrors.AlreadyInitialized(configId); + + // THE VERSION, from the first word, before anything else is decoded. + uint256 envelopeVersion = uint256(bytes32(initData[0:32])); + if (envelopeVersion != ENVELOPE_VERSION) { + revert UniversalRulesPolicyErrors.UnsupportedEnvelopeVersion(envelopeVersion); + } + + // THE ENVELOPE, decoded exactly as the wallet decoded it at grant — same expression, same + // bytes. That identity is the whole consistency argument: there is no second author of the + // discriminator, so there is nothing for the two contracts to disagree about. + (, string memory chainNamespace, bytes memory body) = abi.decode(initData, (uint16, string, bytes)); + if (bytes(chainNamespace).length == 0) revert UniversalRulesPolicyErrors.EmptyChain(); + + bytes32 chainHash = keccak256(bytes(chainNamespace)); + RulesType mode = PushChainLib.deriveMode(chainHash); + + // THE FAMILY, derived only for UNIVERSAL. A native string is `eip155:` too and would classify + // EVM, but NATIVE has no family and must not carry a meaningless one. `deriveVm` refuses any + // namespace without a rulebook, so a `cosmos:` grant fails here, named, instead of producing + // a rules set that passes init and rejects every request. + VmFamily vm = VmFamily.EVM; + if (mode == RulesType.UNIVERSAL) { + vm = PushChainLib.deriveVm(chainNamespace); + if (vm == VmFamily.EVM) { + _initUniversal(_configs[configId][msg.sender][account], body, chainHash); + } else { + _initSvm(_svm[configId][msg.sender][account], body, chainHash); + } + } else { + _initNative(_native[configId][msg.sender][account], body); + } + + slot.initialized = true; + slot.mode = mode; + slot.vm = vm; + slot.chainHash = chainHash; + + emit RulesConfigured(configId, msg.sender, account, mode, vm, chainHash); + emit PolicySet(configId, msg.sender, account); + } + + /// @inheritdoc IUniversalRulesPolicy + function pushChainHash() external view returns (bytes32) { + return PushChainLib.selfChainHash(); + } + + /** + * @dev The universal init guards — unchanged from the single-mode contract, only relocated. + * @param cfg Storage slot to write. + * @param body `abi.encode(Config)`. + */ + function _initUniversal(Config storage cfg, bytes memory body, bytes32 chainHash) internal { + UniversalTerms memory incoming = abi.decode(body, (UniversalTerms)); + + uint256 listLength = incoming.allowedCalls.length; + if (listLength == 0 || listLength > MAX_ALLOWED_CALLS) { + revert UniversalRulesPolicyErrors.AllowListOutOfRange(listLength); + } + + if (incoming.validUntil == 0 || incoming.validUntil <= block.timestamp) { + revert UniversalRulesPolicyErrors.InvalidExpiry(incoming.validUntil); + } + if (incoming.expectedCEA == address(0)) revert UniversalRulesPolicyErrors.InvalidConfigField(); + + // ─── THE TEETH ─── + // + // After every decode and guard, before every write. Effects last, as everywhere else here. + // + // WHY THIS MAKES THE DECLARED CHAIN TRUE AT RUNTIME. `SOURCE_CHAIN_NAMESPACE()` is the exact + // view the gateway reads on every outbound, through `UniversalCore.getOutboundTxGasAndFees`, + // to decide where to route. Gate 5 pins `req.token` to a LISTED asset on every request, zero + // amount included. So asserting it here, for EVERY listed asset, binds the owner's declared + // chain to the chain the gateway will actually use — with no runtime change and no external + // call in `checkAction`. It is also why the list may never be empty: an empty list would pin + // no token, and the agent would choose the chain. + // + // WHY AN EXTERNAL CALL IS SAFE HERE AND NOWHERE ELSE: this runs at INIT, inside the owner's + // own grant transaction, never in `checkAction` and never on a removal path. A failure + // blocks a grant; it can never block a revocation or an execution. The `try/catch` is + // permitted because the external call ALREADY EXISTS — do not extend that reasoning to + // `checkAction`'s decode, which has no external call to hide behind. + // + // A `view` call compiles to STATICCALL, so the callee cannot write state: reentrancy from a + // hostile asset is structurally impossible, not merely unreachable. + // + // ⚠️ THE `code.length` GUARD IS NOT REDUNDANT WITH THE `catch`. MEASURED: + // callee reverts -> catch fires -> named InvalidAsset + // no code at the address, or EOA -> catch does NOT -> UNNAMED, empty revert + // answers with a non-string -> catch does NOT -> UNNAMED, empty revert + // Since solc 0.8.10 the compiler omits the extcodesize check when return data is + // expected; the call to a codeless address then SUCCEEDS with empty returndata and the + // failure happens when THIS frame tries to ABI-decode it — outside the try/catch. Without + // this line a typo'd asset address, the likeliest real mistake, reverts unnamed. + _requireAssets(incoming.assets, chainHash); + + _store(cfg, incoming); + cfg.initialized = true; + } + + /** + * @dev The asset-list guards, shared by both universal families: 1..MAX_ASSETS entries, no token + * twice, and THE TEETH for every entry. A zero token fails the teeth as `InvalidAsset(0)`. + * O(n^2) duplicate check at n <= 8. + */ + function _requireAssets(AssetCap[] memory assets, bytes32 chainHash) internal view { + uint256 n = assets.length; + if (n == 0 || n > MAX_ASSETS) revert UniversalRulesPolicyErrors.AssetListOutOfRange(n); + for (uint256 i; i < n;) { + address token = assets[i].token; + for (uint256 j; j < i;) { + if (assets[j].token == token) revert UniversalRulesPolicyErrors.DuplicateAsset(token); + unchecked { + ++j; + } + } + _requireAssetOnChain(token, chainHash); + unchecked { + ++i; + } + } + } + + /** + * @dev THE TEETH, shared by both universal families. Reverts `InvalidAsset` for a codeless + * address, a reverting callee or a non-string answer, and `ChainMismatch` when the asset's + * own `SOURCE_CHAIN_NAMESPACE()` hash differs from the declared chain. See the long note + * in `_initUniversal` for why this external call is safe at init and nowhere else. + */ + function _requireAssetOnChain(address asset, bytes32 chainHash) internal view { + if (asset.code.length == 0) revert UniversalRulesPolicyErrors.InvalidAsset(asset); + + try IPRC20Source(asset).SOURCE_CHAIN_NAMESPACE() returns (string memory ns) { + bytes32 assetChain = keccak256(bytes(ns)); + if (assetChain != chainHash) revert UniversalRulesPolicyErrors.ChainMismatch(chainHash, assetChain); + } catch { + revert UniversalRulesPolicyErrors.InvalidAsset(asset); + } + } + + /** + * @dev The native init guards. + * + * - Refuses a zero target, and the GATEWAY as a target: the mirror of gate 3, and half of + * the consistency lock. A native config can never be written against the gateway. + * - Refuses a value-only config carrying pins or an amount rule. That combination can never + * authorise anything — every request under it would die at N7/N8 — so it is a + * misconfiguration the owner believes they granted, not a valid ascetic config. Same + * reasoning as the empty-allow-list refusal in universal mode. + * - Deliberately does NOT validate cap values (zero and max are both legal), pin offsets or + * `amount.offset` — they cannot be checked against calldata that does not exist yet, and a + * wrong offset fails closed at N7/N8 rather than widening anything. Nor the selector + * against the engine's fallback flags: the wallet refuses those at grant, and a + * stranger-slice config the engine never reads is harmless. + * + * - MAKES NO EXTERNAL CALL. A native rules set has no asset, so there is nothing to verify the + * chain against — and nothing to verify: the chain IS this chain, which is what made the + * mode NATIVE in the first place. The universal branch's teeth have no native counterpart + * and must not acquire one. + * + * @param cfg Storage slot to write. + * @param body `abi.encode(NativeTerms)`. + */ + function _initNative(NativeConfig storage cfg, bytes memory body) internal { + NativeTerms memory incoming = abi.decode(body, (NativeTerms)); + + if (incoming.validUntil == 0 || incoming.validUntil <= block.timestamp) { + revert UniversalRulesPolicyErrors.InvalidExpiry(incoming.validUntil); + } + if (incoming.target == address(0)) revert UniversalRulesPolicyErrors.NativeTargetZero(); + if (incoming.target == UNIVERSAL_GATEWAY_PC) { + revert UniversalRulesPolicyErrors.NativeTargetIsGateway(incoming.target); + } + if (incoming.pins.length > MAX_PINS) revert UniversalRulesPolicyErrors.TooManyPins(incoming.pins.length); + + if (incoming.selector == VALUE_SELECTOR) { + if (incoming.pins.length != 0) revert UniversalRulesPolicyErrors.ValueOnlyWithPins(); + if (incoming.amount.enabled) revert UniversalRulesPolicyErrors.ValueOnlyWithAmountRule(); + } + + _storeNative(cfg, incoming); + cfg.initialized = true; + } + + /** + * @dev The SVM init guards — the `solana:*` counterpart of `_initUniversal`. + * - Shape bounds first, then expiry and the three identity fields, then the allow-list + * rules, then the pins, then the teeth. Same discipline as the universal branch: every + * decode and guard before any write. + * - The teeth are IDENTICAL to the universal branch and for the same reason: each listed + * asset's `SOURCE_CHAIN_NAMESPACE()` is what the gateway routes on, so binding the declared + * chain to every one of them here is what makes a `solana:` grant with an EVM asset impossible. + * @param cfg Storage slot to write. + * @param body `abi.encode(SvmTerms)`. + * @param chainHash keccak256 of the declared chain string, verified against every listed asset. + */ + function _initSvm(SvmConfig storage cfg, bytes memory body, bytes32 chainHash) internal { + SvmTerms memory incoming = abi.decode(body, (SvmTerms)); + + uint256 ruleCount = incoming.programs.length; + if (ruleCount == 0 || ruleCount > MAX_ALLOWED_PROGRAMS) { + revert UniversalRulesPolicyErrors.ProgramListOutOfRange(ruleCount); + } + if (incoming.pins.length > MAX_SVM_PINS) { + revert UniversalRulesPolicyErrors.TooManySvmPins(incoming.pins.length); + } + if (incoming.dataPins.length > MAX_SVM_DATA_PINS) { + revert UniversalRulesPolicyErrors.TooManySvmDataPins(incoming.dataPins.length); + } + if (incoming.ceaAccounts.length > MAX_CEA_ACCOUNTS) { + revert UniversalRulesPolicyErrors.TooManyCeaAccounts(incoming.ceaAccounts.length); + } + + if (incoming.validUntil == 0 || incoming.validUntil <= block.timestamp) { + revert UniversalRulesPolicyErrors.InvalidExpiry(incoming.validUntil); + } + if (incoming.expectedCEA == bytes32(0) || incoming.gatewayProgram == bytes32(0)) { + revert UniversalRulesPolicyErrors.InvalidSvmConfigField(); + } + + _checkSvmRules(incoming); + _checkSvmPinShapes(incoming); + _checkCeaAccountList(incoming); + + _requireAssets(incoming.assets, chainHash); + + _storeSvm(cfg, incoming); + cfg.initialized = true; + } + + /** + * @dev Allow-list rule guards: tag shape, forbidden programs, and pairwise exactness. + * - A rule is `dataless` XOR has a 1..8-byte tag. + * - A fixed account count, if set, is within the S13 bound. + * - A program the check path forbids as a target is refused here too; S15 is then defence + * in depth against state this guard makes unreachable. + * - Two rules on one program must not both match one request, or first-match makes the + * later rule dead and its pins never run. O(n^2) at n <= 32. + */ + function _checkSvmRules(SvmTerms memory t) internal pure { + uint256 n = t.programs.length; + for (uint256 i; i < n;) { + AllowedProgram memory r = t.programs[i]; + bool badLen = r.dataless ? r.discriminatorLen != 0 : (r.discriminatorLen == 0 || r.discriminatorLen > 8); + if (badLen) revert UniversalRulesPolicyErrors.DiscriminatorLenOutOfRange(i, r.discriminatorLen); + // A fixed count above the S13 loop bound can never be met: every request would fail + // S13 or S16. Refused here so the owner never grants a rule that is dead on arrival. + if (r.maxAccounts > MAX_SVM_ACCOUNTS) { + revert UniversalRulesPolicyErrors.SvmMaxAccountsOutOfRange(i, r.maxAccounts); + } + if (_isForbiddenProgram(r.program, t.gatewayProgram, t.expectedCEA)) { + revert UniversalRulesPolicyErrors.ForbiddenProgramInAllowList(i, r.program); + } + for (uint256 j; j < i;) { + if (_rulesCollide(t.programs[j], r)) revert UniversalRulesPolicyErrors.AmbiguousRule(j, i); + unchecked { + ++j; + } + } + unchecked { + ++i; + } + } + } + + /// @dev Two rules collide when a single request could match both: same program and either both + /// dataless, or neither dataless with one tag a prefix of the other. A dataless rule and a + /// tagged rule never collide — one needs empty ix_data, the other needs at least the tag. + function _rulesCollide(AllowedProgram memory a, AllowedProgram memory b) internal pure returns (bool) { + if (a.program != b.program) return false; + if (a.dataless || b.dataless) return a.dataless && b.dataless; + uint256 shorter = a.discriminatorLen < b.discriminatorLen ? a.discriminatorLen : b.discriminatorLen; + bytes8 mask = _prefixMask8(shorter); + return (a.discriminator & mask) == (b.discriminator & mask); + } + + /** + * @dev Pin shape guards, both kinds. + * - Account pins: rule in range; index below the loop bound and, when the rule fixes its + * account count, below that too. Every rule must own at least one — HYGIENE: an + * authority-only pin always passes, and which positions must be pinned is the compiler's + * responsibility, not this contract's. + * One pin per (rule, index). + * - Data pins: rule in range and not dataless; `len` 1..32 for EQ, 1..8 otherwise; from-end + * offsets must reach at least `len` back; every offset stays inside the ix_data bound; + * the comparison value must be one the field can actually be compared against + * (`_dataPinValueValid`). + */ + function _checkSvmPinShapes(SvmTerms memory t) internal pure { + uint256 ruleCount = t.programs.length; + bool[] memory covered = new bool[](ruleCount); // rule i has at least one account pin + + uint256 n = t.pins.length; + for (uint256 i; i < n;) { + SvmAccountPin memory pin = t.pins[i]; + if (pin.ruleIndex >= ruleCount) revert UniversalRulesPolicyErrors.SvmPinRuleOutOfRange(i, pin.ruleIndex); + uint8 cap = t.programs[pin.ruleIndex].maxAccounts; + if (pin.accountIndex >= MAX_SVM_ACCOUNTS || (cap != 0 && pin.accountIndex >= cap)) { + revert UniversalRulesPolicyErrors.SvmPinIndexOutOfRange(i, pin.accountIndex); + } + // One position, one pin. Two pins on a (rule, index) are either redundant or + // contradictory, and a contradictory pair makes the rule unsatisfiable. O(n^2), n <= 16. + for (uint256 j; j < i;) { + if (t.pins[j].ruleIndex == pin.ruleIndex && t.pins[j].accountIndex == pin.accountIndex) { + revert UniversalRulesPolicyErrors.DuplicateSvmPin(j, i); + } + unchecked { + ++j; + } + } + covered[pin.ruleIndex] = true; + unchecked { + ++i; + } + } + for (uint256 r; r < ruleCount;) { + if (!covered[r]) revert UniversalRulesPolicyErrors.RuleWithoutPin(r); + unchecked { + ++r; + } + } + + n = t.dataPins.length; + for (uint256 i; i < n;) { + SvmDataPin memory dp = t.dataPins[i]; + if (dp.ruleIndex >= ruleCount || t.programs[dp.ruleIndex].dataless) { + revert UniversalRulesPolicyErrors.SvmDataPinInvalid(i); + } + uint256 maxLen = dp.mode == SvmDataPinMode.EQ ? 32 : 8; + if (dp.len == 0 || dp.len > maxLen) revert UniversalRulesPolicyErrors.SvmDataPinInvalid(i); + if (!_offsetValid(dp.fromEnd, dp.offset, dp.len)) revert UniversalRulesPolicyErrors.SvmDataPinInvalid(i); + if (!_dataPinValueValid(dp)) revert UniversalRulesPolicyErrors.SvmDataPinInvalid(i); + unchecked { + ++i; + } + } + } + + /// @dev A from-start field must end inside the bound; a from-end field must start at least `len` + /// back and no further back than the bound. + function _offsetValid(bool fromEnd, uint16 offset, uint8 len) internal pure returns (bool) { + if (fromEnd) return uint256(offset) >= len && uint256(offset) <= MAX_SVM_IX_DATA; + return uint256(offset) + len <= MAX_SVM_IX_DATA; + } + + /** + * @dev Refuses a data pin whose comparison is vacuous or impossible, and the encoding mistake that + * would make it so. The two value encodings differ by mode — EQ compares LEFT-ALIGNED raw + * bytes, the integer modes compare a RIGHT-ALIGNED integer — and each mis-encoding of one + * as the other is caught here, at grant, instead of producing a pin that silently never + * fails (a ceiling above the field's range) or never passes. + * - EQ: every byte of `expected` past `len` must be zero (a right-aligned integer would + * leave its value there). + * - GTE / LTE: `expected` must fit in `len` bytes, i.e. `< 2^(8·len)`. + * - RATIO: `num` and `den` non-zero (`num == 0` makes `a·den >= 0` always true), and the + * second field's offset valid. + */ + function _dataPinValueValid(SvmDataPin memory dp) internal pure returns (bool) { + if (dp.mode == SvmDataPinMode.EQ) return dp.expected & ~_prefixMask32(dp.len) == bytes32(0); + if (dp.mode == SvmDataPinMode.RATIO_GTE_LE) { + return dp.num != 0 && dp.den != 0 && _offsetValid(dp.fromEnd, dp.offsetB, dp.len); + } + return uint256(dp.expected) >> (8 * uint256(dp.len)) == 0; + } + + /** + * @dev The CEA-controlled account list that S18 enforces. + * - Must contain `expectedCEA`. The CEA always holds value (it is the signer, and pSOL lands + * on it), so an empty or CEA-less list would silently switch the aliasing defence off. + * - No zero entry: `bytes32(0)` is the System program's id, present in most account lists, + * and would make every request fail. + * - No entry equal to an allow-listed program: Anchor passes the program's own account in + * many instructions, and listing it would make every such request fail. + * - No duplicates. + * All four fail closed at check time anyway; refusing them here means an owner never grants + * a rules set that can never be used. + */ + function _checkCeaAccountList(SvmTerms memory t) internal pure { + uint256 n = t.ceaAccounts.length; + bool hasCea; + for (uint256 i; i < n;) { + bytes32 key = t.ceaAccounts[i]; + if (key == bytes32(0)) revert UniversalRulesPolicyErrors.InvalidCeaAccount(i); + if (key == t.expectedCEA) hasCea = true; + for (uint256 j; j < i;) { + if (t.ceaAccounts[j] == key) revert UniversalRulesPolicyErrors.InvalidCeaAccount(i); + unchecked { + ++j; + } + } + uint256 rules = t.programs.length; + for (uint256 r; r < rules;) { + if (t.programs[r].program == key) revert UniversalRulesPolicyErrors.InvalidCeaAccount(i); + unchecked { + ++r; + } + } + unchecked { + ++i; + } + } + if (!hasCea) revert UniversalRulesPolicyErrors.CeaAccountsMissExpectedCEA(); + } + + /// @dev The programs an SVM rules set may never target, directly. Inner CPIs are the allow-listed + /// program's own business — this set guards the top level only. + function _isForbiddenProgram(bytes32 program, bytes32 gatewayProgram, bytes32 cea) internal pure returns (bool) { + return program == SYSTEM_PROGRAM || program == SPL_TOKEN_PROGRAM || program == TOKEN_2022_PROGRAM + || program == STAKE_PROGRAM || program == BPF_LOADER_UPGRADEABLE || program == ADDRESS_LOOKUP_TABLE + || program == gatewayProgram || program == cea; + } + + /** + * @notice Runs every gate a cross-chain agent request must pass. Order is fixed; any failure + * reverts with nothing written. + * + * @dev - Not `view`: gate 7 accumulates spend, and the engine invokes this with a real call + * so the write persists. + * - Runs before the session signature is verified, on unauthenticated calldata from an + * arbitrary caller. It is safe because it makes no external call, applies all effects + * last, and reverts on every failure. Do not introduce an external call here. + * - Replayed signatures cannot burn budget through this door; they die at the wallet's + * nonce gate first. + * + * The gates, in order: + * 1. the config is initialised + * 2. the rules set has not expired + * 3. the target is the gateway + * 4. calldata is at least four bytes; the selector is the outbound send; the body is at + * least the minimum encoded length + * 5. the token is one of the listed assets — on EVERY request, zero amount included, + * because the token is what the gateway routes by + * 6. the amount is within THAT asset's per-call cap + * 7. THAT asset's running total is within its lifetime cap + * 8. the Push-native value is within the per-call ceiling (`maxGasPerCall`) + * 9. the request does not ask for an uncapped gas swap + * 10. the revert recipient is the wallet + * 11. the recipient field is empty + * 12. the payload is a multicall + * 13. the inner call count is between one and the maximum + * 14. no inner call targets the wallet, this policy, the gateway or the destination + * account + * 15. each inner target and selector is allow-listed, and where the rule declares a + * beneficiary it matches the expected destination account + * 16. each inner value is within its rule's allowance + * + * - A zero amount passes gate 6 and writes nothing: zero-amount is the redeployment + * path, acting on capital already at the destination. There is no zero-amount gate and + * one must not be added. + * - `abi.decode` ignores trailing bytes, so gate 4c is a length floor and not a + * canonical-encoding check. There is no exploit: the whole execution calldata is bound + * into the wallet's operation hash, and the signature is verified last. + * - A body of correct length carrying malformed internal offsets reverts with a compiler + * panic rather than a named error. It cannot be given a named error without wrapping + * the decode in an external call, which this function must not have. + * - Spend accumulation is optimistic but atomic: it is written during validation and + * survives only because validation and dispatch share one transaction. Splitting them + * breaks the accounting silently. + * - Gate 14 runs before gate 15 on purpose, so a forbidden destination beats the + * allow-list: an owner who allow-listed their own destination account still cannot + * hand the agent direct control of it. + * + * @param id Config id identifying the rules set. + * @param account The wallet. The engine passes its own caller through as this parameter, so it + * is never the engine itself. + * @param target Push-side call target; must be the gateway. + * @param value Push-native value attached to the call. + * @param data The gateway calldata, opened and walked by the gates above. + * @return The engine's success sentinel. + */ + function checkAction(ConfigId id, address account, address target, uint256 value, bytes calldata data) + external + returns (uint256) + { + // MODE ROUTING. An EMPTY slot falls through to the universal path, whose gate 1 reverts + // `NotInitialized` — fail-closed either way. The `initialized &&` conjunction is what makes + // that safe: `RulesType.UNIVERSAL` is the zero value, so testing `mode` alone could not + // tell an empty slot from a real universal one. + ModeSlot storage slot = _mode[id][msg.sender][account]; + if (slot.initialized) { + if (slot.mode == RulesType.NATIVE) return _checkNative(id, account, target, value, data); + // The family byte was never written by earlier implementations, so it reads 0 = EVM on + // every pre-existing universal slot — those keep routing exactly where they always did. + if (slot.vm == VmFamily.SVM) return _checkSvm(id, account, target, value, data); + } + return _checkUniversal(id, account, target, value, data); + } + + /** + * @dev The universal gauntlet — gates 1 to 16, unchanged from the single-mode contract. Only the + * function name and visibility changed; the body is byte-for-byte what `checkAction` was. + * + * @param id Config id identifying the rules set. + * @param account The wallet. + * @param target Push-side call target; must be the gateway. + * @param value Push-native value attached to the call. + * @param data The gateway calldata. + * @return The engine's success sentinel. + */ + function _checkUniversal(ConfigId id, address account, address target, uint256 value, bytes calldata data) + internal + returns (uint256) + { + Config storage cfg = _configs[id][msg.sender][account]; + + if (!cfg.initialized) revert UniversalRulesPolicyErrors.NotInitialized(id, account); + + if (block.timestamp > cfg.validUntil) revert UniversalRulesPolicyErrors.RulesExpired(cfg.validUntil); + + if (target != UNIVERSAL_GATEWAY_PC) revert UniversalRulesPolicyErrors.InvalidTarget(target); + + if (data.length < 4) revert UniversalRulesPolicyErrors.CalldataTooShort(data.length); + + if (bytes4(data[0:4]) != SEND_OUTBOUND_SELECTOR) { + revert UniversalRulesPolicyErrors.InvalidSelector(bytes4(data[0:4])); + } + + if (data.length < 4 + MIN_OUTBOUND_BODY_LEN) { + revert UniversalRulesPolicyErrors.MalformedOutboundRequest(data.length); + } + UniversalOutboundTxRequest memory req = abi.decode(data[4:], (UniversalOutboundTxRequest)); + + AssetCapState storage cap = _assetFor(cfg.assets, req.token); + + if (req.amount > cap.maxPerCall) { + revert UniversalRulesPolicyErrors.AmountExceedsCap(req.amount, cap.maxPerCall); + } + + uint256 newSpent = cap.spent + req.amount; + if (newSpent > cap.maxTotal) revert UniversalRulesPolicyErrors.TotalSpendCapExceeded(newSpent, cap.maxTotal); + + if (value > cfg.maxGasPerCall) revert UniversalRulesPolicyErrors.PCValueExceedsCap(value, cfg.maxGasPerCall); + + if (req.maxPCForGas == 0) revert UniversalRulesPolicyErrors.UncappedGasSwapRejected(); + + if (req.revertRecipient != account) { + revert UniversalRulesPolicyErrors.InvalidRevertRecipient(account, req.revertRecipient); + } + + if (req.recipient.length != 0) revert UniversalRulesPolicyErrors.RecipientMustBeEmpty(); + + _checkInnerCalls(cfg, account, req.payload); + + if (req.amount > 0) { + cap.spent = newSpent; + emit OutboundMetered(id, msg.sender, account, req.token, req.amount); + } + + return VALIDATION_SUCCESS; + } + + /** + * @dev The native gauntlet — gates N1 to N9, then effects. The same discipline as the universal + * path and for the same reason: this runs BEFORE the session signature is verified, on + * unauthenticated calldata from an arbitrary caller. + * + * - NO EXTERNAL CALLS. Pins and the metered amount are read by slicing `data` directly, + * never through `_slice` into memory and never through a helper that calls out. + * - ALL EFFECTS LAST. `newValueSpent` and `newAmountSpent` are computed at N6/N8 and + * assigned only after N9 passes, exactly as `_checkUniversal` handles `newSpent`. A + * request that fails at N7 leaves every counter untouched. + * - BOUNDS ARITHMETIC IS DONE IN `uint256`. `pin.offset` is `uint16`, so + * `uint256(offset) + 32` cannot wrap — but written as `uint16` arithmetic it would, and + * the check would pass on a crafted offset. Do not "simplify" the cast away. + * - `callsUsed` ALWAYS increments on success, including on a zero-value zero-amount call. + * A call is a use; mirroring universal's zero-amount rule (which writes nothing) would + * make `maxCalls` bypassable by zero-value calls, i.e. advisory. This is the one + * deliberate divergence between the two rulebooks. + * - Value-only configs carry no pins and no amount rule — init refuses that combination — + * so with `data.length == 0` the N7 loop does not execute and N8 is skipped. + * + * @param id Config id identifying the rules set. + * @param account The wallet. + * @param target Push-side call target; must be the configured native target. + * @param value Push-native value attached to the call. + * @param data The native calldata, read but never decoded as a structure. + * @return The engine's success sentinel. + */ + function _checkNative(ConfigId id, address account, address target, uint256 value, bytes calldata data) + internal + returns (uint256) + { + NativeConfig storage cfg = _native[id][msg.sender][account]; + + // N1 + if (!cfg.initialized) revert UniversalRulesPolicyErrors.NotInitialized(id, account); + + // N2 + if (block.timestamp > cfg.validUntil) revert UniversalRulesPolicyErrors.RulesExpired(cfg.validUntil); + + // N3 — the consistency lock, mirror of universal gate 3. Init refuses a gateway target, so + // this can only fire on state the wallet's grant check makes unreachable. It is defence in + // depth against a mis-wired grant, not dead code. + if (target == UNIVERSAL_GATEWAY_PC) revert UniversalRulesPolicyErrors.NativeTargetIsGateway(target); + + // N4 + if (target != cfg.target) revert UniversalRulesPolicyErrors.TargetMismatch(target, cfg.target); + + // N5 — under four bytes is the engine's value-only selector; four or more is a real one. + bytes4 sel = data.length < 4 ? VALUE_SELECTOR : bytes4(data[0:4]); + if (sel != cfg.selector) revert UniversalRulesPolicyErrors.SelectorMismatch(sel, cfg.selector); + // Value-only means EMPTY calldata (register N-46). The engine buckets 1..3 bytes under the + // same actionId, so URP is the layer that makes the documented meaning true. + if (sel == VALUE_SELECTOR && data.length != 0) { + revert UniversalRulesPolicyErrors.ValueOnlyCalldataNotEmpty(data.length); + } + + // N6 + if (value > cfg.maxValuePerCall) revert UniversalRulesPolicyErrors.ValueExceedsCap(value, cfg.maxValuePerCall); + uint256 newValueSpent = cfg.valueSpent + value; + if (newValueSpent > cfg.maxValueTotal) { + revert UniversalRulesPolicyErrors.TotalValueExceeded(newValueSpent, cfg.maxValueTotal); + } + + // N7 + uint256 pinCount = cfg.pins.length; + for (uint256 i; i < pinCount;) { + ArgPin storage pin = cfg.pins[i]; + uint256 needed = uint256(pin.offset) + 32; + if (data.length < needed) revert UniversalRulesPolicyErrors.CalldataTooShortForPin(data.length, i, needed); + + bytes32 actual = bytes32(data[pin.offset:needed]); + if (actual != pin.expected) revert UniversalRulesPolicyErrors.ArgPinMismatch(actual, i, pin.expected); + + unchecked { + ++i; + } + } + + // N8 + uint256 amt; + uint256 newAmountSpent = cfg.amountSpent; + if (cfg.amount.enabled) { + uint256 neededAmt = uint256(cfg.amount.offset) + 32; + if (data.length < neededAmt) { + revert UniversalRulesPolicyErrors.CalldataTooShortForAmount(data.length, neededAmt); + } + + amt = uint256(bytes32(data[cfg.amount.offset:neededAmt])); + if (amt > cfg.amount.maxPerCall) { + revert UniversalRulesPolicyErrors.NativeAmountExceedsCap(amt, cfg.amount.maxPerCall); + } + + newAmountSpent = cfg.amountSpent + amt; + if (newAmountSpent > cfg.amount.maxTotal) { + revert UniversalRulesPolicyErrors.TotalNativeAmountExceeded(newAmountSpent, cfg.amount.maxTotal); + } + } + + // N9 + if (cfg.maxCalls != 0 && cfg.callsUsed >= cfg.maxCalls) { + revert UniversalRulesPolicyErrors.CallLimitReached(cfg.callsUsed, cfg.maxCalls); + } + + // Effects, last. + cfg.valueSpent = newValueSpent; + cfg.amountSpent = newAmountSpent; + unchecked { + // Bounded by N9 when maxCalls != 0; when it is 0 the counter is informational and a + // uint32 overflow is unreachable at any realistic call volume. + cfg.callsUsed = cfg.callsUsed + 1; + } + emit NativeCallMetered(id, msg.sender, account, value, amt); + + return VALIDATION_SUCCESS; + } + + /** + * @dev Implements gates 12 to 16 of `checkAction`'s list. + * + * - Split out for stack depth only. It makes no external call and writes no storage, so the + * caller's effects-last property holds. + * - Gate 12 is not merely a format check: the destination account dispatches on the payload + * prefix, and only the multicall branch has entries that gates 13 to 16 can walk. Its + * other branches re-target the account itself or call an arbitrary target with the raw + * payload, bypassing the allow-list, the beneficiary pin and the per-entry value cap. + * Do not weaken this gate, or the agent picks its own branch. + * - A payload that is exactly the multicall selector, or the selector followed by malformed + * bytes, reverts inside the ABI decoder rather than with a named error. No minimum-length + * pre-check is added: unlike gate 4c, this decode sits behind eleven gates on an already + * constrained request, so a second hand-derived constant would be more surface than the + * named error is worth. It fails closed either way. + * + * @param cfg Config to validate against. + * @param account The wallet, used as the forbidden self-target and the refund destination. + * @param payload The multicall payload carried by the outbound request. + */ + function _checkInnerCalls(Config storage cfg, address account, bytes memory payload) internal view { + if (payload.length < 4 || bytes4(_slice(payload, 0, 4)) != MULTICALL_SELECTOR) { + revert UniversalRulesPolicyErrors.PayloadNotMulticall(); + } + + Multicall[] memory calls = abi.decode(_slice(payload, 4, payload.length - 4), (Multicall[])); + + uint256 count = calls.length; + if (count == 0 || count > MAX_ACTIONS_PER_REQUEST) { + revert UniversalRulesPolicyErrors.BatchSizeOutOfRange(count); + } + + address expectedCEA = cfg.expectedCEA; + + for (uint256 i; i < count;) { + Multicall memory entry = calls[i]; + + if ( + entry.to == account || entry.to == address(this) || entry.to == UNIVERSAL_GATEWAY_PC + || entry.to == expectedCEA + ) { + revert UniversalRulesPolicyErrors.ForbiddenInnerTarget(entry.to); + } + if (entry.data.length < 4) revert UniversalRulesPolicyErrors.MalformedInnerCalldata(); + + AllowedCall memory rule = _requireAllowed(cfg, entry.to, bytes4(_slice(entry.data, 0, 4))); + if (rule.hasBeneficiary) { + address beneficiary = _extractBeneficiary(entry.data, rule.beneficiaryOffset); + if (beneficiary != expectedCEA) { + revert UniversalRulesPolicyErrors.BeneficiaryMismatch(expectedCEA, beneficiary); + } + } + + // Destination-chain native units, never the Push-side value: two assets on two chains. + if (entry.value > rule.maxValue) { + revert UniversalRulesPolicyErrors.InnerValueExceedsAllowance(i, entry.value, rule.maxValue); + } + + unchecked { + ++i; + } + } + } + + /** + * @dev The SVM gauntlet — S1 to S18, then effects. Same discipline as the other two: it runs + * BEFORE the session signature is verified, on unauthenticated calldata from an arbitrary + * caller, so it makes no external call, applies all effects last, and reverts on every + * failure. + * + * S1-S10 are the universal gates 1-10 restated against `SvmConfig` — they are chain- + * independent. S6b is Solana's u64 amount. S11 onwards replace gates 11-16: + * + * S11 the recipient is a 32-byte, non-zero pubkey (the target program) + * S12 the payload is non-empty and parses as the node's execute grammar, exactly + * S13 instruction_id is 2 (execute); account count and ix_data length are within bounds + * S14 the payload's target program equals the recipient + * S15 the target is not a forbidden program + * S16 a rule matches (program, tag) — first match — and its account count, if fixed, holds + * S17 every account pin and every data pin of that rule holds + * S18 every CEA-controlled account in the list sits only where that rule pins it + * + * - A zero amount passes S6/S7 and writes nothing: on SVM that is a payload-only call + * acting on capital already at the destination, the analogue of the EVM redeploy path. + * - The forbidden-program check runs before the allow-list, as gate 14 runs before 15. + */ + function _checkSvm(ConfigId id, address account, address target, uint256 value, bytes calldata data) + internal + returns (uint256) + { + SvmConfig storage cfg = _svm[id][msg.sender][account]; + + if (!cfg.initialized) revert UniversalRulesPolicyErrors.NotInitialized(id, account); + + if (block.timestamp > cfg.validUntil) revert UniversalRulesPolicyErrors.RulesExpired(cfg.validUntil); + + if (target != UNIVERSAL_GATEWAY_PC) revert UniversalRulesPolicyErrors.InvalidTarget(target); + + if (data.length < 4) revert UniversalRulesPolicyErrors.CalldataTooShort(data.length); + + if (bytes4(data[0:4]) != SEND_OUTBOUND_SELECTOR) { + revert UniversalRulesPolicyErrors.InvalidSelector(bytes4(data[0:4])); + } + + if (data.length < 4 + MIN_OUTBOUND_BODY_LEN) { + revert UniversalRulesPolicyErrors.MalformedOutboundRequest(data.length); + } + UniversalOutboundTxRequest memory req = abi.decode(data[4:], (UniversalOutboundTxRequest)); + + AssetCapState storage cap = _assetFor(cfg.assets, req.token); + + if (req.amount > cap.maxPerCall) { + revert UniversalRulesPolicyErrors.AmountExceedsCap(req.amount, cap.maxPerCall); + } + + if (req.amount > type(uint64).max) revert UniversalRulesPolicyErrors.AmountExceedsU64(req.amount); + + uint256 newSpent = cap.spent + req.amount; + if (newSpent > cap.maxTotal) revert UniversalRulesPolicyErrors.TotalSpendCapExceeded(newSpent, cap.maxTotal); + + if (value > cfg.maxGasPerCall) revert UniversalRulesPolicyErrors.PCValueExceedsCap(value, cfg.maxGasPerCall); + + if (req.maxPCForGas == 0) revert UniversalRulesPolicyErrors.UncappedGasSwapRejected(); + + if (req.revertRecipient != account) { + revert UniversalRulesPolicyErrors.InvalidRevertRecipient(account, req.revertRecipient); + } + + // S11 — a zero pubkey is reported with the length it has (32): the shape is right, the value + // is not, and both are "not a pubkey". + if (req.recipient.length != 32) revert UniversalRulesPolicyErrors.RecipientNotPubkey(req.recipient.length); + bytes32 recipient = _loadWord(req.recipient, 0); + if (recipient == bytes32(0)) revert UniversalRulesPolicyErrors.RecipientNotPubkey(32); + + _checkSvmPayload(cfg, recipient, req.payload); + + if (req.amount > 0) { + cap.spent = newSpent; + emit OutboundMetered(id, msg.sender, account, req.token, req.amount); + } + + return VALIDATION_SUCCESS; + } + + /// @dev The parsed shape of an execute payload. Memory only; never stored. + struct SvmPayloadView { + uint256 count; + uint256 ixOff; + uint256 ixLen; + bytes32 target; + } + + /** + * @dev S12 to S18. Split out for stack depth; makes no external call, writes no storage. + * @param cfg Config to validate against. + * @param recipient The request's recipient, already proven to be a non-zero pubkey. + * @param payload The execute payload carried by the outbound request. + */ + function _checkSvmPayload(SvmConfig storage cfg, bytes32 recipient, bytes memory payload) internal view { + SvmPayloadView memory v = _parseSvmPayload(payload); + + if (v.target != recipient) revert UniversalRulesPolicyErrors.RecipientTargetMismatch(recipient, v.target); + + if (_isForbiddenProgram(v.target, cfg.gatewayProgram, cfg.expectedCEA)) { + revert UniversalRulesPolicyErrors.ForbiddenTargetProgram(v.target); + } + + uint256 rule = _matchSvmRule(cfg, payload, v); + + _checkSvmAccountPins(cfg, payload, v, rule); + _checkSvmDataPins(cfg, payload, v, rule); + _checkCeaAccounts(cfg, payload, v, rule); + } + + /** + * @dev S12/S13 — the node's `decodePayload` grammar, byte for byte, including "consumed exactly": + * `[u32 BE count][count × (pubkey32 ‖ writable u8)][u32 BE len][ix_data][u8 id][target32]`. + * Every length is checked before the read it guards. `is_writable` bytes are read past, + * never judged — a wrong flag fails on Solana, not here. + */ + function _parseSvmPayload(bytes memory p) internal pure returns (SvmPayloadView memory v) { + if (p.length == 0) revert UniversalRulesPolicyErrors.SvmPayloadEmpty(); + if (p.length < SVM_HEADER_LEN + SVM_LEN_FIELD + SVM_TRAILER_LEN) { + revert UniversalRulesPolicyErrors.MalformedSvmPayload(1); + } + + v.count = _u32be(p, 0); + if (v.count > MAX_SVM_ACCOUNTS) revert UniversalRulesPolicyErrors.SvmAccountsOutOfRange(v.count); + + uint256 lenOff = SVM_HEADER_LEN + v.count * SVM_ACCOUNT_LEN; + if (p.length < lenOff + SVM_LEN_FIELD) revert UniversalRulesPolicyErrors.MalformedSvmPayload(2); + + v.ixLen = _u32be(p, lenOff); + if (v.ixLen > MAX_SVM_IX_DATA) revert UniversalRulesPolicyErrors.SvmIxDataTooLong(v.ixLen); + v.ixOff = lenOff + SVM_LEN_FIELD; + + uint256 expected = v.ixOff + v.ixLen + SVM_TRAILER_LEN; + if (p.length < expected) revert UniversalRulesPolicyErrors.MalformedSvmPayload(3); + if (p.length > expected) revert UniversalRulesPolicyErrors.MalformedSvmPayload(4); + + uint8 id = uint8(p[v.ixOff + v.ixLen]); + if (id != SVM_INSTRUCTION_EXECUTE) revert UniversalRulesPolicyErrors.SvmInstructionNotExecute(id); + + v.target = _loadWord(p, v.ixOff + v.ixLen + 1); + } + + /** + * @dev S16 — first rule whose program equals the target and whose tag matches: a dataless rule + * matches only empty ix_data; a tagged rule needs at least `discriminatorLen` bytes and a + * prefix-equal tag. Init guarantees at most one rule can match, so first-match is exact. + * Then the rule's fixed account count, if any. + */ + function _matchSvmRule(SvmConfig storage cfg, bytes memory p, SvmPayloadView memory v) + internal + view + returns (uint256) + { + uint256 n = cfg.programs.length; + for (uint256 i; i < n;) { + AllowedProgram storage r = cfg.programs[i]; + if (r.program == v.target && _tagMatches(r, p, v)) { + uint8 cap = r.maxAccounts; + if (cap != 0 && v.count != cap) { + revert UniversalRulesPolicyErrors.SvmAccountCountMismatch(v.count, cap); + } + return i; + } + unchecked { + ++i; + } + } + uint256 shown = v.ixLen < 8 ? v.ixLen : 8; + revert UniversalRulesPolicyErrors.ProgramNotAllowed( + v.target, bytes8(_loadWord(p, v.ixOff)) & _prefixMask8(shown) + ); + } + + function _tagMatches(AllowedProgram storage r, bytes memory p, SvmPayloadView memory v) + internal + view + returns (bool) + { + if (r.dataless) return v.ixLen == 0; + uint8 len = r.discriminatorLen; + if (v.ixLen < len) return false; + bytes8 mask = _prefixMask8(len); + return (bytes8(_loadWord(p, v.ixOff)) & mask) == (r.discriminator & mask); + } + + /// @dev S17, account half: every pin of the matched rule names an index that exists and holds + /// the expected key. + function _checkSvmAccountPins(SvmConfig storage cfg, bytes memory p, SvmPayloadView memory v, uint256 rule) + internal + view + { + uint256 n = cfg.pins.length; + for (uint256 i; i < n;) { + SvmAccountPin storage pin = cfg.pins[i]; + if (pin.ruleIndex == rule) { + if (v.count <= pin.accountIndex) { + revert UniversalRulesPolicyErrors.SvmAccountCountBelowPin(i, v.count, pin.accountIndex); + } + bytes32 actual = _svmAccount(p, pin.accountIndex); + if (actual != pin.expected) { + revert UniversalRulesPolicyErrors.SvmAccountPinMismatch(i, pin.accountIndex, pin.expected, actual); + } + } + unchecked { + ++i; + } + } + } + + /// @dev S17, data half. Offsets resolve from the start or the end of ix_data; init proved the + /// from-end shape reaches at least `len` back, so only the length floor is checked here. + /// Integer reads are little-endian, `len` bytes; the ratio is computed in uint256 and cannot + /// overflow (both operands are at most 64 bits wide). + function _checkSvmDataPins(SvmConfig storage cfg, bytes memory p, SvmPayloadView memory v, uint256 rule) + internal + view + { + uint256 n = cfg.dataPins.length; + for (uint256 i; i < n;) { + SvmDataPin storage dp = cfg.dataPins[i]; + if (dp.ruleIndex == rule) _checkOneDataPin(dp, p, v, i); + unchecked { + ++i; + } + } + } + + function _checkOneDataPin(SvmDataPin storage dp, bytes memory p, SvmPayloadView memory v, uint256 i) internal view { + uint256 off = _resolveOffset(dp.fromEnd, dp.offset, dp.len, v.ixLen, i); + uint256 at = v.ixOff + off; + SvmDataPinMode mode = dp.mode; + + if (mode == SvmDataPinMode.EQ) { + bytes32 mask = _prefixMask32(dp.len); + bytes32 actual = _loadWord(p, at) & mask; + bytes32 want = dp.expected & mask; + if (actual != want) revert UniversalRulesPolicyErrors.SvmDataPinMismatch(i, want, actual); + return; + } + + uint256 a = _uintLE(p, at, dp.len); + if (mode == SvmDataPinMode.GTE_LE) { + if (a < uint256(dp.expected)) { + revert UniversalRulesPolicyErrors.SvmDataFloorNotMet(i, a, uint256(dp.expected)); + } + } else if (mode == SvmDataPinMode.LTE_LE) { + if (a > uint256(dp.expected)) { + revert UniversalRulesPolicyErrors.SvmDataCeilingExceeded(i, a, uint256(dp.expected)); + } + } else { + uint256 offB = _resolveOffset(dp.fromEnd, dp.offsetB, dp.len, v.ixLen, i); + uint256 b = _uintLE(p, v.ixOff + offB, dp.len); + if (a * dp.den < b * dp.num) revert UniversalRulesPolicyErrors.SvmDataRatioNotMet(i, a, b, dp.num, dp.den); + } + } + + /// @dev The field's start relative to ix_data, or `SvmDataTooShortForPin` if ix_data cannot hold it. + function _resolveOffset(bool fromEnd, uint16 offset, uint8 len, uint256 ixLen, uint256 pin) + internal + pure + returns (uint256) + { + if (fromEnd) { + if (ixLen < offset) revert UniversalRulesPolicyErrors.SvmDataTooShortForPin(pin, ixLen); + return ixLen - offset; + } + if (ixLen < uint256(offset) + len) revert UniversalRulesPolicyErrors.SvmDataTooShortForPin(pin, ixLen); + return offset; + } + + /** + * @dev S18 — a CEA-controlled account may appear only where the matched rule pins it. Any other + * occurrence hands a program, running with the CEA's signature, an account it was not + * granted. Accounts absent from `ceaAccounts` are not judged: the list is the owner's + * statement of what holds value. O(count × |ceaAccounts| × |pins|), all bounded. + */ + function _checkCeaAccounts(SvmConfig storage cfg, bytes memory p, SvmPayloadView memory v, uint256 rule) + internal + view + { + // Never empty: init requires `expectedCEA` in the list (`_checkCeaAccountList`). + uint256 listed = cfg.ceaAccounts.length; + for (uint256 i; i < v.count;) { + bytes32 key = _svmAccount(p, i); + for (uint256 c; c < listed;) { + if (cfg.ceaAccounts[c] == key && !_pinnedAt(cfg, rule, i)) { + revert UniversalRulesPolicyErrors.CeaAccountAtUnpinnedIndex(i, key); + } + unchecked { + ++c; + } + } + unchecked { + ++i; + } + } + } + + /// @dev Whether the matched rule pins `index` at all. S17 has already proved that every pinned + /// position holds its expected key, so "pinned" and "pinned to this key" are the same fact + /// here and the key is not re-compared. + function _pinnedAt(SvmConfig storage cfg, uint256 rule, uint256 index) internal view returns (bool) { + uint256 n = cfg.pins.length; + for (uint256 i; i < n;) { + SvmAccountPin storage pin = cfg.pins[i]; + if (pin.ruleIndex == rule && pin.accountIndex == index) return true; + unchecked { + ++i; + } + } + return false; + } + + // ───────────────────────── svm byte helpers (pure, memory only) ───────────────────────── + + /// @dev The pubkey of account `i` in a parsed payload. Callers bound `i` by the parsed count. + function _svmAccount(bytes memory p, uint256 i) internal pure returns (bytes32) { + return _loadWord(p, SVM_HEADER_LEN + i * SVM_ACCOUNT_LEN); + } + + /// @dev Loads 32 bytes at `off`. Every caller has already proved the bytes it USES are inside + /// `b`; bytes past the end are masked away by the caller, never compared. + function _loadWord(bytes memory b, uint256 off) internal pure returns (bytes32 w) { + // solhint-disable-next-line no-inline-assembly + assembly ("memory-safe") { + w := mload(add(add(b, 0x20), off)) + } + } + + function _u32be(bytes memory b, uint256 off) internal pure returns (uint256) { + return uint256(uint32(bytes4(_loadWord(b, off)))); + } + + /// @dev Little-endian unsigned integer of `len` bytes (1..8) starting at `off`. + function _uintLE(bytes memory b, uint256 off, uint256 len) internal pure returns (uint256 v) { + bytes32 w = _loadWord(b, off); + for (uint256 i; i < len;) { + v |= uint256(uint8(w[i])) << (8 * i); + unchecked { + ++i; + } + } + } + + /// @dev Keeps the top `len` bytes of a bytes8. `len` 8 keeps all (a shift by >= 64 is zero). + function _prefixMask8(uint256 len) internal pure returns (bytes8) { + return bytes8(~(type(uint64).max >> (8 * len))); + } + + /// @dev Keeps the top `len` bytes of a bytes32. `len` 32 keeps all. + function _prefixMask32(uint256 len) internal pure returns (bytes32) { + return bytes32(~(type(uint256).max >> (8 * len))); + } + + /** + * @notice Exact-equality assertion on every per-asset spend counter; the change-flow race guard. + * + * @dev - Intended as the first entry of the owner's atomic change batch: assert, revoke, + * grant. A mismatch reverts the whole change. + * - Reverts if the config is not initialised. Reading zero from a ghost config is + * indistinguishable from reading zero from a real unused rules set, and this function + * exists to catch stale belief, so it must not have a silent-pass mode. + * - One expected value per listed asset, in list order; a different count reverts + * `SpentLengthMismatch` rather than checking a prefix. + * - Exact equality in both directions, so a credit landing between read and submit also + * forces recomposition. + * - Callable by anyone; it is a pure read. + * + * @param id Config id identifying the rules set. + * @param account The wallet the rules set belongs to. + * @param expectedSpent The per-asset spend totals the caller composed its change against. + */ + function assertSpent(ConfigId id, address account, uint256[] calldata expectedSpent) external view { + (bool init, RulesType mode) = _modeOf(id, SESSION_ENGINE, account); + if (init && mode == RulesType.NATIVE) revert UniversalRulesPolicyErrors.WrongModeForCall(RulesType.NATIVE); + + AssetCapState[] storage assets = _universalAssets(id, account); + + uint256 n = assets.length; + if (expectedSpent.length != n) revert UniversalRulesPolicyErrors.SpentLengthMismatch(n, expectedSpent.length); + for (uint256 i; i < n;) { + AssetCapState storage a = assets[i]; + if (a.spent != expectedSpent[i]) { + revert UniversalRulesPolicyErrors.AssetSpentMismatch(a.token, expectedSpent[i], a.spent); + } + unchecked { + ++i; + } + } + } + + /** + * @notice The native change-flow race guard: exact equality on all three counters. + * + * @dev - The native counterpart of the universal `assertSpent`, and the same intent: the + * first entry of the owner's atomic change batch — assert, revoke, grant. + * - Reverts `WrongModeForCall(UNIVERSAL)` on a universal config and `NotInitialized` on + * a ghost. It must not have a silent-pass mode: reading zero from a ghost config is + * indistinguishable from reading zero from a real unused rules set, and this function + * exists to catch stale belief. + * - Exact equality on every counter, in both directions. + * - Callable by anyone; it is a pure read. + * + * @param id Config id identifying the rules set. + * @param account The wallet the rules set belongs to. + * @param expectedValueSpent Native value total the caller composed against. + * @param expectedAmountSpent Metered calldata-amount total the caller composed against. + * @param expectedCalls Call count the caller composed against. + */ + function assertSpent( + ConfigId id, + address account, + uint256 expectedValueSpent, + uint256 expectedAmountSpent, + uint32 expectedCalls + ) external view { + (bool init, RulesType mode) = _modeOf(id, SESSION_ENGINE, account); + + if (!init) revert UniversalRulesPolicyErrors.NotInitialized(id, account); + if (mode != RulesType.NATIVE) revert UniversalRulesPolicyErrors.WrongModeForCall(RulesType.UNIVERSAL); + + NativeConfig storage cfg = _native[id][SESSION_ENGINE][account]; + + if (cfg.valueSpent != expectedValueSpent) { + revert UniversalRulesPolicyErrors.SpentMismatch(expectedValueSpent, cfg.valueSpent); + } + if (cfg.amountSpent != expectedAmountSpent) { + revert UniversalRulesPolicyErrors.SpentMismatch(expectedAmountSpent, cfg.amountSpent); + } + if (cfg.callsUsed != expectedCalls) { + revert UniversalRulesPolicyErrors.SpentMismatch(expectedCalls, cfg.callsUsed); + } + } + + /** + * @notice Credits a confirmed far-side failure back to one asset's spend counter. + * + * @dev - Callable only by the executor module; nobody else can fabricate a failure. + * - A ghost config reverts `NotInitialized` and an unlisted token `AssetNotAllowed`; the + * revert rolls the idempotency flag back, so a misrouted credit stays retryable. Both are + * resolved BEFORE the flag is checked, so an already-credited id sent with an unlisted + * token reports the token, the actionable mistake. + * - Reverts if the id was already credited. + * - Subtracts saturating, since the amount is trusted from Push core and cannot be + * verified here. Idempotency and saturation bound a wrong value, PER ASSET: a credit + * can never lower another token's counter. + * - `token` is trusted from the caller as much as `amount` is: URP never learns the + * outbound id at check time, so it cannot map an id to the token it metered. + * - Emits the amount actually applied, not the amount claimed, so monitoring can detect + * divergence between the two. + * - Not yet functional: the executor module does not yet call this on outbound failure, + * so until that lands a failed far leg leaves `spent` inflated and the remedy is + * revoke-and-regrant. + * - There is no gas counter and this path must never introduce one, because gas consumed + * on a failed outbound was genuinely consumed. + * + * @param id Config id identifying the rules set. + * @param account The wallet the rules set belongs to. + * @param outboundTxId Push-core transaction id, the idempotency key. + * @param token The listed asset whose counter is credited. + * @param amount Amount claimed as failed, credited saturating. + */ + function creditRevert(ConfigId id, address account, bytes32 outboundTxId, address token, uint256 amount) external { + if (msg.sender != UNIVERSAL_EXECUTOR_MODULE) revert UniversalRulesPolicyErrors.CallerIsNotUEModule(msg.sender); + + AssetCapState storage cap = _assetFor(_universalAssets(id, account), token); + + if (_credited[outboundTxId]) revert UniversalRulesPolicyErrors.AlreadyCredited(outboundTxId); + _credited[outboundTxId] = true; + + uint256 applied = cap.spent > amount ? amount : cap.spent; + cap.spent -= applied; + + emit RevertCredited(outboundTxId, id, account, token, applied); + } + + /** + * @dev The engine-keyed asset list of a UNIVERSAL config, either family. Reverts `NotInitialized` + * on an empty EVM slot; an SVM family byte is only ever written together with an initialised + * `SvmConfig`, so that branch needs no check. Shared by `assertSpent` and `creditRevert`. + */ + function _universalAssets(ConfigId id, address account) internal view returns (AssetCapState[] storage) { + if (_vmOf(id, SESSION_ENGINE, account) == VmFamily.SVM) return _svm[id][SESSION_ENGINE][account].assets; + + Config storage cfg = _configs[id][SESSION_ENGINE][account]; + if (!cfg.initialized) revert UniversalRulesPolicyErrors.NotInitialized(id, account); + return cfg.assets; + } + + /** + * @dev Gate 5: the entry for `token` in a listed-asset array, or `AssetNotAllowed`. A linear scan + * at n <= MAX_ASSETS, so up to eight cold reads on a miss. Makes no external call. + */ + function _assetFor(AssetCapState[] storage assets, address token) internal view returns (AssetCapState storage) { + uint256 n = assets.length; + for (uint256 i; i < n;) { + AssetCapState storage a = assets[i]; + if (a.token == token) return a; + unchecked { + ++i; + } + } + revert UniversalRulesPolicyErrors.AssetNotAllowed(token); + } + + /** + * @notice The full universal config including the allow-list, keyed on the session engine. + * + * @dev Reverts `WrongModeForCall(NATIVE)` on a native slot. An EMPTY slot returns the zeroed + * struct exactly as it always has — an empty slot is a STATE, a wrong-mode read is a + * CALLER BUG, and only the second is worth a revert. `getMode` is the documented first + * call for anything that does not already know a rules set's mode. + * + * @param id Config id identifying the rules set. + * @param account The wallet the rules set belongs to. + * @return The stored config. + */ + function getConfig(ConfigId id, address account) external view returns (Config memory) { + (bool init, RulesType mode) = _modeOf(id, SESSION_ENGINE, account); + if (init && mode == RulesType.NATIVE) revert UniversalRulesPolicyErrors.WrongModeForCall(RulesType.NATIVE); + if (init && _vmOf(id, SESSION_ENGINE, account) == VmFamily.SVM) { + revert UniversalRulesPolicyErrors.WrongVmForCall(VmFamily.SVM); + } + + return _configs[id][SESSION_ENGINE][account]; + } + + /** + * @notice The full SVM config including its rules and pins, keyed on the session engine. + * @dev Reverts `WrongModeForCall(NATIVE)` on a native slot and `WrongVmForCall(EVM)` on an EVM + * universal slot; an empty slot returns the zeroed struct. See `getConfig`. + * @param id Config id identifying the rules set. + * @param account The wallet the rules set belongs to. + * @return The stored SVM config. + */ + function getSvmConfig(ConfigId id, address account) external view returns (SvmConfig memory) { + (bool init, RulesType mode) = _modeOf(id, SESSION_ENGINE, account); + if (init && mode == RulesType.NATIVE) revert UniversalRulesPolicyErrors.WrongModeForCall(RulesType.NATIVE); + if (init && _vmOf(id, SESSION_ENGINE, account) == VmFamily.EVM) { + revert UniversalRulesPolicyErrors.WrongVmForCall(VmFamily.EVM); + } + + return _svm[id][SESSION_ENGINE][account]; + } + + /** + * @notice The full native config including its pins, keyed on the session engine. + * @dev Reverts `WrongModeForCall(UNIVERSAL)` on a universal slot; an empty slot returns the + * zeroed struct. See `getConfig`. + * @param id Config id identifying the rules set. + * @param account The wallet the rules set belongs to. + * @return The stored native config. + */ + function getNativeConfig(ConfigId id, address account) external view returns (NativeConfig memory) { + (bool init, RulesType mode) = _modeOf(id, SESSION_ENGINE, account); + if (init && mode == RulesType.UNIVERSAL) { + revert UniversalRulesPolicyErrors.WrongModeForCall(RulesType.UNIVERSAL); + } + + return _native[id][SESSION_ENGINE][account]; + } + + /** + * @notice Which rulebook a config uses, and which chain it was granted for. NEVER REVERTS. + * @dev The documented first call for any integrator that does not already know a rules set's + * mode. An empty slot returns `(initialized: false, mode: UNIVERSAL, chainHash: 0)` — and + * the mode value is MEANINGLESS when `initialized` is false, because `UNIVERSAL` is the + * enum's zero value. Read `initialized` first, always. + * + * `chainHash` is the rules set's chain, recorded at init (and, for a universal rules set, + * verified against every listed asset). It is THE chain record; there is no other. + * @param id Config id identifying the rules set. + * @param account The wallet the rules set belongs to. + * @return The stored mode record. + */ + function getMode(ConfigId id, address account) external view returns (ModeSlot memory) { + return _mode[id][SESSION_ENGINE][account]; + } + + /** + * @notice Exposes the idempotency set for monitoring. + * @param outboundTxId Push-core transaction id to query. + * @return Whether that id has already been credited. + */ + function isCredited(bytes32 outboundTxId) external view returns (bool) { + return _credited[outboundTxId]; + } + + /** + * @notice The implementation's version, readable THROUGH the proxy. + * + * @dev The proxy has no version of its own — it delegates, so this answers with whichever + * implementation is currently installed. That makes it the cheapest possible check that + * an upgrade actually took effect: read it before, upgrade, read it again. + * + * A `constant` in bytecode, deliberately not storage: it must change with the CODE, and + * a storage value could drift from the logic it claims to describe. + * + * BUMP THIS IN THE SAME COMMIT AS ANY LOGIC CHANGE. + */ + function version() external pure returns (string memory) { + return "3.1.0"; + } + + /** + * @notice ERC-165 support check. + * @param iid Interface id to query. + * @return True for the action-policy, policy and ERC-165 interfaces. + */ + function supportsInterface(bytes4 iid) external pure returns (bool) { + return + iid == type(IActionPolicy).interfaceId || iid == type(IPolicy).interfaceId + || iid == type(IERC165).interfaceId; + } + + /** + * @dev Reads the 32-byte word at `offset` and returns its low 20 bytes. Bounds-checked because + * reading past the end of a short blob would return adjacent memory, which could be + * manipulated to pass the beneficiary check. + * + * @param data Inner call calldata to read from. + * @param offset Byte offset of the beneficiary word, taken from config and never the request. + * @return The address encoded at that offset. + */ + function _extractBeneficiary(bytes memory data, uint16 offset) internal pure returns (address) { + if (uint256(offset) + 32 > data.length) revert UniversalRulesPolicyErrors.MalformedInnerCalldata(); + bytes32 word; + assembly { + word := mload(add(add(data, 0x20), offset)) + } + return address(uint160(uint256(word))); + } + + /** + * @dev The target and selector pair must appear in the allow-list. + * @param cfg Config whose allow-list is scanned. + * @param to Inner call target. + * @param selector Inner call selector. + * @return The matching rule; reverts with `CallNotAllowed` if there is none. + */ + function _requireAllowed(Config storage cfg, address to, bytes4 selector) + internal + view + returns (AllowedCall memory) + { + uint256 len = cfg.allowedCalls.length; + for (uint256 i; i < len;) { + AllowedCall storage rule = cfg.allowedCalls[i]; + if (rule.target == to && rule.selector == selector) { + return + AllowedCall(rule.target, rule.selector, rule.beneficiaryOffset, rule.hasBeneficiary, rule.maxValue); + } + unchecked { + ++i; + } + } + revert UniversalRulesPolicyErrors.CallNotAllowed(to, selector); + } + + /** + * @dev Memory slice helper. The bounds branch is unreachable from the three call sites, which + * are all length-guarded by gates 12 and 14, and is expected to show as uncovered. It stays + * because this is a `pure` helper whose safety must not depend on every future caller. + * + * @param data Blob to slice. + * @param start Byte offset to start at. + * @param len Number of bytes to copy. + * @return out The requested slice. + */ + function _slice(bytes memory data, uint256 start, uint256 len) internal pure returns (bytes memory out) { + if (start + len > data.length) revert UniversalRulesPolicyErrors.MalformedInnerCalldata(); + out = new bytes(len); + // MCOPY requires evm_version = "cancun"; lowering the EVM target breaks this silently at + // deploy time rather than loudly at compile time. + assembly ("memory-safe") { + mcopy(add(out, 0x20), add(add(data, 0x20), start), len) + } + } + + /** + * @dev Copies decoded WIRE terms into the STORAGE config. The two are deliberately different + * types: the wire shape is free to change, the storage layout is frozen forever + * (see the layout note on `__gap`). + * + * - Forces every asset's `spent` to zero. It is not a wire field at all — URP owns it. + * - Stores no chain: the chain of every rules set lives on `ModeSlot.chainHash`, where it has + * been verified against every listed asset. + * - Clears and repopulates the allow-list. + * - Does not set `initialized`; the caller does, immediately after this returns. + * + * @param cfg Storage slot to write into. + * @param incoming Decoded wire terms to copy from. + */ + function _store(Config storage cfg, UniversalTerms memory incoming) internal { + cfg.validUntil = incoming.validUntil; + cfg.expectedCEA = incoming.expectedCEA; + cfg.maxGasPerCall = incoming.maxGasPerCall; + delete cfg.assets; + _storeAssets(cfg.assets, incoming.assets); + + // Re-initialisation is refused, so in production this array is always empty here. The + // delete is kept for the stranger-slice path and for tests. + delete cfg.allowedCalls; + uint256 len = incoming.allowedCalls.length; + for (uint256 i; i < len;) { + cfg.allowedCalls.push(incoming.allowedCalls[i]); + unchecked { + ++i; + } + } + } + + /// @dev Wire asset caps into storage, element by element, every `spent` forced to zero. Shared by + /// both universal families. The caller deletes `dst` first, as for every other array. + function _storeAssets(AssetCapState[] storage dst, AssetCap[] memory src) internal { + uint256 len = src.length; + for (uint256 i; i < len;) { + dst.push( + AssetCapState({ + token: src[i].token, maxPerCall: src[i].maxPerCall, maxTotal: src[i].maxTotal, spent: 0 + }) + ); + unchecked { + ++i; + } + } + } + + /** + * @dev Copies a decoded native config into storage. The native counterpart of `_store`. + * + * - Forces `valueSpent`, `amountSpent` and `callsUsed` to zero, ignoring anything the + * caller supplied. A caller-set counter would be a granted head start on every cap. + * - `amount` is a value struct with no dynamic members, so it assigns wholesale. + * - `pins` must be copied ELEMENT BY ELEMENT: Solidity cannot assign a memory dynamic array + * into a storage struct field. Same shape as `allowedCalls` above, same reason. + * - Does not set `initialized`; the caller does, immediately after this returns. + * + * @param cfg Storage slot to write into. + * @param incoming Decoded native wire terms to copy from. + */ + function _storeNative(NativeConfig storage cfg, NativeTerms memory incoming) internal { + cfg.validUntil = incoming.validUntil; + cfg.target = incoming.target; + cfg.selector = incoming.selector; + cfg.maxValuePerCall = incoming.maxValuePerCall; + cfg.maxValueTotal = incoming.maxValueTotal; + cfg.valueSpent = 0; + cfg.amount = incoming.amount; + cfg.amountSpent = 0; + cfg.maxCalls = incoming.maxCalls; + cfg.callsUsed = 0; + + // Re-initialisation is refused, so in production this array is always empty here. The + // delete is kept for the stranger-slice path and for tests. + delete cfg.pins; + uint256 len = incoming.pins.length; + for (uint256 i; i < len;) { + cfg.pins.push(incoming.pins[i]); + unchecked { + ++i; + } + } + } + + /** + * @dev Copies decoded SVM wire terms into storage. The SVM counterpart of `_store`. + * - Forces every asset's `spent` to zero; URP owns it. + * - Every dynamic member is copied ELEMENT BY ELEMENT, same shape and same reason as + * `allowedCalls` and `pins`. + * - Does not set `initialized`; the caller does, immediately after this returns. + */ + function _storeSvm(SvmConfig storage cfg, SvmTerms memory incoming) internal { + cfg.validUntil = incoming.validUntil; + cfg.expectedCEA = incoming.expectedCEA; + cfg.gatewayProgram = incoming.gatewayProgram; + cfg.maxGasPerCall = incoming.maxGasPerCall; + delete cfg.assets; + _storeAssets(cfg.assets, incoming.assets); + + delete cfg.ceaAccounts; + uint256 len = incoming.ceaAccounts.length; + for (uint256 i; i < len;) { + cfg.ceaAccounts.push(incoming.ceaAccounts[i]); + unchecked { + ++i; + } + } + + delete cfg.programs; + len = incoming.programs.length; + for (uint256 i; i < len;) { + cfg.programs.push(incoming.programs[i]); + unchecked { + ++i; + } + } + + delete cfg.pins; + len = incoming.pins.length; + for (uint256 i; i < len;) { + cfg.pins.push(incoming.pins[i]); + unchecked { + ++i; + } + } + + delete cfg.dataPins; + len = incoming.dataPins.length; + for (uint256 i; i < len;) { + cfg.dataPins.push(incoming.dataPins[i]); + unchecked { + ++i; + } + } + } +} diff --git a/plan/agw/research/source-refresh-2026-10-07/contracts/push-chain-core-contracts/docs/universalmarketplace/README.md b/plan/agw/research/source-refresh-2026-10-07/contracts/push-chain-core-contracts/docs/universalmarketplace/README.md new file mode 100644 index 00000000..ebb83de4 --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/contracts/push-chain-core-contracts/docs/universalmarketplace/README.md @@ -0,0 +1,645 @@ +# Universal Marketplace + +How the Universal Marketplace contracts work, end to end. Written for a reviewer: every guarantee is tied to the +code that enforces it, and every assumption the code makes about something else is stated. + +| Doc | Contents | +|---|---| +| **This file** | What the marketplace is, its parts, the card lifecycle, `startJob` step by step, the rules check, the criteria, admin powers, upgradeability, trust model, limitations, tests, reviewer checklist | +| [`reference.md`](./reference.md) | Every function, event, error and storage slot, one by one | +| [`criteria.md`](./criteria.md) | The criteria template format, how a job's `JobSpec` is built from it, and a worked example | + +Code as of commit `cb69e0b` (branch `universalMarketplace_v1`). + +--- + +## Contract locations + +| Contract | Path | Kind | +|---|---|---| +| **UniversalMarketplace** | [`src/agentic-commerce-8183/UniversalMarketplace.sol`](../../src/agentic-commerce-8183/UniversalMarketplace.sol) | Upgradeable (TransparentUpgradeableProxy), stateful. The only contract users and providers call. | +| **UniversalMarketplaceTerms** | [`src/agentic-commerce-8183/UniversalMarketplaceTerms.sol`](../../src/agentic-commerce-8183/UniversalMarketplaceTerms.sol) | Stateless, `pure`, not upgradeable. The rules-side checks. | +| **JobSpecBuilder** | [`src/agentic-commerce-8183/libraries/JobSpecBuilder.sol`](../../src/agentic-commerce-8183/libraries/JobSpecBuilder.sol) | External library, linked into the marketplace and called by `DELEGATECALL`. Builds each job's criteria. | +| Types | [`src/agentic-commerce-8183/libraries/Types.sol`](../../src/agentic-commerce-8183/libraries/Types.sol) | Every struct and enum of the package (file-level). | +| Errors | [`src/agentic-commerce-8183/libraries/Errors.sol`](../../src/agentic-commerce-8183/libraries/Errors.sol) | `UniversalMarketplaceErrors` (37 errors), `RulesBindingHookErrors`, `ERC8183HookErrors`. | +| JobSpecTypes | [`src/agentic-commerce-8183/libraries/JobSpecTypes.sol`](../../src/agentic-commerce-8183/libraries/JobSpecTypes.sol) | The built criteria (`JobSpec`): the wire format shared with the future UniversalHook and UniversalEvaluator. | +| IUniversalMarketplace | [`src/agentic-commerce-8183/interfaces/IUniversalMarketplace.sol`](../../src/agentic-commerce-8183/interfaces/IUniversalMarketplace.sol) | The marketplace's events and functions. | +| IUniversalMarketplaceTerms | [`src/agentic-commerce-8183/interfaces/IUniversalMarketplaceTerms.sol`](../../src/agentic-commerce-8183/interfaces/IUniversalMarketplaceTerms.sol) | The Terms helper's two functions. | +| AGW mirrors | [`interfaces/external/IAGW.sol`](../../src/agentic-commerce-8183/interfaces/external/IAGW.sol), [`IAGWFactory.sol`](../../src/agentic-commerce-8183/interfaces/external/IAGWFactory.sol), [`ISmartSession.sol`](../../src/agentic-commerce-8183/interfaces/external/ISmartSession.sol) | Byte-exact mirrors of the Push Agentic Wallet (AGW) types and functions the package calls. | + +Contracts the marketplace works with, but which are **not** part of it: + +| Contract | Where | Role | +|---|---|---| +| **AgenticCommerce** (the "kernel") | [`src/agentic-commerce-8183/AgenticCommerce.sol`](../../src/agentic-commerce-8183/AgenticCommerce.sol) | The ERC-8183 job kernel: jobs, budgets, escrow, payout. The marketplace only creates jobs on it (through the user's wallet). | +| **RulesBindingHook** | [`src/agentic-commerce-8183/hooks/RulesBindingHook.sol`](../../src/agentic-commerce-8183/hooks/RulesBindingHook.sol) | The interim 8183 hook every marketplace job is created with. At `fund` it binds the job to the wallet's live rules set and allows one live job per wallet. | +| **AGW + AGWFactory** | `push-agentic-wallet` repo | The user's agentic wallet (an ERC-7579 account with SmartSession) and its factory. Verifies the owner's signature. | +| **UniversalRulesPolicy (URP)** | `push-agentic-wallet` repo | The SmartSession policy that enforces the agent's rules when the agent sends outbound calls through the gateway. | +| **CEAFactory** | destination chain (`src/cea/CEAFactory.sol` here) | Deploys each user's Chain Executor Account (CEA) on the destination chain. The marketplace only predicts CEA addresses. | +| UniversalHook, UniversalEvaluator (V2) | not built yet | The intended long-term hook and evaluator. Until they ship, jobs use RulesBindingHook and a Push-controlled evaluator address. | + +--- + +## 1 · What the marketplace is + +The Universal Marketplace is a registry of **agent cards** plus one entry point, **`startJob`**. + +- **An agent card** is a standing offer from one provider (an AI agent's address). It covers one job type on one + EVM execution chain. It says who the agent is, what it does, what it needs permission to do there (the + **rules**), and how "done" is judged (the **criteria template**). +- **`startJob`** is one relayed call. On a single signature from the user, it: + 1. deploys the user's agentic wallet (AGW) if needed; + 2. grants the AGW the card's rules, so the agent can act from it; and + 3. creates an ERC-8183 job on the kernel, with the AGW as client, the card's provider as provider, the + marketplace's configured evaluator and hook, and **criteria built on-chain from the card**. + +What the marketplace deliberately does **not** do: + +| Not done | Where it happens instead | +|---|---| +| Move any funds | The user funds the AGW in a separate transaction. The provider prices the job with `setBudget`; the AGW funds it with `fund`. Both are kernel calls. | +| Execute the card's token approvals | The owner executes them in the funding transaction the SDK builds. The card only declares them (`Approval[]`). | +| Judge whether the criteria make sense | Nobody, on-chain. The admin's **verified tag** is the review. | +| Evaluate the job | The job's evaluator (the UniversalEvaluator, once shipped). | +| Enforce the agent's rules at execution | The AGW's SmartSession engine and URP. | + +The marketplace never holds tokens or native PC. Tests `test_MS02_movesNoFunds` and the invariants +`MI02_marketplaceHoldsNothing` and `MI05_userBalanceNeverMovedByStartJob` check this. + +--- + +## 2 · Glossary + +| Term | Meaning | +|---|---| +| **Provider / agent** | One address. It registers the card, is the 8183 job's `provider` (and fee recipient), and is the agent the rules authorise (`sessionValidatorInitData == abi.encode(provider)`). | +| **User / owner** | The person starting a job. Signs one `OwnerIntent`; owns the AGW. | +| **AGW** | Agentic Wallet: the user's smart account, deployed by the AGW factory at an address derived from `(owner, index)`. The job's client. | +| **CEA** | Chain Executor Account: the AGW's account on the destination chain, at an address derived from the AGW. It is where the agent's outbound calls execute and where the criteria read balances. | +| **Rules** | The SmartSession `Session` granted to the agent on the AGW. Its one action carries the URP policy with `UniversalTerms` (asset, caps, allowed calls, expected CEA, expiry). `rulesId` is the engine's `permissionId`. | +| **OwnerIntent** | The single owner-signed message (AGW type). One signature authorises the wallet deploy, the rules grant and the `createJob` execution. | +| **Criteria template** | `EvaluationTemplate`: the V2 `JobSpec` with holes. Stored on the card. | +| **JobSpec** | The built criteria for one job: reads on the execution chain, checks against targets, and an AND/OR tree. `abi.encode(JobSpec)` is the 8183 job's `description`. | +| **Card version** | 1 at registration, +1 per modification. Bound into every job's criteria, so an intent signed against one version can't start a job on another. | +| **Verified tag** | An admin label: "this card, at this version, was reviewed". A tag, not a gate. | +| **chainHash** | `keccak256` of a CAIP-2 string such as `"eip155:11155111"`. The key for chain configuration. | +| **pushChainHash** | `keccak256("eip155:" ‖ block.chainid)`: Push Chain itself. No card may name it. | + +--- + +## 3 · The parts and how they fit + +```mermaid +flowchart LR + Provider -- registerCard / modifyAgentCard --> MKT[UniversalMarketplace] + Relayer -- startJob --> MKT + MKT -- validateRulesTerms / verifySession --> TERMS[UniversalMarketplaceTerms] + MKT -- DELEGATECALL build --> JSB[JobSpecBuilder] + JSB -. expectedCEAOf .-> MKT + MKT -- predictWallet / deployWalletWithSig / ownerOf --> FACT[AGWFactory] + MKT -- grantRulesWithSig / executeWithSig --> AGW[User's AGW] + AGW -- createJob --> KERNEL[AgenticCommerce kernel] + MKT -- jobCounter / getJob / whitelistedHooks --> KERNEL + KERNEL -- beforeAction / afterAction --> HOOK[RulesBindingHook] +``` + +- **The marketplace** holds the cards and runs `startJob`. It is the `executor` named in the user's intent: the + factory and the wallet accept that intent only from it. +- **The Terms helper** is pure logic, split out for the EIP-170 size limit. It validates a card's rules at + registration and checks the user's session against the card at `startJob`. +- **JobSpecBuilder** is an external library. It turns the card's template plus the job's inputs into the job's + `JobSpec`. It runs in the marketplace's context, so it reads CEAs from the marketplace's own `expectedCEAOf`. +- **The AGW** does the work that needs the owner's authority: it verifies the owner's signature, grants the rules, + and calls `createJob` itself, so the kernel records the AGW as the client. + +--- + +## 4 · The agent card + +### 4.1 What a card holds + +A card is three things stored on-chain together: + +1. **`AgentCard`**, the listing. Who: `provider`. What: `jobType`, `metadataURI` and `metadataHash` (off-chain + JSON with the name, summary, ABIs, criteria in words and param units). Where: `chainNamespace`, a full CAIP-2 + string `"eip155:"`. Commercials and windows: `fee` (reference price), `principalMin` / `principalMax`, + `minDuration` / `maxDuration`, `minExecuteWindow`, `settleWindow`. And an `active` switch. +2. **Rules terms**, `abi.encode(RulesCardTerms)`: the rules `asset` (a PRC20 of the card's chain), `maxPCPerCall`, + the `allowedCalls` the agent may make, and the `approvals` the owner must make first. +3. **Criteria template**, `abi.encode(EvaluationTemplate)`: see [`criteria.md`](./criteria.md). + +`getCard(cardId)` returns all three, the version and both tags in one call (`CardView`). + +### 4.2 What registration checks + +`registerCard` (and `modifyAgentCard`) run `_validateCard`, in this order. The first failure reverts. + +| # | Check | Error | +|---|---|---| +| 1 | `jobType != 0` | `InvalidCard("job type zero")` | +| 2 | `metadataURI` not empty | `InvalidCard("metadata uri empty")` | +| 3 | `metadataHash != 0` | `InvalidCard("metadata hash zero")` | +| 4 | `chainNamespace` starts with `"eip155:"` and is longer than 7 bytes | `InvalidCard("chain namespace")` | +| 5 | the chain is not Push, and has a CEA deployment (`setCEADeployment`) | `ChainNotSupported(chainHash)` | +| 6 | the caller is not the marketplace's evaluator | `InvalidCard("provider is evaluator")` | +| 7 | `principalMax != 0` and `principalMin ≤ principalMax` | `InvalidCard("principal range")` | +| 8 | `1 hour ≤ minDuration ≤ maxDuration` | `InvalidCard("duration range")` | +| 9 | `settleWindow != 0` | `InvalidCard("settle window")` | +| 10 | `minExecuteWindow + settleWindow ≤ maxDuration` | `InvalidCard("execute window")` | +| 11 | the rules terms pass `Terms.validateRulesTerms` (§6.1) | `InvalidCard(...)` from Terms | +| 12 | the rules asset's `SOURCE_CHAIN_NAMESPACE()` is a well-formed string equal to the card's chain | `InvalidCard("asset")` / `InvalidCard("asset chain")` | + +**The criteria template is stored as given; it is not checked.** Whether the evaluator can run it is the +provider's responsibility. A malformed template fails only when a job is built from it (§7.3). + +Check 12 uses a raw `staticcall` plus an ABI-shape check, not `try/catch`: a `try` clause cannot catch the +decoding of its own return data, so a non-string answer would otherwise revert with an opaque error. A codeless +asset answers empty and fails the length check. + +### 4.3 Lifecycle + +```mermaid +stateDiagram-v2 + [*] --> Active: registerCard (version 1, unverified) + Active --> Inactive: setCardActive(false) by provider + Inactive --> Active: setCardActive(true) by provider + Active --> Active: modifyAgentCard (version +1, tag cleared) + Inactive --> Inactive: modifyAgentCard (version +1, tag cleared) + Active --> Disabled: adminDisableCard + Inactive --> Disabled: adminDisableCard + Disabled --> [*] +``` + +| Action | Who | Effect | +|---|---|---| +| `registerCard` | anyone (becomes the provider) | Stores the card, version 1, active, unverified. The contract writes `provider = msg.sender` and `active = true`, ignoring the caller's values. | +| `modifyAgentCard` | the provider | Replaces every field except `provider`, `chainNamespace` and `active`, and both blobs. Version +1, verified tag cleared. **The chain cannot change** (`CardIdentityImmutable`): another chain is another card. Refused for an admin-disabled card. | +| `setCardActive` | the provider | Switches the card on or off. An admin-disabled card cannot be switched back on. | +| `verifyAgentCard(cardId, version)` | admin | Sets the verified tag. `version` must be the current version (`CardVersionMismatch`), so a provider who modifies after review makes it revert. Refused for an admin-disabled card; allowed for an inactive one. | +| `revokeAgentCardVerification` | admin | Clears the tag. Idempotent: emits only if there was a tag. | +| `adminDisableCard` | admin | Permanent kill switch: disabled, inactive, tag cleared. The provider cannot undo it. | + +**Modification and signed intents.** The card version is hashed into every job's `origin`, which is inside the +`createJob` calldata the owner signs. After a modification, an intent signed against the old version fails at +`CardVersionMismatch` (stale `p.cardVersion`) or at `IntentExecMismatch` (current version, old intent). A provider +therefore cannot swap the card under a user's signature. Jobs already started are untouched. + +**The verified tag is a tag, not a gate.** `startJob` treats verified and unverified cards alike. The SDK shows it. + +--- + +## 5 · End-to-end flow + +```mermaid +sequenceDiagram + autonumber + actor P as Provider (agent) + actor U as User (owner) + participant SDK + participant M as UniversalMarketplace + participant F as AGWFactory + participant W as User's AGW + participant K as Kernel (AgenticCommerce) + participant H as RulesBindingHook + + P->>M: registerCard(card, rulesTerms, template) + U->>SDK: pick a card, principal, times, params + SDK->>M: previewIntent(request, session) + M-->>SDK: OwnerIntent (calldata hash binds the built criteria) + U->>SDK: sign the OwnerIntent once + SDK->>M: startJob(params) via a relayer + M->>F: deployWalletWithSig(intent, sig) [if new] + M->>W: grantRulesWithSig(session, intent, sig) + M->>W: executeWithSig(createJob calldata, intent, sig) + W->>K: createJob(provider, evaluator, expiredAt, JobSpec, hook) + Note over M,K: job is Open, budget 0. Nothing has moved. + U->>W: funding tx (SDK-built): principal, PC, fee, approvals + P->>K: setBudget(jobId, card.fee) + W->>K: fund(jobId, card.fee, abi.encode(rulesId)) + K->>H: beforeAction(fund): bind job to the live rules set + P->>W: act within the rules (URP-enforced outbound calls) + P->>K: submit; evaluator completes or rejects +``` + +1. **The provider registers a card** (§4). +2. **The user starts a job.** The SDK calls `previewIntent`, the user signs the returned `OwnerIntent` once, and a + relayer calls `startJob`. The AGW is deployed (if new), granted the rules, and creates the job in **Open** + with budget 0. +3. **The user funds**, in one transaction from their account, built by the SDK. It moves the principal (in the + rules asset), PC for gas and the fee into the AGW, and runs the card's approvals as the owner. +4. **The provider prices** the job: `kernel.setBudget(jobId, card.fee)`. +5. **The AGW funds** the job: `kernel.fund(jobId, card.fee, abi.encode(rulesId))`. The kernel calls the hook, which + checks the AGW is a factory wallet, the rules set is live, and the AGW has no other live job. A provider who + prices above the card's fee cannot be funded, because the owner's `expectedBudget` is the card fee + (`BudgetMismatch`); `test_MS17_8183Continuation_feeEnforcedAtFund` covers this. +6. **The agent executes** within the rules, submits, and the evaluator completes or rejects (kernel). + +Steps 3–6 are outside the marketplace. They are shown because the marketplace's design depends on them. + +--- + +## 6 · The rules: card ⊆ session + +The owner signs a SmartSession `Session` the SDK builds, which they cannot read. The marketplace proves it is +exactly the card's rules, for the card's agent, bound to this job. Both checks live in the Terms helper. + +### 6.1 At registration: `validateRulesTerms` + +| Check | Error | +|---|---| +| `asset != 0` | `InvalidCard("asset zero")` | +| 1 to 32 allowed calls (URP's bound) | `InvalidCard("allow-list size")` | +| no duplicate `(target, selector)` | `InvalidCard("duplicate call")` | +| no `approve` or `increaseAllowance` in the allow-list (approvals are the owner's, never agent authority) | `InvalidCard("erc20 approval")` | +| `transfer` must pin its recipient at offset 4 | `InvalidCard("erc20 transfer recipient")` | +| `transferFrom` must pin its recipient at offset 36 | `InvalidCard("erc20 transferFrom recipient")` | +| at most 8 approvals | `InvalidCard("approval count")` | +| each approval names a token and a spender | `InvalidCard("approval token")` / `("approval spender")` | +| `capIsPrincipal` ⇒ `cap == 0`; otherwise `cap > 0` | `InvalidCard("approval cap")` | +| no duplicate `(token, spender)` | `InvalidCard("duplicate approval")` | + +The function returns the asset, which the marketplace then checks against the card's chain (§4.2, check 12). + +### 6.2 At `startJob`: `verifySession` + +In order; the first mismatch reverts. + +| # | The session must… | Error | +|---|---|---| +| 1 | name the card's provider as its agent: `sessionValidatorInitData == abi.encode(provider)` | `AgentMismatch()` | +| 2 | have exactly one action | `ActionCount()` | +| 3 | with exactly one policy | `PolicyShape(0)` | +| 4 | whose envelope `abi.decode(initData, (string chainNamespace, bytes body))` names the card's chain | `ChainMismatch(0)` | +| 5 | carry `UniversalTerms` with the card's `asset` | `AssetMismatch()` | +| 6 | and the card's `maxPCPerCall` | `PCCapMismatch()` | +| 7 | and the card's `allowedCalls`, byte-equal (same calls, same order, same caps) | `ActionsMismatch()` | +| 8 | with `maxAmountTotal == principal` and `maxAmountPerCall ≤ principal` | `CapMismatch()` | +| 9 | expiring with the job: `validUntil == expiredAt` | `ExpiryMismatch()` | +| 10 | paying only the AGW's own CEA on that chain: `expectedCEA == expectedCEAOf(agw, chainHash)` | `ExpectedCEAMismatch(expected, actual)` | + +The card's `approvals` are not compared: they are the owner's actions, never agent authority. A session that adds +an approval to the agent's allow-list fails check 7 (`test_MB05_approvalsNotInSession`). + +What check 10 protects: URP pins every beneficiary-pinned call to `expectedCEA`, so funds the agent moves can only +land in the user's own CEA. The marketplace derives the CEA itself (§9); the SDK derives it independently from the +destination `CEAFactory`. A disagreement fails closed before anything happens. + +Fields the marketplace does **not** check are listed in §13.2. + +--- + +## 7 · The criteria: card ⊆ job + +### 7.1 Why they are built on-chain + +If the SDK or relayer supplied the job's criteria, nothing would guarantee they are the card's: a relayer could +swap in easier ones. Instead, `startJob` builds the criteria from the card's **stored** template and the job's +inputs. The result goes into the `createJob` calldata, which the owner's intent hashes (`execCalldataHash`). So +the owner's single signature covers the exact criteria, and the marketplace re-derives them before executing. + +### 7.2 What building does + +`JobSpecBuilder.build(template, ctx)` fills the template's holes: + +| Hole | Filled with | +|---|---| +| a `Fill` with source `CEA` in a read's args | the AGW's CEA **on that read's chain** | +| a `Fill` with source `PARAM` | one of the job's `params` (two's complement for negatives) | +| a check target `FIXED` | the template's value | +| a check target `PRINCIPAL_BPS` | `principal × bps / 10 000`, rounded down | +| a check target `PARAM` | one of the job's `params` | +| a check target `CEA` | the AGW's CEA on the check's read chain | +| `executeBy` | the job's `executeBy` | +| `failFinalAt` | `executeBy + card.settleWindow` | +| `origin` | `keccak256(abi.encode(marketplace, cardId, cardVersion, principal))` | + +`nodes` (the AND/OR tree) and every other read field are copied verbatim. The full format and a worked example +are in [`criteria.md`](./criteria.md). + +### 7.3 What building checks, and what it doesn't + +The template is **not judged**. Building checks only what building needs: + +| Check | Error | +|---|---| +| one param per template param | `ParamCountMismatch(expected, actual)` | +| each param inside its inclusive bounds | `ParamOutOfRange(index, value)` | +| each fill writes inside its read's args | `FillOutOfBounds(read, fill)` | +| `principal × bps` fits in uint256 | `TargetOverflow(check)` | +| a CEA is asked only for a chain with a CEA deployment | `ChainNotSupported(chainHash)` | + +Anything else malformed reverts on its own when a job is built (an index out of range panics, undecodable bytes +fail in `abi.decode`). A template the evaluator could not run, such as a read no check uses or an unreachable +node, **builds without complaint** (`test_JB08_doesNotJudgeTheTemplate`). The verified tag is the review. + +--- + +## 8 · `startJob`, step by step + +`startJob(StartJobParams p)` is `whenNotPaused` and `nonReentrant`. **Every check runs before the first state +change**, so a refusal leaves no wallet, no grant and no job (`test_MS13_intentSessionMismatch_noStateOnFailure`). + +| Step | What | Code | Error on failure | +|---|---|---|---| +| 1 | Card exists and is active; its chain is not paused | `_checkCardAndJob` | `CardInactive()` · `ChainPaused(chainHash)` | +| 2 | `p.cardVersion` is the card's current version | `_checkCardAndJob` | `CardVersionMismatch(provided, current)` | +| 3 | `principalMin ≤ principal ≤ principalMax` | `_checkJobWindows` | `PrincipalOutOfRange()` | +| 4 | `now + minDuration ≤ expiredAt ≤ now + maxDuration` | `_checkJobWindows` | `ExpiryOutOfRange()` | +| 5 | `executeBy ≥ now + minExecuteWindow` and `executeBy + settleWindow ≤ expiredAt` | `_checkJobWindows` | `ExecuteByOutOfRange()` | +| 6 | the card's provider is not the current evaluator (it may have changed since registration) | `_checkCardAndJob` | `ProviderIsEvaluator()` | +| 7 | `agw = AGW_FACTORY.predictWallet(intent.owner, intent.index)`; the intent names that wallet and this marketplace as executor | `_resolveWallet` | `IntentWalletMismatch(expected, provided)` · `ExecutorMismatch(expected, actual)` | +| 8 | the AGW has no live job started here | `isAGWFree` | `AGWBusy(agw, lastJobId)` | +| 9 | build the job's criteria from the card's template | `_buildCreateJob` → `JobSpecBuilder.build` | §7.3 errors | +| 10 | encode `createJob(provider, evaluator, expiredAt, description, hook)` as an ERC-7579 single execution: `abi.encodePacked(kernel, 0, call)` | `_buildCreateJob` | — | +| 11 | the intent's `mode`, `execCalldataHash` and `nonceKey` (the startJob owner lane) are exactly this execution, and its `sessionHash` is this session | `_bindIntent` | `IntentExecMismatch(expectedHash)` · `IntentSessionMismatch(expectedHash)` | +| 12 | the session is the card's rules (§6.2) | `_verifyRules` → `TERMS.verifySession` | §6.2 errors | +| — | *first state change* | | | +| 13 | deploy the predicted wallet (`deployWalletWithSig`) and require it landed at the prediction; or, for an existing wallet, require the factory's `ownerOf` is the intent's owner | `_deployOrCheckOwner` | `AGWMismatch(expected, actual)` · `WalletOwnerMismatch(expected, actual)` | +| 14 | `rulesId = AGW.grantRulesWithSig(session, intent, sig)` | `startJob` | the AGW's own errors | +| 15 | `AGW.executeWithSig(mode, calldata, intent, sig)`; exactly one new kernel job; its client is the AGW and its provider, hook and evaluator are the expected ones | `_createJob` | `UnexpectedJobCount(before, after)` · `JobMismatch()` | +| 16 | record `lastJobOf`, `cardOfJob`, `agwOfJob`, `rulesOfJob`; emit `JobStarted` | `startJob` | — | + +**What one signature binds.** The owner signs one `OwnerIntent`. Through it: + +| Bound value | How | +|---|---| +| principal, `executeBy`, params, card version, the wallet (through its CEA) | inside the built `JobSpec`, inside the `createJob` calldata → `execCalldataHash` | +| `expiredAt`, provider, evaluator, hook | `createJob` arguments → `execCalldataHash` | +| the rules (asset, caps, calls, CEA, expiry) | the `Session` → `sessionHash` | +| which wallet, which executor | `wallet`, `executor` fields | +| replay | `nonceKey` / `nonceSeq` (the owner lane) and `grantNonce`, checked by the AGW | + +`test_MS12_intentExecMismatch_everyBoundInput` changes each bound input in turn and expects `IntentExecMismatch`. + +**Who checks the signature.** Not the marketplace. The factory and the wallet verify the owner's signature +themselves and accept the intent only from its `executor` (this contract). The marketplace's own checks +(steps 7 and 11) mirror the wallet's, so a mismatch fails early with a named error before any state change. + +**Previewing.** `previewIntent(request, session)` returns the exact `OwnerIntent` to sign: it predicts the wallet, +builds the same calldata `startJob` will, hashes it, and reads the wallet's live nonces (0 for a wallet not yet +deployed). `buildCreateJobCalldata` returns the execution itself. Both revert `CardInactive` for an unknown card, +and both revert exactly as step 9 would on a bad template. `test_MV04_buildCreateJobCalldata` asserts that what +`startJob` executes equals this view's answer. + +**Front-running.** `startJob` can be called by anyone holding the signed parameters; the relayer has no power. A +third party who submits them first starts exactly the job the owner signed. The AGW's nonces make it one-shot. + +--- + +## 9 · Chains and CEAs + +A card's chain must be configured before any card can name it: + +- **`setCEADeployment(chainHash, ceaFactory, ceaProxyImpl)`** (admin) records the destination chain's CEA factory + and proxy implementation. A chain without one cannot carry cards (`ChainNotSupported`), and the builder cannot + ask for a CEA on it. +- **`expectedCEAOf(agw, chainHash)`** mirrors `CEAFactory._computeCEAInternal`: an OZ minimal proxy of + `ceaProxyImpl`, salt `keccak256(abi.encode(agw))`, deployed by the CEA factory + (`test_MV02_expectedCEAOf` checks it against the real `CEAFactory`). +- **Push itself is never a card chain** (`pushChainHash`, set at `initialize` from `block.chainid`). + +**CEA implementation rotation.** If the destination rotates its CEA proxy implementation, `expectedCEAOf` goes +stale. An honest SDK then signs the new CEA, and `startJob` refuses it with `ExpectedCEAMismatch` until the admin +updates the deployment (`test_MV03_ceaRotation_staleCaught`). Runbook: + +1. `setUniversalPaused(chainHash, true)` stops `startJob` for that chain's cards (`ChainPaused`). +2. Rotate the implementation on the destination chain. +3. `setCEADeployment(chainHash, factory, newImpl)`. +4. `setUniversalPaused(chainHash, false)`. + +The CEA value is security-relevant: it is the beneficiary pin of every rules grant on that chain (§6.2 check 10). +A wrong entry still cannot silently redirect funds, because the SDK derives the CEA independently and the two +must agree. + +--- + +## 10 · One live job per wallet + +Two rules, at two moments: + +| Rule | Where | Busy when | +|---|---|---| +| `isAGWFree(agw)` | marketplace, `startJob` step 8 | the last job **started here** for the AGW is Funded, Submitted, or Open and not yet expired | +| `AGWHasLiveJob` | RulesBindingHook, at `fund` | the AGW's last job **bound by the hook** is Funded or Submitted | + +The marketplace's rule is stronger: an Open, unexpired job also blocks, so a user cannot stack unfunded jobs on +one wallet. An Open job frees the wallet once it expires or is rejected; a Funded or Submitted job frees it once +it is completed, rejected or refunded (`test_MS14_oneLiveJob`). + +Jobs created directly on the kernel, not through the marketplace, are invisible to `isAGWFree`. The hook's rule +still covers any job that names the hook. + +--- + +## 11 · Admin powers + +Roles (OpenZeppelin AccessControl): `DEFAULT_ADMIN_ROLE` manages roles; `ADMIN_ROLE` runs every admin function. +Both go to `InitParams.admin`. Upgrades are separate: they belong to the ProxyAdmin owner. + +| Function | Effect | Limits | +|---|---|---| +| `setHook(hook)` | hook of every **new** job | must be non-zero and whitelisted on the kernel; existing jobs keep theirs | +| `setEvaluator(evaluator)` | evaluator of every **new** job | non-zero; a card whose provider is the new evaluator can't start jobs (`ProviderIsEvaluator`) | +| `setCEADeployment(chainHash, factory, impl)` | enables a chain, sets its CEA derivation | both non-zero | +| `setUniversalPaused(chainHash, bool)` | stops or resumes `startJob` for one chain | — | +| `pause()` / `unpause()` | stops or resumes `registerCard`, `modifyAgentCard`, `startJob` | admin functions, `setCardActive` and views stay live | +| `adminDisableCard(cardId)` | permanently disables a card | cannot re-enable | +| `verifyAgentCard(cardId, version)` / `revokeAgentCardVerification(cardId)` | the verified tag | version-bound | + +The admin cannot move funds (the marketplace holds none), cannot change a started job (the kernel fixed its +provider, evaluator, hook and description at creation), and cannot re-enable a disabled card. + +The admin **can** influence future jobs: the evaluator decides completion, and the hook gates funding. Both are +trust points of the deployment. + +--- + +## 12 · Deployment, upgradeability and build + +### 12.1 Wiring + +1. Deploy `UniversalMarketplaceTerms` (no constructor arguments). +2. Deploy the `JobSpecBuilder` library and link it into `UniversalMarketplace`. Foundry links it automatically in + tests and scripts. +3. Deploy the `UniversalMarketplace` implementation; its constructor disables initializers. +4. Deploy a `TransparentUpgradeableProxy` calling `initialize(InitParams{agwFactory, kernel, hook, evaluator, + terms, admin})`. Every field must be non-zero, and the hook must be whitelisted on the kernel. +5. `setCEADeployment` for each supported destination chain. + +Interim configuration (until the V2 UniversalHook and UniversalEvaluator ship): `hook` = RulesBindingHook, +`evaluator` = a Push-controlled address. + +### 12.2 Upgradeability + +- **The marketplace** sits behind a `TransparentUpgradeableProxy`. Its storage is append-only (slots 0–18, then + a 30-slot gap, 19–48; see [`reference.md`](./reference.md#storage-layout)). OZ upgradeable bases use ERC-7201 + namespaced storage, so they don't occupy these slots. `test_MV09_storageLayout_bySlot` pins every slot by + position, and `test_MV10_upgrade_preservesState` upgrades through the ProxyAdmin. +- **Terms and JobSpecBuilder** are not upgradeable. A rule change is a new deployment plus a marketplace upgrade + that points at it. Terms is an `initialize`-time address (`TERMS`); the library's address is linked into the + implementation's bytecode. + +### 12.3 Build configuration + +- solc 0.8.26, `via_ir`, EVM `shanghai`. +- **`UniversalMarketplace.sol` compiles at 1 000 optimizer runs**; every other contract uses 99 999. This is the + `compilation_restrictions` entry in `foundry.toml`. At 99 999 runs the inliner puts the marketplace over the + EIP-170 limit. +- Coverage must run with `FOUNDRY_PROFILE=coverage`, which drops that restriction. Otherwise contracts tested + from both compile jobs exist twice, and coverage keeps the hits of only one. + +| Contract | Runtime size | Margin to EIP-170 | +|---|---|---| +| UniversalMarketplace (1 000 runs) | 21,283 B | 3,293 B | +| JobSpecBuilder | 6,452 B | 18,124 B | +| UniversalMarketplaceTerms | 5,383 B | 19,193 B | +| RulesBindingHook | 4,539 B | 20,037 B | + +--- + +## 13 · Trust model and security notes + +### 13.1 What the marketplace guarantees + +| Guarantee | Enforced by | Tested by | +|---|---|---| +| The rules granted are exactly the card's, for the card's agent, bound to this job's principal, expiry and CEA | `verifySession` (§6.2) | `MB01`–`MB05`, `MT04`–`MT07` | +| The job's criteria are exactly the card's template, filled with this job's inputs | `_buildCreateJob` + intent binding (§7, §8) | `MS01`, `ML13`, `MV04`, `MC01`–`MC04` | +| The job is created by the user's own wallet, with the card's provider, the configured evaluator and hook | `_createJob` | `MS15` | +| A provider can't change a card under a user's signature | card version in `origin` | `ML11` | +| Nothing moves through the marketplace | no transfer code; no payable function | `MS02`, `MI02`, `MI05` | +| One live job per wallet | `isAGWFree` (§10) | `MS14`, `MI01` | +| Every refusal happens before any state change | step order (§8) | `MS13` | + +### 13.2 What the marketplace relies on, or does not check + +1. **The AGW and its factory verify the owner's signature** and accept the intent only from its executor. They + also enforce deadlines, nonces and the signer chain. The marketplace's mirror checks only name the error + early. The package's own tests use `MockAGW` / `MockAGWFactory`, which verify no signature; the AGW repo's + end-to-end suite runs the real stack. +2. **SmartSession and URP enforce the rules at execution.** The marketplace checks the rules' *content* at grant + time; it does not execute or watch them. +3. **`verifySession` checks the policy's configuration, not which contracts interpret it.** These `Session` + fields are **not** compared to anything: + - `sessionValidator`, the contract that decides who the agent is; + - `actions[0].actionTarget` and `actionTargetSelector`, the call the policy applies to; + - `actions[0].actionPolicies[0].policy`, which policy contract reads the envelope; + - `userOpPolicies`, `erc7739Policies` (ERC-1271 signing permissions), `permitERC4337Paymaster`, `salt`. + + They are inside the owner-signed session (`sessionHash`), so they are what the owner's SDK built. But a + malicious or buggy SDK could name, for example, a permissive validator or policy, or add ERC-7739 signing + rights, and the marketplace would not notice. Pinning them would need marketplace-configured expected values + (for example the URP, validator and gateway addresses). This is listed as a review question in §16. +4. **The criteria are not judged** (§7.3). A provider can register criteria the evaluator cannot run, or that + are trivially satisfied. The verified tag is the review, and the SDK must render every check in words before + the user signs. +5. **The asset check is a sanity check, not a security property.** The asset contract chooses its own + `SOURCE_CHAIN_NAMESPACE()` answer. What binds the asset is URP: the session's asset must equal the card's. +6. **`fee` is a reference price.** The marketplace never enforces it; the kernel does, at `fund`, through the + owner's `expectedBudget`. +7. **`createJob`'s `description` and `expiredAt` are not re-read after creation.** Step 15 checks the new job's + client, provider, hook and evaluator. The description and expiry are trusted to the AGW executing exactly the + signed calldata (its `execCalldataHash` check). +8. **The evaluator and hook are admin-set trust points** for new jobs (§11). + +### 13.3 Reentrancy and external calls + +`startJob` is `nonReentrant` and makes its external calls only after every check: + +1. `AGW_FACTORY.deployWalletWithSig`, a factory the deployment chose; +2. `AGW.grantRulesWithSig`, `AGW.executeWithSig`, on the predicted wallet; +3. `KERNEL.jobCounter`, `KERNEL.getJob`. + +The wallet is the factory's deterministic deployment for the intent's owner, re-checked by `AGWMismatch` / +`WalletOwnerMismatch`. The marketplace holds no value, so a reentrant path has nothing to drain. The views call +`AGW_FACTORY.predictWallet`, the wallet's nonces and the kernel. + +### 13.4 Known limitations of v1 + +| Limitation | Note | +|---|---| +| **The AGW must ship agent identity (AGW "D3")** | `verifySession` requires `sessionValidatorInitData == abi.encode(provider)`. The AGW's current validator expects a different config format, so a real `startJob` fails at `grantRulesWithSig` until the AGW implements D3. The package's tests use `MockAGW`. | +| **EVM destinations only** | Cards name `eip155:*` chains, never Push. Solana and native (Push-side) cards are out of v1. | +| **Interim hook and evaluator** | RulesBindingHook and a Push-controlled evaluator until the V2 UniversalHook and UniversalEvaluator ship. The `JobSpec` description is inert to RulesBindingHook. | +| **Approvals are declared, not executed** | The owner runs them in the SDK-built funding transaction; nothing on-chain checks they ran. | +| **A card can be internally inconsistent** | Registration checks `minExecuteWindow + settleWindow ≤ maxDuration` only. A card whose `minDuration` is shorter than that sum simply can't start jobs at its shortest expiry (`ExecuteByOutOfRange`). | +| **Error decoding** | Each contract's ABI lists only the errors it raises itself. Decode marketplace reverts, including Terms and builder errors that bubble through `startJob`, with the `UniversalMarketplaceErrors` artifact, which lists all 37. | + +--- + +## 14 · Invariants + +Fuzzed by [`UniversalMarketplace.invariants.t.sol`](../../test/8183-tests/UniversalMarketplace.invariants.t.sol): +64 runs × depth 100 per invariant. The handler starts jobs through honest and misbehaving wallets, modifies the +card, cancels jobs and moves time. + +| Invariant | Property | +|---|---| +| `MI01_lastJobOfIsTheAgwsOwnJob` | A recorded job always belongs to the AGW it is recorded under | +| `MI02_marketplaceHoldsNothing` | The marketplace's token, rules-asset and native balances are always 0 | +| `MI03_outcomesExactlyExpected` | An honest start on a free wallet always succeeds; a misbehaving wallet (two jobs, foreign client) is always refused with its own named error | +| `MI04_everyJobIsWellFormed` | Every started job's description decodes as a `JobSpec` with the recorded `origin`, and has the configured evaluator and hook | +| `MI05_userBalanceNeverMovedByStartJob` | The user's tokens and PC never change | +| `afterInvariant` | Liveness: at least one honest start and one refused misbehaviour happened, so none of the above held vacuously | + +--- + +## 15 · Tests + +`forge test --match-path 'test/8183-tests/*'`: 236 tests, all passing. The marketplace-related suites: + +| Suite | Tests | Covers | +|---|---|---| +| [`UniversalMarketplace.t.sol`](../../test/8183-tests/UniversalMarketplace.t.sol) | 57 | Registration (MR), card lifecycle (ML), `startJob` (MS), rules ⊆ card through the marketplace (MB), views, admin, initialize, storage layout, upgrade (MV) | +| [`UniversalMarketplaceTerms.t.sol`](../../test/8183-tests/UniversalMarketplaceTerms.t.sol) | 7 | Terms directly: allow-list, approvals, each `verifySession` error, malformed input, fuzzed caps | +| [`JobSpecBuilder.t.sol`](../../test/8183-tests/JobSpecBuilder.t.sol) | 11 | Fills, targets, timing and origin, params, overflow, fill bounds, unsupported chains, "does not judge", fuzz | +| [`UniversalMarketplace.conformance.t.sol`](../../test/8183-tests/UniversalMarketplace.conformance.t.sol) | 4 | Built criteria equal the Universal Evaluator V2 design doc's hand-written examples, field by field; every built read decodes in a copy of the V2 evaluator's decoder | +| [`UniversalMarketplace.invariants.t.sol`](../../test/8183-tests/UniversalMarketplace.invariants.t.sol) | 5 | §14 | +| [`Naming.t.sol`](../../test/8183-tests/Naming.t.sol) | 5 | Renamed selectors, topics and getters pinned to literal signatures; no retired names in ABIs | +| [`RulesBindingHook.t.sol`](../../test/8183-tests/RulesBindingHook.t.sol) | 31 | The interim hook | + +Test fixtures use the real kernel, the real RulesBindingHook, the real Terms helper and builder library, and the +real `CEAFactory`. The AGW factory and wallet are mocks: they enforce the rules the marketplace relies on +(executor, hashes, nonces) and verify no signature. `MockAGW` has misbehaving modes (two jobs, foreign client, +rewritten evaluator) to test the marketplace's post-creation checks. + +**Coverage** (`FOUNDRY_PROFILE=coverage`, `--ir-minimum`, gas test excluded): + +| Contract | Lines | Statements | Branches | Functions | +|---|---|---|---|---| +| UniversalMarketplace | 97.49% (233/239) | 98.02% (297/303) | 100% (48/48) | 100% (35/35) | +| UniversalMarketplaceTerms | 100% (50/50) | 100% (87/87) | 100% (21/21) | 100% (4/4) | +| JobSpecBuilder | 98.25% (56/57) | 98.78% (81/82) | 100% (12/12) | 100% (7/7) | + +The marketplace's uncovered lines are executed but not attributed by `--ir-minimum`: the constructor's +`_disableInitializers()`, the three OZ `__*_init()` calls in `initialize`, and the `_pause()` / `_unpause()` +bodies. The audited kernel `AgenticCommerce` shows the same six lines unattributed. JobSpecBuilder's one inline +`mstore` line is the same case. + +**Mutation testing.** 52 hand-written mutants were run against the suites: 12 on JobSpecBuilder, 28 on the +marketplace and 12 on Terms. Each removes a check, shifts a bound, or breaks a computed value. Every one was +killed by a named test. That run predates the naming-standard change (`cb69e0b`), which renamed labels only. + +**Gas ceilings** (`test_MS18_gasCeilings`, mock wallet and factory): `registerCard` (lending card) ≤ 2.46 M, +`startJob` on a fresh wallet ≤ 3.49 M, on an existing wallet ≤ 2.09 M. `registerCard` is dominated by storing the +two content blobs; `startJob` by the wallet deploy and the kernel storing the description. + +--- + +## 16 · Reviewer checklist + +Where to look first: + +1. **`startJob` ordering** (§8): every check before the first state change; the intent's `execCalldataHash` + covers everything per-job. +2. **`verifySession` completeness** (§6.2, §13.2 item 3): which `Session` fields are pinned and which are not. + **Open question:** should the marketplace pin `sessionValidator`, the action target and selector, the policy + address, and reject non-empty `userOpPolicies` and `erc7739Policies`? +3. **CEA derivation** (§9): `expectedCEAOf` against `CEAFactory`; the rotation runbook. +4. **`JobSpecBuilder`** ([`criteria.md`](./criteria.md)): the only inline assembly (`mstore` of a fill) and its + bounds check; the PRINCIPAL_BPS overflow argument; the `DELEGATECALL` context (`address(this)` is the + marketplace). +5. **`_requireAssetOnChain`**: the raw `staticcall` ABI-shape check. +6. **Storage layout and upgrade safety** (§12.2, [`reference.md`](./reference.md#storage-layout)). +7. **Admin trust points** (§11): evaluator, hook, CEA deployments. +8. **The interim hook** (`RulesBindingHook`): the `fund`-time binding and the busy rule. diff --git a/plan/agw/research/source-refresh-2026-10-07/contracts/push-chain-core-contracts/docs/universalmarketplace/criteria.md b/plan/agw/research/source-refresh-2026-10-07/contracts/push-chain-core-contracts/docs/universalmarketplace/criteria.md new file mode 100644 index 00000000..57f7cfa0 --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/contracts/push-chain-core-contracts/docs/universalmarketplace/criteria.md @@ -0,0 +1,324 @@ +# Universal Marketplace — Job criteria + +How a card says what counts as "done", and how `startJob` turns that into one job's criteria. For where this fits +in the whole flow, see [`README.md`](./README.md) §7. + +- [Two formats: template and JobSpec](#two-formats-template-and-jobspec) +- [The JobSpec](#the-jobspec) +- [The template](#the-template) +- [Building a JobSpec](#building-a-jobspec) +- [Worked example: a lending card](#worked-example-a-lending-card) +- [Worked example: a swap card with a user param](#worked-example-a-swap-card-with-a-user-param) +- [What the SDK must do](#what-the-sdk-must-do) + +--- + +## Two formats: template and JobSpec + +| | Template (`EvaluationTemplate`) | Criteria (`JobSpec`) | +|---|---|---| +| Where | stored on the card (`abi.encode`d, as given) | the 8183 job's `description` (`abi.encode(JobSpec)`) | +| Written by | the provider, once per card version | `JobSpecBuilder`, once per job | +| Holds | everything that is the same for every job, plus **holes** | concrete values for this job | +| Read by | the marketplace, at `startJob` / previews | the hook (at `fund`) and the evaluator (at verify) | +| Defined in | [`libraries/Types.sol`](../../src/agentic-commerce-8183/libraries/Types.sol) | [`libraries/JobSpecTypes.sol`](../../src/agentic-commerce-8183/libraries/JobSpecTypes.sol) | + +The `JobSpec` is the format of the Universal Evaluator V2 design, plus one field, `origin`. JobSpecTypes is the one +definition shared by everything that writes or reads a job's criteria. Its field order is ABI: reordering or +inserting a field changes every description. + +--- + +## The JobSpec + +```solidity +struct JobSpec { + uint64 executeBy; // the provider must execute before this + uint64 failFinalAt; // a FAIL only counts from a verify started after this + Read[] reads; + Check[] checks; + Node[] nodes; // nodes[0] is the root: the job passes if it passes + bytes32 origin; // keccak256(abi.encode(marketplace, cardId, cardVersion, principal)) +} +``` + +### Reads: what to look at + +```solidity +struct Read { + string chainNamespace; // namespace only, "eip155" + string chainId; // decimal, e.g. "11155111" + uint16 minConfirmations; // confirmations before the answer counts + address target; // the contract to call + bytes4 selector; // the view function + bytes args; // abi-encoded arguments + bytes outputs; // the function's return types, as type codes + uint8[] field; // which returned value, by ABI position +} +``` + +A read is one view call on one chain. **`chainNamespace` here is the namespace only** (`"eip155"`), with +`chainId` separate: the Read State split of the V2 design. That differs from `AgentCard.chainNamespace`, which is +the full CAIP-2 string `"eip155:"`. + +`outputs` describes the return types so the evaluator can find one value in the answer. Codes: + +| Code | Type | Code | Type | +|---|---|---|---| +| 1 `T_UINT` | `uintN` | 6 `T_BYTES` | `bytes` | +| 2 `T_INT` | `intN` | 7 `T_STRING` | `string` | +| 3 `T_BOOL` | `bool` | 8 `T_TUPLE` | tuple / struct: followed by its field count, then each field's type | +| 4 `T_ADDRESS` | `address` | 9 `T_ARRAY` | `T[]`: followed by the element type | +| 5 `T_BYTESN` | `bytesN` | 10 `T_FIXED_ARRAY` | `T[k]`: followed by `k`, then the element type | + +The top level is always a tuple of the return values. For example, `balanceOf(address) returns (uint256)` is +`[T_TUPLE, 1, T_UINT]`. + +`field` is the path to the value: at a tuple, the field index; at an array, the element index. `[0]` is the first +return value; `[0, 2]` is the first return value's third field. + +How the evaluator turns the selected value into a number (from the V2 design; a test-only copy of its decoder is +[`test/8183-tests/helpers/V2Decoder.sol`](../../test/8183-tests/helpers/V2Decoder.sol)): + +| Leaf | Value compared | +|---|---| +| uint / int | the number (a uint above `int256.max` is "can't tell") | +| bool | 0 or 1 | +| address, bytesN | the raw word (compare with EQ / NEQ) | +| bytes, string | `keccak256` of the content | +| array | its length | + +### Checks: what to compare + +```solidity +struct Check { + uint8 read; // index into reads + EvalType evalType; + Op op; // EQ, NEQ, GT, GTE, LT, LTE + int256 target; // in the contract's own units +} +``` + +| `EvalType` | Compares | +|---|---| +| `BOOL` | the value now, as a bool | +| `CMP` | the value now | +| `NUM` | the change since the snapshot the hook takes at `fund` (V2 UniversalHook) | +| `PCT` | the percentage change since that snapshot | + +### Nodes: the pass logic + +```solidity +struct Node { + NodeKind kind; // CHECK, ALL, ANY, AT_LEAST + uint8 check; // CHECK only: index into checks + uint8[] children; // ALL / ANY / AT_LEAST: indexes into nodes, each greater than this node's own + uint8 k; // AT_LEAST only: how many children must pass +} +``` + +`nodes[0]` is the root. `ALL` is AND, `ANY` is OR, `AT_LEAST k` is any `k` of the children. Children always have +a higher index than their parent, so the tree has no cycles and can be evaluated from the last node to the first. + +### Timing + +- **`executeBy`**: the provider must have executed by then. +- **`failFinalAt = executeBy + card.settleWindow`**: a FAIL verdict only counts from a verify started after this, + so slow settlement on the destination chain is not misread as failure. + +The marketplace guarantees `executeBy ≥ now + minExecuteWindow` and `failFinalAt ≤ expiredAt` (`startJob` step 5). + +### `origin` + +`keccak256(abi.encode(marketplace, cardId, cardVersion, principal))`. The hook and evaluator ignore it. It ties +the job to the card version it was started from, and it is what makes an intent signed against one version +unusable on another: the version is inside the signed calldata. + +--- + +## The template + +```solidity +struct EvaluationTemplate { + ReadTemplate[] reads; + CheckTemplate[] checks; + Node[] nodes; // copied verbatim + ParamBounds[] params; // one entry per per-job number the user supplies +} +``` + +### ReadTemplate: a Read with fills + +```solidity +struct ReadTemplate { + string chainNamespace; // "eip155" + string chainId; + uint16 minConfirmations; + address target; + bytes4 selector; + bytes args; // with placeholder words + Fill[] fills; // what to write into args per job + bytes outputs; + uint8[] field; +} + +enum FillSource { CEA, PARAM } + +struct Fill { + uint8 word; // overwrites args[32·word : 32·word + 32] + FillSource source; + uint8 param; // PARAM only: index into the job's params +} +``` + +| Fill source | Word written | +|---|---| +| `CEA` | the AGW's CEA **on this read's chain**, as a 32-byte word | +| `PARAM` | the job's `params[param]`, as a 32-byte word (two's complement for negatives) | + +A CEA fill is how criteria name "this user's account": `balanceOf(CEA)`, `ownerOf(tokenId) == CEA`, and so on. +The CEA is derived per read chain, so one template can read two chains, each with that chain's CEA. + +### CheckTemplate: a Check with a target source + +```solidity +enum TargetSource { FIXED, PRINCIPAL_BPS, PARAM, CEA } + +struct CheckTemplate { + uint8 read; + EvalType evalType; + Op op; + TargetSource source; + int256 value; +} +``` + +| Source | `value` means | Target | +|---|---|---| +| `FIXED` | the target | `value` | +| `PRINCIPAL_BPS` | basis points of the principal | `principal × value / 10 000`, rounded down | +| `PARAM` | an index into the job's params | `params[value]` | +| `CEA` | unused | the AGW's CEA on the check's read chain, as `int256(uint160(cea))` | + +`PRINCIPAL_BPS` is how criteria scale with the job's size ("at least 99.99% of the principal arrived"). + +### ParamBounds: per-job numbers + +```solidity +struct ParamBounds { int256 min; int256 max; } // inclusive +``` + +A template may declare numbers the user picks per job (a minimum swap output, a tick range, …). The job supplies +exactly one value per entry, each inside its bounds. The values feed `PARAM` fills and `PARAM` targets. Units are +the provider's, described in the card's metadata. + +--- + +## Building a JobSpec + +[`JobSpecBuilder.build`](../../src/agentic-commerce-8183/libraries/JobSpecBuilder.sol), called at `startJob` +step 9 and by both preview views: + +1. **Decode** the template. Undecodable bytes revert in `abi.decode`. +2. **Params**: `params.length == template.params.length`, else `ParamCountMismatch(expected, actual)`; each + `min ≤ params[i] ≤ max`, else `ParamOutOfRange(i, value)`. +3. **CEAs**: for each read with a CEA fill, and each read a `CEA`-target check names, get + `expectedCEAOf(agw, keccak256(namespace ":" chainId))` from the marketplace, once per read. A chain without a + CEA deployment reverts `ChainNotSupported(chainHash)`. +4. **Reads**: copy each read; copy its `args` into a fresh buffer; apply each fill. A fill must satisfy + `32·word + 32 ≤ args.length`, else `FillOutOfBounds(read, fill)`. This bound check is what makes the one + inline-assembly `mstore` safe. +5. **Checks**: copy `read`, `evalType`, `op`; resolve the target. For `PRINCIPAL_BPS`, if + `principal > type(uint256).max / bps`, revert `TargetOverflow(check)`. Once the product fits, the quotient is at + most `uint256.max / 10 000`, which always fits in `int256`, so the cast cannot truncate. +6. **Nodes** copied verbatim. `executeBy`, `failFinalAt = executeBy + settleWindow`, `origin`. +7. Return `abi.encode(spec)`. + +**Not checked:** whether the criteria make sense or can be run. That covers caps on the number of reads, checks +or nodes; outputs that are not valid type codes; fields that point nowhere; reads no check uses; unreachable +nodes; and trivially true criteria. All of these build as given (`test_JB08_doesNotJudgeTheTemplate`). The caps +`MAX_READS` (16), `MAX_CHECKS` (16) and `MAX_NODES` (32) in JobSpecTypes are the evaluator's, not enforced here. +An out-of-range index (a check's `read`, a fill's `param`, a `PARAM` target) panics. Anything that reverts here +makes `startJob` and both previews of that card revert. + +The result is deterministic for a given card version, job inputs and CEA configuration +(`testFuzz_JB11_deterministic`). + +--- + +## Worked example: a lending card + +"Deposit the principal into Aave v3 on Sepolia, at a supply rate of at least 4%." This is the test fixture's card +(`_lendingTemplate` in [`UniversalMarketplace.t.sol`](../../test/8183-tests/UniversalMarketplace.t.sol)) and the V2 +design doc's lending example. + +**Card:** `chainNamespace = "eip155:11155111"`, `settleWindow = 2 h`. + +**Rules:** asset pUSDC (Sepolia); one allowed call `Pool.supply(address,uint256,address,uint16)` with the +beneficiary (`onBehalfOf`) pinned at offset 68; one approval, USDC → Pool, `capIsPrincipal`. + +**Template:** + +``` +reads[0] eip155 / 11155111, 12 confirmations + aUSDC.balanceOf(address) args = 32 zero bytes fills = [word 0 ← CEA] + outputs = [TUPLE 1, UINT] field = [0] +reads[1] eip155 / 11155111, 12 confirmations + Pool.getReserveData(address) args = abi.encode(USDC) fills = [] + outputs = [TUPLE 1, TUPLE 15, (TUPLE 1, UINT), UINT×7, ADDRESS×4, UINT×3] + field = [0, 2] (the struct's 3rd field: currentLiquidityRate) +checks[0] read 0, CMP, GTE, PRINCIPAL_BPS, 9999 "deposited ≥ 99.99% of principal" +checks[1] read 1, CMP, GTE, FIXED, 0.04e27 "rate ≥ 4% (ray)" +nodes [ ALL(1, 2), CHECK 0, CHECK 1 ] +params [] +``` + +**A job:** principal 500 USDC (`500e6`), `executeBy = now + 1 h`, for wallet 0 of the user. + +**Built JobSpec:** + +``` +reads[0].args = abi.encode(CEA(agw, "eip155:11155111")) +checks[0].target = 500e6 × 9999 / 10 000 = 499 950 000 +checks[1].target = 0.04e27 +nodes = [ ALL(1, 2), CHECK 0, CHECK 1 ] +executeBy = now + 1 h +failFinalAt = now + 3 h +origin = keccak256(abi.encode(marketplace, cardId, 1, 500e6)) +``` + +The evaluator later passes the job if both checks pass: the CEA's aUSDC balance is at least 499.95 USDC, and +Aave's current supply rate is at least 4%. + +`test_MC01_lendingExample_equalsV2Doc` builds the same template on Ethereum (the design doc's chain) and compares +the result, field by field, with the V2 design doc's hand-written JobSpec. + +## Worked example: a swap card with a user param + +"The CEA receives at least `minOut` WETH." `minOut` is chosen by the user per job. + +``` +reads[0] eip155 / 11155111, 3 confirmations + WETH.balanceOf(address) args = 32 zero bytes fills = [word 0 ← CEA] + outputs = [TUPLE 1, UINT] field = [0] +checks[0] read 0, NUM, GTE, PARAM, 0 "balance grew by ≥ params[0]" +nodes [ CHECK 0 ] +params [ {min: 1, max: 1e30} ] +``` + +A job with `params = [0.38e18]` gets `checks[0].target = 0.38e18`. `NUM` compares the change since the snapshot +the V2 UniversalHook takes at `fund`, so WETH the CEA already held doesn't count. (The interim RulesBindingHook +takes no snapshot; `NUM` and `PCT` checks need the V2 hook.) A job with `params = [0]` reverts +`ParamOutOfRange(0, 0)`; one with no params reverts `ParamCountMismatch(1, 0)`. + +--- + +## What the SDK must do + +- **Build templates from ABIs**: `outputs` and `field` from the function's ABI and the chosen return field, and + CEA fills where the CEA appears in the arguments. +- **Render every check in words before the user signs.** The template is not judged on-chain; what the user sees + is their protection, together with the verified tag. +- **Use `previewIntent`** to get the exact intent to sign, so the signed calldata hash covers the built criteria. +- **Derive the CEA independently** from the destination `CEAFactory` for the session's `expectedCEA`, and treat a + disagreement with `expectedCEAOf` as an error. diff --git a/plan/agw/research/source-refresh-2026-10-07/contracts/push-chain-core-contracts/docs/universalmarketplace/reference.md b/plan/agw/research/source-refresh-2026-10-07/contracts/push-chain-core-contracts/docs/universalmarketplace/reference.md new file mode 100644 index 00000000..68bcf8db --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/contracts/push-chain-core-contracts/docs/universalmarketplace/reference.md @@ -0,0 +1,426 @@ +# Universal Marketplace — Reference + +Every function, event, error, type and storage slot of the Universal Marketplace package. For how they fit +together, read [`README.md`](./README.md) first. Section numbers like "§8" refer to that file. + +- [UniversalMarketplace](#universalmarketplace) + - [Initialization](#initialization) + - [Admin functions](#admin-functions) + - [Card functions](#card-functions) + - [startJob](#startjob) + - [Views](#views) + - [Constants](#constants) + - [Storage layout](#storage-layout) +- [UniversalMarketplaceTerms](#universalmarketplaceterms) +- [JobSpecBuilder](#jobspecbuilder) +- [RulesBindingHook (interim hook)](#rulesbindinghook-interim-hook) +- [Types](#types) +- [Events](#events) +- [Errors](#errors) + +--- + +## UniversalMarketplace + +[`src/agentic-commerce-8183/UniversalMarketplace.sol`](../../src/agentic-commerce-8183/UniversalMarketplace.sol). +Inherits OZ `Initializable`, `AccessControlUpgradeable`, `PausableUpgradeable`, `ReentrancyGuardUpgradeable` and +`IUniversalMarketplace`. Deployed behind a `TransparentUpgradeableProxy`. It has no payable function and holds +no funds. + +### Initialization + +#### `constructor()` +Calls `_disableInitializers()`, so the implementation itself can never be initialized. + +#### `initialize(InitParams calldata p)` — `initializer` + +| Step | Effect | +|---|---| +| 1 | Reverts `ZeroAddress()` if `agwFactory`, `kernel`, `terms` or `admin` is zero. | +| 2 | Initializes AccessControl, Pausable and ReentrancyGuard. | +| 3 | Stores `AGW_FACTORY`, `KERNEL`, `TERMS`. | +| 4 | `pushChainHash = keccak256("eip155:" ‖ decimal(block.chainid))`. | +| 5 | `_setHook(p.hook)`: `ZeroAddress()` if zero, `HookNotWhitelisted()` unless `KERNEL.whitelistedHooks(hook)`; emits `HookUpdated`. | +| 6 | `_setEvaluator(p.evaluator)`: `ZeroAddress()` if zero; emits `EvaluatorUpdated`. | +| 7 | Grants `DEFAULT_ADMIN_ROLE` and `ADMIN_ROLE` to `p.admin`. | + +A second call reverts `InvalidInitialization()` (OZ). + +### Admin functions + +All are `onlyRole(ADMIN_ROLE)`; a non-admin caller gets `AccessControlUnauthorizedAccount(caller, ADMIN_ROLE)`. +None is pausable. + +#### `setHook(address hook)` +Sets the hook every **new** job is created with. Reverts `ZeroAddress()` or `HookNotWhitelisted()`. Emits +`HookUpdated(hook)`. Existing jobs keep the hook the kernel recorded at creation. + +#### `setEvaluator(address evaluator)` +Sets the evaluator every **new** job is created with. Reverts `ZeroAddress()`. Emits `EvaluatorUpdated(evaluator)`. +Not checked against providers: a card whose provider is now the evaluator is refused at `startJob` +(`ProviderIsEvaluator()`). + +#### `setCEADeployment(bytes32 chainHash, address ceaFactory, address ceaProxyImpl)` +Records a destination chain's CEA factory and proxy implementation. This enables the chain for cards and for +criteria reads, and sets the CEA derivation (§9). Reverts `ZeroAddress()` if either address is zero. Emits +`CEADeploymentSet(chainHash, ceaFactory, ceaProxyImpl)`. A deployment cannot be removed, only replaced. + +#### `setUniversalPaused(bytes32 chainHash, bool paused)` +Pauses or resumes `startJob` for cards on `chainHash` (`ChainPaused(chainHash)`). Card registration on that chain +is not affected. Emits `UniversalChainPaused(chainHash, paused)`. + +#### `pause()` / `unpause()` +OZ Pausable. While paused, `registerCard`, `modifyAgentCard` and `startJob` revert `EnforcedPause()`. Admin +functions, `setCardActive` and every view stay live. + +#### `adminDisableCard(uint256 cardId)` +Permanently disables a card: `isCardAdminDisabled = true`, `active = false`, verified tag cleared. Reverts +`CardInactive()` for an unknown card. Emits `CardVerificationRevoked(cardId)` (only if it was verified), then +`CardDisabledByAdmin(cardId)`. Nothing re-enables it. + +#### `verifyAgentCard(uint256 cardId, uint256 version)` +Sets the verified tag for the card's current version. + +| Revert | When | +|---|---| +| `CardInactive()` | unknown card | +| `CardAdminDisabled(cardId)` | admin-disabled card | +| `CardVersionMismatch(version, current)` | `version` is not the current version, e.g. the card changed after review | + +Allowed for a card its provider switched off. Emits `CardVerified(cardId, version)`. + +#### `revokeAgentCardVerification(uint256 cardId)` +Clears the tag. Reverts `CardInactive()` for an unknown card. Idempotent: emits `CardVerificationRevoked(cardId)` +only if the card was verified. + +### Card functions + +#### `registerCard(AgentCard calldata c, bytes calldata rulesTerms, bytes calldata evaluation) returns (uint256 cardId)` — `whenNotPaused` + +| Step | Effect | +|---|---| +| 1 | `_validateCard(c, rulesTerms)`: the 12 checks of §4.2, in order. | +| 2 | `cardId = ++cardCount` (ids start at 1). | +| 3 | Stores the card, then overwrites `provider = msg.sender` and `active = true`. | +| 4 | Stores both blobs as given; `cardVersion = 1`. | +| 5 | Emits `CardRegistered(cardId, msg.sender, jobType, chainNamespace, keccak256(rulesTerms), keccak256(evaluation), metadataHash, fee)`. | + +`evaluation` is **not** checked (§7.3). `rulesTerms` must decode as `RulesCardTerms`; undecodable bytes revert +in `abi.decode` with no data. + +#### `modifyAgentCard(uint256 cardId, AgentCard calldata c, bytes calldata rulesTerms, bytes calldata evaluation)` — `whenNotPaused` + +| Step | Effect / revert | +|---|---| +| 1 | `CallerIsNotProvider()` unless the card exists and `msg.sender` is its provider. | +| 2 | `CardAdminDisabled(cardId)` if admin-disabled. | +| 3 | `CardIdentityImmutable()` if `c.chainNamespace` differs from the stored one. | +| 4 | `_validateCard(c, rulesTerms)`, as at registration. | +| 5 | Writes every field except `provider`, `chainNamespace` and `active`; replaces both blobs. | +| 6 | `version = ++cardVersion[cardId]`; clears the verified tag (emits `CardVerificationRevoked` if there was one). | +| 7 | Emits `CardModified(cardId, version, keccak256(rulesTerms), keccak256(evaluation), metadataHash, fee)`. | + +Started jobs are untouched (`test_ML12`). Intents signed against the previous version stop working (§4.3). + +#### `setCardActive(uint256 cardId, bool active)` +Provider only (`CallerIsNotProvider()`, also for an unknown card). Switching on an admin-disabled card reverts +`CardAdminDisabled(cardId)`; switching it off is allowed. Emits `CardStatusChanged(cardId, active)`. Not pausable. + +### startJob + +#### `startJob(StartJobParams calldata p) returns (uint256 jobId, address agw, bytes32 rulesId)` — `whenNotPaused nonReentrant` + +Deploys the AGW if needed, grants it the card's rules and creates the job. The 16 steps, checks and errors are in +§8. Emits `JobStarted(cardId, intent.owner, agw, jobId, rulesId, principal, cardVersion)`. + +`StartJobParams`: + +| Field | Meaning | +|---|---| +| `cardId` | the card | +| `cardVersion` | the version the owner signed against; must equal the current version | +| `job` | `JobInputs{principal, expiredAt, executeBy, params}` | +| `session` | the rules (SmartSession `Session`) the owner signed | +| `intent` | the owner-signed `OwnerIntent` (from `previewIntent`) | +| `sig` | the owner's signature over the intent | +| `label` | wallet label, used only when deploying a new wallet | + +Calls made, in order, after every check: `AGW_FACTORY.deployWalletWithSig` (new wallet) or +`AGW_FACTORY.ownerOf` (existing wallet); `AGW.grantRulesWithSig`; `KERNEL.jobCounter`; `AGW.executeWithSig`; +`KERNEL.jobCounter`; `KERNEL.getJob`. + +### Views + +| View | Returns | Notes | +|---|---|---| +| `getCard(uint256 cardId)` | `CardView{card, rulesTerms, evaluation, version, verified, adminDisabled}` | All zero for an unknown card. | +| `isCardVerified(uint256 cardId)` | `bool` | Verified at the current version. | +| `isCardAdminDisabled(uint256 cardId)` | `bool` | | +| `isUniversalPaused(bytes32 chainHash)` | `bool` | | +| `cardVersion(uint256 cardId)` | `uint256` | 1 at registration, +1 per modification, 0 if unknown. | +| `cardCount()` | `uint256` | The last card id. | +| `ceaDeployment(bytes32 chainHash)` | `(address ceaFactory, address ceaProxyImpl)` | Zero if unconfigured. | +| `lastJobOf(address agw)` | `uint256` | The AGW's last job started here; 0 if none. | +| `cardOfJob(uint256 jobId)` / `agwOfJob` / `rulesOfJob` | card id / AGW / `rulesId` | Recorded by `startJob`; zero for jobs not started here. | +| `AGW_FACTORY()`, `KERNEL()`, `TERMS()` | addresses | Set once at `initialize`. | +| `hook()`, `evaluator()` | addresses | Admin-settable. | +| `pushChainHash()` | `bytes32` | `keccak256("eip155:" ‖ block.chainid)` at initialization. | +| `isAGWFree(address agw)` | `bool` | False while the AGW's last job started here is Funded, Submitted, or Open and unexpired (§10). | +| `expectedCEAOf(address agw, bytes32 chainHash)` | `address` | The AGW's CEA on that chain (§9). Reverts `ChainNotSupported(chainHash)` if unconfigured. | +| `buildCreateJobCalldata(uint256 cardId, address owner, uint96 index, JobInputs job)` | `(bytes32 mode, bytes executionCalldata)` | Exactly what `startJob` executes for wallet `index` of `owner`. Reverts `CardInactive()` for an unknown card, and like step 9 on a bad template or bad inputs. | +| `previewIntent(IntentRequest r, Session s)` | `OwnerIntent` | The intent to sign (§8). Nonces are read from the wallet, or 0 if not yet deployed. Reverts like `buildCreateJobCalldata`. | +| `hasRole`, `paused`, … | | OZ AccessControl and Pausable views. | + +`previewIntent` output: + +| Field | Value | +|---|---| +| `owner`, `index`, `deadline`, `signerChainId` | from the request | +| `wallet` | `AGW_FACTORY.predictWallet(owner, index)` | +| `executor` | the marketplace | +| `sessionHash` | `keccak256(abi.encode(session))` | +| `mode` | `MODE_SINGLE` (0) | +| `execCalldataHash` | `keccak256(buildCreateJobCalldata(...))` | +| `nonceKey` | `STARTJOB_LANE` | +| `nonceSeq` | `AGW.getNonce(STARTJOB_LANE)` if deployed, else 0 | +| `grantNonce` | `AGW.grantNonce()` if deployed, else 0 | + +### Constants + +| Constant | Value | Use | +|---|---|---| +| `ADMIN_ROLE` | `keccak256("ADMIN_ROLE")` | every admin function | +| `STARTJOB_LANE` | `OWNER_LANE_FLAG` (`1 << 191`) | the AGW nonce lane `startJob`'s execution uses (owner lane, key 0) | +| `MODE_SINGLE` | `bytes32(0)` | ERC-7579 single call, default exec type | +| `MIN_DURATION` (internal) | `1 hours` | lower bound on a card's `minDuration` | +| `EVM_PREFIX` (internal) | `"eip155:"` | required prefix of a card's `chainNamespace` | + +### Storage layout + +Append-only from this layout. OZ upgradeable bases use ERC-7201 namespaced storage and occupy none of these +slots. Pinned by `test_MV09_storageLayout_bySlot`. + +| Slot | Variable | Type | +|---|---|---| +| 0 | `AGW_FACTORY` | `IAGWFactory` | +| 1 | `KERNEL` | `IAgenticCommerce` | +| 2 | `hook` | `address` | +| 3 | `evaluator` | `address` | +| 4 | `pushChainHash` | `bytes32` | +| 5 | `TERMS` | `IUniversalMarketplaceTerms` | +| 6 | `cardCount` | `uint256` | +| 7 | `_cards` | `mapping(uint256 => AgentCard)` | +| 8 | `_rulesTerms` | `mapping(uint256 => bytes)` | +| 9 | `_evaluations` | `mapping(uint256 => bytes)` | +| 10 | `cardVersion` | `mapping(uint256 => uint256)` | +| 11 | `isCardVerified` | `mapping(uint256 => bool)` | +| 12 | `isCardAdminDisabled` | `mapping(uint256 => bool)` | +| 13 | `ceaDeployment` | `mapping(bytes32 => CEADeployment)` | +| 14 | `isUniversalPaused` | `mapping(bytes32 => bool)` | +| 15 | `lastJobOf` | `mapping(address => uint256)` | +| 16 | `cardOfJob` | `mapping(uint256 => uint256)` | +| 17 | `agwOfJob` | `mapping(uint256 => address)` | +| 18 | `rulesOfJob` | `mapping(uint256 => bytes32)` | +| 19–48 | `__gap` | `uint256[30]` | + +--- + +## UniversalMarketplaceTerms + +[`src/agentic-commerce-8183/UniversalMarketplaceTerms.sol`](../../src/agentic-commerce-8183/UniversalMarketplaceTerms.sol). +Stateless and `pure`, with no admin and no upgrade. Split out of the marketplace for EIP-170. Reverts with +`UniversalMarketplaceErrors`, so its reverts bubble through the marketplace unchanged. + +| Constant | Value | +|---|---| +| `MAX_ALLOWED_CALLS` | 32 (URP's allow-list bound) | +| `MAX_APPROVALS` | 8 | +| `ERC20_TRANSFER` / `ERC20_APPROVE` / `ERC20_TRANSFER_FROM` | `IERC20.transfer/approve/transferFrom.selector` (`0xa9059cbb` / `0x095ea7b3` / `0x23b872dd`) | +| `ERC20_INCREASE_ALLOWANCE` | `bytes4(keccak256("increaseAllowance(address,uint256)"))` (`0x39509351`) | + +#### `validateRulesTerms(bytes calldata rulesTerms) external pure returns (address asset)` +Decodes `RulesCardTerms` and runs the registration guards of §6.1. Returns the rules asset. Undecodable bytes +revert in `abi.decode`. + +#### `verifySession(bytes calldata rulesTerms, Session calldata s, SessionContext calldata ctx) external pure` +The rules ⊆ card check of §6.2, ten checks in order. `ctx` is +`SessionContext{agent, chainHash, principal, expiredAt, expectedCEA}`, filled by the marketplace from the card, +the job and `expectedCEAOf`. The fields it does not compare are listed in §13.2. + +--- + +## JobSpecBuilder + +[`src/agentic-commerce-8183/libraries/JobSpecBuilder.sol`](../../src/agentic-commerce-8183/libraries/JobSpecBuilder.sol). +An external library: deployed once, linked into the marketplace, called by `DELEGATECALL`. Inlined, it would put +the marketplace over the size limit. + +#### `build(bytes memory evaluation, BuildContext memory ctx) public view returns (bytes memory)` +Returns `abi.encode(JobSpec)` for one job: the 8183 job's description. Algorithm and checks are in +[`criteria.md`](./criteria.md#building-a-jobspec). + +`BuildContext{agw, principal, executeBy, settleWindow, params, origin}` comes from the job's inputs, the card's +`settleWindow`, and `origin = keccak256(abi.encode(marketplace, cardId, cardVersion, principal))`. + +The library reads CEAs with `IUniversalMarketplace(address(this)).expectedCEAOf(agw, chainHash)`. Under +`DELEGATECALL`, `address(this)` is the marketplace proxy, so this is an external call back into the marketplace. +Called directly (not through the marketplace), a template that needs a CEA reverts, because the library would ask +itself. It has no storage. + +--- + +## RulesBindingHook (interim hook) + +[`src/agentic-commerce-8183/hooks/RulesBindingHook.sol`](../../src/agentic-commerce-8183/hooks/RulesBindingHook.sol), +on [`BaseERC8183Hook`](../../src/agentic-commerce-8183/hooks/BaseERC8183Hook.sol). Not part of the marketplace, +but every marketplace job is created with it until the V2 UniversalHook ships. Behind a +`TransparentUpgradeableProxy`; storage continues the base at slot 50. + +| Item | Behaviour | +|---|---| +| `initialize(address kernel, address agwFactory, address sessionEngine)` | All non-zero (`ERC8183HookErrors.ZeroAddress()`). Sets `KERNEL`, `AGW_FACTORY`, `SESSION_ENGINE`. | +| `beforeAction` / `afterAction` | Kernel only (`CallerIsNotKernel(caller)`). Acts only in `beforeAction(fund)`; every other action passes through. | +| `beforeAction(fund)` | In order: `fund.optParams` is exactly 32 bytes, `abi.encode(rulesId)` (`InvalidOptParams(length)`); the client is a factory AGW (`CallerIsNotAGW(caller)`); `SESSION_ENGINE.isPermissionEnabled(rulesId, client)` (`RulesNotLive(agw, rulesId)`); the AGW has no Funded or Submitted job under this hook (`AGWHasLiveJob(agw, liveJobId)`). Then records `rulesOf[jobId] = {agw, rulesId}`, `liveJobOf[agw] = jobId`, and emits `RulesBound(jobId, agw, rulesId)`. | +| `isAGWBusy(address agw)` | Whether the AGW's bound job is Funded or Submitted. | +| `rulesOf(uint256 jobId)` | `(address agw, bytes32 rulesId)` bound at `fund`. | +| `liveJobOf(address agw)` | The last job bound for the AGW. | + +Because the hook runs in `beforeAction`, any revert leaves the job Open with no escrow moved. A wallet is freed +by reading the kernel's job status, so an unhooked `claimRefund` frees it too. + +--- + +## Types + +All in [`libraries/Types.sol`](../../src/agentic-commerce-8183/libraries/Types.sol), file-level. The built +criteria (`JobSpec`, `Read`, `Check`, `Node` and the enums) are in +[`libraries/JobSpecTypes.sol`](../../src/agentic-commerce-8183/libraries/JobSpecTypes.sol). The AGW and +SmartSession types (`OwnerIntent`, `Session`, `AllowedCall`, `UniversalTerms`, …) are mirrored in +[`interfaces/external/IAGW.sol`](../../src/agentic-commerce-8183/interfaces/external/IAGW.sol). + +| Type | Fields | Notes | +|---|---|---| +| `AgentCard` | `provider`, `jobType`, `metadataURI`, `metadataHash`, `chainNamespace`, `fee`, `principalMin`, `principalMax`, `minDuration`, `maxDuration`, `minExecuteWindow`, `settleWindow`, `active` | `provider` and `active` are contract-written. `chainNamespace` is the full CAIP-2 string `"eip155:"`, immutable after registration. `fee` is in the kernel's payment token; principal is in the rules asset's units; durations and windows in seconds. | +| `Approval` | `token`, `spender`, `capIsPrincipal`, `cap` | An owner approval on the execution chain. `capIsPrincipal` ⇒ amount = principal, `cap == 0`; else amount = `cap > 0`. | +| `RulesCardTerms` | `asset`, `maxPCPerCall`, `allowedCalls`, `approvals` | `abi.encode`d into the card's `rulesTerms`. | +| `CEADeployment` | `ceaFactory`, `ceaProxyImpl` | Per destination chain. | +| `CardView` | `card`, `rulesTerms`, `evaluation`, `version`, `verified`, `adminDisabled` | `getCard`'s return. | +| `JobInputs` | `principal`, `expiredAt` (uint48), `executeBy` (uint48), `params` (int256[]) | Per-job inputs the owner signs. | +| `StartJobParams` | `cardId`, `cardVersion`, `job`, `session`, `intent`, `sig`, `label` | `startJob`'s argument. | +| `IntentRequest` | `cardId`, `owner`, `index`, `job`, `deadline`, `signerChainId` | `previewIntent`'s argument. | +| `InitParams` | `agwFactory`, `kernel`, `hook`, `evaluator`, `terms`, `admin` | `initialize`'s argument. | +| `SessionContext` | `agent`, `chainHash`, `principal`, `expiredAt`, `expectedCEA` | Terms' per-job context. | +| `FillSource`, `Fill`, `ReadTemplate`, `TargetSource`, `CheckTemplate`, `ParamBounds`, `EvaluationTemplate`, `BuildContext` | | The criteria template; see [`criteria.md`](./criteria.md). | + +--- + +## Events + +Emitted by the marketplace (declared in `IUniversalMarketplace`): + +| Event | Emitted by | +|---|---| +| `CardRegistered(uint256 indexed cardId, address indexed provider, bytes32 indexed jobType, string chainNamespace, bytes32 rulesHash, bytes32 evaluationHash, bytes32 metadataHash, uint256 fee)` | `registerCard` | +| `CardModified(uint256 indexed cardId, uint256 version, bytes32 rulesHash, bytes32 evaluationHash, bytes32 metadataHash, uint256 fee)` | `modifyAgentCard` | +| `CardStatusChanged(uint256 indexed cardId, bool active)` | `setCardActive` | +| `CardDisabledByAdmin(uint256 indexed cardId)` | `adminDisableCard` | +| `CardVerified(uint256 indexed cardId, uint256 version)` | `verifyAgentCard` | +| `CardVerificationRevoked(uint256 indexed cardId)` | `revokeAgentCardVerification`, `modifyAgentCard`, `adminDisableCard` (only when a tag is cleared) | +| `HookUpdated(address hook)` | `initialize`, `setHook` | +| `EvaluatorUpdated(address evaluator)` | `initialize`, `setEvaluator` | +| `CEADeploymentSet(bytes32 indexed chainHash, address ceaFactory, address ceaProxyImpl)` | `setCEADeployment` | +| `UniversalChainPaused(bytes32 indexed chainHash, bool paused)` | `setUniversalPaused` | +| `JobStarted(uint256 indexed cardId, address indexed owner, address indexed agw, uint256 jobId, bytes32 rulesId, uint256 principal, uint256 cardVersion)` | `startJob` | + +`rulesHash = keccak256(rulesTerms)` and `evaluationHash = keccak256(evaluation)`, so an indexer can check the +blobs returned by `getCard`. The hook emits `RulesBound(uint256 indexed jobId, address indexed agw, bytes32 indexed rulesId)`. +OZ emits `RoleGranted`, `Paused`, `Unpaused`, `Initialized`. + +--- + +## Errors + +All marketplace, Terms and builder errors are in the `UniversalMarketplaceErrors` library +([`libraries/Errors.sol`](../../src/agentic-commerce-8183/libraries/Errors.sol)). A library error has the same +selector wherever it is raised, so a Terms or builder revert bubbles through `startJob` unchanged. + +Each contract's ABI lists only the errors that contract itself raises. **Decode marketplace reverts with the +`UniversalMarketplaceErrors` artifact**, which lists all 37. + +### Config and cards + +| Error | Raised by | When | +|---|---|---| +| `ZeroAddress()` | marketplace | a zero address in `initialize`, `setHook`, `setEvaluator`, `setCEADeployment` | +| `HookNotWhitelisted()` | marketplace | the hook is not whitelisted on the kernel | +| `CardInactive()` | marketplace | `startJob` on an unknown or inactive card; `adminDisableCard`, `verifyAgentCard`, `revokeAgentCardVerification`, `buildCreateJobCalldata`, `previewIntent` on an unknown card | +| `CallerIsNotProvider()` | marketplace | `modifyAgentCard` / `setCardActive` by anyone but the provider, or on an unknown card | +| `CardAdminDisabled(uint256 cardId)` | marketplace | modify, verify or switch on an admin-disabled card | +| `ChainNotSupported(bytes32 chainHash)` | marketplace, builder | a card on Push or on an unconfigured chain; `expectedCEAOf` for an unconfigured chain | +| `ChainPaused(bytes32 chainHash)` | marketplace | `startJob` on a paused chain | +| `InvalidCard(string reason)` | marketplace, Terms | a registration / modification check failed; the reasons are below | +| `CardVersionMismatch(uint256 provided, uint256 current)` | marketplace | `startJob` or `verifyAgentCard` with a stale version | +| `CardIdentityImmutable()` | marketplace | `modifyAgentCard` changing `chainNamespace` | + +`InvalidCard` reasons: + +| Raised by | Reasons | +|---|---| +| marketplace | `job type zero`, `metadata uri empty`, `metadata hash zero`, `chain namespace`, `provider is evaluator`, `principal range`, `duration range`, `settle window`, `execute window`, `asset`, `asset chain` | +| Terms | `asset zero`, `allow-list size`, `duplicate call`, `erc20 approval`, `erc20 transfer recipient`, `erc20 transferFrom recipient`, `approval count`, `approval token`, `approval spender`, `approval cap`, `duplicate approval` | + +### startJob: the job + +| Error | Raised by | When | +|---|---|---| +| `PrincipalOutOfRange()` | marketplace | principal outside the card's range | +| `ExpiryOutOfRange()` | marketplace | `expiredAt` outside `[now + minDuration, now + maxDuration]` | +| `ExecuteByOutOfRange()` | marketplace | `executeBy < now + minExecuteWindow` or `executeBy + settleWindow > expiredAt` | +| `ProviderIsEvaluator()` | marketplace | the card's provider is the current evaluator | +| `ParamCountMismatch(uint256 expected, uint256 actual)` | builder | wrong number of params | +| `ParamOutOfRange(uint256 index, int256 value)` | builder | a param outside its bounds | +| `TargetOverflow(uint256 check)` | builder | `principal × bps` overflows | +| `FillOutOfBounds(uint256 read, uint256 fill)` | builder | a fill writes outside its read's args | + +### startJob: wallet and intent + +Same shapes as the AGW's errors of the same name. + +| Error | When | +|---|---| +| `IntentWalletMismatch(address expected, address provided)` | the intent's wallet is not `predictWallet(owner, index)` | +| `ExecutorMismatch(address expected, address actual)` | the intent's executor is not the marketplace | +| `IntentSessionMismatch(bytes32 actual)` | the intent's `sessionHash` is not this session's hash (argument: the expected hash) | +| `IntentExecMismatch(bytes32 actualCalldataHash)` | the intent's mode, calldata hash or nonce lane is not this job's (argument: the expected calldata hash) | +| `AGWBusy(address agw, uint256 jobId)` | the AGW has a live job started here | +| `AGWMismatch(address expected, address actual)` | the factory deployed somewhere other than the prediction | +| `WalletOwnerMismatch(address expected, address actual)` | the existing wallet's factory owner is not the intent's owner | + +### startJob: rules ⊆ card (Terms) + +| Error | When | +|---|---| +| `AgentMismatch()` | `sessionValidatorInitData != abi.encode(card.provider)` | +| `ActionCount()` | the session has not exactly one action | +| `PolicyShape(uint256 i)` | the action has not exactly one policy | +| `ChainMismatch(uint256 i)` | the envelope names another chain | +| `AssetMismatch()` | another asset | +| `PCCapMismatch()` | another `maxPCPerCall` | +| `ActionsMismatch()` | the allowed calls are not byte-equal to the card's | +| `CapMismatch()` | `maxAmountTotal != principal` or `maxAmountPerCall > principal` | +| `ExpiryMismatch()` | `validUntil != expiredAt` | +| `ExpectedCEAMismatch(address expected, address actual)` | the session's CEA is not `expectedCEAOf(agw, chainHash)` | + +### startJob: the created job + +| Error | When | +|---|---| +| `UnexpectedJobCount(uint256 before, uint256 afterCount)` | the wallet's execution did not create exactly one job | +| `JobMismatch()` | the new job's client, provider, hook or evaluator is not the expected one | + +### Hook errors + +| Library | Error | +|---|---| +| `RulesBindingHookErrors` | `InvalidOptParams(uint256 length)`, `CallerIsNotAGW(address caller)`, `RulesNotLive(address agw, bytes32 rulesId)`, `AGWHasLiveJob(address agw, uint256 liveJobId)` | +| `ERC8183HookErrors` | `CallerIsNotKernel(address caller)`, `ZeroAddress()` | diff --git a/plan/agw/research/source-refresh-2026-10-07/donut-probe.json b/plan/agw/research/source-refresh-2026-10-07/donut-probe.json new file mode 100644 index 00000000..2e54066d --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/donut-probe.json @@ -0,0 +1,167 @@ +{ + "checked_at": "2026-10-07T10:26:27.725Z", + "rpc": "https://evm.donut.rpc.push.org/", + "chain_id": 42101, + "block": "23989371", + "block_hash": "0x6dcdb58bdb4434a67f65128b4def2175a2fe4ce693e56f5c1ae23bca6bbd3162", + "code": { + "factory": { + "address": "0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF", + "bytes": 141, + "sha256": "c621e945a17be2361dfc247326991d732ede3e25c8ecd8b48ee2025c10ca17eb", + "unchanged": true + }, + "validator": { + "address": "0x068EE2388475A98EE1f5a434C58bFF3444fffFe6", + "bytes": 806, + "sha256": "7a8e45814fd8a0a6c9b9e115d797da078718f9f6358fa576e1e218ffd93db59e", + "unchanged": true + }, + "core": { + "address": "0x00000000000000000000000000000000000000C0", + "bytes": 1551, + "sha256": "2036ba987ed029f1bc576d020ba11582934583c7eaaa7c00aefc2e0d53053486", + "unchanged": true + }, + "executor": { + "address": "0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7", + "bytes": 0, + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "unchanged": true + }, + "proxyAdmin": { + "address": "0x0b7a31ec85117892aEA90AA5cB6514e2F97c2295", + "bytes": 926, + "sha256": "3feda633be447e268d618b40cbfcd9dfe9346ebadec981f4f3efea0fbc07cd35", + "unchanged": true + }, + "walletImplementation": { + "address": "0x96D69ec7e6cDdaD414e656B5c9DCA24587DF713c", + "bytes": 16564, + "sha256": "b26d74bdac5c936e25c694394be9b17bc350325d62ba103d262882b0605a0be1", + "unchanged": true + }, + "policyImplementation": { + "address": "0xA2391eee4C9EA1B32AEB3A460B77296EA709F02F", + "bytes": 24326, + "sha256": "1694277b24a023615b3693730ea0581e7a6fc209f533e65416d5075ef927df76", + "unchanged": true + }, + "policy": { + "address": "0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af", + "bytes": 830, + "sha256": "039e9bca120a30980a0131552966575b30349654f23746f309fe98adfd2308ae", + "unchanged": true + }, + "gateway": { + "address": "0x00000000000000000000000000000000000000C1", + "bytes": 1551, + "sha256": "3e78a5778be1383f2612556becde8019c22388d7157574c90fb40e1060d450ca", + "unchanged": true + }, + "factoryLogic": { + "address": "0xe138Dc6EfC10233BE1e6c8aF1Caf8cABe599cfC2", + "bytes": 9992, + "sha256": "69cc6b0cfae87debb1da55ba152f0129a8f24e80a740199ab29277811b106ecf", + "unchanged": true + }, + "engine": { + "address": "0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a", + "bytes": 22581, + "sha256": "c4b9fc7b045d9f33953079a91fcb7ae883dd858d9cde827a9cc3df6043bc2d0b", + "unchanged": true + } + }, + "slots": { + "factory": { + "implementation": { + "value": "0x000000000000000000000000e138dc6efc10233be1e6c8af1caf8cabe599cfc2", + "unchanged": true + } + }, + "policy": { + "implementation": { + "value": "0x000000000000000000000000a2391eee4c9ea1b32aeb3a460b77296ea709f02f", + "unchanged": true + }, + "admin": { + "value": "0x0000000000000000000000000b7a31ec85117892aea90aa5cb6514e2f97c2295", + "unchanged": true + } + }, + "gateway": { + "implementation": { + "value": "0x0000000000000000000000001e412939780f2b834dc42c7ac58d9f99888da659", + "unchanged": true + } + } + }, + "reads": [ + { + "contract": "factory", + "signature": "walletImplementation()(address)", + "value": "0x96D69ec7e6cDdaD414e656B5c9DCA24587DF713c", + "unchanged": true + }, + { + "contract": "factory", + "signature": "paused()(bool)", + "value": "false", + "unchanged": true + }, + { + "contract": "policy", + "signature": "version()(string)", + "value": "3.1.0", + "unchanged": true + }, + { + "contract": "policy", + "signature": "pushChainHash()(bytes32)", + "value": "0x3d6bc1f1d3fb03065860265a8e93840b586e57075d956cd41b4319d040be87f9", + "unchanged": true + }, + { + "contract": "policy", + "signature": "UNIVERSAL_GATEWAY_PC()(address)", + "value": "0x00000000000000000000000000000000000000C1", + "unchanged": true + }, + { + "contract": "policy", + "signature": "UNIVERSAL_EXECUTOR_MODULE()(address)", + "value": "0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7", + "unchanged": true + }, + { + "contract": "walletImplementation", + "signature": "accountId()(string)", + "value": "push.agw.1.0.0", + "unchanged": true + }, + { + "contract": "walletImplementation", + "signature": "SESSION_ENGINE()(address)", + "value": "0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a", + "unchanged": true + }, + { + "contract": "walletImplementation", + "signature": "RULES_POLICY()(address)", + "value": "0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af", + "unchanged": true + }, + { + "contract": "walletImplementation", + "signature": "SESSION_VALIDATOR()(address)", + "value": "0x068EE2388475A98EE1f5a434C58bFF3444fffFe6", + "unchanged": true + }, + { + "contract": "walletImplementation", + "signature": "UNIVERSAL_GATEWAY_PC()(address)", + "value": "0x00000000000000000000000000000000000000C1", + "unchanged": true + } + ] +} diff --git a/plan/agw/research/source-refresh-2026-10-07/reproduce-sdk-findings.cjs b/plan/agw/research/source-refresh-2026-10-07/reproduce-sdk-findings.cjs new file mode 100644 index 00000000..ec213a8a --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/reproduce-sdk-findings.cjs @@ -0,0 +1,35 @@ +/** Read-only source-level reproductions. No RPC, signer, funding or .env use. */ +const path = require('node:path'); +const assert = require('node:assert/strict'); +const root = process.env.AGW_REVIEW_SDK_ROOT || path.resolve(__dirname, '../../../..'); +const { AgenticRevertError } = require(path.join(root, 'packages/core/src')); +const { composeAgwSvmAction } = require(path.join(root, 'packages/core/src/lib/agentic/execution/svm-outbound')); +const { encodeAgwSvmPayload, validateAgwSvmPayload } = require(path.join(root, 'packages/core/src/lib/agentic/execution/svm-payload')); +const { sendPublicSvm } = require(path.join(root, 'packages/core/src/lib/agentic/execution/svm-public')); +const { buildSvmPayloadFromParams } = require(path.join(root, 'packages/core/src/lib/orchestrator/svm-idl/build-payload')); +const hex = c => '0x' + c.repeat(32); +const program = hex('33'), token = '0x'+'55'.repeat(20); +const terms = { + initialized:true, validUntil:1700000100, expectedCEA:hex('44'), gatewayProgram:hex('22'), + assets:[{token,maxPerCall:5n,maxTotal:50n,spent:0n}], maxGasPerCall:10n, + programs:[{program,discriminator:'0x0102030405060708',discriminatorLen:8,dataless:false,maxAccounts:1}], + pins:[{ruleIndex:0,accountIndex:0,expected:hex('44')}], dataPins:[], ceaAccounts:[hex('44')], +}; +const instruction = Uint8Array.from([1,2,3,4,5,6,7,8]); +const allowedPayload = encodeAgwSvmPayload(program,[{pubkey:hex('44'),isWritable:true}],instruction); +const request = {wallet:'0x'+'11'.repeat(20),gateway:'0x00000000000000000000000000000000000000c1',token,amount:1n,recipient:program,payload:allowedPayload,gasLimit:200000n,protocolFee:1n,maxPCForGas:1n}; +function capture(fn) { try { fn(); throw Error('expected refusal'); } catch(e) { return { name:e.name, code:e.code, message:e.message, isAgenticRevertError:e instanceof AgenticRevertError, decodedError:e.decodedError??null, details:e.details }; } } +(async()=>{ + const expired = capture(()=>composeAgwSvmAction(request, terms, 1700000101)); + assert.equal(expired.code,'RULE_LIMIT_EXCEEDED'); assert.equal(expired.isAgenticRevertError,false); assert.equal(expired.decodedError,null); + const payload=encodeAgwSvmPayload(program,[{pubkey:hex('66'),isWritable:true}],Uint8Array.from([1,2,3,4,5,6,7,8])); + const wrongAccount=capture(()=>validateAgwSvmPayload(terms,program,payload)); + assert.equal(wrongAccount.details.contractError,'SvmAccountPinMismatch'); assert.equal(wrongAccount.isAgenticRevertError,false); assert.equal(wrongAccount.decodedError,null); + const p={to:{address:program,chain:'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1'},funds:{amount:1n}}; + let executions=0,ownerFundsOnly; + try{await sendPublicSvm({execute:()=>{executions++;throw Error('must not execute');}},{wallet:'0x'+'11'.repeat(20),door:'owner',generation:{capabilities:new Set(['universalSvmRules','ownerExecute'])}},p);}catch(e){ownerFundsOnly={code:e.code,message:e.message,executions};} + assert.equal(ownerFundsOnly.code,'INVALID_RULE');assert.equal(executions,0); + const ordinary=buildSvmPayloadFromParams({...p,senderUea:'0x'+'11'.repeat(20)}); + assert.equal(ordinary.hasExecute,false);assert.equal(ordinary.svmPayload,'0x'); + console.log(JSON.stringify({sdkCommit:'898eda17',scope:'source-level, no transactions',expired,wrongAccount,ownerFundsOnly,ordinaryFundsOnlyPayload:ordinary},null,2)); +})(); diff --git a/plan/agw/research/source-refresh-2026-10-07/sdk-findings.json b/plan/agw/research/source-refresh-2026-10-07/sdk-findings.json new file mode 100644 index 00000000..b2dea338 --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/sdk-findings.json @@ -0,0 +1,34 @@ +{ + "sdkCommit": "898eda17", + "scope": "source-level, no transactions", + "expired": { + "name": "AgenticError", + "code": "RULE_LIMIT_EXCEEDED", + "message": "RulesExpired", + "isAgenticRevertError": false, + "decodedError": null, + "details": { + "contractError": "RulesExpired" + } + }, + "wrongAccount": { + "name": "AgenticError", + "code": "INVALID_RULE", + "message": "SvmAccountPinMismatch", + "isAgenticRevertError": false, + "decodedError": null, + "details": { + "contractError": "SvmAccountPinMismatch" + } + }, + "ownerFundsOnly": { + "code": "INVALID_RULE", + "message": "Solana AGW sends require one encoded instruction; arrays and funds-only sends are unsupported", + "executions": 0 + }, + "ordinaryFundsOnlyPayload": { + "svmPayload": "0x", + "targetBytes": "0x3333333333333333333333333333333333333333333333333333333333333333", + "hasExecute": false + } +} diff --git a/plan/agw/research/source-refresh-2026-10-07/solana-probe.json b/plan/agw/research/source-refresh-2026-10-07/solana-probe.json new file mode 100644 index 00000000..461cbde7 --- /dev/null +++ b/plan/agw/research/source-refresh-2026-10-07/solana-probe.json @@ -0,0 +1,36 @@ +{ + "checkedAt": "2026-10-07T10:37:51.814Z", + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "genesis": "EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG", + "slot": 508426857, + "programDataSlot": 508426857, + "programs": [ + { + "address": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", + "programData": "DqeV1giGX9UPbTCsUaqau4ZaTqmjxKeRa4TQdbLiUCYC", + "lastUpgradeSlot": "496655369", + "dataLength": 724997, + "dataSha256": "2633943f479debc6bf0cba19861f90dfd01a09ecba206b2ce941c97281b8a95d" + }, + { + "address": "8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx", + "programData": "GQmC7eueNLqazwr7U9fR3s4VwbXUtNf1HL6UCXuSWvaN", + "lastUpgradeSlot": "447956626", + "dataLength": 279709, + "dataSha256": "6887b9299b53bcaede79facbe9d9a53c9a0ba78e2c109322caef070b57637f95" + } + ], + "gatewayConfig": { + "address": "2urirovTZSgpEAEFyf2dMWjMTqfkgg1J3piTBeSEwV5P", + "paused": false, + "dataSha256": "1f7595b955ae35e2ea577db04d3e73f30d7284d9536910065e0fc7b078b6ae33" + }, + "counter": { + "address": "6Kg1NF5RRytjGwR6USttBLEYJrqwm65xtJzdPbbFwJKg", + "value": "201909018", + "authority": "BesWssuCiGE3EqeGRFamuouvAxJDUCdWH6NPHpAFPMBa", + "dataSha256": "a496e0cf4db5b48523ebbf917e7d021abd5d9651775ef8f5c5943aca35c22a7a" + }, + "counterIdlSha256": "493678d103afab762cc1668d02c641226125166ba8b4d7df46b67fec52b3a9ca", + "gatewayIdlSha256": "62d7792d04c657e1224f7c64d13b68e2f49dd39fdd6da0088deca0c32a5fb042" +} diff --git a/plan/agw/research/svm-internals-2026-10-06/README.md b/plan/agw/research/svm-internals-2026-10-06/README.md new file mode 100644 index 00000000..6e49f6bf --- /dev/null +++ b/plan/agw/research/svm-internals-2026-10-06/README.md @@ -0,0 +1,57 @@ +# SVM internals — October 6, 2026 + +> Superseded validation status: [live acceptance report](../live-acceptance-2026-10-06/README.md). Full permissions are restored: public Donut derive, all 53 Anvil cases, unfiltered units, Nx build and four typechecks pass. Bounded testnet funding/broadcasts have started. Earlier restrictions and unrun-live statements below describe the original execution only. + +Branch feat/agw-sdk-v4; uncommitted/not pushed. This completes the independent SVM foundation against deployed source e8db748. It does not enable a guessed public SVM Rule API or claim live Solana execution. + +## Implemented + +- [SVM terms codec](../../../../packages/core/src/lib/agentic/codec/svm-terms.ts): exact version-4 body tuple, ordered AssetCaps, program/discriminator rules, account/data pins, shape/bounds, ambiguous prefixes, forbidden programs, raw EQ alignment, little-endian integer widths and ratio constraints. +- [Value-account derivation](../../../../packages/core/src/lib/agentic/codec/svm-accounts.ts): CEA PDA uses the wallet's 20 bytes plus the selected registry gateway; legacy SPL/Token-2022 ATAs; input/output mint coverage, deduplication and the 16-account bound. The resolved-asset context contributes an ATA for every listed SPL mint; native SOL is protected by the CEA itself. Gateway is caller-resolved, not a hard-coded devnet program. +- [Payload checks](../../../../packages/core/src/lib/agentic/execution/svm-payload.ts): reuses the existing node encoder and parses BE counts/lengths, exact consumption, execute ID, recipient/program identity, account positions, protected-account aliasing and all four data-pin modes. Writable bytes are preserved diagnostically; URP deliberately does not enforce them. +- [Internal outbound action](../../../../packages/core/src/lib/agentic/execution/svm-outbound.ts): program recipient, wallet refund, per-token current spend/caps, u64 request amounts and quoted PC budget. Takes a resolved config snapshot; on-chain URP remains final authority. +- SvmConfigRead is available internally. Public exports, Rule union and UNIVERSAL_SVM_RULES capability remain unchanged/gated while the public mapping is unsettled. + +## Validation and limitations + +| Check | Result | +| --- | --- | +| AGW unit suites | 178 passed; includes 23 SVM cases | +| New SDK-generated bytes against actual AGW/engine/URP in Foundry | 10 passed, 0 failed | +| Unfiltered full core Jest run | 1,938 passed; 4 unchanged network-dependent account tests failed; 12 skipped | +| Explicit offline run excluding those four titles | 1,938 passed, 0 failed; 16 skipped (12 existing + 4 explicit network exclusions) | +| lib/spec/local-harness typechecks | Pass | +| Direct TypeScript emit/build | Pass | +| Changed-file lint | 0 errors, 4 existing-style non-null assertion warnings in tests | +| Nx build | Blocked: plugin worker cannot start in this sandbox; direct tsc build passes | +| Anvil SVM SDK end-to-end suite | Authored/typechecked, but 7 cases cannot run: localhost RPC startup is blocked | +| Donut RPC | DNS resolution unavailable in the restricted session | +| Funded/live E2E | Not run; no private key was loaded or displayed, no funding or broadcast | + +The previous v4 migration's 46 Anvil passes remain historical evidence from the earlier environment. They are not counted again as new SVM execution here. + +[Contract runner](run-forge.sh) uses Foundry's in-process EVM, no RPC/ffi. [SDK-generated fixtures](sdk-vectors.json) feed [SdkSvmWire.t.sol](SdkSvmWire.t.sol), which uses the actual pinned BaseTest deployment of factory/wallet/engine/validator/URP. The asset supplies only its namespace; the gateway is a recording observer. The ten checks prove encoded terms/pins/assets, successful metering, account substitution, CEA aliasing, relative price floor, recipient mismatch, trailing bytes, non-execute ID, u64 overflow and dataless constraints. Reverts use named errors with full arguments where SmartSession's truncation includes them. + +The fixture Solana keys are deterministic owner commitments, not a live cluster/PDA claim. PDA/ATA derivation is tested separately. No Solana CPI, real token burn, TSS, production gateway/executor or destination settlement is simulated. [Logs](logs/). + +The four full-suite failures are in unchanged universal/account/account.spec.ts: two direct origin computations and Solana/Ethereum origin lookups that call Donut. They were not weakened or edited. The offline run uses an explicit negative test-name filter, and the original failure log is retained. + +## Keys, funding and next steps + +Shoaib explicitly authorized using the E2E .env keys to fund tests. The existing loader points at packages/core/.env; that file exists, while packages/core/__e2e__/.env does not. Values were neither read for printing nor copied into artifacts. Loading keys is deferred until RPC connectivity succeeds; the blocked public eth_chainId probe needs no secrets. + +When the environment permits network access, first run the existing read-only deployment/balance preflight, honor the selected scenarios' needs and per-run limits (agent PC default 0.5; outbound PC limit default 20), then run the authorized funded acceptance. Do not blindly execute/fund the entire suite. This authorization persists; no repeat permission question is needed for the agreed test purpose within those existing limits. + +Remaining code/API work: agree the public SVM input/read model, connect registry/mint resolution and IDL/account mapping to these internals, integrate public dispatch/tracking, and exercise live UEA/TSS/Solana delivery. H3/H4.5/H6 and absent ref/label scope remain separate. The source-only fixture request is substantially answered by this work; a representative live cluster case is still useful. + +## Reproduce locally + +```sh +bash plan/agw/research/svm-internals-2026-10-06/run-forge.sh +node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand --testPathPattern=agentic +node node_modules/typescript/bin/tsc --project packages/core/tsconfig.lib.json --noEmit +node node_modules/typescript/bin/tsc --project packages/core/tsconfig.spec.json --noEmit +node node_modules/typescript/bin/tsc --project packages/core/tsconfig.agw-local.json --noEmit +``` + +run-forge.sh requires the isolated e8db748 build prepared by scripts/agw-local/prepare.sh (or AGW_LOCAL_DIR). It only copies review fixtures and adds read access for them in that temporary build; the contract checkout is not edited. The Anvil integration suite is packages/core/__agw-local__/svm-internals.spec.ts and must be rerun when localhost access is available. diff --git a/plan/agw/research/svm-internals-2026-10-06/SdkSvmWire.t.sol b/plan/agw/research/svm-internals-2026-10-06/SdkSvmWire.t.sol new file mode 100644 index 00000000..dbb01c6a --- /dev/null +++ b/plan/agw/research/svm-internals-2026-10-06/SdkSvmWire.t.sol @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { BaseTest } from "../test/Base.t.sol"; +import { AGW } from "../src/AGW.sol"; +import { UniversalRulesPolicyErrors } from "../src/libraries/Errors.sol"; +import { ConfigId, Session } from "smartsessions/DataTypes.sol"; +import { SvmConfig, UniversalOutboundTxRequest } from "../src/libraries/Types.sol"; +import { IUniversalGatewayPC } from "../src/interfaces/IUniversalGatewayPC.sol"; + +contract SdkSvmAsset { + function SOURCE_CHAIN_NAMESPACE() external pure returns (string memory) { return "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"; } +} +contract SdkSvmGatewayObserver { + uint256 public calls; + function sendUniversalTxOutbound(UniversalOutboundTxRequest calldata) external payable { calls++; } +} +/** Review-only. SDK emits bytes; actual AGW/engine/URP decide acceptance. No RPC/server/ffi. */ +contract SdkSvmWireTest is BaseTest { + string private vectors; + AGW private wallet; + bytes32 private rid; + ConfigId private cid; + bytes32 private constant PROGRAM = 0x3333333333333333333333333333333333333333333333333333333333333333; + address private constant ASSET = address(0x7070); + function setUp() public override { + super.setUp(); + vectors = vm.readFile("sdk-harness/sdk-vectors.json"); + vm.etch(ASSET, address(new SdkSvmAsset()).code); + vm.etch(GATEWAY, address(new SdkSvmGatewayObserver()).code); + wallet = newWallet(OWNER); + _grant(".initData"); + vm.deal(address(wallet), 1 ether); + } + function _grant(string memory key) private { + Session memory s = canonicalSession(abi.encode(AGENT), vm.parseJsonBytes(vectors, key)); + vm.prank(OWNER); rid = wallet.grantRules(s); + bytes32 actionId = keccak256(abi.encodePacked(GATEWAY, SEND_OUTBOUND_SELECTOR)); + cid = ConfigId.wrap(keccak256(abi.encodePacked(address(wallet), keccak256(abi.encodePacked(rid, actionId))))); + } + function _data(string memory key, bytes32 recipient, uint256 amount) private view returns (bytes memory) { + UniversalOutboundTxRequest memory r = UniversalOutboundTxRequest({ recipient: abi.encodePacked(recipient), token: ASSET, amount: amount, gasLimit: 200_000, gasPrice: 0, maxPCForGas: 1e15, payload: vm.parseJsonBytes(vectors, key), revertRecipient: address(wallet) }); + return abi.encodeCall(IUniversalGatewayPC.sendUniversalTxOutbound, (r)); + } + function _run(string memory key, bytes32 recipient, uint256 amount) private { + bytes memory data = abi.encodePacked(GATEWAY, uint256(1.1e15), _data(key, recipient, amount)); + vm.prank(AGENT); wallet.executeAsAgent(rid, bytes32(0), data); + } + function test_SdkSvm_EncodedTermsMatchStoredPinsAndAssets() public view { + SvmConfig memory c = urp.getSvmConfig(cid, address(wallet)); + assertTrue(c.initialized); assertEq(c.assets.length, 1); assertEq(c.assets[0].token, ASSET); + assertEq(c.ceaAccounts.length, 2); assertEq(c.pins.length, 2); assertEq(c.dataPins.length, 1); + assertEq(c.dataPins[0].num, 9); assertEq(c.dataPins[0].den, 10); + } + function test_SdkSvm_ValidPayloadPassesAndMeters() public { + _run(".valid", PROGRAM, 5); + assertEq(urp.getSvmConfig(cid, address(wallet)).assets[0].spent, 5); + assertEq(SdkSvmGatewayObserver(GATEWAY).calls(), 1); + } + function test_SdkSvm_AccountSubstitutionFails() public { + expectUrpGate(UniversalRulesPolicyErrors.SvmAccountPinMismatch.selector); _run(".badPin", PROGRAM, 5); + } + function test_SdkSvm_ProtectedAccountAliasFails() public { + expectUrpGate(UniversalRulesPolicyErrors.CeaAccountAtUnpinnedIndex.selector); _run(".alias", PROGRAM, 5); + } + function test_SdkSvm_RatioFloorFailsWithoutSpend() public { + expectUrpGate(UniversalRulesPolicyErrors.SvmDataRatioNotMet.selector); _run(".badRatio", PROGRAM, 5); + assertEq(urp.getSvmConfig(cid, address(wallet)).assets[0].spent, 0); + } + function test_SdkSvm_RecipientMismatchFails() public { + expectUrpGate(UniversalRulesPolicyErrors.RecipientTargetMismatch.selector); _run(".valid", bytes32(uint256(7)), 5); + } + function test_SdkSvm_TrailingPayloadFails() public { + expectUrpGate(UniversalRulesPolicyErrors.MalformedSvmPayload.selector); _run(".trailing", PROGRAM, 5); + } + function test_SdkSvm_NonExecuteFails() public { + expectUrpGate(UniversalRulesPolicyErrors.SvmInstructionNotExecute.selector); _run(".wrongId", PROGRAM, 5); + } + function test_SdkSvm_U64OverflowFails() public { + expectUrpGate(abi.encodeWithSelector(UniversalRulesPolicyErrors.AmountExceedsU64.selector, uint256(type(uint64).max) + 1)); _run(".valid", PROGRAM, uint256(type(uint64).max) + 1); + } + function test_SdkSvm_DatalessOnlyEmptyData() public { + _grant(".datalessInitData"); _run(".datalessPayload", PROGRAM, 0); + expectUrpGate(abi.encodeWithSelector(UniversalRulesPolicyErrors.ProgramNotAllowed.selector, PROGRAM, bytes8(0x0100000000000000))); _run(".valid", PROGRAM, 0); + } +} diff --git a/plan/agw/research/svm-internals-2026-10-06/generate-vectors.ts b/plan/agw/research/svm-internals-2026-10-06/generate-vectors.ts new file mode 100644 index 00000000..ce60384b --- /dev/null +++ b/plan/agw/research/svm-internals-2026-10-06/generate-vectors.ts @@ -0,0 +1,29 @@ +/** Public fixture values only. No network, key loading, signing or broadcasting. */ +import { writeFileSync } from 'node:fs'; +import { join } from 'node:path'; +import type { Hex } from 'viem'; +import { encodeSvmTerms, type SvmTermsWire } from '../../../../packages/core/src/lib/agentic/codec/svm-terms'; +import { encodeEnvelope } from '../../../../packages/core/src/lib/agentic/codec/session'; +import { encodeAgwSvmPayload } from '../../../../packages/core/src/lib/agentic/execution/svm-payload'; +const key = (b: string) => `0x${b.repeat(32)}` as Hex; +const cea = key('11'), ata = key('44'), program = key('33'); +const terms: SvmTermsWire = { + validUntil: 2_000_000_000, expectedCEA: cea, gatewayProgram: key('22'), + assets: [{ token: '0x0000000000000000000000000000000000007070', maxPerCall: BigInt(2) ** BigInt(256) - BigInt(1), maxTotal: BigInt(2) ** BigInt(256) - BigInt(1) }], maxGasPerCall: BigInt(10) ** BigInt(16), + ceaAccounts: [cea, ata], programs: [{ program, discriminator: '0x0100000000000000', discriminatorLen: 1, dataless: false, maxAccounts: 0 }], + pins: [{ ruleIndex: 0, accountIndex: 0, expected: cea }, { ruleIndex: 0, accountIndex: 1, expected: ata }], + dataPins: [{ ruleIndex: 0, fromEnd: true, offset: 4, offsetB: 2, len: 2, mode: 3, expected: key('00'), num: BigInt(9), den: BigInt(10) }], +}; +const accounts = [{ pubkey: cea, isWritable: true }, { pubkey: ata, isWritable: true }]; +const payload = (a: typeof accounts, out = 90) => encodeAgwSvmPayload(program, a, new Uint8Array([1, out, 0, 100, 0])); +const valid = payload(accounts), wrongId = Buffer.from(valid.slice(2), 'hex'); wrongId[wrongId.length - 33] = 1; +const dataless = { ...terms, programs: [{ ...terms.programs[0], discriminatorLen: 0, dataless: true }], dataPins: [] }; +writeFileSync(join(__dirname, 'sdk-vectors.json'), JSON.stringify({ + source: 'e8db74815cfbbf5389593805e464fe8d85f7f735', + note: 'Deterministic owner-committed Solana keys; no live PDA/cluster or transport claim.', + initData: encodeEnvelope('solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1', encodeSvmTerms(terms, 0)), + datalessInitData: encodeEnvelope('solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1', encodeSvmTerms(dataless, 0)), + valid, badRatio: payload(accounts, 89), badPin: payload([{ ...accounts[0], pubkey: key('77') }, accounts[1]]), + alias: payload([...accounts, accounts[0]]), trailing: `${valid}00`, wrongId: `0x${wrongId.toString('hex')}`, + datalessPayload: encodeAgwSvmPayload(program, accounts, new Uint8Array()), +}, null, 2) + '\n'); diff --git a/plan/agw/research/svm-internals-2026-10-06/logs/agentic-unit.log b/plan/agw/research/svm-internals-2026-10-06/logs/agentic-unit.log new file mode 100644 index 00000000..17f70357 --- /dev/null +++ b/plan/agw/research/svm-internals-2026-10-06/logs/agentic-unit.log @@ -0,0 +1,15 @@ +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts + +Test Suites: 9 passed, 9 total +Tests: 178 passed, 178 total +Snapshots: 0 total +Time: 3.414 s, estimated 4 s +Ran all test suites matching /agentic/i. diff --git a/plan/agw/research/svm-internals-2026-10-06/logs/anvil-blocked.log b/plan/agw/research/svm-internals-2026-10-06/logs/anvil-blocked.log new file mode 100644 index 00000000..23f0f3a7 --- /dev/null +++ b/plan/agw/research/svm-internals-2026-10-06/logs/anvil-blocked.log @@ -0,0 +1,134 @@ +FAIL core-agw-local packages/core/__agw-local__/svm-internals.spec.ts (25.615 s) + internal SVM codec/payloads against actual v4 contracts + ✕ grants SDK-encoded SVM terms and preserves every field/account (2 ms) + ✕ the internal composed call passes actual S1–S18 and meters its token + ✕ account substitution and CEA aliasing are rejected by URP + ✕ relative price floor and recipient/program identity are enforced on-chain + ✕ trailing bytes, non-execute IDs and u64 overflow are rejected + ✕ dataless rules accept only empty instruction data (1 ms) + ✕ fixed account counts reject appended accounts and failed calls do not change spend + + ● internal SVM codec/payloads against actual v4 contracts › grants SDK-encoded SVM terms and preserves every field/account + + anvil did not start at http://127.0.0.1:18552 + + 149 | } + 150 | if (Date.now() - start > timeoutMs) + > 151 | throw new Error(`anvil did not start at ${url}`); + | ^ + 152 | await new Promise((r) => setTimeout(r, 200)); + 153 | } + 154 | } + + at waitForRpc (__agw-local__/harness.ts:151:13) + at async deployHarness (__agw-local__/harness.ts:185:3) + at async startHarness (__agw-local__/harness.ts:173:12) + at async Object. (__agw-local__/svm-internals.spec.ts:31:9) + + ● internal SVM codec/payloads against actual v4 contracts › the internal composed call passes actual S1–S18 and meters its token + + anvil did not start at http://127.0.0.1:18552 + + 149 | } + 150 | if (Date.now() - start > timeoutMs) + > 151 | throw new Error(`anvil did not start at ${url}`); + | ^ + 152 | await new Promise((r) => setTimeout(r, 200)); + 153 | } + 154 | } + + at waitForRpc (__agw-local__/harness.ts:151:13) + at async deployHarness (__agw-local__/harness.ts:185:3) + at async startHarness (__agw-local__/harness.ts:173:12) + at async Object. (__agw-local__/svm-internals.spec.ts:31:9) + + ● internal SVM codec/payloads against actual v4 contracts › account substitution and CEA aliasing are rejected by URP + + anvil did not start at http://127.0.0.1:18552 + + 149 | } + 150 | if (Date.now() - start > timeoutMs) + > 151 | throw new Error(`anvil did not start at ${url}`); + | ^ + 152 | await new Promise((r) => setTimeout(r, 200)); + 153 | } + 154 | } + + at waitForRpc (__agw-local__/harness.ts:151:13) + at async deployHarness (__agw-local__/harness.ts:185:3) + at async startHarness (__agw-local__/harness.ts:173:12) + at async Object. (__agw-local__/svm-internals.spec.ts:31:9) + + ● internal SVM codec/payloads against actual v4 contracts › relative price floor and recipient/program identity are enforced on-chain + + anvil did not start at http://127.0.0.1:18552 + + 149 | } + 150 | if (Date.now() - start > timeoutMs) + > 151 | throw new Error(`anvil did not start at ${url}`); + | ^ + 152 | await new Promise((r) => setTimeout(r, 200)); + 153 | } + 154 | } + + at waitForRpc (__agw-local__/harness.ts:151:13) + at async deployHarness (__agw-local__/harness.ts:185:3) + at async startHarness (__agw-local__/harness.ts:173:12) + at async Object. (__agw-local__/svm-internals.spec.ts:31:9) + + ● internal SVM codec/payloads against actual v4 contracts › trailing bytes, non-execute IDs and u64 overflow are rejected + + anvil did not start at http://127.0.0.1:18552 + + 149 | } + 150 | if (Date.now() - start > timeoutMs) + > 151 | throw new Error(`anvil did not start at ${url}`); + | ^ + 152 | await new Promise((r) => setTimeout(r, 200)); + 153 | } + 154 | } + + at waitForRpc (__agw-local__/harness.ts:151:13) + at async deployHarness (__agw-local__/harness.ts:185:3) + at async startHarness (__agw-local__/harness.ts:173:12) + at async Object. (__agw-local__/svm-internals.spec.ts:31:9) + + ● internal SVM codec/payloads against actual v4 contracts › dataless rules accept only empty instruction data + + anvil did not start at http://127.0.0.1:18552 + + 149 | } + 150 | if (Date.now() - start > timeoutMs) + > 151 | throw new Error(`anvil did not start at ${url}`); + | ^ + 152 | await new Promise((r) => setTimeout(r, 200)); + 153 | } + 154 | } + + at waitForRpc (__agw-local__/harness.ts:151:13) + at async deployHarness (__agw-local__/harness.ts:185:3) + at async startHarness (__agw-local__/harness.ts:173:12) + at async Object. (__agw-local__/svm-internals.spec.ts:31:9) + + ● internal SVM codec/payloads against actual v4 contracts › fixed account counts reject appended accounts and failed calls do not change spend + + anvil did not start at http://127.0.0.1:18552 + + 149 | } + 150 | if (Date.now() - start > timeoutMs) + > 151 | throw new Error(`anvil did not start at ${url}`); + | ^ + 152 | await new Promise((r) => setTimeout(r, 200)); + 153 | } + 154 | } + + at waitForRpc (__agw-local__/harness.ts:151:13) + at async deployHarness (__agw-local__/harness.ts:185:3) + at async startHarness (__agw-local__/harness.ts:173:12) + at async Object. (__agw-local__/svm-internals.spec.ts:31:9) + +Test Suites: 1 failed, 1 total +Tests: 7 failed, 7 total +Snapshots: 0 total +Time: 25.652 s +Ran all test suites within paths "packages/core/__agw-local__/svm-internals.spec.ts". diff --git a/plan/agw/research/svm-internals-2026-10-06/logs/forge-contracts.log b/plan/agw/research/svm-internals-2026-10-06/logs/forge-contracts.log new file mode 100644 index 00000000..f5a0ce91 --- /dev/null +++ b/plan/agw/research/svm-internals-2026-10-06/logs/forge-contracts.log @@ -0,0 +1,48 @@ +Compiling 1 files with Solc 0.8.26 +Solc 0.8.26 finished in 12.54s +Compiler run successful with warnings: +Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning. + --> lib/smartsessions/contracts/lib/ConfigLib.sol:77:9: + | +77 | bool useRegistry + | ^^^^^^^^^^^^^^^^ + +Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning. + --> lib/smartsessions/contracts/lib/ConfigLib.sol:123:9: + | +123 | bool useRegistry + | ^^^^^^^^^^^^^^^^ + +Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning. + --> lib/smartsessions/contracts/lib/ConfigLib.sol:203:9: + | +203 | bool useRegistry + | ^^^^^^^^^^^^^^^^ + +Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning. + --> lib/smartsessions/contracts/core/SmartSessionBase.sol:270:9: + | +270 | bool useRegistry + | ^^^^^^^^^^^^^^^^ + +Warning (2018): Function state mutability can be restricted to view + --> src/AGWFactory.sol:352:5: + | +352 | function _authorizeUpgrade(address newImplementation) internal override onlyRole(DEFAULT_ADMIN_ROLE) { + | ^ (Relevant source part starts here and spans across multiple lines). + + +Ran 10 tests for sdk-harness/SdkSvmWire.t.sol:SdkSvmWireTest +[PASS] test_SdkSvm_AccountSubstitutionFails() (gas: 622358) +[PASS] test_SdkSvm_DatalessOnlyEmptyData() (gas: 1573814) +[PASS] test_SdkSvm_EncodedTermsMatchStoredPinsAndAssets() (gas: 83952) +[PASS] test_SdkSvm_NonExecuteFails() (gas: 603571) +[PASS] test_SdkSvm_ProtectedAccountAliasFails() (gas: 647688) +[PASS] test_SdkSvm_RatioFloorFailsWithoutSpend() (gas: 716489) +[PASS] test_SdkSvm_RecipientMismatchFails() (gas: 603986) +[PASS] test_SdkSvm_TrailingPayloadFails() (gas: 603572) +[PASS] test_SdkSvm_U64OverflowFails() (gas: 595604) +[PASS] test_SdkSvm_ValidPayloadPassesAndMeters() (gas: 736266) +Suite result: ok. 10 passed; 0 failed; 0 skipped; finished in 10.64ms (10.46ms CPU time) + +Ran 1 test suite in 17.80ms (10.64ms CPU time): 10 tests passed, 0 failed, 0 skipped (10 total tests) diff --git a/plan/agw/research/svm-internals-2026-10-06/logs/full-unit-network-blocked.log b/plan/agw/research/svm-internals-2026-10-06/logs/full-unit-network-blocked.log new file mode 100644 index 00000000..59d1ed0f --- /dev/null +++ b/plan/agw/research/svm-internals-2026-10-06/logs/full-unit-network-blocked.log @@ -0,0 +1,600 @@ +FAIL core packages/core/src/lib/universal/account/account.spec.ts (63.147 s) + ● Console + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:158:51) + + ● Universal Account Utilities › convertOriginToExecutor() - Not Mocked › should return same address and pushChainClient.universal.account + + thrown: "Exceeded timeout of 30000 ms for a test. + Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout." + + 64 | // Network-dependent tests - run via integration config + 65 | describe('convertOriginToExecutor() - Not Mocked', () => { + > 66 | it('should return same address and pushChainClient.universal.account', async () => { + | ^ + 67 | const account = privateKeyToAccount(generatePrivateKey()); + 68 | const walletClient = createWalletClient({ + 69 | account: account, + + at src/lib/universal/account/account.spec.ts:66:5 + at src/lib/universal/account/account.spec.ts:65:3 + at Object. (src/lib/universal/account/account.spec.ts:17:1) + + ● Universal Account Utilities › convertExecutorToOrigin() › Solana: should return valid origin data for a UEA address + + ContractFunctionExecutionError: HTTP request failed. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b097000000000000000000000000bcfad05e5f19ae46feaab2f72ad9977bc239b395","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Raw Call Arguments: + to: 0x00000000000000000000000000000000000000eA + data: 0xd0f4b097000000000000000000000000bcfad05e5f19ae46feaab2f72ad9977bc239b395 + + Contract Call: + address: 0x00000000000000000000000000000000000000eA + function: getOriginForUEA(address addr) + args: (0xbCfaD05E5f19Ae46feAab2F72Ad9977BC239b395) + + Docs: https://viem.sh/docs/contract/readContract + Details: fetch failed + Version: viem@2.27.2 + + 486 | }); + 487 | + > 488 | const originResult = (await client.readContract({ + | ^ + 489 | address: FACTORY_ADDRESS, + 490 | abi: FACTORY_V1, + 491 | functionName: 'getOriginForUEA', + + at getContractError (../../node_modules/viem/utils/errors/getContractError.ts:78:10) + at readContract (../../node_modules/viem/actions/public/readContract.ts:136:27) + at async convertExecutorToOrigin (src/lib/universal/account/account.ts:488:25) + at async Object. (src/lib/universal/account/account.spec.ts:106:9) + + Cause: + CallExecutionError: HTTP request failed. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b097000000000000000000000000bcfad05e5f19ae46feaab2f72ad9977bc239b395","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Raw Call Arguments: + to: 0x00000000000000000000000000000000000000eA + data: 0xd0f4b097000000000000000000000000bcfad05e5f19ae46feaab2f72ad9977bc239b395 + + Details: fetch failed + Version: viem@2.27.2 + + 486 | }); + 487 | + > 488 | const originResult = (await client.readContract({ + | ^ + 489 | address: FACTORY_ADDRESS, + 490 | abi: FACTORY_V1, + 491 | functionName: 'getOriginForUEA', + + at getCallError (../../node_modules/viem/utils/errors/getCallError.ts:42:10) + at call (../../node_modules/viem/actions/public/call.ts:282:23) + at async readContract (../../node_modules/viem/actions/public/readContract.ts:120:22) + at async convertExecutorToOrigin (src/lib/universal/account/account.ts:488:25) + at async Object. (src/lib/universal/account/account.spec.ts:106:9) + + Cause: + HttpRequestError: HTTP request failed. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b097000000000000000000000000bcfad05e5f19ae46feaab2f72ad9977bc239b395","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Details: fetch failed + Version: viem@2.27.2 + + at Object.request (../../node_modules/viem/utils/rpc/http.ts:161:15) + at async fn (../../node_modules/viem/clients/transports/http.ts:145:19) + at async request (../../node_modules/viem/clients/transports/http.ts:150:39) + at async delay.count.count (../../node_modules/viem/utils/buildRequest.ts:150:22) + at async attemptRetry (../../node_modules/viem/utils/promise/withRetry.ts:44:22) + + Cause: + TypeError: fetch failed + + at async response.errorInstance.request_js_1.TimeoutError.body.body (../../node_modules/viem/utils/rpc/http.ts:120:30) + at ../../async /Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/utils/promise/withTimeout.ts:36:17 + + Cause: + getaddrinfo ENOTFOUND evm.donut.rpc.push.org + + + + ● Universal Account Utilities › convertExecutorToOrigin() › Ethereum: should return valid origin data for a UEA address + + ContractFunctionExecutionError: HTTP request failed. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b0970000000000000000000000007aee1699fee2c906251863d24d35b3debe0932ec","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Raw Call Arguments: + to: 0x00000000000000000000000000000000000000eA + data: 0xd0f4b0970000000000000000000000007aee1699fee2c906251863d24d35b3debe0932ec + + Contract Call: + address: 0x00000000000000000000000000000000000000eA + function: getOriginForUEA(address addr) + args: (0x7AEE1699FeE2C906251863D24D35B3dEbe0932EC) + + Docs: https://viem.sh/docs/contract/readContract + Details: fetch failed + Version: viem@2.27.2 + + 486 | }); + 487 | + > 488 | const originResult = (await client.readContract({ + | ^ + 489 | address: FACTORY_ADDRESS, + 490 | abi: FACTORY_V1, + 491 | functionName: 'getOriginForUEA', + + at getContractError (../../node_modules/viem/utils/errors/getContractError.ts:78:10) + at readContract (../../node_modules/viem/actions/public/readContract.ts:136:27) + at async convertExecutorToOrigin (src/lib/universal/account/account.ts:488:25) + at async Object. (src/lib/universal/account/account.spec.ts:130:9) + + Cause: + CallExecutionError: HTTP request failed. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b0970000000000000000000000007aee1699fee2c906251863d24d35b3debe0932ec","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Raw Call Arguments: + to: 0x00000000000000000000000000000000000000eA + data: 0xd0f4b0970000000000000000000000007aee1699fee2c906251863d24d35b3debe0932ec + + Details: fetch failed + Version: viem@2.27.2 + + 486 | }); + 487 | + > 488 | const originResult = (await client.readContract({ + | ^ + 489 | address: FACTORY_ADDRESS, + 490 | abi: FACTORY_V1, + 491 | functionName: 'getOriginForUEA', + + at getCallError (../../node_modules/viem/utils/errors/getCallError.ts:42:10) + at call (../../node_modules/viem/actions/public/call.ts:282:23) + at async readContract (../../node_modules/viem/actions/public/readContract.ts:120:22) + at async convertExecutorToOrigin (src/lib/universal/account/account.ts:488:25) + at async Object. (src/lib/universal/account/account.spec.ts:130:9) + + Cause: + HttpRequestError: HTTP request failed. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b0970000000000000000000000007aee1699fee2c906251863d24d35b3debe0932ec","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Details: fetch failed + Version: viem@2.27.2 + + at Object.request (../../node_modules/viem/utils/rpc/http.ts:161:15) + at async fn (../../node_modules/viem/clients/transports/http.ts:145:19) + at async request (../../node_modules/viem/clients/transports/http.ts:150:39) + at async delay.count.count (../../node_modules/viem/utils/buildRequest.ts:150:22) + at async attemptRetry (../../node_modules/viem/utils/promise/withRetry.ts:44:22) + + Cause: + TypeError: fetch failed + + at async response.errorInstance.request_js_1.TimeoutError.body.body (../../node_modules/viem/utils/rpc/http.ts:120:30) + at ../../async /Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/utils/promise/withTimeout.ts:36:17 + + Cause: + getaddrinfo ENOTFOUND evm.donut.rpc.push.org + + + + ● Universal Account Utilities › convertOriginToExecutor() - Direct Tests › should compute and cache address for EVM chain + + thrown: "Exceeded timeout of 30000 ms for a test. + Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout." + + 191 | + 192 | // Network-dependent test - run via integration config + > 193 | it('should compute and cache address for EVM chain', async () => { + | ^ + 194 | const evmAccount = { + 195 | chain: CHAIN.ETHEREUM_SEPOLIA, + 196 | address: EVM_ADDRESS, + + at src/lib/universal/account/account.spec.ts:193:5 + at src/lib/universal/account/account.spec.ts:151:3 + at Object. (src/lib/universal/account/account.spec.ts:17:1) + +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts + +ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From src/lib/universal/account/account.spec.ts. + + 69 | bytecodeHash: initCodeHash, + 70 | }); + > 71 | } + | ^ + 72 | + 73 | // ============================================================================ + 74 | // On-chain UEA Computation + + at ../../node_modules/viem/actions/public/call.ts:268:57 + at async call (../../node_modules/viem/actions/public/call.ts:268:57) + at async readContract (../../node_modules/viem/actions/public/readContract.ts:120:22) + at async computeUEA (src/lib/orchestrator/internals/uea-manager.ts:71:29) + at async Object. (src/lib/universal/account/account.spec.ts:79:24) +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts + +Summary of all failing tests +FAIL src/lib/universal/account/account.spec.ts (63.147 s) + ● Universal Account Utilities › convertOriginToExecutor() - Not Mocked › should return same address and pushChainClient.universal.account + + thrown: "Exceeded timeout of 30000 ms for a test. + Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout." + + 64 | // Network-dependent tests - run via integration config + 65 | describe('convertOriginToExecutor() - Not Mocked', () => { + > 66 | it('should return same address and pushChainClient.universal.account', async () => { + | ^ + 67 | const account = privateKeyToAccount(generatePrivateKey()); + 68 | const walletClient = createWalletClient({ + 69 | account: account, + + at src/lib/universal/account/account.spec.ts:66:5 + at src/lib/universal/account/account.spec.ts:65:3 + at Object. (src/lib/universal/account/account.spec.ts:17:1) + + ● Universal Account Utilities › convertExecutorToOrigin() › Solana: should return valid origin data for a UEA address + + ContractFunctionExecutionError: HTTP request failed. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b097000000000000000000000000bcfad05e5f19ae46feaab2f72ad9977bc239b395","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Raw Call Arguments: + to: 0x00000000000000000000000000000000000000eA + data: 0xd0f4b097000000000000000000000000bcfad05e5f19ae46feaab2f72ad9977bc239b395 + + Contract Call: + address: 0x00000000000000000000000000000000000000eA + function: getOriginForUEA(address addr) + args: (0xbCfaD05E5f19Ae46feAab2F72Ad9977BC239b395) + + Docs: https://viem.sh/docs/contract/readContract + Details: fetch failed + Version: viem@2.27.2 + + 486 | }); + 487 | + > 488 | const originResult = (await client.readContract({ + | ^ + 489 | address: FACTORY_ADDRESS, + 490 | abi: FACTORY_V1, + 491 | functionName: 'getOriginForUEA', + + at getContractError (../../node_modules/viem/utils/errors/getContractError.ts:78:10) + at readContract (../../node_modules/viem/actions/public/readContract.ts:136:27) + at async convertExecutorToOrigin (src/lib/universal/account/account.ts:488:25) + at async Object. (src/lib/universal/account/account.spec.ts:106:9) + + Cause: + CallExecutionError: HTTP request failed. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b097000000000000000000000000bcfad05e5f19ae46feaab2f72ad9977bc239b395","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Raw Call Arguments: + to: 0x00000000000000000000000000000000000000eA + data: 0xd0f4b097000000000000000000000000bcfad05e5f19ae46feaab2f72ad9977bc239b395 + + Details: fetch failed + Version: viem@2.27.2 + + 486 | }); + 487 | + > 488 | const originResult = (await client.readContract({ + | ^ + 489 | address: FACTORY_ADDRESS, + 490 | abi: FACTORY_V1, + 491 | functionName: 'getOriginForUEA', + + at getCallError (../../node_modules/viem/utils/errors/getCallError.ts:42:10) + at call (../../node_modules/viem/actions/public/call.ts:282:23) + at async readContract (../../node_modules/viem/actions/public/readContract.ts:120:22) + at async convertExecutorToOrigin (src/lib/universal/account/account.ts:488:25) + at async Object. (src/lib/universal/account/account.spec.ts:106:9) + + Cause: + HttpRequestError: HTTP request failed. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b097000000000000000000000000bcfad05e5f19ae46feaab2f72ad9977bc239b395","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Details: fetch failed + Version: viem@2.27.2 + + at Object.request (../../node_modules/viem/utils/rpc/http.ts:161:15) + at async fn (../../node_modules/viem/clients/transports/http.ts:145:19) + at async request (../../node_modules/viem/clients/transports/http.ts:150:39) + at async delay.count.count (../../node_modules/viem/utils/buildRequest.ts:150:22) + at async attemptRetry (../../node_modules/viem/utils/promise/withRetry.ts:44:22) + + Cause: + TypeError: fetch failed + + at async response.errorInstance.request_js_1.TimeoutError.body.body (../../node_modules/viem/utils/rpc/http.ts:120:30) + at ../../async /Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/utils/promise/withTimeout.ts:36:17 + + Cause: + getaddrinfo ENOTFOUND evm.donut.rpc.push.org + + + + ● Universal Account Utilities › convertExecutorToOrigin() › Ethereum: should return valid origin data for a UEA address + + ContractFunctionExecutionError: HTTP request failed. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b0970000000000000000000000007aee1699fee2c906251863d24d35b3debe0932ec","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Raw Call Arguments: + to: 0x00000000000000000000000000000000000000eA + data: 0xd0f4b0970000000000000000000000007aee1699fee2c906251863d24d35b3debe0932ec + + Contract Call: + address: 0x00000000000000000000000000000000000000eA + function: getOriginForUEA(address addr) + args: (0x7AEE1699FeE2C906251863D24D35B3dEbe0932EC) + + Docs: https://viem.sh/docs/contract/readContract + Details: fetch failed + Version: viem@2.27.2 + + 486 | }); + 487 | + > 488 | const originResult = (await client.readContract({ + | ^ + 489 | address: FACTORY_ADDRESS, + 490 | abi: FACTORY_V1, + 491 | functionName: 'getOriginForUEA', + + at getContractError (../../node_modules/viem/utils/errors/getContractError.ts:78:10) + at readContract (../../node_modules/viem/actions/public/readContract.ts:136:27) + at async convertExecutorToOrigin (src/lib/universal/account/account.ts:488:25) + at async Object. (src/lib/universal/account/account.spec.ts:130:9) + + Cause: + CallExecutionError: HTTP request failed. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b0970000000000000000000000007aee1699fee2c906251863d24d35b3debe0932ec","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Raw Call Arguments: + to: 0x00000000000000000000000000000000000000eA + data: 0xd0f4b0970000000000000000000000007aee1699fee2c906251863d24d35b3debe0932ec + + Details: fetch failed + Version: viem@2.27.2 + + 486 | }); + 487 | + > 488 | const originResult = (await client.readContract({ + | ^ + 489 | address: FACTORY_ADDRESS, + 490 | abi: FACTORY_V1, + 491 | functionName: 'getOriginForUEA', + + at getCallError (../../node_modules/viem/utils/errors/getCallError.ts:42:10) + at call (../../node_modules/viem/actions/public/call.ts:282:23) + at async readContract (../../node_modules/viem/actions/public/readContract.ts:120:22) + at async convertExecutorToOrigin (src/lib/universal/account/account.ts:488:25) + at async Object. (src/lib/universal/account/account.spec.ts:130:9) + + Cause: + HttpRequestError: HTTP request failed. + + URL: https://evm.donut.rpc.push.org/ + Request body: {"method":"eth_call","params":[{"data":"0xd0f4b0970000000000000000000000007aee1699fee2c906251863d24d35b3debe0932ec","to":"0x00000000000000000000000000000000000000eA"},"latest"]} + + Details: fetch failed + Version: viem@2.27.2 + + at Object.request (../../node_modules/viem/utils/rpc/http.ts:161:15) + at async fn (../../node_modules/viem/clients/transports/http.ts:145:19) + at async request (../../node_modules/viem/clients/transports/http.ts:150:39) + at async delay.count.count (../../node_modules/viem/utils/buildRequest.ts:150:22) + at async attemptRetry (../../node_modules/viem/utils/promise/withRetry.ts:44:22) + + Cause: + TypeError: fetch failed + + at async response.errorInstance.request_js_1.TimeoutError.body.body (../../node_modules/viem/utils/rpc/http.ts:120:30) + at ../../async /Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/utils/promise/withTimeout.ts:36:17 + + Cause: + getaddrinfo ENOTFOUND evm.donut.rpc.push.org + + + + ● Universal Account Utilities › convertOriginToExecutor() - Direct Tests › should compute and cache address for EVM chain + + thrown: "Exceeded timeout of 30000 ms for a test. + Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout." + + 191 | + 192 | // Network-dependent test - run via integration config + > 193 | it('should compute and cache address for EVM chain', async () => { + | ^ + 194 | const evmAccount = { + 195 | chain: CHAIN.ETHEREUM_SEPOLIA, + 196 | address: EVM_ADDRESS, + + at src/lib/universal/account/account.spec.ts:193:5 + at src/lib/universal/account/account.spec.ts:151:3 + at Object. (src/lib/universal/account/account.spec.ts:17:1) + + +Test Suites: 1 failed, 1 skipped, 112 passed, 113 of 114 total +Tests: 4 failed, 12 skipped, 1938 passed, 1954 total +Snapshots: 0 total +Time: 92.153 s +Ran all test suites. +Jest did not exit one second after the test run has completed. + +'This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue. diff --git a/plan/agw/research/svm-internals-2026-10-06/logs/lib-typecheck.log b/plan/agw/research/svm-internals-2026-10-06/logs/lib-typecheck.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/svm-internals-2026-10-06/logs/lint.log b/plan/agw/research/svm-internals-2026-10-06/logs/lint.log new file mode 100644 index 00000000..01926690 --- /dev/null +++ b/plan/agw/research/svm-internals-2026-10-06/logs/lint.log @@ -0,0 +1,10 @@ + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/svm-internals.spec.ts + 86:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 119:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 189:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts + 457:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +✖ 4 problems (0 errors, 4 warnings) diff --git a/plan/agw/research/svm-internals-2026-10-06/logs/local-typecheck.log b/plan/agw/research/svm-internals-2026-10-06/logs/local-typecheck.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/svm-internals-2026-10-06/logs/nx-build-blocked.log b/plan/agw/research/svm-internals-2026-10-06/logs/nx-build-blocked.log new file mode 100644 index 00000000..e2cae97e --- /dev/null +++ b/plan/agw/research/svm-internals-2026-10-06/logs/nx-build-blocked.log @@ -0,0 +1,2 @@ + + NX Failed to start plugin worker. diff --git a/plan/agw/research/svm-internals-2026-10-06/logs/offline-unit.log b/plan/agw/research/svm-internals-2026-10-06/logs/offline-unit.log new file mode 100644 index 00000000..5c4c8c3f --- /dev/null +++ b/plan/agw/research/svm-internals-2026-10-06/logs/offline-unit.log @@ -0,0 +1,155 @@ +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:158:51) + +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts + +Test Suites: 1 skipped, 113 passed, 113 of 114 total +Tests: 16 skipped, 1938 passed, 1954 total +Snapshots: 0 total +Time: 22.857 s, estimated 88 s +Ran all test suites with tests matching "^(?!.*(?:convertOriginToExecutor\(\) - Not Mocked|Solana: should return valid origin data for a UEA address|Ethereum: should return valid origin data for a UEA address|should compute and cache address for EVM chain)).*$". +Jest did not exit one second after the test run has completed. + +'This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue. diff --git a/plan/agw/research/svm-internals-2026-10-06/logs/spec-typecheck.log b/plan/agw/research/svm-internals-2026-10-06/logs/spec-typecheck.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/svm-internals-2026-10-06/logs/svm-unit.log b/plan/agw/research/svm-internals-2026-10-06/logs/svm-unit.log new file mode 100644 index 00000000..c32cabac --- /dev/null +++ b/plan/agw/research/svm-internals-2026-10-06/logs/svm-unit.log @@ -0,0 +1,33 @@ +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts + v4 internal SVM wire codec + ✓ round-trips ordered per-token caps and all four data-pin modes (3 ms) + ✓ rejects expired before encoding (4 ms) + ✓ rejects zero CEA before encoding + ✓ rejects empty assets before encoding (1 ms) + ✓ rejects duplicate tokens before encoding + ✓ rejects system program before encoding (1 ms) + ✓ rejects ambiguous prefixes before encoding + ✓ rejects missing pin before encoding + ✓ rejects duplicate pin before encoding + ✓ rejects CEA absent before encoding + ✓ rejects fixed count outside bound before encoding + ✓ refuses misleading integer/raw alignment and zero ratio denominators (1 ms) + wallet-scoped SVM value accounts + ✓ derives the exact PDA from wallet20 and the selected gateway (3 ms) + ✓ includes input/output ATAs, deduplicates, and separates Token-2022 accounts (3 ms) + S12–S18 payload checks + ✓ matches the existing node encoder and parses every byte including writable flags (1 ms) + ✓ rejects trailing data with the corresponding contract error (1 ms) + ✓ rejects truncated with the corresponding contract error + ✓ rejects oversized count with the corresponding contract error + ✓ pins prevent key substitution and protected-account aliasing (1 ms) + ✓ enforces little-endian floors/ceilings, from-end offsets, ratios and exact byte pins (1 ms) + internal SVM outbound action + ✓ uses the program recipient, wallet refund and quoted PC while preserving the exact payload (2 ms) + ✓ rejects caps, zero gas and unknown assets before signing (2 ms) + +Test Suites: 1 passed, 1 total +Tests: 22 passed, 22 total +Snapshots: 0 total +Time: 3.546 s, estimated 6 s +Ran all test suites within paths "packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts". diff --git a/plan/agw/research/svm-internals-2026-10-06/logs/tsc-build.log b/plan/agw/research/svm-internals-2026-10-06/logs/tsc-build.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/svm-internals-2026-10-06/network-status.json b/plan/agw/research/svm-internals-2026-10-06/network-status.json new file mode 100644 index 00000000..e2d3ade4 --- /dev/null +++ b/plan/agw/research/svm-internals-2026-10-06/network-status.json @@ -0,0 +1,13 @@ +{ + "checked_at": "2026-10-05T20:56:15.612784+00:00", + "rpc": "https://evm.donut.rpc.push.org/", + "read_only_method": "eth_chainId", + "status": "blocked", + "reason": "DNS resolution failed in restricted-network sandbox", + "env_file_present": "packages/core/.env", + "private_keys_loaded": false, + "funding_authorized": true, + "funding_submitted": false, + "anvil_status": "localhost RPC unavailable", + "alternative_contract_checks": "10 passing in-process Foundry checks" +} diff --git a/plan/agw/research/svm-internals-2026-10-06/run-forge.sh b/plan/agw/research/svm-internals-2026-10-06/run-forge.sh new file mode 100644 index 00000000..5f279bbe --- /dev/null +++ b/plan/agw/research/svm-internals-2026-10-06/run-forge.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# Offline in-process EVM checks. No network, private keys, signing or broadcast. +set -euo pipefail +HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SDK_ROOT="$(cd "$HERE/../../../.." && pwd)" +SDK_SVM_BUILD_DIR="${AGW_LOCAL_DIR:-${TMPDIR:-/tmp}/push-agw-local-v4}" +test "$(cat "$SDK_SVM_BUILD_DIR/.agw-pin")" = "e8db74815cfbbf5389593805e464fe8d85f7f735" +cd "$SDK_ROOT" +TS_NODE_PROJECT=packages/core/tsconfig.lib.json node -r ts-node/register/transpile-only "$HERE/generate-vectors.ts" +cp "$HERE/SdkSvmWire.t.sol" "$SDK_SVM_BUILD_DIR/sdk-harness/SdkSvmWire.t.sol" +cp "$HERE/sdk-vectors.json" "$SDK_SVM_BUILD_DIR/sdk-harness/sdk-vectors.json" +python3 - "$SDK_SVM_BUILD_DIR/foundry.toml" <<'PY' +from pathlib import Path +import sys +p = Path(sys.argv[1]); text = p.read_text() +entry = '{ access = "read", path = "sdk-harness/" }' +if entry not in text: + p.write_text(text.replace('fs_permissions = [', 'fs_permissions = [\n ' + entry + ',')) +PY +FOUNDRY_TEST=sdk-harness forge test --root "$SDK_SVM_BUILD_DIR" --offline --match-contract SdkSvmWireTest -vv diff --git a/plan/agw/research/svm-internals-2026-10-06/sdk-vectors.json b/plan/agw/research/svm-internals-2026-10-06/sdk-vectors.json new file mode 100644 index 00000000..626eb649 --- /dev/null +++ b/plan/agw/research/svm-internals-2026-10-06/sdk-vectors.json @@ -0,0 +1,13 @@ +{ + "source": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "note": "Deterministic owner-committed Solana keys; no live PDA/cluster or transport claim.", + "initData": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000027736f6c616e613a457457545241425a61597136694d6665594b6f7552753136365655327871613100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000077359400111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222220000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000007070ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000002111111111111111111111111111111111111111111111111111111111111111144444444444444444444444444444444444444444444444444444444444444440000000000000000000000000000000000000000000000000000000000000001333333333333333333333333333333333333333333333333333333333333333301000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014444444444444444444444444444444444444444444444444444444444444444000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000000a", + "datalessInitData": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000027736f6c616e613a457457545241425a61597136694d6665594b6f755275313636565532787161310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000077359400111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222220000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000007070ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000021111111111111111111111111111111111111111111111111111111111111111444444444444444444444444444444444444444444444444444444444444444400000000000000000000000000000000000000000000000000000000000000013333333333333333333333333333333333333333333333333333333333333333010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000144444444444444444444444444444444444444444444444444444444444444440000000000000000000000000000000000000000000000000000000000000000", + "valid": "0x0000000211111111111111111111111111111111111111111111111111111111111111110144444444444444444444444444444444444444444444444444444444444444440100000005015a006400023333333333333333333333333333333333333333333333333333333333333333", + "badRatio": "0x00000002111111111111111111111111111111111111111111111111111111111111111101444444444444444444444444444444444444444444444444444444444444444401000000050159006400023333333333333333333333333333333333333333333333333333333333333333", + "badPin": "0x0000000277777777777777777777777777777777777777777777777777777777777777770144444444444444444444444444444444444444444444444444444444444444440100000005015a006400023333333333333333333333333333333333333333333333333333333333333333", + "alias": "0x0000000311111111111111111111111111111111111111111111111111111111111111110144444444444444444444444444444444444444444444444444444444444444440111111111111111111111111111111111111111111111111111111111111111110100000005015a006400023333333333333333333333333333333333333333333333333333333333333333", + "trailing": "0x0000000211111111111111111111111111111111111111111111111111111111111111110144444444444444444444444444444444444444444444444444444444444444440100000005015a00640002333333333333333333333333333333333333333333333333333333333333333300", + "wrongId": "0x0000000211111111111111111111111111111111111111111111111111111111111111110144444444444444444444444444444444444444444444444444444444444444440100000005015a006400013333333333333333333333333333333333333333333333333333333333333333", + "datalessPayload": "0x0000000211111111111111111111111111111111111111111111111111111111111111110144444444444444444444444444444444444444444444444444444444444444440100000000023333333333333333333333333333333333333333333333333333333333333333" +} diff --git a/plan/agw/research/token-route-validation-2026-10-20/README.md b/plan/agw/research/token-route-validation-2026-10-20/README.md new file mode 100644 index 00000000..350874d1 --- /dev/null +++ b/plan/agw/research/token-route-validation-2026-10-20/README.md @@ -0,0 +1,40 @@ +# Token route validation — 20 October 2026 + +Read-only RPC queries; no signing, funding or transactions. SDK source: 1ac02f56. Donut chain 42101, block 24453693. Fresh fetches completed for core and gateway repositories. Core main: b2f22241681c6587a1c130e638949856dfcbd33f. Gateway gateway-testnet: b205770f2c65df090eb282fd2f3b4234d30faa1f. Gateway addresses were taken from that branch's script/config/testnet/GatewayConfig.sol. + +## Conclusion + +The creation failures are confirmed SDK mapping gaps. However, the claim that all affected tokens require gateway enablement was too broad. Several exact preset tokens are already allow-listed by the external gateway. A matching Push PRC20 still needs to be identified; the existing published/SDK USDC PRC20s point to different mock token addresses. + +The official address book (https://push.org/docs/chain/setup/smart-contract-address-book/) agrees with the known PRC20 list. Live SOURCE_CHAIN_NAMESPACE and SOURCE_TOKEN_ADDRESS reads confirm exact identities. This is not an exhaustive search of every deployed contract: an unpublished PRC20 may exist. Do not claim proven nonexistence. Ask the core/node/gateway team for the canonical mapping first. + +Sepolia DEX WETH fff997 already has a matching PRC20 0x0d0dF7E8807430A81104EA84d926139816eC7586 and gateway support. EigenLayer WETH 7b799 is a different token. + +## Gateway observations + +isSupportedToken is a token allow-list/rate-limit threshold predicate. A true result alone does not establish end-to-end minting, burning or settlement support. A false result identifies missing support at that gateway, not a proof that destination-held token calls cannot execute. + +| Chain | Token | Gateway allow-listed | Block | +|---|---|---|---| +| eip155:11155111 | `0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14` | True | 11955784 | +| eip155:11155111 | `0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238` | True | 11955784 | +| eip155:11155111 | `0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5` | False | 11955784 | +| eip155:11155111 | `0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9` | False | 11955784 | +| eip155:84532 | `0x4200000000000000000000000000000000000006` | True | 48368455 | +| eip155:84532 | `0x036CbD53842c5426634e7929541eC2318f3dCF7e` | True | 48368455 | +| eip155:84532 | `0x810D46F9a9027E28F9B01F75E2bdde839dA61115` | False | 48368455 | +| eip155:84532 | `0x4616975f7E6045FD9737e95bC527e9e14c727BD2` | False | 48368455 | +| eip155:84532 | `0x663A6F02d547dFd639BF689FED298712f2FB69Fb` | False | 48368455 | +| eip155:421614 | `0x980B62Da83eFf3D4576C647993b0c1D7faf17c73` | True | 321080510 | +| eip155:421614 | `0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d` | True | 321080510 | +| eip155:97 | `0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd` | False | 137899664 | +| eip155:97 | `0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c` | False | 137899664 | +| eip155:97 | `0x16227D60f7a0e586C66B005219dfc887D13C9531` | False | 137899664 | + +## Actions + +- Core/node team: provide exact source-token → PRC20 mappings for the already allow-listed Circle USDC and wrapped-native tokens. If matching PRC20s exist, the SDK registry addition is ours; otherwise the route needs provisioning. +- Gateway/core team: review support for Aave LINK, EigenLayer WETH, Moonwell mocks and Venus/BNB preset assets before claiming they can move through Push. +- SDK: add only verified mappings, then test grant preparation and bounded end-to-end delivery. Never map a protocol token to a different same-symbol mock asset. + +Raw results, including all known PRC20 source metadata and preset readiness, are in probe.json. Scripts run from the SDK root with a current build. No production code changed during this validation. diff --git a/plan/agw/research/token-route-validation-2026-10-20/probe-gateways.cjs b/plan/agw/research/token-route-validation-2026-10-20/probe-gateways.cjs new file mode 100644 index 00000000..027c9b46 --- /dev/null +++ b/plan/agw/research/token-route-validation-2026-10-20/probe-gateways.cjs @@ -0,0 +1 @@ +const root=process.cwd(),fs=require('fs');const {createPublicClient,http,parseAbi}=require(root+'/node_modules/viem');const p=root+'/plan/agw/research/token-route-validation-2026-10-20/probe.json',r=JSON.parse(fs.readFileSync(p));const cfg={'eip155:11155111':['https://ethereum-sepolia-rpc.publicnode.com','0x05bD7a3D18324c1F7e216f7fBF2b15985aE5281A'],'eip155:84532':['https://base-sepolia-rpc.publicnode.com','0xFD4fef1F43aFEc8b5bcdEEc47f35a1431479aC16'],'eip155:421614':['https://arbitrum-sepolia-rpc.publicnode.com','0x2cd870e0166Ba458dEC615168Fd659AacD795f34'],'eip155:97':['https://bsc-testnet-rpc.publicnode.com','0x44aFFC61983F4348DdddB886349eb992C061EaC0']};(async()=>{r.gatewayChecks=await Promise.all(Object.entries(cfg).map(async([chain,[url,address]])=>{const rpc=createPublicClient({transport:http(url,{timeout:10000,retryCount:0})});try{const blockNumber=await rpc.getBlockNumber();const tokens=[...new Set(r.presets.filter(x=>x.chain===chain).flatMap(x=>x.assets.map(a=>a.token)))];const results=await Promise.all(tokens.map(async token=>{try{return {token,supported:await rpc.readContract({address,abi:parseAbi(['function isSupportedToken(address) view returns (bool)']),functionName:'isSupportedToken',args:[token],blockNumber})}}catch(e){return {token,error:e.shortMessage||e.message}}}));return{chain,gateway:address,block:String(blockNumber),results}}catch(e){return{chain,error:e.shortMessage||e.message}}}));fs.writeFileSync(p,JSON.stringify(r,null,2));console.log(JSON.stringify(r.gatewayChecks,null,2));})(); diff --git a/plan/agw/research/token-route-validation-2026-10-20/probe-prc20.cjs b/plan/agw/research/token-route-validation-2026-10-20/probe-prc20.cjs new file mode 100644 index 00000000..4cad1390 --- /dev/null +++ b/plan/agw/research/token-route-validation-2026-10-20/probe-prc20.cjs @@ -0,0 +1,3 @@ +const root=process.cwd();const {createPublicClient,http,parseAbi,decodeAbiParameters}=require(root+'/node_modules/viem');const {PushChain}=require(root+'/dist/packages/core/src');const {SYNTHETIC_PUSH_ERC20}=require(root+'/dist/packages/core/src/lib/constants/chain'); +(async()=>{const rpc=createPublicClient({transport:http('https://evm.donut.rpc.push.org/',{timeout:12000,retryCount:0})});const block=await rpc.getBlockNumber();const net=PushChain.CONSTANTS.PUSH_NETWORK.TESTNET_DONUT;const report={at:new Date().toISOString(),block:String(block),chainId:await rpc.getChainId(),registry:[],presets:[]};const abi=parseAbi(['function SOURCE_CHAIN_NAMESPACE() view returns (string)','function SOURCE_TOKEN_ADDRESS() view returns (string)','function decimals() view returns (uint8)']);for(const [name,address] of Object.entries(SYNTHETIC_PUSH_ERC20[net]).filter(([k])=>!k.endsWith('_BNB'))){try{const chain=await rpc.readContract({address,abi,functionName:'SOURCE_CHAIN_NAMESPACE',blockNumber:block});let token;try{token=await rpc.readContract({address,abi,functionName:'SOURCE_TOKEN_ADDRESS',blockNumber:block});}catch{token=await rpc.readContract({address,abi:parseAbi(['function SOURCE_TOKEN_ADDRESS() view returns (address)']),functionName:'SOURCE_TOKEN_ADDRESS',blockNumber:block});}report.registry.push({name,address,chain,token});}catch(e){report.registry.push({name,address,error:e.shortMessage||e.message});}} +for(const cat of ['DEXES','LENDING','STAKING'])for(const chain of PushChain.utils.agentic.presets.list().presets.find(x=>x.constant===cat).chains.filter(x=>['eip155:11155111','eip155:84532','eip155:421614','eip155:97'].includes(x))){const r=PushChain.utils.agentic.presets.get(cat,{chainNamespace:chain,agent:'0x0000000000000000000000000000000000005678'});report.presets.push({category:cat,chain,assets:r.readiness.chains[0].bridgeAssets,issues:r.readiness.chains[0].issues});}require('fs').writeFileSync(root+'/plan/agw/research/token-route-validation-2026-10-20/probe.json',JSON.stringify(report,null,2));console.log(JSON.stringify(report,null,2));})().catch(e=>{console.error(e.shortMessage||e.message);process.exitCode=1}); diff --git a/plan/agw/research/token-route-validation-2026-10-20/probe.json b/plan/agw/research/token-route-validation-2026-10-20/probe.json new file mode 100644 index 00000000..97f27d61 --- /dev/null +++ b/plan/agw/research/token-route-validation-2026-10-20/probe.json @@ -0,0 +1,415 @@ +{ + "at": "2026-10-20T14:05:23.358Z", + "block": "24453693", + "chainId": 42101, + "registry": [ + { + "name": "pETH", + "address": "0x2971824Db68229D087931155C2b8bB820B275809", + "chain": "eip155:11155111", + "token": "0x0000000000000000000000000000000000000000" + }, + { + "name": "pETH_ARB", + "address": "0xc0a821a1AfEd1322c5e15f1F4586C0B8cE65400e", + "chain": "eip155:421614", + "token": "0x0000000000000000000000000000000000000000" + }, + { + "name": "pETH_BASE", + "address": "0xc7007af2B24D4eb963fc9633B0c66e1d2D90Fc21", + "chain": "eip155:84532", + "token": "0x0000000000000000000000000000000000000000" + }, + { + "name": "pBNB", + "address": "0x7a9082dA308f3fa005beA7dB0d203b3b86664E36", + "chain": "eip155:97", + "token": "0x0000000000000000000000000000000000000000" + }, + { + "name": "pSOL", + "address": "0x5D525Df2bD99a6e7ec58b76aF2fd95F39874EBed", + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "token": "0x0000000000000000000000000000000000000000" + }, + { + "name": "USDT_ETH", + "address": "0x0f97A213207703923F5f0C613C9827f7C9A0f96B", + "chain": "eip155:11155111", + "token": "0xC4230aEaFcF6b8B49a7b4e53886420f00ff71876" + }, + { + "name": "USDC_ETH", + "address": "0x7A58048036206bB898008b5bBDA85697DB1e5d66", + "chain": "eip155:11155111", + "token": "0x97F477B7f970D47a87B42869ceeace218106152a" + }, + { + "name": "USDT_ARB", + "address": "0xFE6E9DF2BbC9ce05D98b83B1365df6DcA9951891", + "chain": "eip155:421614", + "token": "0xE30928528f52CAEeB75fB07837e22d77D47e9c07" + }, + { + "name": "USDC_ARB", + "address": "0x1091cCBA2FF8d2A131AE4B35e34cf3308C48572C", + "chain": "eip155:421614", + "token": "0x5dd39b0b3610F666F631a6506b7713EF83e1Ac5C" + }, + { + "name": "USDT_SOL", + "address": "0x4f1A3D22d170a2F4Bddb37845a962322e24f4e34", + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "token": "0x0000000000000000000000000000000000000000" + }, + { + "name": "USDC_SOL", + "address": "0x04B8F634ABC7C879763F623e0f0550a4b5c4426F", + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "token": "0x0000000000000000000000000000000000000000" + }, + { + "name": "USDT_BSC", + "address": "0x731aF1Da5365259d27528557EE4aFBA4baC90ef2", + "chain": "eip155:97", + "token": "0xE935d9c9C24D02E61186c640cc01d713C876d40F" + }, + { + "name": "USDC_BSC", + "address": "0x120EBf25Dad7D6a09Ad2316f23f9Be95DBb90639", + "chain": "eip155:97", + "token": "0xA8802F96cAd0d45343d9bc660B6f7d80050A660b" + }, + { + "name": "USDT_BASE", + "address": "0x148823809B853e1db187BC09A9ac909BC42F971a", + "chain": "eip155:84532", + "token": "0x4D7646B9eE3D68F4b0F135B5cbc66B00819F6b61" + }, + { + "name": "USDC_BASE", + "address": "0xD7C6cA1e2c0CE260BE0c0AD39C1540de460e3Be1", + "chain": "eip155:84532", + "token": "0x5c3504F0E3bA28FDc1F74234fE936518276AaBB8" + }, + { + "name": "WETH_ETH", + "address": "0x0d0dF7E8807430A81104EA84d926139816eC7586", + "chain": "eip155:11155111", + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14" + }, + { + "name": "stETH_ETH", + "address": "0xaf89E805949c628ebde3262e91dc4ab9eA12668E", + "chain": "eip155:11155111", + "token": "0x3e3FE7dBc6B4C189E7128855dD526361c49b40Af" + }, + { + "name": "DAI_SOL", + "address": "0x5861f56A556c990358cc9cccd8B5baa3767982A8", + "chain": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", + "token": "0x0000000000000000000000000000000000000000" + } + ], + "presets": [ + { + "category": "DEXES", + "chain": "eip155:11155111", + "assets": [ + { + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "prc20": "0x0d0dF7E8807430A81104EA84d926139816eC7586", + "status": "registered" + }, + { + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "message": "No SDK PRC20 mapping for eip155:11155111:0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238 on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + } + ] + }, + { + "category": "DEXES", + "chain": "eip155:84532", + "assets": [ + { + "token": "0x4200000000000000000000000000000000000006", + "status": "unavailable" + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x4200000000000000000000000000000000000006", + "message": "No SDK PRC20 mapping for eip155:84532:0x4200000000000000000000000000000000000006 on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "message": "No SDK PRC20 mapping for eip155:84532:0x036CbD53842c5426634e7929541eC2318f3dCF7e on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + } + ] + }, + { + "category": "DEXES", + "chain": "eip155:421614", + "assets": [ + { + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "status": "unavailable" + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "message": "No SDK PRC20 mapping for eip155:421614:0x980B62Da83eFf3D4576C647993b0c1D7faf17c73 on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "message": "No SDK PRC20 mapping for eip155:421614:0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + } + ] + }, + { + "category": "DEXES", + "chain": "eip155:97", + "assets": [ + { + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "status": "unavailable" + }, + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "message": "No SDK PRC20 mapping for eip155:97:0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "message": "No SDK PRC20 mapping for eip155:97:0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + } + ] + }, + { + "category": "LENDING", + "chain": "eip155:11155111", + "assets": [ + { + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "message": "No SDK PRC20 mapping for eip155:11155111:0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5 on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + } + ] + }, + { + "category": "LENDING", + "chain": "eip155:421614", + "assets": [ + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "message": "No SDK PRC20 mapping for eip155:421614:0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + } + ] + }, + { + "category": "LENDING", + "chain": "eip155:84532", + "assets": [ + { + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "status": "unavailable" + }, + { + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "status": "unavailable" + }, + { + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "message": "No SDK PRC20 mapping for eip155:84532:0x810D46F9a9027E28F9B01F75E2bdde839dA61115 on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "message": "No SDK PRC20 mapping for eip155:84532:0x4616975f7E6045FD9737e95bC527e9e14c727BD2 on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "message": "No SDK PRC20 mapping for eip155:84532:0x663A6F02d547dFd639BF689FED298712f2FB69Fb on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + } + ] + }, + { + "category": "LENDING", + "chain": "eip155:97", + "assets": [ + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "status": "unavailable" + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "message": "No SDK PRC20 mapping for eip155:97:0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + }, + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "message": "No SDK PRC20 mapping for eip155:97:0x16227D60f7a0e586C66B005219dfc887D13C9531 on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + } + ] + }, + { + "category": "STAKING", + "chain": "eip155:11155111", + "assets": [ + { + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "status": "unavailable" + } + ], + "issues": [ + { + "code": "BRIDGE_ASSET_UNAVAILABLE", + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "message": "No SDK PRC20 mapping for eip155:11155111:0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9 on TESTNET_DONUT. Choose a supported asset. This exact token needs a verified Push PRC20 route before it can be used." + } + ] + } + ], + "gatewayChecks": [ + { + "chain": "eip155:11155111", + "gateway": "0x05bD7a3D18324c1F7e216f7fBF2b15985aE5281A", + "block": "11955784", + "results": [ + { + "token": "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14", + "supported": true + }, + { + "token": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", + "supported": true + }, + { + "token": "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5", + "supported": false + }, + { + "token": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9", + "supported": false + } + ] + }, + { + "chain": "eip155:84532", + "gateway": "0xFD4fef1F43aFEc8b5bcdEEc47f35a1431479aC16", + "block": "48368455", + "results": [ + { + "token": "0x4200000000000000000000000000000000000006", + "supported": true + }, + { + "token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", + "supported": true + }, + { + "token": "0x810D46F9a9027E28F9B01F75E2bdde839dA61115", + "supported": false + }, + { + "token": "0x4616975f7E6045FD9737e95bC527e9e14c727BD2", + "supported": false + }, + { + "token": "0x663A6F02d547dFd639BF689FED298712f2FB69Fb", + "supported": false + } + ] + }, + { + "chain": "eip155:421614", + "gateway": "0x2cd870e0166Ba458dEC615168Fd659AacD795f34", + "block": "321080510", + "results": [ + { + "token": "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", + "supported": true + }, + { + "token": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", + "supported": true + } + ] + }, + { + "chain": "eip155:97", + "gateway": "0x44aFFC61983F4348DdddB886349eb992C061EaC0", + "block": "137899664", + "results": [ + { + "token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "supported": false + }, + { + "token": "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c", + "supported": false + }, + { + "token": "0x16227D60f7a0e586C66B005219dfc887D13C9531", + "supported": false + } + ] + } + ] +} \ No newline at end of file diff --git a/plan/agw/research/v4-implementation-2026-10-06/README.md b/plan/agw/research/v4-implementation-2026-10-06/README.md new file mode 100644 index 00000000..d2eaed90 --- /dev/null +++ b/plan/agw/research/v4-implementation-2026-10-06/README.md @@ -0,0 +1,63 @@ +# V4 SDK migration — October 6, 2026 + +> Superseded validation status: [live acceptance report](../live-acceptance-2026-10-06/README.md). Full permissions are restored: public Donut derive, all 53 Anvil cases, unfiltered units, Nx build and four typechecks pass. Bounded testnet funding/broadcasts have started. Earlier restrictions and unrun-live statements below describe the original execution only. + +Branch: `feat/agw-sdk-v4`, based on `b1597b9`. Working changes are uncommitted and not pushed. The pending October 5 comment review and October 6 deployment review were preserved. This implements native and EVM v4 integration; it is not a claim of completed SVM support or funded live acceptance. + +## Implemented + +- **V4 only:** removed the e704d5b adapter, ABI modules, single-asset historical codec and old contract vector file from runtime/test code. Replaced them with e8db748/v4 artifacts and regenerated contract-produced vectors. Earlier review documents remain historical evidence, not runtime dependencies. +- **Donut configuration:** checked factory, URP, implementation, engine/validator and start block are in the registry; CONSTANTS.AGENTIC is populated. Unsupported networks still fail before signing. Custom registrations/manifests must match the v4 source pin. +- **Envelopes:** version 1 for native/EVM; other versions and old two-field data are rejected. Actual v4 contracts reject the old envelope in the new local suite. +- **EVM multi-asset grants:** resolve wallet CEA and ordered token caps, check PRC20 source chain and token identity, reject duplicate resolved assets and preserve token units. Omitted total is maxUint256; explicit zero stays zero. Empty user lists become a single destination gas-token cap at 0/0. +- **Reads and pure helpers:** decode v4 Config/asset arrays, reconstruct origin token addresses and exact beneficiary offsets, retain enabled-only reads without public spent. Native gas PRC20s can report an empty source address; only the on-chain gas-token identity maps that to the native marker. Pure decodeRules resolves known static-registry tokens; unknown mappings fail with a hint to use asynchronous rules.get. Shared PRC20 mapping was extracted without changing its existing behavior. +- **Replacement:** snapshot every old token in stored order and encode assertSpent(expectedSpent[]) before revoke/grant in one owner batch. Native replacement also asserts every action if the old rule has several. Existing race/partial-create/allowance/identity fixes are retained. +- **Execution:** choose the request token from the selected rule's assets, use maxGasPerCall, and consume separately established owner allowance. Updated policy ABI/events/errors and response/replay imports; each outbound still moves one request token. +- **Multiplicity:** management permits multiple same-agent/same-chain grants. An ambiguous send returns AMBIGUOUS_RULE with candidate IDs; no arbitrary first match, automatic permission deletion or speculative selection API. +- **Acceptance preparation:** live EVM setup now grants via public SDK methods. Added opt-in two-token create/read/replacement and call-only outbound scenarios. Built-in Donut manifest supplies defaults; read-only code/wiring/version checks still precede funding. SVM todos only describe the remaining public mapping/cluster acceptance, not absent wire types. + +## Validation + +| Check | Result | +| --- | --- | +| Full core unit suite | 1,919 passed, 0 failed; 12 skipped; 112 suites passed, 1 skipped | +| Actual v4 contracts through SDK on Anvil | 46 passed, 0 failed; 6 suites | +| Explorer ABIs vs isolated e8db748 build | All 5 sets match exactly, including constructors/errors/events/parameter names/internalTypes; ABI array order ignored | +| Typechecks | lib, spec, local harness and AGW E2E files pass | +| SDK build | core:build passes | +| Lint | Same 7 pre-existing errors in unchanged read-example/PC20 files; no new errors | +| Opt-in AGW E2E selection | 25 scenarios, 9 files, 25 distinct tests; consistent | +| Default all E2E selection | Unchanged: 76 scenarios, 40 files, 81 distinct tests | +| Public SDK Donut read-only derive | Unconfirmed in this session: the corrected script could not read a block from the RPC under the current restricted network environment | + +[ABI build comparison](abi-build-comparison.json). Command outputs are under [logs/](logs/). Local tests use actual AGW/factory/engine/validator/URP and real type-4 transactions, with token/core/gateway/executor and destination lookup fixtures. They do not prove Cosmos/TSS, production executor, UEA or destination execution. The local Jest run prints an open-handle warning but exits; Anvil children are stopped. No full contract-security suite/audit is claimed. + +The ten new actual-contract cases cover ordered two-asset grant/read; wrong chain; same-chain wrong token identity; independent counters; hard zero and maxUint256; call-only routing; atomic replacement/five checkpoints; second-token intervening spend rollback; permitted duplicate grants/ambiguous sends; and old-envelope rejection. Reverts are checked by their named errors. + +The original read-only invocation mistakenly imported PUSH_NETWORK from the package root; that enum is accessed through PushChain.CONSTANTS. The corrected saved script reaches its RPC read but cannot complete here. This is separate from the successful earlier block-23931055 deployment probe and is not reported as public-SDK live success. + +## Still pending + +- Harsh H3: exact native omission defaults/public maxValueTotal and token-independence wording. Native defaults remain provisional and unchanged; delivered universal total semantics are implemented. +- Harsh H4.5: public raw-offset authoring versus separate decoded wire records. Native pins/amount and EVM beneficiary offsets are lossless raw data; the latter now has beneficiaryOffset. The SDK never invents ABI argument indexes. +- Harsh H6: send selection when multiple rules match, including native arrays and overlapping permissions. Source/management capacity is implemented; selection remains explicit ambiguity. +- Ref and editable-label v1 scope: absent from deployed contracts; capability gates remain. +- SVM: contract types are delivered, but public SDK mapping/composition/account coverage and cluster acceptance remain gated. Solana-origin agents through UEA are separate from Solana destinations. +- Authorized funded Donut E2Es: none were run. creditRevert still depends on executor integration. Release validation must prove real pull/burn, node/TSS handling, recipient/executor correlation and destination tracking. + +## Reproduction + +From the SDK root: + +```sh +node packages/core/scripts/agw-local/gen-abi.mjs +OUT="${TMPDIR:-/tmp}/push-agw-local-v4" packages/core/scripts/agw-local/prepare.sh +AGW_LOCAL_DIR="${TMPDIR:-/tmp}/push-agw-local-v4" node node_modules/jest/bin/jest.js --config packages/core/jest.agw-local.config.ts --runInBand +node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand +node node_modules/typescript/bin/tsc --project packages/core/tsconfig.lib.json --noEmit +node node_modules/typescript/bin/tsc --project packages/core/tsconfig.spec.json --noEmit +node node_modules/typescript/bin/tsc --project packages/core/tsconfig.agw-local.json --noEmit +NX_DAEMON=false node node_modules/nx/bin/nx.js run core:build --skip-nx-cache +``` + +The AGW E2E typecheck uses [tsconfig.agw-e2e.json](tsconfig.agw-e2e.json), extending the core config with AGW E2E includes, Jest/Node types and the existing @e2e/shared alias; no specs are executed. From packages/core, run e2e:verify with --group agw or --group all to check selection without broadcasting. [donut-readonly.ts](donut-readonly.ts) uses a public read-only account and only calls initialize/derive; it contains no transaction submission. diff --git a/plan/agw/research/v4-implementation-2026-10-06/abi-build-comparison.json b/plan/agw/research/v4-implementation-2026-10-06/abi-build-comparison.json new file mode 100644 index 00000000..de4f7e36 --- /dev/null +++ b/plan/agw/research/v4-implementation-2026-10-06/abi-build-comparison.json @@ -0,0 +1,36 @@ +{ + "source": "e8db74815cfbbf5389593805e464fe8d85f7f735", + "comparison": "All ABI entries including constructors/errors/events/inputs/outputs/internalTypes; top-level ABI array ordering ignored.", + "contracts": [ + { + "contract": "wallet", + "explorer_entries": 76, + "built_entries": 76, + "canonical_entry_sets_match": true + }, + { + "contract": "factory", + "explorer_entries": 78, + "built_entries": 78, + "canonical_entry_sets_match": true + }, + { + "contract": "policy", + "explorer_entries": 118, + "built_entries": 118, + "canonical_entry_sets_match": true + }, + { + "contract": "validator", + "explorer_entries": 9, + "built_entries": 9, + "canonical_entry_sets_match": true + }, + { + "contract": "engine", + "explorer_entries": 78, + "built_entries": 78, + "canonical_entry_sets_match": true + } + ] +} diff --git a/plan/agw/research/v4-implementation-2026-10-06/donut-readonly.ts b/plan/agw/research/v4-implementation-2026-10-06/donut-readonly.ts new file mode 100644 index 00000000..d5acec19 --- /dev/null +++ b/plan/agw/research/v4-implementation-2026-10-06/donut-readonly.ts @@ -0,0 +1,23 @@ +/** Read-only public SDK check. No signer key, create(), funding or grant calls. */ +import { PushChain } from '../../../../packages/core/src'; +import { writeFileSync } from 'node:fs'; +import { join } from 'node:path'; + +async function main() { + const { CHAIN, PUSH_NETWORK } = PushChain.CONSTANTS; + const client = await PushChain.initialize({ + address: '0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7', + chain: CHAIN.PUSH_TESTNET_DONUT, + }, { + network: PUSH_NETWORK.TESTNET_DONUT, + rpcUrls: { [CHAIN.PUSH_TESTNET_DONUT]: ['https://evm.donut.rpc.push.org/'] }, + }); + const result = { + checkedAt: new Date().toISOString(), mode: 'read-only', + factory: PushChain.CONSTANTS.AGENTIC[PUSH_NETWORK.TESTNET_DONUT]!.FACTORY, + derived: await client.agentic.derive(), + }; + writeFileSync(join(__dirname, 'donut-sdk-readonly.json'), JSON.stringify(result, null, 2) + '\n'); + process.stdout.write(JSON.stringify(result, null, 2) + '\n'); +} +main().catch(error => { process.stderr.write(error.message + '\n'); process.exitCode = 1; }); diff --git a/plan/agw/research/v4-implementation-2026-10-06/donut-sdk-readonly.json b/plan/agw/research/v4-implementation-2026-10-06/donut-sdk-readonly.json new file mode 100644 index 00000000..2753bd61 --- /dev/null +++ b/plan/agw/research/v4-implementation-2026-10-06/donut-sdk-readonly.json @@ -0,0 +1,10 @@ +{ + "checkedAt": "2026-10-05T20:59:38.387Z", + "mode": "read-only", + "factory": "0xaF88D0FD947afAe7bBb8F34e8417DCfc165e1aaF", + "derived": { + "address": "0x6842327d839C4f429c20c0103Dd6E366f3A5758f", + "index": 0, + "deployed": false + } +} diff --git a/plan/agw/research/v4-implementation-2026-10-06/logs/agw-e2e-typecheck.log b/plan/agw/research/v4-implementation-2026-10-06/logs/agw-e2e-typecheck.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/v4-implementation-2026-10-06/logs/build.log b/plan/agw/research/v4-implementation-2026-10-06/logs/build.log new file mode 100644 index 00000000..9af49eec --- /dev/null +++ b/plan/agw/research/v4-implementation-2026-10-06/logs/build.log @@ -0,0 +1,11 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:24227) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core diff --git a/plan/agw/research/v4-implementation-2026-10-06/logs/donut-readonly-attempt.log b/plan/agw/research/v4-implementation-2026-10-06/logs/donut-readonly-attempt.log new file mode 100644 index 00000000..5dc5cb61 --- /dev/null +++ b/plan/agw/research/v4-implementation-2026-10-06/logs/donut-readonly-attempt.log @@ -0,0 +1 @@ +could not read the current Push block number diff --git a/plan/agw/research/v4-implementation-2026-10-06/logs/e2e-agw-selection.log b/plan/agw/research/v4-implementation-2026-10-06/logs/e2e-agw-selection.log new file mode 100644 index 00000000..16369abf --- /dev/null +++ b/plan/agw/research/v4-implementation-2026-10-06/logs/e2e-agw-selection.log @@ -0,0 +1,28 @@ +✓ agw-create-bare 1 test +✓ agw-create-rules 1 test +✓ agw-funding-pc 1 test +✓ agw-funding-allowance 1 test +✓ agw-native-batch 1 test +✓ agw-native-batch-rollback 1 test +✓ agw-native-agent 1 test +✓ agw-native-owner 1 test +✓ agw-native-over-cap 1 test +✓ agw-native-stranger 1 test +✓ agw-native-revoked 1 test +✓ agw-native-expired 1 test +✓ agw-lifecycle-add 1 test +✓ agw-lifecycle-update 1 test +✓ agw-lifecycle-checkpoints 1 test +✓ agw-lifecycle-revoke-all 1 test +✓ agw-universal-outbound 1 test +✓ agw-v4-multi-asset 1 test +✓ agw-v4-call-only 1 test +✓ agw-universal-dest-revert 1 test +✓ agw-identity-evm 1 test +✓ agw-identity-first-use 1 test +✓ agw-identity-solana 1 test +✓ agw-responses-hooks 1 test +✓ agw-responses-replay 1 test + +25 scenarios, 9 spec files, 25 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/research/v4-implementation-2026-10-06/logs/e2e-default-selection.log b/plan/agw/research/v4-implementation-2026-10-06/logs/e2e-default-selection.log new file mode 100644 index 00000000..dfa5f250 --- /dev/null +++ b/plan/agw/research/v4-implementation-2026-10-06/logs/e2e-default-selection.log @@ -0,0 +1,79 @@ +✓ smoke-uea-derive-evm 1 test +✓ smoke-read-track-lookup 1 test +✓ smoke-cea-derive-evm 1 test +✓ smoke-roundtrip-evm 1 test +✓ smoke-roundtrip-svm 1 test +✓ smoke-cea-pda-svm 1 test +✓ smoke-gasfee-reads 2 tests +✓ smoke-gas-sizer 2 tests +✓ smoke-pc20-registry 2 tests +✓ smoke-pc20-resolve 1 test +✓ evm-r1-transfer 1 test +✓ evm-r1-funds-usdt 1 test +✓ evm-r1-funds-native 1 test +✓ evm-r1-value-funds-data 1 test +✓ evm-r1-bridge-multicall 1 test +✓ evm-r1-fresh-value-native 1 test +✓ evm-r2-funds-erc20 1 test +✓ evm-r2-payload 1 test +✓ evm-r2-multicall 1 test +✓ evm-r2-funds-payload 1 test +✓ evm-r2-native-funds 1 test +✓ evm-r2-native-funds-payload 1 test +✓ evm-r3-funds-erc20 1 test +✓ evm-r3-payload 1 test +✓ evm-r3-multicall 1 test +✓ evm-r3-funds-payload 1 test +✓ evm-r3-native-funds 1 test +✓ evm-r3-eoa-native-funds 1 test +✓ svm-r1-transfer 1 test +✓ svm-r1-funds-sol-self 1 test +✓ svm-r1-value-self 1 test +✓ svm-r1-data-contract 1 test +✓ svm-r1-fresh-key-repro 1 test +✓ svm-r2-funds-sol 1 test +✓ svm-r2-funds-spl 1 test +✓ svm-r2-payload-cpi 1 test +✓ svm-r2-sol-cpi 1 test +✓ svm-r3-drain-sol 1 test +✓ svm-r3-drain-spl 1 test +✓ pc20-export-deployed-wrapper 1 test +✓ pc20-export-predicts-wrapper 1 test +✓ pc20-inbound-burn-unlock 1 test +✓ pc20-r3-cea-burn 1 test +✓ pc20-svm-r1-direct-burn 1 test +✓ pc20-svm-r3-cea-ata-burn 1 test +✓ push-send-transaction 1 test +✓ push-value-own-uea 1 test +✓ push-multicall-no-funds 1 test +✓ push-track-r1-sepolia-parity 1 test +✓ push-track-r3-funds-roundtrip 1 test +✓ push-track-source-leg-hashes 2 tests +✓ xc-multi-child-r3 1 test +✓ xc-fresh-wallet-r3 1 test +✓ xc-peth-bridge-back 1 test +✓ xc-cascade-6hop 1 test +✓ read-evm-balance-eoa 1 test +✓ read-canonical-registry 1 test +✓ read-evm-balance-uea 1 test +✓ read-evm-contract-call 1 test +✓ read-evm-callback-reverts 1 test +✓ read-expiry 1 test +✓ read-svm-lamports 1 test +✓ read-web2-json 1 test +✓ read-docs-example 1 test +✓ read-docs-evm-balance 1 test +✓ read-docs-batch 1 test +✓ read-docs-resume 2 tests +✓ read-app-batch-eoa 1 test +✓ read-app-batch-uea 1 test +✓ read-app-batch-recovery 1 test +✓ read-api-token 1 test +✓ read-api-mixed-outcomes 1 test +✓ read-svm-token-auto 1 test +✓ read-svm-idl 1 test +✓ read-evm-any-mutability 1 test +✓ read-svm-raw 1 test + +76 scenarios, 40 spec files, 81 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/research/v4-implementation-2026-10-06/logs/forge-build.log b/plan/agw/research/v4-implementation-2026-10-06/logs/forge-build.log new file mode 100644 index 00000000..626bb23a --- /dev/null +++ b/plan/agw/research/v4-implementation-2026-10-06/logs/forge-build.log @@ -0,0 +1 @@ +/var/folders/4_/d47r2_4s1wb3x2dvmt2ghp800000gp/T//push-agw-local-v4 diff --git a/plan/agw/research/v4-implementation-2026-10-06/logs/lib-typecheck.log b/plan/agw/research/v4-implementation-2026-10-06/logs/lib-typecheck.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/v4-implementation-2026-10-06/logs/lint.log b/plan/agw/research/v4-implementation-2026-10-06/logs/lint.log new file mode 100644 index 00000000..74c49a10 --- /dev/null +++ b/plan/agw/research/v4-implementation-2026-10-06/logs/lint.log @@ -0,0 +1,1194 @@ + +> nx run core:lint + +> eslint . + + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local-advanced.spec.ts + 73:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 85:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 295:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 311:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 337:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 426:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local-batch.spec.ts + 44:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 90:37 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 91:46 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 98:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 106:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local-races.spec.ts + 54:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 99:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 117:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 145:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local.spec.ts + 47:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 48:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/harness.ts + 210:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 229:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 238:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 373:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/v4-multiasset.spec.ts + 12:10 warning 'createWallet' is defined but never used @typescript-eslint/no-unused-vars + 78:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 92:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 176:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 188:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 325:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 335:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 353:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/vectors.spec.ts + 56:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 57:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 98:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 207:25 warning '_a' is assigned a value but never used @typescript-eslint/no-unused-vars + 208:25 warning '_b' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/identity-gas.spec.ts + 62:123 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/universal-evm.spec.ts + 25:10 warning 'v4' is defined but never used @typescript-eslint/no-unused-vars + 39:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/v4-multiasset.spec.ts + 17:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/cross-chain/cascade-amm.spec.ts + 1715:41 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 1897:41 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 2003:41 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 2096:41 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 2167:41 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 2256:41 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/cross-chain/cea-to-push-erc20.spec.ts + 92:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 95:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 102:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/cross-chain/forced-sizer.spec.ts + 36:17 warning 'PUSH_NETWORK' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/cross-chain/fresh-wallet.spec.ts + 92:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/cross-chain/multi-child-r3-sepolia.spec.ts + 83:7 warning 'VALUE_RECEIVER' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/cross-chain/peth-bridge.spec.ts + 114:77 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 132:76 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 149:42 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 165:35 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 174:50 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 218:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 241:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 261:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 271:28 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 295:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/cross-chain/uoa-multi-hop.spec.ts + 43:7 warning 'SOL_COUNTER_PDA' is assigned a value but never used @typescript-eslint/no-unused-vars + 44:7 warning 'SOL_TARGET' is assigned a value but never used @typescript-eslint/no-unused-vars + 45:7 warning 'SOL_ZERO_ADDRESS' is assigned a value but never used @typescript-eslint/no-unused-vars + 51:7 warning 'bscPublicClient' is assigned a value but never used @typescript-eslint/no-unused-vars + 52:7 warning 'pushPublicClient' is assigned a value but never used @typescript-eslint/no-unused-vars + 68:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/07-transaction-scenarios/route1.spec.ts + 357:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 357:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 360:46 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 364:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 389:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/07-transaction-scenarios/route2.spec.ts + 297:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 386:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 389:46 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 412:60 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/07-transaction-scenarios/route3.spec.ts + 375:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 375:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 378:46 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 384:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 404:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/08-multichain-transactions/multichain-transactions.spec.ts + 218:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 232:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 398:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 455:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 523:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 536:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/13-read-state/fixtures/universal_read_batch.js + 4:1 error Projects should use relative imports to import from other files within the same project. Use "./path/to/file" instead of import from "@pushchain/core" @nx/enforce-module-boundaries + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/13-read-state/fixtures/universal_read_evm_balance.js + 4:1 error Projects should use relative imports to import from other files within the same project. Use "./path/to/file" instead of import from "@pushchain/core" @nx/enforce-module-boundaries + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/13-read-state/fixtures/universal_read_resume.js + 4:1 error Projects should use relative imports to import from other files within the same project. Use "./path/to/file" instead of import from "@pushchain/core" @nx/enforce-module-boundaries + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/13-read-state/playgrounds.spec.ts + 20:63 error Unexpected empty async function @typescript-eslint/no-empty-function + 69:43 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 74:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 102:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 104:30 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 115:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 116:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-as(node:31858) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) +sertion + 132:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 146:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 149:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 174:43 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 180:36 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 184:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 184:69 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/13-read-state/read-state.spec.ts + 56:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 56:32 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/docs-examples/_helpers/docs-fund.ts + 95:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/evm/inbound/rescue-funds.spec.ts + 165:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 227:15 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/evm/outbound/cea-to-smart-contracts.spec.ts + 48:3 warning 'UGPC_PRECOMPILE' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/evm/outbound/cea-to-uea.spec.ts + 1411:15 warning 'tx' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/evm/outbound/uea-to-cea.spec.ts + 2277:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2330:43 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/evm/pc20/pc20-inbound.spec.ts + 15:10 warning 'PUSH_NETWORK' is defined but never used @typescript-eslint/no-unused-vars + 21:3 warning 'waitToleratingFeeCreditBug' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/evm/pc20/pc20-roundtrip.spec.ts + 17:3 warning 'waitToleratingFeeCreditBug' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/push/account-conversion/eth.spec.ts + 176:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 177:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 181:55 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 181:80 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 192:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 193:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 244:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 245:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 246:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 250:50 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 250:75 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 277:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 278:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 314:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 315:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 320:108 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 350:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 351:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 352:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 355:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 356:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 378:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 379:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 380:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 408:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 409:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 410:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 411:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 415:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 416:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 417:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 420:50 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 420:76 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 420:97 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 442:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 443:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 470:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 471:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 474:73 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 474:99 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/push/account-conversion/solana.spec.ts + 78:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 79:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 81:58 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 81:83 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 92:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 93:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 121:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 122:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 136:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 137:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 138:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 139:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 140:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 160:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 161:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 162:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 183:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 184:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/push/fee-lock-cap-raise.spec.ts + 60:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 170:38 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/push/native.spec.ts + 389:7 warning 'mainPushClient' is assigned a value but never used @typescript-eslint/no-unused-vars + 428:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 517:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/push/pool-depth-diagnostic.spec.ts + 27:24 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/push/progress-hooks.spec.ts + 383:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 594:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/push/utilities.spec.ts + 128:79 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/_shared.ts + 54:70 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/any-mutability.spec.ts + 34:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/api-coverage.spec.ts + 18:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 30:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 53:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 53:31 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/app-batch.spec.ts + 38:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 38:29 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 46:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 67:67 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 71:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 71:32 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 76:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 81:107 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/balance-eoa.spec.ts + 23:57 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 59:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 59:32 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/balance-uea.spec.ts + 25:116 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 52:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 52:32 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/callback-reverts.spec.ts + 22:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 36:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 36:32 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/contract-call.spec.ts + 28:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/evm/registry.spec.ts + 14:57 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 40:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 40:36 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/lifecycle/expiry.spec.ts + 25:57 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/lifecycle/track-lookup.spec.ts + 21:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/svm/account-idl.spec.ts + 20:53 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 25:59 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 27:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 45:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 62:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 62:31 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 63:102 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 70:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 70:52 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 79:44 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/svm/lamports.spec.ts + 19:53 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 22:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/svm/raw-account.spec.ts + 13:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/tools/live-read-uea.ts + 57:15 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 57:63 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 57:101 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 103:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 106:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 107:143 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/read/web2/json.spec.ts + 15:48 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/scripts/e2e-7702-multicall.ts + 93:44 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 132:28 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/shared/evm-client.ts + 14:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/shared/svm-client.ts + 10:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/svm/inbound/uea-to-push.spec.ts + 16:10 warning 'MOVEABLE_TOKENS' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/svm/outbound/cea-to-eoa.spec.ts + 15:61 warning 'encodeFunctionData' is defined but never used @typescript-eslint/no-unused-vars + 24:3 warning 'COUNTER_ADDRESS_PAYABLE' is defined but never used @typescript-eslint/no-unused-vars + 25:3 warning 'COUNTER_ABI_PAYABLE' is defined but never used @typescript-eslint/no-unused-vars + 27:10 warning 'COUNTER_ABI' is defined but never used @typescript-eslint/no-unused-vars + 37:7 warning 'pushPublicClient' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/svm/outbound/cea-to-uea.spec.ts + 39:3 warning 'buildReceiveSolAccounts' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/svm/outbound/eoa-to-cea.spec.ts + 23:3 warning 'SOL_ZERO_ADDRESS' is defined but never used @typescript-eslint/no-unused-vars + 25:3 warning 'COUNTER_PDA' is defined but never used @typescript-eslint/no-unused-vars + 28:3 warning 'buildReceiveSolAccounts' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/svm/outbound/eoa-to-smart-contracts.spec.ts + 86:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/svm/outbound/uea-to-cea.spec.ts + 43:3 warning 'buildReceiveSolAccounts' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/scripts/poll-outbound.ts + 24:3 warning 'UniversalTxStatus' is defined but never used @typescript-eslint/no-unused-vars + 25:3 warning 'OutboundStatus' is defined but never used @typescript-eslint/no-unused-vars + 236:19 warning 'intervalMs' is assigned a value but never used @typescript-eslint/no-unused-vars + 236:31 warning 'timeoutMs' is assigned a value but never used @typescript-eslint/no-unused-vars + 260:30 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 292:29 warning 'childUtxIds' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/scripts/probe-multihop-track.ts + 36:40 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 40:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 41:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 42:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 55:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/scripts/test-uea-migration.ts + 80:122 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 165:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 166:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 168:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 169:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 191:17 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/codec.spec.ts + 373:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/management.spec.ts + 12:10 warning 'AgenticCapability' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts + 2:17 warning 'PUSH_NETWORK' is defined but never used @typescript-eslint/no-unused-vars + 41:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/reads-context.spec.ts + 329:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/response-surface.spec.ts + 4:3 warning 'getAddress' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/reads/rules.ts + 11:3 warning 'CAPABILITY_DEPENDENCY' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/wallet.ts + 92:33 warning '_opts' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/cache/cache.ts + 4:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 38:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 56:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts + 13:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/internal/buffer.ts + 4:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/internal/global-buffer-polyfill.ts + 3:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts + 274:15 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 286:15 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts + 363:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 431:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 447:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 480:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 552:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 618:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 686:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 758:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 774:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 811:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 887:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts + 36:47 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 39:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 167:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts + 26:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 32:7 warning 'PC_USD_1E8' is assigned a value but never used @typescript-eslint/no-unused-vars + 35:44 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 41:57 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 65:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 71:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 215:59 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 231:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 243:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 252:65 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 281:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 297:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts + 9:10 warning 'CHAIN_INFO' is defined but never used @typescript-eslint/no-unused-vars + 14:3 warning 'AccountStatus' is defined but never used @typescript-eslint/no-unused-vars + 62:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 68:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 86:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 223:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 231:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 243:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 251:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 264:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 441:11 warning 'first' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts + 11:44 warning 'MULTICALL_SELECTOR' is defined but never used @typescript-eslint/no-unused-vars + 152:24 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 152:24 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 175:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 176:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 325:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 326:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 365:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 373:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 374:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 516:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 517:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 575:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 576:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 577:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 578:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 599:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 600:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 620:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts + 54:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 72:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 73:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 93:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 94:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 97:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 156:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 158:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 179:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 199:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 200:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 297:33 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 394:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 394:33 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 423:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 424:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 440:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 456:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts + 12:31 warning 'VM' is defined but never used @typescript-eslint/no-unused-vars + 49:85 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 102:72 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 239:64 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 261:72 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts + 13:10 warning 'bytesToHex' is defined but never used @typescript-eslint/no-unused-vars + 13:22 warning 'hexToBytes' is defined but never used @typescript-eslint/no-unused-vars + 15:10 warning 'VM' is defined but never used @typescript-eslint/no-unused-vars + 29:33 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 30:26 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 34:43 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 39:32 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 43:7 warning 'mockEvmConfirmations' is assigned a value but never used @typescript-eslint/no-unused-vars + 44:7 warning 'mockSvmConfirmations' is assigned a value but never used @typescript-eslint/no-unused-vars + 148:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 154:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 155:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 167:36 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 188:49 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 194:48 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 203:55 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 209:47 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 218:81 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 227:56 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 231:51 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 255:54 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 263:61 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 347:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 349:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 351:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 356:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 357:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 367:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 368:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 375:52 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 435:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 566:43 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 612:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 702:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 705:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 706:39 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 751:13 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 751:61 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 765:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 794:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 816:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 819:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 820:39 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 835:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 838:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 839:39 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 852:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts + 64:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 66:70 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts + 79:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 199:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts + 19:3 warning 'encodeAbiParameters' is defined but never used @typescript-eslint/no-unused-vars + 20:3 warning 'encodePacked' is defined but never used @typescript-eslint/no-unused-vars + 25:31 warning 'VM' is defined but never used @typescript-eslint/no-unused-vars + 144:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 148:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 157:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 161:49 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 232:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 239:51 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 248:48 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 252:54 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 261:78 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 265:83 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 606:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 619:58 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 651:48 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 659:54 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 666:59 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 677:51 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 690:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 711:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 740:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 750:51 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 767:68 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 772:82 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 922:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 932:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 941:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 950:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts + 24:8 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 34:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 58:70 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 74:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 91:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts + 26:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 27:28 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 28:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts + 21:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 23:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 30:40 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 38:69 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 44:64 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts + 10:15 warning 'UniversalTxReceipt' is defined but never used @typescript-eslint/no-unused-vars + 22:32 warning 'PayableToken' is defined but never used @typescript-eslint/no-unused-vars + 22:46 warning 'MoveableToken' is defined but never used @typescript-eslint/no-unused-vars + 28:52 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 44:60 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 65:47 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 110:64 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 115:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 121:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 122:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 144:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 165:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 174:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 183:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 193:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 202:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 215:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 224:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 505:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 529:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 614:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 663:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 693:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 709:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 839:58 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 850:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 850:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 866:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 866:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 880:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 880:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 955:87 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 994:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 994:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 1015:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 1015:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 1028:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 1028:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts + 10:10 warning 'encodeAbiParameters' is defined but never used @typescript-eslint/no-unused-vars + 15:10 warning 'UEA_MULTICALL_SELECTOR' is defined but never used @typescript-eslint/no-unused-vars + 15:34 warning 'ZERO_ADDRESS' is defined but never used @typescript-eslint/no-unused-vars + 107:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 108:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 128:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 149:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 168:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 241:15 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 279:15 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/account-manager.ts + 113:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 205:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/cascade.ts + 18:22 warning 'UNIVERSAL_GATEWAY_ADDRESSES' is defined but never used @typescript-eslint/no-unused-vars + 123:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 136:11 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 180:3 warning 'callbacks' is defined but never used @typescript-eslint/no-unused-vars + 613:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 636:15 warning 'gatewayProgramHex' is assigned a value but never used @typescript-eslint/no-unused-vars + 668:11 warning 'amount' is assigned a value but never used @typescript-eslint/no-unused-vars + 741:13 warning 'tokenAddress' is assigned a value but never used @typescript-eslint/no-unused-vars + 746:9 warning 'amount' is assigned a value but never used @typescript-eslint/no-unused-vars + 747:9 warning 'nativeValue' is assigned a value but never used @typescript-eslint/no-unused-vars + 802:11 warning 'chain' is assigned a value but never used @typescript-eslint/no-unused-vars + 1711:29 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 2678:45 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/confirmation.ts + 134:38 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 135:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/context.ts + 135:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/execute-funds-only.ts + 18:10 warning 'EvmClient' is defined but never used @typescript-eslint/no-unused-vars + 82:8 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 92:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 95:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 96:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 123:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 123:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 124:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 124:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 137:20 warning 'universalPayload' is assigned a value but never used @typescript-eslint/no-unused-vars + 262:55 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 262:78 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 262:78 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 270:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 270:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 271:75 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 272:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 272:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 297:77 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 297:77 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 326:69 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 326:69 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 365:11 warning 'nonce' is assigned a value but never used @typescript-eslint/no-unused-vars + 370:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 370:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 390:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 390:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 391:34 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 391:34 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 419:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 419:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 436:34 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 436:34 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 465:82 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 465:82 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 487:69 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 487:69 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/execute-funds-payload.ts + 77:8 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 88:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 91:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 105:45 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 210:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 236:24 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 237:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 239:69 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 242:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 255:13 warning 'tokenAddr' is assigned a value but never used @typescript-eslint/no-unused-vars + 255:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 261:13 warning 'payloadBytes' is assigned a value but never used @typescript-eslint/no-unused-vars + 277:62 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 319:77 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 372:69 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/gas-calculator.ts + 596:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/helpers.ts + 16:10 warning 'EvmClient' is defined but never used @typescript-eslint/no-unused-vars + 152:53 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 152:59 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 220:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/outbound-sync.ts + 131:40 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 132:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/payload-builder.ts + 75:43 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts + 107:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 107:19 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 116:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 116:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 117:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts + 286:28 error Require statement not part of import statement @typescript-eslint/no-var-requires + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/tracking.ts + 128:40 error Require statement not part of import statement @typescript-eslint/no-var-requires + 131:28 error Require statement not part of import statement @typescript-eslint/no-var-requires + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/push-chain-tx.ts + 84:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 227:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 264:28 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 408:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 467:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 468:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 470:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 471:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 531:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 532:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 534:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 535:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 583:39 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/response-builder.ts + 30:10 warning 'PushChain' is defined but never used @typescript-eslint/no-unused-vars + 64:43 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 65:44 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 65:60 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 66:44 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 66:59 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 180:13 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 185:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 191:55 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 195:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 222:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 248:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/route-handlers.ts + 1154:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 2094:5 warning 'ueaBalance' is assigned a value but never used @typescript-eslint/no-unused-vars + 2404:3 warning 'ctx' is defined but never used @typescript-eslint/no-unused-vars + 2405:3 warning 'params' is defined but never used @typescript-eslint/no-unused-vars + 2406:3 warning 'executeFn' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/signing.ts + 427:32 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/svm-bridge.ts + 41:77 warning 'req' is assigned a value but never used @typescript-eslint/no-unused-vars + 212:34 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 212:34 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/svm-helpers.ts + 107:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 107:53 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 115:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 188:11 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/tx-transformer.ts + 97:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/orchestrator.spec.ts + 87:50 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 134:50 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 162:28 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 182:28 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/orchestrator.ts + 3:31 warning 'VM' is defined but never used @typescript-eslint/no-unused-vars + 37:76 warning '_transformToUniversalTxResponse' is defined but never used @typescript-eslint/no-unused-vars + 76:41 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 92:48 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 103:50 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 104:74 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 105:77 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/orchestrator.types.ts + 387:15 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 566:9 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/payload-builders.ts + 7:44 warning 'MULTICALL_SELECTOR' is defined but never used @typescript-eslint/no-unused-vars + 14:3 warning 'ChainTarget' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/route-detector.ts + 17:3 warning 'TransactionRouteType' is defined but never used @typescript-eslint/no-unused-vars + 378:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 378:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts + 51:55 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 72:55 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 90:55 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/svm-idl/resolve.ts + 10:6 warning 'AccountItem' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-chain/push-chain.explorer.spec.ts + 192:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 199:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-chain/push-chain.reinitialize.spec.ts + 198:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 199:39 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-chain/push-chain.signing.spec.ts + 21:7 warning 'pushChainSVM' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-chain/push-chain.spec.ts + 12:3 warning 'isAddress' is defined but never used @typescript-eslint/no-unused-vars + 13:3 warning 'verifyMessage' is defined but never used @typescript-eslint/no-unused-vars + 452:9 warning 'pushPublicClient' is assigned a value but never used @typescript-eslint/no-unused-vars + 1199:9 warning 'beforeCounterPCBalance' is assigned a value but never used @typescript-eslint/no-unused-vars + 1222:9 warning 'afterCounterPCBalance' is assigned a value but never used @typescript-eslint/no-unused-vars + 1317:9 warning 'balanceBeforePC_UEA' is assigned a value but never used @typescript-eslint/no-unused-vars + 1353:9 warning 'balanceAfterPC_UEA' is assigned a value but never used @typescript-eslint/no-unused-vars + 1434:9 warning 'balanceBeforePC_UEA' is assigned a value but never used @typescript-eslint/no-unused-vars + 1470:9 warning 'balanceAfterPC_UEA' is assigned a value but never used @typescript-eslint/no-unused-vars + 1682:9 warning 'balanceBeforePC_COUNTER' is assigned a value but never used @typescript-eslint/no-unused-vars + 1685:9 warning 'balanceBeforePC_UEA' is assigned a value but never used @typescript-eslint/no-unused-vars + 1717:9 warning 'balanceAfterPC_COUNTER' is assigned a value but never used @typescript-eslint/no-unused-vars + 1720:9 warning 'balanceAfterPC_UEA' is assigned a value but never used @typescript-eslint/no-unused-vars + 1879:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1894:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1910:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1940:9 warning 'pushClientEVM' is assigned a value but never used @typescript-eslint/no-unused-vars + 2145:9 warning 'pcBeforeRecipient' is assigned a value but never used @typescript-eslint/no-unused-vars + 2170:9 warning 'pcAfterRecipient' is assigned a value but never used @typescript-eslint/no-unused-vars + 2487:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2504:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2523:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2533:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2556:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2571:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2592:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2602:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2612:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 2649:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 3328:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 3330:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 3537:15 warning 'recipient' is assigned a value but never used @typescript-eslint/no-unused-vars + 3832:13 warning 'WETH9' is assigned a value but never used @typescript-eslint/no-unused-vars + 3863:13 warning 'WETH9' is assigned a value but never used @typescript-eslint/no-unused-vars + 3865:13 warning 'USDC' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-chain/push-chain.ts + 33:3 warning 'UniversalTxResponse' is defined but never used @typescript-eslint/no-unused-vars + 244:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts + 30:3 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 127:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 133:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 148:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 155:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 162:40 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-client/push-client.ts + 359:42 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__integration__/read-state.integration.spec.ts + 45:38 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 45:38 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 45:77 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 45:77 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 45:117 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 48:68 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 225:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 225:29 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/read-events.spec.ts + 95:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 95:24 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts + 26:3 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 104:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 104:29 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 274:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 282:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 385:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/read-types.spec.ts + 30:9 warning 'removed' is assigned a value but never used @typescript-eslint/no-unused-vars + 48:8 warning '_typed' is defined but never used @typescript-eslint/no-unused-vars + 61:9 warning 'missingEntrypoint' is assigned a value but never used @typescript-eslint/no-unused-vars + 63:9 warning 'registryAbi' is assigned a value but never used @typescript-eslint/no-unused-vars + 65:9 warning 'legacy' is assigned a value but never used @typescript-eslint/no-unused-vars + 86:8 warning '_loose' is defined but never used @typescript-eslint/no-unused-vars + 135:6 warning 'ExportChecks' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/registry.spec.ts + 91:94 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 97:46 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts + 55:62 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/svm-account.spec.ts + 101:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 101:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 102:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 102:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 103:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 103:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 104:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 104:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts + 35:15 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 51:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 84:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 87:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 88:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 91:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 116:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/read-params.ts + 254:15 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 295:46 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts + 319:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 322:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 325:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 325:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 357:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts + 90:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/detector.live.spec.ts + 180:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 317:29 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 317:29 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 324:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 326:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 328:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 329:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 333:27 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 357:33 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 357:33 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts + 154:49 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 248:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 254:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/cascade.ts + 16:51 warning 'PublicClient' is defined but never used @typescript-eslint/no-unused-vars + 23:3 warning 'deriveChildUniversalTxId' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/detector-svm.ts + 242:30 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 243:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/detector.ts + 88:30 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 89:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/svm-events.ts + 30:11 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal/account/account.spec.ts + 12:3 warning 'resolveControllerAccount' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal/signer/signer.spec.ts + 38:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 68:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 82:38 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 136:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 200:49 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 334:7 warning 'domain' is defined but never used @typescript-eslint/no-unused-vars + 335:7 warning 'types' is defined but never used @typescript-eslint/no-unused-vars + 336:7 warning 'primaryType' is defined but never used @typescript-eslint/no-unused-vars + 337:7 warning 'message' is defined but never used @typescript-eslint/no-unused-vars + 339:15 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 340:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 342:16 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal/signer/signer.ts + 47:16 warning 'type' is assigned a value but never used @typescript-eslint/no-unused-vars + 49:5 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 54:58 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 73:11 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 102:11 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 213:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 228:36 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 229:36 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 230:36 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 265:47 warning 'primaryType' is defined but never used @typescript-eslint/no-unused-vars + 268:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 422:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 516:44 warning 'primaryType' is defined but never used @typescript-eslint/no-unused-vars + 519:44 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 552:44 warning 'primaryType' is defined but never used @typescript-eslint/no-unused-vars + 555:44 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 569:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 570:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal/universal.types.ts + 22:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 23:13 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 24:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 25:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 26:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 30:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 31:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 32:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 34:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 35:34 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 35:50 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 36:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 42:33 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 43:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 47:34 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 47:50 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 48:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 54:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 54:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 57:33 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 58:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 60:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 130:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 167:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/utils.spec.ts + 172:72 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 419:29 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 425:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 436:30 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 487:28 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 571:16 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 648:62 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 652:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 657:57 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 663:57 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 669:57 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 878:71 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 882:71 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 893:66 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 898:68 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 904:57 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 910:62 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1215:54 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1219:55 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1223:60 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1227:53 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1233:62 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1239:62 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1245:67 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1251:60 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1554:65 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 1563:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/utils.ts + 24:43 warning 'getAddress' is defined but never used @typescript-eslint/no-unused-vars + 292:13 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 295:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 326:40 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts + 64:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/vm-client/svm-client.ts + 92:34 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 152:51 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 184:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 215:45 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 216:35 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 286:63 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 287:47 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/vm-client/vm-client.types.ts + 29:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + 40:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any + +✖ 861 problems (7 errors, 854 warnings) + 3 errors and 0 warnings potentially fixable with the `--fix` option. + +Warning: command "eslint ." exited with non-zero status code + + + NX Running target lint for project core failed + +Failed tasks: + +- core:lint + +Hint: run the command with --verbose for more details. diff --git a/plan/agw/research/v4-implementation-2026-10-06/logs/local-contracts.log b/plan/agw/research/v4-implementation-2026-10-06/logs/local-contracts.log new file mode 100644 index 00000000..b134ebd9 --- /dev/null +++ b/plan/agw/research/v4-implementation-2026-10-06/logs/local-contracts.log @@ -0,0 +1,15 @@ +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts (11.607 s) +PASS core-agw-local packages/core/__agw-local__/v4-multiasset.spec.ts (6.052 s) +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts (5.515 s) +PASS core-agw-local packages/core/__agw-local__/agw-local-races.spec.ts (5.095 s) +PASS core-agw-local packages/core/__agw-local__/agw-local-batch.spec.ts +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts + +Test Suites: 6 passed, 6 total +Tests: 46 passed, 46 total +Snapshots: 0 total +Time: 31.661 s, estimated 49 s +Ran all test suites. +Jest did not exit one second after the test run has completed. + +'This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue. diff --git a/plan/agw/research/v4-implementation-2026-10-06/logs/local-typecheck.log b/plan/agw/research/v4-implementation-2026-10-06/logs/local-typecheck.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/v4-implementation-2026-10-06/logs/spec-typecheck.log b/plan/agw/research/v4-implementation-2026-10-06/logs/spec-typecheck.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/v4-implementation-2026-10-06/logs/unit-full.log b/plan/agw/research/v4-implementation-2026-10-06/logs/unit-full.log new file mode 100644 index 00000000..6d6f9180 --- /dev/null +++ b/plan/agw/research/v4-implementation-2026-10-06/logs/unit-full.log @@ -0,0 +1,165 @@ +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts + +Test Suites: 1 skipped, 112 passed, 112 of 113 total +Tests: 12 skipped, 1919 passed, 1931 total +Snapshots: 0 total +Time: 73.069 s +Ran all test suites. diff --git a/plan/agw/research/v4-implementation-2026-10-06/tsconfig.agw-e2e.json b/plan/agw/research/v4-implementation-2026-10-06/tsconfig.agw-e2e.json new file mode 100644 index 00000000..89f04f3f --- /dev/null +++ b/plan/agw/research/v4-implementation-2026-10-06/tsconfig.agw-e2e.json @@ -0,0 +1,23 @@ +{ + "extends": "../../../../packages/core/tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "types": [ + "jest", + "node" + ], + "baseUrl": "../../../..", + "paths": { + "@e2e/shared/*": [ + "packages/core/__e2e__/shared/*" + ] + }, + "typeRoots": [ + "../../../../node_modules/@types" + ] + }, + "include": [ + "../../../../packages/core/__e2e__/agw/**/*.ts" + ], + "references": [] +} diff --git a/plan/agw/research/v5-implementation-2026-10-07/README.md b/plan/agw/research/v5-implementation-2026-10-07/README.md new file mode 100644 index 00000000..dc8e10e1 --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/README.md @@ -0,0 +1,44 @@ +# SDK v5 integration and label acceptance — October 7, 2026 + +The SDK now targets the current Donut v5 suite only. The existing `wallet.setLabel(label, opts?)` method is enabled. There is no new caller-facing method or automatic rule-selection change. Validation ran locally before commit and push. No contracts were deployed and no package was published during this implementation. + +## Implementation + +- Replaced the v4 deployment/adapter/ABI directories and fixtures with v5. Default source is `2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb`; factory is `0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5`, wallet implementation is `0x4D459Da499C14548aa16c46c57fD92880A88EBb4`, first scan block is 23989983. Existing v4 wallets are unsupported by this adapter, in accordance with the user's no-legacy direction. +- Durable ABI snapshots come from an isolated build of the exact v5 source. The local harness and ABI generator use that pin. [ABI signature changes](abi-signature-changes.json): wallet adds `label`, `setLabel`, `LabelSet` and `LabelTooLong`, and changes `initializeAccount()` to `initializeAccount(string)`. Factory, URP, engine and validator signatures are unchanged. This signature comparison does not itself prove bytecode equivalence. +- Wallet `info()` and `list()` read current labels at their snapshot block via `label()`, without deployment-event lookup. Custom labels and computed defaults are preserved. Undeployed preview slots still have an empty label. +- Public renames validate the 64 UTF-8 byte cap and signer ownership before signing, permit empty reset, use a single owner `execute` call targeting the wallet's own setter, await confirmation and forward the per-call progress hook. This works for EOA and UEA owners. It records **one owner-action checkpoint**; the underlying setter itself records none. +- Create validates the same byte cap before any RPC/signature. Create-race recovery uses the immutable deploy-event label, rather than the now-mutable label view. Regression tests cover a competing wallet renamed to match the requested label and a same-label deployment renamed afterward. +- `LabelTooLong` participates in the existing decoded contract error mapping. Source address/domain context and deterministic wallet prediction use the new factory. No rule encoding, ambiguity handling or authorization policy is changed. +- Added five registered public label E2Es and five actual-contract SDK label tests; updated shared E2E manifest verification to check the v5 selectors because `accountId()` has not changed. Updated the consumer guide, current planning status and team delivery documents. +- Existing uncommitted SVM alignment changes were preserved. Their prior proof remains recorded separately; no new live Solana delivery is claimed here. + +## Validation + +| Check | Result | +| --- | --- | +| Full core units | **2,010 passed, 12 skipped, 0 failed**; 120 passing suites | +| SDK against actual pinned v5 contracts on Anvil | **90 passed**, 12 suites; gateway/core/token/destination fixtures retain their documented limits | +| Regenerated contract vectors | Separate read-only comparison against the saved v5 fixture passed | +| Typechecks | Library, spec (including E2Es), local-contract harness passed; final library/spec checks also passed | +| Build | `core:build --skip-nx-cache` passed | +| Consumer/package | CJS/ESM imports on Node 20, compiled declarations, npm dry-run contents and 10 guide blocks passed; no legacy v4 contract directory remains in built output | +| API comparison | Compiled declarations match source; no transaction method, instance method or initialize-signature change against the checker baseline. Broader type changes in its report also include the earlier SVM work | +| Lint | Scoped AGW code/tests: 0 errors, 95 warnings (primarily existing test assertions and unused test imports); not claimed warning-free | +| E2E registration | **53 AGW scenarios / 13 files / 53 tests**; default `all` unchanged at **76 / 40 / 81** | +| Live Donut v5 | **15 scenarios verified across selected runs**: five labels, six native execution, four rule lifecycle | +| Integrity | `git diff --check` passed; changed/new text files checked for the available test credentials with no matches | + +See [logs/](logs/), [live-evidence.jsonl](live-evidence.jsonl), and [api-comparison.json](api-comparison.json). [Read-only deployment/source verification](../deployment-review-2026-10-07-v5/README.md) preceded these funded SDK tests. + +## Live run details and limits + +The main run of labels, native execution and lifecycle finished **14 passed / 1 failed**. The failure was a test assertion expecting the later dispatch guard: a normal granted rule has no policy for wallet-self `setLabel`, so SmartSession correctly reverts earlier with `NoPoliciesSet`. Exact source confirms validation precedes dispatch. The assertion now decodes that engine error, and its focused rerun passed with label and checkpoint state unchanged. The other four label tests passed in the main run, including UEA ownership, rename and reset. This is not a claim of one unfiltered 15-pass invocation. + +An earlier labels-only run was **4 passed / 1 failed** because its agent test created a wallet with no agent rule, so initialization correctly refused that signer. The corrected fixture grants an ordinary native rule. Both initial logs are retained rather than hidden. One multi-file run printed Jest's open-handle notice after completion and subsequently exited; no claim of a completely silent test runner is made. + +Funded runs used only Donut and the existing Sepolia-origin test signer, fresh v5 wallets and fresh native agents. Each fixture funds its agent with the configured default 0.5 PC; the external-owner label case funds its UEA with a bounded 3 PC. Native fixture wallets receive 0.01 PC and bounded additional expiry-test value. No mainnet transaction, deployment or external team message was sent, and no credential was saved in the evidence. + +The current source passes all 90 local contract cases, including EVM/SVM codecs, composition, accounting and rollback. Full live destination suites were **not rerun on v5**: prior v4 destination delivery evidence must not be represented as v5 delivery. Refund spend-credit wiring and bridge retry timing remain downstream operational dependencies. Node 24's full runtime matrix was not rerun in this pass. + +The upstream signed-deploy label is still cosmetic and unsigned in OwnerIntent; this documented contract behavior is preserved. Successful rename transactions and actual wallet label/checkpoint reads are now verified live, extending the earlier read-only deployment review which had no existing clone to inspect. diff --git a/plan/agw/research/v5-implementation-2026-10-07/abi-signature-changes.json b/plan/agw/research/v5-implementation-2026-10-07/abi-signature-changes.json new file mode 100644 index 00000000..45143d5e --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/abi-signature-changes.json @@ -0,0 +1,30 @@ +{ + "wallet": { + "added": [ + "function:initializeAccount(string)", + "function:label()", + "function:setLabel(string)", + "event:LabelSet(string)", + "error:LabelTooLong(uint256)" + ], + "removed": [ + "function:initializeAccount()" + ] + }, + "factory": { + "added": [], + "removed": [] + }, + "engine": { + "added": [], + "removed": [] + }, + "policy": { + "added": [], + "removed": [] + }, + "validator": { + "added": [], + "removed": [] + } +} diff --git a/plan/agw/research/v5-implementation-2026-10-07/api-comparison.json b/plan/agw/research/v5-implementation-2026-10-07/api-comparison.json new file mode 100644 index 00000000..2454ca5e --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/api-comparison.json @@ -0,0 +1,11460 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "898eda17911133faa155899ac8e1276a589c4564", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [ + "DecodedSolanaRule", + "SolanaRule", + "SvmAccountRef", + "SvmFieldConstraint", + "SvmInstructionRule" + ], + "removedExports": [], + "changedAgwTypes": [ + "AgenticError", + "AGENTIC_ERROR_CODE", + "NativeRule", + "AllowedCall", + "UniversalRule", + "RulesRecord", + "AgenticTxMetadata" + ], + "publicTypeChanges": [ + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticErrorCode", + "AgenticNetworkConstants", + "AgenticTxMetadata", + "AllowedCall", + "NativeRule", + "SolanaRule", + "DecodedSolanaRule", + "SvmInstructionRule", + "SvmAccountRef", + "SvmFieldConstraint", + "Rule", + "RulesRecord", + "UniversalRule" + ], + "transactionMethodChanges": [], + "instanceMethodChanges": [], + "agwConstantsChanged": true, + "before": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address(token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }): {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "after": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DecodedSolanaRule", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SolanaRule", + "SvmAccountRef", + "SvmExecutePayloadFields", + "SvmFieldConstraint", + "SvmGatewayAccountMeta", + "SvmInstructionRule", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "beneficiaryOffset": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": false, + "readonly": false, + "type": "number" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "beneficiaryOffset": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "SolanaRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").SolanaRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedInstructions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").SvmInstructionRule[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal?: bigint;\n token: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n}[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "outputTokens": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DecodedSolanaRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[]" + }, + "ceaAccounts": { + "optional": false, + "readonly": false, + "type": "readonly `0x${string}`[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`solana:${string}`" + }, + "dataPins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmDataPinWire[]" + }, + "expectedCEA": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "format": { + "optional": false, + "readonly": false, + "type": "\"decoded\"" + }, + "gatewayProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmAccountPinWire[]" + }, + "programs": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").AllowedProgramWire[]" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "SvmInstructionRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").SvmInstructionRule", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "{\n expected: import(\"sdk/src/lib/agentic/agentic.types\").SvmAccountRef;\n name: string;\n}[]" + }, + "fields": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").SvmFieldConstraint[] | undefined" + }, + "instruction": { + "optional": false, + "readonly": false, + "type": "{\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n name: string;\n}" + }, + "program": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "SvmAccountRef": { + "type": "{\n address: string;\n kind: \"address\";\n} | {\n kind: \"walletATA\";\n token: string;\n} | {\n kind: \"walletCEA\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"address\" | \"walletATA\" | \"walletCEA\"" + } + } + }, + "SvmFieldConstraint": { + "type": "{\n denominator: string;\n minRatio: {\n den: bigint;\n num: bigint;\n };\n numerator: string;\n} | {\n equals: `0x${string}` | bigint | boolean;\n name: string;\n} | {\n max: bigint;\n name: string;\n} | {\n min: bigint;\n name: string;\n}", + "members": {} + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").SolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address: (token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": false, + "readonly": false, + "type": "number" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "scope": "All root exports and declared public members, PushChain static/instance members, universal transaction methods, utility groups, readonly/optional markers and constants. Behavior/default/deployment changes need the written session review." +} diff --git a/plan/agw/research/v5-implementation-2026-10-07/credential-scan.json b/plan/agw/research/v5-implementation-2026-10-07/credential-scan.json new file mode 100644 index 00000000..ba9eab8b --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/credential-scan.json @@ -0,0 +1,4 @@ +{ + "scanned": 170, + "credentialMatches": [] +} diff --git a/plan/agw/research/v5-implementation-2026-10-07/live-evidence.jsonl b/plan/agw/research/v5-implementation-2026-10-07/live-evidence.jsonl new file mode 100644 index 00000000..de1d9251 --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/live-evidence.jsonl @@ -0,0 +1,11 @@ +{"name": "v5-label-default-custom", "at": "2026-10-07T12:30:38.086Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallets": ["0x8915950eeaa7cd6c890c307a755157442fa0D248", "0x7951b49116c33321bdD600bd2C618bDD37D35f2F"], "indices": [0, 1], "hashes": ["0xc462c0784ab48fb563d686cd525d0700b6760b9cdf35f4d81a3b66e00ac55ef4", "0x80b5ccd5033880ee100278bdd347350250b59230002f1ca2ac28921ab49f00bc"]} +{"name": "v5-label-rename-reset", "at": "2026-10-07T12:31:11.346Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xa0348fCC4e4a7932771836183A2e85cd04a18B02", "hashes": ["0x283884ab7ac614c566bf517613c98035d75746bf1e47ea5d72b1fc21bbcc7306", "0x018cf54fc627132377d4268f998a7d466079b0f43eabfb06e1802bd663f151ad"], "checkpointsBefore": "0", "checkpointsAfter": "2"} +{"name": "v5-label-byte-boundary", "at": "2026-10-07T12:31:32.321Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x2aEA90A36ba5f0247cBaf8C0Ac71489B138a569A", "checkpoints": "1", "unchangedNextSlot": 4} +{"name": "v5-label-uea-owner", "at": "2026-10-07T12:32:21.339Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x0619a84b55B9743Eb88b004246feA2D083a37F64", "owner": "0x5C70C864Cf1aDfB04A0e107fFA248ba3600EAb8D", "hashes": ["0x2d64e68ce50245ebc3ac556823f9f590210c0f602b0bb909d86a368e403624cd", "0x894de318d6d8ef12aaeae277d6c579b2944e18a95790c974ba71e9f1210c4fed", "0x0e982cc74e77e5ae0291df95e8a31294c4f3f7a168a9432405b442829cfbf8d6"], "checkpointsBefore": "0", "checkpointsAfter": "2"} +{"name": "v5-label-default-custom", "at": "2026-10-07T12:34:30.310Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallets": ["0x15Ce8553298cD0bd4A396C1c0f2f5c583d869a38", "0x218F609a52ee49CaBAD34b3550e0a50aB6199AE5"], "indices": [5, 6], "hashes": ["0x0154e6a32e3b531f7c8dad28e27f3c94ebb535f4f4563b6f8f100656ca5f31c5", "0xbb5c89ba1076d2931514876dd4bd21a697bf8088e42efb38ff6b8556ab010f82"]} +{"name": "v5-label-rename-reset", "at": "2026-10-07T12:35:08.263Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x42b3217bE18A735e85dAb2A652c40ae54f640E14", "hashes": ["0x0b802fbd0e901d80857e768b0fa1f18775c0801671f6703e1217bf41337b8941", "0x3e3a4c0b0c7fb7cb8e95e9298f15dd993c44170939d07161f06ec3dc08505458"], "checkpointsBefore": "0", "checkpointsAfter": "2"} +{"name": "v5-label-byte-boundary", "at": "2026-10-07T12:35:31.973Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x0A0FB68FF8dfeBf9efbd47105F200E5ecE0617ff", "checkpoints": "1", "unchangedNextSlot": 9} +{"name": "v5-label-uea-owner", "at": "2026-10-07T12:36:31.446Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xCCed74226320b5fBf2a9C79f2E82738A11305a1A", "owner": "0x5C70C864Cf1aDfB04A0e107fFA248ba3600EAb8D", "hashes": ["0x2b3214a82327892cc3ad881fc4a6bddfed449bdccbacc7faf714326b61c94ce4", "0x732b9484496c61e12be8a3e1f217e60553223f132358814f5dd07cc19e1b4249", "0x1bf77a081a0275622a91748d27e23780cdf1abe445f06a1fe89700ebd5ff7752"], "checkpointsBefore": "0", "checkpointsAfter": "2"} +{"name": "native-agent-send", "at": "2026-10-07T12:37:07.483Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x848D24fB43d19D7bf2384B8157A505a30bd0E3b2", "rulesId": "0xad49e1f5b6252d3d174404502c74414857d7f3398b63cfd784bec555b574b6ca", "tx": "0x55c842b0e18fb0030298d8c64c6a39ff160d95d8eefa6df6e0e1cd4de74e5cc2", "block": "23992536"} +{"name": "rules-update", "at": "2026-10-07T12:40:03.325Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0xDb9B9F16155080C519982a748844d60706bAD2AD", "original": "0x25fc2f28f58fe9ab0561e73b5ecc4a8e8054f0f2b059f63c414a7093e84bca4e", "replacement": "0x5d39e07ec12f83faf7a843f29d7dcaa55d0d77ce4a9ccf4659dec202ff6da692", "tx": "0x1e229372253e5199ae042e97c699ba4fb034599ce831188c8380cdb2c0d99d45", "checkpointDelta": 5} +{"name": "v5-label-agent-refused", "at": "2026-10-07T12:41:33.428Z", "network": "TESTNET_DONUT", "sourceCommit": "2e61e133e641b4e0e1ddbdc9306b0903b60e4dbb", "wallet": "0x01f79B99F1E369758d3A09b0A03962cab689D3De", "checkpoints": "1"} diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/actual-contracts.log b/plan/agw/research/v5-implementation-2026-10-07/logs/actual-contracts.log new file mode 100644 index 00000000..e64db0e9 --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/logs/actual-contracts.log @@ -0,0 +1,30 @@ +PASS core-agw-local packages/core/__agw-local__/v5-multiasset.spec.ts (8.915 s) +PASS core-agw-local packages/core/__agw-local__/labels.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-backend.spec.ts (7.016 s) +PASS core-agw-local packages/core/__agw-local__/svm-public.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-differential.spec.ts + ● Console + + console.log + {"corpus":"svm-grant","seed":23063,"cases":107,"accepted":38,"rejected":69,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:226:13) + + console.log + {"corpus":"svm-payload","seed":23063,"cases":88,"accepted":6,"rejected":82,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:407:13) + +PASS core-agw-local packages/core/__agw-local__/agw-local-races.spec.ts +PASS core-agw-local packages/core/__agw-local__/delayed-index.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-internals.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-batch.spec.ts +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts + +Test Suites: 12 passed, 12 total +Tests: 90 passed, 90 total +Snapshots: 0 total +Time: 38.433 s +Ran all test suites. diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/api.log b/plan/agw/research/v5-implementation-2026-10-07/logs/api.log new file mode 100644 index 00000000..0b5c2eee --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/logs/api.log @@ -0,0 +1 @@ +{"compiledMatchesSource":true,"addedExports":["DecodedSolanaRule","SolanaRule","SvmAccountRef","SvmFieldConstraint","SvmInstructionRule"],"removedExports":[],"changedAgwTypes":["AgenticError","AGENTIC_ERROR_CODE","NativeRule","AllowedCall","UniversalRule","RulesRecord","AgenticTxMetadata"],"publicTypeChanges":["AGENTIC_ERROR_CODE","AgenticError","AgenticErrorCode","AgenticNetworkConstants","AgenticTxMetadata","AllowedCall","NativeRule","SolanaRule","DecodedSolanaRule","SvmInstructionRule","SvmAccountRef","SvmFieldConstraint","Rule","RulesRecord","UniversalRule"],"transactionMethodChanges":[],"instanceMethodChanges":[],"initializeSignatureChanged":false,"agwConstantsChanged":true} diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/build.log b/plan/agw/research/v5-implementation-2026-10-07/logs/build.log new file mode 100644 index 00000000..55e0899d --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/logs/build.log @@ -0,0 +1,11 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:67452) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/docs.log b/plan/agw/research/v5-implementation-2026-10-07/logs/docs.log new file mode 100644 index 00000000..8d1582db --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/logs/docs.log @@ -0,0 +1 @@ +AGW guide: 10 TypeScript blocks typechecked against public exports; no examples executed. diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/e2e-default-manifest.log b/plan/agw/research/v5-implementation-2026-10-07/logs/e2e-default-manifest.log new file mode 100644 index 00000000..dfa5f250 --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/logs/e2e-default-manifest.log @@ -0,0 +1,79 @@ +✓ smoke-uea-derive-evm 1 test +✓ smoke-read-track-lookup 1 test +✓ smoke-cea-derive-evm 1 test +✓ smoke-roundtrip-evm 1 test +✓ smoke-roundtrip-svm 1 test +✓ smoke-cea-pda-svm 1 test +✓ smoke-gasfee-reads 2 tests +✓ smoke-gas-sizer 2 tests +✓ smoke-pc20-registry 2 tests +✓ smoke-pc20-resolve 1 test +✓ evm-r1-transfer 1 test +✓ evm-r1-funds-usdt 1 test +✓ evm-r1-funds-native 1 test +✓ evm-r1-value-funds-data 1 test +✓ evm-r1-bridge-multicall 1 test +✓ evm-r1-fresh-value-native 1 test +✓ evm-r2-funds-erc20 1 test +✓ evm-r2-payload 1 test +✓ evm-r2-multicall 1 test +✓ evm-r2-funds-payload 1 test +✓ evm-r2-native-funds 1 test +✓ evm-r2-native-funds-payload 1 test +✓ evm-r3-funds-erc20 1 test +✓ evm-r3-payload 1 test +✓ evm-r3-multicall 1 test +✓ evm-r3-funds-payload 1 test +✓ evm-r3-native-funds 1 test +✓ evm-r3-eoa-native-funds 1 test +✓ svm-r1-transfer 1 test +✓ svm-r1-funds-sol-self 1 test +✓ svm-r1-value-self 1 test +✓ svm-r1-data-contract 1 test +✓ svm-r1-fresh-key-repro 1 test +✓ svm-r2-funds-sol 1 test +✓ svm-r2-funds-spl 1 test +✓ svm-r2-payload-cpi 1 test +✓ svm-r2-sol-cpi 1 test +✓ svm-r3-drain-sol 1 test +✓ svm-r3-drain-spl 1 test +✓ pc20-export-deployed-wrapper 1 test +✓ pc20-export-predicts-wrapper 1 test +✓ pc20-inbound-burn-unlock 1 test +✓ pc20-r3-cea-burn 1 test +✓ pc20-svm-r1-direct-burn 1 test +✓ pc20-svm-r3-cea-ata-burn 1 test +✓ push-send-transaction 1 test +✓ push-value-own-uea 1 test +✓ push-multicall-no-funds 1 test +✓ push-track-r1-sepolia-parity 1 test +✓ push-track-r3-funds-roundtrip 1 test +✓ push-track-source-leg-hashes 2 tests +✓ xc-multi-child-r3 1 test +✓ xc-fresh-wallet-r3 1 test +✓ xc-peth-bridge-back 1 test +✓ xc-cascade-6hop 1 test +✓ read-evm-balance-eoa 1 test +✓ read-canonical-registry 1 test +✓ read-evm-balance-uea 1 test +✓ read-evm-contract-call 1 test +✓ read-evm-callback-reverts 1 test +✓ read-expiry 1 test +✓ read-svm-lamports 1 test +✓ read-web2-json 1 test +✓ read-docs-example 1 test +✓ read-docs-evm-balance 1 test +✓ read-docs-batch 1 test +✓ read-docs-resume 2 tests +✓ read-app-batch-eoa 1 test +✓ read-app-batch-uea 1 test +✓ read-app-batch-recovery 1 test +✓ read-api-token 1 test +✓ read-api-mixed-outcomes 1 test +✓ read-svm-token-auto 1 test +✓ read-svm-idl 1 test +✓ read-evm-any-mutability 1 test +✓ read-svm-raw 1 test + +76 scenarios, 40 spec files, 81 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/e2e-manifest.log b/plan/agw/research/v5-implementation-2026-10-07/logs/e2e-manifest.log new file mode 100644 index 00000000..1e6c5ee6 --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/logs/e2e-manifest.log @@ -0,0 +1,56 @@ +✓ agw-create-bare 1 test +✓ agw-create-rules 1 test +✓ agw-funding-pc 1 test +✓ agw-funding-allowance 1 test +✓ agw-native-batch 1 test +✓ agw-native-batch-rollback 1 test +✓ agw-native-agent 1 test +✓ agw-native-owner 1 test +✓ agw-native-over-cap 1 test +✓ agw-native-stranger 1 test +✓ agw-native-revoked 1 test +✓ agw-native-expired 1 test +✓ agw-lifecycle-add 1 test +✓ agw-lifecycle-update 1 test +✓ agw-lifecycle-checkpoints 1 test +✓ agw-lifecycle-revoke-all 1 test +✓ agw-universal-outbound 1 test +✓ agw-v5-multi-asset 1 test +✓ agw-v5-call-only 1 test +✓ agw-universal-dest-revert 1 test +✓ agw-identity-evm 1 test +✓ agw-identity-first-use 1 test +✓ agw-identity-solana 1 test +✓ agw-responses-hooks 1 test +✓ agw-responses-replay 1 test +✓ agw-public-svm-1 1 test +✓ agw-public-svm-2 1 test +✓ agw-public-svm-3 1 test +✓ agw-public-svm-4 1 test +✓ agw-public-svm-5 1 test +✓ agw-public-svm-6 1 test +✓ agw-labels-1 1 test +✓ agw-labels-2 1 test +✓ agw-labels-3 1 test +✓ agw-labels-4 1 test +✓ agw-labels-5 1 test +✓ agw-extended-prefunding 1 test +✓ agw-extended-ambiguous-rules 1 test +✓ agw-extended-batched-lifecycle 1 test +✓ agw-extended-invalid-revoke 1 test +✓ agw-extended-stale-update 1 test +✓ agw-extended-index-race 1 test +✓ agw-extended-native-policy-1 1 test +✓ agw-extended-native-policy-2 1 test +✓ agw-extended-native-policy-3 1 test +✓ agw-extended-native-policy-4 1 test +✓ agw-extended-native-policy-5 1 test +✓ agw-extended-native-policy-6 1 test +✓ agw-extended-native-policy-7 1 test +✓ agw-extended-native-policy-8 1 test +✓ agw-extended-native-policy-9 1 test +✓ agw-extended-native-policy-10 1 test +✓ agw-extended-native-policy-11 1 test + +53 scenarios, 13 spec files, 53 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/final-type-lib.log b/plan/agw/research/v5-implementation-2026-10-07/logs/final-type-lib.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/final-type-spec.log b/plan/agw/research/v5-implementation-2026-10-07/logs/final-type-spec.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/full-unit.log b/plan/agw/research/v5-implementation-2026-10-07/logs/full-unit.log new file mode 100644 index 00000000..0f4a9bab --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/logs/full-unit.log @@ -0,0 +1,173 @@ +PASS core packages/core/src/lib/agentic/__tests__/labels.spec.ts (5.881 s) +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts + +Test Suites: 1 skipped, 120 passed, 120 of 121 total +Tests: 12 skipped, 2010 passed, 2022 total +Snapshots: 0 total +Time: 34.949 s, estimated 35 s +Ran all test suites. diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/golden-check.log b/plan/agw/research/v5-implementation-2026-10-07/logs/golden-check.log new file mode 100644 index 00000000..ff14031d --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/logs/golden-check.log @@ -0,0 +1,9 @@ +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts (6.446 s) + contract-generated AGW vectors (v5) + ✓ matches the committed fixture (or writes it) (650 ms) + +Test Suites: 1 passed, 1 total +Tests: 1 passed, 1 total +Snapshots: 0 total +Time: 6.484 s +Ran all test suites within paths "packages/core/__agw-local__/vectors.spec.ts". diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/lint.log b/plan/agw/research/v5-implementation-2026-10-07/logs/lint.log new file mode 100644 index 00000000..e385115d --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/logs/lint.log @@ -0,0 +1,143 @@ + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local-advanced.spec.ts + 73:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 85:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 295:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 311:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 337:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 426:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local-batch.spec.ts + 45:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 91:37 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 92:46 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 99:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 127:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 144:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 151:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local-races.spec.ts + 54:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 99:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 117:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 145:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/agw-local.spec.ts + 47:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 48:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/delayed-index.spec.ts + 81:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 95:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 112:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 194:24 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 246:26 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 254:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/harness.ts + 234:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 253:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 262:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 400:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/labels.spec.ts + 108:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 133:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/svm-backend.spec.ts + 142:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 170:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 229:28 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 403:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 427:23 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 471:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 543:61 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/svm-differential.spec.ts + 74:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 212:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 265:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 384:20 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/svm-internals.spec.ts + 86:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 119:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 189:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/svm-public.spec.ts + 78:12 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 117:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 159:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 160:11 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 161:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 184:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 213:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 247:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 248:11 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 249:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 277:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 278:11 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 279:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 302:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 395:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 448:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 462:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 474:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 504:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/v5-multiasset.spec.ts + 12:10 warning 'createWallet' is defined but never used @typescript-eslint/no-unused-vars + 78:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 92:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 176:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 188:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 325:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 335:14 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 353:18 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__agw-local__/vectors.spec.ts + 56:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 57:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 98:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 207:25 warning '_a' is assigned a value but never used @typescript-eslint/no-unused-vars + 208:25 warning '_b' is assigned a value but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/identity-gas.spec.ts + 112:16 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/svm-public.spec.ts + 138:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 139:25 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 224:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 297:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 297:7 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/universal-evm.spec.ts + 29:10 warning 'v5' is defined but never used @typescript-eslint/no-unused-vars + 43:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/agw/v5-multiasset.spec.ts + 18:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/codec.spec.ts + 379:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts + 2:17 warning 'PUSH_NETWORK' is defined but never used @typescript-eslint/no-unused-vars + 41:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/reads-context.spec.ts + 374:5 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/response-surface.spec.ts + 4:3 warning 'getAddress' is defined but never used @typescript-eslint/no-unused-vars + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts + 457:21 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts + 41:50 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 46:45 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + 50:45 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion + +✖ 95 problems (0 errors, 95 warnings) diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/live-acceptance-main.log b/plan/agw/research/v5-implementation-2026-10-07/logs/live-acceptance-main.log new file mode 100644 index 00000000..21d13932 --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/logs/live-acceptance-main.log @@ -0,0 +1,44 @@ +FAIL core-e2e packages/core/__e2e__/agw/labels.spec.ts (172.119 s) + ● agw labels › 4. an agent cannot rename through either the SDK or the contract + + expect(received).rejects.toThrow(expected) + + Expected substring: "ForbiddenDispatchTarget" + Received message: "The contract function \"executeAsAgent\" reverted with the following signature: + 0x1c792c05· + Unable to decode signature \"0x1c792c05\" as it was not found on the provided ABI. + Make sure you are using the correct ABI and that the error exists on it. + You can look up the decoded signature here: https://openchain.xyz/signatures?query=0x1c792c05.·· + Contract Call: + address: 0xe5579a19Fbb5e23814c993b61f9787647C0ef724 + function: executeAsAgent(bytes32 rulesId, bytes32 mode, bytes executionCalldata) + args: (0xc14cf8098cdf3e85b71d1fab16e606608ea31e67d1a78a72eda939bd39e78d8b, 0x0000000000000000000000000000000000000000000000000000000000000000, 0xe5579a19fbb5e23814c993b61f9787647c0ef7240000000000000000000000000000000000000000000000000000000000000000bf5309690000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000661747461636b0000000000000000000000000000000000000000000000000000) + sender: 0xE28544d09E80004E68cfEE4C97Ce47664Af1D718· + Docs: https://viem.sh/docs/contract/decodeErrorResult + Version: viem@2.27.2" + + 157 | }) + 158 | ).rejects.toThrow('CallerIsNotOwner'); + > 159 | await expect( + | ^ + 160 | f.push.simulateContract({ + 161 | address: made.wallet, + 162 | abi: v5.abis.wallet, + + at getContractError (../../node_modules/viem/utils/errors/getContractError.ts:78:10) + at simulateContract (../../node_modules/viem/actions/public/simulateContract.ts:308:27) + at async Object. (__e2e__/agw/labels.spec.ts:159:5) + at Object.toThrow (../../node_modules/expect/build/index.js:218:22) + at Object. (__e2e__/agw/labels.spec.ts:175:15) + +PASS core-e2e packages/core/__e2e__/agw/native-exec.spec.ts (142.36 s) +PASS core-e2e packages/core/__e2e__/agw/lifecycle.spec.ts (84.523 s) + +Test Suites: 1 failed, 2 passed, 3 total +Tests: 1 failed, 14 passed, 15 total +Snapshots: 0 total +Time: 399.036 s +Ran all test suites within paths "packages/core/__e2e__/agw/labels.spec.ts", "packages/core/__e2e__/agw/native-exec.spec.ts", "packages/core/__e2e__/agw/lifecycle.spec.ts". +Jest did not exit one second after the test run has completed. + +'This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue. diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/live-agent-refusal.log b/plan/agw/research/v5-implementation-2026-10-07/logs/live-agent-refusal.log new file mode 100644 index 00000000..73007125 --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/logs/live-agent-refusal.log @@ -0,0 +1,13 @@ +PASS core-e2e packages/core/__e2e__/agw/labels.spec.ts (27.098 s) + agw labels + ✓ 4. an agent cannot rename through either the SDK or the contract (17146 ms) + ○ skipped 1. default and custom deployment labels are stored and listed + ○ skipped 2. owner rename and empty reset update info/list, emit LabelSet and tick the owner door + ○ skipped 3. UTF-8 byte boundaries are accepted or rejected without changing wallet state + ○ skipped 5. an external EVM owner creates and renames through its UEA + +Test Suites: 1 passed, 1 total +Tests: 4 skipped, 1 passed, 5 total +Snapshots: 0 total +Time: 27.117 s, estimated 173 s +Ran all test suites within paths "packages/core/__e2e__/agw/labels.spec.ts". diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/live-labels-initial.log b/plan/agw/research/v5-implementation-2026-10-07/logs/live-labels-initial.log new file mode 100644 index 00000000..3a50a50c --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/logs/live-labels-initial.log @@ -0,0 +1,29 @@ +FAIL core-e2e packages/core/__e2e__/agw/labels.spec.ts (149.394 s) + agw labels + ✓ 1. default and custom deployment labels are stored and listed (29006 ms) + ✓ 2. owner rename and empty reset update info/list, emit LabelSet and tick the owner door (33261 ms) + ✓ 3. UTF-8 byte boundaries are accepted or rejected without changing wallet state (20975 ms) + ✕ 4. an agent cannot rename through either the SDK or the contract (8338 ms) + ✓ 5. an external EVM owner creates and renames through its UEA (40675 ms) + + ● agw labels › 4. an agent cannot rename through either the SDK or the contract + + AgenticError: 0x330E269534acA1c0e0E735bba31124CDd16c1bD7 is neither the owner of 0x3fB84292fc6093F40008542dE3412581340D2feD nor the agent of an enabled rule + + 56 | const active = await readActiveRules(snap, generation, wallet); + 57 | if (!active.some((r) => r.agent === signerPushAccount)) { + > 58 | throw new AgenticError( + | ^ + 59 | AGENTIC_ERROR_CODE.NOT_OWNER_OR_AGENT, + 60 | `${signerPushAccount} is neither the owner of ${wallet} nor the agent of an enabled rule`, + 61 | { + + at resolveAgenticContext (src/lib/agentic/context.ts:58:13) + at async Function.createInstance (src/lib/push-chain/push-chain.ts:841:33) + at async Object. (__e2e__/agw/labels.spec.ts:66:19) + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 4 passed, 5 total +Snapshots: 0 total +Time: 149.412 s +Ran all test suites within paths "packages/core/__e2e__/agw/labels.spec.ts". diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/package.log b/plan/agw/research/v5-implementation-2026-10-07/logs/package.log new file mode 100644 index 00000000..8e1b97e4 --- /dev/null +++ b/plan/agw/research/v5-implementation-2026-10-07/logs/package.log @@ -0,0 +1 @@ +AGW package: CJS/ESM imports, compiled declaration examples and npm contents pass. No examples executed/published. diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/type-lib.log b/plan/agw/research/v5-implementation-2026-10-07/logs/type-lib.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/type-local.log b/plan/agw/research/v5-implementation-2026-10-07/logs/type-local.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/v5-implementation-2026-10-07/logs/type-spec.log b/plan/agw/research/v5-implementation-2026-10-07/logs/type-spec.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/v6-integration-2026-10-14/address-book.json b/plan/agw/research/v6-integration-2026-10-14/address-book.json new file mode 100644 index 00000000..bdf79c4a --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/address-book.json @@ -0,0 +1,142 @@ +{ + "network": "push-donut-testnet", + "chainId": 42101, + "generation": "v6", + "explorer": "https://donut.push.network", + "commit": "git:ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "branch": "deploy-agw", + "engineForkCommit": "7dc20e4", + "forge": "1.5.1-stable", + "deployer": "0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7", + "deployScript": "script/Deploy.s.sol", + "blocks": [ + 24229957, + 24229971 + ], + "deploymentGas": 19799340, + "deploymentCostPC": "0.0222742575", + "summary": "Fresh full suite for the SDK review fixes: URP with the Solana rulebook moved into the linked SvmRulebook library, EVM argument pins, zero-means-nothing limits; AGW with gateway auto-approve and createWallet; AGWFactory with createWallet / createWalletWithSig. Engine and validator are fresh too, bytecode-identical to v4/v5.", + "contracts": { + "factoryProxy": { + "address": "0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc", + "contract": "ERC1967Proxy (UUPS)", + "sizeBytes": 141, + "verified": true, + "explorer": "https://donut.push.network/address/0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc", + "deployTx": "0x4b83d7c060b24f56c165737addfae7a65d5b767e432d418c096bce8659422311", + "note": "PERMANENT, user-facing: deploy and look up wallets here. Also the EIP-712 verifyingContract for every OwnerIntent." + }, + "factoryLogic": { + "address": "0x64893c611920604a9247530673071D46ac9174c9", + "contract": "AGWFactory", + "sizeBytes": 14313, + "verified": true, + "explorer": "https://donut.push.network/address/0x64893c611920604a9247530673071D46ac9174c9", + "deployTx": "0x89de4ac81ba480f3fbe55a15f8d47d341fd96a55b1960e1d05b927fca7597054", + "note": "Adds createWallet(label, rules) and createWalletWithSig(intent, sig, label, rules) (selector 0x0a8f332b)." + }, + "walletImplementation": { + "address": "0x536D3EA48219ff743ac663C6c224920e9eB476A5", + "contract": "AGW", + "sizeBytes": 18818, + "verified": true, + "explorer": "https://donut.push.network/address/0x536D3EA48219ff743ac663C6c224920e9eB476A5", + "deployTx": "0x1765e66f36e8530321c4232df0e415a4dbcb15c211e807c49f5315ffd81dbf44", + "note": "Clone target; accountId push.agw.1.0.0. Gateway auto-approve on both doors; initializeAccount(string label, Session[] rules)." + }, + "urp": { + "address": "0xBA32e7A1500cb34311a31127bcD40CA52C8CFd36", + "contract": "TransparentUpgradeableProxy", + "sizeBytes": 830, + "verified": true, + "explorer": "https://donut.push.network/address/0xBA32e7A1500cb34311a31127bcD40CA52C8CFd36", + "deployTx": "0x2d5cf99ffa202f488659444e4bf5a35f4e691967688976a317c4b161b8e55b81", + "note": "PERMANENT: every v6 wallet pins it; every rule names it as its only action policy." + }, + "urpImplementation": { + "address": "0xa176b1424018D52711EDCb9d3D8757dc6e174463", + "contract": "UniversalRulesPolicy (version() still reports 3.1.0)", + "sizeBytes": 18538, + "verified": true, + "explorer": "https://donut.push.network/address/0xa176b1424018D52711EDCb9d3D8757dc6e174463", + "deployTx": "0xe26822d47178d2160b2d7fc2b9ea6b887dd55a321e04b9e8c411bf7493e404a2", + "note": "Verified with --libraries src/policies/SvmRulebook.sol:SvmRulebook:0x15c3259490f0625C75b5a00731e4231b2B529c1E." + }, + "svmRulebook": { + "address": "0x15c3259490f0625C75b5a00731e4231b2B529c1E", + "contract": "SvmRulebook (external library, linked into urpImplementation)", + "sizeBytes": 10612, + "verified": false, + "explorer": "https://donut.push.network/address/0x15c3259490f0625C75b5a00731e4231b2B529c1E", + "deployTx": "0x9bcdccc66827f1e65b2199dc279b3fde6f7cae6f23982d5c314ea8bbef43bbaa", + "note": "Deployed by forge through the CREATE2 deployer 0x4e59b44847b379578588920cA78FbF26c0B4956C. Blockscout does not index the internal creation, reports the address as not a contract, and refuses verification. The code is on chain (eth_getCode) and is embedded in urpImplementation." + }, + "urpProxyAdmin": { + "address": "0x5abC6Ae78EfE01c0F3d6b67389f88952Bf31A805", + "contract": "ProxyAdmin", + "sizeBytes": 926, + "verified": true, + "explorer": "https://donut.push.network/address/0x5abC6Ae78EfE01c0F3d6b67389f88952Bf31A805", + "note": "KEEP: no URP upgrade is possible without it. Created internally by the TUP; read from the ERC-1967 admin slot." + }, + "sessionValidator": { + "address": "0xBf08d8335c1cE41a577DB70666816027814737dD", + "contract": "AgentValidator", + "sizeBytes": 806, + "verified": true, + "explorer": "https://donut.push.network/address/0xBf08d8335c1cE41a577DB70666816027814737dD", + "deployTx": "0xd2ec49fff4e929750d77ba484d797b7ebb87e134dc4c4e9e70efb6a39e7779fc" + }, + "sessionEngine": { + "address": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "contract": "SmartSession (fork 7dc20e4)", + "sizeBytes": 22581, + "verified": true, + "explorer": "https://donut.push.network/address/0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "deployTx": "0x7397a445b52979b5596eccc7cd3028b1dd0308319abb25bc17b2e7050e912fdc" + } + }, + "external": { + "universalGateway": "0x00000000000000000000000000000000000000C1", + "universalCore": "0x00000000000000000000000000000000000000C0", + "ueaFactory": "0x00000000000000000000000000000000000000eA", + "universalExecutorModule": "0x14191Ea54B4c176fCf86f51b0FAc7CB1E71Df7d7", + "gatewayImplementationAtDeploy": "0x1e412939780f2b834DC42C7AC58d9f99888Da659", + "gatewayOutboundSelector": "0x77b86bec" + }, + "adminState": { + "factoryDefaultAdmin": "0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7", + "defaultAdminDelaySeconds": 172800, + "urpProxyAdminOwner": "0xa89523351BE1e2De64937AA9AF61Ae06eAd199C7", + "pauserRole": "none", + "operatorRole": "none", + "note": "Testnet: the factory's default admin and the URP ProxyAdmin owner are both the deployer EOA. PAUSER_ROLE and OPERATOR_ROLE are unassigned; grant them before the factory can be paused." + }, + "ruleEncoding": { + "initData": "abi.encode(uint16 version, string chainNamespace, bytes body), version 1", + "argPinTuple": "(uint16,uint8,bytes32) — offset (selector included, 4 = first argument), op (0 = EQ, 1 = MAX), value", + "allowedCallTuple": "(address,bytes4,uint16,bool,uint256,(uint16,uint8,bytes32)[])", + "universalTermsTuple": "(uint48,address,(address,uint256,uint256)[],uint256,(address,bytes4,uint16,bool,uint256,(uint16,uint8,bytes32)[])[])", + "nativeTermsTuple": "(uint48,address,bytes4,uint256,uint256,(bool,uint16,uint256,uint256),uint32,(uint16,uint8,bytes32)[])", + "tokens": "PRC20 addresses on Push, 1..8 per cross-chain rule; type(uint256).max = unlimited, 0 = nothing", + "maxCalls": "native rules: 0 is refused (ZeroMaxCalls); type(uint32).max = unlimited", + "maxAccounts": "Solana programs: 1..64 exact; 255 = any count; 0 and 65..254 refused", + "approvals": "none needed: the wallet approves the gateway for exactly the outbound amount and clears the allowance after the call", + "pushChainHash": "0x3d6bc1f1d3fb03065860265a8e93840b586e57075d956cd41b4319d040be87f9" + }, + "createWallet": { + "maxInitialRules": 8, + "signedForm": "createWalletWithSig: intent.sessionHash == keccak256(abi.encode(rules)) and intent.grantNonce == 0; the label is not signed", + "selector": "0x0a8f332b" + }, + "supersedes": { + "generation": "v5", + "factoryProxy": "0x8137F96A50EBF41d904e3678c84c391a0D1BCcc5", + "factoryLogic": "0xe549d3D4e85cB16F687448D7acA21D9d13A7cD0f", + "walletImplementation": "0x4D459Da499C14548aa16c46c57fD92880A88EBb4", + "urp": "0x603E7f0aF6e1aAFf46DDfb28b1e99364f8BC59af", + "sessionEngine": "0x165A5E6782f39D30B38c7D97e1303e4CB2aD102a", + "sessionValidator": "0x068EE2388475A98EE1f5a434C58bFF3444fffFe6", + "note": "v5 and v4 wallets keep working against the v4 URP and engine, which stay live; they do not get v6 behaviour. The v5 book is kept beside this one in deployments/address-book-v5/." + } +} diff --git a/plan/agw/research/v6-integration-2026-10-14/api.json b/plan/agw/research/v6-integration-2026-10-14/api.json new file mode 100644 index 00000000..fb545c0a --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/api.json @@ -0,0 +1,11520 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "31db25bb8f88699ae6daed556704135188b7558a", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [ + "AgenticPresets", + "DecodedSolanaRule", + "Pin", + "Preset", + "PresetAsset", + "PresetCategory", + "PresetOptions", + "PresetRuleTemplate", + "ReadyPresetOptions", + "RuleInput", + "Spent", + "WalletMarker" + ], + "removedExports": [ + "AgenticNetworkConstants", + "NativeRule", + "UniversalRule" + ], + "changedAgwTypes": [ + "AgenticWallet", + "AgenticError", + "AgenticRevertError", + "AGENTIC_ERROR_CODE", + "Rule", + "RuleInput", + "Pin", + "Spent", + "NativeRule", + "AssetCap", + "AllowedCall", + "UniversalRule", + "RulesRecord", + "CreateOptions", + "AgenticTxMetadata" + ], + "publicTypeChanges": [ + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticRevertError", + "AgenticErrorCode", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "CreateOptions", + "DecodedSolanaRule", + "Rule", + "RuleInput", + "Pin", + "Spent", + "WalletMarker", + "RulesRecord", + "Preset", + "PresetCategory", + "PresetAsset", + "PresetOptions", + "ReadyPresetOptions", + "PresetRuleTemplate", + "AgenticPresets" + ], + "transactionMethodChanges": [], + "instanceMethodChanges": [], + "agwConstantsChanged": true, + "before": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address(token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }): {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "after": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticPresets", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DecodedSolanaRule", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "Pin", + "PreparedRead", + "PreparedUniversalTx", + "Preset", + "PresetAsset", + "PresetCategory", + "PresetOptions", + "PresetRuleTemplate", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReadyPresetOptions", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RuleInput", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "Spent", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletMarker", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n delete(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n delete(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly DELETE_NEEDS_TARGET: \"DELETE_NEEDS_TARGET\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "DELETE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"DELETE_NEEDS_TARGET\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RuleInput": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[] | import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Pin": { + "type": "{\n account: number;\n arg?: never;\n expected: \"agentic:wallet\" | string;\n max?: never;\n token?: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n} | {\n account?: never;\n arg: number;\n expected: \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint;\n max?: never;\n} | {\n account?: never;\n arg: number;\n expected?: never;\n max: bigint;\n}", + "members": { + "account": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "arg": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "bigint | string | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "Spent": { + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"native\" | \"universal\"" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall", + "members": { + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Pin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "spent": { + "optional": false, + "readonly": false, + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly DELETE_NEEDS_TARGET: \"DELETE_NEEDS_TARGET\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "DELETE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"DELETE_NEEDS_TARGET\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n delete(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n delete(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall", + "members": { + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Pin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "DecodedSolanaRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[]" + }, + "ceaAccounts": { + "optional": false, + "readonly": false, + "type": "readonly `0x${string}`[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`solana:${string}`" + }, + "dataPins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmDataPinWire[]" + }, + "expectedCEA": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "format": { + "optional": false, + "readonly": false, + "type": "\"decoded\"" + }, + "gatewayProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmAccountPinWire[]" + }, + "programs": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").AllowedProgramWire[]" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RuleInput": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[] | import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Pin": { + "type": "{\n account: number;\n arg?: never;\n expected: \"agentic:wallet\" | string;\n max?: never;\n token?: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n} | {\n account?: never;\n arg: number;\n expected: \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint;\n max?: never;\n} | {\n account?: never;\n arg: number;\n expected?: never;\n max: bigint;\n}", + "members": { + "account": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "arg": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "bigint | string | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "Spent": { + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"native\" | \"universal\"" + } + } + }, + "WalletMarker": { + "type": "\"agentic:wallet\"", + "members": {} + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "spent": { + "optional": false, + "readonly": false, + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + }, + "Preset": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").Preset", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace[]" + }, + "constant": { + "optional": false, + "readonly": false, + "type": "\"DEXES\" | \"LENDING\" | \"PREDICTION\"" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"CATEGORY\"" + } + } + }, + "PresetCategory": { + "type": "\"DEXES\" | \"LENDING\" | \"PREDICTION\"", + "members": {} + }, + "PresetAsset": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "PresetOptions": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetOptions", + "members": { + "agent": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadyPresetOptions": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").ReadyPresetOptions", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PresetRuleTemplate": { + "type": "{\n agent?: `0x${string}`;\n validUntil?: number;\n} & Omit", + "members": { + "agent": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "AgenticPresets": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").AgenticPresets", + "members": { + "get": { + "optional": false, + "readonly": false, + "type": "{\n (preset: import(\"sdk/src/lib/agentic/presets/types\").PresetCategory, options: import(\"sdk/src/lib/agentic/presets/types\").ReadyPresetOptions): {\n rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[];\n };\n (preset: import(\"sdk/src/lib/agentic/presets/types\").PresetCategory, options?: import(\"sdk/src/lib/agentic/presets/types\").PresetOptions): {\n rules: import(\"sdk/src/lib/agentic/presets/types\").PresetRuleTemplate[];\n };\n}" + }, + "list": { + "optional": false, + "readonly": false, + "type": "(options?: {\n type?: \"CATEGORY\";\n}) => {\n presets: import(\"sdk/src/lib/agentic/presets/types\").Preset[];\n}" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly<{\n PRESETS: Readonly<{\n CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n }>;\n }>;\n WALLET: \"agentic:wallet\";\n }>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": true, + "type": "{\n readonly presets: import(\"sdk/src/lib/agentic/presets/types\").AgenticPresets;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address: (token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "PRESETS": { + "optional": false, + "readonly": true, + "type": "{\n readonly CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n }>;\n}" + }, + "WALLET": { + "optional": false, + "readonly": true, + "type": "\"agentic:wallet\"" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly PRESETS: Readonly<{\n CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n }>;\n }>;\n readonly WALLET: \"agentic:wallet\";\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "scope": "All root exports and declared public members, PushChain static/instance members, universal transaction methods, utility groups, readonly/optional markers and constants. Behavior/default/deployment changes need the written session review." +} diff --git a/plan/agw/research/v6-integration-2026-10-14/atomic-receipt-unit.log b/plan/agw/research/v6-integration-2026-10-14/atomic-receipt-unit.log new file mode 100644 index 00000000..0bd54807 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/atomic-receipt-unit.log @@ -0,0 +1,27 @@ +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts + agentic.create + ✓ validates first, then sends deploy + grants in input order and returns receipt IDs (8 ms) + ✓ a bare wallet is one deployWallet call, no funding + ✓ invalid input never reaches the signer (1 ms) + ✓ refuses a changed URP version before grant signing (1 ms) + ✓ a different wallet in the receipt is RECEIPT_MISMATCH, not a safe-to-retry race + ✓ IDs that differ from the input order are a RECEIPT_MISMATCH, not a silent reorder (1 ms) + ✓ creation never uses the batch transport or a sequential fallback (5 ms) + ✓ a receipt that cannot be read after submission keeps the hash and reports unknown state + ✓ the deploy is index-bound: a raced slot reverts and is reported as INDEX_RACE with nothing committed (3 ms) + ✓ a later rename alone does not establish a competing creation (1 ms) + ✓ a slot that is already deployed is refused before signing + rules.add / rules.delete + ✓ add: owner-only, duplicate agent/chain refused before signing (1 ms) + ✓ add: several rules are one atomic owner execute batch (one signature on any signer) (2 ms) + ✓ revoke: bare and empty are refused; unknown IDs fail before signing; several IDs are one atomic owner execute (2 ms) + rules.update — one owner batch: assert → revoke → grant + ✓ builds exactly one execute(batch) with the observed spend asserted per pair (1 ms) + ✓ universal replacement asserts every asset in stored order before revoke/grant (1 ms) + ✓ replacement may name another live agent, but may not repeat an old ID (1 ms) + +Test Suites: 1 passed, 1 total +Tests: 17 passed, 17 total +Snapshots: 0 total +Time: 4.952 s +Ran all test suites within paths "packages/core/src/lib/agentic/__tests__/management.spec.ts". diff --git a/plan/agw/research/v6-integration-2026-10-14/build.log b/plan/agw/research/v6-integration-2026-10-14/build.log new file mode 100644 index 00000000..8e9daca6 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/build.log @@ -0,0 +1,13 @@ + +> nx run core:build + +Compiling TypeScript files for project "core"... +Done compiling TypeScript files for project "core". +(node:20847) Warning: The 'NO_COLOR' env is ignored due to the 'FORCE_COLOR' env being set. +(Use `node --trace-warnings ...` to show where the warning was created) + + + + NX Successfully ran target build for project core + + diff --git a/plan/agw/research/v6-integration-2026-10-14/bytecode-comparison.json b/plan/agw/research/v6-integration-2026-10-14/bytecode-comparison.json new file mode 100644 index 00000000..3e0963e0 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/bytecode-comparison.json @@ -0,0 +1,190 @@ +{ + "block": "24245374", + "source": "git:ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "contracts": [ + { + "contract": "factoryLogic", + "address": "0x64893c611920604a9247530673071D46ac9174c9", + "executableMatchesOutsideImmutableAndLinkSlots": true, + "runtimeHash": "0xacd72a9e53ad4187ee52b21fc79165eee8b54be16de27be1af41c230a4ac4fe4", + "ignoredSlots": [ + { + "start": 3190, + "length": 32 + }, + { + "start": 3348, + "length": 32 + } + ], + "metadataExcluded": true + }, + { + "contract": "walletImplementation", + "address": "0x536D3EA48219ff743ac663C6c224920e9eB476A5", + "executableMatchesOutsideImmutableAndLinkSlots": true, + "runtimeHash": "0x1076635b6ee6479e3c86f3760015f1746131c5ede0367d84aa77fe0989e9aec2", + "ignoredSlots": [ + { + "start": 1483, + "length": 32 + }, + { + "start": 2134, + "length": 32 + }, + { + "start": 2941, + "length": 32 + }, + { + "start": 4732, + "length": 32 + }, + { + "start": 5260, + "length": 32 + }, + { + "start": 5899, + "length": 32 + }, + { + "start": 12242, + "length": 32 + }, + { + "start": 14129, + "length": 32 + }, + { + "start": 15880, + "length": 32 + }, + { + "start": 16225, + "length": 32 + }, + { + "start": 17414, + "length": 32 + }, + { + "start": 18229, + "length": 32 + }, + { + "start": 2874, + "length": 32 + }, + { + "start": 16857, + "length": 32 + }, + { + "start": 17363, + "length": 32 + }, + { + "start": 1196, + "length": 32 + }, + { + "start": 11950, + "length": 32 + }, + { + "start": 14191, + "length": 32 + }, + { + "start": 17312, + "length": 32 + }, + { + "start": 6166, + "length": 32 + }, + { + "start": 11876, + "length": 32 + }, + { + "start": 14934, + "length": 32 + }, + { + "start": 17171, + "length": 32 + }, + { + "start": 17987, + "length": 32 + }, + { + "start": 18379, + "length": 32 + }, + { + "start": 18478, + "length": 32 + } + ], + "metadataExcluded": true + }, + { + "contract": "urpImplementation", + "address": "0xa176b1424018D52711EDCb9d3D8757dc6e174463", + "executableMatchesOutsideImmutableAndLinkSlots": true, + "runtimeHash": "0x0e6569329ccb464febd53369c71fe377c7570fdf3eb42e71927702080d09176e", + "ignoredSlots": [ + { + "start": 3060, + "length": 20 + }, + { + "start": 3707, + "length": 20 + }, + { + "start": 6121, + "length": 20 + } + ], + "metadataExcluded": true + }, + { + "contract": "sessionValidator", + "address": "0xBf08d8335c1cE41a577DB70666816027814737dD", + "executableMatchesOutsideImmutableAndLinkSlots": true, + "runtimeHash": "0xd76a8e352533b443a78e7cea4798372cd143071ff54377371854b39be64752e2", + "ignoredSlots": [], + "metadataExcluded": true + }, + { + "contract": "sessionEngine", + "address": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "executableMatchesOutsideImmutableAndLinkSlots": true, + "runtimeHash": "0x5fa747bb1b2fb6635dbc22608f86a18a743d6ed9b3f394abf812ee3d4199bdde", + "ignoredSlots": [], + "metadataExcluded": true + }, + { + "contract": "svmRulebook", + "address": "0x15c3259490f0625C75b5a00731e4231b2B529c1E", + "executableMatchesOutsideImmutableAndLinkSlots": true, + "runtimeHash": "0x917123d637590afda6183f7942449e671e05d9a6f5ab0cb0628c2553111cfc3e", + "ignoredSlots": [ + { + "start": 7, + "length": 32 + }, + { + "start": 1, + "length": 20 + } + ], + "metadataExcluded": true + } + ] +} diff --git a/plan/agw/research/v6-integration-2026-10-14/commands.md b/plan/agw/research/v6-integration-2026-10-14/commands.md new file mode 100644 index 00000000..43ccd822 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/commands.md @@ -0,0 +1,13 @@ +# V6 validation commands and limits + +- Isolated preparation: `OUT=/tmp/agw-oct14-v6 AGW_PIN=ffd567d3e49b2d27c6f50ad36093274dbac3090f bash packages/core/scripts/agw-local/prepare.sh`. Original contract checkout was fetched/read, never checked out or modified. +- ABI snapshots: isolated Forge output; policy errors include the linked SvmRulebook ABI errors. JSON hashes are in packages/core/scripts/agw-local/abis/manifest.json; gen-abi.mjs reproduces the TS files. +- Full unit suite: `node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand`. +- Local suite: `AGW_LOCAL_DIR=/tmp/agw-oct14-v6 node node_modules/jest/bin/jest.js --config packages/core/jest.agw-local.config.ts --runInBand`. +- Build: `NX_DAEMON=false node node_modules/nx/bin/nx.js run core:build --skip-nx-cache`. +- Typechecks: existing lib/spec/agw-local tsconfigs with --noEmit. Consumer checks: check-agw-docs.js, check-agw-package.js and check-agw-api.js. +- Live preflight: ci/preflight.ts --group agw --dry-run, using the existing testnet keys without printing them. +- Full live run: ci/run.ts --group agw, serial. Started with 68 selected scenarios; the later-added v6 destination-pin case was filtered out (69 loaded). Result: 67 passed, one stale allowance assertion failed, one filtered out. V6 correctly cleared a pre-existing allowance to zero; assertion fixed. +- Focused run: Jest E2E config, runInBand, v5-multiasset.spec.ts and universal-evm.spec.ts, testNamePattern `agw v5 multi-asset 3\.|agw universal evm 3\.`. Covers the corrected case and the newly added EVM EQ/MAX alternative case. + +Local gateway/token fixtures prove Push contract execution, not destination delivery. Live evidence covers actual Donut→Sepolia/Solana devnet transactions. No real contracts were deployed by the SDK work. Do not describe combined full/focused coverage as one clean full run. diff --git a/plan/agw/research/v6-integration-2026-10-14/contract-changes.md b/plan/agw/research/v6-integration-2026-10-14/contract-changes.md new file mode 100644 index 00000000..0023be4b --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/contract-changes.md @@ -0,0 +1,185 @@ +# Push Agentic Wallet — what changed in v6 + +**Deployed on Donut (chain `42101`) on 2026-10-14** from branch `deploy-agw`, commit `ffd567d`. Addresses: +[`docs/addresses/donut.md`](addresses/donut.md). + +v6 ships the fixes from the SDK team's first review of v5. It is a **fresh deployment**: every contract has a new +address. The v5 contracts stay on chain and v5 wallets keep working, but they do not get any of the changes below. + +--- + +## At a glance + +| Contract | Changed in v6? | What changed, in one line | +|---|---|---| +| **AGW** (the wallet) | Yes | Approves the gateway by itself before an outbound; can receive its first rules while it is being created | +| **AGWFactory** | Yes | New `createWallet` and `createWalletWithSig`: a wallet and its rules in one transaction | +| **UniversalRulesPolicy (URP)** | Yes | Argument pins on cross-chain calls; a zero limit now means "nothing"; smaller contract | +| **SvmRulebook** | New | The Solana rules, moved out of URP into a linked library; no behaviour change | +| **AgentValidator** | No | Same code, new address | +| **SmartSession** (engine) | No | Same code, new address | + +--- + +## 1. AGW — the wallet + +### No more approve step before sending tokens cross-chain + +**Before:** to send tokens out through the gateway, the owner or the agent first had to call +`token.approve(gateway, amount)`. Without that, the gateway could not pull the tokens and the outbound failed. + +**Now:** the wallet does it automatically. When a call is the gateway's `sendUniversalTxOutbound`, the wallet: + +1. approves the gateway for **exactly** the amount in the request; +2. makes the call; +3. sets the allowance back to **0** afterwards. + +- **It works the same on every door:** the owner (`execute`), a signed owner intent (`executeWithSig`) and the agent + (`executeAsAgent`). +- **On the agent door it runs only after URP has accepted the request,** so only a listed token within its limits is + ever approved. +- **It can never make a call fail.** If the request can't be read, or the token behaves oddly, the wallet skips the + approval and forwards the call unchanged. The gateway still decides whether the transfer happens. +- **Standing allowances don't last.** After any outbound in a token, the wallet's allowance to the gateway for that + token is 0, even if the owner set one on purpose. + +**For integrators:** remove the approve step. Sending one is harmless but unnecessary. + +### A wallet can be created with its rules already granted + +`initializeAccount` now takes the initial rules as well as the label. The factory calls it once, at creation. The rules +go through exactly the same checks as a normal `grantRules`. If any rule is refused, the whole creation is undone, so a +wallet never exists with only some of its rules. + +### Unchanged + +- **`execute`** (the owner door) is byte-for-byte the code that was reviewed. +- The label (`label()`, `setLabel`), the checkpoint counter, revoking rules and the signed-intent doors work as before. + +--- + +## 2. AGWFactory + +### `createWallet` and `createWalletWithSig`: one transaction instead of two + +**Before:** `deployWallet`, then a separate `grantRules` for each rule. + +**Now:** + +| Function | Who is the owner | What it does | +|---|---|---| +| `createWallet(label, rules)` | the caller | Deploys the caller's next wallet and grants up to **8** rules | +| `createWalletWithSig(intent, sig, label, rules)` | whoever signed `intent` | The same, submitted by a relayer on the owner's behalf | + +- **The address is the same** one `predictWallet` returns. Pre-funding the predicted address still works. +- **All or nothing:** either the wallet exists with every rule, or nothing happened. +- **The rule ids come back** in the same order as the rules. +- **An empty rules list** behaves exactly like `deployWallet` / `deployWalletWithSig`. +- **The signed form binds the rules to the signature.** It requires `intent.sessionHash = keccak256(abi.encode(rules))` + over the whole array, and `intent.grantNonce = 0`. The label is not signed, as in `deployWalletWithSig`. The + `OwnerIntent` format is unchanged. +- **Pausing** the factory stops these two as well as the deploy functions. +- **New errors:** `TooManyInitialRules`, `IntentRulesMismatch`, `IntentGrantNonceNotZero`. +- **`createWalletWithSig` selector:** `0x0a8f332b`. + +### Unchanged + +`deployWallet`, `deployWalletWithSig`, `predictWallet`, `ownerOf`, `isWallet` and the address formula are unchanged. +Owner intents must be signed for the **new factory address**, because the factory is the EIP-712 domain. + +--- + +## 3. UniversalRulesPolicy (URP) — the rules engine + +### Argument pins on cross-chain calls + +A cross-chain rule's allow-list says which contract and function the agent may call on the destination chain. **Each +entry can now also pin the call's arguments.** + +```solidity +enum PinOp { EQ, MAX } +struct ArgPin { uint16 offset; PinOp op; bytes32 value; } +struct AllowedCall { + address target; bytes4 selector; uint16 beneficiaryOffset; bool hasBeneficiary; uint256 maxValue; + ArgPin[] pins; // new +} +``` + +- **`EQ`:** the argument must equal `value`, for example "the spender must be Aave's pool". +- **`MAX`:** the argument must not exceed `value`, for example "approve at most 1,000 USDC per call". It limits one + call, not a total. +- **`offset`** counts from the start of the calldata, selector included, so `4` is the first argument. Only + fixed-size arguments can be pinned. +- **Limits:** up to 8 pins per entry, and up to 32 across the whole allow-list. + +**Matching changed as well.** v5 checked only the first entry for a given contract and function. v6 lets the call +through if **any** entry for that contract and function passes in full: beneficiary, value cap and every pin. That's +what lets one rule allow "approve to Aave **or** to Uniswap". If no entry passes, the error reported is the **first** +matching entry's. + +**For integrators:** an entry with no pins sitting beside a pinned entry for the same function makes the pins +pointless. The SDK should refuse that shape. + +### Native rules get `MAX` pins too + +Push-side rules use the same `ArgPin` type. In v5 a native pin could only mean "equals" (`{offset, expected}`); now +it is `{offset, op, value}` and supports `MAX`. + +### A zero limit now means "nothing", never "unlimited" + +In v5, a few fields used `0` to mean "no limit". In v6, zero never means unlimited. + +| Field | v5 | v6 | +|---|---|---| +| Native `maxCalls` | `0` = unlimited | `0` is **refused** (`ZeroMaxCalls`). Unlimited is `type(uint32).max` (`UNLIMITED_CALLS`). | +| Solana program `maxAccounts` | `0` = any number of accounts | `1`–`64` = exactly that many; `255` = any (`ANY_ACCOUNT_COUNT`); `0` and `65`–`254` refused (`SvmMaxAccountsOutOfRange`) | +| Token and value caps | `type(uint256).max` = unlimited, `0` = nothing | unchanged | + +**For integrators:** any rule built with `maxCalls: 0` or `maxAccounts: 0` must be updated, or it will be refused when +granted. + +### Smaller contract + +The Solana rules moved into **`SvmRulebook`** (below), which brought URP from 24,326 bytes, just under the +24,576-byte limit, down to 18,538. That leaves room for future changes. + +### Unchanged + +- The rule envelope `abi.encode(uint16 version, string chainNamespace, bytes body)`, `version = 1`. +- Multi-asset caps, gas caps, expiry, and the rule that the chain string decides the rulebook. +- `version()` still returns `"3.1.0"`. + +--- + +## 4. SvmRulebook — new + +The Solana rulebook (checks S1–S18) as a separate **library linked into URP**. It runs inside URP, through +`DELEGATECALL`, so to callers nothing changed: same errors, same events (emitted from URP's address), same storage. + +- **It holds no funds and no state of its own,** and it calls nothing else. +- **Its address is built into URP's code at deployment.** It can't be swapped later. +- **It isn't verified on the explorer.** Donut's Blockscout doesn't index contracts created through the CREATE2 + helper, so it won't verify this one. URP's own verification names the library's address, which confirms which + code URP runs. + +--- + +## 5. AgentValidator and SmartSession + +**No code changes.** They were redeployed only because v6 is a fresh suite: URP points at the engine, and the wallet +points at all three. + +--- + +## What integrators need to do + +| | Action | +|---|---| +| Addresses | Switch to the v6 factory and URP (see the address book). Sign owner intents for the **new factory**. | +| Outbound | Remove the `approve(gateway, amount)` step. | +| Creating wallets | Optionally use `createWallet` / `createWalletWithSig` to create and grant in one step. | +| Cross-chain rule encoding | `AllowedCall` has a new last field, `ArgPin[] pins` (an empty array is fine). | +| Native rule encoding | `ArgPin` is now `{offset, op, value}`; `maxCalls` must be non-zero (`type(uint32).max` for unlimited). | +| Solana rule encoding | `maxAccounts` must be `1`–`64`, or `255` for any. | + +ABI tuples for the new encodings are in [`docs/addresses/donut.md`](addresses/donut.md#how-to-grant-a-rule-current-encoding). diff --git a/plan/agw/research/v6-integration-2026-10-14/credential-scan.json b/plan/agw/research/v6-integration-2026-10-14/credential-scan.json new file mode 100644 index 00000000..4a32acc9 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/credential-scan.json @@ -0,0 +1,4 @@ +{ + "scope": "v6 review artifacts only; no environment files read", + "literal_credential_candidates": [] +} diff --git a/plan/agw/research/v6-integration-2026-10-14/docs.log b/plan/agw/research/v6-integration-2026-10-14/docs.log new file mode 100644 index 00000000..7f37e7a9 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/docs.log @@ -0,0 +1 @@ +AGW guide: 5 TypeScript blocks typechecked against public exports; no examples executed. diff --git a/plan/agw/research/v6-integration-2026-10-14/e2e-selection.log b/plan/agw/research/v6-integration-2026-10-14/e2e-selection.log new file mode 100644 index 00000000..36150c39 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/e2e-selection.log @@ -0,0 +1,72 @@ +✓ agw-create-bare 1 test +✓ agw-create-rules 1 test +✓ agw-funding-pc 1 test +✓ agw-funding-allowance 1 test +✓ agw-native-batch 1 test +✓ agw-native-batch-rollback 1 test +✓ agw-native-agent 1 test +✓ agw-native-owner 1 test +✓ agw-native-over-cap 1 test +✓ agw-native-stranger 1 test +✓ agw-native-revoked 1 test +✓ agw-native-expired 1 test +✓ agw-lifecycle-add 1 test +✓ agw-lifecycle-update 1 test +✓ agw-lifecycle-checkpoints 1 test +✓ agw-lifecycle-revoke-all 1 test +✓ agw-v6-destination-pins 1 test +✓ agw-universal-outbound 1 test +✓ agw-v5-multi-asset 1 test +✓ agw-v5-call-only 1 test +✓ agw-universal-dest-revert 1 test +✓ agw-identity-evm 1 test +✓ agw-identity-first-use 1 test +✓ agw-identity-solana 1 test +✓ agw-responses-hooks 1 test +✓ agw-responses-replay 1 test +✓ agw-public-svm-1 1 test +✓ agw-public-svm-2 1 test +✓ agw-public-svm-3 1 test +✓ agw-public-svm-4 1 test +✓ agw-public-svm-5 1 test +✓ agw-public-svm-6 1 test +✓ agw-labels-1 1 test +✓ agw-labels-2 1 test +✓ agw-labels-3 1 test +✓ agw-labels-4 1 test +✓ agw-labels-5 1 test +✓ agw-labels-6 1 test +✓ agw-labels-7 1 test +✓ agw-labels-8 1 test +✓ agw-v5-independent-token-budgets 1 test +✓ agw-owner-spl-transfer 1 test +✓ agw-native-multi-action-1 1 test +✓ agw-native-multi-action-2 1 test +✓ agw-native-multi-action-3 1 test +✓ agw-native-multi-action-4 1 test +✓ agw-native-multi-action-5 1 test +✓ agw-native-multi-action-6 1 test +✓ agw-native-multi-action-7 1 test +✓ agw-native-multi-action-8 1 test +✓ agw-native-multi-action-9 1 test +✓ agw-native-multi-action-10 1 test +✓ agw-extended-prefunding 1 test +✓ agw-extended-duplicate-rules 1 test +✓ agw-extended-batched-lifecycle 1 test +✓ agw-extended-invalid-revoke 1 test +✓ agw-extended-stale-update 1 test +✓ agw-extended-index-race 1 test +✓ agw-extended-native-policy-1 1 test +✓ agw-extended-native-policy-2 1 test +✓ agw-extended-native-policy-3 1 test +✓ agw-extended-native-policy-4 1 test +✓ agw-extended-native-policy-5 1 test +✓ agw-extended-native-policy-6 1 test +✓ agw-extended-native-policy-7 1 test +✓ agw-extended-native-policy-8 1 test +✓ agw-extended-native-policy-9 1 test +✓ agw-extended-native-policy-10 1 test +✓ agw-extended-native-policy-11 1 test + +69 scenarios, 15 spec files, 69 distinct tests. +Manifest is consistent with the specs. diff --git a/plan/agw/research/v6-integration-2026-10-14/full-unit.log b/plan/agw/research/v6-integration-2026-10-14/full-unit.log new file mode 100644 index 00000000..e6fa65d8 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/full-unit.log @@ -0,0 +1,176 @@ +PASS core packages/core/src/lib/agentic/__tests__/management.spec.ts +PASS core packages/core/src/lib/universal/account/account.spec.ts + ● Console + + console.warn + [PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead. + + 207 | ): Promise { + 208 | if (!_convertOriginToExecutorWarned) { + > 209 | console.warn( + | ^ + 210 | '[PushChain] convertOriginToExecutor() is deprecated. Use deriveExecutorAccount() instead.' + 211 | ); + 212 | _convertOriginToExecutorWarned = true; + + at Object.convertOriginToExecutor (src/lib/universal/account/account.ts:209:13) + at Object. (src/lib/universal/account/account.spec.ts:80:52) + + console.warn + [PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead. + + 425 | ): Promise { + 426 | if (!options?._internal && !_convertExecutorToOriginWarned) { + > 427 | console.warn( + | ^ + 428 | '[PushChain] convertExecutorToOrigin() is deprecated. Use resolveControllerAccount() instead.' + 429 | ); + 430 | _convertExecutorToOriginWarned = true; + + at convertExecutorToOrigin (src/lib/universal/account/account.ts:427:13) + at Object. (src/lib/universal/account/account.spec.ts:106:38) + +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts +PASS core packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts +PASS core packages/core/src/lib/utils.spec.ts + ● Console + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:973:17) + + console.log + 1.5 + + at Object. (src/lib/utils.spec.ts:977:17) + + console.log + 1.23 + + at Object. (src/lib/utils.spec.ts:982:17) + +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/reads-context.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/codec.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/send.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/labels.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/public-surface.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-executor.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts +PASS core packages/core/src/lib/universal/signer/signer.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/response-surface.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/public-rule.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts +PASS core packages/core/src/lib/push-client/push-client.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts +PASS core packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/svm-account.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts +PASS core packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-params.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-types.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts +PASS core packages/core/src/lib/constants/__tests__/token-constants.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/preflight.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts +PASS core packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/validate.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/read-events.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts +PASS core packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/errors.spec.ts +PASS core packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts +PASS core packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts +PASS core packages/core/src/lib/formatters.spec.ts +PASS core packages/core/src/lib/read-state/__tests__/budget.spec.ts +PASS core packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts +PASS core packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts + +Test Suites: 1 skipped, 123 passed, 123 of 124 total +Tests: 12 skipped, 2073 passed, 2085 total +Snapshots: 0 total +Time: 31.744 s, estimated 63 s +Ran all test suites. diff --git a/plan/agw/research/v6-integration-2026-10-14/head-recheck.json b/plan/agw/research/v6-integration-2026-10-14/head-recheck.json new file mode 100644 index 00000000..54ba1d09 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/head-recheck.json @@ -0,0 +1,6 @@ +{ + "checked_at": "2026-10-14T17:35:34.427115+00:00", + "deploy_agw_head": "e57998c2d8ef9db15e69a68061ad3101120a6c6c", + "deployed_source": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "source_diff_from_pin": "" +} diff --git a/plan/agw/research/v6-integration-2026-10-14/live-evidence.jsonl b/plan/agw/research/v6-integration-2026-10-14/live-evidence.jsonl new file mode 100644 index 00000000..bf7dd8d3 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/live-evidence.jsonl @@ -0,0 +1,68 @@ +{"name":"native-multi-grant-read-send","at":"2026-10-14T16:47:12.099Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x1E16B0Bdc3C48941d0cB35F6588Da19529AA7D81","id":"0x910a0ca05d23f210ed781e6fdc04639bfc8fd1b3449f2d9c621b53bd534c326c","copy":"0x93fFb6c7c3937A00f36A8542c9215B2168a8d61B","hashes":["0xd695b5cb4b5117d9e1c0bafcf649547efddd135083fdfe086b0f5bb0e5092e5b","0x037a07e5f0de374061fffc1b50b8f353396aa425a9a5b7f6d8cb645993101050","0x53eca49822b9bc27b13bf52fc614262ff98bf500aa5f651eac51ddbc9508fb52","0xaa3333de5275f84257c9ca818eea4d93452995bb72bf225df71c2c8e44cabfd0"],"state":{"configs":[{"actionId":"0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c","config":{"initialized":true,"validUntil":1791999967,"target":"0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf","selector":"0xffffffff","maxValuePerCall":"1","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"1","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":1,"pins":[]}},{"actionId":"0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d","config":{"initialized":true,"validUntil":1791999967,"target":"0x2971824Db68229D087931155C2b8bB820B275809","selector":"0xa9059cbb","maxValuePerCall":"0","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":1,"pins":[{"offset":4,"op":0,"value":"0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"},{"offset":36,"op":1,"value":"0x0000000000000000000000000000000000000000000000000000000000000003"}]}}],"walletPC":"9","recipientPC":"969371238378936756997459","walletToken":"18","recipientToken":"434311515549551167987","checkpointCount":"1","grantNonce":"1"}} +{"name":"native-multi-refused","at":"2026-10-14T16:47:41.975Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x20E833F6F2EBcf52F250B2E6f480dCac8Eb1aF62","id":"0x910a0ca05d23f210ed781e6fdc04639bfc8fd1b3449f2d9c621b53bd534c326c","gate":"PolicyCheckReverted(ArgPinMismatch)","state":{"configs":[{"actionId":"0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c","config":{"initialized":true,"validUntil":1792000032,"target":"0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf","selector":"0xffffffff","maxValuePerCall":"1","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":0,"pins":[]}},{"actionId":"0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d","config":{"initialized":true,"validUntil":1792000032,"target":"0x2971824Db68229D087931155C2b8bB820B275809","selector":"0xa9059cbb","maxValuePerCall":"0","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":0,"pins":[{"offset":4,"op":0,"value":"0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"},{"offset":36,"op":1,"value":"0x0000000000000000000000000000000000000000000000000000000000000003"}]}}],"walletPC":"10","recipientPC":"969371237041228506997449","walletToken":"20","recipientToken":"434311515549551167967","checkpointCount":"1","grantNonce":"1"},"agentNonce":2} +{"name":"native-multi-refused","at":"2026-10-14T16:47:45.869Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x20E833F6F2EBcf52F250B2E6f480dCac8Eb1aF62","id":"0x910a0ca05d23f210ed781e6fdc04639bfc8fd1b3449f2d9c621b53bd534c326c","gate":"PolicyCheckReverted(ArgPinAboveMax)","state":{"configs":[{"actionId":"0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c","config":{"initialized":true,"validUntil":1792000032,"target":"0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf","selector":"0xffffffff","maxValuePerCall":"1","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":0,"pins":[]}},{"actionId":"0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d","config":{"initialized":true,"validUntil":1792000032,"target":"0x2971824Db68229D087931155C2b8bB820B275809","selector":"0xa9059cbb","maxValuePerCall":"0","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":0,"pins":[{"offset":4,"op":0,"value":"0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"},{"offset":36,"op":1,"value":"0x0000000000000000000000000000000000000000000000000000000000000003"}]}}],"walletPC":"10","recipientPC":"969371237041228506997449","walletToken":"20","recipientToken":"434311515549551167967","checkpointCount":"1","grantNonce":"1"},"agentNonce":2} +{"name":"native-multi-refused","at":"2026-10-14T16:47:49.720Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x20E833F6F2EBcf52F250B2E6f480dCac8Eb1aF62","id":"0x910a0ca05d23f210ed781e6fdc04639bfc8fd1b3449f2d9c621b53bd534c326c","gate":"NoPoliciesSet","state":{"configs":[{"actionId":"0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c","config":{"initialized":true,"validUntil":1792000032,"target":"0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf","selector":"0xffffffff","maxValuePerCall":"1","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":0,"pins":[]}},{"actionId":"0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d","config":{"initialized":true,"validUntil":1792000032,"target":"0x2971824Db68229D087931155C2b8bB820B275809","selector":"0xa9059cbb","maxValuePerCall":"0","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":0,"pins":[{"offset":4,"op":0,"value":"0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"},{"offset":36,"op":1,"value":"0x0000000000000000000000000000000000000000000000000000000000000003"}]}}],"walletPC":"10","recipientPC":"969371237041228506997449","walletToken":"20","recipientToken":"434311515549551167967","checkpointCount":"1","grantNonce":"1"},"agentNonce":2} +{"name":"native-multi-independent-counters","at":"2026-10-14T16:49:04.936Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x74877361de346757bf4342fEaC0C2eFdAd44343f","id":"0x910a0ca05d23f210ed781e6fdc04639bfc8fd1b3449f2d9c621b53bd534c326c","state":{"configs":[{"actionId":"0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c","config":{"initialized":true,"validUntil":1792000070,"target":"0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf","selector":"0xffffffff","maxValuePerCall":"1","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"2","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":3,"pins":[]}},{"actionId":"0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d","config":{"initialized":true,"validUntil":1792000070,"target":"0x2971824Db68229D087931155C2b8bB820B275809","selector":"0xa9059cbb","maxValuePerCall":"0","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":3,"pins":[{"offset":4,"op":0,"value":"0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"},{"offset":36,"op":1,"value":"0x0000000000000000000000000000000000000000000000000000000000000003"}]}}],"walletPC":"8","recipientPC":"969371235703520256997441","walletToken":"14","recipientToken":"434311515549551167953","checkpointCount":"1","grantNonce":"1"}} +{"name":"native-multi-mixed-batch","at":"2026-10-14T16:49:50.703Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x2BF97CF5fd4c15113E5c0be1395101d9e2aaC896","id":"0x910a0ca05d23f210ed781e6fdc04639bfc8fd1b3449f2d9c621b53bd534c326c","hash":"0x1891122599f8c911386acf9045e256681f6d6aee6fad72a451efd982e1e2beb7","state":{"configs":[{"actionId":"0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c","config":{"initialized":true,"validUntil":1792000144,"target":"0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf","selector":"0xffffffff","maxValuePerCall":"1","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"1","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":1,"pins":[]}},{"actionId":"0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d","config":{"initialized":true,"validUntil":1792000144,"target":"0x2971824Db68229D087931155C2b8bB820B275809","selector":"0xa9059cbb","maxValuePerCall":"0","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":1,"pins":[{"offset":4,"op":0,"value":"0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"},{"offset":36,"op":1,"value":"0x0000000000000000000000000000000000000000000000000000000000000003"}]}}],"walletPC":"9","recipientPC":"969371234365812006997432","walletToken":"18","recipientToken":"434311515549551167935","checkpointCount":"1","grantNonce":"1"}} +{"name":"native-multi-refused","at":"2026-10-14T16:50:35.851Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xEFbF34702A0b02F1997bCeC705D061B49021bB01","id":"0x910a0ca05d23f210ed781e6fdc04639bfc8fd1b3449f2d9c621b53bd534c326c","gate":"PolicyCheckReverted(ArgPinAboveMax)","state":{"configs":[{"actionId":"0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c","config":{"initialized":true,"validUntil":1792000190,"target":"0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf","selector":"0xffffffff","maxValuePerCall":"1","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"1","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":1,"pins":[]}},{"actionId":"0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d","config":{"initialized":true,"validUntil":1792000190,"target":"0x2971824Db68229D087931155C2b8bB820B275809","selector":"0xa9059cbb","maxValuePerCall":"0","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":1,"pins":[{"offset":4,"op":0,"value":"0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"},{"offset":36,"op":1,"value":"0x0000000000000000000000000000000000000000000000000000000000000003"}]}}],"walletPC":"9","recipientPC":"969371233028103756997423","walletToken":"19","recipientToken":"434311515549551167916","checkpointCount":"1","grantNonce":"1"},"agentNonce":12} +{"name":"native-multi-mined-rollback","at":"2026-10-14T16:50:40.877Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xEFbF34702A0b02F1997bCeC705D061B49021bB01","id":"0x910a0ca05d23f210ed781e6fdc04639bfc8fd1b3449f2d9c621b53bd534c326c","hash":"0x7b47a3bfc6e8592829022d24724bdab80e0eab586691fff304a50f109ecba3ca","block":"24245433","gasUsed":"300000","state":{"configs":[{"actionId":"0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c","config":{"initialized":true,"validUntil":1792000190,"target":"0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf","selector":"0xffffffff","maxValuePerCall":"1","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"1","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":1,"pins":[]}},{"actionId":"0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d","config":{"initialized":true,"validUntil":1792000190,"target":"0x2971824Db68229D087931155C2b8bB820B275809","selector":"0xa9059cbb","maxValuePerCall":"0","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":1,"pins":[{"offset":4,"op":0,"value":"0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"},{"offset":36,"op":1,"value":"0x0000000000000000000000000000000000000000000000000000000000000003"}]}}],"walletPC":"9","recipientPC":"969371233028103756997423","walletToken":"19","recipientToken":"434311515549551167916","checkpointCount":"1","grantNonce":"1"}} +{"name":"native-multi-replacement","at":"2026-10-14T16:52:02.349Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x22942C91911830857D4378b8247bba0C815B11Da","oldId":"0x910a0ca05d23f210ed781e6fdc04639bfc8fd1b3449f2d9c621b53bd534c326c","newId":"0x4063b2b2dda9e9eb2cdd2a7b55d04c4761f6d306b6b505042492b79ea2f32553","trimmedId":"0xbdd016503001503a1c5c998b2700007687b0659ec4be4ad6b537dba0d1356391","hashes":["0x4eda0ce90e39cff0630d181727b98c6ccbae537b8f0ac8f83013fa3bce379760","0x217c0620fea29e9359bcebdedb925fb468bcbb8b189e32b995b522fffaa9683b","0xad2cc7e81d3f35e183540d1db2dfac742ef0017e7fbb063b1773aba19a9f4378"]} +{"name":"native-multi-second-action-race","at":"2026-10-14T16:52:42.114Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x66aC85137603f514b873fDb7ce2727FA2BfB21A0","oldId":"0x910a0ca05d23f210ed781e6fdc04639bfc8fd1b3449f2d9c621b53bd534c326c","newId":"0x4063b2b2dda9e9eb2cdd2a7b55d04c4761f6d306b6b505042492b79ea2f32553","spendHash":"0x7f7f06a579b4dd6ca4bd0a4d9a98b175193f39343b94184f286911e63271397e","retryHash":"0xb2f0a95bb8db1398f5aabc9a0b8157775d21e72e81a66d2014cbe67c135d65c3","stateAfterRace":{"configs":[{"actionId":"0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c","config":{"initialized":true,"validUntil":1792000322,"target":"0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf","selector":"0xffffffff","maxValuePerCall":"1","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":0,"pins":[]}},{"actionId":"0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d","config":{"initialized":true,"validUntil":1792000322,"target":"0x2971824Db68229D087931155C2b8bB820B275809","selector":"0xa9059cbb","maxValuePerCall":"0","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":1,"pins":[{"offset":4,"op":0,"value":"0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"},{"offset":36,"op":1,"value":"0x0000000000000000000000000000000000000000000000000000000000000003"}]}}],"walletPC":"10","recipientPC":"969371228520144381997404","walletToken":"19","recipientToken":"434311515549551167880","checkpointCount":"1","grantNonce":"1"}} +{"name":"native-multi-eight-boundary","at":"2026-10-14T16:52:57.362Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xd2ED8C64bD54fA32D905fc7dCFb17aa47C786d13","id":"0x910a0ca05d23f210ed781e6fdc04639bfc8fd1b3449f2d9c621b53bd534c326c","hash":"0xe6e173d9b4fc4754716aad61e4ffab434ad01549be72243f6ed213cfda043d42","unchangedNextSlot":9} +{"name":"native-multi-refused","at":"2026-10-14T16:54:10.531Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xe38049cCfaf1D74A0AA173c7C8E4840cdaeEE5E0","id":"0x910a0ca05d23f210ed781e6fdc04639bfc8fd1b3449f2d9c621b53bd534c326c","gate":"PolicyCheckReverted(RulesExpired)","state":{"configs":[{"actionId":"0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c","config":{"initialized":true,"validUntil":1791996837,"target":"0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf","selector":"0xffffffff","maxValuePerCall":"1","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":0,"pins":[]}},{"actionId":"0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d","config":{"initialized":true,"validUntil":1791996837,"target":"0x2971824Db68229D087931155C2b8bB820B275809","selector":"0xa9059cbb","maxValuePerCall":"0","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":0,"pins":[{"offset":4,"op":0,"value":"0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"},{"offset":36,"op":1,"value":"0x0000000000000000000000000000000000000000000000000000000000000003"}]}}],"walletPC":"10","recipientPC":"969371223076682256997394","walletToken":"20","recipientToken":"434311515549551167860","checkpointCount":"1","grantNonce":"1"},"agentNonce":17} +{"name":"native-multi-refused","at":"2026-10-14T16:54:14.862Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xe38049cCfaf1D74A0AA173c7C8E4840cdaeEE5E0","id":"0x910a0ca05d23f210ed781e6fdc04639bfc8fd1b3449f2d9c621b53bd534c326c","gate":"PolicyCheckReverted(RulesExpired)","state":{"configs":[{"actionId":"0x4fe8d98db364b0d0802786da5e61c881c40402aa4663465b7a61732dde03167c","config":{"initialized":true,"validUntil":1791996837,"target":"0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf","selector":"0xffffffff","maxValuePerCall":"1","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":0,"pins":[]}},{"actionId":"0x0e8617603fbb66bc7458db5803c01fa022ef9f48b47628d52af31c980f10421d","config":{"initialized":true,"validUntil":1791996837,"target":"0x2971824Db68229D087931155C2b8bB820B275809","selector":"0xa9059cbb","maxValuePerCall":"0","maxValueTotal":"115792089237316195423570985008687907853269984665640564039457584007913129639935","valueSpent":"0","amount":{"enabled":false,"offset":0,"maxPerCall":"0","maxTotal":"0"},"amountSpent":"0","maxCalls":4294967295,"callsUsed":0,"pins":[{"offset":4,"op":0,"value":"0x0000000000000000000000000a16cba65ffcaa4c2282b27b027ab4a2fe46e0bf"},{"offset":36,"op":1,"value":"0x0000000000000000000000000000000000000000000000000000000000000003"}]}}],"walletPC":"10","recipientPC":"969371223076682256997394","walletToken":"20","recipientToken":"434311515549551167860","checkpointCount":"1","grantNonce":"1"},"agentNonce":17} +{"name":"native-multi-shared-expiry","at":"2026-10-14T16:54:14.862Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xe38049cCfaf1D74A0AA173c7C8E4840cdaeEE5E0","id":"0x910a0ca05d23f210ed781e6fdc04639bfc8fd1b3449f2d9c621b53bd534c326c","expiry":1791996837} +{"name":"native-multi-invalid-input","at":"2026-10-14T16:54:21.742Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","unchangedNextSlot":10,"ownerNonce":947} +{"name":"v5-two-token-replacement","at":"2026-10-14T16:55:00.339Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x10fBd63d1Bd5f738307474d3e4a783c13420E076","oldId":"0x7e4c005207046e7610e72b780978225446afe6a4917f2dc31d81c8080cd5c474","newId":"0xe6876f2d3ff94b964e800ffcd3a34ae2d5448f1a73293a7ff0e5d9d5fd5549fe","txHash":"0xa0a22267ce6fbfa160f7448647872cffb4b0c6ea7ae639c9eb5ff708ef337a2b"} +{"name":"v5-call-only","at":"2026-10-14T16:56:45.083Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x9391B29B898AF99EB1f8B8a67A6E58F595d6ddF9","pushTx":"0x0aece390ed031f343dbc03058ea4e70703d2739aeb51a103b5576f8b63b61a73","externalTx":"0x688f7b1f1e0fd9b9f4980e7373d4bbf33115639dfa3a9bc55ab62c4cb916d879"} +{"name":"v5-budget-outbound-submitted","at":"2026-10-14T16:57:32.562Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xF92475F8d06a9a06395a54911448A255d10FD7a8","rulesId":"0x7e4c005207046e7610e72b780978225446afe6a4917f2dc31d81c8080cd5c474","token":"0x2971824Db68229D087931155C2b8bB820B275809","amount":"1000000000000","pushTx":"0xf86f91377a38fab44cb79025ed1dab5abfa3d44fd3d144d109581d7d834d0b8c"} +{"name":"extended-native-meter","at":"2026-10-14T16:59:50.095Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xbB0619dB9E2014642385D8e7656C67482C320858","rulesId":"0xc403e94a466ebe25d96a3123d55852b2b76d58cd5c91a774464af7943cc9b510","txHash":"0xe76265f6ce5c01837cbd0a112dda83fdb2f496b82fd4c105ebaacd8cb50751e5"} +{"name":"extended-native-refusal","at":"2026-10-14T17:00:17.485Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x26f12Cb0192f46333a03b98D24779Df5d9F0b79b","rulesId":"0xc403e94a466ebe25d96a3123d55852b2b76d58cd5c91a774464af7943cc9b510","gate":"ArgPinMismatch","counters":{"valueSpent":"0","amountSpent":"0","callsUsed":0},"tokenBalance":"50"} +{"name":"extended-native-refusal","at":"2026-10-14T17:00:35.691Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x5e410Eb62C9C60A72D406653D0d6E6c6E30Bc337","rulesId":"0xc403e94a466ebe25d96a3123d55852b2b76d58cd5c91a774464af7943cc9b510","gate":"ArgPinAboveMax","counters":{"valueSpent":"0","amountSpent":"0","callsUsed":0},"tokenBalance":"50"} +{"name":"extended-native-refusal","at":"2026-10-14T17:02:26.347Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xB44fbB9a25090C209fC1878773eA210347D41eaa","rulesId":"0xc403e94a466ebe25d96a3123d55852b2b76d58cd5c91a774464af7943cc9b510","gate":"ArgPinAboveMax","counters":{"valueSpent":"0","amountSpent":"0","callsUsed":0},"tokenBalance":"50"} +{"name":"extended-native-refusal","at":"2026-10-14T17:02:55.504Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x25B4C4f403b632c4C8FC5F2BbBC8D5d0B4161290","rulesId":"0xc403e94a466ebe25d96a3123d55852b2b76d58cd5c91a774464af7943cc9b510","gate":"callee/engine","counters":{"valueSpent":"0","amountSpent":"0","callsUsed":0},"tokenBalance":"5"} +{"name":"extended-native-refusal","at":"2026-10-14T17:03:22.901Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x8E26dbE7B971d05ca9091BC468fD150616bca2a4","rulesId":"0xc403e94a466ebe25d96a3123d55852b2b76d58cd5c91a774464af7943cc9b510","gate":"callee/engine","counters":{"valueSpent":"0","amountSpent":"0","callsUsed":0},"tokenBalance":"50"} +{"name":"extended-native-refusal","at":"2026-10-14T17:03:51.991Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x7d951F1835955925FBE03165edDAb3B51b6bfc07","rulesId":"0xc403e94a466ebe25d96a3123d55852b2b76d58cd5c91a774464af7943cc9b510","gate":"ValueExceedsCap","counters":{"valueSpent":"0","amountSpent":"0","callsUsed":0},"tokenBalance":"5"} +{"name":"zero-pc-defaults","at":"2026-10-14T17:03:57.425Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x7d951F1835955925FBE03165edDAb3B51b6bfc07","txHash":"0x58222df0d5979bb33f895e301ddba0fdf7d082b8d81480378fdf03da8dc1943c"} +{"name":"arg-index-reuse","at":"2026-10-14T17:04:21.290Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x4D28f8E657EE5ace78B6B9986C6704627568d975","txHash":"0xe2f82f426fdaf45b52cc5e17af7d0872f48bc327a32de53a7905822f8c199d8d"} +{"name":"v5-evm-outbound-submitted","at":"2026-10-14T17:05:16.025Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x5e98C3D8BE408DA49B05c00d55016865D660096D","cea":"0x20A7d9F1720BA4B5703dEd6115A2f719AcDcfD54","pushTx":"0x69140f7b3505adedd468a0c4667677745d79d251d401f7473ef930b40b7a03be","destinationGasLimit":"2000000"} +{"name":"universal-outbound","at":"2026-10-14T17:07:01.241Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x5e98C3D8BE408DA49B05c00d55016865D660096D","cea":"0x20A7d9F1720BA4B5703dEd6115A2f719AcDcfD54","rulesId":"0x9654e2f1b8e1f0658b0a69c462769a9e1121b61f80b24043282e03ed2fa3d826","pushTx":"0x69140f7b3505adedd468a0c4667677745d79d251d401f7473ef930b40b7a03be","externalTx":"0x95d0ceef78c3ed71940a51aa89a7d21ab5e26e3beef6a1af4f17bf9da90c4a82","amount":"1000000000000"} +{"name":"universal-destination-revert","at":"2026-10-14T17:08:28.200Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x5e98C3D8BE408DA49B05c00d55016865D660096D","pushTx":"0x92eb5b772e8dbdb910b4afd951a9a4597c8b7ccdd9a9b9c97dd368fc9308fb40","externalStatus":"failed"} +{"name":"extended-prefunding","at":"2026-10-14T17:09:27.531Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x716E344F88Ab38EC8e23616417FB56f72a9d8B2a","index":25,"txHash":"0x3b7f77df87b9bb3cd37623b7971d7666f4a30852cd956449ca6f7a8ab7f71827"} +{"name":"duplicate-rule-guards","at":"2026-10-14T17:09:58.219Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x0381e9c8156Cf4779778235583217051929d9180","deleted":["0x455a5e2e1f3f6e1b55c0f7d90ff10cefcf53e42c085cf5576e57974b3e88c027"],"added":["0x2f1da74e8548d1cadc1786e59af529e56159c76049ba9fa2aea53d49f83c0958"]} +{"name":"extended-management-batches","at":"2026-10-14T17:10:30.270Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x6f9b23e35E969E11Ed6D2E9995782b0ab0278192","rulesIds":["0x455a5e2e1f3f6e1b55c0f7d90ff10cefcf53e42c085cf5576e57974b3e88c027","0xab892ee1f3df166034d5c1568330d5601aa7186622c9d44e20922909d4b0c9df"],"addHash":"0x4ff61a40e1ec6782dc4e34cacc57667b4ee9d12174e7a6e520b989417d72cacb","checkpoints":8} +{"name":"extended-stale-update","at":"2026-10-14T17:11:13.790Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x428796a84d74C2a7Aadc64B536641bC4A4B54D18","rulesId":"0x455a5e2e1f3f6e1b55c0f7d90ff10cefcf53e42c085cf5576e57974b3e88c027","spendHash":"0xcc8fe4abbc3505c4d80de9f6f1abca55fafdc60f815b4e2a2efecda6a212fa81","checkpoints":"1","grantNonce":"1"} +{"name":"extended-index-race-error","at":"2026-10-14T17:11:29.972Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","code":"INDEX_RACE","expectedWallet":"0x428Da4EF457EddE0b8614AAF2f7Bc4350978da43","expectedIndex":30,"competingWallet":"0x428Da4EF457EddE0b8614AAF2f7Bc4350978da43","competingIndex":30,"nextAfterRace":{"address":"0xba83f372168De8Eb81A64A1411f1C4E52E503bf8","index":31,"deployed":false},"competingRuleIds":[]} +{"name":"extended-index-race","at":"2026-10-14T17:11:38.125Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","competing":"0x428Da4EF457EddE0b8614AAF2f7Bc4350978da43","winnerHash":"0x4218540c0e38f3f6061a97a5247ece7b9541c87810b570935f2e70ee0f7fe599","retried":"0xba83f372168De8Eb81A64A1411f1C4E52E503bf8","retryHash":"0x88d077426f499e353d658cb21298dce713d50233cb0ccde1262ac286353d6cc9"} +{"name":"v5-label-default-custom","at":"2026-10-14T17:12:54.736Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallets":["0x11FDAdc91A21A3517918933b6e7a5d12f8f48d07","0x40d240472D84C4Dc9aBF59bd78f453e36A7B5383"],"indices":[32,33],"hashes":["0x5468ae1d43628be65295604c7d4582da2a43c7ac64d92a30cec2d3d4d712cb44","0x75467af99fece5e4c3f3cb6868567b695dcd0e095c43f103b405813d38e0ccda","0xa7dd7031dc6245b207976c0aa32e64b233aa288691a445902c9eda0d716c672e"]} +{"name":"v5-label-rename-reset","at":"2026-10-14T17:13:53.872Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xBf42e7f8bC1dBfCE9B336Dc2A84Cc1f038dc3B44","hashes":["0x2717e4e89cd60697f2f9c8a03ebcf19978b5e7b5e015e7d3cf70af3276c653cf","0xc80b948b2fc91655c837a043304bcca82ab413dcd16b6cffd48fa2b60113117f"],"checkpointsBefore":"0","checkpointsAfter":"0"} +{"name":"v5-label-byte-boundary","at":"2026-10-14T17:14:17.844Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xFFCfC433ad7a2ba6197486Fb774167734eEBa60d","checkpoints":"0","unchangedNextSlot":36} +{"name":"v5-label-agent-refused","at":"2026-10-14T17:14:32.557Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xfef6F2579b3Fcd9BAE58A6bd55bAC32933d4b304","checkpoints":"1"} +{"name":"v5-label-uea-owner","at":"2026-10-14T17:15:18.020Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xAb274a2FBde5C4A09dc3747e58bfCcf75d2Ade4D","owner":"0x5C70C864Cf1aDfB04A0e107fFA248ba3600EAb8D","hashes":["0x5744264def139db50f03437d6e3951badb3fc14395266f96e0770650bea3eb41","0x14819bd1ef8a2ac7e1b5a38438c3cf1718fac47ffaae4c5ed47eb9e7d17df38c","0xe82c825a3a848942b46367908603ed5a1711cc1d4cb62a808a7c78d9d75e51b9"],"checkpointsBefore":"0","checkpointsAfter":"0"} +{"name":"v5-label-solana-owner","at":"2026-10-14T17:16:03.012Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x150db120b9AadC0dDC24DF6caD1c7E3be3510dCc","owner":"0xad977a75D8BEd06579D6498b7e2e3885f9D31F15","hashes":["0xe7871b5ee6cdac7ca98dee2817bdd8b1ba0c7de1ce1408bad67370722896a11d","0x8d732aac28c063947a848d665355ce9de236cfd4f6fed149274e8e985cd8c1ca","0x7989abcb6fa97372cdfadfe71bfb9e4445d95b71a8d23ef257c0f6af034bdc8e"],"checkpointsBefore":"0","checkpointsAfter":"0"} +{"name":"v5-label-active-rule","at":"2026-10-14T17:16:42.715Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xB861e7c09FF35A64EdfA7D827e7890B21B36877A","rulesId":"0x1d364d52ece1da8c459536d60b75373414df4b991bc1154f12fd9144945c4f1a","hashes":["0xf09c3cf1774dc1a1f8b684c7d8abb2c9ad110f67160c30a308f4072731c4fd72","0x288f363bbed201ac8df1a2b6a609fa0d61289c113f4512dddc7fbe61c9ecad81","0x216ad61c5257956b2ddf2a14d317d74528bae42acf1a89e46e81fc565b3dcba4"],"spendBefore":{"valueSpent":"1","amountSpent":"0","callsUsed":1},"spendAfter":{"valueSpent":"2","amountSpent":"0","callsUsed":2},"grantNonce":"1"} +{"name":"v5-label-batch-rollback","at":"2026-10-14T17:16:58.692Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xAF902Ed9cA1036C13f2139A5074e74849Fd2858a","hash":"0x3a5c64dc4c1f11f035ace3f4e9038d95d085a764fb5cc8cc6dd5209c79576149","block":"24246078","gasUsed":"200000","status":"reverted","checkpoints":"0"} +{"name":"public-svm-setup","at":"2026-10-14T17:17:51.199Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x6E06058B79298809Ef569688665D9BBc0b11EBb0","id":"0xda6c57920b1bf16489d7ce8ce624a3bc579cf94bef00147e9962b177754c16b6","grantHash":"0x7184227e2d4fecec193ab7ec3e90a550987afd282d52cf9e9e165b0bf6be80f5","cea":"8eWvD3yyyqtATfcG1Chu9amdPjkjxteM3Pfv9RWpPAVP","recipient":"3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb"} +{"name":"public-svm-replacement","at":"2026-10-14T17:18:26.070Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x6E06058B79298809Ef569688665D9BBc0b11EBb0","id":"0x9824d3bb23f029e1169e62924f5b3e6f499a59852464f8d786c5494923883249","txHash":"0x042dd1c81c8b34605d8f2244c14486e0a1bf3c02b254dfdb5b384b22da003ee9"} +{"name":"public-svm-submitted","at":"2026-10-14T17:18:44.774Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x6E06058B79298809Ef569688665D9BBc0b11EBb0","id":"0x9824d3bb23f029e1169e62924f5b3e6f499a59852464f8d786c5494923883249","hash":"0xfe8517761ba29ce7a8707c6e24110f75466de044d0ff7a1d321c15fba8bd83d9"} +{"name":"public-svm-delivered","at":"2026-10-14T17:19:59.542Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x6E06058B79298809Ef569688665D9BBc0b11EBb0","hash":"0xfe8517761ba29ce7a8707c6e24110f75466de044d0ff7a1d321c15fba8bd83d9","destinationHash":"3CanzkSEvZvaVPUZ6s2Bpiu143VAo9hPaV6JhvB7FXA6iGgMoThSzthqvNbMbQ4vJmFmkMGD1RxryJCpTQLYcRxd","instruction":{"program":"0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d","data":"0x79f4fa0308e5e1011027000000000000","accounts":[{"pubkey":"0x4f12fe6816ae7e33ebf7db0b154ec3b09e3bf1a7690481e8e9477d5a278ad3af","isWritable":true},{"pubkey":"0x2953026d328218b107268efe60f7d98635af1ff535a91731f75ca7cf8a859044","isWritable":true},{"pubkey":"0x719e204864e24f8ff1328cb460054042fd086f2f60ac2de6ff3ea87cd5313832","isWritable":true},{"pubkey":"0x0000000000000000000000000000000000000000000000000000000000000000","isWritable":false}]}} +{"name":"public-svm-contract-refusals","at":"2026-10-14T17:20:19.674Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x6E06058B79298809Ef569688665D9BBc0b11EBb0","id":"0x9824d3bb23f029e1169e62924f5b3e6f499a59852464f8d786c5494923883249","agentNonce":1,"state":{"tokens":"10000","pcBalance":"40369379053802732985","checkpoints":"6","spent":["10000"]}} +{"name":"public-svm-owner-transfer-submitted","at":"2026-10-14T17:20:35.876Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x6E06058B79298809Ef569688665D9BBc0b11EBb0","hash":"0x5a70c8adfe4794d9ad73e2fb5ccb63b83ae9030a7811a3161f56a39e9d5e2579"} +{"name":"public-svm-owner-transfer-delivered","at":"2026-10-14T17:22:01.645Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x6E06058B79298809Ef569688665D9BBc0b11EBb0","hash":"0x5a70c8adfe4794d9ad73e2fb5ccb63b83ae9030a7811a3161f56a39e9d5e2579","destinationHash":"24bmc4nPZEb9nMgjxvKfqT2VkMR4XWUz53Pun1MQEyq6BNaefinDihHCE2zQHC8pJFVAZkeyqNxb9Hiheek6gbFD","recipient":"3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb","amount":"10000"} +{"name":"external-evm-agent","at":"2026-10-14T17:22:46.189Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x330aBe95F0DeA143b067631374795819Aa1c3910","uea":"0x5C70C864Cf1aDfB04A0e107fFA248ba3600EAb8D","tx":"0xc2723059f4e0a3de057631c1ded4697ccd184db971e231fa2a98000eaf069e4f"} +{"name":"first-use-uea","at":"2026-10-14T17:24:10.528Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xC3571ff8B1F3F3Bf9862CCD9A09C200d3cc94623","uea":"0x29470B9702a26e5c5060d24638FC5A12FC5a81Ba"} +{"name":"solana-origin-agent","at":"2026-10-14T17:24:35.339Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x12443e7C7F10791c241B38b40039b10dBb47DD3a","uea":"0xad977a75D8BEd06579D6498b7e2e3885f9D31F15","tx":"0xcbf1bb01d3cba0e0105acfa7128c66daf1036f72cee3659ab51256085f0c3c39"} +{"name":"native-agent-send","at":"2026-10-14T17:25:17.158Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x37c88d8732178682A4bf138C07934a8f3b70B8eA","rulesId":"0x03cc1333a63a1c513f98e81080a0532e7e9d948f2b06c67749e613bc260022e9","tx":"0x197d020fe896edf5d5a7da04d39a33395fa9ad9d6c9d4bc64bd7d0786a671639","block":"24246281"} +{"name":"rules-update","at":"2026-10-14T17:28:13.844Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x6a22C60A39248e2Fd49Ad18757C87CC4277440ca","original":"0xe45739dfb0771a6a94648358bcab961c3f83eb2bfd711c9fca0254b77a40c74c","replacement":"0x94947d387575199262c3655b1ab1720b52d71abb826e465a0b7b60d97836fc54","tx":"0x440d08535e855ae3febaefcfaf4bbe687d2d51149bbfc3b7bb38ff9647eead5f","checkpointDelta":5} +{"name":"v5-spl-owner-submitted","at":"2026-10-14T17:29:25.025Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x5530fA3f314e4367bDF873201328A3Bee7b2Feba","hash":"0x0b2808d0b8787913fd8261e4d17410a3c3fc0c8013ab812f148d84a106f52dfa","mint":"EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF","recipient":"3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb","ata":"oVL4eb7hqoq4iJEZ4mPf9Hgd5ys3EzaXuCpZ434aRRt","amount":"1000"} +{"name":"v5-spl-owner-delivered","at":"2026-10-14T17:30:44.797Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x5530fA3f314e4367bDF873201328A3Bee7b2Feba","hash":"0x0b2808d0b8787913fd8261e4d17410a3c3fc0c8013ab812f148d84a106f52dfa","destinationHash":"4z7yVHikN2qJRzyGo5ockPTm1bDKzEaYwRzyogN4MqJHpdWbPGQV9VTHM8Ke1HofN5rVhF1ZPR6rVekS7UvrPKve","mint":"EiXDnrAg9ea2Q6vEPV7E5TpTU1vh41jcuZqKjU5Dc4ZF","recipient":"3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb","ata":"oVL4eb7hqoq4iJEZ4mPf9Hgd5ys3EzaXuCpZ434aRRt","beforeRecipient":"9995961000","afterRecipient":"9995962000","amount":"1000"} +{"name":"native-agent-batch","at":"2026-10-14T17:31:40.717Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x402cd8068544D0E8Ca13db79E3E322d0EA7e8f9C","rulesId":"0x168c9ebc4bb966134b6d4bc58b3bc038397b6c1609649420d26dcc760cfc424c","tx":"0xf6c020959e9e33c1d698ffd2bf34a3e5b6c9f4c48039751d2d82ab4bf1e6e3b6"} +{"name":"native-agent-batch-rollback","at":"2026-10-14T17:32:00.105Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x9fC6D013Da51428f08dc4De8B2B180DDcF14b0c9","rulesId":"0x168c9ebc4bb966134b6d4bc58b3bc038397b6c1609649420d26dcc760cfc424c"} +{"name":"replay-identity","at":"2026-10-14T17:33:05.566Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x61e8289223D6B967FC3aC6Ea919c9D7A014fFD04","tx":"0xf8d31a7f2272eca1b10df8bade300912dbfd79c8350e5d38317f7d104bae3b67"} +{"name":"allowance-set-remove","at":"2026-10-14T17:33:50.023Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xdfa15781a7a253CcAc2E3192931508A2557bACa7","token":"0x2971824Db68229D087931155C2b8bB820B275809","setTx":"0xe3a9bd6325780b10ec8d67e29d302428b7c33a24489dc43127e0159744977c54"} +{"name":"create-bare","at":"2026-10-14T17:34:09.116Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x1331bF8F04380C893D130084508f3533c81bBca4","index":51,"tx":"0xd40ac44eddfe90bd46fb92b6880a08a59c43c562acd3ed7c5b658f77439aa48e","block":"24246497"} +{"name":"create-with-rule","at":"2026-10-14T17:34:18.700Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x8c3fAAe149ee3060185fc2fc6A50EEbE067A70c7","rulesIds":["0xc59909d53d2ebb62c1e7ccb37e9cfaba79ac3ba8b673ab465a1320decc8b0331"],"tx":"0x16f7b0d3514819b8278e7d88c7aae1599bf109638939fbe55bdcca0bdf6f9f19","atomic":true} +{"name":"v5-budget-outbound-submitted","at":"2026-10-14T17:36:25.869Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x2eA13407476639AdEC0ff340862AF7A817395d82","rulesId":"0x324f8363f716ee40f1df59b6d6efc19db18721d6ca4005165770f06e080cea2c","token":"0x2971824Db68229D087931155C2b8bB820B275809","amount":"1000000000000","pushTx":"0x153464b0c2a9b9da777b65ba55ba69735818d1dae156c6b5651bb0ec0424d8a5"} +{"name":"v5-budget-outbound-submitted","at":"2026-10-14T17:37:41.138Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x2eA13407476639AdEC0ff340862AF7A817395d82","rulesId":"0x324f8363f716ee40f1df59b6d6efc19db18721d6ca4005165770f06e080cea2c","token":"0x7A58048036206bB898008b5bBDA85697DB1e5d66","amount":"10","pushTx":"0x793401f5e845388a47b2dc28b2c2ae9e707157fbda41a5f813e59230f8c6d7ed"} +{"name":"v5-independent-token-budgets","at":"2026-10-14T17:38:44.322Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0x2eA13407476639AdEC0ff340862AF7A817395d82","rulesId":"0x324f8363f716ee40f1df59b6d6efc19db18721d6ca4005165770f06e080cea2c","tokens":["0x2971824Db68229D087931155C2b8bB820B275809","0x7A58048036206bB898008b5bBDA85697DB1e5d66"],"amounts":["1000000000000","10"],"spent":["1000000000000","10"],"hashes":["0x153464b0c2a9b9da777b65ba55ba69735818d1dae156c6b5651bb0ec0424d8a5","0x644cb0d7072bf63857eb4bf1f321cc2fefcad8bcf759f631cb4ad64d8280b097","0x793401f5e845388a47b2dc28b2c2ae9e707157fbda41a5f813e59230f8c6d7ed","0x68c1eb1a6a9d6ac3855e8da8833ecc43c9d40d2bd0ee750ae7a6f41e39298b1c"]} +{"name":"v6-destination-pins","at":"2026-10-14T17:41:06.039Z","network":"TESTNET_DONUT","sourceCommit":"ffd567d3e49b2d27c6f50ad36093274dbac3090f","wallet":"0xa3318B98f3B277DFc1Fde1a62A704cF24Ca1415c","cea":"0xb33ab2369F991e093BD27cd02A4bf320c1EF67CA","rulesId":"0x0e81cb2d53fb7bdad6c1444d31bb9a94dcefd20a64db53c8279e14427eac90fa","pushTx":"0x8d2c2ed5885b0c707f2f791a31d362040684b9b36eac92b6371b05b9400d2281","destinationTx":"0xa7a7f1d456a8b414c9864b0e556920383b3042b2efb3ccc93990f3ee0b6dc9cf"} diff --git a/plan/agw/research/v6-integration-2026-10-14/live-focused.log b/plan/agw/research/v6-integration-2026-10-14/live-focused.log new file mode 100644 index 00000000..9f4f3498 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/live-focused.log @@ -0,0 +1,41 @@ +PASS core-e2e packages/core/__e2e__/agw/v5-multiasset.spec.ts (225.533 s) + ● Console + + console.log + [ExternalTxVerifier] Verifying EVM tx on eip155:11155111: 0x644cb0d7072bf63857eb4bf1f321cc2fefcad8bcf759f631cb4ad64d8280b097 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx 0x644cb0d7072bf63857eb4bf1f321cc2fefcad8bcf759f631cb4ad64d8280b097 on eip155:11155111: status=0x1 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx CONFIRMED SUCCESS on eip155:11155111 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] Verifying EVM tx on eip155:11155111: 0x68c1eb1a6a9d6ac3855e8da8833ecc43c9d40d2bd0ee750ae7a6f41e39298b1c + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx 0x68c1eb1a6a9d6ac3855e8da8833ecc43c9d40d2bd0ee750ae7a6f41e39298b1c on eip155:11155111: status=0x1 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx CONFIRMED SUCCESS on eip155:11155111 + + at console.log (__e2e__/shared/logger.ts:42:5) + +PASS core-e2e packages/core/__e2e__/agw/universal-evm.spec.ts (141.71 s) + +Test Suites: 2 passed, 2 total +Tests: 4 skipped, 2 passed, 6 total +Snapshots: 0 total +Time: 367.291 s, estimated 505 s +Ran all test suites within paths "packages/core/__e2e__/agw/v5-multiasset.spec.ts", "packages/core/__e2e__/agw/universal-evm.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/v6-integration-2026-10-14/live-full.log b/plan/agw/research/v6-integration-2026-10-14/live-full.log new file mode 100644 index 00000000..7b76feb9 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/live-full.log @@ -0,0 +1,262 @@ +Running 68 scenarios (group: agw) across 15 spec files. + +PASS core-e2e __e2e__/agw/native-multi-action.spec.ts (508.98 s) +FAIL core-e2e __e2e__/agw/v5-multiasset.spec.ts (260.148 s) + ● Console + + console.log + [ExternalTxVerifier] Verifying EVM tx on eip155:11155111: 0x688f7b1f1e0fd9b9f4980e7373d4bbf33115639dfa3a9bc55ab62c4cb916d879 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx 0x688f7b1f1e0fd9b9f4980e7373d4bbf33115639dfa3a9bc55ab62c4cb916d879 on eip155:11155111: status=0x1 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx CONFIRMED SUCCESS on eip155:11155111 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] Verifying EVM tx on eip155:11155111: 0x393204e3277d38d6d32b483e28ace107e77ff250a5f01069b8567b9ae9bff9a6 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx 0x393204e3277d38d6d32b483e28ace107e77ff250a5f01069b8567b9ae9bff9a6 on eip155:11155111: status=0x1 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx CONFIRMED SUCCESS on eip155:11155111 + + at console.log (__e2e__/shared/logger.ts:42:5) + + ● agw v5 multi-asset › 3. both assets execute independently after one token budget is exhausted + + expect(received).toBe(expected) // Object.is equality + + Expected: 1n + Received: 0n + + 322 | args: [made.wallet, f.manifest.addresses.gateway], + 323 | }) + > 324 | ).toBe(BigInt(1)); + | ^ + 325 | const expected = i === 0 ? [amounts[0], BigInt(0)] : amounts; + 326 | expect(await spent()).toEqual(expected); + 327 | const nonce = await f.push.getTransactionCount({ + + at Object. (__e2e__/agw/v5-multiasset.spec.ts:324:9) + +PASS core-e2e __e2e__/agw/native-policy-extended.spec.ts (342.326 s) +PASS core-e2e __e2e__/agw/universal-evm.spec.ts (243.886 s) + ● Console + + console.log + [ExternalTxVerifier] Verifying EVM tx on eip155:11155111: 0x95d0ceef78c3ed71940a51aa89a7d21ab5e26e3beef6a1af4f17bf9da90c4a82 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx 0x95d0ceef78c3ed71940a51aa89a7d21ab5e26e3beef6a1af4f17bf9da90c4a82 on eip155:11155111: status=0x1 + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [ExternalTxVerifier] EVM tx CONFIRMED SUCCESS on eip155:11155111 + + at console.log (__e2e__/shared/logger.ts:42:5) + +PASS core-e2e __e2e__/agw/management-extended.spec.ts (189.914 s) +PASS core-e2e __e2e__/agw/labels.spec.ts (320.545 s) +PASS core-e2e __e2e__/agw/svm-public.spec.ts (303.803 s) +PASS core-e2e __e2e__/agw/identity-gas.spec.ts (152.794 s) + ● Console + + console.log + [4.00s] AGENTIC-TX-107: Rule Resolved + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [4.01s] SEND-TX-101: Origin Chain Detected + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [4.02s] SEND-TX-102-01: Estimating Gas + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [4.33s] SEND-TX-103-01: Resolving Universal Execution Account + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [4.63s] SEND-TX-103-02: Universal Execution Account Resolved + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [4.63s] SEND-TX-103-03-04: Prepaid Deposit Estimated + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [6.57s] SEND-TX-104-01: Awaiting Transaction + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [7.79s] SEND-TX-105-01: Gas Funding In Progress + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [17.35s] SEND-TX-105-02: Gas Funding Confirmed + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [17.35s] SEND-TX-107: Broadcasting to Push Chain + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [48.56s] SEND-TX-199-01: Push Chain Tx Success + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [48.56s] AGENTIC-TX-199-01: Agentic Operation Done + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [50.63s] AGENTIC-TX-107: Rule Resolved + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [1.21s] AGENTIC-TX-107: Rule Resolved + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [50.63s] SEND-TX-101: Origin Chain Detected + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [1.21s] SEND-TX-101: Origin Chain Detected + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [50.63s] SEND-TX-102-01: Estimating Gas + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [1.21s] SEND-TX-102-01: Estimating Gas + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [50.92s] SEND-TX-103-01: Resolving Universal Execution Account + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [1.50s] SEND-TX-103-01: Resolving Universal Execution Account + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [51.51s] SEND-TX-103-02: Universal Execution Account Resolved + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [2.09s] SEND-TX-103-02: Universal Execution Account Resolved + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [51.51s] SEND-TX-103-03-04: Prepaid Deposit Estimated + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [2.09s] SEND-TX-103-03-04: Prepaid Deposit Estimated + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [52.14s] SEND-TX-104-02: Awaiting Signature + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [2.72s] SEND-TX-104-02: Awaiting Signature + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [52.15s] SEND-TX-104-03: Verification Success + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [2.73s] SEND-TX-104-03: Verification Success + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [52.15s] SEND-TX-107: Broadcasting to Push Chain + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [2.73s] SEND-TX-107: Broadcasting to Push Chain + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [59.21s] SEND-TX-199-01: Push Chain Tx Success + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [9.79s] SEND-TX-199-01: Push Chain Tx Success + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [59.21s] AGENTIC-TX-199-01: Agentic Operation Done + + at console.log (__e2e__/shared/logger.ts:42:5) + + console.log + [9.79s] AGENTIC-TX-199-01: Agentic Operation Done + + at console.log (__e2e__/shared/logger.ts:42:5) + +PASS core-e2e __e2e__/agw/native-exec.spec.ts (149.925 s) +PASS core-e2e __e2e__/agw/lifecycle.spec.ts (91.985 s) +PASS core-e2e __e2e__/agw/svm-spl-transfer.spec.ts (127.507 s) +PASS core-e2e __e2e__/agw/native-batch.spec.ts (75.302 s) +PASS core-e2e __e2e__/agw/responses-hooks.spec.ts (65.453 s) +PASS core-e2e __e2e__/agw/funding-allowance.spec.ts (44.439 s) +PASS core-e2e __e2e__/agw/create.spec.ts (28.674 s) + +Test Suites: 1 failed, 14 passed, 15 total +Tests: 1 failed, 1 skipped, 67 passed, 69 total +Snapshots: 0 total +Time: 2905.962 s +Ran all test suites within paths "__e2e__/agw/create.spec.ts", "__e2e__/agw/funding-allowance.spec.ts", "__e2e__/agw/native-batch.spec.ts", "__e2e__/agw/native-exec.spec.ts", "__e2e__/agw/lifecycle.spec.ts", "__e2e__/agw/universal-evm.spec.ts", "__e2e__/agw/v5-multiasset.spec.ts", "__e2e__/agw/identity-gas.spec.ts", "__e2e__/agw/responses-hooks.spec.ts", "__e2e__/agw/svm-public.spec.ts", "__e2e__/agw/labels.spec.ts", "__e2e__/agw/svm-spl-transfer.spec.ts", "__e2e__/agw/native-multi-action.spec.ts", "__e2e__/agw/management-extended.spec.ts", "__e2e__/agw/native-policy-extended.spec.ts". +Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? diff --git a/plan/agw/research/v6-integration-2026-10-14/local-contracts.log b/plan/agw/research/v6-integration-2026-10-14/local-contracts.log new file mode 100644 index 00000000..d7de7eb1 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/local-contracts.log @@ -0,0 +1,31 @@ +PASS core-agw-local packages/core/__agw-local__/svm-backend.spec.ts (11.046 s) +PASS core-agw-local packages/core/__agw-local__/agw-local-advanced.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-differential.spec.ts + ● Console + + console.log + {"corpus":"svm-grant","seed":23063,"cases":107,"accepted":37,"rejected":70,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:226:13) + + console.log + {"corpus":"svm-payload","seed":23063,"cases":88,"accepted":6,"rejected":82,"mismatches":[]} + + at Object. (__agw-local__/svm-differential.spec.ts:407:13) + +PASS core-agw-local packages/core/__agw-local__/svm-internals.spec.ts +PASS core-agw-local packages/core/__agw-local__/svm-public.spec.ts +PASS core-agw-local packages/core/__agw-local__/v5-multiasset.spec.ts +PASS core-agw-local packages/core/__agw-local__/labels.spec.ts +PASS core-agw-local packages/core/__agw-local__/native-multi-action.spec.ts +PASS core-agw-local packages/core/__agw-local__/delayed-index.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-batch.spec.ts +PASS core-agw-local packages/core/__agw-local__/vectors.spec.ts +PASS core-agw-local packages/core/__agw-local__/agw-local-races.spec.ts + +Test Suites: 13 passed, 13 total +Tests: 99 passed, 99 total +Snapshots: 0 total +Time: 36.253 s +Ran all test suites. diff --git a/plan/agw/research/v6-integration-2026-10-14/manifest-surface-check.log b/plan/agw/research/v6-integration-2026-10-14/manifest-surface-check.log new file mode 100644 index 00000000..77708181 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/manifest-surface-check.log @@ -0,0 +1 @@ +v6 manifest and initializer selector verified diff --git a/plan/agw/research/v6-integration-2026-10-14/package.log b/plan/agw/research/v6-integration-2026-10-14/package.log new file mode 100644 index 00000000..8e1b97e4 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/package.log @@ -0,0 +1 @@ +AGW package: CJS/ESM imports, compiled declaration examples and npm contents pass. No examples executed/published. diff --git a/plan/agw/research/v6-integration-2026-10-14/preflight.log b/plan/agw/research/v6-integration-2026-10-14/preflight.log new file mode 100644 index 00000000..1e3c6a1f --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/preflight.log @@ -0,0 +1,27 @@ +AGW deployment manifest verified on-chain. +Solana wire fixture verified read-only before funding. + +Wallets + EVM master (Sepolia) 0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf + Push master (Donut) 0x0A16CBa65FfCAa4C2282b27b027Ab4A2fE46E0Bf + Solana master (Devnet) 3nK8X1re4zLNrgz9Y3xKS4g2fKPJ6M3N9BhNuFfkjwAb + Shared UEA (Donut) 0x5C70C864Cf1aDfB04A0e107fFA248ba3600EAb8D + UEA CEA PDA (Devnet) Fqp8UeJxEWvN1Ciu5jqrA3opGXwNvRL2HfJxNQotj3Qh + +Group "agw" — 68 scenarios, headroom ×1.25. + +┌────────────────────────┬───────────┬──────────┬─────────────┬────────┐ +│ Scope │ Asset │ Need │ Have │ Status │ +├────────────────────────┼───────────┼──────────┼─────────────┼────────┤ +│ EVM master (Sepolia) │ ETH │ 0.027500 │ 3.8342 │ ✓ │ +│ Push master (Donut) │ PC │ 601.3125 │ 969371.7410 │ ✓ │ +│ Push master (Donut) │ pETH │ 0.000014 │ 434.3115 │ ✓ │ +│ Push master (Donut) │ pSOL │ 0.000150 │ 5.7689 │ ✓ │ +│ Push master (Donut) │ pUSDT.sol │ 0.001250 │ 10006.8139 │ ✓ │ +│ Push master (Donut) │ pUSDC.eth │ 0.000014 │ 44642.9076 │ ✓ │ +│ Solana master (Devnet) │ SOL │ 0.013750 │ 0.615431 │ ✓ │ +│ UEA (Donut) │ PC │ 15.0000 │ 6196.4993 │ ✓ │ +└────────────────────────┴───────────┴──────────┴─────────────┴────────┘ + +All master wallets can cover this run. +Derived accounts are already at target. Ready to run. diff --git a/plan/agw/research/v6-integration-2026-10-14/preset-unit.log b/plan/agw/research/v6-integration-2026-10-14/preset-unit.log new file mode 100644 index 00000000..773f3a1f --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/preset-unit.log @@ -0,0 +1,28 @@ +PASS core packages/core/src/lib/agentic/__tests__/presets.spec.ts + ✓ exposes enumerable frozen categories with no invented production addresses (5 ms) + ✓ groups all apps on a chain into one editable template and omits unspecified fields (1 ms) + ✓ returns ready Rule types with identity and expiry; routes assets and defaults missing caps to zero + ✓ does not type an incomplete template as a ready rule + ✓ adds only spender-pinned and amount-bounded ERC20 approvals; native assets have none (1 ms) + ✓ does not mutate caller assets, returned records, or the bundled catalog + ✓ rejects malformed or mismatched options before returning templates (case 0) (1 ms) + ✓ rejects malformed or mismatched options before returning templates (case 1) + ✓ rejects malformed or mismatched options before returning templates (case 2) + ✓ rejects malformed or mismatched options before returning templates (case 3) (1 ms) + ✓ rejects malformed or mismatched options before returning templates (case 4) + ✓ rejects malformed or mismatched options before returning templates (case 5) + ✓ rejects malformed or mismatched options before returning templates (case 6) + ✓ rejects malformed or mismatched options before returning templates (case 7) + ✓ rejects malformed or mismatched options before returning templates (case 8) + ✓ rejects unknown presets, unsupported list types and unsupported chain filters + ✓ produces separate pinned alternatives for multiple spenders + ✓ enforces the 32-call ceiling including generated approvals (1 ms) + ✓ requires full signatures and rejects duplicate function entries + ✓ compiles preset spender and amount pins with the deployed v6 policy (1 ms) + ✓ keeps OR alternatives EVM-only: repeated Solana instructions are refused + +Test Suites: 1 passed, 1 total +Tests: 21 passed, 21 total +Snapshots: 0 total +Time: 2.312 s +Ran all test suites within paths "packages/core/src/lib/agentic/__tests__/presets.spec.ts". diff --git a/plan/agw/research/v6-integration-2026-10-14/proxy-library-wiring.json b/plan/agw/research/v6-integration-2026-10-14/proxy-library-wiring.json new file mode 100644 index 00000000..d4c2d5db --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/proxy-library-wiring.json @@ -0,0 +1,35 @@ +{ + "block": "24245415", + "references": [ + { + "file": "src/policies/SvmRulebook.sol", + "name": "SvmRulebook", + "address": "0x15c3259490f0625c75b5a00731e4231b2b529c1e", + "matches": true + }, + { + "file": "src/policies/SvmRulebook.sol", + "name": "SvmRulebook", + "address": "0x15c3259490f0625c75b5a00731e4231b2b529c1e", + "matches": true + }, + { + "file": "src/policies/SvmRulebook.sol", + "name": "SvmRulebook", + "address": "0x15c3259490f0625c75b5a00731e4231b2b529c1e", + "matches": true + } + ], + "proxies": [ + { + "proxy": "factoryProxy", + "implementation": "0x64893c611920604a9247530673071d46ac9174c9", + "matches": true + }, + { + "proxy": "urp", + "implementation": "0xa176b1424018d52711edcb9d3d8757dc6e174463", + "matches": true + } + ] +} diff --git a/plan/agw/research/v6-integration-2026-10-14/spec-typecheck.log b/plan/agw/research/v6-integration-2026-10-14/spec-typecheck.log new file mode 100644 index 00000000..e69de29b diff --git a/plan/agw/research/v6-integration-2026-10-14/status.md b/plan/agw/research/v6-integration-2026-10-14/status.md new file mode 100644 index 00000000..6fbfc9fc --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/status.md @@ -0,0 +1,25 @@ +# V6 SDK migration — completed locally + +Source pin: `ffd567d3e49b2d27c6f50ad36093274dbac3090f`; documentation head `e57998c2d8ef9db15e69a68061ad3101120a6c6c`. Factory/URP/wallet wiring and nine bytecode sizes were checked on Donut at block 24244801. Executable runtimes of factory logic, wallet, URP, engine, validator and SvmRulebook match the isolated source build after excluding metadata and constructor/link slots (block 24245374); [comparison](bytecode-comparison.json). Both proxy implementation slots and all three URP SvmRulebook link slots independently match the address book at block 24245415 ([wiring](proxy-library-wiring.json)). This is not a full audit or a claim that all constructor bytes were compared byte-for-byte. + +## Implemented locally + +- Replace the v5 runtime, ABI snapshots and deployment constants with v6; no legacy fallback. +- One index-bound createWalletWithSig call with the documented owner empty-signature path. Both index and predicted wallet are checked; up to eight initial rules. Rollback is atomic. Remove CREATE_PARTIAL; keep receipt-unavailable hash evidence. +- Remove allowance reads/requirements on owner and agent outbounds (EVM/SVM). Wallet performs the exact approval/cleanup. Remove GATEWAY_ALLOWANCE_INSUFFICIENT. Core response fields used outside AGW remain unchanged. +- Native and EVM pins encode (offset, op, value), including general EQ/MAX and multiple native MAX pins. Native maxCalls uses uint32 max. Solana unspecified account count uses 255. Native MAX pins do not increment the separate amountSpent meter. +- Multiple EVM entries for one target/selector are OR alternatives. Unpinned/pinned combinations are refused. Presets can now generate separate spender-pinned alternatives; approved app catalog remains empty. +- Include linked SvmRulebook error definitions with the policy ABI so nested revert names remain readable. +- Link the SvmRulebook in the isolated contract fixture. Regenerate contract-derived v6 vectors. +- Native call ceiling remains eight (not the spec's generic 32). Source still reports policy version 3.1.0, so address/wiring/source registration identifies the generation. + +## Validation so far + +- Full units: 2,073 passed, 12 skipped, zero failed. +- Real pinned contracts: 99 passed across 13 suites. Includes atomic initial-rule rollback, index race, zero-allowance send/cleanup, EVM alternative EQ/MAX constraints/read-update and Solana errors. +- Build, lib/spec/local typechecks, guide examples, built CJS/ESM imports and declaration/API comparison pass. +- Funded acceptance: **69 distinct scenarios have passing v6 coverage**. Original run selected 68: 67 passed and one stale allowance assertion failed. The corrected case and newly added EVM EQ/MAX alternative case both passed in the focused run. This is combined coverage, not one clean full invocation. [Full log](live-full.log), [focused log](live-focused.log), [structured results](validation.json), [transaction evidence](live-evidence.jsonl). +- Live proof includes one-call indexed creation, initial grants, owner/agent outbounds with automatic allowance handling, native/Solana execution, decoded-rule updates, zero defaults, concurrency rollback, and a real Sepolia Approval event through the second pinned EVM alternative. Wrong-spender and over-cap attempts fail before signing. +- A final remote recheck found the same deploy-agw head and no source difference from the pinned deployment ([recheck](head-recheck.json)). + +V6 code is committed locally on v4 (`7dca3f2a`) and v5 (`700a52a7`); planning stays on v4. Neither migration commit has been pushed. No real contracts were deployed by this work; local Anvil fixtures are isolated. Contract-owner testnet dry runs are still ongoing. diff --git a/plan/agw/research/v6-integration-2026-10-14/validation.json b/plan/agw/research/v6-integration-2026-10-14/validation.json new file mode 100644 index 00000000..0b77d136 --- /dev/null +++ b/plan/agw/research/v6-integration-2026-10-14/validation.json @@ -0,0 +1,42 @@ +{ + "completed_at": "2026-10-14T17:44:22.870452+00:00", + "source_commit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "unit": { + "passed": 2073, + "failed": 0, + "skipped": 12 + }, + "local_contracts": { + "passed": 99, + "failed": 0, + "suites": 13 + }, + "live_full": { + "selected": 68, + "passed": 67, + "failed": 1, + "filtered": 1, + "reason": "stale v5 expectation of leftover gateway allowance; v6 correctly cleared it to zero" + }, + "live_focused": { + "selected": 2, + "passed": 2, + "failed": 0, + "filtered": 4, + "cases": [ + "corrected multi-asset allowance/budget case", + "new v6 EVM EQ/MAX OR alternative case" + ] + }, + "distinct_live_cases_with_passing_coverage": 69, + "single_clean_full_run": false, + "build": "pass", + "typechecks": "lib/spec/agw-local pass", + "consumer_checks": "docs/package/API pass", + "committed": true, + "pushed": false, + "code_commits": { + "feat/agw-sdk-v4": "7dca3f2a", + "feat/agw-sdk-v5": "700a52a7" + } +} diff --git a/plan/agw/research/validation-e704d5b/README.md b/plan/agw/research/validation-e704d5b/README.md new file mode 100644 index 00000000..4c2b9869 --- /dev/null +++ b/plan/agw/research/validation-e704d5b/README.md @@ -0,0 +1,34 @@ +# Checkpoint revision validation at e704d5b + +October 3, 2026. GitHub API confirmed `pushAgenticWallet_v3` at `e704d5b58fd1d30ce02bc0ad74dccfbdb37804f9`; `nomenclature-changes` is no longer an advertised branch. Local Git objects include the checkpoint commit `6b7dbf4`. An isolated source archive was built under `/private/tmp`, using the pinned dependency trees and the seven independent review tests. No sibling working checkout or production source was changed. + +| Check | Result | Evidence | +| --- | --- | --- | +| Build and sizes | Passed | [build.log](build.log) | +| Revised execute source pin | Passed, B2 checkpoint revision | [check-execute.log](check-execute.log) | +| Default suite, offline | 563 passed, 0 failed, 6 skipped; 27 suites | [tests-offline.log](tests-offline.log) | +| Seven review tests, offline | 7 passed, 0 failed, 0 skipped | [review-tests-offline.log](review-tests-offline.log) | + +The first normal test attempts crashed before test execution in Foundry's macOS proxy-discovery code (`system-configuration`, NULL object). Those failed-attempt logs were archived locally during package cleanup; the successful offline logs are retained here. Retrying with the supported `--offline` option succeeded without changing assertions. The initial crash is not a contract failure or a successful test run. + +Six skips are the RPC-dependent PRC20 checks and deployment-record checks; this pass did not run live forks or verify a new deployment. The seven tests use the existing recording gateway, so they do not prove real allowance consumption, token burn or destination settlement. + +| Contract | Runtime bytes | EIP-170 remaining bytes | +| --- | ---: | ---: | +| AGW | 16,549 | 8,027 | +| AgentValidator | 806 | 23,770 | +| SmartSession | 22,581 | 1,995 | +| UniversalRulesPolicy | 23,673 | 903 | + +These results reproduce the independent follow-up. Generated [ABIs](abi/) reflect this source revision only. See [offline command results](offline-results.json). The isolated copy includes only the [review test](review-tests/IndependentReviewHead.t.sol) as extra source; no deployment was broadcast. + +Reproduction after initializing dependencies: + +```sh +forge build --sizes +make check-execute +forge test --offline --no-match-path 'test/review/*' -vv +forge test --offline --match-contract IndependentReviewHeadTest --match-test test_ReviewHead_ -vv +``` + +Forge 1.5.1-stable, solc 0.8.26, optimizer 833, via IR, Cancun. Full results and checksums are retained beside this report. diff --git a/plan/agw/research/validation-e704d5b/abi/AGW.json b/plan/agw/research/validation-e704d5b/abi/AGW.json new file mode 100644 index 00000000..8c82adbc --- /dev/null +++ b/plan/agw/research/validation-e704d5b/abi/AGW.json @@ -0,0 +1,1550 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "sessionEngine_", + "type": "address", + "internalType": "address" + }, + { + "name": "rulesPolicy_", + "type": "address", + "internalType": "address" + }, + { + "name": "sessionValidator_", + "type": "address", + "internalType": "address" + }, + { + "name": "universalGatewayPC_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "RULES_POLICY", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SESSION_ENGINE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SESSION_VALIDATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UNIVERSAL_GATEWAY_PC", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "accountId", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "agentOf", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "checkpointCount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "domainSeparator", + "inputs": [ + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "execute", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "executionCalldata", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "executeAsAgent", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "executionCalldata", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "executeWithSig", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "executionCalldata", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "intent", + "type": "tuple", + "internalType": "struct OwnerIntent", + "components": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "sessionHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "execCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "grantNonce", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "factory", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getNonce", + "inputs": [ + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + } + ], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantNonce", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRules", + "inputs": [ + { + "name": "session", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "grantRulesWithSig", + "inputs": [ + { + "name": "session", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + }, + { + "name": "intent", + "type": "tuple", + "internalType": "struct OwnerIntent", + "components": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "sessionHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "execCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "grantNonce", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initializeAccount", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "installModule", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isModuleInstalled", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isValidSignature", + "inputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "lastCheckpointBlock", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "onERC1155BatchReceived", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "onERC1155Received", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "onERC721Received", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "revokeAllRules", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRules", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsExecutionMode", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "supportsModule", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "uninstallModule", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "internalType": "address" + }, + { + "name": "deInitData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "AccountInitialized", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "engine", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Checkpointed", + "inputs": [ + { + "name": "seq", + "type": "uint64", + "indexed": true, + "internalType": "uint64" + }, + { + "name": "kind", + "type": "uint8", + "indexed": false, + "internalType": "enum CheckpointKind" + }, + { + "name": "ref", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "blockNumber", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ModuleInstalled", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ModuleUninstalled", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "module", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnerExecuted", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "executionCalldataHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnerExecutedWithSig", + "inputs": [ + { + "name": "mode", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "executionCalldataHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "indexed": false, + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulesActionAuthorized", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "agent", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "callsHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulesGranted", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "uint8", + "indexed": false, + "internalType": "enum RulesType" + }, + { + "name": "chainHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainNamespace", + "type": "string", + "indexed": false, + "internalType": "string" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulesRevoked", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "UninstallCallbackFailed", + "inputs": [ + { + "name": "module", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AlreadyInitialized", + "inputs": [] + }, + { + "type": "error", + "name": "CallerIsNotAgent", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "caller", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "CallerIsNotFactory", + "inputs": [] + }, + { + "type": "error", + "name": "CallerIsNotOwner", + "inputs": [] + }, + { + "type": "error", + "name": "DuplicateAction", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "EmptyChain", + "inputs": [] + }, + { + "type": "error", + "name": "EngineStillHoldsPermissions", + "inputs": [] + }, + { + "type": "error", + "name": "ExecutorMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ForbiddenActionSelector", + "inputs": [ + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "ForbiddenActionTarget", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ForbiddenDispatchTarget", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InconsistentChain", + "inputs": [ + { + "name": "actionIndex", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "IntentExecMismatch", + "inputs": [ + { + "name": "actualCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "IntentGrantNonceMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "provided", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "IntentSessionMismatch", + "inputs": [ + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "IntentWalletMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "provided", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidModuleAddress", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidNonce", + "inputs": [ + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "expected", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "provided", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "InvalidOwnerSignature", + "inputs": [] + }, + { + "type": "error", + "name": "MalformedBatchCalldata", + "inputs": [] + }, + { + "type": "error", + "name": "MalformedSessionShape", + "inputs": [] + }, + { + "type": "error", + "name": "ModuleAlreadyInstalled", + "inputs": [ + { + "name": "module", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "OutsideTimeWindow", + "inputs": [ + { + "name": "validAfter", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "OwnerLaneRequired", + "inputs": [ + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + } + ] + }, + { + "type": "error", + "name": "OwnerSigExpired", + "inputs": [ + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "ReentrancyGuardReentrantCall", + "inputs": [] + }, + { + "type": "error", + "name": "RulesTypeMismatch", + "inputs": [ + { + "name": "derived", + "type": "uint8", + "internalType": "enum RulesType" + }, + { + "name": "actionIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "TooManyActions", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "UnknownPermission", + "inputs": [ + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "UnsupportedExecutionMode", + "inputs": [] + }, + { + "type": "error", + "name": "UnsupportedModuleType", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ValidationFailed", + "inputs": [ + { + "name": "authorizer", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ValidatorNotInstalled", + "inputs": [ + { + "name": "validator", + "type": "address", + "internalType": "address" + } + ] + } +] diff --git a/plan/agw/research/validation-e704d5b/abi/AGWFactory.json b/plan/agw/research/validation-e704d5b/abi/AGWFactory.json new file mode 100644 index 00000000..30435540 --- /dev/null +++ b/plan/agw/research/validation-e704d5b/abi/AGWFactory.json @@ -0,0 +1,1105 @@ +[ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "OPERATOR_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "PAUSER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UPGRADE_INTERFACE_VERSION", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "acceptDefaultAdminTransfer", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "beginDefaultAdminTransfer", + "inputs": [ + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "cancelDefaultAdminTransfer", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "changeDefaultAdminDelay", + "inputs": [ + { + "name": "newDelay", + "type": "uint48", + "internalType": "uint48" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "defaultAdmin", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultAdminDelay", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint48", + "internalType": "uint48" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultAdminDelayIncreaseWait", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint48", + "internalType": "uint48" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "deployWallet", + "inputs": [ + { + "name": "label", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "deployWalletWithSig", + "inputs": [ + { + "name": "intent", + "type": "tuple", + "internalType": "struct OwnerIntent", + "components": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "sessionHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "execCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "grantNonce", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "label", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "domainSeparator", + "inputs": [ + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "indexOf", + "inputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "admin", + "type": "address", + "internalType": "address" + }, + { + "name": "walletImplementation_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isWallet", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "ownerOf", + "inputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pendingDefaultAdmin", + "inputs": [], + "outputs": [ + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + }, + { + "name": "schedule", + "type": "uint48", + "internalType": "uint48" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pendingDefaultAdminDelay", + "inputs": [], + "outputs": [ + { + "name": "newDelay", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "schedule", + "type": "uint48", + "internalType": "uint48" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "predictWallet", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "deployed", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "proxiableUUID", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rollbackDefaultAdminDelay", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeToAndCall", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "walletCount", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "walletImplementation", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "DefaultAdminDelayChangeCanceled", + "inputs": [], + "anonymous": false + }, + { + "type": "event", + "name": "DefaultAdminDelayChangeScheduled", + "inputs": [ + { + "name": "newDelay", + "type": "uint48", + "indexed": false, + "internalType": "uint48" + }, + { + "name": "effectSchedule", + "type": "uint48", + "indexed": false, + "internalType": "uint48" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DefaultAdminTransferCanceled", + "inputs": [], + "anonymous": false + }, + { + "type": "event", + "name": "DefaultAdminTransferScheduled", + "inputs": [ + { + "name": "newAdmin", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "acceptSchedule", + "type": "uint48", + "indexed": false, + "internalType": "uint48" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "WalletDeployed", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "index", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "wallet", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "label", + "type": "string", + "indexed": false, + "internalType": "string" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AccessControlBadConfirmation", + "inputs": [] + }, + { + "type": "error", + "name": "AccessControlEnforcedDefaultAdminDelay", + "inputs": [ + { + "name": "schedule", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "AccessControlEnforcedDefaultAdminRules", + "inputs": [] + }, + { + "type": "error", + "name": "AccessControlInvalidDefaultAdmin", + "inputs": [ + { + "name": "defaultAdmin", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AccessControlUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "neededRole", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "AddressEmptyCode", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "CloneArgumentsTooLong", + "inputs": [] + }, + { + "type": "error", + "name": "Create2EmptyBytecode", + "inputs": [] + }, + { + "type": "error", + "name": "ERC1967InvalidImplementation", + "inputs": [ + { + "name": "implementation", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC1967NonPayable", + "inputs": [] + }, + { + "type": "error", + "name": "EnforcedPause", + "inputs": [] + }, + { + "type": "error", + "name": "ExecutorMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ExpectedPause", + "inputs": [] + }, + { + "type": "error", + "name": "FailedCall", + "inputs": [] + }, + { + "type": "error", + "name": "FailedDeployment", + "inputs": [] + }, + { + "type": "error", + "name": "ImplementationNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "IndexMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "provided", + "type": "uint96", + "internalType": "uint96" + } + ] + }, + { + "type": "error", + "name": "IndexOutOfRange", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "next", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "InsufficientBalance", + "inputs": [ + { + "name": "balance", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "needed", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "IntentWalletMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "provided", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidOwnerSignature", + "inputs": [] + }, + { + "type": "error", + "name": "NotAWallet", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "SafeCastOverflowedUintDowncast", + "inputs": [ + { + "name": "bits", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SignatureExpired", + "inputs": [ + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "UUPSUnauthorizedCallContext", + "inputs": [] + }, + { + "type": "error", + "name": "UUPSUnsupportedProxiableUUID", + "inputs": [ + { + "name": "slot", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ZeroAddress", + "inputs": [] + } +] diff --git a/plan/agw/research/validation-e704d5b/abi/AgentValidator.json b/plan/agw/research/validation-e704d5b/abi/AgentValidator.json new file mode 100644 index 00000000..86830881 --- /dev/null +++ b/plan/agw/research/validation-e704d5b/abi/AgentValidator.json @@ -0,0 +1,141 @@ +[ + { + "type": "function", + "name": "isInitialized", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "isModuleType", + "inputs": [ + { + "name": "moduleTypeId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "onInstall", + "inputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "onUninstall", + "inputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "validateConfig", + "inputs": [ + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "validateSignatureWithData", + "inputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "validSig", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "error", + "name": "AlreadyInitialized", + "inputs": [ + { + "name": "smartAccount", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "MalformedConfig", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitialized", + "inputs": [ + { + "name": "smartAccount", + "type": "address", + "internalType": "address" + } + ] + } +] diff --git a/plan/agw/research/validation-e704d5b/abi/SmartSession.json b/plan/agw/research/validation-e704d5b/abi/SmartSession.json new file mode 100644 index 00000000..bdf678eb --- /dev/null +++ b/plan/agw/research/validation-e704d5b/abi/SmartSession.json @@ -0,0 +1,1957 @@ +[ + { + "type": "function", + "name": "areActionsEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areERC1271PoliciesEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areUserOpPoliciesEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "disableActionId", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "disableActionPolicies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + }, + { + "name": "policies", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "disableERC1271Policies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policies", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "contexts", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "disableUserOpPolicies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policies", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "enableActionPolicies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "enableERC1271Policies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "erc1271Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "enableSessions", + "inputs": [ + { + "name": "sessions", + "type": "tuple[]", + "internalType": "struct Session[]", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "permissionIds", + "type": "bytes32[]", + "internalType": "PermissionId[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "enableUserOpPolicies", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getActionPolicies", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + } + ], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getERC1271Policies", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getEnabledActions", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getEnabledERC7739Content", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "enabledERC7739ContentHashes", + "type": "tuple[]", + "internalType": "struct ERC7739ContextHashes[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNameHashes", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getNonce", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPermissionIDs", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "permissionIds", + "type": "bytes32[]", + "internalType": "PermissionId[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPermissionId", + "inputs": [ + { + "name": "session", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "getSessionDigest", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + }, + { + "name": "mode", + "type": "uint8", + "internalType": "enum SmartSessionMode" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getSessionValidatorAndConfig", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "address" + }, + { + "name": "sessionValidatorData", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getUserOpPolicies", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isActionIdEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isActionPolicyEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "internalType": "ActionId" + }, + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isERC1271PolicyEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isERC7739ContentEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "content", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isISessionValidatorSet", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isInitialized", + "inputs": [ + { + "name": "smartAccount", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isModuleType", + "inputs": [ + { + "name": "typeID", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "isPermissionEnabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isUserOpPolicyEnabled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isValidSignatureWithSender", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "hash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "signature", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "result", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "onInstall", + "inputs": [ + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onUninstall", + "inputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "removeSession", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeEnableSignature", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setPermit4337Paymaster", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "enabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "validateUserOp", + "inputs": [ + { + "name": "userOp", + "type": "tuple", + "internalType": "struct PackedUserOperation", + "components": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "initCode", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "callData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "accountGasLimits", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "preVerificationGas", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "gasFees", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "paymasterAndData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "signature", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "userOpHash", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "vd", + "type": "uint256", + "internalType": "ValidationData" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ActionIdDisabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "actionId", + "type": "bytes32", + "indexed": false, + "internalType": "ActionId" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "NonceIterated", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newValue", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PermissionIdPermit4337Paymaster", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "enabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PolicyDisabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "policyType", + "type": "uint8", + "indexed": false, + "internalType": "enum PolicyType" + }, + { + "name": "policy", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PolicyEnabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "policyType", + "type": "uint8", + "indexed": false, + "internalType": "enum PolicyType" + }, + { + "name": "policy", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SessionCreated", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SessionRemoved", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SessionValidatorDisabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "sessionValidator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SessionValidatorEnabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "indexed": false, + "internalType": "PermissionId" + }, + { + "name": "sessionValidator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "smartAccount", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AssociatedArray_OutOfBounds", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ChainIdMismatch", + "inputs": [ + { + "name": "providedChainId", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "ChainIdMismatch", + "inputs": [ + { + "name": "providedChainId", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "ForbiddenValidationData", + "inputs": [] + }, + { + "type": "error", + "name": "HashIndexOutOfBounds", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "HashMismatch", + "inputs": [ + { + "name": "providedHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "computedHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "HashMismatch", + "inputs": [ + { + "name": "providedHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "computedHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "InvalidActionId", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidCallTarget", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidData", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidEnableSignature", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "hash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "InvalidISessionValidator", + "inputs": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "contract ISessionValidator" + } + ] + }, + { + "type": "error", + "name": "InvalidMode", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidPermissionId", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ] + }, + { + "type": "error", + "name": "InvalidSelfCall", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidSession", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ] + }, + { + "type": "error", + "name": "InvalidSessionKeySignature", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "sessionValidator", + "type": "address", + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "userOpHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "InvalidTarget", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidUserOpSender", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "NoExecutionsInBatch", + "inputs": [] + }, + { + "type": "error", + "name": "NoPoliciesSet", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ] + }, + { + "type": "error", + "name": "PartlyEnabledActions", + "inputs": [] + }, + { + "type": "error", + "name": "PartlyEnabledPolicies", + "inputs": [] + }, + { + "type": "error", + "name": "PaymasterValidationNotEnabled", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + } + ] + }, + { + "type": "error", + "name": "PolicyViolation", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SignerNotFound", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SignerNotFound", + "inputs": [ + { + "name": "permissionId", + "type": "bytes32", + "internalType": "PermissionId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SmartSessionModuleAlreadyInstalled", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "UnsupportedCallType", + "inputs": [ + { + "name": "callType", + "type": "bytes1", + "internalType": "CallType" + } + ] + }, + { + "type": "error", + "name": "UnsupportedExecutionType", + "inputs": [] + }, + { + "type": "error", + "name": "UnsupportedPolicy", + "inputs": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "UnsupportedSmartSessionMode", + "inputs": [ + { + "name": "mode", + "type": "uint8", + "internalType": "enum SmartSessionMode" + } + ] + } +] diff --git a/plan/agw/research/validation-e704d5b/abi/UniversalRulesPolicy.json b/plan/agw/research/validation-e704d5b/abi/UniversalRulesPolicy.json new file mode 100644 index 00000000..4029c375 --- /dev/null +++ b/plan/agw/research/validation-e704d5b/abi/UniversalRulesPolicy.json @@ -0,0 +1,2066 @@ +[ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "SEND_OUTBOUND_SELECTOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SESSION_ENGINE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UNIVERSAL_EXECUTOR_MODULE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UNIVERSAL_GATEWAY_PC", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "assertSpent", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "expectedValueSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expectedAmountSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expectedCalls", + "type": "uint32", + "internalType": "uint32" + } + ], + "outputs": [], + "stateMutability": "view" + }, + { + "type": "function", + "name": "assertSpent", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "expectedSpent", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "view" + }, + { + "type": "function", + "name": "checkAction", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "creditRevert", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "outboundTxId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getConfig", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct Config", + "components": [ + { + "name": "initialized", + "type": "bool", + "internalType": "bool" + }, + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "destChainHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "expectedCEA", + "type": "address", + "internalType": "address" + }, + { + "name": "asset", + "type": "address", + "internalType": "address" + }, + { + "name": "maxAmountPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxAmountTotal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxPCPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "spent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "allowedCalls", + "type": "tuple[]", + "internalType": "struct AllowedCall[]", + "components": [ + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "beneficiaryOffset", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "hasBeneficiary", + "type": "bool", + "internalType": "bool" + }, + { + "name": "maxValue", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMode", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct ModeSlot", + "components": [ + { + "name": "initialized", + "type": "bool", + "internalType": "bool" + }, + { + "name": "mode", + "type": "uint8", + "internalType": "enum RulesType" + }, + { + "name": "vm", + "type": "uint8", + "internalType": "enum VmFamily" + }, + { + "name": "chainHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getNativeConfig", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct NativeConfig", + "components": [ + { + "name": "initialized", + "type": "bool", + "internalType": "bool" + }, + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "maxValuePerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxValueTotal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "valueSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amount", + "type": "tuple", + "internalType": "struct AmountRule", + "components": [ + { + "name": "enabled", + "type": "bool", + "internalType": "bool" + }, + { + "name": "offset", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "maxPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxTotal", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "amountSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxCalls", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "callsUsed", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "pins", + "type": "tuple[]", + "internalType": "struct ArgPin[]", + "components": [ + { + "name": "offset", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getSvmConfig", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct SvmConfig", + "components": [ + { + "name": "initialized", + "type": "bool", + "internalType": "bool" + }, + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "expectedCEA", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "gatewayProgram", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "asset", + "type": "address", + "internalType": "address" + }, + { + "name": "maxAmountPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxAmountTotal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxPCPerCall", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "spent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "ceaAccounts", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { + "name": "programs", + "type": "tuple[]", + "internalType": "struct AllowedProgram[]", + "components": [ + { + "name": "program", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "discriminator", + "type": "bytes8", + "internalType": "bytes8" + }, + { + "name": "discriminatorLen", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dataless", + "type": "bool", + "internalType": "bool" + }, + { + "name": "maxAccounts", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "name": "pins", + "type": "tuple[]", + "internalType": "struct SvmAccountPin[]", + "components": [ + { + "name": "ruleIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "accountIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "name": "dataPins", + "type": "tuple[]", + "internalType": "struct SvmDataPin[]", + "components": [ + { + "name": "ruleIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "fromEnd", + "type": "bool", + "internalType": "bool" + }, + { + "name": "offset", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "offsetB", + "type": "uint16", + "internalType": "uint16" + }, + { + "name": "len", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "mode", + "type": "uint8", + "internalType": "enum SvmDataPinMode" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "num", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "den", + "type": "uint64", + "internalType": "uint64" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "universalGatewayPC", + "type": "address", + "internalType": "address" + }, + { + "name": "universalExecutorModule", + "type": "address", + "internalType": "address" + }, + { + "name": "sessionEngine", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initializeWithMultiplexer", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "configId", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isCredited", + "inputs": [ + { + "name": "outboundTxId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pushChainHash", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "iid", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "pure" + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "NativeCallMetered", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "indexed": true, + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OutboundMetered", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "indexed": true, + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PolicySet", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "indexed": false, + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RevertCredited", + "inputs": [ + { + "name": "outboundTxId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "id", + "type": "bytes32", + "indexed": true, + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amountApplied", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulesConfigured", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "indexed": true, + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mode", + "type": "uint8", + "indexed": false, + "internalType": "enum RulesType" + }, + { + "name": "vm", + "type": "uint8", + "indexed": false, + "internalType": "enum VmFamily" + }, + { + "name": "chainHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AllowListOutOfRange", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AlreadyCredited", + "inputs": [ + { + "name": "outboundTxId", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "AlreadyInitialized", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + } + ] + }, + { + "type": "error", + "name": "AmbiguousRule", + "inputs": [ + { + "name": "i", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "j", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AmountExceedsCap", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AmountExceedsU64", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ArgPinMismatch", + "inputs": [ + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "AssetMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "BatchSizeOutOfRange", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "BeneficiaryMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "CallLimitReached", + "inputs": [ + { + "name": "callsUsed", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "maxCalls", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "type": "error", + "name": "CallNotAllowed", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "CalldataTooShort", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CalldataTooShortForAmount", + "inputs": [ + { + "name": "actualLength", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "needed", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CalldataTooShortForPin", + "inputs": [ + { + "name": "actualLength", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "needed", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CallerIsNotUEModule", + "inputs": [ + { + "name": "caller", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "CeaAccountAtUnpinnedIndex", + "inputs": [ + { + "name": "accountIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "account", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "CeaAccountsMissExpectedCEA", + "inputs": [] + }, + { + "type": "error", + "name": "ChainMismatch", + "inputs": [ + { + "name": "declared", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "assetChain", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "DiscriminatorLenOutOfRange", + "inputs": [ + { + "name": "rule", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "len", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "DuplicateSvmPin", + "inputs": [ + { + "name": "first", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "second", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "EmptyChain", + "inputs": [] + }, + { + "type": "error", + "name": "ForbiddenInnerTarget", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ForbiddenProgramInAllowList", + "inputs": [ + { + "name": "rule", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "program", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ForbiddenTargetProgram", + "inputs": [ + { + "name": "program", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "InnerValueExceedsAllowance", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxValue", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "InvalidAsset", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidCeaAccount", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "InvalidConfigField", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidExpiry", + "inputs": [ + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRevertRecipient", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidSelector", + "inputs": [ + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "InvalidSvmConfigField", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidTarget", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "MalformedInnerCalldata", + "inputs": [] + }, + { + "type": "error", + "name": "MalformedOutboundRequest", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "MalformedSvmPayload", + "inputs": [ + { + "name": "code", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "NativeAmountExceedsCap", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "NativeTargetIsGateway", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "NativeTargetZero", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitialized", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "PCValueExceedsCap", + "inputs": [ + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "PayloadNotMulticall", + "inputs": [] + }, + { + "type": "error", + "name": "PolicyNotInitialized", + "inputs": [ + { + "name": "id", + "type": "bytes32", + "internalType": "ConfigId" + }, + { + "name": "multiplexer", + "type": "address", + "internalType": "address" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ProgramListOutOfRange", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ProgramNotAllowed", + "inputs": [ + { + "name": "program", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "discriminator", + "type": "bytes8", + "internalType": "bytes8" + } + ] + }, + { + "type": "error", + "name": "RecipientMustBeEmpty", + "inputs": [] + }, + { + "type": "error", + "name": "RecipientNotPubkey", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "RecipientTargetMismatch", + "inputs": [ + { + "name": "recipient", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "target", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "RuleWithoutPin", + "inputs": [ + { + "name": "rule", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "RulesExpired", + "inputs": [ + { + "name": "validUntil", + "type": "uint48", + "internalType": "uint48" + } + ] + }, + { + "type": "error", + "name": "SelectorMismatch", + "inputs": [ + { + "name": "actual", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "expected", + "type": "bytes4", + "internalType": "bytes4" + } + ] + }, + { + "type": "error", + "name": "SpentMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmAccountCountBelowPin", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "needed", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmAccountCountMismatch", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expected", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmAccountPinMismatch", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "accountIndex", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "SvmAccountsOutOfRange", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmDataCeilingExceeded", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "ceiling", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmDataFloorNotMet", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "floor", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmDataPinInvalid", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmDataPinMismatch", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "SvmDataRatioNotMet", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "a", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "b", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "num", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "den", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "SvmDataTooShortForPin", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "ixLen", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmInstructionNotExecute", + "inputs": [ + { + "name": "instructionId", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmIxDataTooLong", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SvmMaxAccountsOutOfRange", + "inputs": [ + { + "name": "rule", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxAccounts", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmPayloadEmpty", + "inputs": [] + }, + { + "type": "error", + "name": "SvmPinIndexOutOfRange", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "accountIndex", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "SvmPinRuleOutOfRange", + "inputs": [ + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rule", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "TargetMismatch", + "inputs": [ + { + "name": "actual", + "type": "address", + "internalType": "address" + }, + { + "name": "expected", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "TooManyCeaAccounts", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TooManyPins", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TooManySvmDataPins", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TooManySvmPins", + "inputs": [ + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TotalNativeAmountExceeded", + "inputs": [ + { + "name": "newSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TotalSpendCapExceeded", + "inputs": [ + { + "name": "wouldBeTotal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TotalValueExceeded", + "inputs": [ + { + "name": "newSpent", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "UncappedGasSwapRejected", + "inputs": [] + }, + { + "type": "error", + "name": "UnsupportedNamespace", + "inputs": [ + { + "name": "chainHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ValueExceedsCap", + "inputs": [ + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cap", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ValueOnlyCalldataNotEmpty", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ValueOnlyWithAmountRule", + "inputs": [] + }, + { + "type": "error", + "name": "ValueOnlyWithPins", + "inputs": [] + }, + { + "type": "error", + "name": "WrongModeForCall", + "inputs": [ + { + "name": "actual", + "type": "uint8", + "internalType": "enum RulesType" + } + ] + }, + { + "type": "error", + "name": "WrongVmForCall", + "inputs": [ + { + "name": "actual", + "type": "uint8", + "internalType": "enum VmFamily" + } + ] + }, + { + "type": "error", + "name": "ZeroAddress", + "inputs": [] + } +] diff --git a/plan/agw/research/validation-e704d5b/build.log b/plan/agw/research/validation-e704d5b/build.log new file mode 100644 index 00000000..a4419ae8 --- /dev/null +++ b/plan/agw/research/validation-e704d5b/build.log @@ -0,0 +1,1656 @@ +Compiling 167 files with Solc 0.8.26 +Solc 0.8.26 finished in 188.81s +Compiler run successful with warnings: +Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning. + --> lib/smartsessions/contracts/lib/ConfigLib.sol:77:9: + | +77 | bool useRegistry + | ^^^^^^^^^^^^^^^^ + +Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning. + --> lib/smartsessions/contracts/lib/ConfigLib.sol:123:9: + | +123 | bool useRegistry + | ^^^^^^^^^^^^^^^^ + +Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning. + --> lib/smartsessions/contracts/lib/ConfigLib.sol:203:9: + | +203 | bool useRegistry + | ^^^^^^^^^^^^^^^^ + +Warning (5667): Unused function parameter. Remove or comment out the variable name to silence this warning. + --> lib/smartsessions/contracts/core/SmartSessionBase.sol:270:9: + | +270 | bool useRegistry + | ^^^^^^^^^^^^^^^^ + +Warning (2018): Function state mutability can be restricted to view + --> src/AGWFactory.sol:352:5: + | +352 | function _authorizeUpgrade(address newImplementation) internal override onlyRole(DEFAULT_ADMIN_ROLE) { + | ^ (Relevant source part starts here and spans across multiple lines). + + +╭-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------╮ +| Contract | Runtime Size (B) | Initcode Size (B) | Runtime Margin (B) | Initcode Margin (B) | ++===================================================================================================================================================+ +| AGW | 16,549 | 16,999 | 8,027 | 32,153 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AGWErrors | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AGWFactory | 9,992 | 10,229 | 14,584 | 38,923 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AGWFactoryErrors | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AGWFactoryV2 | 10,068 | 10,305 | 14,508 | 38,847 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Address | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AgentConfigLib | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AgentConfigLibHarness | 338 | 364 | 24,238 | 48,788 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AgentValidator | 806 | 832 | 23,770 | 48,320 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AgentValidatorErrors | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AlwaysInitializedValidator | 242 | 267 | 24,334 | 48,885 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| AssociatedArrayLib | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Bytes | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| CallRecorder | 165 | 189 | 24,411 | 48,963 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| CallerProbe | 362 | 388 | 24,214 | 48,764 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ChainLibHarness | 849 | 875 | 23,727 | 48,277 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| CheckpointHostileValidator | 561 | 587 | 24,015 | 48,565 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| CheckpointProbe | 531 | 557 | 24,045 | 48,595 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Clones | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ConfigLib | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Create2 | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| DeployerContract | 467 | 595 | 24,109 | 48,557 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| DummyModule | 212 | 236 | 24,364 | 48,916 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ECDSA | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC165Checker | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC1967Proxy | 141 | 685 | 24,435 | 48,467 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ERC1967Utils | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EfficientHashLib | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EmptyReturnPRC20Source | 63 | 87 | 24,513 | 49,065 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EmptyReturnProbeEngine | 63 | 87 | 24,513 | 49,065 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EncodeLib | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EntryPoint | 12,762 | 13,287 | 11,814 | 35,865 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EntryPointSimulations | 17,681 | 18,289 | 6,895 | 30,863 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EnumerableMap | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| EnumerableSet | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Errors | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ExcessivelySafeCall | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Exec | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ExecutionLib (lib/smartsessions/contracts/lib/ExecutionLib.sol) | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ExecutionLib (src/libraries/ExecutionLib.sol) | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| FixedVerdictPolicy | 748 | 866 | 23,828 | 48,286 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| FlatBytesLib | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ForkChainLibHarness | 669 | 695 | 23,907 | 48,457 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| GarbageEngine | 127 | 151 | 24,449 | 49,001 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| GasBurnerProbeEngine | 175 | 199 | 24,401 | 48,953 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| GasBurnerUninstall | 243 | 268 | 24,333 | 48,884 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| GasDebug | 169 | 193 | 24,407 | 48,959 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| HashLib | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| HostileValidator | 561 | 587 | 24,015 | 48,565 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| IdLib | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| LibZip | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| LowLevelCall | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Math | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MessageHashUtils | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Mock1271Owner | 775 | 908 | 23,801 | 48,244 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockERC20 | 1,313 | 1,339 | 23,263 | 47,813 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockEchoOwner | 71 | 95 | 24,505 | 49,057 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockEmptyReturnOwner | 63 | 87 | 24,513 | 49,065 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockPRC20 | 1,952 | 2,142 | 22,624 | 47,010 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockPRC20Source | 867 | 1,409 | 23,709 | 47,743 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockRevertingOwner | 106 | 130 | 24,470 | 49,022 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockUEA | 1,096 | 1,237 | 23,480 | 47,915 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockUniversalGateway | 1,488 | 1,514 | 23,088 | 47,638 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| MockWrongLengthOwner | 75 | 99 | 24,501 | 49,053 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ModeLib (lib/vendor/erc7579/src/lib/ModeLib.sol) | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ModeLib (src/libraries/ModeLib.sol) | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| NativeTarget | 178 | 202 | 24,398 | 48,950 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| NonStringPRC20Source | 70 | 94 | 24,506 | 49,058 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OwnerAuthHarness | 1,937 | 1,963 | 22,639 | 47,189 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| OwnerAuthLib | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Panic | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| PermissivePolicy | 647 | 673 | 23,929 | 48,479 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| PolicyLib | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ProxyAdmin | 926 | 1,135 | 23,650 | 48,017 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| PushChainLib | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| PushChainLibHarness | 462 | 488 | 24,114 | 48,664 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ReenteringOwner | 627 | 755 | 23,949 | 48,397 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ReenteringTarget | 359 | 385 | 24,217 | 48,767 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ReenteringWallet | 755 | 881 | 23,821 | 48,271 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ReentrantTarget | 716 | 742 | 23,860 | 48,410 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ReentryLatch | 193 | 217 | 24,383 | 48,935 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Reverter (test/unit/18_checkpoints.t.sol) | 148 | 172 | 24,428 | 48,980 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Reverter (test/unit/2_ownerDoor.t.sol) | 116 | 140 | 24,460 | 49,012 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| RevertingApproval | 76 | 100 | 24,500 | 49,052 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| RevertingGateway | 88 | 112 | 24,488 | 49,040 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| RevertingInitWallet | 116 | 140 | 24,460 | 49,012 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| RevertingPRC20Source | 116 | 140 | 24,460 | 49,012 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| RevertingProbeEngine | 204 | 228 | 24,372 | 48,924 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| RevertingUninstall | 244 | 269 | 24,332 | 48,883 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SafeCast | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SenderCreator | 345 | 371 | 24,231 | 48,781 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ShortReturnProbeEngine | 123 | 147 | 24,453 | 49,005 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SignedMath | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SignerLib | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SmartSession | 22,581 | 22,607 | 1,995 | 26,545 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SmartSessionModeLib | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StakeDummy | 1,257 | 1,397 | 23,319 | 47,755 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| StorageSlot | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| Strings | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| SudoPolicy | 775 | 801 | 23,801 | 48,351 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| TransientSlot | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| TransparentUpgradeableProxy | 830 | 2,803 | 23,746 | 46,349 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| URPExposed | 24,085 | 24,298 | 491 | 24,854 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| UniversalRulesPolicy | 23,673 | 23,886 | 903 | 25,266 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| UniversalRulesPolicyErrors | 57 | 85 | 24,519 | 49,067 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| UserOperationLib | 176 | 204 | 24,400 | 48,948 | +|-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------| +| ValidationDataLib | 57 | 85 | 24,519 | 49,067 | +╰-----------------------------------------------------------------+------------------+-------------------+--------------------+---------------------╯ + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/libraries/Types.sol:15:13 + | +15 | uint256 maxPCForGas; // max native PC for gas swap; 0 = no cap + | ^^^^^^^^^^^ help: consider using: `maxPcForGas` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/10_ownerIntent.t.sol:59:22 + | +59 | address internal EXECUTOR; + | ^^^^^^^^ help: consider using: `executor` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/10_ownerIntent.t.sol:61:22 + | +61 | address internal ASSET; + | ^^^^^ help: consider using: `asset` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/10_ownerIntent.t.sol:62:22 + | +62 | address internal PROTOCOL; + | ^^^^^^^^ help: consider using: `protocol` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/10_ownerIntent.t.sol:63:22 + | +63 | address internal CEA; + | ^^^ help: consider using: `cea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[asm-keccak256]: use of inefficient hashing mechanism; consider using inline assembly + --> src/libraries/PushChainLib.sol:45:16 + | +45 | return keccak256(bytes(string.concat("eip155:", Strings.toString(block.chainid)))); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#asm-keccak256 + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/mocks/MockPRC20Source.sol:27:19 + | +27 | string public SOURCE_CHAIN_NAMESPACE; + | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `sourceChainNamespace` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/2_ownerDoor.t.sol:49:22 + | +49 | address internal WALLET_OWNER; + | ^^^^^^^^^^^^ help: consider using: `walletOwner` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/2_ownerDoor.t.sol:53:22 + | +53 | address internal PRC20; + | ^^^^^ help: consider using: `prc20` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/libraries/Types.sol:219:13 + | +219 | address expectedCEA; + | ^^^^^^^^^^^ help: consider using: `expectedCea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/libraries/Types.sol:223:13 + | +223 | uint256 maxPCPerCall; + | ^^^^^^^^^^^^ help: consider using: `maxPcPerCall` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[asm-keccak256]: use of inefficient hashing mechanism; consider using inline assembly + --> src/libraries/OwnerAuthLib.sol:46:16 + | +46 | return keccak256( + | ________________^ +47 | | abi.encode( +48 | | OWNER_INTENT_DOMAIN_TYPEHASH, +49 | | OWNER_INTENT_DOMAIN_NAME_HASH, +... | +55 | | ); + | |_________^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#asm-keccak256 + +note[asm-keccak256]: use of inefficient hashing mechanism; consider using inline assembly + --> src/libraries/OwnerAuthLib.sol:65:16 + | +65 | return keccak256(abi.encode(OWNER_INTENT_TYPEHASH, i)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#asm-keccak256 + +note[asm-keccak256]: use of inefficient hashing mechanism; consider using inline assembly + --> src/libraries/OwnerAuthLib.sol:70:16 + | +70 | return keccak256(abi.encodePacked("\x19\x01", domainSeparator(factory, i.signerChainId), hashIntent(i))); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#asm-keccak256 + +note[unsafe-cheatcode]: usage of unsafe cheatcodes that can perform dangerous operations + --> test/unit/16_agentValidator.t.sol:126:37 + | +126 | string memory artifact = vm.readFile("out/AgentValidator.sol/AgentValidator.json"); + | ^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-cheatcode + +note[mixed-case-function]: function names should use mixedCase + --> test/mocks/MockPRC20Source.sol:45:14 + | +45 | function SOURCE_CHAIN_NAMESPACE() external pure returns (string memory) { + | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `sourceChainNamespace` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-function + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:88:22 + | +88 | address internal ACCOUNT; + | ^^^^^^^ help: consider using: `account` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/5_universalRulebook.t.sol:50:22 + | +50 | address internal PROTOCOL; + | ^^^^^^^^ help: consider using: `protocol` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/libraries/Types.sol:243:13 + | +243 | address expectedCEA; + | ^^^^^^^^^^^ help: consider using: `expectedCea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:89:22 + | +89 | address internal ASSET; + | ^^^^^ help: consider using: `asset` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:92:22 + | +92 | bytes32 internal CEA = keccak256("push_identity pda for ACCOUNT"); + | ^^^ help: consider using: `cea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:93:22 + | +93 | bytes32 internal ATA_IN = keccak256("ata(CEA, USDC)"); + | ^^^^^^ help: consider using: `ataIn` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:94:22 + | +94 | bytes32 internal ATA_OUT = keccak256("ata(CEA, WETH)"); + | ^^^^^^^ help: consider using: `ataOut` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:95:22 + | +95 | bytes32 internal MINT_IN = keccak256("USDC mint"); + | ^^^^^^^ help: consider using: `mintIn` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/integration/8_e2e.t.sol:63:24 + | +63 | MockPRC20 internal pUSDC; + | ^^^^^ help: consider using: `pUsdc` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/integration/8_e2e.t.sol:66:22 + | +66 | address internal BOB_UEA; + | ^^^^^^^ help: consider using: `bobUea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/libraries/Types.sol:247:13 + | +247 | uint256 maxPCPerCall; + | ^^^^^^^^^^^^ help: consider using: `maxPcPerCall` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[screaming-snake-case-const]: constants should use SCREAMING_SNAKE_CASE + --> test/mocks/MockERC20.sol:19:28 + | +19 | string public constant name = "Mock USD"; + | ^^^^ help: consider using: `NAME` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#screaming-snake-case-const + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/libraries/Types.sol:470:13 + | +470 | bytes32 expectedCEA; + | ^^^^^^^^^^^ help: consider using: `expectedCea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[unsafe-cheatcode]: usage of unsafe cheatcodes that can perform dangerous operations + --> test/unit/2_ownerDoor.t.sol:823:37 + | +823 | string memory artifact = vm.readFile("out/AGW.sol/AGW.json"); + | ^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-cheatcode + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:96:22 + | +96 | bytes32 internal MINT_OUT = keccak256("WETH mint"); + | ^^^^^^^^ help: consider using: `mintOut` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:97:22 + | +97 | bytes32 internal GATEWAY_PROG = keccak256("push svm gateway program"); + | ^^^^^^^^^^^^ help: consider using: `gatewayProg` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:98:22 + | +98 | bytes32 internal PROG = keccak256("aggregator program"); + | ^^^^ help: consider using: `prog` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:99:22 + | +99 | bytes32 internal PROG2 = keccak256("some other program"); + | ^^^^^ help: consider using: `prog2` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:100:22 + | +100 | bytes32 internal TOKEN_PROG_ACC = keccak256("token program (as an account)"); + | ^^^^^^^^^^^^^^ help: consider using: `tokenProgAcc` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/libraries/Types.sol:475:13 + | +475 | uint256 maxPCPerCall; + | ^^^^^^^^^^^^ help: consider using: `maxPcPerCall` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/integration/8_e2e.t.sol:70:22 + | +70 | address internal BOB_AGW_CEA; + | ^^^^^^^^^^^ help: consider using: `bobAgwCea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/AGW.sol:131:98 + | +131 | constructor(address sessionEngine_, address rulesPolicy_, address sessionValidator_, address universalGatewayPC_) { + | ^^^^^^^^^^^^^^^^^^^ help: consider using: `universalGatewayPc_` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[unused-import]: unused imports should be removed + --> test/unit/2_ownerDoor.t.sol:10:61 + | +10 | import { AllowedCall, Config, OWNER_LANE_FLAG, OwnerIntent, RulesType } from "../../src/libraries/Types.sol"; + | ^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[unused-import]: unused imports should be removed + --> test/unit/2_ownerDoor.t.sol:21:5 + | +21 | ModePayload, + | ^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[unused-import]: unused imports should be removed + --> test/unit/2_ownerDoor.t.sol:22:5 + | +22 | CALLTYPE_SINGLE, + | ^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[unused-import]: unused imports should be removed + --> test/unit/2_ownerDoor.t.sol:23:5 + | +23 | CALLTYPE_BATCH, + | ^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[unused-import]: unused imports should be removed + --> test/unit/2_ownerDoor.t.sol:24:5 + | +24 | CALLTYPE_STATIC, + | ^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[unused-import]: unused imports should be removed + --> test/unit/2_ownerDoor.t.sol:25:5 + | +25 | CALLTYPE_DELEGATECALL, + | ^^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[unused-import]: unused imports should be removed + --> test/unit/2_ownerDoor.t.sol:26:5 + | +26 | EXECTYPE_DEFAULT, + | ^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[unused-import]: unused imports should be removed + --> test/unit/2_ownerDoor.t.sol:27:5 + | +27 | EXECTYPE_TRY, + | ^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[unused-import]: unused imports should be removed + --> test/unit/2_ownerDoor.t.sol:28:5 + | +28 | MODE_DEFAULT + | ^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[unused-import]: unused imports should be removed + --> test/unit/2_ownerDoor.t.sol:35:10 + | +35 | import { Session, PermissionId } from "smartsessions/DataTypes.sol"; + | ^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/5_universalRulebook.t.sol:51:22 + | +51 | address internal CEA; + | ^^^ help: consider using: `cea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/5_universalRulebook.t.sol:71:22 + | +71 | address internal ACCOUNT; + | ^^^^^^^ help: consider using: `account` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/5_universalRulebook.t.sol:72:22 + | +72 | address internal ASSET; + | ^^^^^ help: consider using: `asset` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/libraries/Types.sol:490:13 + | +490 | bytes32 expectedCEA; + | ^^^^^^^^^^^ help: consider using: `expectedCea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/libraries/Types.sol:495:13 + | +495 | uint256 maxPCPerCall; + | ^^^^^^^^^^^^ help: consider using: `maxPcPerCall` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/13_chainDerivation.t.sol:54:22 + | +54 | address internal WALLET_OWNER; + | ^^^^^^^^^^^^ help: consider using: `walletOwner` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/13_chainDerivation.t.sol:58:22 + | +58 | address internal PRC20; + | ^^^^^ help: consider using: `prc20` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/13_chainDerivation.t.sol:60:22 + | +60 | address internal CEA; + | ^^^ help: consider using: `cea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/13_chainDerivation.t.sol:61:22 + | +61 | address internal PROTOCOL; + | ^^^^^^^^ help: consider using: `protocol` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[unwrapped-modifier-logic]: wrap modifier logic to reduce code size + --> src/AGW.sol:147:5 + | +147 | / modifier onlyOwner() { +148 | | if (msg.sender != _owner()) revert AGWErrors.CallerIsNotOwner(); +149 | | _; +150 | | } + | |_____^ + | +help: wrap modifier logic to reduce code size + | +147 ~ modifier onlyOwner() { +148 + _onlyOwner(); +149 + _; +150 + } +151 + +152 + function _onlyOwner() internal { +153 + if (msg.sender != _owner()) revert AGWErrors.CallerIsNotOwner(); +154 + } + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unwrapped-modifier-logic + +note[screaming-snake-case-const]: constants should use SCREAMING_SNAKE_CASE + --> test/mocks/MockERC20.sol:20:28 + | +20 | string public constant symbol = "mUSD"; + | ^^^^^^ help: consider using: `SYMBOL` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#screaming-snake-case-const + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/integration/8_e2e.t.sol:73:22 + | +73 | address internal MORPHO_BLUE; + | ^^^^^^^^^^^ help: consider using: `morphoBlue` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[unsafe-cheatcode]: usage of unsafe cheatcodes that can perform dangerous operations + --> test/unit/27_naming.t.sol:154:28 + | +154 | return vm.split(vm.readFile(path), "\"bytecode\"")[0]; + | ^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-cheatcode + +note[unwrapped-modifier-logic]: wrap modifier logic to reduce code size + --> src/AGW.sol:171:5 + | +171 | / modifier onlyOwnerOrSelf() { +172 | | if (msg.sender != _owner() && msg.sender != address(this)) revert AGWErrors.CallerIsNotOwner(); +173 | | _; +174 | | } + | |_____^ + | +help: wrap modifier logic to reduce code size + | +171 ~ modifier onlyOwnerOrSelf() { +172 + _onlyOwnerOrSelf(); +173 + _; +174 + } +175 + +176 + function _onlyOwnerOrSelf() internal { +177 + if (msg.sender != _owner() && msg.sender != address(this)) revert AGWErrors.CallerIsNotOwner(); +178 + } + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unwrapped-modifier-logic + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:101:22 + | +101 | bytes32 internal PROGRAM_AUTHORITY = keccak256("aggregator program authority"); + | ^^^^^^^^^^^^^^^^^ help: consider using: `programAuthority` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:102:22 + | +102 | bytes32 internal PROG_SRC = keccak256("program source token account"); + | ^^^^^^^^ help: consider using: `progSrc` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:103:22 + | +103 | bytes32 internal PROG_DST = keccak256("program destination token account"); + | ^^^^^^^^ help: consider using: `progDst` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/9_svmRulebook.t.sol:104:22 + | +104 | bytes32 internal ATTACKER = keccak256("attacker account"); + | ^^^^^^^^ help: consider using: `attacker` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[unsafe-cheatcode]: usage of unsafe cheatcodes that can perform dangerous operations + --> test/unit/5_universalRulebook.t.sol:468:37 + | +468 | string memory artifact = vm.readFile("out/UniversalRulesPolicy.sol/UniversalRulesPolicy.json"); + | ^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-cheatcode + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/6_nativeRulebook.t.sol:41:22 + | +41 | address internal ACCOUNT; + | ^^^^^^^ help: consider using: `account` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/6_nativeRulebook.t.sol:42:22 + | +42 | address internal STAKE; + | ^^^^^ help: consider using: `stake` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[asm-keccak256]: use of inefficient hashing mechanism; consider using inline assembly + --> src/AGW.sol:380:32 + | +380 | bytes32 calldataHash = keccak256(executionCalldata); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#asm-keccak256 + +note[screaming-snake-case-const]: constants should use SCREAMING_SNAKE_CASE + --> test/mocks/MockERC20.sol:21:27 + | +21 | uint8 public constant decimals = 6; + | ^^^^^^^^ help: consider using: `DECIMALS` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#screaming-snake-case-const + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/5_universalRulebook.t.sol:836:23 + | +836 | Config memory noCEA = _defaultConfig(); + | ^^^^^ help: consider using: `noCea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/policies/UniversalRulesPolicy.sol:161:20 + | +161 | address public UNIVERSAL_GATEWAY_PC; + | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `universalGatewayPc` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[screaming-snake-case-const]: constants should use SCREAMING_SNAKE_CASE + --> test/mocks/MockUniversalGateway.sol:73:28 + | +73 | string public constant name = "Push USDC"; + | ^^^^ help: consider using: `NAME` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#screaming-snake-case-const + +note[screaming-snake-case-const]: constants should use SCREAMING_SNAKE_CASE + --> test/mocks/MockUniversalGateway.sol:74:28 + | +74 | string public constant symbol = "pUSDC"; + | ^^^^^^ help: consider using: `SYMBOL` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#screaming-snake-case-const + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/policies/UniversalRulesPolicy.sol:166:20 + | +166 | address public UNIVERSAL_EXECUTOR_MODULE; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `universalExecutorModule` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[unused-import]: unused imports should be removed + --> test/unit/6_nativeRulebook.t.sol:8:10 + | +8 | import { UniversalRulesPolicy } from "../../src/policies/UniversalRulesPolicy.sol"; + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[asm-keccak256]: use of inefficient hashing mechanism; consider using inline assembly + --> src/AGW.sol:515:31 + | +515 | bytes32 sessionHash = keccak256(abi.encode(session)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#asm-keccak256 + +note[unused-import]: unused imports should be removed + --> test/integration/8_e2e.t.sol:6:10 + | +6 | import { Vm } from "forge-std/Vm.sol"; + | ^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[unsafe-cheatcode]: usage of unsafe cheatcodes that can perform dangerous operations + --> test/integration/25_deploymentRecord.t.sol:40:35 + | +40 | string memory record = vm.readFile(path); + | ^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-cheatcode + +note[screaming-snake-case-immutable]: immutables should use SCREAMING_SNAKE_CASE + --> test/mocks/StakeDummy.sol:30:32 + | +30 | MockERC20 public immutable token; + | ^^^^^ help: consider using: `TOKEN` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#screaming-snake-case-immutable + +warning[unsafe-typecast]: typecasts that can truncate values should be checked + --> test/unit/6_nativeRulebook.t.sol:209:44 + | +209 | cfg.pins[i] = ArgPin({ offset: uint16(4 + i * 32), expected: bytes32(i) }); + | ^^^^^^^^^^^^^^^^^^ + | + = note: consider disabling this lint if you're certain the cast is safe + + // casting to 'uint16' is safe because [explain why] + // forge-lint: disable-next-line(unsafe-typecast) + + + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-typecast + +note[asm-keccak256]: use of inefficient hashing mechanism; consider using inline assembly + --> src/AGW.sol:829:29 + | +829 | bytes32 callsHash = keccak256(executionCalldata); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#asm-keccak256 + +note[screaming-snake-case-const]: constants should use SCREAMING_SNAKE_CASE + --> test/mocks/MockUniversalGateway.sol:75:27 + | +75 | uint8 public constant decimals = 6; + | ^^^^^^^^ help: consider using: `DECIMALS` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#screaming-snake-case-const + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/policies/UniversalRulesPolicy.sol:171:20 + | +171 | address public SESSION_ENGINE; + | ^^^^^^^^^^^^^^ help: consider using: `sessionEngine` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +warning[erc20-unchecked-transfer]: ERC20 'transfer' and 'transferFrom' calls should check the return value + --> test/mocks/StakeDummy.sol:59:9 + | +59 | token.transferFrom(msg.sender, address(this), amount); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#erc20-unchecked-transfer + +warning[unsafe-typecast]: typecasts that can truncate values should be checked + --> src/AGW.sol:916:38 + | +916 | address authorizer = address(uint160(vd)); + | ^^^^^^^^^^^ + | + = note: consider disabling this lint if you're certain the cast is safe + + // casting to 'uint160' is safe because [explain why] + // forge-lint: disable-next-line(unsafe-typecast) + + + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-typecast + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/19_ownerAuthLib.t.sol:234:17 + | +234 | address predictedUEA = makeAddr("notYetDeployedUEA"); + | ^^^^^^^^^^^^ help: consider using: `predictedUea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[unused-import]: unused imports should be removed + --> test/unit/5_universalRulebook.t.sol:20:5 + | +20 | VALUE_SELECTOR, + | ^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/mocks/MockUniversalGateway.sol:83:19 + | +83 | string public SOURCE_CHAIN_NAMESPACE = "eip155:11155111"; + | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `sourceChainNamespace` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +warning[unsafe-typecast]: typecasts that can truncate values should be checked + --> src/AGW.sol:917:29 + | +917 | uint48 validUntil = uint48(vd >> 160); // 0 = unbounded + | ^^^^^^^^^^^^^^^^^ + | + = note: consider disabling this lint if you're certain the cast is safe + + // casting to 'uint48' is safe because [explain why] + // forge-lint: disable-next-line(unsafe-typecast) + + + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-typecast + +note[unsafe-cheatcode]: usage of unsafe cheatcodes that can perform dangerous operations + --> test/integration/25_deploymentRecord.t.sol:138:16 + | +138 | vm.removeFile(path); + | ^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-cheatcode + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/4_agentDoor.t.sol:61:22 + | +61 | address internal WALLET_OWNER; + | ^^^^^^^^^^^^ help: consider using: `walletOwner` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/4_agentDoor.t.sol:69:22 + | +69 | address internal CEA; + | ^^^ help: consider using: `cea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/4_agentDoor.t.sol:70:22 + | +70 | address internal PROTOCOL; + | ^^^^^^^^ help: consider using: `protocol` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[unsafe-cheatcode]: usage of unsafe cheatcodes that can perform dangerous operations + --> test/integration/25_deploymentRecord.t.sol:143:12 + | +143 | vm.removeFile(path); + | ^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-cheatcode + +warning[unsafe-typecast]: typecasts that can truncate values should be checked + --> test/unit/21_constantMirrors.t.sol:150:47 + | +150 | ActionId.unwrap(target.toActionId(bytes4(hex"aabbccdd"))) != valueOnlyId, + | ^^^^^^^^^^^^^^^^^^^^^ + | + = note: consider disabling this lint if you're certain the cast is safe + + // casting to 'bytes4' is safe because [explain why] + // forge-lint: disable-next-line(unsafe-typecast) + + + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-typecast + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/4_agentDoor.t.sol:71:22 + | +71 | address internal ASSET; + | ^^^^^ help: consider using: `asset` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +warning[erc20-unchecked-transfer]: ERC20 'transfer' and 'transferFrom' calls should check the return value + --> test/mocks/StakeDummy.sol:82:9 + | +82 | token.transfer(msg.sender, amount); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#erc20-unchecked-transfer + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/integration/23_engine.t.sol:60:24 + | +60 | MockPRC20 internal pUSDC; + | ^^^^^ help: consider using: `pUsdc` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/integration/23_engine.t.sol:63:22 + | +63 | address internal WALLET_OWNER; + | ^^^^^^^^^^^^ help: consider using: `walletOwner` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/integration/23_engine.t.sol:65:22 + | +65 | address internal CEA; + | ^^^ help: consider using: `cea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/15_assetTeeth.t.sol:44:22 + | +44 | address internal ACCOUNT; + | ^^^^^^^ help: consider using: `account` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/12_nativeGrant.t.sol:45:22 + | +45 | address internal WALLET_OWNER; + | ^^^^^^^^^^^^ help: consider using: `walletOwner` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/policies/UniversalRulesPolicy.sol:214:25 + | +214 | uint256[42] private __gap; + | ^^^^^ help: consider using: `_gap` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[unused-import]: unused imports should be removed + --> test/unit/12_nativeGrant.t.sol:18:10 + | +18 | import { ISmartSession } from "smartsessions/ISmartSession.sol"; + | ^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/policies/UniversalRulesPolicy.sol:241:33 + | +241 | function initialize(address universalGatewayPC, address universalExecutorModule, address sessionEngine) + | ^^^^^^^^^^^^^^^^^^ help: consider using: `universalGatewayPc` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +warning[unsafe-typecast]: typecasts that can truncate values should be checked + --> test/unit/12_nativeGrant.t.sol:67:40 + | +67 | pins[i] = ArgPin({ offset: uint16(4 + i * 32), expected: bytes32(uint256(i + 1)) }); + | ^^^^^^^^^^^^^^^^^^ + | + = note: consider disabling this lint if you're certain the cast is safe + + // casting to 'uint16' is safe because [explain why] + // forge-lint: disable-next-line(unsafe-typecast) + + + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-typecast + +warning[unsafe-typecast]: typecasts that can truncate values should be checked + --> src/AGW.sol:918:29 + | +918 | uint48 validAfter = uint48(vd >> 208); + | ^^^^^^^^^^^^^^^^^ + | + = note: consider disabling this lint if you're certain the cast is safe + + // casting to 'uint48' is safe because [explain why] + // forge-lint: disable-next-line(unsafe-typecast) + + + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-typecast + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/15_assetTeeth.t.sol:45:22 + | +45 | address internal CEA; + | ^^^ help: consider using: `cea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/15_assetTeeth.t.sol:46:22 + | +46 | address internal PROTOCOL; + | ^^^^^^^^ help: consider using: `protocol` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +warning[unsafe-typecast]: typecasts that can truncate values should be checked + --> test/unit/12_nativeGrant.t.sol:109:56 + | +109 | a[i] = _action(address(stakeDummy), bytes4(uint32(0x33000000 + i)), MAX_PINS); + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = note: consider disabling this lint if you're certain the cast is safe + + // casting to 'uint32' is safe because [explain why] + // forge-lint: disable-next-line(unsafe-typecast) + + + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-typecast + +note[mixed-case-variable]: mutable variables should use mixedCase + --> src/policies/UniversalRulesPolicy.sol:1005:17 + | +1005 | address expectedCEA = cfg.expectedCEA; + | ^^^^^^^^^^^ help: consider using: `expectedCea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[unsafe-cheatcode]: usage of unsafe cheatcodes that can perform dangerous operations + --> test/integration/25_deploymentRecord.t.sol:149:33 + | +149 | vm.parseJsonUint(vm.readFile(path), ".chainId"), + | ^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-cheatcode + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/11_nativeDoor.t.sol:57:22 + | +57 | address internal WALLET_OWNER; + | ^^^^^^^^^^^^ help: consider using: `walletOwner` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/3_rulesLifecycle.t.sol:42:22 + | +42 | address internal WALLET_OWNER; + | ^^^^^^^^^^^^ help: consider using: `walletOwner` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/3_rulesLifecycle.t.sol:46:22 + | +46 | address internal PRC20; + | ^^^^^ help: consider using: `prc20` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/integration/23_engine.t.sol:66:22 + | +66 | address internal PROTOCOL; + | ^^^^^^^^ help: consider using: `protocol` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[unused-import]: unused imports should be removed + --> test/review/IndependentReviewHead.t.sol:19:10 + | +19 | import { MockERC20 } from "../mocks/MockERC20.sol"; + | ^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[mixed-case-function]: function names should use mixedCase + --> src/policies/UniversalRulesPolicy.sol:1373:14 + | +1373 | function _uintLE(bytes memory b, uint256 off, uint256 len) internal pure returns (uint256 v) { + | ^^^^^^^ help: consider using: `_uintLe` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-function + +note[unused-import]: unused imports should be removed + --> test/unit/11_nativeDoor.t.sol:12:10 + | +12 | import { UniversalRulesPolicy } from "../../src/policies/UniversalRulesPolicy.sol"; + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[unused-import]: unused imports should be removed + --> test/integration/23_engine.t.sol:10:31 + | +10 | import { AllowedCall, Config, RulesType } from "../../src/libraries/Types.sol"; + | ^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[unused-import]: unused imports should be removed + --> test/integration/23_engine.t.sol:29:5 + | +29 | ConfigId, + | ^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +warning[unsafe-typecast]: typecasts that can truncate values should be checked + --> test/unit/11_nativeDoor.t.sol:622:33 + | +622 | c.selector = bytes4(uint32(0x22000000 + i)); + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = note: consider disabling this lint if you're certain the cast is safe + + // casting to 'uint32' is safe because [explain why] + // forge-lint: disable-next-line(unsafe-typecast) + + + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-typecast + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/14_rulesEnvelope.t.sol:36:22 + | +36 | address internal ACCOUNT; + | ^^^^^^^ help: consider using: `account` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/14_rulesEnvelope.t.sol:37:22 + | +37 | address internal CEA; + | ^^^ help: consider using: `cea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/14_rulesEnvelope.t.sol:38:22 + | +38 | address internal PROTOCOL; + | ^^^^^^^^ help: consider using: `protocol` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/14_rulesEnvelope.t.sol:39:22 + | +39 | address internal ASSET; + | ^^^^^ help: consider using: `asset` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/1_factory.t.sol:52:22 + | +52 | address internal PAUSER; + | ^^^^^^ help: consider using: `pauser` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/1_factory.t.sol:53:22 + | +53 | address internal OPERATOR; + | ^^^^^^^^ help: consider using: `operator` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[unsafe-cheatcode]: usage of unsafe cheatcodes that can perform dangerous operations + --> test/unit/1_factory.t.sol:81:37 + | +81 | string memory artifact = vm.readFile("out/AGWFactory.sol/AGWFactory.json"); + | ^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-cheatcode + +note[asm-keccak256]: use of inefficient hashing mechanism; consider using inline assembly + --> src/AGWFactory.sol:215:24 + | +215 | bytes32 salt = keccak256(abi.encode(owner, index)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#asm-keccak256 + +note[asm-keccak256]: use of inefficient hashing mechanism; consider using inline assembly + --> src/AGWFactory.sol:233:24 + | +233 | bytes32 salt = keccak256(abi.encode(owner, index)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#asm-keccak256 + +warning[unsafe-typecast]: typecasts that can truncate values should be checked + --> src/AGWFactory.sol:261:50 + | +261 | wallet = _predict(implementation, owner, uint96(index)); + | ^^^^^^^^^^^^^ + | + = note: consider disabling this lint if you're certain the cast is safe + + // casting to 'uint96' is safe because [explain why] + // forge-lint: disable-next-line(unsafe-typecast) + + + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-typecast + +note[asm-keccak256]: use of inefficient hashing mechanism; consider using inline assembly + --> src/policies/UniversalRulesPolicy.sol:338:29 + | +338 | bytes32 chainHash = keccak256(bytes(chainNamespace)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#asm-keccak256 + +note[named-struct-fields]: prefer initializing structs with named fields + --> test/review/IndependentReviewHead.t.sol:38:20 + | +38 | calls[0] = Execution(address(urp), 0, assertCall); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using named fields: `Execution({ target: address(urp), value: 0, callData: assertCall })` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#named-struct-fields + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/Base.t.sol:71:22 + | +71 | address internal FACTORY; + | ^^^^^^^ help: consider using: `factory` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/Base.t.sol:73:22 + | +73 | address internal FACTORY_ADMIN; + | ^^^^^^^^^^^^^ help: consider using: `factoryAdmin` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/Base.t.sol:76:22 + | +76 | address internal URP_ADMIN_OWNER; + | ^^^^^^^^^^^^^^^ help: consider using: `urpAdminOwner` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> script/Deploy.s.sol:62:17 + | +62 | address gatewayPC = vm.envAddress("UNIVERSAL_GATEWAY_PC"); + | ^^^^^^^^^ help: consider using: `gatewayPc` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/unit/1_factory.t.sol:838:22 + | +838 | address internal EXECUTOR; + | ^^^^^^^^ help: consider using: `executor` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/Base.t.sol:80:22 + | +80 | address internal GATEWAY; + | ^^^^^^^ help: consider using: `gateway` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/Base.t.sol:81:22 + | +81 | address internal EXECUTOR_MODULE; + | ^^^^^^^^^^^^^^^ help: consider using: `executorModule` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/Base.t.sol:82:22 + | +82 | address internal RELAYER; + | ^^^^^^^ help: consider using: `relayer` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +warning[unsafe-typecast]: typecasts that can truncate values should be checked + --> test/unit/3_rulesLifecycle.t.sol:218:86 + | +218 | a[i] = _nativeAction(_addr(string(abi.encodePacked("proto", i))), bytes4(uint32(0x11000000 + i))); + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = note: consider disabling this lint if you're certain the cast is safe + + // casting to 'uint32' is safe because [explain why] + // forge-lint: disable-next-line(unsafe-typecast) + + + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-typecast + +note[asm-keccak256]: use of inefficient hashing mechanism; consider using inline assembly + --> src/policies/UniversalRulesPolicy.sol:434:34 + | +434 | bytes32 assetChain = keccak256(bytes(ns)); + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#asm-keccak256 + +note[named-struct-fields]: prefer initializing structs with named fields + --> test/review/IndependentReviewHead.t.sol:39:20 + | +39 | calls[1] = Execution(address(w), 0, abi.encodeCall(AGW.revokeRules, (oldId))); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using named fields: `Execution({ target: address(w), value: 0, callData: abi.encodeCall(AGW.revokeRules, (oldId)) })` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#named-struct-fields + +note[named-struct-fields]: prefer initializing structs with named fields + --> test/review/IndependentReviewHead.t.sol:40:20 + | +40 | calls[2] = Execution(address(w), 0, abi.encodeCall(AGW.grantRules, (s))); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using named fields: `Execution({ target: address(w), value: 0, callData: abi.encodeCall(AGW.grantRules, (s)) })` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#named-struct-fields + +note[named-struct-fields]: prefer initializing structs with named fields + --> src/policies/UniversalRulesPolicy.sol:1687:21 + | +1687 | AllowedCall(rule.target, rule.selector, rule.beneficiaryOffset, rule.hasBeneficiary, rule.maxValue); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using named fields: `AllowedCall({ target: rule.target, selector: rule.selector, beneficiaryOffset: rule.beneficiaryOffset, hasBeneficiary: rule.hasBeneficiary, maxValue: rule.maxValue })` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#named-struct-fields + +note[unsafe-cheatcode]: usage of unsafe cheatcodes that can perform dangerous operations + --> script/Deploy.s.sol:206:16 + | +206 | try vm.ffi(cmd) returns (bytes memory out) { + | ^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-cheatcode + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/Base.t.sol:83:22 + | +83 | address internal OWNER; + | ^^^^^ help: consider using: `owner` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/Base.t.sol:84:22 + | +84 | address internal AGENT; + | ^^^^^ help: consider using: `agent` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> script/Deploy.s.sol:257:49 + | +257 | (UniversalAccountId memory origin, bool isUEA) = IUEAFactoryOrigin(ueaFactory).getOriginForUEA(address(0xdEaD)); + | ^^^^^ help: consider using: `isUea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-function]: function names should use mixedCase + --> script/Deploy.s.sol:282:14 + | +282 | function getOriginForUEA(address addr) external view returns (UniversalAccountId memory, bool); + | ^^^^^^^^^^^^^^^ help: consider using: `getOriginForUea` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-function + +warning[unsafe-typecast]: typecasts that can truncate values should be checked + --> test/unit/3_rulesLifecycle.t.sol:234:86 + | +234 | a[i] = _nativeAction(_addr(string(abi.encodePacked("proto", i))), bytes4(uint32(0x11000000 + i))); + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = note: consider disabling this lint if you're certain the cast is safe + + // casting to 'uint32' is safe because [explain why] + // forge-lint: disable-next-line(unsafe-typecast) + + + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-typecast + +note[unsafe-cheatcode]: usage of unsafe cheatcodes that can perform dangerous operations + --> test/Base.t.sol:223:37 + | +223 | string memory artifact = vm.readFile(path); + | ^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-cheatcode + +note[unused-import]: unused imports should be removed + --> test/unit/1_factory.t.sol:22:10 + | +22 | import { OwnerAuthLib } from "../../src/libraries/OwnerAuthLib.sol"; + | ^^^^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[unsafe-cheatcode]: usage of unsafe cheatcodes that can perform dangerous operations + --> test/Base.t.sol:292:37 + | +292 | string memory artifact = vm.readFile(path); + | ^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-cheatcode + +note[unsafe-cheatcode]: usage of unsafe cheatcodes that can perform dangerous operations + --> test/Base.t.sol:323:37 + | +323 | string memory artifact = vm.readFile(path); + | ^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unsafe-cheatcode + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/Base.t.sol:480:17 + | +480 | uint256 maxPCForGas, + | ^^^^^^^^^^^ help: consider using: `maxPcForGas` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[mixed-case-variable]: mutable variables should use mixedCase + --> test/Base.t.sol:543:17 + | +543 | uint256 maxPCForGas, + | ^^^^^^^^^^^ help: consider using: `maxPcForGas` + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#mixed-case-variable + +note[unused-import]: unused imports should be removed + --> test/Base.t.sol:12:10 + | +12 | import { Clones } from "@openzeppelin/contracts/proxy/Clones.sol"; + | ^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + +note[unused-import]: unused imports should be removed + --> test/Base.t.sol:34:5 + | +34 | RulesType, + | ^^^^^^^^^ + | + = help: https://book.getfoundry.sh/reference/forge/forge-lint#unused-import + diff --git a/plan/agw/research/validation-e704d5b/check-execute.log b/plan/agw/research/validation-e704d5b/check-execute.log new file mode 100644 index 00000000..0b7b8a22 --- /dev/null +++ b/plan/agw/research/validation-e704d5b/check-execute.log @@ -0,0 +1,2 @@ +./script/check-execute.sh +check-execute: OK — execute() is byte-identical to its pinned text (the B2 checkpoint revision) diff --git a/plan/agw/research/validation-e704d5b/evidence-manifest.json b/plan/agw/research/validation-e704d5b/evidence-manifest.json new file mode 100644 index 00000000..7802669f --- /dev/null +++ b/plan/agw/research/validation-e704d5b/evidence-manifest.json @@ -0,0 +1,17 @@ +{ + "commit": "e704d5b58fd1d30ce02bc0ad74dccfbdb37804f9", + "sha256": { + "offline-results.json": "99efbf0c745f7f79e6caad9309507a0a23699449bb0af4b9a3961804f1d2f85e", + "tests-offline.log": "c2a4609c6e32a349e8ed2377eaa06b47c275524c0a5a3150d66bd1fd95217370", + "README.md": "ad374fd06a7573216576b7addb3f961b93a20c2f01175281b3d19601213e1bde", + "check-execute.log": "af6d29316b18c91823cc08bab29ce45bd72121c5a4082165982430e213c47053", + "review-tests-offline.log": "694c7fe8fc426860527a73cb6e50a9bbd99d94f40aea1cd6a87e5f8521efa7a0", + "build.log": "d06ce6f6ca208ad4862c029b8e55d8640dd4e071cf432f5910aae3e865daf09f", + "review-tests/IndependentReviewHead.t.sol": "8a3625629263047173a905cab08227d400b66a25d8af00fc292fcad24bbab71d", + "abi/AGWFactory.json": "b65f66a1556d2a9ddf9aabe9f595c685c2aada436772892f5a40fb1eec846397", + "abi/UniversalRulesPolicy.json": "8301b452b035d12d03ff1861940b895128a40eaf280fb6d3ae30ffc46c5ae86d", + "abi/AGW.json": "ca41d463fac3f7ec8c4399402f2afe41678f43d75baf2ad0220a804699e1fd7b", + "abi/AgentValidator.json": "a4570ddc373241580de8742cbb3d9f2c837094c65bfd1cdd52243ca0c38196fd", + "abi/SmartSession.json": "6e5d9cea4dbed01f06af913c1e093743b86b7432195f4a4bf90fb94b282c51b2" + } +} diff --git a/plan/agw/research/validation-e704d5b/offline-results.json b/plan/agw/research/validation-e704d5b/offline-results.json new file mode 100644 index 00000000..e6ccdc4f --- /dev/null +++ b/plan/agw/research/validation-e704d5b/offline-results.json @@ -0,0 +1,10 @@ +[ + { + "check": "tests-offline", + "exit_code": 0 + }, + { + "check": "review-tests-offline", + "exit_code": 0 + } +] diff --git a/plan/agw/research/validation-e704d5b/review-tests-offline.log b/plan/agw/research/validation-e704d5b/review-tests-offline.log new file mode 100644 index 00000000..987768f0 --- /dev/null +++ b/plan/agw/research/validation-e704d5b/review-tests-offline.log @@ -0,0 +1,13 @@ +No files changed, compilation skipped + +Ran 7 tests for test/review/IndependentReviewHead.t.sol:IndependentReviewHeadTest +[PASS] test_ReviewHead_DuplicateAgentChainGrants_BothLive() (gas: 2603134) +[PASS] test_ReviewHead_InterveningAgentSpend_BlocksReplacement() (gas: 1504772) +[PASS] test_ReviewHead_NativeReplace_ThreeCounterAssertion() (gas: 1995229) +[PASS] test_ReviewHead_Replace_NewIdUsable_OldIdDead() (gas: 2480632) +[PASS] test_ReviewHead_Revoke_ErasesAgentKeepsTerms() (gas: 756042) +[PASS] test_ReviewHead_RulesId_NotGloballyUnique_ChainNotAnInput() (gas: 2251300) +[PASS] test_ReviewHead_UrpInitFailure_RollsBackRevokeAndNonce() (gas: 1664308) +Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 3.32ms (6.35ms CPU time) + +Ran 1 test suite in 3.77ms (3.32ms CPU time): 7 tests passed, 0 failed, 0 skipped (7 total tests) diff --git a/plan/agw/research/validation-e704d5b/review-tests/IndependentReviewHead.t.sol b/plan/agw/research/validation-e704d5b/review-tests/IndependentReviewHead.t.sol new file mode 100644 index 00000000..4eaf0695 --- /dev/null +++ b/plan/agw/research/validation-e704d5b/review-tests/IndependentReviewHead.t.sol @@ -0,0 +1,261 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +// REVIEW-ONLY EXPERIMENT. Not part of the contract repository. Written for the independent review of the +// AGW SDK planning package (push-chain-sdk/plan/agw/independent-review/). Runs against +// push-agentic-wallets@0f279ca02242dfd8067ff716d24cad4b97bf29cb (nomenclature-changes head, 2026-10-02), +// in an isolated scratch copy. Inherits the repository's E2E harness; the gateway is the repository's +// recording mock, so nothing here proves token pull/burn, settlement, or a real UEA transport. + +import { E2ETest } from "../integration/8_e2e.t.sol"; +import { AGW } from "../../src/AGW.sol"; +import { IAGW } from "../../src/interfaces/IAGW.sol"; +import { AGWErrors, UniversalRulesPolicyErrors } from "../../src/libraries/Errors.sol"; +import { Execution, ExecutionLib } from "../../src/libraries/ExecutionLib.sol"; +import { ModeCode, ModeLib } from "../../src/libraries/ModeLib.sol"; +import { AllowedCall, Config, RulesType } from "../../src/libraries/Types.sol"; +import { Session, PermissionId, ConfigId } from "smartsessions/DataTypes.sol"; +import { StakeDummy } from "../mocks/StakeDummy.sol"; +import { MockERC20 } from "../mocks/MockERC20.sol"; + +contract IndependentReviewHeadTest is E2ETest { + string internal constant SEPOLIA = "eip155:11155111"; + + // ───────────────────────────── helpers ───────────────────────────── + + function _replacement() internal view returns (Session memory) { + return canonicalSession(agentConfig(agentAddr), _urpConfig()); + } + + /// @dev The rules id derived WITHOUT the engine: keccak256(abi.encode(validator, abi.encode(agent), salt)), + /// salt = bytes32(grantNonce). Independent of the wallet and of the chain. + function _formulaId(address agent, uint256 nonce) internal view returns (bytes32) { + return keccak256(abi.encode(address(validator), abi.encode(agent), bytes32(nonce))); + } + + function _replace(AGW w, bytes memory assertCall, bytes32 oldId, Session memory s) internal { + Execution[] memory calls = new Execution[](3); + calls[0] = Execution(address(urp), 0, assertCall); + calls[1] = Execution(address(w), 0, abi.encodeCall(AGW.revokeRules, (oldId))); + calls[2] = Execution(address(w), 0, abi.encodeCall(AGW.grantRules, (s))); + vm.prank(BOB_UEA); + w.execute(ModeCode.unwrap(ModeLib.encodeSimpleBatch()), ExecutionLib.encodeBatch(calls)); + } + + function _assertUniversal(bytes32 pid, uint256 expected) internal view returns (bytes memory) { + return abi.encodeWithSignature("assertSpent(bytes32,address,uint256)", _configId(pid), address(bobAgw), expected); + } + + function _urpConfigWithExpiry(uint48 validUntil) internal view returns (bytes memory) { + AllowedCall[] memory rules = new AllowedCall[](1); + rules[0] = AllowedCall({ + target: MORPHO_BLUE, + selector: SUPPLY_SELECTOR, + beneficiaryOffset: BENEFICIARY_OFFSET, + hasBeneficiary: true, + maxValue: 0 + }); + return universalInitData( + Config({ + initialized: false, + validUntil: validUntil, + destChainHash: bytes32(0), + expectedCEA: BOB_AGW_CEA, + asset: address(pUSDC), + maxAmountPerCall: HUNDRED_USDC, + maxAmountTotal: HUNDRED_USDC, + maxPCPerCall: 1 ether, + spent: 0, + allowedCalls: rules + }) + ); + } + + // ───────────────────── 1. successful replacement (new door) ───────────────────── + + /// Owner batch assert → revoke → grant. Beyond the 610a640 experiment: the predicted id is derived from + /// the formula (not the engine), events are checked in order, the new id is USABLE by the agent, and + /// the replaced id is DEAD at the sender-gated door. + function test_ReviewHead_Replace_NewIdUsable_OldIdDead() public { + _deployAndGrant(); + bytes32 oldId = permissionId; + assertEq(oldId, _formulaId(agentAddr, 0), "grant 0 id matches the off-chain formula"); + + _submitRequest(_executionCalldata(10e6, 0)); + assertEq(_spent(oldId), 10e6); + + bytes32 next = _formulaId(agentAddr, 1); + + vm.expectEmit(true, false, false, true, address(bobAgw)); + emit IAGW.RulesRevoked(oldId); + vm.expectEmit(true, true, false, true, address(bobAgw)); + emit IAGW.RulesGranted(next, RulesType.UNIVERSAL, keccak256(bytes(SEPOLIA)), SEPOLIA); + _replace(bobAgw, _assertUniversal(oldId, 10e6), oldId, _replacement()); + + assertFalse(engine.isPermissionEnabled(PermissionId.wrap(oldId), address(bobAgw)), "old disabled"); + assertTrue(engine.isPermissionEnabled(PermissionId.wrap(next), address(bobAgw)), "new enabled"); + assertEq(bobAgw.agentOf(oldId), address(0), "old id names no agent"); + assertEq(bobAgw.agentOf(next), agentAddr, "new id names the agent"); + assertTrue(urp.getMode(_configId(next), address(bobAgw)).initialized, "new config really initialised"); + assertEq(_spent(next), 0, "new counter starts at zero"); + assertEq(_spent(oldId), 10e6, "old counter retained in URP storage"); + assertEq(bobAgw.grantNonce(), 2); + + // Stale id after replacement: refused at the door, before the engine. + vm.prank(agentAddr); + vm.expectRevert(abi.encodeWithSelector(AGWErrors.CallerIsNotAgent.selector, oldId, agentAddr)); + bobAgw.executeAsAgent(oldId, _singleMode(), _executionCalldata(1e6, 0)); + + // New id works and meters from zero. + vm.prank(agentAddr); + bobAgw.executeAsAgent(next, _singleMode(), _executionCalldata(10e6, 0)); + assertEq(_spent(next), 10e6, "new id meters"); + } + + // ───────────── 2. failure INSIDE the engine/URP rolls back revoke and nonce ───────────── + + /// The 610a640 experiment failed at the wallet's shape check, before `_grantNonce++` and before the + /// engine was touched. Here the replacement fails inside URP's init (expiry not in the future), i.e. + /// AFTER the wallet advanced its nonce and mid-way through the engine's enable. grantNonce == 1 is + /// therefore a real rollback witness, not a value that would hold anyway. + function test_ReviewHead_UrpInitFailure_RollsBackRevokeAndNonce() public { + _deployAndGrant(); + bytes32 oldId = permissionId; + + Session memory bad = canonicalSession(agentConfig(agentAddr), _urpConfigWithExpiry(uint48(block.timestamp))); + bytes memory assertion = _assertUniversal(oldId, 0); + vm.expectRevert( + abi.encodeWithSelector(UniversalRulesPolicyErrors.InvalidExpiry.selector, uint48(block.timestamp)) + ); + _replace(bobAgw, assertion, oldId, bad); + + assertTrue(engine.isPermissionEnabled(PermissionId.wrap(oldId), address(bobAgw)), "old still enabled"); + assertEq(bobAgw.agentOf(oldId), agentAddr, "old still names the agent"); + assertEq(bobAgw.grantNonce(), 1, "nonce advance rolled back"); + assertEq(engine.getPermissionIDs(address(bobAgw)).length, 1, "no half-enabled session left"); + + _submitRequest(_executionCalldata(10e6, 0)); + assertEq(_spent(oldId), 10e6, "old rule still usable"); + } + + // ─────────────── 3. stale spend assertion after an intervening agent action ─────────────── + + function test_ReviewHead_InterveningAgentSpend_BlocksReplacement() public { + _deployAndGrant(); + bytes32 oldId = permissionId; + uint256 observed = _spent(oldId); + + Session memory s = _replacement(); + bytes memory assertion = _assertUniversal(oldId, observed); // composed against the observed spend + + _submitRequest(_executionCalldata(10e6, 0)); // lands between composition and submission + + vm.expectRevert(abi.encodeWithSelector(UniversalRulesPolicyErrors.SpentMismatch.selector, observed, 10e6)); + _replace(bobAgw, assertion, oldId, s); + + assertTrue(engine.isPermissionEnabled(PermissionId.wrap(oldId), address(bobAgw))); + assertFalse(engine.isPermissionEnabled(PermissionId.wrap(_formulaId(agentAddr, 1)), address(bobAgw))); + assertEq(_spent(oldId), 10e6); + assertEq(bobAgw.grantNonce(), 1); + } + + // ───────────── 4. what survives revocation (read-model evidence) ───────────── + + /// After revoke: enumeration drops the id, the engine clears the agent config, `agentOf` is zero, but + /// URP terms and counters remain readable. The agent of a revoked rule is therefore NOT recoverable + /// from state, and `RulesGranted` does not carry it either. + function test_ReviewHead_Revoke_ErasesAgentKeepsTerms() public { + _deployAndGrant(); + bytes32 id = permissionId; + (address v0, bytes memory cfg0) = engine.getSessionValidatorAndConfig(address(bobAgw), PermissionId.wrap(id)); + assertEq(v0, address(validator)); + assertEq(keccak256(cfg0), keccak256(abi.encode(agentAddr))); + assertEq(engine.getEnabledActions(address(bobAgw), PermissionId.wrap(id)).length, 1); + + vm.prank(BOB_UEA); + bobAgw.revokeRules(id); + + assertEq(engine.getPermissionIDs(address(bobAgw)).length, 0, "enumeration drops it"); + assertEq(engine.getEnabledActions(address(bobAgw), PermissionId.wrap(id)).length, 0, "actions dropped"); + (address v1, bytes memory cfg1) = engine.getSessionValidatorAndConfig(address(bobAgw), PermissionId.wrap(id)); + assertEq(v1, address(0), "validator cleared"); + assertEq(cfg1.length, 0, "agent config cleared"); + assertEq(bobAgw.agentOf(id), address(0), "agentOf erased"); + assertTrue(urp.getMode(_configId(id), address(bobAgw)).initialized, "URP config persists"); + assertEq(urp.getConfig(_configId(id), address(bobAgw)).asset, address(pUSDC), "terms still readable"); + } + + // ─────────────── 5. one-rule-per-(agent, chain) is NOT enforced on-chain ─────────────── + + function test_ReviewHead_DuplicateAgentChainGrants_BothLive() public { + _deployAndGrant(); + bytes32 first = permissionId; + + vm.prank(BOB_UEA); + bytes32 second = bobAgw.grantRules(_replacement()); // same agent, same chain, same terms + + assertTrue(first != second); + assertEq(engine.getPermissionIDs(address(bobAgw)).length, 2, "both enabled"); + assertEq(bobAgw.agentOf(first), agentAddr); + assertEq(bobAgw.agentOf(second), agentAddr); + + // The agent can act under either; each has its own budget. + vm.prank(agentAddr); + bobAgw.executeAsAgent(first, _singleMode(), _executionCalldata(HUNDRED_USDC, 0)); + vm.prank(agentAddr); + bobAgw.executeAsAgent(second, _singleMode(), _executionCalldata(HUNDRED_USDC, 0)); + assertEq(_spent(first), HUNDRED_USDC); + assertEq(_spent(second), HUNDRED_USDC); + } + + // ─────────────── 6. rules id: wallet-independent and chain-free ─────────────── + + /// The same agent at the same grant nonce yields the SAME rules id on two different wallets, and the + /// chain is not an input. So `rulesId` is unique only per wallet, and a helper keyed on + /// (agent, chainNamespace, grantNonce) cannot be the contract's formula. + function test_ReviewHead_RulesId_NotGloballyUnique_ChainNotAnInput() public { + _deployAndGrant(); // bobAgw (BOB_UEA, index 0), universal on Sepolia, nonce 0 + (AGW w2,,, bytes32 nativeId) = _deployAndGrantNative(); // BOB_UEA index 1, NATIVE rule, nonce 0 + + assertTrue(address(w2) != address(bobAgw)); + assertEq(permissionId, nativeId, "same id across wallets and across chains"); + assertEq(nativeId, _formulaId(agentAddr, 0)); + assertEq( + nativeId, + PermissionId.unwrap(engine.getPermissionId(_replacement())), + "engine view agrees when salt = 0 (wallet overwrites salt with its grant nonce)" + ); + } + + // ─────────────── 7. native replacement with the three-counter assertion ─────────────── + + function test_ReviewHead_NativeReplace_ThreeCounterAssertion() public { + (AGW w, StakeDummy stake,, bytes32 oldId) = _deployAndGrantNative(); + + vm.prank(agentAddr); + w.executeAsAgent( + oldId, + _singleMode(), + ExecutionLib.encodeSingle(address(stake), 0, abi.encodeCall(StakeDummy.stakeFor, (address(w), 10e6))) + ); + + ConfigId cid = _configIdNative(oldId, address(stake), address(w)); + bytes memory staleAssert = abi.encodeWithSignature( + "assertSpent(bytes32,address,uint256,uint256,uint32)", cid, address(w), uint256(0), uint256(10e6), uint32(0) + ); + Session memory s = _nativeSessionFor(stake, address(w)); + vm.expectRevert(abi.encodeWithSelector(UniversalRulesPolicyErrors.SpentMismatch.selector, uint256(0), uint256(1))); + _replace(w, staleAssert, oldId, s); + + bytes memory goodAssert = abi.encodeWithSignature( + "assertSpent(bytes32,address,uint256,uint256,uint32)", cid, address(w), uint256(0), uint256(10e6), uint32(1) + ); + _replace(w, goodAssert, oldId, s); + + bytes32 next = _formulaId(agentAddr, 1); + assertFalse(engine.isPermissionEnabled(PermissionId.wrap(oldId), address(w))); + assertTrue(engine.isPermissionEnabled(PermissionId.wrap(next), address(w))); + assertEq(urp.getNativeConfig(_configIdNative(next, address(stake), address(w)), address(w)).callsUsed, 0); + assertEq(urp.getNativeConfig(cid, address(w)).amountSpent, 10e6, "old counters retained"); + } +} diff --git a/plan/agw/research/validation-e704d5b/tests-offline.log b/plan/agw/research/validation-e704d5b/tests-offline.log new file mode 100644 index 00000000..715004d5 --- /dev/null +++ b/plan/agw/research/validation-e704d5b/tests-offline.log @@ -0,0 +1,677 @@ +No files changed, compilation skipped + +Ran 7 tests for test/unit/20_pushChainLib.t.sol:PushChainLibTest +[PASS] test_ChainLib_deriveMode_followsTheChain() (gas: 14136) +[PASS] test_ChainLib_deriveMode_pushIsNative_othersUniversal() (gas: 16451) +[PASS] test_ChainLib_gas() (gas: 10018) +[PASS] test_ChainLib_nearMissStringsAreNotThisChain() (gas: 16462) +[PASS] test_ChainLib_notTheTwoStringFormula() (gas: 12200) +[PASS] test_ChainLib_selfChainHash_matchesDonutPin() (gas: 9624) +[PASS] test_ChainLib_selfChainHash_sepoliaAndMainnet() (gas: 12276) +Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 4.21ms (893.04µs CPU time) + +Ran 11 tests for test/unit/21_constantMirrors.t.sol:ConstantMirrorsTest +[PASS] test_CP_kindOrdinalsAreFrozen() (gas: 678) +[PASS] test_OwnerIntent_TypehashesMatchLiterals() (gas: 174) +[PASS] test_OwnerLaneFlag_IsTopBitOfUint192() (gas: 659) +[PASS] test_mandateTypeZeroValueIsUniversal() (gas: 594) +[PASS] test_mirror_engineFallbackSelector() (gas: 567) +[PASS] test_mirror_engineFallbackSelectorSmartSession() (gas: 369) +[PASS] test_mirror_engineFallbackTarget() (gas: 435) +[PASS] test_mirror_getSessionValidatorAndConfigReturnsTheGrantedConfig() (gas: 1007495) +[PASS] test_mirror_getSessionValidatorAndConfigSelector() (gas: 457) +[PASS] test_mirror_valueSelector_boundaryIsFourBytes() (gas: 4847) +[PASS] test_mirror_valueSelector_isWhatTheEngineUsesForShortCalldata() (gas: 2536) +Suite result: ok. 11 passed; 0 failed; 0 skipped; finished in 5.92ms (413.38µs CPU time) + +Ran 13 tests for test/unit/13_chainDerivation.t.sol:PushAgentWalletChainDerivationTest +[PASS] test_Grant_caseVariantPushStringDerivesUniversal() (gas: 38759) +[PASS] test_Grant_emptyChainRefused() (gas: 35142) +[PASS] test_Grant_foreignChainMultiAction_isShapeNotTypeError() (gas: 42483) +[PASS] test_Grant_foreignChainOnNativeTarget() (gas: 38029) +[PASS] test_Grant_inconsistentChainNamesTheAction() (gas: 49231) +[PASS] test_Grant_inconsistentChainRefused() (gas: 60354) +[PASS] test_Grant_nonUrpPolicyOnLaterActionRefused() (gas: 4860421) +[PASS] test_Grant_nonUrpPolicyRefusedBeforeDecode() (gas: 29509) +[PASS] test_Grant_pushChainOnGatewayTarget() (gas: 45946) +[PASS] test_Grant_twoPoliciesRefusedBeforeDecode() (gas: 34191) +[PASS] test_Grant_walletAndUrpAgreeOnMode_native() (gas: 575966) +[PASS] test_Grant_walletAndUrpAgreeOnMode_universal() (gas: 659109) +[PASS] test_Grant_zeroActionsRefusedBeforeDecode() (gas: 23178) +Suite result: ok. 13 passed; 0 failed; 0 skipped; finished in 7.66ms (1.83ms CPU time) + +Ran 7 tests for test/unit/22_harness.t.sol:BaseSmokeTest +[PASS] test_agentConfigShape() (gas: 9400) +[PASS] test_callRecorder_semantics() (gas: 1056946479) +[PASS] test_canonicalSessionDerivesPermissionId() (gas: 12661) +[PASS] test_engineDeploys() (gas: 6686) +[PASS] test_minBodyLenMatchesStruct() (gas: 1378) +[PASS] test_sendOutboundSelectorMatchesInterface() (gas: 435) +[PASS] test_validatorDeploys() (gas: 5945) +Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 1.98ms (222.75µs CPU time) + +Ran 16 tests for test/unit/14_rulesEnvelope.t.sol:URPEnvelopeTest +[PASS] test_Envelope_bareNativeStructIsNamedEmptyChain() (gas: 28900) +[PASS] test_Envelope_bareUniversalStructIsNamedEmptyChain() (gas: 33652) +[PASS] test_Envelope_doubleWrappedRevertsUnnamed() (gas: 34992) +[PASS] test_Envelope_emptyChainIsNamed() (gas: 34702) +[PASS] test_Envelope_emptyRevertsUnnamed() (gas: 23991) +[PASS] test_Envelope_foreignChainNativeBodyRevertsUnnamed() (gas: 32604) +[PASS] test_Envelope_nativeAccepted() (gas: 174312) +[PASS] test_Envelope_nativeChainUniversalBodyRevertsUnnamed() (gas: 37781) +[PASS] test_Envelope_reinitAcrossModesRefused() (gas: 281287) +[PASS] test_Envelope_reinitGuardPrecedesTheDecoder() (gas: 277014) +[PASS] test_Envelope_scopeDHeaderRevertsUnnamed() (gas: 33603) +[PASS] test_Envelope_tooShortRevertsUnnamed() (gas: 24346) +[PASS] test_Envelope_universalAccepted() (gas: 279649) +[PASS] test_Envelope_v2OutOfRangeModeRevertsUnnamed() (gas: 33021) +[PASS] test_Envelope_v2UniversalWrapperIsNamedEmptyChain() (gas: 34238) +[PASS] test_Envelope_zeroWordsAreNamedEmptyChain() (gas: 24965) +Suite result: ok. 16 passed; 0 failed; 0 skipped; finished in 3.11ms (991.04µs CPU time) + +Ran 19 tests for test/unit/19_ownerAuthLib.t.sol:OwnerAuthLibTest +[PASS] test_A01_eoaOwner_validSig_true() (gas: 20017) +[PASS] test_A02_eoaOwner_wrongSigner_false() (gas: 19580) +[PASS] test_A03_eoaOwner_malformedSig_false() (gas: 34802) +[PASS] test_A04_ueaOwner_validSig_true() (gas: 271386) +[PASS] test_A05_ueaOwner_returnsFalse_false() (gas: 271062) +[PASS] test_A06_contractOwner_noUEASelector_1271_true() (gas: 207272) +[PASS] test_A07_contractOwner_bothRevert_false() (gas: 66658) +[PASS] test_A08_hashIntent_matchesReferenceEncoding() (gas: 8815) +[PASS] test_A09_intentDigest_matches0x1901Reference() (gas: 12406) +[PASS] test_A10_domainSeparator_differsAcrossPushChainId() (gas: 12465) +[PASS] test_A11_domainSeparator_differsAcrossFactory() (gas: 9589) +[PASS] test_A12_typehashes_matchLiteralStrings() (gas: 558) +[PASS] test_A13_contractOwner_emptyReturnOnBoth_false() (gas: 58078) +[PASS] test_A14_domainSeparator_usesSignerChainId_notBlockChainid() (gas: 10819) +[PASS] test_A15_domainSeparator_saltIsPushChainId() (gas: 11748) +[PASS] test_A16_contractOwner_returnsWrongLength_false() (gas: 60584) +[PASS] test_A18_signedIntent_verifiesForEoaAndUea() (gas: 307549) +[PASS] test_A19_contractOwner_echoesCalldata_false() (gas: 62586) +[PASS] test_A20_counterfactualUEAOwner_secp256k1BranchRejects() (gas: 282378) +Suite result: ok. 19 passed; 0 failed; 0 skipped; finished in 11.78ms (6.07ms CPU time) + +Ran 20 tests for test/unit/1_factory.t.sol:AGWFactoryIntentTest +[PASS] test_F_deployWithIntent_addressEqualsPredictWallet_andLegacyDerivation() (gas: 389794) +[PASS] test_F_deployWithIntent_eoaOwner_deploysAndOwnerIsSigner() (gas: 232683) +[PASS] test_F_deployWithIntent_expired_reverts() (gas: 63206) +[PASS] test_F_deployWithIntent_grantAndExecFieldsIgnoredHere() (gas: 225844) +[PASS] test_F_deployWithIntent_ownerIsSender_ignoresSigDeadlineAndExecutor() (gas: 200567) +[PASS] test_F_deployWithIntent_paused_reverts() (gas: 84913) +[PASS] test_F_deployWithIntent_replay_revertsIndexMismatch() (gas: 227962) +[PASS] test_F_deployWithIntent_thirdPartyCannotAdvanceCountWithoutSig() (gas: 73791) +[PASS] test_F_deployWithIntent_ueaOwner_viaVerifySelector() (gas: 476235) +[PASS] test_F_deployWithIntent_wrongExecutor_revertsExecutorMismatch() (gas: 65400) +[PASS] test_F_deployWithIntent_wrongFactoryDomain_reverts() (gas: 68186) +[PASS] test_F_deployWithIntent_wrongIndex_revertsIndexMismatch() (gas: 233167) +[PASS] test_F_deployWithIntent_wrongPushChainSalt_reverts() (gas: 70985) +[PASS] test_F_deployWithIntent_wrongSignerChainId_reverts() (gas: 70249) +[PASS] test_F_deployWithIntent_wrongSigner_reverts() (gas: 69496) +[PASS] test_F_deployWithIntent_wrongWalletField_revertsIntentWalletMismatch() (gas: 62519) +[PASS] test_F_deployWithIntent_zeroExecutor_revertsExecutorMismatch() (gas: 62427) +[PASS] test_F_deployWithIntent_zeroOwner_revertsZeroAddress() (gas: 22308) +[PASS] test_F_domainSeparator_matchesOwnerAuthLib() (gas: 13574) +[PASS] test_F_legacyDeployWallet_unchanged() (gas: 183219) +Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 7.32ms (5.75ms CPU time) + +Ran 2 tests for test/integration/25_deploymentRecord.t.sol:DeploymentRecordTest +[SKIP: S-05 requires DEPLOYMENT_RPC and CHAIN_ID pointing at a live deployment] test_S05_DeploymentRecord() (gas: 0) +[SKIP: S-05 requires DEPLOYMENT_RPC pointing at a live deployment] test_S05_MismatchedChainIdIsRejected() (gas: 0) +Suite result: ok. 0 passed; 0 failed; 2 skipped; finished in 498.63µs (440.63µs CPU time) + +Ran 4 tests for test/integration/26_prc20SourceFork.t.sol:PRC20SourceForkTest +[SKIP: requires PUSH_TESTNET_RPC - not set] test_Fork_liveAssetDerivesUniversal() (gas: 0) +[SKIP: requires PUSH_TESTNET_RPC - not set] test_Fork_pethReportsSepolia() (gas: 0) +[SKIP: requires PUSH_TESTNET_RPC - not set] test_Fork_selfChainHashOnDonut() (gas: 0) +[SKIP: requires PUSH_TESTNET_RPC - not set] test_Fork_usdcEthReportsSepolia() (gas: 0) +Suite result: ok. 0 passed; 0 failed; 4 skipped; finished in 66.17µs (27.17µs CPU time) + +Ran 9 tests for test/unit/15_assetTeeth.t.sol:URPTeethTest +[PASS] test_Teeth_assetReturningGarbageRevertsUnnamed() (gas: 83865) +[PASS] test_Teeth_assetReturningNothingRevertsUnnamed() (gas: 82162) +[PASS] test_Teeth_assetThatRevertsRefused() (gas: 92916) +[PASS] test_Teeth_assetWithNoCodeRefused() (gas: 41475) +[PASS] test_Teeth_emptyChainRefused() (gas: 261630) +[PASS] test_Teeth_eoaAssetRefused() (gas: 41453) +[PASS] test_Teeth_matchingAssetChainAccepted() (gas: 511998) +[PASS] test_Teeth_mismatchedAssetChainRefused() (gas: 268264) +[PASS] test_Teeth_nativeInitMakesNoExternalCall() (gas: 188335) +Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 3.21ms (624.58µs CPU time) + +Ran 6 tests for test/integration/23_engine.t.sol:EngineTest +[PASS] test_S01_EnableMode_DeadOnV3Wallets() (gas: 1609993) +[PASS] test_S02_CanonicalShape_Enforced() (gas: 5560958) +[PASS] test_S03_SignatureVerifiedLast() (gas: 736370) +[PASS] test_S04_EngineFloors() (gas: 334049) +[PASS] test_S07_OwnerDoor_DirectOnUninstall_NoDesync() (gas: 1990369) +[PASS] test_S08_MultiAgent_Independence() (gas: 4190743) +Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 7.12ms (5.92ms CPU time) + +Ran 37 tests for test/unit/3_rulesLifecycle.t.sol:PushAgentWalletLifecycleTest +[PASS] test_StopAll_IsOwnerOnly() (gas: 14808) +[PASS] test_StopMandate_IsOwnerOnly() (gas: 657974) +[PASS] test_U19_ConfigOrphan_Harmless() (gas: 615915) +[PASS] test_W10_FailingApprovalLeg_UnwindsTheWholeChange() (gas: 1352180) +[PASS] test_W10_OwnerBatch_CanonicalChangeFlow() (gas: 1117240) +[PASS] test_W10_SelfCallPath_IsNotOpenToAnyoneElse() (gas: 662483) +[PASS] test_W10_StaleAssertSpent_RevertsTheWholeBatch() (gas: 697706) +[PASS] test_W15_OtherWalletsIdIsAGhost() (gas: 807310) +[PASS] test_W15_StopMandate_GhostReverts() (gas: 679469) +[PASS] test_W16_StopAll_Empties() (gas: 2109870) +[PASS] test_W16_StopAll_EmptyIsNoop() (gas: 27587) +[PASS] test_W17_GrantSalt_Monotonic() (gas: 1850946) +[PASS] test_W17_ReplacedIdNeverRecurs() (gas: 1053146) +[PASS] test_W23_Events_Attribution_Lifecycle() (gas: 571081) +[PASS] test_W24_CanonicalSessionGrants() (gas: 657949) +[PASS] test_W24_Deviation_ExtraUserOpPolicy() (gas: 37386) +[PASS] test_W24_Deviation_MalformedKeyConfig_BothVariants() (gas: 204156) +[PASS] test_W24_Deviation_NonEmpty7739Content() (gas: 37092) +[PASS] test_W24_Deviation_NonEmpty7739Policies() (gas: 38075) +[PASS] test_W24_Deviation_PaymasterTrue() (gas: 36810) +[PASS] test_W24_Deviation_TwoActionPolicies() (gas: 38993) +[PASS] test_W24_Deviation_TwoActions() (gas: 42881) +[PASS] test_W24_Deviation_WrongPolicyAddress() (gas: 4837287) +[PASS] test_W24_Deviation_WrongSelector() (gas: 42284) +[PASS] test_W24_Deviation_WrongTarget() (gas: 42578) +[PASS] test_W24_Deviation_WrongValidator() (gas: 41769) +[PASS] test_W24_Deviation_ZeroActionPolicies() (gas: 36658) +[PASS] test_W24_Deviation_ZeroActions() (gas: 36384) +[PASS] test_W24_GrantIsOwnerOnly() (gas: 33675) +[PASS] test_W24_Native_CommonRulesStillApply() (gas: 42376) +[PASS] test_W24_Native_DuplicateActionRejected() (gas: 59814) +[PASS] test_W24_Native_EightActionsGrant() (gas: 2178480) +[PASS] test_W24_Native_NineActionsRejected() (gas: 102725) +[PASS] test_W24_Native_OneActionGrants() (gas: 503476) +[PASS] test_W24_Native_WrongPolicyIsMalformed() (gas: 4844935) +[PASS] test_W24_Native_ZeroActionsRejected() (gas: 36160) +[PASS] test_W24_ShapeCheckDoesNotValidateUrpContents() (gas: 156075) +Suite result: ok. 37 passed; 0 failed; 0 skipped; finished in 17.83ms (12.08ms CPU time) + +Ran 15 tests for test/unit/11_nativeDoor.t.sol:PushAgentWalletNativeDoorTest +[PASS] test_DispatchRefusesEngineTarget() (gas: 608596) +[PASS] test_DispatchRefusesSelfTarget() (gas: 614473) +[PASS] test_GatewayTargetRefusedAsNative() (gas: 55118) +[PASS] test_GrantRefusesFallbackAction() (gas: 94625) +[PASS] test_GrantRefusesSelfTarget() (gas: 43151) +[PASS] test_NonGatewayTargetRefusedAsUniversal() (gas: 41579) +[PASS] test_W29_Native_SelfTargetRefusedWithEightActions() (gas: 2233720) +[PASS] test_native_endToEnd_allFiveActions() (gas: 2163008) +[PASS] test_native_gauntlet_amountExceedsPerCallCap() (gas: 1803435) +[PASS] test_native_gauntlet_argPinMismatch() (gas: 1802782) +[PASS] test_native_gauntlet_callLimitReached() (gas: 2103171) +[PASS] test_native_gauntlet_lifetimeAmountCap() (gas: 1941189) +[PASS] test_native_gauntlet_valueExceedsCap() (gas: 1801578) +[PASS] test_native_nonAgentCannotSubmit() (gas: 1949782) +[PASS] test_native_pinnedApproveIsSafe_unpinnedIsNot() (gas: 1420015) +Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 24.11ms (13.79ms CPU time) + +Ran 41 tests for test/unit/10_ownerIntent.t.sol:PushAgentWalletOwnerIntentTest +[PASS] test_G01_grantWithIntent_relayerSubmits_mandateGranted() (gas: 693101) +[PASS] test_G02_grantWithIntent_ueaOwner() (gas: 1097643) +[PASS] test_G03_replay_revertsIntentGrantNonceMismatch() (gas: 700024) +[PASS] test_G04_tamperedSession_revertsIntentSessionMismatch() (gas: 86543) +[PASS] test_G05_zeroSessionHash_reverts() (gas: 84901) +[PASS] test_G06_expired() (gas: 77001) +[PASS] test_G07_wrongWalletField() (gas: 77288) +[PASS] test_G08_wrongOwnerField_revertsNotOwner() (gas: 76595) +[PASS] test_G09_wrongSigner() (gas: 91154) +[PASS] test_G10_signedUnderWalletDomain_reverts() (gas: 89330) +[PASS] test_G11_runsSameShapeChecks() (gas: 284374) +[PASS] test_G12_permissionIdEqualsOwnerPath() (gas: 1302028) +[PASS] test_G13_execFieldsIgnoredHere() (gas: 689691) +[PASS] test_G14_ownerBatchViaSelf_stillWorks() (gas: 1034495) +[PASS] test_G15_wrongExecutor_revertsExecutorMismatch() (gas: 80279) +[PASS] test_G15b_zeroExecutor_revertsExecutorMismatch() (gas: 78352) +[PASS] test_G16_wrongSignerChainId() (gas: 90932) +[PASS] test_X01_single() (gas: 149521) +[PASS] test_X02_batch_inOrder() (gas: 154440) +[PASS] test_X03_batch_selfCall_grantMandate_works() (gas: 721140) +[PASS] test_X04_nonOwnerLane() (gas: 57368) +[PASS] test_X05_wrongSeq() (gas: 58141) +[PASS] test_X06_replay() (gas: 151761) +[PASS] test_X07_expired() (gas: 56137) +[PASS] test_X08_wrongSigner() (gas: 86981) +[PASS] test_X09_tamperedCalldata() (gas: 58571) +[PASS] test_X10_tamperedMode() (gas: 57282) +[PASS] test_X11_zeroExecHash() (gas: 57250) +[PASS] test_X12_wrongWalletField() (gas: 55830) +[PASS] test_X13_wrongPushChainSalt() (gas: 87192) +[PASS] test_X14_signedUnderWalletDomain() (gas: 84488) +[PASS] test_X15_unsupportedExecType() (gas: 129252) +[PASS] test_X16_targetRevert_bubbles_andNonceUnwinds() (gas: 99555) +[PASS] test_X18_sessionSigNeverValidatesAsOwnerIntent() (gas: 62165) +[PASS] test_X19_grantFieldsIgnoredHere() (gas: 144912) +[PASS] test_X20_sameIntent_servesGrantThenExec() (gas: 799968) +[PASS] test_X21_reentrancyGuarded() (gas: 283144) +[PASS] test_X22_wrongExecutor_revertsExecutorMismatch() (gas: 59011) +[PASS] test_X23_wrongSignerChainId() (gas: 87336) +[PASS] test_X24_ueaOwner_executes() (gas: 552967) +[PASS] test_intentDomainSeparator_equalsFactory() (gas: 20944) +Suite result: ok. 41 passed; 0 failed; 0 skipped; finished in 26.99ms (20.85ms CPU time) + +Ran 6 tests for test/unit/27_naming.t.sol:NamingTest +[PASS] test_naming_IAGWIsTheWholeSurface() (gas: 4421) +[PASS] test_naming_eventTopics() (gas: 306) +[PASS] test_naming_identityStrings() (gas: 190583) +[PASS] test_naming_noLegacyVocabularyInABIs() (gas: 425814670) +[PASS] test_naming_renamedErrorSelectors() (gas: 174) +[PASS] test_naming_renamedFunctionSelectors() (gas: 2183) +Suite result: ok. 6 passed; 0 failed; 0 skipped; finished in 19.98ms (19.08ms CPU time) + +Ran 45 tests for test/unit/6_nativeRulebook.t.sol:URPNativeTest +[PASS] test_URP_NativeConfigOnGatewayFailsClosed() (gas: 260772) +[PASS] test_native_N1_uninitialisedRoutesToUniversalAndReverts() (gas: 27400) +[PASS] test_native_N2_expired() (gas: 259411) +[PASS] test_native_N4_targetMismatch() (gas: 260149) +[PASS] test_native_N5_selectorMismatch() (gas: 258837) +[PASS] test_native_N5_shortCalldataBecomesValueSelector() (gas: 258579) +[PASS] test_native_N6_valueExceedsLifetimeCap() (gas: 222765) +[PASS] test_native_N6_valueExceedsPerCallCap() (gas: 174731) +[PASS] test_native_N7_calldataTooShortForPin() (gas: 260769) +[PASS] test_native_N7_dirtyHighHalfIsAMismatch() (gas: 260100) +[PASS] test_native_N7_pinMismatch() (gas: 261614) +[PASS] test_native_N8_amountExceedsLifetimeCap() (gas: 311635) +[PASS] test_native_N8_amountExceedsPerCallCap() (gas: 261664) +[PASS] test_native_N8_calldataTooShortForAmount() (gas: 195269) +[PASS] test_native_N9_callLimitReached() (gas: 321265) +[PASS] test_native_N9_zeroMaxCallsIsUnlimited() (gas: 354885) +[PASS] test_native_assertSpent_exactEqualityOnAllThree() (gas: 388733) +[PASS] test_native_assertSpent_ghostReverts() (gas: 23997) +[PASS] test_native_assertSpent_wrongModeBothWays() (gas: 958045) +[PASS] test_native_creditRevert_notInitialisedOnNativeSlot() (gas: 268133) +[PASS] test_native_effectsLast_failedN9LeavesCountersUntouched() (gas: 331852) +[PASS] test_native_emitsNativeCallMetered() (gas: 307105) +[PASS] test_native_getConfig_revertsOnNativeSlot() (gas: 262015) +[PASS] test_native_getMode_neverReverts() (gas: 962185) +[PASS] test_native_getNativeConfig_revertsOnUniversalSlot() (gas: 720379) +[PASS] test_native_getters_emptySlotReturnsZeroed() (gas: 68369) +[PASS] test_native_happyPath_returnsSuccessAndMeters() (gas: 315419) +[PASS] test_native_initStoresModeAndConfig() (gas: 270538) +[PASS] test_native_init_acceptsExactlyMaxPins() (gas: 573601) +[PASS] test_native_init_forcesCountersToZero() (gas: 265013) +[PASS] test_native_init_legacyBareEncodingReverts() (gas: 26249) +[PASS] test_native_init_refusesReinitAsNative() (gas: 263448) +[PASS] test_native_init_refusesReinitAsUniversalAfterNative() (gas: 708154) +[PASS] test_native_init_rejectsGatewayTarget() (gas: 40755) +[PASS] test_native_init_rejectsPastExpiry() (gas: 36365) +[PASS] test_native_init_rejectsTooManyPins() (gas: 44741) +[PASS] test_native_init_rejectsValueOnlyWithAmountRule() (gas: 40086) +[PASS] test_native_init_rejectsValueOnlyWithPins() (gas: 40968) +[PASS] test_native_init_rejectsZeroExpiry() (gas: 36062) +[PASS] test_native_init_rejectsZeroTarget() (gas: 36053) +[PASS] test_native_legacyUniversalSlot_isGuardedByTheViews() (gas: 728424) +[PASS] test_native_valueOnly_emptyCalldataPasses() (gas: 228009) +[PASS] test_native_valueOnly_rejectsShortNonEmptyCalldata() (gas: 232976) +[PASS] test_native_zeroValueCallsExhaustMaxCalls() (gas: 302121) +[PASS] test_native_zeroValueZeroAmountStillMetersACall() (gas: 294907) +Suite result: ok. 45 passed; 0 failed; 0 skipped; finished in 7.95ms (5.68ms CPU time) + +Ran 1 test for test/unit/7_externalAgentViaUEA.t.sol:ExternalAgentViaUEATest +[PASS] test_UEAAgent_actsThroughItsUEA() (gas: 999384) +Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 1.91ms (883.63µs CPU time) + +Ran 9 tests for test/integration/8_e2e.t.sol:E2ETest +[PASS] test_BeneficiaryPin_BindsEndToEnd() (gas: 925621) +[PASS] test_BobFlow_EOAAgent() (gas: 3220726) +[PASS] test_BobFlow_UEAAgent() (gas: 3501116) +[PASS] test_BothModes_CoexistOnOneWallet() (gas: 2643467) +[PASS] test_GatewayRevert_UnwindsEverything() (gas: 1537682) +[PASS] test_LifetimeCap_BindsEndToEnd() (gas: 1488043) +[PASS] test_NativeFlow_EndToEnd() (gas: 1374130) +[PASS] test_OwnerWithdraws_MidMandate() (gas: 886373) +[PASS] test_UniversalFlow_UnchangedByNativeMode() (gas: 3242425) +Suite result: ok. 9 passed; 0 failed; 0 skipped; finished in 17.60ms (15.11ms CPU time) + +Ran 12 tests for test/unit/12_nativeGrant.t.sol:PushAgentWalletNativeGrantTest +[PASS] test_forbidden_engineFallbackFlag() (gas: 35421) +[PASS] test_forbidden_theEngine() (gas: 38107) +[PASS] test_forbidden_theFactory() (gas: 37990) +[PASS] test_forbidden_theValidator() (gas: 35991) +[PASS] test_forbidden_theWalletItself() (gas: 35925) +[PASS] test_forbidden_urp() (gas: 36211) +[PASS] test_forbidden_zeroAddress() (gas: 35458) +[PASS] test_gasGate_maximalGrantUnder8M() (gas: 6252249) +Logs: + GAS GATE - maximal 8x8 native grant: 6135957 + GAS GATE - budget: 8000000 + +[PASS] test_gasGate_stopMandateOnMaximalMandateUnder2M() (gas: 5381329) +Logs: + GAS GATE - revokeRules on a maximal native mandate: 79539 + GAS GATE - budget: 2000000 + +[PASS] test_gasReport_stopAllOverFiveMaximalMandates() (gas: 26789418) +Logs: + GAS REPORT - revokeAllRules over five maximal native mandates: 389183 + +[PASS] test_grantEmitsMandateType() (gas: 626547) +[PASS] test_valueSelectorIsPermitted() (gas: 552403) +Suite result: ok. 12 passed; 0 failed; 0 skipped; finished in 51.56ms (13.40ms CPU time) + +Ran 7 tests for test/unit/17_agentConfigLib.t.sol:AgentConfigLibTest +[PASS] testFuzz_decode_anyLengthOtherThan32IsZero(bytes) (runs: 1024, μ: 9377, ~: 9379) +[PASS] testFuzz_decode_dirtyUpperBytesAreZero(uint96,address) (runs: 1024, μ: 9377, ~: 9377) +[PASS] testFuzz_decode_roundTripsEveryNonZeroAddress(address) (runs: 1024, μ: 9653, ~: 9653) +[PASS] test_decode_oldEcdsaConfigIsRejected() (gas: 8899) +[PASS] test_decode_wellFormedConfigReturnsAgent() (gas: 8551) +[PASS] test_decode_wrongLengthIsZero() (gas: 15370) +[PASS] test_decode_zeroAddressIsZero() (gas: 6339) +Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 75.92ms (114.40ms CPU time) + +Ran 36 tests for test/unit/2_ownerDoor.t.sol:PushAgentWalletTest +[PASS] testFuzz_CloneArgs_OwnerAndFactory(address,address) (runs: 1024, μ: 63730, ~: 63730) +[PASS] testFuzz_SupportsInterface_ExactlyThree(bytes4) (runs: 1024, μ: 9282, ~: 9282) +[PASS] testFuzz_W21_ERC1271_AlwaysInvalid(bytes32,bytes) (runs: 1024, μ: 9498, ~: 9489) +[PASS] test_AccountId() (gas: 13983) +[PASS] test_AgentDoor_IsLive_AndRefusesMalformedRequests() (gas: 697091) +[PASS] test_CloneArgs_OwnerAndFactory() (gas: 16610) +[PASS] test_DecodeBatch_MalformedCalldata_AllThreeGuards() (gas: 39613) +[PASS] test_DecodeBatch_SingleEncodedInBatchMode_RevertsNotSilentNoop() (gas: 65388) +[PASS] test_InstallModule_Guards() (gas: 143858) +[PASS] test_NonceViews_StartAtZero() (gas: 18051) +[PASS] test_OwnerDoor_RejectsNonDefaultExecAndExoticCallTypes() (gas: 41275) +[PASS] test_OwnerPath_BubblesInnerRevert() (gas: 80891) +[PASS] test_OwnerPath_RejectsNonOwner() (gas: 26832) +[PASS] test_OwnerPath_SurvivesDegradedMatrix() (gas: 1900565) +[PASS] test_Receive_AcceptsPC() (gas: 21915) +[PASS] test_StorageLayout_ExactlySixDeclarations() (gas: 14839333) +[PASS] test_SupportsInterface_DoesNotClaimERC7579Account() (gas: 17539) +[PASS] test_TokenReceiverHooks() (gas: 14441) +[PASS] test_UninstallModule_RequiresInstalled() (gas: 20698) +[PASS] test_W11_ModuleTypes_2_3_4_Rejected() (gas: 124381) +[PASS] test_W12_StipendIsCapped() (gas: 211462) +Logs: + uninstall gas with a burning callback: 106524 + +[PASS] test_W12_Uninstall_StipendSemantics() (gas: 313371) +[PASS] test_W13_EngineUninstall_WedgeGuard() (gas: 580100) +[PASS] test_W13_ThirdPartyValidator_NotProtected() (gas: 111188) +[PASS] test_W14_EngineGuard_FailsOpen() (gas: 604881) +[PASS] test_W20_InitializeAccount_FactoryOnlyOnce() (gas: 143778) +[PASS] test_W21_ERC1271_AlwaysInvalid() (gas: 13131) +[PASS] test_W22_EmptyWallet_RejectsAgents() (gas: 226310) +[PASS] test_W23_Events_Attribution_OwnerDoor() (gas: 65702) +[PASS] test_W23_NoEventOnFailedDispatch() (gas: 83695) +[PASS] test_W25_Clone_NoUpgradeSurface_ExactSelectorSet() (gas: 13649608) +[PASS] test_W25_ImplementationCannotBeInitialized() (gas: 47714) +[PASS] test_W25_ImplementationIsInertOnEveryDoor() (gas: 40418) +[PASS] test_W27_Immutables_SetAndReadableByClones() (gas: 3613882) +[PASS] test_W_execute_touchesOnlyTheCheckpointSlot() (gas: 355758) +[PASS] test_supportsExecutionMode() (gas: 18651) +Suite result: ok. 36 passed; 0 failed; 0 skipped; finished in 97.62ms (152.49ms CPU time) + +Ran 34 tests for test/unit/4_agentDoor.t.sol:PushAgentWalletAgentDoorTest +[PASS] testFuzz_W19_anyNonAgentRefused(address) (runs: 1024, μ: 92042, ~: 92042) +[PASS] test_AgentRequestMovesPCFromTheWalletsOwnBalance() (gas: 173565) +[PASS] test_HappyPath_ValidatesAndDispatches() (gas: 180435) +[PASS] test_PCValueAboveGate8IsRefused() (gas: 98387) +[PASS] test_U04_ZeroAmountThroughTheRealPath() (gas: 159010) +[PASS] test_U12_MeteringThroughTheRealPath() (gas: 187207) +[PASS] test_W02_BankedRequest_FailsAfterRegrant() (gas: 809363) +[PASS] test_W03_OpHash_Field6_MalformedBatchShapeIsRejected() (gas: 65132) +[PASS] test_W03_PermissionIdBindsTheAgent() (gas: 916773) +[PASS] test_W04_SameCallTwiceIsTwoActions() (gas: 233440) +[PASS] test_W05_ReentryIntoTheAgentDoorRefused() (gas: 700516) +[PASS] test_W07_Verdict_Enforced() (gas: 3211847) +[PASS] test_W08_Paymaster_AlwaysEmpty() (gas: 172295) +[PASS] test_W09_AgentDoor_SingleCallTypeOnly() (gas: 202414) +[PASS] test_W09_ExoticModes_RejectedByTheEngineWithNamedErrors() (gas: 134282) +[PASS] test_W18_ExecutionRevert_UnwindsAll() (gas: 311761) +[PASS] test_W19_OnlyTheAgentMayCall() (gas: 371950) +[PASS] test_W22_EmptyWallet_RejectsAgents_AgentHalf() (gas: 208096) +[PASS] test_W23_Events_Attribution_AgentDoor() (gas: 167920) +[PASS] test_W26_EngineBranch_SingleExecOnly() (gas: 173353) +[PASS] test_W26_UnconfiguredActionDiesAtThePolicyFloor() (gas: 58168) +[PASS] test_W28_AgentDoor_AlwaysBuildsUseMode() (gas: 182478) +[PASS] test_W29_AgentDoor_CannotSelfCall() (gas: 699080) +[PASS] test_W_agentDoorCannotReach_grantMandateWithSig() (gas: 1064003) +[PASS] test_W_agentDoor_engineUninstalled_refused() (gas: 130387) +[PASS] test_W_agentDoor_foreignValidatorSessionHasNoAgent() (gas: 845195) +[PASS] test_W_agentDoor_malformedConfigSessionHasNoAgent() (gas: 703877) +[PASS] test_W_agentDoor_neverTouchesOwnerLanes() (gas: 416436) +[PASS] test_W_agentDoor_revokedPermission_refused() (gas: 1154336) +[PASS] test_W_agentDoor_unknownPermission_refused() (gas: 42627) +[PASS] test_X17_ownerIntentSigNeverValidatesAsSessionSig() (gas: 122833) +[PASS] test_agentOf_lifecycle() (gas: 722119) +[PASS] test_agentOf_viaGrantMandateWithSig() (gas: 806167) +[PASS] test_gas_executeAsAgent_universalHappyPath() (gas: 214230) +Logs: + executeAsAgent universal steady-state gas: 41060 + +Suite result: ok. 34 passed; 0 failed; 0 skipped; finished in 111.17ms (128.72ms CPU time) + +Ran 20 tests for test/unit/1_factory.t.sol:AGWFactoryTest +[PASS] testFuzz_T02_PredictEqualsDeploy(address,uint8) (runs: 1024, μ: 410554, ~: 323057) +[PASS] test_T01_UpgradeIsAdminOnly() (gas: 2105333) +[PASS] test_T01a_StorageLayout_IsFrozen() (gas: 2394999) +[PASS] test_T01b_AddressStability_AcrossFactoryUpgrade() (gas: 2604443) +[PASS] test_T03_OwnerIsAlwaysCaller() (gas: 465186) +[PASS] test_T04a_IndexMonotonic_UnderDirectReentrancy() (gas: 2781886) +[PASS] test_T04b_IndexMonotonic_UnderForwardedReentrancy() (gas: 2746457) +[PASS] test_T05_Registry_Consistency() (gas: 815600) +[PASS] test_T06_Label_NeverAffectsAddress() (gas: 500367) +[PASS] test_T07_Pause_BlocksDeployOnly() (gas: 224216) +[PASS] test_T08_AtomicInit_NoUninitialisedWallet() (gas: 2612582) +[PASS] test_T09_InitializeIsOneShot() (gas: 20865) +[PASS] test_T09_NoImplementationSetter_ABI() (gas: 2363789) +[PASS] test_T10_EmptyWallet_IsValid() (gas: 242422) +[PASS] test_T11_ImplementationNotSet_Guard() (gas: 2276860) +[PASS] test_T11_InitializeGuards() (gas: 2237869) +[PASS] test_T12_SecondFactory_NewAddressSpace() (gas: 6000340) +[PASS] test_T13_PredictWallet_IndexBound() (gas: 461820) +[PASS] test_T14_AdminTransferIsDelayed() (gas: 86017) +[PASS] test_T14_OrdinaryRolesAreNotDelayed() (gas: 65954) +Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 161.55ms (182.60ms CPU time) + +Ran 20 tests for test/unit/18_checkpoints.t.sol:CheckpointsTest +[PASS] testFuzz_CP13_noNonOwnerPathTicks(address) (runs: 1024, μ: 714673, ~: 714673) +[PASS] test_CP01_freshWalletStartsAtZero() (gas: 12084) +[PASS] test_CP02_executeSingleTicksOnce() (gas: 75469) +[PASS] test_CP03_executeBatchTicksPerCall() (gas: 162502) +[PASS] test_CP04_tickPrecedesEachCall() (gas: 574052) +[PASS] test_CP05_sameBatchWithdrawalIsVisible() (gas: 982005) +[PASS] test_CP06_emptyBatchTicksNothing() (gas: 26619) +[PASS] test_CP07_revertedOwnerCallLeavesNoCheckpoint() (gas: 94760) +[PASS] test_CP08_executeWithSigTicksPerCall() (gas: 220515) +[PASS] test_CP09_grantTicksRulesGranted() (gas: 1341354) +[PASS] test_CP10_failedGrantTicksNothing() (gas: 54478) +[PASS] test_CP11_revokeRulesTicksRulesRevoked() (gas: 573120) +[PASS] test_CP12_revokeAllTicksOncePerId() (gas: 1614992) +[PASS] test_CP14_agentActionsNeverTick() (gas: 1326693) +[PASS] test_CP15_selfLifecycleCallTicksTwice() (gas: 576633) +[PASS] test_CP16_directEngineGrantTicksAsOwnerAction() (gas: 675610) +[PASS] test_CP17_lastCheckpointBlockTracksTheBlock() (gas: 158204) +[PASS] test_CP18_countersArePerWallet() (gas: 240135) +[PASS] test_CP19_ownerDoorStillTicksInDegradedStates() (gas: 554218) +[PASS] test_gas_ownerDoorCheckpointOverhead() (gas: 158870) +Logs: + owner execute single (steady state) gas: 15071 + owner execute batch of 5 (steady state) gas: 62736 + +Suite result: ok. 20 passed; 0 failed; 0 skipped; finished in 327.48ms (343.31ms CPU time) + +Ran 82 tests for test/unit/9_svmRulebook.t.sol:URPSvmTest +[PASS] testFuzz_svm_amountsAboveU64Refused(uint256) (runs: 1024, μ: 842627, ~: 842852) +[PASS] testFuzz_svm_anyPinnedPositionSubstituted(uint8,bytes32) (runs: 1024, μ: 852356, ~: 852560) +[PASS] testFuzz_svm_ratioPin(uint64,uint64) (runs: 1024, μ: 879981, ~: 900129) +[PASS] test_deriveVm_classifiesOnThePrefix() (gas: 11197) +[PASS] test_deriveVm_refusesEverythingElse() (gas: 24006) +[PASS] test_fixture_discriminatorsAreTheAnchorTags() (gas: 2796) +[PASS] test_svmInit_accountPinGuards() (gas: 149899) +[PASS] test_svmInit_ambiguousRulesRefused() (gas: 201104) +[PASS] test_svmInit_assetFromAnotherChainReverts() (gas: 524770) +[PASS] test_svmInit_ceaAccountEntriesValidated() (gas: 180359) +[PASS] test_svmInit_ceaAccountsMustContainTheCea() (gas: 882609) +[PASS] test_svmInit_codelessAssetReverts() (gas: 81263) +[PASS] test_svmInit_dataPinGuards() (gas: 1170777) +[PASS] test_svmInit_dataPinOnDatalessRuleRefused() (gas: 71673) +[PASS] test_svmInit_datalessBesideTaggedIsNotAmbiguous() (gas: 783712) +[PASS] test_svmInit_discriminatorLenGuards() (gas: 143543) +[PASS] test_svmInit_distinctRulesOnOneProgramAccepted() (gas: 783844) +[PASS] test_svmInit_duplicatePinRefused() (gas: 854702) +[PASS] test_svmInit_eip155GrantReportsEvm() (gas: 727471) +[PASS] test_svmInit_expiryGuards() (gas: 94064) +[PASS] test_svmInit_forbiddenProgramsRefusedInAllowList() (gas: 365238) +[PASS] test_svmInit_gatewaySelfWithdrawDiscriminatorIsStillRefused() (gas: 64328) +[PASS] test_svmInit_identityFieldsMustBeSet() (gas: 142763) +[PASS] test_svmInit_listBoundsNamed() (gas: 169676) +[PASS] test_svmInit_maxAccountsAboveTheBoundRefused() (gas: 831143) +[PASS] test_svmInit_oneUselessPinIsAccepted() (gas: 683552) +[PASS] test_svmInit_programListOutOfRange() (gas: 143234) +[PASS] test_svmInit_reinitRefusedAcrossEverything() (gas: 820135) +[PASS] test_svmInit_revertingAssetReverts() (gas: 79665) +[PASS] test_svmInit_ruleWithoutPinRefused() (gas: 73115) +[PASS] test_svmInit_shortTagThatIsNotAPrefixAccepted() (gas: 784673) +[PASS] test_svmInit_storesTermsAndRoutesToSvm() (gas: 841533) +[PASS] test_svmInit_unsupportedNamespaceRevertsNamed() (gas: 72192) +[PASS] test_svmInit_vacuousOrImpossibleDataPinValuesRefused() (gas: 1007114) +[PASS] test_svm_S10_revertRecipient() (gas: 845824) +[PASS] test_svm_S11_recipientShapes() (gas: 931908) +[PASS] test_svm_S12_emptyPayloadIsNotAWithdraw() (gas: 815117) +[PASS] test_svm_S12_malformedPayloadCodes() (gas: 883889) +[PASS] test_svm_S13_bounds() (gas: 932649) +[PASS] test_svm_S13_withdrawInstructionRefused() (gas: 816975) +[PASS] test_svm_S14_recipientMustEqualPayloadTarget() (gas: 847241) +[PASS] test_svm_S15_forbiddenTargets() (gas: 1058496) +[PASS] test_svm_S16_fixedAccountCountMismatch() (gas: 854461) +[PASS] test_svm_S16_programNotAllowed() (gas: 933802) +[PASS] test_svm_S16_shortIxDataNeverReadsPastItself() (gas: 683945) +[PASS] test_svm_S17_accountPinBelowCount() (gas: 861602) +[PASS] test_svm_S17_dataTooShortForPin() (gas: 848943) +[PASS] test_svm_S17_destinationRedirectedRefused() (gas: 852092) +[PASS] test_svm_S17_feeFieldPinned() (gas: 850913) +[PASS] test_svm_S17_fromEndDataTooShortByOne() (gas: 832164) +[PASS] test_svm_S17_fromStartDataTooShort() (gas: 843389) +[PASS] test_svm_S17_ratioFloorRelativeToInput() (gas: 1002727) +[PASS] test_svm_S17_slippageCeiling() (gas: 936673) +[PASS] test_svm_S17_sourceSubstitutionRefused() (gas: 849173) +[PASS] test_svm_S18_ceaAccountAtUnpinnedIndexRefused() (gas: 970323) +[PASS] test_svm_S18_unpinnedFeeAccountIsWhatTheRuleCatches() (gas: 830674) +[PASS] test_svm_S2_expired() (gas: 838899) +[PASS] test_svm_S3_wrongTarget() (gas: 840329) +[PASS] test_svm_S4_calldataShape() (gas: 826218) +[PASS] test_svm_S5_assetMismatch() (gas: 845591) +[PASS] test_svm_S6_perCallCap() (gas: 842272) +[PASS] test_svm_S6b_amountAboveU64() (gas: 954653) +[PASS] test_svm_S8_pcValueCap() (gas: 843790) +[PASS] test_svm_S9_uncappedGasSwap() (gas: 843914) +[PASS] test_svm_assertSpentReadsTheSvmCounter() (gas: 908527) +[PASS] test_svm_creditRevertCreditsTheSvmCounter() (gas: 1006875) +[PASS] test_svm_datalessRuleMatchesOnlyEmptyIxData() (gas: 758172) +[PASS] test_svm_fixedAccountCountAcceptsExactCount() (gas: 899689) +[PASS] test_svm_forbiddenProgramConstantsMatchBase58() (gas: 1920703) +[PASS] test_svm_fromStartPinsAndRawBytesEq() (gas: 873444) +[PASS] test_svm_getSvmConfigOnEmptySlotIsZeroed() (gas: 52526) +[PASS] test_svm_getSvmConfigOnNativeSlotReverts() (gas: 139378) +[PASS] test_svm_gettersRouteByFamily() (gas: 844474) +[PASS] test_svm_goodRequestPassesAndMetersSpend() (gas: 929443) +[PASS] test_svm_gteFloorPin() (gas: 847694) +[PASS] test_svm_leftAlignedEqPinMatchesTheLittleEndianField() (gas: 844327) +[PASS] test_svm_lifetimeCapAccumulates() (gas: 1519703) +[PASS] test_svm_wallet_grantLandsAsSvmConfigWithNoWalletChange() (gas: 1354445) +[PASS] test_svm_wallet_unsupportedNamespaceGrantFailsNamed() (gas: 336175) +[PASS] test_svm_wallet_validRequestReachesTheGateway() (gas: 1497206) +[PASS] test_svm_wallet_violationSurfacesAsTheUrpGate() (gas: 1422349) +[PASS] test_svm_zeroAmountPassesAndWritesNothing() (gas: 903865) +Suite result: ok. 82 passed; 0 failed; 0 skipped; finished in 619.69ms (664.90ms CPU time) + +Ran 75 tests for test/unit/5_universalRulebook.t.sol:URPTest +[PASS] test_DeadOffset_FailsClosed() (gas: 295351) +[PASS] test_U01_ForbiddenCEA_BeatsAllowlist() (gas: 383850) +[PASS] test_U01_ForbiddenInnerTargets_walletUrpGateway() (gas: 361015) +[PASS] test_U02_AgentCannotReset() (gas: 394641) +[PASS] test_U03_gate10_InvalidRevertRecipient() (gas: 324678) +[PASS] test_U03_gate11_RecipientMustBeEmpty() (gas: 321961) +[PASS] test_U03_gate12_MalformedMulticallBodyRevertsUnnamed() (gas: 355636) +[PASS] test_U03_gate12_PayloadNotMulticall() (gas: 370251) +[PASS] test_U03_gate13_BatchSizeOutOfRange() (gas: 322503) +[PASS] test_U03_gate14_ForbiddenInnerTarget() (gas: 327167) +[PASS] test_U03_gate14_MalformedInnerCalldata_shortEntry() (gas: 326376) +[PASS] test_U03_gate15_CallNotAllowed() (gas: 347160) +[PASS] test_U03_gate16_InnerValueExceedsAllowance() (gas: 327962) +[PASS] test_U03_gate1_NotInitialized() (gas: 37227) +[PASS] test_U03_gate2_MandateExpired() (gas: 319199) +[PASS] test_U03_gate3_InvalidTarget() (gas: 319520) +[PASS] test_U03_gate4a_CalldataTooShort() (gas: 316486) +[PASS] test_U03_gate4a_ZeroSelectorIsNotConflated() (gas: 305216) +[PASS] test_U03_gate4b_InvalidSelector() (gas: 317978) +[PASS] test_U03_gate4c_MalformedOutboundRequest() (gas: 318201) +[PASS] test_U03_gate4d_MalformedBodyRevertsUnnamed() (gas: 316659) +[PASS] test_U03_gate5_AssetMismatch() (gas: 323271) +[PASS] test_U03_gate6_AmountExceedsCap() (gas: 322925) +[PASS] test_U03_gate7_TotalSpendCapExceeded() (gas: 368869) +[PASS] test_U03_gate8_PCValueExceedsCap() (gas: 323272) +[PASS] test_U03_gate9_UncappedGasSwapRejected() (gas: 322471) +[PASS] test_U04_ZeroAmount_RedeployPath() (gas: 328197) +[PASS] test_U04_ZeroAmount_StillGated() (gas: 316864) +[PASS] test_U05_LastEntryPoisonsBatch() (gas: 375821) +[PASS] test_U06_BatchBounds() (gas: 454924) +[PASS] test_U07_LifetimeCap_AtTheCrossing() (gas: 396550) +[PASS] test_U07_UnlimitedNeverTrips() (gas: 349853) +[PASS] test_U07_ZeroPerCallCap_RedeploysOnly() (gas: 318839) +[PASS] test_U08_Expiry_Semantics() (gas: 434801) +[PASS] test_U08_NeverExpires_IsExplicit() (gas: 338862) +[PASS] test_U09_RoutingPins() (gas: 338495) +[PASS] test_U10_UncappedGasField() (gas: 350922) +[PASS] test_U11_Beneficiary_BoundsAndPin() (gas: 349848) +[PASS] test_U11_NoBeneficiaryRuleSkipsTheCheck() (gas: 316269) +[PASS] test_U12_EffectsLast_MeteringEvent() (gas: 352591) +[PASS] test_U12_SpendAccumulates() (gas: 368153) +[PASS] test_U13_Credit_ModuleOnly() (gas: 402424) +[PASS] test_U14_Credit_OncePerId() (gas: 434878) +[PASS] test_U14_MisroutedCredit_IsRetryable() (gas: 400784) +[PASS] test_U15_CreditAfterExpiry_LandsHarmlessly() (gas: 390430) +[PASS] test_U15_Credit_Saturates() (gas: 366043) +[PASS] test_U16_AssertSpent_CreditForcesRecomposition() (gas: 378760) +[PASS] test_U16_AssertSpent_ExactEquality() (gas: 351336) +[PASS] test_U16_AssertSpent_GhostConfigHasNoSilentPass() (gas: 25750) +[PASS] test_U17_KeyedIsolation() (gas: 637244) +[PASS] test_U17_NoMultiplexerArgumentReachesTheStrangerSlice() (gas: 662950) +[PASS] test_U18_ExecutionRevert_UnwindsSpend() (gas: 362157) +[PASS] test_U20_AllowList_Bounds() (gas: 2238633) +[PASS] test_U20_WorstCaseGas() (gas: 2002138) +Logs: + U-20 worst-case checkAction gas: 210314 + +[PASS] test_U21_MinBodyLen_IsPinnedToTheStruct() (gas: 1253) +[PASS] test_U22_TrailingGarbage_Decodes() (gas: 351131) +[PASS] test_URP_exactSelectorSet() (gas: 44542734) +[PASS] test_constructor_rejectsZeroAddresses() (gas: 5060155) +[PASS] test_constructor_setsImmutables() (gas: 28097) +[PASS] test_getConfig_roundTripsIncludingAllowList() (gas: 314636) +[PASS] test_init_acceptsZeroPerCallCap() (gas: 286771) +[PASS] test_init_emitsBothPolicySetEvents() (gas: 301392) +[PASS] test_init_ignoresSuppliedSpent() (gas: 307854) +[PASS] test_init_rejectsZeroAssetAndZeroCEA() (gas: 62360) +[PASS] test_sendOutboundSelector_matchesHarness() (gas: 11846) +[PASS] test_supportsInterface() (gas: 15602) +[PASS] test_upgradeable_anchorsLiveInProxyStorage() (gas: 25494) +[PASS] test_upgradeable_configStructLayoutIsFrozen() (gas: 426962394) +[PASS] test_upgradeable_implementationCannotBeInitialised() (gas: 19265) +[PASS] test_upgradeable_onlyAdminOwnerCanUpgrade() (gas: 4820496) +[PASS] test_upgradeable_preUpgradeConfigRefusesReinit() (gas: 386193) +[PASS] test_upgradeable_preUpgradeUniversalConfigStillValidates() (gas: 5209538) +[PASS] test_upgradeable_proxyCannotBeReinitialised() (gas: 23537) +[PASS] test_upgradeable_storageLayoutIsFrozen() (gas: 47609500) +[PASS] test_upgradeable_storageSurvivesUpgrade() (gas: 5185834) +Suite result: ok. 75 passed; 0 failed; 0 skipped; finished in 941.41ms (1.10s CPU time) + +Ran 15 tests for test/unit/16_agentValidator.t.sol:PushSessionValidatorTest +[PASS] testFuzz_P01_ValidateConfig_MatchesRuntime(bytes,uint256,uint8,bytes) (runs: 1024, μ: 9421, ~: 9598) +[PASS] testFuzz_SV02_anySenderButTheAgentReturnsFalse(address) (runs: 1024, μ: 12685, ~: 12685) +[PASS] testFuzz_SV04_malformedConfigAlwaysReverts(bytes,bytes) (runs: 1024, μ: 11016, ~: 11015) +[PASS] testFuzz_SV05_hashIsIgnored(bytes32) (runs: 1024, μ: 9513, ~: 9513) +[PASS] testFuzz_SV06_validateConfigNeverReverts(bytes) (runs: 1024, μ: 6893, ~: 6877) +[PASS] test_P01_LawOnKnownInputs() (gas: 40651) +[PASS] test_SV01_agentSenderValidates() (gas: 9494) +[PASS] test_SV02_wrongSenderReturnsFalse() (gas: 13242) +[PASS] test_SV03_sigLengthNot20ReturnsFalse() (gas: 18122) +[PASS] test_SV04_malformedConfigReverts() (gas: 31739) +[PASS] test_SV07_validatorCallsNothing() (gas: 292856) +[PASS] test_SV08_exactSelectorSet() (gas: 107606) +[PASS] test_V10_isModuleType() (gas: 12820) +[PASS] test_holdsNoStorage() (gas: 99331) +[PASS] test_statelessLifecycleIsNoop() (gas: 12982) +Suite result: ok. 15 passed; 0 failed; 0 skipped; finished in 999.39ms (1.45s CPU time) + +Ran 27 test suites in 1.00s (3.56s CPU time): 563 tests passed, 0 failed, 6 skipped (569 total tests) diff --git a/plan/agw/review-summary.md b/plan/agw/review-summary.md new file mode 100644 index 00000000..404bb9f1 --- /dev/null +++ b/plan/agw/review-summary.md @@ -0,0 +1,30 @@ +# AGW review corrections and evidence + +This concise record replaces duplicate historical plans and logs, which were archived locally before preparing the Git package. + +## Consequential corrections + +- The first review used 610a640. A fetch completed during drafting but was not consumed before handoff, so the recommendation missed D3 at 0f279ca. The engine-extension recommendation is withdrawn. Observe an exact fetched SHA before analysis and recheck freshness before sharing. +- The delivered sender adapter preserves SmartSession. Wallet-authored USE bytes, sender/account binding and closed alternate paths are essential invariants. +- Contract chapters 9 and 10 define accepted limits and 23 delegated requirements, now mapped in [integrator obligations](contract-integrator-obligations.md). +- Gateway main's six fields are older; newer source and named Donut evidence support eight fields. A future removal is a release-intent question. +- Core cb69e0b marketplace requires expiry equality, not a universal standalone rule constraint. +- Owner batching is the documented replacement design. Stronger tests cover initialized config, events, old/new ID usability, mid-initialization rollback and native counters. +- Duplicate rules are owner-authorized; SDK ambiguity behavior must be explicit. Mandatory contract uniqueness was not established as a security necessity. +- Tracking is hash/UTX based. Dedicated request composition, logical sender fields and progress integration remain SDK work. +- Historical clones cannot acquire new ABIs. Addresses and counterfactual funding are generation-specific. Named historical deployment observations do not prove no separate new deployment exists. +- Checkpoints landed in 6b7dbf4, included in e704d5b. Stored counts and per-call ordering deliberately revise the owner invariant. Compare counts, not only blocks; allowance pulls can occur without a checkpoint. +- Binder was never in reviewed code and current Notion drops it for v1. Older proposals or a screenshot question do not authorize adding it. +- The latest Notion target makes create deployment/grant only and uses assets[]/maxGasPerCall. G23/G24 track new wire, read and assertion gaps. + +## Validation history + +| Revision | Baseline | Review evidence | +| --- | --- | --- | +| 610a640 | 547 passed, 0 failed, 7 skipped | Four review tests passed; independently reproduced | +| 0f279ca | 542 passed, 0 failed, 6 skipped | Seven stronger review tests passed; independently reproduced | +| e704d5b | 563 passed, 0 failed, 6 skipped | Seven review tests pass; build/pin checked; [retained evidence](research/validation-e704d5b/README.md) | + +Old Ed25519 fork behavior is historical; that crypto path is removed from the sender adapter. Direct node vectors did not prove complete wallet execution. Local tests use a recording gateway and do not prove real burn or settlement. Current skips remain unverified live/deployment checks. + +Use the [gap register](gaps.md), [Harsh draft](questions-harsh.md), [Zaryab draft](questions-zaryab.md) and [baseline](current-baseline.md) for current decisions. No message or production implementation change has been made. diff --git a/plan/agw/scripts/import-notion-exports.py b/plan/agw/scripts/import-notion-exports.py new file mode 100644 index 00000000..d9ef2f6a --- /dev/null +++ b/plan/agw/scripts/import-notion-exports.py @@ -0,0 +1,121 @@ +#!/usr/bin/env python3 +"""Import downloaded Notion ZIPs by page ID; preserve snapshots and diffs. + +This script does not authenticate to Notion or download pages. Export using +the saved source links, then supply the ZIPs. Default requires all known pages. +""" +import argparse +import difflib +import hashlib +import json +import re +import shutil +from datetime import datetime, timezone +from pathlib import Path +from urllib.parse import quote +from zipfile import ZipFile + + +def digest(data): + return hashlib.sha256(data).hexdigest() + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('archives', nargs='+', type=Path) + parser.add_argument('--partial', action='store_true', help='Explicitly allow a subset of known pages') + parser.add_argument('--dry-run', action='store_true') + args = parser.parse_args() + root = Path(__file__).resolve().parents[1] + manifest_path = root / 'source-manifest.json' + manifest = json.loads(manifest_path.read_text()) + known = {s['page_id']: s for s in manifest['sources']} + incoming = {} + unknown = [] + replacements = {} + for archive in args.archives: + with ZipFile(archive) as z: + for entry in z.namelist(): + match = re.search(r'([a-f0-9]{32})\.md$', entry) + if not match: + continue + page_id = match[1] + if page_id not in known: + unknown.append(entry) + continue + data = z.read(entry) + if page_id in incoming and incoming[page_id]['raw'] != data: + raise SystemExit(f'Conflicting exports for {page_id}; supply one revision per page') + incoming[page_id] = {'archive_path': archive, 'entry': entry, 'raw': data} + parts = Path(entry).parts + # Match both sibling and nested Notion export link forms. + for start in range(len(parts)): + name = '/'.join(parts[start:]) + replacements[quote(name, safe='/()+,')] = Path(known[page_id]['local_file']).name + missing = set(known) - set(incoming) + if missing and not args.partial: + raise SystemExit('Missing known pages: ' + ', '.join(known[p]['title'] for p in sorted(missing))) + if not incoming: + raise SystemExit('No known Notion pages found') + now = datetime.now(timezone.utc) + run_id = now.strftime('%Y%m%dT%H%M%S%fZ') + run_dir = root / 'notion/history' / run_id + rows = [] + for page_id, payload in incoming.items(): + source = known[page_id] + local = root / source['local_file'] + old = local.read_bytes() + if digest(old) != source['sha256']: + raise SystemExit(f'Local snapshot edited since last import: {local}; reconcile it first') + body = payload['raw'].decode('utf-8') + for old_link, new_link in sorted(replacements.items(), key=lambda x: len(x[0]), reverse=True): + body = body.replace(old_link, new_link) + new = body.encode('utf-8') + payload['normalized'] = new + changed = old != new + diff = ''.join(difflib.unified_diff(old.decode().splitlines(True), body.splitlines(True), + fromfile=source['local_file'] + ' (previous)', + tofile=source['local_file'] + ' (refreshed)')) + payload['diff'] = diff + rows.append({'page_id': page_id, 'title': source['title'], 'local_file': source['local_file'], + 'changed': changed, 'previous_sha256': digest(old), 'sha256': digest(new), + 'raw_export_sha256': digest(payload['raw'])}) + print(json.dumps({'checked': len(rows), 'changed': sum(r['changed'] for r in rows), + 'missing': sorted(missing), 'unknown_export_entries': unknown, 'pages': rows}, indent=2)) + if args.dry_run: + return + run_dir.mkdir(parents=True) + shutil.copy2(manifest_path, run_dir / 'manifest-before.json') + archive_dir = root / 'notion/exports' / run_id + archive_dir.mkdir(parents=True) + archive_map = {} + for index, archive in enumerate(args.archives, 1): + dest = archive_dir / f'export-{index}.zip' + shutil.copy2(archive, dest) + archive_map[archive] = str(dest.relative_to(root)) + for row in rows: + source = known[row['page_id']] + payload = incoming[row['page_id']] + local = root / source['local_file'] + if row['changed']: + shutil.copy2(local, run_dir / local.name) + (run_dir / (local.stem + '.diff')).write_text(payload['diff']) + local.write_bytes(payload['normalized']) + source.update(sha256=row['sha256'], raw_export_sha256=row['raw_export_sha256'], + pulled_on=now.date().isoformat(), pulled_at=now.isoformat(), + archive=archive_map[payload['archive_path']], export_entry=payload['entry']) + manifest['last_refresh_at'] = now.isoformat() + if not missing: + manifest['snapshot_date'] = now.date().isoformat() + manifest_path.write_text(json.dumps(manifest, indent=2) + '\n') + report = {'run_id': run_id, 'pulled_at': now.isoformat(), 'complete': not missing, + 'missing_page_ids': sorted(missing), 'unknown_export_entries': unknown, + 'archives': list(archive_map.values()), 'pages': rows, + 'review_status': 'No content changes' if not any(r['changed'] for r in rows) else 'Review required'} + (run_dir / 'refresh.json').write_text(json.dumps(report, indent=2) + '\n') + (root / 'latest-refresh.json').write_text(json.dumps(report, indent=2) + '\n') + print(f'Saved refresh history: {run_dir.relative_to(root)}') + + +if __name__ == '__main__': + main() diff --git a/plan/agw/sdk-design-review.md b/plan/agw/sdk-design-review.md new file mode 100644 index 00000000..3b417a54 --- /dev/null +++ b/plan/agw/sdk-design-review.md @@ -0,0 +1,114 @@ +# AGW SDK design review + +Current implementation: v4-only native/EVM support is implemented and all 25 registered live scenarios have passing coverage. Old runtime/test adapters are removed. [Latest independent SDK follow-up](research/sdk-independent-followup-2026-10-06/README.md) adds actual-contract delayed-index replay/wait tests and the consumer guide. Remaining decisions are H3/H4.5/H6, ref/label scope and public SVM destination integration. Older architecture recommendations below are historical where they conflict with these accepted changes. + +> October 4 update: [Harsh’s replies](product-decisions-2026-10-04.md) supersede earlier provisional approval/default/helper/history/compiler recommendations below. Use [remaining dependencies](external-blockers.md) for current blockers. The clear scope changes and sender-preserving native batching are now implemented; H3 defaults remain unchanged pending clarification. See [alignment evidence](research/product-alignment-2026-10-04/README.md). + +The proposed design adds AGW management and execution to `@pushchain/core` through the API in [page 5](notion/5-sdk-agw.md). It keeps the existing signer and transaction machinery, while introducing a separate wallet execution context. The public API is the agreed target; this review proposes internal boundaries and identifies the evidence needed to implement them correctly. + +Review status: the native/EVM architecture is implemented against checked deployed v4 contracts. [Current gaps](gaps.md) identify remaining scope/API decisions and public SVM work. The detailed proposals below retain their original review context. + +## Core design + +There are two accounts to keep separate. The connected signer's Push identity is the native EOA or the external key's UEA. The execution account is normally that identity, but becomes the AGW when `agenticWallet` is supplied. The signer authorizes the transaction and pays its Push execution gas; the AGW owns its assets and pays wallet outbound fees. + +`client.agentic.wallet(address)` is a management handle. It reads and manages that wallet through the connected signer. It never becomes a sender. `PushChain.initialize(signer, { agenticWallet })` creates a client that executes through the wallet. The owner goes through `execute`; an agent goes through `executeAsAgent` under on-chain rules. + +`agentic.derive`, `agentic.list` and wallet creation must use the connected signer's Push identity even when `universal.account` exposes an AGW. Deriving a new owner wallet from the displayed execution account would create the wrong ownership model. + +## Suggested internal modules + +Names in this table describe proposed modules, not files that already exist. + +| Module | Responsibility | Boundary | +| --- | --- | --- | +| Agentic namespace | `derive`, `create`, `list`, `wallet` and owner-scoped coordination | Uses connected signer identity and network configuration | +| Wallet management | Info, owner, label, checkpoints and rules lifecycle | Reads arbitrary wallets; writes require owner authorization | +| Contract adapter | Factory, wallet, policy and engine ABIs, capabilities, views and log decoding | Contains version-sensitive contract surface | +| Rules codec | Selectors, terms, envelope, IDs, beneficiary offsets and decode | Pure operations where all required context is supplied; verified against contract vectors | +| Execution context | Wallet address, connected Push identity, origin and selected door | Preserves identity separation; rechecks authorization as required | +| Wallet transaction composer | ERC-7579 calls and wallet-originated gateway requests | Does not route outbound through the signer's CEA | +| Response adapter | AGW `from`, signer `origin`, destination hashes, progress and errors | Reuses core receipt tracking with explicit AGW context | +| Read reconstruction | Factory slots, labels, rules, references, spend and checkpoints | Uses defined views or bounded event reconstruction | + +Extend `PushChain` initialization and namespace wiring in `packages/core/src/lib/push-chain/push-chain.ts`. Integrate transaction composition and tracking with the orchestrator modules under packages/core/src/lib/orchestrator. Centralize contract version handling rather than distributing ABI checks across public methods. + +## Creation path + +1. Resolve the connected signer's Push identity and target network. +2. Derive the wallet and index through the factory; verify any pure mirror against contract vectors. +3. Validate structural inputs, agent ownership restrictions, unique agent-chain pairs, destination-chain assets, targets and encoding context before requesting signatures. Resolve each assets[].token to its Push PRC20 using trusted chain context. +4. Compose deployment and rule grants only. Updated CreateOptions has no funds or pc inputs. Funding and bounded owner gateway approvals are a separate normal-account operation; they must not be silently performed by create. +5. Select a supported creation strategy. Current native batching can be atomic through EIP-7702 or sequential through core's fallback; expose the actual strategy and any partial failure. +6. Resolve assigned rule IDs from matched contract behavior and receipt events, preserving input order. Return the specified wallet, index, rules IDs and transaction response. + +Concurrent creations and grants can invalidate a predicted index or grant nonce. Define simulation, re-read and retry behavior without signing or returning stale IDs. The factory's proposed batch entry is missing from the reviewed change-set diff (G15). + +## Management writes + +Rule updates follow the specified assert-spend, revoke, grant order. The replacement creates a new ID and resets counters. All pairs must use an atomic path; a sequential core fallback cannot satisfy that guarantee. Missing atomic capability should be an explicit failure until an accepted alternative is defined (G14). + +Revocation accepts explicit IDs or `{ all: true }`. Bare revocation fails with `REVOKE_NEEDS_TARGET`. Keep spend reads and existence checks consistent with policy initialization flags so an unknown configuration is not decoded as an active zero-valued rule. + +Label changes remain a proposed cosmetic feature. Current e704d5b records one checkpoint before each owner call, plus one per successful grant/revoked ID; owner replacement batches therefore add five. Compare evaluator baseline counts rather than only blocks. This accounting does not observe allowance pulls that require no wallet call. Define reads and log reconstruction with the matching contract events before implementing `info`, `list` and `checkpoints` (G08). + +## Sending through the wallet + +1. Reject forbidden operations and any `from` before signing. +2. Resolve the destination chain from the transaction, normalizing a Push destination to the connected Push network. +3. On the owner door, compose `execute`; on the agent door, fetch the matching enabled rule for this signer and destination on every send. +4. If no rule exists, throw `NO_RULES_FOR_CHAIN` before requesting a signature. The SDK does not reproduce URP's authorization policy in the send path. +5. Compose native calls or policy-compatible outbound calls executed from the AGW. Owner gateway approvals are separate setup operations; do not inject unrestricted approvals into the agent path. The destination account is the AGW's CEA, derived from the AGW address. +6. Apply signer gas checks with the specified first-use external UEA exception. Keep wallet outbound PC separate from signer gas. +7. Send through the existing signer transport. Decode wallet and policy errors into `AgenticRevertError`, retaining core's structured error information. +8. Return a response with AGW `from` and signer `origin`. Track the destination leg and propagate per-call hooks into `wait()`. + +Do not pass an AGW outbound directly into the current signer-based Route 2 implementation: it composes calls from the signer's UEA and would derive the wrong destination CEA. Reuse encoding and tracking primitives with an explicit wallet context instead. + +## Identity and authorization invariants + +- A native Push agent is its EOA; an external agent is its UEA for the actual origin chain. The same external EVM key on different chains has different UEAs. +- Agent authorization checks the connected Push sender. The old session-key validator scheme is historical context, not the new SDK API. +- Owner management and owner execution remain distinct. An owner can manage the wallet from an ordinary client and execute as it from an agentic client. +- Revocation takes effect for future Push execution; an outbound already dispatched can still finish on its destination. +- The gas payer, wallet asset owner and destination CEA must stay consistent in payloads, receipts, tracking and progress events. + +## Compatibility and capability handling + +Preserve existing clients that initialize without `agenticWallet`. Use the lifecycle choices in the [SDK owned review](sdk-owned-review.md): explicit wallet selection on each `reinitialize`, fresh role/capability checks, and read-only write guards (G17). Do not accidentally let a read-only identity reach a signing path. + +Add `READ.CHAIN` as required by the spec. Normalize the existing `'web2:https'` input during the compatibility window while exposing the new `'web2'` constant (G16). Review the existing `READ.WEB2` alias as part of that migration. + +Capabilities depend on the selected contract deployment: sender-gated execution, label mutation, checkpoints, batch creation, gateway layout and SVM destination rulebook. Missing deployment support should be explicit before signing. Do not substitute a legacy contract call merely because its name resembles the required operation. + +## Optional marketplace and job integration + +`utils.agentic.compileCard` produces `Rule[]`, but the canonical card encoding and shared SDK/hook compiler need agreed vectors (G09). A multi-chain card can create several rule IDs while the job hook currently binds one; define that mapping before integrating `market.start` (G10). + +The job provider is the same Push identity named in the rules. The hook must enforce provider identity, expiry and execution chain. START reads establish the baseline; any owner-side checkpoint after that baseline causes settlement in the provider's favor under the design. These responsibilities belong to the hook and evaluator, while the AGW supplies trustworthy identities and checkpoints. + +Standalone AGW can be reviewed and delivered independently. Full marketplace/job/evaluation readiness depends on their WIP implementations. + +## Review and verification checklist + +- [ ] Exact matched artifacts identified; all G01–G24 entries have a disposition. +- [ ] Rule and wallet derivation match contract-generated vectors, including nonce and index races. +- [ ] Owner, agent, unknown sender, revoked rule and expired rule behavior is covered. +- [ ] Native and external signers retain their correct account and gas identity. +- [ ] Atomic replacement cannot use sequential fallback. +- [ ] Native and cross-chain receipts show the intended SDK fields and track the AGW's destination account. +- [ ] Create, update and revoke events return correctly ordered IDs and checkpoint records. +- [ ] Init-time and per-call hooks remain additive through send and wait; errors retain decoded data. +- [ ] Existing initialization, read-only mode, Web2 reads and regular routes remain compatible. +- [ ] Solana-origin support is verified separately from Solana destination capability. +- [ ] Selected deployment passes contract tests and authorized SDK end-to-end coverage. + +## Current integration requirements + +Use owner wallet batching for atomic updates. Stored checkpoints are implemented at e704d5b; grant job refs, label mutation and envelope version remain pending. Universal assets[]/maxGasPerCall require a new matched wire ABI. Public Spent remains scalar in the new snapshot; agree per-token returns and expected-total assertions. Empty-assets routing and native-marker resolution need fixtures. + +Derive expectedCEA from AGW and destination context, commit it in universal terms, expose it in previews and monitor drift. Apply all [integrator obligations](contract-integrator-obligations.md). [Validation evidence](research/validation-e704d5b/README.md) verifies the pinned single-asset source; it does not establish multi-asset or live deployment support. + +Implementation details settled by local review are recorded in the [SDK owned review](sdk-owned-review.md). Existing machinery passed 183 unit tests; new AGW behavior still requires implementation-specific coverage. Include transaction-creating universal reads in the execution-context audit, while keeping management reads non-signing. + +Follow-up: keep NativeRule single-action as specified; reject ambiguous enabled-rule candidates with DUPLICATE_RULE and a hint. Bounded gateway approvals use the existing owner execute path, demonstrated by four local pull/burn-fixture tests. Remaining external decisions are in [external blockers](external-blockers.md). diff --git a/plan/agw/sdk-owned-review.md b/plan/agw/sdk-owned-review.md new file mode 100644 index 00000000..32bf71fc --- /dev/null +++ b/plan/agw/sdk-owned-review.md @@ -0,0 +1,101 @@ +# SDK owned AGW review + +Reviewed October 3, 2026 before sharing team questions. Several integration choices can be settled locally. Their design is recorded below; production SDK implementation and AGW acceptance testing are still outstanding. None of the affected gaps is closed merely because an existing unit test passes. + +Evidence baseline: SDK parent `167fdc6243ecfe5d97735a6124662c7d2084d126`, planning branch `46f9e669d001624cb8b7a594bfed3a9aafb139f1`, October 3 Notion snapshots, and AGW source `e704d5b58fd1d30ce02bc0ad74dccfbdb37804f9`. Contract reads used `git show e704d5b:...`: the sibling checkout is on September main (`9ddd954`), not the reviewed branch. No remote fetch or Notion refresh was performed in this pass. + +## Disposition + +| Gaps | What we can settle ourselves | What remains external | +| --- | --- | --- | +| G03 | Wallet-scoped records and receipt-derived rule IDs | Public helper signature/constants and matching generation context | +| G08 | Checkpoint event reads, count snapshots and current-label event reconstruction | Editable labels/ref ABI, deployment and historical-rule scope | +| G13, G15 | Capability-based creation, committed/pending hashes and partial-failure recovery | No required new factory batch method; exact final artifacts still needed | +| G14 | One owner-wallet transaction for replacement; never sequential fallback | Multi-asset spend/assertion ABI and final-generation regression tests | +| G16 | Public Web2 normalization with unchanged wire identity | Implementation and compatibility checks; no contract change required | +| G17 | Read-only boundaries and explicit wallet selection on reinitialize | Implementation and mocked lifecycle tests | +| G18 | Enabled-rule eligibility, uncached send lookup and on-chain expiry enforcement | Public duplicate ambiguity wording remains part of H4 | +| G19, G22, G23 | ABI-aware encoding, trusted token/CEA context and generation guards | Approval policy, defaults, multi-asset fixtures and SVM capabilities | +| G20 | Dedicated AGW composition, separate identity/gas contexts, response/error/hook adaptation | Live production gateway/node/settlement acceptance; owner allowance mechanism now locally demonstrated | + +G01/G02 deployment, G04 gateway release intent, G05/G09–G12 ecosystem alignment and G07 executor work cannot be closed through SDK code review. G06 binder was already resolved as dropped. G21 native action/array scope and G24 multi-asset spend semantics remain team decisions. + +## Internal decisions for implementation + +### Account context + +Keep connected signer identity, execution wallet and origin as separate values. Derive/list/create owner wallets from the signer identity, never the displayed AGW account. Account status and Push gas checks remain signer-scoped; wallet assets and outbound PC remain AGW-scoped. + +Current `push-chain.ts:297–310` exposes `origin` from `getUOA()` and `account` from `computeUEAOffchain()`. Add an explicit execution context rather than replacing signer derivation throughout the orchestrator. Do not reuse `getAccountStatus` as a wallet capability check. + +### Read only and reinitialization + +For new AGW support, choose the wallet explicitly on each `reinitialize`: an omitted `agenticWallet` produces an ordinary client. An explicit wallet reruns deployment, supported-generation and identity checks, including when the signer or network changes. Do not copy the prior owner/agent role or rule lookup cache. Continue inheriting existing network/RPC/explorer/hook options as today. + +An ordinary read-only client may create a management handle for an arbitrary wallet and call its non-signing reads. Its writes fail before signing. If initialized with an AGW execution context, it remains read-only and must never gain execution authority from an address match. Preserve existing non-AGW behavior. These are selected SDK design choices for the new option, not implemented behavior or additional promises in the source spec. + +Evidence: `push-chain.ts:701–743` creates a dummy signer that rejects signing in read-only mode; `:816–848` creates a fresh client and inherits existing options. Existing integration-style lifecycle suites are excluded from the unit configuration and were not run. Add mocked lifecycle coverage during implementation. + +### Initialization and send eligibility + +Owner identity selects the owner door. Otherwise, initialization requires at least one enabled rule naming the connected Push identity. An enabled but expired rule may establish identity; expiry remains an on-chain send check. A revoked rule does not establish eligibility. This avoids silently changing the spec's enabled-rule lookup into an expiry filter. + +Each send discovers enabled IDs and resolves agent/destination at a consistent block. Zero matches gives the specified `NO_RULES_FOR_CHAIN`; multiple matches fail before signing rather than choosing an arbitrary rule. Use the existing DUPLICATE_RULE code with a descriptive hint and document its send-path use. Never cache send eligibility at initialization or infer rule enablement from retained URP terms alone. + +Pinned engine evidence: `lib/smartsessions/contracts/core/SmartSessionBase.sol:72` enumerates enabled IDs; `:444` tests membership. AGW `src/AGW.sol:935` resolves the agent and `:756–765` removes the engine session on revoke. Enumeration followed by dependent configuration reads does not guarantee one RPC round trip. Group reads by block and retry a bounded number of times if consistency cannot be maintained. + +### Creation and recovery + +Create only deploys/grants. Funding and approvals remain separate. Use the actual signer capability: supported atomic EIP-7702 for native batching, the existing sequential native fallback otherwise, and an external UEA batch where supported. Do not require a new `createWallet` contract entry point. + +Preserve atomicity metadata and every confirmed/pending hash on failures. Re-read the factory index and grant nonce before constructing a retry. If deployment succeeded but grants failed, recover that wallet instead of blindly creating another. IDs come from verified receipts in input order; predictions are not authoritative results. + +Evidence: `orchestrator/internals/push-chain-tx.ts` and the six native-multicall unit tests cover atomic routing, sequential fallback, committed/pending hashes and receipt failure. This resolves routing uncertainty, not AGW-specific batching, nonce races or recovery correctness. + +### Replacement and reads + +An existing-wallet update is one owner `execute` batch containing assert-spend, revoke and grant. No native EIP-7702 capability is required for that wallet-level batch. Current replacement records five checkpoints; a failed transaction rolls all of them back. Compare counts, including same-block changes, rather than treating last block as sufficient evidence. + +Use factory count/prediction views for deployed-wallet enumeration. Include the next predicted undeployed slot shown in the SDK example with `deployed: false` and zero rules, alongside deployed slots; never predict indices beyond the factory's next index. This is the planned interpretation of the public example, not an implemented read. At e704d5b, labels are deployment-event metadata, not stored mutable state. Decode events from the selected factory start block with pagination and reorg handling. Revoked history and new label/ref storage remain external dependencies. + +Evidence: AGWFactory `src/AGWFactory.sol:254–273` permits prediction only through the next index and defines count as deployed wallets. `:133` says labels are emitted and never stored. Current checkpoint and replacement evidence remains in [validation](research/validation-e704d5b/README.md). + +### Web2 public input and wire identity + +Add the specified enumerable `READ.CHAIN` with public `WEB2 = 'web2'`. Normalize both `'web2'` and legacy `'web2:https'` to the existing internal destination `{ chainNamespace: 'web2', chainId: 'https' }`. Keep the wire CAIP-2 `web2:https`; changing the public spelling does not authorize changing the node routing identity. Follow the specified deprecated `CHAIN.WEB2` alias and preserve compatibility for the existing `READ.WEB2` surface and old literal inputs. + +Cover public constants, types, query discrimination, prepared reads, tracking/decoded results and transaction rejection. Do not just rename the enum: `read-state/read-params.ts:198` recognizes only the current alias, and `read-state/destination.ts:18` rejects a joined destination without `:`. Existing tests verify the old spelling, not the new one. + +### Composer, responses and errors + +For pinned EVM universal rules, compose a wallet-originated outbound with empty bytes recipient, AGW revert recipient, a nonzero gas cap and policy-compatible destination multicall. Derive `expectedCEA` from the wallet plus trusted destination deployment. Never insert an unrestricted approval into an agent transaction. The new assets format still needs agreed fixtures before this becomes the final composer. + +Current Route 2 derives CEA from the signer (`route-handlers.ts:666,763`), uses the CEA as recipient for a payload and uses signer UEA for refunds (`:826–854`). It cannot be reused unchanged. `cea-utils.ts:109–120` already queries `getCEAForPushAccount(address)`; adapt with explicit AGW and network/factory context. Its current address cache does not include factory identity, so generation-aware caching requires review. + +Preserve logical AGW `from` on both send response and waited receipt; preserve signer `origin`, hashes and raw transport metadata. Management transaction responses retain their specified owner `from`. Hash/event tracking is reusable infrastructure: `outbound-tracker.ts:17–24` hashes network plus Push transaction hash. It does not establish that an AGW-wrapped transaction is reconstructed correctly. + +The current response builder derives signer/UEA identity (`response-builder.ts:645,740,859`) and reconstructs known UEA calls (`:655–682`). Add explicit wallet decoding/context for live sends and replayed tracking; do not overwrite only the first response. Carry init and per-call hooks through `wait` without duplication. + +Extend the existing structured `PushChainExecutionError` with the specified AGW error. Preserve `gatewayTxHash`, `decodedError` and partial-batch recovery metadata where relevant. Export the base error publicly if callers are expected to use it: it currently exists internally (`internals/errors.ts:40`) but is absent from `packages/core/src/lib/index.ts`. Default decoders also need the matching AGW/URP error ABIs. + +### Transaction creating reads + +`universal.read()` and `executeReads()` submit request transactions; they are not ordinary RPC reads. Route them through the same wallet execution/authorization layer and audit read budget, refund and balance context. `prepareRead` and tracking must remain non-signing. Management `info`, `rules.get/list` and checkpoint reads are separate RPC/log operations. + +Evidence: `push-chain.ts:346–363` invokes read execution; `read-state/read-executor.ts:84` calls the transaction executor; `orchestrator/internals/read-state.ts:23–28` currently derives the default refund from the signer. Neither the balance nor refund context should be changed by globally replacing the signer with the AGW. Native agent batch-read behavior depends on H2; do not silently bypass its single-call restriction. + +## Validation and limits + +Ten existing mock-based unit suites passed: **183 tests, zero failures**. The first group covers native batching, tracking helpers, per-call hooks, structured errors, public read exports and read grammar (126 tests). The second covers gateway/account/CEA helpers, failed Push response handling, tracking guards and outbound confirmation gates (57 tests). + +Commands and suite counts are in [test summary](research/sdk-owned-review-2026-10-03/test-summary.json); [first run](research/sdk-owned-review-2026-10-03/jest.log) and [response run](research/sdk-owned-review-2026-10-03/response.log) retain runner output. No production file changed, no new SDK implementation was tested, no contract suite was rerun and no transaction was broadcast. These results are evidence for existing behavior, not a complete audit or future AGW acceptance. + +## What still belongs in the team questions + +Keep H1 approval safety, H2 native-array scope, H3 defaults, and H4 helper context/history/per-token spend. Keep Z1 matching artifacts and Z3 compatible deployment. Z2 allowance setup is resolved locally; Z4 is a release note covered by generation compatibility. See the [external blocker register](external-blockers.md). Creation routing and partial failure, read-only/reinitialize semantics, response adaptation, Web2 normalization and checkpoint reconstruction are SDK tasks; do not ask the teams to design these internals. + +Independent module work can begin from the recorded choices; finalize affected types/codecs after the matching contract/API decisions are available, with targeted tests for the new behavior. Refresh sources again before sharing the drafts. Implementation is still a separate phase. + +## Follow-up closure + +Four new [allowance experiments](research/sdk-owned-review-2026-10-03/README.md) demonstrate bounded owner setup/removal and atomic failure behavior with a pulling/burning fixture. No new AGW allowance API is needed. Destination approval can use the existing owner execution client; only the agent approval policy needs a product decision. Keep NativeRule single-action as specified; ask only about native arrays. Remote AGW/core/gateway refs were rechecked unchanged; Notion was not refreshed. The remaining standalone external areas are enumerated in [external blockers](external-blockers.md). diff --git a/plan/agw/section6-action-items.md b/plan/agw/section6-action-items.md new file mode 100644 index 00000000..ef1cedb2 --- /dev/null +++ b/plan/agw/section6-action-items.md @@ -0,0 +1,53 @@ +# October 12 feedback — work items and deployment boundary + +Source: native Markdown exports of [SDK page 5](https://app.notion.com/p/pushprotocol/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9) and [contract page 1](https://app.notion.com/p/pushprotocol/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d), downloaded October 12 at 20:23 IST. Both section 6 introductions say the new text overrides sections above. [Downloads, hashes and diffs](research/section6-feedback-2026-10-12/). The user confirms the new contract changes are not deployed. Planning stays on `feat/agw-sdk-v4`; non-plan changes are also synced to `feat/agw-sdk-v5`. + +## SDK-owned changes available on deployed v5 + +S01–S12 are implemented locally (within the explicit v5 limitations below). S13 has 68/68 passing live coverage across the full run (65 passed, 3 failed) and the three-case rerun (3 passed). This is not one clean full invocation. Section 7 now has a preset-only framework; the catalog remains empty by user decision. Encoding/ID utilities remain private. + + +| Item | Feedback | Required change | +| --- | --- | --- | +| S01 | SDK 6.a, 6.h | Unified `Rule.allowedCalls[]` for native/EVM/SVM; retire public native `actions[]` and single-function shorthand. Preserve internal per-action wire terms. | +| S02 | SDK 6.a | Pins inside calls: `{arg, expected}` / `{arg, max}`; native max compiles to the existing metered argument (at most one). Remove public native lifetime totals/call limits and per-action expiry. | +| S03 | SDK 6.a | `AGENTIC.WALLET = 'agentic:wallet'`; resolve AGW/CEA/ATA context, map existing EVM beneficiary to one WALLET pin, reject unsupported destination pins before signing. | +| S04 | SDK 6.b / contract 6.5 | Omitted asset maxTotal and call maxValue become zero. Explicit zero already works in contracts. | +| S05 | SDK 6.c–d | Restore `spent` in records; per-asset universal spend in asset order. Read pins as arg, support get→change expiry→update. See read-shape questions below. | +| S06 | SDK 6.f / contract 6.6 | Direct wallet setLabel on both EOA/UEA paths; no owner checkpoint; AGENTIC-TX-106 progress event. | +| S07 | SDK 6.g / contract 6.6 | First-use EVM CEA gas default when caller omits gasLimit, preserving explicit caller value and policy checks. | +| S08 | SDK 6.h, 7 | Remove public addresses/limits/encoding/ID helpers. Retain WALLET and the later preset namespace only when preset data/behavior is settled. | +| S09 | SDK 6.i | Solana signature/discriminator and numeric arg/account pins replace IDL-bearing rules. Send-data IDL helper remains. Fixed-width layout only. | +| S10 | SDK 6.l | Restore DUPLICATE_RULE at create/add; retain AMBIGUOUS_RULE for pre-existing overlaps. Reject before signing. | +| S11 | SDK 6.l | Unsupported network/deployment maps to CAPABILITY_UNAVAILABLE rather than public GENERATION_UNSUPPORTED. Preview-only RULE_LIMIT_EXCEEDED becomes internal. | +| S12 | SDK 6.m | rules.delete replaces rules.revoke; DELETE_NEEDS_TARGET replaces REVOKE_NEEDS_TARGET. Contract functions/events/checkpoint names do not change. | +| S13 | Review acceptance | Update unit/local/live scenarios and consumer examples for new behavior, then run the full compatible AGW group. A complete final suite also needs the new deployment. | + +## Keep deferred until contract delivery + +| Item | Contract dependency | Current safe behavior | +| --- | --- | --- | +| C01 | Page 1 §6.1: exact approval inside each outbound, both doors | Do not delete allowance safety checks or claim automatic approval on v5. Switch only with verified source/ABI/deployment. | +| C02 | Page 1 §6.2: createWallet(label, Session[]) and factory-only initial grant path | Do not invent the ABI or remove partial recovery until every supported owner has atomic creation. Decide the signed variant and preserve index-race protection. | +| C03 | Page 1 §6.3: general destination EQ/MAX pins | Use existing WALLET beneficiary support; reject other destination pins until deployed. Native v5 supports 8 EQ pins and one metered MAX per action. | +| C05 | SDK §6.k: contract-owner confirmation of wallet-token-account pins in all supported cases | SDK derives and validates CEA/ATA context. Local SPL and selected live cases provide evidence for those cases, not a claim of universal policy coverage. | +| C04 | SDK §6.l: remove CREATE_PARTIAL, allowance error and split-write recovery fields | Follows C01/C02; removing them early would hide real existing failure states. Core non-AGW transaction fields must not be removed globally. | + +Ref removal is already implemented and deployed. Explicit zero cap semantics are already implemented by the contract; no deployment is needed to change SDK defaults. + +## Specification gaps to highlight + +1. **Native action ceiling:** SDK 6.h says 1..32 allowedCalls for all chains; deployed AGW caps native session actions at 8. Keep the actual cap and identify this unsupported request explicitly. +2. **Native spent with several actions:** the new public Spent shape has one native amountSpent/callsUsed despite per-action contract counters. Summing unrelated token amounts has no useful token meaning; the user approved per-action spend entries on October 12. Keep scalar counters for a single action; return identified action entries for multiple actions. +3. **Argument reconstruction:** contracts keep offsets and four-byte selectors, not ABI signatures/types. Flat 32-byte EVM arguments map to arg; offsets after static tuples/arrays cannot reliably recover original top-level indexes. Reject unsupported round-trips rather than silently re-encode different calldata constraints. Preset §7.e explicitly leaves struct fields open. +4. **Solana read/modify/update:** raw eight-byte selectors and stored byte offsets have no Borsh argument types. Exact numeric arg reconstruction needs layout metadata or a defined raw representation. Account positions can round-trip directly. The user approved a decoded raw representation on October 12. Authored rules use numeric arg/account positions; decoded raw rules preserve offsets and all constraints and are accepted by update. +5. **Presets (§7):** first app/address lists and struct-field pin semantics remain open. The preset framework is implemented; missing caps default to zero per the user. No invented DEX/lending addresses or permissive approval presets. The agent is already one Push address (EOA/UEA) across destinations. +6. **Old statements:** contract §6.2 describes native multicall rejection, but SDK EIP-7702 atomic native creation is already tested. The new factory entry is still a requested target; do not remove index-race protection simply to match its illustrative signature. + +## Discussion check + +The SDK All discussions panel contains the older October 1–7 comments (including the resolved multiple-rules-per-chain comment and ref omission). The contract All discussions panel contains September 29/October 1 comments, including direct cosmetic label guidance. No later inline thread was visible. The fresh section 6 body and the user's supplied Harsh message supersede the older comments. Native Notion exports exclude discussion threads. + +## Live acceptance follow-up + +Donut reported `height 23989983 is not available, lowest height is 24073229` for a default checkpoint-history scan. The SDK now retries from an explicitly reported retention floor only for an unbounded/default scan, and still requires the full sequence 1..checkpointCount at one snapshot. Missing old events remain an error; no partial history is returned as complete. Explicit sinceBlock requests and unrelated RPC errors are not silently truncated. diff --git a/plan/agw/section7-presets.md b/plan/agw/section7-presets.md new file mode 100644 index 00000000..d6b1a070 --- /dev/null +++ b/plan/agw/section7-presets.md @@ -0,0 +1,72 @@ +# Section 7 presets — current alignment + +Updated October 18, 2026. [Live SDK §7](https://app.notion.com/p/pushprotocol/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9#07ce163677ef44dfae03a38ea4c16da0) and the [catalog proposal snapshot](notion/agw-presets-proposal-and-rules.md) are the sources. Work is on v4; non-plan changes are mirrored to v5. + +## Approved decisions + +- Missing asset caps default to zero, superseding the SDK page's proposed throw. +- Mainnet templates are included following the user's October 15 scope expansion. Live tests remain testnet-only. +- DEX get without a complete token pair returns zero-input-cap review templates. Call get again after choosing both tokens. The user explicitly approved this flow; merely adding assets to an earlier result cannot enable its swaps. +- Static struct/fixed-array fields use argument paths such as [0,3]. Decoded EVM rules use raw selectors and exact ABI word positions for lossless get/update; no ABI metadata is invented. + +## Implemented + +Enumerable DEXES/LENDING/STAKING/PREDICTION constants; list/get only; one rule per chain; full signatures; wallet recipient pins; token pair pins; bounded spender-pinned approvals; mutation isolation; omitted identity/expiry; explicit chain filtering; zero cap defaults; 32-call and 32-pin limits. Unfiltered discovery includes both mainnet and testnet templates. PREDICTION remains empty. + +[Catalog coverage, read-only mainnet verification and exclusions](research/preset-mainnet-2026-10-15/README.md). [Testnet source snapshots and review flow](research/preset-catalog-2026-10-15/implementation-status.md). + +## Remaining + +- Remote Notion wording needs synchronization: zero-cap review/regenerate flow, missing caps default zero, STAKING, [0,3] tuple paths. No remote page was edited. +- Additional protocol rows need deployment/function/permission review. Dynamic paths and currently unrepresentable Solana flows are not silently enabled. +- Live protocol tests are separate from local policy tests and from read-only address verification. Coverage does not extend to every app/chain merely because its templates are present. + +## Validation + +Latest full unit run: 2,096 passed, 12 skipped, zero failures. Focused preset tests: 44 passed. The zero-cap review flow passed 16 local real-v6 contract tests. Test selection includes two separate opt-in agw-presets scenarios (Uniswap and Aave), and leaves the default all group unchanged. Uniswap and Aave LINK live scenarios passed in separate runs; Aave USDC hit its protocol supply cap before the LINK correction. [Live results and transaction evidence](research/preset-live-2026-10-15/README.md). + + +## Expanded live acceptance (October 15) + +Five additional scenarios now pass across focused runs: EigenLayer Sepolia; Base Uniswap; Arbitrum Uniswap/Aave; BNB PancakeSwap/Venus; Base Aave/Moonwell. Combined with the earlier Sepolia runs, every shipped testnet protocol/chain combination has at least one positive live flow. The runs found and fixed destination-aware native ETH PRC20 resolution. Borrow/repay, every market and mainnet execution are not claimed. [Evidence and exact limits](research/preset-expanded-live-2026-10-15/README.md). + + +## October 16 — operation limits and readiness supersede earlier behavior + +get returns additive readiness metadata; supported lending/staking calls now have token/amount restrictions. Market redemption uses underlying units. Dynamic/position-derived claims are excluded and explained. [Current implementation, API changes and live validation boundary](research/preset-configuration-2026-10-16/README.md). Earlier live runs predate these restrictions; new live attempts timed out during setup and are not accepted as passes. + + +## October 18 — SDK supplies curated tokens + +Riyanshu clarified that presets should include tokens across their networks without frontend token selection. This supersedes the earlier omitted-assets discovery flow: `get` now supplies a curated token subset per chain whenever `assets` is omitted. DEX defaults include a complete pair with generated token constraints. Explicit `assets` replaces defaults, including an empty list or a list covering only some chains. + +Spending caps retain the agreed zero default. Gas and expiry defaults are not invented. Automatic token inclusion is implemented; fully executable presets still require an agreed permission policy. Suggested 10 USDC/call, 100 USDC Push-outbound total and 7-day expiry are proposals only, not shipped defaults; native/other token caps and chain-specific gas budgets require separate values. There is no implied conversion to USD, batch aggregate cap or destination lifetime cap. + +The default subsets use existing reviewed catalog/source addresses and fit the deployed 32-call/32-pin ceilings. Mainnet remains template-only and no new funded live run is performed for this change. See the [consumer guide](../../packages/core/AGW.md) for the per-network token table and replacement semantics. + + +## October 18 — default permission policy approved and implemented + +The user authorized preset-generated limits, gas budgets and expiry. This supersedes the pending-policy note above. Omitted assets selects curated tokens with explicit caps: stablecoins 10/call and 100 cumulative Push-outbound; ETH-family 0.001/0.01; WBNB 0.01/0.1; LINK 1/10. Decimals were checked by chain/address using read-only RPC calls at recorded blocks. Omitted expiry becomes seven days from get time; the catalog gas ceiling is 20 PC. Actual sends still quote at runtime. Mainnet execution is not newly certified. + +Supplying only agent (plus an optional chain filter) now produces typed Rule[] and complete local configuration. Explicit expiry/gas and asset arrays remain authoritative; zero gas and zero asset caps are preserved. General rule authoring keeps zero defaults. No public helper or new required argument is introduced. + +Operational prerequisites remain: asset PRC20 mappings, funded source/destination accounts, protocol liquidity and live routes. Some testnet protocol mocks have no PRC20 mapping; their prior live tests used prefunded CEAs with bridge assets empty. Configuration readiness does not guarantee that those default source assets can be bridged or that an unmodified default rule can be created on every network. No unavailable mapping is fabricated or silently dropped. + + +## October 18 — release correction for funding availability + +Configuration completeness alone is no longer advertised as readiness. Ready additionally checks the SDK's verified AGW network registry, supported gateway destinations and selected source-token registry. Push mode preserves missing assets and reports them. Destination mode explicitly requests empty bridge authority with unchanged call constraints and selectedAssets review metadata. This is additive and avoids inventing PRC20 identities. Sepolia WETH/stETH mappings and EVM address-word source metadata are now supported and read-only verified. [Final release evidence](research/preset-release-readiness-2026-10-18/README.md) supersedes prior readiness descriptions. + + +## October 24 — only working presets; readiness removed + +This supersedes every earlier catalog, default-token and readiness entry above. After the team answers (Aman: remove Circle, keep supported tokens, native ETH plus wrap; DEXES Uniswap V3, LENDING Aave V3, STAKING later), the catalog holds six testnet presets: + +- Uniswap V3 and Aave V3, each on Sepolia, Base Sepolia and Arbitrum Sepolia. +- Each sends only native ETH (0.001 per call, 0.01 in total, 20 PC gas, seven days) and wraps it first. +- DEX swaps WETH and Circle USDC on the destination chain, with a fixed 10 USDC cap on the USDC side. +- Lending supplies the pool's own WETH reserve (Aave's `0xC558…` on Sepolia, `0x1dF4…` on Arbitrum). + +`get` returns `{ rules }`, as the Notion spec (section 7.c) says. The readiness report, the `network` option, PREDICTION and the mainnet templates are removed. The marketplace demo (`pushchain/marketplace_demo`, `cards.ts`) is the reference for the ETH, wrap, approve and supply flow, which passed live there on Base and Sepolia. The consumer guide is [AGW.md](../../packages/core/AGW.md). + diff --git a/plan/agw/source-manifest.json b/plan/agw/source-manifest.json new file mode 100644 index 00000000..deae120d --- /dev/null +++ b/plan/agw/source-manifest.json @@ -0,0 +1,192 @@ +{ + "schema_version": 1, + "snapshot_date": "2026-10-07", + "notes": "Page content preserved; known intra-export links normalized to local filenames. Comment threads excluded by Notion export. Null edit dates mean not observed. Original bundle retained.", + "sources": [ + { + "title": "AGW design overview", + "page_id": "3e9188aea7f481c8b38ccba332b0afa2", + "notion_url": "https://app.notion.com/p/pushprotocol/AGW-UniversalMarketplace-8183-UniversalEvaluator-3e9188aea7f481c8b38ccba332b0afa2", + "local_file": "notion/overview.md", + "pulled_on": "2026-10-07", + "observed_last_edited_date": "2026-10-01", + "authority": "Supporting design", + "sha256": "f2d7954e018324a937282ca190f397cc12a27973a07c891f3edfd6e89383c53e", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu 3e9188aea7f481c8b38ccba332b0afa2.md", + "raw_export_sha256": "99b727bd58cf588b2c766dc1b93eff402c47e918718b69c2a456b119ad43435b", + "archive": "notion/exports/20261007T102718466408Z/export-1.zip", + "pulled_at": "2026-10-07T10:27:18.466408+00:00" + }, + { + "title": "1 AGW Contract Changes", + "page_id": "3e9188aea7f4813aa31fc95ceb4e684d", + "notion_url": "https://app.notion.com/p/pushprotocol/1-AGW-Contract-Changes-nomenclature-standard-change-set-3e9188aea7f4813aa31fc95ceb4e684d", + "local_file": "notion/1-agw-contract-changes.md", + "pulled_on": "2026-10-12", + "observed_last_edited_date": "2026-10-12", + "authority": "WIP contract target", + "sha256": "7d1690747f52a32a2e3c9eac64422db8dbc673729f370156da2c83c06634bac4", + "export_entry": "Private & Shared/1 AGW Contract Changes (nomenclature standard + ch 3e9188aea7f4813aa31fc95ceb4e684d.md", + "raw_export_sha256": "7d1690747f52a32a2e3c9eac64422db8dbc673729f370156da2c83c06634bac4", + "archive": "research/section6-feedback-2026-10-12/contracts-export.zip", + "pulled_at": "2026-10-12T14:53:27.077622+00:00", + "observed_last_edited_at": "2026-10-12T17:01:00+05:30" + }, + { + "title": "2 Universal Marketplace", + "page_id": "3e9188aea7f48118b90ac9b267496295", + "notion_url": "https://app.notion.com/p/pushprotocol/2-Universal-Marketplace-3e9188aea7f48118b90ac9b267496295", + "local_file": "notion/2-universal-marketplace.md", + "pulled_on": "2026-10-07", + "observed_last_edited_date": null, + "authority": "Supporting WIP design", + "sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/2 Universal Marketplace 3e9188aea7f48118b90ac9b267496295.md", + "raw_export_sha256": "5ddfd9e8980faae9eec85e3959cc99edbb3b115565af289c5603a91df0b78d18", + "archive": "notion/exports/20261007T102718466408Z/export-1.zip", + "pulled_at": "2026-10-07T10:27:18.466408+00:00" + }, + { + "title": "3 ERC-8183 job kernel and hook", + "page_id": "3e9188aea7f48188a838c3a740d8c858", + "notion_url": "https://app.notion.com/p/pushprotocol/3-8183-job-kernel-and-hook-3e9188aea7f48188a838c3a740d8c858", + "local_file": "notion/3-8183-job-kernel-and-hook.md", + "pulled_on": "2026-10-07", + "observed_last_edited_date": null, + "authority": "Supporting WIP design", + "sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/3 8183 (job kernel and hook) 3e9188aea7f48188a838c3a740d8c858.md", + "raw_export_sha256": "3c805db465f2d39db8d34179ac1dd864db1abf7b1b3e93f38074fbf393093f90", + "archive": "notion/exports/20261007T102718466408Z/export-1.zip", + "pulled_at": "2026-10-07T10:27:18.466408+00:00" + }, + { + "title": "4 Universal Evaluation", + "page_id": "3e9188aea7f4817bb03ef4c78c883f8b", + "notion_url": "https://app.notion.com/p/pushprotocol/4-Universal-Evaluation-3e9188aea7f4817bb03ef4c78c883f8b", + "local_file": "notion/4-universal-evaluation.md", + "pulled_on": "2026-10-07", + "observed_last_edited_date": null, + "authority": "Supporting WIP design", + "sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/4 Universal Evaluation 3e9188aea7f4817bb03ef4c78c883f8b.md", + "raw_export_sha256": "a2f1c93a75b8631c9628c06f1be135fa0198f00f096a765ce808dd5e544b2d6f", + "archive": "notion/exports/20261007T102718466408Z/export-1.zip", + "pulled_at": "2026-10-07T10:27:18.466408+00:00" + }, + { + "title": "5 SDK AGW", + "page_id": "3e9188aea7f481cf8e8de324956549b9", + "notion_url": "https://app.notion.com/p/pushprotocol/5-SDK-AGW-3e9188aea7f481cf8e8de324956549b9", + "local_file": "notion/5-sdk-agw.md", + "pulled_on": "2026-10-12", + "observed_last_edited_date": "2026-10-12", + "authority": "Primary SDK API target", + "sha256": "7f8e6e892686fc298bd0a40d66d7e21cb457711e18a272e563322403bc0380ec", + "export_entry": "Private & Shared/5 SDK AGW 3e9188aea7f481cf8e8de324956549b9.md", + "raw_export_sha256": "7f8e6e892686fc298bd0a40d66d7e21cb457711e18a272e563322403bc0380ec", + "archive": "research/section6-feedback-2026-10-12/sdk-export.zip", + "pulled_at": "2026-10-12T14:53:27.075673+00:00", + "previous_observed_last_edited_date": "2026-10-01", + "observed_last_edited_ui": "Edited 2h ago (observed October 7)", + "observed_last_edited_at": "2026-10-12T19:42:00+05:30" + }, + { + "title": "6 SDK Universal Marketplace", + "page_id": "3ea188aea7f481e2961ed97129f3a4e6", + "notion_url": "https://app.notion.com/p/pushprotocol/6-SDK-Universal-Marketplace-3ea188aea7f481e2961ed97129f3a4e6", + "local_file": "notion/6-sdk-universal-marketplace.md", + "pulled_on": "2026-10-07", + "observed_last_edited_date": "2026-09-30", + "authority": "Supporting WIP SDK", + "sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/6 SDK Universal Marketplace 3ea188aea7f481e2961ed97129f3a4e6.md", + "raw_export_sha256": "e7298952f2ba9adb218b4ef0459b8fa696a2072167dc5f655060b69788cf528c", + "archive": "notion/exports/20261007T102718466408Z/export-1.zip", + "pulled_at": "2026-10-07T10:27:18.466408+00:00" + }, + { + "title": "7 SDK ERC-8183 Job", + "page_id": "3ea188aea7f481e0a137f5a896723376", + "notion_url": "https://app.notion.com/p/pushprotocol/7-SDK-8183-Job-3ea188aea7f481e0a137f5a896723376", + "local_file": "notion/7-sdk-8183-job.md", + "pulled_on": "2026-10-07", + "observed_last_edited_date": null, + "authority": "Supporting WIP SDK", + "sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/7 SDK 8183 Job 3ea188aea7f481e0a137f5a896723376.md", + "raw_export_sha256": "dbf1ff539f5df944e5f5f55710f5f6d3359469a141038cec2604e7c33392752c", + "archive": "notion/exports/20261007T102718466408Z/export-1.zip", + "pulled_at": "2026-10-07T10:27:18.466408+00:00" + }, + { + "title": "8 SDK Universal Evaluation", + "page_id": "3ea188aea7f48197a3b3cfdedfa74fee", + "notion_url": "https://app.notion.com/p/pushprotocol/8-SDK-Universal-Evaluation-3ea188aea7f48197a3b3cfdedfa74fee", + "local_file": "notion/8-sdk-universal-evaluation.md", + "pulled_on": "2026-10-07", + "observed_last_edited_date": null, + "authority": "Supporting WIP SDK", + "sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/8 SDK Universal Evaluation 3ea188aea7f48197a3b3cfdedfa74fee.md", + "raw_export_sha256": "eb2e584bd76aeea06c0dd03b3c8802b2340acf955e1ea75bf7768ebf9d2ab34e", + "archive": "notion/exports/20261007T102718466408Z/export-1.zip", + "pulled_at": "2026-10-07T10:27:18.466408+00:00" + }, + { + "title": "Legacy PUSH AGW SDK Doc v1", + "page_id": "d2d188aea7f4825cbcea81ef86eca607", + "notion_url": "https://app.notion.com/p/pushprotocol/PUSH-AGW-SDK-Doc-v1-d2d188aea7f4825cbcea81ef86eca607", + "local_file": "notion/legacy-agw-sdk-v1.md", + "pulled_on": "2026-10-07", + "observed_last_edited_date": "2026-09-22", + "authority": "Historical encoding and deployment reference", + "sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916", + "raw_export_sha256": "9e6569ef9b76d59cb411d65305d67333c6766abc2e9c80a35ae6f56f12f70916", + "pulled_at": "2026-10-07T10:27:18.466408+00:00", + "archive": "notion/exports/20261007T102718466408Z/export-2.zip", + "export_entry": "Private & Shared/PUSH AGW SDK Doc - v1 d2d188aea7f4825cbcea81ef86eca607.md" + }, + { + "title": "AGW Address Book PC Donut", + "page_id": "3d1188aea7f480ddbb4af6d0efb211e6", + "notion_url": "https://app.notion.com/p/pushprotocol/AGW-Address-Book-PC-Donut-3d1188aea7f480ddbb4af6d0efb211e6", + "local_file": "notion/agw-address-book-donut-2026-09-04.md", + "pulled_on": "2026-10-07", + "observed_last_edited_date": "2026-09-04", + "authority": "Historical deployment", + "sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742", + "raw_export_sha256": "5c5017d6b4a58af0fa8854ef550b054c1f33d57a812ea51a16f31f7c33e79742", + "pulled_at": "2026-10-07T10:27:18.466408+00:00", + "archive": "notion/exports/20261007T102718466408Z/export-3.zip", + "export_entry": "Private & Shared/AGW Address Book - PC Donut 3d1188aea7f480ddbb4af6d0efb211e6.md" + }, + { + "title": "Agentic wallet flow updated", + "page_id": "3d1188aea7f4801f9cb3fbd9318ec536", + "notion_url": "https://app.notion.com/p/pushprotocol/agentic_wallet_flow-updated-3d1188aea7f4801f9cb3fbd9318ec536", + "local_file": "notion/agentic-wallet-flow-2026-09-07.md", + "pulled_on": "2026-10-07", + "observed_last_edited_date": "2026-09-07", + "authority": "Historical validator-based flow", + "sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0", + "raw_export_sha256": "d4a922fd1d33da5a7042f26053e8df0e496c3ccd4cb0044b0892948ac509c3a0", + "pulled_at": "2026-10-07T10:27:18.466408+00:00", + "archive": "notion/exports/20261007T102718466408Z/export-4.zip", + "export_entry": "Private & Shared/agentic_wallet_flow ( updated ) 3d1188aea7f4801f9cb3fbd9318ec536.md" + }, + { + "title": "AGW Presets proposal and rules", + "page_id": "3f8188aea7f48020a9f0d10ea5325467", + "notion_url": "https://app.notion.com/p/pushprotocol/AGW-Presets-proposal-and-rules-3f8188aea7f48020a9f0d10ea5325467", + "local_file": "notion/agw-presets-proposal-and-rules.md", + "pulled_on": "2026-10-15", + "observed_last_edited_date": "2026-10-13", + "authority": "Preset proposal; testnet-only scope confirmed by user", + "sha256": "bdbf56ceaad6a46cc7f71286e2094cd698b671a7e1fa77acac121a3587e4a4f4", + "archive": "research/preset-catalog-2026-10-15/notion-export.zip" + } + ], + "last_refresh_at": "2026-10-07T10:27:18.466408+00:00", + "latest_partial_refresh": "2026-10-12: pages 1 and 5 only; other pages retain their individual pull dates." +} diff --git a/plan/agw/source-status-2026-10-03.json b/plan/agw/source-status-2026-10-03.json new file mode 100644 index 00000000..9f1d3a14 --- /dev/null +++ b/plan/agw/source-status-2026-10-03.json @@ -0,0 +1,14 @@ +{ + "date": "2026-10-03", + "agw_branch": "pushAgenticWallet_v3", + "agw_commit": "e704d5b58fd1d30ce02bc0ad74dccfbdb37804f9", + "agw_remote_checked": "GitHub branch API", + "notion_last_full_export": "2026-10-03T07:53:10.278902+00:00", + "notion_new_export": "success: 12 checked, 2 changed", + "core_gateway_new_remote_refresh": "unavailable; retain prior pins", + "messages_sent": false, + "notion_changed_pages": [ + "3e9188aea7f4813aa31fc95ceb4e684d", + "3e9188aea7f481cf8e8de324956549b9" + ] +} diff --git a/plan/marketplace/.gitattributes b/plan/marketplace/.gitattributes new file mode 100644 index 00000000..dbf59a60 --- /dev/null +++ b/plan/marketplace/.gitattributes @@ -0,0 +1,4 @@ +# Preserve imported source and native exports byte-for-byte, including whitespace. +notion/** -whitespace +contracts/** -whitespace +research/**/*.log -whitespace diff --git a/plan/marketplace/README.md b/plan/marketplace/README.md new file mode 100644 index 00000000..a00c27b8 --- /dev/null +++ b/plan/marketplace/README.md @@ -0,0 +1,31 @@ +# Agentic marketplace SDK planning + +Updated October 20, 2026. **SDK-only work is complete for the current EVM v2 scope:** see [readiness and external boundaries](sdk-readiness.md) and [coverage/acceptance](implementation-status.md). 28 of the 29 named APIs are implemented; `job.verify` awaits compatible contracts. Real token deposits, origin bridging and native/AGW payouts pass live. The initial contract-only research below remains history. No package was published. + +**Build against deployed UniversalMarketplace v2, pinned at `sdk-iteration-v1@443b4e2dd9ca5dd9ffc8efebdfcecd619dd66c47`.** The six supplied Notion pages were exported again through signed-in Chrome, and their visible discussion panels were reviewed. The older marketplace pages in `plan/agw/notion` remain historical. + +## Start here + +| Document | Purpose | +| --- | --- | +| [SDK development history](../SDK-CHANGELOG.md) | Running checkpoints, decisions, validation and Git delivery on feat/agw-sdk-v4 | +| [Implementation status](implementation-status.md) | Implemented SDK methods, explicit placeholders, current CEA mismatch and passing local/live coverage | +| [Verified baseline](current-baseline.md) | Deployment, capabilities, exact wire, and shipped versus future behavior | +| [Source inventory](SOURCES.md) | Fresh exports, immutable contract pins, comments and source priority | +| [Spec/contract gaps](analysis/spec-and-contract-gaps.md) | Concrete mismatches, ownership and effect on delivery | +| [Mutability and payment analysis](analysis/mutability-and-payment.md) | Answers to the supplied M4 / M6 / K-12 questions | +| [Implementation plan](implementation-plan.md) | SDK surfaces, module boundaries, sequence and acceptance requirements | +| [Questions to share](questions.md) | Questions for Zaryab, Harsh and the evaluator team; drafts only | +| [Validation](research/2026-10-20/validation.md) | Reproduced tests, read-only RPC checks, limits and commands | +| [Current Notion discussions](research/2026-10-20/notion-discussions.md) | Author/date/context, separate from exported page bodies | + +## Main conclusions + +- The deployed stack supports card management, one card per provider, one active marketplace job per wallet, v6 multi-asset sessions and pinned agent approvals. Opening deploys/reuses the wallet, grants rules and creates an **Open** job. It moves no funds. +- Payment is currently **pUSDC only**. The evaluator is an EOA; automated baseline, criteria replacement, verification and rating are not live capabilities. +- Page 8 retires `client.evaluation`. Plan `client.market`, `client.job`, `PushChain.utils.market`, `PushChain.utils.job`, and vocabulary under `PushChain.CONSTANTS.AGENTIC`. +- The evaluator source linked by Nilesh's October 16 comment is **wire-incompatible** with deployed marketplace v2, including different enum ordinals. Align contracts before automatic evaluation; never combine these encoders implicitly. +- The deployed card-rule struct has **no `approvals[]`**. Page 6 still describes the earlier owner-approval design. The SDK follows deployed v2: deposit moves principal/fee/PC, while the agent has pinned approval calls in its granted permissions. +- Kernel cancellation releases the marketplace slot but leaves AGW permissions enabled. Independent fork checks examine that behavior and an existing owner-batch cleanup path. + +Current SDK validation is linked from [implementation status](implementation-status.md); the earlier contract-only results remain in [validation.md](research/2026-10-20/validation.md). Dated source snapshots are unchanged. diff --git a/plan/marketplace/SOURCES.md b/plan/marketplace/SOURCES.md new file mode 100644 index 00000000..e14d6107 --- /dev/null +++ b/plan/marketplace/SOURCES.md @@ -0,0 +1,34 @@ +# Sources and refresh procedure + +## Authority and freshness + +For actual network behavior use pinned RPC evidence plus reproduced deployment source/ABIs. For intended SDK/product behavior use current Notion decisions and their dated comments; report contradictions instead of treating deployed behavior as automatic approval for a public API change. The user's pasted announcement confirms the v2 rollout and explicitly defers open/future features. Archived `plan/agw` marketplace drafts are historical. + +| Read order | Current page | Local source | +| --- | --- | --- | +| 2 | [Marketplace contract](https://app.notion.com/p/3e9188aea7f48118b90ac9b267496295) | [Export](notion/2-universal-marketplace.md) | +| 6 | [Marketplace SDK](https://app.notion.com/p/3ea188aea7f481e2961ed97129f3a4e6) | [Export](notion/6-sdk-universal-marketplace.md) | +| 3 | [Kernel and hook](https://app.notion.com/p/3e9188aea7f48188a838c3a740d8c858) | [Export](notion/3-8183-job-kernel-and-hook.md) | +| 7 | [Job SDK](https://app.notion.com/p/3ea188aea7f481e0a137f5a896723376) | [Export](notion/7-sdk-8183-job.md) | +| 4 | [Evaluation](https://app.notion.com/p/3e9188aea7f4817bb03ef4c78c883f8b) | [Export](notion/4-universal-evaluation.md) | +| 8 | [Evaluation SDK placeholder](https://app.notion.com/p/3ea188aea7f48197a3b3cfdedfa74fee) | [Export](notion/8-sdk-evaluation-placeholder.md) | + +All six were freshly downloaded on October 20 using Notion's Markdown & CSV export of the stack index with subpages. [Raw bundle](research/2026-10-20/notion-export.zip), [hashes and export entries](research/2026-10-20/notion-source-manifest.json). Raw bundle also contains the overview and AGW pages; only the six requested pages were imported here. No earlier AGW snapshots were overwritten. Original exported relative links are preserved as evidence and may point to unimported filenames; use the table above for navigation. + +Page exports **exclude comments**. Current All discussions panels on pages 2, 6, 3, 7 and 4 were separately read; page 8 exposes no Comments button in its current placeholder state. [Discussion observations](research/2026-10-20/notion-discussions.md) are paraphrases with author/date/context, not an exhaustive resolved-thread archive. No comments were posted, resolved or edited. + +## Immutable code sources + +- [Marketplace deployment branch, exact pin](https://github.com/pushchain/push-chain-core-contracts/tree/443b4e2dd9ca5dd9ffc8efebdfcecd619dd66c47). Includes [address book](contracts/docs/addresses/push_donut_universal_marketplace.md), [README](contracts/docs/universalmarketplace/README.md), [reference](contracts/docs/universalmarketplace/reference.md), [criteria guide](contracts/docs/universalmarketplace/criteria.md), sources, deployment script and tests. +- [Selected snapshot manifest](research/2026-10-20/contract-source-manifest.json): exact Git file hashes. `contracts/` is a reference subset; the test workspace is a separate full archive. Generated ABIs are in `contracts/abi` and have a separate manifest. +- [Pinned dependency revisions](research/2026-10-20/dependency-pins.json), including AGW `ffd567d`. Dependencies were archived at their actual submodule pins; the sibling repository's active branch was not checked out or changed. Dependency symlinks are omitted from the isolated archive. +- [Evaluator source linked in Nilesh's October 16 comment](https://github.com/pushchain/push-chain-core-contracts/blob/8059817591cca16c59f1cc154f475f51e1736a67/src/agentic-commerce-8183/libraries/JobSpecTypes.sol): [local types](research/2026-10-20/evaluator-8059817/JobSpecTypes.sol), [local evaluator](research/2026-10-20/evaluator-8059817/UniversalEvaluator.sol). These are comparison sources, **not** the deployed marketplace schema or proof of evaluator deployment. Page 7 also links older evaluator revision `4391181`; the later `8059817` source was read for current API differences. + +## Repeatable review + +1. Export the stack index with subpages again; retain ZIP and hashes. Match pages by stable ID. Keep comments separate. +2. Fetch `sdk-iteration-v1`; record full SHA before analysis and recheck remote head before sharing questions. Never save authenticated remote URLs in evidence. +3. Archive the exact source and pinned dependencies into an isolated workspace. Do not switch the SDK or sibling contract working trees. +4. Run unfunded unit/fuzz, explicitly scoped invariants and read-only fork tests. Preserve exit codes, skips, fork blocks and mock-versus-real scope. +5. Run the included read-only live probe and runtime comparator. Current scripts write October 20 evidence; use a new dated directory for a later review instead of overwriting this baseline. +6. Reconcile docs/code/observations in the gap register and remove questions already answered by newer evidence. Keep product choices distinct from SDK-owned implementation details. diff --git a/plan/marketplace/analysis/mutability-and-payment.md b/plan/marketplace/analysis/mutability-and-payment.md new file mode 100644 index 00000000..b99f20b3 --- /dev/null +++ b/plan/marketplace/analysis/mutability-and-payment.md @@ -0,0 +1,52 @@ +# M4 mutability and M6 / K-12 payment analysis + +October 20. This answers the questions in the user's supplied team discussion, checked against fresh Notion bodies/comments and deployment source. Recommendations below are proposals, not new product decisions. + +## M4: what the design says versus what exists + +The page-body understanding is substantially right: a provider-authorized replacement is proposed while Open, the client accepts at fund, and `origin`, `allowedMutability` and timing restrictions survive. The original page does not provide a client proposal route even though CLIENT/BOTH exists and setBudget is provider-only. + +**Current deployed v2 does none of the replacement workflow.** The builder copies the flag; the interim RulesBindingHook only processes fund's rulesId; the evaluator is an EOA. A setBudget payload does not replace the kernel's description or establish evaluator state. A non-NONE flag is not an implemented permission system. The independent review case registers BOTH, passes arbitrary replacement bytes to setBudget, observes the original description unchanged and funds successfully. + +The later evaluator source linked by Nilesh does contain a different client-fund replacement design in its type comments, but also a different wire, enum order and hook contract assumptions. It cannot resolve the deployed API by inference. Marketplace NONE=0 while that evaluator NONE=1 and BOTH=0 is a particularly dangerous ordinal mismatch. Never send bytes across those profiles on the assumption that matching enum names imply matching ABI. + +### Is it needed for the first release? + +Recommend retaining the schema field and requiring **NONE in the initial marketplace authoring flow**, pending Harsh's explicit decision. Parameterized templates already handle expected input variation. For a genuinely changed agreement, cancel the Open job, revoke its permissions, preview a new job and sign again. Do not describe cancel as revocation unless that cleanup actually happened. + +This is an SDK/product restriction unless enforced on-chain too: existing deployed contracts accept non-NONE templates. It is not a security guarantee against arbitrary direct callers. To guarantee immutable card criteria at protocol level, a compatible hook/evaluator or marketplace registration/open guard must enforce NONE. + +### The same-price front-run is real for the proposed mutable workflow + +`expectedBudget` only commits a number. If the future evaluator freezes its current standing proposal without checking what the funding client reviewed, the provider can replace criteria at the same price before fund executes. A last-moment SDK reread/simulation does not close a mempool race. + +The example's exact payout depends on the actual checks: changing only a rate threshold does not remove an independent “deposit at least 499 USDC” check if both are required. A whole replacement with weaker/removable checks can still make the attack work. The core issue is accepting an uncommitted spec, regardless of the example's arithmetic. + +### A complete later solution + +1. Give a quote/proposal a canonical identity, at minimum `keccak256(exactEncodedJobSpec)`, optionally a monotonically increasing quote revision. Keep marketplace/version/provider/client/kernel/job identity in the checked context. +2. The client reviews and authorizes **both the exact expected budget and exact expected spec hash/revision**. Do not silently refresh either when sending. The token is already immutable in the current single-token kernel; a later per-job token must be part of that accepted context too. +3. During fund, before acceptance/escrow commits, the hook compares the supplied expected hash/revision with the standing spec that will actually be frozen. Any mismatch reverts the entire transaction. Freeze those exact bytes atomically; no mutation after funding. +4. Authenticate proposals against the original allowedMutability. For CLIENT/BOTH, define an explicit authenticated client route: a dedicated proposal call, or a replacement submitted by the client in fund. Do not allow the provider to impersonate a client proposal through provider-only setBudget. Preserve origin/flag and validate complete replacement timing/structure. +5. Version the hook payload and capability. Today's RulesBindingHook **requires exactly 32 bytes**, so appending a hash to current `abi.encode(rulesId)` will revert. This requires compatible hook/evaluator delivery; it is not an SDK-only patch. A versioned payload might include rulesId, expectedSpecHash and proposal revision. Kernel signature can remain unchanged if its hooks enforce this through optParams. +6. Test same-price and changed-price front-runs, stale revisions, client/provider authorization, immutable fields, timing, rollback, replay, alternate hooks and terminal-state writes. SDK checks improve feedback; the on-chain atomic comparison supplies the protection. + +## M6 / K-12: present answer + +The requested end state is reasonable: each card chooses a token and every job's escrow/payout/refund uses that immutable token. Adding that token to createJob and the stored Job is a Push extension to the presently deployed ABI. The current kernel has one token from initialize and scalar totalEscrowed; a card label alone cannot change it. + +**The rollout has already chosen the interim path:** v2 registration/update rejects every card token except the kernel's actual pUSDC. No K-12 decision is needed to start this SDK phase. Read the deployed token and explicitly reject unsupported user input; do not follow the stale instruction that an explicit mismatching token is simply ignored. + +Do not switch marketplace addresses to an unrelated multi-token/demo kernel. KERNEL is set once, and old jobs remain associated with the old kernel. Bind ABI, hook, evaluator, token and marketplace configuration as one verified deployment profile. + +### If K-12 is approved later + +- Add token to creation and immutable per-job storage; use the job token in funding, provider/evaluator/platform payout, refunds and rescue accounting. Track escrow liabilities per token. Preserve old storage layout and define old-job migration/reads rather than reinterpreting existing slots. +- Keep a capability-specific createJob encoder. The token must be inside the createJob calldata hash authorized by OwnerIntent. Publish the new ABI/version and shared vectors together; no speculative two-format signing now. +- A curated admin allowlist is a reasonable first policy, with events and clear treatment of already-open/funded jobs when a token is delisted. Always permit settlement/refund of existing liabilities. An allowlist alone is not proof of safe ERC-20 behavior: validate exact received amounts or explicitly exclude fee-on-transfer/rebasing assets, and test reentrancy and unusual token failures. +- “PC” needs clarification: the current kernel is ERC-20-only. Native PC escrow is not accomplished by passing address(0); either choose a supported wrapped-PC ERC-20 or design payable/native accounting separately. +- Upgrade/redeploy the kernel plus compatible marketplace/hook wiring once the choice is final. Existing addresses and signed plans remain tied to their original deployment. Old signatures must fail closed on an incompatible new path. + +## Adjacent funding issue already present + +Card providerFee is a reference, not a kernel constraint. The independent test funds at three times the card's providerFee when the client supplies that exact larger expectedBudget. Therefore the page's “read current budget” convenience must not become silent price acceptance. For an initial fixed-card-price UX, fund against the **opened card version's reviewed providerFee** and reject a different current budget. For negotiation, expose an explicit reviewed quote with expectedBudget. The source makes either possible; product must choose the public behavior. diff --git a/plan/marketplace/analysis/spec-and-contract-gaps.md b/plan/marketplace/analysis/spec-and-contract-gaps.md new file mode 100644 index 00000000..e33bd97f --- /dev/null +++ b/plan/marketplace/analysis/spec-and-contract-gaps.md @@ -0,0 +1,31 @@ +# Spec, deployment and SDK gaps + +October 20, 2026. **P0** blocks automatic-evaluation integration; **P1** affects a promised behavior or safe transaction construction; **P2** is a bounded SDK design/detail. A finding is not automatically a request for a contract change. Existing deployed behavior can support a smaller explicit first release. + +| ID | Priority | Evidence / mismatch | Disposition and owner | +| --- | --- | --- | --- | +| W01 | P0 for automatic evaluation | [Deployed types](../contracts/src/agentic-commerce-8183/libraries/JobSpecTypes.sol) versus [evaluator `8059817`](../research/2026-10-20/evaluator-8059817/JobSpecTypes.sol): top-level order differs; Read gains `at`; Check becomes left/right arrays; Logic has CHECK leaves; NONE/BOTH and logic enum ordinals differ. [Controlled vectors](../research/2026-10-20/wire-comparison.json) do not cross-decode. | Zaryab + Nilesh/Aman: choose one shared package/pin and matching marketplace builder/hook/evaluator. SDK may implement deployed v2 card/open/manual-job flow now, but cannot advertise automatic evaluation. No implicit conversion of signed bytes. | +| W02 | P1 | [Page 6](../notion/6-sdk-universal-marketplace.md) still has `rules.approvals[]`, owner approval deposit steps, `skipApprovals`, and approve denial. [Deployed rules](../contracts/src/agentic-commerce-8183/libraries/Types.sol) omit approvals; [helper](../contracts/src/agentic-commerce-8183/UniversalMarketplaceRules.sol) allows pinned `approve`. | Confirm public SDK follows v2 D1. Remove or explicitly revise obsolete fields instead of serializing an old 5-field tuple or silently dropping requested approvals. Product/SDK API alignment; deployed capability already exists. | +| W03 | P1, future feature | M4 flag is stored, but interim hook does not process proposals or freeze specs. Non-NONE templates can be registered/funded. Independent review test confirms arbitrary `setBudget.optParams` is ignored. | Recommend NONE authoring policy for initial marketplace delivery, subject to Harsh's decision. No mutability promises for this deployment. Future proposals require atomic expected-spec binding at fund; [analysis](mutability-and-payment.md). | +| W04 | P1, explicitly deferred | K-12 not implemented. `_validateCard` enforces `card.paymentToken == KERNEL.paymentToken()`. Kernel createJob has no token parameter and escrow is scalar. | Ship pUSDC capability profile without waiting for K-12. Reject mismatching explicit tokens; never silently ignore a caller's token. Future upgrade needs new ABI/deployment identity. | +| W05 | P1 | Open cancellation exists as `kernel.reject`, but page 7 omits a client cancel function and explicitly removes evaluatorOnly reject. Hook never revokes rules. Review fork proves cancel frees slot, old/new permissions both remain enabled after reopen. | Harsh: decide user-facing `job.cancel` and cleanup policy. Existing AGW owner batch can atomically reject + revoke the recorded rulesId; independently passed against real v6. Contract team still owns automatic provider/evaluator-triggered cleanup. Never equate kernel terminal state with revoked authority. | +| W06 | P1 contract/spec discrepancy | Page 3 says createJob hookable on Push. [Current createJob](../contracts/src/agentic-commerce-8183/AgenticCommerce.sol) is explicitly unhooked. | Zaryab/Aman: mark as deferred or deliver core change. Does not block deployed marketplace opening, and the evaluator design says it must not depend on this hook. Do not synthesize hook events. | +| W07 | P1 | Page 7 fund prose says read current stored budget, but also says marketplace funding passes the card's providerFee. Kernel checks only `expectedBudget`; independent test funds at 3× card fee when client supplies 3×. | Preserve the user's reviewed quote. Harsh: fixed card reference fee for first release, or explicit negotiated quote acceptance? Never replace an accepted expected amount with an arbitrary freshly read one. ProviderFee is not protocol-enforced. | +| W08 | P1 | Page 6 pure `universal.read.prepare` returns `{namespace,chainId,target,selector,args,outputs}` and preserves placeholders. Existing SDK has async `universal.prepareRead(subject, opts)` returning a funded request/preflight, query envelope and resultShape; no nested `.prepare` or evaluator `outputs` compiler. | SDK-owned reusable parser/query encoder plus explicit pure authoring adapter; confirm additive API naming with Harsh. Preserve existing read/prepareRead callers. Address sentinels need metadata/zero-word lowering before ABI encoding; existing viem address encoder cannot accept them unchanged. | +| W09 | P1 | Page 7 proposes snapshot/verify/status/watch evaluator facts, but live evaluator has zero code. Linked `8059817` implements `startSnapshot`, `verifyFromSubmit` (onlyHook), `sendReads`, `retrySnapshot`, `prefundCost`, etc., not the page's generic API. | Gate all evaluator paths by verified deployment and matching ABI. Unsupported calls fail before signing; absent baseline/verdict is unavailable, not PASS. Ask for compatible delivery rather than implementing against stale names. | +| W10 | P1 | Page 6 example defaults `relay=true` for external owners; its dated decision says client submits by default and relay is later. Typed OwnerIntent authorization plus client transaction submission may require two signing interactions. Non-EVM signers may lack EIP-712. | Follow dated client-submission decision; clarify whether “one signature” means one OwnerIntent or one total wallet prompt. Do not invent a relayer endpoint or claim external-origin coverage before ERC-1271/typed-signing tests. | +| W11 | P1 | `previewIntent` only requires an existing card and builds the intent/calldata; it does not call `_checkCardAndJob`, `_checkRules` or occupancy checks. | SDK preview must perform complete block-consistent preflight and local rules matching, then revalidate the exact plan before signing/sending. Preserve stale plan errors; never silently refresh and sign different content. | +| W12 | P1 | `deposit(jobId)` must recover the opened card version and principal. Marketplace retains only current card blobs plus job/card/version/rules mappings; `JobOpened` carries principal and version. Updates can happen before a later deposit. | SDK-owned historical snapshot resolver: retain validated plan or reconstruct exact version using logs/transaction input/historical reads. Verify hashes/version; block-end card reads alone can see a later same-block update. Never deposit using the latest card's changed amounts/calls. Expose recoverable failure if history is unavailable. | +| W13 | P2 | `jobType` bytes32 cannot be inverted to a string; decoded raw selectors do not recover function names; version/rating are uint256 but SDK draft uses number. | Keep canonical hash/raw selector/word positions, use verified optional metadata labels, and use bigint or checked safe conversion. Do not invent original names/ABI. | +| W14 | P2 | Page 6 says card/template authoring pure, yet token resolution may need network/source metadata. `decodeAgentCardRules` promises destination token addresses from stored PRC20s. | Reuse verified registry where deterministic; distinguish unresolved raw tokens and cached metadata. Decide/document what pure helper accepts. No network hidden in a synchronous helper or token alias guessing. | +| W15 | P2 | Registry has count, per-provider lookup and per-ID full view, no pagination/indexer. Job counter/getJob similarly walkable. Some events omit full blobs/deliverable. | Bounded concurrency, progress, block-consistent enumeration, explicit fromJobId, event cursor/deduplication and transaction-input recovery where needed. Record practical limits without adding an invented indexer service. | +| W16 | P2 | Live helper/kernel runtimes are the 1,000-run artifacts; README size table describes larger variants. Explorer source verification is absent per repo. | Source/runtime comparison now passes. Documentation correction only; no code/deployment drift established. Retain compiler/profile provenance and full error-library ABI (40 marketplace errors). | +| W17 | Scope boundary | Current cards are EVM destination only. Read schema is EVM shaped, current evaluator EOA, recurring jobs and verified ratings remain separate. | Keep out of initial capability claims. Existing AGW Solana capability does not imply Solana marketplace cards. Presets are permission templates, not offers, pricing or job criteria. | + +## Work that can proceed + +Verified deployment/ABI registry; card reads and provider writes; v2 card-rule codecs/markers; deployed JobSpec/template codecs with contract vectors; human-readable permission/criteria descriptions; local validation; intent/session composition and stale-plan checks; kernel create/quote/fund/submit/refund/status/list/watch; explicit manual-evaluator behavior; existing-read integration design. + +## Decisions to resolve before relevant surfaces are advertised + +Public approvals/deposit shape (W02), canonical automatic-evaluation wire (W01), mutability policy (W03), expected-budget policy (W07), cancel surface/cleanup (W05), pure-read helper shape (W08), and signing/relay promise (W10). These do not require stopping all SDK work or reopening already-delivered AGW functionality. diff --git a/plan/marketplace/contracts/abi/AgenticCommerce.json b/plan/marketplace/contracts/abi/AgenticCommerce.json new file mode 100644 index 00000000..0d2d3cac --- /dev/null +++ b/plan/marketplace/contracts/abi/AgenticCommerce.json @@ -0,0 +1,1312 @@ +[ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "BPS_DENOMINATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "EVALUATOR_GRACE_PERIOD", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MIN_EXPIRY_WINDOW", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "batchDetachHook", + "inputs": [ + { + "name": "jobIds", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "claimRefund", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "complete", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "reason", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "optParams", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "createJob", + "inputs": [ + { + "name": "provider", + "type": "address", + "internalType": "address" + }, + { + "name": "evaluator", + "type": "address", + "internalType": "address" + }, + { + "name": "expiredAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "description", + "type": "string", + "internalType": "string" + }, + { + "name": "hook", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "emergencyWithdraw", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "evaluatorFeeBP", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "fund", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expectedBudget", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "optParams", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getJob", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct IAgenticCommerce.Job", + "components": [ + { + "name": "client", + "type": "address", + "internalType": "address" + }, + { + "name": "status", + "type": "uint8", + "internalType": "enum IAgenticCommerce.JobStatus" + }, + { + "name": "provider", + "type": "address", + "internalType": "address" + }, + { + "name": "expiredAt", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "evaluator", + "type": "address", + "internalType": "address" + }, + { + "name": "hook", + "type": "address", + "internalType": "address" + }, + { + "name": "budget", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "description", + "type": "string", + "internalType": "string" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "paymentToken_", + "type": "address", + "internalType": "address" + }, + { + "name": "treasury_", + "type": "address", + "internalType": "address" + }, + { + "name": "admin_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "jobCounter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "paymentToken", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IERC20" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "platformFeeBP", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "platformTreasury", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "reject", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "reason", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "optParams", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "callerConfirmation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setBudget", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "optParams", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setEvaluatorFee", + "inputs": [ + { + "name": "feeBP", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setHookWhitelist", + "inputs": [ + { + "name": "hook", + "type": "address", + "internalType": "address" + }, + { + "name": "status", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setPlatformFee", + "inputs": [ + { + "name": "feeBP", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "treasury", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProvider", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "provider", + "type": "address", + "internalType": "address" + }, + { + "name": "optParams", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "submit", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deliverable", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "optParams", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalEscrowed", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "whitelistedHooks", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "BudgetSet", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "EmergencyWithdraw", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "EvaluatorFeePaid", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "evaluator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "EvaluatorFeeUpdated", + "inputs": [ + { + "name": "feeBP", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "HookDetached", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "hook", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "HookWhitelistUpdated", + "inputs": [ + { + "name": "hook", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "status", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "JobCompleted", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "evaluator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "reason", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "JobCreated", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "client", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "provider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "evaluator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "expiredAt", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "hook", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "JobExpired", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "JobFunded", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "client", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "JobRejected", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "rejector", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "reason", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "JobSubmitted", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "provider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "deliverable", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PaymentReleased", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "provider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PlatformFeePaid", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "treasury", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PlatformFeeUpdated", + "inputs": [ + { + "name": "feeBP", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "treasury", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProviderSet", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "provider", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Refunded", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "client", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AccessControlBadConfirmation", + "inputs": [] + }, + { + "type": "error", + "name": "AccessControlUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "neededRole", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "BudgetMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "ClientIsProvider", + "inputs": [] + }, + { + "type": "error", + "name": "EnforcedPause", + "inputs": [] + }, + { + "type": "error", + "name": "EvaluatorIsProvider", + "inputs": [] + }, + { + "type": "error", + "name": "ExpectedPause", + "inputs": [] + }, + { + "type": "error", + "name": "ExpiryTooShort", + "inputs": [] + }, + { + "type": "error", + "name": "FeesTooHigh", + "inputs": [] + }, + { + "type": "error", + "name": "GracePeriodActive", + "inputs": [] + }, + { + "type": "error", + "name": "HookNotWhitelisted", + "inputs": [] + }, + { + "type": "error", + "name": "InsufficientUnattributedBalance", + "inputs": [ + { + "name": "requested", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "available", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "InvalidHook", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidJob", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "ProviderNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "ReentrancyGuardReentrantCall", + "inputs": [] + }, + { + "type": "error", + "name": "SafeERC20FailedOperation", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "Unauthorized", + "inputs": [] + }, + { + "type": "error", + "name": "WrongStatus", + "inputs": [] + }, + { + "type": "error", + "name": "ZeroAddress", + "inputs": [] + } +] diff --git a/plan/marketplace/contracts/abi/JobSpecBuilder.json b/plan/marketplace/contracts/abi/JobSpecBuilder.json new file mode 100644 index 00000000..70a5ec8c --- /dev/null +++ b/plan/marketplace/contracts/abi/JobSpecBuilder.json @@ -0,0 +1,117 @@ +[ + { + "type": "function", + "name": "build", + "inputs": [ + { + "name": "jobSpecTemplate", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "ctx", + "type": "tuple", + "internalType": "struct BuildContext", + "components": [ + { + "name": "agw", + "type": "address", + "internalType": "address" + }, + { + "name": "principal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executeBy", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "settleWindow", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "params", + "type": "int256[]", + "internalType": "int256[]" + }, + { + "name": "origin", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "view" + }, + { + "type": "error", + "name": "FillOutOfBounds", + "inputs": [ + { + "name": "read", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fill", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ParamCountMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ParamOutOfRange", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "value", + "type": "int256", + "internalType": "int256" + } + ] + }, + { + "type": "error", + "name": "TargetOverflow", + "inputs": [ + { + "name": "check", + "type": "uint256", + "internalType": "uint256" + } + ] + } +] diff --git a/plan/marketplace/contracts/abi/RulesBindingHook.json b/plan/marketplace/contracts/abi/RulesBindingHook.json new file mode 100644 index 00000000..a4e6044a --- /dev/null +++ b/plan/marketplace/contracts/abi/RulesBindingHook.json @@ -0,0 +1,309 @@ +[ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "AGW_FACTORY", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "KERNEL", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SESSION_ENGINE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "activeJobOf", + "inputs": [ + { + "name": "agw", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "afterAction", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "agwOfJob", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "beforeAction", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "kernel_", + "type": "address", + "internalType": "address" + }, + { + "name": "agwFactory_", + "type": "address", + "internalType": "address" + }, + { + "name": "sessionEngine_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rulesOfJob", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RulesBound", + "inputs": [ + { + "name": "jobId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "agw", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "rulesId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AGWHasLiveJob", + "inputs": [ + { + "name": "agw", + "type": "address", + "internalType": "address" + }, + { + "name": "liveJobId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CallerIsNotAGW", + "inputs": [ + { + "name": "caller", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "CallerIsNotKernel", + "inputs": [ + { + "name": "caller", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidOptParams", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "RulesNotLive", + "inputs": [ + { + "name": "agw", + "type": "address", + "internalType": "address" + }, + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ZeroAddress", + "inputs": [] + } +] diff --git a/plan/marketplace/contracts/abi/UniversalMarketplace.json b/plan/marketplace/contracts/abi/UniversalMarketplace.json new file mode 100644 index 00000000..fe12eab2 --- /dev/null +++ b/plan/marketplace/contracts/abi/UniversalMarketplace.json @@ -0,0 +1,2290 @@ +[ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "AGW_FACTORY", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IAGWFactory" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "KERNEL", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IAgenticCommerce" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MODE_SINGLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "OPENJOB_LANE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint192", + "internalType": "uint192" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "PUSH_CHAIN_HASH", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "RULES", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IUniversalMarketplaceRules" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "activeJobOf", + "inputs": [ + { + "name": "agw", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "agentCardCount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "agentCardOf", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "agentCardVersion", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "agwOfJob", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "buildCreateJobCalldata", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "job", + "type": "tuple", + "internalType": "struct JobInputs", + "components": [ + { + "name": "principal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiredAt", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "executeBy", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "params", + "type": "int256[]", + "internalType": "int256[]" + } + ] + } + ], + "outputs": [ + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "executionCalldata", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "cardOfJob", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "cardVersionOfJob", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "ceaDeployment", + "inputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "ceaFactory", + "type": "address", + "internalType": "address" + }, + { + "name": "ceaProxyImpl", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "computeCEA", + "inputs": [ + { + "name": "agw", + "type": "address", + "internalType": "address" + }, + { + "name": "chainHash", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "disableAgentCard", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "evaluator", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAgentCard", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "v", + "type": "tuple", + "internalType": "struct AgentCardView", + "components": [ + { + "name": "card", + "type": "tuple", + "internalType": "struct AgentCard", + "components": [ + { + "name": "provider", + "type": "address", + "internalType": "address" + }, + { + "name": "jobType", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "metadataURI", + "type": "string", + "internalType": "string" + }, + { + "name": "metadataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainNamespace", + "type": "string", + "internalType": "string" + }, + { + "name": "providerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "paymentToken", + "type": "address", + "internalType": "address" + }, + { + "name": "principalMin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "principalMax", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minDuration", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "maxDuration", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "minExecuteWindow", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "settleWindow", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "active", + "type": "bool", + "internalType": "bool" + } + ] + }, + { + "name": "rules", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "jobSpecTemplate", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "version", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "verified", + "type": "bool", + "internalType": "bool" + }, + { + "name": "disabled", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAgentRating", + "inputs": [ + { + "name": "agent", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "hook", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "p", + "type": "tuple", + "internalType": "struct InitParams", + "components": [ + { + "name": "agwFactory", + "type": "address", + "internalType": "address" + }, + { + "name": "kernel", + "type": "address", + "internalType": "address" + }, + { + "name": "hook", + "type": "address", + "internalType": "address" + }, + { + "name": "evaluator", + "type": "address", + "internalType": "address" + }, + { + "name": "rules", + "type": "address", + "internalType": "address" + }, + { + "name": "admin", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isAgentCardDisabled", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isAgentCardVerified", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "openJob", + "inputs": [ + { + "name": "p", + "type": "tuple", + "internalType": "struct OpenJobParams", + "components": [ + { + "name": "cardId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cardVersion", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "job", + "type": "tuple", + "internalType": "struct JobInputs", + "components": [ + { + "name": "principal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiredAt", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "executeBy", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "params", + "type": "int256[]", + "internalType": "int256[]" + } + ] + }, + { + "name": "session", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "address" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + }, + { + "name": "intent", + "type": "tuple", + "internalType": "struct OwnerIntent", + "components": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "sessionHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "execCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "grantNonce", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "sig", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "label", + "type": "string", + "internalType": "string" + } + ] + } + ], + "outputs": [ + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "agw", + "type": "address", + "internalType": "address" + }, + { + "name": "rulesId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "previewIntent", + "inputs": [ + { + "name": "r", + "type": "tuple", + "internalType": "struct IntentRequest", + "components": [ + { + "name": "cardId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "job", + "type": "tuple", + "internalType": "struct JobInputs", + "components": [ + { + "name": "principal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiredAt", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "executeBy", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "params", + "type": "int256[]", + "internalType": "int256[]" + } + ] + }, + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "s", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "address" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "i", + "type": "tuple", + "internalType": "struct OwnerIntent", + "components": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "wallet", + "type": "address", + "internalType": "address" + }, + { + "name": "executor", + "type": "address", + "internalType": "address" + }, + { + "name": "index", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "sessionHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "mode", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "execCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonceKey", + "type": "uint192", + "internalType": "uint192" + }, + { + "name": "nonceSeq", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "grantNonce", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "deadline", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "signerChainId", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "registerAgentCard", + "inputs": [ + { + "name": "c", + "type": "tuple", + "internalType": "struct AgentCard", + "components": [ + { + "name": "provider", + "type": "address", + "internalType": "address" + }, + { + "name": "jobType", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "metadataURI", + "type": "string", + "internalType": "string" + }, + { + "name": "metadataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainNamespace", + "type": "string", + "internalType": "string" + }, + { + "name": "providerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "paymentToken", + "type": "address", + "internalType": "address" + }, + { + "name": "principalMin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "principalMax", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minDuration", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "maxDuration", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "minExecuteWindow", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "settleWindow", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "active", + "type": "bool", + "internalType": "bool" + } + ] + }, + { + "name": "rules", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "jobSpecTemplate", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "cardId", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "callerConfirmation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeAgentCardVerification", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rulesOfJob", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setAgentCardActive", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "active", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setAgentRating", + "inputs": [ + { + "name": "agent", + "type": "address", + "internalType": "address" + }, + { + "name": "rating", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setCEADeployment", + "inputs": [ + { + "name": "chainHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "ceaFactory", + "type": "address", + "internalType": "address" + }, + { + "name": "ceaProxyImpl", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setEvaluator", + "inputs": [ + { + "name": "evaluator_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setHook", + "inputs": [ + { + "name": "hook_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "updateAgentCard", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "c", + "type": "tuple", + "internalType": "struct AgentCard", + "components": [ + { + "name": "provider", + "type": "address", + "internalType": "address" + }, + { + "name": "jobType", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "metadataURI", + "type": "string", + "internalType": "string" + }, + { + "name": "metadataHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "chainNamespace", + "type": "string", + "internalType": "string" + }, + { + "name": "providerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "paymentToken", + "type": "address", + "internalType": "address" + }, + { + "name": "principalMin", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "principalMax", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minDuration", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "maxDuration", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "minExecuteWindow", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "settleWindow", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "active", + "type": "bool", + "internalType": "bool" + } + ] + }, + { + "name": "rules", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "jobSpecTemplate", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "verifyAgentCard", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "cardVersion", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "version", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "pure" + }, + { + "type": "event", + "name": "AgentCardDisabled", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AgentCardRegistered", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "provider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "jobType", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "chainNamespace", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "rulesHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "jobSpecHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "metadataHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "providerFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AgentCardStatusChanged", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "active", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AgentCardUpdated", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "version", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "rulesHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "jobSpecHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "metadataHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "providerFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AgentCardVerificationRevoked", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AgentCardVerified", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "version", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AgentRatingSet", + "inputs": [ + { + "name": "agent", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "rating", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CEADeploymentSet", + "inputs": [ + { + "name": "chainHash", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "ceaFactory", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "ceaProxyImpl", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "EvaluatorUpdated", + "inputs": [ + { + "name": "evaluator", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "HookUpdated", + "inputs": [ + { + "name": "hook", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "JobOpened", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "agw", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "jobId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "rulesId", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "principal", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "cardVersion", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AGWMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AccessControlBadConfirmation", + "inputs": [] + }, + { + "type": "error", + "name": "AccessControlUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "neededRole", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "AgentCardAlreadyRegistered", + "inputs": [ + { + "name": "provider", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AgentCardDisabled", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AgentCardIdentityImmutable", + "inputs": [] + }, + { + "type": "error", + "name": "AgentCardInactive", + "inputs": [] + }, + { + "type": "error", + "name": "AgentCardVersionMismatch", + "inputs": [ + { + "name": "provided", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "current", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CallerIsNotProvider", + "inputs": [] + }, + { + "type": "error", + "name": "ChainNotSupported", + "inputs": [ + { + "name": "chainHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "EnforcedPause", + "inputs": [] + }, + { + "type": "error", + "name": "ExecuteByOutOfRange", + "inputs": [] + }, + { + "type": "error", + "name": "ExecutorMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ExpectedPause", + "inputs": [] + }, + { + "type": "error", + "name": "ExpiryOutOfRange", + "inputs": [] + }, + { + "type": "error", + "name": "HookNotWhitelisted", + "inputs": [] + }, + { + "type": "error", + "name": "IntentExecMismatch", + "inputs": [ + { + "name": "actualCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "IntentSessionMismatch", + "inputs": [ + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "IntentWalletMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "provided", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidAgentCard", + "inputs": [ + { + "name": "reason", + "type": "string", + "internalType": "string" + } + ] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "JobMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "PrincipalOutOfRange", + "inputs": [] + }, + { + "type": "error", + "name": "ProviderIsEvaluator", + "inputs": [] + }, + { + "type": "error", + "name": "ReentrancyGuardReentrantCall", + "inputs": [] + }, + { + "type": "error", + "name": "UnexpectedJobCount", + "inputs": [ + { + "name": "before", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "afterCount", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "WalletHasActiveJob", + "inputs": [ + { + "name": "agw", + "type": "address", + "internalType": "address" + }, + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "WalletOwnerMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ZeroAddress", + "inputs": [] + } +] diff --git a/plan/marketplace/contracts/abi/UniversalMarketplaceErrors.json b/plan/marketplace/contracts/abi/UniversalMarketplaceErrors.json new file mode 100644 index 00000000..dd526ec2 --- /dev/null +++ b/plan/marketplace/contracts/abi/UniversalMarketplaceErrors.json @@ -0,0 +1,411 @@ +[ + { + "type": "error", + "name": "AGWMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ActionCount", + "inputs": [] + }, + { + "type": "error", + "name": "ActionsMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "AgentCardAlreadyRegistered", + "inputs": [ + { + "name": "provider", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AgentCardDisabled", + "inputs": [ + { + "name": "cardId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AgentCardIdentityImmutable", + "inputs": [] + }, + { + "type": "error", + "name": "AgentCardInactive", + "inputs": [] + }, + { + "type": "error", + "name": "AgentCardVersionMismatch", + "inputs": [ + { + "name": "provided", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "current", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AgentMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "AssetCountMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AssetMismatch", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "CallerIsNotProvider", + "inputs": [] + }, + { + "type": "error", + "name": "ChainMismatch", + "inputs": [ + { + "name": "i", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ChainNotSupported", + "inputs": [ + { + "name": "chainHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "EnvelopeVersionMismatch", + "inputs": [ + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ExecuteByOutOfRange", + "inputs": [] + }, + { + "type": "error", + "name": "ExecutorMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ExpectedCEAMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ExpiryMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "ExpiryOutOfRange", + "inputs": [] + }, + { + "type": "error", + "name": "FillOutOfBounds", + "inputs": [ + { + "name": "read", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "fill", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "GasCapMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "HookNotWhitelisted", + "inputs": [] + }, + { + "type": "error", + "name": "IntentExecMismatch", + "inputs": [ + { + "name": "actualCalldataHash", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "IntentSessionMismatch", + "inputs": [ + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "IntentWalletMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "provided", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "InvalidAgentCard", + "inputs": [ + { + "name": "reason", + "type": "string", + "internalType": "string" + } + ] + }, + { + "type": "error", + "name": "JobMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "ParamCountMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ParamOutOfRange", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "value", + "type": "int256", + "internalType": "int256" + } + ] + }, + { + "type": "error", + "name": "PinMismatch", + "inputs": [ + { + "name": "call", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "PolicyShape", + "inputs": [ + { + "name": "i", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "PrincipalCapMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "PrincipalOutOfRange", + "inputs": [] + }, + { + "type": "error", + "name": "ProviderIsEvaluator", + "inputs": [] + }, + { + "type": "error", + "name": "TargetOverflow", + "inputs": [ + { + "name": "check", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "UnexpectedJobCount", + "inputs": [ + { + "name": "before", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "afterCount", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "WalletHasActiveJob", + "inputs": [ + { + "name": "agw", + "type": "address", + "internalType": "address" + }, + { + "name": "jobId", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "WalletOwnerMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ZeroAddress", + "inputs": [] + } +] diff --git a/plan/marketplace/contracts/abi/UniversalMarketplaceRules.json b/plan/marketplace/contracts/abi/UniversalMarketplaceRules.json new file mode 100644 index 00000000..714dfff3 --- /dev/null +++ b/plan/marketplace/contracts/abi/UniversalMarketplaceRules.json @@ -0,0 +1,318 @@ +[ + { + "type": "function", + "name": "checkRulesMatchCard", + "inputs": [ + { + "name": "cardRules", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "session", + "type": "tuple", + "internalType": "struct Session", + "components": [ + { + "name": "sessionValidator", + "type": "address", + "internalType": "address" + }, + { + "name": "sessionValidatorInitData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "userOpPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "erc7739Policies", + "type": "tuple", + "internalType": "struct ERC7739Data", + "components": [ + { + "name": "allowedERC7739Content", + "type": "tuple[]", + "internalType": "struct ERC7739Context[]", + "components": [ + { + "name": "appDomainSeparator", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "contentNames", + "type": "string[]", + "internalType": "string[]" + } + ] + }, + { + "name": "erc1271Policies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "actions", + "type": "tuple[]", + "internalType": "struct ActionData[]", + "components": [ + { + "name": "actionTargetSelector", + "type": "bytes4", + "internalType": "bytes4" + }, + { + "name": "actionTarget", + "type": "address", + "internalType": "address" + }, + { + "name": "actionPolicies", + "type": "tuple[]", + "internalType": "struct PolicyData[]", + "components": [ + { + "name": "policy", + "type": "address", + "internalType": "address" + }, + { + "name": "initData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + }, + { + "name": "permitERC4337Paymaster", + "type": "bool", + "internalType": "bool" + } + ] + }, + { + "name": "ctx", + "type": "tuple", + "internalType": "struct SessionContext", + "components": [ + { + "name": "agent", + "type": "address", + "internalType": "address" + }, + { + "name": "chainHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "principal", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "expiredAt", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "expectedCEA", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "validateAgentCardRules", + "inputs": [ + { + "name": "rules", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "pure" + }, + { + "type": "error", + "name": "ActionCount", + "inputs": [] + }, + { + "type": "error", + "name": "ActionsMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "AgentMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "AssetCountMismatch", + "inputs": [ + { + "name": "expected", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AssetMismatch", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ChainMismatch", + "inputs": [ + { + "name": "i", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "EnvelopeVersionMismatch", + "inputs": [ + { + "name": "actual", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ExpectedCEAMismatch", + "inputs": [ + { + "name": "expected", + "type": "address", + "internalType": "address" + }, + { + "name": "actual", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ExpiryMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "GasCapMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidAgentCard", + "inputs": [ + { + "name": "reason", + "type": "string", + "internalType": "string" + } + ] + }, + { + "type": "error", + "name": "PinMismatch", + "inputs": [ + { + "name": "call", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pin", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "PolicyShape", + "inputs": [ + { + "name": "i", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "PrincipalCapMismatch", + "inputs": [] + } +] diff --git a/plan/marketplace/contracts/docs/addresses/push_donut_universal_marketplace.md b/plan/marketplace/contracts/docs/addresses/push_donut_universal_marketplace.md new file mode 100644 index 00000000..e0702612 --- /dev/null +++ b/plan/marketplace/contracts/docs/addresses/push_donut_universal_marketplace.md @@ -0,0 +1,33 @@ +# Push Donut (Chain ID: 42101): UniversalMarketplace stack + +Deployed 2026-10-20 with `scripts/agentic-commerce-8183/DeployUniversalMarketplace.s.sol` (last tx in block 24443653). +Self-contained stack: its own 8183 kernel on pUSDC, bound to AGW v6. Fees are zero. + +## Contracts + +| Contract | Proxy | Implementation | ProxyAdmin | +|---|---|---|---| +| AgenticCommerce (kernel) | `0x977cf1AC973E9eC4332791d531507575006157Ed` | `0x1d631E9d0E0A7a7423743c3076054C784Af8FA40` | `0x5F5Ef9dBbC31d59a28626d1F913A35B5b6eA0Cb9` | +| RulesBindingHook | `0xDe7A94e510b6C571DE7880d441349689F73A32b3` | `0x58bd6951b653B5028Aa77B4904E83Df668Bcef7E` | `0xBa96c7FB588aC17aba00c7aa920E282c088B1746` | +| UniversalMarketplace | `0x9071ebE01B75123A91e88eB6ec4BF163F3fE9BF4` | `0xd683545f84698dF4341b0031C892C53384FF30be` | `0xb7D9315813fE87A13833871ce673073dd4B8c8af` | +| UniversalMarketplaceRules (not a proxy) | `0x5b98A8E0df5b918DF76cD2BE84bA7995B39dfd44` | | | +| JobSpecBuilder (linked library) | `0x2de1e3F053b0bBa0cE0C6953144534a0b055f59e` | | | + +## Roles and settings + +| Item | Value | +|---|---| +| Kernel + marketplace admin (`DEFAULT_ADMIN_ROLE`, `ADMIN_ROLE`), owner of every ProxyAdmin | `0x1afC81396f1bb36F91f74506284952b81e4bd47c` | +| Marketplace-wide evaluator (EOA, completes or rejects by hand) | `0x1afC81396f1bb36F91f74506284952b81e4bd47c` | +| Kernel payment token (pUSDC, `USDC.eth`, 6 decimals) | `0x7A58048036206bB898008b5bBDA85697DB1e5d66` | +| Kernel platform treasury | `0x2348286F118810521497ADBbF2615D1328aa1630` | +| AGW v6 factory / session engine | `0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc` / `0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d` | + +## Supported card chains (`setCEADeployment`) + +| Chain | Namespace | CEAFactory (proxy) | CEA proxy implementation | +|---|---|---|---| +| Ethereum Sepolia | `eip155:11155111` | `0x8ED594A83301FEc545fC6c19fc12cF7111777029` | `0x0a4F7be62B56830070266be81114edB93e68DA09` | +| Base Sepolia | `eip155:84532` | `0x0A75ca7736b488Eb41675ADc3b3156BACF659F55` | `0x6c9Cfef12155bEE91ecD6d0C8f516cABA2890656` | +| Arbitrum Sepolia | `eip155:421614` | `0x88DC189275078Cf509E4Cc773F089c8ad07b7EA2` | `0x512d1B8C185a0Fd533a69f8973A3DD6513233009` | +| BSC Testnet | `eip155:97` | `0x3f1B16e0B072d472951C4563d29d3da6a3EE3Ce8` | `0x0ff5d8b7d9Ac3ee2Ad420e9b70Ed6Dc465f593e9` | diff --git a/plan/marketplace/contracts/docs/universalmarketplace/README.md b/plan/marketplace/contracts/docs/universalmarketplace/README.md new file mode 100644 index 00000000..c3c5b26f --- /dev/null +++ b/plan/marketplace/contracts/docs/universalmarketplace/README.md @@ -0,0 +1,847 @@ +# Universal Marketplace + +How the Universal Marketplace contracts work, end to end. Written for a reviewer: every guarantee is tied to the +code that enforces it, and every assumption the code makes about something else is stated. + +| Doc | Contents | +|---|---| +| **This file** | What the marketplace is, its parts, the agent card lifecycle, `openJob` step by step, the rules check, the criteria, admin powers, upgradeability, trust model, limitations, tests, reviewer checklist | +| [`reference.md`](./reference.md) | Every function, event, error, registration reason, storage slot and constant, one by one | +| [`criteria.md`](./criteria.md) | The `jobSpecTemplate` format, how a job's `JobSpec` is built from it, and two worked examples | +| [`../addresses/push_donut_universal_marketplace.md`](../addresses/push_donut_universal_marketplace.md) | The live Push Donut deployment: every proxy, implementation, ProxyAdmin, role and supported chain | + +Code as of branch `sdk-iteration-v1`, commit `7cd2d7b` (marketplace v2, PRD 12). Deployed on Push Donut on 2026-10-20 +(§12.5). + +--- + +## Contract locations + +| Contract | Path | Kind | +|---|---|---| +| **UniversalMarketplace** | [`src/agentic-commerce-8183/UniversalMarketplace.sol`](../../src/agentic-commerce-8183/UniversalMarketplace.sol) | Upgradeable (TransparentUpgradeableProxy), stateful. The only contract users and providers call. `version()` = `"2.0.0"`. | +| **UniversalMarketplaceRules** | [`src/agentic-commerce-8183/UniversalMarketplaceRules.sol`](../../src/agentic-commerce-8183/UniversalMarketplaceRules.sol) | Stateless, `pure`, not upgradeable. The rules side of a card: registration guards and rules = card at `openJob`. | +| **JobSpecBuilder** | [`src/agentic-commerce-8183/libraries/JobSpecBuilder.sol`](../../src/agentic-commerce-8183/libraries/JobSpecBuilder.sol) | External library, linked into the marketplace and called by `DELEGATECALL`. Builds each job's criteria. | +| Types | [`src/agentic-commerce-8183/libraries/Types.sol`](../../src/agentic-commerce-8183/libraries/Types.sol) | Every struct and enum of the package (file-level), and the markers `MARKER_WALLET` / `MARKER_PRINCIPAL`. | +| Errors | [`src/agentic-commerce-8183/libraries/Errors.sol`](../../src/agentic-commerce-8183/libraries/Errors.sol) | `UniversalMarketplaceErrors` (40 errors), `RulesBindingHookErrors`, `ERC8183HookErrors`. | +| JobSpecTypes | [`src/agentic-commerce-8183/libraries/JobSpecTypes.sol`](../../src/agentic-commerce-8183/libraries/JobSpecTypes.sol) | The built criteria (`JobSpec`): the wire format shared with the future UniversalHook and UniversalEvaluator. | +| IUniversalMarketplace | [`src/agentic-commerce-8183/interfaces/IUniversalMarketplace.sol`](../../src/agentic-commerce-8183/interfaces/IUniversalMarketplace.sol) | The marketplace's events and functions (banners UM_1–UM_5). | +| IUniversalMarketplaceRules | [`src/agentic-commerce-8183/interfaces/IUniversalMarketplaceRules.sol`](../../src/agentic-commerce-8183/interfaces/IUniversalMarketplaceRules.sol) | The rules helper's two functions (banner UMR_1). | +| AGW interfaces | [`interfaces/external/IAGW.sol`](../../src/agentic-commerce-8183/interfaces/external/IAGW.sol), [`IAGWFactory.sol`](../../src/agentic-commerce-8183/interfaces/external/IAGWFactory.sol), [`ISmartSession.sol`](../../src/agentic-commerce-8183/interfaces/external/ISmartSession.sol) | The SmartSession `Session` mirror and the AGW / factory / engine functions the package calls. AGW types are imported, not copied (§12.1). | + +Contracts the marketplace works with, but which are **not** part of it: + +| Contract | Where | Role | +|---|---|---| +| **AgenticCommerce** (the "kernel") | [`src/agentic-commerce-8183/AgenticCommerce.sol`](../../src/agentic-commerce-8183/AgenticCommerce.sol) | The ERC-8183 job kernel: jobs, budgets, escrow, payout. The marketplace only creates jobs on it (through the user's wallet). On Donut the marketplace uses **its own instance**, deployed with it on pUSDC (`0x977cf1AC973E9eC4332791d531507575006157Ed`), not the `marketplace_demo` kernel (§12.5). | +| **RulesBindingHook** | [`src/agentic-commerce-8183/hooks/RulesBindingHook.sol`](../../src/agentic-commerce-8183/hooks/RulesBindingHook.sol) | The interim 8183 hook every marketplace job is created with. At `fund` it binds the job to the wallet's live rules set and allows one live job per wallet. | +| **AGW + AGWFactory** | `push-agentic-wallets` repo (submodule [`lib/push-agentic-wallets`](../../lib/push-agentic-wallets)) | The user's agentic wallet (an ERC-7579 account with SmartSession) and its factory. Verifies the owner's signature. AGW v6 is deployed on Donut. | +| **UniversalRulesPolicy (URP)** | `push-agentic-wallets` repo | The SmartSession policy that enforces the agent's rules when the agent sends outbound calls through the gateway. | +| **CEAFactory** | destination chain (`src/cea/CEAFactory.sol` here) | Deploys each user's Chain Executor Account (CEA) on the destination chain. The marketplace only predicts CEA addresses. | +| UniversalHook, UniversalEvaluator (V2) | not compatible yet (§12.5) | The intended long-term hook and evaluator. Until they ship, jobs use RulesBindingHook and a Push-controlled evaluator address. | + +--- + +## 1 · What the marketplace is + +The Universal Marketplace is a registry of **agent cards** plus one entry point, **`openJob`**. + +- **An agent card** is a standing offer from one provider (an AI agent's address). Each provider has at most one + card. It covers one job type on one EVM execution chain. It says who the agent is, what it does, what it needs + permission to do there (the **rules**), and how "done" is judged (the **`jobSpecTemplate`**, the criteria + template). +- **`openJob`** is one relayed call. On a single signature from the user, it: + 1. deploys the user's agentic wallet (AGW) if needed; + 2. grants the AGW the card's rules, with the card's markers filled for this job, so the agent can act from it; + 3. creates an ERC-8183 job on the kernel, with the AGW as client, the card's provider as provider, the + marketplace's configured evaluator and hook, and **criteria built on-chain from the card**. + +What the marketplace deliberately does **not** do: + +| Not done | Where it happens instead | +|---|---| +| Move any funds | The user funds the AGW in a separate transaction. The provider prices the job with `setBudget`; the AGW funds it with `fund`. Both are kernel calls. | +| Grant token approvals as the owner | Approvals are the agent's: an `approve` is an allowed call the agent makes, with its spender and amount pinned by the card (D1, §6.3). | +| Judge whether the criteria make sense | Nobody, on-chain. The admin's **verified tag** is the review. | +| Evaluate the job | The job's evaluator (the UniversalEvaluator, once shipped). | +| Enforce the agent's rules at execution | The AGW's SmartSession engine and URP. | + +The marketplace never holds tokens or native PC. Tests `test_MS02_movesNoFunds` and the invariants +`MI02_marketplaceHoldsNothing` and `MI05_userBalanceNeverMovedByOpenJob` check this. + +--- + +## 2 · Glossary + +| Term | Meaning | +|---|---| +| **Provider / agent** | One address. It registers the card, is the 8183 job's `provider` (and fee recipient), and is the agent the rules authorise (`sessionValidatorInitData == abi.encode(provider)`). One card per provider (`agentCardOf`). | +| **User / owner** | The person opening a job. Signs one `OwnerIntent`; owns the AGW. | +| **AGW** | Agentic Wallet: the user's smart account, deployed by the AGW factory at an address derived from `(owner, index)`. The job's client. | +| **CEA** | Chain Executor Account: the AGW's account on the destination chain, at an address derived from the AGW (`computeCEA`). It is where the agent's outbound calls execute and where the criteria read balances. | +| **Agent card** | `AgentCard` (the listing) plus two blobs: `rules` and `jobSpecTemplate`. | +| **Rules** | On the card: `abi.encode(AgentCardRules)`, the assets with caps, the gas cap and the allowed calls with pins. At `openJob`: the SmartSession `Session` granted to the agent, whose one policy carries the AGW v6 envelope `abi.encode(uint16 ENVELOPE_VERSION, string chain, bytes body)` with `UniversalTerms` as body. `rulesId` is the engine's `permissionId`. | +| **Pin** | An AGW v6 `ArgPin{offset, op, value}` on an allowed call: the calldata word at `offset` must equal (`EQ`) or not exceed (`MAX`) `value`. | +| **Markers** | Two published `bytes32` constants a card may hold where a per-job value goes: `MARKER_WALLET` (the user's CEA on the card's chain, EQ pins only) and `MARKER_PRINCIPAL` (this job's principal, in pins and in the principal asset's caps). The signed session holds the filled values, never a marker (D2, D3). | +| **OwnerIntent** | The single owner-signed message (AGW type, imported). One signature authorises the wallet deploy, the rules grant and the `createJob` execution. | +| **`jobSpecTemplate`** | `abi.encode(JobSpecTemplate)`: the V2 `JobSpec` with holes. Stored on the card. Also called the criteria template. | +| **JobSpec** | The built criteria for one job: reads, checks, the `logic` tree, `allowedMutability`, `origin`, times. `abi.encode(JobSpec)` is the 8183 job's `description`. | +| **`logic`** | The job's pass logic: `Logic` steps, each combining checks and child steps with `ALL`, `ANY` or `AT_LEAST k`. Copied verbatim; its semantics are evaluator-owned. | +| **Card version** | 1 at registration, +1 per update. Bound into every job's criteria, so an intent signed against one version can't open a job on another. Recorded per job (`cardVersionOfJob`). | +| **Verified tag** | An admin label: "this card, at this version, was reviewed". A tag, not a gate. | +| **chainHash** | `keccak256` of a CAIP-2 string such as `"eip155:11155111"`. The key for chain configuration. | +| **`PUSH_CHAIN_HASH`** | `keccak256("eip155:" ‖ block.chainid)`: Push Chain itself. No card may name it. | + +--- + +## 3 · The parts and how they fit + +```mermaid +flowchart LR + Provider -- registerAgentCard / updateAgentCard --> MKT[UniversalMarketplace] + Relayer -- openJob --> MKT + MKT -- validateAgentCardRules / checkRulesMatchCard --> RULES[UniversalMarketplaceRules] + MKT -- DELEGATECALL build --> JSB[JobSpecBuilder] + JSB -. computeCEA .-> MKT + MKT -- predictWallet / deployWalletWithSig / ownerOf --> FACT[AGWFactory] + MKT -- grantRulesWithSig / executeWithSig --> AGW[User's AGW] + AGW -- createJob --> KERNEL[AgenticCommerce kernel] + MKT -- jobCounter / getJob / whitelistedHooks / paymentToken --> KERNEL + KERNEL -- beforeAction / afterAction --> HOOK[RulesBindingHook] +``` + +- **The marketplace** holds the cards and runs `openJob`. It is the `executor` named in the user's intent: the + factory and the wallet accept that intent only from it. +- **The rules helper** is pure logic, split out for the EIP-170 size limit. It validates a card's rules at + registration (R1–R17) and checks the user's session against the card at `openJob` (C1–C14). +- **JobSpecBuilder** is an external library. It turns the card's `jobSpecTemplate` plus the job's inputs into the + job's `JobSpec`. It runs in the marketplace's context, so it reads CEAs from the marketplace's own `computeCEA`. +- **The AGW** does the work that needs the owner's authority: it verifies the owner's signature, grants the rules, + and calls `createJob` itself, so the kernel records the AGW as the client. + +--- + +## 4 · The agent card + +### 4.1 What a card holds + +A card is three things stored on-chain together: + +1. **`AgentCard`**, the listing. Who: `provider`. What: `jobType`, `metadataURI` and `metadataHash` (off-chain + JSON with the name, summary, ABIs, criteria in words and param units). Where: `chainNamespace`, a full CAIP-2 + string `"eip155:"`, immutable after registration. Commercials: `providerFee` (reference price, in + `paymentToken`) and `paymentToken`. Windows: `principalMin` / `principalMax` (in the principal asset's units), + `minDuration` / `maxDuration`, `minExecuteWindow`, `settleWindow`. And an `active` switch. +2. **Rules**, `abi.encode(AgentCardRules)`: `assets` (1–8 AGW `AssetCap{token, maxPerCall, maxTotal}`, each a + PRC20 of the card's chain), `principalAsset` (an index into `assets`), `maxGasPerCall` (PC wei per outbound), + and `allowedCalls` (1–32 AGW `AllowedCall`s, with pins). See §6. +3. **`jobSpecTemplate`**, `abi.encode(JobSpecTemplate)`: see [`criteria.md`](./criteria.md). + +`getAgentCard(cardId)` returns all three, the version and both tags in one call (`AgentCardView`). + +**One card per provider.** `registerAgentCard` reverts `AgentCardAlreadyRegistered(provider)` if +`agentCardOf[msg.sender] != 0`. Disabling a card does not free the provider: a disabled provider cannot register +again (`test_MR11_onePerProvider`, invariant `MI06`). + +**`paymentToken`.** Until the kernel supports a per-job payment token (K-12, out of scope), every job is paid in +the kernel's token, so a card must name exactly `KERNEL.paymentToken()` (`InvalidAgentCard("payment token")`, +`test_MR12_paymentTokenGuard`). `providerFee` is a reference price the client funds against; the marketplace does +not enforce it (§5). + +### 4.2 What registration checks + +`registerAgentCard` checks `agentCardOf` first; then it and `updateAgentCard` run `_validateCard`, in this order. +The first failure reverts. + +| # | Check | Error | +|---|---|---| +| 1 | `jobType != 0` | `InvalidAgentCard("job type zero")` | +| 2 | `metadataURI` not empty | `InvalidAgentCard("metadata uri empty")` | +| 3 | `metadataHash != 0` | `InvalidAgentCard("metadata hash zero")` | +| 4 | `chainNamespace` starts with `"eip155:"` and is longer than 7 bytes | `InvalidAgentCard("chain namespace")` | +| 5 | the chain is not Push, and has a CEA deployment (`setCEADeployment`) | `ChainNotSupported(chainHash)` | +| 6 | `paymentToken == KERNEL.paymentToken()` | `InvalidAgentCard("payment token")` | +| 7 | the caller is not the marketplace's evaluator | `InvalidAgentCard("provider is evaluator")` | +| 8 | `principalMax != 0` and `principalMin ≤ principalMax` | `InvalidAgentCard("principal range")` | +| 9 | `1 hour ≤ minDuration ≤ maxDuration` | `InvalidAgentCard("duration range")` | +| 10 | `settleWindow != 0` | `InvalidAgentCard("settle window")` | +| 11 | `minExecuteWindow + settleWindow ≤ maxDuration` | `InvalidAgentCard("execute window")` | +| 12 | the rules pass `RULES.validateAgentCardRules` (R1–R17, §6.2) | `InvalidAgentCard(...)` from the helper | +| 13 | **every** asset's `SOURCE_CHAIN_NAMESPACE()` is a well-formed string equal to the card's chain | `InvalidAgentCard("asset")` / `InvalidAgentCard("asset chain")` | + +**The `jobSpecTemplate` is stored as given; it is not checked.** Whether the evaluator can run it is the +provider's responsibility. A malformed template fails only when a job is built from it (§7.3). + +Check 13 uses a raw `staticcall` plus an ABI-shape check, not `try/catch`: a `try` clause cannot catch the +decoding of its own return data, so a non-string answer would otherwise revert with an opaque error. A codeless +asset answers empty and fails the length check (`test_MR06_assetTeeth`, `test_MR13_everyAssetOnChain`). + +### 4.3 Lifecycle + +```mermaid +stateDiagram-v2 + [*] --> Active: registerAgentCard (version 1, unverified) + Active --> Inactive: setAgentCardActive(false) by provider + Inactive --> Active: setAgentCardActive(true) by provider + Active --> Active: updateAgentCard (version +1, tag cleared) + Inactive --> Inactive: updateAgentCard (version +1, tag cleared) + Active --> Disabled: disableAgentCard + Inactive --> Disabled: disableAgentCard + Disabled --> [*] +``` + +| Action | Who | Effect | +|---|---|---| +| `registerAgentCard` | any address without a card (becomes the provider) | Stores the card, version 1, active, unverified; `agentCardOf[provider] = cardId`. The contract writes `provider = msg.sender` and `active = true`, ignoring the caller's values. | +| `updateAgentCard` | the provider | Replaces every field except `provider`, `chainNamespace` and `active` (so `jobType`, `metadataURI`, `metadataHash`, `providerFee`, `paymentToken`, principal range, durations and windows), and both blobs. Version +1, verified tag cleared. **The chain cannot change** (`AgentCardIdentityImmutable`). Refused for a disabled card (`AgentCardDisabled`). | +| `setAgentCardActive` | the provider | Switches the card on or off. A disabled card cannot be switched back on. | +| `verifyAgentCard(cardId, cardVersion)` | admin | Sets the verified tag. `cardVersion` must be the current version (`AgentCardVersionMismatch`), so a provider who updates after review makes it revert. Refused for a disabled card; allowed for an inactive one. | +| `revokeAgentCardVerification` | admin | Clears the tag. Idempotent: emits only if there was a tag. | +| `disableAgentCard` | admin | Permanent kill switch: disabled, inactive, tag cleared. The provider cannot undo it, and keeps its `agentCardOf` entry. | + +**Updates and signed intents.** The card version is hashed into every job's `origin`, which is inside the +`createJob` calldata the owner signs. After an update, an intent signed against the old version fails at +`AgentCardVersionMismatch` (stale `p.cardVersion`) or at `IntentExecMismatch` (current version, old intent) +(`test_ML11_update_invalidatesOldIntents`). A provider therefore cannot swap the card under a user's signature. +Jobs already opened are untouched (`test_ML12_update_leavesOpenedJobsUntouched`). + +**The verified tag is a tag, not a gate.** `openJob` treats verified and unverified cards alike. The SDK shows it. + +--- + +## 5 · End-to-end flow + +```mermaid +sequenceDiagram + autonumber + actor P as Provider (agent) + actor U as User (owner) + participant SDK + participant M as UniversalMarketplace + participant F as AGWFactory + participant W as User's AGW + participant K as Kernel (AgenticCommerce) + participant H as RulesBindingHook + + P->>M: registerAgentCard(card, rules, jobSpecTemplate) + U->>SDK: pick a card, principal, times, params + SDK->>SDK: build the session: card rules, markers filled (Appendix E of PRD 12) + SDK->>M: previewIntent(request, session) + M-->>SDK: OwnerIntent (calldata hash binds the built criteria) + U->>SDK: sign the OwnerIntent once + SDK->>M: openJob(params) via a relayer + M->>F: deployWalletWithSig(intent, sig, label) [if new] + M->>W: grantRulesWithSig(session, intent, sig) + M->>W: executeWithSig(createJob calldata, intent, sig) + W->>K: createJob(provider, evaluator, expiredAt, JobSpec, hook) + Note over M,K: job is Open, budget 0. Nothing has moved. + U->>W: funding tx (SDK-built): principal, PC for gas, fee + P->>K: setBudget(jobId, card.providerFee) + W->>K: fund(jobId, card.providerFee, abi.encode(rulesId)) + K->>H: beforeAction(fund): bind job to the live rules set + P->>W: act within the rules (URP-enforced outbound calls, approvals included) + P->>K: submit; evaluator completes or rejects +``` + +1. **The provider registers a card** (§4). +2. **The user opens a job.** The SDK builds the session from the card's rules (filling the markers), calls + `previewIntent`, the user signs the returned `OwnerIntent` once, and a relayer calls `openJob`. The AGW is + deployed (if new), granted the rules, and creates the job in **Open** with budget 0. +3. **The user funds** the AGW, in one transaction built by the SDK: the principal (in the principal asset), PC + for gas and the fee. +4. **The provider prices** the job: `kernel.setBudget(jobId, card.providerFee)`. +5. **The AGW funds** the job: `kernel.fund(jobId, card.providerFee, abi.encode(rulesId))`. The kernel calls the + hook, which checks the AGW is a factory wallet, the rules set is live, and the AGW has no other live job. A + provider who prices above the card's fee cannot be funded, because the owner's `expectedBudget` is the card fee + (`BudgetMismatch`; `test_MS17_8183Continuation_feeEnforcedAtFund`). +6. **The agent executes** within the rules (including any pinned `approve`), submits, and the evaluator completes + or rejects (kernel). + +Steps 3–6 are outside the marketplace. They are shown because the marketplace's design depends on them. The fork +test `test_fork_openJob_realAGWv6` runs steps 2, 4 and 5 against the real AGW v6 on Donut. + +--- + +## 6 · The rules: rules = card + +The owner signs a SmartSession `Session` the SDK builds, which they cannot read. The marketplace proves it is +exactly the card's rules, with the card's markers filled for this job, for the card's agent, bound to this job. +Both checks live in the rules helper. + +### 6.1 The format (AGW v6) + +The card stores `AgentCardRules`: + +```solidity +struct AgentCardRules { + AssetCap[] assets; // 1..MAX_ASSETS (8) PRC20s on Push, each SOURCE_CHAIN_NAMESPACE == card chain + uint8 principalAsset; // index into assets + uint256 maxGasPerCall; // PC wei per outbound, copied to the session exactly + AllowedCall[] allowedCalls; // 1..32; pins may hold MARKER_WALLET / MARKER_PRINCIPAL +} +``` + +`AssetCap`, `AllowedCall`, `ArgPin` and `PinOp` are the AGW v6 types, imported from `@push-agw/libraries/Types.sol`. +The session's one action carries one URP policy whose `initData` is the v6 **envelope** +`abi.encode(uint16 version, string chainNamespace, bytes body)`, with `version == ENVELOPE_VERSION` (1) and +`body = abi.encode(UniversalTerms{validUntil, expectedCEA, assets, maxGasPerCall, allowedCalls})`. + +**Multi-asset.** Each asset has its own `maxPerCall` and lifetime `maxTotal`. The principal asset's caps are set +per job (D3); every other asset's caps are copied from the card. A second asset with caps `{0, 0}` may route a +request but never moves (the two-asset fixture `_rulesTwoAssets`). + +**Markers** (D2, D3). Where a card needs a per-job value it holds a marker, and the signed session holds the +value the marketplace fills in: + +| Card holds | Where | The signed session must hold | +|---|---|---| +| `MARKER_PRINCIPAL` | `assets[principalAsset].maxTotal` (as `uint256`) | `principal` | +| `MARKER_PRINCIPAL` | `assets[principalAsset].maxPerCall` | `principal` | +| a number `n` | `assets[principalAsset].maxPerCall` | `n` (a "tranche" card, `test_MS20_openJob_trancheCard`) | +| a number | any field of any other asset | the same number | +| `MARKER_WALLET` | a pin's `value` (op EQ) | `bytes32(uint256(uint160(computeCEA(agw, cardChainHash))))` | +| `MARKER_PRINCIPAL` | a pin's `value` (op EQ or MAX) | `bytes32(principal)` | +| any other `bytes32` | a pin's `value` | the same value | + +`MARKER_WALLET = keccak256("push.marketplace.marker.WALLET")` and +`MARKER_PRINCIPAL = keccak256("push.marketplace.marker.PRINCIPAL")`. Both have non-zero high 96 bits, so neither +is a clean address word (`test_naming_markers`). + +**Approvals are allowed calls** (D1). There is no owner-approval list. The agent may call ERC-20 `approve` only +with the spender pinned to a fixed address and the amount capped by a `MAX` pin (a literal or +`MARKER_PRINCIPAL`). Several entries may share one `(target, selector)` with different pins ("approve to Aave or +to Uniswap"), but only if every one of them is pinned. + +### 6.2 At registration: `validateAgentCardRules` + +Decodes `AgentCardRules` (malformed bytes revert in `abi.decode` without data), then runs R1–R17 in this order; +the first failure reverts `InvalidAgentCard(reason)`. Each rule is checked over every item before the next rule. + +| # | Check | Reason | +|---|---|---| +| R1 | `1 <= assets.length <= MAX_ASSETS` | `"asset count"` | +| R2 | `principalAsset < assets.length` | `"principal asset"` | +| R3 | every asset's `token != address(0)` | `"asset zero"` | +| R4 | no two assets share a token | `"duplicate asset"` | +| R5 | `assets[principalAsset].maxTotal == uint256(MARKER_PRINCIPAL)` | `"principal total not marker"` | +| R6 | `assets[principalAsset].maxPerCall != 0` | `"principal per-call zero"` | +| R7 | no other asset holds `MARKER_PRINCIPAL` in either cap | `"marker off principal asset"` | +| R8 | `1 <= allowedCalls.length <= 32` | `"allow-list size"` | +| R9 | `pins.length <= MAX_PINS` (8) per call, and `<= MAX_ALLOWED_CALL_PINS` (32) in total | `"too many pins"` | +| R10 | a pin holding `MARKER_WALLET` has `op == EQ` | `"wallet marker op"` | +| R11 | no two calls are byte-identical | `"duplicate call"` | +| R12 | two calls with the same `(target, selector)` are both pinned | `"unpinned duplicate"` | +| R13 | no `increaseAllowance` | `"increaseAllowance"` | +| R14 | `approve` has a pin `{4, EQ, v}`, `v` a non-zero clean address word (so never a marker) | `"approve spender not pinned"` | +| R15 | `approve` has a pin `{36, MAX, *}` | `"approve amount not capped"` | +| R16 | `transfer` binds its recipient to the user's account: beneficiary at 4, or a pin `{4, EQ, MARKER_WALLET}` | `"erc20 transfer recipient"` | +| R17 | `transferFrom` likewise at offset 36 | `"erc20 transferFrom recipient"` | + +It returns every asset's token, which the marketplace then checks against the card's chain (§4.2, check 13). The +full table is in [`reference.md`](./reference.md#universalmarketplacerules). + +### 6.3 At `openJob`: `checkRulesMatchCard` + +In order; the first mismatch reverts. + +| # | The session must… | Error | +|---|---|---| +| C1 | name the card's provider as its agent: `sessionValidatorInitData == abi.encode(provider)` | `AgentMismatch()` | +| C2 | have exactly one action | `ActionCount()` | +| C3 | with exactly one policy | `PolicyShape(0)` | +| C4 | whose `initData` starts with the word `ENVELOPE_VERSION`, read **before** any decode (0 if under 32 bytes) | `EnvelopeVersionMismatch(actual)` | +| C5 | and names the card's chain | `ChainMismatch(0)` | +| C6 | carry as many assets as the card | `AssetCountMismatch(expected, actual)` | +| C7 | with the card's tokens, in order | `AssetMismatch(i)` | +| C8 | with the principal asset's `maxTotal == principal`, and `maxPerCall == principal` (marker) or the card's number | `PrincipalCapMismatch()` | +| C9 | and every other asset's caps exactly the card's | `AssetMismatch(i)` | +| C10 | and the card's `maxGasPerCall` | `GasCapMismatch()` | +| C11 | and the card's allowed calls: same count, same target, selector, beneficiary fields, `maxValue`, pin count, and each pin's offset and op | `ActionsMismatch()` | +| C12 | with each pin's value equal to the card's, markers filled (table in §6.1) | `PinMismatch(call, pin)` | +| C13 | expiring with the job: `validUntil == expiredAt` | `ExpiryMismatch()` | +| C14 | paying only the AGW's own CEA on that chain: `expectedCEA == computeCEA(agw, chainHash)` | `ExpectedCEAMismatch(expected, actual)` | + +C4 mirrors URP: a pre-v6 two-field envelope `(string, bytes)` has first word 64 (the string's offset), so it is +named `EnvelopeVersionMismatch(64)` instead of panicking the decoder (`test_MS22_envelopeVersion_named`). C11 and +C12 share one loop, per call and then per pin. + +The session never carries a marker: C8 and C12 compare against the filled value, so a session holding the raw +marker fails (`test_MT09_match_pins`). D3 makes the principal caps exact: a per-call cap below the principal is +refused (`test_MB04_perCallMustEqualPrincipal`); the invariant `MI07` checks every granted `maxTotal` equals the +job's principal. + +What C12 and C14 protect: the `MARKER_WALLET` pins and URP's beneficiary pins bind funds the agent moves to the +user's own CEA. The marketplace derives the CEA itself (§9); the SDK derives it independently from the +destination `CEAFactory`. A disagreement fails closed before anything happens. + +Fields the helper does not compare, and why that is safe, are in §13.2. + +--- + +## 7 · The criteria: card ⊆ job + +### 7.1 Why they are built on-chain + +If the SDK or relayer supplied the job's criteria, nothing would guarantee they are the card's: a relayer could +swap in easier ones. Instead, `openJob` builds the criteria from the card's **stored** `jobSpecTemplate` and the +job's inputs. The result goes into the `createJob` calldata, which the owner's intent hashes (`execCalldataHash`). +So the owner's single signature covers the exact criteria, and the marketplace re-derives them before executing. + +### 7.2 What building does + +`JobSpecBuilder.build(jobSpecTemplate, ctx)` fills the template's holes: + +| Hole | Filled with | +|---|---| +| a `Fill` with source `CEA` in a read's args | the AGW's CEA **on that read's chain** | +| a `Fill` with source `PARAM` | one of the job's `params` (two's complement for negatives) | +| a check target `FIXED` | the template's value | +| a check target `PRINCIPAL_BPS` | `principal × bps / 10 000`, rounded down | +| a check target `PARAM` | one of the job's `params` | +| a check target `CEA` | the AGW's CEA on the check's read chain | +| `executeBy` | the job's `executeBy` | +| `failFinalAt` | `executeBy + card.settleWindow` | +| `origin` | `keccak256(abi.encode(marketplace, cardId, cardVersion, principal))` | + +`logic` (the pass-logic tree), `allowedMutability` and every other read field are copied verbatim. The full format +and two worked examples are in [`criteria.md`](./criteria.md). + +### 7.3 What building checks, and what it doesn't + +The template is **not judged**. Building checks only what building needs: + +| Check | Error | +|---|---| +| one param per template param | `ParamCountMismatch(expected, actual)` | +| each param inside its inclusive bounds | `ParamOutOfRange(index, value)` | +| each fill writes inside its read's args | `FillOutOfBounds(read, fill)` | +| `principal × bps` fits in uint256 | `TargetOverflow(check)` | +| a CEA is asked only for a chain with a CEA deployment | `ChainNotSupported(chainHash)` | + +Anything else malformed reverts on its own when a job is built (an index out of range panics, undecodable bytes +fail in `abi.decode`). A template the evaluator could not run, such as a read no check uses or an unreachable +logic step, **builds without complaint** (`test_JB08_doesNotJudgeTheTemplate`). `allowedMutability` is carried, +not enforced: nothing in this repo reads it. The verified tag is the review. + +--- + +## 8 · `openJob`, step by step + +`openJob(OpenJobParams p)` is `whenNotPaused` and `nonReentrant`. **Every check runs before the first state +change**, so a refusal leaves no wallet, no grant and no job (`test_MS13_intentSessionMismatch_noStateOnFailure`, +`test_MS22_envelopeVersion_named`). + +| Step | What | Code | Error on failure | +|---|---|---|---| +| 1 | Card exists and is active | `_checkCardAndJob` | `AgentCardInactive()` | +| 2 | `p.cardVersion` is the card's current version | `_checkCardAndJob` | `AgentCardVersionMismatch(provided, current)` | +| 3 | `principalMin ≤ principal ≤ principalMax` | `_checkJobWindows` | `PrincipalOutOfRange()` | +| 4 | `now + minDuration ≤ expiredAt ≤ now + maxDuration` | `_checkJobWindows` | `ExpiryOutOfRange()` | +| 5 | `executeBy ≥ now + minExecuteWindow` and `executeBy + settleWindow ≤ expiredAt` | `_checkJobWindows` | `ExecuteByOutOfRange()` | +| 6 | the card's provider is not the current evaluator (it may have changed since registration) | `_checkCardAndJob` | `ProviderIsEvaluator()` | +| 7 | `(agw, deployed) = AGW_FACTORY.predictWallet(intent.owner, intent.index)`; the intent names that wallet and this marketplace as executor | `_resolveWallet` | `IntentWalletMismatch(expected, provided)` · `ExecutorMismatch(expected, actual)` | +| 8 | the AGW has no active job opened here: `activeJobOf(agw) == 0` | `openJob` | `WalletHasActiveJob(agw, jobId)` | +| 9 | build the job's criteria from the card's `jobSpecTemplate` | `_buildCreateJob` → `JobSpecBuilder.build` | §7.3 errors | +| 10 | encode `createJob(provider, evaluator, expiredAt, description, hook)` as an ERC-7579 single execution: `abi.encodePacked(kernel, 0, call)` | `_buildCreateJob` | — | +| 11 | the intent's `mode`, `execCalldataHash` and `nonceKey` (`OPENJOB_LANE`) are exactly this execution, and its `sessionHash` is this session | `_bindIntent` | `IntentExecMismatch(expectedHash)` · `IntentSessionMismatch(expectedHash)` | +| 12 | the session is the card's rules with markers filled, `SessionContext{agent: provider, chainHash, principal, expiredAt, expectedCEA: computeCEA(agw, chainHash)}` (§6.3) | `_checkRules` → `RULES.checkRulesMatchCard` | C1–C14 errors | +| — | *first state change* | | | +| 13 | deploy the predicted wallet (`deployWalletWithSig`) and require it landed at the prediction; or, for an existing wallet, require the factory's `ownerOf` is the intent's owner | `_deployOrCheckOwner` | `AGWMismatch(expected, actual)` · `WalletOwnerMismatch(expected, actual)` | +| 14 | `rulesId = AGW.grantRulesWithSig(session, intent, sig)` | `openJob` | the AGW's own errors | +| 15 | `AGW.executeWithSig(MODE_SINGLE, calldata, intent, sig)`; exactly one new kernel job; its client is the AGW and its provider, hook and evaluator are the expected ones | `_createJob` | `UnexpectedJobCount(before, after)` · `JobMismatch()` | +| 16 | record `_lastJobOf`, `cardOfJob`, `agwOfJob`, `rulesOfJob`, `cardVersionOfJob`; emit `JobOpened(cardId, owner, agw, jobId, rulesId, principal, cardVersion)` | `openJob` | — | + +`openJob` makes one `createJob` execution (`MODE_SINGLE`). It does not revoke a wallet's previous rules set. + +**What one signature binds.** The owner signs one `OwnerIntent`. Through it: + +| Bound value | How | +|---|---| +| principal, `executeBy`, params, card version, the wallet (through its CEA) | inside the built `JobSpec`, inside the `createJob` calldata → `execCalldataHash` | +| `expiredAt`, provider, evaluator, hook | `createJob` arguments → `execCalldataHash` | +| the rules (assets and caps, gas cap, calls and pins, CEA, expiry) | the `Session` → `sessionHash` | +| which wallet, which executor | `wallet`, `executor` fields | +| replay | `nonceKey` / `nonceSeq` (the owner lane) and `grantNonce`, checked by the AGW | + +`test_MS12_intentExecMismatch_everyBoundInput` changes each bound input in turn and expects `IntentExecMismatch`. + +**Who checks the signature.** Not the marketplace. The factory and the wallet verify the owner's signature +themselves and accept the intent only from its `executor` (this contract). The marketplace's own checks +(steps 7 and 11) mirror the wallet's, so a mismatch fails early with a named error before any state change. + +**Previewing.** `previewIntent(request, session)` returns the exact `OwnerIntent` to sign: it predicts the wallet, +builds the same calldata `openJob` will, hashes it, and reads the wallet's live nonces (0 for a wallet not yet +deployed). `buildCreateJobCalldata` returns the execution itself. Both revert `AgentCardInactive` for an unknown +card, and both revert exactly as step 9 would on a bad template. `test_MV04_buildCreateJobCalldata` asserts that +what `openJob` executes equals this view's answer. + +**Front-running.** `openJob` can be called by anyone holding the signed parameters; the relayer has no power. A +third party who submits them first opens exactly the job the owner signed. The AGW's nonces make it one-shot. + +--- + +## 9 · Chains and CEAs + +A card's chain must be configured before any card can name it: + +- **`setCEADeployment(chainHash, ceaFactory, ceaProxyImpl)`** (admin) records the destination chain's CEA factory + and proxy implementation. A chain without one cannot carry cards (`ChainNotSupported`), and the builder cannot + ask for a CEA on it. +- **Clearing a chain.** `setCEADeployment(chainHash, 0, 0)` deletes the entry and emits + `CEADeploymentSet(chainHash, 0, 0)`. Registration and update on that chain, `computeCEA`, and `openJob` on an + existing card there then revert `ChainNotSupported(chainHash)`. Exactly one zero address reverts `ZeroAddress()` + (`test_MV11_setCEADeployment_clear`). +- **`computeCEA(agw, chainHash)`** mirrors `CEAFactory._computeCEAInternal`: an OZ minimal proxy of + `ceaProxyImpl`, salt `keccak256(abi.encode(agw))`, deployed by the CEA factory (`test_MV02_computeCEA` checks it + against the real `CEAFactory`). +- **Push itself is never a card chain** (`PUSH_CHAIN_HASH`, set at `initialize` from `block.chainid`). + +There is **no per-chain pause** any more (the `setUniversalPaused` / `isUniversalPaused` pair was removed; its +slot 14 is reserved and always zero; `test_MV14_noPerChainPause`). + +**CEA implementation rotation.** If the destination rotates its CEA proxy implementation, `computeCEA` goes stale. +An SDK reading the destination factory then signs the new CEA (in the `MARKER_WALLET` pin and `expectedCEA`), and +`openJob` refuses it, first at the wallet pin (`PinMismatch(1, 0)` in the test fixture), until the admin updates +the deployment (`test_MV03_ceaRotation_staleCaught`). Runbook: + +1. `pause()` stops registration, updates and `openJob` marketplace-wide. +2. Rotate the implementation on the destination chain. +3. `setCEADeployment(chainHash, factory, newImpl)`. +4. `unpause()`. + +An intent signed before the rotation names the old CEA in its criteria, so after step 3 it fails +`IntentExecMismatch` and must be re-signed. The CEA value is security-relevant: it is the wallet pin and expected +CEA of every rules grant on that chain (§6.3 C12, C14). A wrong entry still cannot silently redirect funds, +because the SDK derives the CEA independently and the two must agree. + +--- + +## 10 · One live job per wallet + +Two rules, at two moments, read through two views named `activeJobOf`: + +| View | Where | Returns the job id while | Used by | +|---|---|---|---| +| `UniversalMarketplace.activeJobOf(agw)` | marketplace | the last job **opened here** for the AGW is Funded, Submitted, or Open and not yet expired; else 0 | `openJob` step 8 (`WalletHasActiveJob(agw, jobId)`) | +| `RulesBindingHook.activeJobOf(agw)` | hook | the AGW's last job **bound by the hook** is Funded or Submitted; else 0 | `fund` (`AGWHasLiveJob(agw, jobId)`) | + +The difference is intended: the marketplace binds at `openJob`, so an Open, unexpired job also blocks and a user +cannot stack unfunded jobs on one wallet; the hook binds at `fund`, so it only sees funded jobs. An Open job frees +the wallet once it expires or is rejected; a Funded or Submitted job frees it once it is completed, rejected or +refunded (`test_MS14_oneLiveJob`, `test_MS21_activeJobOf`, hook `test_activeJobOf_returnsId`). + +Jobs created directly on the kernel, not through the marketplace, are invisible to the marketplace's +`activeJobOf`. The hook's rule still covers any job that names the hook. + +--- + +## 11 · Admin powers + +Roles (OpenZeppelin AccessControl): `DEFAULT_ADMIN_ROLE` manages roles; `ADMIN_ROLE` runs every admin function. +Both go to `InitParams.admin`. Upgrades are separate: they belong to the ProxyAdmin owner. + +| Function | Effect | Limits | +|---|---|---| +| `setHook(hook)` | hook of every **new** job | must be non-zero and whitelisted on the kernel; existing jobs keep theirs | +| `setEvaluator(evaluator)` | evaluator of every **new** job | non-zero; a card whose provider is the new evaluator can't open jobs (`ProviderIsEvaluator`) | +| `setCEADeployment(chainHash, factory, impl)` | enables a chain and sets its CEA derivation, or clears it with `(h, 0, 0)` | exactly one zero reverts | +| `setAgentRating(agent, rating)` | sets an agent's rating, read by `getAgentRating` | no validation; a placeholder until VerifiedRatings is wired | +| `pause()` / `unpause()` | stops or resumes `registerAgentCard`, `updateAgentCard`, `openJob` | admin functions, `setAgentCardActive` and views stay live | +| `disableAgentCard(cardId)` | permanently disables a card | cannot re-enable; the provider stays registered | +| `verifyAgentCard(cardId, cardVersion)` / `revokeAgentCardVerification(cardId)` | the verified tag | version-bound | + +The admin cannot move funds (the marketplace holds none), cannot change an opened job (the kernel fixed its +provider, evaluator, hook and description at creation), and cannot re-enable a disabled card. + +The admin **can** influence future jobs: the evaluator decides completion, and the hook gates funding. Both are +trust points of the deployment. + +--- + +## 12 · Deployment, upgradeability and build + +### 12.1 AGW dependency + +The package compiles against AGW v6 source: the submodule [`lib/push-agentic-wallets`](../../lib/push-agentic-wallets), +pinned at commit `ffd567d3e49b2d27c6f50ad36093274dbac3090f` (branch `deploy-agw`), with the remapping +`@push-agw/=lib/push-agentic-wallets/src/`. AGW v6 on Donut was deployed from that same commit. + +- Imported by name from `@push-agw/libraries/Types.sol` (a file with no imports): `OwnerIntent`, + `OWNER_LANE_FLAG`, `AssetCap`, `AllowedCall`, `ArgPin`, `PinOp`, `UniversalTerms`, `ENVELOPE_VERSION`, + `MAX_ASSETS`, `MAX_PINS`, `MAX_ALLOWED_CALL_PINS`; the fork test also imports the EIP-712 constants and + `SEND_OUTBOUND_SELECTOR`. A struct change in the AGW fails this build, not `openJob`. +- `Session` and its parts stay a mirror in `IAGW.sol` (the vendor SmartSession tree cannot be compiled here). The + fork test pins it: a wrong mirror changes the session hash and the real wallet refuses the grant. +- Donut v6 addresses are deploy-time inputs and test constants; nothing in `src/` hard-codes them. + +### 12.2 Wiring + +1. Deploy `UniversalMarketplaceRules` (no constructor arguments). +2. Deploy the `JobSpecBuilder` library and link it into `UniversalMarketplace`. Foundry links it automatically in + tests and scripts. +3. Deploy the `UniversalMarketplace` implementation; its constructor disables initializers. +4. Deploy a `TransparentUpgradeableProxy` calling `initialize(InitParams{agwFactory, kernel, hook, evaluator, + rules, admin})`. `agwFactory`, `kernel`, `rules`, `admin`, `hook` and `evaluator` must be non-zero, and the + hook must be whitelisted on the kernel. +5. `setCEADeployment` for each supported destination chain. + +Interim configuration (until the V2 UniversalHook and UniversalEvaluator ship): `hook` = RulesBindingHook, +`evaluator` = a Push-controlled address. + +### 12.3 Upgradeability + +- **The marketplace** sits behind a `TransparentUpgradeableProxy`. Its storage is append-only (slots 0–21, slot 14 + reserved, then a 27-slot gap, 22–48; see [`reference.md`](./reference.md#storage-layout)). OZ upgradeable bases + use ERC-7201 namespaced storage, so they don't occupy these slots. `test_MV09_storageLayout_bySlot` pins every + slot by position, and `test_MV10_upgrade_preservesState` upgrades through the ProxyAdmin. v1 was never + deployed, so there is no migration from it. v2 is live on Donut (§12.5): from now on every upgrade must keep + this layout. +- **The rules helper and JobSpecBuilder** are not upgradeable. A rule change is a new deployment plus a + marketplace upgrade that points at it. The helper is an `initialize`-time address (`RULES`); the library's + address is linked into the implementation's bytecode. + +### 12.4 Deploy script + +[`scripts/agentic-commerce-8183/DeployUniversalMarketplace.s.sol`](../../scripts/agentic-commerce-8183/DeployUniversalMarketplace.s.sol) +deploys the whole stack in one run and follows §12.2: + +1. `AgenticCommerce` (kernel) proxy, `initialize(pUSDC, treasury, deployer)`. +2. `RulesBindingHook` proxy, `initialize(kernel, AGW v6 factory, AGW v6 session engine)`, then + `kernel.setHookWhitelist(hook, true)`. +3. `UniversalMarketplaceRules`; the `JobSpecBuilder` library is deployed and linked by Foundry. +4. `UniversalMarketplace` proxy, `initialize` with the deployer as `admin` and as `evaluator`. +5. `setCEADeployment` for Ethereum Sepolia, Base Sepolia, Arbitrum Sepolia and BSC Testnet. + +Each proxy gets its own ProxyAdmin, owned by the deployer. Fees stay zero. Inputs come from `.env`: `DEPLOYER_KEY` +(the broadcaster) and `TREASURE_KEY` (its address becomes the kernel's platform treasury); both are accepted with or +without the `0x` prefix. The script refuses any chain other than Donut (42101). + +```bash +forge script scripts/agentic-commerce-8183/DeployUniversalMarketplace.s.sol \ + --rpc-url $PUSH_CHAIN_TESTNET_RPC_URL --broadcast --slow +``` + +### 12.5 Live deployment (Push Donut) + +Full table: [`docs/addresses/push_donut_universal_marketplace.md`](../addresses/push_donut_universal_marketplace.md). + +| Contract | Proxy | +|---|---| +| UniversalMarketplace | `0x9071ebE01B75123A91e88eB6ec4BF163F3fE9BF4` | +| AgenticCommerce (kernel, pUSDC `0x7A58048036206bB898008b5bBDA85697DB1e5d66`) | `0x977cf1AC973E9eC4332791d531507575006157Ed` | +| RulesBindingHook | `0xDe7A94e510b6C571DE7880d441349689F73A32b3` | +| UniversalMarketplaceRules (not a proxy) | `0x5b98A8E0df5b918DF76cD2BE84bA7995B39dfd44` | +| JobSpecBuilder (library) | `0x2de1e3F053b0bBa0cE0C6953144534a0b055f59e` | + +- **Its own kernel.** The stack does not use the `marketplace_demo` kernel (`0x4F9b…B1E0`) or its UniversalEvaluator + (`0x7D62…4Ce3`). That kernel is priced in eUSD, its admin is not ours, its evaluator accepts only jobs created + with its own UniversalHook, and that evaluator decodes a different `JobSpec` layout from `JobSpecTypes.sol`. +- **Evaluator is an EOA.** The deployer `0x1afC81396f1bb36F91f74506284952b81e4bd47c` completes or rejects jobs by + hand until a compatible evaluator is set with `setEvaluator` (and, if it needs its own hook, `setHook`). +- **Moving to another kernel.** `KERNEL` is set once at `initialize` and has no setter. Pointing the marketplace at + a different kernel takes a marketplace upgrade or redeploy plus a new RulesBindingHook whitelisted on that kernel. + Jobs already opened stay on the old kernel. +- Contracts are not source-verified on the explorer. + +### 12.6 Build configuration + +- solc 0.8.26, `via_ir`, EVM `shanghai`. +- **`UniversalMarketplace.sol` compiles at 1 000 optimizer runs**; every other contract uses 99 999. This is the + `compilation_restrictions` entry in `foundry.toml`. At 99 999 runs the inliner puts the marketplace over the + EIP-170 limit. +- Coverage must run with `FOUNDRY_PROFILE=coverage`, which drops that restriction. Otherwise contracts tested + from both compile jobs exist twice, and coverage keeps the hits of only one. + +| Contract | Runtime size | Margin to EIP-170 | +|---|---|---| +| UniversalMarketplace (1 000 runs) | 22,156 B | 2,420 B | +| UniversalMarketplaceRules | 9,376 B | 15,200 B | +| JobSpecBuilder | 6,352 B | 18,224 B | +| RulesBindingHook | 4,499 B | 20,077 B | + +--- + +## 13 · Trust model and security notes + +### 13.1 What the marketplace guarantees + +| Guarantee | Enforced by | Tested by | +|---|---|---| +| The rules granted are exactly the card's, markers filled, for the card's agent, bound to this job's principal, expiry and CEA | `checkRulesMatchCard` (§6.3) | `MB01`–`MB04`, `MT07`–`MT11`, `MS19`, `MS20`, `MI07`, fork test | +| The job's criteria are exactly the card's template, filled with this job's inputs | `_buildCreateJob` + intent binding (§7, §8) | `MS01`, `ML13`, `MV04`, `MC01`–`MC05` | +| The job is created by the user's own wallet, with the card's provider, the configured evaluator and hook | `_createJob` | `MS15` | +| A provider can't change a card under a user's signature | card version in `origin` | `ML11` | +| One card per provider | `agentCardOf` | `MR11`, `MI06` | +| Nothing moves through the marketplace | no transfer code; no payable function | `MS02`, `MI02`, `MI05` | +| One active job per wallet | `activeJobOf` (§10) | `MS14`, `MS21`, `MI01` | +| Every refusal happens before any state change | step order (§8) | `MS13`, `MS22` | + +### 13.2 What the marketplace relies on, or does not check + +1. **The AGW and its factory verify the owner's signature** and accept the intent only from its executor. They + also enforce deadlines, nonces and the signer chain. The marketplace's mirror checks only name the error + early. The unit suites use `MockAGW` / `MockAGWFactory`, which verify no signature; the fork test + `test_fork_openJob_realAGWv6` runs the real AGW v6 stack on Donut with a real owner signature. +2. **SmartSession and URP enforce the rules at execution.** The marketplace checks the rules' *content* at grant + time; it does not execute or watch them. +3. **Session fields the helper does not compare are pinned by the AGW.** The helper never compares the + `sessionValidator`, the policy address, the action target and selector, `userOpPolicies`, `erc7739Policies`, + `permitERC4337Paymaster` or `salt`. AGW v6 `_grantRules` refuses the grant unless: `userOpPolicies`, both + ERC-7739 lists are empty and `permitERC4337Paymaster` is false (`MalformedSessionShape`); a universal rules set + has exactly one action, targeting `UNIVERSAL_GATEWAY_PC` with `SEND_OUTBOUND_SELECTOR` (`RulesTypeMismatch`); + that action has one policy, which is URP; `sessionValidator == SESSION_VALIDATOR` and + `validateConfig(sessionValidatorInitData)` passes; and it overwrites `salt` with its grant nonce. URP then + refuses an envelope whose first word is not `ENVELOPE_VERSION`, an empty or oversized allow-list, a past or + zero `validUntil`, a zero `expectedCEA`, too many pins, and 0 or more than 8 assets, duplicates, or an asset + whose `SOURCE_CHAIN_NAMESPACE()` is not the envelope's chain. The question left open in v1 is therefore + closed: pinning these fields in the marketplace would duplicate the wallet's own checks. +4. **The criteria are not judged** (§7.3). A provider can register criteria the evaluator cannot run, or that + are trivially satisfied. The verified tag is the review, and the SDK must render every check in words before + the user signs. +5. **The asset check is a sanity check, not a security property.** The asset contract chooses its own + `SOURCE_CHAIN_NAMESPACE()` answer. What binds the assets is URP: the session's assets must equal the card's. +6. **`providerFee` is a reference price.** The marketplace never enforces it; the kernel does, at `fund`, through + the owner's `expectedBudget`. +7. **`createJob`'s `description` and `expiredAt` are not re-read after creation.** Step 15 checks the new job's + client, provider, hook and evaluator. The description and expiry are trusted to the AGW executing exactly the + signed calldata (its `execCalldataHash` check). +8. **The evaluator and hook are admin-set trust points** for new jobs (§11). +9. **`MARKER_PRINCIPAL` on a non-principal token's `approve` is not detectable.** The helper requires an + `approve`'s amount to be capped (R15) but cannot check that a `MARKER_PRINCIPAL` cap sits on the principal + token's `approve`: `IPRC20` has no source-token view, so a PRC20 cannot be mapped to its destination token. + The verified tag covers it. + +### 13.3 Reentrancy and external calls + +`openJob` is `nonReentrant` and makes its external calls only after every check: + +1. `AGW_FACTORY.deployWalletWithSig`, a factory the deployment chose; +2. `AGW.grantRulesWithSig`, `AGW.executeWithSig`, on the predicted wallet; +3. `KERNEL.jobCounter`, `KERNEL.getJob`. + +Before them, the checks read `AGW_FACTORY.predictWallet`, `KERNEL.getJob` (for `activeJobOf`) and call the pure +`RULES` helper. The wallet is the factory's deterministic deployment for the intent's owner, re-checked by +`AGWMismatch` / `WalletOwnerMismatch`. The marketplace holds no value, so a reentrant path has nothing to drain. +Registration also calls `KERNEL.paymentToken()` and each asset's `SOURCE_CHAIN_NAMESPACE()`. + +### 13.4 Known limitations of v2 + +| Limitation | Note | +|---|---| +| **EVM destinations only** | Cards name `eip155:*` chains, never Push. Solana and native (Push-side) cards are out of scope. | +| **One payment token** | Until kernel K-12, every card's `paymentToken` must be the kernel's token (pUSDC on the Donut deployment). | +| **Kernel is fixed** | `KERNEL` has no setter; changing kernels needs an upgrade or redeploy (§12.5). | +| **Interim hook and evaluator** | RulesBindingHook and a Push-controlled evaluator until the V2 UniversalHook and UniversalEvaluator ship. The `JobSpec` description and its `allowedMutability` are inert to RulesBindingHook. | +| **No revoke of a previous grant** | `openJob` on an existing wallet grants a new rules set; the previous one is not revoked by the marketplace. | +| **Rating is a placeholder** | `setAgentRating` / `getAgentRating` store an admin number until VerifiedRatings is wired. | +| **A card can be internally inconsistent** | Registration checks `minExecuteWindow + settleWindow ≤ maxDuration` only. A card whose `minDuration` is shorter than that sum simply can't open jobs at its shortest expiry (`ExecuteByOutOfRange`). | +| **Error decoding** | Each contract's ABI lists only the errors it raises itself. Decode marketplace reverts, including rules-helper and builder errors that bubble through `openJob`, with the `UniversalMarketplaceErrors` artifact, which lists all 40. | + +--- + +## 14 · Invariants + +Fuzzed by [`UniversalMarketplace.invariants.t.sol`](../../test/8183-tests/UniversalMarketplace.invariants.t.sol): +64 runs × depth 100 per invariant. The handler opens jobs through honest and misbehaving wallets, registers cards +from three providers, updates the card, cancels jobs and moves time. + +| Invariant | Property | +|---|---| +| `MI01_activeJobIsTheAgwsOwnJob` | `activeJobOf(agw)` is 0 or a job whose client is that AGW | +| `MI02_marketplaceHoldsNothing` | The marketplace's token, rules-asset and native balances are always 0 | +| `MI03_outcomesExactlyExpected` | An honest open on a free wallet always succeeds; a misbehaving wallet (two jobs, foreign client) is always refused with its own named error | +| `MI04_everyJobIsWellFormed` | Every opened job's description decodes as a `JobSpec` with the recorded `origin`, and has the configured evaluator and hook | +| `MI05_userBalanceNeverMovedByOpenJob` | The user's tokens and PC never change | +| `MI06_onePerProvider` | `agentCardOf[p]` is 0 or a card whose provider is `p`; no two cards share a provider; a second registration is always refused with `AgentCardAlreadyRegistered` | +| `MI07_principalCapEqualsPrincipal` | For every opened job, the granted rules' `assets[principalAsset].maxTotal` equals that job's principal | +| `afterInvariant` | Liveness: at least one honest open and one refused misbehaviour happened, so none of the above held vacuously | + +--- + +## 15 · Tests + +`forge test --match-path 'test/8183-tests/*' --no-match-contract 'Invariants|ForkTest'`: 247 tests, all passing. +The invariant suites and both fork tests pass too. The marketplace-related suites: + +| Suite | Tests | Covers | +|---|---|---| +| [`UniversalMarketplace.t.sol`](../../test/8183-tests/UniversalMarketplace.t.sol) | 68 | Registration (MR01–MR14), card lifecycle (ML01–ML13), `openJob` (MS01–MS22), rules = card through the marketplace (MB01–MB04), views, admin, initialize, storage layout, upgrade, CEA clearing, rating, version, no per-chain pause (MV01–MV14) | +| [`UniversalMarketplaceRules.t.sol`](../../test/8183-tests/UniversalMarketplaceRules.t.sol) | 11 | The helper directly: R1–R17 (MT01–MT06), each C1–C14 error with exact arguments (MT07–MT09), malformed input (MT10), fuzzed principal binding (MT11) | +| [`JobSpecBuilder.t.sol`](../../test/8183-tests/JobSpecBuilder.t.sol) | 12 | Fills, targets, timing and origin, params, overflow, fill bounds, unsupported chains, "does not judge", fuzz, `logic` and `allowedMutability` copied (JB12) | +| [`UniversalMarketplace.conformance.t.sol`](../../test/8183-tests/UniversalMarketplace.conformance.t.sol) | 5 | Built criteria equal the V2 design doc's examples, field by field; every built read decodes in a copy of the V2 evaluator's decoder; the `JobSpec` ABI field order (MC05) | +| [`UniversalMarketplace.invariants.t.sol`](../../test/8183-tests/UniversalMarketplace.invariants.t.sol) | 7 | §14 | +| [`UniversalMarketplace.fork.t.sol`](../../test/8183-tests/UniversalMarketplace.fork.t.sol) | 1 | `openJob` against the real AGW v6 on Donut: fresh wallet, fund through the hook, refusal while Funded, existing-wallet path, pre-v6 envelope named | +| [`Naming.t.sol`](../../test/8183-tests/Naming.t.sol) | 8 | Every function, event and error of the v2 surface pinned to literal signatures; marker values; no retired names in ABIs | +| [`RulesBindingHook.t.sol`](../../test/8183-tests/RulesBindingHook.t.sol) | 32 | The interim hook, including `activeJobOf` returning the id | +| [`RulesBindingHook.fork.t.sol`](../../test/8183-tests/RulesBindingHook.fork.t.sol) | 1 | The factory and engine interfaces against Donut v6 | + +The two fork tests skip unless `PUSH_CHAIN_TESTNET_RPC_URL` is set. Both were run against Donut at block +24310581 and passed. + +Unit fixtures use the real kernel, the real RulesBindingHook, the real rules helper and builder library, and the +real `CEAFactory`. The AGW factory and wallet are mocks: they enforce the rules the marketplace relies on +(executor, hashes, nonces), decode the policy envelope as the real wallet does, and verify no signature. +`MockAGW` has misbehaving modes (two jobs, foreign client, rewritten evaluator) to test the marketplace's +post-creation checks. Shared fixtures for card rules and the SDK's session filling are in +[`helpers/RulesFixtures.sol`](../../test/8183-tests/helpers/RulesFixtures.sol). + +**Coverage** (`FOUNDRY_PROFILE=coverage`, `--ir-minimum`, gas test excluded): + +| Contract | Lines | Statements | Branches | Functions | +|---|---|---|---|---| +| UniversalMarketplace | 97.63% (247/253) | 98.14% (317/323) | 100% (52/52) | 100% (37/37) | +| UniversalMarketplaceRules | 100% (132/132) | 100% (253/253) | 100% (39/39) | 100% (12/12) | +| JobSpecBuilder | 98.28% (57/58) | 98.80% (82/83) | 100% (12/12) | 100% (7/7) | +| RulesBindingHook | 96.43% (27/28) | 96.97% (32/33) | 100% (6/6) | 100% (6/6) | + +Every uncovered line is executed by the tests but not attributed by `--ir-minimum`: + +| File:line | Code | Executed by | +|---|---|---| +| `UniversalMarketplace.sol:98` | `_disableInitializers()` (constructor) | every test that deploys the implementation; `test_MV08_initialize` asserts its effect | +| `UniversalMarketplace.sol:107-109` | `__AccessControl_init()`, `__Pausable_init()`, `__ReentrancyGuard_init()` | every `initialize` | +| `UniversalMarketplace.sol:165`, `:170` | `_pause()`, `_unpause()` | `test_MV07_pause` | +| `RulesBindingHook.sol:40` | `_disableInitializers()` (constructor) | every hook deployment | +| `JobSpecBuilder.sol:106` | the inline `mstore` of a fill | every build with a fill; `test_JB01_fills` asserts the written words | + +**Mutation testing.** + +30 hand-written mutants, each applied to the source, run against one suite, then restored from a backup outside +`src/`. **30 killed, 0 survived.** + +| Group | Mutants | Suite | Result | +|---|---|---|---| +| Registration guards R1–R17, each check removed | 17 | `UniversalMarketplaceRules.t.sol` | 17 killed (MT02–MT06) | +| Rules = card C4, C6–C12, each check removed | 8 | `UniversalMarketplaceRules.t.sol` | 8 killed (MT08, MT09, MT11) | +| Marketplace: the `agentCardOf` check, the `paymentToken` guard, `<` → `<=` in `activeJobOf`'s Open-expiry comparison, the `delete` in `setCEADeployment`'s both-zero branch, the `cardVersionOfJob` write | 5 | `UniversalMarketplace.t.sol` | 5 killed (MR11, MR12, MS14, MV11, ML12) | + +Several mutants were killed by a wrong-error assertion rather than a missing revert, for example R2 (the decoder +panics on the out-of-range index instead of `InvalidAgentCard("principal asset")`) and C4 (a pre-v6 envelope +panics in `abi.decode` instead of `EnvelopeVersionMismatch(64)`): every negative test names its exact error. + +**Gas ceilings** (`test_MS18_gasCeilings`, mock wallet and factory, two-asset card): `registerAgentCard` +≤ 2.70 M (measured 2,564,983), `openJob` on a fresh wallet ≤ 4.45 M (4,231,625), on an existing wallet ≤ 1.89 M +(1,797,405). The v1 ceilings were 2.46 M / 3.49 M / 2.09 M. Both `openJob` figures include `MockAGW` storing the +granted policy `initData` for the tests. `registerAgentCard` is dominated by storing the two content blobs; +`openJob` by the wallet deploy and the kernel storing the description. + +--- + +## 16 · Reviewer checklist + +Where to look first: + +1. **`openJob` ordering** (§8): every check before the first state change; the intent's `execCalldataHash` + covers everything per-job. +2. **`checkRulesMatchCard` completeness** (§6.3, §13.2 item 3): the C1–C14 order, the envelope version read before + decoding, and marker filling in C8 and C12. +3. **Registration guards** (§6.2): R1–R17, especially the approve rules R14–R15 and the duplicate rules R11–R12. +4. **CEA derivation** (§9): `computeCEA` against `CEAFactory`; the rotation runbook; clearing a chain. +5. **`JobSpecBuilder`** ([`criteria.md`](./criteria.md)): the only inline assembly (`mstore` of a fill) and its + bounds check; the PRINCIPAL_BPS overflow argument; the `DELEGATECALL` context (`address(this)` is the + marketplace). +6. **`_requireAssetOnChain`**: the raw `staticcall` ABI-shape check, now run for every asset. +7. **Storage layout and upgrade safety** (§12.3, [`reference.md`](./reference.md#storage-layout)). +8. **Admin trust points** (§11): evaluator, hook, CEA deployments. +9. **The interim hook** (`RulesBindingHook`): the `fund`-time binding and its `activeJobOf`. +10. **The AGW dependency** (§12.1): the submodule commit and what is imported versus mirrored. diff --git a/plan/marketplace/contracts/docs/universalmarketplace/criteria.md b/plan/marketplace/contracts/docs/universalmarketplace/criteria.md new file mode 100644 index 00000000..46b6c41e --- /dev/null +++ b/plan/marketplace/contracts/docs/universalmarketplace/criteria.md @@ -0,0 +1,374 @@ +# Universal Marketplace — Job criteria + +How a card says what counts as "done", and how `openJob` turns that into one job's criteria. For where this fits +in the whole flow, see [`README.md`](./README.md) §7. + +- [Two formats: template and JobSpec](#two-formats-template-and-jobspec) +- [The JobSpec](#the-jobspec) +- [The template](#the-template) +- [Building a JobSpec](#building-a-jobspec) +- [Worked example: a lending card](#worked-example-a-lending-card) +- [Worked example: a swap card with a user param](#worked-example-a-swap-card-with-a-user-param) +- [What the SDK must do](#what-the-sdk-must-do) + +--- + +## Two formats: template and JobSpec + +| | Template (`JobSpecTemplate`) | Criteria (`JobSpec`) | +|---|---|---| +| Where | stored on the card as `jobSpecTemplate` (`abi.encode`d, as given) | the 8183 job's `description` (`abi.encode(JobSpec)`) | +| Written by | the provider, once per card version | `JobSpecBuilder`, once per job | +| Holds | everything that is the same for every job, plus **holes** | concrete values for this job | +| Read by | the marketplace, at `openJob` / previews | the hook (at `fund`) and the evaluator (at verify) | +| Defined in | [`libraries/Types.sol`](../../src/agentic-commerce-8183/libraries/Types.sol) | [`libraries/JobSpecTypes.sol`](../../src/agentic-commerce-8183/libraries/JobSpecTypes.sol) | + +The `JobSpec` is the format of the Universal Evaluator V2 design, plus `origin` and `allowedMutability`. +JobSpecTypes is the one definition shared by everything that writes or reads a job's criteria. Its field order is +ABI: reordering or inserting a field changes every description. + +--- + +## The JobSpec + +```solidity +struct JobSpec { // FIELD ORDER IS ABI, decided 2026-10-12 + Read[] reads; + Check[] checks; + Logic[] logic; // logic[0] is the root: the job passes if it passes + AllowedMutability allowedMutability; // copied from the template; not read in this repo + bytes32 origin; // keccak256(abi.encode(marketplace, cardId, cardVersion, principal)) + uint64 executeBy; // the provider must execute before this + uint64 failFinalAt; // a FAIL only counts from a verify started after this +} +``` + +The ABI head is seven words: three offsets (reads, checks, logic), then `allowedMutability`, `origin`, +`executeBy`, `failFinalAt` (`test_MC05_fieldOrder`). + +### Reads: what to look at + +```solidity +struct Read { + string chainNamespace; // namespace only, "eip155" + string chainId; // decimal, e.g. "11155111" + uint16 minConfirmations; // confirmations before the answer counts + address target; // the contract to call + bytes4 selector; // the view function + bytes args; // abi-encoded arguments + bytes outputs; // the function's return types, as type codes + uint8[] field; // which returned value, by ABI position +} +``` + +A read is one view call on one chain. **`chainNamespace` here is the namespace only** (`"eip155"`), with +`chainId` separate: the Read State split of the V2 design. That differs from `AgentCard.chainNamespace`, which is +the full CAIP-2 string `"eip155:"`. + +`outputs` describes the return types so the evaluator can find one value in the answer. Codes: + +| Code | Type | Code | Type | +|---|---|---|---| +| 1 `T_UINT` | `uintN` | 6 `T_BYTES` | `bytes` | +| 2 `T_INT` | `intN` | 7 `T_STRING` | `string` | +| 3 `T_BOOL` | `bool` | 8 `T_TUPLE` | tuple / struct: followed by its field count, then each field's type | +| 4 `T_ADDRESS` | `address` | 9 `T_ARRAY` | `T[]`: followed by the element type | +| 5 `T_BYTESN` | `bytesN` | 10 `T_FIXED_ARRAY` | `T[k]`: followed by `k`, then the element type | + +The top level is always a tuple of the return values. For example, `balanceOf(address) returns (uint256)` is +`[T_TUPLE, 1, T_UINT]`. + +`field` is the path to the value: at a tuple, the field index; at an array, the element index. `[0]` is the first +return value; `[0, 2]` is the first return value's third field. + +How the evaluator turns the selected value into a number (from the V2 design; a test-only copy of its decoder is +[`test/8183-tests/helpers/V2Decoder.sol`](../../test/8183-tests/helpers/V2Decoder.sol)): + +| Leaf | Value compared | +|---|---| +| uint / int | the number (a uint above `int256.max` is "can't tell") | +| bool | 0 or 1 | +| address, bytesN | the raw word (compare with `EQUAL` / `NOT_EQUAL`) | +| bytes, string | `keccak256` of the content | +| array | its length | + +### Checks: what to compare + +```solidity +struct Check { + uint8 read; // index into reads + Evaluation evaluation; + Operation operation; // EQUAL, NOT_EQUAL, GREATER_THAN, GREATER_OR_EQUAL, LESS_THAN, LESS_OR_EQUAL + int256 target; // in the contract's own units +} +``` + +| `Evaluation` | Compares | +|---|---| +| `BOOLEAN` | the value now, as a bool | +| `COMPARE` | the value now | +| `NUMBER` | the change since the baseline the hook takes at `fund` (V2 UniversalHook) | +| `PERCENTAGE` | the percentage change since that baseline | + +The ordinals are those of the v1 names (`BOOL`, `CMP`, `NUM`, `PCT` and `EQ` … `LTE`), so the encoding did not +change, only the names. + +### Logic: the pass logic + +```solidity +enum LogicKind { ALL, ANY, AT_LEAST } + +struct Logic { + LogicKind kind; + uint8[] checks; // indexes into checks + uint8[] children; // indexes into logic, each greater than this step's own index + uint8 k; // AT_LEAST only +} +``` + +`logic[0]` is the root. A step combines its checks and its child steps: `ALL` is AND, `ANY` is OR, `AT_LEAST` +needs `k` of the step's checks and children together to pass. Children always have a higher index than their +parent, so the tree has no cycles and can be evaluated from the last step to the first. A step's checks are leaves, +so there is no separate `CHECK` kind (v1's `Node` had one). + +**The marketplace never evaluates `logic`.** It copies the template's array verbatim; the semantics above are the +evaluator's, and are stated here only so a card can be read. They are evaluator-owned. + +### `allowedMutability` + +```solidity +enum AllowedMutability { NONE, CLIENT, PROVIDER, BOTH } +``` + +Who may propose a replacement JobSpec at `setBudget`. Carried, not enforced: the builder copies whatever the +template says and nothing in this repo reads it (`test_JB12_copiesLogicAndMutability`). + +### Timing + +- **`executeBy`**: the provider must have executed by then. +- **`failFinalAt = executeBy + card.settleWindow`**: a FAIL verdict only counts from a verify started after this, + so slow settlement on the destination chain is not misread as failure. + +The marketplace guarantees `executeBy ≥ now + minExecuteWindow` and `failFinalAt ≤ expiredAt` (`openJob` step 5). + +### `origin` + +`keccak256(abi.encode(marketplace, cardId, cardVersion, principal))`. The hook and evaluator ignore it. It ties +the job to the card version it was opened from, and it is what makes an intent signed against one version +unusable on another: the version is inside the signed calldata. + +--- + +## The template + +```solidity +struct JobSpecTemplate { + ReadTemplate[] reads; + CheckTemplate[] checks; + Logic[] logic; // copied verbatim + AllowedMutability allowedMutability; // copied verbatim + ParamBounds[] params; // one entry per per-job number the user supplies +} +``` + +### ReadTemplate: a Read with fills + +```solidity +struct ReadTemplate { + string chainNamespace; // "eip155" + string chainId; + uint16 minConfirmations; + address target; + bytes4 selector; + bytes args; // with placeholder words + Fill[] fills; // what to write into args per job + bytes outputs; + uint8[] field; +} + +enum FillSource { CEA, PARAM } + +struct Fill { + uint8 word; // overwrites args[32·word : 32·word + 32] + FillSource source; + uint8 param; // PARAM only: index into the job's params +} +``` + +| Fill source | Word written | +|---|---| +| `CEA` | the AGW's CEA **on this read's chain**, as a 32-byte word | +| `PARAM` | the job's `params[param]`, as a 32-byte word (two's complement for negatives) | + +A CEA fill is how criteria name "this user's account": `balanceOf(CEA)`, `ownerOf(tokenId) == CEA`, and so on. +The CEA is derived per read chain, so one template can read two chains, each with that chain's CEA. (The SDK maps +its word `WALLET` to `FillSource.CEA` / `TargetSource.CEA`.) + +### CheckTemplate: a Check with a target source + +```solidity +enum TargetSource { FIXED, PRINCIPAL_BPS, PARAM, CEA } + +struct CheckTemplate { + uint8 read; + Evaluation evaluation; + Operation operation; + TargetSource source; + int256 value; +} +``` + +| Source | `value` means | Target | +|---|---|---| +| `FIXED` | the target | `value` | +| `PRINCIPAL_BPS` | basis points of the principal | `principal × value / 10 000`, rounded down | +| `PARAM` | an index into the job's params | `params[value]` | +| `CEA` | unused | the AGW's CEA on the check's read chain, as `int256(uint160(cea))` | + +`PRINCIPAL_BPS` is how criteria scale with the job's size ("at least 99.99% of the principal arrived"). + +### ParamBounds: per-job numbers + +```solidity +struct ParamBounds { int256 min; int256 max; } // inclusive +``` + +A template may declare numbers the user picks per job (a minimum swap output, a tick range, …). The job supplies +exactly one value per entry, each inside its bounds. The values feed `PARAM` fills and `PARAM` targets. Units are +the provider's, described in the card's metadata. + +--- + +## Building a JobSpec + +[`JobSpecBuilder.build`](../../src/agentic-commerce-8183/libraries/JobSpecBuilder.sol), called at `openJob` +step 9 and by both preview views: + +1. **Decode** the `JobSpecTemplate`. Undecodable bytes revert in `abi.decode`. +2. **Params**: `params.length == template.params.length`, else `ParamCountMismatch(expected, actual)`; each + `min ≤ params[i] ≤ max`, else `ParamOutOfRange(i, value)`. +3. **CEAs**: for each read with a CEA fill, and each read a `CEA`-target check names, get + `computeCEA(agw, keccak256(namespace ":" chainId))` from the marketplace, once per read. A chain without a + CEA deployment reverts `ChainNotSupported(chainHash)`. +4. **Reads**: copy each read; copy its `args` into a fresh buffer; apply each fill. A fill must satisfy + `32·word + 32 ≤ args.length`, else `FillOutOfBounds(read, fill)`. This bound check is what makes the one + inline-assembly `mstore` safe. +5. **Checks**: copy `read`, `evaluation`, `operation`; resolve the target. For `PRINCIPAL_BPS`, if + `principal > type(uint256).max / bps`, revert `TargetOverflow(check)`. Once the product fits, the quotient is at + most `uint256.max / 10 000`, which always fits in `int256`, so the cast cannot truncate. +6. **`logic`** and **`allowedMutability`** copied verbatim. `executeBy`, `failFinalAt = executeBy + settleWindow`, + `origin`. +7. Return `abi.encode(spec)`. + +**Not checked:** whether the criteria make sense or can be run. That covers caps on the number of reads, checks +or logic steps; outputs that are not valid type codes; fields that point nowhere; reads no check uses; +unreachable steps; `allowedMutability` values; and trivially true criteria. All of these build as given +(`test_JB08_doesNotJudgeTheTemplate`). The caps `MAX_READS` (16), `MAX_CHECKS` (16) and `MAX_LOGIC` (32) in +JobSpecTypes are the evaluator's, not enforced here. An out-of-range index (a check's `read`, a fill's `param`, a +`PARAM` target) panics. Anything that reverts here makes `openJob` and both previews of that card revert. + +The result is deterministic for a given card version, job inputs and CEA configuration +(`testFuzz_JB11_deterministic`). + +--- + +## Worked example: a lending card + +"Deposit the principal into Aave v3 on Sepolia, at a supply rate of at least 4%." This is the test fixture's card +(`_lendingTemplate` and `_rules` in [`UniversalMarketplace.t.sol`](../../test/8183-tests/UniversalMarketplace.t.sol)) +and the V2 design doc's lending example. + +**Card:** `chainNamespace = "eip155:11155111"`, `settleWindow = 2 h`, `paymentToken` = the kernel's token. + +**Rules** (`_cardRules` in [`helpers/RulesFixtures.sol`](../../test/8183-tests/helpers/RulesFixtures.sol)): + +``` +assets [ {pUSDC (Sepolia PRC20), maxPerCall: MARKER_PRINCIPAL, maxTotal: MARKER_PRINCIPAL} ] +principalAsset 0 +maxGasPerCall 1e18 +allowedCalls[0] USDC.approve pins [ {4, EQ, Pool}, {36, MAX, MARKER_PRINCIPAL} ] +allowedCalls[1] Pool.supply(address,uint256,address,uint16) pins [ {68, EQ, MARKER_WALLET} ] +allowedCalls[2] USDC.transfer beneficiary at offset 4, no pins +``` + +For a 500 USDC job, the signed session holds `{pUSDC, 500e6, 500e6}`, the approve amount pin `bytes32(500e6)`, and +the supply pin the CEA word. + +**Template:** + +``` +reads[0] eip155 / 11155111, 12 confirmations + aUSDC.balanceOf(address) args = 32 zero bytes fills = [word 0 ← CEA] + outputs = [TUPLE 1, UINT] field = [0] +reads[1] eip155 / 11155111, 12 confirmations + Pool.getReserveData(address) args = abi.encode(USDC) fills = [] + outputs = [TUPLE 1, TUPLE 15, (TUPLE 1, UINT), UINT×7, ADDRESS×4, UINT×3] + field = [0, 2] (the struct's 3rd field: currentLiquidityRate) +checks[0] read 0, COMPARE, GREATER_OR_EQUAL, PRINCIPAL_BPS, 9999 "deposited ≥ 99.99% of principal" +checks[1] read 1, COMPARE, GREATER_OR_EQUAL, FIXED, 0.04e27 "rate ≥ 4% (ray)" +logic [ {ALL, checks [0, 1], children [], k 0} ] +allowedMutability NONE +params [] +``` + +**A job:** principal 500 USDC (`500e6`), `executeBy = now + 1 h`, for wallet 0 of the user. + +**Built JobSpec:** + +``` +reads[0].args = abi.encode(CEA(agw, "eip155:11155111")) +checks[0].target = 500e6 × 9999 / 10 000 = 499 950 000 +checks[1].target = 0.04e27 +logic = [ {ALL, checks [0, 1], children [], k 0} ] +allowedMutability = NONE +origin = keccak256(abi.encode(marketplace, cardId, 1, 500e6)) +executeBy = now + 1 h +failFinalAt = now + 3 h +``` + +The evaluator later passes the job if both checks pass: the CEA's aUSDC balance is at least 499.95 USDC, and +Aave's current supply rate is at least 4%. + +`test_MC01_lendingExample_equalsV2Doc` builds the same template on Ethereum (the design doc's chain) and compares +the result, field by field and byte for byte, with the V2 design doc's JobSpec written by hand in the new field +order. The fork test `test_fork_openJob_realAGWv6` decodes the description of a job opened through the real AGW +v6 and checks this `logic`, `allowedMutability` and `origin`. + +## Worked example: a swap card with a user param + +"The CEA receives at least `minOut` WETH." `minOut` is chosen by the user per job. + +``` +reads[0] eip155 / 11155111, 3 confirmations + WETH.balanceOf(address) args = 32 zero bytes fills = [word 0 ← CEA] + outputs = [TUPLE 1, UINT] field = [0] +checks[0] read 0, NUMBER, GREATER_OR_EQUAL, PARAM, 0 "balance grew by ≥ params[0]" +logic [ {ALL, checks [0], children [], k 0} ] +allowedMutability NONE +params [ {min: 1, max: 1e30} ] +``` + +A job with `params = [0.38e18]` gets `checks[0].target = 0.38e18` and the same one-step `logic` +(`test_MC02_swapExample_equalsV2Doc`). `NUMBER` compares the change since the baseline the V2 UniversalHook takes +at `fund`, so WETH the CEA already held doesn't count. (The interim RulesBindingHook takes no baseline; `NUMBER` +and `PERCENTAGE` checks need the V2 hook.) A job with `params = [0]` reverts `ParamOutOfRange(0, 0)`; one with no +params reverts `ParamCountMismatch(1, 0)`. + +Trees with child steps are built the same way. "(Aave deposited AND Aave ≥ 4%) OR (Morpho deposited AND Morpho +rate ≥ 4%)" is `logic = [ {ANY, checks [], children [1, 2]}, {ALL, checks [0, 1]}, {ALL, checks [2, 3]} ]`, and +"at least 2 of Aave, Morpho, Spark" is `[ {AT_LEAST, checks [0, 1, 2], children [], k 2} ]` +(`test_MC03_orAndAtLeastExamples`). + +--- + +## What the SDK must do + +- **Build templates from ABIs**: `outputs` and `field` from the function's ABI and the chosen return field, and + CEA fills where the CEA appears in the arguments. +- **Render every check and the `logic` tree in words before the user signs.** The template is not judged + on-chain; what the user sees is their protection, together with the verified tag. +- **Fill the card's markers into the session** exactly as README §6.1 tables them, and wrap the terms in the v6 + envelope `abi.encode(uint16 1, chain, abi.encode(UniversalTerms))`. +- **Use `previewIntent`** to get the exact intent to sign, so the signed calldata hash covers the built criteria. +- **Derive the CEA independently** from the destination `CEAFactory` for the session's `expectedCEA` and + `MARKER_WALLET` pins, and treat a disagreement with `computeCEA` as an error. diff --git a/plan/marketplace/contracts/docs/universalmarketplace/reference.md b/plan/marketplace/contracts/docs/universalmarketplace/reference.md new file mode 100644 index 00000000..ee4776e1 --- /dev/null +++ b/plan/marketplace/contracts/docs/universalmarketplace/reference.md @@ -0,0 +1,490 @@ +# Universal Marketplace — Reference + +Every function, event, error, type, constant and storage slot of the Universal Marketplace package. For how they +fit together, read [`README.md`](./README.md) first. Section numbers like "§8" refer to that file. + +- [UniversalMarketplace](#universalmarketplace) + - [Initialization](#initialization) + - [Admin functions](#admin-functions) + - [Card functions](#card-functions) + - [openJob](#openjob) + - [Views](#views) + - [Constants](#constants) + - [Storage layout](#storage-layout) +- [UniversalMarketplaceRules](#universalmarketplacerules) +- [JobSpecBuilder](#jobspecbuilder) +- [RulesBindingHook (interim hook)](#rulesbindinghook-interim-hook) +- [Types](#types) +- [Markers](#markers) +- [Events](#events) +- [Errors](#errors) + +--- + +## UniversalMarketplace + +[`src/agentic-commerce-8183/UniversalMarketplace.sol`](../../src/agentic-commerce-8183/UniversalMarketplace.sol). +Inherits OZ `Initializable`, `AccessControlUpgradeable`, `PausableUpgradeable`, `ReentrancyGuardUpgradeable` and +`IUniversalMarketplace`. Deployed behind a `TransparentUpgradeableProxy`. It has no payable function and holds +no funds. `version()` returns `"2.0.0"`. + +### Initialization + +#### `constructor()` +Calls `_disableInitializers()`, so the implementation itself can never be initialized. + +#### `initialize(InitParams calldata p)` — `initializer` + +| Step | Effect | +|---|---| +| 1 | Reverts `ZeroAddress()` if `agwFactory`, `kernel`, `rules` or `admin` is zero. | +| 2 | Initializes AccessControl, Pausable and ReentrancyGuard. | +| 3 | Stores `AGW_FACTORY`, `KERNEL`, `RULES`. | +| 4 | `PUSH_CHAIN_HASH = keccak256("eip155:" ‖ decimal(block.chainid))`. | +| 5 | `_setHook(p.hook)`: `ZeroAddress()` if zero, `HookNotWhitelisted()` unless `KERNEL.whitelistedHooks(hook)`; emits `HookUpdated`. | +| 6 | `_setEvaluator(p.evaluator)`: `ZeroAddress()` if zero; emits `EvaluatorUpdated`. | +| 7 | Grants `DEFAULT_ADMIN_ROLE` and `ADMIN_ROLE` to `p.admin`. | + +A second call reverts `InvalidInitialization()` (OZ). + +### Admin functions + +All are `onlyRole(ADMIN_ROLE)`; a non-admin caller gets `AccessControlUnauthorizedAccount(caller, ADMIN_ROLE)`. +None is pausable. + +#### `setHook(address hook)` +Sets the hook every **new** job is created with. Reverts `ZeroAddress()` or `HookNotWhitelisted()`. Emits +`HookUpdated(hook)`. Existing jobs keep the hook the kernel recorded at creation. + +#### `setEvaluator(address evaluator)` +Sets the evaluator every **new** job is created with. Reverts `ZeroAddress()`. Emits `EvaluatorUpdated(evaluator)`. +Not checked against providers: a card whose provider is now the evaluator is refused at `openJob` +(`ProviderIsEvaluator()`). + +#### `setCEADeployment(bytes32 chainHash, address ceaFactory, address ceaProxyImpl)` +Records a destination chain's CEA factory and proxy implementation, which enables the chain for cards and for +criteria reads and sets the CEA derivation (§9). + +| Arguments | Effect | +|---|---| +| both zero | `delete ceaDeployment[chainHash]`: the chain then reports `ChainNotSupported(chainHash)` everywhere | +| exactly one zero | reverts `ZeroAddress()` | +| both non-zero | sets the entry | + +Emits `CEADeploymentSet(chainHash, ceaFactory, ceaProxyImpl)` when it does not revert. Rotation runbook: +`pause()` → rotate on the destination → `setCEADeployment` → `unpause()`. + +#### `setAgentRating(address agent, uint256 rating)` +`_agentRating[agent] = rating`; emits `AgentRatingSet(agent, rating)`. No validation. A placeholder until +VerifiedRatings is wired. + +#### `pause()` / `unpause()` +OZ Pausable. While paused, `registerAgentCard`, `updateAgentCard` and `openJob` revert `EnforcedPause()`. Admin +functions, `setAgentCardActive` and every view stay live. + +#### `disableAgentCard(uint256 cardId)` +Permanently disables a card: `isAgentCardDisabled = true`, `active = false`, verified tag cleared. Reverts +`AgentCardInactive()` for an unknown card. Emits `AgentCardVerificationRevoked(cardId)` (only if it was verified), +then `AgentCardDisabled(cardId)`. Nothing re-enables it. `agentCardOf[provider]` is kept, so the provider cannot +register again. + +#### `verifyAgentCard(uint256 cardId, uint256 cardVersion)` +Sets the verified tag for the card's current version. + +| Revert | When | +|---|---| +| `AgentCardInactive()` | unknown card | +| `AgentCardDisabled(cardId)` | disabled card | +| `AgentCardVersionMismatch(cardVersion, current)` | `cardVersion` is not the current version, e.g. the card changed after review | + +Allowed for a card its provider switched off. Emits `AgentCardVerified(cardId, cardVersion)`. + +#### `revokeAgentCardVerification(uint256 cardId)` +Clears the tag. Reverts `AgentCardInactive()` for an unknown card. Idempotent: emits +`AgentCardVerificationRevoked(cardId)` only if the card was verified. + +### Card functions + +#### `registerAgentCard(AgentCard calldata c, bytes calldata rules, bytes calldata jobSpecTemplate) returns (uint256 cardId)` — `whenNotPaused` + +| Step | Effect | +|---|---| +| 1 | `AgentCardAlreadyRegistered(msg.sender)` if `agentCardOf[msg.sender] != 0`. | +| 2 | `_validateCard(c, rules)`: the 13 checks of README §4.2, in order. | +| 3 | `cardId = ++agentCardCount` (ids start at 1). | +| 4 | Stores the card, then overwrites `provider = msg.sender` and `active = true`. | +| 5 | Stores both blobs as given; `agentCardVersion = 1`; `agentCardOf[msg.sender] = cardId`. | +| 6 | Emits `AgentCardRegistered(cardId, msg.sender, jobType, chainNamespace, keccak256(rules), keccak256(jobSpecTemplate), metadataHash, providerFee)`. | + +`jobSpecTemplate` is **not** checked (§7.3). `rules` must decode as `AgentCardRules`; undecodable bytes revert +in `abi.decode` with no data. + +#### `updateAgentCard(uint256 cardId, AgentCard calldata c, bytes calldata rules, bytes calldata jobSpecTemplate)` — `whenNotPaused` + +| Step | Effect / revert | +|---|---| +| 1 | `CallerIsNotProvider()` unless the card exists and `msg.sender` is its provider. | +| 2 | `AgentCardDisabled(cardId)` if disabled. | +| 3 | `AgentCardIdentityImmutable()` if `c.chainNamespace` differs from the stored one. | +| 4 | `_validateCard(c, rules)`, as at registration. | +| 5 | Writes `jobType`, `metadataURI`, `metadataHash`, `providerFee`, `paymentToken`, `principalMin`, `principalMax`, `minDuration`, `maxDuration`, `minExecuteWindow`, `settleWindow`; replaces both blobs. `provider`, `chainNamespace` and `active` stay. | +| 6 | `version = ++agentCardVersion[cardId]`; clears the verified tag (emits `AgentCardVerificationRevoked` if there was one). | +| 7 | Emits `AgentCardUpdated(cardId, version, keccak256(rules), keccak256(jobSpecTemplate), metadataHash, providerFee)`. | + +Opened jobs are untouched (`test_ML12`). Intents signed against the previous version stop working (§4.3). + +#### `setAgentCardActive(uint256 cardId, bool active)` +Provider only (`CallerIsNotProvider()`, also for an unknown card). Switching on a disabled card reverts +`AgentCardDisabled(cardId)`; switching it off is allowed. Emits `AgentCardStatusChanged(cardId, active)`. Not +pausable. + +### openJob + +#### `openJob(OpenJobParams calldata p) returns (uint256 jobId, address agw, bytes32 rulesId)` — `whenNotPaused nonReentrant` + +Deploys the AGW if needed, grants it the card's rules and creates the job. The 16 steps, checks and errors are in +§8. Records `cardOfJob`, `agwOfJob`, `rulesOfJob`, `cardVersionOfJob` and the wallet's last job. Emits +`JobOpened(cardId, intent.owner, agw, jobId, rulesId, principal, cardVersion)`. + +`OpenJobParams`: + +| Field | Meaning | +|---|---| +| `cardId` | the card | +| `cardVersion` | the version the owner signed against; must equal the current version | +| `job` | `JobInputs{principal, expiredAt, executeBy, params}` | +| `session` | the rules (SmartSession `Session`) the owner signed, markers filled | +| `intent` | the owner-signed `OwnerIntent` (from `previewIntent`) | +| `sig` | the owner's signature over the intent | +| `label` | wallet label, used only when deploying a new wallet | + +Calls made, in order, after every check: `AGW_FACTORY.deployWalletWithSig` (new wallet) or +`AGW_FACTORY.ownerOf` (existing wallet); `AGW.grantRulesWithSig`; `KERNEL.jobCounter`; `AGW.executeWithSig`; +`KERNEL.jobCounter`; `KERNEL.getJob`. + +### Views + +| View | Returns | Notes | +|---|---|---| +| `getAgentCard(uint256 cardId)` | `AgentCardView{card, rules, jobSpecTemplate, version, verified, disabled}` | All zero for an unknown card. | +| `isAgentCardVerified(uint256 cardId)` | `bool` | Verified at the current version. | +| `isAgentCardDisabled(uint256 cardId)` | `bool` | | +| `agentCardVersion(uint256 cardId)` | `uint256` | 1 at registration, +1 per update, 0 if unknown. | +| `agentCardCount()` | `uint256` | The last card id. | +| `agentCardOf(address provider)` | `uint256` | The provider's card id; 0 for none. | +| `getAgentRating(address agent)` | `uint256` | 0 by default. | +| `activeJobOf(address agw)` | `uint256` | The AGW's last job opened here while it is Funded, Submitted, or Open with `block.timestamp < expiredAt`; else 0 (§10). | +| `cardOfJob(uint256 jobId)` / `agwOfJob` / `rulesOfJob` / `cardVersionOfJob` | card id / AGW / `rulesId` / card version | Recorded by `openJob`; zero for jobs not opened here. | +| `ceaDeployment(bytes32 chainHash)` | `(address ceaFactory, address ceaProxyImpl)` | Zero if unconfigured or cleared. | +| `computeCEA(address agw, bytes32 chainHash)` | `address` | The AGW's CEA on that chain (§9). Reverts `ChainNotSupported(chainHash)` if unconfigured. | +| `buildCreateJobCalldata(uint256 cardId, address owner, uint96 index, JobInputs job)` | `(bytes32 mode, bytes executionCalldata)` | Exactly what `openJob` executes for wallet `index` of `owner`. Reverts `AgentCardInactive()` for an unknown card, and like step 9 on a bad template or bad inputs. | +| `previewIntent(IntentRequest r, Session s)` | `OwnerIntent` | The intent to sign (§8). Nonces are read from the wallet, or 0 if not yet deployed. Reverts like `buildCreateJobCalldata`. | +| `AGW_FACTORY()`, `KERNEL()`, `RULES()` | addresses | Set once at `initialize`. | +| `PUSH_CHAIN_HASH()` | `bytes32` | `keccak256("eip155:" ‖ block.chainid)` at initialization. | +| `hook()`, `evaluator()` | addresses | Admin-settable. | +| `version()` | `string` | `"2.0.0"` (`pure`). | +| `hasRole`, `paused`, … | | OZ AccessControl and Pausable views. | + +`previewIntent` output: + +| Field | Value | +|---|---| +| `owner`, `index`, `deadline`, `signerChainId` | from the request | +| `wallet` | `AGW_FACTORY.predictWallet(owner, index)` | +| `executor` | the marketplace | +| `sessionHash` | `keccak256(abi.encode(session))` | +| `mode` | `MODE_SINGLE` (0) | +| `execCalldataHash` | `keccak256(buildCreateJobCalldata(...))` | +| `nonceKey` | `OPENJOB_LANE` | +| `nonceSeq` | `AGW.getNonce(OPENJOB_LANE)` if deployed, else 0 | +| `grantNonce` | `AGW.grantNonce()` if deployed, else 0 | + +Removed in v2: `setUniversalPaused`, `isUniversalPaused`, `isAGWFree`, the public `lastJobOf`, `expectedCEAOf`, +`startJob`, `registerCard`, `modifyAgentCard`, `setCardActive`, `adminDisableCard`, `getCard`, `isCardVerified`, +`isCardAdminDisabled`, `cardVersion`, `cardCount`, `TERMS`, `pushChainHash`, `STARTJOB_LANE`. + +### Constants + +| Constant | Value | Use | +|---|---|---| +| `ADMIN_ROLE` | `keccak256("ADMIN_ROLE")` | every admin function | +| `OPENJOB_LANE` | `OWNER_LANE_FLAG` (`1 << 191`, imported from AGW v6) | the AGW nonce lane `openJob`'s execution uses (owner lane, key 0) | +| `MODE_SINGLE` | `bytes32(0)` | ERC-7579 single call, default exec type | +| `MIN_DURATION` (internal) | `1 hours` | lower bound on a card's `minDuration` | +| `EVM_PREFIX` (internal) | `"eip155:"` | required prefix of a card's `chainNamespace` | + +### Storage layout + +Append-only from this layout. OZ upgradeable bases use ERC-7201 namespaced storage and occupy none of these +slots, so slot 0 is the marketplace's. Pinned by `test_MV09_storageLayout_bySlot`. + +| Slot | Variable | Type | +|---|---|---| +| 0 | `AGW_FACTORY` | `IAGWFactory` | +| 1 | `KERNEL` | `IAgenticCommerce` | +| 2 | `hook` | `address` | +| 3 | `evaluator` | `address` | +| 4 | `PUSH_CHAIN_HASH` | `bytes32` | +| 5 | `RULES` | `IUniversalMarketplaceRules` | +| 6 | `agentCardCount` | `uint256` | +| 7 | `_cards` | `mapping(uint256 => AgentCard)` | +| 8 | `_agentCardRules` | `mapping(uint256 => bytes)` | +| 9 | `_jobSpecTemplates` | `mapping(uint256 => bytes)` | +| 10 | `agentCardVersion` | `mapping(uint256 => uint256)` | +| 11 | `isAgentCardVerified` | `mapping(uint256 => bool)` | +| 12 | `isAgentCardDisabled` | `mapping(uint256 => bool)` | +| 13 | `ceaDeployment` | `mapping(bytes32 => CEADeployment)` | +| 14 | `__reserved14` | `uint256`, always 0 (was the per-chain pause) | +| 15 | `_lastJobOf` | `mapping(address => uint256)` | +| 16 | `cardOfJob` | `mapping(uint256 => uint256)` | +| 17 | `agwOfJob` | `mapping(uint256 => address)` | +| 18 | `rulesOfJob` | `mapping(uint256 => bytes32)` | +| 19 | `agentCardOf` | `mapping(address => uint256)` | +| 20 | `cardVersionOfJob` | `mapping(uint256 => uint256)` | +| 21 | `_agentRating` | `mapping(address => uint256)` | +| 22–48 | `__gap` | `uint256[27]` | + +--- + +## UniversalMarketplaceRules + +[`src/agentic-commerce-8183/UniversalMarketplaceRules.sol`](../../src/agentic-commerce-8183/UniversalMarketplaceRules.sol), +implementing [`IUniversalMarketplaceRules`](../../src/agentic-commerce-8183/interfaces/IUniversalMarketplaceRules.sol). +Stateless and `pure`, with no admin and no upgrade. Split out of the marketplace for EIP-170. Reverts with +`UniversalMarketplaceErrors`, so its reverts bubble through the marketplace unchanged. + +| Constant | Value | +|---|---| +| `MAX_ALLOWED_CALLS` | 32 (URP's allow-list bound; internal there, so mirrored) | +| `ERC20_TRANSFER` / `ERC20_APPROVE` / `ERC20_TRANSFER_FROM` | `IERC20.transfer/approve/transferFrom.selector` (`0xa9059cbb` / `0x095ea7b3` / `0x23b872dd`) | +| `ERC20_INCREASE_ALLOWANCE` | `bytes4(keccak256("increaseAllowance(address,uint256)"))` (`0x39509351`) | +| `MAX_ASSETS`, `MAX_PINS`, `MAX_ALLOWED_CALL_PINS`, `ENVELOPE_VERSION` | 8, 8, 32, 1 (imported from AGW v6 `Types.sol`) | +| `MARKER_WALLET`, `MARKER_PRINCIPAL` | imported from the package's `Types.sol` ([Markers](#markers)) | + +#### `validateAgentCardRules(bytes calldata rules) external pure returns (address[] memory tokens)` + +Decodes `AgentCardRules` with `abi.decode` (malformed bytes revert without data). Then runs the checks below **in +this order**, reverting `InvalidAgentCard(reason)`. Returns `tokens[i] = assets[i].token` for every asset. + +| # | Check | Reason | +|---|---|---| +| R1 | `1 <= assets.length <= MAX_ASSETS` | `"asset count"` | +| R2 | `principalAsset < assets.length` | `"principal asset"` | +| R3 | for each asset `i`: `token != address(0)` | `"asset zero"` | +| R4 | for each `i`, no `j < i` with the same token | `"duplicate asset"` | +| R5 | `assets[principalAsset].maxTotal == uint256(MARKER_PRINCIPAL)` | `"principal total not marker"` | +| R6 | `assets[principalAsset].maxPerCall != 0` (it is the marker or a fixed number > 0) | `"principal per-call zero"` | +| R7 | for each `i != principalAsset`: `maxPerCall != uint256(MARKER_PRINCIPAL)` and `maxTotal != uint256(MARKER_PRINCIPAL)` | `"marker off principal asset"` | +| R8 | `1 <= allowedCalls.length <= MAX_ALLOWED_CALLS` | `"allow-list size"` | +| R9 | for each call: `pins.length <= MAX_PINS`, and the sum over all calls `<= MAX_ALLOWED_CALL_PINS` | `"too many pins"` | +| R10 | for each pin: if `value == MARKER_WALLET` then `op == PinOp.EQ` | `"wallet marker op"` | +| R11 | for each call `i`, no `j < i` with byte-identical content (`keccak256(abi.encode(calls[i])) == keccak256(abi.encode(calls[j]))`) | `"duplicate call"` | +| R12 | for each call `i`, if some `j != i` has the same `(target, selector)`, then **both** have `pins.length > 0` (a pinless entry beside a pinned one makes the pins pointless, per the v6 docs) | `"unpinned duplicate"` | +| R13 | `selector == ERC20_INCREASE_ALLOWANCE` is refused | `"increaseAllowance"` | +| R14 | `selector == ERC20_APPROVE` requires a pin `{offset: 4, op: EQ, value: v}` where `v != 0`, `uint256(v) >> 160 == 0` (a clean address word), and `v` is not a marker | `"approve spender not pinned"` | +| R15 | `selector == ERC20_APPROVE` requires a pin `{offset: 36, op: MAX, value: w}` where `w` is `MARKER_PRINCIPAL` or any fixed value | `"approve amount not capped"` | +| R16 | `selector == ERC20_TRANSFER` requires the recipient (offset 4) pinned to the user's account: `hasBeneficiary && beneficiaryOffset == 4`, **or** a pin `{offset: 4, op: EQ, value: MARKER_WALLET}` | `"erc20 transfer recipient"` | +| R17 | `selector == ERC20_TRANSFER_FROM` likewise at offset 36 | `"erc20 transferFrom recipient"` | + +Implementation notes: each rule runs over every item before the next rule starts. R11/R12 compare across all +entries (O(n²), n ≤ 32). The required pins of R14–R17 may sit anywhere in `pins[]`; extra pins are allowed. R14's +"not a marker" holds through the clean-address-word test, because both markers have non-zero high 96 bits. +Known limit: whether a `MARKER_PRINCIPAL` pin sits on the **principal** token's `approve` is not checked (`IPRC20` +has no source-token view); the verified tag covers it. + +#### `checkRulesMatchCard(bytes calldata cardRules, Session calldata session, SessionContext calldata ctx) external pure` + +`ctx` is `SessionContext{agent, chainHash, principal, expiredAt, expectedCEA}`, filled by the marketplace from the +card, the job and `computeCEA`. Checks **in this order**; the first failure reverts: + +| # | Check | Error | +|---|---|---| +| C1 | `keccak256(session.sessionValidatorInitData) == keccak256(abi.encode(ctx.agent))` | `AgentMismatch()` | +| C2 | `session.actions.length == 1` | `ActionCount()` | +| C3 | `session.actions[0].actionPolicies.length == 1` | `PolicyShape(0)` | +| C4 | let `d = actionPolicies[0].initData`. Require `d.length >= 32` and `uint256(bytes32(d[0:32])) == ENVELOPE_VERSION`, **before any decode**. If `d.length < 32`, revert with actual `0` | `EnvelopeVersionMismatch(uint256 actual)` | +| C5 | `(, string chainNamespace, bytes body) = abi.decode(d, (uint16, string, bytes))`; `keccak256(bytes(chainNamespace)) == ctx.chainHash` | `ChainMismatch(0)` | +| C6 | `UniversalTerms t = abi.decode(body, (UniversalTerms))`; `AgentCardRules c = abi.decode(cardRules, (AgentCardRules))`; `t.assets.length == c.assets.length` | `AssetCountMismatch(c.assets.length, t.assets.length)` | +| C7 | for each `i`: `t.assets[i].token == c.assets[i].token` | `AssetMismatch(i)` | +| C8 | for `i == c.principalAsset`: `t.maxTotal == ctx.principal`; and `t.maxPerCall == ctx.principal` if `c.maxPerCall == uint256(MARKER_PRINCIPAL)`, else `t.maxPerCall == c.maxPerCall` | `PrincipalCapMismatch()` | +| C9 | for each `i != c.principalAsset`: `t.maxPerCall == c.maxPerCall && t.maxTotal == c.maxTotal` | `AssetMismatch(i)` | +| C10 | `t.maxGasPerCall == c.maxGasPerCall` | `GasCapMismatch()` | +| C11 | `t.allowedCalls.length == c.allowedCalls.length`; for each `i`: `target`, `selector`, `beneficiaryOffset`, `hasBeneficiary`, `maxValue` and `pins.length` equal; for each pin `k`: `offset` and `op` equal | `ActionsMismatch()` | +| C12 | for each pin `k` of call `i`: card `value == MARKER_WALLET` ⇒ session `value == bytes32(uint256(uint160(ctx.expectedCEA)))`; card `value == MARKER_PRINCIPAL` ⇒ session `value == bytes32(ctx.principal)`; otherwise session `value ==` card `value` | `PinMismatch(i, k)` | +| C13 | `t.validUntil == ctx.expiredAt` | `ExpiryMismatch()` | +| C14 | `t.expectedCEA == ctx.expectedCEA` | `ExpectedCEAMismatch(ctx.expectedCEA, t.expectedCEA)` | + +C11 and C12 share one loop: per call, the call fields; then per pin, offset and op, then value. Never compared: the +card's `principalAsset` (an index, not a rule), and the session's validator, policy address, action target and +selector, userOp and ERC-7739 lists, paymaster flag and salt — AGW v6 `_grantRules` pins all of them (README +§13.2). Malformed bytes after a correct version word, an undecodable body or undecodable card rules revert in +`abi.decode` without data (`test_MT10_malformedInputs`). + +--- + +## JobSpecBuilder + +[`src/agentic-commerce-8183/libraries/JobSpecBuilder.sol`](../../src/agentic-commerce-8183/libraries/JobSpecBuilder.sol). +An external library: deployed once, linked into the marketplace, called by `DELEGATECALL`. Inlined, it would put +the marketplace over the size limit. + +#### `build(bytes memory jobSpecTemplate, BuildContext memory ctx) public view returns (bytes memory)` +Returns `abi.encode(JobSpec)` for one job: the 8183 job's description. Algorithm and checks are in +[`criteria.md`](./criteria.md#building-a-jobspec). `logic` and `allowedMutability` are copied verbatim. + +`BuildContext{agw, principal, executeBy, settleWindow, params, origin}` comes from the job's inputs, the card's +`settleWindow`, and `origin = keccak256(abi.encode(marketplace, cardId, cardVersion, principal))`. + +The library reads CEAs with `IUniversalMarketplace(address(this)).computeCEA(agw, chainHash)`, with +`chainHash = keccak256(abi.encodePacked(read.chainNamespace, ":", read.chainId))`. Under `DELEGATECALL`, +`address(this)` is the marketplace proxy, so this is an external call back into the marketplace. Called directly +(not through the marketplace), a template that needs a CEA reverts, because the library would ask itself. It has +no storage. + +--- + +## RulesBindingHook (interim hook) + +[`src/agentic-commerce-8183/hooks/RulesBindingHook.sol`](../../src/agentic-commerce-8183/hooks/RulesBindingHook.sol), +on [`BaseERC8183Hook`](../../src/agentic-commerce-8183/hooks/BaseERC8183Hook.sol). Not part of the marketplace, +but every marketplace job is created with it until the V2 UniversalHook ships. Behind a +`TransparentUpgradeableProxy`; storage continues the base at slot 50. + +| Item | Behaviour | +|---|---| +| `initialize(address kernel, address agwFactory, address sessionEngine)` | All non-zero (`ERC8183HookErrors.ZeroAddress()`). Sets `KERNEL`, `AGW_FACTORY`, `SESSION_ENGINE`. | +| `beforeAction` / `afterAction` | Kernel only (`CallerIsNotKernel(caller)`). Acts only in `beforeAction(fund)`; every other action passes through. | +| `beforeAction(fund)` | In order: `fund.optParams` is exactly 32 bytes, `abi.encode(rulesId)` (`InvalidOptParams(length)`); the client is a factory AGW (`CallerIsNotAGW(caller)`); `SESSION_ENGINE.isPermissionEnabled(rulesId, client)` (`RulesNotLive(agw, rulesId)`); `activeJobOf(client) == 0` (`AGWHasLiveJob(agw, liveJobId)`). Then records the binding and the AGW's live job, and emits `RulesBound(jobId, agw, rulesId)`. | +| `rulesOfJob(uint256 jobId)` | The `rulesId` bound at `fund`, or zero. | +| `agwOfJob(uint256 jobId)` | The AGW bound at `fund`, or zero. | +| `activeJobOf(address agw)` | The AGW's last bound job while it is Funded or Submitted; else 0. Narrower than the marketplace's view (README §10). | + +Storage: 50 `AGW_FACTORY`, 51 `SESSION_ENGINE`, 52 `_bindingOf` (`mapping(uint256 => Binding{agw, rulesId})`), +53 `_liveJobOf` (`mapping(address => uint256)`), 54–103 `__gap[50]`. Because the hook runs in `beforeAction`, any +revert leaves the job Open with no escrow moved. A wallet is freed by reading the kernel's job status, so an +unhooked `claimRefund` frees it too. `optParams` stays exactly `abi.encode(rulesId)`. + +--- + +## Types + +All in [`libraries/Types.sol`](../../src/agentic-commerce-8183/libraries/Types.sol), file-level. The built +criteria (`JobSpec`, `Read`, `Check`, `Logic` and the enums) are in +[`libraries/JobSpecTypes.sol`](../../src/agentic-commerce-8183/libraries/JobSpecTypes.sol). The AGW types +(`OwnerIntent`, `AssetCap`, `AllowedCall`, `ArgPin`, `PinOp`, `UniversalTerms`) are imported from +`@push-agw/libraries/Types.sol`; the SmartSession `Session` and its parts are mirrored in +[`interfaces/external/IAGW.sol`](../../src/agentic-commerce-8183/interfaces/external/IAGW.sol). + +| Type | Fields | Notes | +|---|---|---| +| `AgentCard` | `provider`, `jobType`, `metadataURI`, `metadataHash`, `chainNamespace`, `providerFee`, `paymentToken`, `principalMin`, `principalMax`, `minDuration`, `maxDuration`, `minExecuteWindow`, `settleWindow`, `active` | `provider` and `active` are contract-written. `chainNamespace` is the full CAIP-2 string `"eip155:"`, immutable after registration. `providerFee` is in `paymentToken`, which must equal `KERNEL.paymentToken()`; principal is in the principal asset's units; durations and windows in seconds. | +| `AgentCardRules` | `assets` (`AssetCap[]`), `principalAsset` (uint8), `maxGasPerCall`, `allowedCalls` (`AllowedCall[]`) | `abi.encode`d into the card's `rules`. | +| `CEADeployment` | `ceaFactory`, `ceaProxyImpl` | Per destination chain. | +| `AgentCardView` | `card`, `rules`, `jobSpecTemplate`, `version`, `verified`, `disabled` | `getAgentCard`'s return. | +| `JobInputs` | `principal`, `expiredAt` (uint48), `executeBy` (uint48), `params` (int256[]) | Per-job inputs the owner signs. | +| `OpenJobParams` | `cardId`, `cardVersion`, `job`, `session`, `intent`, `sig`, `label` | `openJob`'s argument. | +| `IntentRequest` | `cardId`, `owner`, `index`, `job`, `deadline`, `signerChainId` | `previewIntent`'s argument. | +| `InitParams` | `agwFactory`, `kernel`, `hook`, `evaluator`, `rules`, `admin` | `initialize`'s argument. | +| `SessionContext` | `agent`, `chainHash`, `principal`, `expiredAt`, `expectedCEA` | The rules helper's per-job context. | +| `FillSource`, `Fill`, `ReadTemplate`, `TargetSource`, `CheckTemplate`, `ParamBounds`, `JobSpecTemplate`, `BuildContext` | | The criteria template; see [`criteria.md`](./criteria.md). `CheckTemplate` is `{read, evaluation, operation, source, value}`; `JobSpecTemplate` is `{reads, checks, logic, allowedMutability, params}`. | + +Deleted in v2: `Approval`, `RulesCardTerms`, `CardView`, `StartJobParams`, `EvaluationTemplate`, and the local +copies of `OwnerIntent`, `OWNER_LANE_FLAG`, `AllowedCall`, `UniversalTerms`. + +--- + +## Markers + +Published constants in [`libraries/Types.sol`](../../src/agentic-commerce-8183/libraries/Types.sol); the SDK uses +the same values. Pinned by `test_naming_markers`. + +| Constant | Value | Meaning in a card | +|---|---|---| +| `MARKER_WALLET` | `0x38beb8621ef19c2ac125b45b1ac07225511365301161eb56ac7a21aa8641cf5a` = `keccak256("push.marketplace.marker.WALLET")` | "the user's account (CEA) on the card's chain". EQ pins only (R10). | +| `MARKER_PRINCIPAL` | `0xc12ba2e9bfe16dd303c04d7f517245a6b49fd69f9d0e5c82d14be8c18ef34d52` = `keccak256("push.marketplace.marker.PRINCIPAL")` | "this job's principal". Pins (EQ or MAX) and the principal asset's caps, as `uint256`. | + +How each is filled is the table in README §6.1. Other constants: `ENVELOPE_VERSION` 1, `MAX_ASSETS` 8, `MAX_PINS` 8, +`MAX_ALLOWED_CALL_PINS` 32 (AGW `Types.sol`); `MAX_ALLOWED_CALLS` 32 (rules helper); `OPENJOB_LANE` +`OWNER_LANE_FLAG` (`1 << 191`); `version()` `"2.0.0"`. + +--- + +## Events + +Emitted by the marketplace (declared in `IUniversalMarketplace`, banner UM_1): + +| Event | Emitted by | +|---|---| +| `AgentCardRegistered(uint256 indexed cardId, address indexed provider, bytes32 indexed jobType, string chainNamespace, bytes32 rulesHash, bytes32 jobSpecHash, bytes32 metadataHash, uint256 providerFee)` | `registerAgentCard` | +| `AgentCardUpdated(uint256 indexed cardId, uint256 version, bytes32 rulesHash, bytes32 jobSpecHash, bytes32 metadataHash, uint256 providerFee)` | `updateAgentCard` | +| `AgentCardStatusChanged(uint256 indexed cardId, bool active)` | `setAgentCardActive` | +| `AgentCardDisabled(uint256 indexed cardId)` | `disableAgentCard` | +| `AgentCardVerified(uint256 indexed cardId, uint256 version)` | `verifyAgentCard` | +| `AgentCardVerificationRevoked(uint256 indexed cardId)` | `revokeAgentCardVerification`, `updateAgentCard`, `disableAgentCard` (only when a tag is cleared) | +| `AgentRatingSet(address indexed agent, uint256 rating)` | `setAgentRating` | +| `HookUpdated(address hook)` | `initialize`, `setHook` | +| `EvaluatorUpdated(address evaluator)` | `initialize`, `setEvaluator` | +| `CEADeploymentSet(bytes32 indexed chainHash, address ceaFactory, address ceaProxyImpl)` | `setCEADeployment` (both zero when clearing) | +| `JobOpened(uint256 indexed cardId, address indexed owner, address indexed agw, uint256 jobId, bytes32 rulesId, uint256 principal, uint256 cardVersion)` | `openJob` | + +`rulesHash = keccak256(rules)` and `jobSpecHash = keccak256(jobSpecTemplate)`, so an indexer can check the blobs +returned by `getAgentCard`. Removed: `UniversalChainPaused`. The hook emits +`RulesBound(uint256 indexed jobId, address indexed agw, bytes32 indexed rulesId)`. OZ emits `RoleGranted`, +`Paused`, `Unpaused`, `Initialized`. + +--- + +## Errors + +All marketplace, rules-helper and builder errors are in the `UniversalMarketplaceErrors` library +([`libraries/Errors.sol`](../../src/agentic-commerce-8183/libraries/Errors.sol)). A library error has the same +selector wherever it is raised, so a helper or builder revert bubbles through `openJob` unchanged. + +Each contract's ABI lists only the errors that contract itself raises. **Decode marketplace reverts with the +`UniversalMarketplaceErrors` artifact**, which lists all 40. + +| Error | Raised by | Status | +|---|---|---| +| `ZeroAddress()` | initialize, setters, `setCEADeployment` (one zero) | unchanged | +| `HookNotWhitelisted()` | `setHook` | unchanged | +| `AgentCardInactive()` | `openJob` step 1, `_requireCard` (unknown card in disable, verify, revoke, `buildCreateJobCalldata`, `previewIntent`) | was `CardInactive` | +| `CallerIsNotProvider()` | update, setActive (also for an unknown card) | unchanged | +| `AgentCardDisabled(uint256 cardId)` | update, setActive(on), verify | was `CardAdminDisabled` | +| `ChainNotSupported(bytes32 chainHash)` | register/update, `computeCEA` (so also `openJob` and the builder) | unchanged | +| `InvalidAgentCard(string reason)` | register/update, rules helper | was `InvalidCard` | +| `AgentCardVersionMismatch(uint256 provided, uint256 current)` | `openJob`, verify | was `CardVersionMismatch` | +| `AgentCardIdentityImmutable()` | update | was `CardIdentityImmutable` | +| `AgentCardAlreadyRegistered(address provider)` | register | **new** | +| `PrincipalOutOfRange()`, `ExpiryOutOfRange()`, `ExecuteByOutOfRange()`, `ProviderIsEvaluator()` | `openJob` | unchanged | +| `ParamCountMismatch(uint256 expected, uint256 actual)`, `ParamOutOfRange(uint256 index, int256 value)`, `TargetOverflow(uint256 check)`, `FillOutOfBounds(uint256 read, uint256 fill)` | builder | unchanged | +| `IntentWalletMismatch(address expected, address provided)`, `ExecutorMismatch(address expected, address actual)`, `IntentSessionMismatch(bytes32 actual)`, `IntentExecMismatch(bytes32 actualCalldataHash)`, `AGWMismatch(address expected, address actual)`, `WalletOwnerMismatch(address expected, address actual)` | `openJob` | unchanged | +| `WalletHasActiveJob(address agw, uint256 jobId)` | `openJob` step 8 | was `AGWBusy` | +| `AgentMismatch()`, `ActionCount()`, `PolicyShape(uint256 i)`, `ChainMismatch(uint256 i)`, `ActionsMismatch()`, `ExpiryMismatch()`, `ExpectedCEAMismatch(address expected, address actual)` | rules helper | unchanged | +| `EnvelopeVersionMismatch(uint256 actual)` | rules helper C4 | **new** | +| `AssetCountMismatch(uint256 expected, uint256 actual)` | rules helper C6 | **new** | +| `AssetMismatch(uint256 index)` | rules helper C7, C9 | **now carries the index** | +| `PrincipalCapMismatch()` | rules helper C8 | was `CapMismatch` | +| `GasCapMismatch()` | rules helper C10 | was `PCCapMismatch` | +| `PinMismatch(uint256 call, uint256 pin)` | rules helper C12 | **new** | +| `UnexpectedJobCount(uint256 before, uint256 afterCount)`, `JobMismatch()` | `openJob` step 15 | unchanged | +| ~~`ChainPaused(bytes32)`~~ | | **deleted** | + +`IntentSessionMismatch` and `IntentExecMismatch` carry the hash the marketplace expected (this session's hash, +this execution's calldata hash). + +### `InvalidAgentCard` reasons + +| Raised by | Reasons | +|---|---| +| marketplace | `"job type zero"`, `"metadata uri empty"`, `"metadata hash zero"`, `"chain namespace"`, `"payment token"` (new), `"provider is evaluator"`, `"principal range"`, `"duration range"`, `"settle window"`, `"execute window"`, `"asset"`, `"asset chain"` | +| rules helper | `"asset count"`, `"principal asset"`, `"asset zero"`, `"duplicate asset"`, `"principal total not marker"`, `"principal per-call zero"`, `"marker off principal asset"`, `"allow-list size"`, `"too many pins"`, `"wallet marker op"`, `"duplicate call"` (now identical entries only), `"unpinned duplicate"`, `"increaseAllowance"`, `"approve spender not pinned"`, `"approve amount not capped"`, `"erc20 transfer recipient"`, `"erc20 transferFrom recipient"` | +| deleted | `"erc20 approval"`, `"approval count"`, `"approval token"`, `"approval spender"`, `"approval cap"`, `"duplicate approval"` | + +### Hook errors + +Unchanged. + +| Library | Error | +|---|---| +| `RulesBindingHookErrors` | `InvalidOptParams(uint256 length)`, `CallerIsNotAGW(address caller)`, `RulesNotLive(address agw, bytes32 rulesId)`, `AGWHasLiveJob(address agw, uint256 liveJobId)` | +| `ERC8183HookErrors` | `CallerIsNotKernel(address caller)`, `ZeroAddress()` | diff --git a/plan/marketplace/contracts/foundry.toml b/plan/marketplace/contracts/foundry.toml new file mode 100644 index 00000000..1f9721f6 --- /dev/null +++ b/plan/marketplace/contracts/foundry.toml @@ -0,0 +1,46 @@ +[profile.default] +src = "src" +out = "out" +libs = ["lib"] +ffi = true +ast = true +build_info = true +extra_output = ["storageLayout"] + +# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options +# Solidity & EVM Specific Configs +solc = "0.8.26" +optimizer = true +optimizer_runs = 99999 +auto_detect_solc = false +evm_version = "shanghai" +via_ir = true +# UniversalMarketplace only: at 99 999 runs the inliner puts it over EIP-170 (26,257 B); at 1 000 runs it is +# 21,284 B. Every other contract keeps the default. +additional_compiler_profiles = [{ name = "marketplace-size", optimizer_runs = 1000 }] +compilation_restrictions = [{ paths = "src/agentic-commerce-8183/UniversalMarketplace.sol", optimizer_runs = 1000 }] + +no_match_coverage = "(PRC20V0\\.sol|testnetV0/UniversalCore\\.sol|ReceiverExample\\.sol|src/(libraries|[Ii]nterfaces|mocks)/|test/)" + +fs_permissions = [{ access = "read-write", path = "deployments/" }, { access = "read", path = "out/" }] + +# Coverage only: drop the per-file profile above. With it, a contract tested both from the marketplace's +# compile job and from its own is two artifacts, and coverage keeps the hits of only one. Run coverage with +# FOUNDRY_PROFILE=coverage; sizes are never measured under coverage. +[profile.coverage] +additional_compiler_profiles = [] +compilation_restrictions = [] + +[fmt] +ignore = ["src/**"] + +[fuzz] +runs = 1024 +max_test_rejects = 65536 +seed = '0x1' + +[profile.ci.fuzz] +runs = 4096 + +[rpc_endpoints] +push_chain_testnet = "${PUSH_CHAIN_TESTNET_RPC_URL}" \ No newline at end of file diff --git a/plan/marketplace/contracts/remappings.txt b/plan/marketplace/contracts/remappings.txt new file mode 100644 index 00000000..89c270a0 --- /dev/null +++ b/plan/marketplace/contracts/remappings.txt @@ -0,0 +1,3 @@ +@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ +@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/ +@push-agw/=lib/push-agentic-wallets/src/ diff --git a/plan/marketplace/contracts/scripts/agentic-commerce-8183/DeployUniversalMarketplace.s.sol b/plan/marketplace/contracts/scripts/agentic-commerce-8183/DeployUniversalMarketplace.s.sol new file mode 100644 index 00000000..e31de845 --- /dev/null +++ b/plan/marketplace/contracts/scripts/agentic-commerce-8183/DeployUniversalMarketplace.s.sol @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {Script, console} from "forge-std/Script.sol"; +import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; + +import {AgenticCommerce} from "../../src/agentic-commerce-8183/AgenticCommerce.sol"; +import {UniversalMarketplace} from "../../src/agentic-commerce-8183/UniversalMarketplace.sol"; +import {UniversalMarketplaceRules} from "../../src/agentic-commerce-8183/UniversalMarketplaceRules.sol"; +import {RulesBindingHook} from "../../src/agentic-commerce-8183/hooks/RulesBindingHook.sol"; +import {InitParams} from "../../src/agentic-commerce-8183/libraries/Types.sol"; + +/// @title DeployUniversalMarketplace +/// @notice Deploys the self-contained UniversalMarketplace stack on Push Donut, bound to AGW v6: +/// kernel (AgenticCommerce, pUSDC) → RulesBindingHook (whitelisted) → UniversalMarketplaceRules → +/// UniversalMarketplace, then registers the CEA deployment of each supported chain. +/// @dev - The broadcaster is the kernel and marketplace admin, the owner of every ProxyAdmin, and the +/// marketplace-wide evaluator (an EOA that completes or rejects jobs by hand) until the real evaluator +/// is wired with `setEvaluator`. +/// - Fees stay zero (the kernel's default). +/// - Env: DEPLOYER_KEY (broadcaster), TREASURE_KEY (its address becomes the kernel's platform treasury). +/// - Run: forge script scripts/agentic-commerce-8183/DeployUniversalMarketplace.s.sol \ +/// --rpc-url $PUSH_CHAIN_TESTNET_RPC_URL --broadcast +contract DeployUniversalMarketplace is Script { + address internal constant PUSDC = 0x7A58048036206bB898008b5bBDA85697DB1e5d66; // USDC.eth (Sepolia) + address internal constant AGW_V6_FACTORY = 0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc; + address internal constant AGW_V6_SESSION_ENGINE = 0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d; + uint256 internal constant DONUT_CHAIN_ID = 42101; + + struct CEAChain { + string namespace; + address ceaFactory; + address ceaProxyImpl; + } + + struct Deployed { + address kernel; + address hook; + address rules; + address marketplace; + } + + function run() external returns (Deployed memory d) { + require(block.chainid == DONUT_CHAIN_ID, "not Push Donut"); + uint256 key = _envKey("DEPLOYER_KEY"); + address me = vm.addr(key); + address treasury = vm.addr(_envKey("TREASURE_KEY")); + + vm.startBroadcast(key); + d.kernel = _proxy( + address(new AgenticCommerce()), me, abi.encodeCall(AgenticCommerce.initialize, (PUSDC, treasury, me)) + ); + d.hook = _proxy( + address(new RulesBindingHook()), + me, + abi.encodeCall(RulesBindingHook.initialize, (d.kernel, AGW_V6_FACTORY, AGW_V6_SESSION_ENGINE)) + ); + AgenticCommerce(d.kernel).setHookWhitelist(d.hook, true); + d.rules = address(new UniversalMarketplaceRules()); + + InitParams memory ip = InitParams({ + agwFactory: AGW_V6_FACTORY, kernel: d.kernel, hook: d.hook, evaluator: me, rules: d.rules, admin: me + }); + d.marketplace = + _proxy(address(new UniversalMarketplace()), me, abi.encodeCall(UniversalMarketplace.initialize, (ip))); + + CEAChain[] memory chains = _ceaChains(); + for (uint256 i; i < chains.length; ++i) { + UniversalMarketplace(d.marketplace).setCEADeployment( + keccak256(bytes(chains[i].namespace)), chains[i].ceaFactory, chains[i].ceaProxyImpl + ); + } + vm.stopBroadcast(); + + _log(d, me, treasury); + } + + /// @dev Accepts a private key with or without the 0x prefix. + function _envKey(string memory name) internal view returns (uint256) { + string memory raw = vm.envString(name); + if (bytes(raw).length == 64) raw = string.concat("0x", raw); + return vm.parseUint(raw); + } + + function _proxy(address impl, address proxyAdminOwner, bytes memory init) internal returns (address) { + return address(new TransparentUpgradeableProxy(impl, proxyAdminOwner, init)); + } + + /// @dev Live factories (gateway-testnet / core-testnet address docs); each proxy impl read from the factory's + /// `CEA_PROXY_IMPLEMENTATION()` on 2026-10-20. + function _ceaChains() internal pure returns (CEAChain[] memory c) { + c = new CEAChain[](4); + c[0] = CEAChain( + "eip155:11155111", 0x8ED594A83301FEc545fC6c19fc12cF7111777029, 0x0a4F7be62B56830070266be81114edB93e68DA09 + ); + c[1] = CEAChain( + "eip155:84532", 0x0A75ca7736b488Eb41675ADc3b3156BACF659F55, 0x6c9Cfef12155bEE91ecD6d0C8f516cABA2890656 + ); + c[2] = CEAChain( + "eip155:421614", 0x88DC189275078Cf509E4Cc773F089c8ad07b7EA2, 0x512d1B8C185a0Fd533a69f8973A3DD6513233009 + ); + c[3] = CEAChain( + "eip155:97", 0x3f1B16e0B072d472951C4563d29d3da6a3EE3Ce8, 0x0ff5d8b7d9Ac3ee2Ad420e9b70Ed6Dc465f593e9 + ); + } + + function _log(Deployed memory d, address me, address treasury) internal pure { + console.log("admin / proxy admin owner / evaluator:", me); + console.log("treasury ", treasury); + console.log("kernel ", d.kernel); + console.log("hook ", d.hook); + console.log("rules ", d.rules); + console.log("marketplace", d.marketplace); + } +} diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/AgenticCommerce.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/AgenticCommerce.sol new file mode 100644 index 00000000..6ccd50cd --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/AgenticCommerce.sol @@ -0,0 +1,376 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {ERC165Checker} from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; +import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; +import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; +import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; + +import {IAgenticCommerce} from "./interfaces/IAgenticCommerce.sol"; +import {IERC8183Hook} from "./interfaces/IERC8183Hook.sol"; + +/// @title AgenticCommerce +/// @notice ERC-8183 job escrow kernel for Push Chain. +/// @dev - Base shape: Virtuals `AgenticCommerceV3`, changed by K-01…K-11 (PRD Appendix A). +/// - Deployed behind `TransparentUpgradeableProxy`; upgrades go through its `ProxyAdmin`. +/// - Single payment token, assumed standard ERC-20 (no fee-on-transfer, no rebasing). +/// - Hooked functions run: checks → beforeAction → effects → transfers → events → afterAction +/// (`complete` interleaves each fee transfer with its event, per PRD §4.1.6). +contract AgenticCommerce is + Initializable, + AccessControlUpgradeable, + PausableUpgradeable, + ReentrancyGuardUpgradeable, + IAgenticCommerce +{ + using SafeERC20 for IERC20; + + /// @inheritdoc IAgenticCommerce + bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); + /// @inheritdoc IAgenticCommerce + uint256 public constant EVALUATOR_GRACE_PERIOD = 1 hours; + /// @inheritdoc IAgenticCommerce + uint256 public constant MIN_EXPIRY_WINDOW = 5 minutes; + /// @inheritdoc IAgenticCommerce + uint256 public constant BPS_DENOMINATOR = 10_000; + + // ───────── storage — slots 0..57, append-only (PRD §4.1.4) ───────── + + /// @inheritdoc IAgenticCommerce + IERC20 public paymentToken; + /// @inheritdoc IAgenticCommerce + uint256 public platformFeeBP; + /// @inheritdoc IAgenticCommerce + address public platformTreasury; + /// @inheritdoc IAgenticCommerce + uint256 public evaluatorFeeBP; + /// @dev Read through `getJob`. + mapping(uint256 => Job) internal jobs; + /// @inheritdoc IAgenticCommerce + uint256 public jobCounter; + /// @inheritdoc IAgenticCommerce + mapping(address => bool) public whitelistedHooks; + /// @inheritdoc IAgenticCommerce + uint256 public totalEscrowed; + uint256[50] private __gap; + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + + /// @notice Initialize the proxy. + /// @dev - Grants `DEFAULT_ADMIN_ROLE` and `ADMIN_ROLE` to `admin_`. + /// - Whitelists `address(0)` so hookless jobs are allowed. + /// - Fees start at 0. + /// @param paymentToken_ The single payment token. + /// @param treasury_ Platform fee recipient. + /// @param admin_ Admin of roles, fees, hooks and pause. + function initialize(address paymentToken_, address treasury_, address admin_) external initializer { + if (paymentToken_ == address(0) || treasury_ == address(0) || admin_ == address(0)) revert ZeroAddress(); + __AccessControl_init(); + __Pausable_init(); + __ReentrancyGuard_init(); + + paymentToken = IERC20(paymentToken_); + platformTreasury = treasury_; + _grantRole(DEFAULT_ADMIN_ROLE, admin_); + _grantRole(ADMIN_ROLE, admin_); + whitelistedHooks[address(0)] = true; + } + + // ═════════════════════════════════ admin ═════════════════════════════════ + + /// @inheritdoc IAgenticCommerce + /// @dev - `claimRefund` stays callable while paused (K-05). + function pause() external onlyRole(ADMIN_ROLE) { + _pause(); + } + + /// @inheritdoc IAgenticCommerce + function unpause() external onlyRole(ADMIN_ROLE) { + _unpause(); + } + + /// @inheritdoc IAgenticCommerce + function setPlatformFee(uint256 feeBP, address treasury) external onlyRole(ADMIN_ROLE) { + if (treasury == address(0)) revert ZeroAddress(); + if (feeBP + evaluatorFeeBP > BPS_DENOMINATOR) revert FeesTooHigh(); + platformFeeBP = feeBP; + platformTreasury = treasury; + emit PlatformFeeUpdated(feeBP, treasury); + } + + /// @inheritdoc IAgenticCommerce + function setEvaluatorFee(uint256 feeBP) external onlyRole(ADMIN_ROLE) { + if (feeBP + platformFeeBP > BPS_DENOMINATOR) revert FeesTooHigh(); + evaluatorFeeBP = feeBP; + emit EvaluatorFeeUpdated(feeBP); + } + + /// @inheritdoc IAgenticCommerce + /// @dev - Affects new jobs only; an existing job keeps calling its hook. + function setHookWhitelist(address hook, bool status) external onlyRole(ADMIN_ROLE) { + if (hook == address(0)) revert ZeroAddress(); + whitelistedHooks[hook] = status; + emit HookWhitelistUpdated(hook, status); + } + + /// @inheritdoc IAgenticCommerce + /// @dev - A detached job behaves as hookless from then on. + function batchDetachHook(uint256[] calldata jobIds) external onlyRole(ADMIN_ROLE) { + uint256 n = jobCounter; + for (uint256 i; i < jobIds.length; ++i) { + uint256 jobId = jobIds[i]; + if (jobId == 0 || jobId > n) revert InvalidJob(); + address oldHook = jobs[jobId].hook; + if (oldHook == address(0)) continue; + jobs[jobId].hook = address(0); + emit HookDetached(jobId, oldHook); + } + } + + /// @inheritdoc IAgenticCommerce + /// @dev - K-02: escrow is untouchable; only `balance − totalEscrowed` of the payment token is free. + /// - D-27: ERC-20 only; no native branch. + function emergencyWithdraw(address token, address to, uint256 amount) external onlyRole(ADMIN_ROLE) whenPaused { + if (token == address(0) || to == address(0)) revert ZeroAddress(); + if (token == address(paymentToken)) { + uint256 bal = paymentToken.balanceOf(address(this)); + uint256 available = bal > totalEscrowed ? bal - totalEscrowed : 0; + if (amount > available) revert InsufficientUnattributedBalance(amount, available); + } + IERC20(token).safeTransfer(to, amount); + emit EmergencyWithdraw(token, to, amount); + } + + // ═════════════════════════════════ lifecycle ═════════════════════════════════ + + /// @inheritdoc IAgenticCommerce + /// @dev - Not hooked (K-10). + /// - Evaluator must be non-zero (K-03); `evaluator == client` is allowed. + function createJob( + address provider, + address evaluator, + uint256 expiredAt, + string calldata description, + address hook + ) external whenNotPaused nonReentrant returns (uint256 jobId) { + if (evaluator == address(0)) revert ZeroAddress(); + if (expiredAt <= block.timestamp + MIN_EXPIRY_WINDOW || expiredAt > type(uint48).max) { + revert ExpiryTooShort(); + } + if (provider == msg.sender) revert ClientIsProvider(); + if (provider != address(0) && provider == evaluator) revert EvaluatorIsProvider(); + if (!whitelistedHooks[hook]) revert HookNotWhitelisted(); + if (hook != address(0) && !ERC165Checker.supportsInterface(hook, type(IERC8183Hook).interfaceId)) { + revert InvalidHook(); + } + + jobId = ++jobCounter; + jobs[jobId] = Job({ + client: msg.sender, + status: JobStatus.Open, + provider: provider, + // forge-lint: disable-next-line(unsafe-typecast) + expiredAt: uint48(expiredAt), // safe: bounded by the type(uint48).max check above + evaluator: evaluator, + hook: hook, + budget: 0, + description: description + }); + emit JobCreated(jobId, msg.sender, provider, evaluator, expiredAt, hook); + } + + /// @inheritdoc IAgenticCommerce + /// @dev - Hooked, with `optParams` (K-04). + function setProvider(uint256 jobId, address provider, bytes calldata optParams) + external + whenNotPaused + nonReentrant + { + Job storage job = _job(jobId); + if (job.status != JobStatus.Open) revert WrongStatus(); + if (block.timestamp >= job.expiredAt) revert WrongStatus(); + if (msg.sender != job.client) revert Unauthorized(); + if (job.provider != address(0)) revert WrongStatus(); + if (provider == address(0)) revert ZeroAddress(); + if (provider == job.client) revert ClientIsProvider(); + if (provider == job.evaluator) revert EvaluatorIsProvider(); + + bytes memory data = abi.encode(msg.sender, provider, optParams); + _beforeHook(job.hook, jobId, data); + job.provider = provider; + emit ProviderSet(jobId, provider); + _afterHook(job.hook, jobId, data); + } + + /// @inheritdoc IAgenticCommerce + /// @dev - Re-callable while Open; `fund`'s `expectedBudget` guards against re-quotes. + function setBudget(uint256 jobId, uint256 amount, bytes calldata optParams) external whenNotPaused nonReentrant { + Job storage job = _job(jobId); + if (job.status != JobStatus.Open) revert WrongStatus(); + if (block.timestamp >= job.expiredAt) revert WrongStatus(); + if (msg.sender != job.provider) revert Unauthorized(); + + bytes memory data = abi.encode(msg.sender, amount, optParams); + _beforeHook(job.hook, jobId, data); + job.budget = amount; + emit BudgetSet(jobId, amount); + _afterHook(job.hook, jobId, data); + } + + /// @inheritdoc IAgenticCommerce + /// @dev - Adds `budget` to `totalEscrowed`. + /// - A zero budget moves to Funded without a transfer. + function fund(uint256 jobId, uint256 expectedBudget, bytes calldata optParams) + external + whenNotPaused + nonReentrant + { + Job storage job = _job(jobId); + if (job.status != JobStatus.Open) revert WrongStatus(); + if (msg.sender != job.client) revert Unauthorized(); + if (job.provider == address(0)) revert ProviderNotSet(); + if (block.timestamp >= job.expiredAt) revert WrongStatus(); + if (job.budget != expectedBudget) revert BudgetMismatch(); + + bytes memory data = abi.encode(msg.sender, optParams); + _beforeHook(job.hook, jobId, data); + uint256 budget = job.budget; + job.status = JobStatus.Funded; + totalEscrowed += budget; + if (budget > 0) paymentToken.safeTransferFrom(msg.sender, address(this), budget); + emit JobFunded(jobId, msg.sender, budget); + _afterHook(job.hook, jobId, data); + } + + /// @inheritdoc IAgenticCommerce + /// @dev - Funded only (K-11); no auto-complete (K-03). + function submit(uint256 jobId, bytes32 deliverable, bytes calldata optParams) external whenNotPaused nonReentrant { + Job storage job = _job(jobId); + if (job.status != JobStatus.Funded) revert WrongStatus(); + if (block.timestamp >= job.expiredAt) revert WrongStatus(); + if (msg.sender != job.provider) revert Unauthorized(); + + bytes memory data = abi.encode(msg.sender, deliverable, optParams); + _beforeHook(job.hook, jobId, data); + job.status = JobStatus.Submitted; + emit JobSubmitted(jobId, msg.sender, deliverable); + _afterHook(job.hook, jobId, data); + } + + /// @inheritdoc IAgenticCommerce + /// @dev - Allowed after `expiredAt`; races `claimRefund` once the grace window ends. + /// - Event order is normative: PlatformFeePaid → EvaluatorFeePaid → JobCompleted → PaymentReleased. + function complete(uint256 jobId, bytes32 reason, bytes calldata optParams) external whenNotPaused nonReentrant { + Job storage job = _job(jobId); + if (job.status != JobStatus.Submitted) revert WrongStatus(); + if (msg.sender != job.evaluator) revert Unauthorized(); + + bytes memory data = abi.encode(msg.sender, reason, optParams); + _beforeHook(job.hook, jobId, data); + + uint256 budget = job.budget; + job.status = JobStatus.Completed; + totalEscrowed -= budget; + + uint256 platformFee = (budget * platformFeeBP) / BPS_DENOMINATOR; + uint256 evalFee = (budget * evaluatorFeeBP) / BPS_DENOMINATOR; + uint256 net = budget - platformFee - evalFee; + address provider = job.provider; + + if (platformFee > 0) { + address treasury = platformTreasury; + paymentToken.safeTransfer(treasury, platformFee); + emit PlatformFeePaid(jobId, treasury, platformFee); + } + if (evalFee > 0) { + // msg.sender is the evaluator (checked above). + paymentToken.safeTransfer(msg.sender, evalFee); + emit EvaluatorFeePaid(jobId, msg.sender, evalFee); + } + if (net > 0) paymentToken.safeTransfer(provider, net); + emit JobCompleted(jobId, msg.sender, reason); + emit PaymentReleased(jobId, provider, net); + + _afterHook(job.hook, jobId, data); + } + + /// @inheritdoc IAgenticCommerce + /// @dev - Open: client or provider. Funded/Submitted: evaluator only. + function reject(uint256 jobId, bytes32 reason, bytes calldata optParams) external whenNotPaused nonReentrant { + Job storage job = _job(jobId); + JobStatus prev = job.status; + if (prev == JobStatus.Open) { + if (msg.sender != job.client && msg.sender != job.provider) revert Unauthorized(); + } else if (prev == JobStatus.Funded || prev == JobStatus.Submitted) { + if (msg.sender != job.evaluator) revert Unauthorized(); + } else { + revert WrongStatus(); + } + + bytes memory data = abi.encode(msg.sender, reason, optParams); + _beforeHook(job.hook, jobId, data); + job.status = JobStatus.Rejected; + if (prev != JobStatus.Open) _refund(jobId, job); + emit JobRejected(jobId, msg.sender, reason); + _afterHook(job.hook, jobId, data); + } + + /// @inheritdoc IAgenticCommerce + /// @dev - Not pausable (K-05): refunds must never be blockable. + /// - Not hooked: a broken hook cannot trap funds. + /// - Submitted jobs wait `EVALUATOR_GRACE_PERIOD` after expiry (K-06). + function claimRefund(uint256 jobId) external nonReentrant { + Job storage job = _job(jobId); + JobStatus prev = job.status; + if (prev != JobStatus.Open && prev != JobStatus.Funded && prev != JobStatus.Submitted) revert WrongStatus(); + if (prev == JobStatus.Submitted) { + if (block.timestamp < uint256(job.expiredAt) + EVALUATOR_GRACE_PERIOD) revert GracePeriodActive(); + } else if (block.timestamp < job.expiredAt) { + revert WrongStatus(); + } + + job.status = JobStatus.Expired; + if (prev != JobStatus.Open) _refund(jobId, job); + emit JobExpired(jobId); + } + + // ═════════════════════════════════ views ═════════════════════════════════ + + /// @inheritdoc IAgenticCommerce + function getJob(uint256 jobId) external view returns (Job memory) { + return jobs[jobId]; + } + + // ═════════════════════════════════ internal ═════════════════════════════════ + + /// @dev Loads a job; reverts `InvalidJob` for 0 or unknown ids. + function _job(uint256 jobId) internal view returns (Job storage) { + if (jobId == 0 || jobId > jobCounter) revert InvalidJob(); + return jobs[jobId]; + } + + /// @dev Returns a Funded/Submitted job's escrow to the client and releases it from `totalEscrowed`. + function _refund(uint256 jobId, Job storage job) internal { + uint256 budget = job.budget; + if (budget == 0) return; + totalEscrowed -= budget; + paymentToken.safeTransfer(job.client, budget); + emit Refunded(jobId, job.client, budget); + } + + /// @dev Calls `beforeAction` with the current function's selector; no-op without a hook. + function _beforeHook(address hook, uint256 jobId, bytes memory data) internal { + if (hook != address(0)) IERC8183Hook(hook).beforeAction(jobId, msg.sig, data); + } + + /// @dev Calls `afterAction` with the current function's selector; no-op without a hook. + function _afterHook(address hook, uint256 jobId, bytes memory data) internal { + if (hook != address(0)) IERC8183Hook(hook).afterAction(jobId, msg.sig, data); + } +} diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/UniversalMarketplace.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/UniversalMarketplace.sol new file mode 100644 index 00000000..3440649e --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/UniversalMarketplace.sol @@ -0,0 +1,603 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol"; +import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; +import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; +import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; +import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; + +import {OwnerIntent, OWNER_LANE_FLAG} from "@push-agw/libraries/Types.sol"; +import {IPRC20} from "../Interfaces/IPRC20.sol"; +import {IUniversalMarketplace} from "./interfaces/IUniversalMarketplace.sol"; +import {UniversalMarketplaceErrors} from "./libraries/Errors.sol"; +import { + AgentCard, + AgentCardView, + CEADeployment, + JobInputs, + OpenJobParams, + IntentRequest, + InitParams, + SessionContext, + BuildContext +} from "./libraries/Types.sol"; +import {IAgenticCommerce} from "./interfaces/IAgenticCommerce.sol"; +import {IUniversalMarketplaceRules} from "./interfaces/IUniversalMarketplaceRules.sol"; +import {JobSpecBuilder} from "./libraries/JobSpecBuilder.sol"; +import {IAGWFactory} from "./interfaces/external/IAGWFactory.sol"; +import {IAGW, Session} from "./interfaces/external/IAGW.sol"; + +/// @title UniversalMarketplace +/// @notice Agent cards, and `openJob`: one relayed call that, on one owner-signed OwnerIntent, deploys the +/// user's AGW if needed, grants it the card's rules, and creates the ERC-8183 job with the AGW as client. +/// @dev - Moves no funds. Wallet funding and 8183 `setBudget` / `fund` happen elsewhere. +/// - Never owns anything: it presents the owner's intent to the factory and wallet, which verify the +/// signature themselves and accept it only from the intent's `executor` (this contract). +/// - Rules = card: the owner signs a session they cannot read, so this contract proves it is the card's, with +/// the card's markers filled for this job. Card ⊆ job: the job's criteria are BUILT here (JobSpecBuilder) from +/// the card's stored `jobSpecTemplate`, never supplied. The template itself is not judged: whether the +/// evaluator can run it is the provider's responsibility, reviewed through the verified tag. +/// - The card's content lives on-chain. The rules side is checked by `RULES`, a stateless helper split out +/// for EIP-170. +/// - One card per provider. +/// - Deployed behind `TransparentUpgradeableProxy`. Storage is append-only from this layout. +contract UniversalMarketplace is + Initializable, + AccessControlUpgradeable, + PausableUpgradeable, + ReentrancyGuardUpgradeable, + IUniversalMarketplace +{ + bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); + /// @notice The owner lane `openJob` executes `createJob` on (owner lane, key 0). + uint192 public constant OPENJOB_LANE = OWNER_LANE_FLAG; + /// @notice ERC-7579 single call, default exec type: all four mode components are zero. + bytes32 public constant MODE_SINGLE = bytes32(0); + + uint32 internal constant MIN_DURATION = 1 hours; + bytes7 internal constant EVM_PREFIX = "eip155:"; + + // ───────── storage: append-only ───────── + + IAGWFactory public AGW_FACTORY; + IAgenticCommerce public KERNEL; + address public hook; + /// @notice The 8183 evaluator of every job opened here. + address public evaluator; + /// @notice keccak256("eip155:" ‖ decimal(block.chainid)): Push itself, which no card may name. + bytes32 public PUSH_CHAIN_HASH; + IUniversalMarketplaceRules public RULES; + uint256 public agentCardCount; + mapping(uint256 => AgentCard) internal _cards; + mapping(uint256 => bytes) internal _agentCardRules; + mapping(uint256 => bytes) internal _jobSpecTemplates; + /// @notice 1 at registration, +1 per update. Bound into the job's criteria (`origin`). + mapping(uint256 => uint256) public agentCardVersion; + /// @notice Verified by the admin at the CURRENT version. Cleared by every update. + mapping(uint256 => bool) public isAgentCardVerified; + /// @notice Disabled by the admin. Permanent: the provider cannot reactivate the card. + mapping(uint256 => bool) public isAgentCardDisabled; + mapping(bytes32 => CEADeployment) public ceaDeployment; + /// @dev Slot 14: the removed per-chain pause. Reserved, always zero. + uint256 private __reserved14; + /// @dev AGW → the last job opened here for it. Read through `activeJobOf`. + mapping(address => uint256) internal _lastJobOf; + mapping(uint256 => uint256) public cardOfJob; + mapping(uint256 => address) public agwOfJob; + mapping(uint256 => bytes32) public rulesOfJob; + /// @notice Provider → their card id; 0 for none. Never cleared, so a disabled provider cannot register again. + mapping(address => uint256) public agentCardOf; + mapping(uint256 => uint256) public cardVersionOfJob; + mapping(address => uint256) internal _agentRating; + uint256[27] private __gap; + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + + /// @notice Initialize the proxy. + /// @param p The addresses; every one non-zero, and `p.hook` whitelisted on the kernel. + function initialize(InitParams calldata p) external initializer { + if (p.agwFactory == address(0) || p.kernel == address(0) || p.rules == address(0) || p.admin == address(0)) { + revert UniversalMarketplaceErrors.ZeroAddress(); + } + __AccessControl_init(); + __Pausable_init(); + __ReentrancyGuard_init(); + + AGW_FACTORY = IAGWFactory(p.agwFactory); + KERNEL = IAgenticCommerce(p.kernel); + RULES = IUniversalMarketplaceRules(p.rules); + PUSH_CHAIN_HASH = keccak256(abi.encodePacked("eip155:", Strings.toString(block.chainid))); + _setHook(p.hook); + _setEvaluator(p.evaluator); + _grantRole(DEFAULT_ADMIN_ROLE, p.admin); + _grantRole(ADMIN_ROLE, p.admin); + } + + // ═════════════════════════════════ admin ═════════════════════════════════ + + /// @inheritdoc IUniversalMarketplace + /// @dev Jobs keep the hook they were created with; new jobs get this one. + function setHook(address hook_) external onlyRole(ADMIN_ROLE) { + _setHook(hook_); + } + + /// @inheritdoc IUniversalMarketplace + /// @dev Not checked against providers: `openJob` refuses a card whose provider is the evaluator. + function setEvaluator(address evaluator_) external onlyRole(ADMIN_ROLE) { + _setEvaluator(evaluator_); + } + + /// @inheritdoc IUniversalMarketplace + /// @dev - The derived CEA is the `MARKER_WALLET` value and expected CEA of every rules grant on `chainHash`, and + /// the CEA the job's criteria read. The SDK derives it from the destination CEAFactory; `openJob` refuses + /// a mismatch. + /// - Both zero clears the chain: registration, update, `computeCEA` and `openJob` then revert + /// `ChainNotSupported`. Exactly one zero reverts `ZeroAddress`. + /// - Rotation runbook: `pause()` → rotate on the destination → this → `unpause()`. + function setCEADeployment(bytes32 chainHash, address ceaFactory, address ceaProxyImpl) + external + onlyRole(ADMIN_ROLE) + { + if (ceaFactory == address(0) && ceaProxyImpl == address(0)) { + delete ceaDeployment[chainHash]; + } else if (ceaFactory == address(0) || ceaProxyImpl == address(0)) { + revert UniversalMarketplaceErrors.ZeroAddress(); + } else { + ceaDeployment[chainHash] = CEADeployment({ceaFactory: ceaFactory, ceaProxyImpl: ceaProxyImpl}); + } + emit CEADeploymentSet(chainHash, ceaFactory, ceaProxyImpl); + } + + /// @inheritdoc IUniversalMarketplace + /// @dev Placeholder until VerifiedRatings is wired (page 2 M12). + function setAgentRating(address agent, uint256 rating) external onlyRole(ADMIN_ROLE) { + _agentRating[agent] = rating; + emit AgentRatingSet(agent, rating); + } + + /// @inheritdoc IUniversalMarketplace + function pause() external onlyRole(ADMIN_ROLE) { + _pause(); + } + + /// @inheritdoc IUniversalMarketplace + function unpause() external onlyRole(ADMIN_ROLE) { + _unpause(); + } + + /// @inheritdoc IUniversalMarketplace + /// @dev The per-card kill switch. Permanent, so a compromised provider cannot switch it back on. Keeps + /// `agentCardOf[provider]`: one card per provider, so a disabled provider cannot register again. + function disableAgentCard(uint256 cardId) external onlyRole(ADMIN_ROLE) { + _requireCard(cardId); + isAgentCardDisabled[cardId] = true; + _cards[cardId].active = false; + _clearVerified(cardId); + emit AgentCardDisabled(cardId); + } + + /// @inheritdoc IUniversalMarketplace + /// @dev - A tag, not a gate: `openJob` treats verified and unverified cards alike. + /// - `cardVersion` is the one the admin reviewed: an update in between makes this revert. + /// - Refused for a disabled card; allowed for one its provider switched off. + function verifyAgentCard(uint256 cardId, uint256 cardVersion) external onlyRole(ADMIN_ROLE) { + _requireCard(cardId); + if (isAgentCardDisabled[cardId]) revert UniversalMarketplaceErrors.AgentCardDisabled(cardId); + uint256 current = agentCardVersion[cardId]; + if (cardVersion != current) revert UniversalMarketplaceErrors.AgentCardVersionMismatch(cardVersion, current); + isAgentCardVerified[cardId] = true; + emit AgentCardVerified(cardId, cardVersion); + } + + /// @inheritdoc IUniversalMarketplace + function revokeAgentCardVerification(uint256 cardId) external onlyRole(ADMIN_ROLE) { + _requireCard(cardId); + _clearVerified(cardId); + } + + // ═════════════════════════════════ cards ═════════════════════════════════ + + /// @inheritdoc IUniversalMarketplace + function registerAgentCard(AgentCard calldata c, bytes calldata rules, bytes calldata jobSpecTemplate) + external + whenNotPaused + returns (uint256 cardId) + { + if (agentCardOf[msg.sender] != 0) revert UniversalMarketplaceErrors.AgentCardAlreadyRegistered(msg.sender); + _validateCard(c, rules); + + cardId = ++agentCardCount; + _cards[cardId] = c; + AgentCard storage stored = _cards[cardId]; + stored.provider = msg.sender; + stored.active = true; + _agentCardRules[cardId] = rules; + _jobSpecTemplates[cardId] = jobSpecTemplate; + agentCardVersion[cardId] = 1; + agentCardOf[msg.sender] = cardId; + + emit AgentCardRegistered( + cardId, + msg.sender, + c.jobType, + c.chainNamespace, + keccak256(rules), + keccak256(jobSpecTemplate), + c.metadataHash, + c.providerFee + ); + } + + /// @inheritdoc IUniversalMarketplace + /// @dev - Provider only; refused for a disabled card and while paused. + /// - `chainNamespace` identifies the card: another chain is another card. `provider` and `active` stay. + /// - The version is part of every job's criteria (`origin`), so an intent signed against the old + /// version fails `openJob`. Jobs already opened are untouched. + function updateAgentCard(uint256 cardId, AgentCard calldata c, bytes calldata rules, bytes calldata jobSpecTemplate) + external + whenNotPaused + { + AgentCard storage stored = _cards[cardId]; + if (stored.provider == address(0) || msg.sender != stored.provider) { + revert UniversalMarketplaceErrors.CallerIsNotProvider(); + } + if (isAgentCardDisabled[cardId]) revert UniversalMarketplaceErrors.AgentCardDisabled(cardId); + if (keccak256(bytes(c.chainNamespace)) != keccak256(bytes(stored.chainNamespace))) { + revert UniversalMarketplaceErrors.AgentCardIdentityImmutable(); + } + _validateCard(c, rules); + + stored.jobType = c.jobType; + stored.metadataURI = c.metadataURI; + stored.metadataHash = c.metadataHash; + stored.providerFee = c.providerFee; + stored.paymentToken = c.paymentToken; + stored.principalMin = c.principalMin; + stored.principalMax = c.principalMax; + stored.minDuration = c.minDuration; + stored.maxDuration = c.maxDuration; + stored.minExecuteWindow = c.minExecuteWindow; + stored.settleWindow = c.settleWindow; + _agentCardRules[cardId] = rules; + _jobSpecTemplates[cardId] = jobSpecTemplate; + + uint256 newVersion = ++agentCardVersion[cardId]; + _clearVerified(cardId); + + emit AgentCardUpdated( + cardId, newVersion, keccak256(rules), keccak256(jobSpecTemplate), c.metadataHash, c.providerFee + ); + } + + /// @inheritdoc IUniversalMarketplace + function setAgentCardActive(uint256 cardId, bool active) external { + AgentCard storage c = _cards[cardId]; + if (c.provider == address(0) || msg.sender != c.provider) { + revert UniversalMarketplaceErrors.CallerIsNotProvider(); + } + if (active && isAgentCardDisabled[cardId]) revert UniversalMarketplaceErrors.AgentCardDisabled(cardId); + c.active = active; + emit AgentCardStatusChanged(cardId, active); + } + + /// @inheritdoc IUniversalMarketplace + function getAgentCard(uint256 cardId) external view returns (AgentCardView memory v) { + v.card = _cards[cardId]; + v.rules = _agentCardRules[cardId]; + v.jobSpecTemplate = _jobSpecTemplates[cardId]; + v.version = agentCardVersion[cardId]; + v.verified = isAgentCardVerified[cardId]; + v.disabled = isAgentCardDisabled[cardId]; + } + + // ═════════════════════════════════ openJob ═════════════════════════════════ + + /// @inheritdoc IUniversalMarketplace + /// @dev Normative order, every check before the first state change: + /// 1-6 card, version, ranges, evaluator · 7 wallet · 8 no active job · 9-10 build the job · 11 bind the intent · + /// 12 rules = card · ── 13 deploy or check owner · 14 grant · 15 create, verified · 16 record. + function openJob(OpenJobParams calldata p) + external + whenNotPaused + nonReentrant + returns (uint256 jobId, address agw, bytes32 rulesId) + { + AgentCard storage c = _cards[p.cardId]; + bytes32 chainHash = _checkCardAndJob(c, p); + bool deployed; + (agw, deployed) = _resolveWallet(p); + uint256 active = activeJobOf(agw); + if (active != 0) revert UniversalMarketplaceErrors.WalletHasActiveJob(agw, active); + (bytes32 mode, bytes memory execCalldata) = _buildCreateJob(p.cardId, agw, p.job); + _bindIntent(p, mode, execCalldata); + _checkRules(c, p, agw, chainHash); + + _deployOrCheckOwner(p, agw, deployed); + rulesId = IAGW(agw).grantRulesWithSig(p.session, p.intent, p.sig); + jobId = _createJob(c, agw, mode, execCalldata, p.intent, p.sig); + + _lastJobOf[agw] = jobId; + cardOfJob[jobId] = p.cardId; + agwOfJob[jobId] = agw; + rulesOfJob[jobId] = rulesId; + cardVersionOfJob[jobId] = p.cardVersion; + emit JobOpened(p.cardId, p.intent.owner, agw, jobId, rulesId, p.job.principal, p.cardVersion); + } + + // ═════════════════════════════════ views ═════════════════════════════════ + + /// @inheritdoc IUniversalMarketplace + /// @dev Active while the last job opened here is Funded, Submitted, or Open and not yet expired. + function activeJobOf(address agw) public view returns (uint256) { + uint256 id = _lastJobOf[agw]; + if (id == 0) return 0; + IAgenticCommerce.Job memory j = KERNEL.getJob(id); + if (j.status == IAgenticCommerce.JobStatus.Funded || j.status == IAgenticCommerce.JobStatus.Submitted) { + return id; + } + if (j.status == IAgenticCommerce.JobStatus.Open && block.timestamp < j.expiredAt) return id; + return 0; + } + + /// @inheritdoc IUniversalMarketplace + /// @dev Mirrors `CEAFactory._computeCEAInternal`: an OZ minimal proxy of `ceaProxyImpl`, salt + /// `keccak256(abi.encode(pushAccount))`, deployer = the CEA factory. Stale after a destination + /// implementation rotation until `setCEADeployment`: pause first. + function computeCEA(address agw, bytes32 chainHash) public view returns (address) { + CEADeployment memory d = ceaDeployment[chainHash]; + if (d.ceaFactory == address(0)) revert UniversalMarketplaceErrors.ChainNotSupported(chainHash); + return Clones.predictDeterministicAddress(d.ceaProxyImpl, keccak256(abi.encode(agw)), d.ceaFactory); + } + + /// @inheritdoc IUniversalMarketplace + function getAgentRating(address agent) external view returns (uint256) { + return _agentRating[agent]; + } + + /// @inheritdoc IUniversalMarketplace + function version() external pure returns (string memory) { + return "2.0.0"; + } + + /// @inheritdoc IUniversalMarketplace + function buildCreateJobCalldata(uint256 cardId, address owner, uint96 index, JobInputs calldata job) + external + view + returns (bytes32 mode, bytes memory executionCalldata) + { + _requireCard(cardId); + (address agw,) = AGW_FACTORY.predictWallet(owner, index); + return _buildCreateJob(cardId, agw, job); + } + + /// @inheritdoc IUniversalMarketplace + /// @dev The SDK signs exactly what this returns. Nonces are 0 for a wallet not yet deployed. + function previewIntent(IntentRequest calldata r, Session calldata s) external view returns (OwnerIntent memory i) { + _requireCard(r.cardId); + (address wallet, bool deployed) = AGW_FACTORY.predictWallet(r.owner, r.index); + (bytes32 mode, bytes memory cd) = _buildCreateJob(r.cardId, wallet, r.job); + i.owner = r.owner; + i.wallet = wallet; + i.executor = address(this); + i.index = r.index; + i.sessionHash = keccak256(abi.encode(s)); + i.mode = mode; + i.execCalldataHash = keccak256(cd); + i.nonceKey = OPENJOB_LANE; + i.nonceSeq = deployed ? IAGW(wallet).getNonce(OPENJOB_LANE) : 0; + i.grantNonce = deployed ? IAGW(wallet).grantNonce() : 0; + i.deadline = r.deadline; + i.signerChainId = r.signerChainId; + } + + // ═════════════════════════════════ internal: config and cards ═════════════════════════════════ + + function _setHook(address hook_) internal { + if (hook_ == address(0)) revert UniversalMarketplaceErrors.ZeroAddress(); + if (!KERNEL.whitelistedHooks(hook_)) revert UniversalMarketplaceErrors.HookNotWhitelisted(); + hook = hook_; + emit HookUpdated(hook_); + } + + function _setEvaluator(address evaluator_) internal { + if (evaluator_ == address(0)) revert UniversalMarketplaceErrors.ZeroAddress(); + evaluator = evaluator_; + emit EvaluatorUpdated(evaluator_); + } + + /// @dev `AgentCardInactive` for a card that was never registered. + function _requireCard(uint256 cardId) internal view { + if (_cards[cardId].provider == address(0)) revert UniversalMarketplaceErrors.AgentCardInactive(); + } + + /// @dev Clears the verified tag, emitting only when there was one to clear. + function _clearVerified(uint256 cardId) internal { + if (!isAgentCardVerified[cardId]) return; + isAgentCardVerified[cardId] = false; + emit AgentCardVerificationRevoked(cardId); + } + + /// @dev Registration and update checks, in order. The caller is the provider. The `jobSpecTemplate` is stored + /// as given. + function _validateCard(AgentCard calldata c, bytes calldata rules) internal view { + if (c.jobType == bytes32(0)) revert UniversalMarketplaceErrors.InvalidAgentCard("job type zero"); + if (bytes(c.metadataURI).length == 0) revert UniversalMarketplaceErrors.InvalidAgentCard("metadata uri empty"); + if (c.metadataHash == bytes32(0)) revert UniversalMarketplaceErrors.InvalidAgentCard("metadata hash zero"); + bytes calldata ns = bytes(c.chainNamespace); + if (ns.length <= EVM_PREFIX.length || bytes7(ns[:7]) != EVM_PREFIX) { + revert UniversalMarketplaceErrors.InvalidAgentCard("chain namespace"); + } + bytes32 chainHash = keccak256(ns); + if (chainHash == PUSH_CHAIN_HASH || ceaDeployment[chainHash].ceaFactory == address(0)) { + revert UniversalMarketplaceErrors.ChainNotSupported(chainHash); + } + // Until the kernel's K-12, every job is paid in the kernel's token; a card may not advertise another. + if (c.paymentToken != address(KERNEL.paymentToken())) { + revert UniversalMarketplaceErrors.InvalidAgentCard("payment token"); + } + _validateWindows(c); + address[] memory tokens = RULES.validateAgentCardRules(rules); + for (uint256 i; i < tokens.length; ++i) { + _requireAssetOnChain(tokens[i], chainHash); + } + } + + /// @dev The provider is not the evaluator, and the principal and time windows are coherent. + function _validateWindows(AgentCard calldata c) internal view { + if (msg.sender == evaluator) revert UniversalMarketplaceErrors.InvalidAgentCard("provider is evaluator"); + if (c.principalMax == 0 || c.principalMin > c.principalMax) { + revert UniversalMarketplaceErrors.InvalidAgentCard("principal range"); + } + if (c.minDuration < MIN_DURATION || c.minDuration > c.maxDuration) { + revert UniversalMarketplaceErrors.InvalidAgentCard("duration range"); + } + if (c.settleWindow == 0) revert UniversalMarketplaceErrors.InvalidAgentCard("settle window"); + if (uint256(c.minExecuteWindow) + c.settleWindow > c.maxDuration) { + revert UniversalMarketplaceErrors.InvalidAgentCard("execute window"); + } + } + + /// @dev The asset is a PRC20 of the card's chain. A raw staticcall, not try/catch: a non-string answer must + /// fail as "asset", and a try clause cannot catch its own return-data decoding. A codeless asset answers + /// empty, so it fails the length check. + function _requireAssetOnChain(address asset, bytes32 chainHash) internal view { + (bool ok, bytes memory ret) = asset.staticcall(abi.encodeCall(IPRC20.SOURCE_CHAIN_NAMESPACE, ())); + if (!ok || ret.length < 64) revert UniversalMarketplaceErrors.InvalidAgentCard("asset"); + (uint256 offset, uint256 len) = abi.decode(ret, (uint256, uint256)); + if (offset != 32 || len > ret.length - 64) revert UniversalMarketplaceErrors.InvalidAgentCard("asset"); + if (keccak256(abi.decode(ret, (bytes))) != chainHash) { + revert UniversalMarketplaceErrors.InvalidAgentCard("asset chain"); + } + } + + // ═════════════════════════════════ internal: openJob ═════════════════════════════════ + + /// @dev Steps 1-6. Returns the card's chain hash. + function _checkCardAndJob(AgentCard storage c, OpenJobParams calldata p) internal view returns (bytes32) { + if (!c.active) revert UniversalMarketplaceErrors.AgentCardInactive(); + uint256 current = agentCardVersion[p.cardId]; + if (p.cardVersion != current) { + revert UniversalMarketplaceErrors.AgentCardVersionMismatch(p.cardVersion, current); + } + _checkJobWindows(c, p.job); + if (c.provider == evaluator) revert UniversalMarketplaceErrors.ProviderIsEvaluator(); + return keccak256(bytes(c.chainNamespace)); + } + + /// @dev Steps 3-5: principal, expiry and executeBy inside the card's windows. + function _checkJobWindows(AgentCard storage c, JobInputs calldata job) internal view { + if (job.principal < c.principalMin || job.principal > c.principalMax) { + revert UniversalMarketplaceErrors.PrincipalOutOfRange(); + } + uint256 expiredAt = job.expiredAt; + if (expiredAt < block.timestamp + c.minDuration || expiredAt > block.timestamp + c.maxDuration) { + revert UniversalMarketplaceErrors.ExpiryOutOfRange(); + } + uint256 executeBy = job.executeBy; + if (executeBy < block.timestamp + c.minExecuteWindow || executeBy + c.settleWindow > expiredAt) { + revert UniversalMarketplaceErrors.ExecuteByOutOfRange(); + } + } + + /// @dev Step 7: the intent names the wallet derived from its owner and index, and this executor. + function _resolveWallet(OpenJobParams calldata p) internal view returns (address agw, bool deployed) { + (agw, deployed) = AGW_FACTORY.predictWallet(p.intent.owner, p.intent.index); + if (p.intent.wallet != agw) revert UniversalMarketplaceErrors.IntentWalletMismatch(agw, p.intent.wallet); + if (p.intent.executor != address(this)) { + revert UniversalMarketplaceErrors.ExecutorMismatch(p.intent.executor, address(this)); + } + } + + /// @dev Steps 9-10: the job's criteria, built from the card's template, inside `createJob` as an ERC-7579 + /// single execution. Everything the owner signs per job (principal, times, params, card version and + /// the wallet, through its CEA) is in this calldata, so the intent's calldata hash binds all of it. + function _buildCreateJob(uint256 cardId, address agw, JobInputs calldata job) + internal + view + returns (bytes32 mode, bytes memory executionCalldata) + { + AgentCard storage c = _cards[cardId]; + bytes memory description = JobSpecBuilder.build( + _jobSpecTemplates[cardId], + BuildContext({ + agw: agw, + principal: job.principal, + executeBy: job.executeBy, + settleWindow: c.settleWindow, + params: job.params, + origin: keccak256(abi.encode(address(this), cardId, agentCardVersion[cardId], job.principal)) + }) + ); + bytes memory call = abi.encodeCall( + IAgenticCommerce.createJob, (c.provider, evaluator, uint256(job.expiredAt), string(description), hook) + ); + mode = MODE_SINGLE; + executionCalldata = abi.encodePacked(address(KERNEL), uint256(0), call); + } + + /// @dev Step 11: the intent's exec fields name exactly this createJob, on the openJob lane, and its + /// session hash is this session. The wallet re-checks both; this names the error before state moves. + function _bindIntent(OpenJobParams calldata p, bytes32 mode, bytes memory execCalldata) internal pure { + bytes32 cdHash = keccak256(execCalldata); + if (p.intent.mode != mode || p.intent.execCalldataHash != cdHash || p.intent.nonceKey != OPENJOB_LANE) { + revert UniversalMarketplaceErrors.IntentExecMismatch(cdHash); + } + bytes32 sessionHash = keccak256(abi.encode(p.session)); + if (p.intent.sessionHash != sessionHash) revert UniversalMarketplaceErrors.IntentSessionMismatch(sessionHash); + } + + /// @dev Step 12: the signed session is the card's rules with its markers filled for this job, for the card's + /// agent, bound to this job and CEA. + function _checkRules(AgentCard storage c, OpenJobParams calldata p, address agw, bytes32 chainHash) + internal + view + { + RULES.checkRulesMatchCard( + _agentCardRules[p.cardId], + p.session, + SessionContext({ + agent: c.provider, + chainHash: chainHash, + principal: p.job.principal, + expiredAt: p.job.expiredAt, + expectedCEA: computeCEA(agw, chainHash) + }) + ); + } + + /// @dev Step 13: deploy the predicted wallet, or check the factory's owner of the existing one. + function _deployOrCheckOwner(OpenJobParams calldata p, address agw, bool deployed) internal { + if (!deployed) { + address d = AGW_FACTORY.deployWalletWithSig(p.intent, p.sig, p.label); + if (d != agw) revert UniversalMarketplaceErrors.AGWMismatch(agw, d); + return; + } + address owner = AGW_FACTORY.ownerOf(agw); + if (owner != p.intent.owner) revert UniversalMarketplaceErrors.WalletOwnerMismatch(p.intent.owner, owner); + } + + /// @dev Step 15: the AGW creates the job; exactly one job appeared, with this AGW as client and the card's + /// provider, this hook and this evaluator. + function _createJob( + AgentCard storage c, + address agw, + bytes32 mode, + bytes memory execCalldata, + OwnerIntent calldata intent, + bytes calldata sig + ) internal returns (uint256 jobId) { + uint256 before = KERNEL.jobCounter(); + IAGW(agw).executeWithSig(mode, execCalldata, intent, sig); + jobId = KERNEL.jobCounter(); + if (jobId != before + 1) revert UniversalMarketplaceErrors.UnexpectedJobCount(before, jobId); + IAgenticCommerce.Job memory j = KERNEL.getJob(jobId); + if (j.client != agw || j.provider != c.provider || j.hook != hook || j.evaluator != evaluator) { + revert UniversalMarketplaceErrors.JobMismatch(); + } + } +} diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/UniversalMarketplaceRules.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/UniversalMarketplaceRules.sol new file mode 100644 index 00000000..1de6d539 --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/UniversalMarketplaceRules.sol @@ -0,0 +1,278 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import { + AssetCap, + AllowedCall, + ArgPin, + PinOp, + UniversalTerms, + ENVELOPE_VERSION, + MAX_ASSETS, + MAX_PINS, + MAX_ALLOWED_CALL_PINS +} from "@push-agw/libraries/Types.sol"; +import {UniversalMarketplaceErrors} from "./libraries/Errors.sol"; +import {AgentCardRules, SessionContext, MARKER_WALLET, MARKER_PRINCIPAL} from "./libraries/Types.sol"; +import {IUniversalMarketplaceRules} from "./interfaces/IUniversalMarketplaceRules.sol"; +import {Session} from "./interfaces/external/IAGW.sol"; + +/// @title UniversalMarketplaceRules +/// @notice The rules side of an agent card: registration guards, and rules = card at `openJob`. +/// @dev - EVM universal only. Pure logic, no storage, no admin; split out of the marketplace for EIP-170. +/// - Reverts with `UniversalMarketplaceErrors`: a revert here bubbles through the marketplace unchanged. +/// - Not upgradeable. A rule change is a new deployment plus a marketplace upgrade that points at it. +/// - Known limit: whether a `MARKER_PRINCIPAL` pin sits on the PRINCIPAL token's `approve` is not checked. +/// `IPRC20` has no source-token view, so a PRC20 cannot be mapped to its destination token. The verified tag +/// covers it. +contract UniversalMarketplaceRules is IUniversalMarketplaceRules { + /// @dev URP's allow-list bound (internal there, so mirrored): a card that could never be granted is refused. + uint256 internal constant MAX_ALLOWED_CALLS = 32; + + bytes4 internal constant ERC20_TRANSFER = IERC20.transfer.selector; + bytes4 internal constant ERC20_APPROVE = IERC20.approve.selector; + bytes4 internal constant ERC20_TRANSFER_FROM = IERC20.transferFrom.selector; + /// @dev Not on OZ 5's IERC20. + bytes4 internal constant ERC20_INCREASE_ALLOWANCE = bytes4(keccak256("increaseAllowance(address,uint256)")); + + /// @dev Calldata offsets of an ERC-20 call's first and second argument words. + uint16 internal constant ARG0 = 4; + uint16 internal constant ARG1 = 36; + + // ═════════════════════════════════ rules = card ═════════════════════════════════ + + /// @inheritdoc IUniversalMarketplaceRules + /// @dev - Order C1-C14; the first failure reverts. + /// - The session never carries a marker: C8 and C12 compare against the filled-in value. + /// - Never compared: the card's `principalAsset` (an index, not a rule), and the session's validator, + /// policy address, action target and selector, userOp and ERC-7739 lists, paymaster flag and salt. The + /// AGW pins every one of those itself at `grantRules` (v6 `_grantRules`). + function checkRulesMatchCard(bytes calldata cardRules, Session calldata session, SessionContext calldata ctx) + external + pure + { + if (keccak256(session.sessionValidatorInitData) != keccak256(abi.encode(ctx.agent))) { + revert UniversalMarketplaceErrors.AgentMismatch(); + } + if (session.actions.length != 1) revert UniversalMarketplaceErrors.ActionCount(); + if (session.actions[0].actionPolicies.length != 1) revert UniversalMarketplaceErrors.PolicyShape(0); + + UniversalTerms memory t = _decodeEnvelope(session.actions[0].actionPolicies[0].initData, ctx.chainHash); + AgentCardRules memory c = abi.decode(cardRules, (AgentCardRules)); + _matchAssets(c, t, ctx.principal); + if (t.maxGasPerCall != c.maxGasPerCall) revert UniversalMarketplaceErrors.GasCapMismatch(); + _matchCalls(c.allowedCalls, t.allowedCalls, ctx); + if (t.validUntil != ctx.expiredAt) revert UniversalMarketplaceErrors.ExpiryMismatch(); + if (t.expectedCEA != ctx.expectedCEA) { + revert UniversalMarketplaceErrors.ExpectedCEAMismatch(ctx.expectedCEA, t.expectedCEA); + } + } + + /// @dev C4-C5. The version is read from the first word BEFORE any decode, as URP does, so a pre-v6 + /// two-field envelope (first word 64, its string offset) is named instead of panicking the decoder. + function _decodeEnvelope(bytes calldata d, bytes32 chainHash) internal pure returns (UniversalTerms memory) { + uint256 version = d.length < 32 ? 0 : uint256(bytes32(d[:32])); + if (version != ENVELOPE_VERSION) revert UniversalMarketplaceErrors.EnvelopeVersionMismatch(version); + (, string memory chainNamespace, bytes memory body) = abi.decode(d, (uint16, string, bytes)); + if (keccak256(bytes(chainNamespace)) != chainHash) revert UniversalMarketplaceErrors.ChainMismatch(0); + return abi.decode(body, (UniversalTerms)); + } + + /// @dev C6-C9: same tokens in the same order; the principal asset's caps filled with the principal (D3); every + /// other asset's caps copied exactly. + function _matchAssets(AgentCardRules memory c, UniversalTerms memory t, uint256 principal) internal pure { + uint256 n = c.assets.length; + if (t.assets.length != n) revert UniversalMarketplaceErrors.AssetCountMismatch(n, t.assets.length); + for (uint256 i; i < n; ++i) { + if (t.assets[i].token != c.assets[i].token) revert UniversalMarketplaceErrors.AssetMismatch(i); + } + AssetCap memory card = c.assets[c.principalAsset]; + AssetCap memory signed = t.assets[c.principalAsset]; + uint256 perCall = card.maxPerCall == uint256(MARKER_PRINCIPAL) ? principal : card.maxPerCall; + if (signed.maxTotal != principal || signed.maxPerCall != perCall) { + revert UniversalMarketplaceErrors.PrincipalCapMismatch(); + } + for (uint256 i; i < n; ++i) { + if (i == c.principalAsset) continue; + if (t.assets[i].maxPerCall != c.assets[i].maxPerCall || t.assets[i].maxTotal != c.assets[i].maxTotal) { + revert UniversalMarketplaceErrors.AssetMismatch(i); + } + } + } + + /// @dev C11-C12, one loop: every field of every call equal, every pin's offset and op equal, then its value + /// equal with markers filled in. + function _matchCalls(AllowedCall[] memory card, AllowedCall[] memory signed, SessionContext calldata ctx) + internal + pure + { + if (signed.length != card.length) revert UniversalMarketplaceErrors.ActionsMismatch(); + bytes32 wallet = bytes32(uint256(uint160(ctx.expectedCEA))); + bytes32 principal = bytes32(ctx.principal); + for (uint256 i; i < card.length; ++i) { + AllowedCall memory a = card[i]; + AllowedCall memory b = signed[i]; + if ( + a.target != b.target || a.selector != b.selector || a.beneficiaryOffset != b.beneficiaryOffset + || a.hasBeneficiary != b.hasBeneficiary || a.maxValue != b.maxValue || a.pins.length != b.pins.length + ) revert UniversalMarketplaceErrors.ActionsMismatch(); + for (uint256 k; k < a.pins.length; ++k) { + ArgPin memory p = a.pins[k]; + ArgPin memory q = b.pins[k]; + if (p.offset != q.offset || p.op != q.op) revert UniversalMarketplaceErrors.ActionsMismatch(); + bytes32 want = p.value == MARKER_WALLET ? wallet : p.value == MARKER_PRINCIPAL ? principal : p.value; + if (q.value != want) revert UniversalMarketplaceErrors.PinMismatch(i, k); + } + } + } + + // ═════════════════════════════════ registration guards ═════════════════════════════════ + + /// @inheritdoc IUniversalMarketplaceRules + /// @dev Order R1-R17; the first failure reverts. Malformed bytes revert in the decoder, without data. + function validateAgentCardRules(bytes calldata rules) external pure returns (address[] memory tokens) { + AgentCardRules memory r = abi.decode(rules, (AgentCardRules)); + _validateAssets(r.assets, r.principalAsset); + _validateCallShape(r.allowedCalls); + _validateDuplicates(r.allowedCalls); + _validateErc20(r.allowedCalls); + tokens = new address[](r.assets.length); + for (uint256 i; i < tokens.length; ++i) { + tokens[i] = r.assets[i].token; + } + } + + /// @dev R1-R7. + function _validateAssets(AssetCap[] memory assets, uint8 principalAsset) internal pure { + uint256 n = assets.length; + if (n == 0 || n > MAX_ASSETS) revert UniversalMarketplaceErrors.InvalidAgentCard("asset count"); + if (principalAsset >= n) revert UniversalMarketplaceErrors.InvalidAgentCard("principal asset"); + for (uint256 i; i < n; ++i) { + if (assets[i].token == address(0)) revert UniversalMarketplaceErrors.InvalidAgentCard("asset zero"); + } + for (uint256 i; i < n; ++i) { + for (uint256 j; j < i; ++j) { + if (assets[j].token == assets[i].token) { + revert UniversalMarketplaceErrors.InvalidAgentCard("duplicate asset"); + } + } + } + AssetCap memory p = assets[principalAsset]; + if (p.maxTotal != uint256(MARKER_PRINCIPAL)) { + revert UniversalMarketplaceErrors.InvalidAgentCard("principal total not marker"); + } + if (p.maxPerCall == 0) revert UniversalMarketplaceErrors.InvalidAgentCard("principal per-call zero"); + for (uint256 i; i < n; ++i) { + if (i == principalAsset) continue; + if (assets[i].maxPerCall == uint256(MARKER_PRINCIPAL) || assets[i].maxTotal == uint256(MARKER_PRINCIPAL)) { + revert UniversalMarketplaceErrors.InvalidAgentCard("marker off principal asset"); + } + } + } + + /// @dev R8-R10: 1-32 calls; at most MAX_PINS pins per call and MAX_ALLOWED_CALL_PINS in all; `MARKER_WALLET` + /// only under EQ (a ceiling of an address is meaningless). + function _validateCallShape(AllowedCall[] memory calls) internal pure { + uint256 n = calls.length; + if (n == 0 || n > MAX_ALLOWED_CALLS) revert UniversalMarketplaceErrors.InvalidAgentCard("allow-list size"); + uint256 total; + for (uint256 i; i < n; ++i) { + uint256 pins = calls[i].pins.length; + total += pins; + if (pins > MAX_PINS || total > MAX_ALLOWED_CALL_PINS) { + revert UniversalMarketplaceErrors.InvalidAgentCard("too many pins"); + } + } + for (uint256 i; i < n; ++i) { + ArgPin[] memory pins = calls[i].pins; + for (uint256 k; k < pins.length; ++k) { + if (pins[k].value == MARKER_WALLET && pins[k].op != PinOp.EQ) { + revert UniversalMarketplaceErrors.InvalidAgentCard("wallet marker op"); + } + } + } + } + + /// @dev R11-R12. Several entries may share a (target, selector) — "approve to Aave or to Uniswap" — but only + /// if each is pinned: a call passes if ANY entry passes, so a pinless one beside a pinned one makes the + /// pins pointless (AGW v6 `AllowedCall` docs; URP allows it, the SDK and this helper refuse it). + function _validateDuplicates(AllowedCall[] memory calls) internal pure { + uint256 n = calls.length; + bytes32[] memory hashes = new bytes32[](n); + for (uint256 i; i < n; ++i) { + hashes[i] = keccak256(abi.encode(calls[i])); + for (uint256 j; j < i; ++j) { + if (hashes[j] == hashes[i]) revert UniversalMarketplaceErrors.InvalidAgentCard("duplicate call"); + } + } + for (uint256 i; i < n; ++i) { + for (uint256 j; j < i; ++j) { + if ( + calls[j].target == calls[i].target && calls[j].selector == calls[i].selector + && (calls[j].pins.length == 0 || calls[i].pins.length == 0) + ) revert UniversalMarketplaceErrors.InvalidAgentCard("unpinned duplicate"); + } + } + } + + /// @dev R13-R17, each over every call before the next (D1: the agent approves, but only under pins). + /// - approve: spender pinned EQ to a clean, non-zero address word (which excludes both markers: their + /// high 96 bits are non-zero), and amount capped by a MAX pin (a literal or `MARKER_PRINCIPAL`). + /// - transfer / transferFrom: recipient bound to the user's account, by the beneficiary field or by an EQ + /// `MARKER_WALLET` pin. + function _validateErc20(AllowedCall[] memory calls) internal pure { + for (uint256 i; i < calls.length; ++i) { + if (calls[i].selector == ERC20_INCREASE_ALLOWANCE) { + revert UniversalMarketplaceErrors.InvalidAgentCard("increaseAllowance"); + } + } + for (uint256 i; i < calls.length; ++i) { + if (calls[i].selector == ERC20_APPROVE && !_hasSpenderPin(calls[i].pins)) { + revert UniversalMarketplaceErrors.InvalidAgentCard("approve spender not pinned"); + } + } + for (uint256 i; i < calls.length; ++i) { + if (calls[i].selector == ERC20_APPROVE && !_hasPin(calls[i].pins, ARG1, PinOp.MAX)) { + revert UniversalMarketplaceErrors.InvalidAgentCard("approve amount not capped"); + } + } + for (uint256 i; i < calls.length; ++i) { + if (calls[i].selector == ERC20_TRANSFER && !_recipientIsWallet(calls[i], ARG0)) { + revert UniversalMarketplaceErrors.InvalidAgentCard("erc20 transfer recipient"); + } + } + for (uint256 i; i < calls.length; ++i) { + if (calls[i].selector == ERC20_TRANSFER_FROM && !_recipientIsWallet(calls[i], ARG1)) { + revert UniversalMarketplaceErrors.InvalidAgentCard("erc20 transferFrom recipient"); + } + } + } + + /// @dev Some pin is `{4, EQ, v}` with `v` a non-zero address word. + function _hasSpenderPin(ArgPin[] memory pins) internal pure returns (bool) { + for (uint256 k; k < pins.length; ++k) { + ArgPin memory p = pins[k]; + if (p.offset == ARG0 && p.op == PinOp.EQ && p.value != 0 && uint256(p.value) >> 160 == 0) return true; + } + return false; + } + + /// @dev Some pin is `{offset, op, *}`. + function _hasPin(ArgPin[] memory pins, uint16 offset, PinOp op) internal pure returns (bool) { + for (uint256 k; k < pins.length; ++k) { + if (pins[k].offset == offset && pins[k].op == op) return true; + } + return false; + } + + /// @dev The recipient word at `offset` is the user's account: the beneficiary field, or `{offset, EQ, MARKER_WALLET}`. + function _recipientIsWallet(AllowedCall memory call, uint16 offset) internal pure returns (bool) { + if (call.hasBeneficiary && call.beneficiaryOffset == offset) return true; + for (uint256 k; k < call.pins.length; ++k) { + ArgPin memory p = call.pins[k]; + if (p.offset == offset && p.op == PinOp.EQ && p.value == MARKER_WALLET) return true; + } + return false; + } +} diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/hooks/BaseERC8183Hook.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/hooks/BaseERC8183Hook.sol new file mode 100644 index 00000000..ab234c9e --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/hooks/BaseERC8183Hook.sol @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import {ERC165Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; + +import {IERC8183Hook} from "../interfaces/IERC8183Hook.sol"; +import {IAgenticCommerce} from "../interfaces/IAgenticCommerce.sol"; +import {ERC8183HookErrors} from "../libraries/Errors.sol"; + +/// @title BaseERC8183Hook +/// @notice Abstract helper every hook in this repo inherits. Not part of the ERC. +/// @dev - Only the kernel may call (H-01); no router trust path. +/// - Selectors come from `IAgenticCommerce` (H-02), so a signature change fails to compile. +/// - Unknown selectors are ignored (H-03). +/// - Owns storage slots 0–49: `KERNEL` at slot 0, then a 49-slot gap. +abstract contract BaseERC8183Hook is Initializable, ERC165Upgradeable, IERC8183Hook { + /// @notice The only address allowed to call this hook. Set once, at initialization. + address public KERNEL; + uint256[49] private __gap; + + /// @dev - Reverts `CallerIsNotKernel` for any other caller. + modifier onlyKernel() { + if (msg.sender != KERNEL) revert ERC8183HookErrors.CallerIsNotKernel(msg.sender); + _; + } + + /// @notice Sets the kernel. Call once from the derived hook's initializer. + /// @param kernel_ The kernel proxy address. + function __BaseERC8183Hook_init(address kernel_) internal onlyInitializing { + __ERC165_init(); + if (kernel_ == address(0)) revert ERC8183HookErrors.ZeroAddress(); + KERNEL = kernel_; + } + + /// @inheritdoc IERC8183Hook + function beforeAction(uint256 jobId, bytes4 selector, bytes calldata data) external onlyKernel { + if (selector == IAgenticCommerce.setProvider.selector) { + (address caller, address provider, bytes memory opt) = abi.decode(data, (address, address, bytes)); + _preSetProvider(jobId, caller, provider, opt); + } else if (selector == IAgenticCommerce.setBudget.selector) { + (address caller, uint256 amount, bytes memory opt) = abi.decode(data, (address, uint256, bytes)); + _preSetBudget(jobId, caller, amount, opt); + } else if (selector == IAgenticCommerce.fund.selector) { + (address caller, bytes memory opt) = abi.decode(data, (address, bytes)); + _preFund(jobId, caller, opt); + } else if (selector == IAgenticCommerce.submit.selector) { + (address caller, bytes32 deliverable, bytes memory opt) = abi.decode(data, (address, bytes32, bytes)); + _preSubmit(jobId, caller, deliverable, opt); + } else if (selector == IAgenticCommerce.complete.selector) { + (address caller, bytes32 reason, bytes memory opt) = abi.decode(data, (address, bytes32, bytes)); + _preComplete(jobId, caller, reason, opt); + } else if (selector == IAgenticCommerce.reject.selector) { + (address caller, bytes32 reason, bytes memory opt) = abi.decode(data, (address, bytes32, bytes)); + _preReject(jobId, caller, reason, opt); + } + } + + /// @inheritdoc IERC8183Hook + function afterAction(uint256 jobId, bytes4 selector, bytes calldata data) external onlyKernel { + if (selector == IAgenticCommerce.setProvider.selector) { + (address caller, address provider, bytes memory opt) = abi.decode(data, (address, address, bytes)); + _postSetProvider(jobId, caller, provider, opt); + } else if (selector == IAgenticCommerce.setBudget.selector) { + (address caller, uint256 amount, bytes memory opt) = abi.decode(data, (address, uint256, bytes)); + _postSetBudget(jobId, caller, amount, opt); + } else if (selector == IAgenticCommerce.fund.selector) { + (address caller, bytes memory opt) = abi.decode(data, (address, bytes)); + _postFund(jobId, caller, opt); + } else if (selector == IAgenticCommerce.submit.selector) { + (address caller, bytes32 deliverable, bytes memory opt) = abi.decode(data, (address, bytes32, bytes)); + _postSubmit(jobId, caller, deliverable, opt); + } else if (selector == IAgenticCommerce.complete.selector) { + (address caller, bytes32 reason, bytes memory opt) = abi.decode(data, (address, bytes32, bytes)); + _postComplete(jobId, caller, reason, opt); + } else if (selector == IAgenticCommerce.reject.selector) { + (address caller, bytes32 reason, bytes memory opt) = abi.decode(data, (address, bytes32, bytes)); + _postReject(jobId, caller, reason, opt); + } + } + + /// @inheritdoc ERC165Upgradeable + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165) returns (bool) { + return interfaceId == type(IERC8183Hook).interfaceId || super.supportsInterface(interfaceId); + } + + // ───────── handlers — override what you need; all default to no-op ───────── + + /// @dev Before `setProvider`. + function _preSetProvider(uint256 jobId, address caller, address provider, bytes memory optParams) internal virtual {} + /// @dev After `setProvider`. + function _postSetProvider(uint256 jobId, address caller, address provider, bytes memory optParams) internal virtual {} + /// @dev Before `setBudget`. + function _preSetBudget(uint256 jobId, address caller, uint256 amount, bytes memory optParams) internal virtual {} + /// @dev After `setBudget`. + function _postSetBudget(uint256 jobId, address caller, uint256 amount, bytes memory optParams) internal virtual {} + /// @dev Before `fund`. `caller` is the job's client. + function _preFund(uint256 jobId, address caller, bytes memory optParams) internal virtual {} + /// @dev After `fund`. + function _postFund(uint256 jobId, address caller, bytes memory optParams) internal virtual {} + /// @dev Before `submit`. + function _preSubmit(uint256 jobId, address caller, bytes32 deliverable, bytes memory optParams) internal virtual {} + /// @dev After `submit`. + function _postSubmit(uint256 jobId, address caller, bytes32 deliverable, bytes memory optParams) internal virtual {} + /// @dev Before `complete`. + function _preComplete(uint256 jobId, address caller, bytes32 reason, bytes memory optParams) internal virtual {} + /// @dev After `complete`. + function _postComplete(uint256 jobId, address caller, bytes32 reason, bytes memory optParams) internal virtual {} + /// @dev Before `reject`. + function _preReject(uint256 jobId, address caller, bytes32 reason, bytes memory optParams) internal virtual {} + /// @dev After `reject`. + function _postReject(uint256 jobId, address caller, bytes32 reason, bytes memory optParams) internal virtual {} +} + diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/hooks/RulesBindingHook.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/hooks/RulesBindingHook.sol new file mode 100644 index 00000000..736165f7 --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/hooks/RulesBindingHook.sol @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {BaseERC8183Hook} from "./BaseERC8183Hook.sol"; +import {IAgenticCommerce} from "../interfaces/IAgenticCommerce.sol"; +import {IAGWFactory} from "../interfaces/external/IAGWFactory.sol"; +import {ISmartSession} from "../interfaces/external/ISmartSession.sol"; +import {RulesBindingHookErrors, ERC8183HookErrors} from "../libraries/Errors.sol"; + +/// @title RulesBindingHook +/// @notice Binds each job to the funding AGW's rules set and allows one live job per AGW. +/// @dev - Acts only in `beforeAction(fund)` (H-09); every other action passes through. +/// - Scope (D-25): the rule covers jobs that name this hook; hookless jobs are invisible to it. +/// - An AGW is freed by reading kernel job status (H-05), so unhooked `claimRefund` frees it too. +/// - Deployed behind `TransparentUpgradeableProxy` (D-15); storage continues the base at slot 50. +contract RulesBindingHook is BaseERC8183Hook { + /// @notice The job ↔ rules set record. `rulesId` is the AGW's rules id (the engine's `permissionId`). + struct Binding { + address agw; + bytes32 rulesId; + } + + /// @notice A job was bound to an AGW's rules set at `fund`. + event RulesBound(uint256 indexed jobId, address indexed agw, bytes32 indexed rulesId); + + // ───────── storage — slots 50..103 (base owns 0..49) ───────── + + /// @notice AGW factory, used to prove the client is an AGW. Set once, at initialization. + address public AGW_FACTORY; + /// @notice SmartSession engine, used to prove the rules set is live. Set once, at initialization. + address public SESSION_ENGINE; + /// @dev Job id → bound rules set. `rulesId` is not globally unique across wallets; always read with `agw`. + mapping(uint256 => Binding) internal _bindingOf; + /// @dev AGW → last job bound; live only while that job is Funded or Submitted. Read through `activeJobOf`. + mapping(address => uint256) internal _liveJobOf; + uint256[50] private __gap; + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + + /// @notice Initialize the proxy. + /// @param kernel_ The kernel proxy. + /// @param agwFactory_ The AGW factory proxy. + /// @param sessionEngine_ The SmartSession engine. + function initialize(address kernel_, address agwFactory_, address sessionEngine_) external initializer { + if (kernel_ == address(0) || agwFactory_ == address(0) || sessionEngine_ == address(0)) { + revert ERC8183HookErrors.ZeroAddress(); + } + __BaseERC8183Hook_init(kernel_); + AGW_FACTORY = agwFactory_; + SESSION_ENGINE = sessionEngine_; + } + + /// @notice The rules set bound to `jobId` at fund, or zero. + function rulesOfJob(uint256 jobId) external view returns (bytes32) { + return _bindingOf[jobId].rulesId; + } + + /// @notice The AGW bound to `jobId` at fund, or zero. + function agwOfJob(uint256 jobId) external view returns (address) { + return _bindingOf[jobId].agw; + } + + /// @notice The AGW's live job under this hook (Funded or Submitted), or 0. + /// @dev Narrower than the marketplace's `activeJobOf`, which also counts an Open, unexpired job: this hook binds + /// at `fund`, the marketplace at `openJob`. Both are intended. + /// @param agw The wallet. + /// @return The job id, or 0 if the AGW may fund another job here. + function activeJobOf(address agw) public view returns (uint256) { + uint256 id = _liveJobOf[agw]; + if (id == 0) return 0; + IAgenticCommerce.JobStatus s = IAgenticCommerce(KERNEL).getJob(id).status; + return s == IAgenticCommerce.JobStatus.Funded || s == IAgenticCommerce.JobStatus.Submitted ? id : 0; + } + + /// @dev Checks, in order: optParams length · client is an AGW · rules set live · AGW has no live job. + /// - `caller` is the job's client — the kernel checks it before calling the hook. + /// - Runs in `beforeAction`, so any revert leaves the job Open with no escrow moved. + function _preFund(uint256 jobId, address caller, bytes memory optParams) internal override { + if (optParams.length != 32) revert RulesBindingHookErrors.InvalidOptParams(optParams.length); + bytes32 rulesId = abi.decode(optParams, (bytes32)); + if (!IAGWFactory(AGW_FACTORY).isWallet(caller)) revert RulesBindingHookErrors.CallerIsNotAGW(caller); + if (!ISmartSession(SESSION_ENGINE).isPermissionEnabled(rulesId, caller)) { + revert RulesBindingHookErrors.RulesNotLive(caller, rulesId); + } + uint256 live = activeJobOf(caller); + if (live != 0) revert RulesBindingHookErrors.AGWHasLiveJob(caller, live); + + _bindingOf[jobId] = Binding({agw: caller, rulesId: rulesId}); + _liveJobOf[caller] = jobId; + emit RulesBound(jobId, caller, rulesId); + } +} diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol new file mode 100644 index 00000000..5354ebf9 --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol @@ -0,0 +1,239 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + +/// @title IAgenticCommerce +/// @notice External surface of the ERC-8183 kernel on Push Chain. +/// @dev - Events and errors are declared only here. +/// - Hooks and tests take selectors from this interface, never from signature strings. +interface IAgenticCommerce { + // ──────────────────────────────── types ──────────────────────────────── + + /// @notice Job lifecycle states. + enum JobStatus { + Open, + Funded, + Submitted, + Completed, + Rejected, + Expired + } + + /// @notice A job record. + /// @dev - `provider` may be zero until `setProvider`. + /// - `hook == address(0)` means no hook. + struct Job { + address client; + JobStatus status; + address provider; + uint48 expiredAt; + address evaluator; + address hook; + uint256 budget; + string description; + } + + // ──────────────────────────────── events ──────────────────────────────── + + /// @notice A job was created. + event JobCreated( + uint256 indexed jobId, + address indexed client, + address indexed provider, + address evaluator, + uint256 expiredAt, + address hook + ); + /// @notice A provider was assigned to an Open job. + event ProviderSet(uint256 indexed jobId, address indexed provider); + /// @notice The provider set or re-quoted the budget. + event BudgetSet(uint256 indexed jobId, uint256 amount); + /// @notice The client funded the escrow. + event JobFunded(uint256 indexed jobId, address indexed client, uint256 amount); + /// @notice The provider submitted a deliverable. + event JobSubmitted(uint256 indexed jobId, address indexed provider, bytes32 deliverable); + /// @notice The evaluator completed the job. + event JobCompleted(uint256 indexed jobId, address indexed evaluator, bytes32 reason); + /// @notice The job was rejected. + event JobRejected(uint256 indexed jobId, address indexed rejector, bytes32 reason); + /// @notice The job expired through `claimRefund`. + event JobExpired(uint256 indexed jobId); + /// @notice Net payment released to the provider. Emitted on every completion, even at 0. + event PaymentReleased(uint256 indexed jobId, address indexed provider, uint256 amount); + /// @notice Platform fee paid to the treasury. + event PlatformFeePaid(uint256 indexed jobId, address indexed treasury, uint256 amount); + /// @notice Evaluator fee paid. + event EvaluatorFeePaid(uint256 indexed jobId, address indexed evaluator, uint256 amount); + /// @notice Escrow returned to the client. + event Refunded(uint256 indexed jobId, address indexed client, uint256 amount); + /// @notice A hook's whitelist status changed. + event HookWhitelistUpdated(address indexed hook, bool status); + /// @notice An admin detached a hook from a job. + event HookDetached(uint256 indexed jobId, address indexed hook); + /// @notice Platform fee or treasury changed. + event PlatformFeeUpdated(uint256 feeBP, address indexed treasury); + /// @notice Evaluator fee changed. + event EvaluatorFeeUpdated(uint256 feeBP); + /// @notice Unattributed tokens withdrawn while paused. + event EmergencyWithdraw(address indexed token, address indexed to, uint256 amount); + + // ──────────────────────────────── errors ──────────────────────────────── + + /// @notice Job id is 0 or beyond `jobCounter`. + error InvalidJob(); + /// @notice Job is not in a status that permits the action. + error WrongStatus(); + /// @notice Caller is not the role this action requires. + error Unauthorized(); + /// @notice A required address is zero. + error ZeroAddress(); + /// @notice `expiredAt` is not beyond `now + MIN_EXPIRY_WINDOW`, or exceeds `uint48`. + error ExpiryTooShort(); + /// @notice `fund` called before a provider was set. + error ProviderNotSet(); + /// @notice Platform + evaluator fees would exceed 100%. + error FeesTooHigh(); + /// @notice Hook is not whitelisted. + error HookNotWhitelisted(); + /// @notice Hook does not advertise `IERC8183Hook` via ERC-165. + error InvalidHook(); + /// @notice `expectedBudget` differs from the stored budget. + error BudgetMismatch(); + /// @notice Evaluator and provider are the same address. + error EvaluatorIsProvider(); + /// @notice Client and provider are the same address. + error ClientIsProvider(); + /// @notice A Submitted job is still inside the evaluator grace window. + error GracePeriodActive(); + /// @notice Withdrawal would take escrowed funds. + error InsufficientUnattributedBalance(uint256 requested, uint256 available); + + // ──────────────────────────────── constants ──────────────────────────────── + + /// @notice Role for fees, hooks, pause and emergency withdrawal. + /// @return The role id. + function ADMIN_ROLE() external view returns (bytes32); + /// @notice Window after expiry in which a Submitted job cannot be refunded. + /// @return Seconds. + function EVALUATOR_GRACE_PERIOD() external view returns (uint256); + /// @notice Minimum distance between now and `expiredAt` at creation. + /// @return Seconds. + function MIN_EXPIRY_WINDOW() external view returns (uint256); + /// @notice Basis-point denominator. + /// @return The denominator. + function BPS_DENOMINATOR() external view returns (uint256); + + // ──────────────────────────────── admin ──────────────────────────────── + + /// @notice Pause every lifecycle function except `claimRefund`. + function pause() external; + /// @notice Unpause. + function unpause() external; + /// @notice Set the platform fee and treasury. + /// @param feeBP Fee in basis points. + /// @param treasury Fee recipient. + function setPlatformFee(uint256 feeBP, address treasury) external; + /// @notice Set the evaluator fee. + /// @param feeBP Fee in basis points. + function setEvaluatorFee(uint256 feeBP) external; + /// @notice Whitelist or de-whitelist a hook for new jobs. + /// @param hook Hook address. + /// @param status Whitelisted or not. + function setHookWhitelist(address hook, bool status) external; + /// @notice Detach hooks from jobs (emergency). + /// @param jobIds Jobs to detach. + function batchDetachHook(uint256[] calldata jobIds) external; + /// @notice Withdraw tokens that are not escrow, while paused. + /// @param token ERC-20 to withdraw; never zero. + /// @param to Recipient. + /// @param amount Amount. + function emergencyWithdraw(address token, address to, uint256 amount) external; + + // ──────────────────────────────── lifecycle ──────────────────────────────── + + /// @notice Create a job; the caller is the client. + /// @param provider Provider, or zero to set later. + /// @param evaluator Evaluator; never zero. + /// @param expiredAt Expiry timestamp. + /// @param description Free-text description. + /// @param hook Whitelisted hook, or zero. + /// @return jobId The new job id. + function createJob( + address provider, + address evaluator, + uint256 expiredAt, + string calldata description, + address hook + ) external returns (uint256 jobId); + + /// @notice Assign the provider of an Open job. Client only. + /// @param jobId The job. + /// @param provider The provider. + /// @param optParams Opaque hook payload. + function setProvider(uint256 jobId, address provider, bytes calldata optParams) external; + + /// @notice Set or re-quote the budget. Provider only. + /// @param jobId The job. + /// @param amount Budget in payment-token units. + /// @param optParams Opaque hook payload. + function setBudget(uint256 jobId, uint256 amount, bytes calldata optParams) external; + + /// @notice Fund the escrow. Client only. + /// @param jobId The job. + /// @param expectedBudget Must equal the stored budget. + /// @param optParams Opaque hook payload. + function fund(uint256 jobId, uint256 expectedBudget, bytes calldata optParams) external; + + /// @notice Submit a deliverable. Provider only. + /// @param jobId The job. + /// @param deliverable Deliverable hash or reference. + /// @param optParams Opaque hook payload. + function submit(uint256 jobId, bytes32 deliverable, bytes calldata optParams) external; + + /// @notice Complete and pay out. Evaluator only. + /// @param jobId The job. + /// @param reason Attestation reason. + /// @param optParams Opaque hook payload. + function complete(uint256 jobId, bytes32 reason, bytes calldata optParams) external; + + /// @notice Reject; refunds escrow if funded. + /// @param jobId The job. + /// @param reason Rejection reason. + /// @param optParams Opaque hook payload. + function reject(uint256 jobId, bytes32 reason, bytes calldata optParams) external; + + /// @notice Refund an expired job. Anyone may call. + /// @param jobId The job. + function claimRefund(uint256 jobId) external; + + // ──────────────────────────────── views ──────────────────────────────── + + /// @notice Full job record; zero struct for unknown ids. + /// @param jobId The job. + /// @return The job. + function getJob(uint256 jobId) external view returns (Job memory); + + /// @notice The single payment token. + /// @return The token. + function paymentToken() external view returns (IERC20); + /// @notice Platform fee in basis points. + /// @return Basis points. + function platformFeeBP() external view returns (uint256); + /// @notice Platform fee recipient. + /// @return The recipient. + function platformTreasury() external view returns (address); + /// @notice Evaluator fee in basis points. + /// @return Basis points. + function evaluatorFeeBP() external view returns (uint256); + /// @notice Last job id issued. + /// @return The last id issued. + function jobCounter() external view returns (uint256); + /// @notice Whether a hook may be used on new jobs. + /// @param hook Hook address. + /// @return Whether whitelisted. + function whitelistedHooks(address hook) external view returns (bool); + /// @notice Sum of budgets of Funded and Submitted jobs. + /// @return The escrowed sum. + function totalEscrowed() external view returns (uint256); +} diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/IERC8183Hook.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/IERC8183Hook.sol new file mode 100644 index 00000000..83c31ed8 --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/IERC8183Hook.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; + +/// @title IERC8183Hook +/// @notice ERC-8183 hook interface: callbacks around each hooked kernel action. +/// @dev - Same selectors as the EIP's `IACPHook` and the official `IERC8183Hook`, so the +/// ERC-165 id (`0x7ff6bc9e`) is compatible with both. +/// - `data` encoding per selector is fixed by the kernel (PRD §4.1.5). +interface IERC8183Hook is IERC165 { + /// @notice Called before the kernel applies an action. + /// @dev - May revert to block the action. + /// @param jobId The job the action targets. + /// @param selector The kernel function's selector. + /// @param data ABI-encoded action arguments, caller first. + function beforeAction(uint256 jobId, bytes4 selector, bytes calldata data) external; + + /// @notice Called after the kernel applied an action. + /// @dev - A revert rolls back the whole kernel call. + /// @param jobId The job the action targeted. + /// @param selector The kernel function's selector. + /// @param data ABI-encoded action arguments, caller first. + function afterAction(uint256 jobId, bytes4 selector, bytes calldata data) external; +} diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/IUniversalMarketplace.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/IUniversalMarketplace.sol new file mode 100644 index 00000000..4bc56367 --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/IUniversalMarketplace.sol @@ -0,0 +1,195 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {OwnerIntent} from "@push-agw/libraries/Types.sol"; +import {Session} from "./external/IAGW.sol"; +import {IAGWFactory} from "./external/IAGWFactory.sol"; +import {IAgenticCommerce} from "./IAgenticCommerce.sol"; +import {IUniversalMarketplaceRules} from "./IUniversalMarketplaceRules.sol"; +import {AgentCard, AgentCardView, JobInputs, OpenJobParams, IntentRequest} from "../libraries/Types.sol"; + +/// @title IUniversalMarketplace +/// @notice Agent cards, and `openJob`: one relayed call that deploys the user's AGW (if needed), grants it the +/// card's rules, and creates the ERC-8183 job with the AGW as client. Moves no funds. +/// @dev Errors live in `UniversalMarketplaceErrors` (`libraries/Errors.sol`); types in `libraries/Types.sol`. +interface IUniversalMarketplace { + // ═══ UM_1: EVENTS ═══ + + /// @dev `rulesHash = keccak256(rules)`, `jobSpecHash = keccak256(jobSpecTemplate)`. + event AgentCardRegistered( + uint256 indexed cardId, + address indexed provider, + bytes32 indexed jobType, + string chainNamespace, + bytes32 rulesHash, + bytes32 jobSpecHash, + bytes32 metadataHash, + uint256 providerFee + ); + /// @notice The provider changed the card. `version` is the new version; the verified tag is cleared. + event AgentCardUpdated( + uint256 indexed cardId, + uint256 version, + bytes32 rulesHash, + bytes32 jobSpecHash, + bytes32 metadataHash, + uint256 providerFee + ); + /// @notice The provider switched the card on or off. + event AgentCardStatusChanged(uint256 indexed cardId, bool active); + /// @notice The admin disabled the card, permanently. + event AgentCardDisabled(uint256 indexed cardId); + /// @notice The admin verified the card AT `version`. Any later update clears the tag. + event AgentCardVerified(uint256 indexed cardId, uint256 version); + /// @notice The verified tag was removed: by the admin, by an update, or by `disableAgentCard`. + event AgentCardVerificationRevoked(uint256 indexed cardId); + /// @notice The admin set an agent's rating (placeholder until VerifiedRatings is wired). + event AgentRatingSet(address indexed agent, uint256 rating); + /// @notice New jobs get this hook. + event HookUpdated(address hook); + /// @notice New jobs get this evaluator. + event EvaluatorUpdated(address evaluator); + /// @notice A chain's CEA deployment was set, or cleared (both zero). + event CEADeploymentSet(bytes32 indexed chainHash, address ceaFactory, address ceaProxyImpl); + /// @notice `openJob` deployed (if needed) and granted the AGW, and created `jobId`. + event JobOpened( + uint256 indexed cardId, + address indexed owner, + address indexed agw, + uint256 jobId, + bytes32 rulesId, + uint256 principal, + uint256 cardVersion + ); + + // ═══ UM_2: ADMIN ═══ + + /// @notice Sets the hook every new job is created with. Must be whitelisted on the kernel. + function setHook(address hook) external; + + /// @notice Sets the evaluator every new job is created with. + function setEvaluator(address evaluator) external; + + /// @notice Sets a destination chain's CEA deployment; `(chainHash, 0, 0)` clears it. A chain without one cannot + /// carry cards or jobs. + function setCEADeployment(bytes32 chainHash, address ceaFactory, address ceaProxyImpl) external; + + /// @notice Sets an agent's rating. No validation; placeholder until VerifiedRatings is wired. + function setAgentRating(address agent, uint256 rating) external; + + /// @notice Pauses card registration, update and `openJob`. Admin functions stay live. + function pause() external; + + /// @notice Lifts `pause`. + function unpause() external; + + /// @notice Permanently disables a card and clears its verified tag. The provider stays registered. + function disableAgentCard(uint256 cardId) external; + + /// @notice Tags the card verified at `cardVersion`, which must be its current version. + function verifyAgentCard(uint256 cardId, uint256 cardVersion) external; + + /// @notice Clears the verified tag. Idempotent. + function revokeAgentCardVerification(uint256 cardId) external; + + // ═══ UM_3: CARDS ═══ + + /// @notice Registers the caller's one card, with its content. The caller becomes its provider. + /// @param c The card; `provider` and `active` are ignored. + /// @param rules `abi.encode(AgentCardRules)`. + /// @param jobSpecTemplate `abi.encode(JobSpecTemplate)`. + function registerAgentCard(AgentCard calldata c, bytes calldata rules, bytes calldata jobSpecTemplate) + external + returns (uint256 cardId); + + /// @notice Replaces every mutable field and both content blobs; bumps the version, clears the verified tag. + function updateAgentCard(uint256 cardId, AgentCard calldata c, bytes calldata rules, bytes calldata jobSpecTemplate) + external; + + /// @notice The provider switches the card on or off. A disabled card cannot be switched on. + function setAgentCardActive(uint256 cardId, bool active) external; + + // ═══ UM_4: JOBS ═══ + + /// @notice Deploys the AGW if needed, grants the card's rules, and creates the job. Moves no funds. + /// @return jobId The kernel job. + /// @return agw The AGW, the job's client. + /// @return rulesId The granted rules (the engine's permissionId). + function openJob(OpenJobParams calldata p) external returns (uint256 jobId, address agw, bytes32 rulesId); + + // ═══ UM_5: VIEWS ═══ + + /// @notice The card, its content, version and tags. The zero view for an unknown card. + function getAgentCard(uint256 cardId) external view returns (AgentCardView memory); + + /// @notice Whether the admin has verified the card at its current version. + function isAgentCardVerified(uint256 cardId) external view returns (bool); + + /// @notice Whether the admin has disabled the card. Permanent. + function isAgentCardDisabled(uint256 cardId) external view returns (bool); + + /// @notice 1 at registration, +1 per update, 0 for an unknown card. + function agentCardVersion(uint256 cardId) external view returns (uint256); + + /// @notice Cards registered so far; also the last card id. + function agentCardCount() external view returns (uint256); + + /// @notice The provider's card id, or 0 for none. + function agentCardOf(address provider) external view returns (uint256); + + /// @notice The agent's rating, 0 by default. + function getAgentRating(address agent) external view returns (uint256); + + /// @notice The AGW's last job opened here while it is Funded, Submitted, or Open and unexpired; else 0. + /// @dev Wider than the hook's `activeJobOf` (Funded or Submitted only): the marketplace binds at `openJob`, the + /// hook at `fund`. + function activeJobOf(address agw) external view returns (uint256); + + /// @notice The card a job was opened from. + function cardOfJob(uint256 jobId) external view returns (uint256); + + /// @notice The AGW a job was opened for. + function agwOfJob(uint256 jobId) external view returns (address); + + /// @notice The rules set granted for a job. + function rulesOfJob(uint256 jobId) external view returns (bytes32); + + /// @notice The card version a job was opened against. + function cardVersionOfJob(uint256 jobId) external view returns (uint256); + + /// @notice The AGW's CEA on `chainHash`. Reverts `ChainNotSupported` for a chain without a CEA deployment. + function computeCEA(address agw, bytes32 chainHash) external view returns (address); + + /// @notice The ERC-7579 single execution `openJob` makes the AGW run: `createJob` on the kernel. + function buildCreateJobCalldata(uint256 cardId, address owner, uint96 index, JobInputs calldata job) + external + view + returns (bytes32 mode, bytes memory executionCalldata); + + /// @notice The OwnerIntent the owner signs for `openJob`. + function previewIntent(IntentRequest calldata r, Session calldata s) external view returns (OwnerIntent memory); + + /// @notice A chain's CEA factory and proxy implementation; zero when unsupported. + function ceaDeployment(bytes32 chainHash) external view returns (address ceaFactory, address ceaProxyImpl); + + /// @notice The AGW factory. Set once, at initialization. + function AGW_FACTORY() external view returns (IAGWFactory); + + /// @notice The ERC-8183 kernel. Set once, at initialization. + function KERNEL() external view returns (IAgenticCommerce); + + /// @notice The rules-side helper (UniversalMarketplaceRules). Set once, at initialization. + function RULES() external view returns (IUniversalMarketplaceRules); + + /// @notice keccak256("eip155:" ‖ decimal(block.chainid)): Push itself, which no card may name. + function PUSH_CHAIN_HASH() external view returns (bytes32); + + /// @notice The hook new jobs get. + function hook() external view returns (address); + + /// @notice The evaluator new jobs get. + function evaluator() external view returns (address); + + /// @notice The contract's version, "2.0.0". + function version() external pure returns (string memory); +} diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/IUniversalMarketplaceRules.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/IUniversalMarketplaceRules.sol new file mode 100644 index 00000000..e4266660 --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/IUniversalMarketplaceRules.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {Session} from "./external/IAGW.sol"; +import {SessionContext} from "../libraries/Types.sol"; + +/// @title IUniversalMarketplaceRules +/// @notice The rules side of an agent card: validates its `AgentCardRules` at registration, and checks the +/// owner-signed session against the card at `openJob`. EVM universal only. Reverts with +/// `UniversalMarketplaceErrors`. +interface IUniversalMarketplaceRules { + // ═══ UMR_1: RULES ═══ + + /// @notice Registration guards on a card's rules (R1-R17). Reverts `InvalidAgentCard(reason)` on the first + /// violation. + /// @dev - Assets: count, principal index, no zero, no duplicate; the principal asset's total cap is + /// `MARKER_PRINCIPAL`, its per-call cap non-zero; no marker on any other asset. + /// - Allowed calls: count, pin counts, `MARKER_WALLET` under EQ only, no identical entries, no pinless entry + /// beside a pinned one, ERC-20 approve / transfer / transferFrom pinned, no increaseAllowance. + /// @param rules `abi.encode(AgentCardRules)`. + /// @return tokens Every asset's token, for the marketplace's chain check. + function validateAgentCardRules(bytes calldata rules) external pure returns (address[] memory tokens); + + /// @notice Rules = card (C1-C14): the session grants exactly the card's rules, markers filled for this job, + /// to the card's agent, bound to this job and CEA. Reverts on the first mismatch. + /// @dev - Shape: agent, one action, one policy, envelope version, chain. + /// - Terms: assets and caps, gas cap, allowed calls and pins, expiry, expected CEA. + /// @param cardRules The card's stored `abi.encode(AgentCardRules)`. + /// @param session The owner-signed session. + /// @param ctx The job's values. + function checkRulesMatchCard(bytes calldata cardRules, Session calldata session, SessionContext calldata ctx) + external + pure; +} diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/external/IAGW.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/external/IAGW.sol new file mode 100644 index 00000000..cff0214d --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/external/IAGW.sol @@ -0,0 +1,76 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {OwnerIntent} from "@push-agw/libraries/Types.sol"; + +/// @title IAGW — the SmartSession `Session` mirror and the Push Agentic Wallet (AGW) functions the marketplace needs. +/// @dev - Source: AGW v6, `push-agentic-wallets` commit `ffd567d` (submodule `lib/push-agentic-wallets`). +/// - The AGW's own types (`OwnerIntent`, `AllowedCall`, `UniversalTerms`, `AssetCap`, `ArgPin`, ...) are +/// IMPORTED from `@push-agw/libraries/Types.sol`, never copied: a struct change there fails this build. +/// - `Session` and its parts stay a MIRROR of the vendor SmartSession types +/// (`lib/smartsessions/contracts/DataTypes.sol` in the AGW repo, fork `7dc20e4`; field order verified +/// identical): the vendor tree pulls remappings and an EVM target this repo cannot compile. The fork test +/// (`UniversalMarketplace.fork.t.sol`) pins it — a wrong mirror changes `keccak256(abi.encode(session))`, and +/// the real wallet's `grantRulesWithSig` reverts `IntentSessionMismatch`. +/// - `Session.sessionValidator` is `ISessionValidator` upstream; a contract type is `address` in the ABI. +/// - `rulesId` is the AGW's name for the engine's `permissionId`; the two are the same value. +/// - Agent identity: the AGW's `AgentValidator` requires `sessionValidatorInitData == abi.encode(agent)`, +/// exactly 32 bytes, agent non-zero. +/// - `IAGW` below: signatures verified identical to v6 `src/interfaces/IAGW.sol`. + +// ─────────────────────────────── SmartSession ─────────────────────────────── + +struct PolicyData { + address policy; + bytes initData; +} + +struct ActionData { + bytes4 actionTargetSelector; + address actionTarget; + PolicyData[] actionPolicies; +} + +struct ERC7739Context { + bytes32 appDomainSeparator; + string[] contentNames; +} + +struct ERC7739Data { + ERC7739Context[] allowedERC7739Content; + PolicyData[] erc1271Policies; +} + +struct Session { + address sessionValidator; + bytes sessionValidatorInitData; + bytes32 salt; + PolicyData[] userOpPolicies; + ERC7739Data erc7739Policies; + ActionData[] actions; + bool permitERC4337Paymaster; +} + +// ─────────────────────────────── the wallet ─────────────────────────────── + +/// @title IAGW — the wallet functions the marketplace calls. +interface IAGW { + /// @notice `grantRules`, authorised by the owner's signed OwnerIntent. + function grantRulesWithSig(Session calldata session, OwnerIntent calldata intent, bytes calldata sig) + external + returns (bytes32 rulesId); + + /// @notice The owner door, authorised by the owner's signed OwnerIntent. + function executeWithSig( + bytes32 mode, + bytes calldata executionCalldata, + OwnerIntent calldata intent, + bytes calldata sig + ) external; + + /// @notice Next expected sequence number in a replay lane. + function getNonce(uint192 nonceKey) external view returns (uint64); + + /// @notice The grant nonce the next grant will consume. + function grantNonce() external view returns (uint64); +} diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/external/IAGWFactory.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/external/IAGWFactory.sol new file mode 100644 index 00000000..96b9ea57 --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/external/IAGWFactory.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {OwnerIntent} from "@push-agw/libraries/Types.sol"; + +/// @title IAGWFactory +/// @notice The Push Agentic Wallet factory — the functions this repo calls. +/// @dev - Source: AGW v6, `push-agentic-wallets` commit `ffd567d`, `src/interfaces/IAGWFactory.sol`; every +/// signature below verified identical. +/// - `isWallet` is what RulesBindingHook reads; the rest is what UniversalMarketplace reads. +/// - The v6 factory proxy is a deploy-time input, never a constant. +interface IAGWFactory { + /// @notice True only for wallets this factory deployed. + /// @param account Address to test. + /// @return Whether it is an AGW. + function isWallet(address account) external view returns (bool); + + /// @notice Deploys wallet `intent.index` for `intent.owner`, on the owner's signature. + function deployWalletWithSig(OwnerIntent calldata intent, bytes calldata sig, string calldata label) + external + returns (address wallet); + + /// @notice The address wallet `index` of `owner` has, or will have. + function predictWallet(address owner, uint256 index) external view returns (address wallet, bool deployed); + + /// @notice How many wallets `owner` has; also the index the next deploy takes. + function walletCount(address owner) external view returns (uint256); + + /// @notice The owner of `wallet`, or address(0) if this factory did not deploy it. + function ownerOf(address wallet) external view returns (address); +} diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/external/ISmartSession.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/external/ISmartSession.sol new file mode 100644 index 00000000..a71030ea --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/interfaces/external/ISmartSession.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +/// @title ISmartSession +/// @notice Read-only mirror of the SmartSession engine used by Push AGWs. +/// @dev - Source: the SmartSession fork `7dc20e4` vendored by AGW v6 (`push-agentic-wallets` commit `ffd567d`). +/// - `PermissionId` is a user-defined `bytes32`; the ABI is plain `bytes32`. +/// - The id comes FIRST here, unlike the engine's other views. +/// - The v6 engine address is a deploy-time input, never a constant. +interface ISmartSession { + /// @notice Whether a rules set is live on an account. + /// @param permissionId The rules set's id (the AGW's `rulesId`; the engine names it `permissionId`). + /// @param account The wallet. + /// @return Whether the permission is enabled. + function isPermissionEnabled(bytes32 permissionId, address account) external view returns (bool); +} diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/libraries/Errors.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/libraries/Errors.sol new file mode 100644 index 00000000..ac8a76df --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/libraries/Errors.sol @@ -0,0 +1,96 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +/// @title UniversalMarketplaceErrors +/// @notice Every error the marketplace, its rules helper and JobSpecBuilder raise. +/// @dev A library error has the same selector wherever it is raised, so a helper's revert bubbles through the +/// marketplace with the selector its callers expect. +library UniversalMarketplaceErrors { + // ───────── config and cards ───────── + + error ZeroAddress(); + error HookNotWhitelisted(); + error AgentCardInactive(); + /// @dev The caller is not the card's provider (or the card does not exist). + error CallerIsNotProvider(); + error AgentCardDisabled(uint256 cardId); + error ChainNotSupported(bytes32 chainHash); + /// @dev The single registration error; every `reason` is listed in the reference (Appendix B of PRD 12). + error InvalidAgentCard(string reason); + /// @dev `provided` is not the card's `current` version (openJob, verifyAgentCard). + error AgentCardVersionMismatch(uint256 provided, uint256 current); + /// @dev `updateAgentCard` tried to change the card's execution chain. + error AgentCardIdentityImmutable(); + /// @dev One card per provider; a disabled card still counts. + error AgentCardAlreadyRegistered(address provider); + + // ───────── openJob: the job ───────── + + error PrincipalOutOfRange(); + error ExpiryOutOfRange(); + error ExecuteByOutOfRange(); + /// @dev The configured evaluator is the card's provider (the evaluator changed after registration). + error ProviderIsEvaluator(); + error ParamCountMismatch(uint256 expected, uint256 actual); + error ParamOutOfRange(uint256 index, int256 value); + /// @dev A PRINCIPAL_BPS target overflows: `principal × bps` does not fit uint256. + error TargetOverflow(uint256 check); + /// @dev The card's template writes fill `fill` of read `read` outside that read's args. + error FillOutOfBounds(uint256 read, uint256 fill); + + // ───────── openJob: wallet and intent (same shapes as the AGW's errors of the same name) ───────── + + error IntentWalletMismatch(address expected, address provided); + error ExecutorMismatch(address expected, address actual); + error IntentSessionMismatch(bytes32 actual); + error IntentExecMismatch(bytes32 actualCalldataHash); + /// @dev The wallet's last job opened here is still active (`activeJobOf`). + error WalletHasActiveJob(address agw, uint256 jobId); + error AGWMismatch(address expected, address actual); + error WalletOwnerMismatch(address expected, address actual); + + // ───────── openJob: rules = card ───────── + + error AgentMismatch(); + error ActionCount(); + error PolicyShape(uint256 i); + /// @dev The envelope's first word is not `ENVELOPE_VERSION`; 0 when the envelope is shorter than one word. + error EnvelopeVersionMismatch(uint256 actual); + error ChainMismatch(uint256 i); + error AssetCountMismatch(uint256 expected, uint256 actual); + error AssetMismatch(uint256 index); + error PrincipalCapMismatch(); + error GasCapMismatch(); + error ActionsMismatch(); + /// @dev Pin `pin` of allowed call `call` does not hold the card's value, with markers filled in. + error PinMismatch(uint256 call, uint256 pin); + error ExpiryMismatch(); + error ExpectedCEAMismatch(address expected, address actual); + + // ───────── openJob: the created job ───────── + + error UnexpectedJobCount(uint256 before, uint256 afterCount); + error JobMismatch(); +} + +/// @title RulesBindingHookErrors +/// @notice The errors of the interim job hook. +library RulesBindingHookErrors { + /// @notice `fund.optParams` is not exactly 32 bytes. + error InvalidOptParams(uint256 length); + /// @notice The funding client is not a factory-deployed AGW. + error CallerIsNotAGW(address caller); + /// @notice The rules set is not enabled on this AGW. + error RulesNotLive(address agw, bytes32 rulesId); + /// @notice The AGW already has a Funded or Submitted job under this hook. + error AGWHasLiveJob(address agw, uint256 liveJobId); +} + +/// @title ERC8183HookErrors +/// @notice The errors of BaseERC8183Hook, shared by every hook built on it. +library ERC8183HookErrors { + /// @notice Caller is not the kernel. + error CallerIsNotKernel(address caller); + /// @notice A required address is zero. + error ZeroAddress(); +} diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/libraries/JobSpecBuilder.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/libraries/JobSpecBuilder.sol new file mode 100644 index 00000000..b6dcbced --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/libraries/JobSpecBuilder.sol @@ -0,0 +1,147 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {IUniversalMarketplace} from "../interfaces/IUniversalMarketplace.sol"; +import {UniversalMarketplaceErrors} from "./Errors.sol"; +import {Read, Check, JobSpec} from "./JobSpecTypes.sol"; +import { + FillSource, + Fill, + ReadTemplate, + TargetSource, + CheckTemplate, + ParamBounds, + JobSpecTemplate, + BuildContext +} from "./Types.sol"; + +/// @title JobSpecBuilder +/// @notice Turns a card's `jobSpecTemplate` into one job's criteria, a `JobSpec` (the `createJob` description). +/// @dev - Builds only: it never judges a template. Whether the UniversalEvaluator can run the criteria is the +/// provider's responsibility, and the card's verified tag is the review (PRD 09 Z6). +/// - Checks only what building needs: the job's params against the template's bounds, every fill inside its +/// read's args, and a PRINCIPAL_BPS product that fits. Anything else malformed reverts on its own +/// (out-of-range index, unsupported CEA chain). +/// - External library: deployed once and linked into the marketplace, which DELEGATECALLs it. Inlined, it +/// put the marketplace over the size limit (23,821 B even at 1 optimizer run). +/// - Runs in the caller's context: the CEA comes from the caller's own `computeCEA`. +/// - `logic` and `allowedMutability` are copied verbatim; neither is judged here. +library JobSpecBuilder { + uint256 internal constant BPS = 10_000; + + /// @notice `abi.encode(JobSpec)` for one job. + /// @param jobSpecTemplate The card's `abi.encode(JobSpecTemplate)`. + /// @param ctx The job's values. + function build(bytes memory jobSpecTemplate, BuildContext memory ctx) public view returns (bytes memory) { + JobSpecTemplate memory t = abi.decode(jobSpecTemplate, (JobSpecTemplate)); + _checkParams(t.params, ctx.params); + address[] memory cea = _ceas(t, ctx.agw); + + JobSpec memory spec; + spec.executeBy = uint64(ctx.executeBy); + spec.failFinalAt = uint64(ctx.executeBy) + ctx.settleWindow; + spec.origin = ctx.origin; + spec.logic = t.logic; + spec.allowedMutability = t.allowedMutability; + spec.reads = new Read[](t.reads.length); + for (uint256 i; i < t.reads.length; ++i) { + spec.reads[i] = _buildRead(t.reads[i], i, ctx.params, cea[i]); + } + spec.checks = new Check[](t.checks.length); + for (uint256 j; j < t.checks.length; ++j) { + spec.checks[j] = _buildCheck(t.checks[j], j, ctx, cea); + } + return abi.encode(spec); + } + + /// @dev One per template param, each inside its inclusive bounds. + function _checkParams(ParamBounds[] memory bounds, int256[] memory params) private pure { + if (params.length != bounds.length) { + revert UniversalMarketplaceErrors.ParamCountMismatch(bounds.length, params.length); + } + for (uint256 i; i < params.length; ++i) { + if (params[i] < bounds[i].min || params[i] > bounds[i].max) { + revert UniversalMarketplaceErrors.ParamOutOfRange(i, params[i]); + } + } + } + + /// @dev The AGW's CEA for every read that needs one (a CEA fill, or a CEA-target check on it), else zero. + function _ceas(JobSpecTemplate memory t, address agw) private view returns (address[] memory cea) { + cea = new address[](t.reads.length); + for (uint256 i; i < t.reads.length; ++i) { + if (_hasCEAFill(t.reads[i])) cea[i] = _ceaOf(agw, t.reads[i]); + } + for (uint256 j; j < t.checks.length; ++j) { + uint8 r = t.checks[j].read; + if (t.checks[j].source == TargetSource.CEA && cea[r] == address(0)) { + cea[r] = _ceaOf(agw, t.reads[r]); + } + } + } + + function _hasCEAFill(ReadTemplate memory r) private pure returns (bool) { + for (uint256 f; f < r.fills.length; ++f) { + if (r.fills[f].source == FillSource.CEA) return true; + } + return false; + } + + /// @dev The template read, with its fills written into a fresh copy of `args`. + function _buildRead(ReadTemplate memory r, uint256 i, int256[] memory params, address cea) + private + pure + returns (Read memory) + { + bytes memory args = bytes.concat(r.args); // a copy: the template stays untouched + for (uint256 f; f < r.fills.length; ++f) { + Fill memory fill = r.fills[f]; + uint256 at = 32 * uint256(fill.word); + if (at + 32 > args.length) revert UniversalMarketplaceErrors.FillOutOfBounds(i, f); + bytes32 word = fill.source == FillSource.CEA + ? bytes32(uint256(uint160(cea))) + : bytes32(uint256(params[fill.param])); + // solhint-disable-next-line no-inline-assembly + assembly ("memory-safe") { + mstore(add(add(args, 0x20), at), word) + } + } + return Read({ + chainNamespace: r.chainNamespace, + chainId: r.chainId, + minConfirmations: r.minConfirmations, + target: r.target, + selector: r.selector, + args: args, + outputs: r.outputs, + field: r.field + }); + } + + /// @dev The check with its target resolved. + function _buildCheck(CheckTemplate memory c, uint256 j, BuildContext memory ctx, address[] memory cea) + private + pure + returns (Check memory) + { + int256 target = c.value; + if (c.source == TargetSource.PRINCIPAL_BPS) { + uint256 bps = uint256(c.value); + if (ctx.principal > type(uint256).max / bps) revert UniversalMarketplaceErrors.TargetOverflow(j); + // forge-lint: disable-next-line(unsafe-typecast) + target = int256((ctx.principal * bps) / BPS); // ≤ uint256.max / 10_000 < int256.max: cannot truncate + } else if (c.source == TargetSource.PARAM) { + target = ctx.params[uint256(c.value)]; + } else if (c.source == TargetSource.CEA) { + target = int256(uint256(uint160(cea[c.read]))); + } + return Check({read: c.read, evaluation: c.evaluation, operation: c.operation, target: target}); + } + + /// @dev The AGW's CEA on the read's chain, from the caller (the marketplace, under DELEGATECALL). The key is + /// keccak256 of the read's CAIP-2 string; an unsupported chain reverts `ChainNotSupported`. + function _ceaOf(address agw, ReadTemplate memory r) private view returns (address) { + bytes32 chainHash = keccak256(abi.encodePacked(r.chainNamespace, ":", r.chainId)); + return IUniversalMarketplace(address(this)).computeCEA(agw, chainHash); + } +} diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/libraries/JobSpecTypes.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/libraries/JobSpecTypes.sol new file mode 100644 index 00000000..c19af258 --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/libraries/JobSpecTypes.sol @@ -0,0 +1,108 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +/// @title JobSpecTypes — the evaluation criteria of an ERC-8183 job +/// @notice One definition, shared by everything that writes or reads a job's criteria: +/// - UniversalMarketplace builds a `JobSpec` and stores `abi.encode(spec)` as the job's description; +/// - the UniversalHook decodes it at `fund` and freezes it; +/// - the UniversalEvaluator fires its reads and judges its checks and `logic`. +/// @dev - Source: `docs-internal/Universal Evaluator V2 Design`, plus `origin` (marketplace PRD decision Z7) and +/// `allowedMutability` (carried, not enforced, by the marketplace). +/// - Field order is ABI. Never reorder, never insert; a change here changes every description. + +/// @notice How a check compares. BOOLEAN / COMPARE use the value now; NUMBER / PERCENTAGE use the change since the +/// baseline. +enum Evaluation { + BOOLEAN, + COMPARE, + NUMBER, + PERCENTAGE +} + +/// @notice The comparison operator: == != > >= < <=. +enum Operation { + EQUAL, + NOT_EQUAL, + GREATER_THAN, + GREATER_OR_EQUAL, + LESS_THAN, + LESS_OR_EQUAL +} + +/// @notice How a logic step combines its checks and child steps. +enum LogicKind { + ALL, + ANY, + AT_LEAST +} + +/// @notice Who may propose a replacement JobSpec at setBudget. Carried, not enforced, by the marketplace. +enum AllowedMutability { + NONE, + CLIENT, + PROVIDER, + BOTH +} + +/// @notice One contract call on one chain, and which value in its answer to use. +struct Read { + // namespace only ("eip155"), with chainId separate — the Read State split (AGW doc D6); + // AgentCard.chainNamespace is the full CAIP-2 string + string chainNamespace; + string chainId; // e.g. "8453" + uint16 minConfirmations; // confirmations this chain needs before the answer counts + address target; // the contract to call + bytes4 selector; // the view function + bytes args; // abi-encoded arguments + bytes outputs; // the function's return types, as T_* codes + uint8[] field; // which returned value, by ABI position: [0] = 1st return value, [0, 2] = its 3rd field +} + +/// @notice One comparison on one read. +struct Check { + uint8 read; // index into reads + Evaluation evaluation; + Operation operation; + int256 target; // in the contract's own units +} + +/// @notice One logic step. `logic[0]` is the root. `checks` index into checks; `children` index into logic, +/// each greater than this step's own index. `k` is used by AT_LEAST only. +/// @dev AT_LEAST: `k` of the step's checks and children together pass. The marketplace copies the array verbatim +/// and never evaluates it: the semantics are evaluator-owned. +struct Logic { + LogicKind kind; + uint8[] checks; + uint8[] children; + uint8 k; +} + +/// @notice A job's criteria. `logic[0]` is the root: the job passes if it passes. +struct JobSpec { + Read[] reads; + Check[] checks; + Logic[] logic; + AllowedMutability allowedMutability; // copied from the card's template; not read in this repo + bytes32 origin; // keccak256(abi.encode(marketplace, cardId, cardVersion, principal)); opaque to hook and evaluator + uint64 executeBy; // the provider must execute before this + uint64 failFinalAt; // a FAIL only counts from a verify started after this +} + +// ─────────────────────────────── return-type codes (`Read.outputs`) ─────────────────────────────── + +uint8 constant T_UINT = 1; +uint8 constant T_INT = 2; +uint8 constant T_BOOL = 3; +uint8 constant T_ADDRESS = 4; +uint8 constant T_BYTESN = 5; +uint8 constant T_BYTES = 6; +uint8 constant T_STRING = 7; +uint8 constant T_TUPLE = 8; +uint8 constant T_ARRAY = 9; +uint8 constant T_FIXED_ARRAY = 10; + +// ─────────────────────────────── limits ─────────────────────────────── + +uint256 constant MAX_READS = 16; +uint256 constant MAX_CHECKS = 16; +uint256 constant MAX_LOGIC = 32; diff --git a/plan/marketplace/contracts/src/agentic-commerce-8183/libraries/Types.sol b/plan/marketplace/contracts/src/agentic-commerce-8183/libraries/Types.sol new file mode 100644 index 00000000..290dde4d --- /dev/null +++ b/plan/marketplace/contracts/src/agentic-commerce-8183/libraries/Types.sol @@ -0,0 +1,199 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {AssetCap, AllowedCall, OwnerIntent} from "@push-agw/libraries/Types.sol"; +import {Session} from "../interfaces/external/IAGW.sol"; +import {Evaluation, Operation, Logic, AllowedMutability} from "./JobSpecTypes.sol"; + +/// @title Types — the UniversalMarketplace package's structs, enums and markers, file-level. +/// @dev - Cards, jobs and init: the marketplace (UniversalMarketplace, IUniversalMarketplace). +/// - `AgentCardRules`, `SessionContext`, the markers: the rules helper (UniversalMarketplaceRules). +/// - The criteria template: JobSpecBuilder. The built criteria (`JobSpec`) stay in JobSpecTypes.sol, the wire +/// format shared with the UniversalHook and the UniversalEvaluator. +/// - AGW types (`AssetCap`, `AllowedCall`, `OwnerIntent`, ...) are imported from AGW v6, never copied. + +// ─────────────────────────────── markers (D2, D3) ─────────────────────────────── +// +// Published constants: the SDK uses the same values. A card holds a marker; the signed session holds the value the +// marketplace fills in for this job. Both have non-zero high 96 bits, so neither is a clean address word. + +/// @dev In a card: "the user's account (CEA) on the card's chain". EQ pins only. +/// keccak256("push.marketplace.marker.WALLET"). +bytes32 constant MARKER_WALLET = 0x38beb8621ef19c2ac125b45b1ac07225511365301161eb56ac7a21aa8641cf5a; +/// @dev In a card: "this job's principal". Pins (EQ or MAX) and the principal asset's caps (as uint256). +/// keccak256("push.marketplace.marker.PRINCIPAL"). +bytes32 constant MARKER_PRINCIPAL = 0xc12ba2e9bfe16dd303c04d7f517245a6b49fd69f9d0e5c82d14be8c18ef34d52; + +// ─────────────────────────────── cards, jobs, init ─────────────────────────────── + +/// @notice One standing offer from one provider: one job type on one EVM execution chain. One card per provider. +/// @dev - `provider` and `active` are contract-written; caller values are ignored. +/// - `chainNamespace` is immutable after registration. +struct AgentCard { + address provider; // msg.sender at registration · the rules agent · 8183 provider · fee recipient + bytes32 jobType; // e.g. keccak256("LENDING_DEPOSIT") + string metadataURI; // off-chain JSON: name, summary, ABIs, criteria in words, param units + bytes32 metadataHash; // keccak256 of that JSON + string chainNamespace; // full CAIP-2 execution chain, "eip155:", never Push + uint256 providerFee; // reference price in paymentToken; the client funds against it (not enforced on-chain) + address paymentToken; // until the kernel's K-12, must equal KERNEL.paymentToken() + uint256 principalMin; // the job's size, in the principal asset's units + uint256 principalMax; + uint32 minDuration; // job expiry window, seconds from openJob + uint32 maxDuration; + uint32 minExecuteWindow; // executeBy ≥ openJob time + this + uint32 settleWindow; // failFinalAt = executeBy + this; executeBy + this ≤ expiredAt + bool active; +} + +/// @notice What the agent needs. Approvals are allowed calls under pins (D1); markers fill per job (D2, D3). +/// @dev `expectedCEA`, `validUntil` and the principal asset's caps are per job. +struct AgentCardRules { + AssetCap[] assets; // 1..MAX_ASSETS PRC20s on Push, each SOURCE_CHAIN_NAMESPACE == card chain + uint8 principalAsset; // index into assets; its maxTotal is MARKER_PRINCIPAL + uint256 maxGasPerCall; // PC wei per outbound, copied to the session exactly + AllowedCall[] allowedCalls; // 1..32; pins may hold MARKER_WALLET / MARKER_PRINCIPAL +} + +/// @notice A destination chain's CEA factory and proxy implementation, for `computeCEA`. +struct CEADeployment { + address ceaFactory; + address ceaProxyImpl; +} + +/// @notice The full card, for the SDK. One call. +struct AgentCardView { + AgentCard card; + bytes rules; // abi.encode(AgentCardRules) + bytes jobSpecTemplate; // abi.encode(JobSpecTemplate) + uint256 version; + bool verified; + bool disabled; +} + +/// @notice Per-job inputs the owner signs (inside the createJob calldata and the session). +struct JobInputs { + uint256 principal; + uint48 expiredAt; + uint48 executeBy; + int256[] params; // one per template param, within its bounds +} + +/// @notice Everything `openJob` needs. +struct OpenJobParams { + uint256 cardId; + uint256 cardVersion; // the version the owner signed against + JobInputs job; + Session session; + OwnerIntent intent; + bytes sig; + string label; // wallet label, used only when deploying +} + +/// @notice What `previewIntent` needs to build the OwnerIntent the owner signs. +struct IntentRequest { + uint256 cardId; + address owner; + uint96 index; + JobInputs job; + uint48 deadline; + uint256 signerChainId; +} + +/// @notice `initialize` arguments. Every field must be non-zero. +struct InitParams { + address agwFactory; + address kernel; + address hook; // must be whitelisted on the kernel + address evaluator; // the marketplace-wide 8183 evaluator + address rules; // UniversalMarketplaceRules + address admin; // receives DEFAULT_ADMIN_ROLE and ADMIN_ROLE +} + +// ─────────────────────────────── rules check (UniversalMarketplaceRules) ─────────────────────────────── + +/// @notice The per-job values `checkRulesMatchCard` checks the session against. +struct SessionContext { + address agent; // card.provider + bytes32 chainHash; // keccak256(bytes(card.chainNamespace)) + uint256 principal; + uint48 expiredAt; + address expectedCEA; // the AGW's CEA on the card's chain, derived by the marketplace +} + +// ─────────────────────────────── a card's criteria template ─────────────────────────────── +// +// The V2 JobSpec with holes. The card fixes everything that is the same for every job; `JobSpecBuilder.build` +// fills in the per-job values (the AGW's CEA, the principal, the user's params, the times). + +/// @notice Where a fill's 32-byte word comes from. CEA = the AGW's CEA on the READ's chain. +enum FillSource { + CEA, + PARAM +} + +/// @notice Overwrites `args[32·word : 32·word + 32]` per job. `param` is used by PARAM only. +struct Fill { + uint8 word; + FillSource source; + uint8 param; +} + +/// @notice A `Read` with fills. Copied into the JobSpec, then filled. +struct ReadTemplate { + // namespace only ("eip155"), with chainId separate — the Read State split (AGW doc D6); + // AgentCard.chainNamespace is the full CAIP-2 string + string chainNamespace; + string chainId; // e.g. "1" + uint16 minConfirmations; + address target; + bytes4 selector; + bytes args; + Fill[] fills; + bytes outputs; + uint8[] field; +} + +/// @notice Where a check's target comes from. +enum TargetSource { + FIXED, + PRINCIPAL_BPS, + PARAM, + CEA +} + +/// @notice A `Check` whose target is a source. `value`: FIXED the target · PRINCIPAL_BPS bps of principal · +/// PARAM a param index · CEA unused (the CEA of the check's read chain). +struct CheckTemplate { + uint8 read; + Evaluation evaluation; + Operation operation; + TargetSource source; + int256 value; +} + +/// @notice Inclusive bounds on one per-job number the user supplies. +struct ParamBounds { + int256 min; + int256 max; +} + +/// @notice The whole template, stored on the card as `abi.encode(JobSpecTemplate)`. `logic` and +/// `allowedMutability` are copied verbatim. +struct JobSpecTemplate { + ReadTemplate[] reads; + CheckTemplate[] checks; + Logic[] logic; + AllowedMutability allowedMutability; + ParamBounds[] params; +} + +/// @notice The per-job values `build` fills in. +struct BuildContext { + address agw; + uint256 principal; + uint48 executeBy; + uint32 settleWindow; + int256[] params; + bytes32 origin; +} diff --git a/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.admin.t.sol b/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.admin.t.sol new file mode 100644 index 00000000..df8ddea9 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.admin.t.sol @@ -0,0 +1,369 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol"; +import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; +import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; +import {ITransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol"; + +import {AgenticCommerce} from "../../src/agentic-commerce-8183/AgenticCommerce.sol"; +import {IAgenticCommerce} from "../../src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol"; +import {KernelBase} from "./KernelBase.t.sol"; +import {MockERC20_6} from "./mocks/MockERC20_6.sol"; +import {RecordingHook} from "./mocks/RecordingHook.sol"; + +/// @notice Kernel: initialisation, upgrade, storage layout, admin functions. +contract AgenticCommerceAdminTest is KernelBase { + // ───────────── initialisation ───────────── + + function test_initialize_setsState() public view { + assertEq(address(kernel.paymentToken()), address(token)); + assertEq(kernel.platformTreasury(), treasury); + assertTrue(kernel.hasRole(kernel.DEFAULT_ADMIN_ROLE(), admin)); + assertTrue(kernel.hasRole(kernel.ADMIN_ROLE(), admin)); + assertTrue(kernel.whitelistedHooks(address(0))); + assertEq(kernel.platformFeeBP(), 0); + assertEq(kernel.evaluatorFeeBP(), 0); + assertEq(kernel.jobCounter(), 0); + assertEq(kernel.totalEscrowed(), 0); + } + + function test_constants() public view { + assertEq(kernel.ADMIN_ROLE(), keccak256("ADMIN_ROLE")); + assertEq(kernel.EVALUATOR_GRACE_PERIOD(), 1 hours); + assertEq(kernel.MIN_EXPIRY_WINDOW(), 5 minutes); + assertEq(kernel.BPS_DENOMINATOR(), 10_000); + } + + function test_initialize_revertsOnZeroToken() public { + vm.expectRevert(IAgenticCommerce.ZeroAddress.selector); + _deployKernelProxy(address(kernelImpl), address(0), treasury, admin); + } + + function test_initialize_revertsOnZeroTreasury() public { + vm.expectRevert(IAgenticCommerce.ZeroAddress.selector); + _deployKernelProxy(address(kernelImpl), address(token), address(0), admin); + } + + function test_initialize_revertsOnZeroAdmin() public { + vm.expectRevert(IAgenticCommerce.ZeroAddress.selector); + _deployKernelProxy(address(kernelImpl), address(token), treasury, address(0)); + } + + function test_initialize_secondCallReverts() public { + vm.expectRevert(Initializable.InvalidInitialization.selector); + kernel.initialize(address(token), treasury, admin); + } + + function test_initialize_onImplementationReverts() public { + vm.expectRevert(Initializable.InvalidInitialization.selector); + kernelImpl.initialize(address(token), treasury, admin); + } + + // ───────────── upgrade ───────────── + + function test_upgrade_byProxyAdminOwner_preservesState() public { + uint256 jobId = _funded(address(0), BUDGET); + AgenticCommerce newImpl = new AgenticCommerce(); + ProxyAdmin pa = ProxyAdmin(_proxyAdmin(address(kernel))); + assertEq(pa.owner(), kernelProxyAdminOwner); + + vm.prank(kernelProxyAdminOwner); + pa.upgradeAndCall(ITransparentUpgradeableProxy(address(kernel)), address(newImpl), ""); + + assertEq( + address(uint160(uint256(vm.load(address(kernel), ERC1967Utils.IMPLEMENTATION_SLOT)))), address(newImpl) + ); + assertEq(kernel.totalEscrowed(), BUDGET); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Funded)); + assertTrue(kernel.hasRole(kernel.ADMIN_ROLE(), admin)); + assertEq(kernel.jobCounter(), 1); + } + + function test_upgrade_byStranger_reverts() public { + ProxyAdmin pa = ProxyAdmin(_proxyAdmin(address(kernel))); + address newImpl = address(new AgenticCommerce()); + vm.prank(stranger); + vm.expectRevert(abi.encodeWithSelector(Ownable.OwnableUnauthorizedAccount.selector, stranger)); + pa.upgradeAndCall(ITransparentUpgradeableProxy(address(kernel)), newImpl, ""); + } + + function test_upgrade_byAdminRoleHolder_reverts() public { + ProxyAdmin pa = ProxyAdmin(_proxyAdmin(address(kernel))); + address newImpl = address(new AgenticCommerce()); + vm.prank(admin); + vm.expectRevert(abi.encodeWithSelector(Ownable.OwnableUnauthorizedAccount.selector, admin)); + pa.upgradeAndCall(ITransparentUpgradeableProxy(address(kernel)), newImpl, ""); + } + + // ───────────── storage layout (by slot, PRD §4.1.4) ───────────── + + function test_storageLayout_bySlot() public { + vm.startPrank(admin); + kernel.setPlatformFee(123, treasury); + kernel.setEvaluatorFee(45); + vm.stopPrank(); + uint256 jobId = _funded(address(0), BUDGET); + + assertEq(address(uint160(uint256(vm.load(address(kernel), bytes32(uint256(0)))))), address(token)); + assertEq(uint256(vm.load(address(kernel), bytes32(uint256(1)))), 123); + assertEq(address(uint160(uint256(vm.load(address(kernel), bytes32(uint256(2)))))), treasury); + assertEq(uint256(vm.load(address(kernel), bytes32(uint256(3)))), 45); + assertEq(uint256(vm.load(address(kernel), bytes32(uint256(5)))), 1); + assertEq(uint256(vm.load(address(kernel), bytes32(uint256(7)))), BUDGET); + + bytes32 jobSlot = keccak256(abi.encode(jobId, uint256(4))); + uint256 expectedWord = uint256(uint160(client)) | (uint256(uint8(IAgenticCommerce.JobStatus.Funded)) << 160); + assertEq(uint256(vm.load(address(kernel), jobSlot)), expectedWord); + + bytes32 hookSlot = keccak256(abi.encode(address(0), uint256(6))); + assertEq(uint256(vm.load(address(kernel), hookSlot)), 1); + + for (uint256 i = 8; i <= 57; i++) { + assertEq(vm.load(address(kernel), bytes32(i)), bytes32(0)); + } + } + + // ───────────── access control ───────────── + + function test_admin_functions_revertForNonAdmin() public { + bytes32 role = kernel.ADMIN_ROLE(); + bytes memory err = + abi.encodeWithSelector(IAccessControl.AccessControlUnauthorizedAccount.selector, stranger, role); + + vm.startPrank(stranger); + vm.expectRevert(err); + kernel.pause(); + vm.expectRevert(err); + kernel.unpause(); + vm.expectRevert(err); + kernel.setPlatformFee(1, treasury); + vm.expectRevert(err); + kernel.setEvaluatorFee(1); + vm.expectRevert(err); + kernel.setHookWhitelist(address(1), true); + vm.expectRevert(err); + kernel.batchDetachHook(new uint256[](0)); + vm.expectRevert(err); + kernel.emergencyWithdraw(address(token), stranger, 1); + vm.stopPrank(); + } + + // ───────────── pause ───────────── + + function test_pause_blocksEveryLifecycleFunction() public { + uint256 openJob = _create(address(0)); + uint256 noProv = _createNoProvider(address(0)); + uint256 funded = _funded(address(0), BUDGET); + uint256 submitted = _submitted(address(0), BUDGET); + _pause(); + + bytes memory paused = abi.encodeWithSelector(PausableUpgradeable.EnforcedPause.selector); + vm.prank(client); + vm.expectRevert(paused); + kernel.createJob(provider, evaluator, _expiry(), "x", address(0)); + vm.prank(client); + vm.expectRevert(paused); + kernel.setProvider(noProv, provider, ""); + vm.prank(provider); + vm.expectRevert(paused); + kernel.setBudget(openJob, 1, ""); + vm.prank(client); + vm.expectRevert(paused); + kernel.fund(openJob, 0, ""); + vm.prank(provider); + vm.expectRevert(paused); + kernel.submit(funded, bytes32(0), ""); + vm.prank(evaluator); + vm.expectRevert(paused); + kernel.complete(submitted, bytes32(0), ""); + vm.prank(evaluator); + vm.expectRevert(paused); + kernel.reject(funded, bytes32(0), ""); + } + + function test_unpause_restores() public { + _pause(); + vm.prank(admin); + kernel.unpause(); + uint256 jobId = _create(address(0)); + assertEq(jobId, 1); + } + + function test_unpause_whenNotPaused_reverts() public { + vm.prank(admin); + vm.expectRevert(PausableUpgradeable.ExpectedPause.selector); + kernel.unpause(); + } + + // ───────────── fees ───────────── + + function test_setPlatformFee() public { + address t2 = makeAddr("t2"); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.PlatformFeeUpdated(500, t2); + vm.prank(admin); + kernel.setPlatformFee(500, t2); + assertEq(kernel.platformFeeBP(), 500); + assertEq(kernel.platformTreasury(), t2); + } + + function test_setPlatformFee_zeroTreasury_reverts() public { + vm.prank(admin); + vm.expectRevert(IAgenticCommerce.ZeroAddress.selector); + kernel.setPlatformFee(1, address(0)); + } + + function test_fees_exactly10000_allowed_10001_reverts() public { + vm.startPrank(admin); + kernel.setEvaluatorFee(4000); + kernel.setPlatformFee(6000, treasury); + vm.expectRevert(IAgenticCommerce.FeesTooHigh.selector); + kernel.setPlatformFee(6001, treasury); + vm.expectRevert(IAgenticCommerce.FeesTooHigh.selector); + kernel.setEvaluatorFee(4001); + vm.stopPrank(); + } + + function test_setEvaluatorFee_emits() public { + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.EvaluatorFeeUpdated(250); + vm.prank(admin); + kernel.setEvaluatorFee(250); + assertEq(kernel.evaluatorFeeBP(), 250); + } + + // ───────────── hook whitelist / detach ───────────── + + function test_setHookWhitelist() public { + address h = makeAddr("h"); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.HookWhitelistUpdated(h, true); + vm.prank(admin); + kernel.setHookWhitelist(h, true); + assertTrue(kernel.whitelistedHooks(h)); + } + + function test_setHookWhitelist_zero_reverts() public { + vm.prank(admin); + vm.expectRevert(IAgenticCommerce.ZeroAddress.selector); + kernel.setHookWhitelist(address(0), true); + } + + function test_batchDetachHook_detachesAndSkips() public { + RecordingHook hook = new RecordingHook(); + vm.prank(admin); + kernel.setHookWhitelist(address(hook), true); + uint256 hooked = _create(address(hook)); + uint256 plain = _create(address(0)); + + uint256[] memory ids = new uint256[](2); + ids[0] = hooked; + ids[1] = plain; + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.HookDetached(hooked, address(hook)); + vm.prank(admin); + kernel.batchDetachHook(ids); + assertEq(kernel.getJob(hooked).hook, address(0)); + + uint256 before = hook.count(); + vm.prank(provider); + kernel.setBudget(hooked, 1, ""); + assertEq(hook.count(), before, "detached job must not call the hook"); + } + + function test_batchDetachHook_empty_isNoop() public { + vm.prank(admin); + kernel.batchDetachHook(new uint256[](0)); + } + + function test_batchDetachHook_invalidIds_revert() public { + _create(address(0)); + uint256[] memory ids = new uint256[](1); + vm.startPrank(admin); + ids[0] = 0; + vm.expectRevert(IAgenticCommerce.InvalidJob.selector); + kernel.batchDetachHook(ids); + ids[0] = 2; + vm.expectRevert(IAgenticCommerce.InvalidJob.selector); + kernel.batchDetachHook(ids); + vm.stopPrank(); + } + + function test_dewhitelistedHook_stillCalledOnExistingJob() public { + RecordingHook hook = new RecordingHook(); + vm.prank(admin); + kernel.setHookWhitelist(address(hook), true); + uint256 jobId = _create(address(hook)); + vm.prank(admin); + kernel.setHookWhitelist(address(hook), false); + + vm.prank(provider); + kernel.setBudget(jobId, 1, ""); + assertEq(hook.count(), 2); + } + + // ───────────── emergencyWithdraw (K-02, D-27) ───────────── + + function test_emergencyWithdraw_notPaused_reverts() public { + vm.prank(admin); + vm.expectRevert(PausableUpgradeable.ExpectedPause.selector); + kernel.emergencyWithdraw(address(token), admin, 1); + } + + function test_emergencyWithdraw_zeroTo_reverts() public { + _pause(); + vm.prank(admin); + vm.expectRevert(IAgenticCommerce.ZeroAddress.selector); + kernel.emergencyWithdraw(address(token), address(0), 1); + } + + function test_emergencyWithdraw_zeroToken_reverts() public { + _pause(); + vm.prank(admin); + vm.expectRevert(IAgenticCommerce.ZeroAddress.selector); + kernel.emergencyWithdraw(address(0), admin, 1); + } + + function test_emergencyWithdraw_cannotTouchEscrow() public { + _funded(address(0), BUDGET); + _funded(address(0), BUDGET); + token.mint(address(kernel), 7e6); // accidental transfer + _pause(); + + vm.prank(admin); + vm.expectRevert(abi.encodeWithSelector(IAgenticCommerce.InsufficientUnattributedBalance.selector, 7e6 + 1, 7e6)); + kernel.emergencyWithdraw(address(token), admin, 7e6 + 1); + + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.EmergencyWithdraw(address(token), admin, 7e6); + vm.prank(admin); + kernel.emergencyWithdraw(address(token), admin, 7e6); + assertEq(token.balanceOf(admin), 7e6); + assertEq(token.balanceOf(address(kernel)), 2 * BUDGET); + } + + function test_emergencyWithdraw_otherToken_fullyWithdrawable() public { + MockERC20_6 other = new MockERC20_6("Other", "OTH"); + other.mint(address(kernel), 5e6); + _funded(address(0), BUDGET); + _pause(); + vm.prank(admin); + kernel.emergencyWithdraw(address(other), admin, 5e6); + assertEq(other.balanceOf(admin), 5e6); + } + + function test_emergencyWithdraw_balanceBelowEscrow_availableIsZero() public { + _funded(address(0), BUDGET); + // Simulate a shortfall: move tokens out of the kernel behind its back. + vm.prank(address(kernel)); + token.transfer(stranger, 1); + _pause(); + vm.prank(admin); + vm.expectRevert(abi.encodeWithSelector(IAgenticCommerce.InsufficientUnattributedBalance.selector, 1, 0)); + kernel.emergencyWithdraw(address(token), admin, 1); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.fuzz.t.sol b/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.fuzz.t.sol new file mode 100644 index 00000000..d873688b --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.fuzz.t.sol @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {IAgenticCommerce} from "../../src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol"; +import {KernelBase} from "./KernelBase.t.sol"; + +/// @notice Stateless fuzz over every function that moves funds. +contract AgenticCommerceFuzzTest is KernelBase { + function testFuzz_fund_movesExactBudget(uint256 budget) public { + budget = bound(budget, 0, 2 ** 96); + token.mint(client, budget); + uint256 jobId = _budgeted(address(0), budget); + uint256 before = token.balanceOf(client); + vm.prank(client); + kernel.fund(jobId, budget, ""); + assertEq(before - token.balanceOf(client), budget); + assertEq(kernel.totalEscrowed(), budget); + assertEq(token.balanceOf(address(kernel)), budget); + } + + function testFuzz_complete_conservesBudget(uint256 budget, uint256 pBP, uint256 eBP) public { + budget = bound(budget, 0, 2 ** 96); + pBP = bound(pBP, 0, 10_000); + eBP = bound(eBP, 0, 10_000 - pBP); + token.mint(client, budget); + vm.startPrank(admin); + kernel.setPlatformFee(pBP, treasury); + kernel.setEvaluatorFee(eBP); + vm.stopPrank(); + + uint256 escrowBefore = kernel.totalEscrowed(); + uint256 jobId = _submitted(address(0), budget); + vm.prank(evaluator); + kernel.complete(jobId, bytes32(0), ""); + + uint256 paid = token.balanceOf(treasury) + token.balanceOf(evaluator) + token.balanceOf(provider); + assertEq(paid, budget); + assertEq(token.balanceOf(treasury), budget * pBP / 10_000); + assertEq(token.balanceOf(evaluator), budget * eBP / 10_000); + assertEq(kernel.totalEscrowed(), escrowBefore); + } + + function testFuzz_reject_refundsClient(uint256 budget, bool submitFirst) public { + budget = bound(budget, 0, 2 ** 96); + token.mint(client, budget); + uint256 jobId = submitFirst ? _submitted(address(0), budget) : _funded(address(0), budget); + uint256 before = token.balanceOf(client); + vm.prank(evaluator); + kernel.reject(jobId, bytes32(0), ""); + assertEq(token.balanceOf(client) - before, budget); + assertEq(kernel.totalEscrowed(), 0); + } + + function testFuzz_claimRefund_refundsClient(uint256 budget, bool submitFirst) public { + budget = bound(budget, 0, 2 ** 96); + token.mint(client, budget); + uint256 jobId = submitFirst ? _submitted(address(0), budget) : _funded(address(0), budget); + vm.warp(block.timestamp + EXPIRY_OFFSET + kernel.EVALUATOR_GRACE_PERIOD()); + uint256 before = token.balanceOf(client); + kernel.claimRefund(jobId); + assertEq(token.balanceOf(client) - before, budget); + assertEq(kernel.totalEscrowed(), 0); + } + + function testFuzz_emergencyWithdraw_bound(uint256 escrowed, uint256 extra, uint256 amount) public { + escrowed = bound(escrowed, 0, 2 ** 96); + extra = bound(extra, 0, 2 ** 96); + amount = bound(amount, 0, 2 ** 97); + token.mint(client, escrowed); + _funded(address(0), escrowed); + token.mint(address(kernel), extra); + _pause(); + + vm.prank(admin); + if (amount > extra) { + vm.expectRevert( + abi.encodeWithSelector(IAgenticCommerce.InsufficientUnattributedBalance.selector, amount, extra) + ); + kernel.emergencyWithdraw(address(token), admin, amount); + } else { + kernel.emergencyWithdraw(address(token), admin, amount); + assertEq(token.balanceOf(admin), amount); + assertGe(token.balanceOf(address(kernel)), kernel.totalEscrowed()); + } + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.hooks.t.sol b/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.hooks.t.sol new file mode 100644 index 00000000..363b0d67 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.hooks.t.sol @@ -0,0 +1,187 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; + +import {IAgenticCommerce} from "../../src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol"; +import {KernelBase} from "./KernelBase.t.sol"; +import {RecordingHook} from "./mocks/RecordingHook.sol"; +import {RevertingHook} from "./mocks/RevertingHook.sol"; +import {ReentrantHook} from "./mocks/ReentrantHook.sol"; + +/// @notice Kernel ↔ hook behaviour: call order, rollback, blocking, reentrancy. +contract AgenticCommerceHooksTest is KernelBase { + RecordingHook internal rec; + RevertingHook internal rh; + ReentrantHook internal re; + + function setUp() public override { + super.setUp(); + rec = new RecordingHook(); + rh = new RevertingHook(); + re = new ReentrantHook(); + vm.startPrank(admin); + kernel.setHookWhitelist(address(rec), true); + kernel.setHookWhitelist(address(rh), true); + kernel.setHookWhitelist(address(re), true); + vm.stopPrank(); + } + + // ───────────── order: before sees pre-state, after sees post-state ───────────── + + function test_callOrder_fullLifecycle() public { + vm.prank(client); + uint256 jobId = kernel.createJob(address(0), evaluator, _expiry(), "", address(rec)); + vm.prank(client); + kernel.setProvider(jobId, provider, ""); + vm.prank(provider); + kernel.setBudget(jobId, BUDGET, ""); + vm.prank(client); + kernel.fund(jobId, BUDGET, ""); + vm.prank(provider); + kernel.submit(jobId, bytes32(0), ""); + vm.prank(evaluator); + kernel.complete(jobId, bytes32(0), ""); + + bytes4[6] memory sels = [ + IAgenticCommerce.setProvider.selector, + IAgenticCommerce.setBudget.selector, + IAgenticCommerce.fund.selector, + IAgenticCommerce.submit.selector, + IAgenticCommerce.complete.selector, + bytes4(0) + ]; + uint8[6] memory preStatus = [0, 0, 0, 1, 2, 0]; + uint8[6] memory postStatus = [0, 0, 1, 2, 3, 0]; + assertEq(rec.count(), 10); + for (uint256 i = 0; i < 5; i++) { + RecordingHook.Call memory b = rec.getCall(2 * i); + RecordingHook.Call memory a = rec.getCall(2 * i + 1); + assertTrue(b.isBefore); + assertFalse(a.isBefore); + assertEq(b.selector, sels[i]); + assertEq(a.selector, sels[i]); + assertEq(b.jobId, jobId); + assertEq(b.statusSeen, preStatus[i]); + assertEq(a.statusSeen, postStatus[i]); + } + } + + function test_reject_hookEncodingAndOrder() public { + uint256 jobId = _funded(address(rec), BUDGET); + vm.prank(evaluator); + kernel.reject(jobId, bytes32("r"), hex"77"); + RecordingHook.Call memory b = rec.getCall(4); + RecordingHook.Call memory a = rec.getCall(5); + assertEq(b.selector, IAgenticCommerce.reject.selector); + assertEq(b.data, abi.encode(evaluator, bytes32("r"), hex"77")); + assertEq(b.statusSeen, uint8(IAgenticCommerce.JobStatus.Funded)); + assertEq(a.statusSeen, uint8(IAgenticCommerce.JobStatus.Rejected)); + } + + function test_complete_hookEncoding() public { + uint256 jobId = _submitted(address(rec), BUDGET); + vm.prank(evaluator); + kernel.complete(jobId, bytes32("c"), hex"55"); + assertEq(rec.getCall(6).data, abi.encode(evaluator, bytes32("c"), hex"55")); + } + + // ───────────── afterAction revert rolls the whole call back ───────────── + + function test_afterRevert_rollsBackFund() public { + uint256 jobId = _budgeted(address(rh), BUDGET); + rh.setRevertAfter(true); + uint256 before = token.balanceOf(client); + vm.prank(client); + vm.expectRevert(RevertingHook.HookSaysNo.selector); + kernel.fund(jobId, BUDGET, ""); + assertEq(token.balanceOf(client), before); + assertEq(kernel.totalEscrowed(), 0); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Open)); + } + + function test_afterRevert_rollsBackComplete() public { + uint256 jobId = _submitted(address(rh), BUDGET); + rh.setRevertAfter(true); + vm.prank(evaluator); + vm.expectRevert(RevertingHook.HookSaysNo.selector); + kernel.complete(jobId, bytes32(0), ""); + assertEq(token.balanceOf(provider), 0); + assertEq(kernel.totalEscrowed(), BUDGET); + } + + // ───────────── a reverting hook blocks every hooked action, not claimRefund ───────────── + + function test_revertingBefore_blocksEveryHookedAction() public { + vm.prank(client); + uint256 noProv = kernel.createJob(address(0), evaluator, _expiry(), "", address(rh)); + uint256 open = _budgeted(address(rh), BUDGET); + uint256 funded = _funded(address(rh), BUDGET); + uint256 submitted = _submitted(address(rh), BUDGET); + rh.setRevertBefore(true); + bytes4 err = RevertingHook.HookSaysNo.selector; + + vm.prank(client); + vm.expectRevert(err); + kernel.setProvider(noProv, provider, ""); + vm.prank(provider); + vm.expectRevert(err); + kernel.setBudget(open, 1, ""); + vm.prank(client); + vm.expectRevert(err); + kernel.fund(open, BUDGET, ""); + vm.prank(provider); + vm.expectRevert(err); + kernel.submit(funded, bytes32(0), ""); + vm.prank(evaluator); + vm.expectRevert(err); + kernel.complete(submitted, bytes32(0), ""); + vm.prank(evaluator); + vm.expectRevert(err); + kernel.reject(funded, bytes32(0), ""); + + vm.warp(block.timestamp + EXPIRY_OFFSET); + kernel.claimRefund(funded); + assertEq(uint8(_status(funded)), uint8(IAgenticCommerce.JobStatus.Expired)); + } + + // ───────────── reentrancy ───────────── + + function _reentryPayloads() internal view returns (bytes[] memory p) { + p = new bytes[](8); + p[0] = abi.encodeCall(IAgenticCommerce.createJob, (provider, evaluator, _expiry(), "", address(0))); + p[1] = abi.encodeCall(IAgenticCommerce.setProvider, (1, provider, "")); + p[2] = abi.encodeCall(IAgenticCommerce.setBudget, (1, 1, "")); + p[3] = abi.encodeCall(IAgenticCommerce.fund, (1, 1, "")); + p[4] = abi.encodeCall(IAgenticCommerce.submit, (1, bytes32(0), "")); + p[5] = abi.encodeCall(IAgenticCommerce.complete, (1, bytes32(0), "")); + p[6] = abi.encodeCall(IAgenticCommerce.reject, (1, bytes32(0), "")); + p[7] = abi.encodeCall(IAgenticCommerce.claimRefund, (1)); + } + + function test_reentrancy_fromBefore_blockedForEveryLifecycleCall() public { + bytes[] memory payloads = _reentryPayloads(); + for (uint256 i = 0; i < payloads.length; i++) { + uint256 jobId = _create(address(re)); + re.setInAfter(false); + re.setPayload(payloads[i]); + vm.prank(provider); + vm.expectRevert(ReentrancyGuardUpgradeable.ReentrancyGuardReentrantCall.selector); + kernel.setBudget(jobId, 1, ""); + re.setPayload(""); + } + } + + function test_reentrancy_fromAfter_blocked() public { + bytes[] memory payloads = _reentryPayloads(); + for (uint256 i = 0; i < payloads.length; i++) { + uint256 jobId = _create(address(re)); + re.setInAfter(true); + re.setPayload(payloads[i]); + vm.prank(provider); + vm.expectRevert(ReentrancyGuardUpgradeable.ReentrancyGuardReentrantCall.selector); + kernel.setBudget(jobId, 1, ""); + re.setPayload(""); + } + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.invariants.t.sol b/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.invariants.t.sol new file mode 100644 index 00000000..0a7f62c5 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.invariants.t.sol @@ -0,0 +1,305 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {Test} from "forge-std/Test.sol"; + +import {AgenticCommerce} from "../../src/agentic-commerce-8183/AgenticCommerce.sol"; +import {IAgenticCommerce} from "../../src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol"; +import {KernelBase} from "./KernelBase.t.sol"; +import {MockERC20_6} from "./mocks/MockERC20_6.sol"; +import {RecordingHook} from "./mocks/RecordingHook.sol"; + +/// @notice Drives the kernel with random but role-correct actions and checks every transition. +/// @dev - Kernel reverts are swallowed (fail_on_revert stays false). +/// - Violations are recorded in `violation`, never asserted here — a handler revert would be swallowed too. +contract KernelHandler is Test { + AgenticCommerce internal kernel; + MockERC20_6 internal token; + address internal admin; + address internal hook; + + address[3] internal clients; + address[3] internal providers; + address[2] internal evaluators; + + mapping(uint256 => uint8) public lastStatus; + uint256 public okFund; + uint256 public okComplete; + uint256 public okExit; // reject or claimRefund from Funded/Submitted + bool public violation; + string public violationReason; + + constructor(AgenticCommerce kernel_, MockERC20_6 token_, address admin_, address hook_) { + kernel = kernel_; + token = token_; + admin = admin_; + hook = hook_; + for (uint256 i = 0; i < 3; i++) { + clients[i] = makeAddr(string.concat("c", vm.toString(i))); + providers[i] = makeAddr(string.concat("p", vm.toString(i))); + token.mint(clients[i], 1e12); + vm.prank(clients[i]); + token.approve(address(kernel), type(uint256).max); + } + evaluators[0] = makeAddr("e0"); + evaluators[1] = makeAddr("e1"); + _seed(); + } + + /// @dev Seeds one Open-budgeted, one Funded and one Submitted job so every run has escrow to move. + function _seed() internal { + uint256 exp = block.timestamp + 30 days; + for (uint256 k = 0; k < 3; k++) { + vm.prank(clients[k]); + uint256 id = kernel.createJob(providers[k], evaluators[0], exp, "seed", address(0)); + vm.prank(providers[k]); + kernel.setBudget(id, 1e6 * (k + 1), ""); + lastStatus[id] = uint8(IAgenticCommerce.JobStatus.Open); + if (k >= 1) { + vm.prank(clients[k]); + kernel.fund(id, 1e6 * (k + 1), ""); + lastStatus[id] = uint8(IAgenticCommerce.JobStatus.Funded); + } + if (k == 2) { + vm.prank(providers[k]); + kernel.submit(id, bytes32(0), ""); + lastStatus[id] = uint8(IAgenticCommerce.JobStatus.Submitted); + } + } + } + + // ───────────── actions ───────────── + + function createJob(uint256 c, uint256 p, uint256 e, uint256 expOffset, bool withProvider, bool withHook) external { + address cl = clients[c % 3]; + address pr = withProvider ? providers[p % 3] : address(0); + address ev = evaluators[e % 2]; + expOffset = bound(expOffset, 6 minutes, 30 days); + vm.prank(cl); + try kernel.createJob(pr, ev, block.timestamp + expOffset, "", withHook ? hook : address(0)) returns ( + uint256 id + ) { + lastStatus[id] = uint8(IAgenticCommerce.JobStatus.Open); + } catch {} + } + + function setProvider(uint256 j, uint256 p) external { + (uint256 id, IAgenticCommerce.Job memory job) = _pick(j); + if (id == 0) return; + vm.prank(job.client); + try kernel.setProvider(id, providers[p % 3], "") { + _check(id); + } catch {} + } + + function setBudget(uint256 j, uint256 amount) external { + (uint256 id, IAgenticCommerce.Job memory job) = _pick(j); + if (id == 0) return; + amount = bound(amount, 0, 1e9); + vm.prank(job.provider); + try kernel.setBudget(id, amount, "") { + _check(id); + } catch {} + } + + /// @dev Probes: `wrongStatus` targets any job; `wrongActor` sends from the provider. + /// A probe that succeeds is a violation (C-01). + function fund(uint256 j, bool wrongStatus, bool wrongActor) external { + (uint256 id, IAgenticCommerce.Job memory job) = + wrongStatus ? _pick(j) : _pickStatus(j, IAgenticCommerce.JobStatus.Open); + if (id == 0) return; + bool mustRevert = wrongActor || job.status != IAgenticCommerce.JobStatus.Open; + vm.prank(wrongActor ? job.provider : job.client); + try kernel.fund(id, job.budget, "") { + if (mustRevert) _fail("fund succeeded with wrong status/actor"); + _check(id); + okFund++; + } catch {} + } + + /// @dev Probes: `wrongActor` sends from the client. + function submit(uint256 j, bool wrongStatus, bool wrongActor) external { + (uint256 id, IAgenticCommerce.Job memory job) = + wrongStatus ? _pick(j) : _pickStatus(j, IAgenticCommerce.JobStatus.Funded); + if (id == 0) return; + bool mustRevert = wrongActor || job.status != IAgenticCommerce.JobStatus.Funded; + vm.prank(wrongActor ? job.client : job.provider); + try kernel.submit(id, bytes32(0), "") { + if (mustRevert) _fail("submit succeeded with wrong status/actor"); + _check(id); + } catch {} + } + + /// @dev Probes: `wrongActor` sends from the client. + function complete(uint256 j, bool wrongStatus, bool wrongActor) external { + (uint256 id, IAgenticCommerce.Job memory job) = + wrongStatus ? _pick(j) : _pickStatus(j, IAgenticCommerce.JobStatus.Submitted); + if (id == 0) return; + bool mustRevert = wrongActor || job.status != IAgenticCommerce.JobStatus.Submitted; + vm.prank(wrongActor ? job.client : job.evaluator); + try kernel.complete(id, bytes32(0), "") { + if (mustRevert) _fail("complete succeeded with wrong status/actor"); + _check(id); + okComplete++; + } catch {} + } + + /// @dev Default: evaluator on an escrowed job, or client on any job. + /// Probe `wrongActor`: Open → evaluator; Funded/Submitted → provider. Must revert. + function reject(uint256 j, bool asEvaluator, bool wrongActor) external { + (uint256 id, IAgenticCommerce.Job memory job) = (asEvaluator && !wrongActor) ? _pickEscrowed(j) : _pick(j); + if (id == 0) return; + address actor; + if (wrongActor) actor = job.status == IAgenticCommerce.JobStatus.Open ? job.evaluator : job.provider; + else actor = asEvaluator ? job.evaluator : job.client; + uint8 before = lastStatus[id]; + vm.prank(actor); + try kernel.reject(id, bytes32(0), "") { + if (wrongActor) _fail("reject succeeded with wrong actor"); + _check(id); + if (before == 1 || before == 2) okExit++; + } catch {} + } + + function claimRefund(uint256 j) external { + (uint256 id,) = _pickEscrowed(j); + if (id == 0) return; + uint8 before = lastStatus[id]; + try kernel.claimRefund(id) { + _check(id); + if (before == 1 || before == 2) okExit++; + } catch {} + } + + function warp(uint256 secs) external { + vm.warp(block.timestamp + bound(secs, 1, 2 days)); + } + + function setFees(uint256 pBP, uint256 eBP) external { + pBP = bound(pBP, 0, 10_000); + eBP = bound(eBP, 0, 10_000 - pBP); + vm.startPrank(admin); + kernel.setEvaluatorFee(0); + kernel.setPlatformFee(pBP, makeAddr("treasury")); + kernel.setEvaluatorFee(eBP); + vm.stopPrank(); + } + + // ───────────── ghost checks ───────────── + + function _pick(uint256 j) internal view returns (uint256 id, IAgenticCommerce.Job memory job) { + uint256 n = kernel.jobCounter(); + if (n == 0) return (0, job); + id = bound(j, 1, n); + job = kernel.getJob(id); + } + + /// @dev Picks the first job at or after a random start whose status is `want`; 0 if none. + function _pickStatus(uint256 j, IAgenticCommerce.JobStatus want) + internal + view + returns (uint256 id, IAgenticCommerce.Job memory job) + { + uint256 n = kernel.jobCounter(); + if (n == 0) return (0, job); + uint256 start = bound(j, 1, n); + for (uint256 k = 0; k < n; k++) { + uint256 cand = ((start - 1 + k) % n) + 1; + IAgenticCommerce.Job memory c = kernel.getJob(cand); + if (c.status == want) return (cand, c); + } + return (0, job); + } + + /// @dev A job holding escrow (Funded, else Submitted); 0 if none. + function _pickEscrowed(uint256 j) internal view returns (uint256 id, IAgenticCommerce.Job memory job) { + (id, job) = _pickStatus(j, IAgenticCommerce.JobStatus.Funded); + if (id == 0) (id, job) = _pickStatus(j, IAgenticCommerce.JobStatus.Submitted); + } + + /// @dev Called only after a successful action: the transition must be a legal edge. + function _check(uint256 id) internal { + uint8 prev = lastStatus[id]; + uint8 next = uint8(kernel.getJob(id).status); + if (prev >= 3) { + _fail("action succeeded on a terminal job"); + } else if (!_isEdge(prev, next)) { + _fail("illegal status transition"); + } + lastStatus[id] = next; + } + + function _isEdge(uint8 a, uint8 b) internal pure returns (bool) { + // 0 Open · 1 Funded · 2 Submitted · 3 Completed · 4 Rejected · 5 Expired + if (a == 0) return b == 0 || b == 1 || b == 4 || b == 5; + if (a == 1) return b == 2 || b == 4 || b == 5; + if (a == 2) return b == 3 || b == 4 || b == 5; + return false; + } + + function _fail(string memory why) internal { + if (!violation) { + violation = true; + violationReason = why; + } + } +} + +contract AgenticCommerceInvariantsTest is KernelBase { + KernelHandler internal handler; + + function setUp() public override { + super.setUp(); + RecordingHook hook = new RecordingHook(); + vm.prank(admin); + kernel.setHookWhitelist(address(hook), true); + handler = new KernelHandler(kernel, token, admin, address(hook)); + targetContract(address(handler)); + } + + function invariant_totalEscrowedMatchesLiveBudgets() public view { + uint256 sum; + uint256 n = kernel.jobCounter(); + for (uint256 i = 1; i <= n; i++) { + IAgenticCommerce.Job memory j = kernel.getJob(i); + if (j.status == IAgenticCommerce.JobStatus.Funded || j.status == IAgenticCommerce.JobStatus.Submitted) { + sum += j.budget; + } + } + assertEq(kernel.totalEscrowed(), sum); + } + + function invariant_balanceCoversEscrow() public view { + assertGe(token.balanceOf(address(kernel)), kernel.totalEscrowed()); + } + + function invariant_onlyLegalTransitions() public view { + assertFalse(handler.violation(), handler.violationReason()); + } + + /// @dev Liveness proof for the handler: a fixed 600-step pseudo-random walk must reach + /// fund, complete and a refund path, with every invariant holding at the end. + /// Lives here, not in afterInvariant, because shrunk/replayed sequences are short by design. + function test_handlerLiveness() public { + for (uint256 i = 0; i < 600; i++) { + uint256 r = uint256(keccak256(abi.encode(i))); + uint256 a = r % 10; + if (a == 0) handler.createJob(r, r >> 8, r >> 16, r >> 24, (r >> 32) % 2 == 0, (r >> 40) % 2 == 0); + else if (a == 1) handler.setProvider(r, r >> 8); + else if (a == 2) handler.setBudget(r, r >> 8); + else if (a == 3) handler.fund(r, false, false); + else if (a == 4) handler.submit(r, false, false); + else if (a == 5) handler.complete(r, false, false); + else if (a == 6) handler.reject(r, (r >> 8) % 2 == 0, false); + else if (a == 7) handler.claimRefund(r); + else if (a == 8) handler.warp(r % 3 hours); + else handler.setFees(r, r >> 8); + } + assertGt(handler.okFund(), 0, "no successful fund"); + assertGt(handler.okComplete(), 0, "no successful complete"); + assertGt(handler.okExit(), 0, "no successful refund path"); + invariant_totalEscrowedMatchesLiveBudgets(); + invariant_balanceCoversEscrow(); + invariant_onlyLegalTransitions(); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.lifecycle.t.sol b/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.lifecycle.t.sol new file mode 100644 index 00000000..c29b803f --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/AgenticCommerce.lifecycle.t.sol @@ -0,0 +1,660 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {Vm} from "forge-std/Vm.sol"; + +import {IAgenticCommerce} from "../../src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol"; +import {KernelBase} from "./KernelBase.t.sol"; +import {RecordingHook} from "./mocks/RecordingHook.sol"; +import {RevertingHook} from "./mocks/RevertingHook.sol"; +import {ERC165Only} from "./mocks/ERC165Only.sol"; + +/// @notice Kernel lifecycle: every function, every revert in PRD order. +contract AgenticCommerceLifecycleTest is KernelBase { + RecordingHook internal rec; + + function setUp() public override { + super.setUp(); + rec = new RecordingHook(); + vm.prank(admin); + kernel.setHookWhitelist(address(rec), true); + } + + // ═════════════════════════════ createJob ═════════════════════════════ + + function test_createJob_happy_withProviderAndHook() public { + uint256 exp = _expiry(); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.JobCreated(1, client, provider, evaluator, exp, address(rec)); + vm.prank(client); + uint256 jobId = kernel.createJob(provider, evaluator, exp, "desc", address(rec)); + + assertEq(jobId, 1); + assertEq(kernel.jobCounter(), 1); + IAgenticCommerce.Job memory j = kernel.getJob(jobId); + assertEq(j.client, client); + assertEq(j.provider, provider); + assertEq(j.evaluator, evaluator); + assertEq(j.hook, address(rec)); + assertEq(j.expiredAt, exp); + assertEq(j.budget, 0); + assertEq(j.description, "desc"); + assertEq(uint8(j.status), uint8(IAgenticCommerce.JobStatus.Open)); + assertEq(rec.count(), 0, "createJob is not hooked (K-10)"); + } + + function test_createJob_happy_noProvider_noHook_evaluatorIsClient() public { + vm.prank(client); + uint256 jobId = kernel.createJob(address(0), client, _expiry(), "", address(0)); + assertEq(kernel.getJob(jobId).provider, address(0)); + assertEq(kernel.getJob(jobId).evaluator, client); + } + + function test_createJob_zeroEvaluator_reverts() public { + vm.prank(client); + vm.expectRevert(IAgenticCommerce.ZeroAddress.selector); + kernel.createJob(provider, address(0), _expiry(), "", address(0)); + } + + /// @dev Two faults at once: the earlier check in PRD order must win (C-03). + function test_createJob_precedence() public { + vm.startPrank(client); + vm.expectRevert(IAgenticCommerce.ZeroAddress.selector); // zero evaluator AND short expiry + kernel.createJob(provider, address(0), block.timestamp, "", address(0)); + vm.expectRevert(IAgenticCommerce.ExpiryTooShort.selector); // short expiry AND client == provider + kernel.createJob(client, evaluator, block.timestamp, "", address(0)); + vm.expectRevert(IAgenticCommerce.ClientIsProvider.selector); // client == provider AND bad hook + kernel.createJob(client, evaluator, _expiry(), "", makeAddr("nope")); + vm.stopPrank(); + } + + function test_createJob_expiryBoundary() public { + uint256 exact = block.timestamp + kernel.MIN_EXPIRY_WINDOW(); + vm.startPrank(client); + vm.expectRevert(IAgenticCommerce.ExpiryTooShort.selector); + kernel.createJob(provider, evaluator, exact, "", address(0)); + kernel.createJob(provider, evaluator, exact + 1, "", address(0)); + vm.stopPrank(); + } + + function test_createJob_expiryAboveUint48_reverts() public { + vm.prank(client); + vm.expectRevert(IAgenticCommerce.ExpiryTooShort.selector); + kernel.createJob(provider, evaluator, uint256(type(uint48).max) + 1, "", address(0)); + } + + function test_createJob_clientIsProvider_reverts() public { + vm.prank(client); + vm.expectRevert(IAgenticCommerce.ClientIsProvider.selector); + kernel.createJob(client, evaluator, _expiry(), "", address(0)); + } + + function test_createJob_evaluatorIsProvider_reverts() public { + vm.prank(client); + vm.expectRevert(IAgenticCommerce.EvaluatorIsProvider.selector); + kernel.createJob(provider, provider, _expiry(), "", address(0)); + } + + function test_createJob_hookNotWhitelisted_reverts() public { + vm.prank(client); + vm.expectRevert(IAgenticCommerce.HookNotWhitelisted.selector); + kernel.createJob(provider, evaluator, _expiry(), "", makeAddr("nope")); + } + + function test_createJob_invalidHook_eoa_reverts() public { + address eoaHook = makeAddr("eoaHook"); + vm.prank(admin); + kernel.setHookWhitelist(eoaHook, true); + vm.prank(client); + vm.expectRevert(IAgenticCommerce.InvalidHook.selector); + kernel.createJob(provider, evaluator, _expiry(), "", eoaHook); + } + + function test_createJob_invalidHook_erc165Only_reverts() public { + ERC165Only h = new ERC165Only(); + vm.prank(admin); + kernel.setHookWhitelist(address(h), true); + vm.prank(client); + vm.expectRevert(IAgenticCommerce.InvalidHook.selector); + kernel.createJob(provider, evaluator, _expiry(), "", address(h)); + } + + function test_getJob_unknownIds_returnZeroStruct() public { + _create(address(0)); + IAgenticCommerce.Job memory j0 = kernel.getJob(0); + IAgenticCommerce.Job memory j2 = kernel.getJob(2); + assertEq(j0.client, address(0)); + assertEq(j2.client, address(0)); + assertEq(j2.budget, 0); + } + + // ═════════════════════════════ setProvider (K-04) ═════════════════════════════ + + function test_setProvider_happy_hookedWithEncoding() public { + uint256 jobId = _createNoProvider(address(rec)); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.ProviderSet(jobId, provider); + vm.prank(client); + kernel.setProvider(jobId, provider, hex"beef"); + + assertEq(kernel.getJob(jobId).provider, provider); + assertEq(rec.count(), 2); + bytes memory expected = abi.encode(client, provider, hex"beef"); + RecordingHook.Call memory b = rec.getCall(0); + RecordingHook.Call memory a = rec.getCall(1); + assertTrue(b.isBefore); + assertFalse(a.isBefore); + assertEq(b.selector, IAgenticCommerce.setProvider.selector); + assertEq(b.data, expected); + assertEq(a.data, expected); + } + + function test_setProvider_reverts_inOrder() public { + uint256 jobId = _createNoProvider(address(0)); + + vm.startPrank(client); + vm.expectRevert(IAgenticCommerce.InvalidJob.selector); + kernel.setProvider(0, provider, ""); + vm.expectRevert(IAgenticCommerce.InvalidJob.selector); + kernel.setProvider(99, provider, ""); + vm.stopPrank(); + + vm.prank(stranger); + vm.expectRevert(IAgenticCommerce.Unauthorized.selector); + kernel.setProvider(jobId, provider, ""); + + vm.startPrank(client); + vm.expectRevert(IAgenticCommerce.ZeroAddress.selector); + kernel.setProvider(jobId, address(0), ""); + vm.expectRevert(IAgenticCommerce.ClientIsProvider.selector); + kernel.setProvider(jobId, client, ""); + vm.expectRevert(IAgenticCommerce.EvaluatorIsProvider.selector); + kernel.setProvider(jobId, evaluator, ""); + kernel.setProvider(jobId, provider, ""); + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); // provider already set + kernel.setProvider(jobId, makeAddr("p2"), ""); + vm.stopPrank(); + } + + function test_setProvider_notOpen_reverts() public { + uint256 jobId = _createNoProvider(address(0)); + vm.prank(client); + kernel.reject(jobId, bytes32(0), ""); + vm.prank(client); + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.setProvider(jobId, provider, ""); + } + + function test_setProvider_expired_reverts() public { + uint256 jobId = _createNoProvider(address(0)); + vm.warp(block.timestamp + EXPIRY_OFFSET); + vm.prank(client); + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.setProvider(jobId, provider, ""); + } + + function test_setProvider_revertingBeforeHook_blocks() public { + RevertingHook rh = new RevertingHook(); + vm.prank(admin); + kernel.setHookWhitelist(address(rh), true); + uint256 jobId = _createNoProvider(address(rh)); + rh.setRevertBefore(true); + vm.prank(client); + vm.expectRevert(RevertingHook.HookSaysNo.selector); + kernel.setProvider(jobId, provider, ""); + } + + /// @dev Two faults at once: the earlier check in PRD order must win (C-03). + function test_setProvider_precedence() public { + uint256 expired = _createNoProvider(address(0)); + vm.warp(block.timestamp + EXPIRY_OFFSET); + vm.prank(stranger); // expired AND unauthorised + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.setProvider(expired, provider, ""); + + uint256 set = _create(address(0)); // provider already set + vm.prank(client); // provider set AND zero address + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.setProvider(set, address(0), ""); + } + + // ═════════════════════════════ setBudget ═════════════════════════════ + + function test_setBudget_reQuotableWhileOpen_andEncoding() public { + uint256 jobId = _create(address(rec)); + vm.startPrank(provider); + kernel.setBudget(jobId, 5, hex"01"); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.BudgetSet(jobId, 7); + kernel.setBudget(jobId, 7, hex"02"); + vm.stopPrank(); + assertEq(kernel.getJob(jobId).budget, 7); + assertEq(rec.getCall(2).data, abi.encode(provider, uint256(7), hex"02")); + assertEq(rec.getCall(2).selector, IAgenticCommerce.setBudget.selector); + } + + function test_setBudget_reverts() public { + uint256 jobId = _create(address(0)); + vm.startPrank(provider); + vm.expectRevert(IAgenticCommerce.InvalidJob.selector); + kernel.setBudget(0, 1, ""); + vm.stopPrank(); + + vm.prank(stranger); + vm.expectRevert(IAgenticCommerce.Unauthorized.selector); + kernel.setBudget(jobId, 1, ""); + + vm.warp(block.timestamp + EXPIRY_OFFSET); + vm.prank(provider); + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.setBudget(jobId, 1, ""); + } + + function test_setBudget_afterFund_reverts() public { + uint256 jobId = _funded(address(0), BUDGET); + vm.prank(provider); + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.setBudget(jobId, 1, ""); + } + + // ═════════════════════════════ fund ═════════════════════════════ + + function test_fund_happy() public { + uint256 jobId = _budgeted(address(rec), BUDGET); + uint256 before = token.balanceOf(client); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.JobFunded(jobId, client, BUDGET); + vm.prank(client); + kernel.fund(jobId, BUDGET, hex"abcd"); + + assertEq(token.balanceOf(client), before - BUDGET); + assertEq(token.balanceOf(address(kernel)), BUDGET); + assertEq(kernel.totalEscrowed(), BUDGET); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Funded)); + + RecordingHook.Call memory b = rec.getCall(2); + assertEq(b.selector, IAgenticCommerce.fund.selector); + assertEq(b.data, abi.encode(client, hex"abcd")); + assertEq(b.statusSeen, uint8(IAgenticCommerce.JobStatus.Open), "before sees pre-state"); + assertEq(rec.getCall(3).statusSeen, uint8(IAgenticCommerce.JobStatus.Funded), "after sees post-state"); + } + + function test_fund_zeroBudget_noTransfer() public { + uint256 jobId = _create(address(0)); + uint256 before = token.balanceOf(client); + vm.prank(client); + kernel.fund(jobId, 0, ""); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Funded)); + assertEq(token.balanceOf(client), before); + assertEq(kernel.totalEscrowed(), 0); + } + + function test_fund_reverts_inOrder() public { + uint256 noProv = _createNoProvider(address(0)); + uint256 jobId = _budgeted(address(0), BUDGET); + + vm.startPrank(client); + vm.expectRevert(IAgenticCommerce.InvalidJob.selector); + kernel.fund(0, BUDGET, ""); + vm.stopPrank(); + + vm.prank(stranger); + vm.expectRevert(IAgenticCommerce.Unauthorized.selector); + kernel.fund(jobId, BUDGET, ""); + + vm.prank(client); + vm.expectRevert(IAgenticCommerce.ProviderNotSet.selector); + kernel.fund(noProv, 0, ""); + + vm.prank(client); + vm.expectRevert(IAgenticCommerce.BudgetMismatch.selector); + kernel.fund(jobId, BUDGET - 1, ""); + + vm.warp(block.timestamp + EXPIRY_OFFSET); + vm.prank(client); + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.fund(jobId, BUDGET, ""); + } + + /// @dev Two faults at once: the earlier check in PRD order must win (C-03). + function test_fund_precedence() public { + uint256 noProv = _createNoProvider(address(0)); + vm.prank(stranger); // unauthorised AND no provider + vm.expectRevert(IAgenticCommerce.Unauthorized.selector); + kernel.fund(noProv, 0, ""); + + vm.prank(client); // no provider AND wrong budget + vm.expectRevert(IAgenticCommerce.ProviderNotSet.selector); + kernel.fund(noProv, 1, ""); + + uint256 jobId = _budgeted(address(0), BUDGET); + vm.warp(block.timestamp + EXPIRY_OFFSET); + vm.prank(client); // expired AND wrong budget + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.fund(jobId, BUDGET - 1, ""); + } + + function test_fund_frontRunReQuote_reverts() public { + uint256 jobId = _budgeted(address(0), BUDGET); + vm.prank(provider); + kernel.setBudget(jobId, BUDGET * 100, ""); + vm.prank(client); + vm.expectRevert(IAgenticCommerce.BudgetMismatch.selector); + kernel.fund(jobId, BUDGET, ""); + } + + function test_fund_twice_reverts() public { + uint256 jobId = _funded(address(0), BUDGET); + vm.prank(client); + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.fund(jobId, BUDGET, ""); + } + + // ═════════════════════════════ submit (K-11) ═════════════════════════════ + + function test_submit_happy() public { + uint256 jobId = _funded(address(rec), BUDGET); + bytes32 d = keccak256("d"); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.JobSubmitted(jobId, provider, d); + vm.prank(provider); + kernel.submit(jobId, d, hex"09"); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Submitted)); + assertEq(rec.getCall(4).data, abi.encode(provider, d, hex"09")); + } + + function test_submit_openJob_reverts_evenZeroBudget() public { + uint256 jobId = _create(address(0)); + vm.prank(provider); + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.submit(jobId, bytes32(0), ""); + } + + function test_submit_reverts() public { + uint256 jobId = _funded(address(0), BUDGET); + vm.prank(provider); + vm.expectRevert(IAgenticCommerce.InvalidJob.selector); + kernel.submit(0, bytes32(0), ""); + + vm.prank(stranger); + vm.expectRevert(IAgenticCommerce.Unauthorized.selector); + kernel.submit(jobId, bytes32(0), ""); + + vm.warp(block.timestamp + EXPIRY_OFFSET); + vm.prank(provider); + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.submit(jobId, bytes32(0), ""); + } + + // ═════════════════════════════ complete ═════════════════════════════ + + function test_complete_feeSplit_rounding_andEventOrder() public { + vm.startPrank(admin); + kernel.setPlatformFee(500, treasury); + kernel.setEvaluatorFee(250); + vm.stopPrank(); + uint256 budget = 1_000_003; + uint256 jobId = _submitted(address(0), budget); + + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.PlatformFeePaid(jobId, treasury, 50_000); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.EvaluatorFeePaid(jobId, evaluator, 25_000); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.JobCompleted(jobId, evaluator, bytes32("ok")); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.PaymentReleased(jobId, provider, 925_003); + vm.prank(evaluator); + kernel.complete(jobId, bytes32("ok"), ""); + + assertEq(token.balanceOf(treasury), 50_000); + assertEq(token.balanceOf(evaluator), 25_000); + assertEq(token.balanceOf(provider), 925_003); + assertEq(kernel.totalEscrowed(), 0); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Completed)); + } + + function test_complete_zeroFees_providerGetsAll() public { + uint256 jobId = _submitted(address(0), BUDGET); + vm.recordLogs(); + vm.prank(evaluator); + kernel.complete(jobId, bytes32(0), ""); + assertEq(token.balanceOf(provider), BUDGET); + assertEq(token.balanceOf(treasury), 0); + _assertNoLog(IAgenticCommerce.PlatformFeePaid.selector); + _assertNoLog(IAgenticCommerce.EvaluatorFeePaid.selector); + } + + function test_complete_fullFees_netZero_stillEmitsPaymentReleased() public { + vm.prank(admin); + kernel.setPlatformFee(10_000, treasury); + uint256 jobId = _submitted(address(0), BUDGET); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.PaymentReleased(jobId, provider, 0); + vm.prank(evaluator); + kernel.complete(jobId, bytes32(0), ""); + assertEq(token.balanceOf(treasury), BUDGET); + assertEq(token.balanceOf(provider), 0); + } + + function test_complete_zeroBudget() public { + uint256 jobId = _submitted(address(0), 0); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.PaymentReleased(jobId, provider, 0); + vm.prank(evaluator); + kernel.complete(jobId, bytes32(0), ""); + } + + function test_complete_allowedAfterExpiry() public { + uint256 jobId = _submitted(address(0), BUDGET); + vm.warp(block.timestamp + EXPIRY_OFFSET + 30 minutes); + vm.prank(evaluator); + kernel.complete(jobId, bytes32(0), ""); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Completed)); + } + + function test_complete_reverts() public { + uint256 funded = _funded(address(0), BUDGET); + uint256 submitted = _submitted(address(0), BUDGET); + + vm.startPrank(evaluator); + vm.expectRevert(IAgenticCommerce.InvalidJob.selector); + kernel.complete(0, bytes32(0), ""); + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.complete(funded, bytes32(0), ""); + vm.stopPrank(); + + vm.prank(client); + vm.expectRevert(IAgenticCommerce.Unauthorized.selector); + kernel.complete(submitted, bytes32(0), ""); + } + + // ═════════════════════════════ reject ═════════════════════════════ + + function test_reject_open_byClient_and_byProvider() public { + uint256 a = _create(address(0)); + uint256 b = _create(address(0)); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.JobRejected(a, client, bytes32("no")); + vm.prank(client); + kernel.reject(a, bytes32("no"), ""); + vm.prank(provider); + kernel.reject(b, bytes32(0), ""); + assertEq(uint8(_status(a)), uint8(IAgenticCommerce.JobStatus.Rejected)); + assertEq(uint8(_status(b)), uint8(IAgenticCommerce.JobStatus.Rejected)); + } + + function test_reject_funded_byEvaluator_refunds() public { + uint256 jobId = _funded(address(0), BUDGET); + uint256 before = token.balanceOf(client); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.Refunded(jobId, client, BUDGET); + vm.prank(evaluator); + kernel.reject(jobId, bytes32(0), ""); + assertEq(token.balanceOf(client), before + BUDGET); + assertEq(kernel.totalEscrowed(), 0); + } + + function test_reject_submitted_byEvaluator_refunds() public { + uint256 jobId = _submitted(address(0), BUDGET); + uint256 before = token.balanceOf(client); + vm.prank(evaluator); + kernel.reject(jobId, bytes32(0), ""); + assertEq(token.balanceOf(client), before + BUDGET); + assertEq(kernel.totalEscrowed(), 0); + } + + function test_reject_fundedZeroBudget_noRefundEvent() public { + uint256 jobId = _funded(address(0), 0); + vm.recordLogs(); + vm.prank(evaluator); + kernel.reject(jobId, bytes32(0), ""); + _assertNoLog(IAgenticCommerce.Refunded.selector); + } + + function test_reject_unauthorisedPerStatus() public { + uint256 open = _create(address(0)); + uint256 funded = _funded(address(0), BUDGET); + uint256 submitted = _submitted(address(0), BUDGET); + + vm.prank(evaluator); + vm.expectRevert(IAgenticCommerce.Unauthorized.selector); + kernel.reject(open, bytes32(0), ""); + + vm.prank(client); + vm.expectRevert(IAgenticCommerce.Unauthorized.selector); + kernel.reject(funded, bytes32(0), ""); + + vm.prank(provider); + vm.expectRevert(IAgenticCommerce.Unauthorized.selector); + kernel.reject(submitted, bytes32(0), ""); + } + + function test_reject_invalidAndTerminal_revert() public { + vm.expectRevert(IAgenticCommerce.InvalidJob.selector); + kernel.reject(0, bytes32(0), ""); + + uint256 jobId = _create(address(0)); + vm.prank(client); + kernel.reject(jobId, bytes32(0), ""); + vm.prank(client); + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.reject(jobId, bytes32(0), ""); + } + + // ═════════════════════════════ claimRefund (K-05, K-06) ═════════════════════════════ + + function test_claimRefund_funded_afterExpiry() public { + uint256 jobId = _funded(address(0), BUDGET); + uint256 before = token.balanceOf(client); + vm.warp(block.timestamp + EXPIRY_OFFSET); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.Refunded(jobId, client, BUDGET); + vm.expectEmit(address(kernel)); + emit IAgenticCommerce.JobExpired(jobId); + vm.prank(stranger); + kernel.claimRefund(jobId); + assertEq(token.balanceOf(client), before + BUDGET); + assertEq(kernel.totalEscrowed(), 0); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Expired)); + } + + function test_claimRefund_funded_beforeExpiry_reverts() public { + uint256 jobId = _funded(address(0), BUDGET); + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.claimRefund(jobId); + } + + function test_claimRefund_submitted_gracePeriod() public { + uint256 jobId = _submitted(address(0), BUDGET); + uint256 exp = kernel.getJob(jobId).expiredAt; + vm.warp(exp + kernel.EVALUATOR_GRACE_PERIOD() - 1); + vm.expectRevert(IAgenticCommerce.GracePeriodActive.selector); + kernel.claimRefund(jobId); + + vm.warp(exp + kernel.EVALUATOR_GRACE_PERIOD()); + kernel.claimRefund(jobId); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Expired)); + assertEq(kernel.totalEscrowed(), 0); + } + + function test_claimRefund_open_afterExpiry_noTransfer() public { + uint256 jobId = _create(address(0)); + vm.warp(block.timestamp + EXPIRY_OFFSET); + vm.recordLogs(); + kernel.claimRefund(jobId); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Expired)); + _assertNoLog(IAgenticCommerce.Refunded.selector); + } + + function test_claimRefund_fundedZeroBudget_noTransfer() public { + uint256 jobId = _funded(address(0), 0); + vm.warp(block.timestamp + EXPIRY_OFFSET); + vm.recordLogs(); + kernel.claimRefund(jobId); + _assertNoLog(IAgenticCommerce.Refunded.selector); + } + + function test_claimRefund_worksWhilePaused() public { + uint256 jobId = _funded(address(0), BUDGET); + _pause(); + vm.warp(block.timestamp + EXPIRY_OFFSET); + kernel.claimRefund(jobId); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Expired)); + } + + function test_claimRefund_neverCallsHook_evenReverting() public { + RevertingHook rh = new RevertingHook(); + vm.prank(admin); + kernel.setHookWhitelist(address(rh), true); + uint256 jobId = _funded(address(rh), BUDGET); + rh.setRevertBefore(true); + rh.setRevertAfter(true); + vm.warp(block.timestamp + EXPIRY_OFFSET); + kernel.claimRefund(jobId); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Expired)); + } + + function test_claimRefund_invalidAndTerminal_revert() public { + vm.expectRevert(IAgenticCommerce.InvalidJob.selector); + kernel.claimRefund(0); + uint256 jobId = _create(address(0)); + vm.prank(client); + kernel.reject(jobId, bytes32(0), ""); + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.claimRefund(jobId); + } + + function test_complete_vs_claimRefund_race_afterGrace() public { + uint256 a = _submitted(address(0), BUDGET); + vm.warp(kernel.getJob(a).expiredAt + kernel.EVALUATOR_GRACE_PERIOD()); + kernel.claimRefund(a); + vm.prank(evaluator); + vm.expectRevert(IAgenticCommerce.WrongStatus.selector); + kernel.complete(a, bytes32(0), ""); + } + + // ───────────── helpers ───────────── + + function _assertNoLog(bytes32 topic0) internal { + VmLogs memory l = _logs(); + for (uint256 i = 0; i < l.n; i++) { + assertTrue(l.topics[i] != topic0, "unexpected event"); + } + } + + struct VmLogs { + uint256 n; + bytes32[] topics; + } + + function _logs() internal returns (VmLogs memory out) { + Vm.Log[] memory entries = vm.getRecordedLogs(); + out.n = entries.length; + out.topics = new bytes32[](entries.length); + for (uint256 i = 0; i < entries.length; i++) { + out.topics[i] = entries[i].topics.length > 0 ? entries[i].topics[0] : bytes32(0); + } + } +} + diff --git a/plan/marketplace/contracts/test/8183-tests/BaseERC8183Hook.t.sol b/plan/marketplace/contracts/test/8183-tests/BaseERC8183Hook.t.sol new file mode 100644 index 00000000..e11e77eb --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/BaseERC8183Hook.t.sol @@ -0,0 +1,188 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {ERC8183HookErrors} from "../../src/agentic-commerce-8183/libraries/Errors.sol"; +import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; + +import {IERC8183Hook} from "../../src/agentic-commerce-8183/interfaces/IERC8183Hook.sol"; +import {KernelBase} from "./KernelBase.t.sol"; +import {RoutingProbeHook} from "./mocks/RoutingProbeHook.sol"; +import {BareHook} from "./mocks/BareHook.sol"; +import {IAgenticCommerce} from "../../src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol"; + +/// @notice Phase 3 — every route decodes exactly what the real kernel encoded. +contract BaseERC8183HookTest is KernelBase { + RoutingProbeHook internal probe; + RoutingProbeHook internal probeImpl; + address internal hookProxyAdminOwner = makeAddr("hookProxyAdminOwner"); + + function setUp() public override { + super.setUp(); + probeImpl = new RoutingProbeHook(); + probe = RoutingProbeHook(_deployProbe(address(kernel))); + vm.prank(admin); + kernel.setHookWhitelist(address(probe), true); + } + + function _deployProbe(address kernel_) internal returns (address) { + return address( + new TransparentUpgradeableProxy( + address(probeImpl), hookProxyAdminOwner, abi.encodeCall(RoutingProbeHook.initialize, (kernel_)) + ) + ); + } + + function _assertRec( + uint256 i, + string memory handler, + uint256 jobId, + address caller, + address addrArg, + uint256 uintArg, + bytes32 b32Arg, + bytes memory opt + ) internal view { + RoutingProbeHook.Rec memory r = probe.rec(i); + assertEq(r.handler, handler); + assertEq(r.jobId, jobId); + assertEq(r.caller, caller); + assertEq(r.addrArg, addrArg); + assertEq(r.uintArg, uintArg); + assertEq(r.b32Arg, b32Arg); + assertEq(r.optParams, opt); + } + + // ───────────── all 12 routes, driven through the real kernel ───────────── + + function test_routes_setProvider_setBudget_fund_submit_complete() public { + vm.prank(client); + uint256 jobId = kernel.createJob(address(0), evaluator, _expiry(), "", address(probe)); + assertEq(probe.count(), 0); + + vm.prank(client); + kernel.setProvider(jobId, provider, hex"a1"); + vm.prank(provider); + kernel.setBudget(jobId, 42, hex"a2"); + token.mint(client, 42); + vm.prank(client); + kernel.fund(jobId, 42, hex"a3"); + vm.prank(provider); + kernel.submit(jobId, bytes32("deliv"), hex"a4"); + vm.prank(evaluator); + kernel.complete(jobId, bytes32("ok"), hex"a5"); + + assertEq(probe.count(), 10); + _assertRec(0, "preSetProvider", jobId, client, provider, 0, 0, hex"a1"); + _assertRec(1, "postSetProvider", jobId, client, provider, 0, 0, hex"a1"); + _assertRec(2, "preSetBudget", jobId, provider, address(0), 42, 0, hex"a2"); + _assertRec(3, "postSetBudget", jobId, provider, address(0), 42, 0, hex"a2"); + _assertRec(4, "preFund", jobId, client, address(0), 0, 0, hex"a3"); + _assertRec(5, "postFund", jobId, client, address(0), 0, 0, hex"a3"); + _assertRec(6, "preSubmit", jobId, provider, address(0), 0, bytes32("deliv"), hex"a4"); + _assertRec(7, "postSubmit", jobId, provider, address(0), 0, bytes32("deliv"), hex"a4"); + _assertRec(8, "preComplete", jobId, evaluator, address(0), 0, bytes32("ok"), hex"a5"); + _assertRec(9, "postComplete", jobId, evaluator, address(0), 0, bytes32("ok"), hex"a5"); + } + + function test_routes_reject() public { + uint256 jobId = _funded(address(probe), BUDGET); + uint256 n = probe.count(); + vm.prank(evaluator); + kernel.reject(jobId, bytes32("no"), hex"b1"); + _assertRec(n, "preReject", jobId, evaluator, address(0), 0, bytes32("no"), hex"b1"); + _assertRec(n + 1, "postReject", jobId, evaluator, address(0), 0, bytes32("no"), hex"b1"); + } + + // ───────────── caller authentication ───────────── + + function test_beforeAction_fromNonKernel_reverts() public { + vm.prank(stranger); + vm.expectRevert(abi.encodeWithSelector(ERC8183HookErrors.CallerIsNotKernel.selector, stranger)); + probe.beforeAction(1, bytes4(0), ""); + } + + function test_afterAction_fromNonKernel_reverts() public { + vm.prank(stranger); + vm.expectRevert(abi.encodeWithSelector(ERC8183HookErrors.CallerIsNotKernel.selector, stranger)); + probe.afterAction(1, bytes4(0), ""); + } + + /// @dev The kernel never sends an unknown selector, so this is the one test that pranks as the kernel. + function test_unknownSelector_isNoop() public { + vm.startPrank(address(kernel)); + probe.beforeAction(1, bytes4(0xdeadbeef), hex"00"); + probe.afterAction(1, bytes4(0xdeadbeef), hex"00"); + vm.stopPrank(); + assertEq(probe.count(), 0); + } + + // ───────────── ERC-165 ───────────── + + function test_supportsInterface() public view { + assertTrue(probe.supportsInterface(type(IERC8183Hook).interfaceId)); + assertTrue(probe.supportsInterface(type(IERC165).interfaceId)); + assertFalse(probe.supportsInterface(bytes4(0x12345678))); + } + + // ───────────── initialisation ───────────── + + function test_kernel_isSetAndAtSlot0() public view { + assertEq(probe.KERNEL(), address(kernel)); + assertEq(address(uint160(uint256(vm.load(address(probe), bytes32(uint256(0)))))), address(kernel)); + } + + function test_init_zeroKernel_reverts() public { + vm.expectRevert(ERC8183HookErrors.ZeroAddress.selector); + _deployProbe(address(0)); + } + + function test_init_twice_reverts() public { + vm.expectRevert(Initializable.InvalidInitialization.selector); + probe.initialize(address(kernel)); + } + + function test_init_onImplementation_reverts() public { + vm.expectRevert(Initializable.InvalidInitialization.selector); + probeImpl.initialize(address(kernel)); + } + + function test_baseInit_outsideInitializer_reverts() public { + vm.expectRevert(Initializable.NotInitializing.selector); + probe.initOutside(address(kernel)); + } + + // ───────────── default handlers are no-ops ───────────── + + /// @dev A hook that overrides nothing must let every hooked action through unchanged. + function test_defaultHandlers_areNoops_fullLifecycleAndReject() public { + BareHook bareImpl = new BareHook(); + address bare = address( + new TransparentUpgradeableProxy( + address(bareImpl), hookProxyAdminOwner, abi.encodeCall(BareHook.initialize, (address(kernel))) + ) + ); + vm.prank(admin); + kernel.setHookWhitelist(bare, true); + + vm.prank(client); + uint256 a = kernel.createJob(address(0), evaluator, _expiry(), "", bare); + vm.prank(client); + kernel.setProvider(a, provider, ""); + vm.prank(provider); + kernel.setBudget(a, BUDGET, ""); + vm.prank(client); + kernel.fund(a, BUDGET, ""); + vm.prank(provider); + kernel.submit(a, bytes32(0), ""); + vm.prank(evaluator); + kernel.complete(a, bytes32(0), ""); + assertEq(uint8(kernel.getJob(a).status), uint8(IAgenticCommerce.JobStatus.Completed)); + + uint256 b = _funded(bare, BUDGET); + vm.prank(evaluator); + kernel.reject(b, bytes32(0), ""); + assertEq(uint8(kernel.getJob(b).status), uint8(IAgenticCommerce.JobStatus.Rejected)); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/Interfaces.t.sol b/plan/marketplace/contracts/test/8183-tests/Interfaces.t.sol new file mode 100644 index 00000000..cfe9a6e3 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/Interfaces.t.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {Test} from "forge-std/Test.sol"; +import {IERC8183Hook} from "../../src/agentic-commerce-8183/interfaces/IERC8183Hook.sol"; +import {IAgenticCommerce} from "../../src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol"; + +/// @notice Phase 1 — interface ids and the hooked selectors the hook base routes on. +contract InterfacesTest is Test { + function test_hookInterfaceId_isXorOfBothSelectors() public pure { + bytes4 expected = IERC8183Hook.beforeAction.selector ^ IERC8183Hook.afterAction.selector; + assertEq(type(IERC8183Hook).interfaceId, expected); + assertEq(type(IERC8183Hook).interfaceId, bytes4(0x7ff6bc9e)); + } + + function test_hookSelectors_matchStandard() public pure { + assertEq(IERC8183Hook.beforeAction.selector, bytes4(keccak256("beforeAction(uint256,bytes4,bytes)"))); + assertEq(IERC8183Hook.afterAction.selector, bytes4(keccak256("afterAction(uint256,bytes4,bytes)"))); + } + + /// @dev Pins every hooked selector. K-04 moves setProvider to the 3-argument form. + function test_hookedKernelSelectors() public pure { + assertEq(IAgenticCommerce.setProvider.selector, bytes4(0xc9a84bb9)); + assertEq(IAgenticCommerce.setBudget.selector, bytes4(0xdd4ae9d4)); + assertEq(IAgenticCommerce.fund.selector, bytes4(0xd2e13f50)); + assertEq(IAgenticCommerce.submit.selector, bytes4(0x9e63798d)); + assertEq(IAgenticCommerce.complete.selector, bytes4(0xd75bbdf3)); + assertEq(IAgenticCommerce.reject.selector, bytes4(0x41dd26f5)); + } + + function test_createJob_keepsFiveArgumentShape() public pure { + assertEq( + IAgenticCommerce.createJob.selector, bytes4(keccak256("createJob(address,address,uint256,string,address)")) + ); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/JobSpecBuilder.t.sol b/plan/marketplace/contracts/test/8183-tests/JobSpecBuilder.t.sol new file mode 100644 index 00000000..5280ba32 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/JobSpecBuilder.t.sol @@ -0,0 +1,401 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {Test} from "forge-std/Test.sol"; + +import {TemplateParts} from "./helpers/TemplateParts.sol"; +import {UniversalMarketplaceErrors} from "../../src/agentic-commerce-8183/libraries/Errors.sol"; +import {JobSpecBuilder} from "../../src/agentic-commerce-8183/libraries/JobSpecBuilder.sol"; +import { + Evaluation, + Operation, + LogicKind, + Logic, + AllowedMutability, + JobSpec, + T_TUPLE, + T_ADDRESS +} from "../../src/agentic-commerce-8183/libraries/JobSpecTypes.sol"; +import { + FillSource, + Fill, + ReadTemplate, + TargetSource, + CheckTemplate, + ParamBounds, + JobSpecTemplate, + BuildContext +} from "../../src/agentic-commerce-8183/libraries/Types.sol"; + +/// @notice TEST ONLY: calls JobSpecBuilder the way the marketplace does. Under DELEGATECALL the library asks +/// `address(this)` (this harness) for CEAs, so the harness answers `computeCEA` like a marketplace: +/// a deterministic stand-in per (agw, chain) for chains the test supports, `ChainNotSupported` otherwise. +contract JobSpecBuilderHarness { + mapping(bytes32 => bool) internal supported; + + function setSupported(bytes32 chainHash, bool on) external { + supported[chainHash] = on; + } + + function build(bytes memory jobSpecTemplate, BuildContext memory ctx) external view returns (bytes memory) { + return JobSpecBuilder.build(jobSpecTemplate, ctx); + } + + function computeCEA(address agw, bytes32 chainHash) external view returns (address) { + if (!supported[chainHash]) revert UniversalMarketplaceErrors.ChainNotSupported(chainHash); + return ceaFor(agw, chainHash); + } + + function ceaFor(address agw, bytes32 chainHash) public pure returns (address) { + return address(uint160(uint256(keccak256(abi.encode("cea", agw, chainHash))))); + } +} + +/// @notice The V2 doc's templates and build helpers, shared by the builder and conformance suites. +abstract contract BuilderFixtures is Test, TemplateParts { + JobSpecBuilderHarness internal builder; + + bytes32 internal constant ETH_HASH = keccak256("eip155:1"); + bytes32 internal constant BASE_HASH = keccak256("eip155:8453"); + + address internal AGW = makeAddr("agw"); + address internal AUSDC_ETH = makeAddr("aUSDC.eth"); + address internal AAVE_POOL_ETH = makeAddr("AavePool.eth"); + address internal USDC_ETH = makeAddr("USDC.eth"); + address internal MORPHO_VAULT = makeAddr("MorphoVault.eth"); + address internal SPARK = makeAddr("Spark.eth"); + address internal WETH_BASE = makeAddr("WETH.base"); + + function setUp() public virtual { + builder = new JobSpecBuilderHarness(); + builder.setSupported(ETH_HASH, true); + builder.setSupported(BASE_HASH, true); + } + + // ───────── the V2 doc's templates ───────── + + /// @dev "Deposit into Aave v3 on Ethereum at ≥ 4%": deposited ≥ 99.99% of principal AND rate ≥ 4% (ray). + function _lending() internal view returns (JobSpecTemplate memory t) { + t.reads = new ReadTemplate[](2); + t.reads[0] = _balanceOfCEA("1", AUSDC_ETH); + t.reads[1] = + _read("1", AAVE_POOL_ETH, GET_RESERVE_DATA, abi.encode(USDC_ETH), _noFills(), _reserveDataOut(), _f2(0, 2)); + t.checks = new CheckTemplate[](2); + t.checks[0] = _chk(0, Evaluation.COMPARE, Operation.GREATER_OR_EQUAL, TargetSource.PRINCIPAL_BPS, 9999); + t.checks[1] = _chk(1, Evaluation.COMPARE, Operation.GREATER_OR_EQUAL, TargetSource.FIXED, 0.04e27); + t.logic = _rootOf(LogicKind.ALL, _kids(0, 1)); + t.params = new ParamBounds[](0); + } + + /// @dev "The CEA receives at least minOut WETH on Base": one NUM check, `minOut` is the user's param 0. + function _swap() internal view returns (JobSpecTemplate memory t) { + t.reads = new ReadTemplate[](1); + t.reads[0] = _balanceOfCEA("8453", WETH_BASE); + t.reads[0].minConfirmations = 3; + t.checks = new CheckTemplate[](1); + t.checks[0] = _chk(0, Evaluation.NUMBER, Operation.GREATER_OR_EQUAL, TargetSource.PARAM, 0); + t.logic = _rootOf(LogicKind.ALL, _one(0)); + t.params = new ParamBounds[](1); + t.params[0] = ParamBounds({min: 1, max: 1e30}); + } + + /// @dev "Aave OR Morpho": ANY over two CMP checks. + function _either() internal view returns (JobSpecTemplate memory t) { + t.reads = new ReadTemplate[](2); + t.reads[0] = _balanceOfCEA("1", AUSDC_ETH); + t.reads[1] = _read("1", MORPHO_VAULT, MAX_WITHDRAW, new bytes(32), _ceaFill(0), _uintOut(), _f(0)); + t.checks = new CheckTemplate[](2); + t.checks[0] = _chk(0, Evaluation.COMPARE, Operation.GREATER_OR_EQUAL, TargetSource.PRINCIPAL_BPS, 9999); + t.checks[1] = _chk(1, Evaluation.COMPARE, Operation.GREATER_OR_EQUAL, TargetSource.PRINCIPAL_BPS, 9999); + t.logic = _rootOf(LogicKind.ANY, _kids(0, 1)); + t.params = new ParamBounds[](0); + } + + /// @dev "At least 2 of Aave, Morpho, Spark". + function _twoOfThree() internal view returns (JobSpecTemplate memory t) { + t.reads = new ReadTemplate[](3); + t.reads[0] = _balanceOfCEA("1", AUSDC_ETH); + t.reads[1] = _read("1", MORPHO_VAULT, MAX_WITHDRAW, new bytes(32), _ceaFill(0), _uintOut(), _f(0)); + t.reads[2] = _balanceOfCEA("1", SPARK); + t.checks = new CheckTemplate[](3); + for (uint8 i; i < 3; ++i) { + t.checks[i] = _chk(i, Evaluation.COMPARE, Operation.GREATER_OR_EQUAL, TargetSource.FIXED, 99.99e6); + } + t.logic = new Logic[](1); + t.logic[0] = _step(LogicKind.AT_LEAST, _kids3(0, 1, 2), _none(), 2); + t.params = new ParamBounds[](0); + } + + /// @dev "(Aave deposited AND Aave ≥ 4%) OR (Morpho deposited AND Morpho rate ≥ 4%)". + function _nested() internal view returns (JobSpecTemplate memory t) { + t.reads = new ReadTemplate[](4); + t.reads[0] = _balanceOfCEA("1", AUSDC_ETH); + t.reads[1] = + _read("1", AAVE_POOL_ETH, GET_RESERVE_DATA, abi.encode(USDC_ETH), _noFills(), _reserveDataOut(), _f2(0, 2)); + t.reads[2] = _read("1", MORPHO_VAULT, MAX_WITHDRAW, new bytes(32), _ceaFill(0), _uintOut(), _f(0)); + t.reads[3] = _read("1", MORPHO_VAULT, bytes4(keccak256("supplyRate()")), "", _noFills(), _uintOut(), _f(0)); + t.checks = new CheckTemplate[](4); + t.checks[0] = _chk(0, Evaluation.COMPARE, Operation.GREATER_OR_EQUAL, TargetSource.FIXED, 99.99e6); + t.checks[1] = _chk(1, Evaluation.COMPARE, Operation.GREATER_OR_EQUAL, TargetSource.FIXED, 0.04e27); + t.checks[2] = _chk(2, Evaluation.COMPARE, Operation.GREATER_OR_EQUAL, TargetSource.FIXED, 99.99e6); + t.checks[3] = _chk(3, Evaluation.COMPARE, Operation.GREATER_OR_EQUAL, TargetSource.FIXED, 0.04e18); + t.logic = new Logic[](3); + t.logic[0] = _step(LogicKind.ANY, _none(), _kids(1, 2), 0); + t.logic[1] = _step(LogicKind.ALL, _kids(0, 1), _none(), 0); + t.logic[2] = _step(LogicKind.ALL, _kids(2, 3), _none(), 0); + t.params = new ParamBounds[](0); + } + + // ───────── building ───────── + + function _ctx(uint256 principal, int256[] memory params) internal view returns (BuildContext memory) { + return BuildContext({ + agw: AGW, + principal: principal, + executeBy: 1_800_000_000, + settleWindow: 2 hours, + params: params, + origin: keccak256("origin") + }); + } + + function _build(JobSpecTemplate memory t, BuildContext memory ctx) internal view returns (JobSpec memory) { + return abi.decode(builder.build(abi.encode(t), ctx), (JobSpec)); + } + + function _noParams() internal pure returns (int256[] memory) { + return new int256[](0); + } + + function _oneParam(int256 v) internal pure returns (int256[] memory p) { + p = new int256[](1); + p[0] = v; + } +} + +/// @title JobSpecBuilder — unit suite. +contract JobSpecBuilderTest is BuilderFixtures { + /// @dev `positionManager.ownerOf(1234) == CEA` on Ethereum: a CEA-target check, and no CEA fill. + function _ownerIsCEA() internal pure returns (JobSpecTemplate memory t) { + t.reads = new ReadTemplate[](1); + t.reads[0] = _read( + "1", + address(0x9051), + bytes4(keccak256("ownerOf(uint256)")), + abi.encode(uint256(1234)), + _noFills(), + abi.encodePacked(T_TUPLE, uint8(1), T_ADDRESS), + _f(0) + ); + t.checks = new CheckTemplate[](1); + t.checks[0] = _chk(0, Evaluation.COMPARE, Operation.EQUAL, TargetSource.CEA, 0); + t.logic = _rootOf(LogicKind.ALL, _one(0)); + t.params = new ParamBounds[](0); + } + + function test_JB01_fills() public view { + // one read on Ethereum and one on Base: each gets its own chain's CEA + JobSpecTemplate memory t = _either(); + t.reads[1] = _balanceOfCEA("8453", WETH_BASE); + t.checks[1] = _chk(1, Evaluation.COMPARE, Operation.GREATER_OR_EQUAL, TargetSource.FIXED, 1); + JobSpec memory s = _build(t, _ctx(100e6, _noParams())); + assertEq(s.reads[0].args, abi.encode(builder.ceaFor(AGW, ETH_HASH)), "eth read: eth CEA"); + assertEq(s.reads[1].args, abi.encode(builder.ceaFor(AGW, BASE_HASH)), "base read: base CEA"); + assertTrue(builder.ceaFor(AGW, ETH_HASH) != builder.ceaFor(AGW, BASE_HASH)); + + // PARAM fills, positive and negative; untouched words keep their bytes + JobSpecTemplate memory p = _swap(); + p.params[0] = ParamBounds({min: type(int256).min, max: type(int256).max}); + p.reads[0].args = abi.encode(uint256(7), uint256(0), uint256(9)); + p.reads[0].fills = new Fill[](2); + p.reads[0].fills[0] = Fill({word: 1, source: FillSource.PARAM, param: 0}); + p.reads[0].fills[1] = Fill({word: 2, source: FillSource.CEA, param: 0}); + s = _build(p, _ctx(1, _oneParam(-5))); + assertEq(s.reads[0].args, abi.encode(uint256(7), int256(-5), builder.ceaFor(AGW, BASE_HASH))); + } + + function test_JB02_targets() public view { + // PRINCIPAL_BPS rounds down: 100_000_001 × 9999 / 10_000 = 99_990_000.9999 → 99_990_000 + JobSpec memory s = _build(_lending(), _ctx(100_000_001, _noParams())); + assertEq(s.checks[0].target, 99_990_000); + assertEq(s.checks[1].target, 0.04e27, "FIXED"); + s = _build(_lending(), _ctx(100e6, _noParams())); + assertEq(s.checks[0].target, 99.99e6, "exact"); + + s = _build(_swap(), _ctx(1, _oneParam(0.38e18))); + assertEq(s.checks[0].target, 0.38e18, "PARAM"); + + s = _build(_ownerIsCEA(), _ctx(1, _noParams())); + assertEq(s.checks[0].target, int256(uint256(uint160(builder.ceaFor(AGW, ETH_HASH)))), "CEA"); + assertEq(s.reads[0].args, abi.encode(uint256(1234)), "a read without fills is copied as is"); + } + + function test_JB03_timingAndOrigin() public view { + JobSpecTemplate memory t = _nested(); + JobSpec memory s = _build(t, _ctx(100e6, _noParams())); + assertEq(s.executeBy, 1_800_000_000); + assertEq(s.failFinalAt, 1_800_000_000 + 2 hours); + assertEq(s.origin, keccak256("origin")); + assertEq(keccak256(abi.encode(s.logic)), keccak256(abi.encode(t.logic)), "logic verbatim"); + assertEq(uint8(s.allowedMutability), uint8(t.allowedMutability), "mutability verbatim"); + for (uint256 i; i < t.reads.length; ++i) { + assertEq(s.reads[i].chainNamespace, t.reads[i].chainNamespace); + assertEq(s.reads[i].chainId, t.reads[i].chainId); + assertEq(s.reads[i].minConfirmations, t.reads[i].minConfirmations); + assertEq(s.reads[i].target, t.reads[i].target); + assertEq(s.reads[i].selector, t.reads[i].selector); + assertEq(s.reads[i].outputs, t.reads[i].outputs); + assertEq(keccak256(abi.encode(s.reads[i].field)), keccak256(abi.encode(t.reads[i].field))); + } + for (uint256 i; i < t.checks.length; ++i) { + assertEq(s.checks[i].read, t.checks[i].read); + assertEq(uint8(s.checks[i].evaluation), uint8(t.checks[i].evaluation)); + assertEq(uint8(s.checks[i].operation), uint8(t.checks[i].operation)); + } + } + + function test_JB04_params() public { + bytes memory swap = abi.encode(_swap()); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.ParamCountMismatch.selector, 1, 0)); + builder.build(swap, _ctx(1, _noParams())); + + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.ParamOutOfRange.selector, 0, int256(0))); + builder.build(swap, _ctx(1, _oneParam(0))); + vm.expectRevert( + abi.encodeWithSelector(UniversalMarketplaceErrors.ParamOutOfRange.selector, 0, int256(1e30 + 1)) + ); + builder.build(swap, _ctx(1, _oneParam(1e30 + 1))); + builder.build(swap, _ctx(1, _oneParam(1))); // both bounds are inclusive + builder.build(swap, _ctx(1, _oneParam(1e30))); + } + + function test_JB05_targetOverflow() public { + // PRINCIPAL_BPS: the product principal × bps overflows. (Once it fits, the quotient is at most + // uint256.max / 10_000, always inside int256: this is the one overflow there is.) + JobSpecTemplate memory t = _lending(); + t.checks[0].value = 2; + bytes memory enc = abi.encode(t); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.TargetOverflow.selector, 0)); + builder.build(enc, _ctx(2 ** 255, _noParams())); + // the largest principal whose product fits builds + uint256 largest = type(uint256).max / 2; + JobSpec memory s = _build(t, _ctx(largest, _noParams())); + assertEq(uint256(s.checks[0].target), largest * 2 / 10_000); + } + + function test_JB06_fillOutOfBounds() public { + // a fill on the last word builds; one word further does not, whatever its source + JobSpecTemplate memory t = _swap(); + t.reads[0].args = new bytes(64); + t.reads[0].fills[0].word = 1; + _build(t, _ctx(1, _oneParam(1))); + + t.reads[0].fills[0].word = 2; + bytes memory enc = abi.encode(t); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.FillOutOfBounds.selector, 0, 0)); + builder.build(enc, _ctx(1, _oneParam(1))); + + t = _swap(); + t.reads[0].fills = new Fill[](2); + t.reads[0].fills[0] = Fill({word: 0, source: FillSource.CEA, param: 0}); + t.reads[0].fills[1] = Fill({word: 1, source: FillSource.PARAM, param: 0}); // args are one word long + enc = abi.encode(t); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.FillOutOfBounds.selector, 0, 1)); + builder.build(enc, _ctx(1, _oneParam(1))); + } + + function test_JB07_ceaOnUnsupportedChain() public { + bytes32 polygon = keccak256("eip155:137"); + JobSpecTemplate memory t = _swap(); + t.reads[0].chainId = "137"; // a CEA fill on a chain without a CEA deployment + bytes memory enc = abi.encode(t); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.ChainNotSupported.selector, polygon)); + builder.build(enc, _ctx(1, _oneParam(1))); + + t = _ownerIsCEA(); + t.reads[0].chainId = "137"; // a CEA target on such a chain + enc = abi.encode(t); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.ChainNotSupported.selector, polygon)); + builder.build(enc, _ctx(1, _noParams())); + + // no CEA anywhere: no chain is asked, so an unsupported chain is fine + t = _ownerIsCEA(); + t.reads[0].chainId = "137"; + t.checks[0] = _chk(0, Evaluation.COMPARE, Operation.EQUAL, TargetSource.FIXED, 7); + _build(t, _ctx(1, _noParams())); + } + + /// @dev The builder does not judge criteria: a template the evaluator could not run (an unread read, an + /// unreachable logic step, outputs that are not types) still builds, copied as given. + function test_JB08_doesNotJudgeTheTemplate() public view { + JobSpecTemplate memory t = _lending(); + ReadTemplate[] memory reads = new ReadTemplate[](3); + (reads[0], reads[1]) = (t.reads[0], t.reads[1]); + reads[2] = _read("1", SPARK, BALANCE_OF, "", _noFills(), hex"ff00", new uint8[](0)); + t.reads = reads; + Logic[] memory logic = new Logic[](2); + logic[0] = t.logic[0]; + logic[1] = _step(LogicKind.ALL, _one(1), _none(), 0); // reached by nobody + t.logic = logic; + JobSpec memory s = _build(t, _ctx(100e6, _noParams())); + assertEq(s.reads.length, 3); + assertEq(s.reads[2].outputs, hex"ff00"); + assertEq(s.logic.length, 2); + } + + function test_JB09_malformedTemplate_reverts() public { + // Not an abi-encoded JobSpecTemplate: the decode fails with no revert data. A bare expectRevert is the + // only possible assertion. + vm.expectRevert(); + builder.build(hex"deadbeef", _ctx(1, _noParams())); + } + + function test_JB12_copiesLogicAndMutability() public view { + JobSpecTemplate memory t = _nested(); + t.allowedMutability = AllowedMutability.PROVIDER; + JobSpec memory s = _build(t, _ctx(100e6, _noParams())); + assertEq(abi.encode(s.logic), abi.encode(t.logic), "two-level logic, byte-identical"); + assertEq(s.logic.length, 3); + assertEq(s.logic[0].children.length, 2, "root has two child steps"); + assertEq(uint8(s.allowedMutability), uint8(AllowedMutability.PROVIDER)); + } + + // ═════════════════════════════ fuzz ═════════════════════════════ + + function testFuzz_JB10_inBoundsNeverReverts(uint256 principal, int256 minOut) public view { + principal = bound(principal, 0, 2 ** 200); + minOut = bound(minOut, 1, 1e30); + JobSpec memory s = _build(_swap(), _ctx(principal, _oneParam(minOut))); + assertEq(s.checks[0].target, minOut); + _assertStructural(s); + + s = _build(_lending(), _ctx(principal, _noParams())); + assertEq(uint256(s.checks[0].target), principal * 9999 / 10_000); + _assertStructural(s); + } + + function testFuzz_JB11_deterministic(uint256 principal, bytes32 origin) public view { + principal = bound(principal, 0, 2 ** 200); + BuildContext memory ctx = _ctx(principal, _noParams()); + ctx.origin = origin; + bytes memory a = builder.build(abi.encode(_nested()), ctx); + bytes memory b = builder.build(abi.encode(_nested()), ctx); + assertEq(keccak256(a), keccak256(b)); + } + + /// @dev The structural rules the evaluator relies on, checked on the BUILT spec of a well-formed template. + function _assertStructural(JobSpec memory s) internal pure { + for (uint256 i; i < s.checks.length; ++i) { + assertLt(s.checks[i].read, s.reads.length); + } + for (uint256 i; i < s.logic.length; ++i) { + for (uint256 j; j < s.logic[i].checks.length; ++j) { + assertLt(s.logic[i].checks[j], s.checks.length); + } + for (uint256 j; j < s.logic[i].children.length; ++j) { + assertGt(s.logic[i].children[j], i); + assertLt(s.logic[i].children[j], s.logic.length); + } + } + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/KernelBase.t.sol b/plan/marketplace/contracts/test/8183-tests/KernelBase.t.sol new file mode 100644 index 00000000..94afd32b --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/KernelBase.t.sol @@ -0,0 +1,94 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {Test} from "forge-std/Test.sol"; +import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol"; + +import {AgenticCommerce} from "../../src/agentic-commerce-8183/AgenticCommerce.sol"; +import {IAgenticCommerce} from "../../src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol"; +import {MockERC20_6} from "./mocks/MockERC20_6.sol"; + +/// @notice Shared kernel fixture: token, kernel behind a Transparent proxy, actors, job helpers. +abstract contract KernelBase is Test { + AgenticCommerce internal kernel; + AgenticCommerce internal kernelImpl; + MockERC20_6 internal token; + + address internal kernelProxyAdminOwner = makeAddr("kernelProxyAdminOwner"); + address internal admin = makeAddr("admin"); + address internal treasury = makeAddr("treasury"); + address internal client = makeAddr("client"); + address internal provider = makeAddr("provider"); + address internal evaluator = makeAddr("evaluator"); + address internal stranger = makeAddr("stranger"); + + uint256 internal constant BUDGET = 100e6; + uint256 internal constant EXPIRY_OFFSET = 1 days; + + function setUp() public virtual { + vm.warp(1_700_000_000); + token = new MockERC20_6("Push USDC", "pUSDC"); + kernelImpl = new AgenticCommerce(); + kernel = AgenticCommerce(_deployKernelProxy(address(kernelImpl), address(token), treasury, admin)); + + token.mint(client, 1e15); + vm.prank(client); + token.approve(address(kernel), type(uint256).max); + } + + function _deployKernelProxy(address impl, address token_, address treasury_, address admin_) + internal + returns (address) + { + bytes memory initData = abi.encodeCall(AgenticCommerce.initialize, (token_, treasury_, admin_)); + return address(new TransparentUpgradeableProxy(impl, kernelProxyAdminOwner, initData)); + } + + function _proxyAdmin(address proxy) internal view returns (address) { + return address(uint160(uint256(vm.load(proxy, ERC1967Utils.ADMIN_SLOT)))); + } + + // ───────────── job helpers ───────────── + + function _expiry() internal view returns (uint256) { + return block.timestamp + EXPIRY_OFFSET; + } + + function _create(address hook) internal returns (uint256 jobId) { + vm.prank(client); + jobId = kernel.createJob(provider, evaluator, _expiry(), "job", hook); + } + + function _createNoProvider(address hook) internal returns (uint256 jobId) { + vm.prank(client); + jobId = kernel.createJob(address(0), evaluator, _expiry(), "job", hook); + } + + function _budgeted(address hook, uint256 amount) internal returns (uint256 jobId) { + jobId = _create(hook); + vm.prank(provider); + kernel.setBudget(jobId, amount, ""); + } + + function _funded(address hook, uint256 amount) internal returns (uint256 jobId) { + jobId = _budgeted(hook, amount); + vm.prank(client); + kernel.fund(jobId, amount, ""); + } + + function _submitted(address hook, uint256 amount) internal returns (uint256 jobId) { + jobId = _funded(hook, amount); + vm.prank(provider); + kernel.submit(jobId, keccak256("deliverable"), ""); + } + + function _status(uint256 jobId) internal view returns (IAgenticCommerce.JobStatus) { + return kernel.getJob(jobId).status; + } + + function _pause() internal { + vm.prank(admin); + kernel.pause(); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/Naming.t.sol b/plan/marketplace/contracts/test/8183-tests/Naming.t.sol new file mode 100644 index 00000000..7ed3693b --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/Naming.t.sol @@ -0,0 +1,212 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {Test} from "forge-std/Test.sol"; +import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; + +import {RulesBindingHook} from "../../src/agentic-commerce-8183/hooks/RulesBindingHook.sol"; +import {UniversalMarketplaceRules} from "../../src/agentic-commerce-8183/UniversalMarketplaceRules.sol"; +import {IUniversalMarketplace} from "../../src/agentic-commerce-8183/interfaces/IUniversalMarketplace.sol"; +import {IUniversalMarketplaceRules} from "../../src/agentic-commerce-8183/interfaces/IUniversalMarketplaceRules.sol"; +import { + UniversalMarketplaceErrors, + RulesBindingHookErrors, + ERC8183HookErrors +} from "../../src/agentic-commerce-8183/libraries/Errors.sol"; +import {MARKER_WALLET, MARKER_PRINCIPAL} from "../../src/agentic-commerce-8183/libraries/Types.sol"; + +/// @notice TEST ONLY: exposes the rules helper's ERC-20 selector constants. +contract RulesSelectorsHarness is UniversalMarketplaceRules { + function selectors() external pure returns (bytes4, bytes4, bytes4, bytes4) { + return (ERC20_TRANSFER, ERC20_APPROVE, ERC20_TRANSFER_FROM, ERC20_INCREASE_ALLOWANCE); + } +} + +/// @title Naming — the marketplace's v2 surface (PRD 12 §3, §6.8), pinned against LITERAL signatures. +/// @notice A rename that drifts from the PRD, or a type change that moved a selector, fails here. +contract NamingTest is Test { + // The struct tuples, spelled out: a field change moves every selector that takes one. + string internal constant AGENT_CARD = + "(address,bytes32,string,bytes32,string,uint256,address,uint256,uint256,uint32,uint32,uint32,uint32,bool)"; + string internal constant JOB_INPUTS = "(uint256,uint48,uint48,int256[])"; + string internal constant OWNER_INTENT = + "(address,address,address,uint96,bytes32,bytes32,bytes32,uint192,uint64,uint64,uint48,uint256)"; + string internal constant SESSION = + "(address,bytes,bytes32,(address,bytes)[],((bytes32,string[])[],(address,bytes)[]),(bytes4,address,(address,bytes)[])[],bool)"; + string internal constant SESSION_CONTEXT = "(address,bytes32,uint256,uint48,address)"; + + function _sel(string memory sig) internal pure returns (bytes4) { + return bytes4(keccak256(bytes(sig))); + } + + function test_naming_marketplaceFunctions() public pure { + assertEq( + IUniversalMarketplace.openJob.selector, + _sel( + string.concat( + "openJob((uint256,uint256,", JOB_INPUTS, ",", SESSION, ",", OWNER_INTENT, ",bytes,string))" + ) + ) + ); + assertEq( + IUniversalMarketplace.registerAgentCard.selector, + _sel(string.concat("registerAgentCard(", AGENT_CARD, ",bytes,bytes)")) + ); + assertEq( + IUniversalMarketplace.updateAgentCard.selector, + _sel(string.concat("updateAgentCard(uint256,", AGENT_CARD, ",bytes,bytes)")) + ); + assertEq(IUniversalMarketplace.setAgentCardActive.selector, _sel("setAgentCardActive(uint256,bool)")); + assertEq(IUniversalMarketplace.disableAgentCard.selector, _sel("disableAgentCard(uint256)")); + assertEq(IUniversalMarketplace.getAgentCard.selector, _sel("getAgentCard(uint256)")); + assertEq(IUniversalMarketplace.isAgentCardVerified.selector, _sel("isAgentCardVerified(uint256)")); + assertEq(IUniversalMarketplace.isAgentCardDisabled.selector, _sel("isAgentCardDisabled(uint256)")); + assertEq(IUniversalMarketplace.agentCardVersion.selector, _sel("agentCardVersion(uint256)")); + assertEq(IUniversalMarketplace.agentCardCount.selector, _sel("agentCardCount()")); + assertEq(IUniversalMarketplace.agentCardOf.selector, _sel("agentCardOf(address)")); + assertEq(IUniversalMarketplace.activeJobOf.selector, _sel("activeJobOf(address)")); + assertEq(IUniversalMarketplace.computeCEA.selector, _sel("computeCEA(address,bytes32)")); + assertEq(IUniversalMarketplace.cardVersionOfJob.selector, _sel("cardVersionOfJob(uint256)")); + assertEq(IUniversalMarketplace.getAgentRating.selector, _sel("getAgentRating(address)")); + assertEq(IUniversalMarketplace.setAgentRating.selector, _sel("setAgentRating(address,uint256)")); + assertEq(IUniversalMarketplace.RULES.selector, _sel("RULES()")); + assertEq(IUniversalMarketplace.PUSH_CHAIN_HASH.selector, _sel("PUSH_CHAIN_HASH()")); + assertEq(IUniversalMarketplace.version.selector, _sel("version()")); + assertEq(IUniversalMarketplace.AGW_FACTORY.selector, _sel("AGW_FACTORY()")); + assertEq(IUniversalMarketplace.KERNEL.selector, _sel("KERNEL()")); + assertEq( + IUniversalMarketplace.previewIntent.selector, + _sel( + string.concat( + "previewIntent((uint256,address,uint96,", JOB_INPUTS, ",uint48,uint256),", SESSION, ")" + ) + ) + ); + assertEq( + IUniversalMarketplaceRules.validateAgentCardRules.selector, _sel("validateAgentCardRules(bytes)") + ); + assertEq( + IUniversalMarketplaceRules.checkRulesMatchCard.selector, + _sel(string.concat("checkRulesMatchCard(bytes,", SESSION, ",", SESSION_CONTEXT, ")")) + ); + } + + function test_naming_marketplaceEvents() public pure { + assertEq( + IUniversalMarketplace.AgentCardRegistered.selector, + keccak256("AgentCardRegistered(uint256,address,bytes32,string,bytes32,bytes32,bytes32,uint256)") + ); + assertEq( + IUniversalMarketplace.AgentCardUpdated.selector, + keccak256("AgentCardUpdated(uint256,uint256,bytes32,bytes32,bytes32,uint256)") + ); + assertEq(IUniversalMarketplace.AgentCardStatusChanged.selector, keccak256("AgentCardStatusChanged(uint256,bool)")); + assertEq(IUniversalMarketplace.AgentCardDisabled.selector, keccak256("AgentCardDisabled(uint256)")); + assertEq(IUniversalMarketplace.AgentCardVerified.selector, keccak256("AgentCardVerified(uint256,uint256)")); + assertEq( + IUniversalMarketplace.AgentCardVerificationRevoked.selector, keccak256("AgentCardVerificationRevoked(uint256)") + ); + assertEq(IUniversalMarketplace.AgentRatingSet.selector, keccak256("AgentRatingSet(address,uint256)")); + assertEq(IUniversalMarketplace.HookUpdated.selector, keccak256("HookUpdated(address)")); + assertEq(IUniversalMarketplace.EvaluatorUpdated.selector, keccak256("EvaluatorUpdated(address)")); + assertEq( + IUniversalMarketplace.CEADeploymentSet.selector, keccak256("CEADeploymentSet(bytes32,address,address)") + ); + assertEq( + IUniversalMarketplace.JobOpened.selector, + keccak256("JobOpened(uint256,address,address,uint256,bytes32,uint256,uint256)") + ); + } + + function test_naming_hookTopicsAndErrors() public pure { + assertEq(RulesBindingHook.RulesBound.selector, keccak256("RulesBound(uint256,address,bytes32)")); + assertEq(RulesBindingHookErrors.RulesNotLive.selector, bytes4(keccak256("RulesNotLive(address,bytes32)"))); + assertEq(RulesBindingHookErrors.CallerIsNotAGW.selector, bytes4(keccak256("CallerIsNotAGW(address)"))); + assertEq(RulesBindingHookErrors.AGWHasLiveJob.selector, bytes4(keccak256("AGWHasLiveJob(address,uint256)"))); + assertEq(ERC8183HookErrors.CallerIsNotKernel.selector, bytes4(keccak256("CallerIsNotKernel(address)"))); + } + + function test_naming_marketplaceErrors() public pure { + assertEq(UniversalMarketplaceErrors.CallerIsNotProvider.selector, _sel("CallerIsNotProvider()")); + assertEq(UniversalMarketplaceErrors.ZeroAddress.selector, _sel("ZeroAddress()")); + assertEq(UniversalMarketplaceErrors.FillOutOfBounds.selector, _sel("FillOutOfBounds(uint256,uint256)")); + // renamed + assertEq(UniversalMarketplaceErrors.AgentCardInactive.selector, _sel("AgentCardInactive()")); + assertEq(UniversalMarketplaceErrors.AgentCardDisabled.selector, _sel("AgentCardDisabled(uint256)")); + assertEq(UniversalMarketplaceErrors.InvalidAgentCard.selector, _sel("InvalidAgentCard(string)")); + assertEq( + UniversalMarketplaceErrors.AgentCardVersionMismatch.selector, + _sel("AgentCardVersionMismatch(uint256,uint256)") + ); + assertEq(UniversalMarketplaceErrors.AgentCardIdentityImmutable.selector, _sel("AgentCardIdentityImmutable()")); + assertEq(UniversalMarketplaceErrors.WalletHasActiveJob.selector, _sel("WalletHasActiveJob(address,uint256)")); + assertEq(UniversalMarketplaceErrors.PrincipalCapMismatch.selector, _sel("PrincipalCapMismatch()")); + assertEq(UniversalMarketplaceErrors.GasCapMismatch.selector, _sel("GasCapMismatch()")); + assertEq(UniversalMarketplaceErrors.AssetMismatch.selector, _sel("AssetMismatch(uint256)")); + // new + assertEq( + UniversalMarketplaceErrors.AgentCardAlreadyRegistered.selector, _sel("AgentCardAlreadyRegistered(address)") + ); + assertEq(UniversalMarketplaceErrors.EnvelopeVersionMismatch.selector, _sel("EnvelopeVersionMismatch(uint256)")); + assertEq( + UniversalMarketplaceErrors.AssetCountMismatch.selector, _sel("AssetCountMismatch(uint256,uint256)") + ); + assertEq(UniversalMarketplaceErrors.PinMismatch.selector, _sel("PinMismatch(uint256,uint256)")); + } + + function test_naming_hookViews() public { + address kernel = makeAddr("kernel"); + address factory = makeAddr("factory"); + address engine = makeAddr("engine"); + RulesBindingHook hook = RulesBindingHook( + address( + new TransparentUpgradeableProxy( + address(new RulesBindingHook()), + makeAddr("hookAdmin"), + abi.encodeCall(RulesBindingHook.initialize, (kernel, factory, engine)) + ) + ) + ); + assertEq(hook.rulesOfJob.selector, _sel("rulesOfJob(uint256)")); + assertEq(hook.agwOfJob.selector, _sel("agwOfJob(uint256)")); + assertEq(hook.activeJobOf.selector, _sel("activeJobOf(address)")); + assertEq(hook.AGW_FACTORY.selector, _sel("AGW_FACTORY()")); + assertEq(hook.SESSION_ENGINE.selector, _sel("SESSION_ENGINE()")); + assertEq(hook.KERNEL.selector, _sel("KERNEL()")); + assertEq(hook.KERNEL(), kernel); + assertEq(hook.AGW_FACTORY(), factory); + assertEq(hook.SESSION_ENGINE(), engine); + assertEq(hook.rulesOfJob(1), bytes32(0)); + assertEq(hook.agwOfJob(1), address(0)); + } + + function test_naming_derivedErc20Selectors() public { + (bytes4 transfer, bytes4 approve, bytes4 transferFrom, bytes4 increaseAllowance) = + new RulesSelectorsHarness().selectors(); + assertEq(transfer, bytes4(0xa9059cbb)); + assertEq(approve, bytes4(0x095ea7b3)); + assertEq(transferFrom, bytes4(0x23b872dd)); + assertEq(increaseAllowance, bytes4(0x39509351)); + } + + function test_naming_markers() public pure { + assertEq(MARKER_WALLET, keccak256("push.marketplace.marker.WALLET")); + assertEq(MARKER_PRINCIPAL, keccak256("push.marketplace.marker.PRINCIPAL")); + // non-zero high 96 bits: neither marker is a clean address word, so neither can pass as a spender pin + assertGt(uint256(MARKER_WALLET) >> 160, 0); + assertGt(uint256(MARKER_PRINCIPAL) >> 160, 0); + } + + function test_naming_noMandateInABIs() public view { + string[3] memory artifacts = [ + "out/UniversalMarketplace.sol/UniversalMarketplace.json", + "out/UniversalMarketplaceRules.sol/UniversalMarketplaceRules.json", + "out/RulesBindingHook.sol/RulesBindingHook.json" + ]; + for (uint256 i; i < artifacts.length; ++i) { + string memory abiSection = vm.split(vm.readFile(artifacts[i]), '"bytecode"')[0]; + assertEq(vm.indexOf(abiSection, "andate"), type(uint256).max, artifacts[i]); + assertEq(vm.indexOf(abiSection, "permissionId"), type(uint256).max, artifacts[i]); + } + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/RulesBindingHook.fork.t.sol b/plan/marketplace/contracts/test/8183-tests/RulesBindingHook.fork.t.sol new file mode 100644 index 00000000..397400e6 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/RulesBindingHook.fork.t.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {Test} from "forge-std/Test.sol"; + +import {IAGWFactory} from "../../src/agentic-commerce-8183/interfaces/external/IAGWFactory.sol"; +import {ISmartSession} from "../../src/agentic-commerce-8183/interfaces/external/ISmartSession.sol"; + +/// @notice The v6 factory's owner-door deploy, which IAGWFactory does not mirror (the marketplace never calls it). +interface IAGWFactoryDeploy { + function deployWallet(string calldata label) external returns (address wallet); +} + +/// @notice Pins the AGW interfaces against the live Donut AGW v6 deployment. +/// @dev - Skips unless PUSH_CHAIN_TESTNET_RPC_URL is set (forge also reads it from `.env`); no default RPC. +/// - Forks `FORK_BLOCK` if set, else the latest block (the public Donut RPC is not archival). The block used is +/// logged. +/// - A wrong ABI reverts or decodes garbage, so passing calls pin it. The wallet is deployed on the fork, so the +/// test needs no pre-existing wallet. +contract RulesBindingHookForkTest is Test { + address internal constant FACTORY = 0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc; + address internal constant ENGINE = 0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d; + + function test_fork_mirrorsMatchDeployedAGW() public { + string memory url = vm.envOr("PUSH_CHAIN_TESTNET_RPC_URL", string("")); + if (bytes(url).length == 0) { + vm.skip(true); + return; + } + uint256 blk = vm.envOr("FORK_BLOCK", uint256(0)); + if (blk == 0) vm.createSelectFork(url); + else vm.createSelectFork(url, blk); + emit log_named_uint("fork block", block.number); + + address eoa = makeAddr("forkWalletOwner"); + vm.prank(eoa); + address w = IAGWFactoryDeploy(FACTORY).deployWallet(""); + assertTrue(IAGWFactory(FACTORY).isWallet(w), "a freshly deployed wallet is an AGW"); + assertEq(IAGWFactory(FACTORY).ownerOf(w), eoa); + assertFalse(IAGWFactory(FACTORY).isWallet(makeAddr("nobody")), "random address is not"); + assertFalse(ISmartSession(ENGINE).isPermissionEnabled(bytes32(uint256(1)), w), "unknown id is not enabled"); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/RulesBindingHook.t.sol b/plan/marketplace/contracts/test/8183-tests/RulesBindingHook.t.sol new file mode 100644 index 00000000..8e43e242 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/RulesBindingHook.t.sol @@ -0,0 +1,438 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {RulesBindingHookErrors, ERC8183HookErrors} from "../../src/agentic-commerce-8183/libraries/Errors.sol"; +import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import {ITransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; +import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; +import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import {IERC20Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.sol"; + +import {IAgenticCommerce} from "../../src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol"; +import {RulesBindingHook} from "../../src/agentic-commerce-8183/hooks/RulesBindingHook.sol"; +import {KernelBase} from "./KernelBase.t.sol"; +import {MockAGWFactory} from "./mocks/MockAGWFactory.sol"; +import {MockSmartSession} from "./mocks/MockSmartSession.sol"; +import {RecordingHook} from "./mocks/RecordingHook.sol"; + +/// @notice Phase 5 — mandate binding and one live job per AGW, driven through the real kernel. +contract RulesBindingHookTest is KernelBase { + RulesBindingHook internal hook; + RulesBindingHook internal hookImpl; + MockAGWFactory internal factory; + MockSmartSession internal engine; + address internal hookProxyAdminOwner = makeAddr("hookProxyAdminOwner"); + + /// @dev `client` from KernelBase acts as the AGW. + address internal agw; + bytes32 internal constant P = keccak256("mandate-1"); + bytes32 internal constant P2 = keccak256("mandate-2"); + + function setUp() public override { + super.setUp(); + agw = client; + factory = new MockAGWFactory(); + engine = new MockSmartSession(); + hookImpl = new RulesBindingHook(); + hook = RulesBindingHook(_deployHook(address(kernel), address(factory), address(engine))); + vm.prank(admin); + kernel.setHookWhitelist(address(hook), true); + + factory.setWallet(agw, true); + engine.setPermission(P, agw, true); + } + + function _deployHook(address k, address f, address e) internal returns (address) { + return address( + new TransparentUpgradeableProxy( + address(hookImpl), hookProxyAdminOwner, abi.encodeCall(RulesBindingHook.initialize, (k, f, e)) + ) + ); + } + + /// @dev Job by `cl`, budgeted, ready to fund. + function _open(address cl, uint256 amount) internal returns (uint256 jobId) { + vm.prank(cl); + jobId = kernel.createJob(provider, evaluator, _expiry(), "", address(hook)); + vm.prank(provider); + kernel.setBudget(jobId, amount, ""); + } + + function _bind(address cl, bytes32 pid, uint256 amount) internal returns (uint256 jobId) { + jobId = _open(cl, amount); + vm.prank(cl); + kernel.fund(jobId, amount, abi.encode(pid)); + } + + function _assertStillOpenAndUnbound(uint256 jobId, uint256 clientBalBefore) internal view { + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Open)); + assertEq(token.balanceOf(agw), clientBalBefore); + address a = hook.agwOfJob(jobId); + assertEq(a, address(0)); + } + + // ═════════════════════════ happy path ═════════════════════════ + + function test_fund_bindsRules() public { + uint256 jobId = _open(agw, BUDGET); + vm.expectEmit(address(hook)); + emit RulesBindingHook.RulesBound(jobId, agw, P); + vm.prank(agw); + kernel.fund(jobId, BUDGET, abi.encode(P)); + + (address a, bytes32 pid) = (hook.agwOfJob(jobId), hook.rulesOfJob(jobId)); + assertEq(a, agw); + assertEq(pid, P); + assertEq(hook.activeJobOf(agw), jobId); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Funded)); + } + + function test_zeroBudgetJob_bindsNormally() public { + uint256 jobId = _bind(agw, P, 0); + assertEq(hook.activeJobOf(agw), jobId); + } + + // ═════════════════════════ check 1 · optParams length ═════════════════════════ + + function test_invalidOptParams_lengths() public { + uint256[4] memory lens = [uint256(0), 31, 33, 64]; + for (uint256 i = 0; i < lens.length; i++) { + uint256 jobId = _open(agw, BUDGET); + uint256 bal = token.balanceOf(agw); + vm.prank(agw); + vm.expectRevert(abi.encodeWithSelector(RulesBindingHookErrors.InvalidOptParams.selector, lens[i])); + kernel.fund(jobId, BUDGET, new bytes(lens[i])); + _assertStillOpenAndUnbound(jobId, bal); + } + } + + // ═════════════════════════ check 2 · client is an AGW ═════════════════════════ + + function test_notAnAGW_eoaClient() public { + address eoa = makeAddr("eoaClient"); + engine.setPermission(P, eoa, true); + uint256 jobId = _open(eoa, BUDGET); + vm.prank(eoa); + vm.expectRevert(abi.encodeWithSelector(RulesBindingHookErrors.CallerIsNotAGW.selector, eoa)); + kernel.fund(jobId, BUDGET, abi.encode(P)); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Open)); + } + + function test_notAnAGW_contractClient() public { + address c = address(new MockSmartSession()); + uint256 jobId = _open(c, BUDGET); + uint256 bal = token.balanceOf(c); + vm.prank(c); + vm.expectRevert(abi.encodeWithSelector(RulesBindingHookErrors.CallerIsNotAGW.selector, c)); + kernel.fund(jobId, BUDGET, abi.encode(P)); + assertEq(token.balanceOf(c), bal); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Open)); + address a = hook.agwOfJob(jobId); + assertEq(a, address(0)); + } + + // ═════════════════════════ check 3 · mandate live ═════════════════════════ + + function test_rulesNotLive_neverGranted() public { + uint256 jobId = _open(agw, BUDGET); + uint256 bal = token.balanceOf(agw); + vm.prank(agw); + vm.expectRevert(abi.encodeWithSelector(RulesBindingHookErrors.RulesNotLive.selector, agw, P2)); + kernel.fund(jobId, BUDGET, abi.encode(P2)); + _assertStillOpenAndUnbound(jobId, bal); + } + + function test_rulesNotLive_revoked() public { + engine.setPermission(P, agw, false); + uint256 jobId = _open(agw, BUDGET); + uint256 bal = token.balanceOf(agw); + vm.prank(agw); + vm.expectRevert(abi.encodeWithSelector(RulesBindingHookErrors.RulesNotLive.selector, agw, P)); + kernel.fund(jobId, BUDGET, abi.encode(P)); + _assertStillOpenAndUnbound(jobId, bal); + } + + function test_rulesOfAnotherWallet_notLiveHere() public { + address other = makeAddr("otherAGW"); + factory.setWallet(other, true); + engine.setPermission(P2, other, true); // P2 live on `other`, not on `agw` + uint256 jobId = _open(agw, BUDGET); + uint256 bal = token.balanceOf(agw); + vm.prank(agw); + vm.expectRevert(abi.encodeWithSelector(RulesBindingHookErrors.RulesNotLive.selector, agw, P2)); + kernel.fund(jobId, BUDGET, abi.encode(P2)); + _assertStillOpenAndUnbound(jobId, bal); + } + + // ═════════════════════════ check 4 · one live job per AGW ═════════════════════════ + + function test_secondJob_whileFirstFunded_reverts() public { + uint256 first = _bind(agw, P, BUDGET); + uint256 second = _open(agw, BUDGET); + uint256 bal = token.balanceOf(agw); + vm.prank(agw); + vm.expectRevert(abi.encodeWithSelector(RulesBindingHookErrors.AGWHasLiveJob.selector, agw, first)); + kernel.fund(second, BUDGET, abi.encode(P)); + _assertStillOpenAndUnbound(second, bal); + } + + function test_secondJob_whileFirstSubmitted_reverts() public { + uint256 first = _bind(agw, P, BUDGET); + vm.prank(provider); + kernel.submit(first, bytes32(0), ""); + assertEq(hook.activeJobOf(agw), first); + uint256 second = _open(agw, BUDGET); + uint256 bal = token.balanceOf(agw); + vm.prank(agw); + vm.expectRevert(abi.encodeWithSelector(RulesBindingHookErrors.AGWHasLiveJob.selector, agw, first)); + kernel.fund(second, BUDGET, abi.encode(P)); + _assertStillOpenAndUnbound(second, bal); + } + + // ═════════════════════════ freeing the AGW — every path ═════════════════════════ + + function _assertSecondJobFunds() internal { + assertEq(hook.activeJobOf(agw), 0); + uint256 second = _bind(agw, P, BUDGET); + assertEq(hook.activeJobOf(agw), second); + } + + function test_freed_afterComplete() public { + uint256 first = _bind(agw, P, BUDGET); + vm.prank(provider); + kernel.submit(first, bytes32(0), ""); + vm.prank(evaluator); + kernel.complete(first, bytes32(0), ""); + _assertSecondJobFunds(); + } + + function test_freed_afterReject() public { + uint256 first = _bind(agw, P, BUDGET); + vm.prank(evaluator); + kernel.reject(first, bytes32(0), ""); + _assertSecondJobFunds(); + } + + function test_freed_afterClaimRefund_unhooked() public { + uint256 first = _bind(agw, P, BUDGET); + vm.warp(block.timestamp + EXPIRY_OFFSET); + kernel.claimRefund(first); + _assertSecondJobFunds(); + } + + function test_freed_afterDetachThenRefund() public { + uint256 first = _bind(agw, P, BUDGET); + uint256[] memory ids = new uint256[](1); + ids[0] = first; + vm.prank(admin); + kernel.batchDetachHook(ids); + assertTrue(hook.activeJobOf(agw) != 0, "detach alone does not end the job"); + vm.warp(block.timestamp + EXPIRY_OFFSET); + kernel.claimRefund(first); + _assertSecondJobFunds(); + } + + // ═════════════════════════ isolation ═════════════════════════ + + function test_twoAGWs_eachHoldALiveJob() public { + address agw2 = makeAddr("agw2"); + factory.setWallet(agw2, true); + engine.setPermission(P2, agw2, true); + token.mint(agw2, 1e12); + vm.prank(agw2); + token.approve(address(kernel), type(uint256).max); + + uint256 a = _bind(agw, P, BUDGET); + uint256 b = _bind(agw2, P2, BUDGET); + assertEq(hook.activeJobOf(agw), a); + assertEq(hook.activeJobOf(agw2), b); + } + + function test_samePermissionId_differentAGWs_bindIndependently() public { + address agw2 = makeAddr("agw2"); + factory.setWallet(agw2, true); + engine.setPermission(P, agw2, true); // same id, different wallet + token.mint(agw2, 1e12); + vm.prank(agw2); + token.approve(address(kernel), type(uint256).max); + + uint256 a = _bind(agw, P, BUDGET); + uint256 b = _bind(agw2, P, BUDGET); + (address wa, bytes32 pa) = (hook.agwOfJob(a), hook.rulesOfJob(a)); + (address wb, bytes32 pb) = (hook.agwOfJob(b), hook.rulesOfJob(b)); + assertEq(wa, agw); + assertEq(wb, agw2); + assertEq(pa, P); + assertEq(pb, P); + } + + function test_sameRules_sequentialJobs_allowed() public { + uint256 first = _bind(agw, P, BUDGET); + vm.prank(evaluator); + kernel.reject(first, bytes32(0), ""); + uint256 second = _bind(agw, P, BUDGET); + bytes32 pid = hook.rulesOfJob(second); + assertEq(pid, P); + } + + // ═════════════════════════ caller auth ═════════════════════════ + + function test_beforeAction_directCall_reverts() public { + vm.prank(stranger); + vm.expectRevert(abi.encodeWithSelector(ERC8183HookErrors.CallerIsNotKernel.selector, stranger)); + hook.beforeAction(1, IAgenticCommerce.fund.selector, abi.encode(agw, abi.encode(P))); + } + + function test_afterAction_directCall_reverts() public { + vm.prank(stranger); + vm.expectRevert(abi.encodeWithSelector(ERC8183HookErrors.CallerIsNotKernel.selector, stranger)); + hook.afterAction(1, IAgenticCommerce.fund.selector, ""); + } + + // ═════════════════════════ no desync ═════════════════════════ + + /// @dev `_preFund` runs, then the kernel's transfer fails — the binding must roll back with it. + /// Asserted on state: a reverted call has no on-chain logs (Foundry's recorder keeps them anyway). + function test_transferFailsAfterHook_rollsBackBinding() public { + address agw3 = makeAddr("agw3-noAllowance"); + factory.setWallet(agw3, true); + engine.setPermission(P, agw3, true); + token.mint(agw3, 1e12); // funds but no approval + uint256 jobId = _open(agw3, BUDGET); + + vm.prank(agw3); + vm.expectRevert( + abi.encodeWithSelector(IERC20Errors.ERC20InsufficientAllowance.selector, address(kernel), 0, BUDGET) + ); + kernel.fund(jobId, BUDGET, abi.encode(P)); + + address a = hook.agwOfJob(jobId); + assertEq(a, address(0)); + assertEq(hook.activeJobOf(agw3), 0); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Open)); + } + + // ═════════════════════════ initialisation ═════════════════════════ + + function test_initialize_setsState() public view { + assertEq(hook.KERNEL(), address(kernel)); + assertEq(hook.AGW_FACTORY(), address(factory)); + assertEq(hook.SESSION_ENGINE(), address(engine)); + } + + function test_initialize_zeroKernel_reverts() public { + vm.expectRevert(ERC8183HookErrors.ZeroAddress.selector); + _deployHook(address(0), address(factory), address(engine)); + } + + function test_initialize_zeroFactory_reverts() public { + vm.expectRevert(ERC8183HookErrors.ZeroAddress.selector); + _deployHook(address(kernel), address(0), address(engine)); + } + + function test_initialize_zeroEngine_reverts() public { + vm.expectRevert(ERC8183HookErrors.ZeroAddress.selector); + _deployHook(address(kernel), address(factory), address(0)); + } + + function test_initialize_twice_reverts() public { + vm.expectRevert(Initializable.InvalidInitialization.selector); + hook.initialize(address(kernel), address(factory), address(engine)); + } + + // ═════════════════════════ views ═════════════════════════ + + function test_activeJobOf_neverSeen_zero() public { + assertEq(hook.activeJobOf(makeAddr("never")), 0); + } + + function test_activeJobOf_returnsId() public { + assertEq(hook.activeJobOf(agw), 0, "before fund"); + uint256 jobId = _bind(agw, P, BUDGET); + assertEq(hook.activeJobOf(agw), jobId, "Funded"); + vm.prank(provider); + kernel.submit(jobId, bytes32(0), ""); + assertEq(hook.activeJobOf(agw), jobId, "Submitted"); + vm.prank(evaluator); + kernel.complete(jobId, bytes32(0), ""); + assertEq(hook.activeJobOf(agw), 0, "after complete"); + assertEq(hook.rulesOfJob(jobId), P, "the binding outlives the job"); + assertEq(hook.agwOfJob(jobId), agw); + } + + // ═════════════════════════ scope of the rule (D-25) ═════════════════════════ + + function test_scope_hooklessJob_fundsWhileBusy() public { + _bind(agw, P, BUDGET); + assertTrue(hook.activeJobOf(agw) != 0); + uint256 plain = _budgeted(address(0), BUDGET); // `client` == agw + vm.prank(agw); + kernel.fund(plain, BUDGET, ""); + assertEq(uint8(_status(plain)), uint8(IAgenticCommerce.JobStatus.Funded)); + } + + function test_scope_otherHookJob_doesNotTouchThisHook() public { + RecordingHook other = new RecordingHook(); + vm.prank(admin); + kernel.setHookWhitelist(address(other), true); + uint256 jobId = _budgeted(address(other), BUDGET); + vm.prank(agw); + kernel.fund(jobId, BUDGET, abi.encode(P)); + assertEq(hook.activeJobOf(agw), 0); + address a = hook.agwOfJob(jobId); + assertEq(a, address(0)); + } + + // ═════════════════════════ upgrade + layout ═════════════════════════ + + function test_upgrade_preservesBindingAndBlock() public { + uint256 first = _bind(agw, P, BUDGET); + ProxyAdmin pa = ProxyAdmin(_proxyAdmin(address(hook))); + assertEq(pa.owner(), hookProxyAdminOwner); + address newImpl = address(new RulesBindingHook()); + vm.prank(hookProxyAdminOwner); + pa.upgradeAndCall(ITransparentUpgradeableProxy(address(hook)), newImpl, ""); + + (address a, bytes32 pid) = (hook.agwOfJob(first), hook.rulesOfJob(first)); + assertEq(a, agw); + assertEq(pid, P); + assertEq(hook.activeJobOf(agw), first); + + uint256 second = _open(agw, BUDGET); + vm.prank(agw); + vm.expectRevert(abi.encodeWithSelector(RulesBindingHookErrors.AGWHasLiveJob.selector, agw, first)); + kernel.fund(second, BUDGET, abi.encode(P)); + } + + function test_upgrade_byNonOwner_reverts() public { + ProxyAdmin pa = ProxyAdmin(_proxyAdmin(address(hook))); + address impl = address(new RulesBindingHook()); + vm.prank(admin); + vm.expectRevert(abi.encodeWithSelector(Ownable.OwnableUnauthorizedAccount.selector, admin)); + pa.upgradeAndCall(ITransparentUpgradeableProxy(address(hook)), impl, ""); + } + + function test_storageLayout_bySlot() public { + uint256 jobId = _bind(agw, P, BUDGET); + address h = address(hook); + assertEq(address(uint160(uint256(vm.load(h, bytes32(uint256(0)))))), address(kernel)); + for (uint256 i = 1; i <= 49; i++) { + assertEq(vm.load(h, bytes32(i)), bytes32(0), "base gap"); + } + assertEq(address(uint160(uint256(vm.load(h, bytes32(uint256(50)))))), address(factory)); + assertEq(address(uint160(uint256(vm.load(h, bytes32(uint256(51)))))), address(engine)); + + bytes32 b = keccak256(abi.encode(jobId, uint256(52))); + assertEq(address(uint160(uint256(vm.load(h, b)))), agw); + assertEq(vm.load(h, bytes32(uint256(b) + 1)), P); + + // slots 52 / 53 unchanged: `_bindingOf` (was `rulesOf`), `_liveJobOf` (was `liveJobOf`) + bytes32 l = keccak256(abi.encode(agw, uint256(53))); + assertEq(uint256(vm.load(h, l)), jobId); + + for (uint256 i = 54; i <= 103; i++) { + assertEq(vm.load(h, bytes32(i)), bytes32(0), "hook gap"); + } + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/UniversalMarketplace.conformance.t.sol b/plan/marketplace/contracts/test/8183-tests/UniversalMarketplace.conformance.t.sol new file mode 100644 index 00000000..fe4da737 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/UniversalMarketplace.conformance.t.sol @@ -0,0 +1,284 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { + Evaluation, + Operation, + LogicKind, + Logic, + AllowedMutability, + Read, + Check, + JobSpec, + T_UINT, + T_ADDRESS, + T_TUPLE +} from "../../src/agentic-commerce-8183/libraries/JobSpecTypes.sol"; +import {BuilderFixtures} from "./JobSpecBuilder.t.sol"; +import {V2Decoder} from "./helpers/V2Decoder.sol"; +import {BuildContext, JobSpecTemplate} from "../../src/agentic-commerce-8183/libraries/Types.sol"; + +/// @title UniversalMarketplace — conformance with the Universal Evaluator V2 design (PRD 09 §7.5) +/// @notice What the marketplace builds must be exactly what the V2 doc's examples write by hand, and every read it +/// builds must decode in the V2 evaluator's decoder. +contract UniversalMarketplaceConformanceTest is BuilderFixtures { + V2Decoder internal decoder; + + uint64 internal executeBy; + uint64 internal failFinalAt; + + function setUp() public override { + super.setUp(); + decoder = new V2Decoder(); + executeBy = uint64(block.timestamp + 1 hours); // the doc's times + failFinalAt = uint64(block.timestamp + 2 hours); + } + + // ═════════════════════════════ the doc's specs, built by the marketplace ═════════════════════════════ + + function test_MC01_lendingExample_equalsV2Doc() public view { + JobSpec memory built = _build(_lending(), _docCtx(100e6, _noParams())); + address cea = builder.ceaFor(AGW, ETH_HASH); + + Read[] memory reads = new Read[](2); + reads[0] = _docRead("1", 12, AUSDC_ETH, BALANCE_OF, abi.encode(cea), _docUintOutputs(), _f(0)); + reads[1] = + _docRead("1", 12, AAVE_POOL_ETH, GET_RESERVE_DATA, abi.encode(USDC_ETH), _docReserveOutputs(), _f2(0, 2)); + Check[] memory checks = new Check[](2); + checks[0] = Check({read: 0, evaluation: Evaluation.COMPARE, operation: Operation.GREATER_OR_EQUAL, target: 99.99e6}); + checks[1] = Check({read: 1, evaluation: Evaluation.COMPARE, operation: Operation.GREATER_OR_EQUAL, target: 0.04e27}); + Logic[] memory logic = new Logic[](1); + logic[0] = Logic({kind: LogicKind.ALL, checks: _kids(0, 1), children: new uint8[](0), k: 0}); + + _assertSpecEq(built, _docSpec(reads, checks, logic)); + } + + function test_MC02_swapExample_equalsV2Doc() public view { + JobSpec memory built = _build(_swap(), _docCtx(0, _oneParam(0.38e18))); + address cea = builder.ceaFor(AGW, BASE_HASH); + + Read[] memory reads = new Read[](1); + reads[0] = _docRead("8453", 3, WETH_BASE, BALANCE_OF, abi.encode(cea), _docUintOutputs(), _f(0)); + Check[] memory checks = new Check[](1); + checks[0] = Check({read: 0, evaluation: Evaluation.NUMBER, operation: Operation.GREATER_OR_EQUAL, target: 0.38e18}); + Logic[] memory logic = new Logic[](1); + logic[0] = Logic({kind: LogicKind.ALL, checks: _one(0), children: new uint8[](0), k: 0}); + + _assertSpecEq(built, _docSpec(reads, checks, logic)); + } + + function test_MC03_orAndAtLeastExamples() public view { + address cea = builder.ceaFor(AGW, ETH_HASH); + + // ANY: "Aave or Morpho", spelled out in full in the doc. + JobSpec memory either = _build(_either(), _docCtx(100e6, _noParams())); + Read[] memory reads = new Read[](2); + reads[0] = _docRead("1", 12, AUSDC_ETH, BALANCE_OF, abi.encode(cea), _docUintOutputs(), _f(0)); + reads[1] = _docRead("1", 12, MORPHO_VAULT, MAX_WITHDRAW, abi.encode(cea), _docUintOutputs(), _f(0)); + Check[] memory checks = new Check[](2); + checks[0] = Check({read: 0, evaluation: Evaluation.COMPARE, operation: Operation.GREATER_OR_EQUAL, target: 99.99e6}); + checks[1] = Check({read: 1, evaluation: Evaluation.COMPARE, operation: Operation.GREATER_OR_EQUAL, target: 99.99e6}); + Logic[] memory logic = new Logic[](1); + logic[0] = Logic({kind: LogicKind.ANY, checks: _kids(0, 1), children: new uint8[](0), k: 0}); + _assertSpecEq(either, _docSpec(reads, checks, logic)); + + // Nested: the doc draws the tree only. ANY over two ALL steps: ALL(checks 0, 1) and ALL(checks 2, 3). + JobSpec memory nested = _build(_nested(), _docCtx(100e6, _noParams())); + Logic[] memory tree = new Logic[](3); + tree[0] = Logic({kind: LogicKind.ANY, checks: new uint8[](0), children: _kids(1, 2), k: 0}); + tree[1] = Logic({kind: LogicKind.ALL, checks: _kids(0, 1), children: new uint8[](0), k: 0}); + tree[2] = Logic({kind: LogicKind.ALL, checks: _kids(2, 3), children: new uint8[](0), k: 0}); + _assertLogicEq(nested.logic, tree); + + // AT_LEAST: "at least 2 of 3", each ≥ 99.99 USDC. + JobSpec memory twoOfThree = _build(_twoOfThree(), _docCtx(300e6, _noParams())); + Logic[] memory atLeast = new Logic[](1); + atLeast[0] = Logic({kind: LogicKind.AT_LEAST, checks: _kids3(0, 1, 2), children: new uint8[](0), k: 2}); + for (uint8 i; i < 3; ++i) { + assertEq(twoOfThree.checks[i].target, 99.99e6, "AT_LEAST: target"); + } + _assertLogicEq(twoOfThree.logic, atLeast); + } + + /// @dev The ABI head of a built JobSpec is: reads, checks, logic, allowedMutability, origin, executeBy, + /// failFinalAt. The three arrays are offsets; the four static fields sit in head words 3 to 6. + function test_MC05_fieldOrder() public view { + JobSpecTemplate memory t = _lending(); + t.allowedMutability = AllowedMutability.BOTH; + bytes memory built = builder.build(abi.encode(t), _docCtx(100e6, _noParams())); + JobSpec memory s = abi.decode(built, (JobSpec)); + assertEq(abi.encode(s), built, "round-trips"); + // `built` is abi.encode(spec): word 0 is the tuple's offset (32), the head starts at byte 32. + assertEq(_word(built, 0), 32, "tuple offset"); + assertEq(_word(built, 1 + 3), uint256(AllowedMutability.BOTH), "head 3: allowedMutability"); + assertEq(bytes32(_word(built, 1 + 4)), keccak256("origin"), "head 4: origin"); + assertEq(_word(built, 1 + 5), executeBy, "head 5: executeBy"); + assertEq(_word(built, 1 + 6), failFinalAt, "head 6: failFinalAt"); + assertEq(_word(built, 1 + 0), 7 * 32, "head 0: reads, the first dynamic tail right after the 7-word head"); + assertGt(_word(built, 1 + 1), _word(built, 1 + 0), "head 1: checks after reads"); + assertGt(_word(built, 1 + 2), _word(built, 1 + 1), "head 2: logic after checks"); + } + + function _word(bytes memory b, uint256 i) internal pure returns (uint256 w) { + assembly ("memory-safe") { + w := mload(add(add(b, 0x20), mul(i, 0x20))) + } + } + + // ═════════════════════════════ the reference decoder reads what the builder writes ═════════════════════════════ + + /// @dev Every read the marketplace builds for the doc's examples decodes in the V2 decoder. + function test_MC04_referenceDecoder_agrees() public view { + _assertBuiltReadsDecode(_build(_lending(), _docCtx(100e6, _noParams()))); + _assertBuiltReadsDecode(_build(_swap(), _docCtx(0, _oneParam(0.38e18)))); + _assertBuiltReadsDecode(_build(_either(), _docCtx(100e6, _noParams()))); + _assertBuiltReadsDecode(_build(_twoOfThree(), _docCtx(300e6, _noParams()))); + _assertBuiltReadsDecode(_build(_nested(), _docCtx(100e6, _noParams()))); + } + + // ═════════════════════════════ the doc's spellings ═════════════════════════════ + + /// @dev The doc's times: execute within 1 h, FAIL final 1 h later. + function _docCtx(uint256 principal, int256[] memory params) internal view returns (BuildContext memory ctx) { + ctx = _ctx(principal, params); + // forge-lint: disable-next-line(unsafe-typecast) + ctx.executeBy = uint48(executeBy); // now + 1 h + // forge-lint: disable-next-line(unsafe-typecast) + ctx.settleWindow = uint32(failFinalAt - executeBy); // 1 h + } + + function _docSpec(Read[] memory reads, Check[] memory checks, Logic[] memory logic) + internal + view + returns (JobSpec memory) + { + return JobSpec({ + reads: reads, + checks: checks, + logic: logic, + allowedMutability: AllowedMutability.NONE, + origin: keccak256("origin"), + executeBy: executeBy, + failFinalAt: failFinalAt + }); + } + + function _docRead( + string memory chainId, + uint16 confirmations, + address target, + bytes4 selector, + bytes memory args, + bytes memory outputs, + uint8[] memory field + ) internal pure returns (Read memory) { + return Read({ + chainNamespace: "eip155", + chainId: chainId, + minConfirmations: confirmations, + target: target, + selector: selector, + args: args, + outputs: outputs, + field: field + }); + } + + function _docUintOutputs() internal pure returns (bytes memory) { + return abi.encodePacked(T_TUPLE, uint8(1), T_UINT); + } + + /// @dev Line for line as the doc writes `getReserveData`'s outputs. + function _docReserveOutputs() internal pure returns (bytes memory) { + return bytes.concat( + abi.encodePacked(T_TUPLE, uint8(1)), + abi.encodePacked(T_TUPLE, uint8(15)), + abi.encodePacked(T_TUPLE, uint8(1), T_UINT), + abi.encodePacked(T_UINT), + abi.encodePacked(T_UINT), + abi.encodePacked(T_UINT, T_UINT, T_UINT), + abi.encodePacked(T_UINT, T_UINT), + abi.encodePacked(T_ADDRESS, T_ADDRESS, T_ADDRESS, T_ADDRESS), + abi.encodePacked(T_UINT, T_UINT, T_UINT) + ); + } + + /// @dev ReserveData with field k (k ≥ 1) = 1000 + k; `rate`, when non-zero, replaces currentLiquidityRate. + function _reserveAnswer(uint256 rate) internal pure returns (bytes memory res) { + res = abi.encode(uint256(1)); // configuration: a 1-field struct + for (uint256 k = 1; k < 15; ++k) { + uint256 w = k == 2 && rate != 0 ? rate : 1000 + k; + res = bytes.concat(res, bytes32(w)); + } + } + + // ═════════════════════════════ assertions ═════════════════════════════ + + /// @dev Every built read decodes in the V2 decoder, at a UINT leaf, to the value its answer holds. + function _assertBuiltReadsDecode(JobSpec memory spec) internal view { + for (uint256 i; i < spec.reads.length; ++i) { + Read memory r = spec.reads[i]; + bool isReserve = keccak256(r.outputs) == keccak256(_docReserveOutputs()); + bytes memory res = isReserve ? _reserveAnswer(0.052e27) : abi.encode(uint256(100e6 + i)); + // forge-lint: disable-next-line(unsafe-typecast) + _decodes(r.outputs, r.field, res, isReserve ? int256(0.052e27) : int256(100e6 + i)); // i < 16 + } + } + + function _decodes(bytes memory outputs, uint8[] memory field, bytes memory res, int256 value) internal view { + (bool located, uint8 leaf,) = decoder.locate(outputs, field, res); + assertTrue(located, "decoder: located"); + assertEq(leaf, T_UINT, "decoder: leaf"); + (bool ok, int256 v) = decoder.decodeAnswer(outputs, field, res); + assertTrue(ok, "decoder: ok"); + assertEq(v, value, "decoder: value"); + } + + function _assertSpecEq(JobSpec memory a, JobSpec memory b) internal pure { + assertEq(a.executeBy, b.executeBy, "executeBy"); + assertEq(a.failFinalAt, b.failFinalAt, "failFinalAt"); + assertEq(a.origin, b.origin, "origin"); + assertEq(a.reads.length, b.reads.length, "reads.length"); + for (uint256 i; i < a.reads.length; ++i) { + _assertReadEq(a.reads[i], b.reads[i]); + } + assertEq(a.checks.length, b.checks.length, "checks.length"); + for (uint256 i; i < a.checks.length; ++i) { + assertEq(a.checks[i].read, b.checks[i].read, "check.read"); + assertEq(uint8(a.checks[i].evaluation), uint8(b.checks[i].evaluation), "check.evaluation"); + assertEq(uint8(a.checks[i].operation), uint8(b.checks[i].operation), "check.operation"); + assertEq(a.checks[i].target, b.checks[i].target, "check.target"); + } + _assertLogicEq(a.logic, b.logic); + assertEq(uint8(a.allowedMutability), uint8(b.allowedMutability), "allowedMutability"); + assertEq(abi.encode(a), abi.encode(b), "description bytes"); + } + + function _assertReadEq(Read memory a, Read memory b) internal pure { + assertEq(a.chainNamespace, b.chainNamespace, "read.chainNamespace"); + assertEq(a.chainId, b.chainId, "read.chainId"); + assertEq(a.minConfirmations, b.minConfirmations, "read.minConfirmations"); + assertEq(a.target, b.target, "read.target"); + assertEq(a.selector, b.selector, "read.selector"); + assertEq(a.args, b.args, "read.args"); + assertEq(a.outputs, b.outputs, "read.outputs"); + _assertBytesEq(a.field, b.field, "read.field"); + } + + function _assertLogicEq(Logic[] memory a, Logic[] memory b) internal pure { + assertEq(a.length, b.length, "logic.length"); + for (uint256 i; i < a.length; ++i) { + assertEq(uint8(a[i].kind), uint8(b[i].kind), "logic.kind"); + assertEq(a[i].k, b[i].k, "logic.k"); + _assertBytesEq(a[i].checks, b[i].checks, "logic.checks"); + _assertBytesEq(a[i].children, b[i].children, "logic.children"); + } + } + + function _assertBytesEq(uint8[] memory a, uint8[] memory b, string memory what) internal pure { + assertEq(a.length, b.length, what); + for (uint256 i; i < a.length; ++i) { + assertEq(a[i], b[i], what); + } + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/UniversalMarketplace.fork.t.sol b/plan/marketplace/contracts/test/8183-tests/UniversalMarketplace.fork.t.sol new file mode 100644 index 00000000..b2284156 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/UniversalMarketplace.fork.t.sol @@ -0,0 +1,317 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {Test} from "forge-std/Test.sol"; +import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + +import { + OwnerIntent, + UniversalTerms, + OWNER_INTENT_TYPEHASH, + OWNER_INTENT_DOMAIN_TYPEHASH, + OWNER_INTENT_DOMAIN_NAME_HASH, + OWNER_INTENT_DOMAIN_VERSION_HASH, + SEND_OUTBOUND_SELECTOR +} from "@push-agw/libraries/Types.sol"; +import {TemplateParts} from "./helpers/TemplateParts.sol"; +import {RulesFixtures, SessionSkeleton} from "./helpers/RulesFixtures.sol"; +import {MockERC20_6} from "./mocks/MockERC20_6.sol"; +import {AgenticCommerce} from "../../src/agentic-commerce-8183/AgenticCommerce.sol"; +import {IAgenticCommerce} from "../../src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol"; +import {RulesBindingHook} from "../../src/agentic-commerce-8183/hooks/RulesBindingHook.sol"; +import {UniversalMarketplace} from "../../src/agentic-commerce-8183/UniversalMarketplace.sol"; +import {UniversalMarketplaceRules} from "../../src/agentic-commerce-8183/UniversalMarketplaceRules.sol"; +import {UniversalMarketplaceErrors} from "../../src/agentic-commerce-8183/libraries/Errors.sol"; +import {IAGWFactory} from "../../src/agentic-commerce-8183/interfaces/external/IAGWFactory.sol"; +import {ISmartSession} from "../../src/agentic-commerce-8183/interfaces/external/ISmartSession.sol"; +import {Session} from "../../src/agentic-commerce-8183/interfaces/external/IAGW.sol"; +import { + Evaluation, + Operation, + LogicKind, + AllowedMutability, + JobSpec +} from "../../src/agentic-commerce-8183/libraries/JobSpecTypes.sol"; +import { + AgentCard, + AgentCardRules, + JobInputs, + OpenJobParams, + IntentRequest, + InitParams, + ReadTemplate, + TargetSource, + CheckTemplate, + ParamBounds, + JobSpecTemplate +} from "../../src/agentic-commerce-8183/libraries/Types.sol"; + +/// @notice The wallet's owner door (AGW `execute` is `onlyOwner`; the owner here is an EOA). +interface IAGWExecute { + function execute(bytes32 mode, bytes calldata executionCalldata) external payable; +} + +/// @title UniversalMarketplace — fork suite against the REAL AGW v6 on Donut (PRD 12 §6.9). +/// @notice Proves, against the deployed factory, wallet, URP, engine and AgentValidator: the versioned envelope, +/// multi-asset caps, pins with filled markers, the `Session` mirror (via the session hash) and the imported +/// `OwnerIntent` (via the owner's signature). +/// @dev - Skips unless PUSH_CHAIN_TESTNET_RPC_URL is set (forge also reads `.env`). Forks the latest block, logged. +/// - The marketplace, its rules helper, a kernel and the hook are deployed on the fork; the AGW stack is live. +contract UniversalMarketplaceForkTest is Test, TemplateParts, RulesFixtures { + address internal constant FACTORY = 0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc; + address internal constant ENGINE = 0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d; + address internal constant URP = 0xBA32e7A1500cb34311a31127bcD40CA52C8CFd36; + address internal constant AGENT_VALIDATOR = 0xBf08d8335c1cE41a577DB70666816027814737dD; + address internal constant GATEWAY_PC = 0x00000000000000000000000000000000000000C1; + address internal constant USDC_ETH = 0x7A58048036206bB898008b5bBDA85697DB1e5d66; // PRC20 USDC.eth (Sepolia) + address internal constant PETH = 0x2971824Db68229D087931155C2b8bB820B275809; // PRC20 pETH (Sepolia) + + string internal constant SEPOLIA_ID = "11155111"; + uint256 internal constant PRINCIPAL = 500e6; + uint256 internal constant BUDGET = 5e6; + + MockERC20_6 internal token; + AgenticCommerce internal kernel; + RulesBindingHook internal hook; + UniversalMarketplace internal mkt; + + address internal admin = makeAddr("forkAdmin"); + address internal provider = makeAddr("forkProvider"); + address internal evaluator = makeAddr("evaluator"); + address internal relayer = makeAddr("forkRelayer"); + address internal owner; + uint256 internal ownerKey; + + // made-up, non-zero Sepolia addresses: the destination calls are never executed here + address internal usdcSepolia = makeAddr("USDC.sepolia"); + address internal pool = makeAddr("aavePool.sepolia"); + address internal aUSDC = makeAddr("aUSDC.sepolia"); + + function _deploy() internal { + (owner, ownerKey) = makeAddrAndKey("forkOwner"); + token = new MockERC20_6("Push USDC", "pUSDC"); + kernel = AgenticCommerce( + address( + new TransparentUpgradeableProxy( + address(new AgenticCommerce()), + makeAddr("kernelProxyAdminOwner"), + abi.encodeCall(AgenticCommerce.initialize, (address(token), makeAddr("treasury"), admin)) + ) + ) + ); + hook = RulesBindingHook( + address( + new TransparentUpgradeableProxy( + address(new RulesBindingHook()), + makeAddr("hookAdmin"), + abi.encodeCall(RulesBindingHook.initialize, (address(kernel), FACTORY, ENGINE)) + ) + ) + ); + vm.prank(admin); + kernel.setHookWhitelist(address(hook), true); + + InitParams memory ip = InitParams({ + agwFactory: FACTORY, + kernel: address(kernel), + hook: address(hook), + evaluator: evaluator, + rules: address(new UniversalMarketplaceRules()), + admin: admin + }); + mkt = UniversalMarketplace( + address( + new TransparentUpgradeableProxy( + address(new UniversalMarketplace()), + makeAddr("mktAdmin"), + abi.encodeCall(UniversalMarketplace.initialize, (ip)) + ) + ) + ); + vm.prank(admin); + mkt.setCEADeployment(SEPOLIA_HASH, makeAddr("ceaFactory"), makeAddr("ceaProxyImpl")); + } + + function _card() internal view returns (AgentCard memory c) { + c.jobType = keccak256("LENDING_DEPOSIT"); + c.metadataURI = "ipfs://card"; + c.metadataHash = keccak256("card.json"); + c.chainNamespace = SEPOLIA; + c.providerFee = BUDGET; + c.paymentToken = address(token); + c.principalMin = 100e6; + c.principalMax = 1_000e6; + c.minDuration = 3 hours; + c.maxDuration = 30 days; + c.minExecuteWindow = 10 minutes; + c.settleWindow = 2 hours; + } + + function _rules() internal view returns (AgentCardRules memory) { + return _cardRulesTwoAssets(USDC_ETH, usdcSepolia, pool, PETH); + } + + function _lendingTemplate() internal view returns (JobSpecTemplate memory t) { + t.reads = new ReadTemplate[](2); + t.reads[0] = _balanceOfCEA(SEPOLIA_ID, aUSDC); + t.reads[1] = + _read(SEPOLIA_ID, pool, GET_RESERVE_DATA, abi.encode(usdcSepolia), _noFills(), _reserveDataOut(), _f2(0, 2)); + t.checks = new CheckTemplate[](2); + t.checks[0] = + _chk(0, Evaluation.COMPARE, Operation.GREATER_OR_EQUAL, TargetSource.PRINCIPAL_BPS, 9999); + t.checks[1] = _chk(1, Evaluation.COMPARE, Operation.GREATER_OR_EQUAL, TargetSource.FIXED, 0.04e27); + t.logic = _rootOf(LogicKind.ALL, _kids(0, 1)); + t.allowedMutability = AllowedMutability.NONE; + t.params = new ParamBounds[](0); + } + + /// @dev The real v6 values: the wallet refuses anything else (`MalformedSessionShape` / `RulesTypeMismatch`). + function _skeletonV6() internal pure returns (SessionSkeleton memory) { + return SessionSkeleton({ + validator: AGENT_VALIDATOR, actionTarget: GATEWAY_PC, actionSelector: SEND_OUTBOUND_SELECTOR, policy: URP + }); + } + + function _inputs() internal view returns (JobInputs memory j) { + j.principal = PRINCIPAL; + j.expiredAt = uint48(block.timestamp + 7 days); + j.executeBy = uint48(block.timestamp + 1 hours); + j.params = new int256[](0); + } + + function _sessionFor(address agw, JobInputs memory job) internal view returns (Session memory) { + UniversalTerms memory t = _fillTerms(_rules(), job.principal, job.expiredAt, mkt.computeCEA(agw, SEPOLIA_HASH)); + return _wrapSession(_envelope(t, SEPOLIA), provider, _skeletonV6()); + } + + function _sign(OwnerIntent memory intent) internal view returns (bytes memory) { + bytes32 domainSeparator = keccak256( + abi.encode( + OWNER_INTENT_DOMAIN_TYPEHASH, + OWNER_INTENT_DOMAIN_NAME_HASH, + OWNER_INTENT_DOMAIN_VERSION_HASH, + intent.signerChainId, + FACTORY, + bytes32(block.chainid) + ) + ); + bytes32 digest = + keccak256(abi.encodePacked("\x19\x01", domainSeparator, keccak256(abi.encode(OWNER_INTENT_TYPEHASH, intent)))); + (uint8 v, bytes32 r, bytes32 s) = vm.sign(ownerKey, digest); + return abi.encodePacked(r, s, v); + } + + /// @dev An owner-signed openJob for wallet `index`, built the way the SDK does: session, previewIntent, sign. + function _signed(uint256 cardId, uint96 index, Session memory s, JobInputs memory job) + internal + view + returns (OpenJobParams memory p) + { + p.cardId = cardId; + p.cardVersion = mkt.agentCardVersion(cardId); + p.job = job; + p.session = s; + p.intent = mkt.previewIntent( + IntentRequest({ + cardId: cardId, + owner: owner, + index: index, + job: job, + deadline: uint48(block.timestamp + 1 hours), + signerChainId: block.chainid + }), + s + ); + p.sig = _sign(p.intent); + p.label = "fork"; + } + + function _ownerExecute(address agw, address target, bytes memory data) internal { + vm.prank(owner); + IAGWExecute(agw).execute(bytes32(0), abi.encodePacked(target, uint256(0), data)); + } + + function test_fork_openJob_realAGWv6() public { + string memory url = vm.envOr("PUSH_CHAIN_TESTNET_RPC_URL", string("")); + if (bytes(url).length == 0) { + vm.skip(true); + return; + } + vm.createSelectFork(url); + emit log_named_uint("fork block", block.number); + _deploy(); + + bytes memory rules = abi.encode(_rules()); + bytes memory template = abi.encode(_lendingTemplate()); + AgentCard memory card = _card(); + vm.prank(provider); + uint256 cardId = mkt.registerAgentCard(card, rules, template); + + // ── 1. openJob on a fresh wallet ── + uint96 index = uint96(IAGWFactory(FACTORY).walletCount(owner)); + (address agw, bool deployed) = IAGWFactory(FACTORY).predictWallet(owner, index); + assertFalse(deployed); + JobInputs memory job = _inputs(); + OpenJobParams memory p = _signed(cardId, index, _sessionFor(agw, job), job); + vm.prank(relayer); + (uint256 jobId, address opened, bytes32 rulesId) = mkt.openJob(p); + + assertEq(opened, agw); + assertTrue(IAGWFactory(FACTORY).isWallet(agw), "deployed by the real factory"); + assertTrue(ISmartSession(ENGINE).isPermissionEnabled(rulesId, agw), "rules live in the real engine"); + IAgenticCommerce.Job memory j = kernel.getJob(jobId); + assertEq(j.client, agw); + assertEq(j.provider, provider); + assertEq(j.hook, address(hook)); + assertEq(j.evaluator, evaluator); + JobSpec memory spec = abi.decode(bytes(j.description), (JobSpec)); + assertEq(abi.encode(spec.logic), abi.encode(_lendingTemplate().logic), "lending logic"); + assertEq(uint8(spec.allowedMutability), uint8(AllowedMutability.NONE)); + assertEq(spec.origin, keccak256(abi.encode(address(mkt), cardId, uint256(1), PRINCIPAL)), "origin"); + + // ── 2. fund through the hook, from the owner's own door ── + vm.prank(provider); + kernel.setBudget(jobId, BUDGET, ""); + token.mint(agw, BUDGET); + _ownerExecute(agw, address(token), abi.encodeCall(IERC20.approve, (address(kernel), BUDGET))); + _ownerExecute( + agw, address(kernel), abi.encodeCall(IAgenticCommerce.fund, (jobId, BUDGET, abi.encode(rulesId))) + ); + assertEq(uint8(kernel.getJob(jobId).status), uint8(IAgenticCommerce.JobStatus.Funded)); + assertEq(hook.rulesOfJob(jobId), rulesId); + assertEq(hook.agwOfJob(jobId), agw); + + // ── 3. a second openJob while Funded ── + JobInputs memory job2 = _inputs(); + OpenJobParams memory busy = _signed(cardId, index, _sessionFor(agw, job2), job2); + vm.prank(relayer); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.WalletHasActiveJob.selector, agw, jobId)); + mkt.openJob(busy); + + // ── 4. the existing-wallet path, once the job is Rejected ── + vm.prank(evaluator); + kernel.reject(jobId, bytes32(0), ""); + assertEq(mkt.activeJobOf(agw), 0); + OpenJobParams memory again = _signed(cardId, index, _sessionFor(agw, job2), job2); + assertEq(again.intent.grantNonce, 1, "the live grant nonce"); + assertEq(again.intent.nonceSeq, 1, "the live lane"); + vm.prank(relayer); + (uint256 jobId2, address same, bytes32 rulesId2) = mkt.openJob(again); + assertEq(same, agw); + assertEq(jobId2, jobId + 1); + assertTrue(ISmartSession(ENGINE).isPermissionEnabled(rulesId2, agw)); + assertTrue(rulesId2 != rulesId, "a new rules set"); + + // ── 5. a pre-v6 envelope is named by the marketplace; the AGW is never called ── + uint96 fresh = uint96(IAGWFactory(FACTORY).walletCount(owner)); + (address agw2,) = IAGWFactory(FACTORY).predictWallet(owner, fresh); + UniversalTerms memory t = _fillTerms(_rules(), PRINCIPAL, job2.expiredAt, mkt.computeCEA(agw2, SEPOLIA_HASH)); + Session memory preV6 = _wrapSession(abi.encode(SEPOLIA, abi.encode(t)), provider, _skeletonV6()); + OpenJobParams memory old = _signed(cardId, fresh, preV6, job2); + vm.prank(relayer); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.EnvelopeVersionMismatch.selector, 64)); + mkt.openJob(old); + assertFalse(IAGWFactory(FACTORY).isWallet(agw2), "nothing deployed"); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/UniversalMarketplace.invariants.t.sol b/plan/marketplace/contracts/test/8183-tests/UniversalMarketplace.invariants.t.sol new file mode 100644 index 00000000..f89f7d47 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/UniversalMarketplace.invariants.t.sol @@ -0,0 +1,294 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {Test} from "forge-std/Test.sol"; + +import {UniversalTerms} from "@push-agw/libraries/Types.sol"; +import {MarketplaceFixtures} from "./UniversalMarketplace.t.sol"; +import {MockAGW} from "./mocks/MockAGW.sol"; +import {UniversalMarketplaceErrors} from "../../src/agentic-commerce-8183/libraries/Errors.sol"; +import {IAgenticCommerce} from "../../src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol"; +import {UniversalMarketplace} from "../../src/agentic-commerce-8183/UniversalMarketplace.sol"; +import {JobSpec} from "../../src/agentic-commerce-8183/libraries/JobSpecTypes.sol"; +import { + AgentCard, + AgentCardRules, + JobInputs, + OpenJobParams +} from "../../src/agentic-commerce-8183/libraries/Types.sol"; + +/// @notice Drives openJob through honest and misbehaving wallets on a swap card (one param), card registration by +/// a small set of providers, the card's update, cancels and time. Records what every opened job must look +/// like. +contract MarketplaceHandler is MarketplaceFixtures { + uint256 public cardId; + address[] public agws; + uint256[] public jobs; + mapping(uint256 => bytes32) public expectedOrigin; + /// @notice Per opened job: the policy initData the wallet was granted, and the job's principal (MI07). + mapping(uint256 => bytes) public grantedInitData; + mapping(uint256 => uint256) public grantedPrincipal; + address[3] public providers; + uint256 public userTokenStart; + uint256 public userAssetStart; + uint256 public userEthStart; + + /// @notice Outcome counters. `opened` and `refused` are the liveness evidence (afterInvariant); the + /// "unexpected" counters must stay zero. Counters rather than vm.expectRevert: with + /// fail_on_revert = false an unmet expectation inside a handler is a discarded call. + uint256 public opened; + uint256 public refused; + uint256 public honestRefused; + uint256 public misbehaviourAccepted; + uint256 public wrongRefusal; + uint256 public duplicateCardAccepted; + uint256 public wrongRegistrationRefusal; + + constructor() { + setUp(); + cardId = _registerSwap(); + providers = [provider, provider2, makeAddr("provider3")]; + userTokenStart = token.balanceOf(user); + userAssetStart = pUSDC.balanceOf(user); + userEthStart = user.balance; + } + + function agwCount() external view returns (uint256) { + return agws.length; + } + + function jobCount() external view returns (uint256) { + return jobs.length; + } + + function marketplace() external view returns (address) { + return address(mkt); + } + + function job(uint256 jobId) external view returns (IAgenticCommerce.Job memory) { + return kernel.getJob(jobId); + } + + function balances(address who) external view returns (uint256 tokenBal, uint256 assetBal, uint256 ethBal) { + return (token.balanceOf(who), pUSDC.balanceOf(who), who.balance); + } + + function principalAssetOf(uint256 id) external view returns (uint8) { + return abi.decode(mkt.getAgentCard(id).rules, (AgentCardRules)).principalAsset; + } + + /// @param misbehave 0 honest · 1 wallet creates two jobs · 2 wallet creates the job from another address. + /// An honest open on a free wallet MUST succeed; a misbehaving one MUST fail with its named error. + function open(uint256 principalSeed, uint256 executeSeed, uint256 paramSeed, uint8 misbehave) external { + uint8 mode = misbehave % 3; + (uint96 index, address agw, bool deployed) = _freeWallet(); + JobInputs memory j = _swapInputs(int256(bound(paramSeed, 1, 1e30))); + j.principal = bound(principalSeed, 100e6, 1_000e6); + j.executeBy = uint48(bound(executeSeed, block.timestamp + 10 minutes, j.expiredAt - 2 hours)); + OpenJobParams memory p = _readyAt(cardId, index, _rules(), j); + + if (mode != 0 && !deployed) { + vm.prank(user); + factory.deployWalletWithSig(p.intent, "", ""); + deployed = true; + } + if (deployed) MockAGW(payable(agw)).setMode(MockAGW.Mode(mode)); + + uint256 before = kernel.jobCounter(); + vm.prank(relayer); + try mkt.openJob(p) returns (uint256 jobId, address, bytes32) { + if (mode == 0) { + opened++; + _record(agw, jobId, j.principal); + } else { + misbehaviourAccepted++; + } + } catch (bytes memory err) { + if (mode == 0) { + honestRefused++; + } else { + refused++; + bytes memory expected = mode == 1 + ? abi.encodeWithSelector(UniversalMarketplaceErrors.UnexpectedJobCount.selector, before, before + 2) + : abi.encodeWithSelector(UniversalMarketplaceErrors.JobMismatch.selector); + if (keccak256(err) != keccak256(expected)) wrongRefusal++; + } + } + if (deployed) MockAGW(payable(agw)).setMode(MockAGW.Mode.Honest); + } + + /// @notice One of three providers tries to register a card. A provider who already has one MUST be refused with + /// `AgentCardAlreadyRegistered`; one who has none MUST succeed. + function register(uint256 seed) external { + address who = providers[seed % providers.length]; + bool had = mkt.agentCardOf(who) != 0; + AgentCard memory c = _card(); + bytes memory r = abi.encode(_rules()); + bytes memory e = abi.encode(_lendingTemplate()); + vm.prank(who); + try mkt.registerAgentCard(c, r, e) returns (uint256) { + if (had) duplicateCardAccepted++; + } catch (bytes memory err) { + bytes memory expected = + abi.encodeWithSelector(UniversalMarketplaceErrors.AgentCardAlreadyRegistered.selector, who); + if (!had || keccak256(err) != keccak256(expected)) wrongRegistrationRefusal++; + } + } + + /// @notice The provider re-publishes the card: same content, next version. + function update() external { + AgentCard memory c = _card(); + c.jobType = keccak256("SWAP"); + bytes memory r = abi.encode(_rules()); + bytes memory e = abi.encode(_swapTemplate()); + vm.prank(provider); + mkt.updateAgentCard(cardId, c, r, e); + } + + function cancel(uint256 seed) external { + if (agws.length == 0) return; + uint256 id = mkt.activeJobOf(agws[seed % agws.length]); + if (id == 0 || kernel.getJob(id).status != IAgenticCommerce.JobStatus.Open) return; + vm.prank(provider); + kernel.reject(id, bytes32(0), ""); + } + + function warp(uint256 secs) external { + vm.warp(block.timestamp + bound(secs, 1, 10 days)); + } + + /// @dev The user's last wallet if it has no active job, else the next one. + function _freeWallet() internal view returns (uint96 index, address agw, bool deployed) { + index = uint96(factory.walletCount(user)); + (agw, deployed) = factory.predictWallet(user, index); + if (index == 0) return (index, agw, deployed); + (address last,) = factory.predictWallet(user, index - 1); + if (mkt.activeJobOf(last) == 0) return (index - 1, last, true); + } + + function _record(address agw, uint256 jobId, uint256 principal) internal { + jobs.push(jobId); + expectedOrigin[jobId] = keccak256(abi.encode(address(mkt), cardId, mkt.agentCardVersion(cardId), principal)); + grantedInitData[jobId] = MockAGW(payable(agw)).lastPolicyInitData(); + grantedPrincipal[jobId] = principal; + for (uint256 i; i < agws.length; ++i) { + if (agws[i] == agw) return; + } + agws.push(agw); + } +} + +/// @title UniversalMarketplace — invariants (PRD 12 §6.7). +/// @dev 64 runs × depth 100 per invariant (6,400 handler calls each): every call is a full openJob with criteria +/// built on-chain, so the defaults (256 × 500) take far longer. +/// forge-config: default.invariant.runs = 64 +/// forge-config: default.invariant.depth = 100 +contract UniversalMarketplaceInvariants is Test { + MarketplaceHandler internal h; + UniversalMarketplace internal mkt; + address internal user = makeAddr("userUEA"); + + function setUp() public { + h = new MarketplaceHandler(); + mkt = UniversalMarketplace(h.marketplace()); + + targetContract(address(h)); + bytes4[] memory sels = new bytes4[](5); + sels[0] = MarketplaceHandler.open.selector; + sels[1] = MarketplaceHandler.update.selector; + sels[2] = MarketplaceHandler.cancel.selector; + sels[3] = MarketplaceHandler.warp.selector; + sels[4] = MarketplaceHandler.register.selector; + targetSelector(FuzzSelector({addr: address(h), selectors: sels})); + } + + /// @notice An AGW's active job is always 0 or a job that AGW is the client of. + function invariant_MI01_activeJobIsTheAgwsOwnJob() public view { + uint256 n = h.agwCount(); + for (uint256 i; i < n; ++i) { + address agw = h.agws(i); + uint256 id = mkt.activeJobOf(agw); + if (id == 0) continue; + assertEq(h.job(id).client, agw, "activeJobOf points at a job the AGW is not client of"); + assertEq(mkt.agwOfJob(id), agw); + } + } + + /// @notice The marketplace never holds the payment token, the rules asset or PC. + function invariant_MI02_marketplaceHoldsNothing() public view { + (uint256 tokenBal, uint256 assetBal, uint256 ethBal) = h.balances(address(mkt)); + assertEq(tokenBal, 0); + assertEq(assetBal, 0); + assertEq(ethBal, 0); + } + + /// @notice An honest open on a free wallet always succeeds; a misbehaving wallet is always refused, with + /// its own named error. + function invariant_MI03_outcomesExactlyExpected() public view { + assertEq(h.honestRefused(), 0, "an honest openJob on a free wallet reverted"); + assertEq(h.misbehaviourAccepted(), 0, "a misbehaving wallet's openJob succeeded"); + assertEq(h.wrongRefusal(), 0, "a misbehaving wallet was refused with the wrong error"); + } + + /// @notice Every opened job carries well-formed criteria with the recorded origin, the configured evaluator + /// and hook, and is never Funded (only the test funds, and this handler never does). + function invariant_MI04_everyJobIsWellFormed() public view { + uint256 n = h.jobCount(); + for (uint256 i; i < n; ++i) { + uint256 id = h.jobs(i); + IAgenticCommerce.Job memory j = h.job(id); + JobSpec memory spec = abi.decode(bytes(j.description), (JobSpec)); + assertEq(spec.origin, h.expectedOrigin(id), "origin"); + assertEq(j.evaluator, mkt.evaluator(), "evaluator"); + assertEq(j.hook, mkt.hook(), "hook"); + assertTrue(j.status != IAgenticCommerce.JobStatus.Funded, "funded by nobody"); + } + } + + /// @notice openJob never moves the user's tokens or PC. + function invariant_MI05_userBalanceNeverMovedByOpenJob() public view { + (uint256 tokenBal, uint256 assetBal, uint256 ethBal) = h.balances(user); + assertEq(tokenBal, h.userTokenStart()); + assertEq(assetBal, h.userAssetStart()); + assertEq(ethBal, h.userEthStart()); + } + + /// @notice One card per provider: `agentCardOf[p]` is 0 or a card whose provider is `p`, and no two cards share + /// a provider. A second registration is always refused with its named error. + function invariant_MI06_onePerProvider() public view { + uint256 n = mkt.agentCardCount(); + for (uint256 id = 1; id <= n; ++id) { + address p = mkt.getAgentCard(id).card.provider; + assertEq(mkt.agentCardOf(p), id, "the card's provider maps back to it"); + for (uint256 other = 1; other < id; ++other) { + assertTrue(mkt.getAgentCard(other).card.provider != p, "two cards share a provider"); + } + } + for (uint256 i; i < 3; ++i) { + address p = h.providers(i); + uint256 id = mkt.agentCardOf(p); + if (id != 0) assertEq(mkt.getAgentCard(id).card.provider, p, "agentCardOf names another provider's card"); + } + assertEq(h.duplicateCardAccepted(), 0, "a provider registered a second card"); + assertEq(h.wrongRegistrationRefusal(), 0, "a registration was refused with the wrong error"); + } + + /// @notice The rules granted for every opened job cap the principal asset's lifetime total at exactly that + /// job's principal (D3). + function invariant_MI07_principalCapEqualsPrincipal() public view { + uint8 principalAsset = h.principalAssetOf(h.cardId()); + uint256 n = h.jobCount(); + for (uint256 i; i < n; ++i) { + uint256 id = h.jobs(i); + (,, bytes memory body) = abi.decode(h.grantedInitData(id), (uint16, string, bytes)); + UniversalTerms memory t = abi.decode(body, (UniversalTerms)); + assertEq(t.assets[principalAsset].maxTotal, h.grantedPrincipal(id), "maxTotal == principal"); + } + } + + /// @notice Liveness: the run reached BOTH paths, or every invariant above held vacuously. + function afterInvariant() public view { + assertGt(h.opened(), 0, "no honest openJob ever succeeded"); + assertGt(h.refused(), 0, "no misbehaving openJob was ever refused"); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/UniversalMarketplace.t.sol b/plan/marketplace/contracts/test/8183-tests/UniversalMarketplace.t.sol new file mode 100644 index 00000000..093dfdf7 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/UniversalMarketplace.t.sol @@ -0,0 +1,2144 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { + TransparentUpgradeableProxy, + ITransparentUpgradeableProxy +} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; +import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol"; +import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; +import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol"; +import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; + +import { + OwnerIntent, + OWNER_LANE_FLAG, + AssetCap, + AllowedCall, + ArgPin, + PinOp, + UniversalTerms +} from "@push-agw/libraries/Types.sol"; +import {KernelBase} from "./KernelBase.t.sol"; +import {TemplateParts} from "./helpers/TemplateParts.sol"; +import {RulesFixtures, SessionSkeleton} from "./helpers/RulesFixtures.sol"; +import {MockAGWFactory} from "./mocks/MockAGWFactory.sol"; +import {MockAGW} from "./mocks/MockAGW.sol"; +import {MockSmartSession} from "./mocks/MockSmartSession.sol"; +import {MockPRC20Source} from "./mocks/MockPRC20Source.sol"; +import {IAgenticCommerce} from "../../src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol"; +import {RulesBindingHook} from "../../src/agentic-commerce-8183/hooks/RulesBindingHook.sol"; +import {UniversalMarketplace} from "../../src/agentic-commerce-8183/UniversalMarketplace.sol"; +import {UniversalMarketplaceRules} from "../../src/agentic-commerce-8183/UniversalMarketplaceRules.sol"; +import {IUniversalMarketplace} from "../../src/agentic-commerce-8183/interfaces/IUniversalMarketplace.sol"; +import {UniversalMarketplaceErrors} from "../../src/agentic-commerce-8183/libraries/Errors.sol"; +import {JobSpecBuilder} from "../../src/agentic-commerce-8183/libraries/JobSpecBuilder.sol"; +import { + Evaluation, + Operation, + LogicKind, + AllowedMutability, + JobSpec +} from "../../src/agentic-commerce-8183/libraries/JobSpecTypes.sol"; +import {Session, ActionData, PolicyData} from "../../src/agentic-commerce-8183/interfaces/external/IAGW.sol"; +import {CEAFactory} from "../../src/cea/CEAFactory.sol"; +import { + AgentCard, + AgentCardRules, + AgentCardView, + JobInputs, + OpenJobParams, + IntentRequest, + InitParams, + ReadTemplate, + TargetSource, + CheckTemplate, + ParamBounds, + JobSpecTemplate, + BuildContext, + MARKER_WALLET +} from "../../src/agentic-commerce-8183/libraries/Types.sol"; + +/// @notice TEST ONLY: runs JobSpecBuilder as the marketplace does, with CEAs from the real marketplace, so a test can +/// compute the description a job must carry. +contract MarketJobSpecBuilder { + IUniversalMarketplace internal immutable MARKET; + + constructor(IUniversalMarketplace market) { + MARKET = market; + } + + function build(bytes memory jobSpecTemplate, BuildContext memory ctx) external view returns (bytes memory) { + return JobSpecBuilder.build(jobSpecTemplate, ctx); + } + + function computeCEA(address agw, bytes32 chainHash) external view returns (address) { + return MARKET.computeCEA(agw, chainHash); + } +} + +/// @title MarketplaceFixtures — shared setup and builders for the marketplace unit and invariant suites. +/// @notice Real kernel, real RulesBindingHook, real rules helper and JobSpecBuilder library, real CEAFactory. The AGW +/// factory and wallet are mocks that enforce the rules the marketplace relies on and verify no signature; +/// `UniversalMarketplace.fork.t.sol` runs the real AGW v6 stack. +abstract contract MarketplaceFixtures is KernelBase, TemplateParts, RulesFixtures { + UniversalMarketplace internal mkt; + UniversalMarketplaceRules internal rulesHelper; + MarketJobSpecBuilder internal expectedBuilder; + RulesBindingHook internal hook; + MockAGWFactory internal factory; + MockSmartSession internal engine; + CEAFactory internal ceaFactory; + MockPRC20Source internal pUSDC; // the principal asset: pUSDC.sepolia, 6 decimals + MockPRC20Source internal pETH; // a second asset, 18 decimals + + address internal user = makeAddr("userUEA"); + address internal relayer = makeAddr("relayer"); + address internal mktAdmin = makeAddr("mktAdmin"); + address internal provider2 = makeAddr("provider2"); + address internal universalEvaluator = makeAddr("universalEvaluator"); + address internal ceaProxyImpl = makeAddr("ceaProxyImpl"); + address internal pool = makeAddr("aavePool.sepolia"); + address internal aUSDC = makeAddr("aUSDC.sepolia"); + address internal usdc = makeAddr("USDC.sepolia"); + address internal weth = makeAddr("WETH.sepolia"); + address internal gateway = makeAddr("universalGatewayPC"); + address internal urp = makeAddr("urp"); + address internal validator = makeAddr("sessionValidator"); + + string internal constant SEPOLIA_ID = "11155111"; + bytes4 internal constant SEND_OUTBOUND = + bytes4(keccak256("sendUniversalTxOutbound((bytes,address,uint256,uint256,uint256,uint256,bytes,address))")); + bytes4 internal constant WITHDRAW = bytes4(keccak256("withdraw(address,uint256,address)")); + + uint256 internal constant PRINCIPAL = 500e6; + uint256 internal constant FEE = 2e6; + + function setUp() public virtual override { + super.setUp(); + factory = new MockAGWFactory(); + engine = new MockSmartSession(); + RulesBindingHook hookImpl = new RulesBindingHook(); + hook = RulesBindingHook( + address( + new TransparentUpgradeableProxy( + address(hookImpl), + makeAddr("hookAdmin"), + abi.encodeCall(RulesBindingHook.initialize, (address(kernel), address(factory), address(engine))) + ) + ) + ); + vm.prank(admin); + kernel.setHookWhitelist(address(hook), true); + + rulesHelper = new UniversalMarketplaceRules(); + mkt = UniversalMarketplace( + address( + new TransparentUpgradeableProxy( + address(new UniversalMarketplace()), + mktAdmin, + abi.encodeCall(UniversalMarketplace.initialize, (_initParams())) + ) + ) + ); + + CEAFactory ceaImpl = new CEAFactory(); + ceaFactory = CEAFactory( + address( + new TransparentUpgradeableProxy( + address(ceaImpl), + makeAddr("ceaAdmin"), + abi.encodeCall( + CEAFactory.initialize, + (admin, admin, makeAddr("vault"), ceaProxyImpl, makeAddr("ceaImpl"), makeAddr("gateway")) + ) + ) + ) + ); + vm.prank(admin); + mkt.setCEADeployment(SEPOLIA_HASH, address(ceaFactory), ceaProxyImpl); + expectedBuilder = new MarketJobSpecBuilder(IUniversalMarketplace(address(mkt))); + + pUSDC = new MockPRC20Source("pUSDC.sepolia", SEPOLIA, 6); + pETH = new MockPRC20Source("pETH.sepolia", SEPOLIA, 18); + pUSDC.mint(user, 1e15); + token.mint(user, 1e15); + vm.deal(user, 100 ether); + } + + function _initParams() internal view returns (InitParams memory) { + return InitParams({ + agwFactory: address(factory), + kernel: address(kernel), + hook: address(hook), + evaluator: universalEvaluator, + rules: address(rulesHelper), + admin: admin + }); + } + + // ═════════════════════════════ cards ═════════════════════════════ + + /// @dev The lending card, on Sepolia, paid in the kernel's token. `minDuration` is 3 h so that a job at the + /// shortest expiry still fits `minExecuteWindow + settleWindow` (10 min + 2 h). + function _card() internal view returns (AgentCard memory c) { + c.jobType = keccak256("LENDING_DEPOSIT"); + c.metadataURI = "ipfs://card"; + c.metadataHash = keccak256("card.json"); + c.chainNamespace = SEPOLIA; + c.providerFee = FEE; + c.paymentToken = address(token); + c.principalMin = 100e6; + c.principalMax = 1_000e6; + c.minDuration = 3 hours; + c.maxDuration = 30 days; + c.minExecuteWindow = 10 minutes; + c.settleWindow = 2 hours; + } + + /// @dev PRD 12 §6.1: pUSDC (both caps the marker); approve USDC → Pool ≤ principal; supply onBehalfOf = wallet; + /// transfer to the wallet by the beneficiary field. + function _rules() internal view returns (AgentCardRules memory) { + return _cardRules(address(pUSDC), usdc, pool); + } + + /// @dev `_rules()` plus `{pETH, 0, 0}` as asset 1. + function _rulesTwoAssets() internal view returns (AgentCardRules memory) { + return _cardRulesTwoAssets(address(pUSDC), usdc, pool, address(pETH)); + } + + /// @dev The V2 doc's lending criteria on Sepolia: aUSDC.balanceOf(CEA) ≥ 99.99% of principal AND rate ≥ 4%. + function _lendingTemplate() internal view returns (JobSpecTemplate memory t) { + t.reads = new ReadTemplate[](2); + t.reads[0] = _balanceOfCEA(SEPOLIA_ID, aUSDC); + t.reads[1] = + _read(SEPOLIA_ID, pool, GET_RESERVE_DATA, abi.encode(usdc), _noFills(), _reserveDataOut(), _f2(0, 2)); + t.checks = new CheckTemplate[](2); + t.checks[0] = + _chk(0, Evaluation.COMPARE, Operation.GREATER_OR_EQUAL, TargetSource.PRINCIPAL_BPS, 9999); + t.checks[1] = _chk(1, Evaluation.COMPARE, Operation.GREATER_OR_EQUAL, TargetSource.FIXED, 0.04e27); + t.logic = _rootOf(LogicKind.ALL, _kids(0, 1)); + t.allowedMutability = AllowedMutability.NONE; + t.params = new ParamBounds[](0); + } + + /// @dev The V2 doc's swap criteria on Sepolia: the CEA's WETH grows by at least `minOut`, the job's param 0. + function _swapTemplate() internal view returns (JobSpecTemplate memory t) { + t.reads = new ReadTemplate[](1); + t.reads[0] = _balanceOfCEA(SEPOLIA_ID, weth); + t.reads[0].minConfirmations = 3; + t.checks = new CheckTemplate[](1); + t.checks[0] = _chk(0, Evaluation.NUMBER, Operation.GREATER_OR_EQUAL, TargetSource.PARAM, 0); + t.logic = _rootOf(LogicKind.ALL, _one(0)); + t.params = new ParamBounds[](1); + t.params[0] = ParamBounds({min: 1, max: 1e30}); + } + + function _registerAs(address who, AgentCard memory c, AgentCardRules memory r, JobSpecTemplate memory t) + internal + returns (uint256 id) + { + bytes memory rules = abi.encode(r); + bytes memory template = abi.encode(t); + vm.prank(who); + id = mkt.registerAgentCard(c, rules, template); + } + + function _register(AgentCard memory c, AgentCardRules memory r, JobSpecTemplate memory t) + internal + returns (uint256) + { + return _registerAs(provider, c, r, t); + } + + function _registerLending() internal returns (uint256) { + return _register(_card(), _rules(), _lendingTemplate()); + } + + function _registerSwap() internal returns (uint256) { + AgentCard memory c = _card(); + c.jobType = keccak256("SWAP"); + return _register(c, _rules(), _swapTemplate()); + } + + /// @dev The provider's lending card, registering it on first use (one card per provider). + function _lendingId() internal returns (uint256 id) { + id = mkt.agentCardOf(provider); + if (id == 0) id = _registerLending(); + } + + // ═════════════════════════════ jobs ═════════════════════════════ + + /// @dev Expires in 7 days; execute within 1 hour; no params. + function _inputs(uint256 principal) internal view returns (JobInputs memory j) { + j.principal = principal; + j.expiredAt = uint48(block.timestamp + 7 days); + j.executeBy = uint48(block.timestamp + 1 hours); + j.params = new int256[](0); + } + + function _swapInputs(int256 minOut) internal view returns (JobInputs memory j) { + j = _inputs(PRINCIPAL); + j.params = new int256[](1); + j.params[0] = minOut; + } + + /// @dev The unit-suite session skeleton: fields the marketplace never checks (the AGW pins them at grant). + function _skeleton() internal view returns (SessionSkeleton memory) { + return SessionSkeleton({ + validator: validator, actionTarget: gateway, actionSelector: SEND_OUTBOUND, policy: urp + }); + } + + /// @dev The terms an honest SDK signs for `r` and this job: markers filled, the marketplace's CEA. + function _termsFor(AgentCardRules memory r, address agw, JobInputs memory job) + internal + view + returns (UniversalTerms memory) + { + return _fillTerms(r, job.principal, job.expiredAt, mkt.computeCEA(agw, SEPOLIA_HASH)); + } + + /// @dev `t` in a v6 envelope on Sepolia, for `agent`, with the unit skeleton. + function _sessionAs(address agent, UniversalTerms memory t) internal view returns (Session memory) { + return _wrapSession(_envelope(t, SEPOLIA), agent, _skeleton()); + } + + function _sessionOf(UniversalTerms memory t) internal view returns (Session memory) { + return _sessionAs(provider, t); + } + + /// @dev PRD 12 §6.1: the session the SDK builds for card rules `r`, wallet `agw` and this job. + function _sessionFor(AgentCardRules memory r, address agw, JobInputs memory job) + internal + view + returns (Session memory) + { + return _sessionOf(_termsFor(r, agw, job)); + } + + function _params(uint256 cardId, uint96 index, JobInputs memory job, Session memory s) + internal + view + returns (OpenJobParams memory p) + { + p.cardId = cardId; + p.cardVersion = mkt.agentCardVersion(cardId); + p.job = job; + p.session = s; + p.intent = mkt.previewIntent( + IntentRequest({ + cardId: cardId, + owner: user, + index: index, + job: job, + deadline: uint48(block.timestamp + 1 hours), + signerChainId: 1 + }), + s + ); + p.sig = hex"01"; + p.label = "job"; + } + + /// @dev An honest, signed openJob for wallet `index` of the user, for the card's own agent. + function _readyAt(uint256 cardId, uint96 index, AgentCardRules memory r, JobInputs memory job) + internal + view + returns (OpenJobParams memory) + { + (address agw,) = factory.predictWallet(user, index); + address agent = mkt.getAgentCard(cardId).card.provider; + return _params(cardId, index, job, _sessionAs(agent, _termsFor(r, agw, job))); + } + + /// @dev An honest, signed openJob on the user's next (fresh) wallet. + function _ready(uint256 cardId) internal view returns (OpenJobParams memory) { + return _readyAt(cardId, uint96(factory.walletCount(user)), _rules(), _inputs(PRINCIPAL)); + } + + function _open(OpenJobParams memory p) internal returns (uint256 jobId, address agw) { + vm.prank(relayer); + (jobId, agw,) = mkt.openJob(p); + } + + function _expectOpen(OpenJobParams memory p, bytes memory err) internal { + vm.prank(relayer); + vm.expectRevert(err); + mkt.openJob(p); + } + + /// @dev The 8183 continuation outside the marketplace: the provider prices, the AGW funds with its rulesId. + function _budgetAndFund(uint256 jobId, address agw, uint256 amount) internal { + vm.prank(provider); + kernel.setBudget(jobId, amount, ""); + _fund(jobId, agw, amount); + } + + function _fund(uint256 jobId, address agw, uint256 amount) internal { + engine.setPermission(MockAGW(payable(agw)).RULES_ID(), agw, true); + token.mint(agw, amount); + vm.startPrank(agw); + token.approve(address(kernel), amount); + kernel.fund(jobId, amount, abi.encode(mkt.rulesOfJob(jobId))); + vm.stopPrank(); + } + + /// @dev The JobSpec bytes the card's template must give for this job. + function _expectedDescription( + JobSpecTemplate memory t, + uint256 cardId, + uint256 cardVersion, + address agw, + JobInputs memory job + ) internal view returns (bytes memory) { + return expectedBuilder.build( + abi.encode(t), + BuildContext({ + agw: agw, + principal: job.principal, + executeBy: job.executeBy, + settleWindow: _card().settleWindow, + params: job.params, + origin: keccak256(abi.encode(address(mkt), cardId, cardVersion, job.principal)) + }) + ); + } + + function _calldataHash(uint256 cardId, uint96 index, JobInputs memory job) internal view returns (bytes32) { + (, bytes memory cd) = mkt.buildCreateJobCalldata(cardId, user, index, job); + return keccak256(cd); + } + + /// @dev The policy terms the wallet was last granted, decoded from the v6 envelope. + function _granted(address agw) internal view returns (UniversalTerms memory) { + (,, bytes memory body) = abi.decode(MockAGW(payable(agw)).lastPolicyInitData(), (uint16, string, bytes)); + return abi.decode(body, (UniversalTerms)); + } + + /// @dev Pure on purpose: an external read here would consume a pending `vm.prank`. + function _adminRevert(address who) internal pure returns (bytes memory) { + return + abi.encodeWithSelector( + IAccessControl.AccessControlUnauthorizedAccount.selector, who, keccak256("ADMIN_ROLE") + ); + } +} + +/// @title UniversalMarketplace — unit suite (PRD 12 §6.2, §6.5). +contract UniversalMarketplaceTest is MarketplaceFixtures { + // ═════════════════════════════ MR · registration ═════════════════════════════ + + function test_MR01_registerAgentCard_storesEverythingAndEmits() public { + AgentCard memory c = _card(); + bytes memory r = abi.encode(_rules()); + bytes memory e = abi.encode(_lendingTemplate()); + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.AgentCardRegistered( + 1, provider, c.jobType, SEPOLIA, keccak256(r), keccak256(e), c.metadataHash, FEE + ); + vm.prank(provider); + uint256 id = mkt.registerAgentCard(c, r, e); + + assertEq(id, 1); + assertEq(mkt.agentCardCount(), 1); + assertEq(mkt.agentCardOf(provider), id); + AgentCardView memory v = mkt.getAgentCard(id); + assertEq(v.card.provider, provider); + assertEq(v.card.jobType, c.jobType); + assertEq(v.card.metadataURI, c.metadataURI); + assertEq(v.card.metadataHash, c.metadataHash); + assertEq(v.card.chainNamespace, SEPOLIA); + assertEq(v.card.providerFee, FEE); + assertEq(v.card.paymentToken, address(token)); + assertEq(v.card.principalMin, c.principalMin); + assertEq(v.card.principalMax, c.principalMax); + assertEq(v.card.minDuration, c.minDuration); + assertEq(v.card.maxDuration, c.maxDuration); + assertEq(v.card.minExecuteWindow, c.minExecuteWindow); + assertEq(v.card.settleWindow, c.settleWindow); + assertTrue(v.card.active); + assertEq(v.rules, r, "rules stored byte-equal"); + assertEq(v.jobSpecTemplate, e, "template stored byte-equal"); + assertEq(v.version, 1); + assertFalse(v.verified); + assertFalse(v.disabled); + assertEq(mkt.agentCardVersion(id), 1); + } + + function test_MR02_providerAndActiveAreContractWritten() public { + AgentCard memory c = _card(); + c.provider = stranger; + c.active = false; + uint256 id = _register(c, _rules(), _lendingTemplate()); + assertEq(mkt.getAgentCard(id).card.provider, provider); + assertTrue(mkt.getAgentCard(id).card.active); + assertEq(mkt.agentCardOf(stranger), 0); + } + + function _expectInvalidCard(AgentCard memory c, string memory reason) internal { + bytes memory r = abi.encode(_rules()); + bytes memory e = abi.encode(_lendingTemplate()); + vm.prank(provider); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.InvalidAgentCard.selector, reason)); + mkt.registerAgentCard(c, r, e); + } + + function test_MR03_eachInvalidCardField_reverts() public { + AgentCard memory c = _card(); + c.jobType = bytes32(0); + _expectInvalidCard(c, "job type zero"); + c = _card(); + c.metadataURI = ""; + _expectInvalidCard(c, "metadata uri empty"); + c = _card(); + c.metadataHash = bytes32(0); + _expectInvalidCard(c, "metadata hash zero"); + + string[5] memory badChains = + ["solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", "eip155:", "eip155", "EIP155:11155111", ""]; + for (uint256 i; i < badChains.length; ++i) { + c = _card(); + c.chainNamespace = badChains[i]; + _expectInvalidCard(c, "chain namespace"); + } + + vm.prank(admin); + mkt.setEvaluator(provider); + _expectInvalidCard(_card(), "provider is evaluator"); + vm.prank(admin); + mkt.setEvaluator(universalEvaluator); + + c = _card(); + c.principalMin = 0; + c.principalMax = 0; + _expectInvalidCard(c, "principal range"); + c = _card(); + c.principalMin = 2; + c.principalMax = 1; + _expectInvalidCard(c, "principal range"); + c = _card(); + c.minDuration = 1 hours - 1; + _expectInvalidCard(c, "duration range"); + c = _card(); + c.minDuration = 2 days; + c.maxDuration = 1 days; + _expectInvalidCard(c, "duration range"); + c = _card(); + c.settleWindow = 0; + _expectInvalidCard(c, "settle window"); + c = _card(); + c.minExecuteWindow = 30 days - 2 hours + 1; + _expectInvalidCard(c, "execute window"); + + // every boundary passes: principal min == max, min duration 1 h, min == max duration, window == max + c = _card(); + c.principalMin = 7; + c.principalMax = 7; + c.minDuration = 1 hours; + c.minExecuteWindow = 30 days - 2 hours; + _register(c, _rules(), _lendingTemplate()); + c = _card(); + c.minDuration = 30 days; + _registerAs(provider2, c, _rules(), _lendingTemplate()); // one card per provider: a second provider + } + + function test_MR04_pushChain_refused() public { + string memory push = string.concat("eip155:", Strings.toString(block.chainid)); + bytes32 pushHash = keccak256(bytes(push)); + assertEq(mkt.PUSH_CHAIN_HASH(), pushHash); + vm.prank(admin); + mkt.setCEADeployment(pushHash, address(ceaFactory), ceaProxyImpl); // refused even with a deployment + AgentCard memory c = _card(); + c.chainNamespace = push; + bytes memory r = abi.encode(_rules()); + bytes memory e = abi.encode(_lendingTemplate()); + vm.prank(provider); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.ChainNotSupported.selector, pushHash)); + mkt.registerAgentCard(c, r, e); + } + + function test_MR05_unsupportedEvmChain_refused() public { + AgentCard memory c = _card(); + c.chainNamespace = "eip155:137"; + bytes memory r = abi.encode(_rules()); + bytes memory e = abi.encode(_lendingTemplate()); + vm.prank(provider); + vm.expectRevert( + abi.encodeWithSelector(UniversalMarketplaceErrors.ChainNotSupported.selector, keccak256("eip155:137")) + ); + mkt.registerAgentCard(c, r, e); + } + + function _expectInvalidRules(AgentCardRules memory r, string memory reason) internal { + bytes memory rules = abi.encode(r); + bytes memory e = abi.encode(_lendingTemplate()); + AgentCard memory c = _card(); + vm.prank(provider); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.InvalidAgentCard.selector, reason)); + mkt.registerAgentCard(c, rules, e); + } + + function test_MR06_assetTeeth() public { + AgentCardRules memory r = _rules(); + r.assets[0].token = makeAddr("codelessAsset"); + _expectInvalidRules(r, "asset"); + + MockPRC20Source.Answer[4] memory malformed = [ + MockPRC20Source.Answer.Reverts, + MockPRC20Source.Answer.Short, + MockPRC20Source.Answer.BadOffset, + MockPRC20Source.Answer.Overlong + ]; + for (uint256 i; i < malformed.length; ++i) { + pUSDC.setAnswer(malformed[i]); + _expectInvalidRules(_rules(), "asset"); + } + pUSDC.setAnswer(MockPRC20Source.Answer.Namespace); + pUSDC.setNamespace("eip155:1"); + _expectInvalidRules(_rules(), "asset chain"); + + pUSDC.setNamespace(SEPOLIA); + _registerLending(); + } + + function test_MR07_rulesErrorsSurface() public { + AgentCardRules memory r = _rules(); + r.allowedCalls[0].pins[1].op = PinOp.EQ; // the approve amount is no longer a ceiling + _expectInvalidRules(r, "approve amount not capped"); + } + + /// @dev The criteria template is stored as given: registration never judges it. A template that writes a fill + /// outside its args registers, and fails only when a job is built from it. + function test_MR08_criteriaNotJudgedAtRegistration() public { + JobSpecTemplate memory t = _lendingTemplate(); + ReadTemplate[] memory reads = new ReadTemplate[](3); + reads[0] = t.reads[0]; + reads[1] = t.reads[1]; + reads[2] = _balanceOfCEA(SEPOLIA_ID, weth); // read by no check + t.reads = reads; + t.reads[0].fills[0].word = 1; // args are one word long + uint256 id = _register(_card(), _rules(), t); + assertEq(mkt.getAgentCard(id).jobSpecTemplate, abi.encode(t), "stored byte-equal"); + + JobInputs memory job = _inputs(PRINCIPAL); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.FillOutOfBounds.selector, 0, 0)); + mkt.buildCreateJobCalldata(id, user, 0, job); // the same build openJob runs at step 9 + } + + function test_MR09_assetIndependent() public { + assertTrue(address(pETH) != address(kernel.paymentToken()), "pETH is not the kernel's payment token"); + AgentCardRules memory r = _rules(); + r.assets[0].token = address(pETH); + uint256 id = _register(_card(), r, _lendingTemplate()); + OpenJobParams memory p = _readyAt(id, 0, r, _inputs(PRINCIPAL)); + (uint256 jobId, address agw) = _open(p); + assertEq(kernel.getJob(jobId).client, agw); + assertEq(abi.decode(mkt.getAgentCard(id).rules, (AgentCardRules)).assets[0].token, address(pETH)); + } + + function test_MR10_paused() public { + vm.prank(admin); + mkt.pause(); + bytes memory r = abi.encode(_rules()); + bytes memory e = abi.encode(_lendingTemplate()); + AgentCard memory c = _card(); + vm.prank(provider); + vm.expectRevert(PausableUpgradeable.EnforcedPause.selector); + mkt.registerAgentCard(c, r, e); + } + + function test_MR11_onePerProvider() public { + uint256 id = _registerLending(); + assertEq(mkt.agentCardOf(provider), id); + + bytes memory r = abi.encode(_rules()); + bytes memory e = abi.encode(_swapTemplate()); + AgentCard memory c = _card(); + vm.prank(provider); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.AgentCardAlreadyRegistered.selector, provider)); + mkt.registerAgentCard(c, r, e); + + uint256 id2 = _registerAs(provider2, _card(), _rules(), _swapTemplate()); + assertEq(mkt.agentCardOf(provider2), id2); + assertEq(mkt.agentCardOf(provider), id, "unchanged"); + + vm.prank(admin); + mkt.disableAgentCard(id); + assertEq(mkt.agentCardOf(provider), id, "a disabled card still counts"); + vm.prank(provider); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.AgentCardAlreadyRegistered.selector, provider)); + mkt.registerAgentCard(c, r, e); + } + + function test_MR12_paymentTokenGuard() public { + address[2] memory bad = [address(pUSDC), address(0)]; + for (uint256 i; i < 2; ++i) { + AgentCard memory c = _card(); + c.paymentToken = bad[i]; + _expectInvalidCard(c, "payment token"); + } + uint256 id = _registerLending(); + assertEq(mkt.getAgentCard(id).card.paymentToken, address(kernel.paymentToken())); + + AgentCard memory u = _card(); + u.paymentToken = address(pUSDC); + _expectInvalidUpdate(id, u, abi.encode(_rules()), abi.encode(_lendingTemplate()), "payment token"); + _update(id, _card(), _rules(), _lendingTemplate()); + assertEq(mkt.agentCardVersion(id), 2); + } + + function test_MR13_everyAssetOnChain() public { + pETH.setNamespace("eip155:1"); + _expectInvalidRules(_rulesTwoAssets(), "asset chain"); + pETH.setNamespace(SEPOLIA); + + AgentCardRules memory r = _rulesTwoAssets(); + r.assets[1].token = makeAddr("codelessAsset1"); + _expectInvalidRules(r, "asset"); + + uint256 id = _register(_card(), _rulesTwoAssets(), _lendingTemplate()); + assertEq(abi.decode(mkt.getAgentCard(id).rules, (AgentCardRules)).assets.length, 2); + } + + function test_MR14_rulesErrorsSurface() public { + AgentCardRules memory r = _rules(); + r.assets = new AssetCap[](0); + _expectInvalidRules(r, "asset count"); + r = _rules(); + r.allowedCalls[1].pins[0].op = PinOp.MAX; + _expectInvalidRules(r, "wallet marker op"); + r = _rules(); + r.assets[0].maxTotal = PRINCIPAL; + _expectInvalidRules(r, "principal total not marker"); + + uint256 id = _registerLending(); + r = _rules(); + r.allowedCalls[0].selector = INCREASE_ALLOWANCE; + _expectInvalidUpdate(id, _card(), abi.encode(r), abi.encode(_lendingTemplate()), "increaseAllowance"); + } + + // ═════════════════════════════ ML · card lifecycle ═════════════════════════════ + + function test_ML01_setAgentCardActive() public { + uint256 id = _registerLending(); + vm.prank(stranger); + vm.expectRevert(UniversalMarketplaceErrors.CallerIsNotProvider.selector); + mkt.setAgentCardActive(id, false); + vm.prank(provider); + vm.expectRevert(UniversalMarketplaceErrors.CallerIsNotProvider.selector); + mkt.setAgentCardActive(999, false); + + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.AgentCardStatusChanged(id, false); + vm.prank(provider); + mkt.setAgentCardActive(id, false); + assertFalse(mkt.getAgentCard(id).card.active); + vm.prank(provider); + mkt.setAgentCardActive(id, true); + assertTrue(mkt.getAgentCard(id).card.active); + + vm.prank(admin); + mkt.disableAgentCard(id); + vm.prank(provider); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.AgentCardDisabled.selector, id)); + mkt.setAgentCardActive(id, true); + vm.prank(provider); + mkt.setAgentCardActive(id, false); // switching off stays allowed + } + + function test_ML02_disableAgentCard() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); + vm.prank(admin); + mkt.verifyAgentCard(id, 1); + + vm.prank(stranger); + vm.expectRevert(_adminRevert(stranger)); + mkt.disableAgentCard(id); + + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.AgentCardVerificationRevoked(id); + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.AgentCardDisabled(id); + vm.prank(admin); + mkt.disableAgentCard(id); + + AgentCardView memory v = mkt.getAgentCard(id); + assertTrue(v.disabled); + assertTrue(mkt.isAgentCardDisabled(id)); + assertFalse(v.card.active); + assertFalse(v.verified); + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.AgentCardInactive.selector)); + + vm.prank(admin); + vm.expectRevert(UniversalMarketplaceErrors.AgentCardInactive.selector); + mkt.disableAgentCard(999); + } + + function test_ML03_verifyAgentCard() public { + uint256 id = _registerLending(); + vm.prank(stranger); + vm.expectRevert(_adminRevert(stranger)); + mkt.verifyAgentCard(id, 1); + vm.prank(admin); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.AgentCardVersionMismatch.selector, 2, 1)); + mkt.verifyAgentCard(id, 2); + vm.prank(admin); + vm.expectRevert(UniversalMarketplaceErrors.AgentCardInactive.selector); + mkt.verifyAgentCard(999, 1); + + vm.prank(provider); + mkt.setAgentCardActive(id, false); // a card its provider switched off can still be verified + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.AgentCardVerified(id, 1); + vm.prank(admin); + mkt.verifyAgentCard(id, 1); + assertTrue(mkt.isAgentCardVerified(id)); + assertTrue(mkt.getAgentCard(id).verified); + + uint256 disabled = _registerAs(provider2, _card(), _rules(), _lendingTemplate()); + vm.startPrank(admin); + mkt.disableAgentCard(disabled); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.AgentCardDisabled.selector, disabled)); + mkt.verifyAgentCard(disabled, 1); + vm.stopPrank(); + } + + function test_ML04_verify_racedByUpdate() public { + uint256 id = _registerLending(); + _update(id, _card(), _rules(), _lendingTemplate()); + vm.prank(admin); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.AgentCardVersionMismatch.selector, 1, 2)); + mkt.verifyAgentCard(id, 1); + vm.prank(admin); + mkt.verifyAgentCard(id, 2); + assertTrue(mkt.isAgentCardVerified(id)); + } + + function test_ML05_revokeVerification() public { + uint256 id = _registerLending(); + vm.prank(admin); + mkt.verifyAgentCard(id, 1); + vm.prank(stranger); + vm.expectRevert(_adminRevert(stranger)); + mkt.revokeAgentCardVerification(id); + + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.AgentCardVerificationRevoked(id); + vm.prank(admin); + mkt.revokeAgentCardVerification(id); + assertFalse(mkt.isAgentCardVerified(id)); + + vm.recordLogs(); + vm.prank(admin); + mkt.revokeAgentCardVerification(id); + assertEq(vm.getRecordedLogs().length, 0, "revoking an unverified card logs nothing"); + + vm.prank(admin); + vm.expectRevert(UniversalMarketplaceErrors.AgentCardInactive.selector); + mkt.revokeAgentCardVerification(999); + } + + function _update(uint256 id, AgentCard memory c, AgentCardRules memory r, JobSpecTemplate memory t) internal { + bytes memory rules = abi.encode(r); + bytes memory template = abi.encode(t); + vm.prank(provider); + mkt.updateAgentCard(id, c, rules, template); + } + + /// @dev Every mutable field changed, two assets, a fourth (withdraw) call, and the swap criteria. + function _updated() + internal + view + returns (AgentCard memory c, AgentCardRules memory r, JobSpecTemplate memory t) + { + c = _card(); + c.jobType = keccak256("SWAP"); + c.metadataURI = "ipfs://card-v2"; + c.metadataHash = keccak256("card-v2.json"); + c.providerFee = FEE * 3; + c.principalMin = 200e6; + c.principalMax = 2_000e6; + c.minDuration = 4 hours; + c.maxDuration = 10 days; + c.minExecuteWindow = 20 minutes; + c.settleWindow = 3 hours; + r = _rulesTwoAssets(); + r.maxGasPerCall = 2 ether; + r.allowedCalls = + _appendCall(r.allowedCalls, _allowed(pool, WITHDRAW, 0, false, _pins1(68, PinOp.EQ, MARKER_WALLET))); + t = _swapTemplate(); + t.allowedMutability = AllowedMutability.CLIENT; + } + + function _appendCall(AllowedCall[] memory calls, AllowedCall memory c) + internal + pure + returns (AllowedCall[] memory out) + { + out = new AllowedCall[](calls.length + 1); + for (uint256 i; i < calls.length; ++i) { + out[i] = calls[i]; + } + out[calls.length] = c; + } + + function test_ML06_update_updatesEveryMutableField() public { + uint256 id = _registerLending(); + vm.prank(provider); + mkt.setAgentCardActive(id, false); + (AgentCard memory c, AgentCardRules memory r, JobSpecTemplate memory t) = _updated(); + c.provider = stranger; // ignored + c.active = true; // ignored: the provider's switch stays off + bytes memory rules = abi.encode(r); + bytes memory template = abi.encode(t); + + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.AgentCardUpdated( + id, 2, keccak256(rules), keccak256(template), c.metadataHash, c.providerFee + ); + vm.prank(provider); + mkt.updateAgentCard(id, c, rules, template); + + AgentCardView memory v = mkt.getAgentCard(id); + assertEq(v.card.provider, provider, "provider kept"); + assertEq(v.card.chainNamespace, SEPOLIA, "chain kept"); + assertFalse(v.card.active, "active kept"); + assertEq(v.card.jobType, c.jobType); + assertEq(v.card.metadataURI, c.metadataURI); + assertEq(v.card.metadataHash, c.metadataHash); + assertEq(v.card.providerFee, c.providerFee); + assertEq(v.card.paymentToken, c.paymentToken); + assertEq(v.card.principalMin, c.principalMin); + assertEq(v.card.principalMax, c.principalMax); + assertEq(v.card.minDuration, c.minDuration); + assertEq(v.card.maxDuration, c.maxDuration); + assertEq(v.card.minExecuteWindow, c.minExecuteWindow); + assertEq(v.card.settleWindow, c.settleWindow); + assertEq(v.rules, rules); + assertEq(v.jobSpecTemplate, template); + assertEq(v.version, 2); + assertEq(mkt.agentCardCount(), 1, "no new card"); + + // and an active card stays active when the input says inactive + vm.prank(provider); + mkt.setAgentCardActive(id, true); + c.active = false; + _update(id, c, r, t); + assertTrue(mkt.getAgentCard(id).card.active); + assertEq(mkt.agentCardVersion(id), 3); + } + + function test_ML07_update_clearsVerification() public { + uint256 id = _registerLending(); + vm.prank(admin); + mkt.verifyAgentCard(id, 1); + AgentCard memory c = _card(); + bytes memory r = abi.encode(_rules()); + bytes memory e = abi.encode(_lendingTemplate()); + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.AgentCardVerificationRevoked(id); + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.AgentCardUpdated(id, 2, keccak256(r), keccak256(e), c.metadataHash, c.providerFee); + vm.prank(provider); + mkt.updateAgentCard(id, c, r, e); + assertFalse(mkt.isAgentCardVerified(id)); + } + + function test_ML08_update_access() public { + uint256 id = _registerLending(); + AgentCard memory c = _card(); + bytes memory r = abi.encode(_rules()); + bytes memory e = abi.encode(_lendingTemplate()); + + vm.prank(stranger); + vm.expectRevert(UniversalMarketplaceErrors.CallerIsNotProvider.selector); + mkt.updateAgentCard(id, c, r, e); + vm.prank(provider); + vm.expectRevert(UniversalMarketplaceErrors.CallerIsNotProvider.selector); + mkt.updateAgentCard(999, c, r, e); + + vm.prank(admin); + mkt.pause(); + vm.prank(provider); + vm.expectRevert(PausableUpgradeable.EnforcedPause.selector); + mkt.updateAgentCard(id, c, r, e); + vm.prank(admin); + mkt.unpause(); + + vm.prank(admin); + mkt.disableAgentCard(id); + vm.prank(provider); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.AgentCardDisabled.selector, id)); + mkt.updateAgentCard(id, c, r, e); + } + + function test_ML09_update_chainImmutable() public { + uint256 id = _registerLending(); + bytes32 baseSepolia = keccak256("eip155:84532"); + vm.prank(admin); + mkt.setCEADeployment(baseSepolia, address(ceaFactory), ceaProxyImpl); + AgentCard memory c = _card(); + c.chainNamespace = "eip155:84532"; + bytes memory r = abi.encode(_rules()); + bytes memory e = abi.encode(_lendingTemplate()); + vm.prank(provider); + vm.expectRevert(UniversalMarketplaceErrors.AgentCardIdentityImmutable.selector); + mkt.updateAgentCard(id, c, r, e); + } + + function test_ML10_update_validatesLikeRegistration() public { + uint256 id = _registerLending(); + AgentCard memory c = _card(); + c.settleWindow = 0; + _expectInvalidUpdate(id, c, abi.encode(_rules()), abi.encode(_lendingTemplate()), "settle window"); + + AgentCardRules memory r = _rules(); + r.allowedCalls[0].selector = INCREASE_ALLOWANCE; + _expectInvalidUpdate(id, _card(), abi.encode(r), abi.encode(_lendingTemplate()), "increaseAllowance"); + + assertEq(mkt.agentCardVersion(id), 1, "no failed update bumped the version"); + } + + function _expectInvalidUpdate(uint256 id, AgentCard memory c, bytes memory r, bytes memory e, string memory reason) + internal + { + vm.prank(provider); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.InvalidAgentCard.selector, reason)); + mkt.updateAgentCard(id, c, r, e); + } + + function test_ML11_update_invalidatesOldIntents() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); + _update(id, _card(), _rules(), _lendingTemplate()); // same content, version 2 + + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.AgentCardVersionMismatch.selector, 1, 2)); + p.cardVersion = 2; + _expectOpen( + p, + abi.encodeWithSelector(UniversalMarketplaceErrors.IntentExecMismatch.selector, _calldataHash(id, 0, p.job)) + ); + assertEq(factory.walletCount(user), 0, "nothing deployed"); + } + + function test_ML12_update_leavesOpenedJobsUntouched() public { + uint256 id = _registerLending(); + (uint256 jobId, address agw) = _open(_ready(id)); + IAgenticCommerce.Job memory before = kernel.getJob(jobId); + + (AgentCard memory c, AgentCardRules memory r, JobSpecTemplate memory t) = _updated(); + _update(id, c, r, t); + + IAgenticCommerce.Job memory afterJob = kernel.getJob(jobId); + assertEq(afterJob.provider, before.provider); + assertEq(afterJob.evaluator, before.evaluator); + assertEq(afterJob.description, before.description); + assertEq(afterJob.hook, before.hook); + assertEq(mkt.cardOfJob(jobId), id); + assertEq(mkt.agwOfJob(jobId), agw); + assertEq(mkt.activeJobOf(agw), jobId); + assertEq(mkt.rulesOfJob(jobId), MockAGW(payable(agw)).RULES_ID()); + assertEq(mkt.cardVersionOfJob(jobId), 1, "the version the job was opened against"); + } + + function test_ML13_openJob_afterUpdate_usesNewContent() public { + uint256 id = _registerLending(); + JobSpecTemplate memory t = _lendingTemplate(); + t.checks[1].value = 0.05e27; + AgentCardRules memory r = _rules(); + r.maxGasPerCall = 2 ether; + _update(id, _card(), r, t); + + OpenJobParams memory p = _readyAt(id, 0, r, _inputs(PRINCIPAL)); + (uint256 jobId, address agw) = _open(p); + bytes memory description = bytes(kernel.getJob(jobId).description); + assertEq(description, _expectedDescription(t, id, 2, agw, p.job)); + JobSpec memory spec = abi.decode(description, (JobSpec)); + assertEq(spec.checks[1].target, 0.05e27, "the new criteria"); + assertEq(spec.origin, keccak256(abi.encode(address(mkt), id, uint256(2), PRINCIPAL)), "origin carries v2"); + assertEq(mkt.cardVersionOfJob(jobId), 2); + assertEq(_granted(agw).maxGasPerCall, 2 ether, "the new rules"); + } + + // ═════════════════════════════ MS · openJob ═════════════════════════════ + + function test_MS01_freshWallet_happyPath() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); + address agw = p.intent.wallet; + uint256 expectedJobId = kernel.jobCounter() + 1; + + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.JobOpened(id, user, agw, expectedJobId, keccak256("mock-rules"), PRINCIPAL, 1); + vm.prank(relayer); + (uint256 jobId, address got, bytes32 rulesId) = mkt.openJob(p); + + assertEq(jobId, expectedJobId); + assertEq(got, agw, "deployed at the predicted address"); + assertEq(factory.ownerOf(agw), user); + MockAGW w = MockAGW(payable(agw)); + assertEq(rulesId, w.RULES_ID()); + assertEq(w.lastSessionHash(), keccak256(abi.encode(p.session))); + assertEq(w.lastGrantIntentHash(), keccak256(abi.encode(p.intent)), "grant got the signed intent"); + assertEq(w.lastExecIntentHash(), keccak256(abi.encode(p.intent)), "exec got the same intent"); + assertEq(w.lastGrantCaller(), address(mkt)); + assertEq(w.lastExecCalldataHash(), _calldataHash(id, 0, p.job)); + + IAgenticCommerce.Job memory j = kernel.getJob(jobId); + assertEq(j.client, agw); + assertEq(j.provider, provider); + assertEq(j.evaluator, universalEvaluator); + assertEq(j.hook, address(hook)); + assertEq(j.expiredAt, p.job.expiredAt); + assertEq(j.budget, 0); + assertEq(uint8(j.status), uint8(IAgenticCommerce.JobStatus.Open)); + assertEq(bytes(j.description), _expectedDescription(_lendingTemplate(), id, 1, agw, p.job)); + + assertEq(mkt.activeJobOf(agw), jobId); + assertEq(mkt.cardOfJob(jobId), id); + assertEq(mkt.agwOfJob(jobId), agw); + assertEq(mkt.rulesOfJob(jobId), rulesId); + assertEq(mkt.cardVersionOfJob(jobId), 1); + } + + function test_MS02_movesNoFunds() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); + address agw = p.intent.wallet; + address[3] memory who = [user, agw, address(mkt)]; + uint256[3] memory tokenBefore; + uint256[3] memory assetBefore; + uint256[3] memory ethBefore; + for (uint256 i; i < 3; ++i) { + tokenBefore[i] = token.balanceOf(who[i]); + assetBefore[i] = pUSDC.balanceOf(who[i]); + ethBefore[i] = who[i].balance; + } + assertEq(token.allowance(user, address(mkt)), 0, "no allowance"); + assertEq(pUSDC.allowance(user, address(mkt)), 0, "no allowance"); + assertEq(agw.balance, 0, "no PC in the AGW"); + + _open(p); + + for (uint256 i; i < 3; ++i) { + assertEq(token.balanceOf(who[i]), tokenBefore[i], "payment token moved"); + assertEq(pUSDC.balanceOf(who[i]), assetBefore[i], "rules asset moved"); + assertEq(who[i].balance, ethBefore[i], "PC moved"); + } + assertEq(token.balanceOf(address(mkt)), 0); + assertEq(address(mkt).balance, 0); + } + + function test_MS03_existingWallet_skipsDeploy() public { + uint256 id = _registerLending(); + (uint256 job1, address agw) = _open(_ready(id)); + vm.prank(provider); + kernel.reject(job1, bytes32(0), ""); + + OpenJobParams memory p = _readyAt(id, 0, _rules(), _inputs(PRINCIPAL)); + assertEq(p.intent.grantNonce, 1, "preview reads the live grant nonce"); + assertEq(p.intent.nonceSeq, 1, "preview reads the live lane"); + (uint256 job2, address again) = _open(p); + assertEq(again, agw); + assertEq(factory.walletCount(user), 1, "no second wallet"); + assertEq(job2, job1 + 1); + assertEq(MockAGW(payable(agw)).grantNonce(), 2, "rules granted again"); + assertEq(mkt.activeJobOf(agw), job2); + } + + function test_MS04_existingWallet_wrongOwner() public { + uint256 id = _registerLending(); + (uint256 job1, address agw) = _open(_ready(id)); + vm.prank(provider); + kernel.reject(job1, bytes32(0), ""); + OpenJobParams memory p = _readyAt(id, 0, _rules(), _inputs(PRINCIPAL)); + // the factory's registry disagrees with the derivation (MockAGWFactory.ownerOf is slot 2) + vm.store(address(factory), keccak256(abi.encode(agw, uint256(2))), bytes32(uint256(uint160(stranger)))); + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.WalletOwnerMismatch.selector, user, stranger)); + } + + function test_MS04b_factoryDeploysElsewhere_agwMismatch() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); + factory.setMisdeploy(true); + bytes32 salt = keccak256(abi.encode(keccak256(abi.encode(user, uint96(0))))); + address elsewhere = vm.computeCreate2Address( + salt, keccak256(abi.encodePacked(type(MockAGW).creationCode, abi.encode(user))), address(factory) + ); + _expectOpen( + p, abi.encodeWithSelector(UniversalMarketplaceErrors.AGWMismatch.selector, p.intent.wallet, elsewhere) + ); + } + + function test_MS05_cardInactive_unknown() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); + + vm.prank(provider); + mkt.setAgentCardActive(id, false); + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.AgentCardInactive.selector)); + vm.prank(provider); + mkt.setAgentCardActive(id, true); + + p.cardId = 999; + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.AgentCardInactive.selector)); + p.cardId = id; + _open(p); + } + + function test_MS06_cardVersionMismatch() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); + p.cardVersion = 2; + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.AgentCardVersionMismatch.selector, 2, 1)); + p.cardVersion = 0; + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.AgentCardVersionMismatch.selector, 0, 1)); + } + + function test_MS07_principalOutOfRange() public { + uint256 id = _registerLending(); + uint256[2] memory bad = [uint256(100e6 - 1), 1_000e6 + 1]; + for (uint256 i; i < 2; ++i) { + OpenJobParams memory p = _readyAt(id, uint96(factory.walletCount(user)), _rules(), _inputs(bad[i])); + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.PrincipalOutOfRange.selector)); + } + _open(_readyAt(id, 0, _rules(), _inputs(100e6))); + _open(_readyAt(id, 1, _rules(), _inputs(1_000e6))); + } + + function _withTimes(uint256 expiredAt, uint256 executeBy) internal view returns (JobInputs memory j) { + j = _inputs(PRINCIPAL); + // forge-lint: disable-next-line(unsafe-typecast) + j.expiredAt = uint48(expiredAt); // a timestamp within 31 days of now + // forge-lint: disable-next-line(unsafe-typecast) + j.executeBy = uint48(executeBy); // a timestamp within 31 days of now + } + + function test_MS08_expiryOutOfRange() public { + uint256 id = _registerLending(); + uint256 t = block.timestamp; + JobInputs memory tooSoon = _withTimes(t + 3 hours - 1, t + 10 minutes); + JobInputs memory tooLate = _withTimes(t + 30 days + 1, t + 10 minutes); + _expectOpen( + _readyAt(id, 0, _rules(), tooSoon), + abi.encodeWithSelector(UniversalMarketplaceErrors.ExpiryOutOfRange.selector) + ); + _expectOpen( + _readyAt(id, 0, _rules(), tooLate), + abi.encodeWithSelector(UniversalMarketplaceErrors.ExpiryOutOfRange.selector) + ); + _open(_readyAt(id, 0, _rules(), _withTimes(t + 3 hours, t + 10 minutes))); + _open(_readyAt(id, 1, _rules(), _withTimes(t + 30 days, t + 10 minutes))); + } + + function test_MS09_executeByOutOfRange() public { + uint256 id = _registerLending(); + uint256 t = block.timestamp; + uint256 expiry = t + 7 days; + _expectOpen( + _readyAt(id, 0, _rules(), _withTimes(expiry, t + 10 minutes - 1)), + abi.encodeWithSelector(UniversalMarketplaceErrors.ExecuteByOutOfRange.selector) + ); + _expectOpen( + _readyAt(id, 0, _rules(), _withTimes(expiry, expiry - 2 hours + 1)), + abi.encodeWithSelector(UniversalMarketplaceErrors.ExecuteByOutOfRange.selector) + ); + _open(_readyAt(id, 0, _rules(), _withTimes(expiry, t + 10 minutes))); + _open(_readyAt(id, 1, _rules(), _withTimes(expiry, expiry - 2 hours))); + } + + function test_MS10_params() public { + uint256 id = _registerSwap(); + + OpenJobParams memory p = _readyAt(id, 0, _rules(), _swapInputs(0.5e18)); + p.job.params = new int256[](0); + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.ParamCountMismatch.selector, 1, 0)); + p = _readyAt(id, 0, _rules(), _swapInputs(0.5e18)); + p.job.params = new int256[](2); + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.ParamCountMismatch.selector, 1, 2)); + + p = _readyAt(id, 0, _rules(), _swapInputs(0.5e18)); + p.job.params[0] = 0; + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.ParamOutOfRange.selector, 0, int256(0))); + p = _readyAt(id, 0, _rules(), _swapInputs(0.5e18)); + p.job.params[0] = 1e30 + 1; + _expectOpen( + p, abi.encodeWithSelector(UniversalMarketplaceErrors.ParamOutOfRange.selector, 0, int256(1e30 + 1)) + ); + + (uint256 jobA,) = _open(_readyAt(id, 0, _rules(), _swapInputs(1))); + (uint256 jobB,) = _open(_readyAt(id, 1, _rules(), _swapInputs(1e30))); + assertEq(abi.decode(bytes(kernel.getJob(jobA).description), (JobSpec)).checks[0].target, 1); + assertEq(abi.decode(bytes(kernel.getJob(jobB).description), (JobSpec)).checks[0].target, 1e30); + } + + function test_MS11_intentWalletAndExecutor() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); + address agw = p.intent.wallet; + p.intent.wallet = stranger; + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.IntentWalletMismatch.selector, agw, stranger)); + p = _ready(id); + p.intent.executor = stranger; + _expectOpen( + p, abi.encodeWithSelector(UniversalMarketplaceErrors.ExecutorMismatch.selector, stranger, address(mkt)) + ); + } + + function _expectExecMismatch(OpenJobParams memory p, uint96 index) internal { + _expectOpen( + p, + abi.encodeWithSelector( + UniversalMarketplaceErrors.IntentExecMismatch.selector, _calldataHash(p.cardId, index, p.job) + ) + ); + } + + function test_MS12_intentExecMismatch_everyBoundInput() public { + uint256 id = _registerSwap(); + JobInputs memory job = _swapInputs(0.5e18); + + OpenJobParams memory p = _readyAt(id, 0, _rules(), job); + p.job.principal = PRINCIPAL + 1; + _expectExecMismatch(p, 0); + + p = _readyAt(id, 0, _rules(), _swapInputs(0.5e18)); + p.job.executeBy += 1; + _expectExecMismatch(p, 0); + + p = _readyAt(id, 0, _rules(), _swapInputs(0.5e18)); + p.job.expiredAt += 1; + _expectExecMismatch(p, 0); + + p = _readyAt(id, 0, _rules(), _swapInputs(0.5e18)); + p.job.params[0] += 1; + _expectExecMismatch(p, 0); + + // another wallet of the same owner: its CEA is in the criteria + p = _readyAt(id, 0, _rules(), _swapInputs(0.5e18)); + p.intent.index = 1; + (p.intent.wallet,) = factory.predictWallet(user, 1); + _expectExecMismatch(p, 1); + + p = _readyAt(id, 0, _rules(), _swapInputs(0.5e18)); + p.intent.mode = bytes32(uint256(1)); + _expectExecMismatch(p, 0); + + p = _readyAt(id, 0, _rules(), _swapInputs(0.5e18)); + p.intent.nonceKey = 0; + _expectExecMismatch(p, 0); + + p = _readyAt(id, 0, _rules(), _swapInputs(0.5e18)); + p.intent.execCalldataHash = keccak256("another call"); + _expectExecMismatch(p, 0); + } + + function test_MS13_intentSessionMismatch_noStateOnFailure() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); + p.session.salt = bytes32(uint256(1)); + uint256 jobsBefore = kernel.jobCounter(); + _expectOpen( + p, + abi.encodeWithSelector( + UniversalMarketplaceErrors.IntentSessionMismatch.selector, keccak256(abi.encode(p.session)) + ) + ); + assertEq(factory.walletCount(user), 0, "no wallet"); + assertEq(kernel.jobCounter(), jobsBefore, "no job"); + assertEq(mkt.activeJobOf(p.intent.wallet), 0); + } + + function _expectActive(uint256 id, address agw, uint256 jobId) internal { + assertEq(mkt.activeJobOf(agw), jobId); + _expectOpen( + _readyAt(id, 0, _rules(), _inputs(PRINCIPAL)), + abi.encodeWithSelector(UniversalMarketplaceErrors.WalletHasActiveJob.selector, agw, jobId) + ); + } + + function test_MS14_oneLiveJob() public { + uint256 id = _registerLending(); + + // Open → active; expired Open → free + (uint256 job1, address agw) = _open(_ready(id)); + _expectActive(id, agw, job1); + vm.warp(kernel.getJob(job1).expiredAt); + assertEq(mkt.activeJobOf(agw), 0, "free after an expired Open job"); + + // Open → Rejected → free + (uint256 job2,) = _open(_readyAt(id, 0, _rules(), _inputs(PRINCIPAL))); + vm.prank(provider); + kernel.reject(job2, bytes32(0), ""); + assertEq(mkt.activeJobOf(agw), 0, "free after Rejected"); + + // Funded → active; Submitted → active; Completed → free + (uint256 job3,) = _open(_readyAt(id, 0, _rules(), _inputs(PRINCIPAL))); + _budgetAndFund(job3, agw, FEE); + assertEq(uint8(_status(job3)), uint8(IAgenticCommerce.JobStatus.Funded)); + _expectActive(id, agw, job3); + vm.prank(provider); + kernel.submit(job3, keccak256("deliverable"), ""); + _expectActive(id, agw, job3); + vm.prank(universalEvaluator); + kernel.complete(job3, bytes32(0), ""); + assertEq(mkt.activeJobOf(agw), 0, "free after Completed"); + _open(_readyAt(id, 0, _rules(), _inputs(PRINCIPAL))); + } + + function test_MS15_jobVerification() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); + vm.prank(user); + factory.deployWalletWithSig(p.intent, "", ""); + MockAGW(payable(p.intent.wallet)).setMode(MockAGW.Mode.TwoJobs); + uint256 n = kernel.jobCounter(); + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.UnexpectedJobCount.selector, n, n + 2)); + + MockAGW(payable(p.intent.wallet)).setMode(MockAGW.Mode.ForeignClient); + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.JobMismatch.selector)); + + MockAGW(payable(p.intent.wallet)).setMode(MockAGW.Mode.OtherEvaluator); + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.JobMismatch.selector)); + } + + function test_MS16_providerIsEvaluator_afterSetEvaluator() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); + vm.prank(admin); + mkt.setEvaluator(provider); + _expectOpen(p, abi.encodeWithSelector(UniversalMarketplaceErrors.ProviderIsEvaluator.selector)); + } + + function test_MS17_8183Continuation_feeEnforcedAtFund() public { + uint256 id = _registerLending(); + (uint256 jobId, address agw) = _open(_ready(id)); + uint256 fee = mkt.getAgentCard(id).card.providerFee; + + // a provider who prices above the card cannot be funded: the owner's expectedBudget is the card fee + vm.prank(provider); + kernel.setBudget(jobId, fee + 1, ""); + engine.setPermission(MockAGW(payable(agw)).RULES_ID(), agw, true); + token.mint(agw, fee + 1); + bytes memory optParams = abi.encode(mkt.rulesOfJob(jobId)); + vm.startPrank(agw); + token.approve(address(kernel), fee + 1); + vm.expectRevert(IAgenticCommerce.BudgetMismatch.selector); + kernel.fund(jobId, fee, optParams); + vm.stopPrank(); + + uint256 escrowBefore = kernel.totalEscrowed(); + _budgetAndFund(jobId, agw, fee); + assertEq(uint8(_status(jobId)), uint8(IAgenticCommerce.JobStatus.Funded)); + assertEq(kernel.totalEscrowed() - escrowBefore, fee, "the kernel escrows the card fee"); + assertEq(kernel.getJob(jobId).budget, fee); + } + + /// @dev Ceilings = measured + 5%, rounded up to 10k (PRD 12 §6.5). Measured 2026-10-16 with the mock wallet + /// and factory, two-asset card: registerAgentCard 2,564,983 · openJob fresh 4,231,625 · openJob existing + /// 1,797,405. MockAGW now stores the granted initData (`lastPolicyInitData`), which is part of both + /// openJob figures. + uint256 internal constant REGISTER_GAS_CEILING = 2_700_000; + uint256 internal constant OPEN_FRESH_GAS_CEILING = 4_450_000; + uint256 internal constant OPEN_EXISTING_GAS_CEILING = 1_890_000; + + function test_MS18_gasCeilings() public { + AgentCard memory c = _card(); + bytes memory r = abi.encode(_rulesTwoAssets()); + bytes memory e = abi.encode(_lendingTemplate()); + vm.prank(provider); + uint256 g = gasleft(); + uint256 id = mkt.registerAgentCard(c, r, e); + uint256 used = g - gasleft(); + emit log_named_uint("registerAgentCard (two-asset lending card)", used); + assertLe(used, REGISTER_GAS_CEILING, "registerAgentCard (two-asset lending card)"); + + OpenJobParams memory p = _readyAt(id, 0, _rulesTwoAssets(), _inputs(PRINCIPAL)); + vm.prank(relayer); + g = gasleft(); + (uint256 jobId,,) = mkt.openJob(p); + used = g - gasleft(); + emit log_named_uint("openJob (fresh wallet)", used); + assertLe(used, OPEN_FRESH_GAS_CEILING, "openJob (fresh wallet)"); + + vm.prank(provider); + kernel.reject(jobId, bytes32(0), ""); + p = _readyAt(id, 0, _rulesTwoAssets(), _inputs(PRINCIPAL)); + vm.prank(relayer); + g = gasleft(); + mkt.openJob(p); + used = g - gasleft(); + emit log_named_uint("openJob (existing wallet)", used); + assertLe(used, OPEN_EXISTING_GAS_CEILING, "openJob (existing wallet)"); + } + + function test_MS19_openJob_twoAssets_principalMarkers() public { + uint256 id = _register(_card(), _rulesTwoAssets(), _lendingTemplate()); + OpenJobParams memory p = _readyAt(id, 0, _rulesTwoAssets(), _inputs(PRINCIPAL)); + address agw = p.intent.wallet; + uint256 expectedJobId = kernel.jobCounter() + 1; + + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.JobOpened(id, user, agw, expectedJobId, keccak256("mock-rules"), PRINCIPAL, 1); + (uint256 jobId,) = _open(p); + + assertEq(MockAGW(payable(agw)).lastSessionHash(), keccak256(abi.encode(p.session))); + assertEq(mkt.cardVersionOfJob(jobId), 1); + UniversalTerms memory t = _granted(agw); + assertEq(t.assets.length, 2); + assertEq(t.assets[0].token, address(pUSDC)); + assertEq(t.assets[0].maxPerCall, PRINCIPAL, "principal per-call: marker filled"); + assertEq(t.assets[0].maxTotal, PRINCIPAL, "principal total: marker filled"); + assertEq(t.assets[1].token, address(pETH)); + assertEq(t.assets[1].maxPerCall, 0); + assertEq(t.assets[1].maxTotal, 0); + assertEq(t.allowedCalls[0].pins[1].value, bytes32(PRINCIPAL), "approve amount pin filled"); + assertEq(t.allowedCalls[1].pins[0].value, _word(mkt.computeCEA(agw, SEPOLIA_HASH)), "wallet pin filled"); + assertEq(t.expectedCEA, mkt.computeCEA(agw, SEPOLIA_HASH)); + } + + function test_MS20_openJob_trancheCard() public { + AgentCardRules memory r = _rules(); + r.assets[0].maxPerCall = 100e6; + uint256 id = _register(_card(), r, _lendingTemplate()); + JobInputs memory job = _inputs(PRINCIPAL); + (address agw,) = factory.predictWallet(user, 0); + + UniversalTerms memory t = _termsFor(r, agw, job); + assertEq(t.assets[0].maxPerCall, 100e6, "an SDK copies a fixed per-call cap"); + t.assets[0].maxPerCall = PRINCIPAL; + _expectOpen( + _params(id, 0, job, _sessionOf(t)), + abi.encodeWithSelector(UniversalMarketplaceErrors.PrincipalCapMismatch.selector) + ); + + (, address opened) = _open(_readyAt(id, 0, r, job)); + assertEq(_granted(opened).assets[0].maxPerCall, 100e6); + assertEq(_granted(opened).assets[0].maxTotal, PRINCIPAL); + } + + function test_MS21_activeJobOf() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); + address agw = p.intent.wallet; + assertEq(mkt.activeJobOf(agw), 0, "before"); + + (uint256 job1,) = _open(p); + assertEq(mkt.activeJobOf(agw), job1, "Open"); + _expectOpen( + _readyAt(id, 0, _rules(), _inputs(PRINCIPAL)), + abi.encodeWithSelector(UniversalMarketplaceErrors.WalletHasActiveJob.selector, agw, job1) + ); + vm.warp(kernel.getJob(job1).expiredAt - 1); + assertEq(mkt.activeJobOf(agw), job1, "Open, one second before expiry"); + vm.warp(kernel.getJob(job1).expiredAt); + assertEq(mkt.activeJobOf(agw), 0, "Open, expired"); + + (uint256 job2,) = _open(_readyAt(id, 0, _rules(), _inputs(PRINCIPAL))); + _budgetAndFund(job2, agw, FEE); + assertEq(mkt.activeJobOf(agw), job2, "Funded"); + vm.prank(provider); + kernel.submit(job2, keccak256("deliverable"), ""); + vm.prank(universalEvaluator); + kernel.complete(job2, bytes32(0), ""); + assertEq(mkt.activeJobOf(agw), 0, "Completed"); + + (uint256 job3,) = _open(_readyAt(id, 0, _rules(), _inputs(PRINCIPAL))); + vm.prank(provider); + kernel.reject(job3, bytes32(0), ""); + assertEq(mkt.activeJobOf(agw), 0, "Rejected"); + assertEq(mkt.activeJobOf(makeAddr("neverSeen")), 0); + } + + function test_MS22_envelopeVersion_named() public { + uint256 id = _registerLending(); + JobInputs memory job = _inputs(PRINCIPAL); + (address agw,) = factory.predictWallet(user, 0); + bytes memory preV6 = abi.encode(SEPOLIA, abi.encode(_termsFor(_rules(), agw, job))); // (string, bytes) + Session memory s = _wrapSession(preV6, provider, _skeleton()); + _expectOpen( + _params(id, 0, job, s), abi.encodeWithSelector(UniversalMarketplaceErrors.EnvelopeVersionMismatch.selector, 64) + ); + assertEq(factory.walletCount(user), 0, "nothing deployed"); + } + + // ═════════════════════════════ MB · rules = card, through the marketplace ═════════════════════════════ + + function _sessionCase(function(Session memory) internal view mutate, bytes memory err) internal { + uint256 id = _lendingId(); + JobInputs memory job = _inputs(PRINCIPAL); + (address agw,) = factory.predictWallet(user, 0); + Session memory s = _sessionFor(_rules(), agw, job); + mutate(s); + _expectOpen(_params(id, 0, job, s), err); + } + + function _termsCase(function(UniversalTerms memory) internal view mutate, bytes memory err) internal { + uint256 id = _lendingId(); + JobInputs memory job = _inputs(PRINCIPAL); + (address agw,) = factory.predictWallet(user, 0); + UniversalTerms memory t = _termsFor(_rules(), agw, job); + mutate(t); + _expectOpen(_params(id, 0, job, _sessionOf(t)), err); + } + + function _otherAgent(Session memory s) internal view { + s.sessionValidatorInitData = abi.encode(stranger); + } + + function _wideInitData(Session memory s) internal view { + s.sessionValidatorInitData = abi.encode(provider, provider); + } + + function _noActions(Session memory s) internal pure { + s.actions = new ActionData[](0); + } + + function _twoActions(Session memory s) internal pure { + ActionData[] memory a = new ActionData[](2); + a[0] = s.actions[0]; + a[1] = s.actions[0]; + s.actions = a; + } + + function _twoPolicies(Session memory s) internal pure { + PolicyData[] memory p = new PolicyData[](2); + p[0] = s.actions[0].actionPolicies[0]; + p[1] = s.actions[0].actionPolicies[0]; + s.actions[0].actionPolicies = p; + } + + function _otherChain(Session memory s) internal pure { + (uint16 v,, bytes memory body) = abi.decode(s.actions[0].actionPolicies[0].initData, (uint16, string, bytes)); + s.actions[0].actionPolicies[0].initData = abi.encode(v, "eip155:1", body); + } + + function test_MB01_agentMismatch() public { + _sessionCase(_otherAgent, abi.encodeWithSelector(UniversalMarketplaceErrors.AgentMismatch.selector)); + _sessionCase(_wideInitData, abi.encodeWithSelector(UniversalMarketplaceErrors.AgentMismatch.selector)); + } + + function test_MB02_shape() public { + _sessionCase(_noActions, abi.encodeWithSelector(UniversalMarketplaceErrors.ActionCount.selector)); + _sessionCase(_twoActions, abi.encodeWithSelector(UniversalMarketplaceErrors.ActionCount.selector)); + _sessionCase(_twoPolicies, abi.encodeWithSelector(UniversalMarketplaceErrors.PolicyShape.selector, 0)); + _sessionCase(_otherChain, abi.encodeWithSelector(UniversalMarketplaceErrors.ChainMismatch.selector, 0)); + } + + function _otherAsset(UniversalTerms memory t) internal view { + t.assets[0].token = address(pETH); + } + + function _gasCapUp(UniversalTerms memory t) internal pure { + t.maxGasPerCall += 1; + } + + function _extraCall(UniversalTerms memory t) internal view { + t.allowedCalls = _appendCall(t.allowedCalls, _allowed(pool, WITHDRAW, 68, true, new ArgPin[](0))); + } + + function _missingCall(UniversalTerms memory t) internal pure { + t.allowedCalls = new AllowedCall[](0); + } + + function _valueChanged(UniversalTerms memory t) internal pure { + t.allowedCalls[0].maxValue = 1; + } + + function _totalNotPrincipal(UniversalTerms memory t) internal pure { + t.assets[0].maxTotal -= 1; + } + + function _perCallOverPrincipal(UniversalTerms memory t) internal pure { + t.assets[0].maxPerCall += 1; + } + + function _validUntilMoved(UniversalTerms memory t) internal pure { + t.validUntil += 1; + } + + function _attackerCEA(UniversalTerms memory t) internal pure { + t.expectedCEA = address(0xBAD); + } + + function test_MB03_terms() public { + _termsCase(_otherAsset, abi.encodeWithSelector(UniversalMarketplaceErrors.AssetMismatch.selector, 0)); + _termsCase(_gasCapUp, abi.encodeWithSelector(UniversalMarketplaceErrors.GasCapMismatch.selector)); + _termsCase(_extraCall, abi.encodeWithSelector(UniversalMarketplaceErrors.ActionsMismatch.selector)); + _termsCase(_missingCall, abi.encodeWithSelector(UniversalMarketplaceErrors.ActionsMismatch.selector)); + _termsCase(_valueChanged, abi.encodeWithSelector(UniversalMarketplaceErrors.ActionsMismatch.selector)); + _termsCase( + _totalNotPrincipal, abi.encodeWithSelector(UniversalMarketplaceErrors.PrincipalCapMismatch.selector) + ); + _termsCase( + _perCallOverPrincipal, abi.encodeWithSelector(UniversalMarketplaceErrors.PrincipalCapMismatch.selector) + ); + _termsCase(_validUntilMoved, abi.encodeWithSelector(UniversalMarketplaceErrors.ExpiryMismatch.selector)); + (address agw,) = factory.predictWallet(user, 0); + _termsCase( + _attackerCEA, + abi.encodeWithSelector( + UniversalMarketplaceErrors.ExpectedCEAMismatch.selector, ceaFactory.computeCEA(agw), address(0xBAD) + ) + ); + + // reordered: a four-call card, the session lists two calls the other way round + (, AgentCardRules memory four,) = _updated(); + uint256 id = _lendingId(); + _update(id, _card(), four, _lendingTemplate()); + JobInputs memory job = _inputs(PRINCIPAL); + UniversalTerms memory t = _termsFor(four, agw, job); + (t.allowedCalls[1], t.allowedCalls[3]) = (t.allowedCalls[3], t.allowedCalls[1]); + _expectOpen( + _params(id, 0, job, _sessionOf(t)), + abi.encodeWithSelector(UniversalMarketplaceErrors.ActionsMismatch.selector) + ); + } + + /// @dev D3 flips the old "per-call below principal passes": the card's per-call cap is `MARKER_PRINCIPAL`, so + /// the session's must EQUAL the principal. + function test_MB04_perCallMustEqualPrincipal() public { + uint256 id = _registerLending(); + JobInputs memory job = _inputs(PRINCIPAL); + (address agw,) = factory.predictWallet(user, 0); + UniversalTerms memory t = _termsFor(_rules(), agw, job); + t.assets[0].maxPerCall = PRINCIPAL / 4; + _expectOpen( + _params(id, 0, job, _sessionOf(t)), + abi.encodeWithSelector(UniversalMarketplaceErrors.PrincipalCapMismatch.selector) + ); + t.assets[0].maxPerCall = PRINCIPAL; + _open(_params(id, 0, job, _sessionOf(t))); + } + + // ═════════════════════════════ MV · views, admin, upgrade ═════════════════════════════ + + function test_MV01_getAgentCard_fullView() public { + uint256 id = _registerLending(); + vm.prank(admin); + mkt.verifyAgentCard(id, 1); + AgentCardView memory v = mkt.getAgentCard(id); + AgentCard memory expected = _card(); + expected.provider = provider; + expected.active = true; + assertEq(abi.encode(v.card), abi.encode(expected), "card"); + assertEq(v.rules, abi.encode(_rules())); + assertEq(v.jobSpecTemplate, abi.encode(_lendingTemplate())); + assertEq(v.version, 1); + assertTrue(v.verified); + assertFalse(v.disabled); + + AgentCardView memory none = mkt.getAgentCard(999); + AgentCardView memory zero; + assertEq(abi.encode(none), abi.encode(zero), "an unknown card reads all zero"); + } + + function test_MV02_computeCEA() public { + address agw = makeAddr("anyAGW"); + assertEq(mkt.computeCEA(agw, SEPOLIA_HASH), ceaFactory.computeCEA(agw)); + (address cea,) = ceaFactory.getCEAForPushAccount(agw); + assertEq(mkt.computeCEA(agw, SEPOLIA_HASH), cea); + vm.expectRevert( + abi.encodeWithSelector(UniversalMarketplaceErrors.ChainNotSupported.selector, bytes32(uint256(1))) + ); + mkt.computeCEA(agw, bytes32(uint256(1))); + } + + /// @dev After a destination implementation rotation, the stale config is refused until updated; the runbook is + /// `pause()` → rotate → `setCEADeployment` → `unpause()`. + function test_MV03_ceaRotation_staleCaught() public { + uint256 id = _registerLending(); + OpenJobParams memory signedBefore = _ready(id); + address newImpl = makeAddr("ceaProxyImplV2"); + vm.prank(admin); + ceaFactory.setCEAProxyImplementation(newImpl); + + // not paused: an SDK reading the destination factory signs the NEW CEA, into the wallet pin and the + // expected CEA; the marketplace still derives the old one, and the pin (C12) is the first to differ + JobInputs memory job = _inputs(PRINCIPAL); + address agw = signedBefore.intent.wallet; + Session memory s = _sessionOf(_fillTerms(_rules(), PRINCIPAL, job.expiredAt, ceaFactory.computeCEA(agw))); + assertTrue(ceaFactory.computeCEA(agw) != mkt.computeCEA(agw, SEPOLIA_HASH), "stale"); + _expectOpen(_params(id, 0, job, s), abi.encodeWithSelector(UniversalMarketplaceErrors.PinMismatch.selector, 1, 0)); + + // the runbook + vm.prank(admin); + mkt.pause(); + _expectOpen(signedBefore, abi.encodeWithSelector(PausableUpgradeable.EnforcedPause.selector)); + vm.prank(admin); + mkt.setCEADeployment(SEPOLIA_HASH, address(ceaFactory), newImpl); + vm.prank(admin); + mkt.unpause(); + assertEq(mkt.computeCEA(agw, SEPOLIA_HASH), ceaFactory.computeCEA(agw), "fresh"); + // an intent signed before the rotation names the old CEA in its criteria: refused + _expectOpen( + signedBefore, + abi.encodeWithSelector(UniversalMarketplaceErrors.IntentExecMismatch.selector, _calldataHash(id, 0, job)) + ); + _open(_ready(id)); // re-signed: the criteria's CEA moved too + } + + function test_MV04_buildCreateJobCalldata() public { + uint256 id = _registerSwap(); + JobInputs memory job = _swapInputs(0.5e18); + (bytes32 mode, bytes memory cd) = mkt.buildCreateJobCalldata(id, user, 0, job); + (address agw,) = factory.predictWallet(user, 0); + assertEq(mode, bytes32(0)); + bytes memory call = abi.encodeCall( + IAgenticCommerce.createJob, + ( + provider, + universalEvaluator, + uint256(job.expiredAt), + string(_expectedDescription(_swapTemplate(), id, 1, agw, job)), + address(hook) + ) + ); + assertEq(cd, abi.encodePacked(address(kernel), uint256(0), call)); + + bytes32 base = keccak256(cd); + JobInputs memory j = _swapInputs(0.5e18); + j.principal += 1; + assertTrue(_calldataHash(id, 0, j) != base, "principal"); + j = _swapInputs(0.5e18); + j.executeBy += 1; + assertTrue(_calldataHash(id, 0, j) != base, "executeBy"); + j = _swapInputs(0.5e18); + j.expiredAt += 1; + assertTrue(_calldataHash(id, 0, j) != base, "expiredAt"); + assertTrue(_calldataHash(id, 0, _swapInputs(0.5e18 + 1)) != base, "params"); + assertTrue(_calldataHash(id, 1, job) != base, "index"); + (, bytes memory otherOwner) = mkt.buildCreateJobCalldata(id, stranger, 0, job); + assertTrue(keccak256(otherOwner) != base, "owner"); + _update(id, _card(), _rules(), _swapTemplate()); + assertTrue(_calldataHash(id, 0, job) != base, "card version"); + + // what openJob executes is exactly this view's answer + OpenJobParams memory p = _readyAt(id, 0, _rules(), job); + (, address opened) = _open(p); + assertEq(MockAGW(payable(opened)).lastExecCalldataHash(), _calldataHash(id, 0, job)); + + vm.expectRevert(UniversalMarketplaceErrors.AgentCardInactive.selector); + mkt.buildCreateJobCalldata(999, user, 0, job); + } + + function test_MV05_previewIntent_roundTrips() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); + OwnerIntent memory i = p.intent; + (address agw,) = factory.predictWallet(user, 0); + assertEq(i.owner, user); + assertEq(i.wallet, agw); + assertEq(i.executor, address(mkt)); + assertEq(i.index, 0); + assertEq(i.sessionHash, keccak256(abi.encode(p.session))); + assertEq(i.mode, bytes32(0)); + assertEq(i.execCalldataHash, _calldataHash(id, 0, p.job)); + assertEq(i.nonceKey, OWNER_LANE_FLAG); + assertEq(i.nonceSeq, 0, "fresh wallet"); + assertEq(i.grantNonce, 0, "fresh wallet"); + assertEq(i.deadline, uint48(block.timestamp + 1 hours)); + assertEq(i.signerChainId, 1); + (uint256 jobId,) = _open(p); + + vm.prank(provider); + kernel.reject(jobId, bytes32(0), ""); + OwnerIntent memory again = _readyAt(id, 0, _rules(), _inputs(PRINCIPAL)).intent; + assertEq(again.nonceSeq, 1, "deployed: the live lane"); + assertEq(again.grantNonce, 1, "deployed: the live grant nonce"); + + _expectPreviewUnknownCard(); + } + + function _expectPreviewUnknownCard() internal { + Session memory s; + IntentRequest memory r = + IntentRequest({cardId: 999, owner: user, index: 0, job: _inputs(PRINCIPAL), deadline: 0, signerChainId: 1}); + vm.expectRevert(UniversalMarketplaceErrors.AgentCardInactive.selector); + mkt.previewIntent(r, s); + } + + function test_MV06_adminSetters() public { + vm.prank(stranger); + vm.expectRevert(_adminRevert(stranger)); + mkt.setHook(address(hook)); + vm.prank(admin); + vm.expectRevert(UniversalMarketplaceErrors.ZeroAddress.selector); + mkt.setHook(address(0)); + vm.prank(admin); + vm.expectRevert(UniversalMarketplaceErrors.HookNotWhitelisted.selector); + mkt.setHook(stranger); + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.HookUpdated(address(hook)); + vm.prank(admin); + mkt.setHook(address(hook)); + + vm.prank(stranger); + vm.expectRevert(_adminRevert(stranger)); + mkt.setEvaluator(stranger); + vm.prank(admin); + vm.expectRevert(UniversalMarketplaceErrors.ZeroAddress.selector); + mkt.setEvaluator(address(0)); + address next = makeAddr("evaluatorV2"); + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.EvaluatorUpdated(next); + vm.prank(admin); + mkt.setEvaluator(next); + assertEq(mkt.evaluator(), next); + + vm.prank(stranger); + vm.expectRevert(_adminRevert(stranger)); + mkt.setCEADeployment(SEPOLIA_HASH, address(ceaFactory), ceaProxyImpl); + vm.startPrank(admin); + vm.expectRevert(UniversalMarketplaceErrors.ZeroAddress.selector); + mkt.setCEADeployment(SEPOLIA_HASH, address(0), ceaProxyImpl); + vm.expectRevert(UniversalMarketplaceErrors.ZeroAddress.selector); + mkt.setCEADeployment(SEPOLIA_HASH, address(ceaFactory), address(0)); + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.CEADeploymentSet(SEPOLIA_HASH, address(ceaFactory), ceaProxyImpl); + mkt.setCEADeployment(SEPOLIA_HASH, address(ceaFactory), ceaProxyImpl); + vm.stopPrank(); + (address f, address impl) = mkt.ceaDeployment(SEPOLIA_HASH); + assertEq(f, address(ceaFactory)); + assertEq(impl, ceaProxyImpl); + } + + function test_MV07_pause() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); + vm.prank(stranger); + vm.expectRevert(_adminRevert(stranger)); + mkt.pause(); + vm.prank(admin); + mkt.pause(); + + _expectOpen(p, abi.encodeWithSelector(PausableUpgradeable.EnforcedPause.selector)); + AgentCard memory c = _card(); + bytes memory r = abi.encode(_rules()); + bytes memory e = abi.encode(_lendingTemplate()); + vm.prank(provider2); + vm.expectRevert(PausableUpgradeable.EnforcedPause.selector); + mkt.registerAgentCard(c, r, e); + vm.prank(provider); + vm.expectRevert(PausableUpgradeable.EnforcedPause.selector); + mkt.updateAgentCard(id, c, r, e); + + vm.prank(stranger); + vm.expectRevert(_adminRevert(stranger)); + mkt.unpause(); + vm.prank(admin); + mkt.unpause(); + _open(p); + } + + function _expectInitRevert(InitParams memory ip, bytes4 err) internal { + address impl = address(new UniversalMarketplace()); + vm.expectRevert(err); + new TransparentUpgradeableProxy(impl, mktAdmin, abi.encodeCall(UniversalMarketplace.initialize, (ip))); + } + + function test_MV08_initialize() public { + bytes4 zero = UniversalMarketplaceErrors.ZeroAddress.selector; + InitParams memory ip = _initParams(); + ip.agwFactory = address(0); + _expectInitRevert(ip, zero); + ip = _initParams(); + ip.kernel = address(0); + _expectInitRevert(ip, zero); + ip = _initParams(); + ip.hook = address(0); + _expectInitRevert(ip, zero); + ip = _initParams(); + ip.evaluator = address(0); + _expectInitRevert(ip, zero); + ip = _initParams(); + ip.rules = address(0); + _expectInitRevert(ip, zero); + ip = _initParams(); + ip.admin = address(0); + _expectInitRevert(ip, zero); + ip = _initParams(); + ip.hook = stranger; + _expectInitRevert(ip, UniversalMarketplaceErrors.HookNotWhitelisted.selector); + + vm.expectRevert(Initializable.InvalidInitialization.selector); + mkt.initialize(_initParams()); + UniversalMarketplace impl = new UniversalMarketplace(); + vm.expectRevert(Initializable.InvalidInitialization.selector); + impl.initialize(_initParams()); + + assertEq(address(mkt.AGW_FACTORY()), address(factory)); + assertEq(address(mkt.KERNEL()), address(kernel)); + assertEq(mkt.hook(), address(hook)); + assertEq(mkt.evaluator(), universalEvaluator); + assertEq(address(mkt.RULES()), address(rulesHelper)); + assertTrue(mkt.hasRole(mkt.ADMIN_ROLE(), admin)); + assertTrue(mkt.hasRole(mkt.DEFAULT_ADMIN_ROLE(), admin)); + } + + /// ⚠️ NEVER-DELETE. Every slot of the layout (PRD 12 Appendix C) is pinned by position after an exercise that + /// writes every variable, so an insertion, reorder or forgotten gap decrement fails here instead of on the + /// first upgrade. Append-only: extend this test, never loosen it. + function test_MV09_storageLayout_bySlot() public { + uint256 id = _registerLending(); + uint256 id2 = _registerAs(provider2, _card(), _rules(), _lendingTemplate()); + (uint256 jobId, address agw) = _open(_ready(id)); + _update(id, _card(), _rules(), _lendingTemplate()); // version 2 + vm.startPrank(admin); + mkt.verifyAgentCard(id, 2); + mkt.disableAgentCard(id2); + mkt.setAgentRating(provider, 77); + mkt.pause(); // the old per-chain pause's slot stays unwritten by every path + mkt.unpause(); + vm.stopPrank(); + + address m = address(mkt); + assertEq(_word(m, 0), uint256(uint160(address(factory))), "0 AGW_FACTORY"); + assertEq(_word(m, 1), uint256(uint160(address(kernel))), "1 KERNEL"); + assertEq(_word(m, 2), uint256(uint160(address(hook))), "2 hook"); + assertEq(_word(m, 3), uint256(uint160(universalEvaluator)), "3 evaluator"); + assertEq(vm.load(m, bytes32(uint256(4))), mkt.PUSH_CHAIN_HASH(), "4 PUSH_CHAIN_HASH"); + assertEq(_word(m, 5), uint256(uint160(address(rulesHelper))), "5 RULES"); + assertEq(_word(m, 6), 2, "6 agentCardCount"); + + // mappings: the entry lives at keccak256(key ‖ slot); a long `bytes` stores 2·length + 1 + assertEq(_entry(m, id, 7), uint256(uint160(provider)), "7 _cards[id].provider"); + assertEq(_entry(m, id, 8), abi.encode(_rules()).length * 2 + 1, "8 _agentCardRules"); + assertEq(_entry(m, id, 9), abi.encode(_lendingTemplate()).length * 2 + 1, "9 _jobSpecTemplates"); + assertEq(_entry(m, id, 10), 2, "10 agentCardVersion"); + assertEq(_entry(m, id2, 10), 1, "10 agentCardVersion (not updated)"); + assertEq(_entry(m, id, 11), 1, "11 isAgentCardVerified"); + assertEq(_entry(m, id2, 12), 1, "12 isAgentCardDisabled"); + assertEq( + uint256(vm.load(m, keccak256(abi.encode(SEPOLIA_HASH, uint256(13))))), + uint256(uint160(address(ceaFactory))), + "13 ceaDeployment.ceaFactory" + ); + assertEq(_word(m, 14), 0, "14 __reserved14"); + assertEq(uint256(vm.load(m, keccak256(abi.encode(SEPOLIA_HASH, uint256(14))))), 0, "14 never a mapping"); + assertEq(_addrEntry(m, agw, 15), jobId, "15 _lastJobOf"); + assertEq(_entry(m, jobId, 16), id, "16 cardOfJob"); + assertEq(_entry(m, jobId, 17), uint256(uint160(agw)), "17 agwOfJob"); + assertEq( + vm.load(m, keccak256(abi.encode(jobId, uint256(18)))), MockAGW(payable(agw)).RULES_ID(), "18 rulesOfJob" + ); + assertEq(_addrEntry(m, provider, 19), id, "19 agentCardOf"); + assertEq(_addrEntry(m, provider2, 19), id2, "19 agentCardOf (second provider)"); + assertEq(_entry(m, jobId, 20), 1, "20 cardVersionOfJob"); + assertEq(_addrEntry(m, provider, 21), 77, "21 _agentRating"); + for (uint256 slot = 7; slot <= 21; ++slot) { + assertEq(_word(m, slot), 0, "a mapping's base slot (or slot 14) is never written"); + } + for (uint256 slot = 22; slot <= 49; ++slot) { + assertEq(_word(m, slot), 0, "gap (22-48) or slot 49 written"); + } + } + + function _word(address m, uint256 slot) internal view returns (uint256) { + return uint256(vm.load(m, bytes32(slot))); + } + + function _entry(address m, uint256 key, uint256 slot) internal view returns (uint256) { + return uint256(vm.load(m, keccak256(abi.encode(key, slot)))); + } + + function _addrEntry(address m, address key, uint256 slot) internal view returns (uint256) { + return uint256(vm.load(m, keccak256(abi.encode(key, slot)))); + } + + function test_MV10_upgrade_preservesState() public { + uint256 id = _registerLending(); + (uint256 jobId, address agw) = _open(_ready(id)); + _update(id, _card(), _rules(), _lendingTemplate()); + vm.prank(admin); + mkt.setAgentRating(provider, 5); + bytes memory viewBefore = abi.encode(mkt.getAgentCard(id)); + + UniversalMarketplace next = new UniversalMarketplace(); + vm.prank(mktAdmin); + ProxyAdmin(_proxyAdmin(address(mkt))) + .upgradeAndCall(ITransparentUpgradeableProxy(address(mkt)), address(next), ""); + assertEq(address(uint160(uint256(vm.load(address(mkt), ERC1967Utils.IMPLEMENTATION_SLOT)))), address(next)); + + assertEq(abi.encode(mkt.getAgentCard(id)), viewBefore, "card, blobs, version and tags intact"); + assertEq(mkt.agentCardCount(), 1); + assertEq(mkt.agentCardOf(provider), id); + assertEq(mkt.activeJobOf(agw), jobId); + assertEq(mkt.cardOfJob(jobId), id); + assertEq(mkt.agwOfJob(jobId), agw); + assertEq(mkt.rulesOfJob(jobId), MockAGW(payable(agw)).RULES_ID()); + assertEq(mkt.cardVersionOfJob(jobId), 1); + assertEq(mkt.getAgentRating(provider), 5); + assertEq(mkt.evaluator(), universalEvaluator); + _open(_ready(id)); // and it still opens jobs + } + + function test_MV11_setCEADeployment_clear() public { + uint256 id = _registerLending(); + OpenJobParams memory p = _ready(id); // signed before the chain is cleared + address agw = p.intent.wallet; + + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.CEADeploymentSet(SEPOLIA_HASH, address(0), address(0)); + vm.prank(admin); + mkt.setCEADeployment(SEPOLIA_HASH, address(0), address(0)); + (address f, address impl) = mkt.ceaDeployment(SEPOLIA_HASH); + assertEq(f, address(0)); + assertEq(impl, address(0)); + + bytes memory unsupported = + abi.encodeWithSelector(UniversalMarketplaceErrors.ChainNotSupported.selector, SEPOLIA_HASH); + vm.expectRevert(unsupported); + mkt.computeCEA(agw, SEPOLIA_HASH); + + AgentCard memory c = _card(); + bytes memory r = abi.encode(_rules()); + bytes memory e = abi.encode(_lendingTemplate()); + vm.prank(provider2); + vm.expectRevert(unsupported); + mkt.registerAgentCard(c, r, e); + + _expectOpen(p, unsupported); + + vm.startPrank(admin); + vm.expectRevert(UniversalMarketplaceErrors.ZeroAddress.selector); + mkt.setCEADeployment(SEPOLIA_HASH, address(ceaFactory), address(0)); + vm.expectRevert(UniversalMarketplaceErrors.ZeroAddress.selector); + mkt.setCEADeployment(SEPOLIA_HASH, address(0), ceaProxyImpl); + vm.stopPrank(); + } + + function test_MV12_agentRating() public { + assertEq(mkt.getAgentRating(provider), 0, "default"); + vm.expectEmit(address(mkt)); + emit IUniversalMarketplace.AgentRatingSet(provider, 42); + vm.prank(admin); + mkt.setAgentRating(provider, 42); + assertEq(mkt.getAgentRating(provider), 42); + assertEq(mkt.getAgentRating(provider2), 0, "per agent"); + + vm.prank(stranger); + vm.expectRevert(_adminRevert(stranger)); + mkt.setAgentRating(provider, 1); + assertEq(mkt.getAgentRating(provider), 42); + } + + function test_MV13_version() public view { + assertEq(mkt.version(), "2.0.0"); + assertEq(mkt.OPENJOB_LANE(), OWNER_LANE_FLAG); + assertEq(mkt.MODE_SINGLE(), bytes32(0)); + } + + function test_MV14_noPerChainPause() public view { + string memory json = vm.readFile("out/UniversalMarketplace.sol/UniversalMarketplace.json"); + string memory abiSection = vm.split(json, '"bytecode"')[0]; + assertEq(vm.indexOf(abiSection, "setUniversalPaused"), type(uint256).max, "setUniversalPaused"); + assertEq(vm.indexOf(abiSection, "isUniversalPaused"), type(uint256).max, "isUniversalPaused"); + assertEq(vm.indexOf(abiSection, "UniversalChainPaused"), type(uint256).max, "UniversalChainPaused"); + assertTrue(vm.indexOf(abiSection, "openJob") != type(uint256).max, "the artifact is the new one"); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/UniversalMarketplaceRules.t.sol b/plan/marketplace/contracts/test/8183-tests/UniversalMarketplaceRules.t.sol new file mode 100644 index 00000000..15df8025 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/UniversalMarketplaceRules.t.sol @@ -0,0 +1,548 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {Test} from "forge-std/Test.sol"; + +import {AssetCap, AllowedCall, ArgPin, PinOp, UniversalTerms} from "@push-agw/libraries/Types.sol"; +import {UniversalMarketplaceRules} from "../../src/agentic-commerce-8183/UniversalMarketplaceRules.sol"; +import {UniversalMarketplaceErrors} from "../../src/agentic-commerce-8183/libraries/Errors.sol"; +import {Session, ActionData, PolicyData} from "../../src/agentic-commerce-8183/interfaces/external/IAGW.sol"; +import { + AgentCardRules, + SessionContext, + MARKER_WALLET, + MARKER_PRINCIPAL +} from "../../src/agentic-commerce-8183/libraries/Types.sol"; +import {RulesFixtures, SessionSkeleton} from "./helpers/RulesFixtures.sol"; + +/// @title UniversalMarketplaceRules — unit suite (PRD 12 §6.3). Direct calls; the marketplace suite covers the +/// same rules through `registerAgentCard` and `openJob`. +contract UniversalMarketplaceRulesTest is Test, RulesFixtures { + UniversalMarketplaceRules internal rules; + + address internal agent = makeAddr("agent"); + address internal usdcPrc20 = makeAddr("pUSDC.sepolia"); + address internal pethPrc20 = makeAddr("pETH.sepolia"); + address internal pool = makeAddr("pool"); + address internal usdc = makeAddr("USDC"); + address internal cea = makeAddr("cea"); + uint256 internal constant PRINCIPAL = 500e6; + uint48 internal constant EXPIRY = 1_800_000_000; + + function setUp() public { + rules = new UniversalMarketplaceRules(); + } + + // ───────── builders ───────── + + function _rules() internal view returns (AgentCardRules memory) { + return _cardRules(usdcPrc20, usdc, pool); + } + + function _rules2() internal view returns (AgentCardRules memory) { + return _cardRulesTwoAssets(usdcPrc20, usdc, pool, pethPrc20); + } + + function _skeleton() internal returns (SessionSkeleton memory) { + return SessionSkeleton({ + validator: makeAddr("validator"), + actionTarget: makeAddr("gateway"), + actionSelector: bytes4(0x12345678), + policy: makeAddr("urp") + }); + } + + function _terms(AgentCardRules memory r) internal view returns (UniversalTerms memory) { + return _fillTerms(r, PRINCIPAL, EXPIRY, cea); + } + + function _session(bytes memory initData) internal returns (Session memory) { + return _wrapSession(initData, agent, _skeleton()); + } + + function _sessionFor(UniversalTerms memory t) internal returns (Session memory) { + return _session(_envelope(t, SEPOLIA)); + } + + function _ctx() internal view returns (SessionContext memory) { + return SessionContext({ + agent: agent, chainHash: SEPOLIA_HASH, principal: PRINCIPAL, expiredAt: EXPIRY, expectedCEA: cea + }); + } + + function _expectInvalid(AgentCardRules memory r, string memory reason) internal { + bytes memory enc = abi.encode(r); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.InvalidAgentCard.selector, reason)); + rules.validateAgentCardRules(enc); + } + + function _withCalls(AllowedCall[] memory calls) internal view returns (AgentCardRules memory r) { + r = _rules(); + r.allowedCalls = calls; + } + + function _calls1(AllowedCall memory c) internal pure returns (AllowedCall[] memory calls) { + calls = new AllowedCall[](1); + calls[0] = c; + } + + function _calls2(AllowedCall memory a, AllowedCall memory b) internal pure returns (AllowedCall[] memory calls) { + calls = new AllowedCall[](2); + (calls[0], calls[1]) = (a, b); + } + + function _pins2(ArgPin memory a, ArgPin memory b) internal pure returns (ArgPin[] memory pins) { + pins = new ArgPin[](2); + (pins[0], pins[1]) = (a, b); + } + + function _noPins() internal pure returns (ArgPin[] memory) { + return new ArgPin[](0); + } + + function _approveTo(address spender, PinOp amountOp, bytes32 amount) internal view returns (AllowedCall memory) { + return + _allowed(usdc, APPROVE, 0, false, _pins2(_pin(4, PinOp.EQ, _word(spender)), _pin(36, amountOp, amount))); + } + + /// @dev `n` distinct, pinless supply calls (distinct targets). + function _manyCalls(uint256 n) internal pure returns (AllowedCall[] memory calls) { + calls = new AllowedCall[](n); + for (uint256 i; i < n; ++i) { + // forge-lint: disable-next-line(unsafe-typecast) + calls[i] = _allowed(address(uint160(0x1000 + i)), SUPPLY, 0, false, new ArgPin[](0)); // i < 64 + } + } + + function _distinctPins(uint256 n) internal pure returns (ArgPin[] memory pins) { + pins = new ArgPin[](n); + for (uint256 k; k < n; ++k) { + // forge-lint: disable-next-line(unsafe-typecast) + pins[k] = _pin(uint16(4 + 32 * k), PinOp.EQ, bytes32(k + 1)); // k < 9 + } + } + + // ═════════════════════════════ validateAgentCardRules ═════════════════════════════ + + function test_MT01_validate_returnsTokens() public view { + address[] memory one = rules.validateAgentCardRules(abi.encode(_rules())); + assertEq(one.length, 1); + assertEq(one[0], usdcPrc20); + address[] memory two = rules.validateAgentCardRules(abi.encode(_rules2())); + assertEq(two.length, 2); + assertEq(two[0], usdcPrc20); + assertEq(two[1], pethPrc20); + } + + function test_MT02_assetChecks() public { + AgentCardRules memory r = _rules(); + r.assets = new AssetCap[](0); + _expectInvalid(r, "asset count"); // R1: zero + r = _rules(); + AssetCap[] memory nine = new AssetCap[](9); + nine[0] = r.assets[0]; + for (uint256 i = 1; i < 9; ++i) { + // forge-lint: disable-next-line(unsafe-typecast) + nine[i] = AssetCap({token: address(uint160(0x2000 + i)), maxPerCall: 0, maxTotal: 0}); // i < 9 + } + r.assets = nine; + _expectInvalid(r, "asset count"); // R1: MAX_ASSETS + 1 + + r = _rules(); + r.principalAsset = 1; + _expectInvalid(r, "principal asset"); // R2 + + r = _rules2(); + r.assets[1].token = address(0); + _expectInvalid(r, "asset zero"); // R3 + + r = _rules2(); + r.assets[1].token = usdcPrc20; + _expectInvalid(r, "duplicate asset"); // R4 + + // boundary: MAX_ASSETS (8) passes + r = _rules(); + AssetCap[] memory eight = new AssetCap[](8); + for (uint256 i; i < 8; ++i) { + eight[i] = nine[i]; + } + r.assets = eight; + assertEq(rules.validateAgentCardRules(abi.encode(r)).length, 8); + } + + function test_MT03_principalMarkers() public { + AgentCardRules memory r = _rules(); + r.assets[0].maxTotal = 1000e6; + _expectInvalid(r, "principal total not marker"); // R5: a fixed total + + r = _rules(); + r.assets[0].maxPerCall = 0; + _expectInvalid(r, "principal per-call zero"); // R6 + + r = _rules2(); + r.assets[1].maxPerCall = uint256(MARKER_PRINCIPAL); + _expectInvalid(r, "marker off principal asset"); // R7: per-call + r = _rules2(); + r.assets[1].maxTotal = uint256(MARKER_PRINCIPAL); + _expectInvalid(r, "marker off principal asset"); // R7: total + + // principal on asset 1 instead: asset 0 must then carry no marker + r = _rules2(); + r.principalAsset = 1; + r.assets[1] = AssetCap({token: pethPrc20, maxPerCall: 5, maxTotal: uint256(MARKER_PRINCIPAL)}); + _expectInvalid(r, "marker off principal asset"); + r.assets[0] = AssetCap({token: usdcPrc20, maxPerCall: 0, maxTotal: 0}); + rules.validateAgentCardRules(abi.encode(r)); + + // a tranche card: a fixed per-call cap passes + r = _rules(); + r.assets[0].maxPerCall = 100; + rules.validateAgentCardRules(abi.encode(r)); + } + + function test_MT04_allowListAndPins() public { + _expectInvalid(_withCalls(new AllowedCall[](0)), "allow-list size"); // R8 + _expectInvalid(_withCalls(_manyCalls(33)), "allow-list size"); + rules.validateAgentCardRules(abi.encode(_withCalls(_manyCalls(32)))); // boundary + + AllowedCall[] memory c = _manyCalls(1); + c[0].pins = _distinctPins(9); + _expectInvalid(_withCalls(c), "too many pins"); // R9: one call over MAX_PINS + c[0].pins = _distinctPins(8); + rules.validateAgentCardRules(abi.encode(_withCalls(c))); // boundary + + c = _manyCalls(5); // 8 + 8 + 8 + 8 + 1 = 33 pins in all + for (uint256 i; i < 4; ++i) { + c[i].pins = _distinctPins(8); + } + c[4].pins = _distinctPins(1); + _expectInvalid(_withCalls(c), "too many pins"); // R9: total over MAX_ALLOWED_CALL_PINS + c[4].pins = _noPins(); + rules.validateAgentCardRules(abi.encode(_withCalls(c))); // 32 in all: boundary + + AgentCardRules memory r = _rules(); + r.allowedCalls[1].pins[0].op = PinOp.MAX; + _expectInvalid(r, "wallet marker op"); // R10 + } + + function test_MT05_duplicates() public { + AgentCardRules memory r = _rules(); + AllowedCall memory supply = r.allowedCalls[1]; + _expectInvalid(_withCalls(_calls2(supply, supply)), "duplicate call"); // R11 + + AllowedCall memory pinless = _allowed(pool, SUPPLY, 0, false, _noPins()); + _expectInvalid(_withCalls(_calls2(supply, pinless)), "unpinned duplicate"); // R12: either order + _expectInvalid(_withCalls(_calls2(pinless, supply)), "unpinned duplicate"); + AllowedCall memory pinless2 = _allowed(pool, SUPPLY, 4, true, _noPins()); + _expectInvalid(_withCalls(_calls2(pinless, pinless2)), "unpinned duplicate"); // both pinless + + // "approve to Aave or Uniswap": same (target, selector), different pins + AllowedCall memory toAave = _approveTo(pool, PinOp.MAX, MARKER_PRINCIPAL); + AllowedCall memory toUni = _approveTo(makeAddr("uniswap"), PinOp.MAX, MARKER_PRINCIPAL); + rules.validateAgentCardRules(abi.encode(_withCalls(_calls2(toAave, toUni)))); + } + + function test_MT06_erc20Rules() public { + // R13 + _expectInvalid( + _withCalls(_calls1(_allowed(usdc, INCREASE_ALLOWANCE, 4, true, _pins1(4, PinOp.EQ, _word(pool))))), + "increaseAllowance" + ); + + // R14: spender pin missing, zero, dirty high bits, or a marker + _expectInvalid( + _withCalls(_calls1(_allowed(usdc, APPROVE, 0, false, _pins1(36, PinOp.MAX, bytes32(uint256(1)))))), + "approve spender not pinned" + ); + bytes32[4] memory badSpenders = + [bytes32(0), bytes32(uint256(1) << 160 | uint160(pool)), MARKER_WALLET, MARKER_PRINCIPAL]; + for (uint256 i; i < 4; ++i) { + AllowedCall memory a = _approveTo(pool, PinOp.MAX, bytes32(uint256(1))); + a.pins[0].value = badSpenders[i]; + _expectInvalid(_withCalls(_calls1(a)), "approve spender not pinned"); + } + AllowedCall memory spenderAsMax = _approveTo(pool, PinOp.MAX, bytes32(uint256(1))); + spenderAsMax.pins[0].op = PinOp.MAX; + _expectInvalid(_withCalls(_calls1(spenderAsMax)), "approve spender not pinned"); + + // R15: amount pin missing, or under EQ + _expectInvalid( + _withCalls(_calls1(_allowed(usdc, APPROVE, 0, false, _pins1(4, PinOp.EQ, _word(pool))))), + "approve amount not capped" + ); + _expectInvalid(_withCalls(_calls1(_approveTo(pool, PinOp.EQ, bytes32(uint256(1))))), "approve amount not capped"); + + // approve passes with a MAX literal and with MAX MARKER_PRINCIPAL; required pins may sit anywhere + rules.validateAgentCardRules(abi.encode(_withCalls(_calls1(_approveTo(pool, PinOp.MAX, bytes32(uint256(7))))))); + rules.validateAgentCardRules(abi.encode(_withCalls(_calls1(_approveTo(pool, PinOp.MAX, MARKER_PRINCIPAL))))); + AllowedCall memory reordered = _approveTo(pool, PinOp.MAX, MARKER_PRINCIPAL); + (reordered.pins[0], reordered.pins[1]) = (reordered.pins[1], reordered.pins[0]); + rules.validateAgentCardRules(abi.encode(_withCalls(_calls1(reordered)))); + + // R16 / R17: refused without the recipient bound, at the right offset + _expectInvalid(_withCalls(_calls1(_allowed(usdc, TRANSFER, 4, false, _noPins()))), "erc20 transfer recipient"); + _expectInvalid(_withCalls(_calls1(_allowed(usdc, TRANSFER, 36, true, _noPins()))), "erc20 transfer recipient"); + _expectInvalid( + _withCalls(_calls1(_allowed(usdc, TRANSFER, 0, false, _pins1(36, PinOp.EQ, MARKER_WALLET)))), + "erc20 transfer recipient" + ); + _expectInvalid( + _withCalls(_calls1(_allowed(usdc, TRANSFER, 0, false, _pins1(4, PinOp.EQ, _word(cea))))), + "erc20 transfer recipient" + ); + _expectInvalid( + _withCalls(_calls1(_allowed(usdc, TRANSFER_FROM, 36, false, _noPins()))), "erc20 transferFrom recipient" + ); + _expectInvalid( + _withCalls(_calls1(_allowed(usdc, TRANSFER_FROM, 4, true, _noPins()))), "erc20 transferFrom recipient" + ); + _expectInvalid( + _withCalls(_calls1(_allowed(usdc, TRANSFER_FROM, 0, false, _pins1(4, PinOp.EQ, MARKER_WALLET)))), + "erc20 transferFrom recipient" + ); + + // pass with the beneficiary field, and with an EQ MARKER_WALLET pin + rules.validateAgentCardRules( + abi.encode( + _withCalls( + _calls2( + _allowed(usdc, TRANSFER, 4, true, _noPins()), _allowed(usdc, TRANSFER_FROM, 36, true, _noPins()) + ) + ) + ) + ); + rules.validateAgentCardRules( + abi.encode( + _withCalls( + _calls2( + _allowed(usdc, TRANSFER, 0, false, _pins1(4, PinOp.EQ, MARKER_WALLET)), + _allowed(usdc, TRANSFER_FROM, 0, false, _pins1(36, PinOp.EQ, MARKER_WALLET)) + ) + ) + ) + ); + } + + // ═════════════════════════════ checkRulesMatchCard ═════════════════════════════ + + function test_MT07_match_happy() public { + rules.checkRulesMatchCard(abi.encode(_rules()), _sessionFor(_terms(_rules())), _ctx()); + rules.checkRulesMatchCard(abi.encode(_rules2()), _sessionFor(_terms(_rules2())), _ctx()); + + AgentCardRules memory tranche = _rules2(); + tranche.assets[0].maxPerCall = 100e6; // per-call fixed + UniversalTerms memory t = _terms(tranche); + assertEq(t.assets[0].maxPerCall, 100e6, "fixed per-call is copied, not filled"); + assertEq(t.assets[0].maxTotal, PRINCIPAL); + rules.checkRulesMatchCard(abi.encode(tranche), _sessionFor(t), _ctx()); + } + + function _expectMatch(AgentCardRules memory r, Session memory s, bytes memory err) internal { + bytes memory enc = abi.encode(r); + SessionContext memory ctx = _ctx(); + vm.expectRevert(err); + rules.checkRulesMatchCard(enc, s, ctx); + } + + function _expectTerms(UniversalTerms memory t, bytes memory err) internal { + _expectMatch(_rules2(), _sessionFor(t), err); + } + + function test_MT08_match_eachError() public { + AgentCardRules memory r = _rules2(); + bytes memory actionsMismatch = abi.encodeWithSelector(UniversalMarketplaceErrors.ActionsMismatch.selector); + + // C1 + Session memory s = _sessionFor(_terms(r)); + s.sessionValidatorInitData = abi.encode(makeAddr("other")); + _expectMatch(r, s, abi.encodeWithSelector(UniversalMarketplaceErrors.AgentMismatch.selector)); + s.sessionValidatorInitData = abi.encodePacked(agent); // 20 bytes: not the 32-byte agent config + _expectMatch(r, s, abi.encodeWithSelector(UniversalMarketplaceErrors.AgentMismatch.selector)); + + // C2 + s = _sessionFor(_terms(r)); + s.actions = new ActionData[](0); + _expectMatch(r, s, abi.encodeWithSelector(UniversalMarketplaceErrors.ActionCount.selector)); + s = _sessionFor(_terms(r)); + ActionData[] memory two = new ActionData[](2); + (two[0], two[1]) = (s.actions[0], s.actions[0]); + s.actions = two; + _expectMatch(r, s, abi.encodeWithSelector(UniversalMarketplaceErrors.ActionCount.selector)); + + // C3 + s = _sessionFor(_terms(r)); + s.actions[0].actionPolicies = new PolicyData[](0); + _expectMatch(r, s, abi.encodeWithSelector(UniversalMarketplaceErrors.PolicyShape.selector, 0)); + s = _sessionFor(_terms(r)); + PolicyData[] memory twoPolicies = new PolicyData[](2); + (twoPolicies[0], twoPolicies[1]) = (s.actions[0].actionPolicies[0], s.actions[0].actionPolicies[0]); + s.actions[0].actionPolicies = twoPolicies; + _expectMatch(r, s, abi.encodeWithSelector(UniversalMarketplaceErrors.PolicyShape.selector, 0)); + + // C4: pre-v6 two-field envelope (first word = 64, the string's offset), version 2, and under one word + bytes memory body = abi.encode(_terms(r)); + _expectMatch( + r, + _session(abi.encode(SEPOLIA, body)), + abi.encodeWithSelector(UniversalMarketplaceErrors.EnvelopeVersionMismatch.selector, 64) + ); + _expectMatch( + r, + _session(abi.encode(uint16(2), SEPOLIA, body)), + abi.encodeWithSelector(UniversalMarketplaceErrors.EnvelopeVersionMismatch.selector, 2) + ); + _expectMatch( + r, _session(new bytes(31)), abi.encodeWithSelector(UniversalMarketplaceErrors.EnvelopeVersionMismatch.selector, 0) + ); + + // C5 + _expectMatch( + r, + _session(_envelope(_terms(r), "eip155:1")), + abi.encodeWithSelector(UniversalMarketplaceErrors.ChainMismatch.selector, 0) + ); + + // C6: the card has two assets; the session one + UniversalTerms memory t = _terms(_rules()); + _expectTerms(t, abi.encodeWithSelector(UniversalMarketplaceErrors.AssetCountMismatch.selector, 2, 1)); + + // C7: each index + t = _terms(r); + t.assets[0].token = usdc; + _expectTerms(t, abi.encodeWithSelector(UniversalMarketplaceErrors.AssetMismatch.selector, 0)); + t = _terms(r); + t.assets[1].token = usdc; + _expectTerms(t, abi.encodeWithSelector(UniversalMarketplaceErrors.AssetMismatch.selector, 1)); + + // C8 + t = _terms(r); + t.assets[0].maxTotal = PRINCIPAL + 1; + _expectTerms(t, abi.encodeWithSelector(UniversalMarketplaceErrors.PrincipalCapMismatch.selector)); + t = _terms(r); + t.assets[0].maxPerCall = PRINCIPAL - 1; + _expectTerms(t, abi.encodeWithSelector(UniversalMarketplaceErrors.PrincipalCapMismatch.selector)); + + // C9: each field of the non-principal asset + t = _terms(r); + t.assets[1].maxPerCall = 1; + _expectTerms(t, abi.encodeWithSelector(UniversalMarketplaceErrors.AssetMismatch.selector, 1)); + t = _terms(r); + t.assets[1].maxTotal = 1; + _expectTerms(t, abi.encodeWithSelector(UniversalMarketplaceErrors.AssetMismatch.selector, 1)); + + // C10 + t = _terms(r); + t.maxGasPerCall = 0; + _expectTerms(t, abi.encodeWithSelector(UniversalMarketplaceErrors.GasCapMismatch.selector)); + + // C11: length, then every call field, then every pin's offset and op + t = _terms(r); + AllowedCall[] memory shorter = new AllowedCall[](2); + (shorter[0], shorter[1]) = (t.allowedCalls[0], t.allowedCalls[1]); + t.allowedCalls = shorter; + _expectTerms(t, actionsMismatch); + for (uint256 f; f < 8; ++f) { + t = _terms(r); + AllowedCall memory c = t.allowedCalls[0]; + if (f == 0) c.target = pool; + if (f == 1) c.selector = TRANSFER; + if (f == 2) c.beneficiaryOffset = 4; + if (f == 3) c.hasBeneficiary = true; + if (f == 4) c.maxValue = 1; + if (f == 5) c.pins = _pins1(4, PinOp.EQ, _word(pool)); + if (f == 6) c.pins[1].offset = 68; + if (f == 7) c.pins[1].op = PinOp.EQ; + _expectTerms(t, actionsMismatch); + } + + // C13 + t = _terms(r); + t.validUntil = EXPIRY - 1; + _expectTerms(t, abi.encodeWithSelector(UniversalMarketplaceErrors.ExpiryMismatch.selector)); + + // C14 + t = _terms(r); + t.expectedCEA = address(0xBAD); + t.allowedCalls[1].pins[0].value = _word(address(0xBAD)); // keep C12 satisfied for the bad CEA + SessionContext memory ctx = _ctx(); + bytes memory enc = abi.encode(r); + Session memory bad = _sessionFor(t); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.PinMismatch.selector, 1, 0)); + rules.checkRulesMatchCard(enc, bad, ctx); // C12 runs before C14: the pin is checked against ctx's CEA + t.allowedCalls[1].pins[0].value = _word(cea); + bad = _sessionFor(t); + vm.expectRevert(abi.encodeWithSelector(UniversalMarketplaceErrors.ExpectedCEAMismatch.selector, cea, address(0xBAD))); + rules.checkRulesMatchCard(enc, bad, ctx); + } + + function test_MT09_match_pins() public { + AgentCardRules memory r = _rules(); + + UniversalTerms memory t = _terms(r); + t.allowedCalls[1].pins[0].value = _word(makeAddr("otherCEA")); // MARKER_WALLET, wrong CEA + _expectMatch(r, _sessionFor(t), abi.encodeWithSelector(UniversalMarketplaceErrors.PinMismatch.selector, 1, 0)); + + t = _terms(r); + t.allowedCalls[0].pins[1].value = bytes32(PRINCIPAL - 1); // MARKER_PRINCIPAL, principal − 1 + _expectMatch(r, _sessionFor(t), abi.encodeWithSelector(UniversalMarketplaceErrors.PinMismatch.selector, 0, 1)); + + t = _terms(r); + t.allowedCalls[0].pins[0].value = _word(makeAddr("otherSpender")); // a changed literal + _expectMatch(r, _sessionFor(t), abi.encodeWithSelector(UniversalMarketplaceErrors.PinMismatch.selector, 0, 0)); + + t = _terms(r); + t.allowedCalls[1].pins[0].value = MARKER_WALLET; // the raw marker, unfilled + _expectMatch(r, _sessionFor(t), abi.encodeWithSelector(UniversalMarketplaceErrors.PinMismatch.selector, 1, 0)); + t = _terms(r); + t.allowedCalls[0].pins[1].value = MARKER_PRINCIPAL; + _expectMatch(r, _sessionFor(t), abi.encodeWithSelector(UniversalMarketplaceErrors.PinMismatch.selector, 0, 1)); + } + + /// @dev Malformed bytes fail in `abi.decode`, which reverts with no data: a bare expectRevert is the only + /// way to name it. Each case is otherwise well formed, so nothing else can be what reverts. + function test_MT10_malformedInputs() public { + vm.expectRevert(); + rules.validateAgentCardRules(hex"01"); + + bytes memory enc = abi.encode(_rules()); + SessionContext memory ctx = _ctx(); + Session memory badEnvelope = _session(abi.encodePacked(uint256(1), hex"01")); // right version, then garbage + vm.expectRevert(); + rules.checkRulesMatchCard(enc, badEnvelope, ctx); + + Session memory badBody = _session(abi.encode(uint16(1), SEPOLIA, hex"01")); + vm.expectRevert(); + rules.checkRulesMatchCard(enc, badBody, ctx); + + Session memory good = _sessionFor(_terms(_rules())); + vm.expectRevert(); + rules.checkRulesMatchCard(hex"01", good, ctx); + } + + function testFuzz_MT11_principalBinding(uint256 principal) public { + principal = bound(principal, 1, 1e30); + AgentCardRules memory r = _rules2(); + bytes memory enc = abi.encode(r); + SessionContext memory ctx = _ctx(); + ctx.principal = principal; + rules.checkRulesMatchCard(enc, _sessionFor(_fillTerms(r, principal, EXPIRY, cea)), ctx); + + UniversalTerms memory t = _fillTerms(r, principal, EXPIRY, cea); + t.assets[0].maxTotal = principal + 1; + Session memory s = _sessionFor(t); + vm.expectRevert(UniversalMarketplaceErrors.PrincipalCapMismatch.selector); + rules.checkRulesMatchCard(enc, s, ctx); + + t = _fillTerms(r, principal, EXPIRY, cea); + t.assets[0].maxTotal = principal - 1; + s = _sessionFor(t); + vm.expectRevert(UniversalMarketplaceErrors.PrincipalCapMismatch.selector); + rules.checkRulesMatchCard(enc, s, ctx); + + t = _fillTerms(r, principal, EXPIRY, cea); + t.assets[0].maxPerCall = principal + 1; + s = _sessionFor(t); + vm.expectRevert(UniversalMarketplaceErrors.PrincipalCapMismatch.selector); + rules.checkRulesMatchCard(enc, s, ctx); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/helpers/RulesFixtures.sol b/plan/marketplace/contracts/test/8183-tests/helpers/RulesFixtures.sol new file mode 100644 index 00000000..8032e59e --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/helpers/RulesFixtures.sol @@ -0,0 +1,184 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { + AssetCap, + AllowedCall, + ArgPin, + PinOp, + UniversalTerms, + ENVELOPE_VERSION +} from "@push-agw/libraries/Types.sol"; +import { + Session, + ActionData, + PolicyData, + ERC7739Data, + ERC7739Context +} from "../../../src/agentic-commerce-8183/interfaces/external/IAGW.sol"; +import {AgentCardRules, MARKER_WALLET, MARKER_PRINCIPAL} from "../../../src/agentic-commerce-8183/libraries/Types.sol"; + +/// @notice The session fields the marketplace never checks and the AGW pins at `grantRules`. Unit suites pass test +/// values; the fork suite passes the real AGW v6 ones. +struct SessionSkeleton { + address validator; + address actionTarget; + bytes4 actionSelector; + address policy; +} + +/// @title RulesFixtures — TEST ONLY: card rules, and the session the SDK builds from them (PRD 12 §6.1, Appendix E). +/// @notice `_fillTerms` plays the SDK: it copies the card's rules into `UniversalTerms` and fills the markers for one +/// job. Everything here is pure; deep copies throughout, so editing a filled session never edits the card. +abstract contract RulesFixtures { + string internal constant SEPOLIA = "eip155:11155111"; + bytes32 internal constant SEPOLIA_HASH = keccak256("eip155:11155111"); + + bytes4 internal constant SUPPLY = bytes4(keccak256("supply(address,uint256,address,uint16)")); + bytes4 internal constant TRANSFER = 0xa9059cbb; + bytes4 internal constant APPROVE = 0x095ea7b3; + bytes4 internal constant TRANSFER_FROM = 0x23b872dd; + bytes4 internal constant INCREASE_ALLOWANCE = 0x39509351; + + // ───────── card rules ───────── + + /// @dev One asset (the principal, both caps the marker) and three calls: `approve(pool, ≤ principal)`, + /// `pool.supply(_, _, onBehalfOf = wallet, _)`, `transfer(wallet, _)` by the beneficiary field. + function _cardRules(address usdcPrc20, address usdcDest, address pool) + internal + pure + returns (AgentCardRules memory r) + { + r.assets = new AssetCap[](1); + r.assets[0] = + AssetCap({token: usdcPrc20, maxPerCall: uint256(MARKER_PRINCIPAL), maxTotal: uint256(MARKER_PRINCIPAL)}); + r.principalAsset = 0; + r.maxGasPerCall = 1e18; + r.allowedCalls = new AllowedCall[](3); + ArgPin[] memory approvePins = new ArgPin[](2); + approvePins[0] = _pin(4, PinOp.EQ, _word(pool)); + approvePins[1] = _pin(36, PinOp.MAX, MARKER_PRINCIPAL); + r.allowedCalls[0] = _allowed(usdcDest, APPROVE, 0, false, approvePins); + r.allowedCalls[1] = _allowed(pool, SUPPLY, 0, false, _pins1(68, PinOp.EQ, MARKER_WALLET)); + r.allowedCalls[2] = _allowed(usdcDest, TRANSFER, 4, true, new ArgPin[](0)); + } + + /// @dev `_cardRules` plus a second asset that may route but never moves: `{pETH, 0, 0}`. + function _cardRulesTwoAssets(address usdcPrc20, address usdcDest, address pool, address pethPrc20) + internal + pure + returns (AgentCardRules memory r) + { + r = _cardRules(usdcPrc20, usdcDest, pool); + AssetCap[] memory assets = new AssetCap[](2); + assets[0] = r.assets[0]; + assets[1] = AssetCap({token: pethPrc20, maxPerCall: 0, maxTotal: 0}); + r.assets = assets; + } + + // ───────── the SDK's session ───────── + + /// @dev Appendix E: the principal asset's caps → `principal` (per-call only if it is the marker); pins' + /// `MARKER_PRINCIPAL` → `bytes32(principal)`, `MARKER_WALLET` → the CEA word; everything else copied. + function _fillTerms(AgentCardRules memory r, uint256 principal, uint48 validUntil, address cea) + internal + pure + returns (UniversalTerms memory t) + { + t.validUntil = validUntil; + t.expectedCEA = cea; + t.maxGasPerCall = r.maxGasPerCall; + t.assets = new AssetCap[](r.assets.length); + for (uint256 i; i < r.assets.length; ++i) { + t.assets[i] = _fillAsset(r.assets[i], i == r.principalAsset, principal); + } + t.allowedCalls = new AllowedCall[](r.allowedCalls.length); + for (uint256 i; i < r.allowedCalls.length; ++i) { + t.allowedCalls[i] = _fillCall(r.allowedCalls[i], principal, cea); + } + } + + function _fillAsset(AssetCap memory a, bool isPrincipal, uint256 principal) + internal + pure + returns (AssetCap memory filled) + { + filled = AssetCap({token: a.token, maxPerCall: a.maxPerCall, maxTotal: a.maxTotal}); + if (!isPrincipal) return filled; + filled.maxTotal = principal; + if (a.maxPerCall == uint256(MARKER_PRINCIPAL)) filled.maxPerCall = principal; + } + + function _fillCall(AllowedCall memory c, uint256 principal, address cea) + internal + pure + returns (AllowedCall memory filled) + { + ArgPin[] memory pins = new ArgPin[](c.pins.length); + for (uint256 k; k < pins.length; ++k) { + pins[k] = _fillPin(c.pins[k], principal, cea); + } + filled = _allowed(c.target, c.selector, c.beneficiaryOffset, c.hasBeneficiary, pins); + filled.maxValue = c.maxValue; + } + + function _fillPin(ArgPin memory p, uint256 principal, address cea) internal pure returns (ArgPin memory) { + bytes32 v = p.value; + if (v == MARKER_WALLET) v = _word(cea); + else if (v == MARKER_PRINCIPAL) v = bytes32(principal); + return _pin(p.offset, p.op, v); + } + + /// @dev The v6 envelope: `abi.encode(uint16 version, string chain, bytes body)`. + function _envelope(UniversalTerms memory t, string memory chain) internal pure returns (bytes memory) { + return abi.encode(ENVELOPE_VERSION, chain, abi.encode(t)); + } + + /// @dev One action, one policy carrying `initData`; the agent is `abi.encode(agent)`. + function _wrapSession(bytes memory initData, address agent, SessionSkeleton memory sk) + internal + pure + returns (Session memory s) + { + s.sessionValidator = sk.validator; + s.sessionValidatorInitData = abi.encode(agent); + s.erc7739Policies = + ERC7739Data({allowedERC7739Content: new ERC7739Context[](0), erc1271Policies: new PolicyData[](0)}); + s.userOpPolicies = new PolicyData[](0); + PolicyData[] memory p = new PolicyData[](1); + p[0] = PolicyData({policy: sk.policy, initData: initData}); + s.actions = new ActionData[](1); + s.actions[0] = + ActionData({actionTargetSelector: sk.actionSelector, actionTarget: sk.actionTarget, actionPolicies: p}); + } + + // ───────── small builders ───────── + + function _word(address a) internal pure returns (bytes32) { + return bytes32(uint256(uint160(a))); + } + + function _pin(uint16 offset, PinOp op, bytes32 value) internal pure returns (ArgPin memory) { + return ArgPin({offset: offset, op: op, value: value}); + } + + function _pins1(uint16 offset, PinOp op, bytes32 value) internal pure returns (ArgPin[] memory pins) { + pins = new ArgPin[](1); + pins[0] = _pin(offset, op, value); + } + + function _allowed(address target, bytes4 selector, uint16 offset, bool hasBeneficiary, ArgPin[] memory pins) + internal + pure + returns (AllowedCall memory) + { + return AllowedCall({ + target: target, + selector: selector, + beneficiaryOffset: offset, + hasBeneficiary: hasBeneficiary, + maxValue: 0, + pins: pins + }); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/helpers/TemplateParts.sol b/plan/marketplace/contracts/test/8183-tests/helpers/TemplateParts.sol new file mode 100644 index 00000000..3c6a4248 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/helpers/TemplateParts.sol @@ -0,0 +1,136 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { + Evaluation, + Operation, + LogicKind, + Logic, + T_UINT, + T_ADDRESS, + T_TUPLE +} from "../../../src/agentic-commerce-8183/libraries/JobSpecTypes.sol"; +import { + FillSource, + Fill, + ReadTemplate, + TargetSource, + CheckTemplate +} from "../../../src/agentic-commerce-8183/libraries/Types.sol"; + +/// @title TemplateParts — TEST ONLY: chain-agnostic builders for jobSpecTemplates +/// @notice Shared by the builder, conformance and marketplace suites. Every builder is pure. +abstract contract TemplateParts { + bytes4 internal constant BALANCE_OF = bytes4(keccak256("balanceOf(address)")); + bytes4 internal constant GET_RESERVE_DATA = bytes4(keccak256("getReserveData(address)")); + bytes4 internal constant MAX_WITHDRAW = bytes4(keccak256("maxWithdraw(address)")); + + // ───────── outputs and fields ───────── + + function _uintOut() internal pure returns (bytes memory) { + return abi.encodePacked(T_TUPLE, uint8(1), T_UINT); + } + + /// @dev Aave v3 `getReserveData` → one 15-field struct, the V2 doc's encoding. + function _reserveDataOut() internal pure returns (bytes memory) { + return abi.encodePacked( + abi.encodePacked(T_TUPLE, uint8(1), T_TUPLE, uint8(15), T_TUPLE, uint8(1), T_UINT), + abi.encodePacked(T_UINT, T_UINT, T_UINT, T_UINT, T_UINT, T_UINT, T_UINT), + abi.encodePacked(T_ADDRESS, T_ADDRESS, T_ADDRESS, T_ADDRESS, T_UINT, T_UINT, T_UINT) + ); + } + + function _f(uint8 a) internal pure returns (uint8[] memory f) { + f = new uint8[](1); + f[0] = a; + } + + function _f2(uint8 a, uint8 b) internal pure returns (uint8[] memory f) { + f = new uint8[](2); + f[0] = a; + f[1] = b; + } + + function _noFills() internal pure returns (Fill[] memory) { + return new Fill[](0); + } + + function _ceaFill(uint8 word) internal pure returns (Fill[] memory fills) { + fills = new Fill[](1); + fills[0] = Fill({word: word, source: FillSource.CEA, param: 0}); + } + + // ───────── reads, checks, logic ───────── + + function _read( + string memory chainId, + address target, + bytes4 selector, + bytes memory args, + Fill[] memory fills, + bytes memory outputs, + uint8[] memory field + ) internal pure returns (ReadTemplate memory) { + return ReadTemplate({ + chainNamespace: "eip155", + chainId: chainId, + minConfirmations: 12, + target: target, + selector: selector, + args: args, + fills: fills, + outputs: outputs, + field: field + }); + } + + /// @dev `token.balanceOf(CEA)` on `chainId`: args are one zero word the CEA fill overwrites. + function _balanceOfCEA(string memory chainId, address token) internal pure returns (ReadTemplate memory) { + return _read(chainId, token, BALANCE_OF, new bytes(32), _ceaFill(0), _uintOut(), _f(0)); + } + + function _chk(uint8 read, Evaluation e, Operation op, TargetSource src, int256 value) + internal + pure + returns (CheckTemplate memory) + { + return CheckTemplate({read: read, evaluation: e, operation: op, source: src, value: value}); + } + + /// @dev One logic step over `checks` and child steps `children`; `k` for AT_LEAST only. + function _step(LogicKind kind, uint8[] memory checks, uint8[] memory children, uint8 k) + internal + pure + returns (Logic memory) + { + return Logic({kind: kind, checks: checks, children: children, k: k}); + } + + /// @dev A one-step tree: `kind` over `checks`, no children. + function _rootOf(LogicKind kind, uint8[] memory checks) internal pure returns (Logic[] memory logic) { + logic = new Logic[](1); + logic[0] = _step(kind, checks, new uint8[](0), 0); + } + + function _none() internal pure returns (uint8[] memory) { + return new uint8[](0); + } + + function _one(uint8 a) internal pure returns (uint8[] memory c) { + c = new uint8[](1); + c[0] = a; + } + + function _kids(uint8 a, uint8 b) internal pure returns (uint8[] memory c) { + c = new uint8[](2); + c[0] = a; + c[1] = b; + } + + function _kids3(uint8 a, uint8 b, uint8 d) internal pure returns (uint8[] memory c) { + c = new uint8[](3); + c[0] = a; + c[1] = b; + c[2] = d; + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/helpers/V2Decoder.sol b/plan/marketplace/contracts/test/8183-tests/helpers/V2Decoder.sol new file mode 100644 index 00000000..9a71b651 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/helpers/V2Decoder.sol @@ -0,0 +1,173 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import { + T_UINT, + T_INT, + T_BOOL, + T_ADDRESS, + T_BYTES, + T_STRING, + T_TUPLE, + T_ARRAY, + T_FIXED_ARRAY +} from "../../../src/agentic-commerce-8183/libraries/JobSpecTypes.sol"; + +/// @title V2Decoder — TEST ONLY: the evaluator's answer decoder, as written in the V2 design doc +/// @notice The reference the conformance suite holds the marketplace's templates to. +/// @dev - Source: `docs-internal/Universal Evaluator V2 Design`, "The decoder (in the evaluator)". Logic copied +/// verbatim; only the layout is `forge fmt`'s. Do not "fix" it here: a divergence is a finding. +/// - `locate` is the one addition: it exposes `_locate` so a test can compare leaf types. +// forge-lint: disable-start(unsafe-typecast) +contract V2Decoder { + /// @notice The number to compare, from answer `res`. + function decodeAnswer(bytes memory outputs, uint8[] memory field, bytes calldata res) + external + pure + returns (bool, int256) + { + (bool ok, uint8 leaf, uint256 at) = _locate(outputs, field, res); + if (!ok) return (false, 0); + + if (leaf == T_BYTES || leaf == T_STRING || leaf == T_ARRAY) { + (bool ok2, uint256 len) = _word(res, at); + if (!ok2) return (false, 0); + if (leaf == T_ARRAY) return (true, int256(len)); + if (len > res.length || at + 32 + len > res.length) return (false, 0); + return (true, int256(uint256(keccak256(res[at + 32:at + 32 + len])))); + } + + (bool ok3, uint256 w) = _word(res, at); + if (!ok3) return (false, 0); + if (leaf == T_UINT) return w > uint256(type(int256).max) ? (false, int256(0)) : (true, int256(w)); + if (leaf == T_INT) return (true, int256(w)); + if (leaf == T_BOOL) return w > 1 ? (false, int256(0)) : (true, int256(w)); + if (leaf == T_ADDRESS) return w >> 160 != 0 ? (false, int256(0)) : (true, int256(w)); + return (true, int256(w)); + } + + /// @notice `_locate`, exposed: whether the path resolves, the leaf's type code, and its offset in `res`. + function locate(bytes memory types, uint8[] memory field, bytes calldata res) + external + pure + returns (bool ok, uint8 leaf, uint256 at) + { + return _locate(types, field, res); + } + + /// @dev Walks the return types along `field` and finds where that value sits in `res`. + function _locate(bytes memory types, uint8[] memory field, bytes calldata res) + internal + pure + returns (bool ok, uint8 leaf, uint256 at) + { + uint256 t; + uint256 base; + for (uint256 i; i < field.length; ++i) { + uint8 code = uint8(types[t]); + uint256 idx = field[i]; + uint256 elem; + uint256 ptr; + + if (code == T_TUPLE) { + if (idx >= uint8(types[t + 1])) return (false, 0, 0); + uint256 c = t + 2; + uint256 head; + for (uint256 j; j < idx; ++j) { + head += _headWords(types, c); + c = _skip(types, c); + } + uint256 slot = base + 32 * head; + if (_isDynamic(types, c)) { + (ok, ptr) = _word(res, slot); + if (!ok || ptr > res.length) return (false, 0, 0); + base += ptr; + } else { + base = slot; + } + t = c; + } else if (code == T_ARRAY) { + elem = t + 1; + uint256 len; + (ok, len) = _word(res, base); + if (!ok || idx >= len) return (false, 0, 0); + uint256 start = base + 32; + if (_isDynamic(types, elem)) { + (ok, ptr) = _word(res, start + 32 * idx); + if (!ok || ptr > res.length) return (false, 0, 0); + base = start + ptr; + } else { + base = start + 32 * idx * _headWords(types, elem); + } + t = elem; + } else if (code == T_FIXED_ARRAY) { + if (idx >= uint8(types[t + 1])) return (false, 0, 0); + elem = t + 2; + if (_isDynamic(types, elem)) { + (ok, ptr) = _word(res, base + 32 * idx); + if (!ok || ptr > res.length) return (false, 0, 0); + base += ptr; + } else { + base += 32 * idx * _headWords(types, elem); + } + t = elem; + } else { + return (false, 0, 0); + } + } + return (true, uint8(types[t]), base); + } + + /// @dev bytes, string and T[] are dynamic; a struct or T[k] is dynamic if anything inside is. + function _isDynamic(bytes memory types, uint256 t) internal pure returns (bool) { + uint8 code = uint8(types[t]); + if (code == T_BYTES || code == T_STRING || code == T_ARRAY) return true; + if (code == T_FIXED_ARRAY) return _isDynamic(types, t + 2); + if (code == T_TUPLE) { + uint256 c = t + 2; + for (uint256 j; j < uint8(types[t + 1]); ++j) { + if (_isDynamic(types, c)) return true; + c = _skip(types, c); + } + } + return false; + } + + /// @dev Slots a value takes in its parent's head: 1 if dynamic (a pointer), else its full size. + function _headWords(bytes memory types, uint256 t) internal pure returns (uint256 n) { + if (_isDynamic(types, t)) return 1; + uint8 code = uint8(types[t]); + if (code == T_FIXED_ARRAY) return uint8(types[t + 1]) * _headWords(types, t + 2); + if (code == T_TUPLE) { + uint256 c = t + 2; + for (uint256 j; j < uint8(types[t + 1]); ++j) { + n += _headWords(types, c); + c = _skip(types, c); + } + return n; + } + return 1; + } + + /// @dev The position in `types` right after the type starting at `t`. + function _skip(bytes memory types, uint256 t) internal pure returns (uint256) { + uint8 code = uint8(types[t]); + if (code == T_ARRAY) return _skip(types, t + 1); + if (code == T_FIXED_ARRAY) return _skip(types, t + 2); + if (code == T_TUPLE) { + uint256 c = t + 2; + for (uint256 j; j < uint8(types[t + 1]); ++j) { + c = _skip(types, c); + } + return c; + } + return t + 1; + } + + /// @dev One 32-byte slot of the answer, or not-ok if the answer is too short. + function _word(bytes calldata b, uint256 at) internal pure returns (bool, uint256) { + if (at > b.length || b.length - at < 32) return (false, 0); + return (true, uint256(bytes32(b[at:at + 32]))); + } +} +// forge-lint: disable-end(unsafe-typecast) diff --git a/plan/marketplace/contracts/test/8183-tests/mocks/BareHook.sol b/plan/marketplace/contracts/test/8183-tests/mocks/BareHook.sol new file mode 100644 index 00000000..1197a652 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/mocks/BareHook.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {BaseERC8183Hook} from "../../../src/agentic-commerce-8183/hooks/BaseERC8183Hook.sol"; + +/// @notice Overrides nothing: exercises the base's default no-op handlers. +contract BareHook is BaseERC8183Hook { + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + + function initialize(address kernel_) external initializer { + __BaseERC8183Hook_init(kernel_); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/mocks/ERC165Only.sol b/plan/marketplace/contracts/test/8183-tests/mocks/ERC165Only.sol new file mode 100644 index 00000000..b1592493 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/mocks/ERC165Only.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; + +/// @notice Answers ERC-165 for IERC165 only — not a valid hook. +contract ERC165Only is IERC165 { + function supportsInterface(bytes4 id) external pure returns (bool) { + return id == type(IERC165).interfaceId; + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/mocks/MockAGW.sol b/plan/marketplace/contracts/test/8183-tests/mocks/MockAGW.sol new file mode 100644 index 00000000..def049d4 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/mocks/MockAGW.sol @@ -0,0 +1,106 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {OwnerIntent} from "@push-agw/libraries/Types.sol"; +import {Session} from "../../../src/agentic-commerce-8183/interfaces/external/IAGW.sol"; + +/// @notice An AGW stand-in for UniversalMarketplace unit tests. OBSERVER, NOT ORACLE: it records what +/// the marketplace presented and forwards the exec calldata so the REAL kernel runs `createJob` +/// with this contract as `msg.sender`. It checks the presenter and hashes like the real wallet, +/// and verifies no signature. `mode` lets a test make it misbehave in the ways the +/// marketplace must catch. +/// @dev `grantRulesWithSig` decodes the policy envelope as `(uint16, string, bytes)` exactly as the real wallet's +/// policy does, so a session in the pre-v6 two-field format fails here the way it fails there (a decode panic). +contract MockAGW { + enum Mode { + Honest, + TwoJobs, + ForeignClient, + OtherEvaluator // rewrites createJob's evaluator argument before calling the kernel + } + + address public constant OTHER_EVALUATOR = address(0xE7A1); + + address public immutable OWNER; + Mode public mode; + uint64 public grantNonce; + mapping(uint192 => uint64) public getNonce; + + bytes32 public lastSessionHash; + bytes32 public lastGrantIntentHash; + bytes32 public lastExecIntentHash; + bytes32 public lastExecCalldataHash; + address public lastGrantCaller; + /// @notice The full policy `initData` of the last grant, for tests and the MI07 invariant to decode. + bytes public lastPolicyInitData; + + bytes32 public constant RULES_ID = keccak256("mock-rules"); + + constructor(address owner_) { + OWNER = owner_; + } + + receive() external payable {} + + function setMode(Mode m) external { + mode = m; + } + + function grantRulesWithSig(Session calldata session, OwnerIntent calldata intent, bytes calldata) + external + returns (bytes32) + { + require(msg.sender == intent.executor, "MockAGW: executor"); + require(intent.sessionHash == keccak256(abi.encode(session)), "MockAGW: session hash"); + require(intent.grantNonce == grantNonce, "MockAGW: grant nonce"); + bytes calldata initData = session.actions[0].actionPolicies[0].initData; + abi.decode(initData, (uint16, string, bytes)); + grantNonce++; + lastPolicyInitData = initData; + lastSessionHash = keccak256(abi.encode(session)); + lastGrantIntentHash = keccak256(abi.encode(intent)); + lastGrantCaller = msg.sender; + return RULES_ID; + } + + function executeWithSig(bytes32, bytes calldata cd, OwnerIntent calldata intent, bytes calldata) external { + require(msg.sender == intent.executor, "MockAGW: executor"); + require(intent.execCalldataHash == keccak256(cd), "MockAGW: exec hash"); + require(intent.nonceSeq == getNonce[intent.nonceKey], "MockAGW: nonce"); + getNonce[intent.nonceKey]++; + lastExecIntentHash = keccak256(abi.encode(intent)); + lastExecCalldataHash = keccak256(cd); + + address target = address(bytes20(cd[0:20])); + bytes memory callData = cd[52:]; + if (mode == Mode.OtherEvaluator) { + address other = OTHER_EVALUATOR; + assembly ("memory-safe") { + mstore(add(callData, 68), other) // data + 4 (selector) + 32 (provider) = the evaluator word + } + } + if (mode == Mode.ForeignClient) { + new ForeignCaller().forward(target, callData); + return; + } + _call(target, callData); + if (mode == Mode.TwoJobs) _call(target, callData); + } + + function _call(address target, bytes memory data) internal { + (bool ok, bytes memory ret) = target.call(data); + if (!ok) { + assembly { + revert(add(ret, 0x20), mload(ret)) + } + } + } +} + +/// @dev Makes the call from a different address, so the kernel's `client` is not the AGW. +contract ForeignCaller { + function forward(address target, bytes memory data) external { + (bool ok,) = target.call(data); + require(ok, "ForeignCaller"); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/mocks/MockAGWFactory.sol b/plan/marketplace/contracts/test/8183-tests/mocks/MockAGWFactory.sol new file mode 100644 index 00000000..6858fea8 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/mocks/MockAGWFactory.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {OwnerIntent} from "@push-agw/libraries/Types.sol"; +import {MockAGW} from "./MockAGW.sol"; + +/// @notice Answers `isWallet` from a settable map, and — for UniversalMarketplace tests — deploys +/// MockAGW clones at CREATE2 addresses it can predict, mirroring the real factory's rules that +/// the marketplace depends on: explicit index == count, `intent.wallet` == predicted, and the +/// intent presentable only by its executor. It verifies NO signature; the AGW repo's E2E suite +/// runs the real factory. +contract MockAGWFactory { + mapping(address => bool) public isWallet; + mapping(address => uint256) public walletCount; + mapping(address => address) public ownerOf; + /// @notice Misbehaviour switch: deploy at another salt, i.e. not at the address `predictWallet` gave. + bool public misdeploy; + + error IndexMismatch(uint96 expected, uint96 provided); + error IntentWalletMismatch(address expected, address provided); + error ExecutorMismatch(address expected, address actual); + + function setWallet(address account, bool status) external { + isWallet[account] = status; + } + + function setMisdeploy(bool on) external { + misdeploy = on; + } + + function predictWallet(address owner, uint256 index) public view returns (address wallet, bool deployed) { + // forge-lint: disable-next-line(unsafe-typecast) + bytes32 salt = keccak256(abi.encode(owner, uint96(index))); // the real factory's index is a uint96 + bytes32 h = keccak256( + abi.encodePacked( + bytes1(0xff), + address(this), + salt, + keccak256(abi.encodePacked(type(MockAGW).creationCode, abi.encode(owner))) + ) + ); + // forge-lint: disable-next-line(unsafe-typecast) + wallet = address(uint160(uint256(h))); // CREATE2: the address is the hash's low 160 bits + deployed = index < walletCount[owner]; + } + + function deployWalletWithSig(OwnerIntent calldata intent, bytes calldata, string calldata) + external + returns (address wallet) + { + uint96 next = uint96(walletCount[intent.owner]); + if (intent.index != next) revert IndexMismatch(next, intent.index); + (address predicted,) = predictWallet(intent.owner, intent.index); + if (intent.wallet != predicted) revert IntentWalletMismatch(predicted, intent.wallet); + if (msg.sender != intent.owner && msg.sender != intent.executor) { + revert ExecutorMismatch(intent.executor, msg.sender); + } + walletCount[intent.owner] = next + 1; + bytes32 salt = keccak256(abi.encode(intent.owner, intent.index)); + if (misdeploy) salt = keccak256(abi.encode(salt)); + wallet = address(new MockAGW{salt: salt}(intent.owner)); + isWallet[wallet] = true; + ownerOf[wallet] = intent.owner; + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/mocks/MockERC20_6.sol b/plan/marketplace/contracts/test/8183-tests/mocks/MockERC20_6.sol new file mode 100644 index 00000000..5b70eed8 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/mocks/MockERC20_6.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +/// @notice 6-decimal test token with open minting. +contract MockERC20_6 is ERC20 { + constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {} + + function decimals() public pure override returns (uint8) { + return 6; + } + + function mint(address to, uint256 amount) external { + _mint(to, amount); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/mocks/MockPRC20Source.sol b/plan/marketplace/contracts/test/8183-tests/mocks/MockPRC20Source.sol new file mode 100644 index 00000000..37b94b55 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/mocks/MockPRC20Source.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +/// @notice A PRC20 stand-in: an ERC-20 whose `SOURCE_CHAIN_NAMESPACE()` the test sets. OBSERVER, NOT ORACLE: +/// the namespace and the shape of the answer are inputs; the marketplace's judgement of them is what +/// is under test. +contract MockPRC20Source is ERC20 { + /// @dev How `SOURCE_CHAIN_NAMESPACE()` answers. Namespace: a well-formed string · Reverts · Short: one + /// word · BadOffset: a string head whose offset is not 32 · Overlong: a length past the data. + enum Answer { + Namespace, + Reverts, + Short, + BadOffset, + Overlong + } + + uint8 internal immutable DECIMALS; + string internal namespace; + Answer public answer; + + constructor(string memory name_, string memory namespace_, uint8 decimals_) ERC20(name_, name_) { + namespace = namespace_; + DECIMALS = decimals_; + } + + function setNamespace(string calldata namespace_) external { + namespace = namespace_; + } + + function setAnswer(Answer a) external { + answer = a; + } + + function mint(address to, uint256 amount) external { + _mint(to, amount); + } + + function decimals() public view override returns (uint8) { + return DECIMALS; + } + + // forge-lint: disable-next-line(mixed-case-function) + function SOURCE_CHAIN_NAMESPACE() external view returns (string memory) { + Answer a = answer; + if (a == Answer.Reverts) revert("MockPRC20Source: reverts"); + if (a == Answer.Namespace) return namespace; + bytes memory raw; + if (a == Answer.Short) raw = abi.encode(uint256(7)); + if (a == Answer.BadOffset) raw = abi.encode(uint256(64), uint256(0)); + if (a == Answer.Overlong) raw = abi.encode(uint256(32), uint256(1000)); + assembly ("memory-safe") { + return(add(raw, 32), mload(raw)) + } + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/mocks/MockSmartSession.sol b/plan/marketplace/contracts/test/8183-tests/mocks/MockSmartSession.sol new file mode 100644 index 00000000..53af7549 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/mocks/MockSmartSession.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +/// @notice Answers `isPermissionEnabled` from a settable map. +contract MockSmartSession { + mapping(bytes32 => mapping(address => bool)) internal enabled; + + function setPermission(bytes32 permissionId, address account, bool status) external { + enabled[permissionId][account] = status; + } + + function isPermissionEnabled(bytes32 permissionId, address account) external view returns (bool) { + return enabled[permissionId][account]; + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/mocks/RecordingHook.sol b/plan/marketplace/contracts/test/8183-tests/mocks/RecordingHook.sol new file mode 100644 index 00000000..32bd4624 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/mocks/RecordingHook.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {IERC8183Hook} from "../../../src/agentic-commerce-8183/interfaces/IERC8183Hook.sol"; +import {IAgenticCommerce} from "../../../src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol"; + +/// @notice Observer hook: records every callback and the job status the kernel shows at that moment. +contract RecordingHook is IERC8183Hook { + struct Call { + bool isBefore; + uint256 jobId; + bytes4 selector; + bytes data; + uint8 statusSeen; + } + + Call[] public calls; + + function count() external view returns (uint256) { + return calls.length; + } + + function getCall(uint256 i) external view returns (Call memory) { + return calls[i]; + } + + function beforeAction(uint256 jobId, bytes4 selector, bytes calldata data) external { + _record(true, jobId, selector, data); + } + + function afterAction(uint256 jobId, bytes4 selector, bytes calldata data) external { + _record(false, jobId, selector, data); + } + + function supportsInterface(bytes4 id) external pure returns (bool) { + return id == type(IERC8183Hook).interfaceId || id == type(IERC165).interfaceId; + } + + function _record(bool isBefore, uint256 jobId, bytes4 selector, bytes calldata data) internal { + uint8 status = uint8(IAgenticCommerce(msg.sender).getJob(jobId).status); + calls.push(Call(isBefore, jobId, selector, data, status)); + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/mocks/ReentrantHook.sol b/plan/marketplace/contracts/test/8183-tests/mocks/ReentrantHook.sol new file mode 100644 index 00000000..e582ac1a --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/mocks/ReentrantHook.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {IERC8183Hook} from "../../../src/agentic-commerce-8183/interfaces/IERC8183Hook.sol"; + +/// @notice Hook that calls back into the kernel with `payload` and bubbles the revert. +contract ReentrantHook is IERC8183Hook { + bytes public payload; + bool public inAfter; + + function setPayload(bytes calldata p) external { + payload = p; + } + + function setInAfter(bool v) external { + inAfter = v; + } + + function beforeAction(uint256, bytes4, bytes calldata) external { + if (!inAfter) _reenter(); + } + + function afterAction(uint256, bytes4, bytes calldata) external { + if (inAfter) _reenter(); + } + + function supportsInterface(bytes4 id) external pure returns (bool) { + return id == type(IERC8183Hook).interfaceId || id == type(IERC165).interfaceId; + } + + function _reenter() internal { + if (payload.length == 0) return; + (bool ok, bytes memory ret) = msg.sender.call(payload); + if (!ok) { + assembly { + revert(add(ret, 32), mload(ret)) + } + } + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/mocks/RevertingHook.sol b/plan/marketplace/contracts/test/8183-tests/mocks/RevertingHook.sol new file mode 100644 index 00000000..471757b6 --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/mocks/RevertingHook.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {IERC8183Hook} from "../../../src/agentic-commerce-8183/interfaces/IERC8183Hook.sol"; + +/// @notice Hook that reverts `HookSaysNo` in the flagged phase. +contract RevertingHook is IERC8183Hook { + error HookSaysNo(); + + bool public revertBefore; + bool public revertAfter; + + function setRevertBefore(bool v) external { + revertBefore = v; + } + + function setRevertAfter(bool v) external { + revertAfter = v; + } + + function beforeAction(uint256, bytes4, bytes calldata) external view { + if (revertBefore) revert HookSaysNo(); + } + + function afterAction(uint256, bytes4, bytes calldata) external view { + if (revertAfter) revert HookSaysNo(); + } + + function supportsInterface(bytes4 id) external pure returns (bool) { + return id == type(IERC8183Hook).interfaceId || id == type(IERC165).interfaceId; + } +} diff --git a/plan/marketplace/contracts/test/8183-tests/mocks/RoutingProbeHook.sol b/plan/marketplace/contracts/test/8183-tests/mocks/RoutingProbeHook.sol new file mode 100644 index 00000000..4313a15c --- /dev/null +++ b/plan/marketplace/contracts/test/8183-tests/mocks/RoutingProbeHook.sol @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {BaseERC8183Hook} from "../../../src/agentic-commerce-8183/hooks/BaseERC8183Hook.sol"; + +/// @notice Phase-3 concrete hook: records which handler ran and the arguments it decoded. +contract RoutingProbeHook is BaseERC8183Hook { + struct Rec { + string handler; + uint256 jobId; + address caller; + address addrArg; + uint256 uintArg; + bytes32 b32Arg; + bytes optParams; + } + + Rec[] internal recs; + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + + function initialize(address kernel_) external initializer { + __BaseERC8183Hook_init(kernel_); + } + + /// @dev Calls the base init outside an initializer — must revert NotInitializing. + function initOutside(address kernel_) external { + __BaseERC8183Hook_init(kernel_); + } + + function count() external view returns (uint256) { + return recs.length; + } + + function rec(uint256 i) external view returns (Rec memory) { + return recs[i]; + } + + function _push(string memory h, uint256 id, address c, address a, uint256 u, bytes32 b, bytes memory o) internal { + recs.push(Rec(h, id, c, a, u, b, o)); + } + + function _preSetProvider(uint256 id, address c, address p, bytes memory o) internal override { + _push("preSetProvider", id, c, p, 0, 0, o); + } + + function _postSetProvider(uint256 id, address c, address p, bytes memory o) internal override { + _push("postSetProvider", id, c, p, 0, 0, o); + } + + function _preSetBudget(uint256 id, address c, uint256 amt, bytes memory o) internal override { + _push("preSetBudget", id, c, address(0), amt, 0, o); + } + + function _postSetBudget(uint256 id, address c, uint256 amt, bytes memory o) internal override { + _push("postSetBudget", id, c, address(0), amt, 0, o); + } + + function _preFund(uint256 id, address c, bytes memory o) internal override { + _push("preFund", id, c, address(0), 0, 0, o); + } + + function _postFund(uint256 id, address c, bytes memory o) internal override { + _push("postFund", id, c, address(0), 0, 0, o); + } + + function _preSubmit(uint256 id, address c, bytes32 d, bytes memory o) internal override { + _push("preSubmit", id, c, address(0), 0, d, o); + } + + function _postSubmit(uint256 id, address c, bytes32 d, bytes memory o) internal override { + _push("postSubmit", id, c, address(0), 0, d, o); + } + + function _preComplete(uint256 id, address c, bytes32 r, bytes memory o) internal override { + _push("preComplete", id, c, address(0), 0, r, o); + } + + function _postComplete(uint256 id, address c, bytes32 r, bytes memory o) internal override { + _push("postComplete", id, c, address(0), 0, r, o); + } + + function _preReject(uint256 id, address c, bytes32 r, bytes memory o) internal override { + _push("preReject", id, c, address(0), 0, r, o); + } + + function _postReject(uint256 id, address c, bytes32 r, bytes memory o) internal override { + _push("postReject", id, c, address(0), 0, r, o); + } +} diff --git a/plan/marketplace/current-baseline.md b/plan/marketplace/current-baseline.md new file mode 100644 index 00000000..dac8a70b --- /dev/null +++ b/plan/marketplace/current-baseline.md @@ -0,0 +1,60 @@ +# Verified marketplace baseline + +This records the contract/research baseline. SDK implementation and later live acceptance are tracked in [implementation status](implementation-status.md), including a newly verified SDK-versus-marketplace CEA factory mismatch on three chains. + +Observed October 20, 2026. Deployment source: `443b4e2dd9ca5dd9ffc8efebdfcecd619dd66c47`, branch `sdk-iteration-v1` in `pushchain/push-chain-core-contracts`. AGW dependency: `ffd567d3e49b2d27c6f50ad36093274dbac3090f`, matching the existing SDK v6 adapter. + +## Live Donut deployment + +RPC `https://evm.donut.rpc.push.org/`, chain ID 42101. [Pinned observations](research/2026-10-20/live-deployment.json): block **24447347**. The address book reports deployment on October 20, final transaction block 24443653; this review independently checked current code/wiring, not every deployment transaction. + +| Component | Address | +| --- | --- | +| Marketplace | `0x9071ebE01B75123A91e88eB6ec4BF163F3fE9BF4` | +| Kernel | `0x977cf1AC973E9eC4332791d531507575006157Ed` | +| Rules hook | `0xDe7A94e510b6C571DE7880d441349689F73A32b3` | +| Rules helper | `0x5b98A8E0df5b918DF76cD2BE84bA7995B39dfd44` | +| JobSpecBuilder library | `0x2de1e3F053b0bBa0cE0C6953144534a0b055f59e` | +| Payment token, pUSDC / `USDC.eth`, 6 decimals | `0x7A58048036206bB898008b5bBDA85697DB1e5d66` | +| Current evaluator, EOA | `0x1afC81396f1bb36F91f74506284952b81e4bd47c` | +| AGW factory | `0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc` | +| SmartSession engine | `0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d` | + +Marketplace reports `version() == "2.0.0"`. Marketplace/kernel are unpaused; the hook is whitelisted; hook/factory/engine/kernel wiring matches the supplied book. Platform and evaluator fees are zero. `MIN_EXPIRY_WINDOW = 300` seconds; `EVALUATOR_GRACE_PERIOD = 3600`. No cards or kernel jobs existed at the pinned observation. + +Supported card destinations: Ethereum Sepolia, Base Sepolia, Arbitrum Sepolia and BSC Testnet. Registered CEA factories/implementations match the book. Four independent EIP-1167/CREATE2 calculations agree with `computeCEA` for a sample predicted AGW. This checks the marketplace's registered derivation, not destination liquidity or current remote factory configuration. + +Proxy implementation/admin slots match the address book. Executable runtimes of all five marketplace-stack components match the pinned build after resolving library linking/self-address and excluding compiler metadata. The matching artifacts all use 1,000 optimizer runs. The README's larger 99,999-run helper/kernel sizes are not the live sizes; see [comparison](research/2026-10-20/runtime-comparison.json). Full bytecode including metadata is not identical, and this is not an audit. + +## Implemented contract behavior + +1. Provider `registerAgentCard` creates one integer-ID card; another registration by that provider reverts. `updateAgentCard` preserves provider, execution chain and active flag, bumps version and clears verification. Verification is a version-specific tag, not an execution gate. +2. A card combines `AgentCard`, `abi.encode(AgentCardRules)` and `abi.encode(JobSpecTemplate)`. `jobType` is a bytes32 hash, not a recoverable string. Full views and an ABI inventory are under [contracts](contracts/). +3. Rules are `assets`, `principalAsset`, `maxGasPerCall`, `allowedCalls`. PRC20 assets are on Push and report the card's destination chain. The principal asset's total is `MARKER_PRINCIPAL`; its per-call cap may be that marker or a nonzero literal. Other asset caps match byte-for-byte. +4. `approve` is allowed with a nonzero literal EQ spender pin and a MAX amount pin. `increaseAllowance` is refused. Transfer recipients must be bound to the user's destination CEA. There is **no owner-approvals array**. +5. `MARKER_WALLET = keccak256("push.marketplace.marker.WALLET")`; `MARKER_PRINCIPAL = keccak256("push.marketplace.marker.PRINCIPAL")`. Cards store markers; signed sessions store resolved addresses/amounts. Public SDK sentinels need not equal these wire values. +6. `previewIntent` and `buildCreateJobCalldata` provide exact intent/calldata. `previewIntent` alone does not perform all `openJob` eligibility checks; SDK preview must also check ranges, pause, version, wallet occupancy and session compatibility. +7. `openJob` accepts an OwnerIntent and the owner's signature, checks content and nonces, deploys/reuses AGW, grants the session, and creates the kernel job. No deposits or escrow. The intent binds card version through the built description's `origin`. `label` is deploy-only cosmetic input outside the signed intent. +8. Deposits and kernel funding are subsequent operations. Provider calls `setBudget`; client funds with `expectedBudget` and exactly 32 bytes `abi.encode(rulesId)` for the interim hook. `providerFee` on the card is a reference price; the kernel only checks the client's supplied expected budget against its current budget. +9. The interim hook proves client is an AGW, permission enabled, and no Funded/Submitted hook-bound job. It does not check agent/provider equality, expiry, criteria, baseline or verdict. Marketplace checks bind provider/expiry when opening, but manual wallet edits and plain kernel jobs require separate consideration at fund. +10. Client or provider may reject an Open job. Only evaluator may reject Funded/Submitted. Cancellation is `reject`, not a separate deployed `cancel` selector. Marketplace `activeJobOf` becomes zero for Rejected; permissions are not revoked automatically. `claimRefund` is unpausable and callable by anyone after the relevant deadline; funds go to the recorded client. + +The marketplace's occupancy includes unexpired Open jobs, unlike the hook's Funded/Submitted-only occupancy. A plain hookless job is outside that hook's accounting. The marketplace kernel is immutable configuration; moving to K-12 on another kernel requires an upgrade/redeploy and hook wiring, not an SDK address substitution. + +## Wire supported by this deployment + +`JobSpec = (reads, checks, logic, allowedMutability, origin, executeBy, failFinalAt)`. + +- `Read`: split namespace/chainId, confirmations, 20-byte target, 4-byte selector, args, output-type codes, field path. +- `Check`: one read index, Evaluation, Operation, int256 target. +- `Logic`: ALL=0 / ANY=1 / AT_LEAST=2, direct check indices and child-logic indices; root index 0. +- `AllowedMutability`: NONE=0 / CLIENT=1 / PROVIDER=2 / BOTH=3, carried without enforcement. +- Limits defined with the schema: 16 reads, 16 checks, 32 logic entries. Builder does not enforce all evaluator semantic limits. Template order: reads, checks, logic, allowedMutability, params. +- `origin = keccak256(abi.encode(marketplace, cardId, cardVersion, principal))`; plain specs use zero. +- Wire `FillSource.CEA` / `TargetSource.CEA` map to SDK `AGENTIC.WALLET` without renaming the ABI. + +## Not implemented here + +K-12 per-job tokens; createJob hooks; mutable criteria negotiation/freezing; automated snapshot/verify/retry; compatible evaluator; verified ratings; recurring jobs; Solana/Push-native cards; non-EVM evaluation reads. There is no evidence that setting the EOA evaluator to the other demo evaluator would work; the repo explicitly documents incompatible kernel/token/hook/wire assumptions. + +The latest linked evaluator source `8059817` changes not only reads/checks but top-level field order, logic nodes and enum ordinals. See [gap W01](analysis/spec-and-contract-gaps.md). Retain separate explicit wire profiles in research; do not silently translate or ship a universal decoder claiming compatibility. diff --git a/plan/marketplace/implementation-plan.md b/plan/marketplace/implementation-plan.md new file mode 100644 index 00000000..b30ff288 --- /dev/null +++ b/plan/marketplace/implementation-plan.md @@ -0,0 +1,106 @@ +# Marketplace and job SDK implementation plan + +**Implementation is underway:** see [current status](implementation-status.md). The dated plan below records the original handoff; the referenced AGW fixes were subsequently committed as a542f303. + +Planning only, October 20, 2026. Start from existing `feat/agw-sdk-v4` without disturbing its uncommitted AGW error improvements. Keep marketplace delivery separate from AGW release history. This is a proposed implementation sequence; product decisions still open are listed in [questions](questions.md). + +## First delivery boundary + +Target verified Donut marketplace v2 and its own pUSDC kernel, AGW v6 and interim rules hook. Support the four configured EVM testnets. Deliver card discovery/provider management, permission/spec authoring, preview/open, explicit deposits, and the kernel lifecycle with manual evaluator status. Do not advertise mutable criteria, automated verification, K-12, recurring jobs, verified ratings, mainnet or non-EVM cards. + +No `client.evaluation`, `compileCard`, `market.compile`, `start`, `publish`, hash card IDs, public address dump under `CONSTANTS.MARKET`, admin SDK or generic prepare namespace. These were superseded. Public vocabulary goes under `AGENTIC`; helpers go under `PushChain.utils.job` / `PushChain.utils.market`, not under CONSTANTS. + +## Public surface to implement + +| Surface | Target behavior | +| --- | --- | +| `client.market.cards/card` | Count/ID walk or per-provider lookup; full decoded card/version/tags/rating; bounded concurrent reads | +| `client.market.preview` | Exact card-version snapshot, independent CEA match, session + intent + kernel calldata + JobSpec + readable permissions/criteria; no signing/broadcast | +| `client.market.openJob` | Revalidate same plan, authorize exact OwnerIntent, client-submit by dated decision, validate JobOpened and actual wallet/job/rules association, return `{jobId,wallet,rulesId,tx}` | +| `client.market.deposit` | Separate recorded steps with receipts/recovery; exact opened-card snapshot; fee/PC/principal funding only after revised approval design is agreed | +| `client.market.job/activeJob` | Marketplace mappings and occupancy, distinct from kernel/evaluator facts | +| `client.market.agent.register/update/setActive/card` | One provider card, on-chain integer IDs, new version clears verification, immutable provider/chain | +| `client.job.create/setBudget/fund/submit/claimRefund` | Current kernel ABI, correct client/provider identity, exact reviewed expectedBudget, rulesId optParams only with compatible hook | +| `client.job.status/list/watch` | Kernel + hook reads, stable event-derived deliverable where absent in storage, unavailable evaluator facts represented honestly; stop callback and cursor/deduplication | +| `client.job.cancel` | Proposed addition to resolve the decided client-cancel capability; owner atomic reject+revoke for marketplace AGWs if approved; plain clients reject Open jobs directly | +| `client.job.verify` | Deferred/gated until a compatible contract exposes an agreed retry entry point; fail before signing on current EOA deployment | +| `utils.job` | buildJobSpec, buildJobSpecTemplate, encode/decode/describe/previewJobSpec; pure except explicit paid preview | +| `utils.market` | validate/encode/decodeAgentCardRules using deployed 4-field shape, v6 pins and published markers | +| `AGENTIC` | Preserve WALLET/PRESETS; add PRINCIPAL and JOB EVALUATION/OPERATION/LOGIC/ALLOWED_MUTABILITY vocabulary. Per-chain JOB.ADDRESS is the page 7 exception to internal deployment constants; confirm EOA evaluator representation. No public encoder-context or limit dumps. | + +Every write follows existing UniversalTxResponse and progress-hook conventions. Reads and previews are available in read-only mode where no paid reads are requested. MarketError / JobError / JobSpecError need additive typed codes and decoded causes; do not force new codes into the current closed AgenticErrorCode union with casts. + +## Module shape and reuse + +Proposed new directories: `packages/core/src/lib/market`, `job`, and `job-spec`. Keep wire encoders, on-chain reads, transaction composition and public authoring normalization separate. Add namespace integration in `push-chain/push-chain.ts`, helper exposure in `utils.ts`, and exports in the package entry points. Do not duplicate the whole orchestrator or AGW backend. + +| Existing source | Reuse / qualification | +| --- | --- | +| `agentic/contracts/{donut-v6,v6}.ts`, `deployments.ts`, ABI snapshots | Same AGW generation and verified reader; add an internal marketplace deployment profile with kernel/hook/token/evaluator capabilities and source pins | +| `agentic/codec/{session,universal,abi-layout,pins,ids}.ts` | SessionWire, canonical envelope, static tuple/fixed-array paths, v6 EQ/MAX pins and hashes. Card markers need a separate unresolved representation; publicRule normalization resolves wallet values too early for stored templates. | +| `agentic/runtime.ts`, `context.ts`, `reads/*`, `management/common.ts` | Signer Push identity versus execution wallet, snapshot reads, transaction/error/progress conventions. Add typed signing narrowly; external ERC-1271/home-chain semantics need independent acceptance. | +| `agentic/response.ts`, core transaction response/tracker | Preserve signer origin, actual sender, hashes, wait/replay and decoded errors. Do not claim relayer is owner or AGW is provider. | +| `universal/signer/*`, `universal.signTypedData` | Existing EIP-712 facility; capability-check signer before prompting. Factory domain includes signer home chain, factory address and Push-chain salt. Do not rebuild a generic EIP-712 domain from guesses. | +| `orchestrator/cea-utils.ts`, PRC20 metadata/source helpers, registry | Independent CEA derivation and exact source-token identity. PRC20 on Push and destination token address are distinct. Missing route stays explicit. | +| `read-state/read-params.ts`, query encoders/result shapes, `prepareRead` | Reuse logical parsing/ABI data; existing async prepared request is not the pure JobSpec read shape. Add the agreed adapter without replacing read/prepareRead or hiding fee/height preflight inside pure builders. | +| Existing AGW E2E runner/local harness conventions | New opt-in marketplace group, actual receipt/event evidence, separate unfunded/fork/funded reports; default runner selection remains intentional | + +## Phase 1 — freeze profiles, types and ABI bindings + +Import verified ABIs including all 40 errors from the error library (marketplace ABI alone omits helper errors). Register only the supplied deployment; fail unsupported networks before signatures. Pin exact JobSpec/Template tuple definitions and enum ordinals for deployed v2. Keep the linked evaluator schema as a distinct comparison profile, not an automatic decoder fallback. Canonical public types retain bigint IDs/hashes and lossless selector/word positions; optional metadata supplies names without inventing them. + +Acceptance: imports/declarations, selector/event/error vectors, deployment wiring/capability checks, no legacy names accidentally exported, unsupported signer/network failures before signature. + +## Phase 2 — card rules and JobSpec authoring + +Implement deployed AgentCardRules including principal marker caps, fixed/nonprincipal caps, WALLET/PRINCIPAL pins, approved spender literals and amount maximums. Preserve ordered assets/calls/pins exactly. Validate duplicate/overlapping alternatives and contract ceilings. Keep intended on-chain behavior and SDK validation differences explicit. + +Implement output-layout type codes from ABI (including nested tuples/arrays), field paths, signed targets, tree validation/flattening with higher child indices, template fills and bounded params. ABI encode/decode must be canonical. Decode known card templates/jobs contextually; the convenience decoder must validate shape and canonical re-encoding and reject ambiguous/unsupported inputs. ABI bytes are not a self-describing version tag. + +Add the pure logical-read preparation form agreed for W08. Preserve placeholder location/ABI metadata so an address sentinel can become a zero word plus a fill record; never pass the sentinel directly to viem's address encoder or infer holes from all zero-valued arguments. Pure encoding accepts verified deterministic token data; network-dependent resolution stays explicit. + +Describe exact permissions, alternatives, amount units, gas, expiry and every criteria check. Do not turn a preview with missing baseline into a successful NUMBER/PERCENTAGE result. Preview using universal reads incurs explicit fees; reuse the supported request client path. Defer optional free-RPC fallback until semantics are agreed. Keep EVM-only evaluation read claims for this wire. + +Acceptance: Solidity↔TypeScript vectors from the pinned builder/decoder, encode→decode→encode equality, template fill/PRINCIPAL_BPS rounding, deeply nested logic/ABI returns, bounds/overflow/negative targets, no unresolved placeholders in complete specs, named errors, descriptive output faithful to OR/AT_LEAST behavior. Cross-profile payloads must fail closed. + +## Phase 3 — card reads/provider writes + +Implement all discovery and provider methods, using agentCardOf for provider lookup and count/getAgentCard for enumeration. Keep consistent block reads, bounded concurrency and cancellation for large walks. Preserve disabled/inactive distinctions, version and verification resets. Registration/update validate locally and simulate actual contract behavior before sending. Reject unsupported payment tokens explicitly. + +Metadata is untrusted optional display content: hash-check fetched bytes, retain raw jobType/selector, and do not change permissions from metadata. No indexer or hosting service is implied by publishing a metadata URI. + +Acceptance: real local contracts for registration, duplicate provider, update immutability, stale versions, inactive/disabled and verified tags, correct event-derived IDs, read-only client behavior and unknown ID/provider results. + +## Phase 4 — preview, intent, signing and opening + +Take one card/config snapshot. Derive the connected **owner's** wallet index even when another execution context is present. Obtain destination CEA independently and compare computeCEA. Resolve markers into a v6 session, preserving all constraints and matching actual helper checks. Read nonces/lane/deadline, obtain previewIntent and buildCreateJobCalldata, and independently verify sessionHash/execCalldataHash/origin. Check all openJob eligibility conditions, not just previewIntent success. + +Before signing, re-read current version, configuration, ownership, wallet slot/occupancy and nonces. If any signed content changes, return STALE_PLAN for user review; never silently produce a new plan. Label is outside the signed intent and must be described as cosmetic. Validate signer typed-data support/home-chain identity, EOA and ERC-1271 flows. Use the dated client-submission default; relay remains a future transport until an actual service is supplied. + +After receipt, verify emitted wallet, card version, principal, rules ID, job ID and actual kernel/AGW association. Preserve submitted hash if receipt lookup fails. No duplicate opening on retry; recover by receipt/events. OwnerIntent authorization is one signature, while submitting a transaction can require another signing interaction; document the verified UX. + +Acceptance: fresh/existing wallet, index race, parallel plans, stale card/config/nonces, signature replay, tampered calldata/spec/session/CEA, native owner and external EVM UEA, unsupported signer, user rejection, receipt failure/recovery. Fork tests must use real AGW signatures, not only MockAGW. + +## Phase 5 — kernel lifecycle and historical deposits + +Create plain jobs through the connected ordinary account or AGW owner door. Provider calls go through provider identity. Fund composes token allowance plus exact-budget funding atomically for AGW, with no sequential fallback disguised as atomic success. The interim hook expects exactly rulesId; no speculative specHash payload. Keep allowance/funding distinction from the wallet's automatic **gateway** approval. + +Market deposits must use the **opened version** and original principal, recovered from the validated plan or verified historical source/events/transaction input. Do not use today's mutated card. Separate principal, fee and PC assets, combine repeated token requirements correctly, quote gas and routes explicitly, and report partial progress/hashes so resuming does not pay every step again. Revise obsolete approval fields before implementing them. “Any account can transfer funds” does not grant it owner authority for wallet operations. + +Implement status/list/watch with kernel state, hook binding and explicitly unavailable evaluator state on today's deployment. Recover deliverable from JobSubmitted where kernel storage lacks it. Deduplicate logs, cleanly unsubscribe, resume from a cursor, and re-read status after gaps. Refund goes to recorded client even if a third party triggers claimRefund. Never pausable by an SDK convenience guard when the kernel allows it. + +If approved, client cancel on an AGW uses one owner batch: reject Open job + revoke that job's rulesId. Fork evidence shows existing v6 permits this. Check current permission/status and protect against races; handle already-revoked permissions without revoking unrelated grants. Provider/evaluator rejection cannot claim owner cleanup it lacks authority to perform. Existing grants after earlier jobs can cause AMBIGUOUS_RULE; reopening must not silently pick or widen one. + +Acceptance: fixed reviewed budget versus re-quote, same/different fee/principal token, zero budgets (kernel allows free jobs), insufficiency/allowance, hook payload shape, plain/AGW identity, cancel cleanup/rollback, card update between open/deposit, interrupted deposit resumption, refund while paused, grace boundaries, terminal events/replay, existing overlapping grants. + +## Phase 6 — evaluation delivery after alignment + +Require a compatible deployed hook/evaluator and a single canonical wire before adding baselines, prefund, automatic submit→verify and retry. Bind job context to kernel/chain/evaluator configuration. Shared Solidity/SDK vectors must cover enum values as well as field order. If mutability is approved, fund must atomically commit expectedSpecHash/revision and budget. Current 32-byte interim payload cannot provide that. + +Tests include attested reads, exact baseline/end heights, UNKNOWN/INCONCLUSIVE, percentage zero denominator, owner checkpoints, duplicate/late callbacks, retries, fee shortfalls and settlement/refunds. Do not infer automatic behavior from a zero-code EOA evaluator or an unrelated demo stack. + +## Delivery and validation order + +Suggested PR sequence: (1) profile/types/codecs + authoring helpers, (2) card/provider namespace, (3) preview/open + signing/receipts, (4) job lifecycle and agreed deposit/cancel behavior, (5) documentation/examples/package validation, (6) automatic evaluation only after compatible contract delivery. Independent layers may progress while the specific product questions are resolved. + +Run focused meaningful unit vectors and pinned real-contract tests per phase; then build/typechecks, consumer examples and CJS/ESM declaration/API checks. Add funded Donut execution only for the completed public path, as a separate opt-in acceptance stage. The research tests in this folder establish current contract behavior; they are not passing tests for SDK features that have not been written. diff --git a/plan/marketplace/implementation-status.md b/plan/marketplace/implementation-status.md new file mode 100644 index 00000000..bb807cde --- /dev/null +++ b/plan/marketplace/implementation-status.md @@ -0,0 +1,62 @@ +# Marketplace SDK implementation status + +October 20, 2026 — SDK-only completion checkpoint on `feat/agw-sdk-v4`. [Completed SDK checklist and external boundary](sdk-readiness.md). No package was published. + +## Coverage against SDK pages 6 and 7 + +| Documented API group | Implemented | Pending | +| --- | --- | --- | +| Marketplace user APIs | 7 / 7 | No scoped SDK implementation item; three external CEA rollout mismatches below | +| Provider/card management | 4 / 4 | No additional method placeholder | +| JobSpec/card-rule helpers | 9 / 9 | No scoped SDK implementation item | +| Kernel job APIs | 8 / 9 | `job.verify`: compatible evaluator/hook and canonical wire | +| **Named API entrypoints** | **28 / 29** | **1 contract-dependent placeholder** | + +This is API coverage, not a claim that every future draft option is implemented. It follows deployed v2 where the draft differs (pinned agent approvals, immutable criteria, pUSDC). `job.cancel`, pure read preparation and constants are additional delivered surfaces. SDK-only implementation and acceptance within this boundary are complete. Evaluation facts in `status` remain unavailable until compatible contracts exist. Live principal/escrow/payout and origin bridging now pass; reference contract/delegated-wallet acceptance passes against real local contracts. Custom wallet vendors provide their own signer transport. + +## Implemented + +- `client.market`: card discovery/reads; simulated provider register/update; activation/card; independent CEA and JobSpec preview; simulation-backed OwnerIntent signing/open for native EOAs, deployed external EVM UEAs and reference ERC-1271/7702 owners; mined-input receipt recovery without re-signing, complete event/kernel/wallet/mapping proof; job mappings and active-wallet reads. Inputs are copied before asynchronous work. +- `client.market.deposit`: original opening/card-version recovery, including archive-less/same-block recovery bound to event hashes and transaction input; principal/fee/PC balance targets; combined shared-token requirements; explicit origin funding; confirmed receipts and incomplete-deposit recovery. Broadcast errors retain pending hashes and stop automatic retry. No retired owner-approval array or escrow acceptance is inferred. +- `client.job`: plain create; provider pricing; reviewed-budget acceptance, balances/allowances and native/AGW atomic funding; submit; status/list/watch with exact cursor, deduplication, retry, callback isolation and reorg stop; client cancel with recorded grant revocation; expiry/grace refunds, including while paused. +- `PushChain.utils.job`: pure authoring, builders, canonical v2 codecs, ABI-name/decimal descriptions; paid `previewJobSpec`, fee caps, nested decoding and three-state logic; authenticated request-ID resumption without new payment. Missing baselines/reads remain unknown. `client.universal.read.prepare` exposes the same pure adapter; resolved prepared objects can be sent directly. Raw EVM calldata is also supported. +- `PushChain.utils.market`: deployed four-field card rules, principal/wallet markers and pinned approvals. Destination-token resolution always uses the explicit card chain, including same-address native-token objects. Decoded unknown PRC20s remain explicit references. Unchanged legacy wire metadata is preserved; archive raw bytes for persistence. +- `AGENTIC.PRINCIPAL` and `AGENTIC.JOB` vocabulary/address table; public types/errors; source and compiled consumer guide checks. The API checker now canonicalizes equivalent string-literal quote syntax in emitted property names. + +Binary JobSpec data in the kernel's Solidity string is handled as raw bytes while retaining the original createJob selector. Card versions, rules, origin and calldata are independently compared before signing. Plain jobs and historical card versions require an explicitly reviewed budget; the SDK does not silently adopt a re-quote. + +Registry summaries do not decode an unverified provider's template. A malformed template therefore cannot break listing or prevent its provider from deactivating/updating the card. Full decoding/preview still refuses unsupported content. + +## Current placeholders and delivery limits + +| Surface | Current behavior / next requirement | +| --- | --- | +| Deposit execution boundary | Open/unexpired and unused enabled permission; authenticated state/event/input history required. PC target is not a whole-job quote. Live principal and BSC-origin inbound bridging pass; independent concurrent funding clients must coordinate. | +| Automatic evaluator / job.verify | Explicit capability error. Current evaluator is manual; the linked evaluator has a different ABI/wire. No baseline, frozen-spec or verdict data is invented. | +| Replacement criteria / non-NONE cards | Refused before writes. Expected-spec-hash acceptance must be delivered with compatible contracts before mutable negotiation. | +| Contract/delegated owners | Real reference ERC-1271 and compatible/incompatible 7702 acceptance passes; external EVM UEA transport passes live. Custom vendors supply their own signer transport. Incompatible signatures fail simulation before broadcast; undeployed external UEAs/missing typed signing fail before prompting. | +| Relayer, recurring jobs, ratings, non-EVM cards/evaluation | No successful placeholder or invented service. Remain outside this checkpoint. | + +`job.cancel` revokes only the permission recorded for that marketplace job. It does not withdraw wallet deposits. Provider/evaluator terminal actions do not acquire owner cleanup authority. Plain jobs have no marketplace permission to infer. Nonzero live completion/payout uses fresh controlled evaluators on plain jobs; the marketplace's configured evaluator is unchanged. Native single/atomic broadcast failures retain their hashes, and an atomic broadcast can never trigger sequential fallback. + +## Destination rollout mismatch + +**BSC Testnet has passing live open/cancel coverage.** Preview fails closed with CEA_MISMATCH for the other three configured destinations: + +| Chain | SDK factory | Marketplace factory | +| --- | --- | --- | +| Sepolia | `0x5E191fbBe22F8866C5e4250557664fCE760e8870` | `0x8ED594A83301FEc545fC6c19fc12cF7111777029` | +| Base Sepolia | `0x7e8CeeDA043ED1460540616103dD57581a66C856` | `0x0A75ca7736b488Eb41675ADc3b3156BACF659F55` | +| Arbitrum Sepolia | `0x65572FFa81c230360a8a53C1682C7f0Ee321E5E7` | `0x88DC189275078Cf509E4Cc773F089c8ad07b7EA2` | +| BSC Testnet | `0x3f1B16e0B072d472951C4563d29d3da6a3EE3Ce8` | same | + +Both old/new factories in the first three chains answer and name the same gateway, but derive different accounts. The queried lower-case gateway ceaFactory getter reverted, so this review does not infer which deployment the live routing stack should use. [Read-only evidence](research/sdk-implementation-2026-10-20/cea-routing.json). Align the canonical route/marketplace configuration with Zaryab; do not change global SDK factories solely to make this guard pass. + +## Acceptance + +- **2,246 unit tests pass**, 12 existing skips; 18 cases added after the prior checkpoint. +- **11 real-stack fork E2Es pass**, adding valid/malformed ERC-1271, 7702 and same-block opening/history recovery. Fixtures compile from repo-owned source without another contract checkout. The fork's UEA submitting transport is native because Anvil has no Cosmos transport. +- **6 live cases pass across two serial runs**: three basic cases cover native/external open/cancel, receipt recovery, prepared paid reads and no-new-payment preview recovery; three funding cases cover actual deposits, native/AGW atomic escrow and manual-evaluator payouts, and BSC-origin principal bridging. Cards 4/5 are inactive; jobs 4/7/8/9 are Rejected with grants revoked and plain jobs 5/6 are Completed. Deposited/reserve/payout tokens are returned. Earlier read-only evidence remains separate. +- Build, library/spec/local types, compiled imports/declarations/package checks and source/built API comparison pass; changed production lint passes. The consumer guide's eight TS blocks typecheck. CI reporting now derives final success from completion counts while preserving the original Jest flag. + +[Current validation and limits](research/sdk-independent-2026-10-20/README.md), [prior checkpoint](research/sdk-completion-2026-10-20/README.md), [first checkpoint](research/sdk-implementation-2026-10-20/README.md). All marketplace groups, including `marketplace-funding`, remain opt-in; default all selection is unchanged. Future checkpoints should append to the [running changelog](../SDK-CHANGELOG.md). diff --git a/plan/marketplace/notion/2-universal-marketplace.md b/plan/marketplace/notion/2-universal-marketplace.md new file mode 100644 index 00000000..cd42f682 --- /dev/null +++ b/plan/marketplace/notion/2-universal-marketplace.md @@ -0,0 +1,195 @@ +# 2. Universal Marketplace + + + +# 0. Before anything else: the marketplace breaks when the AGW redeploys + +**What happens.** The AGW is moving to multi-asset rules (`assets: AssetCap[]`, `maxGasPerCall`; [1. AGW Contract Changes (nomenclature standard + change set)](1%20AGW%20Contract%20Changes%20(nomenclature%20standard%20+%20ch%203e9188aea7f4813aa31fc95ceb4e684d.md) section 4c). The marketplace still carries the old single-asset shape in two places: the card's rule terms (`RulesCardTerms { asset, maxPCPerCall, ... }`) and a hand-copied mirror of the AGW's `UniversalTerms` in `interfaces/external/IAGW.sol`. Its rules check compares the signed session field by field against that shape. + +**What breaks.** The day the new AGW is on Donut, every `openJob` fails at `grantRulesWithSig`: the session the marketplace accepted is not one the wallet will store. + +**Fix.** Item 1 in section 4 and the diff in 4b, shipped in the same window as the AGW. The rules helper is not upgradeable, so this is a redeploy of the helper plus a marketplace upgrade pointing at it. Same rule as page 1 section 0: import the AGW's types from its package instead of copying them, so the next struct change fails the build and not `openJob`. + +# 1. What the marketplace is, in one paragraph + +An agent lists what it will do, under which rules, judged how (an agent card: listing, rules, job spec template). A user picks a card, sees it in words, signs once; `openJob` deploys the user's agentic wallet if needed, grants it exactly the card's rules bound to this job, and creates the 8183 job with the wallet as client and the criteria built from the card's template. The marketplace moves no funds and holds none: the user deposits into the wallet from any chain, the provider prices with `setBudget`, the wallet funds with `fund`, the agent acts within the rules, the evaluator rules ([3. 8183 (job kernel and hook)](3%208183%20(job%20kernel%20and%20hook)%203e9188aea7f48188a838c3a740d8c858.md), [4. Universal Evaluation](4%20Universal%20Evaluation%203e9188aea7f4817bb03ef4c78c883f8b.md)). Phase 2 (users post, agents bid) is a separate proposal: [Proposal: Open Jobs and Budget Proposals for ERC-8183](https://app.notion.com/p/Proposal-Open-Jobs-and-Budget-Proposals-for-ERC-8183-3f4188aea7f481cdad84fdd7a446ab7b?pvs=21). + +# 2. Decisions + +| # | Decision | Outcome | +| --- | --- | --- | +| M1 | Scope of the one call | **Deploy or reuse the wallet, grant the rules, create the job. Nothing else.** No funds move, no approvals run, no escrow is touched. Funding is a plain transfer to the wallet from any chain, later. The job is Open with budget 0 when the call returns. (2026-10-01, matches the build.) | +| M2 | One signature | **The AGW's `OwnerIntent`**, signed once under the factory's EIP-712 domain with the signer's home chain id, presentable only by the marketplace (`intent.executor`). The factory and the wallet verify the owner; the marketplace mirrors the checks for early named errors. Works for a Push EOA owner too. Replaces the three WithSig variants once planned on page 1. | +| M3 | Criteria | **Built on-chain from the card's stored template** (`JobSpecBuilder`), so a relayer or SDK cannot swap in easier criteria, and the result sits inside the `createJob` calldata the owner signs. `reads` (what to look at), `checks` (how to compare), `logic` (how checks combine; was `nodes`). The template is stored as given and not judged; the verified tag is the review; the SDK renders every check in words before the signature. | +| M4 | Criteria mutability | **`AllowedMutability allowedMutability` on `JobSpec` and on the template** (NONE, CLIENT, PROVIDER, BOTH; named `Mutability mutability` until 2026-10-12). `PROVIDER` means a whole replacement spec may be proposed at `setBudget`; the evaluator refuses changes to `origin` and to `allowedMutability` itself; the client accepts by funding. Shared wire format with the evaluator; lands in both repos together. (2026-10-06, 2026-10-07) | +| M5 | Rules on the card | **Multi-asset.** `AgentCardRules { assets[], principalAsset, maxGasPerCall, allowedCalls, approvals }`. The rules check binds the principal asset's total to the job's principal and compares every other cap byte for byte. Follows the AGW decision of 2026-10-05. | +| M6 | Payment token | **`Card.paymentToken`, inherited by the job.** Requires the kernel to take the token at `createJob` (K-12 on [3. 8183 (job kernel and hook)](3%208183%20(job%20kernel%20and%20hook)%203e9188aea7f48188a838c3a740d8c858.md)); until then cards are priced in the kernel's one token. (2026-10-09) | +| M7 | Approvals | **The owner's, never the agent's.** The card lists the ERC-20 allowances the job needs on the execution chain; the helper rejects `approve` and `increaseAllowance` in any agent allow-list (the universal rulebook pins only the receiving address, not the spender). The owner makes them through the wallet's owner door, a cross-chain call that must land before the agent's first call; the SDK bundles them into the deposit. Nothing on-chain verifies they ran. v1. | +| M8 | Destination account check | **Keep, as `computeCEA`.** The signed rule names the account on the destination chain that must receive what the agent deposits and that the criteria read. The marketplace derives that address itself (fixed formula over the wallet address plus the chain's CEA factory and proxy implementation, registered by the admin) and refuses a rule naming anyone else's. Later this check may move into URP at grant time, covering every grant; URP is over the size limit now. The rule field stays `expectedCEA`. | +| M9 | Session fields the marketplace does not compare | **No marketplace code.** Validator, policy address, action target and selector, and the extra policy lists are pinned by the AGW at `grantRules`, which runs before any marketplace state write. One line in the repo doc closes the team's open question. | +| M10 | Per-chain pause | **Removed.** It only gated `openJob` for one destination during a CEA rotation, which already fails closed (`ExpectedCEAMismatch`). The marketplace owns no per-chain switch; `pause()` and `unpause()` are its only pause. `setCEADeployment(chainHash, 0, 0)` may clear a chain to `ChainNotSupported`. | +| M11 | Hook and evaluator | **Separate contracts.** The rules hook maps job to wallet rules and exists only on Push; the evaluator is directly callable so a developer with their own hook or no AGW can use it. (2026-10-06) | +| M12 | Provider identity and rating | **Open registration, no stake, `getAgentRating(agent)` placeholder** returning the admin's dummy value until `VerifiedRatings.sol` is wired. No registration fee exists in the code; the kernel's `platformFee` at `complete` is the only fee. | +| M13 | The noun | **`AgentCard`, full word everywhere in code.** The stack already says "agent card"; A2A's Agent Card is the same family of object (ours carries rules and criteria and is on-chain), one doc line states the difference. `Listing` rejected. `cardId` stays as the short id. | + +# 3. Rename map (current to proposed) + +| Area | Today | Proposed | +| --- | --- | --- | +| Inherited names (SmartSession, AGW) | `Session`, `session`, `SessionContext`, `OwnerIntent`, `IntentSessionMismatch`, `UniversalTerms` | unchanged: the AGW's own ABI says `grantRules(Session session)`, so the marketplace says `session` too | +| Entry point | `startJob`, `StartJobParams`, `JobStarted` | `openJob`, `OpenJobParams`, `JobOpened` (the job is Open, not started; start is `fund`) | +| Helper contract | `UniversalMarketplaceTerms`, `TERMS()`, `InitParams.terms` | `UniversalMarketplaceRules`, `RULES()`, `InitParams.rules` | +| Card rules | `RulesCardTerms`, `rulesTerms`, `_rulesTerms`, `validateRulesTerms`, `verifySession` | `AgentCardRules`, `rules`, `_agentCardRules`, `validateAgentCardRules`, `checkRulesMatchCard` | +| Criteria | `evaluation`, `_evaluations`, `evaluationHash`, `EvaluationTemplate` | `jobSpecTemplate`, `_jobSpecTemplates`, `jobSpecHash`, `JobSpecTemplate` (prose: "criteria"; one noun with the evaluator's `JobSpec`, decided 2026-10-12) | +| Card functions | `registerCard`, `modifyAgentCard`, `setCardActive`, `adminDisableCard`, `verifyAgentCard`, `revokeAgentCardVerification`, `getCard` | `registerAgentCard`, `updateAgentCard`, `setAgentCardActive`, `disableAgentCard`, `verifyAgentCard`, `revokeAgentCardVerification`, `getAgentCard` | +| Card views and types | `isCardVerified`, `isCardAdminDisabled`, `cardVersion`, `cardCount`, `CardView` | `isAgentCardVerified`, `isAgentCardDisabled`, `agentCardVersion`, `agentCardCount`, `AgentCardView` | +| Card events | `CardRegistered`, `CardModified`, `CardStatusChanged`, `CardDisabledByAdmin`, `CardVerified`, `CardVerificationRevoked` | `AgentCardRegistered`, `AgentCardUpdated`, `AgentCardStatusChanged`, `AgentCardDisabled`, `AgentCardVerified`, `AgentCardVerificationRevoked` | +| Card errors | `CardInactive`, `CardAdminDisabled`, `CardVersionMismatch`, `InvalidCard(reason)`, `CardIdentityImmutable` | `AgentCardInactive`, `AgentCardDisabled`, `AgentCardVersionMismatch`, `InvalidAgentCard(reason)`, `AgentCardIdentityImmutable` | +| Fee | `fee` | `providerFee` (the kernel's `platformFee` is the other fee) | +| Live job | `isAGWFree(agw) returns (bool)`, `lastJobOf(agw)`, `AGWBusy(agw, jobId)` | `activeJobOf(agw) returns (uint256 jobId)`, `WalletHasActiveJob(agw, jobId)` | +| Destination account | `expectedCEAOf(agw, chainHash)` | `computeCEA(agw, chainHash)` (mirrors core's `computeUEA`; the rule field stays `expectedCEA`) | +| Per-chain pause | `setUniversalPaused`, `isUniversalPaused`, `UniversalChainPaused`, `ChainPaused` error | removed (M10) | +| Rules check errors | `PCCapMismatch`, `CapMismatch` | `GasCapMismatch`, `PrincipalCapMismatch` | +| Set-once wiring | `pushChainHash()` | `PUSH_CHAIN_HASH()` (URP has the same lowercase name; align on its next redeploy) | +| Hook views | `rulesOf(jobId)` returning `{agw, rulesId}`, `isAGWBusy`, `liveJobOf` | `rulesOfJob(jobId)`, `agwOfJob(jobId)`, `activeJobOf(agw)`: one spelling with the marketplace | +| Criteria tree | `Node`, `NodeKind`, `nodes`, `MAX_NODES` | `Logic`, `LogicKind`, `logic`, `MAX_LOGIC` | +| Chain field | `AgentCard.chainNamespace` full CAIP-2; `Read.chainNamespace` namespace only with `chainId` beside it | unchanged; rule written once: a single field naming a chain is the full CAIP-2 string, the split form appears only where `chainId` sits beside it | +| Layout | `docs/universalmarketplace/README.md`, unnumbered tests, hand-copied AGW mirrors in `interfaces/external/` | deferred; AGW types imported, not copied (section 0) | + +# 4. Structural changes that ride along with the rename + +1. **Multi-asset card rules** (M5). `AgentCardRules { AssetCap[] assets; uint8 principalAsset; uint256 maxGasPerCall; AllowedCall[] allowedCalls; Approval[] approvals; }`. `checkRulesMatchCard` applies total equals principal to `assets[principalAsset]` and byte-equal caps to the rest. Replace the `UniversalTerms` mirror with the AGW's new struct in the same change. Blocks the AGW redeploy (section 0). +2. **Mutability on the criteria** (M4). `AllowedMutability allowedMutability` on `JobSpec` and `JobSpecTemplate`, copied by the builder. Field order decided 2026-10-12: `reads, checks, logic, allowedMutability, origin, executeBy, failFinalAt`; the template is the first four fields plus `params`, so `JobSpecBuilder` copies four and appends `origin` and timing. Supersedes both this repo's order and the Trust Layer page's. Implementation lands in `JobSpecTypes.sol` with the evaluator team. +3. **`Card.paymentToken`** (M6), after K-12 lands on the kernel. `providerFee` is read in it. +4. **`activeJobOf`** replaces `isAGWFree` and `lastJobOf`; the hook adopts the same view and the marketplace's two job views. +5. **Per-chain pause removed** (M10). Storage slot 14 becomes a reserved gap entry. +6. **`getAgentRating(agent)`** placeholder (M12). **`version()`** added. **`PUSH_CHAIN_HASH()`** uppercase. +7. **Admin surface stays out of the SDK**: `verifyAgentCard`, `disableAgentCard`, `setCEADeployment`, `setHook`, `setEvaluator`, `pause`, `unpause`. + +# 4b. Contract surface, as a diff + +Read `+` as added, `-` as removed, `~` as changed in place, `=` as unchanged. Names are the post-rename names. Storage is append-only; renames are labels only. + +**UniversalMarketplace** + +```diff +// cards +~ registerAgentCard(AgentCard c, bytes rules, bytes jobSpecTemplate) returns (uint256 cardId) // was registerCard(c, rulesTerms, evaluation); reverts AgentCardAlreadyRegistered(provider) on a second card (decided 2026-10-12) +~ updateAgentCard(uint256 cardId, AgentCard c, bytes rules, bytes jobSpecTemplate) // was modifyAgentCard +~ setAgentCardActive(uint256 cardId, bool active) // was setCardActive +~ disableAgentCard(uint256 cardId) // was adminDisableCard; admin += verifyAgentCard(uint256 cardId, uint256 version), revokeAgentCardVerification(uint256 cardId) // admin +~ getAgentCard(uint256 cardId) view returns (AgentCardView) // was getCard +~ isAgentCardVerified, isAgentCardDisabled, agentCardVersion, agentCardCount // was isCardVerified, isCardAdminDisabled, cardVersion, cardCount ++ getAgentRating(address agent) view returns (uint256) // placeholder; TAP or VerifiedRatings later + +// jobs +~ openJob(OpenJobParams p) returns (uint256 jobId, address agw, bytes32 rulesId) // was startJob(StartJobParams) +~ activeJobOf(address agw) view returns (uint256 jobId) // replaces isAGWFree and lastJobOf; 0 = free += cardOfJob, agwOfJob, rulesOfJob +~ computeCEA(address agw, bytes32 chainHash) view returns (address) // was expectedCEAOf += buildCreateJobCalldata(uint256 cardId, address owner, uint96 index, JobInputs job) view returns (bytes32 mode, bytes executionCalldata) += previewIntent(IntentRequest r, Session s) view returns (OwnerIntent) + +// admin += setHook, setEvaluator, setCEADeployment, pause, unpause +~ setCEADeployment(chainHash, 0, 0) allowed: clears the chain to ChainNotSupported +- setUniversalPaused(bytes32 chainHash, bool paused), isUniversalPaused(bytes32) + +// views (wiring) += AGW_FACTORY(), KERNEL(), hook(), evaluator() +~ RULES() returns (IUniversalMarketplaceRules) // was TERMS() +~ PUSH_CHAIN_HASH() returns (bytes32) // was pushChainHash() ++ version() returns (string) + +// events +~ AgentCardRegistered(cardId, provider, jobType, chainNamespace, rulesHash, jobSpecHash, metadataHash, providerFee) +~ AgentCardUpdated(cardId, version, rulesHash, jobSpecHash, metadataHash, providerFee) +~ AgentCardStatusChanged, AgentCardDisabled, AgentCardVerified, AgentCardVerificationRevoked +~ JobOpened(cardId, owner, agw, jobId, rulesId, principal, cardVersion) // was JobStarted += HookUpdated, EvaluatorUpdated, CEADeploymentSet +- UniversalChainPaused + +// storage (slots never move) += 0 AGW_FACTORY, 1 KERNEL, 2 hook, 3 evaluator, 4 PUSH_CHAIN_HASH, 5 RULES, 6 agentCardCount, 7 _cards, 8 _agentCardRules, 9 _jobSpecTemplates, += 10 agentCardVersion, 11 isAgentCardVerified, 12 isAgentCardDisabled, 13 ceaDeployment, 15 activeJobOf (was lastJobOf), 16 cardOfJob, 17 agwOfJob, 18 rulesOfJob +~ 14 reserved (was isUniversalPaused) ++ _agentRating appended after the gap start; __gap shrinks by one +``` + +**Types** (`libraries/Types.sol`) + +```diff +~ struct AgentCard { address provider; bytes32 jobType; string metadataURI; bytes32 metadataHash; string chainNamespace; +~ uint256 providerFee; address paymentToken; // was fee; paymentToken NEW with K-12 +~ uint256 principalMin; uint256 principalMax; uint32 minDuration; uint32 maxDuration; uint32 minExecuteWindow; uint32 settleWindow; bool active; } +- struct RulesCardTerms { address asset; uint256 maxPCPerCall; AllowedCall[] allowedCalls; Approval[] approvals; } ++ struct AgentCardRules { AssetCap[] assets; uint8 principalAsset; uint256 maxGasPerCall; AllowedCall[] allowedCalls; Approval[] approvals; } ++ struct AssetCap { address token; uint256 maxPerCall; uint256 maxTotal; } // imported from the AGW package, not copied += struct Approval { address token; address spender; bool capIsPrincipal; uint256 cap; } +~ struct OpenJobParams { uint256 cardId; uint256 cardVersion; JobInputs job; Session session; OwnerIntent intent; bytes sig; string label; } // was StartJobParams +~ struct AgentCardView { AgentCard card; bytes rules; bytes jobSpecTemplate; uint256 version; bool verified; bool disabled; } // was CardView +~ struct JobSpecTemplate { ReadTemplate[] reads; CheckTemplate[] checks; Logic[] logic; AllowedMutability allowedMutability; ParamBounds[] params; } // was EvaluationTemplate with nodes; CriteriaTemplate in the morning draft; first four fields match JobSpec += JobInputs, IntentRequest, InitParams (field terms -> rules), SessionContext, Fill, ReadTemplate, CheckTemplate, ParamBounds +``` + +**JobSpecTypes** (shared wire format with the hook and the evaluator) + +```diff +~ enum Evaluation { BOOLEAN, COMPARE, NUMBER, PERCENTAGE } // was EvalType { BOOL, CMP, NUM, PCT }; SDK constant names (2026-10-12) +~ enum Operation { EQUAL, NOT_EQUAL, GREATER_THAN, GREATER_OR_EQUAL, LESS_THAN, LESS_OR_EQUAL } // was Op +~ enum LogicKind { ALL, ANY, AT_LEAST } // was NodeKind; CHECK leaf dropped (PROPOSED) ++ enum AllowedMutability { NONE, CLIENT, PROVIDER, BOTH } +~ struct Check { uint8 read; Evaluation evaluation; Operation operation; int256 target; } +~ struct Logic { LogicKind kind; uint8[] checks; uint8[] children; uint8 k; } // was Node; no leaf nodes +~ struct JobSpec { Read[] reads; Check[] checks; Logic[] logic; AllowedMutability allowedMutability; bytes32 origin; uint64 executeBy; uint64 failFinalAt; } +~ // order decided 2026-10-12: content, then allowedMutability and origin, then timing (section 4, item 2) +~ MAX_LOGIC = 32 // was MAX_NODES += Read, T_* codes, MAX_READS, MAX_CHECKS +``` + +**UniversalMarketplaceRules** (was UniversalMarketplaceTerms) + +```diff +~ validateAgentCardRules(bytes rules) pure returns (address[] tokens) // was validateRulesTerms returning one asset +~ checks: 1..MAX_ASSETS assets, principalAsset in range, no duplicate token, 1..32 allowed calls, no duplicate (target, selector), +~ no approve or increaseAllowance, transfer and transferFrom pin their recipient, at most 8 approvals, approval shape, no duplicate (token, spender) +~ checkRulesMatchCard(bytes cardRules, Session session, SessionContext ctx) pure // was verifySession +~ checks, in order: agent == provider; one action; one policy; envelope chain == card chain; +~ assets[] equal to the card's with assets[principalAsset].maxTotal == principal and maxPerCall <= principal; +~ maxGasPerCall equal; allowedCalls byte-equal; validUntil == expiredAt; expectedCEA == computeCEA(agw, chainHash) +~ errors: AssetMismatch, GasCapMismatch (was PCCapMismatch), ActionsMismatch, PrincipalCapMismatch (was CapMismatch), ExpiryMismatch, ExpectedCEAMismatch += MAX_ALLOWED_CALLS = 32, MAX_APPROVALS = 8; + MAX_ASSETS = 8 (imported from the AGW) +``` + +**RulesBindingHook** (interim; extended by the evaluator track) + +```diff += beforeAction(fund): optParams == abi.encode(rulesId); client is a factory AGW; rules live on the engine; no live job; records the binding; emits RulesBound ++ afterAction(setBudget): decode the optional JobSpec proposal; check allowedMutability against the caller; hand to the evaluator or revert ++ afterAction(fund): freeze the standing JobSpec; trigger the baseline (prefunded by the client) ++ afterAction(submit): evaluator.verify(jobId) +~ rulesOfJob(jobId) view returns (bytes32), agwOfJob(jobId) view returns (address) // was rulesOf(jobId) returning a struct +~ activeJobOf(agw) view returns (uint256) // was isAGWBusy and liveJobOf +- the binder role (rules expire by validUntil); recomputing a criteria hash (criteria are built on-chain); refusing submit before the baseline (the evaluator returns inconclusive) +``` + +**Not in this change set** (belongs elsewhere, listed so nobody looks for it here): the kernel's per-job payment token (K-12, [3. 8183 (job kernel and hook)](3%208183%20(job%20kernel%20and%20hook)%203e9188aea7f48188a838c3a740d8c858.md)), the evaluator, Solana and native (Push-side) cards, the `EvaluatorGateway` for jobs on other chains. + +# 5. Open for review on this page + +1. Client-side cancellation of an Open unfunded job. Decided 2026-10-12: enforced at the contract level, the client can cancel on the kernel. What is still open is the AGW side: on cancel the hook must release the wallet's rules so the wallet is not blocked until `expiredAt`. Research tagged on [3. 8183 (job kernel and hook)](3%208183%20(job%20kernel%20and%20hook)%203e9188aea7f48188a838c3a740d8c858.md) (open item 2). +2. One card per provider. Decided 2026-10-12: enforced on-chain, `registerAgentCard` reverts `AgentCardAlreadyRegistered(provider)`; a provider changes its offer through `updateAgentCard`. `agent.card()` on page 6 reads the one card. +3. `JobSpec` field order and `origin`: decided 2026-10-12 (section 4, item 2); pending implementation in `JobSpecTypes.sol`. +4. Recurring jobs (a 7 or 15 day job renewing until cancelled) against the one-live-job rule: a renewal is a new job that must start the moment the old one completes, or the rule needs a successor slot. Research, with the fee design (tagged 2026-10-12). +5. Size: 21.3 KB today with 3.3 KB to the EIP-170 limit; multi-asset rules add code, another split may be needed. +6. Anything in the rename map or the diff that should stay as is. \ No newline at end of file diff --git a/plan/marketplace/notion/3-8183-job-kernel-and-hook.md b/plan/marketplace/notion/3-8183-job-kernel-and-hook.md new file mode 100644 index 00000000..3395c9e1 --- /dev/null +++ b/plan/marketplace/notion/3-8183-job-kernel-and-hook.md @@ -0,0 +1,87 @@ +# 3. 8183 (job kernel and hook) + + + +# 1. What exists (verified in source, 2026-10-07) + +**Kernel `AgenticCommerce.sol`.** Base V3 shape with the K-01 to K-11 changes. + +- Transparent proxy. One `paymentToken` set at `initialize` (changes with K-12, section 4). `platformFee` and `evaluatorFee` in bps, start at 0; `platformFee` goes to the treasury at `complete`, the evaluator fee to whoever calls `complete`. +- Hookable: `setProvider`, `setBudget`, `fund`, `submit`, `complete`, `reject`, each with `beforeAction` and `afterAction` and an `optParams` payload. `createJob` is hookable on the Push kernel (decided 2026-10-12, reverses K-10 for this kernel only; kernels on other chains are not expected to hook it, so the design must not depend on it). Not hookable: `claimRefund`. +- `createJob(provider, evaluator, expiredAt, description, hook)`: evaluator non-zero, hook whitelisted and ERC-165 checked, provider may be zero (bid mode) or set. The job is Open with budget 0. +- `setBudget(jobId, amount, optParams)`: provider only, re-callable while Open. `fund(jobId, expectedBudget, optParams)`: client only, provider must be set, `expectedBudget` must equal the stored budget, pulls `paymentToken`, status Funded. `submit(jobId, deliverable, optParams)`: provider, Funded only, `deliverable` is `bytes32`. `complete` and `reject`: evaluator only. `claimRefund`: client, after expiry plus a 1-hour grace for Submitted jobs, never pausable. + +**Hook `RulesBindingHook.sol`** (was `MandateBindingHook`). Acts only in `beforeAction(fund)`: `optParams` must be exactly `abi.encode(rulesId)`; the client must be a factory AGW; the rules must be live on the session engine; the AGW must have no Funded or Submitted job under this hook. Then records the binding and emits `RulesBound(jobId, agw, rulesId)`. Every other action passes through. Views `rulesOf(jobId)` and `liveJobOf(agw)` (renamed below). + +# 2. The lifecycle, as decided + +| Kernel call | Who | What Push does there | Status | +| --- | --- | --- | --- | +| `createJob` | client (the AGW through `openJob`, or any address directly) | `evaluator` = `UniversalEvaluator` on Push (or the `EvaluatorGateway` on another chain, phase 2); `description` = `abi.encode(JobSpec)`; `hook` = the rules hook. Hookable on the Push kernel (2026-10-12): the hook may learn the job at creation; on other chains it is not, so the evaluator still only depends on `setBudget` and `fund`. K-12 adds `paymentToken` here. | DECIDED | +| `setBudget` | provider | Prices the job in the job's token. `optParams` may carry a replacement `JobSpec`; the hook's `afterAction(setBudget)` checks `allowedMutability` against the caller and the evaluator stores the proposal, or the call reverts. A proposal is not an agreement. | DECIDED (2026-10-06); hook and evaluator code pending | +| `fund` | client | The client's acceptance. `beforeAction(fund)`: bind job to rules (section 1). `afterAction(fund)`: freeze the standing `JobSpec`, take the baseline (one before read per NUM or PCT check, pinned to the height at `fund`), paid from the client's prefund (`quoteSnapshot(description)` returns the amount). No further `setBudget` once Funded. | DECIDED (2026-10-06); snapshot owned by hook plus evaluator | +| `submit` | provider | `afterAction(submit)` calls `verify(jobId)` on the evaluator: checkpoint first (any owner-side change after the baseline completes in the agent's favour), after reads by validator quorum, logic tree, settle. A separate provider-callable retry exists for partial read failures. | DECIDED (2026-10-06) | +| `complete` / `reject` | evaluator | PASS calls `complete`; FAIL after `failFinalAt` calls `reject`; an early FAIL or an inconclusive round sends nothing and `verify` can run again. `reason` is a hash of the job and the round. Verified rating written in the same transaction (draft). | DECIDED | +| `claimRefund` | client | Untouched. The evaluator never holds funds and never blocks the kernel; `failFinalAt` sits well before `expiredAt`. | unchanged | + +Started is an evaluator fact, not a kernel state: the job has started when the baseline is recorded. The hook and the evaluator are separate contracts (DECIDED 2026-10-06, option A): the hook maps job to wallet rules and exists only on Push; the evaluator is directly callable so a developer with their own hook, or no AGW at all, can use it, and other chains' kernels whitelist their own hooks. + +# 3. Criteria: the shared wire format + +`JobSpec` is defined once (`JobSpecTypes.sol` in the marketplace repo) and read by the marketplace (writes it), the hook (freezes it) and the evaluator (judges it). Field order is ABI; a change here changes every description. + +```solidity +enum Evaluation { BOOLEAN, COMPARE, NUMBER, PERCENTAGE } // was EvalType { BOOL, CMP, NUM, PCT } (renamed 2026-10-12) +enum Operation { EQUAL, NOT_EQUAL, GREATER_THAN, GREATER_OR_EQUAL, LESS_THAN, LESS_OR_EQUAL } // was Op +enum LogicKind { ALL, ANY, AT_LEAST } // was NodeKind; CHECK leaf dropped (PROPOSED 2026-10-12) +enum AllowedMutability { NONE, CLIENT, PROVIDER, BOTH } // was Mutability; who may propose a replacement spec at setBudget + +struct Read { string chainNamespace; string chainId; uint16 minConfirmations; address target; bytes4 selector; bytes args; bytes outputs; uint8[] field; } +struct Check { uint8 read; Evaluation evaluation; Operation operation; int256 target; } +struct Logic { LogicKind kind; uint8[] checks; uint8[] children; uint8 k; } // was Node; operators list checks and child operators directly; logic[0] is the root + +struct JobSpec { + Read[] reads; // what to look at + Check[] checks; // how to compare each value; NUM and PCT need the baseline + Logic[] logic; // how the checks combine; was nodes + AllowedMutability allowedMutability; // who may propose a replacement spec at setBudget + bytes32 origin; // marketplace jobs: keccak256(marketplace, cardId, cardVersion, principal); zero otherwise + uint64 executeBy; + uint64 failFinalAt; +} +``` + +`PROVIDER` means the provider may propose a whole replacement spec; the evaluator refuses a proposal that changes `origin` or `allowedMutability` itself; timing stays inside the job's `expiredAt`; the client accepts by funding. Field order decided 2026-10-12: content first, then `allowedMutability` and `origin`, then timing ([4. Universal Evaluation](4%20Universal%20Evaluation%203e9188aea7f4817bb03ef4c78c883f8b.md), section 0); the evaluator team implements it in `JobSpecTypes.sol`. + +# 4. Kernel change the stack needs: K-12, payment token per job + +ERC-8183 carries no token on any call: `createJob`, `setBudget` and `fund` are token-less, and the token is an implementation constant of this kernel. The card wants to name its payment token and the job to inherit it. DECIDED (2026-10-09): `createJob` takes `paymentToken`; escrow is tracked per token; `fund` pulls and `complete` pays the job's token; `setBudget` keeps its one role, the price in that token. The token sits inside the `createJob` calldata the owner signs at `openJob`, so nobody can swap it afterwards. Two consequences to record in the interface: `createJob` is not hooked on other chains' kernels, so a hook reads the token from the job struct at `setBudget` or `fund`; and the argument is a Push extension, marked as such so a Base or BNB integration does not expect it. Until it lands, cards are priced in the kernel's one token. + +# 5. Hook changes + +- Renames: `rulesOf(jobId)` becomes `rulesOfJob(jobId)` and `agwOfJob(jobId)`; `isAGWBusy` and `liveJobOf` become `activeJobOf(agw) returns (uint256)`; one spelling with the marketplace. +- New: `afterAction(setBudget)` mutability check and proposal hand-off; `afterAction(fund)` freeze and baseline; `afterAction(submit)` verify. The interim hook is being extended into this (owner: the evaluator track, building on the existing hook). +- Dropped from the earlier plan: the binder role (rules expire by `validUntil`, caps bound the gap); the hook recomputing a criteria hash (the marketplace builds criteria on-chain, so there is nothing to recompute); the hook refusing `submit` before the baseline (the evaluator returns inconclusive instead and `verify` runs again). +- Still to check in the hook for non-marketplace jobs: the rules' `validUntil` is at or after the job's `expiredAt`, and the rules' agent equals the job's provider. The marketplace already enforces both at `openJob`; a plain job that names the hook gets them here or not at all. + +# 6. Fits the standard + +Push implements the Evaluator role in ERC-8183. The kernel ABI is Base V3's with the K changes; K-12 is the first change to a standard function's signature and is marked as a Push extension. Everything the hook and evaluator do runs through the standard's own hook points and evaluator role. The open-jobs and budget-proposals extension is a separate proposal: [Proposal: Open Jobs and Budget Proposals for ERC-8183](https://app.notion.com/p/Proposal-Open-Jobs-and-Budget-Proposals-for-ERC-8183-3f4188aea7f481cdad84fdd7a446ab7b?pvs=21). + +# 7. Open + +1. `createJob` hookability. Decided 2026-10-12: hookable on the Push kernel (reverses K-10 here), not assumed for kernels on other chains. The evaluator therefore still learns a job at `setBudget` or `fund`, and the Push hook may use the `createJob` hook for bookkeeping only. +2. Client cancel of an Open unfunded job. Decided 2026-10-12: yes, at the kernel. Open: the hook (or a narrow stop role) must release the AGW's rules on cancel so the wallet is not blocked until `expiredAt`. Research tagged. +3. `JobSpec` field order and `origin`: decided 2026-10-12 (section 3); pending implementation in `JobSpecTypes.sol`. +4. Fee design: the kernel's `platformFee` exists; who pays reads (client prefund at `fund` for the baseline, the submitter for after reads, as drafted) and whether external-chain evaluators are charged differently. Research, after AGW (tagged 2026-10-12). +5. Recurring jobs: a 7 or 15 day job that renews until cancelled, because a year of fees cannot be escrowed for "4% as long as the principal stays". Research; interacts with the one-live-job rule (tagged 2026-10-12). +6. Phase 2: jobs on other chains name an `EvaluatorGateway` on their chain; snapshot and verify travel to Push through the universal gateway, the verdict comes back TSS-signed. Planning doc pending; must not block the V2 evaluator build (tagged 2026-10-12). \ No newline at end of file diff --git a/plan/marketplace/notion/4-universal-evaluation.md b/plan/marketplace/notion/4-universal-evaluation.md new file mode 100644 index 00000000..c2ad7def --- /dev/null +++ b/plan/marketplace/notion/4-universal-evaluation.md @@ -0,0 +1,145 @@ +# 4. Universal Evaluation + + + +# 0. Settle first: one `JobSpec`, three repos + +`JobSpec` is written by the marketplace, frozen by the hook and judged by the evaluator, and it is the 8183 job's `description` byte for byte. Three places define it today and they do not agree: the marketplace repo (`JobSpecTypes.sol`: `executeBy, failFinalAt, reads, checks, nodes, origin`, no mutability), the Trust Layer page (`executeBy, failFinalAt, mutability, reads, checks, logic`, no `origin`), and the evaluator build in progress. Field order is ABI; two orders means two incompatible descriptions on day one. Decided 2026-10-12, the one order both repos implement: + +```solidity +enum Evaluation { BOOLEAN, COMPARE, NUMBER, PERCENTAGE } // was EvalType { BOOL, CMP, NUM, PCT }; renamed 2026-10-12 to match the SDK constants +enum Operation { EQUAL, NOT_EQUAL, GREATER_THAN, GREATER_OR_EQUAL, LESS_THAN, LESS_OR_EQUAL } // was Op +enum LogicKind { ALL, ANY, AT_LEAST } // CHECK leaf dropped (PROPOSED 2026-10-12): operators reference checks directly +enum AllowedMutability { NONE, CLIENT, PROVIDER, BOTH } // was Mutability + +struct Read { string chainNamespace; string chainId; uint16 minConfirmations; address target; bytes4 selector; bytes args; bytes outputs; uint8[] field; } +struct Check { uint8 read; Evaluation evaluation; Operation operation; int256 target; } +struct Logic { LogicKind kind; uint8[] checks; uint8[] children; uint8 k; } // checks: indices into checks[]; children: indices into logic[]; logic[0] is the root; no leaf nodes + +struct JobSpec { + Read[] reads; // what to look at + Check[] checks; // how to compare each value + Logic[] logic; // how the checks combine; logic[0] is the root + AllowedMutability allowedMutability; // who may propose a replacement spec at setBudget + bytes32 origin; // marketplace jobs: keccak256(marketplace, cardId, cardVersion, principal); zero for plain jobs + uint64 executeBy; // the provider should have acted by this time + uint64 failFinalAt; // after this a FAIL is final; must sit well before the kernel's expiredAt +} + +struct JobSpecTemplate { // the marketplace's stored form: the first four fields of JobSpec, plus param bounds + ReadTemplate[] reads; + CheckTemplate[] checks; + Logic[] logic; + AllowedMutability allowedMutability; + ParamBounds[] params; +} +``` + +Order decided 2026-10-12 (Harsh): content first (`reads`, `checks`, `logic`), then who may change it and where it came from (`allowedMutability`, `origin`), then timing (`executeBy`, `failFinalAt`). The template is the first four fields plus `params`, so `JobSpecBuilder` copies four fields and appends `origin` and the timing the job supplies. `origin` is kept, zero when unused: the marketplace needs it to tie a job to the card version the user signed. The evaluator ignores it except to refuse a proposal that changes it. The Trust Layer page's order is superseded; this one goes to the evaluator team as the order to implement. A `Check` compares a read against a constant target; read-against-read comparisons are out of scope (the marketplace resolves `principalBps` targets to constants at `openJob`). Vocabulary (2026-10-12): the enum and field names above are the SDK's constant names (`PushChain.CONSTANTS.AGENTIC.JOB.EVALUATION`, `OPERATION`, `LOGIC`, `ALLOWED_MUTABILITY`), one vocabulary from contract to SDK; `Logic` drops the `CHECK` leaf kind so an operator lists its checks and its child operators directly, which roughly halves node count (PROPOSED, for the evaluator team). The `Read` struct is EVM-shaped today (`address target`, `bytes4 selector`); since the evaluator only compares attested answers, any source universal read serves (Solana, web2) works once `Read` can carry the universal read envelope. Tracked as open item 3. + +# 1. In one paragraph + +The evaluator is deliberately dumb. It does not know what a yield job or a swap is. It knows how to fire a read on a chain at an agreed height, decode one value out of the answer using the `outputs` layout and the `field` path, compare that value (or its change since a snapshot) to a target, and combine the results through a small tree. Reads are attested by the universal validators by quorum, so the evaluator only ever does arithmetic on answers a quorum agreed on. The kernel's own lifecycle drives it: `fund` freezes the criteria and takes the snapshot, `submit` triggers the verdict, `complete` or `reject` settle. `claimRefund` after expiry always works, whatever the evaluator is doing. + +# 2. Decisions + +| # | Decision | Outcome | +| --- | --- | --- | +| E1 | Criteria format | **The V2 `JobSpec`** (reads, checks, logic) replaces the 2026-09-28 `Criteria { conditions[] }` draft. Generic through `outputs` and `field`: the evaluator reads a nested struct value without knowing the contract's interface. A read that cannot be decoded resolves to UNKNOWN, never reverts. | +| E2 | Comparison families | **Four `Evaluation`s**: BOOLEAN (`after == target`), COMPARE (`after op target`), NUMBER (`(after - before) op target`), PERCENTAGE (`(after - before) * 10000 / before op target`). NUMBER and PERCENTAGE need the snapshot; BOOLEAN and COMPARE look at the end state only. Named BOOL, CMP, NUM, PCT until 2026-10-12. The four families from the first draft (true or false, greater or less, percentage, absolute) map onto these one to one. | +| E3 | Pass logic | **A tree**, `logic[]`: ALL, ANY, AT_LEAST k, each listing the checks and the child operators it combines (the CHECK leaf kind was dropped 2026-10-12, PROPOSED). Children always have a higher index than their parent, so evaluation runs leaves up and cannot loop. No NOT: flip the operator on the check instead. Renamed from `nodes` to `logic` (2026-10-07). | +| E4 | Mutability | **`AllowedMutability` on the spec**: NONE, CLIENT, PROVIDER, BOTH. A proposal travels as a replacement `JobSpec` in `setBudget`'s `optParams`; the hook checks the flag against the caller; the evaluator stores it as the standing proposal; the client accepts by funding or does not fund. A proposal may not change `origin` or `allowedMutability`. `PROVIDER` means the whole spec. (2026-10-06, 2026-10-07) | +| E5 | Hook and evaluator | **Separate contracts.** The hook is the kernel-facing adapter (and on Push also the AGW rules binder); the evaluator is directly callable so a kernel with its own hook, or a party calling by hand, can use it. 8183 lets a kernel whitelist several hooks; merging would have limited that. (2026-10-06) | +| E6 | When the job starts | **At `fund`.** The hook's `afterAction(fund)` freezes the standing spec and takes the baseline: one before read per NUM or PCT check, pinned to the height at `fund`, so the baseline is the state before the agent touched anything. "Started" is the baseline being recorded; it is an evaluator fact, not a kernel state. | +| E7 | Who pays the reads | **Client prefunds the snapshot; the submitter pays the verify reads.** `quoteSnapshot(description)` returns the amount up front. On Push the AGW prefunds in the funding transaction. A spec with only BOOL and CMP checks has no snapshot and no prepay. (2026-10-06) | +| E8 | When the verdict runs | **At `submit`**, from the hook's `afterAction(submit)` calling `verify`. Wrapped in a try so a failed call never blocks `submit`; anyone can call `verify` again. A provider-callable retry exists for rounds where a read failed. The old "provider calls submit and then calls verify" is gone. | +| E9 | Verdicts | **PASS calls `complete`. FAIL after `failFinalAt` calls `reject`. FAIL before `failFinalAt` and INCONCLUSIVE send nothing** and `verify` can run again. `reason` is a hash of the job id and the round, so a verdict traces back to its reads. The three-consecutive-blocks rule from the first draft is dropped; a spec that fears a one-block spike adds a second read a few blocks later and joins them with ALL. | +| E10 | Checkpoint rule | **Checkpoint first.** Before any after read, the evaluator asks the AGW whether the owner changed anything after the baseline. If so, the job completes in the agent's favour (verdict `CLIENT_INTERFERED`), no reads. Unchanged from the first draft. | +| E11 | Verified ratings | **Written by the evaluator in the same transaction as `complete` or `reject`** (draft): rail, chain, job reference, 8004 agent id, provider, client, evaluator, verdict, reason, fee, settled at. Keyed by rail, chain and job so a job counts once. Where the record lives is open on [Proposal: Verified Ratings on ERC-8004 (In draft)](https://app.notion.com/p/Proposal-Verified-Ratings-on-ERC-8004-In-draft-3f4188aea7f4817480cfe762d6d833a6?pvs=21). | +| E12 | Jobs on other chains | **Phase 2: `EvaluatorGateway` per chain.** A job on Base or Arbitrum names the gateway as its evaluator and keeps its own kernel; `snapshot` and `verify` travel to Push through the universal gateway and the verdict comes back TSS-signed to the evaluator's account there, which alone may call `complete` or `reject` through the gateway. Three ways to trigger it: the kernel's own hook (from `EvaluationHookBase`), Push's hook whitelisted on the kernel, or any party calling `snapshot` and `verify` by hand (the default, needs nothing from the kernel operator). Planning doc pending; must not block v1. | +| E13 | Scope of v1 | **Deterministic lane only.** Validator-attested reads plus on-chain comparison. No committee, no staking, no commit-reveal, no judging of quality. Say so externally. Solana reads limited to what Read State serves today; prompt-based reads are the future path. | + +# 3. Rename map (2026-09-28 draft to the V2 design) + +| Area | Draft (09-28) | V2 (now) | +| --- | --- | --- | +| The criteria object | `Criteria { version, minDuration, conditions[] }` | `JobSpec { reads[], checks[], logic[], allowedMutability, origin, executeBy, failFinalAt }` | +| One condition | `Condition { read, sample, cmp }`, each condition owning its read | split into `Read` (fired once, may feed several checks), `Check` (one comparison) and `Logic` (how checks combine) | +| Read | `{ chainNamespace (full), queryType, target (bytes), callData, word, resultType }` | `{ chainNamespace (namespace only), chainId, minConfirmations, target (address), selector, args, outputs, field }`; `outputs` and `field` replace `word` and `resultType` | +| Sampling | `Sample { END, START_AND_END, PERIODIC }` | implied by `Evaluation`: NUMBER and PERCENTAGE snapshot at `fund`, BOOLEAN and COMPARE do not. PERIODIC dropped, not reserved | +| Comparison | `Compare { op (incl. IS_TRUE, IS_FALSE), basis (ABSOLUTE, DELTA, PCT, REF), value, ref, period, minPassBps }` | `Check { read, evaluation, operation, target }`; IS_TRUE and IS_FALSE become BOOLEAN with EQUAL; REF (compare two reads) is out of scope, see section 0 | +| Combining | all conditions must hold | `logic[]` tree: ALL, ANY, AT_LEAST k, operators listing checks and children directly | +| Timing | `minDuration` blocks early submit | `executeBy` and `failFinalAt` on the spec; the card's `minDuration`, `maxDuration`, `minExecuteWindow` and `settleWindow` bound them at `openJob` | +| Start | START reads at `fund`, `PreRecorded(jobId)` when the last lands | snapshot at `fund` by the hook, baseline recorded; same meaning, new names | +| Verdict trigger | END reads at `submit`, verdict in the last callback | `verify(jobId)` from `afterAction(submit)`, re-callable; verdicts PASS, FAIL, INCONCLUSIVE | +| Retry | `refireStart(jobId, condition)` by anyone | a provider-callable retry for failed reads; name follows the contract | +| Push-local and web2 reads | `push` namespace (direct staticcall, no fee), `web2` | push-local is a direct `staticcall`; web2 undefined, future planning (open item 3) | +| Where registered criteria live | evaluator or hook, open | the evaluator stores the spec and the standing proposal; the hook holds nothing of the criteria (storage doc owned by the evaluator track) | +| SDK namespace | `client.evaluation` (page 8) | none; job-side reads live in `client.job` ([7. SDK: 8183 Job](7%20SDK%208183%20Job%203ea188aea7f481e0a137f5a896723376.md)), `JobSpec` helpers (`buildJobSpec`, `encodeJobSpec`, ...) in `PushChain.utils.job` ([6. SDK: Universal Marketplace](6%20SDK%20Universal%20Marketplace%203ea188aea7f481e2961ed97129f3a4e6.md), section 3) | + +# 4. Structural pieces + +1. **Wire format.** `JobSpecTypes.sol` defined once and imported by the marketplace, the hook and the evaluator; never copied. Limits: `MAX_READS 16`, `MAX_CHECKS 16`, `MAX_LOGIC 32`, enforced by the evaluator, not the builder. +2. **Hook touchpoints.** `afterAction(setBudget)`: mutability check, proposal hand-off. `afterAction(fund)`: freeze, snapshot. `afterAction(submit)`: `verify` in a try. On Push the same hook also binds the AGW's rules in `beforeAction(fund)` ([3. 8183 (job kernel and hook)](3%208183%20(job%20kernel%20and%20hook)%203e9188aea7f48188a838c3a740d8c858.md)). `createJob` is hookable on the Push kernel only (2026-10-12) and the evaluator never depends on it. +3. **Snapshot.** One before read per NUM or PCT check, all pinned to the height at `fund`. Prefunded by the client; `quoteSnapshot` prices it. If the snapshot never completes, the job cannot pass a NUM or PCT check and expires into `claimRefund`. +4. **Verify round.** Checkpoint first; after reads by quorum; decode each read through `outputs` and `field`; each check resolves to PASS, FAIL or UNKNOWN; the tree combines them; settle or wait. Paid by the caller with `msg.value`. +5. **Settlement.** `complete` or `reject` with a reason hash; the verified rating written in the same transaction (draft). Late or duplicate verdicts are skipped, never reverted. +6. **Other chains (phase 2).** `EvaluatorGateway` per chain, `EvaluationHookBase` template for kernels that run their own hook, Push's hook as a one-time whitelist, or manual `snapshot` and `verify`. Job key on Push is (chain, kernel, jobId), never a bare jobId. + +# 4b. Contract surface, as a sketch (PROPOSED; follows the V2 build) + +Read `+` as new. Names follow the V2 design and the Plugging page; the build may move them. + +**UniversalEvaluator** (Push) + +```diff +// lifecycle, called by the hook (or by any party on a remote chain through the gateway) ++ propose(address kernel, uint256 jobId, address caller, bytes spec) // afterAction(setBudget): checks allowedMutability vs caller; stores the standing proposal; refuses origin or allowedMutability changes ++ snapshot(address kernel, uint256 jobId) payable // afterAction(fund): freezes the standing spec; fires before reads for NUM and PCT; prefund in msg.value or via prefund() ++ verify(address kernel, uint256 jobId) payable // afterAction(submit) or anyone: checkpoint, after reads, logic tree, settle or wait ++ prefund(address kernel, uint256 jobId) payable // client prepays the snapshot before fund ++ quoteSnapshot(bytes description) view returns (uint256) // what the snapshot will cost + +// views ++ specOf(address kernel, uint256 jobId) view returns (JobSpec) // frozen spec, or the standing proposal while Open ++ statusOf(address kernel, uint256 jobId) view returns (EvaluationStatus) // baseline height, before values, last round, verdict ++ version() view returns (string) + +// events ++ JobSpecProposed(kernel, jobId, by, specHash) // CriteriaProposed in the morning draft; one noun with the struct (2026-10-12) ++ JobSpecFrozen(kernel, jobId, specHash) ++ BaselineRecorded(kernel, jobId, height) ++ VerifyRound(kernel, jobId, round, result) // PASS | FAIL | INCONCLUSIVE ++ Settled(kernel, jobId, verdict, reason) // PASS | FAIL | CLIENT_INTERFERED +``` + +**EvaluationHookBase** (template for kernels on any chain) + +```diff ++ afterAction(jobId, sel, data): fund => GATEWAY.snapshot(msg.sender, jobId); submit => try GATEWAY.verify(msg.sender, jobId) {} catch {}; then _afterAction (yours) +``` + +**EvaluatorGateway** (every other chain, phase 2) + +```diff ++ snapshot(kernel, jobId) payable, verify(kernel, jobId) payable, prefund(kernel, jobId) payable // forward to Push through the universal gateway ++ settle(kernel, jobId, pass, reason) // only from the evaluator's execution account on this chain; calls complete or reject; late or duplicate skipped +``` + +# 5. Open + +1. `JobSpec` field order and `origin`: decided 2026-10-12 (section 0). Remaining step is the evaluator team implementing it in `JobSpecTypes.sol`; both repos import from there. +2. Who may call the retry, and its name on the contract (tagged 2026-10-12). +3. Push-local, non-EVM and web2 reads. Decided 2026-10-12: a read whose chain is Push itself is a direct `staticcall` by the evaluator, no universal read round trip. For every other source the evaluator compares attested answers and needs no new path; what is missing is a `Read` struct that can carry the universal read envelope for Solana and web2 (EVM-shaped today). Future planning, not v1 (tagged 2026-10-12). +4. Fees beyond reads: whether the evaluator takes a fee and how external-chain settlement is funded. Research, with the fee design (tagged 2026-10-12). +5. Recurring jobs and renewal, with the one-live-job rule on the wallet (tagged 2026-10-12). +6. Where the verified rating record lives (8004 Validation Registry or a Push contract). Parked; to be addressed later (2026-10-12). \ No newline at end of file diff --git a/plan/marketplace/notion/6-sdk-universal-marketplace.md b/plan/marketplace/notion/6-sdk-universal-marketplace.md new file mode 100644 index 00000000..d4fffa40 --- /dev/null +++ b/plan/marketplace/notion/6-sdk-universal-marketplace.md @@ -0,0 +1,1162 @@ +# 6. SDK: Universal Marketplace + + + +# List of changes + +New + +- `client.market` + - user side + - `cards` + - `card` + - `preview` + - `openJob` + - `deposit` + - `job` + - `activeJob` + - provider side, `client.market.agent` + - `register` + - `update` + - `setActive` + - `card` +- `MarketError`, progress family `MARKET-TX-1xx` +- `PushChain.utils.job` (moved here from page 8, 2026-10-12) + - `buildJobSpec` + - `buildJobSpecTemplate` + - `encodeJobSpec` + - `decodeJobSpec` + - `describeJobSpec` + - `previewJobSpec` +- `PushChain.utils.market` + - `validateAgentCardRules` + - `encodeAgentCardRules` + - `decodeAgentCardRules` +- `PushChain.CONSTANTS.AGENTIC.PRINCIPAL` and `PushChain.CONSTANTS.AGENTIC.JOB.*` (vocabulary), `JobSpecError` +- `client.universal.read.prepare` (core change; the read input to the builders) + +Removed from this page on 2026-10-12 + +- `PushChain.CONSTANTS.MARKET` (addresses stay inside the SDK, page 5 decision); `PushChain.CONSTANTS.JOB_SPEC` limits; the `'PRINCIPAL'` and `'CEA'` string markers (now `AGENTIC.PRINCIPAL` and `AGENTIC.WALLET`); `beneficiary` on allowed calls (now `pins`, page 5 6.a) + +Removed from the earlier draft of this page + +- `start` funding anything; `prepare.start`; `compile`; `publish`, `mine`, `retire`; `fee.tokens[]`; off-chain signed cards and hash ids + +Not in the SDK + +- admin calls: `verifyAgentCard`, `disableAgentCard`, `setCEADeployment`, `setHook`, `setEvaluator`, `pause` + +Two sides, one namespace. The user side is everything the person starting a job does: browse, preview, sign once, deposit. The provider side (`client.market.agent`) is everything the agent's operator does: register the card, update it, switch it on and off. A card id is an on-chain integer; a card version is on-chain and bumps on every update. + +# 1. User side, by example + +### 1.a List agent cards - `client.market.cards` + +Lists cards. The contract has no list view, so the SDK walks `agentCardCount` and `getAgentCard` and filters locally; an indexer replaces the walk later without changing the call. + +```tsx +// Function +const res = await client.market.cards({ options? }) + +// Usage and Params +const { cards } = await client.market.cards(); // every card +const { cards } = await client.market.cards({ chain: CHAIN.ETHEREUM_SEPOLIA }); // cards acting on one chain +const { cards } = await client.market.cards({ provider: '0xAgentOnPush', active: true }); +// options.provider Address, optional only cards registered by this Push address +// options.chain CHAIN, optional only cards whose execution chain is this one +// options.active boolean, optional only cards switched on; default all + +// Returns +// { cards: AgentCardSummary[] } +{ + cards: [ + { + cardId: 7n, + provider: '0xAgentOnPush', + jobType: 'LENDING_DEPOSIT', + chain: 'eip155:11155111', + providerFee: 5000000n, + paymentToken: '0xUSDC...', + principalMin: 100000000n, + principalMax: 50000000000n, + version: 2, + active: true, + verified: true, + rating: 0, + }, + ] +} +``` + +### 1.b Read one card - `client.market.card` + +The card in full, decoded: the listing, the rules the agent needs, the job spec template, version and tags. `getAgentCard` plus `getAgentRating`. + +```tsx +// Function +const card = await client.market.card(cardId) + +// Usage and Params +const card = await client.market.card(7n); // one card +// cardId bigint, required the card's on-chain id + +// Returns +// { cardId, provider, jobType, metadataURI, metadataHash, chain, providerFee, paymentToken, principalMin, principalMax, minDuration, maxDuration, minExecuteWindow, settleWindow, active, version, verified, disabled, rating, rules, jobSpecTemplate } +{ + cardId: 7n, + provider: '0xAgentOnPush', + jobType: 'LENDING_DEPOSIT', + metadataURI: 'ipfs://...', + metadataHash: '0x...', + chain: 'eip155:11155111', + providerFee: 5000000n, + paymentToken: '0xUSDC...', + principalMin: 100000000n, + principalMax: 50000000000n, + minDuration: 86400, + maxDuration: 7776000, + minExecuteWindow: 3600, + settleWindow: 7200, + active: true, + version: 2, + verified: true, + disabled: false, + rating: 0, + rules: { // AgentCardRules, decoded + assets: [ + { + token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, + maxPerCall: PushChain.CONSTANTS.AGENTIC.PRINCIPAL, + maxTotal: PushChain.CONSTANTS.AGENTIC.PRINCIPAL, + }, + ], + maxGasPerCall: 1000000000000000000n, + allowedCalls: [ + { + target: aavePool, + selector: 'supply(address,uint256,address,uint16)', + pins: [ + { arg: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }, + ], + }, + ], + principalAsset: 0, + approvals: [ + { + token: usdcSepolia, + spender: aavePool, + capIsPrincipal: true, + }, + ], + }, + jobSpecTemplate: { // JobSpecTemplate, decoded + reads: [...], + checks: [...], + logic: { ... }, + allowedMutability: 'NONE', + params: [], + }, +} +``` + +`rules.assets[].maxPerCall` and `maxTotal` read `PushChain.CONSTANTS.AGENTIC.PRINCIPAL` for the principal asset because the contract binds them to the job's principal at `openJob`; every other cap is a number. `PushChain.CONSTANTS.AGENTIC.WALLET` in a pin means the user's wallet on the card's chain (its CEA), filled the same way. + +### 1.c Preview a job before signing - `client.market.preview` + +Builds and validates everything the user's one signature will cover, and sends nothing. Bad inputs throw here (principal out of range, stale card version, wallet busy), before any signature. The returned plan is what `openJob` signs, and the readable preview is what the UI shows. + +```tsx +// Function +const plan = await client.market.preview(cardId, { options }) + +// Usage and Params +const plan = await client.market.preview(7n, { + principal: parseUnits('500', 6), // in the card's principal asset + expiredAt: now + 7 * 86400, // inside the card's duration window + executeBy: now + 3600, // at or after now + minExecuteWindow; executeBy + settleWindow <= expiredAt + params: [], // one per template param, inside its bounds +}); +// cardId bigint, required the card +// options.principal bigint, required the job's size, in the card's principal asset +// options.expiredAt number, required job expiry, unix seconds +// options.executeBy number, required the provider must have executed by this +// options.params bigint[], optional per-job numbers the template declares; default none +// options.walletIndex number, optional reuse a derived wallet slot; default the owner's next unused index + +// Returns +// { cardId, cardVersion, wallet, walletDeployed, session, intent, calldata, jobSpec, deposit, preview } +{ + cardId: 7n, + cardVersion: 2, + wallet: '0x2Fd9...', // predictWallet(owner, index) + walletDeployed: false, + session: { ... }, // the rules for this job, as the AGW will store them; sessionHash is in the intent + intent: { // what the owner signs; from previewIntent + owner: '0xFd6C...', + wallet: '0x2Fd9...', + executor: '0xMarketplace', + index: 0, + sessionHash: '0x...', + mode: '0x00...', + execCalldataHash: '0x...', + nonceKey: 0n, + nonceSeq: 0n, + grantNonce: 0n, + deadline: 1767225600, + signerChainId: 11155111n, + }, + calldata: '0x...', // the exact createJob execution, from buildCreateJobCalldata + jobSpec: { + spec: { // JobSpec, built from the card's template + reads: [...], + checks: [...], + logic: { ... }, + allowedMutability: 'NONE', + origin: '0x...', + executeBy: 1766630400, + failFinalAt: 1766637600, + }, + bytes: '0x...', + }, + deposit: { // what deposit() will move, for display + principal: { + token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, + amount: 500000000n, + }, + providerFee: { + token: '0xUSDC...', + amount: 5000000n, + }, + pc: 1000000000000000000n, + approvals: [ + { + token: usdcSepolia, + spender: aavePool, + amount: 500000000n, + }, + ], + }, + preview: { // in words, for the signing screen + mayDo: [ + 'On Ethereum Sepolia: call Aave Pool supply(...); the receiving account is always your own account there', + ], + mayMove: [ + 'Up to 500 USDC in total, 500 per call; up to 1 PC per outbound for fees', + ], + judgedBy: [ + 'aUSDC balance of your account is at least 499.95 USDC', + 'Aave USDC supply rate is at least 4%', + ], + until: '2026-10-19 12:00 UTC', + }, +} +``` + +The SDK derives the user's destination account itself with the account utilities and compares it to the contract's `computeCEA`; a disagreement throws `CEA_MISMATCH` before signing. Approvals are listed because the owner, not the agent, must make them (page 2, section 3). + +### 1.d Open the job with one signature - `client.market.openJob` + +Signs the `OwnerIntent` and submits `openJob`. Behind the signature: the wallet is deployed if new, the rules are granted, the kernel job is created in Open with the wallet as client. Nothing is funded. + +```tsx +// Function +const res = await client.market.openJob(plan, { options? }) + +// Usage and Params +const res = await client.market.openJob(plan, { progressHook: (p) => console.log(p.id, p.message) }); // MARKET-TX-1xx +// plan JobPlan, required from preview; the SDK re-reads the wallet's nonces and refuses a stale plan +// options.progressHook function, optional progress events; default none +// options.relay boolean, optional submit through the Push relayer; default true for an external owner, false for a Push EOA, which submits itself + +// Returns +// { jobId, wallet, rulesId, tx } +{ + jobId: 42n, + wallet: '0x2Fd9...', + rulesId: '0x9c1e...', + tx: { // UniversalTxResponse of the openJob transaction + hash: '0xb527...', + origin: 'eip155:11155111:0x31dC...', // the owner's key, CAIP-10 + from: '0xRelayerOrOwner', + blockNumber: 1290n, + wait + } +} +``` + +The signature is EIP-712 under the factory's domain with `signerChainId` set to the owner's home chain, so MetaMask signs it on the chain it is connected to. Anyone may submit the signed parameters; a front-runner starts exactly the job the owner signed, and the wallet's nonces make it one-shot. A Push EOA owner signs the same way and the SDK submits from that EOA. + +### 1.e Deposit into the wallet - `client.market.deposit` + +The funding step, separate from `openJob` by decision: moves the principal, the provider fee and PC into the wallet from the connected signer (any chain, the normal `sendTransaction` with `funds`), then makes the card's approvals from the wallet's account on the destination chain through the owner door. Reports each step, because an external owner may sign more than once. + +```tsx +// Function +const res = await client.market.deposit(jobId, { options? }) + +// Usage and Params +const res = await client.market.deposit(42n, { progressHook: (p) => console.log(p.id, p.message) }); +const res = await client.market.deposit(42n, { skipApprovals: true }); // funds only; approvals made elsewhere +// jobId bigint, required the job opened on this card +// options.progressHook function, optional progress events, MARKET-TX-11x; default none +// options.skipApprovals boolean, optional move funds and PC only; default false + +// Returns +// { txs } +{ + txs: [ + { + step: 'PRINCIPAL', + tx: { hash: '0x...', wait }, // UniversalTxResponse + }, + { + step: 'PROVIDER_FEE', + tx: { hash: '0x...', wait }, + }, + { + step: 'PC', + tx: { hash: '0x...', wait }, + }, + { + step: 'APPROVAL', // owner door, cross-chain + token: usdcSepolia, + spender: aavePool, + tx: { hash: '0x...', wait }, + }, + ] +} +``` + +Funding can come from any account, not only the owner's: anyone can send tokens and PC to the wallet address. `deposit` is the convenience that knows the card's amounts and makes the approvals, which only the owner can do. After the provider prices the job, funding the kernel escrow is `client.job.fund(jobId)` on [7. SDK: 8183 Job](7%20SDK%208183%20Job%203ea188aea7f481e0a137f5a896723376.md). + +### 1.f Read what the marketplace recorded for a job - `client.market.job` + +```tsx +// Function +const res = await client.market.job(jobId) + +// Usage and Params +const { cardId, wallet, rulesId } = await client.market.job(42n); +// jobId bigint, required a job opened through the marketplace + +// Returns +// { cardId, cardVersion, wallet, rulesId } +{ + cardId: 7n, + cardVersion: 2, + wallet: '0x2Fd9...', + rulesId: '0x9c1e...', +} +``` + +Zero values for a job not opened here. The job's own state (status, budget, provider) is `client.job.status(jobId)`. + +### 1.g Read a wallet's live job - `client.market.activeJob` + +```tsx +// Function +const res = await client.market.activeJob(wallet) + +// Usage and Params +const { jobId } = await client.market.activeJob('0x2Fd9...'); // 0n when the wallet is free +// wallet Address, required an AGW + +// Returns +// { jobId } +{ + jobId: 42n +} +``` + +A wallet is busy while its last marketplace job is Funded, Submitted, or Open and not yet expired. `preview` and `openJob` throw `WALLET_HAS_ACTIVE_JOB` for a busy wallet. + +# 2. Provider side, by example + +The provider is the agent's operator. The connected signer's Push address becomes the card's `provider`, the 8183 provider, and the agent every rule names. One card per provider is enforced on-chain (open item 1). + +### 2.a Register a card - `client.market.agent.register` + +Encodes the rules (tokens resolved to PRC20s, selector strings to `bytes4`, pins to the argument offsets the contract checks) and the job spec template, then calls `registerAgentCard`. `rules` is the AGW's `Rule` ([5. SDK: AGW](5%20SDK%20AGW%203e9188aea7f481cf8e8de324956549b9.md), 6.a and 6.h) with the per-job fields left out: `agent` is the card's provider, `chainNamespace` is the card's `chain`, `validUntil` is the job's `expiredAt`; the marketplace fills those at `openJob`. Argument restrictions are `pins` on each allowed call, exactly as on the wallet, with `PushChain.CONSTANTS.AGENTIC.WALLET` standing for the user's wallet. Two fields are the marketplace's own: `principalAsset` says which asset is the principal, and `approvals` are the owner's token approvals on the execution chain, not rules on the wallet. + +```tsx +// Function +const res = await client.market.agent.register(card, { options }) + +// Usage and Params +const res = await client.market.agent.register({ + jobType: 'LENDING_DEPOSIT', + metadataURI: 'ipfs://...', + metadataHash: '0x...', + chain: CHAIN.ETHEREUM_SEPOLIA, // the chain the agent acts on + providerFee: parseUnits('5', 6), + paymentToken: USDC_PUSH, + principalMin: parseUnits('100', 6), + principalMax: parseUnits('50000', 6), + minDuration: 86400, + maxDuration: 90 * 86400, + minExecuteWindow: 3600, + settleWindow: 7200, +}, { + rules: { + assets: [ + { + token: MOVEABLE.TOKEN.ETHEREUM_SEPOLIA.USDC, + maxPerCall: PushChain.CONSTANTS.AGENTIC.PRINCIPAL, // bound to the job's principal at openJob + maxTotal: PushChain.CONSTANTS.AGENTIC.PRINCIPAL, + }, + ], + maxGasPerCall: parseUnits('1', 18), // PC (wei) per outbound, as on the AGW rule + allowedCalls: [ + { + target: aavePool, + selector: 'supply(address,uint256,address,uint16)', + pins: [ + { arg: 2, expected: PushChain.CONSTANTS.AGENTIC.WALLET }, // onBehalfOf must be the user's wallet (its CEA on Sepolia) + ], + }, + ], + principalAsset: 0, // marketplace field: which asset is the principal + approvals: [ // marketplace field: the owner's approvals on the execution chain + { + token: usdcSepolia, + spender: aavePool, + capIsPrincipal: true, + }, + ], + }, + jobSpecTemplate, // JobSpecTemplate; built with PushChain.utils.job.buildJobSpecTemplate (3.b) + progressHook: (p) => console.log(p.id, p.message), +}); +// card AgentCardInput, required the listing; provider and active are set by the contract +// options.rules AgentCardRules, required what the agent needs the owner to grant +// options.jobSpecTemplate JobSpecTemplate, required the evaluator's JobSpec with holes +// options.progressHook function, optional progress events, MARKET-TX-12x; default none + +// Returns +// { cardId, version, tx } +{ + cardId: 7n, + version: 1, + tx: { // UniversalTxResponse + hash: '0x...', + origin: 'eip155:11155111:0x31dC...', + from: '0xAgentOnPush', + blockNumber: 1300n, + wait + } +} +``` + +Registration checks run on-chain (job type, metadata, chain configured, principal and duration ranges, allow-list size and shape, no `approve` in the allow-list, approvals well formed, assets on the card's chain). The template is stored as given and not judged. + +### 2.b Update a card - `client.market.agent.update` + +Replaces every field except `provider`, `chain` and `active`, and both blobs. Version bumps, the verified tag clears, jobs already opened keep the version they were signed against. + +```tsx +// Function +const res = await client.market.agent.update(cardId, card, { options }) + +// Usage and Params +const res = await client.market.agent.update(7n, card, { rules, jobSpecTemplate, progressHook }); +// cardId bigint, required the provider's card +// card, options as in register + +// Returns +// { cardId, version, tx } +``` + +### 2.c Switch a card on or off - `client.market.agent.setActive` + +Off stops new jobs on the card; on resumes. Live jobs are untouched. Reversible, unlike the admin's `disableAgentCard`. + +```tsx +// Function +const tx = await client.market.agent.setActive(cardId, active, { options? }) + +// Usage and Params +const tx = await client.market.agent.setActive(7n, false); // pause the card +// cardId bigint, required the provider's card +// active boolean, required on or off +// options.progressHook function, optional default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +``` + +### 2.d Read the provider's card - `client.market.agent.card` + +```tsx +// Function +const card = await client.market.agent.card() + +// Usage and Params +const card = await client.market.agent.card(); // the connected signer's card, or undefined +// no params + +// Returns +// same shape as 1.b +``` + +# 3. Authoring helpers, by example + +Pure functions, no network except `previewJobSpec`. A provider uses them to write a card; a client creating a plain 8183 job uses the same helpers to write a `JobSpec` with no placeholders and passes the bytes to `client.job.create` ([7. SDK: 8183 Job](7%20SDK%208183%20Job%203ea188aea7f481e0a137f5a896723376.md)). The format they produce is the `JobSpec` on [4. Universal Evaluation](4%20Universal%20Evaluation%203e9188aea7f4817bb03ef4c78c883f8b.md), section 0. Two authors, one format: a card carries a `JobSpecTemplate`, a `JobSpec` with placeholders for the user's wallet, the user's params and the principal and no timing, filled on-chain at `openJob`; a plain job carries a `JobSpec` directly. Both go on-chain as `abi.encode(...)`. + +Reads are universal reads that have not been sent yet. `client.universal.read.prepare` takes exactly the options `client.universal.read` takes, sends nothing, and returns the read as data; `client.universal.read(read)` accepts the same object, so what the author previews and what the validators fetch at verification is one description. The two things only the evaluator needs, `field` (which value to take out of the return) and `minConfirmations`, are given beside the prepared read in the builder, not to `prepare`. The evaluator never fetches anything itself; it compares attested answers, so any source universal read serves (EVM, Solana, web2) works the day the `Read` struct can describe it. Vocabulary comes from `PushChain.CONSTANTS.AGENTIC` (4.d); strings are accepted too. All PROPOSED (2026-10-12). + +### 3.a Build a spec for a plain job - `PushChain.utils.job.buildJobSpec` + +A complete `JobSpec` with no placeholders, for a client creating a job directly on the kernel. Validates the logic tree, the evaluator's limits (16 reads, 16 checks, 32 logic nodes) and that `failFinalAt` sits inside the expiry you pass. + +```tsx +// Function +const spec = PushChain.utils.job.buildJobSpec({ options }) + +// Usage and Params +const { JOB, WALLET } = PushChain.CONSTANTS.AGENTIC; +const deposited = client.universal.read.prepare({ // exactly what client.universal.read takes; nothing is sent + chain: CHAIN.ETHEREUM_SEPOLIA, + target: aUSDC, + abi: erc20Abi, + functionName: 'balanceOf', + args: [userWallet], +}); +const rate = client.universal.read.prepare({ + chain: CHAIN.ETHEREUM_SEPOLIA, + target: aavePool, + abi: aavePoolAbi, + functionName: 'getReserveData', + args: [USDC], +}); + +const spec = PushChain.utils.job.buildJobSpec({ + reads: [ + { + read: deposited, + minConfirmations: 12, + }, + { + read: rate, + field: [0, 2], // currentLiquidityRate inside the returned struct; default [0] + }, + ], + checks: [ + { + read: 0, + evaluation: JOB.EVALUATION.COMPARE, + operation: JOB.OPERATION.GREATER_OR_EQUAL, + target: 499950000n, // deposited at least 499.95 USDC + }, + { + read: 1, + evaluation: JOB.EVALUATION.COMPARE, + operation: JOB.OPERATION.GREATER_OR_EQUAL, + target: 4n * 10n ** 25n, // rate at least 4%, in ray + }, + ], + logic: JOB.LOGIC.ALL, // shorthand: all checks; or a tree, see 3.b + allowedMutability: JOB.ALLOWED_MUTABILITY.NONE, + executeBy: now + 3600, + failFinalAt: now + 3 * 3600, + expiredAt: now + 7 * 86400, // for the failFinalAt check only; not stored +}); +// options.reads (PreparedRead | ReadInput)[], required 1..16; a bare prepared read, or { read, field?, minConfirmations? }; no placeholders +// options.checks Check[], required 1..16; { read, evaluation, operation, target } +// options.logic LOGIC.ALL | LOGIC.ANY | LogicTree, required +// options.allowedMutability ALLOWED_MUTABILITY.*, required who may propose a replacement spec at setBudget +// options.executeBy number, required unix seconds +// options.failFinalAt number, required unix seconds; after this a FAIL is final +// options.expiredAt number, optional warns FAIL_WINDOW_THIN if failFinalAt is close to it + +// Returns +// { reads, checks, logic, allowedMutability, origin, executeBy, failFinalAt } +{ + reads: [ + { + chainNamespace: 'eip155', + chainId: '11155111', + minConfirmations: 12, + target: '0xaUSDC...', + selector: '0x70a08231', + args: '0x000...userWallet', + outputs: '0x0801...', // type codes derived from the ABI + field: [0], + }, + { ... }, + ], + checks: [ + { + read: 0, + evaluation: 'COMPARE', + operation: 'GREATER_OR_EQUAL', + target: 499950000n, + }, + { + read: 1, + evaluation: 'COMPARE', + operation: 'GREATER_OR_EQUAL', + target: 40000000000000000000000000n, + }, + ], + logic: { + kind: 'ALL', + of: [0, 1], + }, + allowedMutability: 'NONE', + origin: '0x00...00', // zero for a plain job + executeBy: 1766630400, + failFinalAt: 1766637600, +} +``` + +### 3.b Build a card template - `PushChain.utils.job.buildJobSpecTemplate` + +The same, with placeholders and no timing (the job supplies `executeBy` and `failFinalAt`). A read argument may be `WALLET` (the user's wallet on that chain, its CEA off Push) or `{ param: i }` (a user-chosen number); a check target may be `PRINCIPAL`, `{ principalBps: n }` or `{ param: i }`; each param declares bounds. Placeholders travel through `prepare` as ordinary argument values and the builder records where they sit, so `prepare` stays a plain universal read. This is what `client.market.agent.register` (2.a) takes as `jobSpecTemplate`. The marketplace stores it as given and fills the placeholders on-chain at `openJob`. + +```tsx +// Function +const template = PushChain.utils.job.buildJobSpecTemplate({ options }) + +// Usage and Params +const { JOB, WALLET, PRINCIPAL } = PushChain.CONSTANTS.AGENTIC; +const deposited = client.universal.read.prepare({ + chain: CHAIN.ETHEREUM_SEPOLIA, + target: aUSDC, + abi: erc20Abi, + functionName: 'balanceOf', + args: [WALLET], // placeholder: the user's wallet on Sepolia, filled at openJob +}); +const rate = client.universal.read.prepare({ + chain: CHAIN.ETHEREUM_SEPOLIA, + target: aavePool, + abi: aavePoolAbi, + functionName: 'getReserveData', + args: [USDC], +}); + +const template = PushChain.utils.job.buildJobSpecTemplate({ + reads: [ + { + read: deposited, + minConfirmations: 12, + }, + { + read: rate, + field: [0, 2], + }, + ], + checks: [ + { + read: 0, + evaluation: JOB.EVALUATION.COMPARE, + operation: JOB.OPERATION.GREATER_OR_EQUAL, + target: { principalBps: 9999n }, // deposited at least 99.99% of the principal + }, + { + read: 1, + evaluation: JOB.EVALUATION.COMPARE, + operation: JOB.OPERATION.GREATER_OR_EQUAL, + target: 4n * 10n ** 25n, + }, + ], + logic: { // a tree: entries are check indices or sub-trees + kind: JOB.LOGIC.ANY, + of: [ + { + kind: JOB.LOGIC.ALL, + of: [0, 1], + }, + { + kind: JOB.LOGIC.AT_LEAST, + k: 1, + of: [0], + }, + ], + }, + allowedMutability: JOB.ALLOWED_MUTABILITY.NONE, + params: [], // e.g. [{ min: 1n, max: 10n ** 30n }] for a user-chosen minOut +}); +// options.reads (PreparedRead | ReadInput)[], required args may carry WALLET or { param: i }; the builder records where +// options.checks CheckTemplate[], required target: bigint | PRINCIPAL | { principalBps } | { param } +// options.logic LOGIC.ALL | LOGIC.ANY | LogicTree, required +// options.allowedMutability ALLOWED_MUTABILITY.*, required +// options.params { min, max }[], optional one per user-supplied number, at most 8; default none + +// Returns +// { reads, checks, logic, allowedMutability, params } +{ + reads: [ + { + chainNamespace: 'eip155', + chainId: '11155111', + minConfirmations: 12, + target: '0xaUSDC...', + selector: '0x70a08231', + args: '0x00...00', // 32 zero bytes where the wallet goes + outputs: '0x0801...', + field: [0], + fills: [ + { + word: 0, + source: 'WALLET', // the placeholder, filled on-chain + }, + ], + }, + { ... }, + ], + checks: [ + { + read: 0, + evaluation: 'COMPARE', + operation: 'GREATER_OR_EQUAL', + target: { principalBps: 9999n }, + }, + { + read: 1, + evaluation: 'COMPARE', + operation: 'GREATER_OR_EQUAL', + target: 40000000000000000000000000n, + }, + ], + logic: { + kind: 'ANY', + of: [ + { + kind: 'ALL', + of: [0, 1], + }, + { + kind: 'AT_LEAST', + k: 1, + of: [0], + }, + ], + }, + allowedMutability: 'NONE', + params: [], +} +``` + +### 3.c Encode a spec - `PushChain.utils.job.encodeJobSpec` + +The bytes `client.job.create` takes as `jobSpec`, and the bytes `registerAgentCard` stores as the template. The logic tree is flattened to the contract's node list here and re-nested by the decoder, so the SDK never shows a leaf node. + +```tsx +// Function +const bytes = PushChain.utils.job.encodeJobSpec(spec) + +// Usage and Params +const jobSpec = PushChain.utils.job.encodeJobSpec(spec); // pass as client.job.create's jobSpec +const template = PushChain.utils.job.encodeJobSpec(templateSpec); // what register sends as jobSpecTemplate +// spec JobSpec | JobSpecTemplate, required abi.encode of either + +// Returns +// +``` + +### 3.d Decode a spec - `PushChain.utils.job.decodeJobSpec` + +From a job's `description` or a card's stored template back to a typed object; the decoder tells `JobSpec` from `JobSpecTemplate` by shape. + +```tsx +// Function +const spec = PushChain.utils.job.decodeJobSpec(bytes) + +// Usage and Params +const spec = PushChain.utils.job.decodeJobSpec(job.description); +const template = PushChain.utils.job.decodeJobSpec(card.jobSpecTemplateBytes); +// bytes Hex, required abi.encode of a JobSpec or a JobSpecTemplate + +// Returns +// +``` + +### 3.e Say the spec in words - `PushChain.utils.job.describeJobSpec` + +What `client.market.preview` shows on the signing screen, and what a card page renders. Pure; uses the ABI names captured by `prepare` when present, falls back to selector and address when describing a spec read from chain. + +```tsx +// Function +const lines = PushChain.utils.job.describeJobSpec(spec, { options? }) + +// Usage and Params +const lines = PushChain.utils.job.describeJobSpec(spec, { principal: 500000000n, decimals: { [aUSDC]: 6 } }); +// spec JobSpec | JobSpecTemplate, required +// options.principal bigint, optional resolves PRINCIPAL and principalBps targets into amounts +// options.decimals Record, optional formats token amounts + +// Returns +// { checks: string[], logic: string, timing: string } +{ + checks: [ + 'aUSDC balance of your wallet on Ethereum Sepolia is at least 499.95 USDC', + 'Aave USDC supply rate is at least 4%', + ], + logic: 'All of the above', + timing: 'Executed by 2026-10-13 13:00 UTC; a fail is final after 15:00 UTC', // empty on a template +} +``` + +### 3.f Dry-run the reads - `PushChain.utils.job.previewJobSpec` + +Sends each read through `client.universal.read` now and runs the tree, so an author sees what the evaluator would see today. Not a verdict and not attested: a sanity check before registering a card or creating a job. + +```tsx +// Function +const result = await PushChain.utils.job.previewJobSpec(spec, { options }) + +// Usage and Params +const result = await PushChain.utils.job.previewJobSpec(spec, { client, wallet: userWallet, principal: 500000000n }); +// spec JobSpec | JobSpecTemplate, required +// options.client PushChainClient, required the reads go through client.universal.read (open item 5) +// options.wallet Address, required for a template fills WALLET +// options.principal bigint, required for a template resolves PRINCIPAL and principalBps +// options.params bigint[], optional fills { param: i } + +// Returns +// { reads, checks, pass } +{ + reads: [ + { + value: '0x...', + decoded: 499960000n, + }, + { + value: '0x...', + decoded: 41200000000000000000000000n, + }, + ], + checks: [ + { + pass: true, + value: 499960000n, + }, + { + pass: true, + value: 41200000000000000000000000n, + }, + ], + pass: true, +} +``` + +### 3.g Check card rules - `PushChain.utils.market.validateAgentCardRules` + +`AgentCardRules` is plain data, so there is no builder: the provider writes the object and this applies the contract's checks locally (1..8 assets, `principalAsset` in range, no duplicate token, 1..32 allowed calls, no `approve` or `increaseAllowance`, transfer-like calls pin their recipient, at most 8 approvals). `register` and `update` call it before signing; exported for card pages. + +```tsx +// Function +PushChain.utils.market.validateAgentCardRules(rules) + +// Usage and Params +PushChain.utils.market.validateAgentCardRules(rules); // throws MarketError on the first failing check +// rules AgentCardRules, required as in 2.a + +// Returns +// +``` + +### 3.h Encode card rules - `PushChain.utils.market.encodeAgentCardRules` + +The bytes `registerAgentCard` stores. Tokens resolve to PRC20s, selector strings to `bytes4`, pins to the argument offsets the contract checks, `PRINCIPAL` caps to the marker the contract binds at `openJob`. Same encoding the AGW uses for a rule, so a card's rules and the rule the wallet stores never disagree. + +```tsx +// Function +const bytes = PushChain.utils.market.encodeAgentCardRules(rules, { options }) + +// Usage and Params +const bytes = PushChain.utils.market.encodeAgentCardRules(rules, { chain: CHAIN.ETHEREUM_SEPOLIA }); +// rules AgentCardRules, required as in 2.a +// options.chain CHAIN, required the card's execution chain; needed to resolve tokens and offsets + +// Returns +// +``` + +### 3.i Decode card rules - `PushChain.utils.market.decodeAgentCardRules` + +Back from the stored bytes to the object `register` took, tokens as the other chain's addresses again. What `card` uses to fill `rules`. + +```tsx +// Function +const rules = PushChain.utils.market.decodeAgentCardRules(bytes, { options }) + +// Usage and Params +const rules = PushChain.utils.market.decodeAgentCardRules(card.rulesBytes, { chain: card.chain }); +// bytes Hex, required as stored by registerAgentCard +// options.chain CHAIN, required the card's execution chain + +// Returns +// +``` + +# 4. Types + +### 4.a Namespace + +```tsx +interface MarketNamespace { + cards(opts?: { provider?: Address; chain?: CHAIN; active?: boolean }): Promise<{ cards: AgentCardSummary[] }>; + card(cardId: bigint): Promise; + preview(cardId: bigint, opts: PreviewOptions): Promise; + openJob(plan: JobPlan, opts?: { progressHook?: ProgressHook; relay?: boolean }): Promise<{ jobId: bigint; wallet: Address; rulesId: Hex; tx: UniversalTxResponse }>; + deposit(jobId: bigint, opts?: { progressHook?: ProgressHook; skipApprovals?: boolean }): Promise<{ txs: DepositStep[] }>; + job(jobId: bigint): Promise<{ cardId: bigint; cardVersion: number; wallet: Address; rulesId: Hex }>; + activeJob(wallet: Address): Promise<{ jobId: bigint }>; + agent: { + register(card: AgentCardInput, opts: { rules: AgentCardRules; jobSpecTemplate: JobSpecTemplate; progressHook?: ProgressHook }): Promise<{ cardId: bigint; version: number; tx: UniversalTxResponse }>; + update(cardId: bigint, card: AgentCardInput, opts: { rules: AgentCardRules; jobSpecTemplate: JobSpecTemplate; progressHook?: ProgressHook }): Promise<{ cardId: bigint; version: number; tx: UniversalTxResponse }>; + setActive(cardId: bigint, active: boolean, opts?: { progressHook?: ProgressHook }): Promise; + card(): Promise; + }; +} +``` + +### 4.b Cards and rules + +```tsx +interface AgentCardInput { + jobType: string; // stored as bytes32 (keccak of the string) + metadataURI: string; + metadataHash: Hex; + chain: CHAIN; // the execution chain; stored as the full CAIP-2 string; immutable after registration + providerFee: bigint; + paymentToken: Address; // lands with K-12 on the kernel + principalMin: bigint; + principalMax: bigint; + minDuration: number; + maxDuration: number; + minExecuteWindow: number; + settleWindow: number; +} + +interface AgentCard extends AgentCardInput { + cardId: bigint; + provider: Address; + active: boolean; + version: number; + verified: boolean; + disabled: boolean; + rating: number; + rules: AgentCardRules; + jobSpecTemplate: JobSpecTemplate; +} + +interface AgentCardSummary { + cardId: bigint; + provider: Address; + jobType: string; + chain: string; + providerFee: bigint; + paymentToken: Address; + principalMin: bigint; + principalMax: bigint; + version: number; + active: boolean; + verified: boolean; + rating: number; +} + +interface AgentCardRules { // the AGW Rule (page 5, 6.h) minus agent, chainNamespace, validUntil; plus two marketplace fields + assets: AssetCapInput[]; // 1..8; PRINCIPAL only on assets[principalAsset] + maxGasPerCall: bigint; // PC (wei) per outbound + allowedCalls: AllowedCall[]; // 1..32, with pins, imported from page 5; no approve or increaseAllowance + principalAsset: number; // marketplace: index into assets + approvals: ApprovalInput[]; // marketplace: the owner's, on the execution chain +} + +interface AssetCapInput { + token: MoveableToken | Address; // the other chain's token address or the native marker; the SDK resolves to the PRC20 + maxPerCall: bigint | PrincipalMarker; // PushChain.CONSTANTS.AGENTIC.PRINCIPAL + maxTotal?: bigint | PrincipalMarker; +} + +interface ApprovalInput { + token: Address; // on the execution chain + spender: Address; + capIsPrincipal: boolean; + cap?: bigint; // required when capIsPrincipal is false +} +``` + +### 4.c Plan and deposit + +```tsx +interface PreviewOptions { + principal: bigint; + expiredAt: number; + executeBy: number; + params?: bigint[]; + walletIndex?: number; +} + +interface JobPlan { + cardId: bigint; + cardVersion: number; + wallet: Address; + walletDeployed: boolean; + session: Session; // the rules for this job, as the AGW stores them + intent: OwnerIntent; // what the owner signs; from previewIntent + calldata: Hex; // the createJob execution; from buildCreateJobCalldata + jobSpec: { + spec: JobSpec; + bytes: Hex; + }; + deposit: { + principal: Funds; + providerFee: Funds; + pc: bigint; + approvals: { token: Address; spender: Address; amount: bigint }[]; + }; + preview: { + mayDo: string[]; + mayMove: string[]; + judgedBy: string[]; + until: string; + }; +} + +interface DepositStep { + step: 'PRINCIPAL' | 'PROVIDER_FEE' | 'PC' | 'APPROVAL'; + token?: Address; + spender?: Address; + tx: UniversalTxResponse; +} +``` + +`JobSpecTemplate` and `JobSpec` are the evaluator's wire format ([3. 8183 (job kernel and hook)](3%208183%20(job%20kernel%20and%20hook)%203e9188aea7f48188a838c3a740d8c858.md)); helpers to build and read them are in section 3 (`buildJobSpecTemplate`, `encodeJobSpec`, `decodeJobSpec`). + +### 4.d Constants - `PushChain.CONSTANTS.AGENTIC` additions + +Vocabulary for the spec and the two placeholders. `WALLET` already exists on page 5 (6.a); `PRINCIPAL` is new; the `JOB` members are new. No contract addresses here (page 5 decided addresses stay inside the SDK; the per-chain `JOB.ADDRESS` table is on page 7 because phase 2 needs the gateway address per chain). No limits here; the SDK enforces them and names the limit in the error. + +```tsx +PushChain.CONSTANTS.AGENTIC.WALLET // the user's wallet on the rule's or read's chain; pins, read args, check targets +PushChain.CONSTANTS.AGENTIC.PRINCIPAL // the job's principal; asset caps and check targets at 100% +PushChain.CONSTANTS.AGENTIC.JOB.EVALUATION.BOOLEAN | COMPARE | NUMBER | PERCENTAGE +PushChain.CONSTANTS.AGENTIC.JOB.OPERATION.EQUAL | NOT_EQUAL | GREATER_THAN | GREATER_OR_EQUAL | LESS_THAN | LESS_OR_EQUAL +PushChain.CONSTANTS.AGENTIC.JOB.LOGIC.ALL | ANY | AT_LEAST +PushChain.CONSTANTS.AGENTIC.JOB.ALLOWED_MUTABILITY.NONE | CLIENT | PROVIDER | BOTH +// enumerable, like PRESETS; the string each resolves to is the TypeScript literal type +``` + +### 4.e Errors and progress + +```tsx +class MarketError extends AgenticError {} // decoded from UniversalMarketplaceErrors, plus SDK-side checks + +// codes (contract) AGENT_CARD_INACTIVE, AGENT_CARD_VERSION_MISMATCH, PRINCIPAL_OUT_OF_RANGE, EXPIRY_OUT_OF_RANGE, EXECUTE_BY_OUT_OF_RANGE, +// PROVIDER_IS_EVALUATOR, PARAM_COUNT_MISMATCH, PARAM_OUT_OF_RANGE, WALLET_HAS_ACTIVE_JOB, +// AGENT_MISMATCH, ASSET_MISMATCH, GAS_CAP_MISMATCH, ACTIONS_MISMATCH, PRINCIPAL_CAP_MISMATCH, EXPIRY_MISMATCH, EXPECTED_CEA_MISMATCH +// codes (SDK) CEA_MISMATCH (SDK derivation disagrees with computeCEA), STALE_PLAN (nonces moved since preview), NOT_CARD_PROVIDER + +// progress events, MARKET-TX (PROPOSED) +// MARKET-TX-101 plan built { cardId, wallet } +// MARKET-TX-102 intent signed +// MARKET-TX-103 openJob submitted { relayed } +// MARKET-TX-104 job opened { jobId, wallet, rulesId } +// MARKET-TX-111 deposit step sent { step, token? } +// MARKET-TX-121 card registered or updated { cardId, version } +// MARKET-TX-199-01 done +// MARKET-TX-199-02 failed { code, decodedError } +``` + +### 4.f Authoring helper types - `PushChain.utils.job`, `PushChain.utils.market` + +```tsx +namespace PushChain.utils.market { + validateAgentCardRules(rules: AgentCardRules): void; + encodeAgentCardRules(rules: AgentCardRules, opts: { chain: CHAIN }): Hex; + decodeAgentCardRules(bytes: Hex, opts: { chain: CHAIN }): AgentCardRules; +} + +namespace PushChain.utils.job { + buildJobSpec(opts: BuildJobSpecOptions): JobSpec; + buildJobSpecTemplate(opts: BuildJobSpecTemplateOptions): JobSpecTemplate; + encodeJobSpec(spec: JobSpec | JobSpecTemplate): Hex; + decodeJobSpec(bytes: Hex): JobSpec | JobSpecTemplate; + describeJobSpec(spec: JobSpec | JobSpecTemplate, opts?: { principal?: bigint; decimals?: Record }): { checks: string[]; logic: string; timing: string }; + previewJobSpec(spec: JobSpec | JobSpecTemplate, opts: { client: PushChainClient; wallet?: Address; principal?: bigint; params?: bigint[] }): Promise; +} + +// client.universal.read.prepare: exactly the options of client.universal.read (chain, target, abi | idl, functionName, args), returns a PreparedRead without sending (core change, universal read change list item 6) +interface PreparedRead { chainNamespace: string; chainId: string; target: Address; selector: Hex; args: Hex; outputs: Hex } // what read() would send, as data +interface ReadInput { // what the builders take; a bare PreparedRead means field [0] and the chain's default confirmations + read: PreparedRead; + field?: number[]; // path to the value in the return; default [0] + minConfirmations?: number; // default per chain +} + +// vocabulary; the string forms are what the constants resolve to +type Evaluation = 'BOOLEAN' | 'COMPARE' | 'NUMBER' | 'PERCENTAGE'; +type Operation = 'EQUAL' | 'NOT_EQUAL' | 'GREATER_THAN' | 'GREATER_OR_EQUAL' | 'LESS_THAN' | 'LESS_OR_EQUAL'; +type LogicKind = 'ALL' | 'ANY' | 'AT_LEAST'; +type AllowedMutability = 'NONE' | 'CLIENT' | 'PROVIDER' | 'BOTH'; +type WalletMarker = typeof PushChain.CONSTANTS.AGENTIC.WALLET; // the user's wallet on the read's chain (page 5, 6.a) +type PrincipalMarker = typeof PushChain.CONSTANTS.AGENTIC.PRINCIPAL; // the job's principal + +// mirrors JobSpecTypes.sol (page 4, section 0); field order is ABI +interface Read { + chainNamespace: string; // 'eip155' (namespace only; chainId beside it) + chainId: string; + minConfirmations: number; + target: Address; + selector: Hex; + args: Hex; + outputs: Hex; // type codes + field: number[]; + fills?: Fill[]; // template reads only +} +interface Fill { word: number; source: 'WALLET' | 'PARAM'; param?: number } +interface Check { read: number; evaluation: Evaluation; operation: Operation; target: bigint } +interface CheckTemplate { read: number; evaluation: Evaluation; operation: Operation; target: bigint | PrincipalMarker | { principalBps: bigint } | { param: number } } +interface LogicTree { kind: LogicKind; of: (number | LogicTree)[]; k?: number } // k only with AT_LEAST; a bare index is a check + +interface JobSpec { + reads: Read[]; + checks: Check[]; + logic: LogicTree; + allowedMutability: AllowedMutability; + origin: Hex; + executeBy: number; + failFinalAt: number; +} +interface JobSpecTemplate { // the first four fields of JobSpec, plus params + reads: Read[]; + checks: CheckTemplate[]; + logic: LogicTree; + allowedMutability: AllowedMutability; + params: { min: bigint; max: bigint }[]; +} + +interface PreviewResult { + reads: { value: Hex; decoded: unknown }[]; + checks: { pass: boolean; value: unknown }[]; + pass: boolean; +} + +class JobSpecError extends AgenticError { index?: number } +// codes TOO_MANY_READS, TOO_MANY_CHECKS, TOO_MANY_LOGIC, TOO_MANY_PARAMS (the limit is in the message), BAD_TREE (dangling index, empty of, k out of range), +// UNFILLED_PLACEHOLDER (a template passed where a JobSpec is needed), FAIL_WINDOW_THIN +``` + +# 5. Open for review + +1. One card per provider. Decided 2026-10-12: enforced on-chain (`registerAgentCard` reverts `AgentCardAlreadyRegistered`), so `agent.card()` reads the one card and `agent.register` surfaces that revert as `MarketError` `CARD_EXISTS`. +2. Relayer for `openJob`. Decided 2026-10-12: the client submits in the default path; a relayed path can be added later without changing the signed intent. Not a v1 question. +3. Authoring helpers. Decided 2026-10-12: all of them live on this page (section 3), `PushChain.utils.job` for the spec and `PushChain.utils.market` for the rules, so the card author builds both halves of a card in one place. `client.evaluation` (page 8) is not kept as a namespace; its reads fold into `client.job`. +4. `cards` walks ids until an indexer exists; fine for a demo, not for a thousand cards. Definitions of what the contract exposes versus what needs an indexer requested (tagged 2026-10-12). +5. `previewJobSpec` through `client.universal.read` costs read fees and is faithful to what validators will see; a free `eth_call` fallback (`{ via: 'rpc' }`) is approximate and needs per-chain RPCs. Proposed: universal by default, rpc opt-in. +6. Non-EVM and web2 reads: `prepare` accepts whatever `client.universal.read` accepts (`idl` for Solana, the web2 destination), and the evaluator compares attested answers from any source. The gap is the on-chain `Read` struct, which is EVM-shaped today; tracked on page 4 (section 0, open item 3). +7. Whether `buildJobSpecTemplate` should derive a first draft of the `AgentCardRules` from the same reads (chains, contracts and selectors are all in there), or the author writes them separately (3.g to 3.i). +8. `client.universal.read.prepare` is a core change (universal read change list, item 6): same options as `read`, returns the read as data. Until it ships the builders cannot take reads. \ No newline at end of file diff --git a/plan/marketplace/notion/7-sdk-8183-job.md b/plan/marketplace/notion/7-sdk-8183-job.md new file mode 100644 index 00000000..3c5651df --- /dev/null +++ b/plan/marketplace/notion/7-sdk-8183-job.md @@ -0,0 +1,349 @@ +# 7. SDK: 8183 Job + + + +# List of changes + +New + +- `client.job` + - client side + - `create` + - `fund` + - `status` + - `list` + - `watch` + - `claimRefund` + - provider side + - `setBudget` + - `submit` + - `verify` +- `PushChain.CONSTANTS.AGENTIC.JOB.ADDRESS[chain]` (was `CONSTANTS.JOB[chain]`; kept because phase 2 puts an `EvaluatorGateway` on every chain) +- `JobError`, progress family `JOB-TX-1xx` + +Removed from the earlier draft of this page + +- `prepare.create` and `prepare.fund` (no prepare anywhere in the agentic SDK) +- `fund`'s token argument (the token is fixed at `createJob` with K-12 and read from the job) +- `evaluatorOnly.complete / reject` (DECIDED 2026-10-12: out; the evaluator contract calls them, a plain job calls the kernel raw) +- `client.evaluation` as a namespace (page 8): its job-side reads (`status`, `verdict`, `waitForStart`, `watch`) fold into `client.job.status` and `client.job.watch`; its criteria helpers become `PushChain.utils.job.*` (`buildJobSpec`, `encodeJobSpec`, `decodeJobSpec`, `describeJobSpec`, `previewJobSpec`), documented on [6. SDK: Universal Marketplace](6%20SDK%20Universal%20Marketplace%203ea188aea7f481e2961ed97129f3a4e6.md), section 3 + +Two sides. The client is whoever created the job: in marketplace jobs the AGW, acting through its owner (`PushChain.initialize(ownerSigner, { agenticWallet })`), so every client write below is a normal `sendTransaction` to the kernel through the owner door. The provider is an ordinary signer with no wallet and no rules, talking to the kernel directly. + +# 1. Client side, by example + +### 1.a Create a job without the marketplace - `client.job.create` + +A plain 8183 job: the connected account is the client. From an owner in `agenticWallet` mode the AGW is the client; from any other signer, that signer is. Marketplace jobs do not use this; `client.market.openJob` creates them from the card's job spec template. + +```tsx +// Function +const res = await client.job.create({ options }) + +// Usage and Params +const res = await client.job.create({ + provider: '0xAgentOnPush', // the agent; zero for bid mode + evaluator: PushChain.CONSTANTS.AGENTIC.JOB.ADDRESS[CHAIN.PUSH_TESTNET_DONUT].EVALUATOR, + hook: PushChain.CONSTANTS.AGENTIC.JOB.ADDRESS[CHAIN.PUSH_TESTNET_DONUT].HOOK, + expiredAt: now + 7 * 86400, + paymentToken: USDC_PUSH, // K-12; fixed here, read everywhere after + jobSpec: jobSpecBytes, // encodeJobSpec(spec); the description on the kernel + progressHook: (p) => console.log(p.id, p.message), +}); +// options.provider Address, required the 8183 provider; for an AGW client it must equal the agent of a live rule on that wallet +// options.evaluator Address, required UniversalEvaluator on Push, or the EvaluatorGateway on another chain (phase 2) +// options.hook Address, required a hook whitelisted on the kernel; zero for none +// options.expiredAt number, required unix seconds; at least the kernel's minimum window ahead +// options.paymentToken Address, required the job's token (K-12); until K-12 lands the kernel's one token is implied and this is ignored +// options.jobSpec Hex, optional encodeJobSpec(spec); omit for a job with no evaluation (description then free text) +// options.description string, optional only when jobSpec is absent +// options.progressHook function, optional progress events, JOB-TX-101; default none + +// Returns +// { jobId, tx } +{ + jobId: 43n, + tx: { // UniversalTxResponse + hash: '0x...', + origin: 'eip155:11155111:0x31dC...', + from: '0xWalletOrSigner', + blockNumber: 1400n, + wait + } +} +``` + +### 1.b Fund the escrow - `client.job.fund` + +The client's acceptance. Call after the provider's `setBudget`. The SDK reads the stored budget as `expectedBudget` (the kernel refuses a mismatch), reads the job's token, and for an AGW client passes `abi.encode(rulesId)` so the rules hook binds job to rules. If the criteria have NUM or PCT checks it also attaches the baseline prefund (`quoteSnapshot`) in PC. + +```tsx +// Function +const tx = await client.job.fund(jobId, { options? }) + +// Usage and Params +const tx = await client.job.fund(42n, { rulesId: '0x9c1e...' }); // AGW client: binds the rules +const tx = await client.job.fund(43n); // plain client, no hook payload +const tx = await client.job.fund(42n, { rulesId, progressHook: (p) => console.log(p.id) }); +// jobId bigint, required the job +// options.rulesId Hex, required for an AGW client with the rules hook the rule this job runs under +// options.progressHook function, optional progress events, JOB-TX-102; default none + +// Returns +// { hash, origin, from, to, blockNumber, wait() } +``` + +Before sending, the SDK checks the budget is set (`BUDGET_NOT_SET`), the token balance and allowance of the client (`INSUFFICIENT_FUNDS`), and for an AGW client that the wallet is free (`WALLET_HAS_ACTIVE_JOB`). Marketplace jobs: `client.market.deposit` moves the funds into the wallet first ([6. SDK: Universal Marketplace](6%20SDK%20Universal%20Marketplace%203ea188aea7f481e2961ed97129f3a4e6.md)). + +### 1.c Read a job - `client.job.status` + +The kernel record plus the evaluator's view of it, in one read. + +```tsx +// Function +const job = await client.job.status(jobId) + +// Usage and Params +const job = await client.job.status(42n); +// jobId bigint, required + +// Returns +// { jobId, status, client, provider, evaluator, hook, expiredAt, budget, paymentToken, deliverable?, jobSpec?, rulesId?, evaluation } +{ + jobId: 42n, + status: 'Funded', // Open | Funded | Submitted | Completed | Rejected | Expired + client: '0x2Fd9...', + provider: '0xAgentOnPush', + evaluator: '0xEval...', + hook: '0xHook...', + expiredAt: 1767225600, + budget: 5000000n, + paymentToken: '0xUSDC...', + deliverable: undefined, // bytes32 after submit + jobSpec: { + spec: { ... }, // decoded JobSpec + bytes: '0x...', + frozen: true, // frozen once Funded; the standing proposal while Open + }, + rulesId: '0x9c1e...', // from the rules hook, AGW clients only + evaluation: { + baselineAt: 1290n, // block of the baseline; undefined before fund or for BOOL/CMP-only specs + before: [499950000n, undefined], // per read, where taken + after: undefined, + verdict: undefined, // 'PASS' | 'FAIL' | 'CLIENT_INTERFERED' once settled + reason: undefined, + lastVerifyAt: undefined, + } +} +``` + +### 1.d List jobs - `client.job.list` + +```tsx +// Function +const res = await client.job.list({ options? }) + +// Usage and Params +const { jobs } = await client.job.list({ provider: client.universal.account, status: 'Funded' }); // my jobs as provider +const { jobs } = await client.job.list({ client: '0x2Fd9...' }); // one wallet's jobs +// options.client Address, optional +// options.provider Address, optional +// options.status JobStatus, optional +// options.fromJobId bigint, optional walk from here; default 1 + +// Returns +// { jobs: Job[] } +``` + +Walks `jobCounter` and `jobs(id)` until an indexer exists. + +### 1.e Watch a job - `client.job.watch` + +One stream for the reader, two sources underneath: kernel events (`BudgetSet`, `JobFunded`, `JobSubmitted`, `JobCompleted`, `JobRejected`) and evaluator events (proposal stored, baseline recorded, verify round, verdict). + +```tsx +// Function +const stop = client.job.watch(jobId, callback) + +// Usage and Params +const stop = client.job.watch(42n, (e) => console.log(e.kind, e.txHash)); +stop(); +// jobId bigint, required +// callback (e: JobEvent) => void, required + +// Returns +// stop() +// JobEvent.kind: 'BudgetSet' | 'JobSpecProposed' | 'Funded' | 'BaselineRecorded' | 'Submitted' | 'VerifyRound' | 'Completed' | 'Rejected' | 'Refunded' +``` + +### 1.f Claim a refund - `client.job.claimRefund` + +After `expiredAt` (plus the 1-hour grace for a Submitted job). Never pausable on the kernel. + +```tsx +// Function +const tx = await client.job.claimRefund(jobId, { options? }) + +// Usage and Params +const tx = await client.job.claimRefund(42n); +// jobId bigint, required +// options.progressHook function, optional + +// Returns +// +``` + +# 2. Provider side, by example + +### 2.a Price the job, optionally propose a new spec - `client.job.setBudget` + +Sets the budget in the job's token. For a marketplace job the budget must equal the card's `providerFee`, because the client's `fund` passes that as `expectedBudget`. When the job's `allowedMutability` allows the provider, `jobSpec` carries a replacement `JobSpec` in `optParams`; the hook checks the flag and the evaluator stores the proposal. The client sees it in `status.jobSpec` and accepts by funding, or does not fund. + +```tsx +// Function +const tx = await client.job.setBudget(jobId, amount, { options? }) + +// Usage and Params +const tx = await client.job.setBudget(42n, parseUnits('5', 6)); // price only +const tx = await client.job.setBudget(42n, parseUnits('5', 6), { jobSpec: newSpecBytes }); // price plus a counter-proposal +// jobId bigint, required +// amount bigint, required in the job's paymentToken +// options.jobSpec Hex, optional encodeJobSpec(spec); refused by the hook unless allowedMutability allows PROVIDER or BOTH +// options.progressHook function, optional + +// Returns +// +``` + +Before sending, the SDK checks the job is Open and not expired, the caller is the provider, and if `jobSpec` is given that `allowedMutability` permits it (`JOB_SPEC_NOT_MUTABLE`) and that `origin` and `allowedMutability` are unchanged (`PROPOSAL_CHANGES_FIXED_FIELDS`). + +### 2.b Submit the work - `client.job.submit` + +Funded only, before `expiredAt`. The hook's `afterAction(submit)` calls the evaluator's `verify`, so the verdict follows without another call; the submitter pays the after reads. + +```tsx +// Function +const tx = await client.job.submit(jobId, { options }) + +// Usage and Params +const tx = await client.job.submit(42n, { deliverable: 'ipfs://...' }); // string is hashed to bytes32 +const tx = await client.job.submit(42n, { deliverable: '0x7a0f...' }); // a bytes32 as is +// jobId bigint, required +// options.deliverable Hex | string, required bytes32 on the kernel: a hash, or a string the SDK hashes +// options.progressHook function, optional progress events, JOB-TX-103; default none + +// Returns +// +``` + +### 2.c Run or retry the verdict - `client.job.verify` + +Normally not needed: `submit` triggers it. Call when a verify round was inconclusive (a read failed or the job is before `failFinalAt` and failing) and the provider wants another round. Caller pays the reads. PROPOSED name; follows the evaluator's function once it lands. + +```tsx +// Function +const tx = await client.job.verify(jobId, { options? }) + +// Usage and Params +const tx = await client.job.verify(42n); +// jobId bigint, required +// options.progressHook function, optional + +// Returns +// +``` + +# 3. Types + +```tsx +interface JobNamespace { + create(opts: CreateJobOptions): Promise<{ jobId: bigint; tx: UniversalTxResponse }>; + fund(jobId: bigint, opts?: { rulesId?: Hex; progressHook?: ProgressHook }): Promise; + status(jobId: bigint): Promise; + list(opts?: { client?: Address; provider?: Address; status?: JobStatus; fromJobId?: bigint }): Promise<{ jobs: Job[] }>; + watch(jobId: bigint, cb: (e: JobEvent) => void): () => void; + claimRefund(jobId: bigint, opts?: { progressHook?: ProgressHook }): Promise; + setBudget(jobId: bigint, amount: bigint, opts?: { jobSpec?: Hex; progressHook?: ProgressHook }): Promise; + submit(jobId: bigint, opts: { deliverable: Hex | string; progressHook?: ProgressHook }): Promise; + verify(jobId: bigint, opts?: { progressHook?: ProgressHook }): Promise; +} + +interface CreateJobOptions { + provider: Address; + evaluator: Address; + hook: Address; + expiredAt: number; + paymentToken: Address; + jobSpec?: Hex; + description?: string; + progressHook?: ProgressHook; +} + +type JobStatus = 'Open' | 'Funded' | 'Submitted' | 'Completed' | 'Rejected' | 'Expired'; + +interface Job { + jobId: bigint; + status: JobStatus; + client: Address; + provider: Address; + evaluator: Address; + hook: Address; + expiredAt: number; + budget: bigint; + paymentToken: Address; + deliverable?: Hex; + jobSpec?: { + spec: JobSpec; + bytes: Hex; + frozen: boolean; + }; + rulesId?: Hex; + evaluation: { + baselineAt?: bigint; + before?: (bigint | undefined)[]; + after?: (bigint | undefined)[]; + verdict?: 'PASS' | 'FAIL' | 'CLIENT_INTERFERED'; + reason?: Hex; + lastVerifyAt?: bigint; + }; +} + +interface JobEvent { + jobId: bigint; + kind: 'BudgetSet' | 'JobSpecProposed' | 'Funded' | 'BaselineRecorded' | 'Submitted' | 'VerifyRound' | 'Completed' | 'Rejected' | 'Refunded'; + txHash: Hex; + blockNumber: bigint; + data?: unknown; +} + +// JobSpec: the evaluator's wire format (page 3, section 3). Helpers to build, encode, decode and preview it are +// PushChain.utils.job.* (page 6, section 3: buildJobSpec, encodeJobSpec, decodeJobSpec, describeJobSpec, previewJobSpec); this namespace carries bytes. + +PushChain.CONSTANTS.AGENTIC.JOB.ADDRESS[CHAIN.PUSH_TESTNET_DONUT] = { // per chain: other chains get their kernel and EvaluatorGateway here in phase 2 + KERNEL, + HOOK, + EVALUATOR, // UniversalEvaluator on Push; the EvaluatorGateway on every other chain +}; +// the kernel's grace window is read from the kernel, not a constant (page 5 rule: limits stay inside the SDK) + +class JobError extends AgenticError {} +// codes BUDGET_NOT_SET, BUDGET_MISMATCH, INSUFFICIENT_FUNDS, WALLET_HAS_ACTIVE_JOB, NOT_PROVIDER, NOT_CLIENT, WRONG_STATUS, EXPIRED, +// JOB_SPEC_NOT_MUTABLE, PROPOSAL_CHANGES_FIXED_FIELDS, RULES_NOT_LIVE, TOKEN_MISMATCH (until K-12: the kernel is single-token) +// progress events, JOB-TX (PROPOSED): 101 created, 102 funded { rulesId }, 103 submitted, 104 budget set { proposal }, 105 verify requested, 199-01 done, 199-02 failed +``` + +# 4. Open for review + +1. `create` from a plain EOA client: allowed, agreed 2026-10-12. Keeps the namespace honest to the standard; the rules hook simply does not bind. +2. `verify` naming and who may call it follow the evaluator contract; the V2 design has a provider-callable retry (tagged 2026-10-12). +3. `list` and `watch` walk the kernel until an indexer exists; agreed 2026-10-12, the indexer comes later. +4. `JobSpec` helpers (`PushChain.utils.job.buildJobSpec`, `encodeJobSpec`, `decodeJobSpec`, `describeJobSpec`, `previewJobSpec`) live on [6. SDK: Universal Marketplace](6%20SDK%20Universal%20Marketplace%203ea188aea7f481e2961ed97129f3a4e6.md), section 3, next to the card they are first used for; this page only carries the encoded bytes. Their open items (preview cost, Solana reads, hole marker) are tracked there. \ No newline at end of file diff --git a/plan/marketplace/notion/8-sdk-evaluation-placeholder.md b/plan/marketplace/notion/8-sdk-evaluation-placeholder.md new file mode 100644 index 00000000..7322cf7a --- /dev/null +++ b/plan/marketplace/notion/8-sdk-evaluation-placeholder.md @@ -0,0 +1,23 @@ +# 8. SDK: Evaluation (retired, placeholder) + + + +# What moved where + +- `client.evaluation.status / verdict / waitForStart / watch` are `client.job.status` and `client.job.watch` (page 7) +- `client.evaluation.refireStart` is `client.job.verify` (page 7) +- `PushChain.utils.job.buildJobSpec`, `buildJobSpecTemplate`, `encodeJobSpec`, `decodeJobSpec`, `describeJobSpec`, `previewJobSpec`, `PushChain.CONSTANTS.JOB_SPEC`, `JobSpecError` (page 6, 3.a to 3.f and 4.f) +- `PushChain.utils.market.validateAgentCardRules`, `encodeAgentCardRules`, `decodeAgentCardRules` (page 6, 3.g to 3.i) + +# If an evaluation SDK is needed later + +Candidates, none committed: a read-only `client.evaluator` for validators and operators (pending rounds, read receipts, verdict history), a verdict explorer over `Settled` and `VerifyRound` events, and a committee client for the probabilistic lane once that lane exists. Each would be designed against a shipped contract, not ahead of it. \ No newline at end of file diff --git a/plan/marketplace/questions.md b/plan/marketplace/questions.md new file mode 100644 index 00000000..520e571f --- /dev/null +++ b/plan/marketplace/questions.md @@ -0,0 +1,19 @@ +# Agentic marketplace — questions for the contracts team + +## 1. Which CEA deployments should the SDK and marketplace use? + +The SDK and marketplace registry use different CEA factories on **Sepolia, Base Sepolia and Arbitrum Sepolia**. They derive different wallet addresses, so the SDK blocks opening jobs with `CEA_MISMATCH`. BSC Testnet matches and works. + +**Please confirm the canonical CEA factory and proxy implementation for each chain, and whether SDK routing or the marketplace registry needs updating.** + +[Current address comparison](implementation-status.md#destination-rollout-mismatch) + +## 2. Which JobSpec format and evaluator should the SDK integrate? + +The deployed marketplace uses a manual EOA evaluator. Its JobSpec format is incompatible with the linked evaluator implementation, including field order and enum values. `client.job.verify` is therefore disabled. + +**Please provide:** + +- The final shared JobSpec Solidity definition or commit. +- Compatible hook/evaluator deployment addresses and ABIs for Push Donut. +- The public function signatures the SDK should call to verify and retry evaluation. diff --git a/plan/marketplace/research/2026-10-20/ReviewGaps.t.sol b/plan/marketplace/research/2026-10-20/ReviewGaps.t.sol new file mode 100644 index 00000000..bb1a6ef1 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/ReviewGaps.t.sol @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +// Copied into the isolated pinned repository's test/8183-tests for execution. +import {MarketplaceFixtures} from "./UniversalMarketplace.t.sol"; +import {UniversalMarketplaceForkTest, IAGWExecute} from "./UniversalMarketplace.fork.t.sol"; +import {IAgenticCommerce} from "../../src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol"; +import {IAGWFactory} from "../../src/agentic-commerce-8183/interfaces/external/IAGWFactory.sol"; +import {ISmartSession} from "../../src/agentic-commerce-8183/interfaces/external/ISmartSession.sol"; +import {JobInputs, OpenJobParams, JobSpecTemplate} from "../../src/agentic-commerce-8183/libraries/Types.sol"; +import {JobSpec, AllowedMutability} from "../../src/agentic-commerce-8183/libraries/JobSpecTypes.sol"; + +contract ReviewLocalGaps is MarketplaceFixtures { + function test_review_nonNoneIsAcceptedButReplacementPayloadIsInert() public { + JobSpecTemplate memory t = _lendingTemplate(); + t.allowedMutability = AllowedMutability.BOTH; + uint256 id = _register(_card(), _rules(), t); + (uint256 jobId, address agw) = _open(_ready(id)); + string memory original = kernel.getJob(jobId).description; + assertEq(uint8(abi.decode(bytes(original), (JobSpec)).allowedMutability), uint8(AllowedMutability.BOTH)); + vm.prank(provider); + kernel.setBudget(jobId, FEE, hex"deadbeef"); + assertEq(kernel.getJob(jobId).description, original, "interim hook ignores replacement bytes"); + _fund(jobId, agw, FEE); + assertEq(uint8(kernel.getJob(jobId).status), uint8(IAgenticCommerce.JobStatus.Funded)); + } + + function test_review_cardFeeIsReferenceAndFundOnlyChecksAcceptedBudget() public { + uint256 id = _registerLending(); + (uint256 jobId, address agw) = _open(_ready(id)); + uint256 differentFee = mkt.getAgentCard(id).card.providerFee * 3; + _budgetAndFund(jobId, agw, differentFee); + assertEq(kernel.getJob(jobId).budget, differentFee); + assertEq(uint8(kernel.getJob(jobId).status), uint8(IAgenticCommerce.JobStatus.Funded)); + } +} + +contract ReviewRealAgwCancellation is UniversalMarketplaceForkTest { + struct Execution { address target; uint256 value; bytes callData; } + + function _reviewOpen() internal returns (uint256 cardId, uint96 index, uint256 jobId, address agw, bytes32 rulesId) { + vm.createSelectFork("https://evm.donut.rpc.push.org/", 24447347); + _deploy(); + vm.prank(provider); + cardId = mkt.registerAgentCard(_card(), abi.encode(_rules()), abi.encode(_lendingTemplate())); + index = uint96(IAGWFactory(FACTORY).walletCount(owner)); + (agw,) = IAGWFactory(FACTORY).predictWallet(owner, index); + JobInputs memory job = _inputs(); + OpenJobParams memory p = _signed(cardId, index, _sessionFor(agw, job), job); + vm.prank(relayer); + (jobId,,rulesId) = mkt.openJob(p); + } + + function test_review_cancelFreesWalletButOldAndNewGrantsBothRemainLive() public { + (uint256 cardId, uint96 index, uint256 jobId, address agw, bytes32 oldId) = _reviewOpen(); + _ownerExecute(agw, address(kernel), abi.encodeCall(IAgenticCommerce.reject, (jobId, bytes32(0), bytes("")))); + assertEq(mkt.activeJobOf(agw), 0, "cancel frees marketplace slot"); + assertTrue(ISmartSession(ENGINE).isPermissionEnabled(oldId, agw), "cancel does not revoke authority"); + JobInputs memory job = _inputs(); + OpenJobParams memory again = _signed(cardId, index, _sessionFor(agw, job), job); + vm.prank(relayer); + (,,bytes32 newId) = mkt.openJob(again); + assertTrue(newId != oldId); + assertTrue(ISmartSession(ENGINE).isPermissionEnabled(oldId, agw)); + assertTrue(ISmartSession(ENGINE).isPermissionEnabled(newId, agw)); + } + + function test_review_ownerCanAtomicallyCancelAndRevokeWithoutNewAgwRole() public { + (,,uint256 jobId, address agw, bytes32 rulesId) = _reviewOpen(); + Execution[] memory calls = new Execution[](2); + calls[0] = Execution(address(kernel), 0, abi.encodeCall(IAgenticCommerce.reject, (jobId, bytes32(0), bytes("")))); + calls[1] = Execution(agw, 0, abi.encodeWithSignature("revokeRules(bytes32)", rulesId)); + vm.prank(owner); + IAGWExecute(agw).execute(bytes32(bytes1(0x01)), abi.encode(calls)); + assertEq(uint8(kernel.getJob(jobId).status), uint8(IAgenticCommerce.JobStatus.Rejected)); + assertEq(mkt.activeJobOf(agw), 0); + assertFalse(ISmartSession(ENGINE).isPermissionEnabled(rulesId, agw)); + } +} diff --git a/plan/marketplace/research/2026-10-20/abi-manifest.json b/plan/marketplace/research/2026-10-20/abi-manifest.json new file mode 100644 index 00000000..3a7b41c6 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/abi-manifest.json @@ -0,0 +1,47 @@ +{ + "source_commit": "443b4e2dd9ca5dd9ffc8efebdfcecd619dd66c47", + "files": [ + { + "file": "contracts/abi/AgenticCommerce.json", + "sha256": "6d6e09266fab0bc4c2e6a54933e53446c9dd207ea22a90071852428e9146992e", + "functions": 36, + "events": 23, + "errors": 22 + }, + { + "file": "contracts/abi/JobSpecBuilder.json", + "sha256": "0069a5e52d7000e17b5730cfdabe49bd2989c38adfed6b95f1a74d5f632a975a", + "functions": 1, + "events": 0, + "errors": 4 + }, + { + "file": "contracts/abi/RulesBindingHook.json", + "sha256": "cab42ebf25c34b63b4e51270b91a95740d7de7826c89cae5ff08a36fb3ff8b77", + "functions": 10, + "events": 2, + "errors": 8 + }, + { + "file": "contracts/abi/UniversalMarketplace.json", + "sha256": "06b639855612125c71f99b51aa69fbaa1b6bbb5d989505cfb4417fd6bfc20859", + "functions": 48, + "events": 17, + "errors": 30 + }, + { + "file": "contracts/abi/UniversalMarketplaceErrors.json", + "sha256": "48e821171747d9f22f1a3ef45525fb8bd02540a79976428700b088afcfdc090f", + "functions": 0, + "events": 0, + "errors": 40 + }, + { + "file": "contracts/abi/UniversalMarketplaceRules.json", + "sha256": "d72c043567ef1d3165493271dc93d3b8b9263000016946391a27991abe78996e", + "functions": 2, + "events": 0, + "errors": 14 + } + ] +} diff --git a/plan/marketplace/research/2026-10-20/contract-source-manifest.json b/plan/marketplace/research/2026-10-20/contract-source-manifest.json new file mode 100644 index 00000000..fa54946e --- /dev/null +++ b/plan/marketplace/research/2026-10-20/contract-source-manifest.json @@ -0,0 +1,224 @@ +{ + "repository": "https://github.com/pushchain/push-chain-core-contracts", + "branch": "sdk-iteration-v1", + "sha": "443b4e2dd9ca5dd9ffc8efebdfcecd619dd66c47", + "fetched_at": "2026-10-20T09:43:33.190042+00:00", + "files": [ + { + "path": "docs/addresses/push_donut_universal_marketplace.md", + "sha256": "71bd3676843ca4ef8f3c252cd7e6b9461affbcacf8ce885c805e07cd5f2c23e4" + }, + { + "path": "docs/universalmarketplace/README.md", + "sha256": "7caa8efcfd608c026f56f28e1b873a23b39acaf967223990074d3c03fec5ede5" + }, + { + "path": "docs/universalmarketplace/criteria.md", + "sha256": "ff66b0e63b1bfb81eafa3cd540c1db7ca0b7eabadd5830f11c4dcfc14df945ad" + }, + { + "path": "docs/universalmarketplace/reference.md", + "sha256": "bac4e09b0f13490b8f786266efc3118d65a7a7c6328cf3fc4a577239bdc1b33f" + }, + { + "path": "foundry.toml", + "sha256": "4343577dc84f7db108cfcd64736af12b2d848b206496b3e7d15fc5c352db807d" + }, + { + "path": "remappings.txt", + "sha256": "33b31e373f063571d30483b3ffc6e53bd19703071b50847c7fd2ac4d55087544" + }, + { + "path": "scripts/agentic-commerce-8183/DeployUniversalMarketplace.s.sol", + "sha256": "89f17de70d673f739417d9d73d25689437311943732f386c59e6fab6c7314b7d" + }, + { + "path": "src/agentic-commerce-8183/AgenticCommerce.sol", + "sha256": "bfc39d710ed8f3daf118ba8fcb5a83422797a241f99a788b7b920392e822a99f" + }, + { + "path": "src/agentic-commerce-8183/UniversalMarketplace.sol", + "sha256": "5acafe41338b5734b9df2cc295a88deebbeddb39e473e6583cdcf5a12f23b439" + }, + { + "path": "src/agentic-commerce-8183/UniversalMarketplaceRules.sol", + "sha256": "b8818e2d8b232f5913876ce32c67b630a0fc9cabf9c2dd5cc68ff16d2d1b7a82" + }, + { + "path": "src/agentic-commerce-8183/hooks/BaseERC8183Hook.sol", + "sha256": "3dd2af20677ceb71561a999bb564c25a6d9396a19c50da99706afcaf3d174c24" + }, + { + "path": "src/agentic-commerce-8183/hooks/RulesBindingHook.sol", + "sha256": "24fff91d14d3e1bafce79f71f7f58a2dc35de98019e04bd1099cfbb4021da077" + }, + { + "path": "src/agentic-commerce-8183/interfaces/IAgenticCommerce.sol", + "sha256": "a90d1bc5518e8ef190e250d7523f2268dacce1b380493699377063a096d8fd14" + }, + { + "path": "src/agentic-commerce-8183/interfaces/IERC8183Hook.sol", + "sha256": "d344ead446fbb7c10502843ae22ba87743ca0acd8befc84f328a97b62545d70e" + }, + { + "path": "src/agentic-commerce-8183/interfaces/IUniversalMarketplace.sol", + "sha256": "5ad7c860ecf19209b7dfde30af3d3693d5ba27ae815f965c61de66656844262a" + }, + { + "path": "src/agentic-commerce-8183/interfaces/IUniversalMarketplaceRules.sol", + "sha256": "8b15e1962bb136cc70b558c154dc5d3056cedc636cd4d803cd083b6c244c02ff" + }, + { + "path": "src/agentic-commerce-8183/interfaces/external/IAGW.sol", + "sha256": "17a06215afc2136aa795cce81acca5a3743eed404afc8a89c44f8171501912af" + }, + { + "path": "src/agentic-commerce-8183/interfaces/external/IAGWFactory.sol", + "sha256": "20ae9164904171ba01f6fa866bcbb089a721af20014243ebd8c1457aea87bb12" + }, + { + "path": "src/agentic-commerce-8183/interfaces/external/ISmartSession.sol", + "sha256": "c4d749382733544eccc7b53fdec6e505ef587eaac3331e6193cf534fa359c62a" + }, + { + "path": "src/agentic-commerce-8183/libraries/Errors.sol", + "sha256": "bfc0e60e6af1a0cb06d7ae2f2e5125ef74a4a0ffdde2544419b9e98604d7f6ac" + }, + { + "path": "src/agentic-commerce-8183/libraries/JobSpecBuilder.sol", + "sha256": "2b637585a6218d5474c5a5ba3f554a8830622745e48a2c5bc7fda12844ba8359" + }, + { + "path": "src/agentic-commerce-8183/libraries/JobSpecTypes.sol", + "sha256": "cdd81b07709c662f577007b557b31b7e97ffa54f8c6785b66361ced6024f895c" + }, + { + "path": "src/agentic-commerce-8183/libraries/Types.sol", + "sha256": "59896b8fce2ef03a37b372617122a56f1447da92f58fc47c18a3da37ffab4d44" + }, + { + "path": "test/8183-tests/AgenticCommerce.admin.t.sol", + "sha256": "bb1b729b5b643e7e3e5a7a5102def4729be55fb6e29606ae670c4de7532b2fee" + }, + { + "path": "test/8183-tests/AgenticCommerce.fuzz.t.sol", + "sha256": "cec05ba373a3a4a394d4a5a112c318e1257c0f22aef3bdf842425147874cb420" + }, + { + "path": "test/8183-tests/AgenticCommerce.hooks.t.sol", + "sha256": "f4e3085b009e9b04da9627f7526a510db7dd4e0dbd73d8cda835fbb0d993182d" + }, + { + "path": "test/8183-tests/AgenticCommerce.invariants.t.sol", + "sha256": "87cf5279ada6cbcc17c3e06356e501e2c39801906d78d2d48bc3fb24454fd997" + }, + { + "path": "test/8183-tests/AgenticCommerce.lifecycle.t.sol", + "sha256": "16c70160e1b055391a02444f8f3e1f98daa04e290735f63cd6c6d2912e0fc5c7" + }, + { + "path": "test/8183-tests/BaseERC8183Hook.t.sol", + "sha256": "ea2cf4e3ecfb9b6561573a64821edce7912c37fa9cc5dc48afb37c2e3827f9d3" + }, + { + "path": "test/8183-tests/Interfaces.t.sol", + "sha256": "07224a4daa067466dbbed7fac2da3f8854f0f92a29bd123a425d3ab4adcf4515" + }, + { + "path": "test/8183-tests/JobSpecBuilder.t.sol", + "sha256": "60ba8bcc5a90f48b59654253851dee204c0137d0501444f6a4f00e91639674ba" + }, + { + "path": "test/8183-tests/KernelBase.t.sol", + "sha256": "fb120cc4dcbfa227321d87daa4b68185381fd43889bdd55b3f01137af450dca0" + }, + { + "path": "test/8183-tests/Naming.t.sol", + "sha256": "313a49b0a083039110ca2553779fa29a4511f5b98100bf29cedce0b83e209d8b" + }, + { + "path": "test/8183-tests/RulesBindingHook.fork.t.sol", + "sha256": "1140f2394d433450c0324677d4c824597e56e5387c61ccb2a95ae34d2756f3f9" + }, + { + "path": "test/8183-tests/RulesBindingHook.t.sol", + "sha256": "779e99ee165549cb70b3b91031ea2b6a843d4b1f8d98a865894548e10e939955" + }, + { + "path": "test/8183-tests/UniversalMarketplace.conformance.t.sol", + "sha256": "e7dba1f27b2483d028fd2cb7ab2552e1f5ce79828901b369b5bc06b2ee929d55" + }, + { + "path": "test/8183-tests/UniversalMarketplace.fork.t.sol", + "sha256": "e302e56f7c82cadbcc6ca22c530bb43060517e71e453d427d2351ff01ef0e21a" + }, + { + "path": "test/8183-tests/UniversalMarketplace.invariants.t.sol", + "sha256": "fb6381e003b9b412d927cf85ac4185cabf4479643b121380839c422bafb23bf8" + }, + { + "path": "test/8183-tests/UniversalMarketplace.t.sol", + "sha256": "e10d6668b579a400ada8d877b1e7fb50aa0799151948baff8d1b07f7f5cefa9e" + }, + { + "path": "test/8183-tests/UniversalMarketplaceRules.t.sol", + "sha256": "82bd14c04f4aa949a131299369dd2c819dfe85014fa9b3aa9833529073698835" + }, + { + "path": "test/8183-tests/helpers/RulesFixtures.sol", + "sha256": "36de1516702919e007e8255f1556406a043ca70e25d7e801442e925a68d33f50" + }, + { + "path": "test/8183-tests/helpers/TemplateParts.sol", + "sha256": "17fddc29d8c5bfe2a4554fe61351064eae21adddc0d01693a42e30c29f8fce05" + }, + { + "path": "test/8183-tests/helpers/V2Decoder.sol", + "sha256": "2224cde7ef9a92ee061760a29de7ec89ccbdac22d49e0467022e118efd6bada5" + }, + { + "path": "test/8183-tests/mocks/BareHook.sol", + "sha256": "cf3dba5de2318fbf040c0bfd340ea62a98b4fd3e2db8c4e1c4192ff4baae46d9" + }, + { + "path": "test/8183-tests/mocks/ERC165Only.sol", + "sha256": "813dcc2fac5b4bcb796fdbe8fbc4183345e49e90f6da92c970fa38f81ed0d37f" + }, + { + "path": "test/8183-tests/mocks/MockAGW.sol", + "sha256": "fc6bea534ae3f3e5f0560a452d26a77b43311168918615c85030ad7371981847" + }, + { + "path": "test/8183-tests/mocks/MockAGWFactory.sol", + "sha256": "5d7b3b537d0169c0647aab2646d18bb608c9311b08dcb10c93c31c1dc9e268d2" + }, + { + "path": "test/8183-tests/mocks/MockERC20_6.sol", + "sha256": "d66d5e7c147613ab9986420f66d28a468e73aa3c55891ef4653d31771050d43e" + }, + { + "path": "test/8183-tests/mocks/MockPRC20Source.sol", + "sha256": "bddf0460fd38c7fe485a77cd6b99695b9f2eec74edb163b6a555b161244d8197" + }, + { + "path": "test/8183-tests/mocks/MockSmartSession.sol", + "sha256": "5d1a6be41784938f5117a72f9a19fbaa5a4579410355a022d11a01ca59db8975" + }, + { + "path": "test/8183-tests/mocks/RecordingHook.sol", + "sha256": "2fa999d4319a35b4b18566d824a74103f892d7a5bc6ec480414e75181b568267" + }, + { + "path": "test/8183-tests/mocks/ReentrantHook.sol", + "sha256": "034d63401a510ba6ab1e8186430e4e71bd32a6d8d6c9550ea461a71bb257a8b6" + }, + { + "path": "test/8183-tests/mocks/RevertingHook.sol", + "sha256": "cab340c8d79ba30578ef3f66c6117333c39b34f67298f896262d26a4c61ba784" + }, + { + "path": "test/8183-tests/mocks/RoutingProbeHook.sol", + "sha256": "180c1f409b903013976c0e6222bb21bde2dd523189e4114a4dd8e833efb9414f" + } + ] +} diff --git a/plan/marketplace/research/2026-10-20/contract-test-command.json b/plan/marketplace/research/2026-10-20/contract-test-command.json new file mode 100644 index 00000000..2cd54329 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/contract-test-command.json @@ -0,0 +1,18 @@ +{ + "args": [ + "forge", + "test", + "--root", + "/var/folders/4_/d47r2_4s1wb3x2dvmt2ghp800000gp/T/marketplace-review-443b4e2-_ib864pr", + "--match-path", + "test/8183-tests/*.t.sol", + "--no-match-test", + "invariant_", + "--offline", + "--json" + ], + "exit_code": 0, + "seconds": 45.76, + "log": "contract-tests.log", + "scope": "All 8183 test files, invariant functions excluded; fork files are reviewed separately for gated execution." +} diff --git a/plan/marketplace/research/2026-10-20/contract-test-summary.json b/plan/marketplace/research/2026-10-20/contract-test-summary.json new file mode 100644 index 00000000..63e5486a --- /dev/null +++ b/plan/marketplace/research/2026-10-20/contract-test-summary.json @@ -0,0 +1,21 @@ +{ + "counts": { + "Success": 248, + "Skipped": 2 + }, + "suites": 15, + "nonpassing": [ + { + "suite": "test/8183-tests/RulesBindingHook.fork.t.sol:RulesBindingHookForkTest", + "test": "test_fork_mirrorsMatchDeployedAGW()", + "status": "Skipped", + "reason": null + }, + { + "suite": "test/8183-tests/UniversalMarketplace.fork.t.sol:UniversalMarketplaceForkTest", + "test": "test_fork_openJob_realAGWv6()", + "status": "Skipped", + "reason": null + } + ] +} diff --git a/plan/marketplace/research/2026-10-20/contract-tests.log b/plan/marketplace/research/2026-10-20/contract-tests.log new file mode 100644 index 00000000..11c5efcf --- /dev/null +++ b/plan/marketplace/research/2026-10-20/contract-tests.log @@ -0,0 +1 @@ +{"test/8183-tests/AgenticCommerce.admin.t.sol:AgenticCommerceAdminTest":{"duration":"16ms 730µs 209ns","test_results":{"test_admin_functions_revertForNonAdmin()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":53361}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"58µs 875ns","breakpoints":{},"gas_snapshots":{}},"test_batchDetachHook_detachesAndSkips()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1165609}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"512µs 208ns","breakpoints":{},"gas_snapshots":{}},"test_batchDetachHook_empty_isNoop()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":20896}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"11µs 666ns","breakpoints":{},"gas_snapshots":{}},"test_batchDetachHook_invalidIds_revert()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":158355}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"26µs 417ns","breakpoints":{},"gas_snapshots":{}},"test_constants()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":19031}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"15µs 708ns","breakpoints":{},"gas_snapshots":{}},"test_dewhitelistedHook_stillCalledOnExistingJob()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1386723}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"160µs 958ns","breakpoints":{},"gas_snapshots":{}},"test_emergencyWithdraw_balanceBelowEscrow_availableIsZero()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":300767}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"57µs 166ns","breakpoints":{},"gas_snapshots":{}},"test_emergencyWithdraw_cannotTouchEscrow()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":454393}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"4ms 927µs 666ns","breakpoints":{},"gas_snapshots":{}},"test_emergencyWithdraw_notPaused_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":23671}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"16µs 542ns","breakpoints":{},"gas_snapshots":{}},"test_emergencyWithdraw_otherToken_fullyWithdrawable()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":939832}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"1ms 16µs 959ns","breakpoints":{},"gas_snapshots":{}},"test_emergencyWithdraw_zeroTo_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":46786}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"18µs 666ns","breakpoints":{},"gas_snapshots":{}},"test_emergencyWithdraw_zeroToken_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":44848}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"14µs 709ns","breakpoints":{},"gas_snapshots":{}},"test_fees_exactly10000_allowed_10001_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":76289}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"22µs 83ns","breakpoints":{},"gas_snapshots":{}},"test_initialize_onImplementationReverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":18423}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"8µs 459ns","breakpoints":{},"gas_snapshots":{}},"test_initialize_revertsOnZeroAdmin()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":96196}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"23µs 167ns","breakpoints":{},"gas_snapshots":{}},"test_initialize_revertsOnZeroToken()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":96474}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"52µs 709ns","breakpoints":{},"gas_snapshots":{}},"test_initialize_revertsOnZeroTreasury()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":96613}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"39µs","breakpoints":{},"gas_snapshots":{}},"test_initialize_secondCallReverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":22754}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"20µs 250ns","breakpoints":{},"gas_snapshots":{}},"test_initialize_setsState()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":55988}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"85µs 917ns","breakpoints":{},"gas_snapshots":{}},"test_pause_blocksEveryLifecycleFunction()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":631845}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"254µs 375ns","breakpoints":{},"gas_snapshots":{}},"test_setEvaluatorFee_emits()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":46469}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"32µs 833ns","breakpoints":{},"gas_snapshots":{}},"test_setHookWhitelist()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":47302}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xfedf0985f0dd1922cf3d60e35e5348a6fb37c922":"h"},"duration":"117µs 750ns","breakpoints":{},"gas_snapshots":{}},"test_setHookWhitelist_zero_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":19483}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"27µs 708ns","breakpoints":{},"gas_snapshots":{}},"test_setPlatformFee()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":57469}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x6a8548f54c723e46f27892911e8c1badf15a21a5":"t2"},"duration":"125µs 375ns","breakpoints":{},"gas_snapshots":{}},"test_setPlatformFee_zeroTreasury_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":19055}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"23µs","breakpoints":{},"gas_snapshots":{}},"test_storageLayout_bySlot()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":352521}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"271µs 125ns","breakpoints":{},"gas_snapshots":{}},"test_unpause_restores()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":158007}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"53µs 125ns","breakpoints":{},"gas_snapshots":{}},"test_unpause_whenNotPaused_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":20466}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"19µs 667ns","breakpoints":{},"gas_snapshots":{}},"test_upgrade_byAdminRoleHolder_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2933561}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"107µs 166ns","breakpoints":{},"gas_snapshots":{}},"test_upgrade_byProxyAdminOwner_preservesState()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":3189641}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"216µs 541ns","breakpoints":{},"gas_snapshots":{}},"test_upgrade_byStranger_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2933671}},"traces":[],"labeled_addresses":{"0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin"},"duration":"99µs 84ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/AgenticCommerce.fuzz.t.sol:AgenticCommerceFuzzTest":{"duration":"192ms 520µs 750ns","test_results":{"testFuzz_claimRefund_refundsClient(uint256,bool)":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Fuzz":{"first_case":{"calldata":"0xaab49aa000000000000000000000000000214feb2caf420de2e7d1a5d26675eab6a0e2bb0000000000000000000000000000000000000000000000000000000000000001","gas":255492,"stipend":21560},"runs":1024,"mean_gas":230121,"median_gas":233499,"failed_corpus_replays":0}},"traces":[],"labeled_addresses":{"0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider"},"duration":"99ms 746µs 542ns","breakpoints":{},"gas_snapshots":{}},"testFuzz_complete_conservesBudget(uint256,uint256,uint256)":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Fuzz":{"first_case":{"calldata":"0x9b3a61fc00000000000000000000000000214feb2caf420de2e7d1a5d26675eab6a0e2bb0000000000000000000000000000000260818b01e8252083ddd4ceb18d829d9b000000000000000000000000000000000000000003dd4aa62561b3c84436274e","gas":398421,"stipend":22024},"runs":1024,"mean_gas":369538,"median_gas":375964,"failed_corpus_replays":0}},"traces":[],"labeled_addresses":{"0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider"},"duration":"181ms 275µs 708ns","breakpoints":{},"gas_snapshots":{}},"testFuzz_emergencyWithdraw_bound(uint256,uint256,uint256)":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Fuzz":{"first_case":{"calldata":"0x514c2e5500000000000000000000000000214feb2caf420de2e7d1a5d26675eab6a0e2bb0000000000000000000000000000000260818b01e8252083ddd4ceb18d829d9b000000000000000000000000000000000000000003dd4aa62561b3c84436274e","gas":339581,"stipend":22024},"runs":1024,"mean_gas":300070,"median_gas":287302,"failed_corpus_replays":0}},"traces":[],"labeled_addresses":{"0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider"},"duration":"151ms 242µs","breakpoints":{},"gas_snapshots":{}},"testFuzz_fund_movesExactBudget(uint256)":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Fuzz":{"first_case":{"calldata":"0x4e4a534e00000000000000000000000000214feb2caf420de2e7d1a5d26675eab6a0e2bb","gas":276113,"stipend":21420},"runs":1024,"mean_gas":253195,"median_gas":254260,"failed_corpus_replays":0}},"traces":[],"labeled_addresses":{"0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider"},"duration":"67ms 263µs 333ns","breakpoints":{},"gas_snapshots":{}},"testFuzz_reject_refundsClient(uint256,bool)":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Fuzz":{"first_case":{"calldata":"0xc88cc79700000000000000000000000000214feb2caf420de2e7d1a5d26675eab6a0e2bb0000000000000000000000000000000000000000000000000000000000000001","gas":256228,"stipend":21560},"runs":1024,"mean_gas":230877,"median_gas":234235,"failed_corpus_replays":0}},"traces":[],"labeled_addresses":{"0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider"},"duration":"83ms 468µs 250ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/AgenticCommerce.hooks.t.sol:AgenticCommerceHooksTest":{"duration":"4ms 212µs 917ns","test_results":{"test_afterRevert_rollsBackComplete()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":354434}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"188µs 42ns","breakpoints":{},"gas_snapshots":{}},"test_afterRevert_rollsBackFund()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":310037}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"136µs 125ns","breakpoints":{},"gas_snapshots":{}},"test_callOrder_fullLifecycle()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1884232}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"554µs 583ns","breakpoints":{},"gas_snapshots":{}},"test_complete_hookEncoding()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1692302}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"189µs 375ns","breakpoints":{},"gas_snapshots":{}},"test_reentrancy_fromAfter_blocked()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1710353}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"466µs","breakpoints":{},"gas_snapshots":{}},"test_reentrancy_fromBefore_blockedForEveryLifecycleCall()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1546641}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"307µs 958ns","breakpoints":{},"gas_snapshots":{}},"test_reject_hookEncodingAndOrder()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1309279}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"247µs 41ns","breakpoints":{},"gas_snapshots":{}},"test_revertingBefore_blocksEveryHookedAction()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":788011}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"346µs","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/AgenticCommerce.invariants.t.sol:AgenticCommerceInvariantsTest":{"duration":"106ms 126µs 84ns","test_results":{"test_handlerLiveness()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":62258443}},"traces":[["Deployment",{"arena":[{"parent":null,"children":[],"idx":0,"trace":{"depth":0,"success":true,"caller":"0x1f95d37f27ea0dea9c252fc09d5a6eaa97647353","address":"0x5f65cd7d792e9746ef82929d60de9a1c526f93a5","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"0x608080604052346019576118d0908161001e823930815050f35b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c6319317cc514610024575f80fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261102c5760043567ffffffffffffffff811161102c573660238201121561102c5780600401359061007a826114b3565b916100886040519384611472565b8083526020830191366024838301011161102c57815f926024602093018537840101526024359067ffffffffffffffff821161102c5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc833603011261102c576040519160c0830183811067ffffffffffffffff821117610f8957604052806004013573ffffffffffffffffffffffffffffffffffffffff8116810361102c57835260248101356020840152604481013565ffffffffffff8116810361102c576040840152606481013563ffffffff8116810361102c576060840152608481013567ffffffffffffffff811161102c5781013660238201121561102c57600481013590610196826114ed565b916101a46040519384611472565b808352602060048185019260051b840101019136831161102c57602401905b82821061140d57505050608084015260a4013560a0830152825183019060208483031261102c57519167ffffffffffffffff831161102c5760a084840183031261102c57604051936102148561141d565b6020848201015167ffffffffffffffff811161102c57602090858301010160208401601f8201121561102c57805161024b816114ed565b916102596040519384611472565b81835260208084019260051b8201019060208701821161102c5760208101925b8284106111b6575050505085526040848201015167ffffffffffffffff811161102c57602090858301010160208401601f8201121561102c5780516102bd816114ed565b916102cb6040519384611472565b818352602060a081850193028201019060208701821161102c57602001915b81831061113c575050506020860152606084820101519067ffffffffffffffff821161102c5760208401603f828701840101121561102c5760208286830101015191610335836114ed565b926103436040519485611472565b808452602084016020870160208360051b81868c8901010101011161102c576040848901840101905b6040858a018501600585901b010182106110305750505050604086019182526080858201015194600486101561102c576060870195865260a081830101519067ffffffffffffffff821161102c5760209201010160208401601f8201121561102c578051906103da826114ed565b946103e86040519687611472565b82865260208087019360061b8301019160208201831161102c57602001925b828410610fe4575050505082608086015260808201519384518451808203610fb65750505f5b85518110156104bc576104408187611688565b5161044b8287611688565b515113801561049b575b6104615760010161042d565b61046b8187611688565b51907f4b1b3452000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b506104a68187611688565b5160206104b38388611688565b51015112610455565b508573ffffffffffffffffffffffffffffffffffffffff845116815151927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061051d610507866114ed565b956105156040519788611472565b8087526114ed565b013660208601375f5b8351805182101561058f579061054761054182600194611688565b51611723565b610552575b01610526565b610567610560828751611688565b5185611766565b73ffffffffffffffffffffffffffffffffffffffff6105868389611688565b9116905261054c565b5050945f5b60208401518051821015610654579060ff6105b182600194611688565b515116600360606105c68460208a0151611688565b5101516105d281611642565b6105db81611642565b148061062c575b6105ee575b5001610594565b73ffffffffffffffffffffffffffffffffffffffff61062261061b610614848a51611688565b5188611766565b9289611688565b91169052886105e7565b5073ffffffffffffffffffffffffffffffffffffffff61064c8289611688565b5116156105e2565b858386898b6040519160e0830183811067ffffffffffffffff821117610f89576040526060835260606020840152606060408401525f60608401525f60808401525f60a08401525f60c084015265ffffffffffff60408601511660a084015265ffffffffffff60408601511663ffffffff6060870151160167ffffffffffffffff81116108f05767ffffffffffffffff9096949395961660c086015260a086015160808601525160408501525161070a81611642565b61071381611642565b60608401528051517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061075e610748836114ed565b926107566040519485611472565b8084526114ed565b015f5b818110610f6857505083525f915b815180518410156109df578361078491611688565b519360808601519573ffffffffffffffffffffffffffffffffffffffff6107ab8685611688565b5116936107b661164c565b5060a0870151936108086020604051876107d98299518092858086019101611505565b810103017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101875286611472565b5f5b60c0890151805182101561091d578161082291611688565b518051909190600581901b611fe016602081019081106108f0578851106108c0576020830151926002841015610893578c600194155f146108755750506020611fe08a925b60051b16890101520161080a565b61088c611fe09160ff604060209501511690611688565b5192610867565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b50887fb2159785000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5050975094809294506109d4919660019481519160208101519161ffff60408301511673ffffffffffffffffffffffffffffffffffffffff6060840151167fffffffff000000000000000000000000000000000000000000000000000000006080850151169161010060e0860151950151956040519761099c89611455565b8852602088015260408701526060860152608085015260a084015260c083015260e08201528551906109ce8383611688565b52611688565b50019190929361076f565b848383886020830151517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0610a16610748836114ed565b015f5b818110610f5157505060208501525f5b60208401518051821015610c0c5781610a4191611688565b5190610a4b6116c9565b5060808201908151916060840160018151610a6581611642565b610a6e81611642565b03610b8d57509091505160208401518115610b6057817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0410610b345760208401518181029181830414901517156108f0576127109004905b60ff835116926040602082015191610ade83611642565b015190600682101561089357602094600194610b2b93859360405193610b0385611439565b8452610b0e81611642565b8884015260408301526060820152858a0151906109ce8383611688565b50019050610a29565b507fc7764ffa000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b60028151610b9a81611642565b610ba381611642565b03610bc35750610bbc9192506080850151905190611688565b5190610ac7565b6003915051610bd181611642565b610bda81611642565b03610ac757905073ffffffffffffffffffffffffffffffffffffffff610c0460ff84511686611688565b511690610ac7565b85604051602080820152610120810182519060e06040840152815180915261014083019060206101408260051b8601019301915f905b828210610e4d57505050506020830151907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0838203016060840152602080835192838152019201905f5b818110610dfb575050506040830151907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0838203016080840152815180825260208201906020808260051b8501019401925f905b828210610d7157610d6d87610d59818967ffffffffffffffff60c08e6060810151610d0a81611642565b60a08601526080810151828601528260a08201511660e0860152015116610100830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611472565b604051918291602083526020830190611526565b0390f35b90919293947fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820301855285519081516003811015610893576001928260209392849352606060ff81610de7610dd58787015160808988015260808701906116ed565b604087015186820360408801526116ed565b940151169101529701950193920190610ce0565b909192835160ff81511682526020810151610e1581611642565b602083015260408101519060068210156108935782606060809260209460406001970152015160608201520194019101919091610c8c565b90919293602080610f43837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec08a6001960301865288519060e0610f32610f20610eb4610ea486516101008752610100870190611526565b888701518682038a880152611526565b61ffff604087015116604086015273ffffffffffffffffffffffffffffffffffffffff60608701511660608601527fffffffff00000000000000000000000000000000000000000000000000000000608087015116608086015260a086015185820360a0870152611526565b60c085015184820360c0860152611526565b9201519060e08184039101526116ed565b960192019201909291610c42565b602090610f5c6116c9565b82828601015201610a19565b602090610f78979694959761164c565b828286010152019593929495610761565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7fc5019299000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b60406020858403011261102c5760405190604082019082821067ffffffffffffffff831117610f89576040926020928452865181528287015183820152815201930192610407565b5f80fd5b815167ffffffffffffffff811161102c576080868b01860182018a037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0011261102c576040519160208281888e61108688611439565b8b010101010151600381101561102c5783526060878c0187018301015167ffffffffffffffff811161102c57826020888e6110d48f846060978f92828787828c9401960101010101016115dd565b838901528b0101010101519067ffffffffffffffff821161102c5760209361112a608086958f8f8897918e61111b8f93948b808097019188828888880101010101016115dd565b604089015201010101016115cf565b6060820152815201920191905061036c565b60a06020848903011261102c57604051906111568261141d565b61115f846115cf565b82526020840151600481101561102c5760208301526040840151600681101561102c576040830152606084015190600482101561102c5782602092606060a0950152608086015160808201528152019201916102ea565b835167ffffffffffffffff811161102c578201610120818a031261102c5760405191610120830183811067ffffffffffffffff821117610f8957604052602082015167ffffffffffffffff811161102c57611219906020808d0191850101611569565b8352604082015167ffffffffffffffff811161102c57611241906020808d0191850101611569565b6020840152606082015161ffff8116810361102c576040840152611267608083016115ae565b606084015260a08201517fffffffff000000000000000000000000000000000000000000000000000000008116810361102c57608084015260c082015167ffffffffffffffff811161102c576112c5906020808d0191850101611569565b60a084015260e082015167ffffffffffffffff811161102c5760209083010160208b01601f8201121561102c5780518b6112fe826114ed565b9261130c6040519485611472565b828452602080606081870195028301019201821161102c57602001915b8d8284106113a2575050505060c084015261010082015167ffffffffffffffff811161102c57611361906020808d0191850101611569565b60e08401526101208201519267ffffffffffffffff841161102c5761139160209493858095818f019201016115dd565b610100820152815201930192610279565b60208460609203011261102c57604051906060820182811067ffffffffffffffff821117610f89576040526113d6846115cf565b8252602084015190600282101561102c57826020928360609501526113fd604087016115cf565b6040820152815201920191611329565b81358152602091820191016101c3565b60a0810190811067ffffffffffffffff821117610f8957604052565b6080810190811067ffffffffffffffff821117610f8957604052565b610100810190811067ffffffffffffffff821117610f8957604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610f8957604052565b67ffffffffffffffff8111610f8957601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b67ffffffffffffffff8111610f895760051b60200190565b5f5b8381106115165750505f910152565b8181015183820152602001611507565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209361156281518092818752878088019101611505565b0116010190565b81601f8201121561102c5760208151910190611584816114b3565b926115926040519485611472565b8184528183011161102c576115ab916020840190611505565b90565b519073ffffffffffffffffffffffffffffffffffffffff8216820361102c57565b519060ff8216820361102c57565b9080601f8301121561102c5781516115f4816114ed565b926116026040519485611472565b81845260208085019260051b82010192831161102c57602001905b82821061162a5750505090565b60208091611637846115cf565b81520191019061161d565b6004111561089357565b6040519061165982611455565b606060e0838281528260208201525f60408201525f838201525f60808201528260a08201528260c08201520152565b805182101561169c5760209160051b010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b604051906116d682611439565b5f6060838281528260208201528260408201520152565b90602080835192838152019201905f5b81811061170a5750505090565b825160ff168452602093840193909201916001016116fd565b5f5b60c0820151805182101561175f5761173f82602092611688565b5101516002811015610893571561175857600101611725565b5050600190565b5050505f90565b9060206117f760018284519401516040519384918161178e8185019889815193849201611505565b83017f3a00000000000000000000000000000000000000000000000000000000000000838201526117c88251809385602185019101611505565b010103017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611472565b51902073ffffffffffffffffffffffffffffffffffffffff604051927ff432b52e0000000000000000000000000000000000000000000000000000000084521660048301526024820152602081604481305afa90811561188f575f9161185b575090565b90506020813d602011611887575b8161187660209383611472565b8101031261102c576115ab906115ae565b3d9150611869565b6040513d5f823e3d90fdfea2646970667358221220f4075903b067136f6fb2d484a54ab0ac59336245b2c21b39476a6650c10a60bc64736f6c634300081a0033","output":"0x60806040526004361015610011575f80fd5b5f3560e01c6319317cc514610024575f80fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261102c5760043567ffffffffffffffff811161102c573660238201121561102c5780600401359061007a826114b3565b916100886040519384611472565b8083526020830191366024838301011161102c57815f926024602093018537840101526024359067ffffffffffffffff821161102c5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc833603011261102c576040519160c0830183811067ffffffffffffffff821117610f8957604052806004013573ffffffffffffffffffffffffffffffffffffffff8116810361102c57835260248101356020840152604481013565ffffffffffff8116810361102c576040840152606481013563ffffffff8116810361102c576060840152608481013567ffffffffffffffff811161102c5781013660238201121561102c57600481013590610196826114ed565b916101a46040519384611472565b808352602060048185019260051b840101019136831161102c57602401905b82821061140d57505050608084015260a4013560a0830152825183019060208483031261102c57519167ffffffffffffffff831161102c5760a084840183031261102c57604051936102148561141d565b6020848201015167ffffffffffffffff811161102c57602090858301010160208401601f8201121561102c57805161024b816114ed565b916102596040519384611472565b81835260208084019260051b8201019060208701821161102c5760208101925b8284106111b6575050505085526040848201015167ffffffffffffffff811161102c57602090858301010160208401601f8201121561102c5780516102bd816114ed565b916102cb6040519384611472565b818352602060a081850193028201019060208701821161102c57602001915b81831061113c575050506020860152606084820101519067ffffffffffffffff821161102c5760208401603f828701840101121561102c5760208286830101015191610335836114ed565b926103436040519485611472565b808452602084016020870160208360051b81868c8901010101011161102c576040848901840101905b6040858a018501600585901b010182106110305750505050604086019182526080858201015194600486101561102c576060870195865260a081830101519067ffffffffffffffff821161102c5760209201010160208401601f8201121561102c578051906103da826114ed565b946103e86040519687611472565b82865260208087019360061b8301019160208201831161102c57602001925b828410610fe4575050505082608086015260808201519384518451808203610fb65750505f5b85518110156104bc576104408187611688565b5161044b8287611688565b515113801561049b575b6104615760010161042d565b61046b8187611688565b51907f4b1b3452000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b506104a68187611688565b5160206104b38388611688565b51015112610455565b508573ffffffffffffffffffffffffffffffffffffffff845116815151927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061051d610507866114ed565b956105156040519788611472565b8087526114ed565b013660208601375f5b8351805182101561058f579061054761054182600194611688565b51611723565b610552575b01610526565b610567610560828751611688565b5185611766565b73ffffffffffffffffffffffffffffffffffffffff6105868389611688565b9116905261054c565b5050945f5b60208401518051821015610654579060ff6105b182600194611688565b515116600360606105c68460208a0151611688565b5101516105d281611642565b6105db81611642565b148061062c575b6105ee575b5001610594565b73ffffffffffffffffffffffffffffffffffffffff61062261061b610614848a51611688565b5188611766565b9289611688565b91169052886105e7565b5073ffffffffffffffffffffffffffffffffffffffff61064c8289611688565b5116156105e2565b858386898b6040519160e0830183811067ffffffffffffffff821117610f89576040526060835260606020840152606060408401525f60608401525f60808401525f60a08401525f60c084015265ffffffffffff60408601511660a084015265ffffffffffff60408601511663ffffffff6060870151160167ffffffffffffffff81116108f05767ffffffffffffffff9096949395961660c086015260a086015160808601525160408501525161070a81611642565b61071381611642565b60608401528051517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061075e610748836114ed565b926107566040519485611472565b8084526114ed565b015f5b818110610f6857505083525f915b815180518410156109df578361078491611688565b519360808601519573ffffffffffffffffffffffffffffffffffffffff6107ab8685611688565b5116936107b661164c565b5060a0870151936108086020604051876107d98299518092858086019101611505565b810103017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101875286611472565b5f5b60c0890151805182101561091d578161082291611688565b518051909190600581901b611fe016602081019081106108f0578851106108c0576020830151926002841015610893578c600194155f146108755750506020611fe08a925b60051b16890101520161080a565b61088c611fe09160ff604060209501511690611688565b5192610867565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b50887fb2159785000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5050975094809294506109d4919660019481519160208101519161ffff60408301511673ffffffffffffffffffffffffffffffffffffffff6060840151167fffffffff000000000000000000000000000000000000000000000000000000006080850151169161010060e0860151950151956040519761099c89611455565b8852602088015260408701526060860152608085015260a084015260c083015260e08201528551906109ce8383611688565b52611688565b50019190929361076f565b848383886020830151517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0610a16610748836114ed565b015f5b818110610f5157505060208501525f5b60208401518051821015610c0c5781610a4191611688565b5190610a4b6116c9565b5060808201908151916060840160018151610a6581611642565b610a6e81611642565b03610b8d57509091505160208401518115610b6057817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0410610b345760208401518181029181830414901517156108f0576127109004905b60ff835116926040602082015191610ade83611642565b015190600682101561089357602094600194610b2b93859360405193610b0385611439565b8452610b0e81611642565b8884015260408301526060820152858a0151906109ce8383611688565b50019050610a29565b507fc7764ffa000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b60028151610b9a81611642565b610ba381611642565b03610bc35750610bbc9192506080850151905190611688565b5190610ac7565b6003915051610bd181611642565b610bda81611642565b03610ac757905073ffffffffffffffffffffffffffffffffffffffff610c0460ff84511686611688565b511690610ac7565b85604051602080820152610120810182519060e06040840152815180915261014083019060206101408260051b8601019301915f905b828210610e4d57505050506020830151907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0838203016060840152602080835192838152019201905f5b818110610dfb575050506040830151907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0838203016080840152815180825260208201906020808260051b8501019401925f905b828210610d7157610d6d87610d59818967ffffffffffffffff60c08e6060810151610d0a81611642565b60a08601526080810151828601528260a08201511660e0860152015116610100830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611472565b604051918291602083526020830190611526565b0390f35b90919293947fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820301855285519081516003811015610893576001928260209392849352606060ff81610de7610dd58787015160808988015260808701906116ed565b604087015186820360408801526116ed565b940151169101529701950193920190610ce0565b909192835160ff81511682526020810151610e1581611642565b602083015260408101519060068210156108935782606060809260209460406001970152015160608201520194019101919091610c8c565b90919293602080610f43837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec08a6001960301865288519060e0610f32610f20610eb4610ea486516101008752610100870190611526565b888701518682038a880152611526565b61ffff604087015116604086015273ffffffffffffffffffffffffffffffffffffffff60608701511660608601527fffffffff00000000000000000000000000000000000000000000000000000000608087015116608086015260a086015185820360a0870152611526565b60c085015184820360c0860152611526565b9201519060e08184039101526116ed565b960192019201909291610c42565b602090610f5c6116c9565b82828601015201610a19565b602090610f78979694959761164c565b828286010152019593929495610761565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7fc5019299000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b60406020858403011261102c5760405190604082019082821067ffffffffffffffff831117610f89576040926020928452865181528287015183820152815201930192610407565b5f80fd5b815167ffffffffffffffff811161102c576080868b01860182018a037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0011261102c576040519160208281888e61108688611439565b8b010101010151600381101561102c5783526060878c0187018301015167ffffffffffffffff811161102c57826020888e6110d48f846060978f92828787828c9401960101010101016115dd565b838901528b0101010101519067ffffffffffffffff821161102c5760209361112a608086958f8f8897918e61111b8f93948b808097019188828888880101010101016115dd565b604089015201010101016115cf565b6060820152815201920191905061036c565b60a06020848903011261102c57604051906111568261141d565b61115f846115cf565b82526020840151600481101561102c5760208301526040840151600681101561102c576040830152606084015190600482101561102c5782602092606060a0950152608086015160808201528152019201916102ea565b835167ffffffffffffffff811161102c578201610120818a031261102c5760405191610120830183811067ffffffffffffffff821117610f8957604052602082015167ffffffffffffffff811161102c57611219906020808d0191850101611569565b8352604082015167ffffffffffffffff811161102c57611241906020808d0191850101611569565b6020840152606082015161ffff8116810361102c576040840152611267608083016115ae565b606084015260a08201517fffffffff000000000000000000000000000000000000000000000000000000008116810361102c57608084015260c082015167ffffffffffffffff811161102c576112c5906020808d0191850101611569565b60a084015260e082015167ffffffffffffffff811161102c5760209083010160208b01601f8201121561102c5780518b6112fe826114ed565b9261130c6040519485611472565b828452602080606081870195028301019201821161102c57602001915b8d8284106113a2575050505060c084015261010082015167ffffffffffffffff811161102c57611361906020808d0191850101611569565b60e08401526101208201519267ffffffffffffffff841161102c5761139160209493858095818f019201016115dd565b610100820152815201930192610279565b60208460609203011261102c57604051906060820182811067ffffffffffffffff821117610f89576040526113d6846115cf565b8252602084015190600282101561102c57826020928360609501526113fd604087016115cf565b6040820152815201920191611329565b81358152602091820191016101c3565b60a0810190811067ffffffffffffffff821117610f8957604052565b6080810190811067ffffffffffffffff821117610f8957604052565b610100810190811067ffffffffffffffff821117610f8957604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610f8957604052565b67ffffffffffffffff8111610f8957601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b67ffffffffffffffff8111610f895760051b60200190565b5f5b8381106115165750505f910152565b8181015183820152602001611507565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209361156281518092818752878088019101611505565b0116010190565b81601f8201121561102c5760208151910190611584816114b3565b926115926040519485611472565b8184528183011161102c576115ab916020840190611505565b90565b519073ffffffffffffffffffffffffffffffffffffffff8216820361102c57565b519060ff8216820361102c57565b9080601f8301121561102c5781516115f4816114ed565b926116026040519485611472565b81845260208085019260051b82010192831161102c57602001905b82821061162a5750505090565b60208091611637846115cf565b81520191019061161d565b6004111561089357565b6040519061165982611455565b606060e0838281528260208201525f60408201525f838201525f60808201528260a08201528260c08201520152565b805182101561169c5760209160051b010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b604051906116d682611439565b5f6060838281528260208201528260408201520152565b90602080835192838152019201905f5b81811061170a5750505090565b825160ff168452602093840193909201916001016116fd565b5f5b60c0820151805182101561175f5761173f82602092611688565b5101516002811015610893571561175857600101611725565b5050600190565b5050505f90565b9060206117f760018284519401516040519384918161178e8185019889815193849201611505565b83017f3a00000000000000000000000000000000000000000000000000000000000000838201526117c88251809385602185019101611505565b010103017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611472565b51902073ffffffffffffffffffffffffffffffffffffffff604051927ff432b52e0000000000000000000000000000000000000000000000000000000084521660048301526024820152602081604481305afa90811561188f575f9161185b575090565b90506020813d602011611887575b8161187660209383611472565b8101031261102c576115ab906115ae565b3d9150611869565b6040513d5f823e3d90fdfea2646970667358221220f4075903b067136f6fb2d484a54ab0ac59336245b2c21b39476a6650c10a60bc64736f6c634300081a0033","gas_used":1271740,"gas_limit":1073591220,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]}]}],["Deployment",{"arena":[{"parent":null,"children":[1,2,3,4,5,6,7,8,9,10,11,12,13,14],"idx":0,"trace":{"depth":0,"success":true,"caller":"0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38","address":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"0x6080604052346109e4575f600160ff19600c541617600c55600160ff19601f541617601f55604051610032604082610a2a565b60158152602081017f6b65726e656c50726f787941646d696e4f776e65720000000000000000000000815260405160208101906100896020828651610078818789610a61565b81010301601f198101835282610a2a565b5190206040519063ffa1864960e01b825260048201526020816024815f8051602061e7318339815191525afa9081156109d9575f916109e8575b505f8051602061e7318339815191523b156109e45761011960645f9260405194859384926318caf8e360e31b845260018060a01b0316978860048501526040602485015251809281604486015285850190610a61565b601f01601f19168101030181835f8051602061e7318339815191525af180156109d9576109c4575b5060018060a01b03196022541617602255604051610160604082610a2a565b6005815281602082016430b236b4b760d91b8152604051602081019061018f6020828751610078818789610a61565b5190206040519063ffa1864960e01b825260048201526020816024815f8051602061e7318339815191525afa908115610802578391610982575b505f8051602061e7318339815191523b156107bc5761021f6064849260405194859384926318caf8e360e31b845260018060a01b0316988960048501526040602485015251809281604486015285850190610a61565b601f01601f19168101030181835f8051602061e7318339815191525af180156107b15761096d575b505060018060a01b03196023541617602355604051610267604082610a2a565b60088152816020820167747265617375727960c01b815260405160208101906102996020828751610078818789610a61565b5190206040519063ffa1864960e01b825260048201526020816024815f8051602061e7318339815191525afa90811561080257839161092b575b505f8051602061e7318339815191523b156107bc576103296064849260405194859384926318caf8e360e31b845260018060a01b0316988960048501526040602485015251809281604486015285850190610a61565b601f01601f19168101030181835f8051602061e7318339815191525af180156107b157610916575b505060018060a01b03196024541617602455604051610371604082610a2a565b6006815281602082016518db1a595b9d60d21b815260405160208101906103a16020828751610078818789610a61565b5190206040519063ffa1864960e01b825260048201526020816024815f8051602061e7318339815191525afa9081156108025783916108d4575b505f8051602061e7318339815191523b156107bc576104316064849260405194859384926318caf8e360e31b845260018060a01b0316988960048501526040602485015251809281604486015285850190610a61565b601f01601f19168101030181835f8051602061e7318339815191525af180156107b1576108bf575b505060018060a01b03196025541617602555604051610479604082610a2a565b60088152816020820167383937bb34b232b960c11b815260405160208101906104ab6020828751610078818789610a61565b5190206040519063ffa1864960e01b825260048201526020816024815f8051602061e7318339815191525afa90811561080257839161087d575b505f8051602061e7318339815191523b156107bc5761053b6064849260405194859384926318caf8e360e31b845260018060a01b0316988960048501526040602485015251809281604486015285850190610a61565b601f01601f19168101030181835f8051602061e7318339815191525af180156107b157610868575b505060018060a01b03196026541617602655604051610583604082610a2a565b6009815281602082016832bb30b63ab0ba37b960b91b815260405160208101906105b66020828751610078818789610a61565b5190206040519063ffa1864960e01b825260048201526020816024815f8051602061e7318339815191525afa908115610802578391610826575b505f8051602061e7318339815191523b156107bc576106466064849260405194859384926318caf8e360e31b845260018060a01b0316988960048501526040602485015251809281604486015285850190610a61565b601f01601f19168101030181835f8051602061e7318339815191525af180156107b15761080d575b505060018060a01b031960275416176027556040519061068f604083610a2a565b60088252602082016739ba3930b733b2b960c11b815260405160208101906106c06020828751610078818789610a61565b5190206040519063ffa1864960e01b825260048201526020816024815f8051602061e7318339815191525afa9081156108025783916107c0575b505f8051602061e7318339815191523b156107bc576107506064849260405194859384926318caf8e360e31b845260018060a01b0316988960048501526040602485015251809281604486015285850190610a61565b601f01601f19168101030181835f8051602061e7318339815191525af180156107b157610799575b602880546001600160a01b0319168417905560405161dcae9081610a838239f35b6107a4828092610a2a565b6107ae5780610778565b80fd5b6040513d84823e3d90fd5b8280fd5b90506020813d6020116107fa575b816107db60209383610a2a565b810103126107bc57516001600160a01b03811681036107bc575f6106fa565b3d91506107ce565b6040513d85823e3d90fd5b8161081791610a2a565b61082257815f61066e565b5080fd5b90506020813d602011610860575b8161084160209383610a2a565b810103126107bc57516001600160a01b03811681036107bc575f6105f0565b3d9150610834565b8161087291610a2a565b61082257815f610563565b90506020813d6020116108b7575b8161089860209383610a2a565b810103126107bc57516001600160a01b03811681036107bc575f6104e5565b3d915061088b565b816108c991610a2a565b61082257815f610459565b90506020813d60201161090e575b816108ef60209383610a2a565b810103126107bc57516001600160a01b03811681036107bc575f6103db565b3d91506108e2565b8161092091610a2a565b61082257815f610351565b90506020813d602011610965575b8161094660209383610a2a565b810103126107bc57516001600160a01b03811681036107bc575f6102d3565b3d9150610939565b8161097791610a2a565b61082257815f610247565b90506020813d6020116109bc575b8161099d60209383610a2a565b810103126107bc57516001600160a01b03811681036107bc575f6101c9565b3d9150610990565b6109d19192505f90610a2a565b5f905f610141565b6040513d5f823e3d90fd5b5f80fd5b90506020813d602011610a22575b81610a0360209383610a2a565b810103126109e457516001600160a01b03811681036109e4575f6100c3565b3d91506109f6565b601f909101601f19168101906001600160401b03821190821017610a4d57604052565b634e487b7160e01b5f52604160045260245ffd5b5f5b838110610a725750505f910152565b8181015183820152602001610a6356fe6080806040526004361015610012575f80fd5b5f905f3560e01c9081630a9254e414611355575080631ed7831c146112ac5780632ade3880146110805780633e5e3c2314610fd75780633f7286f414610f2e57806347853bb914610ef75780634d657a1e14610ec057806366d9a9a014610d6557806385226c8114610cbd578063916a17c614610be8578063b0464fdc14610b13578063b5508aa914610a6b578063ba414fa614610a28578063c5c988ca1461020f578063d87d4feb146101d5578063e20c9f711461011c5763fa7626d4146100d9575f80fd5b3461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957602060ff601f54166040519015158152f35b80fd5b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101195760405180916020601554928381520191601582527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475915b8181106101a9576101a58561019981870382611ea7565b60405191829182611c35565b0390f35b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201610182565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101195761020c61273e565b80f35b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957805b61025881106104b0575073ffffffffffffffffffffffffffffffffffffffff602954166040517f7f974c6f000000000000000000000000000000000000000000000000000000008152602081600481855afa9081156104a5578391610473575b506102e36040918251906102b48483611ea7565b601282527f6e6f207375636365737366756c2066756e6400000000000000000000000000006020830152612ad4565b80517f05e3769c000000000000000000000000000000000000000000000000000000008152602081600481865afa908115610469578491610436575b506004926103646020928451906103368683611ea7565b601682527f6e6f207375636365737366756c20636f6d706c6574650000000000000000000085830152612ad4565b8251938480927f59e136190000000000000000000000000000000000000000000000000000000082525afa801561042c5783906103f4575b6103dc92506103ad82519283611ea7565b601982527f6e6f207375636365737366756c20726566756e642070617468000000000000006020830152612ad4565b6103e461273e565b6103ec61221d565b61020c61208e565b506020823d602011610424575b8161040e60209383611ea7565b81010312610420576103dc915161039c565b5f80fd5b3d9150610401565b81513d85823e3d90fd5b90506020813d602011610461575b8161045160209383611ea7565b810103126104205751600461031f565b3d9150610444565b82513d86823e3d90fd5b90506020813d60201161049d575b8161048e60209383611ea7565b8101031261042057515f6102a0565b3d9150610481565b6040513d85823e3d90fd5b816040516020810190838252602081526104cb604082611ea7565b519020600a8106806105a3575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f57600160c484928360405195869485937f8253f2d90000000000000000000000000000000000000000000000000000000085528060048601528060081c60248601528060101c60448601528060181c6064860152818160201c1615608486015260281c161560a48401525af180156105945761057b575b50506001905b01610240565b8161058591611ea7565b61059057815f61056f565b5080fd5b6040513d84823e3d90fd5b8280fd5b60018103610638575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f5782916044839260405194859384927f725cc2e100000000000000000000000000000000000000000000000000000000845280600485015260081c60248401525af1801561059457610623575b5050600190610575565b8161062d91611ea7565b61059057815f610619565b600281036106b7575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f5782916044839260405194859384927f9675dc1700000000000000000000000000000000000000000000000000000000845280600485015260081c60248401525af1801561059457610623575050600190610575565b60038103610739575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f5782916064839260405194859384927f81ede1bb00000000000000000000000000000000000000000000000000000000845260048401528160248401528160448401525af1801561059457610623575050600190610575565b600481036107bb575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f5782916064839260405194859384927fd130382500000000000000000000000000000000000000000000000000000000845260048401528160248401528160448401525af1801561059457610623575050600190610575565b6005810361083d575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f5782916064839260405194859384927ffd61a25600000000000000000000000000000000000000000000000000000000845260048401528160248401528160448401525af1801561059457610623575050600190610575565b600681036108c5575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f576001606484928360405195869485937f531c7faa00000000000000000000000000000000000000000000000000000000855280600486015260081c161560248401528160448401525af1801561059457610623575050600190610575565b6007810361093b575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f5782916024839260405194859384927f5b7baf6400000000000000000000000000000000000000000000000000000000845260048401525af1801561059457610623575050600190610575565b6008036109b25773ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f57612a30602484928360405195869485937fe5d6bf020000000000000000000000000000000000000000000000000000000085520660048401525af1801561059457610623575050600190610575565b73ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f5782916044839260405194859384927f0b78f9c000000000000000000000000000000000000000000000000000000000845280600485015260081c60248401525af1801561059457610623575050600190610575565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610119576020610a61612644565b6040519015158152f35b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957601954610aa681611ee8565b91610ab46040519384611ea7565b818352601981527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c9695602084015b838310610af657604051806101a58782611d3d565b600160208192610b0585611f00565b815201920192019190610ae1565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957601c54610b4e81611ee8565b91610b5c6040519384611ea7565b818352601c81527f0e4562a10381dec21b205ed72637e6b1b523bdd0e4d4d50af5cd23dd4500a211602084015b838310610b9e57604051806101a58782611dba565b60026020600192604051610bb181611e5e565b73ffffffffffffffffffffffffffffffffffffffff8654168152610bd68587016123a0565b83820152815201920192019190610b89565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957601d54610c2381611ee8565b91610c316040519384611ea7565b818352601d81527f6d4407e7be21f808e6509aa9fa9143369579dd7d760fe20a2c09680fc146134f602084015b838310610c7357604051806101a58782611dba565b60026020600192604051610c8681611e5e565b73ffffffffffffffffffffffffffffffffffffffff8654168152610cab8587016123a0565b83820152815201920192019190610c5e565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957601a54610cf881611ee8565b91610d066040519384611ea7565b818352601a81527f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e602084015b838310610d4857604051806101a58782611d3d565b600160208192610d5785611f00565b815201920192019190610d33565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957601b54610da081611ee8565b610dad6040519182611ea7565b818152601b83526020810191837f3ad8aa4f87544323a9d1e5dd902f40c356527a7955687113db5f9a85ad579dc1845b838310610e8557868587604051928392602084019060208552518091526040840160408260051b8601019392905b828210610e1a57505050500390f35b91936020610e75827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0600195979984950301865288519083610e658351604084526040840190611ca5565b9201519084818403910152611ce8565b9601920192018594939192610e0b565b60026020600192604051610e9881611e5e565b610ea186611f00565b8152610eae8587016123a0565b83820152815201920192019190610ddd565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101195761020c61221d565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101195761020c61208e565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101195760405180916020601754928381520191601782527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c15915b818110610fab576101a58561019981870382611ea7565b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201610f94565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101195760405180916020601854928381520191601882527fb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2e915b818110611054576101a58561019981870382611ea7565b825473ffffffffffffffffffffffffffffffffffffffff1684526020909301926001928301920161103d565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957601e546110bb81611ee8565b6110c86040519182611ea7565b818152601e83526020810191837f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e350845b8383106112165786858760405192839260208401906020855251809152604084019160408260051b8601019392815b8383106111345786860387f35b9193957fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc09086929496030183528551906020604082019273ffffffffffffffffffffffffffffffffffffffff81511683520151916040602083015282518091526060820190602060608260051b850101940192855b8281106111cd57505050505060208060019297019301930190928695949293611127565b9091929394602080611209837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa087600196030189528951611ca5565b97019501939291016111a9565b60405161122281611e5e565b73ffffffffffffffffffffffffffffffffffffffff835416815260018301805461124b81611ee8565b916112596040519384611ea7565b8183528a526020808b20908b9084015b83821061128f5750505050600192826020928360029501528152019201920191906110f8565b60016020819261129e86611f00565b815201930191019091611269565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101195760405180916020601654928381520191601682527fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b5124289915b818110611329576101a58561019981870382611ea7565b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201611312565b905034610420575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261042057737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610420577fe5d6bf02000000000000000000000000000000000000000000000000000000008152636553f10060048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af18015611c2a57611c17575b50604051610e1e8082019082821067ffffffffffffffff831117611b5d5760c091839161be71833960408152600960408201527f5075736820555344430000000000000000000000000000000000000000000000606082015260806020820152600560808201527f705553444300000000000000000000000000000000000000000000000000000060a082015203019082f08015611af95773ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000602154161760215560405161389f8082019082821067ffffffffffffffff831117611b5d579082916139918339039082f08015611af95773ffffffffffffffffffffffffffffffffffffffff16807fffffffffffffffffffffffff0000000000000000000000000000000000000000602054161760205573ffffffffffffffffffffffffffffffffffffffff6021541673ffffffffffffffffffffffffffffffffffffffff6024541673ffffffffffffffffffffffffffffffffffffffff6023541690604051927fc0c53b8b000000000000000000000000000000000000000000000000000000006020850152602484015260448301526064820152606481526115cf608482611ea7565b73ffffffffffffffffffffffffffffffffffffffff602254169160405192610e54918285019285841067ffffffffffffffff851117611bea579285949260609261162c95612b3d8839825260208201528160408201520190611ca5565b039082f08015611af9577fffffffffffffffffffffff0000000000000000000000000000000000000000ff74ffffffffffffffffffffffffffffffffffffffff00601f549260081b16911617601f558073ffffffffffffffffffffffffffffffffffffffff6021541673ffffffffffffffffffffffffffffffffffffffff60255416813b15611be65782916044839260405194859384927f40c10f19000000000000000000000000000000000000000000000000000000008452600484015266038d7ea4c6800060248401525af1801561059457611bd1575b5073ffffffffffffffffffffffffffffffffffffffff60255416737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15611bce57604051907fca669fa70000000000000000000000000000000000000000000000000000000082526004820152818160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561059457611bb9575b50602073ffffffffffffffffffffffffffffffffffffffff60215416604473ffffffffffffffffffffffffffffffffffffffff601f5460081c1660405194859384927f095ea7b300000000000000000000000000000000000000000000000000000000845260048401527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248401525af1801561059457611b8a575b50604051610fea8082019082821067ffffffffffffffff831117611b5d5790829161cc8f8339039082f08015611af9578173ffffffffffffffffffffffffffffffffffffffff60235416737109709ecfa91a80626ff3989d68f67f5b1dd12d3b1561059057604051907fca669fa70000000000000000000000000000000000000000000000000000000082526004820152818160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561059457611b48575b5073ffffffffffffffffffffffffffffffffffffffff80601f5460081c16921691803b15610590578180916044604051809481937fce79eb60000000000000000000000000000000000000000000000000000000008352886004840152600160248401525af1801561059457611b33575b505073ffffffffffffffffffffffffffffffffffffffff601f5460081c1673ffffffffffffffffffffffffffffffffffffffff602154169173ffffffffffffffffffffffffffffffffffffffff6023541660405193614c41938486019486861067ffffffffffffffff871117611b06579160809593918795936172308739845260208401526040830152606082015203019082f08015611af95773ffffffffffffffffffffffffffffffffffffffff16807fffffffffffffffffffffffff0000000000000000000000000000000000000000602954161760295560175468010000000000000000811015611acc576001810180601755811015611a9f577fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c1501907fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905580f35b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b50604051903d90823e3d90fd5b6024887f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b81611b3d91611ea7565b61059057815f611955565b81611b5291611ea7565b61059057815f6118e4565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b611bab9060203d602011611bb2575b611ba38183611ea7565b810190612003565b505f61182b565b503d611b99565b81611bc391611ea7565b61011957805f61178e565b50fd5b81611bdb91611ea7565b61011957805f611705565b5050fd5b6024877f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b611c2391505f90611ea7565b5f806113f5565b6040513d5f823e3d90fd5b60206040818301928281528451809452019201905f5b818110611c585750505090565b825173ffffffffffffffffffffffffffffffffffffffff16845260209384019390920191600101611c4b565b5f5b838110611c955750505f910152565b8181015183820152602001611c86565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093611ce181518092818752878088019101611c84565b0116010190565b90602080835192838152019201905f5b818110611d055750505090565b82517fffffffff0000000000000000000000000000000000000000000000000000000016845260209384019390920191600101611cf8565b602081016020825282518091526040820191602060408360051b8301019401925f915b838310611d6f57505050505090565b9091929394602080611dab837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187528951611ca5565b97019301930191939290611d60565b602081016020825282518091526040820191602060408360051b8301019401925f915b838310611dec57505050505090565b9091929394602080611e4f837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187526040838b5173ffffffffffffffffffffffffffffffffffffffff815116845201519181858201520190611ce8565b97019301930191939290611ddd565b6040810190811067ffffffffffffffff821117611e7a57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117611e7a57604052565b67ffffffffffffffff8111611e7a5760051b60200190565b90604051915f8154908160011c9260018316928315611ff9575b602085108414611fcc578487528693908115611f8c5750600114611f48575b50611f4692500383611ea7565b565b90505f9291925260205f20905f915b818310611f70575050906020611f46928201015f611f39565b6020919350806001915483858901015201910190918492611f57565b60209350611f469592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f611f39565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b93607f1693611f1a565b90816020910312610420575180151581036104205790565b81601f8201121561042057805167ffffffffffffffff8111611e7a576040519261206d601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200185611ea7565b818452602082840101116104205761208b9160208085019101611c84565b90565b73ffffffffffffffffffffffffffffffffffffffff60295416604051907fe662e387000000000000000000000000000000000000000000000000000000008252602082600481845afa908115611c2a576004925f926121fa575b505f90604051938480927f087320b20000000000000000000000000000000000000000000000000000000082525afa918215611c2a575f926121ba575b50737109709ecfa91a80626ff3989d68f67f5b1dd12d3b156104205761218a915f9160405193849283927f7ba0480900000000000000000000000000000000000000000000000000000000845215156004840152604060248401526044830190611ca5565b0381737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa8015611c2a576121b05750565b5f611f4691611ea7565b9091503d805f833e6121cc8183611ea7565b810160208282031261042057815167ffffffffffffffff8111610420576121f3920161201b565b905f612125565b5f9192506122169060203d602011611bb257611ba38183611ea7565b91906120e8565b73ffffffffffffffffffffffffffffffffffffffff602154602082601f5460081c16916024604051809581937f70a08231000000000000000000000000000000000000000000000000000000008352866004840152165afa918215611c2a575f9261236b575b506020600491604051928380927ff91682310000000000000000000000000000000000000000000000000000000082525afa908115611c2a575f91612339575b50737109709ecfa91a80626ff3989d68f67f5b1dd12d3b1561042057604051917fa8d4d1d9000000000000000000000000000000000000000000000000000000008352600483015260248201525f81604481737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa8015611c2a576121b05750565b90506020813d602011612363575b8161235460209383611ea7565b8101031261042057515f6122c3565b3d9150612347565b9091506020813d602011612398575b8161238760209383611ea7565b810103126104205751906020612283565b3d915061237a565b90604051918281549182825260208201905f5260205f20925f905b8060078301106125b757611f46945491818110612581575b81811061254b575b818110612515575b8181106124df575b8181106124a9575b818110612473575b81811061243e575b10612411575b500383611ea7565b7fffffffff000000000000000000000000000000000000000000000000000000001681526020015f612409565b9260206001917fffffffff0000000000000000000000000000000000000000000000000000000085831b168152019301612403565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560401b1681520193016123fb565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560601b1681520193016123f3565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560801b1681520193016123eb565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560a01b1681520193016123e3565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560c01b1681520193016123db565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560e01b1681520193016123d3565b9160089193506101006001917fffffffff000000000000000000000000000000000000000000000000000000008754818160e01b168352818160c01b166020840152818160a01b166040840152818160801b166060840152818160601b166080840152818160401b1660a0840152818160201b1660c08401521660e08201520194019201859293916123bb565b60085460ff1680156126535790565b506040517f667f9d70000000000000000000000000000000000000000000000000000000008152737109709ecfa91a80626ff3989d68f67f5b1dd12d60048201527f6661696c656400000000000000000000000000000000000000000000000000006024820152602081604481737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa908115611c2a575f916126eb575b50151590565b90506020813d602011612715575b8161270660209383611ea7565b8101031261042057515f6126e5565b3d91506126f9565b519073ffffffffffffffffffffffffffffffffffffffff8216820361042057565b5f73ffffffffffffffffffffffffffffffffffffffff601f5460081c166040517f50355d76000000000000000000000000000000000000000000000000000000008152602081600481855afa908115611c2a575f91612aa2575b5060015b81811115612890575050906020600492604051938480927ff91682310000000000000000000000000000000000000000000000000000000082525afa918215611c2a575f9261285c575b50737109709ecfa91a80626ff3989d68f67f5b1dd12d3b1561042057604051917f98296c54000000000000000000000000000000000000000000000000000000008352600483015260248201525f81604481737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa8015611c2a576121b05750565b9091506020813d602011612888575b8161287860209383611ea7565b810103126104205751905f6127e6565b3d915061286b565b6040517fbf22c4570000000000000000000000000000000000000000000000000000000081528160048201525f81602481875afa908115611c2a575f916129aa575b50602081018051600681101561297d57600114908115612968575b50612950575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146129235760010161279c565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60c0909491940151810180911161292357925f6128f3565b905051600681101561297d576002145f6128ed565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b90503d805f833e6129bb8183611ea7565b8101906020818303126104205780519067ffffffffffffffff82116104205701610100818303126104205760405191610100830183811067ffffffffffffffff821117611e7a57604052612a0e8261271d565b835260208201516006811015610420576020840152612a2f6040830161271d565b6040840152606082015165ffffffffffff81168103610420576060840152612a596080830161271d565b6080840152612a6a60a0830161271d565b60a084015260c082015160c084015260e082015167ffffffffffffffff811161042057612a97920161201b565b60e08201525f6128d2565b90506020813d602011612acc575b81612abd60209383611ea7565b8101031261042057515f612798565b3d9150612ab0565b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b156104205761218a915f9160405193849283927fd9a3c4d20000000000000000000000000000000000000000000000000000000084526004840152846024840152606060448401526064830190611ca556fe60a0604052610e548038038061001481610281565b928339810160608282031261027d5761002c826102a6565b610038602084016102a6565b604084015190936001600160401b03821161027d570182601f8201121561027d5780519061006d610068836102ba565b610281565b938285526020838301011161027d575f5b82811061026857505060205f9184010152803b15610248577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0383169081179091557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2815115610231575f8083602061013095519101845af43d15610229573d91610121610068846102ba565b9283523d5f602085013e6102d5565b505b6040519061064f8083016001600160401b038111848210176102155760209284926107e584396001600160a01b031681520301905ff0801561020a5760018060a01b0316806080525f80516020610e34833981519152547f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6040805160018060a01b0384168152846020820152a181156101f7576001600160a01b031916175f80516020610e34833981519152556040516104b1908161033482396080518160070152f35b633173bdd160e11b5f525f60045260245ffd5b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b6060916102d5565b505034156101325763b398979f60e01b5f5260045ffd5b634c9c8ce360e01b5f9081526001600160a01b0391909116600452602490fd5b8060208092840101518282880101520161007e565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761021557604052565b51906001600160a01b038216820361027d57565b6001600160401b03811161021557601f01601f191660200190565b906102f957508051156102ea57805190602001fd5b63d6bda27560e01b5f5260045ffd5b8151158061032a575b61030a575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b1561030256fe6080604052337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16036100bd575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100b3577fd2b576ec000000000000000000000000000000000000000000000000000000005f5260045ffd5b6100bb6101c1565b005b5f8073ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416368280378136915af43d5f803e1561010d573d5ff35b3d5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff82111761018257604052565b610111565b67ffffffffffffffff811161018257601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b366004116102745760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102745760043573ffffffffffffffffffffffffffffffffffffffff8116809103610274576024359067ffffffffffffffff821161027457366023830112156102745781600401359061024961024483610187565b61013e565b918083523660248286010111610274576020815f92602461027297018387013784010152610278565b565b5f80fd5b90813b156103675773ffffffffffffffffffffffffffffffffffffffff8216807fffffffffffffffffffffffff00000000000000000000000000000000000000007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416177f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a280511561033657610333916103a9565b50565b50503461033f57565b7fb398979f000000000000000000000000000000000000000000000000000000005f5260045ffd5b73ffffffffffffffffffffffffffffffffffffffff827f4c9c8ce3000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b5f806103db93602081519101845af43d156103de573d916103cc61024484610187565b9283523d5f602085013e6103e2565b90565b6060915b9061041f57508051156103f757805190602001fd5b7fd6bda275000000000000000000000000000000000000000000000000000000005f5260045ffd5b81511580610472575b610430575090565b73ffffffffffffffffffffffffffffffffffffffff907f9996b315000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b50803b1561042856fea2646970667358221220481cacafffcdffc0448fe9cfe96f8149f61f2083b69e100dc149c658ac2528fd64736f6c634300081a003360803460b857601f61064f38819003918201601f19168301916001600160401b0383118484101760bc5780849260209460405283398101031260b857516001600160a01b0381169081900360b857801560a5575f80546001600160a01b031981168317825560405192916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a361057e90816100d18239f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f803560e01c8063715018a6146103c45780638da5cb5b146103745780639623609d146101cb578063ad3cb1cc146101485763f2fde38b14610051575f80fd5b346101455760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101455760043573ffffffffffffffffffffffffffffffffffffffff8116809103610141576100a96104fc565b80156101155773ffffffffffffffffffffffffffffffffffffffff8254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b5080fd5b80fd5b503461014557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014557506101c760405161018960408261045e565b600581527f352e302e30000000000000000000000000000000000000000000000000000000602082015260405191829160208352602083019061049f565b0390f35b5060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103435760043573ffffffffffffffffffffffffffffffffffffffff81168091036103435760243573ffffffffffffffffffffffffffffffffffffffff81168091036103435760443567ffffffffffffffff8111610343573660238201121561034357806004013567ffffffffffffffff8111610347576040519161029f601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0166020018461045e565b818352366024838301011161034357815f9260246020930183860137830101526102c76104fc565b823b1561034357610316925f926040518095819482937f4f1ef286000000000000000000000000000000000000000000000000000000008452600484015260406024840152604483019061049f565b039134905af180156103385761032a575080f35b61033691505f9061045e565b005b6040513d5f823e3d90fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b34610343575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261034357602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b34610343575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610343576103fa6104fc565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761034757604052565b91908251928382525f5b8481106104e75750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b806020809284010151828286010152016104a9565b73ffffffffffffffffffffffffffffffffffffffff5f5416330361051c57565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffdfea2646970667358221220bf8617a09a791c192cb0d344676f2dcbe88d7a55549a679b2ee10beaae67e98364736f6c634300081a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036080806040523460d0577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c1660c1576002600160401b03196001600160401b03821601605c575b6040516137ca90816100d58239f35b6001600160401b0319166001600160401b039081177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f80604d565b63f92ee8a960e01b5f5260045ffd5b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714612aed57508063248a9ca314612a7d5780632f0e31f414612a425780632f2ff15d146129c75780632f8e6a2d1461298d5780633013ce291461293d57806336568abe146128b55780633f4ba83a146127e55780634152881214611fe557806341dd26f514611e1f5780634c4911c414611cba57806350355d7614611c7f5780635b7baf6414611a955780635c975abb14611a365780636d3b96c3146119ce57806375b238fc146119765780637ab03cf21461193c5780638456cb591461186957806384f15090146117ea57806391d14854146117565780639e63798d1461162b578063a217fddf146115f3578063b4d884f6146114fd578063bf22c45714611269578063c0c53b8b14610ecc578063c9a84bb914610c84578063ce79eb6014610bb6578063d2e13f501461096a578063d547741f146108e8578063d75bbdf31461067d578063dd4ae9d4146104b0578063e138818c1461045f578063e1a4521814610425578063e63ea40814610222578063f9168231146101e75763ff96092a146101a8575f80fd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600154604051908152f35b5f80fd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600754604051908152f35b346101e35760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610259612bcc565b610261612ba9565b73ffffffffffffffffffffffffffffffffffffffff60443592610282612e1e565b61028a613662565b169081158015610407575b6103df5773ffffffffffffffffffffffffffffffffffffffff5f5416808314610309575b50602073ffffffffffffffffffffffffffffffffffffffff826102fe867ff24ef89f38eadc1bde50701ad6e4d6d11a2dc24f7cf834a486991f38833285049587613605565b6040519586521693a3005b6020602491604051928380927f70a082310000000000000000000000000000000000000000000000000000000082523060048301525afa9081156103d4575f916103a2575b506007548082111561039a5761036391612dfe565b808411156102b957837f9529d841000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b50505f610363565b90506020813d6020116103cc575b816103bd60209383612cf9565b810103126101e357518461034e565b3d91506103b0565b6040513d5f823e3d90fd5b7fd92e233d000000000000000000000000000000000000000000000000000000005f5260045ffd5b5073ffffffffffffffffffffffffffffffffffffffff811615610295565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760206040516127108152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b346101e3576104be36612c1d565b9290916104c9613331565b6104d1613384565b6104da826133fb565b60ff815460a01c1660068110156106505761062857600181015465ffffffffffff8160a01c164210156106285773ffffffffffffffffffffffffffffffffffffffff16330361060057827f869e2577b006bf47ee981cf6fec2e25583548081c14b98deab587f77b5068038602073ffffffffffffffffffffffffffffffffffffffff946105b46105da996105886040519a8b9233878501528560408501526060808501526080840191612d8b565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018a5289612cf9565b80600460038701966105ca8b888b8b541661345f565b0155604051908152a2541661357c565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b7f82b42900000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f8e78f0cb000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b346101e35761068b36612c1d565b919290610696613331565b61069e613384565b6106a7826133fb565b9360ff855460a01c166006811015610650576002036106285773ffffffffffffffffffffffffffffffffffffffff6002860154163303610600576107fd837f21d71db5be59bb9fa133895586b7404307dd33fb93b16db09dc6f1d9d7d231b060206105da9861076473ffffffffffffffffffffffffffffffffffffffff976107386040519b8c928a33888601612dc9565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018b528a612cf9565b60038101956107778a868a8a541661345f565b6004820154740300000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8454161783556107c581600754612dfe565b6007558860016127106107d9825485612e0b565b049889936107f86127106107ef60035484612e0b565b04958692612dfe565b612dfe565b9401541696806108a3575b5080610863575b5081610850575b604051908152847f0fd54bd364fa9e67f17b091aefe930932c09fe7651cf5ad02c71a418f3341444843393a3604051908152a3541661357c565b61085e82878a5f5416613605565b610816565b61087181338b5f5416613605565b604051908152857f253dd534010ac976fa263caa123bae79b9c50292adf7ce67bdc5ec309f784e61853393a38b61080f565b867f0e61cfd0ee655641b3ed0a1dd373ec3cacf4c090de1f33708e3a4091f4947662868c60025416936108db818f87905f5416613605565b604051908152a38c610808565b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610968600435610925612ba9565b9061096361095e825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b612ea6565b613229565b005b346101e35761097836612c1d565b61098493919293613331565b61098c613384565b610995826133fb565b93845460ff8160a01c166006811015610650576106285773ffffffffffffffffffffffffffffffffffffffff16330361060057600185015473ffffffffffffffffffffffffffffffffffffffff811615610b8e5760a01c65ffffffffffff16421015610628576004850190815403610b66576105da94610a6f73ffffffffffffffffffffffffffffffffffffffff93610a436040519788923360208501526040808501526060840191612d8b565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101875286612cf9565b6003810191610a8286868686541661345f565b5490740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff825416179055610acd81600754612ccf565b60075580610b0a575b604051908152837fe3fbcc1ea1bdc559ec7f0347efde7655e58b5f45a30b0e4470a583c3ef5496b360203393a3541661357c565b610b61835f5416604051907f23b872dd00000000000000000000000000000000000000000000000000000000602083015233602483015230604483015283606483015260648252610b5c608483612cf9565b61370d565b610ad6565b7f99b0fc87000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fa9456d43000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610bed612bcc565b602435908115158092036101e35773ffffffffffffffffffffffffffffffffffffffff90610c19612e1e565b169081156103df5760207f7ee54953080e392a475a25b6acacb85417ca4e1953293c90934233ca1361251091835f526006825260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8316179055604051908152a2005b346101e35760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435610cbe612ba9565b60443567ffffffffffffffff81116101e357610cde903690600401612bef565b929091610ce9613331565b610cf1613384565b610cfa826133fb565b90815460ff8160a01c1660068110156106505761062857600183019182549165ffffffffffff8360a01c164210156106285773ffffffffffffffffffffffffffffffffffffffff16918233036106005773ffffffffffffffffffffffffffffffffffffffff166106285773ffffffffffffffffffffffffffffffffffffffff169081156103df578114610ea45773ffffffffffffffffffffffffffffffffffffffff6002840154168114610e7c57600373ffffffffffffffffffffffffffffffffffffffff93610e186105da98610dec604051998a923360208501528760408501526060808501526080840191612d8b565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101895288612cf9565b0191610e2886868686541661345f565b817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055837f9a87df076ea1725aba8ba29d32517ce37c9597d88cbf16ec6707892cc330ab695f80a3541661357c565b7fc7b4e9eb000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f332ff0f9000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e35760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610f03612bcc565b610f0b612ba9565b60443573ffffffffffffffffffffffffffffffffffffffff81168082036101e3577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c16159467ffffffffffffffff821680159081611261575b6001149081611257575b15908161124e575b5061122657818660017fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000073ffffffffffffffffffffffffffffffffffffffff9516177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556111d1575b50169081159081156111b2575b81156111a9575b506103df576110bd9273ffffffffffffffffffffffffffffffffffffffff916110216136b6565b6110296136b6565b6110316136b6565b6110396136b6565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00557fffffffffffffffffffffffff00000000000000000000000000000000000000005f5416175f55167fffffffffffffffffffffffff000000000000000000000000000000000000000060025416176002556110b781612f2c565b50613013565b505f805260066020527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561111657005b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b90501585610ffa565b73ffffffffffffffffffffffffffffffffffffffff8516159150610ff3565b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005586610fe6565b7ff92ee8a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b90501587610f7d565b303b159150610f75565b879150610f6b565b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357606060e06040516112a881612cdc565b5f81525f60208201525f60408201525f838201525f60808201525f60a08201525f60c082015201526004355f52600460205260405f20604051906112eb82612cdc565b60ff815473ffffffffffffffffffffffffffffffffffffffff8116845260a01c169060208301916006811015610650578252600181015491604084019173ffffffffffffffffffffffffffffffffffffffff8416835265ffffffffffff606086019460a01c16845273ffffffffffffffffffffffffffffffffffffffff600282015416936080860194855273ffffffffffffffffffffffffffffffffffffffff60038301541660a08701908152600560048401549360c08901948552019360405194855f8254926113bb84612d3a565b80845293600181169081156114bd5750600114611479575b506113e092500386612cf9565b60e0880194855273ffffffffffffffffffffffffffffffffffffffff6040519860208a525116602089015251600681101561065057879665ffffffffffff73ffffffffffffffffffffffffffffffffffffffff948561147599819560408d0152511660608b015251166080890152511660a0870152511660c08501525160e08401525161010080840152610120830190612c72565b0390f35b90505f9291925260205f20905f915b8183106114a15750509060206113e0928201018b6113d3565b6020919350806001915483858c01015201910190918792611488565b602093506113e09592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201018b6113d3565b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760043573ffffffffffffffffffffffffffffffffffffffff61154c612ba9565b611554612e1e565b169081156103df5761271061156b60035483612ccf565b116115cb576020817ff0c09f5238364083d828870e877edaebb364d9f19f4093fdbf24e486bbdca48492600155837fffffffffffffffffffffffff00000000000000000000000000000000000000006002541617600255604051908152a2005b7fc9034e18000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760206040515f8152f35b346101e35761163936612c1d565b919290611644613331565b61164c613384565b611655826133fb565b60ff815460a01c1660068110156106505760010361062857600181015465ffffffffffff8160a01c164210156106285773ffffffffffffffffffffffffffffffffffffffff163303610600576105da946116d273ffffffffffffffffffffffffffffffffffffffff93610a43604051978892853360208601612dc9565b60038201916116e586868686541661345f565b740200000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff825416179055604051908152837f80c17db79857f338a6a6df68a6883ecc0ce78e2202fe61ed979733573f40538e60203393a3541661357c565b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761178d612ba9565b6004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435611824612e1e565b61271061183360015483612ccf565b116115cb576020817f24fe03678743d8fe5f3d39d760da9fc7a5f3feea46847d91688ba8ef9e400d1492600355604051908152a1005b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761189f612e1e565b6118a7613331565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416177fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602060405161012c8152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760206040517fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35773ffffffffffffffffffffffffffffffffffffffff611a1a612bcc565b165f526006602052602060ff60405f2054166040519015158152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602060ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054166040519015158152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435611acf613384565b611ad8816133fb565b60ff815460a01c166006811015908161065057801515918280611c72575b8181611c61575b506106285761065057600203611c225765ffffffffffff600183015460a01c16610e108101809111611bf5574210611bcd575b740500000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff835416178255611bbd575b507f97237956f8810192811e2c3f273fd02c5d6295206fdd9c62e6fe2bfc19ba92325f80a260017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b611bc79082613505565b81611b72565b7f478f84e7000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b65ffffffffffff600183015460a01c16421015611b30577f8e78f0cb000000000000000000000000000000000000000000000000000000005f5260045ffd5b905061065057600282141581611afd565b50505f6001821415611af6565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600554604051908152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760043567ffffffffffffffff81116101e357366023820112156101e357806004013567ffffffffffffffff81116101e3573660248260051b840101116101e357611d31612e1e565b600554915f5b828110156109685760248160051b830101359081158015611e16575b611dee57816001925f52600460205273ffffffffffffffffffffffffffffffffffffffff600360405f20015416908115611de757805f526004602052600360405f20017fffffffffffffffffffffffff000000000000000000000000000000000000000081541690557fcde6a24b3e1e5d23bc4d45609905c64b3516b23478ba2f7fdada3ab2bae3812d5f80a35b01611d37565b5050611de1565b7f71c8f460000000000000000000000000000000000000000000000000000000005f5260045ffd5b50848211611d53565b346101e357611e2d36612c1d565b919290611e38613331565b611e40613384565b611e49826133fb565b9384549060ff8260a01c169260068410159283610650578415948515611f97575073ffffffffffffffffffffffffffffffffffffffff1633141580611f73575b61060057611ea6905b610a43604051978892853360208601612dc9565b6003860191611ecd868673ffffffffffffffffffffffffffffffffffffffff86541661345f565b740400000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff885416178755610650576105da9573ffffffffffffffffffffffffffffffffffffffff9315611f63575b50604051908152837fae7362b1af91f4492868987b9c73990d780060811551b58728fbe96fd1bab27560203393a3541661357c565b611f6d9085613505565b86611f2e565b5073ffffffffffffffffffffffffffffffffffffffff600188015416331415611e89565b5f94506001811491508115611fd7575b50156106285773ffffffffffffffffffffffffffffffffffffffff600288015416330361060057611ea690611e92565b93505060025f931488611fa7565b346101e35760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761201c612bcc565b612024612ba9565b60443560643567ffffffffffffffff81116101e357612047903690600401612bef565b9390926084359273ffffffffffffffffffffffffffffffffffffffff8416918285036101e35773ffffffffffffffffffffffffffffffffffffffff9061208b613331565b612093613384565b169283156103df5761012c4201804211611bf55782118015906127d6575b6127ae5773ffffffffffffffffffffffffffffffffffffffff1693338514610ea457841515806127a5575b610e7c57825f52600660205260ff60405f2054161561277d5782151590816125a4575b5061257c576005547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611bf557600101948560055560405161214281612cdc565b33815287602082015f81526040830193888552606084019165ffffffffffff87168352608085019089825260a086019289845267ffffffffffffffff60c08801965f88521161254f578d906040519e8f6121c460207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160182612cf9565b5236828201116101e357818f5f936020938483013701015260e086019c8d528b5f52600460205273ffffffffffffffffffffffffffffffffffffffff8060405f20975116167fffffffffffffffffffffffff0000000000000000000000000000000000000000875416178655519060068210156106505760059673ffffffffffffffffffffffffffffffffffffffff9485937fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff00000000000000000000000000000000000000008a549260a01b169116178855838060018a01935116167fffffffffffffffffffffffff0000000000000000000000000000000000000000835416178255517fffffffffffff000000000000ffffffffffffffffffffffffffffffffffffffff79ffffffffffff000000000000000000000000000000000000000083549260a01b1691161790555116826002860191167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055511673ffffffffffffffffffffffffffffffffffffffff6003840191167fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905551600482015501955195865167ffffffffffffffff811161254f576123ac8254612d3a565b601f811161250a575b50806020988990601f831160011461246d575f92612462575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790555b604051928352858301526040820152827fb0f0239bfdd96453e24733e18bfc24b70d8fadf123dd977473518dd577ee79b960603393a460017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055604051908152f35b0151905089806123ce565b5f858152828120937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905b8181106124f357509084600195949392106124bc575b505050811b019055612400565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558980806124af565b92938c600181928786015181550195019301612499565b825f5260205f20601f830160051c81019160208410612545575b601f0160051c01905b81811061253a57506123b5565b5f815560010161252d565b9091508190612524565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f9c9d8823000000000000000000000000000000000000000000000000000000005f5260045ffd5b905060205f604051828101907f01ffc9a70000000000000000000000000000000000000000000000000000000082527f01ffc9a700000000000000000000000000000000000000000000000000000000602482015260248152612608604482612cf9565b519084617530fa903d5f519083612771575b5082612767575b50816126ce575b81612636575b5015876120ff565b602091505f90604051838101907f01ffc9a70000000000000000000000000000000000000000000000000000000082527f7ff6bc9e0000000000000000000000000000000000000000000000000000000060248201526024815261269b604482612cf9565b5191617530fa5f513d826126c2575b50816126b8575b508761262e565b90501515876126b1565b602011159150886126aa565b905060205f604051828101907f01ffc9a70000000000000000000000000000000000000000000000000000000082527fffffffff00000000000000000000000000000000000000000000000000000000602482015260248152612732604482612cf9565b519084617530fa5f513d8261275b575b5081612751575b501590612628565b9050151588612749565b60201115915089612742565b1515915088612621565b6020111592508961261a565b7fa04b28ec000000000000000000000000000000000000000000000000000000005f5260045ffd5b508385146120dc565b7ff7a0748c000000000000000000000000000000000000000000000000000000005f5260045ffd5b5065ffffffffffff82116120b1565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761281b612e1e565b612823613662565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054167fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576128ec612ba9565b3373ffffffffffffffffffffffffffffffffffffffff8216036129155761096890600435613229565b7f6697b232000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020604051610e108152f35b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610968600435612a04612ba9565b90612a3d61095e825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b613117565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600354604051908152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020612ae56004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b604051908152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036101e357817f7965db0b0000000000000000000000000000000000000000000000000000000060209314908115612b7f575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483612b78565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036101e357565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036101e357565b9181601f840112156101e35782359167ffffffffffffffff83116101e357602083818601950101116101e357565b60607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126101e35760043591602435916044359067ffffffffffffffff82116101e357612c6e91600401612bef565b9091565b91908251928382525f5b848110612cba5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b80602080928401015182828601015201612c7c565b91908201809211611bf557565b610100810190811067ffffffffffffffff82111761254f57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761254f57604052565b90600182811c92168015612d81575b6020831014612d5457565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691612d49565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b612dfb949273ffffffffffffffffffffffffffffffffffffffff60609316825260208201528160408201520191612d8b565b90565b91908203918211611bf557565b81810292918115918404141715611bf557565b335f9081527fb16e88c42fd4e48df2dd6a2eabd6bc9aec654ec170056b470819f8892cc6431c602052604090205460ff1615612e5657565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004527fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177560245260445ffd5b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f20541615612efd5750565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b73ffffffffffffffffffffffffffffffffffffffff81165f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff1661300e5773ffffffffffffffffffffffffffffffffffffffff165f8181527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505f90565b73ffffffffffffffffffffffffffffffffffffffff81165f9081527fb16e88c42fd4e48df2dd6a2eabd6bc9aec654ec170056b470819f8892cc6431c602052604090205460ff1661300e5773ffffffffffffffffffffffffffffffffffffffff165f8181527fb16e88c42fd4e48df2dd6a2eabd6bc9aec654ec170056b470819f8892cc6431c6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f205416155f1461322357805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f2054165f1461322357805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300541661335c57565b7fd93c0665000000000000000000000000000000000000000000000000000000005f5260045ffd5b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0054146133d35760027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b80158015613416575b611dee575f52600460205260405f2090565b506005548111613404565b7fffffffff00000000000000000000000000000000000000000000000000000000612dfb949360609383521660208201528160408201520190612c72565b73ffffffffffffffffffffffffffffffffffffffff16918261348057505050565b823b156101e3576134e8925f92836040518096819582947fdc08fb1d0000000000000000000000000000000000000000000000000000000084527fffffffff000000000000000000000000000000000000000000000000000000008535169060048501613421565b03925af180156103d4576134f95750565b5f61350391612cf9565b565b600482015491821561357757602073ffffffffffffffffffffffffffffffffffffffff7f7ca5472b7ea78c2c0141c5a12ee6d170cf4ce8ed06be3d22c8252ddfc7a6a2c49261355686600754612dfe565b60075561356b86835f54168484541690613605565b541693604051908152a3565b505050565b73ffffffffffffffffffffffffffffffffffffffff16918261359d57505050565b823b156101e3576134e8925f92836040518096819582947fa3fe47830000000000000000000000000000000000000000000000000000000084527fffffffff000000000000000000000000000000000000000000000000000000008535169060048501613421565b6135039273ffffffffffffffffffffffffffffffffffffffff604051937fa9059cbb000000000000000000000000000000000000000000000000000000006020860152166024840152604483015260448252610b5c606483612cf9565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054161561368e57565b7f8dfc202b000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156136e557565b7fd7e6bcf8000000000000000000000000000000000000000000000000000000005f5260045ffd5b905f602091828151910182855af1156103d4575f513d61378b575073ffffffffffffffffffffffffffffffffffffffff81163b155b6137495750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b6001141561374256fea26469706673582212206c80219f5022a102b78e2b3cea53bc36a61bd9d0874a3d24319381fbeaeb022a64736f6c634300081a0033608080604052346104ca57608081614c41803803809161001f8285610d0a565b8339810103126104ca578051906001600160a01b03821682036104ca5760208101516001600160a01b038116908190036104ca57600161006d606061006660408601610d41565b9401610d41565b938160ff19600c541617600c55601f54906101008360a81b039060081b1690828060a81b0319161717601f5560018060a01b0319602054161760205560018060a01b031660018060a01b0319602154161760215560018060a01b031660018060a01b031960225416176022555f5b60038110156105d35760405163348051d760e11b8152600481018290525f816024815f80516020614c218339815191525afa9081156104d6575f916105b9575b50604051906101566021836020810193606360f81b85526101458151809260208686019101610d79565b81010301601f198101845283610d0a565b60405160208101906101826020828651610171818789610d79565b81010301601f198101835282610d0a565b519020916040519263ffa1864960e01b845260048401526020836024815f80516020614c218339815191525afa9283156104d6575f9361057e575b505f80516020614c218339815191523b156104ca5761021260645f9260405194859384926318caf8e360e31b845260018060a01b03891660048501526040602485015251809281604486015285850190610d79565b601f01601f19168101030181835f80516020614c218339815191525af180156104d65761056e575b506023820180546001600160a01b0319166001600160a01b0390921691909117815560405163348051d760e11b8152600481018390525f816024815f80516020614c218339815191525afa9081156104d6575f9161054c575b50604051906102bd6021836020810193600760fc1b85526101458151809260208686019101610d79565b60405160208101906102d86020828651610171818789610d79565b519020916040519263ffa1864960e01b845260048401526020836024815f80516020614c218339815191525afa9283156104d6575f93610511575b505f80516020614c218339815191523b156104ca5761036860645f9260405194859384926318caf8e360e31b845260018060a01b03891660048501526040602485015251809281604486015285850190610d79565b601f01601f19168101030181835f80516020614c218339815191525af180156104d657610501575b506026830180546001600160a01b0319166001600160a01b0392831617905560205482549082169116813b156104ca575f916044839260405194859384926340c10f1960e01b8452600484015264e8d4a5100060248401525af180156104d6576104f1575b50546001600160a01b03165f80516020614c218339815191523b156104ca576040519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af180156104d6576104e1575b5060208054601f5460405163095ea7b360e01b81526001600160a01b0360089290921c821660048201525f1960248201529291839160449183915f91165af180156104d65761049b575b506001016100db565b6020813d82116104ce575b816104b360209383610d0a565b810103126104ca5751801515036104ca575f610492565b5f80fd5b3d91506104a6565b6040513d5f823e3d90fd5b5f6104eb91610d0a565b5f610448565b5f6104fb91610d0a565b5f6103f5565b5f61050b91610d0a565b5f610390565b9092506020813d8211610544575b8161052c60209383610d0a565b810103126104ca5761053d90610d41565b915f610313565b3d915061051f565b61056891503d805f833e6105608183610d0a565b810190610d9a565b5f610293565b5f61057891610d0a565b5f61023a565b9092506020813d82116105b1575b8161059960209383610d0a565b810103126104ca576105aa90610d41565b915f6101bd565b3d915061058c565b6105cd91503d805f833e6105608183610d0a565b5f61011b565b604080516105e18282610d0a565b600281526020810161065360f41b8152825160208101906106028284610d55565b60028152610611602282610d0a565b51902083519063ffa1864960e01b825260048201526020816024815f80516020614c218339815191525afa908115610c4f575f91610cd0575b505f80516020614c218339815191523b156104ca5761069e60645f92865194859384926318caf8e360e31b845260018060a01b03169788600485015289602485015251809281604486015285850190610d79565b601f01601f19168101030181835f80516020614c218339815191525af18015610ab157610cc0575b50602980546001600160a01b03191691909117905580516106e78282610d0a565b600281526020810161653160f01b8152825160208101906107088284610d55565b60028152610717602282610d0a565b51902083519063ffa1864960e01b825260048201526020816024815f80516020614c218339815191525afa908115610c4f575f91610c86575b505f80516020614c218339815191523b156104ca576107a460645f92865194859384926318caf8e360e31b845260018060a01b03169788600485015289602485015251809281604486015285850190610d79565b601f01601f19168101030181835f80516020614c218339815191525af18015610ab157610c76575b5060018060a01b0319602a541617602a5562278d00420190814211610bf857905f915b6003831015610c69576023830180549093906001600160a01b03165f80516020614c218339815191523b156104ca5782519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af18015610ab157610c59575b5060018060a01b03601f5460081c16938160260190602060018060a01b0383541660e460018060a01b0360295416915f88519a8b9485936320a9440960e11b8552600485015260248401528a604484015260a06064840152600460a4840152631cd9595960e21b60c48401528160848401525af1958615610c4f575f96610c1c575b5081545f91906001600160a01b03165f80516020614c218339815191523b156104ca5785519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af18015610bd457610c0c575b50601f54600185019060081c6001600160a01b0316818611610bf85781620f42400291620f4240830403610bf857803b156104ca578651633752ba7560e21b8152600481018a905260248101839052606060448201525f6064820181905290918290608490829084905af18015610bee57610bde575b50875f52602b602052855f2060ff1981541690556001851015610adf575b5050600283146109d4575b505060010192506107ef565b610acb57546001600160a01b03165f80516020614c218339815191523b156104ca5782519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af18015610ab157610abb575b50601f5460081c6001600160a01b031693843b156104ca575f80956084855180988193639e63798d60e01b8352866004840152816024840152606060448401528160648401525af1948515610ab1576001939495610aa1575b505f52602b602052825f20600260ff19825416179055839291856109c8565b5f610aab91610d0a565b85610a82565b83513d5f823e3d90fd5b5f610ac591610d0a565b84610a29565b634e487b7160e01b5f52603260045260245ffd5b90545f92506001600160a01b03165f80516020614c218339815191523b156104ca5785519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af18015610bd457610bc4575b50601f5460081c6001600160a01b0316803b156104ca578551630d2e13f560e41b8152600481018990526024810192909252606060448301525f60648301819052908290608490829084905af18015610bba57610baa575b50855f52602b602052835f20600160ff1982541617905586806109bd565b5f610bb491610d0a565b86610b8c565b85513d5f823e3d90fd5b5f610bce91610d0a565b87610b34565b86513d5f823e3d90fd5b5f610be891610d0a565b8861099f565b87513d5f823e3d90fd5b634e487b7160e01b5f52601160045260245ffd5b5f610c1691610d0a565b87610929565b9095506020813d8211610c47575b81610c3760209383610d0a565b810103126104ca575194866108d3565b3d9150610c2a565b84513d5f823e3d90fd5b5f610c6391610d0a565b84610851565b51613e169081610e0b8239f35b5f610c8091610d0a565b826107cc565b90506020813d602011610cb8575b81610ca160209383610d0a565b810103126104ca57610cb290610d41565b84610750565b3d9150610c94565b5f610cca91610d0a565b826106c6565b90506020813d602011610d02575b81610ceb60209383610d0a565b810103126104ca57610cfc90610d41565b8461064a565b3d9150610cde565b601f909101601f19168101906001600160401b03821190821017610d2d57604052565b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036104ca57565b5f5b60028110610d6957505060025f910152565b8181015183820152602001610d57565b5f5b838110610d8a5750505f910152565b8181015183820152602001610d7b565b6020818303126104ca578051906001600160401b0382116104ca570181601f820112156104ca5780516001600160401b038111610d2d5760405192610de9601f8301601f191660200185610d0a565b818452602082840101116104ca57610e079160208085019101610d79565b9056fe6080806040526004361015610012575f80fd5b5f905f3560e01c90816305e3769c1461191c57508063087320b2146118025780630b78f9c0146111ce5780631ed7831c146111255780632ade388014610f685780633e5e3c2314610ebf5780633f7286f414610e16578063531c7faa14610dfe57806359e1361914610dc25780635b7baf6414610d8757806366d9a9a014610c2c578063725cc2e114610c145780637f974c6f14610bd857806381ede1bb14610bc05780638253f2d91461080d57806385226c811461075d578063916a17c6146106885780639675dc1714610670578063b0464fdc1461059b578063b5508aa9146104eb578063b5c0922c146104a0578063ba414fa61461045d578063d130382514610445578063e20c9f711461038c578063e5d6bf02146101f1578063e662e387146101b0578063fa7626d41461016f5763fd61a25614610152575f80fd5b3461016c5761016961016336611c67565b91612d94565b80f35b80fd5b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57602060ff601f54166040519015158152f35b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57602060ff602f54166040519015158152f35b503461016c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57806102336202a3006001600435613b7d565b6102fb604091838084516102478682611a0b565b600c81527f426f756e6420726573756c740000000000000000000000000000000000000000602082015285516102e4816102b260208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528a60248401526064830190611b2b565b876044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50426128c2565b90737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610388578051917fe5d6bf020000000000000000000000000000000000000000000000000000000083526004830152828260248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af190811561037f575061036e5750f35b8161037891611a0b565b61016c5780f35b513d84823e3d90fd5b5050fd5b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601554928381520191601582527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475915b818110610419576104158561040981870382611a0b565b60405191829182611ba2565b0390f35b825473ffffffffffffffffffffffffffffffffffffffff168452602090930192600192830192016103f2565b503461016c5761016961045736611c67565b91612b77565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576020610496612a9e565b6040519015158152f35b503461016c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760ff60406020926004358152602b8452205416604051908152f35b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760195461052681611db7565b916105346040519384611a0b565b818352601981527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c9695602084015b83831061057e576040516020808252819061041590820188611bf1565b60016020819261058d85611a4c565b815201920192019190610561565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601c546105d681611db7565b916105e46040519384611a0b565b818352601c81527f0e4562a10381dec21b205ed72637e6b1b523bdd0e4d4d50af5cd23dd4500a211602084015b83831061062657604051806104158782611d06565b60026020600192604051610639816119a5565b73ffffffffffffffffffffffffffffffffffffffff865416815261065e8587016121fe565b83820152815201920192019190610611565b503461016c5761016961068236611b6e565b906128cf565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601d546106c381611db7565b916106d16040519384611a0b565b818352601d81527f6d4407e7be21f808e6509aa9fa9143369579dd7d760fe20a2c09680fc146134f602084015b83831061071357604051806104158782611d06565b60026020600192604051610726816119a5565b73ffffffffffffffffffffffffffffffffffffffff865416815261074b8587016121fe565b838201528152019201920191906106fe565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601a5461079881611db7565b916107a66040519384611a0b565b818352601a81527f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e602084015b8383106107f0576040516020808252819061041590820188611bf1565b6001602081926107ff85611a4c565b8152019201920191906107d3565b503461016c5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576084358015158103610bbc5760a4358015158103610bb8576003600435066003811015610b85576023015473ffffffffffffffffffffffffffffffffffffffff169115610bb2576003602435066003811015610b85576026015473ffffffffffffffffffffffffffffffffffffffff165b6001604435166002811015610b585773ffffffffffffffffffffffffffffffffffffffff85916029015416926108ec62278d00610168606435613b7d565b9060409583808861096b61099d82516109058482611a0b565b600c81527f426f756e6420726573756c7400000000000000000000000000000000000000006020820152835192839160208301957fb60e72cc00000000000000000000000000000000000000000000000000000000875260248401526064830190611b2b565b896044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b4a578651907fca669fa70000000000000000000000000000000000000000000000000000000082526004820152838160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af18015610b4e57610b2e575b509273ffffffffffffffffffffffffffffffffffffffff9260c49284602096610a4d82601f5460081c1693426128c2565b9015610b27578160225416905b8a51998a9889977f415288120000000000000000000000000000000000000000000000000000000089521660048801526024870152604486015260a060648601528360a48601521660848401525af1839181610aef575b50610aba578280f35b8252602b60205281207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690555f808280f35b9091506020813d602011610b1f575b81610b0b60209383611a0b565b81010312610b1b5751905f610ab1565b5f80fd5b3d9150610afe565b8390610a5a565b92610b3d818096939495611a0b565b610b4a579291905f610a1c565b8380fd5b87513d86823e3d90fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b826108ae565b8280fd5b5080fd5b503461016c57610169610bd236611c67565b91612678565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576020602c54604051908152f35b503461016c57610169610c2636611b6e565b906124d9565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601b54610c6781611db7565b610c746040519182611a0b565b818152601b83526020810191837f3ad8aa4f87544323a9d1e5dd902f40c356527a7955687113db5f9a85ad579dc1845b838310610d4c57868587604051928392602084019060208552518091526040840160408260051b8601019392905b828210610ce157505050500390f35b91936020610d3c827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0600195979984950301865288519083610d2c8351604084526040840190611b2b565b9201519084818403910152611cb1565b9601920192018594939192610cd2565b60026020600192604051610d5f816119a5565b610d6886611a4c565b8152610d758587016121fe565b83820152815201920192019190610ca4565b503461016c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57610169600435612106565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576020602e54604051908152f35b503461016c57610169610e1036611c67565b91611dfc565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601754928381520191601782527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c15915b818110610e93576104158561040981870382611a0b565b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201610e7c565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601854928381520191601882527fb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2e915b818110610f3c576104158561040981870382611a0b565b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201610f25565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601e54610fa381611db7565b610fb06040519182611a0b565b818152601e83526020810191837f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e350845b83831061108f57868587604051928392602084019060208552518091526040840160408260051b8601019392905b82821061101d57505050500390f35b9193602061107f827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186526040838a5173ffffffffffffffffffffffffffffffffffffffff815116845201519181858201520190611bf1565b960192019201859493919261100e565b60405161109b816119a5565b73ffffffffffffffffffffffffffffffffffffffff83541681526001830180546110c481611db7565b916110d26040519384611a0b565b8183528a526020808b20908b9084015b838210611108575050505060019282602092836002950152815201920192019190610fe0565b60016020819261111786611a4c565b8152019301910190916110e2565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601654928381520191601682527fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b5124289915b8181106111a2576104158561040981870382611a0b565b825473ffffffffffffffffffffffffffffffffffffffff1684526020909301926001928301920161118b565b5034610b1b575f906111ec6127106111e536611b6e565b9490613b7d565b916040905f8083516111fe8582611a0b565b600c81527f426f756e6420726573756c7400000000000000000000000000000000000000006020820152845161129b8161126960208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528960248401526064830190611b2b565b8a6044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50836127100361271081116117d5575f6112c492613b7d565b5f8083516112d28582611a0b565b600c81527f426f756e6420726573756c7400000000000000000000000000000000000000006020820152845161133d816102b260208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528960248401526064830190611b2b565b51906a636f6e736f6c652e6c6f675afa5073ffffffffffffffffffffffffffffffffffffffff60215416737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b578251907f06447d5600000000000000000000000000000000000000000000000000000000825260048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af180156117cb576117b6575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610b4a5783809160248551809481937f84f150900000000000000000000000000000000000000000000000000000000083528160048401525af1801561171e579084916117a1575b505073ffffffffffffffffffffffffffffffffffffffff601f5460081c168251946114688487611a0b565b600886527f747265617375727900000000000000000000000000000000000000000000000060208701528351855b6008811061178c5750958686602881990152600881526114b7602882611a0b565b602081519101208551907fffa186490000000000000000000000000000000000000000000000000000000082526004820152602081602481737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa908115611744578791611752575b50737109709ecfa91a80626ff3989d68f67f5b1dd12d3b1561174e578673ffffffffffffffffffffffffffffffffffffffff61158c92885193849283927fc657c71800000000000000000000000000000000000000000000000000000000845216958660048401528a60248401526044830190611b2b565b038183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af180156117445790879161172f575b5050823b1561172b576044869283875195869485937fb4d884f6000000000000000000000000000000000000000000000000000000008552600485015260248401525af1801561171e57908491611709575b505073ffffffffffffffffffffffffffffffffffffffff601f5460081c1690813b1561170457839160248392855194859384927f84f1509000000000000000000000000000000000000000000000000000000000845260048401525af180156116f8579083916116e3575b5050737109709ecfa91a80626ff3989d68f67f5b1dd12d3b156116e0578051907f90c5013b000000000000000000000000000000000000000000000000000000008252828260048183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af190811561037f575061036e5750f35b50fd5b816116ed91611a0b565b6116e057815f611671565b505051903d90823e3d90fd5b505050fd5b8161171391611a0b565b61038857825f611606565b50505051903d90823e3d90fd5b8580fd5b8161173991611a0b565b61172b57855f6115b4565b86513d89823e3d90fd5b8680fd5b90506020813d602011611784575b8161176d60209383611a0b565b8101031261174e5761177e906130cc565b5f611514565b3d9150611760565b80602080928a01015182828501015201611496565b816117ab91611a0b565b610bb857825f61143d565b6117c39193505f90611a0b565b5f915f6113d5565b83513d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b34610b1b575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610b1b576040515f60305461184081611954565b80845290600181169081156118da575060011461187c575b6104158361186881850382611a0b565b604051918291602083526020830190611b2b565b60305f9081527f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb939250905b8082106118c057509091508101602001611868611858565b9192600181602092548385880101520191019092916118a8565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208086019190915291151560051b840190910191506118689050611858565b34610b1b575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610b1b57602090602d548152f35b90600182811c9216801561199b575b602083101461196e57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691611963565b6040810190811067ffffffffffffffff8211176119c157604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610100810190811067ffffffffffffffff8211176119c157604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176119c157604052565b9060405191825f825492611a5f84611954565b8084529360018116908115611aca5750600114611a86575b50611a8492500383611a0b565b565b90505f9291925260205f20905f915b818310611aae575050906020611a84928201015f611a77565b6020919350806001915483858901015201910190918492611a95565b60209350611a849592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f611a77565b5f5b838110611b1b5750505f910152565b8181015183820152602001611b0c565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093611b6781518092818752878088019101611b0a565b0116010190565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6040910112610b1b576004359060243590565b60206040818301928281528451809452019201905f5b818110611bc55750505090565b825173ffffffffffffffffffffffffffffffffffffffff16845260209384019390920191600101611bb8565b9080602083519182815201916020808360051b8301019401925f915b838310611c1c57505050505090565b9091929394602080611c58837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe086600196030187528951611b2b565b97019301930191939290611c0d565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6060910112610b1b57600435906024358015158103610b1b57906044358015158103610b1b5790565b90602080835192838152019201905f5b818110611cce5750505090565b82517fffffffff0000000000000000000000000000000000000000000000000000000016845260209384019390920191600101611cc1565b602081016020825282518091526040820191602060408360051b8301019401925f915b838310611d3857505050505090565b9091929394602080611d9b837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187526040838b5173ffffffffffffffffffffffffffffffffffffffff815116845201519181858201520190611cb1565b97019301930191939290611d29565b919082039182116117d557565b67ffffffffffffffff81116119c15760051b60200190565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146117d55760010190565b90919082806120fd575b5f93156120ec57611e15613090565b50611e1f8261387b565b9281156120d7575b5091905b82156120d05783156120a1575060208101519060068210156120745773ffffffffffffffffffffffffffffffffffffffff9161206a5760800151165b925b815f52602b60205260ff60405f20541693737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f5761204c575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610bbc57818080926084604051809581937f41dd26f5000000000000000000000000000000000000000000000000000000008352896004840152816024840152606060448401528160648401525af19182612037575b5050611f82575b50505050565b611f9192611fca575b50613550565b60018114908115611fbf575b50611fac575b5f808080611f7c565b611fb7602e54611dcf565b602e55611fa3565b60029150145f611f9d565b50612031604051611fdc606082611a0b565b602181527f72656a6563742073756363656564656420776974682077726f6e67206163746f60208201527f7200000000000000000000000000000000000000000000000000000000000000604082015261333e565b5f611f8b565b8161204191611a0b565b610bbc57815f611f75565b61205891505f90611a0b565b5f80611eff565b6040513d5f823e3d90fd5b6040015116611e67565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b73ffffffffffffffffffffffffffffffffffffffff9190156120c95760800151165b92611e69565b51166120c3565b5050505050565b90506120e49192506139fc565b91905f611e27565b906120f690613225565b9091611e2b565b82159350611e06565b61210e613090565b506121188161387b565b509081156121ed575b5080156121ea57805f52602b60205260ff60405f2054169073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610b1b575f80916024604051809481937f5b7baf640000000000000000000000000000000000000000000000000000000083528760048401525af190816121da575b506121a3575050565b6121ac90613550565b600181149081156121cf575b506121bf57565b6121ca602e54611dcf565b602e55565b60029150145f6121b8565b5f6121e491611a0b565b5f61219a565b50565b6121f791506139fc565b505f612121565b90604051918281549182825260208201905f5260205f20925f905b80600783011061241557611a849454918181106123df575b8181106123a9575b818110612373575b81811061233d575b818110612307575b8181106122d1575b81811061229c575b1061226f575b500383611a0b565b7fffffffff000000000000000000000000000000000000000000000000000000001681526020015f612267565b9260206001917fffffffff0000000000000000000000000000000000000000000000000000000085831b168152019301612261565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560401b168152019301612259565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560601b168152019301612251565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560801b168152019301612249565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560a01b168152019301612241565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560c01b168152019301612239565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560e01b168152019301612231565b9160089193506101006001917fffffffff000000000000000000000000000000000000000000000000000000008754818160e01b168352818160c01b166020840152818160a01b166040840152818160801b166060840152818160601b166080840152818160401b1660a0840152818160201b1660c08401521660e0820152019401920185929391612219565b81156124ac570690565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b6124e290613225565b90915f918315611f7c575173ffffffffffffffffffffffffffffffffffffffff16737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b57604051907fca669fa700000000000000000000000000000000000000000000000000000000825260048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612663575b50600373ffffffffffffffffffffffffffffffffffffffff601f5460081c1691066003811015612636576026015473ffffffffffffffffffffffffffffffffffffffff16813b15610bb85782916084839260405195869384927fc9a84bb90000000000000000000000000000000000000000000000000000000084528960048501526024840152606060448401528160648401525af19182612621575b50506126185750565b611a8490613550565b61262c828092611a0b565b61016c578061260f565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6126709192505f90611a0b565b5f905f612572565b5f91156128b15761268890613225565b9190915b8215611f7c57838015612899575b1561287c5773ffffffffffffffffffffffffffffffffffffffff6040820151165b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612867575b5060c073ffffffffffffffffffffffffffffffffffffffff601f5460081c16910151813b15610bb8576040517fd2e13f50000000000000000000000000000000000000000000000000000000008152600481018590526024810191909152606060448201525f606482015290829081908390608490829084905af19182612852575b50506127cd57505050565b6127db926127eb5750613550565b6127e6602c54611dcf565b602c55565b506120316040516127fd606082611a0b565b602681527f66756e642073756363656564656420776974682077726f6e672073746174757360208201527f2f6163746f720000000000000000000000000000000000000000000000000000604082015261333e565b8161285c91611a0b565b610bbc57815f6127c2565b6128749192505f90611a0b565b5f905f612740565b73ffffffffffffffffffffffffffffffffffffffff8151166126bb565b9350602081015160068110156120745715159361269a565b6128ba906136e4565b91909161268c565b919082018092116117d557565b6128d890613225565b5f929192918315611f7c57633b9aca005f6128f292613b7d565b73ffffffffffffffffffffffffffffffffffffffff604080935f8083516129198582611a0b565b600c81527f426f756e6420726573756c740000000000000000000000000000000000000000602082015284516129848161126960208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528960248401526064830190611b2b565b51906a636f6e736f6c652e6c6f675afa50015116737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b578251907fca669fa700000000000000000000000000000000000000000000000000000000825260048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af180156117cb57612a89575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c1691823b15610b4a57517fdd4ae9d4000000000000000000000000000000000000000000000000000000008152600481018590526024810191909152606060448201525f6064820152919081908390608490829084905af191826126215750506126185750565b612a969193505f90611a0b565b5f915f612a06565b60085460ff168015612aad5790565b506040517f667f9d70000000000000000000000000000000000000000000000000000000008152737109709ecfa91a80626ff3989d68f67f5b1dd12d60048201527f6661696c656400000000000000000000000000000000000000000000000000006024820152602081604481737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa90811561205f575f91612b45575b50151590565b90506020813d602011612b6f575b81612b6060209383611a0b565b81010312610b1b57515f612b3f565b3d9150612b53565b5f9115612d8357612b8790613225565b9190915b8215611f7c57838015612d65575b73ffffffffffffffffffffffffffffffffffffffff919015612d5b5751165b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612d48575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610bbc57818080926084604051809581937f9e63798d000000000000000000000000000000000000000000000000000000008352896004840152816024840152606060448401528160648401525af19182612d33575b5050612cbe57505050565b611a8492612ccc5750613550565b50612031604051612cde606082611a0b565b602881527f7375626d69742073756363656564656420776974682077726f6e67207374617460208201527f75732f6163746f72000000000000000000000000000000000000000000000000604082015261333e565b81612d3d91611a0b565b610bbc57815f612cb3565b612d5491505f90611a0b565b5f80612c3d565b6040015116612bb8565b93506020810151906006821015612074576001919091141593612b99565b612d8c9061387b565b919091612b8b565b5f9115612fb057612da490613225565b9190915b8215611f7c57838015612f92575b73ffffffffffffffffffffffffffffffffffffffff919015612f885751165b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612f75575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610bbc57818080926084604051809581937fd75bbdf3000000000000000000000000000000000000000000000000000000008352896004840152816024840152606060448401528160648401525af19182612f60575b5050612edb57505050565b612ee992612ef95750613550565b612ef4602d54611dcf565b602d55565b50612031604051612f0b606082611a0b565b602a81527f636f6d706c6574652073756363656564656420776974682077726f6e6720737460208201527f617475732f6163746f7200000000000000000000000000000000000000000000604082015261333e565b81612f6a91611a0b565b610bbc57815f612ed0565b612f8191505f90611a0b565b5f80612e5a565b6080015116612dd5565b93506020810151906006821015612074576002919091141593612db6565b612fb9906139fc565b919091612da8565b906001612fcd92613b7d565b905f80604051612fde604082611a0b565b600c81527f426f756e6420726573756c740000000000000000000000000000000000000000602082015260405161307d8161304b60208201947fb60e72cc000000000000000000000000000000000000000000000000000000008652604060248401526064830190611b2b565b886044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50565b6040519061309d826119ee565b606060e0835f81525f60208201525f60408201525f838201525f60808201525f60a08201525f60c08201520152565b519073ffffffffffffffffffffffffffffffffffffffff82168203610b1b57565b602081830312610b1b5780519067ffffffffffffffff8211610b1b57019061010082820312610b1b5760405191613123836119ee565b61312c816130cc565b835260208101516006811015610b1b57602084015261314d604082016130cc565b6040840152606081015165ffffffffffff81168103610b1b576060840152613177608082016130cc565b608084015261318860a082016130cc565b60a084015260c081015160c084015260e08101519067ffffffffffffffff8211610b1b570181601f82011215610b1b57805167ffffffffffffffff81116119c157604051926131ff601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200185611a0b565b81845260208284010111610b1b5761321d9160208085019101611b0a565b60e082015290565b9061322e613090565b73ffffffffffffffffffffffffffffffffffffffff601f5460081c1692604051917f50355d76000000000000000000000000000000000000000000000000000000008352602083600481885afa92831561205f575f9361330a575b508215613301575061329e6024925f92612fc1565b93604051928380927fbf22c4570000000000000000000000000000000000000000000000000000000082528760048301525afa90811561205f575f916132e2575090565b6132fe91503d805f833e6132f68183611a0b565b8101906130ed565b90565b935050505f9190565b9092506020813d602011613336575b8161332660209383611a0b565b81010312610b1b5751915f613289565b3d9150613319565b90602f5460ff81161561335057509050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117602f55815167ffffffffffffffff81116119c157613394603054611954565b601f81116134af575b50602092601f82116001146133f657928192935f926133eb575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c191617603055565b015190505f806133b7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169360305f527f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb915f5b8681106134975750836001959610613460575b505050811b01603055565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690555f8080613455565b91926020600181928685015181550194019201613442565b60305f52601f820160051c7f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb019060208310613528575b601f0160051c7f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb01905b81811061351d575061339d565b5f8155600101613510565b7f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb91506134e6565b805f52602b60205260ff60405f2054169060245f73ffffffffffffffffffffffffffffffffffffffff601f5460081c16604051928380927fbf22c4570000000000000000000000000000000000000000000000000000000082528660048301525afa801561205f576020915f916136ca575b5001519160068310156120745782600382106136785750506136406040516135eb606082611a0b565b602281527f616374696f6e20737563636565646564206f6e2061207465726d696e616c206a60208201527f6f62000000000000000000000000000000000000000000000000000000000000604082015261333e565b5f52602b60205260ff60405f2091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b61368191613d55565b613640576136c5604051613696604082611a0b565b601981527f696c6c6567616c20737461747573207472616e736974696f6e00000000000000602082015261333e565b613640565b6136de91503d805f833e6132f68183611a0b565b5f6135c2565b906136ed613090565b9173ffffffffffffffffffffffffffffffffffffffff601f5460081c1690604051907f50355d76000000000000000000000000000000000000000000000000000000008252602082600481865afa91821561205f575f92613847575b50811561383f578161375a91612fc1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908111915f5b8181106137945750505050505f9190565b836117d5576137ac826137a783866128c2565b6124a2565b600181018091116117d557604051907fbf22c4570000000000000000000000000000000000000000000000000000000082528060048301525f826024818a5afa91821561205f575f92613823575b50602082015160068110156120745715613818575050600101613783565b975095945050505050565b6138389192503d805f833e6132f68183611a0b565b905f6137fa565b5050505f9190565b9091506020813d602011613873575b8161386360209383611a0b565b81010312610b1b5751905f613749565b3d9150613856565b90613884613090565b9173ffffffffffffffffffffffffffffffffffffffff601f5460081c1690604051907f50355d76000000000000000000000000000000000000000000000000000000008252602082600481865afa91821561205f575f926139c8575b50811561383f57816138f191612fc1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908111915f5b81811061392b5750505050505f9190565b836117d55761393e826137a783866128c2565b600181018091116117d557604051907fbf22c4570000000000000000000000000000000000000000000000000000000082528060048301525f826024818a5afa91821561205f575f926139ac575b50602082015160068110156120745760011461381857505060010161391a565b6139c19192503d805f833e6132f68183611a0b565b905f61398c565b9091506020813d6020116139f4575b816139e460209383611a0b565b81010312610b1b5751905f6138e0565b3d91506139d7565b90613a05613090565b9173ffffffffffffffffffffffffffffffffffffffff601f5460081c1690604051907f50355d76000000000000000000000000000000000000000000000000000000008252602082600481865afa91821561205f575f92613b49575b50811561383f5781613a7291612fc1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908111915f5b818110613aac5750505050505f9190565b836117d557613abf826137a783866128c2565b600181018091116117d557604051907fbf22c4570000000000000000000000000000000000000000000000000000000082528060048301525f826024818a5afa91821561205f575f92613b2d575b506020820151600681101561207457600214613818575050600101613a9b565b613b429192503d805f833e6132f68183611a0b565b905f613b0d565b9091506020813d602011613b75575b81613b6560209383611a0b565b81010312610b1b5751905f613a61565b3d9150613b58565b5f90838311613cd15782811091821580613cc7575b613cbf57613ba08486611daa565b92600184018094116117d557600383111580613cb6575b613ca7577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc83101580613c9d575b613c8c5785831115613c44575050906137a784613c0193611daa565b908115613c3f57613c1292506128c2565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81019081116117d55790565b505090565b959492919095613c545750505050565b839495506137a790613c669394611daa565b908115613c3f57613c779250611daa565b600181018091116117d557905f808080611f7c565b505090506132fe9291501990611daa565b5082198411613be5565b50509190506132fe92506128c2565b50828411613bb7565b509250505090565b5084821115613b92565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5374645574696c7320626f756e642875696e743235362c75696e743235362c7560448201527f696e74323536293a204d6178206973206c657373207468616e206d696e2e00006064820152fd5b60ff168015613db75760018114613d9e57600214613d7257505f90565b60ff1660038114908115613d93575b8115613d8b575090565b600591501490565b600481149150613d81565b5060ff1660028114908115613d93578115613d8b575090565b5060ff168015908115613dd5575b8115613d93578115613d8b575090565b600181149150613dc556fea264697066735822122087a51d10e0458fb317219be7eb23f08edb70a540fa5ddaaf1fe23542f4215bae64736f6c634300081a00330000000000000000000000007109709ecfa91a80626ff3989d68f67f5b1dd12d60806040523461031057610e1e8038038061001981610314565b9283398101906040818303126103105780516001600160401b0381116103105782610045918301610339565b60208201519092906001600160401b038111610310576100659201610339565b81516001600160401b03811161022357600354600181811c91168015610306575b602082101461020557601f81116102a3575b50602092601f821160011461024257928192935f92610237575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161022357600454600181811c91168015610219575b602082101461020557601f81116101a2575b50602091601f8211600114610142579181925f92610137575b50508160011b915f199060031b1c1916176004555b604051610a7b90816103a38239f35b015190505f80610113565b601f1982169260045f52805f20915f5b85811061018a57508360019510610172575b505050811b01600455610128565b01515f1960f88460031b161c191690555f8080610164565b91926020600181928685015181550194019201610152565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c810191602084106101fb575b601f0160051c01905b8181106101f057506100fa565b5f81556001016101e3565b90915081906101da565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e8565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b2565b601f1982169360035f52805f20915f5b86811061028b5750836001959610610273575b505050811b016003556100c7565b01515f1960f88460031b161c191690555f8080610265565b91926020600181928685015181550194019201610252565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c810191602084106102fc575b601f0160051c01905b8181106102f15750610098565b5f81556001016102e4565b90915081906102db565b90607f1690610086565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761022357604052565b81601f82011215610310578051906001600160401b03821161022357610368601f8301601f1916602001610314565b9282845260208383010111610310575f5b82811061038d57505060205f918301015290565b8060208092840101518282870101520161037956fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde031461077257508063095ea7b3146106c557806318160ddd1461068a57806323b872dd146104f6578063313ce567146104bd57806340c10f19146103be57806370a082311461035c57806395d89b4114610169578063a9059cbb1461011a5763dd62ed3e1461008a575f80fd5b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576100c1610909565b73ffffffffffffffffffffffffffffffffffffffff6100de61092c565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101165761015e610154610909565b602435903361094f565b602060405160018152f35b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576040515f600454908160011c60018316928315610352575b6020821084146103255781855284939081156102c5575060011461024b575b5003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01681019067ffffffffffffffff82118183101761021e5761021a829182604052826108a3565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102a957505081016020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101ce565b6020919350806001915483858801015201910190918392610275565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b840190910191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090506101ce565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f16906101af565b346101165760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101165773ffffffffffffffffffffffffffffffffffffffff6103a8610909565b165f525f602052602060405f2054604051908152f35b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576103f5610909565b73ffffffffffffffffffffffffffffffffffffffff16602435811561049157600254908082018092116104645760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011657602060405160068152f35b346101165760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101165761052d610909565b61053561092c565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81106105b1575b5061015e935061094f565b83811061065657841561062a5733156105fe5761015e945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f2091039055846105a6565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576020600254604051908152f35b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576106fc610909565b60243590331561062a5773ffffffffffffffffffffffffffffffffffffffff169081156105fe57335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116575f600354908160011c60018316928315610899575b6020821084146103255781855284939081156102c5575060011461081f575003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01681019067ffffffffffffffff82118183101761021e5761021a829182604052826108a3565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061087d57505081016020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101ce565b6020919350806001915483858801015201910190918392610849565b90607f16906107b5565b919091602081528251928360208301525f5b8481106108f35750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6040809697860101520116010190565b80602080928401015160408286010152016108b5565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361011657565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361011657565b73ffffffffffffffffffffffffffffffffffffffff16908115610a195773ffffffffffffffffffffffffffffffffffffffff1691821561049157815f525f60205260405f20548181106109e757817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea26469706673582212207d4081a323998c8d20751316ef809be0cc398b922c8a680eea7ed1d1bc08e9bf64736f6c634300081a003360808060405234601557610fd0908161001a8239f35b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714610b915750806306661abd14610b575780633a32058114610a1d578063a3fe4783146105eb578063d183ce14146105295763dc08fb1d1461005e575f80fd5b346103cb5761006c36610cb1565b9092916040517fbf22c4570000000000000000000000000000000000000000000000000000000081528360048201525f81602481335afa801561051e575f906103fc575b6020915001519260068410156103cf57604051926100cd84610e07565b60018452602084019182527fffffffff00000000000000000000000000000000000000000000000000000000604085019316835261010a81610f60565b956101186040519788610e40565b81875236828201116103cb57815f92602092838a0137870101526060830194855260ff60808401941684525f54680100000000000000008110156103725780600161016592015f55610d51565b93909361039f5751151560ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00855416911617835551600183015560028201905160e01c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082541617905560038101925192835167ffffffffffffffff8111610372576101f28254610db6565b601f811161032d575b506020601f8211600114610287579080600494939260ff96975f9261027c575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790555b019151167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790555f80f35b015190505f8061021b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0821695835f52815f20965f5b8181106103155750966001928492600497969560ff999a106102de575b505050811b01905561024d565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690555f80806102d1565b838301518955600190980197602093840193016102b4565b825f5260205f20601f830160051c81019160208410610368575b601f0160051c01905b81811061035d57506101fb565b5f8155600101610350565b9091508190610347565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b503d805f833e61040c8183610e40565b8101906020818303126103cb5780519067ffffffffffffffff82116103cb5701610100818303126103cb576040519061044482610e23565b61044d81610f3f565b8252602081015160068110156103cb57602083015261046e60408201610f3f565b6040830152606081015165ffffffffffff811681036103cb57606083015261049860808201610f3f565b60808301526104a960a08201610f3f565b60a083015260c081015160c083015260e08101519067ffffffffffffffff82116103cb57019180601f840112156103cb578251926104e684610f60565b916104f46040519384610e40565b848352602085830101116103cb5760209361051491858085019101610c4d565b60e08201526100b0565b6040513d5f823e3d90fd5b346103cb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb576004355f548110156103cb5761056d90610d51565b5060ff8154166001820154916105e1600282015460e01b917fffffffff0000000000000000000000000000000000000000000000000000000060ff60046105b660038501610e81565b930154169360405196879615158752602087015216604085015260a0606085015260a0840190610c6e565b9060808301520390f35b346103cb576105f936610cb1565b9092916040517fbf22c4570000000000000000000000000000000000000000000000000000000081528360048201525f81602481335afa801561051e575f906108fb575b6020915001519260068410156103cf576040519261065a84610e07565b5f8452602084019182527fffffffff00000000000000000000000000000000000000000000000000000000604085019316835261069681610f60565b956106a46040519788610e40565b81875236828201116103cb57815f92602092838a0137870101526060830194855260ff60808401941684525f5468010000000000000000811015610372578060016106f192015f55610d51565b93909361039f5751151560ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00855416911617835551600183015560028201905160e01c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082541617905560038101925192835167ffffffffffffffff81116103725761077e8254610db6565b601f81116108b6575b506020601f8211600114610811579080600494939260ff96975f926108065750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916179055019151167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790555f80f35b01519050878061021b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0821695835f52815f20965f5b81811061089e5750966001928492600497969560ff999a1061086757505050811b01905561024d565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558780806102d1565b8383015189556001909801976020938401930161083e565b825f5260205f20601f830160051c810191602084106108f1575b601f0160051c01905b8181106108e65750610787565b5f81556001016108d9565b90915081906108d0565b503d805f833e61090b8183610e40565b8101906020818303126103cb5780519067ffffffffffffffff82116103cb5701610100818303126103cb576040519061094382610e23565b61094c81610f3f565b8252602081015160068110156103cb57602083015261096d60408201610f3f565b6040830152606081015165ffffffffffff811681036103cb57606083015261099760808201610f3f565b60808301526109a860a08201610f3f565b60a083015260c081015160c083015260e08101519067ffffffffffffffff82116103cb57019180601f840112156103cb578251926109e584610f60565b916109f36040519384610e40565b848352602085830101116103cb57602093610a1391858085019101610c4d565b60e082015261063d565b346103cb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb575f6080604051610a5b81610e07565b8281528260208201528260408201526060808201520152610a7d600435610d51565b50604051610a8a81610e07565b60ff825416151581526001820154916020820192835260ff610b4b600283015460e01b927fffffffff0000000000000000000000000000000000000000000000000000000060408601941684527fffffffff00000000000000000000000000000000000000000000000000000000836004610b0760038501610e81565b93606089019485520154169460808701958652604051978897602089525115156020890152516040880152511660608601525160a0608086015260c0850190610c6e565b91511660a08301520390f35b346103cb575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb5760205f54604051908152f35b346103cb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb57600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036103cb57817f7ff6bc9e0000000000000000000000000000000000000000000000000000000060209314908115610c23575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610c1c565b5f5b838110610c5e5750505f910152565b8181015183820152602001610c4f565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093610caa81518092818752878088019101610c4d565b0116010190565b9060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8301126103cb57600435916024357fffffffff00000000000000000000000000000000000000000000000000000000811681036103cb579160443567ffffffffffffffff81116103cb57826023820112156103cb5780600401359267ffffffffffffffff84116103cb57602484830101116103cb576024019190565b5f54811015610d89575f8080526005919091027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630191565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b90600182811c92168015610dfd575b6020831014610dd057565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691610dc5565b60a0810190811067ffffffffffffffff82111761037257604052565b610100810190811067ffffffffffffffff82111761037257604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761037257604052565b9060405191825f825492610e9484610db6565b8084529360018116908115610eff5750600114610ebb575b50610eb992500383610e40565b565b90505f9291925260205f20905f915b818310610ee3575050906020610eb9928201015f610eac565b6020919350806001915483858901015201910190918492610eca565b60209350610eb99592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f610eac565b519073ffffffffffffffffffffffffffffffffffffffff821682036103cb57565b67ffffffffffffffff811161037257601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0166020019056fea2646970667358221220af75d4a17c0b6da6a3609fe1e4338988c321fe2d51d15dda0930b8f2e25388aa64736f6c634300081a0033a2646970667358221220f16bdcf0e1bc42cc06e2748da5fb883ec4927ec1a6fcacf0ab8a4e3b5625b20f64736f6c634300081a00330000000000000000000000007109709ecfa91a80626ff3989d68f67f5b1dd12d","output":"0x6080806040526004361015610012575f80fd5b5f905f3560e01c9081630a9254e414611355575080631ed7831c146112ac5780632ade3880146110805780633e5e3c2314610fd75780633f7286f414610f2e57806347853bb914610ef75780634d657a1e14610ec057806366d9a9a014610d6557806385226c8114610cbd578063916a17c614610be8578063b0464fdc14610b13578063b5508aa914610a6b578063ba414fa614610a28578063c5c988ca1461020f578063d87d4feb146101d5578063e20c9f711461011c5763fa7626d4146100d9575f80fd5b3461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957602060ff601f54166040519015158152f35b80fd5b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101195760405180916020601554928381520191601582527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475915b8181106101a9576101a58561019981870382611ea7565b60405191829182611c35565b0390f35b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201610182565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101195761020c61273e565b80f35b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957805b61025881106104b0575073ffffffffffffffffffffffffffffffffffffffff602954166040517f7f974c6f000000000000000000000000000000000000000000000000000000008152602081600481855afa9081156104a5578391610473575b506102e36040918251906102b48483611ea7565b601282527f6e6f207375636365737366756c2066756e6400000000000000000000000000006020830152612ad4565b80517f05e3769c000000000000000000000000000000000000000000000000000000008152602081600481865afa908115610469578491610436575b506004926103646020928451906103368683611ea7565b601682527f6e6f207375636365737366756c20636f6d706c6574650000000000000000000085830152612ad4565b8251938480927f59e136190000000000000000000000000000000000000000000000000000000082525afa801561042c5783906103f4575b6103dc92506103ad82519283611ea7565b601982527f6e6f207375636365737366756c20726566756e642070617468000000000000006020830152612ad4565b6103e461273e565b6103ec61221d565b61020c61208e565b506020823d602011610424575b8161040e60209383611ea7565b81010312610420576103dc915161039c565b5f80fd5b3d9150610401565b81513d85823e3d90fd5b90506020813d602011610461575b8161045160209383611ea7565b810103126104205751600461031f565b3d9150610444565b82513d86823e3d90fd5b90506020813d60201161049d575b8161048e60209383611ea7565b8101031261042057515f6102a0565b3d9150610481565b6040513d85823e3d90fd5b816040516020810190838252602081526104cb604082611ea7565b519020600a8106806105a3575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f57600160c484928360405195869485937f8253f2d90000000000000000000000000000000000000000000000000000000085528060048601528060081c60248601528060101c60448601528060181c6064860152818160201c1615608486015260281c161560a48401525af180156105945761057b575b50506001905b01610240565b8161058591611ea7565b61059057815f61056f565b5080fd5b6040513d84823e3d90fd5b8280fd5b60018103610638575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f5782916044839260405194859384927f725cc2e100000000000000000000000000000000000000000000000000000000845280600485015260081c60248401525af1801561059457610623575b5050600190610575565b8161062d91611ea7565b61059057815f610619565b600281036106b7575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f5782916044839260405194859384927f9675dc1700000000000000000000000000000000000000000000000000000000845280600485015260081c60248401525af1801561059457610623575050600190610575565b60038103610739575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f5782916064839260405194859384927f81ede1bb00000000000000000000000000000000000000000000000000000000845260048401528160248401528160448401525af1801561059457610623575050600190610575565b600481036107bb575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f5782916064839260405194859384927fd130382500000000000000000000000000000000000000000000000000000000845260048401528160248401528160448401525af1801561059457610623575050600190610575565b6005810361083d575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f5782916064839260405194859384927ffd61a25600000000000000000000000000000000000000000000000000000000845260048401528160248401528160448401525af1801561059457610623575050600190610575565b600681036108c5575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f576001606484928360405195869485937f531c7faa00000000000000000000000000000000000000000000000000000000855280600486015260081c161560248401528160448401525af1801561059457610623575050600190610575565b6007810361093b575073ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f5782916024839260405194859384927f5b7baf6400000000000000000000000000000000000000000000000000000000845260048401525af1801561059457610623575050600190610575565b6008036109b25773ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f57612a30602484928360405195869485937fe5d6bf020000000000000000000000000000000000000000000000000000000085520660048401525af1801561059457610623575050600190610575565b73ffffffffffffffffffffffffffffffffffffffff6029541690813b1561059f5782916044839260405194859384927f0b78f9c000000000000000000000000000000000000000000000000000000000845280600485015260081c60248401525af1801561059457610623575050600190610575565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610119576020610a61612644565b6040519015158152f35b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957601954610aa681611ee8565b91610ab46040519384611ea7565b818352601981527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c9695602084015b838310610af657604051806101a58782611d3d565b600160208192610b0585611f00565b815201920192019190610ae1565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957601c54610b4e81611ee8565b91610b5c6040519384611ea7565b818352601c81527f0e4562a10381dec21b205ed72637e6b1b523bdd0e4d4d50af5cd23dd4500a211602084015b838310610b9e57604051806101a58782611dba565b60026020600192604051610bb181611e5e565b73ffffffffffffffffffffffffffffffffffffffff8654168152610bd68587016123a0565b83820152815201920192019190610b89565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957601d54610c2381611ee8565b91610c316040519384611ea7565b818352601d81527f6d4407e7be21f808e6509aa9fa9143369579dd7d760fe20a2c09680fc146134f602084015b838310610c7357604051806101a58782611dba565b60026020600192604051610c8681611e5e565b73ffffffffffffffffffffffffffffffffffffffff8654168152610cab8587016123a0565b83820152815201920192019190610c5e565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957601a54610cf881611ee8565b91610d066040519384611ea7565b818352601a81527f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e602084015b838310610d4857604051806101a58782611d3d565b600160208192610d5785611f00565b815201920192019190610d33565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957601b54610da081611ee8565b610dad6040519182611ea7565b818152601b83526020810191837f3ad8aa4f87544323a9d1e5dd902f40c356527a7955687113db5f9a85ad579dc1845b838310610e8557868587604051928392602084019060208552518091526040840160408260051b8601019392905b828210610e1a57505050500390f35b91936020610e75827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0600195979984950301865288519083610e658351604084526040840190611ca5565b9201519084818403910152611ce8565b9601920192018594939192610e0b565b60026020600192604051610e9881611e5e565b610ea186611f00565b8152610eae8587016123a0565b83820152815201920192019190610ddd565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101195761020c61221d565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101195761020c61208e565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101195760405180916020601754928381520191601782527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c15915b818110610fab576101a58561019981870382611ea7565b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201610f94565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101195760405180916020601854928381520191601882527fb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2e915b818110611054576101a58561019981870382611ea7565b825473ffffffffffffffffffffffffffffffffffffffff1684526020909301926001928301920161103d565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011957601e546110bb81611ee8565b6110c86040519182611ea7565b818152601e83526020810191837f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e350845b8383106112165786858760405192839260208401906020855251809152604084019160408260051b8601019392815b8383106111345786860387f35b9193957fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc09086929496030183528551906020604082019273ffffffffffffffffffffffffffffffffffffffff81511683520151916040602083015282518091526060820190602060608260051b850101940192855b8281106111cd57505050505060208060019297019301930190928695949293611127565b9091929394602080611209837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa087600196030189528951611ca5565b97019501939291016111a9565b60405161122281611e5e565b73ffffffffffffffffffffffffffffffffffffffff835416815260018301805461124b81611ee8565b916112596040519384611ea7565b8183528a526020808b20908b9084015b83821061128f5750505050600192826020928360029501528152019201920191906110f8565b60016020819261129e86611f00565b815201930191019091611269565b503461011957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101195760405180916020601654928381520191601682527fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b5124289915b818110611329576101a58561019981870382611ea7565b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201611312565b905034610420575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261042057737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610420577fe5d6bf02000000000000000000000000000000000000000000000000000000008152636553f10060048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af18015611c2a57611c17575b50604051610e1e8082019082821067ffffffffffffffff831117611b5d5760c091839161be71833960408152600960408201527f5075736820555344430000000000000000000000000000000000000000000000606082015260806020820152600560808201527f705553444300000000000000000000000000000000000000000000000000000060a082015203019082f08015611af95773ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000602154161760215560405161389f8082019082821067ffffffffffffffff831117611b5d579082916139918339039082f08015611af95773ffffffffffffffffffffffffffffffffffffffff16807fffffffffffffffffffffffff0000000000000000000000000000000000000000602054161760205573ffffffffffffffffffffffffffffffffffffffff6021541673ffffffffffffffffffffffffffffffffffffffff6024541673ffffffffffffffffffffffffffffffffffffffff6023541690604051927fc0c53b8b000000000000000000000000000000000000000000000000000000006020850152602484015260448301526064820152606481526115cf608482611ea7565b73ffffffffffffffffffffffffffffffffffffffff602254169160405192610e54918285019285841067ffffffffffffffff851117611bea579285949260609261162c95612b3d8839825260208201528160408201520190611ca5565b039082f08015611af9577fffffffffffffffffffffff0000000000000000000000000000000000000000ff74ffffffffffffffffffffffffffffffffffffffff00601f549260081b16911617601f558073ffffffffffffffffffffffffffffffffffffffff6021541673ffffffffffffffffffffffffffffffffffffffff60255416813b15611be65782916044839260405194859384927f40c10f19000000000000000000000000000000000000000000000000000000008452600484015266038d7ea4c6800060248401525af1801561059457611bd1575b5073ffffffffffffffffffffffffffffffffffffffff60255416737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15611bce57604051907fca669fa70000000000000000000000000000000000000000000000000000000082526004820152818160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561059457611bb9575b50602073ffffffffffffffffffffffffffffffffffffffff60215416604473ffffffffffffffffffffffffffffffffffffffff601f5460081c1660405194859384927f095ea7b300000000000000000000000000000000000000000000000000000000845260048401527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248401525af1801561059457611b8a575b50604051610fea8082019082821067ffffffffffffffff831117611b5d5790829161cc8f8339039082f08015611af9578173ffffffffffffffffffffffffffffffffffffffff60235416737109709ecfa91a80626ff3989d68f67f5b1dd12d3b1561059057604051907fca669fa70000000000000000000000000000000000000000000000000000000082526004820152818160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561059457611b48575b5073ffffffffffffffffffffffffffffffffffffffff80601f5460081c16921691803b15610590578180916044604051809481937fce79eb60000000000000000000000000000000000000000000000000000000008352886004840152600160248401525af1801561059457611b33575b505073ffffffffffffffffffffffffffffffffffffffff601f5460081c1673ffffffffffffffffffffffffffffffffffffffff602154169173ffffffffffffffffffffffffffffffffffffffff6023541660405193614c41938486019486861067ffffffffffffffff871117611b06579160809593918795936172308739845260208401526040830152606082015203019082f08015611af95773ffffffffffffffffffffffffffffffffffffffff16807fffffffffffffffffffffffff0000000000000000000000000000000000000000602954161760295560175468010000000000000000811015611acc576001810180601755811015611a9f577fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c1501907fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905580f35b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b50604051903d90823e3d90fd5b6024887f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b81611b3d91611ea7565b61059057815f611955565b81611b5291611ea7565b61059057815f6118e4565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b611bab9060203d602011611bb2575b611ba38183611ea7565b810190612003565b505f61182b565b503d611b99565b81611bc391611ea7565b61011957805f61178e565b50fd5b81611bdb91611ea7565b61011957805f611705565b5050fd5b6024877f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b611c2391505f90611ea7565b5f806113f5565b6040513d5f823e3d90fd5b60206040818301928281528451809452019201905f5b818110611c585750505090565b825173ffffffffffffffffffffffffffffffffffffffff16845260209384019390920191600101611c4b565b5f5b838110611c955750505f910152565b8181015183820152602001611c86565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093611ce181518092818752878088019101611c84565b0116010190565b90602080835192838152019201905f5b818110611d055750505090565b82517fffffffff0000000000000000000000000000000000000000000000000000000016845260209384019390920191600101611cf8565b602081016020825282518091526040820191602060408360051b8301019401925f915b838310611d6f57505050505090565b9091929394602080611dab837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187528951611ca5565b97019301930191939290611d60565b602081016020825282518091526040820191602060408360051b8301019401925f915b838310611dec57505050505090565b9091929394602080611e4f837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187526040838b5173ffffffffffffffffffffffffffffffffffffffff815116845201519181858201520190611ce8565b97019301930191939290611ddd565b6040810190811067ffffffffffffffff821117611e7a57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117611e7a57604052565b67ffffffffffffffff8111611e7a5760051b60200190565b90604051915f8154908160011c9260018316928315611ff9575b602085108414611fcc578487528693908115611f8c5750600114611f48575b50611f4692500383611ea7565b565b90505f9291925260205f20905f915b818310611f70575050906020611f46928201015f611f39565b6020919350806001915483858901015201910190918492611f57565b60209350611f469592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f611f39565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b93607f1693611f1a565b90816020910312610420575180151581036104205790565b81601f8201121561042057805167ffffffffffffffff8111611e7a576040519261206d601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200185611ea7565b818452602082840101116104205761208b9160208085019101611c84565b90565b73ffffffffffffffffffffffffffffffffffffffff60295416604051907fe662e387000000000000000000000000000000000000000000000000000000008252602082600481845afa908115611c2a576004925f926121fa575b505f90604051938480927f087320b20000000000000000000000000000000000000000000000000000000082525afa918215611c2a575f926121ba575b50737109709ecfa91a80626ff3989d68f67f5b1dd12d3b156104205761218a915f9160405193849283927f7ba0480900000000000000000000000000000000000000000000000000000000845215156004840152604060248401526044830190611ca5565b0381737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa8015611c2a576121b05750565b5f611f4691611ea7565b9091503d805f833e6121cc8183611ea7565b810160208282031261042057815167ffffffffffffffff8111610420576121f3920161201b565b905f612125565b5f9192506122169060203d602011611bb257611ba38183611ea7565b91906120e8565b73ffffffffffffffffffffffffffffffffffffffff602154602082601f5460081c16916024604051809581937f70a08231000000000000000000000000000000000000000000000000000000008352866004840152165afa918215611c2a575f9261236b575b506020600491604051928380927ff91682310000000000000000000000000000000000000000000000000000000082525afa908115611c2a575f91612339575b50737109709ecfa91a80626ff3989d68f67f5b1dd12d3b1561042057604051917fa8d4d1d9000000000000000000000000000000000000000000000000000000008352600483015260248201525f81604481737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa8015611c2a576121b05750565b90506020813d602011612363575b8161235460209383611ea7565b8101031261042057515f6122c3565b3d9150612347565b9091506020813d602011612398575b8161238760209383611ea7565b810103126104205751906020612283565b3d915061237a565b90604051918281549182825260208201905f5260205f20925f905b8060078301106125b757611f46945491818110612581575b81811061254b575b818110612515575b8181106124df575b8181106124a9575b818110612473575b81811061243e575b10612411575b500383611ea7565b7fffffffff000000000000000000000000000000000000000000000000000000001681526020015f612409565b9260206001917fffffffff0000000000000000000000000000000000000000000000000000000085831b168152019301612403565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560401b1681520193016123fb565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560601b1681520193016123f3565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560801b1681520193016123eb565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560a01b1681520193016123e3565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560c01b1681520193016123db565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560e01b1681520193016123d3565b9160089193506101006001917fffffffff000000000000000000000000000000000000000000000000000000008754818160e01b168352818160c01b166020840152818160a01b166040840152818160801b166060840152818160601b166080840152818160401b1660a0840152818160201b1660c08401521660e08201520194019201859293916123bb565b60085460ff1680156126535790565b506040517f667f9d70000000000000000000000000000000000000000000000000000000008152737109709ecfa91a80626ff3989d68f67f5b1dd12d60048201527f6661696c656400000000000000000000000000000000000000000000000000006024820152602081604481737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa908115611c2a575f916126eb575b50151590565b90506020813d602011612715575b8161270660209383611ea7565b8101031261042057515f6126e5565b3d91506126f9565b519073ffffffffffffffffffffffffffffffffffffffff8216820361042057565b5f73ffffffffffffffffffffffffffffffffffffffff601f5460081c166040517f50355d76000000000000000000000000000000000000000000000000000000008152602081600481855afa908115611c2a575f91612aa2575b5060015b81811115612890575050906020600492604051938480927ff91682310000000000000000000000000000000000000000000000000000000082525afa918215611c2a575f9261285c575b50737109709ecfa91a80626ff3989d68f67f5b1dd12d3b1561042057604051917f98296c54000000000000000000000000000000000000000000000000000000008352600483015260248201525f81604481737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa8015611c2a576121b05750565b9091506020813d602011612888575b8161287860209383611ea7565b810103126104205751905f6127e6565b3d915061286b565b6040517fbf22c4570000000000000000000000000000000000000000000000000000000081528160048201525f81602481875afa908115611c2a575f916129aa575b50602081018051600681101561297d57600114908115612968575b50612950575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146129235760010161279c565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60c0909491940151810180911161292357925f6128f3565b905051600681101561297d576002145f6128ed565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b90503d805f833e6129bb8183611ea7565b8101906020818303126104205780519067ffffffffffffffff82116104205701610100818303126104205760405191610100830183811067ffffffffffffffff821117611e7a57604052612a0e8261271d565b835260208201516006811015610420576020840152612a2f6040830161271d565b6040840152606082015165ffffffffffff81168103610420576060840152612a596080830161271d565b6080840152612a6a60a0830161271d565b60a084015260c082015160c084015260e082015167ffffffffffffffff811161042057612a97920161201b565b60e08201525f6128d2565b90506020813d602011612acc575b81612abd60209383611ea7565b8101031261042057515f612798565b3d9150612ab0565b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b156104205761218a915f9160405193849283927fd9a3c4d20000000000000000000000000000000000000000000000000000000084526004840152846024840152606060448401526064830190611ca556fe60a0604052610e548038038061001481610281565b928339810160608282031261027d5761002c826102a6565b610038602084016102a6565b604084015190936001600160401b03821161027d570182601f8201121561027d5780519061006d610068836102ba565b610281565b938285526020838301011161027d575f5b82811061026857505060205f9184010152803b15610248577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0383169081179091557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2815115610231575f8083602061013095519101845af43d15610229573d91610121610068846102ba565b9283523d5f602085013e6102d5565b505b6040519061064f8083016001600160401b038111848210176102155760209284926107e584396001600160a01b031681520301905ff0801561020a5760018060a01b0316806080525f80516020610e34833981519152547f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6040805160018060a01b0384168152846020820152a181156101f7576001600160a01b031916175f80516020610e34833981519152556040516104b1908161033482396080518160070152f35b633173bdd160e11b5f525f60045260245ffd5b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b6060916102d5565b505034156101325763b398979f60e01b5f5260045ffd5b634c9c8ce360e01b5f9081526001600160a01b0391909116600452602490fd5b8060208092840101518282880101520161007e565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761021557604052565b51906001600160a01b038216820361027d57565b6001600160401b03811161021557601f01601f191660200190565b906102f957508051156102ea57805190602001fd5b63d6bda27560e01b5f5260045ffd5b8151158061032a575b61030a575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b1561030256fe6080604052337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16036100bd575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100b3577fd2b576ec000000000000000000000000000000000000000000000000000000005f5260045ffd5b6100bb6101c1565b005b5f8073ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416368280378136915af43d5f803e1561010d573d5ff35b3d5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff82111761018257604052565b610111565b67ffffffffffffffff811161018257601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b366004116102745760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102745760043573ffffffffffffffffffffffffffffffffffffffff8116809103610274576024359067ffffffffffffffff821161027457366023830112156102745781600401359061024961024483610187565b61013e565b918083523660248286010111610274576020815f92602461027297018387013784010152610278565b565b5f80fd5b90813b156103675773ffffffffffffffffffffffffffffffffffffffff8216807fffffffffffffffffffffffff00000000000000000000000000000000000000007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416177f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a280511561033657610333916103a9565b50565b50503461033f57565b7fb398979f000000000000000000000000000000000000000000000000000000005f5260045ffd5b73ffffffffffffffffffffffffffffffffffffffff827f4c9c8ce3000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b5f806103db93602081519101845af43d156103de573d916103cc61024484610187565b9283523d5f602085013e6103e2565b90565b6060915b9061041f57508051156103f757805190602001fd5b7fd6bda275000000000000000000000000000000000000000000000000000000005f5260045ffd5b81511580610472575b610430575090565b73ffffffffffffffffffffffffffffffffffffffff907f9996b315000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b50803b1561042856fea2646970667358221220481cacafffcdffc0448fe9cfe96f8149f61f2083b69e100dc149c658ac2528fd64736f6c634300081a003360803460b857601f61064f38819003918201601f19168301916001600160401b0383118484101760bc5780849260209460405283398101031260b857516001600160a01b0381169081900360b857801560a5575f80546001600160a01b031981168317825560405192916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a361057e90816100d18239f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f803560e01c8063715018a6146103c45780638da5cb5b146103745780639623609d146101cb578063ad3cb1cc146101485763f2fde38b14610051575f80fd5b346101455760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101455760043573ffffffffffffffffffffffffffffffffffffffff8116809103610141576100a96104fc565b80156101155773ffffffffffffffffffffffffffffffffffffffff8254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b5080fd5b80fd5b503461014557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014557506101c760405161018960408261045e565b600581527f352e302e30000000000000000000000000000000000000000000000000000000602082015260405191829160208352602083019061049f565b0390f35b5060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103435760043573ffffffffffffffffffffffffffffffffffffffff81168091036103435760243573ffffffffffffffffffffffffffffffffffffffff81168091036103435760443567ffffffffffffffff8111610343573660238201121561034357806004013567ffffffffffffffff8111610347576040519161029f601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0166020018461045e565b818352366024838301011161034357815f9260246020930183860137830101526102c76104fc565b823b1561034357610316925f926040518095819482937f4f1ef286000000000000000000000000000000000000000000000000000000008452600484015260406024840152604483019061049f565b039134905af180156103385761032a575080f35b61033691505f9061045e565b005b6040513d5f823e3d90fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b34610343575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261034357602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b34610343575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610343576103fa6104fc565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761034757604052565b91908251928382525f5b8481106104e75750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b806020809284010151828286010152016104a9565b73ffffffffffffffffffffffffffffffffffffffff5f5416330361051c57565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffdfea2646970667358221220bf8617a09a791c192cb0d344676f2dcbe88d7a55549a679b2ee10beaae67e98364736f6c634300081a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036080806040523460d0577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c1660c1576002600160401b03196001600160401b03821601605c575b6040516137ca90816100d58239f35b6001600160401b0319166001600160401b039081177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f80604d565b63f92ee8a960e01b5f5260045ffd5b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714612aed57508063248a9ca314612a7d5780632f0e31f414612a425780632f2ff15d146129c75780632f8e6a2d1461298d5780633013ce291461293d57806336568abe146128b55780633f4ba83a146127e55780634152881214611fe557806341dd26f514611e1f5780634c4911c414611cba57806350355d7614611c7f5780635b7baf6414611a955780635c975abb14611a365780636d3b96c3146119ce57806375b238fc146119765780637ab03cf21461193c5780638456cb591461186957806384f15090146117ea57806391d14854146117565780639e63798d1461162b578063a217fddf146115f3578063b4d884f6146114fd578063bf22c45714611269578063c0c53b8b14610ecc578063c9a84bb914610c84578063ce79eb6014610bb6578063d2e13f501461096a578063d547741f146108e8578063d75bbdf31461067d578063dd4ae9d4146104b0578063e138818c1461045f578063e1a4521814610425578063e63ea40814610222578063f9168231146101e75763ff96092a146101a8575f80fd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600154604051908152f35b5f80fd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600754604051908152f35b346101e35760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610259612bcc565b610261612ba9565b73ffffffffffffffffffffffffffffffffffffffff60443592610282612e1e565b61028a613662565b169081158015610407575b6103df5773ffffffffffffffffffffffffffffffffffffffff5f5416808314610309575b50602073ffffffffffffffffffffffffffffffffffffffff826102fe867ff24ef89f38eadc1bde50701ad6e4d6d11a2dc24f7cf834a486991f38833285049587613605565b6040519586521693a3005b6020602491604051928380927f70a082310000000000000000000000000000000000000000000000000000000082523060048301525afa9081156103d4575f916103a2575b506007548082111561039a5761036391612dfe565b808411156102b957837f9529d841000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b50505f610363565b90506020813d6020116103cc575b816103bd60209383612cf9565b810103126101e357518461034e565b3d91506103b0565b6040513d5f823e3d90fd5b7fd92e233d000000000000000000000000000000000000000000000000000000005f5260045ffd5b5073ffffffffffffffffffffffffffffffffffffffff811615610295565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760206040516127108152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b346101e3576104be36612c1d565b9290916104c9613331565b6104d1613384565b6104da826133fb565b60ff815460a01c1660068110156106505761062857600181015465ffffffffffff8160a01c164210156106285773ffffffffffffffffffffffffffffffffffffffff16330361060057827f869e2577b006bf47ee981cf6fec2e25583548081c14b98deab587f77b5068038602073ffffffffffffffffffffffffffffffffffffffff946105b46105da996105886040519a8b9233878501528560408501526060808501526080840191612d8b565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018a5289612cf9565b80600460038701966105ca8b888b8b541661345f565b0155604051908152a2541661357c565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b7f82b42900000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f8e78f0cb000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b346101e35761068b36612c1d565b919290610696613331565b61069e613384565b6106a7826133fb565b9360ff855460a01c166006811015610650576002036106285773ffffffffffffffffffffffffffffffffffffffff6002860154163303610600576107fd837f21d71db5be59bb9fa133895586b7404307dd33fb93b16db09dc6f1d9d7d231b060206105da9861076473ffffffffffffffffffffffffffffffffffffffff976107386040519b8c928a33888601612dc9565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018b528a612cf9565b60038101956107778a868a8a541661345f565b6004820154740300000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8454161783556107c581600754612dfe565b6007558860016127106107d9825485612e0b565b049889936107f86127106107ef60035484612e0b565b04958692612dfe565b612dfe565b9401541696806108a3575b5080610863575b5081610850575b604051908152847f0fd54bd364fa9e67f17b091aefe930932c09fe7651cf5ad02c71a418f3341444843393a3604051908152a3541661357c565b61085e82878a5f5416613605565b610816565b61087181338b5f5416613605565b604051908152857f253dd534010ac976fa263caa123bae79b9c50292adf7ce67bdc5ec309f784e61853393a38b61080f565b867f0e61cfd0ee655641b3ed0a1dd373ec3cacf4c090de1f33708e3a4091f4947662868c60025416936108db818f87905f5416613605565b604051908152a38c610808565b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610968600435610925612ba9565b9061096361095e825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b612ea6565b613229565b005b346101e35761097836612c1d565b61098493919293613331565b61098c613384565b610995826133fb565b93845460ff8160a01c166006811015610650576106285773ffffffffffffffffffffffffffffffffffffffff16330361060057600185015473ffffffffffffffffffffffffffffffffffffffff811615610b8e5760a01c65ffffffffffff16421015610628576004850190815403610b66576105da94610a6f73ffffffffffffffffffffffffffffffffffffffff93610a436040519788923360208501526040808501526060840191612d8b565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101875286612cf9565b6003810191610a8286868686541661345f565b5490740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff825416179055610acd81600754612ccf565b60075580610b0a575b604051908152837fe3fbcc1ea1bdc559ec7f0347efde7655e58b5f45a30b0e4470a583c3ef5496b360203393a3541661357c565b610b61835f5416604051907f23b872dd00000000000000000000000000000000000000000000000000000000602083015233602483015230604483015283606483015260648252610b5c608483612cf9565b61370d565b610ad6565b7f99b0fc87000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fa9456d43000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610bed612bcc565b602435908115158092036101e35773ffffffffffffffffffffffffffffffffffffffff90610c19612e1e565b169081156103df5760207f7ee54953080e392a475a25b6acacb85417ca4e1953293c90934233ca1361251091835f526006825260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8316179055604051908152a2005b346101e35760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435610cbe612ba9565b60443567ffffffffffffffff81116101e357610cde903690600401612bef565b929091610ce9613331565b610cf1613384565b610cfa826133fb565b90815460ff8160a01c1660068110156106505761062857600183019182549165ffffffffffff8360a01c164210156106285773ffffffffffffffffffffffffffffffffffffffff16918233036106005773ffffffffffffffffffffffffffffffffffffffff166106285773ffffffffffffffffffffffffffffffffffffffff169081156103df578114610ea45773ffffffffffffffffffffffffffffffffffffffff6002840154168114610e7c57600373ffffffffffffffffffffffffffffffffffffffff93610e186105da98610dec604051998a923360208501528760408501526060808501526080840191612d8b565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101895288612cf9565b0191610e2886868686541661345f565b817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055837f9a87df076ea1725aba8ba29d32517ce37c9597d88cbf16ec6707892cc330ab695f80a3541661357c565b7fc7b4e9eb000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f332ff0f9000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e35760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610f03612bcc565b610f0b612ba9565b60443573ffffffffffffffffffffffffffffffffffffffff81168082036101e3577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c16159467ffffffffffffffff821680159081611261575b6001149081611257575b15908161124e575b5061122657818660017fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000073ffffffffffffffffffffffffffffffffffffffff9516177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556111d1575b50169081159081156111b2575b81156111a9575b506103df576110bd9273ffffffffffffffffffffffffffffffffffffffff916110216136b6565b6110296136b6565b6110316136b6565b6110396136b6565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00557fffffffffffffffffffffffff00000000000000000000000000000000000000005f5416175f55167fffffffffffffffffffffffff000000000000000000000000000000000000000060025416176002556110b781612f2c565b50613013565b505f805260066020527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561111657005b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b90501585610ffa565b73ffffffffffffffffffffffffffffffffffffffff8516159150610ff3565b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005586610fe6565b7ff92ee8a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b90501587610f7d565b303b159150610f75565b879150610f6b565b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357606060e06040516112a881612cdc565b5f81525f60208201525f60408201525f838201525f60808201525f60a08201525f60c082015201526004355f52600460205260405f20604051906112eb82612cdc565b60ff815473ffffffffffffffffffffffffffffffffffffffff8116845260a01c169060208301916006811015610650578252600181015491604084019173ffffffffffffffffffffffffffffffffffffffff8416835265ffffffffffff606086019460a01c16845273ffffffffffffffffffffffffffffffffffffffff600282015416936080860194855273ffffffffffffffffffffffffffffffffffffffff60038301541660a08701908152600560048401549360c08901948552019360405194855f8254926113bb84612d3a565b80845293600181169081156114bd5750600114611479575b506113e092500386612cf9565b60e0880194855273ffffffffffffffffffffffffffffffffffffffff6040519860208a525116602089015251600681101561065057879665ffffffffffff73ffffffffffffffffffffffffffffffffffffffff948561147599819560408d0152511660608b015251166080890152511660a0870152511660c08501525160e08401525161010080840152610120830190612c72565b0390f35b90505f9291925260205f20905f915b8183106114a15750509060206113e0928201018b6113d3565b6020919350806001915483858c01015201910190918792611488565b602093506113e09592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201018b6113d3565b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760043573ffffffffffffffffffffffffffffffffffffffff61154c612ba9565b611554612e1e565b169081156103df5761271061156b60035483612ccf565b116115cb576020817ff0c09f5238364083d828870e877edaebb364d9f19f4093fdbf24e486bbdca48492600155837fffffffffffffffffffffffff00000000000000000000000000000000000000006002541617600255604051908152a2005b7fc9034e18000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760206040515f8152f35b346101e35761163936612c1d565b919290611644613331565b61164c613384565b611655826133fb565b60ff815460a01c1660068110156106505760010361062857600181015465ffffffffffff8160a01c164210156106285773ffffffffffffffffffffffffffffffffffffffff163303610600576105da946116d273ffffffffffffffffffffffffffffffffffffffff93610a43604051978892853360208601612dc9565b60038201916116e586868686541661345f565b740200000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff825416179055604051908152837f80c17db79857f338a6a6df68a6883ecc0ce78e2202fe61ed979733573f40538e60203393a3541661357c565b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761178d612ba9565b6004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435611824612e1e565b61271061183360015483612ccf565b116115cb576020817f24fe03678743d8fe5f3d39d760da9fc7a5f3feea46847d91688ba8ef9e400d1492600355604051908152a1005b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761189f612e1e565b6118a7613331565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416177fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602060405161012c8152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760206040517fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35773ffffffffffffffffffffffffffffffffffffffff611a1a612bcc565b165f526006602052602060ff60405f2054166040519015158152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602060ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054166040519015158152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435611acf613384565b611ad8816133fb565b60ff815460a01c166006811015908161065057801515918280611c72575b8181611c61575b506106285761065057600203611c225765ffffffffffff600183015460a01c16610e108101809111611bf5574210611bcd575b740500000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff835416178255611bbd575b507f97237956f8810192811e2c3f273fd02c5d6295206fdd9c62e6fe2bfc19ba92325f80a260017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b611bc79082613505565b81611b72565b7f478f84e7000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b65ffffffffffff600183015460a01c16421015611b30577f8e78f0cb000000000000000000000000000000000000000000000000000000005f5260045ffd5b905061065057600282141581611afd565b50505f6001821415611af6565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600554604051908152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760043567ffffffffffffffff81116101e357366023820112156101e357806004013567ffffffffffffffff81116101e3573660248260051b840101116101e357611d31612e1e565b600554915f5b828110156109685760248160051b830101359081158015611e16575b611dee57816001925f52600460205273ffffffffffffffffffffffffffffffffffffffff600360405f20015416908115611de757805f526004602052600360405f20017fffffffffffffffffffffffff000000000000000000000000000000000000000081541690557fcde6a24b3e1e5d23bc4d45609905c64b3516b23478ba2f7fdada3ab2bae3812d5f80a35b01611d37565b5050611de1565b7f71c8f460000000000000000000000000000000000000000000000000000000005f5260045ffd5b50848211611d53565b346101e357611e2d36612c1d565b919290611e38613331565b611e40613384565b611e49826133fb565b9384549060ff8260a01c169260068410159283610650578415948515611f97575073ffffffffffffffffffffffffffffffffffffffff1633141580611f73575b61060057611ea6905b610a43604051978892853360208601612dc9565b6003860191611ecd868673ffffffffffffffffffffffffffffffffffffffff86541661345f565b740400000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff885416178755610650576105da9573ffffffffffffffffffffffffffffffffffffffff9315611f63575b50604051908152837fae7362b1af91f4492868987b9c73990d780060811551b58728fbe96fd1bab27560203393a3541661357c565b611f6d9085613505565b86611f2e565b5073ffffffffffffffffffffffffffffffffffffffff600188015416331415611e89565b5f94506001811491508115611fd7575b50156106285773ffffffffffffffffffffffffffffffffffffffff600288015416330361060057611ea690611e92565b93505060025f931488611fa7565b346101e35760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761201c612bcc565b612024612ba9565b60443560643567ffffffffffffffff81116101e357612047903690600401612bef565b9390926084359273ffffffffffffffffffffffffffffffffffffffff8416918285036101e35773ffffffffffffffffffffffffffffffffffffffff9061208b613331565b612093613384565b169283156103df5761012c4201804211611bf55782118015906127d6575b6127ae5773ffffffffffffffffffffffffffffffffffffffff1693338514610ea457841515806127a5575b610e7c57825f52600660205260ff60405f2054161561277d5782151590816125a4575b5061257c576005547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611bf557600101948560055560405161214281612cdc565b33815287602082015f81526040830193888552606084019165ffffffffffff87168352608085019089825260a086019289845267ffffffffffffffff60c08801965f88521161254f578d906040519e8f6121c460207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160182612cf9565b5236828201116101e357818f5f936020938483013701015260e086019c8d528b5f52600460205273ffffffffffffffffffffffffffffffffffffffff8060405f20975116167fffffffffffffffffffffffff0000000000000000000000000000000000000000875416178655519060068210156106505760059673ffffffffffffffffffffffffffffffffffffffff9485937fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff00000000000000000000000000000000000000008a549260a01b169116178855838060018a01935116167fffffffffffffffffffffffff0000000000000000000000000000000000000000835416178255517fffffffffffff000000000000ffffffffffffffffffffffffffffffffffffffff79ffffffffffff000000000000000000000000000000000000000083549260a01b1691161790555116826002860191167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055511673ffffffffffffffffffffffffffffffffffffffff6003840191167fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905551600482015501955195865167ffffffffffffffff811161254f576123ac8254612d3a565b601f811161250a575b50806020988990601f831160011461246d575f92612462575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790555b604051928352858301526040820152827fb0f0239bfdd96453e24733e18bfc24b70d8fadf123dd977473518dd577ee79b960603393a460017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055604051908152f35b0151905089806123ce565b5f858152828120937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905b8181106124f357509084600195949392106124bc575b505050811b019055612400565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558980806124af565b92938c600181928786015181550195019301612499565b825f5260205f20601f830160051c81019160208410612545575b601f0160051c01905b81811061253a57506123b5565b5f815560010161252d565b9091508190612524565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f9c9d8823000000000000000000000000000000000000000000000000000000005f5260045ffd5b905060205f604051828101907f01ffc9a70000000000000000000000000000000000000000000000000000000082527f01ffc9a700000000000000000000000000000000000000000000000000000000602482015260248152612608604482612cf9565b519084617530fa903d5f519083612771575b5082612767575b50816126ce575b81612636575b5015876120ff565b602091505f90604051838101907f01ffc9a70000000000000000000000000000000000000000000000000000000082527f7ff6bc9e0000000000000000000000000000000000000000000000000000000060248201526024815261269b604482612cf9565b5191617530fa5f513d826126c2575b50816126b8575b508761262e565b90501515876126b1565b602011159150886126aa565b905060205f604051828101907f01ffc9a70000000000000000000000000000000000000000000000000000000082527fffffffff00000000000000000000000000000000000000000000000000000000602482015260248152612732604482612cf9565b519084617530fa5f513d8261275b575b5081612751575b501590612628565b9050151588612749565b60201115915089612742565b1515915088612621565b6020111592508961261a565b7fa04b28ec000000000000000000000000000000000000000000000000000000005f5260045ffd5b508385146120dc565b7ff7a0748c000000000000000000000000000000000000000000000000000000005f5260045ffd5b5065ffffffffffff82116120b1565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761281b612e1e565b612823613662565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054167fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576128ec612ba9565b3373ffffffffffffffffffffffffffffffffffffffff8216036129155761096890600435613229565b7f6697b232000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020604051610e108152f35b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610968600435612a04612ba9565b90612a3d61095e825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b613117565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600354604051908152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020612ae56004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b604051908152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036101e357817f7965db0b0000000000000000000000000000000000000000000000000000000060209314908115612b7f575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483612b78565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036101e357565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036101e357565b9181601f840112156101e35782359167ffffffffffffffff83116101e357602083818601950101116101e357565b60607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126101e35760043591602435916044359067ffffffffffffffff82116101e357612c6e91600401612bef565b9091565b91908251928382525f5b848110612cba5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b80602080928401015182828601015201612c7c565b91908201809211611bf557565b610100810190811067ffffffffffffffff82111761254f57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761254f57604052565b90600182811c92168015612d81575b6020831014612d5457565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691612d49565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b612dfb949273ffffffffffffffffffffffffffffffffffffffff60609316825260208201528160408201520191612d8b565b90565b91908203918211611bf557565b81810292918115918404141715611bf557565b335f9081527fb16e88c42fd4e48df2dd6a2eabd6bc9aec654ec170056b470819f8892cc6431c602052604090205460ff1615612e5657565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004527fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177560245260445ffd5b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f20541615612efd5750565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b73ffffffffffffffffffffffffffffffffffffffff81165f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff1661300e5773ffffffffffffffffffffffffffffffffffffffff165f8181527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505f90565b73ffffffffffffffffffffffffffffffffffffffff81165f9081527fb16e88c42fd4e48df2dd6a2eabd6bc9aec654ec170056b470819f8892cc6431c602052604090205460ff1661300e5773ffffffffffffffffffffffffffffffffffffffff165f8181527fb16e88c42fd4e48df2dd6a2eabd6bc9aec654ec170056b470819f8892cc6431c6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f205416155f1461322357805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f2054165f1461322357805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300541661335c57565b7fd93c0665000000000000000000000000000000000000000000000000000000005f5260045ffd5b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0054146133d35760027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b80158015613416575b611dee575f52600460205260405f2090565b506005548111613404565b7fffffffff00000000000000000000000000000000000000000000000000000000612dfb949360609383521660208201528160408201520190612c72565b73ffffffffffffffffffffffffffffffffffffffff16918261348057505050565b823b156101e3576134e8925f92836040518096819582947fdc08fb1d0000000000000000000000000000000000000000000000000000000084527fffffffff000000000000000000000000000000000000000000000000000000008535169060048501613421565b03925af180156103d4576134f95750565b5f61350391612cf9565b565b600482015491821561357757602073ffffffffffffffffffffffffffffffffffffffff7f7ca5472b7ea78c2c0141c5a12ee6d170cf4ce8ed06be3d22c8252ddfc7a6a2c49261355686600754612dfe565b60075561356b86835f54168484541690613605565b541693604051908152a3565b505050565b73ffffffffffffffffffffffffffffffffffffffff16918261359d57505050565b823b156101e3576134e8925f92836040518096819582947fa3fe47830000000000000000000000000000000000000000000000000000000084527fffffffff000000000000000000000000000000000000000000000000000000008535169060048501613421565b6135039273ffffffffffffffffffffffffffffffffffffffff604051937fa9059cbb000000000000000000000000000000000000000000000000000000006020860152166024840152604483015260448252610b5c606483612cf9565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054161561368e57565b7f8dfc202b000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156136e557565b7fd7e6bcf8000000000000000000000000000000000000000000000000000000005f5260045ffd5b905f602091828151910182855af1156103d4575f513d61378b575073ffffffffffffffffffffffffffffffffffffffff81163b155b6137495750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b6001141561374256fea26469706673582212206c80219f5022a102b78e2b3cea53bc36a61bd9d0874a3d24319381fbeaeb022a64736f6c634300081a0033608080604052346104ca57608081614c41803803809161001f8285610d0a565b8339810103126104ca578051906001600160a01b03821682036104ca5760208101516001600160a01b038116908190036104ca57600161006d606061006660408601610d41565b9401610d41565b938160ff19600c541617600c55601f54906101008360a81b039060081b1690828060a81b0319161717601f5560018060a01b0319602054161760205560018060a01b031660018060a01b0319602154161760215560018060a01b031660018060a01b031960225416176022555f5b60038110156105d35760405163348051d760e11b8152600481018290525f816024815f80516020614c218339815191525afa9081156104d6575f916105b9575b50604051906101566021836020810193606360f81b85526101458151809260208686019101610d79565b81010301601f198101845283610d0a565b60405160208101906101826020828651610171818789610d79565b81010301601f198101835282610d0a565b519020916040519263ffa1864960e01b845260048401526020836024815f80516020614c218339815191525afa9283156104d6575f9361057e575b505f80516020614c218339815191523b156104ca5761021260645f9260405194859384926318caf8e360e31b845260018060a01b03891660048501526040602485015251809281604486015285850190610d79565b601f01601f19168101030181835f80516020614c218339815191525af180156104d65761056e575b506023820180546001600160a01b0319166001600160a01b0390921691909117815560405163348051d760e11b8152600481018390525f816024815f80516020614c218339815191525afa9081156104d6575f9161054c575b50604051906102bd6021836020810193600760fc1b85526101458151809260208686019101610d79565b60405160208101906102d86020828651610171818789610d79565b519020916040519263ffa1864960e01b845260048401526020836024815f80516020614c218339815191525afa9283156104d6575f93610511575b505f80516020614c218339815191523b156104ca5761036860645f9260405194859384926318caf8e360e31b845260018060a01b03891660048501526040602485015251809281604486015285850190610d79565b601f01601f19168101030181835f80516020614c218339815191525af180156104d657610501575b506026830180546001600160a01b0319166001600160a01b0392831617905560205482549082169116813b156104ca575f916044839260405194859384926340c10f1960e01b8452600484015264e8d4a5100060248401525af180156104d6576104f1575b50546001600160a01b03165f80516020614c218339815191523b156104ca576040519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af180156104d6576104e1575b5060208054601f5460405163095ea7b360e01b81526001600160a01b0360089290921c821660048201525f1960248201529291839160449183915f91165af180156104d65761049b575b506001016100db565b6020813d82116104ce575b816104b360209383610d0a565b810103126104ca5751801515036104ca575f610492565b5f80fd5b3d91506104a6565b6040513d5f823e3d90fd5b5f6104eb91610d0a565b5f610448565b5f6104fb91610d0a565b5f6103f5565b5f61050b91610d0a565b5f610390565b9092506020813d8211610544575b8161052c60209383610d0a565b810103126104ca5761053d90610d41565b915f610313565b3d915061051f565b61056891503d805f833e6105608183610d0a565b810190610d9a565b5f610293565b5f61057891610d0a565b5f61023a565b9092506020813d82116105b1575b8161059960209383610d0a565b810103126104ca576105aa90610d41565b915f6101bd565b3d915061058c565b6105cd91503d805f833e6105608183610d0a565b5f61011b565b604080516105e18282610d0a565b600281526020810161065360f41b8152825160208101906106028284610d55565b60028152610611602282610d0a565b51902083519063ffa1864960e01b825260048201526020816024815f80516020614c218339815191525afa908115610c4f575f91610cd0575b505f80516020614c218339815191523b156104ca5761069e60645f92865194859384926318caf8e360e31b845260018060a01b03169788600485015289602485015251809281604486015285850190610d79565b601f01601f19168101030181835f80516020614c218339815191525af18015610ab157610cc0575b50602980546001600160a01b03191691909117905580516106e78282610d0a565b600281526020810161653160f01b8152825160208101906107088284610d55565b60028152610717602282610d0a565b51902083519063ffa1864960e01b825260048201526020816024815f80516020614c218339815191525afa908115610c4f575f91610c86575b505f80516020614c218339815191523b156104ca576107a460645f92865194859384926318caf8e360e31b845260018060a01b03169788600485015289602485015251809281604486015285850190610d79565b601f01601f19168101030181835f80516020614c218339815191525af18015610ab157610c76575b5060018060a01b0319602a541617602a5562278d00420190814211610bf857905f915b6003831015610c69576023830180549093906001600160a01b03165f80516020614c218339815191523b156104ca5782519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af18015610ab157610c59575b5060018060a01b03601f5460081c16938160260190602060018060a01b0383541660e460018060a01b0360295416915f88519a8b9485936320a9440960e11b8552600485015260248401528a604484015260a06064840152600460a4840152631cd9595960e21b60c48401528160848401525af1958615610c4f575f96610c1c575b5081545f91906001600160a01b03165f80516020614c218339815191523b156104ca5785519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af18015610bd457610c0c575b50601f54600185019060081c6001600160a01b0316818611610bf85781620f42400291620f4240830403610bf857803b156104ca578651633752ba7560e21b8152600481018a905260248101839052606060448201525f6064820181905290918290608490829084905af18015610bee57610bde575b50875f52602b602052855f2060ff1981541690556001851015610adf575b5050600283146109d4575b505060010192506107ef565b610acb57546001600160a01b03165f80516020614c218339815191523b156104ca5782519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af18015610ab157610abb575b50601f5460081c6001600160a01b031693843b156104ca575f80956084855180988193639e63798d60e01b8352866004840152816024840152606060448401528160648401525af1948515610ab1576001939495610aa1575b505f52602b602052825f20600260ff19825416179055839291856109c8565b5f610aab91610d0a565b85610a82565b83513d5f823e3d90fd5b5f610ac591610d0a565b84610a29565b634e487b7160e01b5f52603260045260245ffd5b90545f92506001600160a01b03165f80516020614c218339815191523b156104ca5785519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af18015610bd457610bc4575b50601f5460081c6001600160a01b0316803b156104ca578551630d2e13f560e41b8152600481018990526024810192909252606060448301525f60648301819052908290608490829084905af18015610bba57610baa575b50855f52602b602052835f20600160ff1982541617905586806109bd565b5f610bb491610d0a565b86610b8c565b85513d5f823e3d90fd5b5f610bce91610d0a565b87610b34565b86513d5f823e3d90fd5b5f610be891610d0a565b8861099f565b87513d5f823e3d90fd5b634e487b7160e01b5f52601160045260245ffd5b5f610c1691610d0a565b87610929565b9095506020813d8211610c47575b81610c3760209383610d0a565b810103126104ca575194866108d3565b3d9150610c2a565b84513d5f823e3d90fd5b5f610c6391610d0a565b84610851565b51613e169081610e0b8239f35b5f610c8091610d0a565b826107cc565b90506020813d602011610cb8575b81610ca160209383610d0a565b810103126104ca57610cb290610d41565b84610750565b3d9150610c94565b5f610cca91610d0a565b826106c6565b90506020813d602011610d02575b81610ceb60209383610d0a565b810103126104ca57610cfc90610d41565b8461064a565b3d9150610cde565b601f909101601f19168101906001600160401b03821190821017610d2d57604052565b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036104ca57565b5f5b60028110610d6957505060025f910152565b8181015183820152602001610d57565b5f5b838110610d8a5750505f910152565b8181015183820152602001610d7b565b6020818303126104ca578051906001600160401b0382116104ca570181601f820112156104ca5780516001600160401b038111610d2d5760405192610de9601f8301601f191660200185610d0a565b818452602082840101116104ca57610e079160208085019101610d79565b9056fe6080806040526004361015610012575f80fd5b5f905f3560e01c90816305e3769c1461191c57508063087320b2146118025780630b78f9c0146111ce5780631ed7831c146111255780632ade388014610f685780633e5e3c2314610ebf5780633f7286f414610e16578063531c7faa14610dfe57806359e1361914610dc25780635b7baf6414610d8757806366d9a9a014610c2c578063725cc2e114610c145780637f974c6f14610bd857806381ede1bb14610bc05780638253f2d91461080d57806385226c811461075d578063916a17c6146106885780639675dc1714610670578063b0464fdc1461059b578063b5508aa9146104eb578063b5c0922c146104a0578063ba414fa61461045d578063d130382514610445578063e20c9f711461038c578063e5d6bf02146101f1578063e662e387146101b0578063fa7626d41461016f5763fd61a25614610152575f80fd5b3461016c5761016961016336611c67565b91612d94565b80f35b80fd5b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57602060ff601f54166040519015158152f35b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57602060ff602f54166040519015158152f35b503461016c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57806102336202a3006001600435613b7d565b6102fb604091838084516102478682611a0b565b600c81527f426f756e6420726573756c740000000000000000000000000000000000000000602082015285516102e4816102b260208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528a60248401526064830190611b2b565b876044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50426128c2565b90737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610388578051917fe5d6bf020000000000000000000000000000000000000000000000000000000083526004830152828260248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af190811561037f575061036e5750f35b8161037891611a0b565b61016c5780f35b513d84823e3d90fd5b5050fd5b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601554928381520191601582527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475915b818110610419576104158561040981870382611a0b565b60405191829182611ba2565b0390f35b825473ffffffffffffffffffffffffffffffffffffffff168452602090930192600192830192016103f2565b503461016c5761016961045736611c67565b91612b77565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576020610496612a9e565b6040519015158152f35b503461016c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760ff60406020926004358152602b8452205416604051908152f35b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760195461052681611db7565b916105346040519384611a0b565b818352601981527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c9695602084015b83831061057e576040516020808252819061041590820188611bf1565b60016020819261058d85611a4c565b815201920192019190610561565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601c546105d681611db7565b916105e46040519384611a0b565b818352601c81527f0e4562a10381dec21b205ed72637e6b1b523bdd0e4d4d50af5cd23dd4500a211602084015b83831061062657604051806104158782611d06565b60026020600192604051610639816119a5565b73ffffffffffffffffffffffffffffffffffffffff865416815261065e8587016121fe565b83820152815201920192019190610611565b503461016c5761016961068236611b6e565b906128cf565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601d546106c381611db7565b916106d16040519384611a0b565b818352601d81527f6d4407e7be21f808e6509aa9fa9143369579dd7d760fe20a2c09680fc146134f602084015b83831061071357604051806104158782611d06565b60026020600192604051610726816119a5565b73ffffffffffffffffffffffffffffffffffffffff865416815261074b8587016121fe565b838201528152019201920191906106fe565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601a5461079881611db7565b916107a66040519384611a0b565b818352601a81527f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e602084015b8383106107f0576040516020808252819061041590820188611bf1565b6001602081926107ff85611a4c565b8152019201920191906107d3565b503461016c5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576084358015158103610bbc5760a4358015158103610bb8576003600435066003811015610b85576023015473ffffffffffffffffffffffffffffffffffffffff169115610bb2576003602435066003811015610b85576026015473ffffffffffffffffffffffffffffffffffffffff165b6001604435166002811015610b585773ffffffffffffffffffffffffffffffffffffffff85916029015416926108ec62278d00610168606435613b7d565b9060409583808861096b61099d82516109058482611a0b565b600c81527f426f756e6420726573756c7400000000000000000000000000000000000000006020820152835192839160208301957fb60e72cc00000000000000000000000000000000000000000000000000000000875260248401526064830190611b2b565b896044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b4a578651907fca669fa70000000000000000000000000000000000000000000000000000000082526004820152838160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af18015610b4e57610b2e575b509273ffffffffffffffffffffffffffffffffffffffff9260c49284602096610a4d82601f5460081c1693426128c2565b9015610b27578160225416905b8a51998a9889977f415288120000000000000000000000000000000000000000000000000000000089521660048801526024870152604486015260a060648601528360a48601521660848401525af1839181610aef575b50610aba578280f35b8252602b60205281207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690555f808280f35b9091506020813d602011610b1f575b81610b0b60209383611a0b565b81010312610b1b5751905f610ab1565b5f80fd5b3d9150610afe565b8390610a5a565b92610b3d818096939495611a0b565b610b4a579291905f610a1c565b8380fd5b87513d86823e3d90fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b826108ae565b8280fd5b5080fd5b503461016c57610169610bd236611c67565b91612678565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576020602c54604051908152f35b503461016c57610169610c2636611b6e565b906124d9565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601b54610c6781611db7565b610c746040519182611a0b565b818152601b83526020810191837f3ad8aa4f87544323a9d1e5dd902f40c356527a7955687113db5f9a85ad579dc1845b838310610d4c57868587604051928392602084019060208552518091526040840160408260051b8601019392905b828210610ce157505050500390f35b91936020610d3c827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0600195979984950301865288519083610d2c8351604084526040840190611b2b565b9201519084818403910152611cb1565b9601920192018594939192610cd2565b60026020600192604051610d5f816119a5565b610d6886611a4c565b8152610d758587016121fe565b83820152815201920192019190610ca4565b503461016c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57610169600435612106565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576020602e54604051908152f35b503461016c57610169610e1036611c67565b91611dfc565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601754928381520191601782527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c15915b818110610e93576104158561040981870382611a0b565b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201610e7c565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601854928381520191601882527fb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2e915b818110610f3c576104158561040981870382611a0b565b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201610f25565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601e54610fa381611db7565b610fb06040519182611a0b565b818152601e83526020810191837f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e350845b83831061108f57868587604051928392602084019060208552518091526040840160408260051b8601019392905b82821061101d57505050500390f35b9193602061107f827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186526040838a5173ffffffffffffffffffffffffffffffffffffffff815116845201519181858201520190611bf1565b960192019201859493919261100e565b60405161109b816119a5565b73ffffffffffffffffffffffffffffffffffffffff83541681526001830180546110c481611db7565b916110d26040519384611a0b565b8183528a526020808b20908b9084015b838210611108575050505060019282602092836002950152815201920192019190610fe0565b60016020819261111786611a4c565b8152019301910190916110e2565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601654928381520191601682527fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b5124289915b8181106111a2576104158561040981870382611a0b565b825473ffffffffffffffffffffffffffffffffffffffff1684526020909301926001928301920161118b565b5034610b1b575f906111ec6127106111e536611b6e565b9490613b7d565b916040905f8083516111fe8582611a0b565b600c81527f426f756e6420726573756c7400000000000000000000000000000000000000006020820152845161129b8161126960208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528960248401526064830190611b2b565b8a6044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50836127100361271081116117d5575f6112c492613b7d565b5f8083516112d28582611a0b565b600c81527f426f756e6420726573756c7400000000000000000000000000000000000000006020820152845161133d816102b260208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528960248401526064830190611b2b565b51906a636f6e736f6c652e6c6f675afa5073ffffffffffffffffffffffffffffffffffffffff60215416737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b578251907f06447d5600000000000000000000000000000000000000000000000000000000825260048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af180156117cb576117b6575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610b4a5783809160248551809481937f84f150900000000000000000000000000000000000000000000000000000000083528160048401525af1801561171e579084916117a1575b505073ffffffffffffffffffffffffffffffffffffffff601f5460081c168251946114688487611a0b565b600886527f747265617375727900000000000000000000000000000000000000000000000060208701528351855b6008811061178c5750958686602881990152600881526114b7602882611a0b565b602081519101208551907fffa186490000000000000000000000000000000000000000000000000000000082526004820152602081602481737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa908115611744578791611752575b50737109709ecfa91a80626ff3989d68f67f5b1dd12d3b1561174e578673ffffffffffffffffffffffffffffffffffffffff61158c92885193849283927fc657c71800000000000000000000000000000000000000000000000000000000845216958660048401528a60248401526044830190611b2b565b038183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af180156117445790879161172f575b5050823b1561172b576044869283875195869485937fb4d884f6000000000000000000000000000000000000000000000000000000008552600485015260248401525af1801561171e57908491611709575b505073ffffffffffffffffffffffffffffffffffffffff601f5460081c1690813b1561170457839160248392855194859384927f84f1509000000000000000000000000000000000000000000000000000000000845260048401525af180156116f8579083916116e3575b5050737109709ecfa91a80626ff3989d68f67f5b1dd12d3b156116e0578051907f90c5013b000000000000000000000000000000000000000000000000000000008252828260048183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af190811561037f575061036e5750f35b50fd5b816116ed91611a0b565b6116e057815f611671565b505051903d90823e3d90fd5b505050fd5b8161171391611a0b565b61038857825f611606565b50505051903d90823e3d90fd5b8580fd5b8161173991611a0b565b61172b57855f6115b4565b86513d89823e3d90fd5b8680fd5b90506020813d602011611784575b8161176d60209383611a0b565b8101031261174e5761177e906130cc565b5f611514565b3d9150611760565b80602080928a01015182828501015201611496565b816117ab91611a0b565b610bb857825f61143d565b6117c39193505f90611a0b565b5f915f6113d5565b83513d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b34610b1b575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610b1b576040515f60305461184081611954565b80845290600181169081156118da575060011461187c575b6104158361186881850382611a0b565b604051918291602083526020830190611b2b565b60305f9081527f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb939250905b8082106118c057509091508101602001611868611858565b9192600181602092548385880101520191019092916118a8565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208086019190915291151560051b840190910191506118689050611858565b34610b1b575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610b1b57602090602d548152f35b90600182811c9216801561199b575b602083101461196e57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691611963565b6040810190811067ffffffffffffffff8211176119c157604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610100810190811067ffffffffffffffff8211176119c157604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176119c157604052565b9060405191825f825492611a5f84611954565b8084529360018116908115611aca5750600114611a86575b50611a8492500383611a0b565b565b90505f9291925260205f20905f915b818310611aae575050906020611a84928201015f611a77565b6020919350806001915483858901015201910190918492611a95565b60209350611a849592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f611a77565b5f5b838110611b1b5750505f910152565b8181015183820152602001611b0c565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093611b6781518092818752878088019101611b0a565b0116010190565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6040910112610b1b576004359060243590565b60206040818301928281528451809452019201905f5b818110611bc55750505090565b825173ffffffffffffffffffffffffffffffffffffffff16845260209384019390920191600101611bb8565b9080602083519182815201916020808360051b8301019401925f915b838310611c1c57505050505090565b9091929394602080611c58837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe086600196030187528951611b2b565b97019301930191939290611c0d565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6060910112610b1b57600435906024358015158103610b1b57906044358015158103610b1b5790565b90602080835192838152019201905f5b818110611cce5750505090565b82517fffffffff0000000000000000000000000000000000000000000000000000000016845260209384019390920191600101611cc1565b602081016020825282518091526040820191602060408360051b8301019401925f915b838310611d3857505050505090565b9091929394602080611d9b837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187526040838b5173ffffffffffffffffffffffffffffffffffffffff815116845201519181858201520190611cb1565b97019301930191939290611d29565b919082039182116117d557565b67ffffffffffffffff81116119c15760051b60200190565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146117d55760010190565b90919082806120fd575b5f93156120ec57611e15613090565b50611e1f8261387b565b9281156120d7575b5091905b82156120d05783156120a1575060208101519060068210156120745773ffffffffffffffffffffffffffffffffffffffff9161206a5760800151165b925b815f52602b60205260ff60405f20541693737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f5761204c575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610bbc57818080926084604051809581937f41dd26f5000000000000000000000000000000000000000000000000000000008352896004840152816024840152606060448401528160648401525af19182612037575b5050611f82575b50505050565b611f9192611fca575b50613550565b60018114908115611fbf575b50611fac575b5f808080611f7c565b611fb7602e54611dcf565b602e55611fa3565b60029150145f611f9d565b50612031604051611fdc606082611a0b565b602181527f72656a6563742073756363656564656420776974682077726f6e67206163746f60208201527f7200000000000000000000000000000000000000000000000000000000000000604082015261333e565b5f611f8b565b8161204191611a0b565b610bbc57815f611f75565b61205891505f90611a0b565b5f80611eff565b6040513d5f823e3d90fd5b6040015116611e67565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b73ffffffffffffffffffffffffffffffffffffffff9190156120c95760800151165b92611e69565b51166120c3565b5050505050565b90506120e49192506139fc565b91905f611e27565b906120f690613225565b9091611e2b565b82159350611e06565b61210e613090565b506121188161387b565b509081156121ed575b5080156121ea57805f52602b60205260ff60405f2054169073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610b1b575f80916024604051809481937f5b7baf640000000000000000000000000000000000000000000000000000000083528760048401525af190816121da575b506121a3575050565b6121ac90613550565b600181149081156121cf575b506121bf57565b6121ca602e54611dcf565b602e55565b60029150145f6121b8565b5f6121e491611a0b565b5f61219a565b50565b6121f791506139fc565b505f612121565b90604051918281549182825260208201905f5260205f20925f905b80600783011061241557611a849454918181106123df575b8181106123a9575b818110612373575b81811061233d575b818110612307575b8181106122d1575b81811061229c575b1061226f575b500383611a0b565b7fffffffff000000000000000000000000000000000000000000000000000000001681526020015f612267565b9260206001917fffffffff0000000000000000000000000000000000000000000000000000000085831b168152019301612261565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560401b168152019301612259565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560601b168152019301612251565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560801b168152019301612249565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560a01b168152019301612241565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560c01b168152019301612239565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560e01b168152019301612231565b9160089193506101006001917fffffffff000000000000000000000000000000000000000000000000000000008754818160e01b168352818160c01b166020840152818160a01b166040840152818160801b166060840152818160601b166080840152818160401b1660a0840152818160201b1660c08401521660e0820152019401920185929391612219565b81156124ac570690565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b6124e290613225565b90915f918315611f7c575173ffffffffffffffffffffffffffffffffffffffff16737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b57604051907fca669fa700000000000000000000000000000000000000000000000000000000825260048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612663575b50600373ffffffffffffffffffffffffffffffffffffffff601f5460081c1691066003811015612636576026015473ffffffffffffffffffffffffffffffffffffffff16813b15610bb85782916084839260405195869384927fc9a84bb90000000000000000000000000000000000000000000000000000000084528960048501526024840152606060448401528160648401525af19182612621575b50506126185750565b611a8490613550565b61262c828092611a0b565b61016c578061260f565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6126709192505f90611a0b565b5f905f612572565b5f91156128b15761268890613225565b9190915b8215611f7c57838015612899575b1561287c5773ffffffffffffffffffffffffffffffffffffffff6040820151165b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612867575b5060c073ffffffffffffffffffffffffffffffffffffffff601f5460081c16910151813b15610bb8576040517fd2e13f50000000000000000000000000000000000000000000000000000000008152600481018590526024810191909152606060448201525f606482015290829081908390608490829084905af19182612852575b50506127cd57505050565b6127db926127eb5750613550565b6127e6602c54611dcf565b602c55565b506120316040516127fd606082611a0b565b602681527f66756e642073756363656564656420776974682077726f6e672073746174757360208201527f2f6163746f720000000000000000000000000000000000000000000000000000604082015261333e565b8161285c91611a0b565b610bbc57815f6127c2565b6128749192505f90611a0b565b5f905f612740565b73ffffffffffffffffffffffffffffffffffffffff8151166126bb565b9350602081015160068110156120745715159361269a565b6128ba906136e4565b91909161268c565b919082018092116117d557565b6128d890613225565b5f929192918315611f7c57633b9aca005f6128f292613b7d565b73ffffffffffffffffffffffffffffffffffffffff604080935f8083516129198582611a0b565b600c81527f426f756e6420726573756c740000000000000000000000000000000000000000602082015284516129848161126960208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528960248401526064830190611b2b565b51906a636f6e736f6c652e6c6f675afa50015116737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b578251907fca669fa700000000000000000000000000000000000000000000000000000000825260048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af180156117cb57612a89575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c1691823b15610b4a57517fdd4ae9d4000000000000000000000000000000000000000000000000000000008152600481018590526024810191909152606060448201525f6064820152919081908390608490829084905af191826126215750506126185750565b612a969193505f90611a0b565b5f915f612a06565b60085460ff168015612aad5790565b506040517f667f9d70000000000000000000000000000000000000000000000000000000008152737109709ecfa91a80626ff3989d68f67f5b1dd12d60048201527f6661696c656400000000000000000000000000000000000000000000000000006024820152602081604481737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa90811561205f575f91612b45575b50151590565b90506020813d602011612b6f575b81612b6060209383611a0b565b81010312610b1b57515f612b3f565b3d9150612b53565b5f9115612d8357612b8790613225565b9190915b8215611f7c57838015612d65575b73ffffffffffffffffffffffffffffffffffffffff919015612d5b5751165b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612d48575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610bbc57818080926084604051809581937f9e63798d000000000000000000000000000000000000000000000000000000008352896004840152816024840152606060448401528160648401525af19182612d33575b5050612cbe57505050565b611a8492612ccc5750613550565b50612031604051612cde606082611a0b565b602881527f7375626d69742073756363656564656420776974682077726f6e67207374617460208201527f75732f6163746f72000000000000000000000000000000000000000000000000604082015261333e565b81612d3d91611a0b565b610bbc57815f612cb3565b612d5491505f90611a0b565b5f80612c3d565b6040015116612bb8565b93506020810151906006821015612074576001919091141593612b99565b612d8c9061387b565b919091612b8b565b5f9115612fb057612da490613225565b9190915b8215611f7c57838015612f92575b73ffffffffffffffffffffffffffffffffffffffff919015612f885751165b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612f75575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610bbc57818080926084604051809581937fd75bbdf3000000000000000000000000000000000000000000000000000000008352896004840152816024840152606060448401528160648401525af19182612f60575b5050612edb57505050565b612ee992612ef95750613550565b612ef4602d54611dcf565b602d55565b50612031604051612f0b606082611a0b565b602a81527f636f6d706c6574652073756363656564656420776974682077726f6e6720737460208201527f617475732f6163746f7200000000000000000000000000000000000000000000604082015261333e565b81612f6a91611a0b565b610bbc57815f612ed0565b612f8191505f90611a0b565b5f80612e5a565b6080015116612dd5565b93506020810151906006821015612074576002919091141593612db6565b612fb9906139fc565b919091612da8565b906001612fcd92613b7d565b905f80604051612fde604082611a0b565b600c81527f426f756e6420726573756c740000000000000000000000000000000000000000602082015260405161307d8161304b60208201947fb60e72cc000000000000000000000000000000000000000000000000000000008652604060248401526064830190611b2b565b886044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50565b6040519061309d826119ee565b606060e0835f81525f60208201525f60408201525f838201525f60808201525f60a08201525f60c08201520152565b519073ffffffffffffffffffffffffffffffffffffffff82168203610b1b57565b602081830312610b1b5780519067ffffffffffffffff8211610b1b57019061010082820312610b1b5760405191613123836119ee565b61312c816130cc565b835260208101516006811015610b1b57602084015261314d604082016130cc565b6040840152606081015165ffffffffffff81168103610b1b576060840152613177608082016130cc565b608084015261318860a082016130cc565b60a084015260c081015160c084015260e08101519067ffffffffffffffff8211610b1b570181601f82011215610b1b57805167ffffffffffffffff81116119c157604051926131ff601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200185611a0b565b81845260208284010111610b1b5761321d9160208085019101611b0a565b60e082015290565b9061322e613090565b73ffffffffffffffffffffffffffffffffffffffff601f5460081c1692604051917f50355d76000000000000000000000000000000000000000000000000000000008352602083600481885afa92831561205f575f9361330a575b508215613301575061329e6024925f92612fc1565b93604051928380927fbf22c4570000000000000000000000000000000000000000000000000000000082528760048301525afa90811561205f575f916132e2575090565b6132fe91503d805f833e6132f68183611a0b565b8101906130ed565b90565b935050505f9190565b9092506020813d602011613336575b8161332660209383611a0b565b81010312610b1b5751915f613289565b3d9150613319565b90602f5460ff81161561335057509050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117602f55815167ffffffffffffffff81116119c157613394603054611954565b601f81116134af575b50602092601f82116001146133f657928192935f926133eb575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c191617603055565b015190505f806133b7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169360305f527f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb915f5b8681106134975750836001959610613460575b505050811b01603055565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690555f8080613455565b91926020600181928685015181550194019201613442565b60305f52601f820160051c7f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb019060208310613528575b601f0160051c7f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb01905b81811061351d575061339d565b5f8155600101613510565b7f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb91506134e6565b805f52602b60205260ff60405f2054169060245f73ffffffffffffffffffffffffffffffffffffffff601f5460081c16604051928380927fbf22c4570000000000000000000000000000000000000000000000000000000082528660048301525afa801561205f576020915f916136ca575b5001519160068310156120745782600382106136785750506136406040516135eb606082611a0b565b602281527f616374696f6e20737563636565646564206f6e2061207465726d696e616c206a60208201527f6f62000000000000000000000000000000000000000000000000000000000000604082015261333e565b5f52602b60205260ff60405f2091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b61368191613d55565b613640576136c5604051613696604082611a0b565b601981527f696c6c6567616c20737461747573207472616e736974696f6e00000000000000602082015261333e565b613640565b6136de91503d805f833e6132f68183611a0b565b5f6135c2565b906136ed613090565b9173ffffffffffffffffffffffffffffffffffffffff601f5460081c1690604051907f50355d76000000000000000000000000000000000000000000000000000000008252602082600481865afa91821561205f575f92613847575b50811561383f578161375a91612fc1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908111915f5b8181106137945750505050505f9190565b836117d5576137ac826137a783866128c2565b6124a2565b600181018091116117d557604051907fbf22c4570000000000000000000000000000000000000000000000000000000082528060048301525f826024818a5afa91821561205f575f92613823575b50602082015160068110156120745715613818575050600101613783565b975095945050505050565b6138389192503d805f833e6132f68183611a0b565b905f6137fa565b5050505f9190565b9091506020813d602011613873575b8161386360209383611a0b565b81010312610b1b5751905f613749565b3d9150613856565b90613884613090565b9173ffffffffffffffffffffffffffffffffffffffff601f5460081c1690604051907f50355d76000000000000000000000000000000000000000000000000000000008252602082600481865afa91821561205f575f926139c8575b50811561383f57816138f191612fc1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908111915f5b81811061392b5750505050505f9190565b836117d55761393e826137a783866128c2565b600181018091116117d557604051907fbf22c4570000000000000000000000000000000000000000000000000000000082528060048301525f826024818a5afa91821561205f575f926139ac575b50602082015160068110156120745760011461381857505060010161391a565b6139c19192503d805f833e6132f68183611a0b565b905f61398c565b9091506020813d6020116139f4575b816139e460209383611a0b565b81010312610b1b5751905f6138e0565b3d91506139d7565b90613a05613090565b9173ffffffffffffffffffffffffffffffffffffffff601f5460081c1690604051907f50355d76000000000000000000000000000000000000000000000000000000008252602082600481865afa91821561205f575f92613b49575b50811561383f5781613a7291612fc1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908111915f5b818110613aac5750505050505f9190565b836117d557613abf826137a783866128c2565b600181018091116117d557604051907fbf22c4570000000000000000000000000000000000000000000000000000000082528060048301525f826024818a5afa91821561205f575f92613b2d575b506020820151600681101561207457600214613818575050600101613a9b565b613b429192503d805f833e6132f68183611a0b565b905f613b0d565b9091506020813d602011613b75575b81613b6560209383611a0b565b81010312610b1b5751905f613a61565b3d9150613b58565b5f90838311613cd15782811091821580613cc7575b613cbf57613ba08486611daa565b92600184018094116117d557600383111580613cb6575b613ca7577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc83101580613c9d575b613c8c5785831115613c44575050906137a784613c0193611daa565b908115613c3f57613c1292506128c2565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81019081116117d55790565b505090565b959492919095613c545750505050565b839495506137a790613c669394611daa565b908115613c3f57613c779250611daa565b600181018091116117d557905f808080611f7c565b505090506132fe9291501990611daa565b5082198411613be5565b50509190506132fe92506128c2565b50828411613bb7565b509250505090565b5084821115613b92565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5374645574696c7320626f756e642875696e743235362c75696e743235362c7560448201527f696e74323536293a204d6178206973206c657373207468616e206d696e2e00006064820152fd5b60ff168015613db75760018114613d9e57600214613d7257505f90565b60ff1660038114908115613d93575b8115613d8b575090565b600591501490565b600481149150613d81565b5060ff1660028114908115613d93578115613d8b575090565b5060ff168015908115613dd5575b8115613d93578115613d8b575090565b600181149150613dc556fea264697066735822122087a51d10e0458fb317219be7eb23f08edb70a540fa5ddaaf1fe23542f4215bae64736f6c634300081a00330000000000000000000000007109709ecfa91a80626ff3989d68f67f5b1dd12d60806040523461031057610e1e8038038061001981610314565b9283398101906040818303126103105780516001600160401b0381116103105782610045918301610339565b60208201519092906001600160401b038111610310576100659201610339565b81516001600160401b03811161022357600354600181811c91168015610306575b602082101461020557601f81116102a3575b50602092601f821160011461024257928192935f92610237575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161022357600454600181811c91168015610219575b602082101461020557601f81116101a2575b50602091601f8211600114610142579181925f92610137575b50508160011b915f199060031b1c1916176004555b604051610a7b90816103a38239f35b015190505f80610113565b601f1982169260045f52805f20915f5b85811061018a57508360019510610172575b505050811b01600455610128565b01515f1960f88460031b161c191690555f8080610164565b91926020600181928685015181550194019201610152565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c810191602084106101fb575b601f0160051c01905b8181106101f057506100fa565b5f81556001016101e3565b90915081906101da565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e8565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b2565b601f1982169360035f52805f20915f5b86811061028b5750836001959610610273575b505050811b016003556100c7565b01515f1960f88460031b161c191690555f8080610265565b91926020600181928685015181550194019201610252565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c810191602084106102fc575b601f0160051c01905b8181106102f15750610098565b5f81556001016102e4565b90915081906102db565b90607f1690610086565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761022357604052565b81601f82011215610310578051906001600160401b03821161022357610368601f8301601f1916602001610314565b9282845260208383010111610310575f5b82811061038d57505060205f918301015290565b8060208092840101518282870101520161037956fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde031461077257508063095ea7b3146106c557806318160ddd1461068a57806323b872dd146104f6578063313ce567146104bd57806340c10f19146103be57806370a082311461035c57806395d89b4114610169578063a9059cbb1461011a5763dd62ed3e1461008a575f80fd5b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576100c1610909565b73ffffffffffffffffffffffffffffffffffffffff6100de61092c565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101165761015e610154610909565b602435903361094f565b602060405160018152f35b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576040515f600454908160011c60018316928315610352575b6020821084146103255781855284939081156102c5575060011461024b575b5003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01681019067ffffffffffffffff82118183101761021e5761021a829182604052826108a3565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102a957505081016020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101ce565b6020919350806001915483858801015201910190918392610275565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b840190910191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090506101ce565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f16906101af565b346101165760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101165773ffffffffffffffffffffffffffffffffffffffff6103a8610909565b165f525f602052602060405f2054604051908152f35b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576103f5610909565b73ffffffffffffffffffffffffffffffffffffffff16602435811561049157600254908082018092116104645760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011657602060405160068152f35b346101165760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101165761052d610909565b61053561092c565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81106105b1575b5061015e935061094f565b83811061065657841561062a5733156105fe5761015e945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f2091039055846105a6565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576020600254604051908152f35b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576106fc610909565b60243590331561062a5773ffffffffffffffffffffffffffffffffffffffff169081156105fe57335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116575f600354908160011c60018316928315610899575b6020821084146103255781855284939081156102c5575060011461081f575003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01681019067ffffffffffffffff82118183101761021e5761021a829182604052826108a3565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061087d57505081016020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101ce565b6020919350806001915483858801015201910190918392610849565b90607f16906107b5565b919091602081528251928360208301525f5b8481106108f35750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6040809697860101520116010190565b80602080928401015160408286010152016108b5565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361011657565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361011657565b73ffffffffffffffffffffffffffffffffffffffff16908115610a195773ffffffffffffffffffffffffffffffffffffffff1691821561049157815f525f60205260405f20548181106109e757817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea26469706673582212207d4081a323998c8d20751316ef809be0cc398b922c8a680eea7ed1d1bc08e9bf64736f6c634300081a003360808060405234601557610fd0908161001a8239f35b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714610b915750806306661abd14610b575780633a32058114610a1d578063a3fe4783146105eb578063d183ce14146105295763dc08fb1d1461005e575f80fd5b346103cb5761006c36610cb1565b9092916040517fbf22c4570000000000000000000000000000000000000000000000000000000081528360048201525f81602481335afa801561051e575f906103fc575b6020915001519260068410156103cf57604051926100cd84610e07565b60018452602084019182527fffffffff00000000000000000000000000000000000000000000000000000000604085019316835261010a81610f60565b956101186040519788610e40565b81875236828201116103cb57815f92602092838a0137870101526060830194855260ff60808401941684525f54680100000000000000008110156103725780600161016592015f55610d51565b93909361039f5751151560ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00855416911617835551600183015560028201905160e01c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082541617905560038101925192835167ffffffffffffffff8111610372576101f28254610db6565b601f811161032d575b506020601f8211600114610287579080600494939260ff96975f9261027c575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790555b019151167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790555f80f35b015190505f8061021b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0821695835f52815f20965f5b8181106103155750966001928492600497969560ff999a106102de575b505050811b01905561024d565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690555f80806102d1565b838301518955600190980197602093840193016102b4565b825f5260205f20601f830160051c81019160208410610368575b601f0160051c01905b81811061035d57506101fb565b5f8155600101610350565b9091508190610347565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b503d805f833e61040c8183610e40565b8101906020818303126103cb5780519067ffffffffffffffff82116103cb5701610100818303126103cb576040519061044482610e23565b61044d81610f3f565b8252602081015160068110156103cb57602083015261046e60408201610f3f565b6040830152606081015165ffffffffffff811681036103cb57606083015261049860808201610f3f565b60808301526104a960a08201610f3f565b60a083015260c081015160c083015260e08101519067ffffffffffffffff82116103cb57019180601f840112156103cb578251926104e684610f60565b916104f46040519384610e40565b848352602085830101116103cb5760209361051491858085019101610c4d565b60e08201526100b0565b6040513d5f823e3d90fd5b346103cb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb576004355f548110156103cb5761056d90610d51565b5060ff8154166001820154916105e1600282015460e01b917fffffffff0000000000000000000000000000000000000000000000000000000060ff60046105b660038501610e81565b930154169360405196879615158752602087015216604085015260a0606085015260a0840190610c6e565b9060808301520390f35b346103cb576105f936610cb1565b9092916040517fbf22c4570000000000000000000000000000000000000000000000000000000081528360048201525f81602481335afa801561051e575f906108fb575b6020915001519260068410156103cf576040519261065a84610e07565b5f8452602084019182527fffffffff00000000000000000000000000000000000000000000000000000000604085019316835261069681610f60565b956106a46040519788610e40565b81875236828201116103cb57815f92602092838a0137870101526060830194855260ff60808401941684525f5468010000000000000000811015610372578060016106f192015f55610d51565b93909361039f5751151560ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00855416911617835551600183015560028201905160e01c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082541617905560038101925192835167ffffffffffffffff81116103725761077e8254610db6565b601f81116108b6575b506020601f8211600114610811579080600494939260ff96975f926108065750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916179055019151167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790555f80f35b01519050878061021b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0821695835f52815f20965f5b81811061089e5750966001928492600497969560ff999a1061086757505050811b01905561024d565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558780806102d1565b8383015189556001909801976020938401930161083e565b825f5260205f20601f830160051c810191602084106108f1575b601f0160051c01905b8181106108e65750610787565b5f81556001016108d9565b90915081906108d0565b503d805f833e61090b8183610e40565b8101906020818303126103cb5780519067ffffffffffffffff82116103cb5701610100818303126103cb576040519061094382610e23565b61094c81610f3f565b8252602081015160068110156103cb57602083015261096d60408201610f3f565b6040830152606081015165ffffffffffff811681036103cb57606083015261099760808201610f3f565b60808301526109a860a08201610f3f565b60a083015260c081015160c083015260e08101519067ffffffffffffffff82116103cb57019180601f840112156103cb578251926109e584610f60565b916109f36040519384610e40565b848352602085830101116103cb57602093610a1391858085019101610c4d565b60e082015261063d565b346103cb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb575f6080604051610a5b81610e07565b8281528260208201528260408201526060808201520152610a7d600435610d51565b50604051610a8a81610e07565b60ff825416151581526001820154916020820192835260ff610b4b600283015460e01b927fffffffff0000000000000000000000000000000000000000000000000000000060408601941684527fffffffff00000000000000000000000000000000000000000000000000000000836004610b0760038501610e81565b93606089019485520154169460808701958652604051978897602089525115156020890152516040880152511660608601525160a0608086015260c0850190610c6e565b91511660a08301520390f35b346103cb575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb5760205f54604051908152f35b346103cb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb57600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036103cb57817f7ff6bc9e0000000000000000000000000000000000000000000000000000000060209314908115610c23575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610c1c565b5f5b838110610c5e5750505f910152565b8181015183820152602001610c4f565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093610caa81518092818752878088019101610c4d565b0116010190565b9060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8301126103cb57600435916024357fffffffff00000000000000000000000000000000000000000000000000000000811681036103cb579160443567ffffffffffffffff81116103cb57826023820112156103cb5780600401359267ffffffffffffffff84116103cb57602484830101116103cb576024019190565b5f54811015610d89575f8080526005919091027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630191565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b90600182811c92168015610dfd575b6020831014610dd057565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691610dc5565b60a0810190811067ffffffffffffffff82111761037257604052565b610100810190811067ffffffffffffffff82111761037257604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761037257604052565b9060405191825f825492610e9484610db6565b8084529360018116908115610eff5750600114610ebb575b50610eb992500383610e40565b565b90505f9291925260205f20905f915b818310610ee3575050906020610eb9928201015f610eac565b6020919350806001915483858901015201910190918492610eca565b60209350610eb99592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f610eac565b519073ffffffffffffffffffffffffffffffffffffffff821682036103cb57565b67ffffffffffffffff811161037257601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0166020019056fea2646970667358221220af75d4a17c0b6da6a3609fe1e4338988c321fe2d51d15dda0930b8f2e25388aa64736f6c634300081a0033a2646970667358221220f16bdcf0e1bc42cc06e2748da5fb883ec4927ec1a6fcacf0ab8a4e3b5625b20f64736f6c634300081a0033","gas_used":11529646,"gas_limit":1072816766,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[{"Call":0},{"Call":1},{"Call":2},{"Call":3},{"Call":4},{"Call":5},{"Call":6},{"Call":7},{"Call":8},{"Call":9},{"Call":10},{"Call":11},{"Call":12},{"Call":13}]},{"parent":0,"children":[],"idx":1,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa186494faf2c8c453a4f5f1ae5b7803c26fd198403e6bb0a7505c9a6ba577b0b499018","output":"0x000000000000000000000000d49279c8fc3454d7328eb8777274812e84b658df","gas_used":0,"gas_limit":1056007269,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":2,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c718000000000000000000000000d49279c8fc3454d7328eb8777274812e84b658df000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000156b65726e656c50726f787941646d696e4f776e65720000000000000000000000","output":"0x","gas_used":0,"gas_limit":1056006414,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":3,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa18649f23ec0bb4210edd5cba85afd05127efcd2fc6a781bfed49188da1081670b22d8","output":"0x000000000000000000000000aa10a84ce7d9ae517a52c6d5ca153b369af99ecf","gas_used":0,"gas_limit":1055983779,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":4,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c718000000000000000000000000aa10a84ce7d9ae517a52c6d5ca153b369af99ecf0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000561646d696e000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":0,"gas_limit":1055982922,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":5,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa18649cbd818ad4dd6f1ff9338c2bb62480241424dd9a65f9f3284101a01cd099ad8ac","output":"0x000000000000000000000000f43bca55e8091977223fa5b776e23528d205dca8","gas_used":0,"gas_limit":1055960281,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":6,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c718000000000000000000000000f43bca55e8091977223fa5b776e23528d205dca8000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000087472656173757279000000000000000000000000000000000000000000000000","output":"0x","gas_used":0,"gas_limit":1055959423,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":7,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa18649971ee2c8925badb60ae2abac1a4faf0aa9b739dd57ac1b3b7a1e150be855cde3","output":"0x000000000000000000000000d5e069bc58dedb2a3a348995ee753eef0274004f","gas_used":0,"gas_limit":1055936782,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":8,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c718000000000000000000000000d5e069bc58dedb2a3a348995ee753eef0274004f00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000006636c69656e740000000000000000000000000000000000000000000000000000","output":"0x","gas_used":0,"gas_limit":1055935925,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":9,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa1864991c78f343fa4753a18a7ecaff5a0d85cfa864839d839601256f8f00300358578","output":"0x0000000000000000000000009b78803558f9ea56f4f0a966322c8dd9b2fbebc0","gas_used":0,"gas_limit":1055913284,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":10,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c7180000000000000000000000009b78803558f9ea56f4f0a966322c8dd9b2fbebc00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000870726f7669646572000000000000000000000000000000000000000000000000","output":"0x","gas_used":0,"gas_limit":1055912426,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":11,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa186495f59b69ac1b426b06924d9159f4ac3f122f00f5da4f2b64b38efe5044cf34820","output":"0x000000000000000000000000ca5453e74f0ccc802add48a547cd965512ffd45d","gas_used":0,"gas_limit":1055889785,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":12,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c718000000000000000000000000ca5453e74f0ccc802add48a547cd965512ffd45d000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000096576616c7561746f720000000000000000000000000000000000000000000000","output":"0x","gas_used":0,"gas_limit":1055888928,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":13,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa18649f62b197572cd131d4624c9caeaa7711aecad967ea466e508eb9cbb0683247a0c","output":"0x00000000000000000000000049052147f5d97a723debdf07680fffadad29a5dc","gas_used":0,"gas_limit":1055866286,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":14,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c71800000000000000000000000049052147f5d97a723debdf07680fffadad29a5dc00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000008737472616e676572000000000000000000000000000000000000000000000000","output":"0x","gas_used":0,"gas_limit":1055865429,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]}]}],["Setup",{"arena":[{"parent":null,"children":[1,2,3,4,7,8,9,10,11,12,14],"idx":0,"trace":{"depth":0,"success":true,"caller":"0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38","address":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x0a9254e4","output":"0x","gas_used":9629462,"gas_limit":1073720760,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[{"Call":0},{"Call":1},{"Call":2},{"Call":3},{"Call":4},{"Call":5},{"Call":6},{"Call":7},{"Call":8},{"Call":9},{"Call":10}]},{"parent":0,"children":[],"idx":1,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xe5d6bf02000000000000000000000000000000000000000000000000000000006553f100","output":"0x","gas_used":0,"gas_limit":1056941014,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":2,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"0x60806040523461031057610e1e8038038061001981610314565b9283398101906040818303126103105780516001600160401b0381116103105782610045918301610339565b60208201519092906001600160401b038111610310576100659201610339565b81516001600160401b03811161022357600354600181811c91168015610306575b602082101461020557601f81116102a3575b50602092601f821160011461024257928192935f92610237575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161022357600454600181811c91168015610219575b602082101461020557601f81116101a2575b50602091601f8211600114610142579181925f92610137575b50508160011b915f199060031b1c1916176004555b604051610a7b90816103a38239f35b015190505f80610113565b601f1982169260045f52805f20915f5b85811061018a57508360019510610172575b505050811b01600455610128565b01515f1960f88460031b161c191690555f8080610164565b91926020600181928685015181550194019201610152565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c810191602084106101fb575b601f0160051c01905b8181106101f057506100fa565b5f81556001016101e3565b90915081906101da565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100e8565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b2565b601f1982169360035f52805f20915f5b86811061028b5750836001959610610273575b505050811b016003556100c7565b01515f1960f88460031b161c191690555f8080610265565b91926020600181928685015181550194019201610252565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c810191602084106102fc575b601f0160051c01905b8181106102f15750610098565b5f81556001016102e4565b90915081906102db565b90607f1690610086565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761022357604052565b81601f82011215610310578051906001600160401b03821161022357610368601f8301601f1916602001610314565b9282845260208383010111610310575f5b82811061038d57505060205f918301015290565b8060208092840101518282870101520161037956fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde031461077257508063095ea7b3146106c557806318160ddd1461068a57806323b872dd146104f6578063313ce567146104bd57806340c10f19146103be57806370a082311461035c57806395d89b4114610169578063a9059cbb1461011a5763dd62ed3e1461008a575f80fd5b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576100c1610909565b73ffffffffffffffffffffffffffffffffffffffff6100de61092c565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101165761015e610154610909565b602435903361094f565b602060405160018152f35b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576040515f600454908160011c60018316928315610352575b6020821084146103255781855284939081156102c5575060011461024b575b5003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01681019067ffffffffffffffff82118183101761021e5761021a829182604052826108a3565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102a957505081016020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101ce565b6020919350806001915483858801015201910190918392610275565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b840190910191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090506101ce565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f16906101af565b346101165760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101165773ffffffffffffffffffffffffffffffffffffffff6103a8610909565b165f525f602052602060405f2054604051908152f35b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576103f5610909565b73ffffffffffffffffffffffffffffffffffffffff16602435811561049157600254908082018092116104645760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011657602060405160068152f35b346101165760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101165761052d610909565b61053561092c565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81106105b1575b5061015e935061094f565b83811061065657841561062a5733156105fe5761015e945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f2091039055846105a6565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576020600254604051908152f35b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576106fc610909565b60243590331561062a5773ffffffffffffffffffffffffffffffffffffffff169081156105fe57335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116575f600354908160011c60018316928315610899575b6020821084146103255781855284939081156102c5575060011461081f575003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01681019067ffffffffffffffff82118183101761021e5761021a829182604052826108a3565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061087d57505081016020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101ce565b6020919350806001915483858801015201910190918392610849565b90607f16906107b5565b919091602081528251928360208301525f5b8481106108f35750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6040809697860101520116010190565b80602080928401015160408286010152016108b5565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361011657565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361011657565b73ffffffffffffffffffffffffffffffffffffffff16908115610a195773ffffffffffffffffffffffffffffffffffffffff1691821561049157815f525f60205260405f20548181106109e757817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea26469706673582212207d4081a323998c8d20751316ef809be0cc398b922c8a680eea7ed1d1bc08e9bf64736f6c634300081a0033000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000009507573682055534443000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000057055534443000000000000000000000000000000000000000000000000000000","output":"0x6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde031461077257508063095ea7b3146106c557806318160ddd1461068a57806323b872dd146104f6578063313ce567146104bd57806340c10f19146103be57806370a082311461035c57806395d89b4114610169578063a9059cbb1461011a5763dd62ed3e1461008a575f80fd5b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576100c1610909565b73ffffffffffffffffffffffffffffffffffffffff6100de61092c565b91165f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060405f2054604051908152f35b5f80fd5b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101165761015e610154610909565b602435903361094f565b602060405160018152f35b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576040515f600454908160011c60018316928315610352575b6020821084146103255781855284939081156102c5575060011461024b575b5003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01681019067ffffffffffffffff82118183101761021e5761021a829182604052826108a3565b0390f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60045f90815291507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8183106102a957505081016020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101ce565b6020919350806001915483858801015201910190918392610275565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b840190910191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090506101ce565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b90607f16906101af565b346101165760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101165773ffffffffffffffffffffffffffffffffffffffff6103a8610909565b165f525f602052602060405f2054604051908152f35b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576103f5610909565b73ffffffffffffffffffffffffffffffffffffffff16602435811561049157600254908082018092116104645760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a3005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7fec442f05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011657602060405160068152f35b346101165760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101165761052d610909565b61053561092c565b6044359073ffffffffffffffffffffffffffffffffffffffff831692835f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260405f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81106105b1575b5061015e935061094f565b83811061065657841561062a5733156105fe5761015e945f52600160205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f526020528360405f2091039055846105a6565b7f94280d62000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b7fe602df05000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b83907ffb8f41b2000000000000000000000000000000000000000000000000000000005f523360045260245260445260645ffd5b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576020600254604051908152f35b346101165760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116576106fc610909565b60243590331561062a5773ffffffffffffffffffffffffffffffffffffffff169081156105fe57335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b34610116575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610116575f600354908160011c60018316928315610899575b6020821084146103255781855284939081156102c5575060011461081f575003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01681019067ffffffffffffffff82118183101761021e5761021a829182604052826108a3565b60035f90815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b81831061087d57505081016020017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06101ce565b6020919350806001915483858801015201910190918392610849565b90607f16906107b5565b919091602081528251928360208301525f5b8481106108f35750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6040809697860101520116010190565b80602080928401015160408286010152016108b5565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361011657565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361011657565b73ffffffffffffffffffffffffffffffffffffffff16908115610a195773ffffffffffffffffffffffffffffffffffffffff1691821561049157815f525f60205260405f20548181106109e757817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b827fe450d38c000000000000000000000000000000000000000000000000000000005f5260045260245260445260645ffd5b7f96c6fd1e000000000000000000000000000000000000000000000000000000005f525f60045260245ffdfea26469706673582212207d4081a323998c8d20751316ef809be0cc398b922c8a680eea7ed1d1bc08e9bf64736f6c634300081a0033","gas_used":583112,"gas_limit":1056908255,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":3,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x2e234dae75c793f67a35089c9d99245e1c58470b","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"0x6080806040523460d0577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c1660c1576002600160401b03196001600160401b03821601605c575b6040516137ca90816100d58239f35b6001600160401b0319166001600160401b039081177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f80604d565b63f92ee8a960e01b5f5260045ffd5b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714612aed57508063248a9ca314612a7d5780632f0e31f414612a425780632f2ff15d146129c75780632f8e6a2d1461298d5780633013ce291461293d57806336568abe146128b55780633f4ba83a146127e55780634152881214611fe557806341dd26f514611e1f5780634c4911c414611cba57806350355d7614611c7f5780635b7baf6414611a955780635c975abb14611a365780636d3b96c3146119ce57806375b238fc146119765780637ab03cf21461193c5780638456cb591461186957806384f15090146117ea57806391d14854146117565780639e63798d1461162b578063a217fddf146115f3578063b4d884f6146114fd578063bf22c45714611269578063c0c53b8b14610ecc578063c9a84bb914610c84578063ce79eb6014610bb6578063d2e13f501461096a578063d547741f146108e8578063d75bbdf31461067d578063dd4ae9d4146104b0578063e138818c1461045f578063e1a4521814610425578063e63ea40814610222578063f9168231146101e75763ff96092a146101a8575f80fd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600154604051908152f35b5f80fd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600754604051908152f35b346101e35760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610259612bcc565b610261612ba9565b73ffffffffffffffffffffffffffffffffffffffff60443592610282612e1e565b61028a613662565b169081158015610407575b6103df5773ffffffffffffffffffffffffffffffffffffffff5f5416808314610309575b50602073ffffffffffffffffffffffffffffffffffffffff826102fe867ff24ef89f38eadc1bde50701ad6e4d6d11a2dc24f7cf834a486991f38833285049587613605565b6040519586521693a3005b6020602491604051928380927f70a082310000000000000000000000000000000000000000000000000000000082523060048301525afa9081156103d4575f916103a2575b506007548082111561039a5761036391612dfe565b808411156102b957837f9529d841000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b50505f610363565b90506020813d6020116103cc575b816103bd60209383612cf9565b810103126101e357518461034e565b3d91506103b0565b6040513d5f823e3d90fd5b7fd92e233d000000000000000000000000000000000000000000000000000000005f5260045ffd5b5073ffffffffffffffffffffffffffffffffffffffff811615610295565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760206040516127108152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b346101e3576104be36612c1d565b9290916104c9613331565b6104d1613384565b6104da826133fb565b60ff815460a01c1660068110156106505761062857600181015465ffffffffffff8160a01c164210156106285773ffffffffffffffffffffffffffffffffffffffff16330361060057827f869e2577b006bf47ee981cf6fec2e25583548081c14b98deab587f77b5068038602073ffffffffffffffffffffffffffffffffffffffff946105b46105da996105886040519a8b9233878501528560408501526060808501526080840191612d8b565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018a5289612cf9565b80600460038701966105ca8b888b8b541661345f565b0155604051908152a2541661357c565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b7f82b42900000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f8e78f0cb000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b346101e35761068b36612c1d565b919290610696613331565b61069e613384565b6106a7826133fb565b9360ff855460a01c166006811015610650576002036106285773ffffffffffffffffffffffffffffffffffffffff6002860154163303610600576107fd837f21d71db5be59bb9fa133895586b7404307dd33fb93b16db09dc6f1d9d7d231b060206105da9861076473ffffffffffffffffffffffffffffffffffffffff976107386040519b8c928a33888601612dc9565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018b528a612cf9565b60038101956107778a868a8a541661345f565b6004820154740300000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8454161783556107c581600754612dfe565b6007558860016127106107d9825485612e0b565b049889936107f86127106107ef60035484612e0b565b04958692612dfe565b612dfe565b9401541696806108a3575b5080610863575b5081610850575b604051908152847f0fd54bd364fa9e67f17b091aefe930932c09fe7651cf5ad02c71a418f3341444843393a3604051908152a3541661357c565b61085e82878a5f5416613605565b610816565b61087181338b5f5416613605565b604051908152857f253dd534010ac976fa263caa123bae79b9c50292adf7ce67bdc5ec309f784e61853393a38b61080f565b867f0e61cfd0ee655641b3ed0a1dd373ec3cacf4c090de1f33708e3a4091f4947662868c60025416936108db818f87905f5416613605565b604051908152a38c610808565b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610968600435610925612ba9565b9061096361095e825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b612ea6565b613229565b005b346101e35761097836612c1d565b61098493919293613331565b61098c613384565b610995826133fb565b93845460ff8160a01c166006811015610650576106285773ffffffffffffffffffffffffffffffffffffffff16330361060057600185015473ffffffffffffffffffffffffffffffffffffffff811615610b8e5760a01c65ffffffffffff16421015610628576004850190815403610b66576105da94610a6f73ffffffffffffffffffffffffffffffffffffffff93610a436040519788923360208501526040808501526060840191612d8b565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101875286612cf9565b6003810191610a8286868686541661345f565b5490740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff825416179055610acd81600754612ccf565b60075580610b0a575b604051908152837fe3fbcc1ea1bdc559ec7f0347efde7655e58b5f45a30b0e4470a583c3ef5496b360203393a3541661357c565b610b61835f5416604051907f23b872dd00000000000000000000000000000000000000000000000000000000602083015233602483015230604483015283606483015260648252610b5c608483612cf9565b61370d565b610ad6565b7f99b0fc87000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fa9456d43000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610bed612bcc565b602435908115158092036101e35773ffffffffffffffffffffffffffffffffffffffff90610c19612e1e565b169081156103df5760207f7ee54953080e392a475a25b6acacb85417ca4e1953293c90934233ca1361251091835f526006825260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8316179055604051908152a2005b346101e35760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435610cbe612ba9565b60443567ffffffffffffffff81116101e357610cde903690600401612bef565b929091610ce9613331565b610cf1613384565b610cfa826133fb565b90815460ff8160a01c1660068110156106505761062857600183019182549165ffffffffffff8360a01c164210156106285773ffffffffffffffffffffffffffffffffffffffff16918233036106005773ffffffffffffffffffffffffffffffffffffffff166106285773ffffffffffffffffffffffffffffffffffffffff169081156103df578114610ea45773ffffffffffffffffffffffffffffffffffffffff6002840154168114610e7c57600373ffffffffffffffffffffffffffffffffffffffff93610e186105da98610dec604051998a923360208501528760408501526060808501526080840191612d8b565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101895288612cf9565b0191610e2886868686541661345f565b817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055837f9a87df076ea1725aba8ba29d32517ce37c9597d88cbf16ec6707892cc330ab695f80a3541661357c565b7fc7b4e9eb000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f332ff0f9000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e35760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610f03612bcc565b610f0b612ba9565b60443573ffffffffffffffffffffffffffffffffffffffff81168082036101e3577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c16159467ffffffffffffffff821680159081611261575b6001149081611257575b15908161124e575b5061122657818660017fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000073ffffffffffffffffffffffffffffffffffffffff9516177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556111d1575b50169081159081156111b2575b81156111a9575b506103df576110bd9273ffffffffffffffffffffffffffffffffffffffff916110216136b6565b6110296136b6565b6110316136b6565b6110396136b6565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00557fffffffffffffffffffffffff00000000000000000000000000000000000000005f5416175f55167fffffffffffffffffffffffff000000000000000000000000000000000000000060025416176002556110b781612f2c565b50613013565b505f805260066020527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561111657005b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b90501585610ffa565b73ffffffffffffffffffffffffffffffffffffffff8516159150610ff3565b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005586610fe6565b7ff92ee8a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b90501587610f7d565b303b159150610f75565b879150610f6b565b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357606060e06040516112a881612cdc565b5f81525f60208201525f60408201525f838201525f60808201525f60a08201525f60c082015201526004355f52600460205260405f20604051906112eb82612cdc565b60ff815473ffffffffffffffffffffffffffffffffffffffff8116845260a01c169060208301916006811015610650578252600181015491604084019173ffffffffffffffffffffffffffffffffffffffff8416835265ffffffffffff606086019460a01c16845273ffffffffffffffffffffffffffffffffffffffff600282015416936080860194855273ffffffffffffffffffffffffffffffffffffffff60038301541660a08701908152600560048401549360c08901948552019360405194855f8254926113bb84612d3a565b80845293600181169081156114bd5750600114611479575b506113e092500386612cf9565b60e0880194855273ffffffffffffffffffffffffffffffffffffffff6040519860208a525116602089015251600681101561065057879665ffffffffffff73ffffffffffffffffffffffffffffffffffffffff948561147599819560408d0152511660608b015251166080890152511660a0870152511660c08501525160e08401525161010080840152610120830190612c72565b0390f35b90505f9291925260205f20905f915b8183106114a15750509060206113e0928201018b6113d3565b6020919350806001915483858c01015201910190918792611488565b602093506113e09592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201018b6113d3565b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760043573ffffffffffffffffffffffffffffffffffffffff61154c612ba9565b611554612e1e565b169081156103df5761271061156b60035483612ccf565b116115cb576020817ff0c09f5238364083d828870e877edaebb364d9f19f4093fdbf24e486bbdca48492600155837fffffffffffffffffffffffff00000000000000000000000000000000000000006002541617600255604051908152a2005b7fc9034e18000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760206040515f8152f35b346101e35761163936612c1d565b919290611644613331565b61164c613384565b611655826133fb565b60ff815460a01c1660068110156106505760010361062857600181015465ffffffffffff8160a01c164210156106285773ffffffffffffffffffffffffffffffffffffffff163303610600576105da946116d273ffffffffffffffffffffffffffffffffffffffff93610a43604051978892853360208601612dc9565b60038201916116e586868686541661345f565b740200000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff825416179055604051908152837f80c17db79857f338a6a6df68a6883ecc0ce78e2202fe61ed979733573f40538e60203393a3541661357c565b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761178d612ba9565b6004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435611824612e1e565b61271061183360015483612ccf565b116115cb576020817f24fe03678743d8fe5f3d39d760da9fc7a5f3feea46847d91688ba8ef9e400d1492600355604051908152a1005b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761189f612e1e565b6118a7613331565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416177fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602060405161012c8152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760206040517fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35773ffffffffffffffffffffffffffffffffffffffff611a1a612bcc565b165f526006602052602060ff60405f2054166040519015158152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602060ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054166040519015158152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435611acf613384565b611ad8816133fb565b60ff815460a01c166006811015908161065057801515918280611c72575b8181611c61575b506106285761065057600203611c225765ffffffffffff600183015460a01c16610e108101809111611bf5574210611bcd575b740500000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff835416178255611bbd575b507f97237956f8810192811e2c3f273fd02c5d6295206fdd9c62e6fe2bfc19ba92325f80a260017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b611bc79082613505565b81611b72565b7f478f84e7000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b65ffffffffffff600183015460a01c16421015611b30577f8e78f0cb000000000000000000000000000000000000000000000000000000005f5260045ffd5b905061065057600282141581611afd565b50505f6001821415611af6565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600554604051908152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760043567ffffffffffffffff81116101e357366023820112156101e357806004013567ffffffffffffffff81116101e3573660248260051b840101116101e357611d31612e1e565b600554915f5b828110156109685760248160051b830101359081158015611e16575b611dee57816001925f52600460205273ffffffffffffffffffffffffffffffffffffffff600360405f20015416908115611de757805f526004602052600360405f20017fffffffffffffffffffffffff000000000000000000000000000000000000000081541690557fcde6a24b3e1e5d23bc4d45609905c64b3516b23478ba2f7fdada3ab2bae3812d5f80a35b01611d37565b5050611de1565b7f71c8f460000000000000000000000000000000000000000000000000000000005f5260045ffd5b50848211611d53565b346101e357611e2d36612c1d565b919290611e38613331565b611e40613384565b611e49826133fb565b9384549060ff8260a01c169260068410159283610650578415948515611f97575073ffffffffffffffffffffffffffffffffffffffff1633141580611f73575b61060057611ea6905b610a43604051978892853360208601612dc9565b6003860191611ecd868673ffffffffffffffffffffffffffffffffffffffff86541661345f565b740400000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff885416178755610650576105da9573ffffffffffffffffffffffffffffffffffffffff9315611f63575b50604051908152837fae7362b1af91f4492868987b9c73990d780060811551b58728fbe96fd1bab27560203393a3541661357c565b611f6d9085613505565b86611f2e565b5073ffffffffffffffffffffffffffffffffffffffff600188015416331415611e89565b5f94506001811491508115611fd7575b50156106285773ffffffffffffffffffffffffffffffffffffffff600288015416330361060057611ea690611e92565b93505060025f931488611fa7565b346101e35760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761201c612bcc565b612024612ba9565b60443560643567ffffffffffffffff81116101e357612047903690600401612bef565b9390926084359273ffffffffffffffffffffffffffffffffffffffff8416918285036101e35773ffffffffffffffffffffffffffffffffffffffff9061208b613331565b612093613384565b169283156103df5761012c4201804211611bf55782118015906127d6575b6127ae5773ffffffffffffffffffffffffffffffffffffffff1693338514610ea457841515806127a5575b610e7c57825f52600660205260ff60405f2054161561277d5782151590816125a4575b5061257c576005547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611bf557600101948560055560405161214281612cdc565b33815287602082015f81526040830193888552606084019165ffffffffffff87168352608085019089825260a086019289845267ffffffffffffffff60c08801965f88521161254f578d906040519e8f6121c460207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160182612cf9565b5236828201116101e357818f5f936020938483013701015260e086019c8d528b5f52600460205273ffffffffffffffffffffffffffffffffffffffff8060405f20975116167fffffffffffffffffffffffff0000000000000000000000000000000000000000875416178655519060068210156106505760059673ffffffffffffffffffffffffffffffffffffffff9485937fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff00000000000000000000000000000000000000008a549260a01b169116178855838060018a01935116167fffffffffffffffffffffffff0000000000000000000000000000000000000000835416178255517fffffffffffff000000000000ffffffffffffffffffffffffffffffffffffffff79ffffffffffff000000000000000000000000000000000000000083549260a01b1691161790555116826002860191167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055511673ffffffffffffffffffffffffffffffffffffffff6003840191167fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905551600482015501955195865167ffffffffffffffff811161254f576123ac8254612d3a565b601f811161250a575b50806020988990601f831160011461246d575f92612462575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790555b604051928352858301526040820152827fb0f0239bfdd96453e24733e18bfc24b70d8fadf123dd977473518dd577ee79b960603393a460017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055604051908152f35b0151905089806123ce565b5f858152828120937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905b8181106124f357509084600195949392106124bc575b505050811b019055612400565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558980806124af565b92938c600181928786015181550195019301612499565b825f5260205f20601f830160051c81019160208410612545575b601f0160051c01905b81811061253a57506123b5565b5f815560010161252d565b9091508190612524565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f9c9d8823000000000000000000000000000000000000000000000000000000005f5260045ffd5b905060205f604051828101907f01ffc9a70000000000000000000000000000000000000000000000000000000082527f01ffc9a700000000000000000000000000000000000000000000000000000000602482015260248152612608604482612cf9565b519084617530fa903d5f519083612771575b5082612767575b50816126ce575b81612636575b5015876120ff565b602091505f90604051838101907f01ffc9a70000000000000000000000000000000000000000000000000000000082527f7ff6bc9e0000000000000000000000000000000000000000000000000000000060248201526024815261269b604482612cf9565b5191617530fa5f513d826126c2575b50816126b8575b508761262e565b90501515876126b1565b602011159150886126aa565b905060205f604051828101907f01ffc9a70000000000000000000000000000000000000000000000000000000082527fffffffff00000000000000000000000000000000000000000000000000000000602482015260248152612732604482612cf9565b519084617530fa5f513d8261275b575b5081612751575b501590612628565b9050151588612749565b60201115915089612742565b1515915088612621565b6020111592508961261a565b7fa04b28ec000000000000000000000000000000000000000000000000000000005f5260045ffd5b508385146120dc565b7ff7a0748c000000000000000000000000000000000000000000000000000000005f5260045ffd5b5065ffffffffffff82116120b1565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761281b612e1e565b612823613662565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054167fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576128ec612ba9565b3373ffffffffffffffffffffffffffffffffffffffff8216036129155761096890600435613229565b7f6697b232000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020604051610e108152f35b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610968600435612a04612ba9565b90612a3d61095e825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b613117565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600354604051908152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020612ae56004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b604051908152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036101e357817f7965db0b0000000000000000000000000000000000000000000000000000000060209314908115612b7f575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483612b78565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036101e357565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036101e357565b9181601f840112156101e35782359167ffffffffffffffff83116101e357602083818601950101116101e357565b60607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126101e35760043591602435916044359067ffffffffffffffff82116101e357612c6e91600401612bef565b9091565b91908251928382525f5b848110612cba5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b80602080928401015182828601015201612c7c565b91908201809211611bf557565b610100810190811067ffffffffffffffff82111761254f57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761254f57604052565b90600182811c92168015612d81575b6020831014612d5457565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691612d49565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b612dfb949273ffffffffffffffffffffffffffffffffffffffff60609316825260208201528160408201520191612d8b565b90565b91908203918211611bf557565b81810292918115918404141715611bf557565b335f9081527fb16e88c42fd4e48df2dd6a2eabd6bc9aec654ec170056b470819f8892cc6431c602052604090205460ff1615612e5657565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004527fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177560245260445ffd5b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f20541615612efd5750565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b73ffffffffffffffffffffffffffffffffffffffff81165f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff1661300e5773ffffffffffffffffffffffffffffffffffffffff165f8181527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505f90565b73ffffffffffffffffffffffffffffffffffffffff81165f9081527fb16e88c42fd4e48df2dd6a2eabd6bc9aec654ec170056b470819f8892cc6431c602052604090205460ff1661300e5773ffffffffffffffffffffffffffffffffffffffff165f8181527fb16e88c42fd4e48df2dd6a2eabd6bc9aec654ec170056b470819f8892cc6431c6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f205416155f1461322357805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f2054165f1461322357805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300541661335c57565b7fd93c0665000000000000000000000000000000000000000000000000000000005f5260045ffd5b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0054146133d35760027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b80158015613416575b611dee575f52600460205260405f2090565b506005548111613404565b7fffffffff00000000000000000000000000000000000000000000000000000000612dfb949360609383521660208201528160408201520190612c72565b73ffffffffffffffffffffffffffffffffffffffff16918261348057505050565b823b156101e3576134e8925f92836040518096819582947fdc08fb1d0000000000000000000000000000000000000000000000000000000084527fffffffff000000000000000000000000000000000000000000000000000000008535169060048501613421565b03925af180156103d4576134f95750565b5f61350391612cf9565b565b600482015491821561357757602073ffffffffffffffffffffffffffffffffffffffff7f7ca5472b7ea78c2c0141c5a12ee6d170cf4ce8ed06be3d22c8252ddfc7a6a2c49261355686600754612dfe565b60075561356b86835f54168484541690613605565b541693604051908152a3565b505050565b73ffffffffffffffffffffffffffffffffffffffff16918261359d57505050565b823b156101e3576134e8925f92836040518096819582947fa3fe47830000000000000000000000000000000000000000000000000000000084527fffffffff000000000000000000000000000000000000000000000000000000008535169060048501613421565b6135039273ffffffffffffffffffffffffffffffffffffffff604051937fa9059cbb000000000000000000000000000000000000000000000000000000006020860152166024840152604483015260448252610b5c606483612cf9565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054161561368e57565b7f8dfc202b000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156136e557565b7fd7e6bcf8000000000000000000000000000000000000000000000000000000005f5260045ffd5b905f602091828151910182855af1156103d4575f513d61378b575073ffffffffffffffffffffffffffffffffffffffff81163b155b6137495750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b6001141561374256fea26469706673582212206c80219f5022a102b78e2b3cea53bc36a61bd9d0874a3d24319381fbeaeb022a64736f6c634300081a0033","output":"0x6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714612aed57508063248a9ca314612a7d5780632f0e31f414612a425780632f2ff15d146129c75780632f8e6a2d1461298d5780633013ce291461293d57806336568abe146128b55780633f4ba83a146127e55780634152881214611fe557806341dd26f514611e1f5780634c4911c414611cba57806350355d7614611c7f5780635b7baf6414611a955780635c975abb14611a365780636d3b96c3146119ce57806375b238fc146119765780637ab03cf21461193c5780638456cb591461186957806384f15090146117ea57806391d14854146117565780639e63798d1461162b578063a217fddf146115f3578063b4d884f6146114fd578063bf22c45714611269578063c0c53b8b14610ecc578063c9a84bb914610c84578063ce79eb6014610bb6578063d2e13f501461096a578063d547741f146108e8578063d75bbdf31461067d578063dd4ae9d4146104b0578063e138818c1461045f578063e1a4521814610425578063e63ea40814610222578063f9168231146101e75763ff96092a146101a8575f80fd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600154604051908152f35b5f80fd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600754604051908152f35b346101e35760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610259612bcc565b610261612ba9565b73ffffffffffffffffffffffffffffffffffffffff60443592610282612e1e565b61028a613662565b169081158015610407575b6103df5773ffffffffffffffffffffffffffffffffffffffff5f5416808314610309575b50602073ffffffffffffffffffffffffffffffffffffffff826102fe867ff24ef89f38eadc1bde50701ad6e4d6d11a2dc24f7cf834a486991f38833285049587613605565b6040519586521693a3005b6020602491604051928380927f70a082310000000000000000000000000000000000000000000000000000000082523060048301525afa9081156103d4575f916103a2575b506007548082111561039a5761036391612dfe565b808411156102b957837f9529d841000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b50505f610363565b90506020813d6020116103cc575b816103bd60209383612cf9565b810103126101e357518461034e565b3d91506103b0565b6040513d5f823e3d90fd5b7fd92e233d000000000000000000000000000000000000000000000000000000005f5260045ffd5b5073ffffffffffffffffffffffffffffffffffffffff811615610295565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760206040516127108152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b346101e3576104be36612c1d565b9290916104c9613331565b6104d1613384565b6104da826133fb565b60ff815460a01c1660068110156106505761062857600181015465ffffffffffff8160a01c164210156106285773ffffffffffffffffffffffffffffffffffffffff16330361060057827f869e2577b006bf47ee981cf6fec2e25583548081c14b98deab587f77b5068038602073ffffffffffffffffffffffffffffffffffffffff946105b46105da996105886040519a8b9233878501528560408501526060808501526080840191612d8b565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018a5289612cf9565b80600460038701966105ca8b888b8b541661345f565b0155604051908152a2541661357c565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b7f82b42900000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f8e78f0cb000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b346101e35761068b36612c1d565b919290610696613331565b61069e613384565b6106a7826133fb565b9360ff855460a01c166006811015610650576002036106285773ffffffffffffffffffffffffffffffffffffffff6002860154163303610600576107fd837f21d71db5be59bb9fa133895586b7404307dd33fb93b16db09dc6f1d9d7d231b060206105da9861076473ffffffffffffffffffffffffffffffffffffffff976107386040519b8c928a33888601612dc9565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018b528a612cf9565b60038101956107778a868a8a541661345f565b6004820154740300000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8454161783556107c581600754612dfe565b6007558860016127106107d9825485612e0b565b049889936107f86127106107ef60035484612e0b565b04958692612dfe565b612dfe565b9401541696806108a3575b5080610863575b5081610850575b604051908152847f0fd54bd364fa9e67f17b091aefe930932c09fe7651cf5ad02c71a418f3341444843393a3604051908152a3541661357c565b61085e82878a5f5416613605565b610816565b61087181338b5f5416613605565b604051908152857f253dd534010ac976fa263caa123bae79b9c50292adf7ce67bdc5ec309f784e61853393a38b61080f565b867f0e61cfd0ee655641b3ed0a1dd373ec3cacf4c090de1f33708e3a4091f4947662868c60025416936108db818f87905f5416613605565b604051908152a38c610808565b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610968600435610925612ba9565b9061096361095e825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b612ea6565b613229565b005b346101e35761097836612c1d565b61098493919293613331565b61098c613384565b610995826133fb565b93845460ff8160a01c166006811015610650576106285773ffffffffffffffffffffffffffffffffffffffff16330361060057600185015473ffffffffffffffffffffffffffffffffffffffff811615610b8e5760a01c65ffffffffffff16421015610628576004850190815403610b66576105da94610a6f73ffffffffffffffffffffffffffffffffffffffff93610a436040519788923360208501526040808501526060840191612d8b565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101875286612cf9565b6003810191610a8286868686541661345f565b5490740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff825416179055610acd81600754612ccf565b60075580610b0a575b604051908152837fe3fbcc1ea1bdc559ec7f0347efde7655e58b5f45a30b0e4470a583c3ef5496b360203393a3541661357c565b610b61835f5416604051907f23b872dd00000000000000000000000000000000000000000000000000000000602083015233602483015230604483015283606483015260648252610b5c608483612cf9565b61370d565b610ad6565b7f99b0fc87000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fa9456d43000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610bed612bcc565b602435908115158092036101e35773ffffffffffffffffffffffffffffffffffffffff90610c19612e1e565b169081156103df5760207f7ee54953080e392a475a25b6acacb85417ca4e1953293c90934233ca1361251091835f526006825260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8316179055604051908152a2005b346101e35760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435610cbe612ba9565b60443567ffffffffffffffff81116101e357610cde903690600401612bef565b929091610ce9613331565b610cf1613384565b610cfa826133fb565b90815460ff8160a01c1660068110156106505761062857600183019182549165ffffffffffff8360a01c164210156106285773ffffffffffffffffffffffffffffffffffffffff16918233036106005773ffffffffffffffffffffffffffffffffffffffff166106285773ffffffffffffffffffffffffffffffffffffffff169081156103df578114610ea45773ffffffffffffffffffffffffffffffffffffffff6002840154168114610e7c57600373ffffffffffffffffffffffffffffffffffffffff93610e186105da98610dec604051998a923360208501528760408501526060808501526080840191612d8b565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101895288612cf9565b0191610e2886868686541661345f565b817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055837f9a87df076ea1725aba8ba29d32517ce37c9597d88cbf16ec6707892cc330ab695f80a3541661357c565b7fc7b4e9eb000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f332ff0f9000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e35760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610f03612bcc565b610f0b612ba9565b60443573ffffffffffffffffffffffffffffffffffffffff81168082036101e3577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c16159467ffffffffffffffff821680159081611261575b6001149081611257575b15908161124e575b5061122657818660017fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000073ffffffffffffffffffffffffffffffffffffffff9516177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556111d1575b50169081159081156111b2575b81156111a9575b506103df576110bd9273ffffffffffffffffffffffffffffffffffffffff916110216136b6565b6110296136b6565b6110316136b6565b6110396136b6565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00557fffffffffffffffffffffffff00000000000000000000000000000000000000005f5416175f55167fffffffffffffffffffffffff000000000000000000000000000000000000000060025416176002556110b781612f2c565b50613013565b505f805260066020527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561111657005b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b90501585610ffa565b73ffffffffffffffffffffffffffffffffffffffff8516159150610ff3565b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005586610fe6565b7ff92ee8a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b90501587610f7d565b303b159150610f75565b879150610f6b565b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357606060e06040516112a881612cdc565b5f81525f60208201525f60408201525f838201525f60808201525f60a08201525f60c082015201526004355f52600460205260405f20604051906112eb82612cdc565b60ff815473ffffffffffffffffffffffffffffffffffffffff8116845260a01c169060208301916006811015610650578252600181015491604084019173ffffffffffffffffffffffffffffffffffffffff8416835265ffffffffffff606086019460a01c16845273ffffffffffffffffffffffffffffffffffffffff600282015416936080860194855273ffffffffffffffffffffffffffffffffffffffff60038301541660a08701908152600560048401549360c08901948552019360405194855f8254926113bb84612d3a565b80845293600181169081156114bd5750600114611479575b506113e092500386612cf9565b60e0880194855273ffffffffffffffffffffffffffffffffffffffff6040519860208a525116602089015251600681101561065057879665ffffffffffff73ffffffffffffffffffffffffffffffffffffffff948561147599819560408d0152511660608b015251166080890152511660a0870152511660c08501525160e08401525161010080840152610120830190612c72565b0390f35b90505f9291925260205f20905f915b8183106114a15750509060206113e0928201018b6113d3565b6020919350806001915483858c01015201910190918792611488565b602093506113e09592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201018b6113d3565b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760043573ffffffffffffffffffffffffffffffffffffffff61154c612ba9565b611554612e1e565b169081156103df5761271061156b60035483612ccf565b116115cb576020817ff0c09f5238364083d828870e877edaebb364d9f19f4093fdbf24e486bbdca48492600155837fffffffffffffffffffffffff00000000000000000000000000000000000000006002541617600255604051908152a2005b7fc9034e18000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760206040515f8152f35b346101e35761163936612c1d565b919290611644613331565b61164c613384565b611655826133fb565b60ff815460a01c1660068110156106505760010361062857600181015465ffffffffffff8160a01c164210156106285773ffffffffffffffffffffffffffffffffffffffff163303610600576105da946116d273ffffffffffffffffffffffffffffffffffffffff93610a43604051978892853360208601612dc9565b60038201916116e586868686541661345f565b740200000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff825416179055604051908152837f80c17db79857f338a6a6df68a6883ecc0ce78e2202fe61ed979733573f40538e60203393a3541661357c565b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761178d612ba9565b6004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435611824612e1e565b61271061183360015483612ccf565b116115cb576020817f24fe03678743d8fe5f3d39d760da9fc7a5f3feea46847d91688ba8ef9e400d1492600355604051908152a1005b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761189f612e1e565b6118a7613331565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416177fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602060405161012c8152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760206040517fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35773ffffffffffffffffffffffffffffffffffffffff611a1a612bcc565b165f526006602052602060ff60405f2054166040519015158152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602060ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054166040519015158152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435611acf613384565b611ad8816133fb565b60ff815460a01c166006811015908161065057801515918280611c72575b8181611c61575b506106285761065057600203611c225765ffffffffffff600183015460a01c16610e108101809111611bf5574210611bcd575b740500000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff835416178255611bbd575b507f97237956f8810192811e2c3f273fd02c5d6295206fdd9c62e6fe2bfc19ba92325f80a260017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b611bc79082613505565b81611b72565b7f478f84e7000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b65ffffffffffff600183015460a01c16421015611b30577f8e78f0cb000000000000000000000000000000000000000000000000000000005f5260045ffd5b905061065057600282141581611afd565b50505f6001821415611af6565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600554604051908152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35760043567ffffffffffffffff81116101e357366023820112156101e357806004013567ffffffffffffffff81116101e3573660248260051b840101116101e357611d31612e1e565b600554915f5b828110156109685760248160051b830101359081158015611e16575b611dee57816001925f52600460205273ffffffffffffffffffffffffffffffffffffffff600360405f20015416908115611de757805f526004602052600360405f20017fffffffffffffffffffffffff000000000000000000000000000000000000000081541690557fcde6a24b3e1e5d23bc4d45609905c64b3516b23478ba2f7fdada3ab2bae3812d5f80a35b01611d37565b5050611de1565b7f71c8f460000000000000000000000000000000000000000000000000000000005f5260045ffd5b50848211611d53565b346101e357611e2d36612c1d565b919290611e38613331565b611e40613384565b611e49826133fb565b9384549060ff8260a01c169260068410159283610650578415948515611f97575073ffffffffffffffffffffffffffffffffffffffff1633141580611f73575b61060057611ea6905b610a43604051978892853360208601612dc9565b6003860191611ecd868673ffffffffffffffffffffffffffffffffffffffff86541661345f565b740400000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff885416178755610650576105da9573ffffffffffffffffffffffffffffffffffffffff9315611f63575b50604051908152837fae7362b1af91f4492868987b9c73990d780060811551b58728fbe96fd1bab27560203393a3541661357c565b611f6d9085613505565b86611f2e565b5073ffffffffffffffffffffffffffffffffffffffff600188015416331415611e89565b5f94506001811491508115611fd7575b50156106285773ffffffffffffffffffffffffffffffffffffffff600288015416330361060057611ea690611e92565b93505060025f931488611fa7565b346101e35760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761201c612bcc565b612024612ba9565b60443560643567ffffffffffffffff81116101e357612047903690600401612bef565b9390926084359273ffffffffffffffffffffffffffffffffffffffff8416918285036101e35773ffffffffffffffffffffffffffffffffffffffff9061208b613331565b612093613384565b169283156103df5761012c4201804211611bf55782118015906127d6575b6127ae5773ffffffffffffffffffffffffffffffffffffffff1693338514610ea457841515806127a5575b610e7c57825f52600660205260ff60405f2054161561277d5782151590816125a4575b5061257c576005547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611bf557600101948560055560405161214281612cdc565b33815287602082015f81526040830193888552606084019165ffffffffffff87168352608085019089825260a086019289845267ffffffffffffffff60c08801965f88521161254f578d906040519e8f6121c460207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160182612cf9565b5236828201116101e357818f5f936020938483013701015260e086019c8d528b5f52600460205273ffffffffffffffffffffffffffffffffffffffff8060405f20975116167fffffffffffffffffffffffff0000000000000000000000000000000000000000875416178655519060068210156106505760059673ffffffffffffffffffffffffffffffffffffffff9485937fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff00000000000000000000000000000000000000008a549260a01b169116178855838060018a01935116167fffffffffffffffffffffffff0000000000000000000000000000000000000000835416178255517fffffffffffff000000000000ffffffffffffffffffffffffffffffffffffffff79ffffffffffff000000000000000000000000000000000000000083549260a01b1691161790555116826002860191167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055511673ffffffffffffffffffffffffffffffffffffffff6003840191167fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905551600482015501955195865167ffffffffffffffff811161254f576123ac8254612d3a565b601f811161250a575b50806020988990601f831160011461246d575f92612462575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790555b604051928352858301526040820152827fb0f0239bfdd96453e24733e18bfc24b70d8fadf123dd977473518dd577ee79b960603393a460017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055604051908152f35b0151905089806123ce565b5f858152828120937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905b8181106124f357509084600195949392106124bc575b505050811b019055612400565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558980806124af565b92938c600181928786015181550195019301612499565b825f5260205f20601f830160051c81019160208410612545575b601f0160051c01905b81811061253a57506123b5565b5f815560010161252d565b9091508190612524565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f9c9d8823000000000000000000000000000000000000000000000000000000005f5260045ffd5b905060205f604051828101907f01ffc9a70000000000000000000000000000000000000000000000000000000082527f01ffc9a700000000000000000000000000000000000000000000000000000000602482015260248152612608604482612cf9565b519084617530fa903d5f519083612771575b5082612767575b50816126ce575b81612636575b5015876120ff565b602091505f90604051838101907f01ffc9a70000000000000000000000000000000000000000000000000000000082527f7ff6bc9e0000000000000000000000000000000000000000000000000000000060248201526024815261269b604482612cf9565b5191617530fa5f513d826126c2575b50816126b8575b508761262e565b90501515876126b1565b602011159150886126aa565b905060205f604051828101907f01ffc9a70000000000000000000000000000000000000000000000000000000082527fffffffff00000000000000000000000000000000000000000000000000000000602482015260248152612732604482612cf9565b519084617530fa5f513d8261275b575b5081612751575b501590612628565b9050151588612749565b60201115915089612742565b1515915088612621565b6020111592508961261a565b7fa04b28ec000000000000000000000000000000000000000000000000000000005f5260045ffd5b508385146120dc565b7ff7a0748c000000000000000000000000000000000000000000000000000000005f5260045ffd5b5065ffffffffffff82116120b1565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e35761281b612e1e565b612823613662565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054167fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576128ec612ba9565b3373ffffffffffffffffffffffffffffffffffffffff8216036129155761096890600435613229565b7f6697b232000000000000000000000000000000000000000000000000000000005f5260045ffd5b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020604051610e108152f35b346101e35760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357610968600435612a04612ba9565b90612a3d61095e825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b613117565b346101e3575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020600354604051908152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e3576020612ae56004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b604051908152f35b346101e35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101e357600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036101e357817f7965db0b0000000000000000000000000000000000000000000000000000000060209314908115612b7f575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483612b78565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036101e357565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036101e357565b9181601f840112156101e35782359167ffffffffffffffff83116101e357602083818601950101116101e357565b60607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126101e35760043591602435916044359067ffffffffffffffff82116101e357612c6e91600401612bef565b9091565b91908251928382525f5b848110612cba5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b80602080928401015182828601015201612c7c565b91908201809211611bf557565b610100810190811067ffffffffffffffff82111761254f57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761254f57604052565b90600182811c92168015612d81575b6020831014612d5457565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691612d49565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b612dfb949273ffffffffffffffffffffffffffffffffffffffff60609316825260208201528160408201520191612d8b565b90565b91908203918211611bf557565b81810292918115918404141715611bf557565b335f9081527fb16e88c42fd4e48df2dd6a2eabd6bc9aec654ec170056b470819f8892cc6431c602052604090205460ff1615612e5657565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004527fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177560245260445ffd5b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f20541615612efd5750565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b73ffffffffffffffffffffffffffffffffffffffff81165f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff1661300e5773ffffffffffffffffffffffffffffffffffffffff165f8181527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505f90565b73ffffffffffffffffffffffffffffffffffffffff81165f9081527fb16e88c42fd4e48df2dd6a2eabd6bc9aec654ec170056b470819f8892cc6431c602052604090205460ff1661300e5773ffffffffffffffffffffffffffffffffffffffff165f8181527fb16e88c42fd4e48df2dd6a2eabd6bc9aec654ec170056b470819f8892cc6431c6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f205416155f1461322357805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f2054165f1461322357805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300541661335c57565b7fd93c0665000000000000000000000000000000000000000000000000000000005f5260045ffd5b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0054146133d35760027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b80158015613416575b611dee575f52600460205260405f2090565b506005548111613404565b7fffffffff00000000000000000000000000000000000000000000000000000000612dfb949360609383521660208201528160408201520190612c72565b73ffffffffffffffffffffffffffffffffffffffff16918261348057505050565b823b156101e3576134e8925f92836040518096819582947fdc08fb1d0000000000000000000000000000000000000000000000000000000084527fffffffff000000000000000000000000000000000000000000000000000000008535169060048501613421565b03925af180156103d4576134f95750565b5f61350391612cf9565b565b600482015491821561357757602073ffffffffffffffffffffffffffffffffffffffff7f7ca5472b7ea78c2c0141c5a12ee6d170cf4ce8ed06be3d22c8252ddfc7a6a2c49261355686600754612dfe565b60075561356b86835f54168484541690613605565b541693604051908152a3565b505050565b73ffffffffffffffffffffffffffffffffffffffff16918261359d57505050565b823b156101e3576134e8925f92836040518096819582947fa3fe47830000000000000000000000000000000000000000000000000000000084527fffffffff000000000000000000000000000000000000000000000000000000008535169060048501613421565b6135039273ffffffffffffffffffffffffffffffffffffffff604051937fa9059cbb000000000000000000000000000000000000000000000000000000006020860152166024840152604483015260448252610b5c606483612cf9565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054161561368e57565b7f8dfc202b000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156136e557565b7fd7e6bcf8000000000000000000000000000000000000000000000000000000005f5260045ffd5b905f602091828151910182855af1156103d4575f513d61378b575073ffffffffffffffffffffffffffffffffffffffff81163b155b6137495750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b6001141561374256fea26469706673582212206c80219f5022a102b78e2b3cea53bc36a61bd9d0874a3d24319381fbeaeb022a64736f6c634300081a0033","gas_used":2882818,"gas_limit":1056277291,"status":"Return","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2"],"data":"0x000000000000000000000000000000000000000000000000ffffffffffffffff"},"decoded":null,"position":0,"index":0}],"ordering":[{"Log":0}]},{"parent":0,"children":[5,6],"idx":4,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"0x60a0604052610e548038038061001481610281565b928339810160608282031261027d5761002c826102a6565b610038602084016102a6565b604084015190936001600160401b03821161027d570182601f8201121561027d5780519061006d610068836102ba565b610281565b938285526020838301011161027d575f5b82811061026857505060205f9184010152803b15610248577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0383169081179091557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2815115610231575f8083602061013095519101845af43d15610229573d91610121610068846102ba565b9283523d5f602085013e6102d5565b505b6040519061064f8083016001600160401b038111848210176102155760209284926107e584396001600160a01b031681520301905ff0801561020a5760018060a01b0316806080525f80516020610e34833981519152547f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6040805160018060a01b0384168152846020820152a181156101f7576001600160a01b031916175f80516020610e34833981519152556040516104b1908161033482396080518160070152f35b633173bdd160e11b5f525f60045260245ffd5b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b6060916102d5565b505034156101325763b398979f60e01b5f5260045ffd5b634c9c8ce360e01b5f9081526001600160a01b0391909116600452602490fd5b8060208092840101518282880101520161007e565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761021557604052565b51906001600160a01b038216820361027d57565b6001600160401b03811161021557601f01601f191660200190565b906102f957508051156102ea57805190602001fd5b63d6bda27560e01b5f5260045ffd5b8151158061032a575b61030a575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b1561030256fe6080604052337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16036100bd575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100b3577fd2b576ec000000000000000000000000000000000000000000000000000000005f5260045ffd5b6100bb6101c1565b005b5f8073ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416368280378136915af43d5f803e1561010d573d5ff35b3d5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff82111761018257604052565b610111565b67ffffffffffffffff811161018257601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b366004116102745760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102745760043573ffffffffffffffffffffffffffffffffffffffff8116809103610274576024359067ffffffffffffffff821161027457366023830112156102745781600401359061024961024483610187565b61013e565b918083523660248286010111610274576020815f92602461027297018387013784010152610278565b565b5f80fd5b90813b156103675773ffffffffffffffffffffffffffffffffffffffff8216807fffffffffffffffffffffffff00000000000000000000000000000000000000007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416177f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a280511561033657610333916103a9565b50565b50503461033f57565b7fb398979f000000000000000000000000000000000000000000000000000000005f5260045ffd5b73ffffffffffffffffffffffffffffffffffffffff827f4c9c8ce3000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b5f806103db93602081519101845af43d156103de573d916103cc61024484610187565b9283523d5f602085013e6103e2565b90565b6060915b9061041f57508051156103f757805190602001fd5b7fd6bda275000000000000000000000000000000000000000000000000000000005f5260045ffd5b81511580610472575b610430575090565b73ffffffffffffffffffffffffffffffffffffffff907f9996b315000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b50803b1561042856fea2646970667358221220481cacafffcdffc0448fe9cfe96f8149f61f2083b69e100dc149c658ac2528fd64736f6c634300081a003360803460b857601f61064f38819003918201601f19168301916001600160401b0383118484101760bc5780849260209460405283398101031260b857516001600160a01b0381169081900360b857801560a5575f80546001600160a01b031981168317825560405192916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a361057e90816100d18239f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f803560e01c8063715018a6146103c45780638da5cb5b146103745780639623609d146101cb578063ad3cb1cc146101485763f2fde38b14610051575f80fd5b346101455760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101455760043573ffffffffffffffffffffffffffffffffffffffff8116809103610141576100a96104fc565b80156101155773ffffffffffffffffffffffffffffffffffffffff8254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b5080fd5b80fd5b503461014557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014557506101c760405161018960408261045e565b600581527f352e302e30000000000000000000000000000000000000000000000000000000602082015260405191829160208352602083019061049f565b0390f35b5060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103435760043573ffffffffffffffffffffffffffffffffffffffff81168091036103435760243573ffffffffffffffffffffffffffffffffffffffff81168091036103435760443567ffffffffffffffff8111610343573660238201121561034357806004013567ffffffffffffffff8111610347576040519161029f601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0166020018461045e565b818352366024838301011161034357815f9260246020930183860137830101526102c76104fc565b823b1561034357610316925f926040518095819482937f4f1ef286000000000000000000000000000000000000000000000000000000008452600484015260406024840152604483019061049f565b039134905af180156103385761032a575080f35b61033691505f9061045e565b005b6040513d5f823e3d90fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b34610343575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261034357602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b34610343575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610343576103fa6104fc565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761034757604052565b91908251928382525f5b8481106104e75750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b806020809284010151828286010152016104a9565b73ffffffffffffffffffffffffffffffffffffffff5f5416330361051c57565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffdfea2646970667358221220bf8617a09a791c192cb0d344676f2dcbe88d7a55549a679b2ee10beaae67e98364736f6c634300081a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61030000000000000000000000002e234dae75c793f67a35089c9d99245e1c58470b000000000000000000000000d49279c8fc3454d7328eb8777274812e84b658df00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000064c0c53b8b0000000000000000000000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f000000000000000000000000f43bca55e8091977223fa5b776e23528d205dca8000000000000000000000000aa10a84ce7d9ae517a52c6d5ca153b369af99ecf00000000000000000000000000000000000000000000000000000000","output":"0x6080604052337f0000000000000000000000004f81992fce2e1846dd528ec0102e6ee1f61ed3e273ffffffffffffffffffffffffffffffffffffffff16036100bd575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100b3577fd2b576ec000000000000000000000000000000000000000000000000000000005f5260045ffd5b6100bb6101c1565b005b5f8073ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416368280378136915af43d5f803e1561010d573d5ff35b3d5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff82111761018257604052565b610111565b67ffffffffffffffff811161018257601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b366004116102745760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102745760043573ffffffffffffffffffffffffffffffffffffffff8116809103610274576024359067ffffffffffffffff821161027457366023830112156102745781600401359061024961024483610187565b61013e565b918083523660248286010111610274576020815f92602461027297018387013784010152610278565b565b5f80fd5b90813b156103675773ffffffffffffffffffffffffffffffffffffffff8216807fffffffffffffffffffffffff00000000000000000000000000000000000000007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416177f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a280511561033657610333916103a9565b50565b50503461033f57565b7fb398979f000000000000000000000000000000000000000000000000000000005f5260045ffd5b73ffffffffffffffffffffffffffffffffffffffff827f4c9c8ce3000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b5f806103db93602081519101845af43d156103de573d916103cc61024484610187565b9283523d5f602085013e6103e2565b90565b6060915b9061041f57508051156103f757805190602001fd5b7fd6bda275000000000000000000000000000000000000000000000000000000005f5260045ffd5b81511580610472575b610430575090565b73ffffffffffffffffffffffffffffffffffffffff907f9996b315000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b50803b1561042856fea2646970667358221220481cacafffcdffc0448fe9cfe96f8149f61f2083b69e100dc149c658ac2528fd64736f6c634300081a0033","gas_used":789149,"gas_limit":1053378589,"status":"Return","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b","0x0000000000000000000000002e234dae75c793f67a35089c9d99245e1c58470b"],"data":"0x"},"decoded":null,"position":0,"index":1},{"raw_log":{"topics":["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"],"data":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000004f81992fce2e1846dd528ec0102e6ee1f61ed3e2"},"decoded":null,"position":2,"index":6}],"ordering":[{"Log":0},{"Call":0},{"Call":1},{"Log":1}]},{"parent":4,"children":[],"idx":5,"trace":{"depth":2,"success":true,"caller":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","address":"0x2e234dae75c793f67a35089c9d99245e1c58470b","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"DELEGATECALL","value":"0x0","data":"0xc0c53b8b0000000000000000000000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f000000000000000000000000f43bca55e8091977223fa5b776e23528d205dca8000000000000000000000000aa10a84ce7d9ae517a52c6d5ca153b369af99ecf","output":"0x","gas_used":162348,"gas_limit":1036895255,"status":"Stop","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d","0x0000000000000000000000000000000000000000000000000000000000000000","0x000000000000000000000000aa10a84ce7d9ae517a52c6d5ca153b369af99ecf","0x0000000000000000000000007fa9385be102ac3eac297483dd6233d62b3e1496"],"data":"0x"},"decoded":null,"position":0,"index":2},{"raw_log":{"topics":["0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d","0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775","0x000000000000000000000000aa10a84ce7d9ae517a52c6d5ca153b369af99ecf","0x0000000000000000000000007fa9385be102ac3eac297483dd6233d62b3e1496"],"data":"0x"},"decoded":null,"position":0,"index":3},{"raw_log":{"topics":["0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2"],"data":"0x0000000000000000000000000000000000000000000000000000000000000001"},"decoded":null,"position":0,"index":4}],"ordering":[{"Log":0},{"Log":1},{"Log":2}]},{"parent":4,"children":[],"idx":6,"trace":{"depth":2,"success":true,"caller":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","address":"0x4f81992fce2e1846dd528ec0102e6ee1f61ed3e2","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"0x60803460b857601f61064f38819003918201601f19168301916001600160401b0383118484101760bc5780849260209460405283398101031260b857516001600160a01b0381169081900360b857801560a5575f80546001600160a01b031981168317825560405192916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a361057e90816100d18239f35b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f803560e01c8063715018a6146103c45780638da5cb5b146103745780639623609d146101cb578063ad3cb1cc146101485763f2fde38b14610051575f80fd5b346101455760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101455760043573ffffffffffffffffffffffffffffffffffffffff8116809103610141576100a96104fc565b80156101155773ffffffffffffffffffffffffffffffffffffffff8254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b5080fd5b80fd5b503461014557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014557506101c760405161018960408261045e565b600581527f352e302e30000000000000000000000000000000000000000000000000000000602082015260405191829160208352602083019061049f565b0390f35b5060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103435760043573ffffffffffffffffffffffffffffffffffffffff81168091036103435760243573ffffffffffffffffffffffffffffffffffffffff81168091036103435760443567ffffffffffffffff8111610343573660238201121561034357806004013567ffffffffffffffff8111610347576040519161029f601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0166020018461045e565b818352366024838301011161034357815f9260246020930183860137830101526102c76104fc565b823b1561034357610316925f926040518095819482937f4f1ef286000000000000000000000000000000000000000000000000000000008452600484015260406024840152604483019061049f565b039134905af180156103385761032a575080f35b61033691505f9061045e565b005b6040513d5f823e3d90fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b34610343575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261034357602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b34610343575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610343576103fa6104fc565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761034757604052565b91908251928382525f5b8481106104e75750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b806020809284010151828286010152016104a9565b73ffffffffffffffffffffffffffffffffffffffff5f5416330361051c57565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffdfea2646970667358221220bf8617a09a791c192cb0d344676f2dcbe88d7a55549a679b2ee10beaae67e98364736f6c634300081a0033000000000000000000000000d49279c8fc3454d7328eb8777274812e84b658df","output":"0x60806040526004361015610011575f80fd5b5f803560e01c8063715018a6146103c45780638da5cb5b146103745780639623609d146101cb578063ad3cb1cc146101485763f2fde38b14610051575f80fd5b346101455760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101455760043573ffffffffffffffffffffffffffffffffffffffff8116809103610141576100a96104fc565b80156101155773ffffffffffffffffffffffffffffffffffffffff8254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6024827f1e4fbdf700000000000000000000000000000000000000000000000000000000815280600452fd5b5080fd5b80fd5b503461014557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014557506101c760405161018960408261045e565b600581527f352e302e30000000000000000000000000000000000000000000000000000000602082015260405191829160208352602083019061049f565b0390f35b5060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103435760043573ffffffffffffffffffffffffffffffffffffffff81168091036103435760243573ffffffffffffffffffffffffffffffffffffffff81168091036103435760443567ffffffffffffffff8111610343573660238201121561034357806004013567ffffffffffffffff8111610347576040519161029f601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0166020018461045e565b818352366024838301011161034357815f9260246020930183860137830101526102c76104fc565b823b1561034357610316925f926040518095819482937f4f1ef286000000000000000000000000000000000000000000000000000000008452600484015260406024840152604483019061049f565b039134905af180156103385761032a575080f35b61033691505f9061045e565b005b6040513d5f823e3d90fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b34610343575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261034357602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b34610343575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610343576103fa6104fc565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761034757604052565b91908251928382525f5b8481106104e75750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b806020809284010151828286010152016104a9565b73ffffffffffffffffffffffffffffffffffffffff5f5416330361051c57565b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffdfea2646970667358221220bf8617a09a791c192cb0d344676f2dcbe88d7a55549a679b2ee10beaae67e98364736f6c634300081a0033","gas_used":305418,"gas_limit":1036703183,"status":"Return","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0","0x0000000000000000000000000000000000000000000000000000000000000000","0x000000000000000000000000d49279c8fc3454d7328eb8777274812e84b658df"],"data":"0x"},"decoded":null,"position":0,"index":5}],"ordering":[{"Log":0}]},{"parent":0,"children":[],"idx":7,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x40c10f19000000000000000000000000d5e069bc58dedb2a3a348995ee753eef0274004f00000000000000000000000000000000000000000000000000038d7ea4c68000","output":"0x","gas_used":46438,"gas_limit":1052594323,"status":"Stop","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x0000000000000000000000000000000000000000000000000000000000000000","0x000000000000000000000000d5e069bc58dedb2a3a348995ee753eef0274004f"],"data":"0x00000000000000000000000000000000000000000000000000038d7ea4c68000"},"decoded":null,"position":0,"index":7}],"ordering":[{"Log":0}]},{"parent":0,"children":[],"idx":8,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xca669fa7000000000000000000000000d5e069bc58dedb2a3a348995ee753eef0274004f","output":"0x","gas_used":0,"gas_limit":1052548082,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":9,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x095ea7b3000000000000000000000000f62849f9a0b5bf2913b396098f7c7019b51a820affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":24298,"gas_limit":1052547543,"status":"Return","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925","0x000000000000000000000000d5e069bc58dedb2a3a348995ee753eef0274004f","0x000000000000000000000000f62849f9a0b5bf2913b396098f7c7019b51a820a"],"data":"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"},"decoded":null,"position":0,"index":8}],"ordering":[{"Log":0}]},{"parent":0,"children":[],"idx":10,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x5991a2df15a8f6a256d3ec51e99254cd3fb576a9","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"0x60808060405234601557610fd0908161001a8239f35b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714610b915750806306661abd14610b575780633a32058114610a1d578063a3fe4783146105eb578063d183ce14146105295763dc08fb1d1461005e575f80fd5b346103cb5761006c36610cb1565b9092916040517fbf22c4570000000000000000000000000000000000000000000000000000000081528360048201525f81602481335afa801561051e575f906103fc575b6020915001519260068410156103cf57604051926100cd84610e07565b60018452602084019182527fffffffff00000000000000000000000000000000000000000000000000000000604085019316835261010a81610f60565b956101186040519788610e40565b81875236828201116103cb57815f92602092838a0137870101526060830194855260ff60808401941684525f54680100000000000000008110156103725780600161016592015f55610d51565b93909361039f5751151560ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00855416911617835551600183015560028201905160e01c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082541617905560038101925192835167ffffffffffffffff8111610372576101f28254610db6565b601f811161032d575b506020601f8211600114610287579080600494939260ff96975f9261027c575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790555b019151167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790555f80f35b015190505f8061021b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0821695835f52815f20965f5b8181106103155750966001928492600497969560ff999a106102de575b505050811b01905561024d565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690555f80806102d1565b838301518955600190980197602093840193016102b4565b825f5260205f20601f830160051c81019160208410610368575b601f0160051c01905b81811061035d57506101fb565b5f8155600101610350565b9091508190610347565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b503d805f833e61040c8183610e40565b8101906020818303126103cb5780519067ffffffffffffffff82116103cb5701610100818303126103cb576040519061044482610e23565b61044d81610f3f565b8252602081015160068110156103cb57602083015261046e60408201610f3f565b6040830152606081015165ffffffffffff811681036103cb57606083015261049860808201610f3f565b60808301526104a960a08201610f3f565b60a083015260c081015160c083015260e08101519067ffffffffffffffff82116103cb57019180601f840112156103cb578251926104e684610f60565b916104f46040519384610e40565b848352602085830101116103cb5760209361051491858085019101610c4d565b60e08201526100b0565b6040513d5f823e3d90fd5b346103cb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb576004355f548110156103cb5761056d90610d51565b5060ff8154166001820154916105e1600282015460e01b917fffffffff0000000000000000000000000000000000000000000000000000000060ff60046105b660038501610e81565b930154169360405196879615158752602087015216604085015260a0606085015260a0840190610c6e565b9060808301520390f35b346103cb576105f936610cb1565b9092916040517fbf22c4570000000000000000000000000000000000000000000000000000000081528360048201525f81602481335afa801561051e575f906108fb575b6020915001519260068410156103cf576040519261065a84610e07565b5f8452602084019182527fffffffff00000000000000000000000000000000000000000000000000000000604085019316835261069681610f60565b956106a46040519788610e40565b81875236828201116103cb57815f92602092838a0137870101526060830194855260ff60808401941684525f5468010000000000000000811015610372578060016106f192015f55610d51565b93909361039f5751151560ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00855416911617835551600183015560028201905160e01c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082541617905560038101925192835167ffffffffffffffff81116103725761077e8254610db6565b601f81116108b6575b506020601f8211600114610811579080600494939260ff96975f926108065750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916179055019151167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790555f80f35b01519050878061021b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0821695835f52815f20965f5b81811061089e5750966001928492600497969560ff999a1061086757505050811b01905561024d565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558780806102d1565b8383015189556001909801976020938401930161083e565b825f5260205f20601f830160051c810191602084106108f1575b601f0160051c01905b8181106108e65750610787565b5f81556001016108d9565b90915081906108d0565b503d805f833e61090b8183610e40565b8101906020818303126103cb5780519067ffffffffffffffff82116103cb5701610100818303126103cb576040519061094382610e23565b61094c81610f3f565b8252602081015160068110156103cb57602083015261096d60408201610f3f565b6040830152606081015165ffffffffffff811681036103cb57606083015261099760808201610f3f565b60808301526109a860a08201610f3f565b60a083015260c081015160c083015260e08101519067ffffffffffffffff82116103cb57019180601f840112156103cb578251926109e584610f60565b916109f36040519384610e40565b848352602085830101116103cb57602093610a1391858085019101610c4d565b60e082015261063d565b346103cb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb575f6080604051610a5b81610e07565b8281528260208201528260408201526060808201520152610a7d600435610d51565b50604051610a8a81610e07565b60ff825416151581526001820154916020820192835260ff610b4b600283015460e01b927fffffffff0000000000000000000000000000000000000000000000000000000060408601941684527fffffffff00000000000000000000000000000000000000000000000000000000836004610b0760038501610e81565b93606089019485520154169460808701958652604051978897602089525115156020890152516040880152511660608601525160a0608086015260c0850190610c6e565b91511660a08301520390f35b346103cb575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb5760205f54604051908152f35b346103cb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb57600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036103cb57817f7ff6bc9e0000000000000000000000000000000000000000000000000000000060209314908115610c23575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610c1c565b5f5b838110610c5e5750505f910152565b8181015183820152602001610c4f565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093610caa81518092818752878088019101610c4d565b0116010190565b9060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8301126103cb57600435916024357fffffffff00000000000000000000000000000000000000000000000000000000811681036103cb579160443567ffffffffffffffff81116103cb57826023820112156103cb5780600401359267ffffffffffffffff84116103cb57602484830101116103cb576024019190565b5f54811015610d89575f8080526005919091027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630191565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b90600182811c92168015610dfd575b6020831014610dd057565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691610dc5565b60a0810190811067ffffffffffffffff82111761037257604052565b610100810190811067ffffffffffffffff82111761037257604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761037257604052565b9060405191825f825492610e9484610db6565b8084529360018116908115610eff5750600114610ebb575b50610eb992500383610e40565b565b90505f9291925260205f20905f915b818310610ee3575050906020610eb9928201015f610eac565b6020919350806001915483858901015201910190918492610eca565b60209350610eb99592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f610eac565b519073ffffffffffffffffffffffffffffffffffffffff821682036103cb57565b67ffffffffffffffff811161037257601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0166020019056fea2646970667358221220af75d4a17c0b6da6a3609fe1e4338988c321fe2d51d15dda0930b8f2e25388aa64736f6c634300081a0033","output":"0x6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714610b915750806306661abd14610b575780633a32058114610a1d578063a3fe4783146105eb578063d183ce14146105295763dc08fb1d1461005e575f80fd5b346103cb5761006c36610cb1565b9092916040517fbf22c4570000000000000000000000000000000000000000000000000000000081528360048201525f81602481335afa801561051e575f906103fc575b6020915001519260068410156103cf57604051926100cd84610e07565b60018452602084019182527fffffffff00000000000000000000000000000000000000000000000000000000604085019316835261010a81610f60565b956101186040519788610e40565b81875236828201116103cb57815f92602092838a0137870101526060830194855260ff60808401941684525f54680100000000000000008110156103725780600161016592015f55610d51565b93909361039f5751151560ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00855416911617835551600183015560028201905160e01c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082541617905560038101925192835167ffffffffffffffff8111610372576101f28254610db6565b601f811161032d575b506020601f8211600114610287579080600494939260ff96975f9261027c575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790555b019151167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790555f80f35b015190505f8061021b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0821695835f52815f20965f5b8181106103155750966001928492600497969560ff999a106102de575b505050811b01905561024d565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690555f80806102d1565b838301518955600190980197602093840193016102b4565b825f5260205f20601f830160051c81019160208410610368575b601f0160051c01905b81811061035d57506101fb565b5f8155600101610350565b9091508190610347565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b503d805f833e61040c8183610e40565b8101906020818303126103cb5780519067ffffffffffffffff82116103cb5701610100818303126103cb576040519061044482610e23565b61044d81610f3f565b8252602081015160068110156103cb57602083015261046e60408201610f3f565b6040830152606081015165ffffffffffff811681036103cb57606083015261049860808201610f3f565b60808301526104a960a08201610f3f565b60a083015260c081015160c083015260e08101519067ffffffffffffffff82116103cb57019180601f840112156103cb578251926104e684610f60565b916104f46040519384610e40565b848352602085830101116103cb5760209361051491858085019101610c4d565b60e08201526100b0565b6040513d5f823e3d90fd5b346103cb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb576004355f548110156103cb5761056d90610d51565b5060ff8154166001820154916105e1600282015460e01b917fffffffff0000000000000000000000000000000000000000000000000000000060ff60046105b660038501610e81565b930154169360405196879615158752602087015216604085015260a0606085015260a0840190610c6e565b9060808301520390f35b346103cb576105f936610cb1565b9092916040517fbf22c4570000000000000000000000000000000000000000000000000000000081528360048201525f81602481335afa801561051e575f906108fb575b6020915001519260068410156103cf576040519261065a84610e07565b5f8452602084019182527fffffffff00000000000000000000000000000000000000000000000000000000604085019316835261069681610f60565b956106a46040519788610e40565b81875236828201116103cb57815f92602092838a0137870101526060830194855260ff60808401941684525f5468010000000000000000811015610372578060016106f192015f55610d51565b93909361039f5751151560ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00855416911617835551600183015560028201905160e01c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082541617905560038101925192835167ffffffffffffffff81116103725761077e8254610db6565b601f81116108b6575b506020601f8211600114610811579080600494939260ff96975f926108065750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916179055019151167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790555f80f35b01519050878061021b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0821695835f52815f20965f5b81811061089e5750966001928492600497969560ff999a1061086757505050811b01905561024d565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558780806102d1565b8383015189556001909801976020938401930161083e565b825f5260205f20601f830160051c810191602084106108f1575b601f0160051c01905b8181106108e65750610787565b5f81556001016108d9565b90915081906108d0565b503d805f833e61090b8183610e40565b8101906020818303126103cb5780519067ffffffffffffffff82116103cb5701610100818303126103cb576040519061094382610e23565b61094c81610f3f565b8252602081015160068110156103cb57602083015261096d60408201610f3f565b6040830152606081015165ffffffffffff811681036103cb57606083015261099760808201610f3f565b60808301526109a860a08201610f3f565b60a083015260c081015160c083015260e08101519067ffffffffffffffff82116103cb57019180601f840112156103cb578251926109e584610f60565b916109f36040519384610e40565b848352602085830101116103cb57602093610a1391858085019101610c4d565b60e082015261063d565b346103cb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb575f6080604051610a5b81610e07565b8281528260208201528260408201526060808201520152610a7d600435610d51565b50604051610a8a81610e07565b60ff825416151581526001820154916020820192835260ff610b4b600283015460e01b927fffffffff0000000000000000000000000000000000000000000000000000000060408601941684527fffffffff00000000000000000000000000000000000000000000000000000000836004610b0760038501610e81565b93606089019485520154169460808701958652604051978897602089525115156020890152516040880152511660608601525160a0608086015260c0850190610c6e565b91511660a08301520390f35b346103cb575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb5760205f54604051908152f35b346103cb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103cb57600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036103cb57817f7ff6bc9e0000000000000000000000000000000000000000000000000000000060209314908115610c23575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610c1c565b5f5b838110610c5e5750505f910152565b8181015183820152602001610c4f565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093610caa81518092818752878088019101610c4d565b0116010190565b9060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8301126103cb57600435916024357fffffffff00000000000000000000000000000000000000000000000000000000811681036103cb579160443567ffffffffffffffff81116103cb57826023820112156103cb5780600401359267ffffffffffffffff84116103cb57602484830101116103cb576024019190565b5f54811015610d89575f8080526005919091027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630191565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b90600182811c92168015610dfd575b6020831014610dd057565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691610dc5565b60a0810190811067ffffffffffffffff82111761037257604052565b610100810190811067ffffffffffffffff82111761037257604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761037257604052565b9060405191825f825492610e9484610db6565b8084529360018116908115610eff5750600114610ebb575b50610eb992500383610e40565b565b90505f9291925260205f20905f915b818310610ee3575050906020610eb9928201015f610eac565b6020919350806001915483858901015201910190918492610eca565b60209350610eb99592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f610eac565b519073ffffffffffffffffffffffffffffffffffffffff821682036103cb57565b67ffffffffffffffff811161037257601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0166020019056fea2646970667358221220af75d4a17c0b6da6a3609fe1e4338988c321fe2d51d15dda0930b8f2e25388aa64736f6c634300081a0033","gas_used":810452,"gas_limit":1052491147,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":11,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xca669fa7000000000000000000000000aa10a84ce7d9ae517a52c6d5ca153b369af99ecf","output":"0x","gas_used":0,"gas_limit":1051692964,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":0,"children":[13],"idx":12,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xce79eb600000000000000000000000005991a2df15a8f6a256d3ec51e99254cd3fb576a90000000000000000000000000000000000000000000000000000000000000001","output":"0x","gas_used":24966,"gas_limit":1051692397,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[{"Call":0}]},{"parent":12,"children":[],"idx":13,"trace":{"depth":2,"success":true,"caller":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","address":"0x2e234dae75c793f67a35089c9d99245e1c58470b","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"DELEGATECALL","value":"0x0","data":"0xce79eb600000000000000000000000005991a2df15a8f6a256d3ec51e99254cd3fb576a90000000000000000000000000000000000000000000000000000000000000001","output":"0x","gas_used":24646,"gas_limit":1035259418,"status":"Stop","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0x7ee54953080e392a475a25b6acacb85417ca4e1953293c90934233ca13612510","0x0000000000000000000000005991a2df15a8f6a256d3ec51e99254cd3fb576a9"],"data":"0x0000000000000000000000000000000000000000000000000000000000000001"},"decoded":null,"position":0,"index":9}],"ordering":[{"Log":0}]},{"parent":0,"children":[15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,49,50,52,53,55,56,58,59,62,63,65,66,68,69,72,73],"idx":14,"trace":{"depth":1,"success":true,"caller":"0x7fa9385be102ac3eac297483dd6233d62b3e1496","address":"0xc7183455a4c133ae270771860664b6b7ec320bb1","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"0x608080604052346104ca57608081614c41803803809161001f8285610d0a565b8339810103126104ca578051906001600160a01b03821682036104ca5760208101516001600160a01b038116908190036104ca57600161006d606061006660408601610d41565b9401610d41565b938160ff19600c541617600c55601f54906101008360a81b039060081b1690828060a81b0319161717601f5560018060a01b0319602054161760205560018060a01b031660018060a01b0319602154161760215560018060a01b031660018060a01b031960225416176022555f5b60038110156105d35760405163348051d760e11b8152600481018290525f816024815f80516020614c218339815191525afa9081156104d6575f916105b9575b50604051906101566021836020810193606360f81b85526101458151809260208686019101610d79565b81010301601f198101845283610d0a565b60405160208101906101826020828651610171818789610d79565b81010301601f198101835282610d0a565b519020916040519263ffa1864960e01b845260048401526020836024815f80516020614c218339815191525afa9283156104d6575f9361057e575b505f80516020614c218339815191523b156104ca5761021260645f9260405194859384926318caf8e360e31b845260018060a01b03891660048501526040602485015251809281604486015285850190610d79565b601f01601f19168101030181835f80516020614c218339815191525af180156104d65761056e575b506023820180546001600160a01b0319166001600160a01b0390921691909117815560405163348051d760e11b8152600481018390525f816024815f80516020614c218339815191525afa9081156104d6575f9161054c575b50604051906102bd6021836020810193600760fc1b85526101458151809260208686019101610d79565b60405160208101906102d86020828651610171818789610d79565b519020916040519263ffa1864960e01b845260048401526020836024815f80516020614c218339815191525afa9283156104d6575f93610511575b505f80516020614c218339815191523b156104ca5761036860645f9260405194859384926318caf8e360e31b845260018060a01b03891660048501526040602485015251809281604486015285850190610d79565b601f01601f19168101030181835f80516020614c218339815191525af180156104d657610501575b506026830180546001600160a01b0319166001600160a01b0392831617905560205482549082169116813b156104ca575f916044839260405194859384926340c10f1960e01b8452600484015264e8d4a5100060248401525af180156104d6576104f1575b50546001600160a01b03165f80516020614c218339815191523b156104ca576040519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af180156104d6576104e1575b5060208054601f5460405163095ea7b360e01b81526001600160a01b0360089290921c821660048201525f1960248201529291839160449183915f91165af180156104d65761049b575b506001016100db565b6020813d82116104ce575b816104b360209383610d0a565b810103126104ca5751801515036104ca575f610492565b5f80fd5b3d91506104a6565b6040513d5f823e3d90fd5b5f6104eb91610d0a565b5f610448565b5f6104fb91610d0a565b5f6103f5565b5f61050b91610d0a565b5f610390565b9092506020813d8211610544575b8161052c60209383610d0a565b810103126104ca5761053d90610d41565b915f610313565b3d915061051f565b61056891503d805f833e6105608183610d0a565b810190610d9a565b5f610293565b5f61057891610d0a565b5f61023a565b9092506020813d82116105b1575b8161059960209383610d0a565b810103126104ca576105aa90610d41565b915f6101bd565b3d915061058c565b6105cd91503d805f833e6105608183610d0a565b5f61011b565b604080516105e18282610d0a565b600281526020810161065360f41b8152825160208101906106028284610d55565b60028152610611602282610d0a565b51902083519063ffa1864960e01b825260048201526020816024815f80516020614c218339815191525afa908115610c4f575f91610cd0575b505f80516020614c218339815191523b156104ca5761069e60645f92865194859384926318caf8e360e31b845260018060a01b03169788600485015289602485015251809281604486015285850190610d79565b601f01601f19168101030181835f80516020614c218339815191525af18015610ab157610cc0575b50602980546001600160a01b03191691909117905580516106e78282610d0a565b600281526020810161653160f01b8152825160208101906107088284610d55565b60028152610717602282610d0a565b51902083519063ffa1864960e01b825260048201526020816024815f80516020614c218339815191525afa908115610c4f575f91610c86575b505f80516020614c218339815191523b156104ca576107a460645f92865194859384926318caf8e360e31b845260018060a01b03169788600485015289602485015251809281604486015285850190610d79565b601f01601f19168101030181835f80516020614c218339815191525af18015610ab157610c76575b5060018060a01b0319602a541617602a5562278d00420190814211610bf857905f915b6003831015610c69576023830180549093906001600160a01b03165f80516020614c218339815191523b156104ca5782519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af18015610ab157610c59575b5060018060a01b03601f5460081c16938160260190602060018060a01b0383541660e460018060a01b0360295416915f88519a8b9485936320a9440960e11b8552600485015260248401528a604484015260a06064840152600460a4840152631cd9595960e21b60c48401528160848401525af1958615610c4f575f96610c1c575b5081545f91906001600160a01b03165f80516020614c218339815191523b156104ca5785519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af18015610bd457610c0c575b50601f54600185019060081c6001600160a01b0316818611610bf85781620f42400291620f4240830403610bf857803b156104ca578651633752ba7560e21b8152600481018a905260248101839052606060448201525f6064820181905290918290608490829084905af18015610bee57610bde575b50875f52602b602052855f2060ff1981541690556001851015610adf575b5050600283146109d4575b505060010192506107ef565b610acb57546001600160a01b03165f80516020614c218339815191523b156104ca5782519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af18015610ab157610abb575b50601f5460081c6001600160a01b031693843b156104ca575f80956084855180988193639e63798d60e01b8352866004840152816024840152606060448401528160648401525af1948515610ab1576001939495610aa1575b505f52602b602052825f20600260ff19825416179055839291856109c8565b5f610aab91610d0a565b85610a82565b83513d5f823e3d90fd5b5f610ac591610d0a565b84610a29565b634e487b7160e01b5f52603260045260245ffd5b90545f92506001600160a01b03165f80516020614c218339815191523b156104ca5785519063ca669fa760e01b825260048201525f81602481835f80516020614c218339815191525af18015610bd457610bc4575b50601f5460081c6001600160a01b0316803b156104ca578551630d2e13f560e41b8152600481018990526024810192909252606060448301525f60648301819052908290608490829084905af18015610bba57610baa575b50855f52602b602052835f20600160ff1982541617905586806109bd565b5f610bb491610d0a565b86610b8c565b85513d5f823e3d90fd5b5f610bce91610d0a565b87610b34565b86513d5f823e3d90fd5b5f610be891610d0a565b8861099f565b87513d5f823e3d90fd5b634e487b7160e01b5f52601160045260245ffd5b5f610c1691610d0a565b87610929565b9095506020813d8211610c47575b81610c3760209383610d0a565b810103126104ca575194866108d3565b3d9150610c2a565b84513d5f823e3d90fd5b5f610c6391610d0a565b84610851565b51613e169081610e0b8239f35b5f610c8091610d0a565b826107cc565b90506020813d602011610cb8575b81610ca160209383610d0a565b810103126104ca57610cb290610d41565b84610750565b3d9150610c94565b5f610cca91610d0a565b826106c6565b90506020813d602011610d02575b81610ceb60209383610d0a565b810103126104ca57610cfc90610d41565b8461064a565b3d9150610cde565b601f909101601f19168101906001600160401b03821190821017610d2d57604052565b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036104ca57565b5f5b60028110610d6957505060025f910152565b8181015183820152602001610d57565b5f5b838110610d8a5750505f910152565b8181015183820152602001610d7b565b6020818303126104ca578051906001600160401b0382116104ca570181601f820112156104ca5780516001600160401b038111610d2d5760405192610de9601f8301601f191660200185610d0a565b818452602082840101116104ca57610e079160208085019101610d79565b9056fe6080806040526004361015610012575f80fd5b5f905f3560e01c90816305e3769c1461191c57508063087320b2146118025780630b78f9c0146111ce5780631ed7831c146111255780632ade388014610f685780633e5e3c2314610ebf5780633f7286f414610e16578063531c7faa14610dfe57806359e1361914610dc25780635b7baf6414610d8757806366d9a9a014610c2c578063725cc2e114610c145780637f974c6f14610bd857806381ede1bb14610bc05780638253f2d91461080d57806385226c811461075d578063916a17c6146106885780639675dc1714610670578063b0464fdc1461059b578063b5508aa9146104eb578063b5c0922c146104a0578063ba414fa61461045d578063d130382514610445578063e20c9f711461038c578063e5d6bf02146101f1578063e662e387146101b0578063fa7626d41461016f5763fd61a25614610152575f80fd5b3461016c5761016961016336611c67565b91612d94565b80f35b80fd5b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57602060ff601f54166040519015158152f35b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57602060ff602f54166040519015158152f35b503461016c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57806102336202a3006001600435613b7d565b6102fb604091838084516102478682611a0b565b600c81527f426f756e6420726573756c740000000000000000000000000000000000000000602082015285516102e4816102b260208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528a60248401526064830190611b2b565b876044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50426128c2565b90737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610388578051917fe5d6bf020000000000000000000000000000000000000000000000000000000083526004830152828260248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af190811561037f575061036e5750f35b8161037891611a0b565b61016c5780f35b513d84823e3d90fd5b5050fd5b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601554928381520191601582527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475915b818110610419576104158561040981870382611a0b565b60405191829182611ba2565b0390f35b825473ffffffffffffffffffffffffffffffffffffffff168452602090930192600192830192016103f2565b503461016c5761016961045736611c67565b91612b77565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576020610496612a9e565b6040519015158152f35b503461016c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760ff60406020926004358152602b8452205416604051908152f35b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760195461052681611db7565b916105346040519384611a0b565b818352601981527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c9695602084015b83831061057e576040516020808252819061041590820188611bf1565b60016020819261058d85611a4c565b815201920192019190610561565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601c546105d681611db7565b916105e46040519384611a0b565b818352601c81527f0e4562a10381dec21b205ed72637e6b1b523bdd0e4d4d50af5cd23dd4500a211602084015b83831061062657604051806104158782611d06565b60026020600192604051610639816119a5565b73ffffffffffffffffffffffffffffffffffffffff865416815261065e8587016121fe565b83820152815201920192019190610611565b503461016c5761016961068236611b6e565b906128cf565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601d546106c381611db7565b916106d16040519384611a0b565b818352601d81527f6d4407e7be21f808e6509aa9fa9143369579dd7d760fe20a2c09680fc146134f602084015b83831061071357604051806104158782611d06565b60026020600192604051610726816119a5565b73ffffffffffffffffffffffffffffffffffffffff865416815261074b8587016121fe565b838201528152019201920191906106fe565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601a5461079881611db7565b916107a66040519384611a0b565b818352601a81527f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e602084015b8383106107f0576040516020808252819061041590820188611bf1565b6001602081926107ff85611a4c565b8152019201920191906107d3565b503461016c5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576084358015158103610bbc5760a4358015158103610bb8576003600435066003811015610b85576023015473ffffffffffffffffffffffffffffffffffffffff169115610bb2576003602435066003811015610b85576026015473ffffffffffffffffffffffffffffffffffffffff165b6001604435166002811015610b585773ffffffffffffffffffffffffffffffffffffffff85916029015416926108ec62278d00610168606435613b7d565b9060409583808861096b61099d82516109058482611a0b565b600c81527f426f756e6420726573756c7400000000000000000000000000000000000000006020820152835192839160208301957fb60e72cc00000000000000000000000000000000000000000000000000000000875260248401526064830190611b2b565b896044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b4a578651907fca669fa70000000000000000000000000000000000000000000000000000000082526004820152838160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af18015610b4e57610b2e575b509273ffffffffffffffffffffffffffffffffffffffff9260c49284602096610a4d82601f5460081c1693426128c2565b9015610b27578160225416905b8a51998a9889977f415288120000000000000000000000000000000000000000000000000000000089521660048801526024870152604486015260a060648601528360a48601521660848401525af1839181610aef575b50610aba578280f35b8252602b60205281207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690555f808280f35b9091506020813d602011610b1f575b81610b0b60209383611a0b565b81010312610b1b5751905f610ab1565b5f80fd5b3d9150610afe565b8390610a5a565b92610b3d818096939495611a0b565b610b4a579291905f610a1c565b8380fd5b87513d86823e3d90fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b826108ae565b8280fd5b5080fd5b503461016c57610169610bd236611c67565b91612678565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576020602c54604051908152f35b503461016c57610169610c2636611b6e565b906124d9565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601b54610c6781611db7565b610c746040519182611a0b565b818152601b83526020810191837f3ad8aa4f87544323a9d1e5dd902f40c356527a7955687113db5f9a85ad579dc1845b838310610d4c57868587604051928392602084019060208552518091526040840160408260051b8601019392905b828210610ce157505050500390f35b91936020610d3c827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0600195979984950301865288519083610d2c8351604084526040840190611b2b565b9201519084818403910152611cb1565b9601920192018594939192610cd2565b60026020600192604051610d5f816119a5565b610d6886611a4c565b8152610d758587016121fe565b83820152815201920192019190610ca4565b503461016c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57610169600435612106565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576020602e54604051908152f35b503461016c57610169610e1036611c67565b91611dfc565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601754928381520191601782527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c15915b818110610e93576104158561040981870382611a0b565b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201610e7c565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601854928381520191601882527fb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2e915b818110610f3c576104158561040981870382611a0b565b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201610f25565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601e54610fa381611db7565b610fb06040519182611a0b565b818152601e83526020810191837f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e350845b83831061108f57868587604051928392602084019060208552518091526040840160408260051b8601019392905b82821061101d57505050500390f35b9193602061107f827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186526040838a5173ffffffffffffffffffffffffffffffffffffffff815116845201519181858201520190611bf1565b960192019201859493919261100e565b60405161109b816119a5565b73ffffffffffffffffffffffffffffffffffffffff83541681526001830180546110c481611db7565b916110d26040519384611a0b565b8183528a526020808b20908b9084015b838210611108575050505060019282602092836002950152815201920192019190610fe0565b60016020819261111786611a4c565b8152019301910190916110e2565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601654928381520191601682527fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b5124289915b8181106111a2576104158561040981870382611a0b565b825473ffffffffffffffffffffffffffffffffffffffff1684526020909301926001928301920161118b565b5034610b1b575f906111ec6127106111e536611b6e565b9490613b7d565b916040905f8083516111fe8582611a0b565b600c81527f426f756e6420726573756c7400000000000000000000000000000000000000006020820152845161129b8161126960208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528960248401526064830190611b2b565b8a6044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50836127100361271081116117d5575f6112c492613b7d565b5f8083516112d28582611a0b565b600c81527f426f756e6420726573756c7400000000000000000000000000000000000000006020820152845161133d816102b260208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528960248401526064830190611b2b565b51906a636f6e736f6c652e6c6f675afa5073ffffffffffffffffffffffffffffffffffffffff60215416737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b578251907f06447d5600000000000000000000000000000000000000000000000000000000825260048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af180156117cb576117b6575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610b4a5783809160248551809481937f84f150900000000000000000000000000000000000000000000000000000000083528160048401525af1801561171e579084916117a1575b505073ffffffffffffffffffffffffffffffffffffffff601f5460081c168251946114688487611a0b565b600886527f747265617375727900000000000000000000000000000000000000000000000060208701528351855b6008811061178c5750958686602881990152600881526114b7602882611a0b565b602081519101208551907fffa186490000000000000000000000000000000000000000000000000000000082526004820152602081602481737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa908115611744578791611752575b50737109709ecfa91a80626ff3989d68f67f5b1dd12d3b1561174e578673ffffffffffffffffffffffffffffffffffffffff61158c92885193849283927fc657c71800000000000000000000000000000000000000000000000000000000845216958660048401528a60248401526044830190611b2b565b038183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af180156117445790879161172f575b5050823b1561172b576044869283875195869485937fb4d884f6000000000000000000000000000000000000000000000000000000008552600485015260248401525af1801561171e57908491611709575b505073ffffffffffffffffffffffffffffffffffffffff601f5460081c1690813b1561170457839160248392855194859384927f84f1509000000000000000000000000000000000000000000000000000000000845260048401525af180156116f8579083916116e3575b5050737109709ecfa91a80626ff3989d68f67f5b1dd12d3b156116e0578051907f90c5013b000000000000000000000000000000000000000000000000000000008252828260048183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af190811561037f575061036e5750f35b50fd5b816116ed91611a0b565b6116e057815f611671565b505051903d90823e3d90fd5b505050fd5b8161171391611a0b565b61038857825f611606565b50505051903d90823e3d90fd5b8580fd5b8161173991611a0b565b61172b57855f6115b4565b86513d89823e3d90fd5b8680fd5b90506020813d602011611784575b8161176d60209383611a0b565b8101031261174e5761177e906130cc565b5f611514565b3d9150611760565b80602080928a01015182828501015201611496565b816117ab91611a0b565b610bb857825f61143d565b6117c39193505f90611a0b565b5f915f6113d5565b83513d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b34610b1b575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610b1b576040515f60305461184081611954565b80845290600181169081156118da575060011461187c575b6104158361186881850382611a0b565b604051918291602083526020830190611b2b565b60305f9081527f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb939250905b8082106118c057509091508101602001611868611858565b9192600181602092548385880101520191019092916118a8565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208086019190915291151560051b840190910191506118689050611858565b34610b1b575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610b1b57602090602d548152f35b90600182811c9216801561199b575b602083101461196e57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691611963565b6040810190811067ffffffffffffffff8211176119c157604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610100810190811067ffffffffffffffff8211176119c157604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176119c157604052565b9060405191825f825492611a5f84611954565b8084529360018116908115611aca5750600114611a86575b50611a8492500383611a0b565b565b90505f9291925260205f20905f915b818310611aae575050906020611a84928201015f611a77565b6020919350806001915483858901015201910190918492611a95565b60209350611a849592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f611a77565b5f5b838110611b1b5750505f910152565b8181015183820152602001611b0c565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093611b6781518092818752878088019101611b0a565b0116010190565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6040910112610b1b576004359060243590565b60206040818301928281528451809452019201905f5b818110611bc55750505090565b825173ffffffffffffffffffffffffffffffffffffffff16845260209384019390920191600101611bb8565b9080602083519182815201916020808360051b8301019401925f915b838310611c1c57505050505090565b9091929394602080611c58837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe086600196030187528951611b2b565b97019301930191939290611c0d565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6060910112610b1b57600435906024358015158103610b1b57906044358015158103610b1b5790565b90602080835192838152019201905f5b818110611cce5750505090565b82517fffffffff0000000000000000000000000000000000000000000000000000000016845260209384019390920191600101611cc1565b602081016020825282518091526040820191602060408360051b8301019401925f915b838310611d3857505050505090565b9091929394602080611d9b837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187526040838b5173ffffffffffffffffffffffffffffffffffffffff815116845201519181858201520190611cb1565b97019301930191939290611d29565b919082039182116117d557565b67ffffffffffffffff81116119c15760051b60200190565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146117d55760010190565b90919082806120fd575b5f93156120ec57611e15613090565b50611e1f8261387b565b9281156120d7575b5091905b82156120d05783156120a1575060208101519060068210156120745773ffffffffffffffffffffffffffffffffffffffff9161206a5760800151165b925b815f52602b60205260ff60405f20541693737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f5761204c575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610bbc57818080926084604051809581937f41dd26f5000000000000000000000000000000000000000000000000000000008352896004840152816024840152606060448401528160648401525af19182612037575b5050611f82575b50505050565b611f9192611fca575b50613550565b60018114908115611fbf575b50611fac575b5f808080611f7c565b611fb7602e54611dcf565b602e55611fa3565b60029150145f611f9d565b50612031604051611fdc606082611a0b565b602181527f72656a6563742073756363656564656420776974682077726f6e67206163746f60208201527f7200000000000000000000000000000000000000000000000000000000000000604082015261333e565b5f611f8b565b8161204191611a0b565b610bbc57815f611f75565b61205891505f90611a0b565b5f80611eff565b6040513d5f823e3d90fd5b6040015116611e67565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b73ffffffffffffffffffffffffffffffffffffffff9190156120c95760800151165b92611e69565b51166120c3565b5050505050565b90506120e49192506139fc565b91905f611e27565b906120f690613225565b9091611e2b565b82159350611e06565b61210e613090565b506121188161387b565b509081156121ed575b5080156121ea57805f52602b60205260ff60405f2054169073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610b1b575f80916024604051809481937f5b7baf640000000000000000000000000000000000000000000000000000000083528760048401525af190816121da575b506121a3575050565b6121ac90613550565b600181149081156121cf575b506121bf57565b6121ca602e54611dcf565b602e55565b60029150145f6121b8565b5f6121e491611a0b565b5f61219a565b50565b6121f791506139fc565b505f612121565b90604051918281549182825260208201905f5260205f20925f905b80600783011061241557611a849454918181106123df575b8181106123a9575b818110612373575b81811061233d575b818110612307575b8181106122d1575b81811061229c575b1061226f575b500383611a0b565b7fffffffff000000000000000000000000000000000000000000000000000000001681526020015f612267565b9260206001917fffffffff0000000000000000000000000000000000000000000000000000000085831b168152019301612261565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560401b168152019301612259565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560601b168152019301612251565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560801b168152019301612249565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560a01b168152019301612241565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560c01b168152019301612239565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560e01b168152019301612231565b9160089193506101006001917fffffffff000000000000000000000000000000000000000000000000000000008754818160e01b168352818160c01b166020840152818160a01b166040840152818160801b166060840152818160601b166080840152818160401b1660a0840152818160201b1660c08401521660e0820152019401920185929391612219565b81156124ac570690565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b6124e290613225565b90915f918315611f7c575173ffffffffffffffffffffffffffffffffffffffff16737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b57604051907fca669fa700000000000000000000000000000000000000000000000000000000825260048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612663575b50600373ffffffffffffffffffffffffffffffffffffffff601f5460081c1691066003811015612636576026015473ffffffffffffffffffffffffffffffffffffffff16813b15610bb85782916084839260405195869384927fc9a84bb90000000000000000000000000000000000000000000000000000000084528960048501526024840152606060448401528160648401525af19182612621575b50506126185750565b611a8490613550565b61262c828092611a0b565b61016c578061260f565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6126709192505f90611a0b565b5f905f612572565b5f91156128b15761268890613225565b9190915b8215611f7c57838015612899575b1561287c5773ffffffffffffffffffffffffffffffffffffffff6040820151165b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612867575b5060c073ffffffffffffffffffffffffffffffffffffffff601f5460081c16910151813b15610bb8576040517fd2e13f50000000000000000000000000000000000000000000000000000000008152600481018590526024810191909152606060448201525f606482015290829081908390608490829084905af19182612852575b50506127cd57505050565b6127db926127eb5750613550565b6127e6602c54611dcf565b602c55565b506120316040516127fd606082611a0b565b602681527f66756e642073756363656564656420776974682077726f6e672073746174757360208201527f2f6163746f720000000000000000000000000000000000000000000000000000604082015261333e565b8161285c91611a0b565b610bbc57815f6127c2565b6128749192505f90611a0b565b5f905f612740565b73ffffffffffffffffffffffffffffffffffffffff8151166126bb565b9350602081015160068110156120745715159361269a565b6128ba906136e4565b91909161268c565b919082018092116117d557565b6128d890613225565b5f929192918315611f7c57633b9aca005f6128f292613b7d565b73ffffffffffffffffffffffffffffffffffffffff604080935f8083516129198582611a0b565b600c81527f426f756e6420726573756c740000000000000000000000000000000000000000602082015284516129848161126960208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528960248401526064830190611b2b565b51906a636f6e736f6c652e6c6f675afa50015116737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b578251907fca669fa700000000000000000000000000000000000000000000000000000000825260048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af180156117cb57612a89575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c1691823b15610b4a57517fdd4ae9d4000000000000000000000000000000000000000000000000000000008152600481018590526024810191909152606060448201525f6064820152919081908390608490829084905af191826126215750506126185750565b612a969193505f90611a0b565b5f915f612a06565b60085460ff168015612aad5790565b506040517f667f9d70000000000000000000000000000000000000000000000000000000008152737109709ecfa91a80626ff3989d68f67f5b1dd12d60048201527f6661696c656400000000000000000000000000000000000000000000000000006024820152602081604481737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa90811561205f575f91612b45575b50151590565b90506020813d602011612b6f575b81612b6060209383611a0b565b81010312610b1b57515f612b3f565b3d9150612b53565b5f9115612d8357612b8790613225565b9190915b8215611f7c57838015612d65575b73ffffffffffffffffffffffffffffffffffffffff919015612d5b5751165b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612d48575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610bbc57818080926084604051809581937f9e63798d000000000000000000000000000000000000000000000000000000008352896004840152816024840152606060448401528160648401525af19182612d33575b5050612cbe57505050565b611a8492612ccc5750613550565b50612031604051612cde606082611a0b565b602881527f7375626d69742073756363656564656420776974682077726f6e67207374617460208201527f75732f6163746f72000000000000000000000000000000000000000000000000604082015261333e565b81612d3d91611a0b565b610bbc57815f612cb3565b612d5491505f90611a0b565b5f80612c3d565b6040015116612bb8565b93506020810151906006821015612074576001919091141593612b99565b612d8c9061387b565b919091612b8b565b5f9115612fb057612da490613225565b9190915b8215611f7c57838015612f92575b73ffffffffffffffffffffffffffffffffffffffff919015612f885751165b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612f75575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610bbc57818080926084604051809581937fd75bbdf3000000000000000000000000000000000000000000000000000000008352896004840152816024840152606060448401528160648401525af19182612f60575b5050612edb57505050565b612ee992612ef95750613550565b612ef4602d54611dcf565b602d55565b50612031604051612f0b606082611a0b565b602a81527f636f6d706c6574652073756363656564656420776974682077726f6e6720737460208201527f617475732f6163746f7200000000000000000000000000000000000000000000604082015261333e565b81612f6a91611a0b565b610bbc57815f612ed0565b612f8191505f90611a0b565b5f80612e5a565b6080015116612dd5565b93506020810151906006821015612074576002919091141593612db6565b612fb9906139fc565b919091612da8565b906001612fcd92613b7d565b905f80604051612fde604082611a0b565b600c81527f426f756e6420726573756c740000000000000000000000000000000000000000602082015260405161307d8161304b60208201947fb60e72cc000000000000000000000000000000000000000000000000000000008652604060248401526064830190611b2b565b886044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50565b6040519061309d826119ee565b606060e0835f81525f60208201525f60408201525f838201525f60808201525f60a08201525f60c08201520152565b519073ffffffffffffffffffffffffffffffffffffffff82168203610b1b57565b602081830312610b1b5780519067ffffffffffffffff8211610b1b57019061010082820312610b1b5760405191613123836119ee565b61312c816130cc565b835260208101516006811015610b1b57602084015261314d604082016130cc565b6040840152606081015165ffffffffffff81168103610b1b576060840152613177608082016130cc565b608084015261318860a082016130cc565b60a084015260c081015160c084015260e08101519067ffffffffffffffff8211610b1b570181601f82011215610b1b57805167ffffffffffffffff81116119c157604051926131ff601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200185611a0b565b81845260208284010111610b1b5761321d9160208085019101611b0a565b60e082015290565b9061322e613090565b73ffffffffffffffffffffffffffffffffffffffff601f5460081c1692604051917f50355d76000000000000000000000000000000000000000000000000000000008352602083600481885afa92831561205f575f9361330a575b508215613301575061329e6024925f92612fc1565b93604051928380927fbf22c4570000000000000000000000000000000000000000000000000000000082528760048301525afa90811561205f575f916132e2575090565b6132fe91503d805f833e6132f68183611a0b565b8101906130ed565b90565b935050505f9190565b9092506020813d602011613336575b8161332660209383611a0b565b81010312610b1b5751915f613289565b3d9150613319565b90602f5460ff81161561335057509050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117602f55815167ffffffffffffffff81116119c157613394603054611954565b601f81116134af575b50602092601f82116001146133f657928192935f926133eb575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c191617603055565b015190505f806133b7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169360305f527f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb915f5b8681106134975750836001959610613460575b505050811b01603055565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690555f8080613455565b91926020600181928685015181550194019201613442565b60305f52601f820160051c7f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb019060208310613528575b601f0160051c7f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb01905b81811061351d575061339d565b5f8155600101613510565b7f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb91506134e6565b805f52602b60205260ff60405f2054169060245f73ffffffffffffffffffffffffffffffffffffffff601f5460081c16604051928380927fbf22c4570000000000000000000000000000000000000000000000000000000082528660048301525afa801561205f576020915f916136ca575b5001519160068310156120745782600382106136785750506136406040516135eb606082611a0b565b602281527f616374696f6e20737563636565646564206f6e2061207465726d696e616c206a60208201527f6f62000000000000000000000000000000000000000000000000000000000000604082015261333e565b5f52602b60205260ff60405f2091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b61368191613d55565b613640576136c5604051613696604082611a0b565b601981527f696c6c6567616c20737461747573207472616e736974696f6e00000000000000602082015261333e565b613640565b6136de91503d805f833e6132f68183611a0b565b5f6135c2565b906136ed613090565b9173ffffffffffffffffffffffffffffffffffffffff601f5460081c1690604051907f50355d76000000000000000000000000000000000000000000000000000000008252602082600481865afa91821561205f575f92613847575b50811561383f578161375a91612fc1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908111915f5b8181106137945750505050505f9190565b836117d5576137ac826137a783866128c2565b6124a2565b600181018091116117d557604051907fbf22c4570000000000000000000000000000000000000000000000000000000082528060048301525f826024818a5afa91821561205f575f92613823575b50602082015160068110156120745715613818575050600101613783565b975095945050505050565b6138389192503d805f833e6132f68183611a0b565b905f6137fa565b5050505f9190565b9091506020813d602011613873575b8161386360209383611a0b565b81010312610b1b5751905f613749565b3d9150613856565b90613884613090565b9173ffffffffffffffffffffffffffffffffffffffff601f5460081c1690604051907f50355d76000000000000000000000000000000000000000000000000000000008252602082600481865afa91821561205f575f926139c8575b50811561383f57816138f191612fc1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908111915f5b81811061392b5750505050505f9190565b836117d55761393e826137a783866128c2565b600181018091116117d557604051907fbf22c4570000000000000000000000000000000000000000000000000000000082528060048301525f826024818a5afa91821561205f575f926139ac575b50602082015160068110156120745760011461381857505060010161391a565b6139c19192503d805f833e6132f68183611a0b565b905f61398c565b9091506020813d6020116139f4575b816139e460209383611a0b565b81010312610b1b5751905f6138e0565b3d91506139d7565b90613a05613090565b9173ffffffffffffffffffffffffffffffffffffffff601f5460081c1690604051907f50355d76000000000000000000000000000000000000000000000000000000008252602082600481865afa91821561205f575f92613b49575b50811561383f5781613a7291612fc1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908111915f5b818110613aac5750505050505f9190565b836117d557613abf826137a783866128c2565b600181018091116117d557604051907fbf22c4570000000000000000000000000000000000000000000000000000000082528060048301525f826024818a5afa91821561205f575f92613b2d575b506020820151600681101561207457600214613818575050600101613a9b565b613b429192503d805f833e6132f68183611a0b565b905f613b0d565b9091506020813d602011613b75575b81613b6560209383611a0b565b81010312610b1b5751905f613a61565b3d9150613b58565b5f90838311613cd15782811091821580613cc7575b613cbf57613ba08486611daa565b92600184018094116117d557600383111580613cb6575b613ca7577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc83101580613c9d575b613c8c5785831115613c44575050906137a784613c0193611daa565b908115613c3f57613c1292506128c2565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81019081116117d55790565b505090565b959492919095613c545750505050565b839495506137a790613c669394611daa565b908115613c3f57613c779250611daa565b600181018091116117d557905f808080611f7c565b505090506132fe9291501990611daa565b5082198411613be5565b50509190506132fe92506128c2565b50828411613bb7565b509250505090565b5084821115613b92565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5374645574696c7320626f756e642875696e743235362c75696e743235362c7560448201527f696e74323536293a204d6178206973206c657373207468616e206d696e2e00006064820152fd5b60ff168015613db75760018114613d9e57600214613d7257505f90565b60ff1660038114908115613d93575b8115613d8b575090565b600591501490565b600481149150613d81565b5060ff1660028114908115613d93578115613d8b575090565b5060ff168015908115613dd5575b8115613d93578115613d8b575090565b600181149150613dc556fea264697066735822122087a51d10e0458fb317219be7eb23f08edb70a540fa5ddaaf1fe23542f4215bae64736f6c634300081a00330000000000000000000000007109709ecfa91a80626ff3989d68f67f5b1dd12d000000000000000000000000f62849f9a0b5bf2913b396098f7c7019b51a820a0000000000000000000000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f000000000000000000000000aa10a84ce7d9ae517a52c6d5ca153b369af99ecf0000000000000000000000005991a2df15a8f6a256d3ec51e99254cd3fb576a9","output":"0x6080806040526004361015610012575f80fd5b5f905f3560e01c90816305e3769c1461191c57508063087320b2146118025780630b78f9c0146111ce5780631ed7831c146111255780632ade388014610f685780633e5e3c2314610ebf5780633f7286f414610e16578063531c7faa14610dfe57806359e1361914610dc25780635b7baf6414610d8757806366d9a9a014610c2c578063725cc2e114610c145780637f974c6f14610bd857806381ede1bb14610bc05780638253f2d91461080d57806385226c811461075d578063916a17c6146106885780639675dc1714610670578063b0464fdc1461059b578063b5508aa9146104eb578063b5c0922c146104a0578063ba414fa61461045d578063d130382514610445578063e20c9f711461038c578063e5d6bf02146101f1578063e662e387146101b0578063fa7626d41461016f5763fd61a25614610152575f80fd5b3461016c5761016961016336611c67565b91612d94565b80f35b80fd5b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57602060ff601f54166040519015158152f35b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57602060ff602f54166040519015158152f35b503461016c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57806102336202a3006001600435613b7d565b6102fb604091838084516102478682611a0b565b600c81527f426f756e6420726573756c740000000000000000000000000000000000000000602082015285516102e4816102b260208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528a60248401526064830190611b2b565b876044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50426128c2565b90737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610388578051917fe5d6bf020000000000000000000000000000000000000000000000000000000083526004830152828260248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af190811561037f575061036e5750f35b8161037891611a0b565b61016c5780f35b513d84823e3d90fd5b5050fd5b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601554928381520191601582527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475915b818110610419576104158561040981870382611a0b565b60405191829182611ba2565b0390f35b825473ffffffffffffffffffffffffffffffffffffffff168452602090930192600192830192016103f2565b503461016c5761016961045736611c67565b91612b77565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576020610496612a9e565b6040519015158152f35b503461016c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760ff60406020926004358152602b8452205416604051908152f35b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760195461052681611db7565b916105346040519384611a0b565b818352601981527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c9695602084015b83831061057e576040516020808252819061041590820188611bf1565b60016020819261058d85611a4c565b815201920192019190610561565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601c546105d681611db7565b916105e46040519384611a0b565b818352601c81527f0e4562a10381dec21b205ed72637e6b1b523bdd0e4d4d50af5cd23dd4500a211602084015b83831061062657604051806104158782611d06565b60026020600192604051610639816119a5565b73ffffffffffffffffffffffffffffffffffffffff865416815261065e8587016121fe565b83820152815201920192019190610611565b503461016c5761016961068236611b6e565b906128cf565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601d546106c381611db7565b916106d16040519384611a0b565b818352601d81527f6d4407e7be21f808e6509aa9fa9143369579dd7d760fe20a2c09680fc146134f602084015b83831061071357604051806104158782611d06565b60026020600192604051610726816119a5565b73ffffffffffffffffffffffffffffffffffffffff865416815261074b8587016121fe565b838201528152019201920191906106fe565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601a5461079881611db7565b916107a66040519384611a0b565b818352601a81527f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e602084015b8383106107f0576040516020808252819061041590820188611bf1565b6001602081926107ff85611a4c565b8152019201920191906107d3565b503461016c5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576084358015158103610bbc5760a4358015158103610bb8576003600435066003811015610b85576023015473ffffffffffffffffffffffffffffffffffffffff169115610bb2576003602435066003811015610b85576026015473ffffffffffffffffffffffffffffffffffffffff165b6001604435166002811015610b585773ffffffffffffffffffffffffffffffffffffffff85916029015416926108ec62278d00610168606435613b7d565b9060409583808861096b61099d82516109058482611a0b565b600c81527f426f756e6420726573756c7400000000000000000000000000000000000000006020820152835192839160208301957fb60e72cc00000000000000000000000000000000000000000000000000000000875260248401526064830190611b2b565b896044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b4a578651907fca669fa70000000000000000000000000000000000000000000000000000000082526004820152838160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af18015610b4e57610b2e575b509273ffffffffffffffffffffffffffffffffffffffff9260c49284602096610a4d82601f5460081c1693426128c2565b9015610b27578160225416905b8a51998a9889977f415288120000000000000000000000000000000000000000000000000000000089521660048801526024870152604486015260a060648601528360a48601521660848401525af1839181610aef575b50610aba578280f35b8252602b60205281207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690555f808280f35b9091506020813d602011610b1f575b81610b0b60209383611a0b565b81010312610b1b5751905f610ab1565b5f80fd5b3d9150610afe565b8390610a5a565b92610b3d818096939495611a0b565b610b4a579291905f610a1c565b8380fd5b87513d86823e3d90fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b826108ae565b8280fd5b5080fd5b503461016c57610169610bd236611c67565b91612678565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576020602c54604051908152f35b503461016c57610169610c2636611b6e565b906124d9565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601b54610c6781611db7565b610c746040519182611a0b565b818152601b83526020810191837f3ad8aa4f87544323a9d1e5dd902f40c356527a7955687113db5f9a85ad579dc1845b838310610d4c57868587604051928392602084019060208552518091526040840160408260051b8601019392905b828210610ce157505050500390f35b91936020610d3c827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0600195979984950301865288519083610d2c8351604084526040840190611b2b565b9201519084818403910152611cb1565b9601920192018594939192610cd2565b60026020600192604051610d5f816119a5565b610d6886611a4c565b8152610d758587016121fe565b83820152815201920192019190610ca4565b503461016c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57610169600435612106565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c576020602e54604051908152f35b503461016c57610169610e1036611c67565b91611dfc565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601754928381520191601782527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c15915b818110610e93576104158561040981870382611a0b565b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201610e7c565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601854928381520191601882527fb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2e915b818110610f3c576104158561040981870382611a0b565b825473ffffffffffffffffffffffffffffffffffffffff16845260209093019260019283019201610f25565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c57601e54610fa381611db7565b610fb06040519182611a0b565b818152601e83526020810191837f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e350845b83831061108f57868587604051928392602084019060208552518091526040840160408260051b8601019392905b82821061101d57505050500390f35b9193602061107f827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186526040838a5173ffffffffffffffffffffffffffffffffffffffff815116845201519181858201520190611bf1565b960192019201859493919261100e565b60405161109b816119a5565b73ffffffffffffffffffffffffffffffffffffffff83541681526001830180546110c481611db7565b916110d26040519384611a0b565b8183528a526020808b20908b9084015b838210611108575050505060019282602092836002950152815201920192019190610fe0565b60016020819261111786611a4c565b8152019301910190916110e2565b503461016c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016c5760405180916020601654928381520191601682527fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b5124289915b8181106111a2576104158561040981870382611a0b565b825473ffffffffffffffffffffffffffffffffffffffff1684526020909301926001928301920161118b565b5034610b1b575f906111ec6127106111e536611b6e565b9490613b7d565b916040905f8083516111fe8582611a0b565b600c81527f426f756e6420726573756c7400000000000000000000000000000000000000006020820152845161129b8161126960208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528960248401526064830190611b2b565b8a6044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50836127100361271081116117d5575f6112c492613b7d565b5f8083516112d28582611a0b565b600c81527f426f756e6420726573756c7400000000000000000000000000000000000000006020820152845161133d816102b260208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528960248401526064830190611b2b565b51906a636f6e736f6c652e6c6f675afa5073ffffffffffffffffffffffffffffffffffffffff60215416737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b578251907f06447d5600000000000000000000000000000000000000000000000000000000825260048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af180156117cb576117b6575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610b4a5783809160248551809481937f84f150900000000000000000000000000000000000000000000000000000000083528160048401525af1801561171e579084916117a1575b505073ffffffffffffffffffffffffffffffffffffffff601f5460081c168251946114688487611a0b565b600886527f747265617375727900000000000000000000000000000000000000000000000060208701528351855b6008811061178c5750958686602881990152600881526114b7602882611a0b565b602081519101208551907fffa186490000000000000000000000000000000000000000000000000000000082526004820152602081602481737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa908115611744578791611752575b50737109709ecfa91a80626ff3989d68f67f5b1dd12d3b1561174e578673ffffffffffffffffffffffffffffffffffffffff61158c92885193849283927fc657c71800000000000000000000000000000000000000000000000000000000845216958660048401528a60248401526044830190611b2b565b038183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af180156117445790879161172f575b5050823b1561172b576044869283875195869485937fb4d884f6000000000000000000000000000000000000000000000000000000008552600485015260248401525af1801561171e57908491611709575b505073ffffffffffffffffffffffffffffffffffffffff601f5460081c1690813b1561170457839160248392855194859384927f84f1509000000000000000000000000000000000000000000000000000000000845260048401525af180156116f8579083916116e3575b5050737109709ecfa91a80626ff3989d68f67f5b1dd12d3b156116e0578051907f90c5013b000000000000000000000000000000000000000000000000000000008252828260048183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af190811561037f575061036e5750f35b50fd5b816116ed91611a0b565b6116e057815f611671565b505051903d90823e3d90fd5b505050fd5b8161171391611a0b565b61038857825f611606565b50505051903d90823e3d90fd5b8580fd5b8161173991611a0b565b61172b57855f6115b4565b86513d89823e3d90fd5b8680fd5b90506020813d602011611784575b8161176d60209383611a0b565b8101031261174e5761177e906130cc565b5f611514565b3d9150611760565b80602080928a01015182828501015201611496565b816117ab91611a0b565b610bb857825f61143d565b6117c39193505f90611a0b565b5f915f6113d5565b83513d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b34610b1b575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610b1b576040515f60305461184081611954565b80845290600181169081156118da575060011461187c575b6104158361186881850382611a0b565b604051918291602083526020830190611b2b565b60305f9081527f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb939250905b8082106118c057509091508101602001611868611858565b9192600181602092548385880101520191019092916118a8565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208086019190915291151560051b840190910191506118689050611858565b34610b1b575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610b1b57602090602d548152f35b90600182811c9216801561199b575b602083101461196e57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691611963565b6040810190811067ffffffffffffffff8211176119c157604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610100810190811067ffffffffffffffff8211176119c157604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176119c157604052565b9060405191825f825492611a5f84611954565b8084529360018116908115611aca5750600114611a86575b50611a8492500383611a0b565b565b90505f9291925260205f20905f915b818310611aae575050906020611a84928201015f611a77565b6020919350806001915483858901015201910190918492611a95565b60209350611a849592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f611a77565b5f5b838110611b1b5750505f910152565b8181015183820152602001611b0c565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093611b6781518092818752878088019101611b0a565b0116010190565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6040910112610b1b576004359060243590565b60206040818301928281528451809452019201905f5b818110611bc55750505090565b825173ffffffffffffffffffffffffffffffffffffffff16845260209384019390920191600101611bb8565b9080602083519182815201916020808360051b8301019401925f915b838310611c1c57505050505090565b9091929394602080611c58837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe086600196030187528951611b2b565b97019301930191939290611c0d565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6060910112610b1b57600435906024358015158103610b1b57906044358015158103610b1b5790565b90602080835192838152019201905f5b818110611cce5750505090565b82517fffffffff0000000000000000000000000000000000000000000000000000000016845260209384019390920191600101611cc1565b602081016020825282518091526040820191602060408360051b8301019401925f915b838310611d3857505050505090565b9091929394602080611d9b837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187526040838b5173ffffffffffffffffffffffffffffffffffffffff815116845201519181858201520190611cb1565b97019301930191939290611d29565b919082039182116117d557565b67ffffffffffffffff81116119c15760051b60200190565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146117d55760010190565b90919082806120fd575b5f93156120ec57611e15613090565b50611e1f8261387b565b9281156120d7575b5091905b82156120d05783156120a1575060208101519060068210156120745773ffffffffffffffffffffffffffffffffffffffff9161206a5760800151165b925b815f52602b60205260ff60405f20541693737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f5761204c575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610bbc57818080926084604051809581937f41dd26f5000000000000000000000000000000000000000000000000000000008352896004840152816024840152606060448401528160648401525af19182612037575b5050611f82575b50505050565b611f9192611fca575b50613550565b60018114908115611fbf575b50611fac575b5f808080611f7c565b611fb7602e54611dcf565b602e55611fa3565b60029150145f611f9d565b50612031604051611fdc606082611a0b565b602181527f72656a6563742073756363656564656420776974682077726f6e67206163746f60208201527f7200000000000000000000000000000000000000000000000000000000000000604082015261333e565b5f611f8b565b8161204191611a0b565b610bbc57815f611f75565b61205891505f90611a0b565b5f80611eff565b6040513d5f823e3d90fd5b6040015116611e67565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b73ffffffffffffffffffffffffffffffffffffffff9190156120c95760800151165b92611e69565b51166120c3565b5050505050565b90506120e49192506139fc565b91905f611e27565b906120f690613225565b9091611e2b565b82159350611e06565b61210e613090565b506121188161387b565b509081156121ed575b5080156121ea57805f52602b60205260ff60405f2054169073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610b1b575f80916024604051809481937f5b7baf640000000000000000000000000000000000000000000000000000000083528760048401525af190816121da575b506121a3575050565b6121ac90613550565b600181149081156121cf575b506121bf57565b6121ca602e54611dcf565b602e55565b60029150145f6121b8565b5f6121e491611a0b565b5f61219a565b50565b6121f791506139fc565b505f612121565b90604051918281549182825260208201905f5260205f20925f905b80600783011061241557611a849454918181106123df575b8181106123a9575b818110612373575b81811061233d575b818110612307575b8181106122d1575b81811061229c575b1061226f575b500383611a0b565b7fffffffff000000000000000000000000000000000000000000000000000000001681526020015f612267565b9260206001917fffffffff0000000000000000000000000000000000000000000000000000000085831b168152019301612261565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560401b168152019301612259565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560601b168152019301612251565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560801b168152019301612249565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560a01b168152019301612241565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560c01b168152019301612239565b9260206001917fffffffff000000000000000000000000000000000000000000000000000000008560e01b168152019301612231565b9160089193506101006001917fffffffff000000000000000000000000000000000000000000000000000000008754818160e01b168352818160c01b166020840152818160a01b166040840152818160801b166060840152818160601b166080840152818160401b1660a0840152818160201b1660c08401521660e0820152019401920185929391612219565b81156124ac570690565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b6124e290613225565b90915f918315611f7c575173ffffffffffffffffffffffffffffffffffffffff16737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b57604051907fca669fa700000000000000000000000000000000000000000000000000000000825260048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612663575b50600373ffffffffffffffffffffffffffffffffffffffff601f5460081c1691066003811015612636576026015473ffffffffffffffffffffffffffffffffffffffff16813b15610bb85782916084839260405195869384927fc9a84bb90000000000000000000000000000000000000000000000000000000084528960048501526024840152606060448401528160648401525af19182612621575b50506126185750565b611a8490613550565b61262c828092611a0b565b61016c578061260f565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6126709192505f90611a0b565b5f905f612572565b5f91156128b15761268890613225565b9190915b8215611f7c57838015612899575b1561287c5773ffffffffffffffffffffffffffffffffffffffff6040820151165b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612867575b5060c073ffffffffffffffffffffffffffffffffffffffff601f5460081c16910151813b15610bb8576040517fd2e13f50000000000000000000000000000000000000000000000000000000008152600481018590526024810191909152606060448201525f606482015290829081908390608490829084905af19182612852575b50506127cd57505050565b6127db926127eb5750613550565b6127e6602c54611dcf565b602c55565b506120316040516127fd606082611a0b565b602681527f66756e642073756363656564656420776974682077726f6e672073746174757360208201527f2f6163746f720000000000000000000000000000000000000000000000000000604082015261333e565b8161285c91611a0b565b610bbc57815f6127c2565b6128749192505f90611a0b565b5f905f612740565b73ffffffffffffffffffffffffffffffffffffffff8151166126bb565b9350602081015160068110156120745715159361269a565b6128ba906136e4565b91909161268c565b919082018092116117d557565b6128d890613225565b5f929192918315611f7c57633b9aca005f6128f292613b7d565b73ffffffffffffffffffffffffffffffffffffffff604080935f8083516129198582611a0b565b600c81527f426f756e6420726573756c740000000000000000000000000000000000000000602082015284516129848161126960208201947fb60e72cc0000000000000000000000000000000000000000000000000000000086528960248401526064830190611b2b565b51906a636f6e736f6c652e6c6f675afa50015116737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b578251907fca669fa700000000000000000000000000000000000000000000000000000000825260048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af180156117cb57612a89575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c1691823b15610b4a57517fdd4ae9d4000000000000000000000000000000000000000000000000000000008152600481018590526024810191909152606060448201525f6064820152919081908390608490829084905af191826126215750506126185750565b612a969193505f90611a0b565b5f915f612a06565b60085460ff168015612aad5790565b506040517f667f9d70000000000000000000000000000000000000000000000000000000008152737109709ecfa91a80626ff3989d68f67f5b1dd12d60048201527f6661696c656400000000000000000000000000000000000000000000000000006024820152602081604481737109709ecfa91a80626ff3989d68f67f5b1dd12d5afa90811561205f575f91612b45575b50151590565b90506020813d602011612b6f575b81612b6060209383611a0b565b81010312610b1b57515f612b3f565b3d9150612b53565b5f9115612d8357612b8790613225565b9190915b8215611f7c57838015612d65575b73ffffffffffffffffffffffffffffffffffffffff919015612d5b5751165b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612d48575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610bbc57818080926084604051809581937f9e63798d000000000000000000000000000000000000000000000000000000008352896004840152816024840152606060448401528160648401525af19182612d33575b5050612cbe57505050565b611a8492612ccc5750613550565b50612031604051612cde606082611a0b565b602881527f7375626d69742073756363656564656420776974682077726f6e67207374617460208201527f75732f6163746f72000000000000000000000000000000000000000000000000604082015261333e565b81612d3d91611a0b565b610bbc57815f612cb3565b612d5491505f90611a0b565b5f80612c3d565b6040015116612bb8565b93506020810151906006821015612074576001919091141593612b99565b612d8c9061387b565b919091612b8b565b5f9115612fb057612da490613225565b9190915b8215611f7c57838015612f92575b73ffffffffffffffffffffffffffffffffffffffff919015612f885751165b737109709ecfa91a80626ff3989d68f67f5b1dd12d3b15610b1b5773ffffffffffffffffffffffffffffffffffffffff604051917fca669fa70000000000000000000000000000000000000000000000000000000083521660048201525f8160248183737109709ecfa91a80626ff3989d68f67f5b1dd12d5af1801561205f57612f75575b5073ffffffffffffffffffffffffffffffffffffffff601f5460081c16803b15610bbc57818080926084604051809581937fd75bbdf3000000000000000000000000000000000000000000000000000000008352896004840152816024840152606060448401528160648401525af19182612f60575b5050612edb57505050565b612ee992612ef95750613550565b612ef4602d54611dcf565b602d55565b50612031604051612f0b606082611a0b565b602a81527f636f6d706c6574652073756363656564656420776974682077726f6e6720737460208201527f617475732f6163746f7200000000000000000000000000000000000000000000604082015261333e565b81612f6a91611a0b565b610bbc57815f612ed0565b612f8191505f90611a0b565b5f80612e5a565b6080015116612dd5565b93506020810151906006821015612074576002919091141593612db6565b612fb9906139fc565b919091612da8565b906001612fcd92613b7d565b905f80604051612fde604082611a0b565b600c81527f426f756e6420726573756c740000000000000000000000000000000000000000602082015260405161307d8161304b60208201947fb60e72cc000000000000000000000000000000000000000000000000000000008652604060248401526064830190611b2b565b886044830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a0b565b51906a636f6e736f6c652e6c6f675afa50565b6040519061309d826119ee565b606060e0835f81525f60208201525f60408201525f838201525f60808201525f60a08201525f60c08201520152565b519073ffffffffffffffffffffffffffffffffffffffff82168203610b1b57565b602081830312610b1b5780519067ffffffffffffffff8211610b1b57019061010082820312610b1b5760405191613123836119ee565b61312c816130cc565b835260208101516006811015610b1b57602084015261314d604082016130cc565b6040840152606081015165ffffffffffff81168103610b1b576060840152613177608082016130cc565b608084015261318860a082016130cc565b60a084015260c081015160c084015260e08101519067ffffffffffffffff8211610b1b570181601f82011215610b1b57805167ffffffffffffffff81116119c157604051926131ff601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200185611a0b565b81845260208284010111610b1b5761321d9160208085019101611b0a565b60e082015290565b9061322e613090565b73ffffffffffffffffffffffffffffffffffffffff601f5460081c1692604051917f50355d76000000000000000000000000000000000000000000000000000000008352602083600481885afa92831561205f575f9361330a575b508215613301575061329e6024925f92612fc1565b93604051928380927fbf22c4570000000000000000000000000000000000000000000000000000000082528760048301525afa90811561205f575f916132e2575090565b6132fe91503d805f833e6132f68183611a0b565b8101906130ed565b90565b935050505f9190565b9092506020813d602011613336575b8161332660209383611a0b565b81010312610b1b5751915f613289565b3d9150613319565b90602f5460ff81161561335057509050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117602f55815167ffffffffffffffff81116119c157613394603054611954565b601f81116134af575b50602092601f82116001146133f657928192935f926133eb575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c191617603055565b015190505f806133b7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169360305f527f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb915f5b8681106134975750836001959610613460575b505050811b01603055565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690555f8080613455565b91926020600181928685015181550194019201613442565b60305f52601f820160051c7f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb019060208310613528575b601f0160051c7f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb01905b81811061351d575061339d565b5f8155600101613510565b7f6ff97a59c90d62cc7236ba3a37cd85351bf564556780cf8c1157a220f31f0cbb91506134e6565b805f52602b60205260ff60405f2054169060245f73ffffffffffffffffffffffffffffffffffffffff601f5460081c16604051928380927fbf22c4570000000000000000000000000000000000000000000000000000000082528660048301525afa801561205f576020915f916136ca575b5001519160068310156120745782600382106136785750506136406040516135eb606082611a0b565b602281527f616374696f6e20737563636565646564206f6e2061207465726d696e616c206a60208201527f6f62000000000000000000000000000000000000000000000000000000000000604082015261333e565b5f52602b60205260ff60405f2091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b61368191613d55565b613640576136c5604051613696604082611a0b565b601981527f696c6c6567616c20737461747573207472616e736974696f6e00000000000000602082015261333e565b613640565b6136de91503d805f833e6132f68183611a0b565b5f6135c2565b906136ed613090565b9173ffffffffffffffffffffffffffffffffffffffff601f5460081c1690604051907f50355d76000000000000000000000000000000000000000000000000000000008252602082600481865afa91821561205f575f92613847575b50811561383f578161375a91612fc1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908111915f5b8181106137945750505050505f9190565b836117d5576137ac826137a783866128c2565b6124a2565b600181018091116117d557604051907fbf22c4570000000000000000000000000000000000000000000000000000000082528060048301525f826024818a5afa91821561205f575f92613823575b50602082015160068110156120745715613818575050600101613783565b975095945050505050565b6138389192503d805f833e6132f68183611a0b565b905f6137fa565b5050505f9190565b9091506020813d602011613873575b8161386360209383611a0b565b81010312610b1b5751905f613749565b3d9150613856565b90613884613090565b9173ffffffffffffffffffffffffffffffffffffffff601f5460081c1690604051907f50355d76000000000000000000000000000000000000000000000000000000008252602082600481865afa91821561205f575f926139c8575b50811561383f57816138f191612fc1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908111915f5b81811061392b5750505050505f9190565b836117d55761393e826137a783866128c2565b600181018091116117d557604051907fbf22c4570000000000000000000000000000000000000000000000000000000082528060048301525f826024818a5afa91821561205f575f926139ac575b50602082015160068110156120745760011461381857505060010161391a565b6139c19192503d805f833e6132f68183611a0b565b905f61398c565b9091506020813d6020116139f4575b816139e460209383611a0b565b81010312610b1b5751905f6138e0565b3d91506139d7565b90613a05613090565b9173ffffffffffffffffffffffffffffffffffffffff601f5460081c1690604051907f50355d76000000000000000000000000000000000000000000000000000000008252602082600481865afa91821561205f575f92613b49575b50811561383f5781613a7291612fc1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908111915f5b818110613aac5750505050505f9190565b836117d557613abf826137a783866128c2565b600181018091116117d557604051907fbf22c4570000000000000000000000000000000000000000000000000000000082528060048301525f826024818a5afa91821561205f575f92613b2d575b506020820151600681101561207457600214613818575050600101613a9b565b613b429192503d805f833e6132f68183611a0b565b905f613b0d565b9091506020813d602011613b75575b81613b6560209383611a0b565b81010312610b1b5751905f613a61565b3d9150613b58565b5f90838311613cd15782811091821580613cc7575b613cbf57613ba08486611daa565b92600184018094116117d557600383111580613cb6575b613ca7577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc83101580613c9d575b613c8c5785831115613c44575050906137a784613c0193611daa565b908115613c3f57613c1292506128c2565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81019081116117d55790565b505090565b959492919095613c545750505050565b839495506137a790613c669394611daa565b908115613c3f57613c779250611daa565b600181018091116117d557905f808080611f7c565b505090506132fe9291501990611daa565b5082198411613be5565b50509190506132fe92506128c2565b50828411613bb7565b509250505090565b5084821115613b92565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5374645574696c7320626f756e642875696e743235362c75696e743235362c7560448201527f696e74323536293a204d6178206973206c657373207468616e206d696e2e00006064820152fd5b60ff168015613db75760018114613d9e57600214613d7257505f90565b60ff1660038114908115613d93575b8115613d8b575090565b600591501490565b600481149150613d81565b5060ff1660028114908115613d93578115613d8b575090565b5060ff168015908115613dd5575b8115613d93578115613d8b575090565b600181149150613dc556fea264697066735822122087a51d10e0458fb317219be7eb23f08edb70a540fa5ddaaf1fe23542f4215bae64736f6c634300081a0033","gas_used":4166661,"gas_limit":1051631826,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[{"Call":0},{"Call":1},{"Call":2},{"Call":3},{"Call":4},{"Call":5},{"Call":6},{"Call":7},{"Call":8},{"Call":9},{"Call":10},{"Call":11},{"Call":12},{"Call":13},{"Call":14},{"Call":15},{"Call":16},{"Call":17},{"Call":18},{"Call":19},{"Call":20},{"Call":21},{"Call":22},{"Call":23},{"Call":24},{"Call":25},{"Call":26},{"Call":27},{"Call":28},{"Call":29},{"Call":30},{"Call":31},{"Call":32},{"Call":33},{"Call":34},{"Call":35},{"Call":36},{"Call":37},{"Call":38},{"Call":39},{"Call":40},{"Call":41},{"Call":42},{"Call":43},{"Call":44},{"Call":45},{"Call":46},{"Call":47},{"Call":48}]},{"parent":14,"children":[],"idx":15,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0x6900a3ae0000000000000000000000000000000000000000000000000000000000000000","output":"0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000013000000000000000000000000000000000000000000000000000000000000000","gas_used":0,"gas_limit":1035090386,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":16,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa186498c4bdc5e5384c0751b1d106538f8c3789e521a3acd36826accbcfd96d5cd97b8","output":"0x000000000000000000000000e1fc4143851d3e84a40af3aac51afe019c98cda6","gas_used":0,"gas_limit":1035088799,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":17,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c718000000000000000000000000e1fc4143851d3e84a40af3aac51afe019c98cda6000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000026330000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":0,"gas_limit":1035087910,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":18,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0x6900a3ae0000000000000000000000000000000000000000000000000000000000000000","output":"0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000013000000000000000000000000000000000000000000000000000000000000000","gas_used":0,"gas_limit":1035065743,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":19,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa18649fe1703dbe8a9115ed486af41105cac12e260e614269d85a2a0effad6af6dbdc6","output":"0x000000000000000000000000e5b9bc45c8125d133fe66fe9459486e3d5792d39","gas_used":0,"gas_limit":1035064164,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":20,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c718000000000000000000000000e5b9bc45c8125d133fe66fe9459486e3d5792d39000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000027030000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":0,"gas_limit":1035063275,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":21,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x40c10f19000000000000000000000000e1fc4143851d3e84a40af3aac51afe019c98cda6000000000000000000000000000000000000000000000000000000e8d4a51000","output":"0x","gas_used":24538,"gas_limit":1035040790,"status":"Stop","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x0000000000000000000000000000000000000000000000000000000000000000","0x000000000000000000000000e1fc4143851d3e84a40af3aac51afe019c98cda6"],"data":"0x000000000000000000000000000000000000000000000000000000e8d4a51000"},"decoded":null,"position":0,"index":10}],"ordering":[{"Log":0}]},{"parent":14,"children":[],"idx":22,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xca669fa7000000000000000000000000e1fc4143851d3e84a40af3aac51afe019c98cda6","output":"0x","gas_used":0,"gas_limit":1035016029,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":23,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x095ea7b3000000000000000000000000f62849f9a0b5bf2913b396098f7c7019b51a820affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":24298,"gas_limit":1035015449,"status":"Return","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925","0x000000000000000000000000e1fc4143851d3e84a40af3aac51afe019c98cda6","0x000000000000000000000000f62849f9a0b5bf2913b396098f7c7019b51a820a"],"data":"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"},"decoded":null,"position":0,"index":11}],"ordering":[{"Log":0}]},{"parent":14,"children":[],"idx":24,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0x6900a3ae0000000000000000000000000000000000000000000000000000000000000001","output":"0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000013100000000000000000000000000000000000000000000000000000000000000","gas_used":0,"gas_limit":1034991060,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":25,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa186497c1b16802b304761acd81e033c1db5a9721da4b32959e4a8361983cfacacbbec","output":"0x000000000000000000000000a53e365bb7183eb60b1263706c686848492fb679","gas_used":0,"gas_limit":1034989477,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":26,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c718000000000000000000000000a53e365bb7183eb60b1263706c686848492fb679000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000026331000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":0,"gas_limit":1034988589,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":27,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0x6900a3ae0000000000000000000000000000000000000000000000000000000000000001","output":"0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000013100000000000000000000000000000000000000000000000000000000000000","gas_used":0,"gas_limit":1034966422,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":28,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa18649260e065801cba6ca065f28640c3d94ef235f67db5431448aae1a51af7214efaf","output":"0x000000000000000000000000ab80885935d10ffc2f477636e1c5cdef234e22c3","gas_used":0,"gas_limit":1034964842,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":29,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c718000000000000000000000000ab80885935d10ffc2f477636e1c5cdef234e22c3000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000027031000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":0,"gas_limit":1034963953,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":30,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x40c10f19000000000000000000000000a53e365bb7183eb60b1263706c686848492fb679000000000000000000000000000000000000000000000000000000e8d4a51000","output":"0x","gas_used":24538,"gas_limit":1034941468,"status":"Stop","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x0000000000000000000000000000000000000000000000000000000000000000","0x000000000000000000000000a53e365bb7183eb60b1263706c686848492fb679"],"data":"0x000000000000000000000000000000000000000000000000000000e8d4a51000"},"decoded":null,"position":0,"index":12}],"ordering":[{"Log":0}]},{"parent":14,"children":[],"idx":31,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xca669fa7000000000000000000000000a53e365bb7183eb60b1263706c686848492fb679","output":"0x","gas_used":0,"gas_limit":1034916707,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":32,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x095ea7b3000000000000000000000000f62849f9a0b5bf2913b396098f7c7019b51a820affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":24298,"gas_limit":1034916127,"status":"Return","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925","0x000000000000000000000000a53e365bb7183eb60b1263706c686848492fb679","0x000000000000000000000000f62849f9a0b5bf2913b396098f7c7019b51a820a"],"data":"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"},"decoded":null,"position":0,"index":13}],"ordering":[{"Log":0}]},{"parent":14,"children":[],"idx":33,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0x6900a3ae0000000000000000000000000000000000000000000000000000000000000002","output":"0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000013200000000000000000000000000000000000000000000000000000000000000","gas_used":0,"gas_limit":1034891739,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":34,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa186499e8eac5ebc9e5f692bb261b0b9d9d23399741ae01a7ae6bb2ef3f10d89ba4738","output":"0x0000000000000000000000000af2f93fd50ab3f4302013624311ec7a84bc9135","gas_used":0,"gas_limit":1034890155,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":35,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c7180000000000000000000000000af2f93fd50ab3f4302013624311ec7a84bc9135000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000026332000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":0,"gas_limit":1034889266,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":36,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0x6900a3ae0000000000000000000000000000000000000000000000000000000000000002","output":"0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000013200000000000000000000000000000000000000000000000000000000000000","gas_used":0,"gas_limit":1034867099,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":37,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa18649c30a3ae685bfcb917dceb41e4afed5342f332572d5b3a8212679077685c494cb","output":"0x000000000000000000000000b19d78033b9efc052db6ba0b93728c9cc54f4074","gas_used":0,"gas_limit":1034865519,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":38,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c718000000000000000000000000b19d78033b9efc052db6ba0b93728c9cc54f4074000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000027032000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":0,"gas_limit":1034864630,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":39,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x40c10f190000000000000000000000000af2f93fd50ab3f4302013624311ec7a84bc9135000000000000000000000000000000000000000000000000000000e8d4a51000","output":"0x","gas_used":24538,"gas_limit":1034842145,"status":"Stop","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000af2f93fd50ab3f4302013624311ec7a84bc9135"],"data":"0x000000000000000000000000000000000000000000000000000000e8d4a51000"},"decoded":null,"position":0,"index":14}],"ordering":[{"Log":0}]},{"parent":14,"children":[],"idx":40,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xca669fa70000000000000000000000000af2f93fd50ab3f4302013624311ec7a84bc9135","output":"0x","gas_used":0,"gas_limit":1034817384,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":41,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x095ea7b3000000000000000000000000f62849f9a0b5bf2913b396098f7c7019b51a820affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":24298,"gas_limit":1034816804,"status":"Return","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925","0x0000000000000000000000000af2f93fd50ab3f4302013624311ec7a84bc9135","0x000000000000000000000000f62849f9a0b5bf2913b396098f7c7019b51a820a"],"data":"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"},"decoded":null,"position":0,"index":15}],"ordering":[{"Log":0}]},{"parent":14,"children":[],"idx":42,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa18649675fdbf9a75d0f12df3d9e7c0dbb3db24e1465ae91a68cf8f50b978edb12e29f","output":"0x000000000000000000000000de12da0783dcb1d543cf885d6eff9e8ead554d58","gas_used":0,"gas_limit":1034791944,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":43,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c718000000000000000000000000de12da0783dcb1d543cf885d6eff9e8ead554d58000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000026530000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":0,"gas_limit":1034791057,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":44,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"STATICCALL","value":"0x0","data":"0xffa1864910720887749b54d617210b7ff686e35a4534ab64e191c2deb6f34ddbed595541","output":"0x000000000000000000000000456742e80e2d5a6f1db7e244e3763914d3fbd619","gas_used":0,"gas_limit":1034768453,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":45,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc657c718000000000000000000000000456742e80e2d5a6f1db7e244e3763914d3fbd619000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000026531000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":0,"gas_limit":1034767566,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[],"idx":46,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xca669fa7000000000000000000000000e1fc4143851d3e84a40af3aac51afe019c98cda6","output":"0x","gas_used":0,"gas_limit":1034745089,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[48],"idx":47,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x41528812000000000000000000000000e5b9bc45c8125d133fe66fe9459486e3d5792d39000000000000000000000000de12da0783dcb1d543cf885d6eff9e8ead554d5800000000000000000000000000000000000000000000000000000000657b7e0000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047365656400000000000000000000000000000000000000000000000000000000","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":123170,"gas_limit":1034744293,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[{"Call":0}]},{"parent":47,"children":[],"idx":48,"trace":{"depth":3,"success":true,"caller":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","address":"0x2e234dae75c793f67a35089c9d99245e1c58470b","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"DELEGATECALL","value":"0x0","data":"0x41528812000000000000000000000000e5b9bc45c8125d133fe66fe9459486e3d5792d39000000000000000000000000de12da0783dcb1d543cf885d6eff9e8ead554d5800000000000000000000000000000000000000000000000000000000657b7e0000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047365656400000000000000000000000000000000000000000000000000000000","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":122817,"gas_limit":1018576099,"status":"Return","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0xb0f0239bfdd96453e24733e18bfc24b70d8fadf123dd977473518dd577ee79b9","0x0000000000000000000000000000000000000000000000000000000000000001","0x000000000000000000000000e1fc4143851d3e84a40af3aac51afe019c98cda6","0x000000000000000000000000e5b9bc45c8125d133fe66fe9459486e3d5792d39"],"data":"0x000000000000000000000000de12da0783dcb1d543cf885d6eff9e8ead554d5800000000000000000000000000000000000000000000000000000000657b7e000000000000000000000000000000000000000000000000000000000000000000"},"decoded":null,"position":0,"index":16}],"ordering":[{"Log":0}]},{"parent":14,"children":[],"idx":49,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xca669fa7000000000000000000000000e5b9bc45c8125d133fe66fe9459486e3d5792d39","output":"0x","gas_used":0,"gas_limit":1034622349,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[51],"idx":50,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xdd4ae9d4000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":24492,"gas_limit":1034621654,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[{"Call":0}]},{"parent":50,"children":[],"idx":51,"trace":{"depth":3,"success":true,"caller":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","address":"0x2e234dae75c793f67a35089c9d99245e1c58470b","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"DELEGATECALL","value":"0x0","data":"0xdd4ae9d4000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f424000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":24160,"gas_limit":1018455394,"status":"Stop","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0x869e2577b006bf47ee981cf6fec2e25583548081c14b98deab587f77b5068038","0x0000000000000000000000000000000000000000000000000000000000000001"],"data":"0x00000000000000000000000000000000000000000000000000000000000f4240"},"decoded":null,"position":0,"index":17}],"ordering":[{"Log":0}]},{"parent":14,"children":[],"idx":52,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xca669fa7000000000000000000000000a53e365bb7183eb60b1263706c686848492fb679","output":"0x","gas_used":0,"gas_limit":1034594569,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[54],"idx":53,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x41528812000000000000000000000000ab80885935d10ffc2f477636e1c5cdef234e22c3000000000000000000000000de12da0783dcb1d543cf885d6eff9e8ead554d5800000000000000000000000000000000000000000000000000000000657b7e0000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047365656400000000000000000000000000000000000000000000000000000000","output":"0x0000000000000000000000000000000000000000000000000000000000000002","gas_used":99270,"gas_limit":1034593780,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[{"Call":0}]},{"parent":53,"children":[],"idx":54,"trace":{"depth":3,"success":true,"caller":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","address":"0x2e234dae75c793f67a35089c9d99245e1c58470b","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"DELEGATECALL","value":"0x0","data":"0x41528812000000000000000000000000ab80885935d10ffc2f477636e1c5cdef234e22c3000000000000000000000000de12da0783dcb1d543cf885d6eff9e8ead554d5800000000000000000000000000000000000000000000000000000000657b7e0000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047365656400000000000000000000000000000000000000000000000000000000","output":"0x0000000000000000000000000000000000000000000000000000000000000002","gas_used":98917,"gas_limit":1018427938,"status":"Return","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0xb0f0239bfdd96453e24733e18bfc24b70d8fadf123dd977473518dd577ee79b9","0x0000000000000000000000000000000000000000000000000000000000000002","0x000000000000000000000000a53e365bb7183eb60b1263706c686848492fb679","0x000000000000000000000000ab80885935d10ffc2f477636e1c5cdef234e22c3"],"data":"0x000000000000000000000000de12da0783dcb1d543cf885d6eff9e8ead554d5800000000000000000000000000000000000000000000000000000000657b7e000000000000000000000000000000000000000000000000000000000000000000"},"decoded":null,"position":0,"index":18}],"ordering":[{"Log":0}]},{"parent":14,"children":[],"idx":55,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xca669fa7000000000000000000000000ab80885935d10ffc2f477636e1c5cdef234e22c3","output":"0x","gas_used":0,"gas_limit":1034495362,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[57],"idx":56,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xdd4ae9d4000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000001e848000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":24492,"gas_limit":1034494667,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[{"Call":0}]},{"parent":56,"children":[],"idx":57,"trace":{"depth":3,"success":true,"caller":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","address":"0x2e234dae75c793f67a35089c9d99245e1c58470b","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"DELEGATECALL","value":"0x0","data":"0xdd4ae9d4000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000001e848000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":24160,"gas_limit":1018330391,"status":"Stop","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0x869e2577b006bf47ee981cf6fec2e25583548081c14b98deab587f77b5068038","0x0000000000000000000000000000000000000000000000000000000000000002"],"data":"0x00000000000000000000000000000000000000000000000000000000001e8480"},"decoded":null,"position":0,"index":19}],"ordering":[{"Log":0}]},{"parent":14,"children":[],"idx":58,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xca669fa7000000000000000000000000a53e365bb7183eb60b1263706c686848492fb679","output":"0x","gas_used":0,"gas_limit":1034467672,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[60],"idx":59,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xd2e13f50000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000001e848000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":52994,"gas_limit":1034467051,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[{"Call":0}]},{"parent":59,"children":[61],"idx":60,"trace":{"depth":3,"success":true,"caller":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","address":"0x2e234dae75c793f67a35089c9d99245e1c58470b","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"DELEGATECALL","value":"0x0","data":"0xd2e13f50000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000001e848000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":52662,"gas_limit":1018303207,"status":"Stop","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0xe3fbcc1ea1bdc559ec7f0347efde7655e58b5f45a30b0e4470a583c3ef5496b3","0x0000000000000000000000000000000000000000000000000000000000000002","0x000000000000000000000000a53e365bb7183eb60b1263706c686848492fb679"],"data":"0x00000000000000000000000000000000000000000000000000000000001e8480"},"decoded":null,"position":1,"index":21}],"ordering":[{"Call":0},{"Log":0}]},{"parent":60,"children":[],"idx":61,"trace":{"depth":4,"success":true,"caller":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","address":"0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x23b872dd000000000000000000000000a53e365bb7183eb60b1263706c686848492fb679000000000000000000000000f62849f9a0b5bf2913b396098f7c7019b51a820a00000000000000000000000000000000000000000000000000000000001e8480","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":25012,"gas_limit":1002367111,"status":"Return","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x000000000000000000000000a53e365bb7183eb60b1263706c686848492fb679","0x000000000000000000000000f62849f9a0b5bf2913b396098f7c7019b51a820a"],"data":"0x00000000000000000000000000000000000000000000000000000000001e8480"},"decoded":null,"position":0,"index":20}],"ordering":[{"Log":0}]},{"parent":14,"children":[],"idx":62,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xca669fa70000000000000000000000000af2f93fd50ab3f4302013624311ec7a84bc9135","output":"0x","gas_used":0,"gas_limit":1034394291,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[64],"idx":63,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x41528812000000000000000000000000b19d78033b9efc052db6ba0b93728c9cc54f4074000000000000000000000000de12da0783dcb1d543cf885d6eff9e8ead554d5800000000000000000000000000000000000000000000000000000000657b7e0000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047365656400000000000000000000000000000000000000000000000000000000","output":"0x0000000000000000000000000000000000000000000000000000000000000003","gas_used":99270,"gas_limit":1034393501,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[{"Call":0}]},{"parent":63,"children":[],"idx":64,"trace":{"depth":3,"success":true,"caller":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","address":"0x2e234dae75c793f67a35089c9d99245e1c58470b","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"DELEGATECALL","value":"0x0","data":"0x41528812000000000000000000000000b19d78033b9efc052db6ba0b93728c9cc54f4074000000000000000000000000de12da0783dcb1d543cf885d6eff9e8ead554d5800000000000000000000000000000000000000000000000000000000657b7e0000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047365656400000000000000000000000000000000000000000000000000000000","output":"0x0000000000000000000000000000000000000000000000000000000000000003","gas_used":98917,"gas_limit":1018230788,"status":"Return","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0xb0f0239bfdd96453e24733e18bfc24b70d8fadf123dd977473518dd577ee79b9","0x0000000000000000000000000000000000000000000000000000000000000003","0x0000000000000000000000000af2f93fd50ab3f4302013624311ec7a84bc9135","0x000000000000000000000000b19d78033b9efc052db6ba0b93728c9cc54f4074"],"data":"0x000000000000000000000000de12da0783dcb1d543cf885d6eff9e8ead554d5800000000000000000000000000000000000000000000000000000000657b7e000000000000000000000000000000000000000000000000000000000000000000"},"decoded":null,"position":0,"index":22}],"ordering":[{"Log":0}]},{"parent":14,"children":[],"idx":65,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xca669fa7000000000000000000000000b19d78033b9efc052db6ba0b93728c9cc54f4074","output":"0x","gas_used":0,"gas_limit":1034295083,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[67],"idx":66,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xdd4ae9d4000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000002dc6c000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":24492,"gas_limit":1034294388,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[{"Call":0}]},{"parent":66,"children":[],"idx":67,"trace":{"depth":3,"success":true,"caller":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","address":"0x2e234dae75c793f67a35089c9d99245e1c58470b","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"DELEGATECALL","value":"0x0","data":"0xdd4ae9d4000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000002dc6c000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":24160,"gas_limit":1018133241,"status":"Stop","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0x869e2577b006bf47ee981cf6fec2e25583548081c14b98deab587f77b5068038","0x0000000000000000000000000000000000000000000000000000000000000003"],"data":"0x00000000000000000000000000000000000000000000000000000000002dc6c0"},"decoded":null,"position":0,"index":23}],"ordering":[{"Log":0}]},{"parent":14,"children":[],"idx":68,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xca669fa70000000000000000000000000af2f93fd50ab3f4302013624311ec7a84bc9135","output":"0x","gas_used":0,"gas_limit":1034267393,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[70],"idx":69,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xd2e13f50000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000002dc6c000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":9194,"gas_limit":1034266772,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[{"Call":0}]},{"parent":69,"children":[71],"idx":70,"trace":{"depth":3,"success":true,"caller":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","address":"0x2e234dae75c793f67a35089c9d99245e1c58470b","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"DELEGATECALL","value":"0x0","data":"0xd2e13f50000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000002dc6c000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":8862,"gas_limit":1018106057,"status":"Stop","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0xe3fbcc1ea1bdc559ec7f0347efde7655e58b5f45a30b0e4470a583c3ef5496b3","0x0000000000000000000000000000000000000000000000000000000000000003","0x0000000000000000000000000af2f93fd50ab3f4302013624311ec7a84bc9135"],"data":"0x00000000000000000000000000000000000000000000000000000000002dc6c0"},"decoded":null,"position":1,"index":25}],"ordering":[{"Call":0},{"Log":0}]},{"parent":70,"children":[],"idx":71,"trace":{"depth":4,"success":true,"caller":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","address":"0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x23b872dd0000000000000000000000000af2f93fd50ab3f4302013624311ec7a84bc9135000000000000000000000000f62849f9a0b5bf2913b396098f7c7019b51a820a00000000000000000000000000000000000000000000000000000000002dc6c0","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":3112,"gas_limit":1002194600,"status":"Return","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x0000000000000000000000000af2f93fd50ab3f4302013624311ec7a84bc9135","0x000000000000000000000000f62849f9a0b5bf2913b396098f7c7019b51a820a"],"data":"0x00000000000000000000000000000000000000000000000000000000002dc6c0"},"decoded":null,"position":0,"index":24}],"ordering":[{"Log":0}]},{"parent":14,"children":[],"idx":72,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xca669fa7000000000000000000000000b19d78033b9efc052db6ba0b93728c9cc54f4074","output":"0x","gas_used":0,"gas_limit":1034237187,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[]},{"parent":14,"children":[74],"idx":73,"trace":{"depth":2,"success":true,"caller":"0xc7183455a4c133ae270771860664b6b7ec320bb1","address":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x9e63798d0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":4909,"gas_limit":1034236581,"status":"Return","steps":[],"decoded":null},"logs":[],"ordering":[{"Call":0}]},{"parent":73,"children":[],"idx":74,"trace":{"depth":3,"success":true,"caller":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","address":"0x2e234dae75c793f67a35089c9d99245e1c58470b","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"DELEGATECALL","value":"0x0","data":"0x9e63798d0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000","output":"0x","gas_used":4577,"gas_limit":1018076338,"status":"Stop","steps":[],"decoded":null},"logs":[{"raw_log":{"topics":["0x80c17db79857f338a6a6df68a6883ecc0ce78e2202fe61ed979733573f40538e","0x0000000000000000000000000000000000000000000000000000000000000003","0x000000000000000000000000b19d78033b9efc052db6ba0b93728c9cc54f4074"],"data":"0x0000000000000000000000000000000000000000000000000000000000000000"},"decoded":null,"position":0,"index":26}],"ordering":[{"Log":0}]}]}]],"labeled_addresses":{"0xa53e365bb7183eb60b1263706c686848492fb679":"c1","0xe1fc4143851d3e84a40af3aac51afe019c98cda6":"c0","0x0af2f93fd50ab3f4302013624311ec7a84bc9135":"c2","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xb19d78033b9efc052db6ba0b93728c9cc54f4074":"p2","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xab80885935d10ffc2f477636e1c5cdef234e22c3":"p1","0x456742e80e2d5a6f1db7e244e3763914d3fbd619":"e1","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xe5b9bc45c8125d133fe66fe9459486e3d5792d39":"p0","0xde12da0783dcb1d543cf885d6eff9e8ead554d58":"e0"},"duration":"93ms 320µs 583ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/AgenticCommerce.lifecycle.t.sol:AgenticCommerceLifecycleTest":{"duration":"62ms 456µs 167ns","test_results":{"test_claimRefund_fundedZeroBudget_noTransfer()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":169546}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"423µs 958ns","breakpoints":{},"gas_snapshots":{}},"test_claimRefund_funded_afterExpiry()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":224589}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"5ms 231µs 834ns","breakpoints":{},"gas_snapshots":{}},"test_claimRefund_funded_beforeExpiry_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":243361}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"45µs 417ns","breakpoints":{},"gas_snapshots":{}},"test_claimRefund_invalidAndTerminal_revert()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":169156}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"30µs 291ns","breakpoints":{},"gas_snapshots":{}},"test_claimRefund_neverCallsHook_evenReverting()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":515068}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"81µs 708ns","breakpoints":{},"gas_snapshots":{}},"test_claimRefund_open_afterExpiry_noTransfer()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":160461}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"1ms 835µs 916ns","breakpoints":{},"gas_snapshots":{}},"test_claimRefund_submitted_gracePeriod()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":231164}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"81µs 708ns","breakpoints":{},"gas_snapshots":{}},"test_claimRefund_worksWhilePaused()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":237789}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"57µs 125ns","breakpoints":{},"gas_snapshots":{}},"test_complete_allowedAfterExpiry()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":248113}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"56µs 750ns","breakpoints":{},"gas_snapshots":{}},"test_complete_feeSplit_rounding_andEventOrder()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":376962}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"621µs 875ns","breakpoints":{},"gas_snapshots":{}},"test_complete_fullFees_netZero_stillEmitsPaymentReleased()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":285866}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"554µs 125ns","breakpoints":{},"gas_snapshots":{}},"test_complete_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":400767}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"78µs 667ns","breakpoints":{},"gas_snapshots":{}},"test_complete_vs_claimRefund_race_afterGrace()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":223853}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"141µs 83ns","breakpoints":{},"gas_snapshots":{}},"test_complete_zeroBudget()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":183447}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"1ms 264µs 541ns","breakpoints":{},"gas_snapshots":{}},"test_complete_zeroFees_providerGetsAll()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":263434}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"170µs 417ns","breakpoints":{},"gas_snapshots":{}},"test_createJob_clientIsProvider_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":26953}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"28µs 667ns","breakpoints":{},"gas_snapshots":{}},"test_createJob_evaluatorIsProvider_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":26444}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"34µs 750ns","breakpoints":{},"gas_snapshots":{}},"test_createJob_expiryAboveUint48_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":28680}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"25µs","breakpoints":{},"gas_snapshots":{}},"test_createJob_expiryBoundary()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":138537}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"56µs 83ns","breakpoints":{},"gas_snapshots":{}},"test_createJob_happy_noProvider_noHook_evaluatorIsClient()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":132398}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"66µs 292ns","breakpoints":{},"gas_snapshots":{}},"test_createJob_happy_withProviderAndHook()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":191953}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"113µs 625ns","breakpoints":{},"gas_snapshots":{}},"test_createJob_hookNotWhitelisted_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":32568}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x74c4af92ba5855927c5586e51823c4f2ebd01cda":"nope","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"117µs","breakpoints":{},"gas_snapshots":{}},"test_createJob_invalidHook_eoa_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":63221}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xb50df9574b97e843927dddf6c100824641a688b1":"eoaHook","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"127µs 41ns","breakpoints":{},"gas_snapshots":{}},"test_createJob_invalidHook_erc165Only_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":137299}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"55µs 791ns","breakpoints":{},"gas_snapshots":{}},"test_createJob_precedence()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":58801}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x74c4af92ba5855927c5586e51823c4f2ebd01cda":"nope","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"127µs 709ns","breakpoints":{},"gas_snapshots":{}},"test_createJob_zeroEvaluator_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":26600}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"45µs 792ns","breakpoints":{},"gas_snapshots":{}},"test_fund_frontRunReQuote_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":185217}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"177µs 500ns","breakpoints":{},"gas_snapshots":{}},"test_fund_happy()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1003255}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"1ms 443µs 208ns","breakpoints":{},"gas_snapshots":{}},"test_fund_precedence()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":296207}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"55µs 42ns","breakpoints":{},"gas_snapshots":{}},"test_fund_reverts_inOrder()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":308311}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"58µs","breakpoints":{},"gas_snapshots":{}},"test_fund_twice_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":243951}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"34µs 500ns","breakpoints":{},"gas_snapshots":{}},"test_fund_zeroBudget_noTransfer()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":172739}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"40µs 42ns","breakpoints":{},"gas_snapshots":{}},"test_getJob_unknownIds_returnZeroStruct()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":181447}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"33µs 625ns","breakpoints":{},"gas_snapshots":{}},"test_reject_fundedZeroBudget_noRefundEvent()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":171860}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"45µs 625ns","breakpoints":{},"gas_snapshots":{}},"test_reject_funded_byEvaluator_refunds()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":216232}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"565µs 208ns","breakpoints":{},"gas_snapshots":{}},"test_reject_invalidAndTerminal_revert()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":172773}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"29µs 291ns","breakpoints":{},"gas_snapshots":{}},"test_reject_open_byClient_and_byProvider()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":271538}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"51µs 417ns","breakpoints":{},"gas_snapshots":{}},"test_reject_submitted_byEvaluator_refunds()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":220407}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"54µs 667ns","breakpoints":{},"gas_snapshots":{}},"test_reject_unauthorisedPerStatus()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":500641}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"82µs 458ns","breakpoints":{},"gas_snapshots":{}},"test_setBudget_afterFund_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":245108}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"34µs 333ns","breakpoints":{},"gas_snapshots":{}},"test_setBudget_reQuotableWhileOpen_andEncoding()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1042170}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"119µs 666ns","breakpoints":{},"gas_snapshots":{}},"test_setBudget_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":170164}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"34µs 709ns","breakpoints":{},"gas_snapshots":{}},"test_setProvider_expired_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":153570}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"20µs 500ns","breakpoints":{},"gas_snapshots":{}},"test_setProvider_happy_hookedWithEncoding()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":623342}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"91µs 84ns","breakpoints":{},"gas_snapshots":{}},"test_setProvider_notOpen_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":159117}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"27µs 750ns","breakpoints":{},"gas_snapshots":{}},"test_setProvider_precedence()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":264045}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"34µs 542ns","breakpoints":{},"gas_snapshots":{}},"test_setProvider_revertingBeforeHook_blocks()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":452789}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"39µs 459ns","breakpoints":{},"gas_snapshots":{}},"test_setProvider_reverts_inOrder()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":201058}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xb19d78033b9efc052db6ba0b93728c9cc54f4074":"p2","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"76µs 83ns","breakpoints":{},"gas_snapshots":{}},"test_submit_happy()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1347518}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"149µs 125ns","breakpoints":{},"gas_snapshots":{}},"test_submit_openJob_reverts_evenZeroBudget()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":152838}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"21µs 375ns","breakpoints":{},"gas_snapshots":{}},"test_submit_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":259564}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"46µs 84ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/BaseERC8183Hook.t.sol:BaseERC8183HookTest":{"duration":"9ms 878µs 875ns","test_results":{"test_afterAction_fromNonKernel_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":19217}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner"},"duration":"48µs 83ns","breakpoints":{},"gas_snapshots":{}},"test_baseInit_outsideInitializer_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":17650}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner"},"duration":"21µs 250ns","breakpoints":{},"gas_snapshots":{}},"test_beforeAction_fromNonKernel_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":18796}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner"},"duration":"22µs 125ns","breakpoints":{},"gas_snapshots":{}},"test_defaultHandlers_areNoops_fullLifecycleAndReject()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1690404}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner"},"duration":"477µs 792ns","breakpoints":{},"gas_snapshots":{}},"test_init_onImplementation_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":13064}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner"},"duration":"16µs 667ns","breakpoints":{},"gas_snapshots":{}},"test_init_twice_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":17853}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner"},"duration":"16µs 959ns","breakpoints":{},"gas_snapshots":{}},"test_init_zeroKernel_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":91399}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner"},"duration":"40µs 458ns","breakpoints":{},"gas_snapshots":{}},"test_kernel_isSetAndAtSlot0()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":18508}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner"},"duration":"541µs 250ns","breakpoints":{},"gas_snapshots":{}},"test_routes_reject()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":879008}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner"},"duration":"308µs 375ns","breakpoints":{},"gas_snapshots":{}},"test_routes_setProvider_setBudget_fund_submit_complete()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1545489}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner"},"duration":"428µs 917ns","breakpoints":{},"gas_snapshots":{}},"test_supportsInterface()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":16235}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner"},"duration":"37µs 292ns","breakpoints":{},"gas_snapshots":{}},"test_unknownSelector_isNoop()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":23541}},"traces":[],"labeled_addresses":{"0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner"},"duration":"15µs 667ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/Interfaces.t.sol:InterfacesTest":{"duration":"87µs 584ns","test_results":{"test_createJob_keepsFiveArgumentShape()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":3183}},"traces":[],"labeled_addresses":{},"duration":"5µs 292ns","breakpoints":{},"gas_snapshots":{}},"test_hookInterfaceId_isXorOfBothSelectors()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":3795}},"traces":[],"labeled_addresses":{},"duration":"4µs 958ns","breakpoints":{},"gas_snapshots":{}},"test_hookSelectors_matchStandard()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":3672}},"traces":[],"labeled_addresses":{},"duration":"4µs 416ns","breakpoints":{},"gas_snapshots":{}},"test_hookedKernelSelectors()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":5326}},"traces":[],"labeled_addresses":{},"duration":"7µs 584ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/JobSpecBuilder.t.sol:JobSpecBuilderTest":{"duration":"791ms 238µs 625ns","test_results":{"testFuzz_JB10_inBoundsNeverReverts(uint256,int256)":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Fuzz":{"first_case":{"calldata":"0x9c16db6d00000000000000000000000000214feb2caf420de2e7d1a5d26675eab6a0e2bb0000000000000000000000000000000060818b01e8252083ddd4ceb18d829d9b","gas":209179,"stipend":21740},"runs":1024,"mean_gas":187406,"median_gas":187514,"failed_corpus_replays":0}},"traces":[],"labeled_addresses":{"0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth","0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth"},"duration":"783ms 566µs 834ns","breakpoints":{},"gas_snapshots":{}},"testFuzz_JB11_deterministic(uint256,bytes32)":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Fuzz":{"first_case":{"calldata":"0x2f337cc700000000000000000000000000214feb2caf420de2e7d1a5d26675eab6a0e2bb53c47eae3aec9bb18301b8c98eb4d12f4ec8a60096f7902e97f25d5ecd4e7660","gas":350111,"stipend":21920},"runs":1024,"mean_gas":328267,"median_gas":328191,"failed_corpus_replays":0}},"traces":[],"labeled_addresses":{"0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth","0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth"},"duration":"500ms 341µs 42ns","breakpoints":{},"gas_snapshots":{}},"test_JB01_fills()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":193400}},"traces":[],"labeled_addresses":{"0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth","0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth"},"duration":"303µs 375ns","breakpoints":{},"gas_snapshots":{}},"test_JB02_targets()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":331784}},"traces":[],"labeled_addresses":{"0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth","0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth"},"duration":"540µs 292ns","breakpoints":{},"gas_snapshots":{}},"test_JB03_timingAndOrigin()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":236220}},"traces":[],"labeled_addresses":{"0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth","0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth"},"duration":"766µs 875ns","breakpoints":{},"gas_snapshots":{}},"test_JB04_params()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":194249}},"traces":[],"labeled_addresses":{"0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth","0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth"},"duration":"738µs 208ns","breakpoints":{},"gas_snapshots":{}},"test_JB05_targetOverflow()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":161301}},"traces":[],"labeled_addresses":{"0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth","0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth"},"duration":"531µs 750ns","breakpoints":{},"gas_snapshots":{}},"test_JB06_fillOutOfBounds()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":153674}},"traces":[],"labeled_addresses":{"0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth","0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth"},"duration":"399µs","breakpoints":{},"gas_snapshots":{}},"test_JB07_ceaOnUnsupportedChain()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":147535}},"traces":[],"labeled_addresses":{"0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth","0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth"},"duration":"217µs 42ns","breakpoints":{},"gas_snapshots":{}},"test_JB08_doesNotJudgeTheTemplate()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":144987}},"traces":[],"labeled_addresses":{"0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth","0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth"},"duration":"200µs 209ns","breakpoints":{},"gas_snapshots":{}},"test_JB09_malformedTemplate_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":19054}},"traces":[],"labeled_addresses":{"0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth","0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth"},"duration":"19µs 500ns","breakpoints":{},"gas_snapshots":{}},"test_JB12_copiesLogicAndMutability()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":203167}},"traces":[],"labeled_addresses":{"0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth","0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth"},"duration":"627µs 416ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/Naming.t.sol:NamingTest":{"duration":"38ms 562µs 375ns","test_results":{"test_naming_derivedErc20Selectors()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1960001}},"traces":[],"labeled_addresses":{},"duration":"2ms 389µs 541ns","breakpoints":{},"gas_snapshots":{}},"test_naming_hookTopicsAndErrors()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":5183}},"traces":[],"labeled_addresses":{},"duration":"13µs 917ns","breakpoints":{},"gas_snapshots":{}},"test_naming_hookViews()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1733116}},"traces":[],"labeled_addresses":{"0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x3cdc6b6e442f4a0caa38245fa4fea787d7514bb4":"engine","0x8176041fcc3e7da62bc98139fe56d18cba211fd5":"kernel","0xf3cdfc0454c731c119fc247420fc3e0f4d3a3670":"factory"},"duration":"1ms 246µs 584ns","breakpoints":{},"gas_snapshots":{}},"test_naming_markers()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":4414}},"traces":[],"labeled_addresses":{},"duration":"151µs 542ns","breakpoints":{},"gas_snapshots":{}},"test_naming_marketplaceErrors()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":13118}},"traces":[],"labeled_addresses":{},"duration":"23µs 542ns","breakpoints":{},"gas_snapshots":{}},"test_naming_marketplaceEvents()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7765}},"traces":[],"labeled_addresses":{},"duration":"10µs 375ns","breakpoints":{},"gas_snapshots":{}},"test_naming_marketplaceFunctions()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":22696}},"traces":[],"labeled_addresses":{},"duration":"36µs 42ns","breakpoints":{},"gas_snapshots":{}},"test_naming_noMandateInABIs()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":71005049}},"traces":[],"labeled_addresses":{},"duration":"31ms 24µs 916ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/RulesBindingHook.fork.t.sol:RulesBindingHookForkTest":{"duration":"6ms 23µs 708ns","test_results":{"test_fork_mirrorsMatchDeployedAGW()":{"status":"Skipped","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":0}},"traces":[],"labeled_addresses":{},"duration":"2ms 701µs 875ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/RulesBindingHook.t.sol:RulesBindingHookTest":{"duration":"192ms 532µs 500ns","test_results":{"test_activeJobOf_neverSeen_zero()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":17748}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x9c64e4efa500d7a55b8327003a3f5693a07ca800":"never","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"42µs 458ns","breakpoints":{},"gas_snapshots":{}},"test_activeJobOf_returnsId()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":387603}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"152µs 750ns","breakpoints":{},"gas_snapshots":{}},"test_afterAction_directCall_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":18763}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"12µs 167ns","breakpoints":{},"gas_snapshots":{}},"test_beforeAction_directCall_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":22774}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"13µs 42ns","breakpoints":{},"gas_snapshots":{}},"test_freed_afterClaimRefund_unhooked()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":572825}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"235µs 916ns","breakpoints":{},"gas_snapshots":{}},"test_freed_afterComplete()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":617121}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"190µs 333ns","breakpoints":{},"gas_snapshots":{}},"test_freed_afterDetachThenRefund()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":567946}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"162µs 667ns","breakpoints":{},"gas_snapshots":{}},"test_freed_afterReject()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":579218}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"156µs 917ns","breakpoints":{},"gas_snapshots":{}},"test_fund_bindsRules()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":362643}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"103µs 500ns","breakpoints":{},"gas_snapshots":{}},"test_initialize_setsState()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":29227}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"29µs 459ns","breakpoints":{},"gas_snapshots":{}},"test_initialize_twice_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":22733}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"11µs 458ns","breakpoints":{},"gas_snapshots":{}},"test_initialize_zeroEngine_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":95895}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"27µs 625ns","breakpoints":{},"gas_snapshots":{}},"test_initialize_zeroFactory_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":96227}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"18µs 875ns","breakpoints":{},"gas_snapshots":{}},"test_initialize_zeroKernel_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":96135}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"18µs 417ns","breakpoints":{},"gas_snapshots":{}},"test_invalidOptParams_lengths()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":690627}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"255µs 500ns","breakpoints":{},"gas_snapshots":{}},"test_notAnAGW_contractClient()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":341433}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"141µs 167ns","breakpoints":{},"gas_snapshots":{}},"test_notAnAGW_eoaClient()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":241551}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xc593195b6b4f26174151fded0b8079566f791aac":"eoaClient","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"125µs 833ns","breakpoints":{},"gas_snapshots":{}},"test_rulesNotLive_neverGranted()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":235059}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"159µs 708ns","breakpoints":{},"gas_snapshots":{}},"test_rulesNotLive_revoked()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":236290}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"154µs 417ns","breakpoints":{},"gas_snapshots":{}},"test_rulesOfAnotherWallet_notLiveHere()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":287307}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x4dad47a4ad9ac11e30d045132b59f708835ff35b":"otherAGW"},"duration":"248µs 625ns","breakpoints":{},"gas_snapshots":{}},"test_samePermissionId_differentAGWs_bindIndependently()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":682538}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd10a536aa09b514997d5617f55b79a9962ec8384":"agw2","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"378µs 417ns","breakpoints":{},"gas_snapshots":{}},"test_sameRules_sequentialJobs_allowed()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":568190}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"288µs 625ns","breakpoints":{},"gas_snapshots":{}},"test_scope_hooklessJob_fundsWhileBusy()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":498652}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"112µs 83ns","breakpoints":{},"gas_snapshots":{}},"test_scope_otherHookJob_doesNotTouchThisHook()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1859421}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"273µs 375ns","breakpoints":{},"gas_snapshots":{}},"test_secondJob_whileFirstFunded_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":511778}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"227µs 416ns","breakpoints":{},"gas_snapshots":{}},"test_secondJob_whileFirstSubmitted_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":529573}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"345µs 84ns","breakpoints":{},"gas_snapshots":{}},"test_storageLayout_bySlot()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":487324}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"324µs 875ns","breakpoints":{},"gas_snapshots":{}},"test_transferFailsAfterHook_rollsBackBinding()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":406252}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xc3c6ad6c2acbfd173dc55f5c2014b8a4feb6217e":"agw3-noAllowance","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"137µs 917ns","breakpoints":{},"gas_snapshots":{}},"test_twoAGWs_eachHoldALiveJob()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":688988}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd10a536aa09b514997d5617f55b79a9962ec8384":"agw2","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"354µs 625ns","breakpoints":{},"gas_snapshots":{}},"test_upgrade_byNonOwner_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":971931}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"104µs 416ns","breakpoints":{},"gas_snapshots":{}},"test_upgrade_preservesBindingAndBlock()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":1480699}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"181µs 333ns","breakpoints":{},"gas_snapshots":{}},"test_zeroBudgetJob_bindsNormally()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":275568}},"traces":[],"labeled_addresses":{"0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0xf5da897cb27ecd131cf70e9611ef85fec8533356":"hookProxyAdminOwner","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner"},"duration":"94µs 41ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/UniversalMarketplace.conformance.t.sol:UniversalMarketplaceConformanceTest":{"duration":"10ms 810µs 208ns","test_results":{"test_MC01_lendingExample_equalsV2Doc()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":191300}},"traces":[],"labeled_addresses":{"0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth"},"duration":"636µs 625ns","breakpoints":{},"gas_snapshots":{}},"test_MC02_swapExample_equalsV2Doc()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":127513}},"traces":[],"labeled_addresses":{"0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth"},"duration":"197µs 208ns","breakpoints":{},"gas_snapshots":{}},"test_MC03_orAndAtLeastExamples()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":531999}},"traces":[],"labeled_addresses":{"0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth"},"duration":"896µs 83ns","breakpoints":{},"gas_snapshots":{}},"test_MC04_referenceDecoder_agrees()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":884396}},"traces":[],"labeled_addresses":{"0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth"},"duration":"1ms 586µs 167ns","breakpoints":{},"gas_snapshots":{}},"test_MC05_fieldOrder()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":137247}},"traces":[],"labeled_addresses":{"0xd00966eaf28611743d149d346a1b20f6e0eb4196":"AavePool.eth","0x33474942344753f636e5af8c437d1d00eb01c6c2":"agw","0x913733dc3761d3e66534494f701a1a664861a9a7":"aUSDC.eth","0x914d024d703c0df6f9a32b21c95b3b2de71f8467":"Spark.eth","0x0df093b0529a686c0f0a153ad18e2672215fbc51":"WETH.base","0xbbe819a3dd1113e30925014563ca18e9ea942501":"MorphoVault.eth","0x41bffff0ebab0ff77c37421d0f3f19f48a04cb1f":"USDC.eth"},"duration":"194µs 583ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/UniversalMarketplace.fork.t.sol:UniversalMarketplaceForkTest":{"duration":"839µs 916ns","test_results":{"test_fork_openJob_realAGWv6()":{"status":"Skipped","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":0}},"traces":[],"labeled_addresses":{"0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x540da3418be99da0614998034fcb817e9d8a0644":"forkAdmin","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x238ec72e0743bd4c21497d4157854dd3a1dd2f0d":"forkRelayer","0x22aa0d0bcc922d549618bd1ef8253cc8dee5a3cc":"forkProvider"},"duration":"10µs 791ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/UniversalMarketplace.t.sol:UniversalMarketplaceTest":{"duration":"50ms 687µs 750ns","test_results":{"test_MB01_agentMismatch()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":3187475}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 134µs 834ns","breakpoints":{},"gas_snapshots":{}},"test_MB02_shape()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":3804741}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"2ms 62µs 958ns","breakpoints":{},"gas_snapshots":{}},"test_MB03_terms()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":6080412}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"10ms 415µs 667ns","breakpoints":{},"gas_snapshots":{}},"test_MB04_perCallMustEqualPrincipal()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7216863}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 323µs 958ns","breakpoints":{},"gas_snapshots":{}},"test_ML01_setAgentCardActive()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2735675}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"344µs 292ns","breakpoints":{},"gas_snapshots":{}},"test_ML02_disableAgentCard()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2940853}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"626µs 542ns","breakpoints":{},"gas_snapshots":{}},"test_ML03_verifyAgentCard()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":5217626}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 869µs 333ns","breakpoints":{},"gas_snapshots":{}},"test_ML04_verify_racedByUpdate()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2712867}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"799µs 958ns","breakpoints":{},"gas_snapshots":{}},"test_ML05_revokeVerification()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2607531}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"496µs 667ns","breakpoints":{},"gas_snapshots":{}},"test_ML06_update_updatesEveryMutableField()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2694633}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 535µs 334ns","breakpoints":{},"gas_snapshots":{}},"test_ML07_update_clearsVerification()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2692771}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"930µs 916ns","breakpoints":{},"gas_snapshots":{}},"test_ML08_update_access()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2696245}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 227µs 500ns","breakpoints":{},"gas_snapshots":{}},"test_ML09_update_chainImmutable()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2671877}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"929µs","breakpoints":{},"gas_snapshots":{}},"test_ML10_update_validatesLikeRegistration()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2686095}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"493µs 750ns","breakpoints":{},"gas_snapshots":{}},"test_ML11_update_invalidatesOldIntents()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":3151497}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 15µs 625ns","breakpoints":{},"gas_snapshots":{}},"test_ML12_update_leavesOpenedJobsUntouched()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7005782}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 288µs 125ns","breakpoints":{},"gas_snapshots":{}},"test_ML13_openJob_afterUpdate_usesNewContent()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7273277}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 340µs 791ns","breakpoints":{},"gas_snapshots":{}},"test_MR01_registerAgentCard_storesEverythingAndEmits()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2668135}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"309µs 750ns","breakpoints":{},"gas_snapshots":{}},"test_MR02_providerAndActiveAreContractWritten()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2686013}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"307µs 417ns","breakpoints":{},"gas_snapshots":{}},"test_MR03_eachInvalidCardField_reverts()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":6026036}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"4ms 308µs 708ns","breakpoints":{},"gas_snapshots":{}},"test_MR04_pushChain_refused()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":133192}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"220µs 750ns","breakpoints":{},"gas_snapshots":{}},"test_MR05_unsupportedEvmChain_refused()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":76069}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"182µs 750ns","breakpoints":{},"gas_snapshots":{}},"test_MR06_assetTeeth()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":3180147}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xf286838c4411fb1f95258c7c4af513b7dcb8a03f":"codelessAsset","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"2ms 89µs 167ns","breakpoints":{},"gas_snapshots":{}},"test_MR07_rulesErrorsSurface()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":112309}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"264µs 41ns","breakpoints":{},"gas_snapshots":{}},"test_MR08_criteriaNotJudgedAtRegistration()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":3212964}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 23µs 791ns","breakpoints":{},"gas_snapshots":{}},"test_MR09_assetIndependent()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7099876}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 61µs 84ns","breakpoints":{},"gas_snapshots":{}},"test_MR10_paused()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":95515}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"86µs 125ns","breakpoints":{},"gas_snapshots":{}},"test_MR11_onePerProvider()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":4628637}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"430µs 42ns","breakpoints":{},"gas_snapshots":{}},"test_MR12_paymentTokenGuard()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2922156}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"631µs 875ns","breakpoints":{},"gas_snapshots":{}},"test_MR13_everyAssetOnChain()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2906776}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0xe45bd004b7672615dc2c835bab76232ecc41f6f2":"codelessAsset1","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"555µs 83ns","breakpoints":{},"gas_snapshots":{}},"test_MR14_rulesErrorsSurface()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2888090}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"562µs 375ns","breakpoints":{},"gas_snapshots":{}},"test_MS01_freshWallet_happyPath()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7327047}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 959µs 917ns","breakpoints":{},"gas_snapshots":{}},"test_MS02_movesNoFunds()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7070726}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 864µs 834ns","breakpoints":{},"gas_snapshots":{}},"test_MS03_existingWallet_skipsDeploy()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":9077923}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 771µs 333ns","breakpoints":{},"gas_snapshots":{}},"test_MS04_existingWallet_wrongOwner()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7427839}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 619µs 334ns","breakpoints":{},"gas_snapshots":{}},"test_MS04b_factoryDeploysElsewhere_agwMismatch()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":4309613}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 811µs 459ns","breakpoints":{},"gas_snapshots":{}},"test_MS05_cardInactive_unknown()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7054591}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"3ms 368µs 167ns","breakpoints":{},"gas_snapshots":{}},"test_MS06_cardVersionMismatch()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2847572}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"557µs 834ns","breakpoints":{},"gas_snapshots":{}},"test_MS07_principalOutOfRange()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":11845553}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"7ms 438µs 709ns","breakpoints":{},"gas_snapshots":{}},"test_MS08_expiryOutOfRange()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":11844962}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"6ms 336µs 708ns","breakpoints":{},"gas_snapshots":{}},"test_MS09_executeByOutOfRange()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":11845880}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"4ms 726µs 333ns","breakpoints":{},"gas_snapshots":{}},"test_MS10_params()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":10721615}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"3ms 165µs 208ns","breakpoints":{},"gas_snapshots":{}},"test_MS11_intentWalletAndExecutor()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":3115903}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"2ms 559µs 667ns","breakpoints":{},"gas_snapshots":{}},"test_MS12_intentExecMismatch_everyBoundInput()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":5005868}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"6ms 338µs 291ns","breakpoints":{},"gas_snapshots":{}},"test_MS13_intentSessionMismatch_noStateOnFailure()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2952976}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"725µs 500ns","breakpoints":{},"gas_snapshots":{}},"test_MS14_oneLiveJob()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":14440082}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"4ms 846µs 750ns","breakpoints":{},"gas_snapshots":{}},"test_MS15_jobVerification()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":14008060}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"4ms 183µs 458ns","breakpoints":{},"gas_snapshots":{}},"test_MS16_providerIsEvaluator_afterSetEvaluator()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2844607}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"547µs 625ns","breakpoints":{},"gas_snapshots":{}},"test_MS17_8183Continuation_feeEnforcedAtFund()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7400238}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"2ms 835µs 167ns","breakpoints":{},"gas_snapshots":{}},"test_MS18_gasCeilings()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":9126893}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 768µs 125ns","breakpoints":{},"gas_snapshots":{}},"test_MS19_openJob_twoAssets_principalMarkers()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7149268}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 867µs 958ns","breakpoints":{},"gas_snapshots":{}},"test_MS20_openJob_trancheCard()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7366287}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"2ms 359µs","breakpoints":{},"gas_snapshots":{}},"test_MS21_activeJobOf()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":11840509}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x1159dbc912518f64b56b88f2659e854296e8d2b2":"neverSeen","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"4ms 733µs 750ns","breakpoints":{},"gas_snapshots":{}},"test_MS22_envelopeVersion_named()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2889688}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 626µs 542ns","breakpoints":{},"gas_snapshots":{}},"test_MV01_getAgentCard_fullView()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2758254}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"688µs 834ns","breakpoints":{},"gas_snapshots":{}},"test_MV02_computeCEA()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":54010}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0xd92f78e25c59ea89e560d580f0bf875b9aacdc01":"anyAGW","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"65µs 917ns","breakpoints":{},"gas_snapshots":{}},"test_MV03_ceaRotation_staleCaught()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7805098}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x2256a349222d618181d0fd035e2949095230f6eb":"ceaProxyImplV2","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"4ms 710µs 375ns","breakpoints":{},"gas_snapshots":{}},"test_MV04_buildCreateJobCalldata()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":6829964}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"8ms 949µs 666ns","breakpoints":{},"gas_snapshots":{}},"test_MV05_previewIntent_roundTrips()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7398628}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"3ms 414µs 833ns","breakpoints":{},"gas_snapshots":{}},"test_MV06_adminSetters()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":136323}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x933ef277ef1da53ebdaca202a0cffc3e399aeab2":"evaluatorV2","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"111µs 250ns","breakpoints":{},"gas_snapshots":{}},"test_MV07_pause()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7107418}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 86µs","breakpoints":{},"gas_snapshots":{}},"test_MV08_initialize()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":37019622}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"817µs 958ns","breakpoints":{},"gas_snapshots":{}},"test_MV09_storageLayout_bySlot()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":9852365}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"1ms 539µs 375ns","breakpoints":{},"gas_snapshots":{}},"test_MV10_upgrade_preservesState()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":16222142}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"2ms 230µs 83ns","breakpoints":{},"gas_snapshots":{}},"test_MV11_setCEADeployment_clear()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2963606}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"721µs 208ns","breakpoints":{},"gas_snapshots":{}},"test_MV12_agentRating()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":67110}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"37µs 167ns","breakpoints":{},"gas_snapshots":{}},"test_MV13_version()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":19934}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"20µs 667ns","breakpoints":{},"gas_snapshots":{}},"test_MV14_noPerChainPause()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":28893490}},"traces":[],"labeled_addresses":{"0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2"},"duration":"11ms 571µs 291ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/UniversalMarketplaceRules.t.sol:UniversalMarketplaceRulesTest":{"duration":"706ms 948µs 542ns","test_results":{"testFuzz_MT11_principalBinding(uint256)":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Fuzz":{"first_case":{"calldata":"0xbcd8cd2b00000000000000000000000000214feb2caf420de2e7d1a5d26675eab6a0e2bb","gas":279212,"stipend":21420},"runs":1024,"mean_gas":257643,"median_gas":257556,"failed_corpus_replays":0}},"traces":[],"labeled_addresses":{"0xb941317fab7e0feb9d890585be19a8c9923d50b5":"cea","0xd7375ad69845c24062465f67bfdeb04dfe871b22":"pool","0x5fa59300b772d54451e6921c4a0db8fd3ddad8ce":"agent","0x8ae775926accb6f39f230a90d051e80ed3fe31ee":"pUSDC.sepolia","0xf151080efb137c79dfe753cf74605c3df046d681":"pETH.sepolia","0x85f1a0ec1abb81e37317103d10d8877d35328693":"USDC"},"duration":"705ms 989µs 667ns","breakpoints":{},"gas_snapshots":{}},"test_MT01_validate_returnsTokens()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":84743}},"traces":[],"labeled_addresses":{"0xb941317fab7e0feb9d890585be19a8c9923d50b5":"cea","0xd7375ad69845c24062465f67bfdeb04dfe871b22":"pool","0x5fa59300b772d54451e6921c4a0db8fd3ddad8ce":"agent","0x8ae775926accb6f39f230a90d051e80ed3fe31ee":"pUSDC.sepolia","0xf151080efb137c79dfe753cf74605c3df046d681":"pETH.sepolia","0x85f1a0ec1abb81e37317103d10d8877d35328693":"USDC"},"duration":"288µs","breakpoints":{},"gas_snapshots":{}},"test_MT02_assetChecks()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":207081}},"traces":[],"labeled_addresses":{"0xb941317fab7e0feb9d890585be19a8c9923d50b5":"cea","0xd7375ad69845c24062465f67bfdeb04dfe871b22":"pool","0x5fa59300b772d54451e6921c4a0db8fd3ddad8ce":"agent","0x8ae775926accb6f39f230a90d051e80ed3fe31ee":"pUSDC.sepolia","0xf151080efb137c79dfe753cf74605c3df046d681":"pETH.sepolia","0x85f1a0ec1abb81e37317103d10d8877d35328693":"USDC"},"duration":"447µs 500ns","breakpoints":{},"gas_snapshots":{}},"test_MT03_principalMarkers()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":205678}},"traces":[],"labeled_addresses":{"0xb941317fab7e0feb9d890585be19a8c9923d50b5":"cea","0xd7375ad69845c24062465f67bfdeb04dfe871b22":"pool","0x5fa59300b772d54451e6921c4a0db8fd3ddad8ce":"agent","0x8ae775926accb6f39f230a90d051e80ed3fe31ee":"pUSDC.sepolia","0xf151080efb137c79dfe753cf74605c3df046d681":"pETH.sepolia","0x85f1a0ec1abb81e37317103d10d8877d35328693":"USDC"},"duration":"291µs 834ns","breakpoints":{},"gas_snapshots":{}},"test_MT04_allowListAndPins()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":871036}},"traces":[],"labeled_addresses":{"0xb941317fab7e0feb9d890585be19a8c9923d50b5":"cea","0xd7375ad69845c24062465f67bfdeb04dfe871b22":"pool","0x5fa59300b772d54451e6921c4a0db8fd3ddad8ce":"agent","0x8ae775926accb6f39f230a90d051e80ed3fe31ee":"pUSDC.sepolia","0xf151080efb137c79dfe753cf74605c3df046d681":"pETH.sepolia","0x85f1a0ec1abb81e37317103d10d8877d35328693":"USDC"},"duration":"1ms 140µs 875ns","breakpoints":{},"gas_snapshots":{}},"test_MT05_duplicates()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":162199}},"traces":[],"labeled_addresses":{"0xb941317fab7e0feb9d890585be19a8c9923d50b5":"cea","0xd7375ad69845c24062465f67bfdeb04dfe871b22":"pool","0x5fa59300b772d54451e6921c4a0db8fd3ddad8ce":"agent","0x8ae775926accb6f39f230a90d051e80ed3fe31ee":"pUSDC.sepolia","0xf151080efb137c79dfe753cf74605c3df046d681":"pETH.sepolia","0xe03eaf47d03484b6a07f6db1c9340590b20b4630":"uniswap","0x85f1a0ec1abb81e37317103d10d8877d35328693":"USDC"},"duration":"257µs 250ns","breakpoints":{},"gas_snapshots":{}},"test_MT06_erc20Rules()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":626218}},"traces":[],"labeled_addresses":{"0xb941317fab7e0feb9d890585be19a8c9923d50b5":"cea","0xd7375ad69845c24062465f67bfdeb04dfe871b22":"pool","0x5fa59300b772d54451e6921c4a0db8fd3ddad8ce":"agent","0x8ae775926accb6f39f230a90d051e80ed3fe31ee":"pUSDC.sepolia","0xf151080efb137c79dfe753cf74605c3df046d681":"pETH.sepolia","0x85f1a0ec1abb81e37317103d10d8877d35328693":"USDC"},"duration":"777µs 750ns","breakpoints":{},"gas_snapshots":{}},"test_MT07_match_happy()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":244096}},"traces":[],"labeled_addresses":{"0xb941317fab7e0feb9d890585be19a8c9923d50b5":"cea","0xd7375ad69845c24062465f67bfdeb04dfe871b22":"pool","0x5fa59300b772d54451e6921c4a0db8fd3ddad8ce":"agent","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0x8ae775926accb6f39f230a90d051e80ed3fe31ee":"pUSDC.sepolia","0xf151080efb137c79dfe753cf74605c3df046d681":"pETH.sepolia","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0x9d5c72ad9b728cae519e74da03ef7eb140332ee3":"validator","0x85f1a0ec1abb81e37317103d10d8877d35328693":"USDC"},"duration":"589µs 958ns","breakpoints":{},"gas_snapshots":{}},"test_MT08_match_eachError()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":2039826}},"traces":[],"labeled_addresses":{"0xb941317fab7e0feb9d890585be19a8c9923d50b5":"cea","0xd7375ad69845c24062465f67bfdeb04dfe871b22":"pool","0x5fa59300b772d54451e6921c4a0db8fd3ddad8ce":"agent","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0x8ae775926accb6f39f230a90d051e80ed3fe31ee":"pUSDC.sepolia","0xf151080efb137c79dfe753cf74605c3df046d681":"pETH.sepolia","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0x748960e2d176d9033d500d7aa997cc2c444f57bc":"other","0x9d5c72ad9b728cae519e74da03ef7eb140332ee3":"validator","0x85f1a0ec1abb81e37317103d10d8877d35328693":"USDC"},"duration":"4ms 725µs 333ns","breakpoints":{},"gas_snapshots":{}},"test_MT09_match_pins()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":320012}},"traces":[],"labeled_addresses":{"0xb941317fab7e0feb9d890585be19a8c9923d50b5":"cea","0xd7375ad69845c24062465f67bfdeb04dfe871b22":"pool","0x85b44980ad19a3456427949b7b8fb0cfde32aced":"otherCEA","0x5fa59300b772d54451e6921c4a0db8fd3ddad8ce":"agent","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0x8ae775926accb6f39f230a90d051e80ed3fe31ee":"pUSDC.sepolia","0xf151080efb137c79dfe753cf74605c3df046d681":"pETH.sepolia","0x82d23435a5bd3da279a0666c44580817cbb0b58f":"otherSpender","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0x9d5c72ad9b728cae519e74da03ef7eb140332ee3":"validator","0x85f1a0ec1abb81e37317103d10d8877d35328693":"USDC"},"duration":"879µs 83ns","breakpoints":{},"gas_snapshots":{}},"test_MT10_malformedInputs()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":116987}},"traces":[],"labeled_addresses":{"0xb941317fab7e0feb9d890585be19a8c9923d50b5":"cea","0xd7375ad69845c24062465f67bfdeb04dfe871b22":"pool","0x5fa59300b772d54451e6921c4a0db8fd3ddad8ce":"agent","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0x8ae775926accb6f39f230a90d051e80ed3fe31ee":"pUSDC.sepolia","0xf151080efb137c79dfe753cf74605c3df046d681":"pETH.sepolia","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0x9d5c72ad9b728cae519e74da03ef7eb140332ee3":"validator","0x85f1a0ec1abb81e37317103d10d8877d35328693":"USDC"},"duration":"366µs 125ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]}} diff --git a/plan/marketplace/research/2026-10-20/dependency-pins.json b/plan/marketplace/research/2026-10-20/dependency-pins.json new file mode 100644 index 00000000..17f16769 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/dependency-pins.json @@ -0,0 +1,34 @@ +[ + { + "path": "lib/forge-std", + "sha": "3b20d60d14b343ee4f908cb8079495c07f5e8981", + "archived": true, + "skipped_links": [] + }, + { + "path": "lib/openzeppelin-contracts", + "sha": "e4f70216d759d8e6a64144a9e1f7bbeed78e7079", + "archived": true, + "skipped_links": [] + }, + { + "path": "lib/openzeppelin-contracts-upgradeable", + "sha": "0ed1f55fa6a2e50c062985f7a3cbc79f4029d85d", + "archived": true, + "skipped_links": [] + }, + { + "path": "lib/openzeppelin-foundry-upgrades", + "sha": "cbce1e00305e943aa1661d43f41e5ac72c662b07", + "archived": true, + "skipped_links": [] + }, + { + "path": "lib/push-agentic-wallets", + "sha": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "archived": true, + "skipped_links": [ + "lib/push-chain-core-contracts" + ] + } +] diff --git a/plan/marketplace/research/2026-10-20/evaluator-8059817/JobSpecTypes.sol b/plan/marketplace/research/2026-10-20/evaluator-8059817/JobSpecTypes.sol new file mode 100644 index 00000000..10ea0911 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/evaluator-8059817/JobSpecTypes.sol @@ -0,0 +1,116 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +/// @title JobSpecTypes — the evaluation criteria of an ERC-8183 job +/// @notice One definition, shared by everything that writes or reads a job's criteria: +/// - UniversalMarketplace builds a `JobSpec` and stores `abi.encode(spec)` as the job's description; +/// - the UniversalHook decodes it at `fund` and freezes it; +/// - the UniversalEvaluator fires its reads and judges its checks and logic. +/// @dev - Source: `docs-internal/Universal Evaluator V2 Design`, plus `origin` (marketplace PRD decision Z7). +/// - Field order is ABI. Never reorder, never insert; a change here changes every description. + +/// @notice How a check compares. BOOLEAN / COMPARE: the `left` side against `target` · NUMBER / PERCENTAGE: `left` against `right`. +enum Evaluation { + BOOLEAN, + COMPARE, + NUMBER, + PERCENTAGE +} + +/// @notice The comparison operator: == != > >= < <=. +enum Operation { + EQUAL, + NOT_EQUAL, + GREATER_THAN, + GREATER_OR_EQUAL, + LESS_THAN, + LESS_OR_EQUAL +} + +/// @notice One step of the pass logic. CHECK: one check · ALL / ANY / AT_LEAST: combine children. +enum LogicKind { + CHECK, + ALL, + ANY, + AT_LEAST +} + +/// @notice Who may replace a job's criteria before it is funded: the provider in `setBudget`, the client in `fund`. +/// @dev - The flag is always the one in the `createJob` description; a replacement must carry the same flag. +/// - `BOTH` is the zero value, so a spec that never sets the flag can be replaced by either side. +enum AllowedMutability { + BOTH, + NONE, + CLIENT, + PROVIDER +} + +/// @notice When a read is taken: after the provider's execution (at `submit`) or before it (at `fund`). +enum ReadAt { + POST_EXECUTION, + PRE_EXECUTION +} + +/// @notice One contract call on one chain, at one moment, and which value in its answer to use. +struct Read { + // namespace only ("eip155"), with chainId separate — the Read State split (AGW doc D6); + // AgentCard.chainNamespace is the full CAIP-2 string + string chainNamespace; + string chainId; // e.g. "8453" + uint16 minConfirmations; // confirmations this chain needs before the answer counts + address target; // the contract to call + bytes4 selector; // the view function + bytes args; // abi-encoded arguments + bytes outputs; // the function's return types, as T_* codes + uint8[] field; // which returned value, by ABI position: [0] = 1st return value, [0, 2] = its 3rd field + ReadAt at; // read at the block recorded at `fund` (PRE) or fixed at `submit` (POST) +} + +/// @notice One comparison. Each side is the sum of its reads. BOOLEAN `left == target` · COMPARE `Σleft op target` · +/// NUMBER `(Σleft - Σright) op target` · PERCENTAGE `(Σleft - Σright) / Σright op target`, in basis points. +struct Check { + uint8[] left; // indexes into reads, increasing · BOOLEAN: exactly one + uint8[] right; // indexes into reads, increasing, none in `left` · NUMBER / PERCENTAGE: at least one · BOOLEAN / COMPARE: none + Evaluation evaluation; + Operation operation; + int256 target; // in the contract's own units +} + +/// @notice One step of the pass logic. Children always have a higher index than their parent. +struct Logic { + LogicKind kind; + uint8 check; // CHECK only: index into checks + uint8[] children; // ALL / ANY / AT_LEAST: indexes into logic, each greater than this entry's own + uint8 k; // AT_LEAST only: how many children must pass +} + +/// @notice A job's criteria. `logic[0]` is the root: the job passes if it passes. +struct JobSpec { + uint64 executeBy; // the provider must execute before this + uint64 failFinalAt; // a FAIL only counts from a verify started after this + Read[] reads; + Check[] checks; + Logic[] logic; + AllowedMutability allowedMutability; // who may replace these criteria before `fund`; marketplace jobs are NONE + bytes32 origin; // keccak256(abi.encode(marketplace, cardId, cardVersion, principal)); opaque to hook and evaluator +} + +// ─────────────────────────────── return-type codes (`Read.outputs`) ─────────────────────────────── + +uint8 constant T_UINT = 1; +uint8 constant T_INT = 2; +uint8 constant T_BOOL = 3; +uint8 constant T_ADDRESS = 4; +uint8 constant T_BYTESN = 5; +uint8 constant T_BYTES = 6; +uint8 constant T_STRING = 7; +uint8 constant T_TUPLE = 8; +uint8 constant T_ARRAY = 9; +uint8 constant T_FIXED_ARRAY = 10; + +// ─────────────────────────────── limits ─────────────────────────────── + +uint256 constant MAX_READS = 32; +uint256 constant MAX_CHECKS = 16; +uint256 constant MAX_LOGIC = 32; +uint256 constant MAX_TERMS = 64; // read indexes across every check's sides; bounds a callback's work diff --git a/plan/marketplace/research/2026-10-20/evaluator-8059817/UniversalEvaluator.sol b/plan/marketplace/research/2026-10-20/evaluator-8059817/UniversalEvaluator.sol new file mode 100644 index 00000000..d465dc66 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/evaluator-8059817/UniversalEvaluator.sol @@ -0,0 +1,801 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.26; + +import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; + +import {IAgenticCommerce} from "../interfaces/IAgenticCommerce.sol"; +import {IUniversalEvaluator} from "../interfaces/IUniversalEvaluator.sol"; +import {IUniversalCallback} from "../../interfaces/IUniversalCallback.sol"; +import {RequestStatus, MAX_CALLBACK_GAS_LIMIT} from "../../libraries/ReadTypes.sol"; +import {JobSpec, Read, Check, ReadAt} from "../libraries/JobSpecTypes.sol"; +import { + Answer, + Verdict, + OwnerCheck, + PackedCheck, + ReadPlan, + ReadConfig, + MAX_RESULT_LENGTH, + MAX_DESCRIPTION_LENGTH, + IAGWCheckpoints, + IUniversalCoreHeights, + IReadStateDomains +} from "./EvaluationTypes.sol"; +import {JobSpecLib} from "./JobSpecLib.sol"; +import {EvmReadLib, FireParams} from "./EvmReadLib.sol"; +import {UniversalEvaluatorErrors, JobSpecErrors} from "../libraries/Errors.sol"; + +/// @title UniversalEvaluator +/// @notice One evaluator for every job. It holds each job's spec, prepaid PC, PRE_EXECUTION snapshot and evaluation: +/// - inside `fund`, the UniversalHook hands it the final spec (`startSnapshot`): it is checked, frozen, every +/// read's fresh tracked height is recorded, and every PRE_EXECUTION read is read there (the snapshot); +/// - inside `submit`, the hook calls `verifyFromSubmit`: the end block of every POST_EXECUTION read is fixed at +/// its fresh tracked height, which must be above the one recorded at `fund`, then each is sent at its block; +/// - the callback that delivers the last answer works out the verdict and applies it: PASS completes, +/// FAIL rejects. +/// @dev - The end blocks are recorded before the reads are sent, and sending runs in its own guarded call, so a +/// failure to send (PC short, Read State paused) never loses them; the provider sends later (`sendReads`) at +/// the same blocks. +/// - Every tracked height used (at `fund` and at `submit`) must be at most `MAX_HEIGHT_AGE` old. +/// - The end blocks are fixed only inside `submit`: the hook calls `verifyFromSubmit` without try/catch, so if +/// they can't be fixed (a stale or unmoved height, too little gas) `submit` reverts and is sent again later. +/// - An unreadable answer counts as answered, PRE or POST: the checks that need it stay UNKNOWN and the rest may +/// still decide the root. Once the evaluation starts, an unreadable PRE read is sent again with the POST reads. +/// - Retries re-read the same blocks; there is no attempt limit. Only the provider spends PC on reads after +/// `submit` (`sendReads`), and only while the job is Submitted and undecided; snapshot retries +/// (`retrySnapshot`, until the evaluation starts) are the client's or the provider's. +/// - A job with no verdict ends through the kernel: after `expiredAt + EVALUATOR_GRACE_PERIOD` anyone may call +/// `claimRefund`, which refunds the client and frees the wallet. +/// - Answers longer than `MAX_RESULT_LENGTH` are unreadable. Read State itself does not cap answers yet. +/// - The verdict is applied as soon as the root is decided: the three-valued logic is monotone, so once the +/// root is PASS or FAIL no later answer can change it, and reads still out don't hold up payment. +/// - The kernel `reason` commits to the spec and to every read's evidence (`evidenceOf`) in index order, zero +/// for a read not answered when the root was decided, so it can be re-derived from events. +/// - `JobSpec.executeBy` and `JobSpec.failFinalAt` are not used: a FAIL at fixed blocks is final. +/// - `JobSpecLib.validate` runs in a linked library (DELEGATECALL; its address is fixed in this bytecode at +/// deployment, and it is stateless). Everything else, `EvmReadLib` included, is compiled in. +/// - Not upgradeable, with no admin: how this evaluator judges a frozen spec can't change. A rule change is a new +/// evaluator for new jobs; every job settles through the evaluator recorded in it at `createJob`. The kernel +/// and the hook stay trust points: both are upgradeable, and the kernel admin can detach a job's hook. +contract UniversalEvaluator is IUniversalEvaluator, ReentrancyGuard { + using SafeERC20 for IERC20; + + /// @notice What the evaluator keeps per job once its spec is frozen. + struct JobCache { + address client; + uint8 logicCount; // entries in the packed logic + bool frozen; + bool checkpointOk; // the wallet's counter could be read at `fund` + uint64 checkpointAtFund; + bytes32 specHash; // keccak256 of the exact frozen spec bytes + uint256[2] readChecks; // per read i, a 16-bit mask of the checks that use it: word i / 16, bits 16·(i % 16) + } + + /// @notice The PRE_EXECUTION snapshot of a job. + struct Snapshot { + uint8 needed; // PRE_EXECUTION reads + uint32 pre; // bit i: read i is PRE_EXECUTION + uint32 answered; // bit i: PRE read i answered, usable or not; never cleared + } + + /// @notice The evaluation of a submitted job. + struct Evaluation { + bool endFixed; // the end blocks are recorded + bool started; // the POST reads were sent + uint8 reads; + uint8 pending; // reads still waiting for an answer + bool done; // a verdict was worked out from the current answers + Verdict verdict; + bool applied; // the kernel accepted the verdict + OwnerCheck ownerCheck; // recorded only + uint32 checkRes; // each check's result, 2 bits per check (JobSpecLib) + uint32 answered; // bit i: read i answered since it was last sent; PRE reads start answered by the snapshot + } + + /// @notice Which read of which job a Read State request answers. + struct RequestRef { + uint256 jobId; + uint8 read; + bool snapshot; + } + + // ───────── events ───────── + + event Prefunded(uint256 indexed jobId, address indexed from, uint256 amount); + event SpecFrozenHere(uint256 indexed jobId, bytes32 specHash, OwnerCheck checkpointRead, uint64 checkpointAtFund); + event SnapshotRequested(uint256 indexed jobId, uint8 indexed read, uint256 requestId, uint64 height); + event SnapshotAnswered(uint256 indexed jobId, uint8 indexed read, uint256 requestId, bool ok, int256 value); + event SnapshotReady(uint256 indexed jobId); + event EndBlocksFixed(uint256 indexed jobId); + event ReadsSent(uint256 indexed jobId, uint256 reads, uint256 paid); + event ReadsNotSent(uint256 indexed jobId, bytes reason); + event ReadAnswered( + uint256 indexed jobId, uint8 indexed read, uint256 requestId, uint64 height, bool ok, int256 value + ); + event Verified(uint256 indexed jobId, Verdict verdict, OwnerCheck ownerCheck, bytes32 reason); + event SettleFailed(uint256 indexed jobId, bytes reason); + event PrepaidRefunded(uint256 indexed jobId, address indexed to, uint256 amount); + event FeesSwept(address indexed to, uint256 amount); + + /// @notice Gas for one decode, run as a capped self-call so a bad answer can't consume the callback. + uint256 internal constant DECODE_GAS = 200_000; + /// @notice Gas for reading the AGW's checkpoint counter. + uint256 internal constant CHECKPOINT_GAS = 30_000; + + // ───────── configuration, written once in the constructor ───────── + // Plain storage rather than `immutable`: Solidity copies an immutable into the bytecode at every use, which + // costs about 1.5 KB here, against EIP-170. Nothing writes these after the constructor (no setter, and the + // contract is not upgradeable), so they are as fixed as immutables. + + IAgenticCommerce public KERNEL; + address public HOOK; + IUniversalCallback public READ_STATE; + IUniversalCoreHeights public UNIVERSAL_CORE; + /// @notice Receives the evaluator's share of job fees, if the kernel admin sets one. + address public FEE_RECIPIENT; + /// @notice See `ReadConfig`. + uint64 public READ_TTL; + uint64 public CALLBACK_GAS_LIMIT; + uint64 public SNAPSHOT_CALLBACK_GAS_LIMIT; + uint256 public BUDGET_MULTIPLIER; + uint256 public MAX_HEIGHT_AGE; + uint16 public MAX_CONFIRMATIONS; + + // ───────── storage ───────── + + /// @notice Unspent PC prepaid for a job's reads (snapshot and evaluation). + mapping(uint256 => uint256) public prepaidOf; + /// @dev The job's spec, when it is not the createJob description: a replacement before `fund`, the frozen spec + /// after. Empty means the description (the hook never stores an empty one; freezing the description clears it). + mapping(uint256 => bytes) internal _replacement; + mapping(uint256 => JobCache) internal _cache; + mapping(uint256 => ReadPlan[]) internal _plans; + mapping(uint256 => PackedCheck[]) internal _checks; + mapping(uint256 => uint256[]) internal _packedLogic; // JobSpecLib.packLogic + mapping(uint256 => Snapshot) internal _snapshots; + mapping(uint256 => uint256[8]) internal _fundHeights; // every read's tracked height at fund, 4 uint64 per word + mapping(uint256 => Evaluation) internal _evals; + // Per read, PRE or POST alike: a PRE read's snapshot, a POST read's latest answer. + mapping(uint256 => mapping(uint256 => Answer)) internal _answers; // jobId => read => value + mapping(uint256 => mapping(uint256 => uint256)) internal _request; // jobId => read => current request + mapping(uint256 => mapping(uint256 => bytes32)) internal _leaf; // jobId => read => evidence of its answer + mapping(uint256 => uint256[8]) internal _endHeights; // POST reads only, 4 uint64 per word + mapping(uint256 => RequestRef) internal _requests; + + /// @dev `HOOK` is fixed here, for good: every later hook change must be an upgrade of that same proxy, since a + /// hook deployed at another address can't call this evaluator. The hook needs this address at its + /// `initialize`, so the two are deployed together: predict this address, deploy the hook proxy with it, then + /// deploy this (`scripts/agentic-commerce-8183`). + constructor( + address kernel_, + address hook_, + address readState_, + address universalCore_, + address feeRecipient_, + ReadConfig memory config_ + ) { + if ( + kernel_ == address(0) || hook_ == address(0) || readState_ == address(0) || universalCore_ == address(0) + || feeRecipient_ == address(0) + ) revert UniversalEvaluatorErrors.ZeroValue(); + if ( + config_.readTtl == 0 || config_.callbackGasLimit == 0 || config_.callbackGasLimit > MAX_CALLBACK_GAS_LIMIT + || config_.snapshotCallbackGasLimit == 0 || config_.snapshotCallbackGasLimit > MAX_CALLBACK_GAS_LIMIT + || config_.budgetMultiplier == 0 || config_.maxHeightAge == 0 || config_.maxConfirmations == 0 + ) revert UniversalEvaluatorErrors.ZeroValue(); + KERNEL = IAgenticCommerce(kernel_); + HOOK = hook_; + READ_STATE = IUniversalCallback(readState_); + UNIVERSAL_CORE = IUniversalCoreHeights(universalCore_); + FEE_RECIPIENT = feeRecipient_; + READ_TTL = config_.readTtl; + CALLBACK_GAS_LIMIT = config_.callbackGasLimit; + SNAPSHOT_CALLBACK_GAS_LIMIT = config_.snapshotCallbackGasLimit; + BUDGET_MULTIPLIER = config_.budgetMultiplier; + MAX_HEIGHT_AGE = config_.maxHeightAge; + MAX_CONFIRMATIONS = config_.maxConfirmations; + } + + modifier onlyHook() { + _requireHook(); + _; + } + + /// @dev The modifier's check as one function, so it isn't copied into each hook-facing function. + function _requireHook() private view { + if (msg.sender != HOOK) revert UniversalEvaluatorErrors.CallerIsNotHook(msg.sender); + } + + // ═════════════════════════════════ hook-facing (IUniversalEvaluator) ═════════════════════════════════ + + /// @inheritdoc IUniversalEvaluator + function setSpec(uint256 jobId, bytes calldata spec) external onlyHook { + if (_cache[jobId].frozen) revert UniversalEvaluatorErrors.SpecFrozen(jobId); + if (spec.length > MAX_DESCRIPTION_LENGTH) revert JobSpecErrors.SpecTooLong(spec.length); + _replacement[jobId] = spec; // the hook emits SpecReplaced + } + + /// @inheritdoc IUniversalEvaluator + function currentSpec(uint256 jobId) external view returns (bytes memory) { + return _replacement[jobId]; + } + + /// @inheritdoc IUniversalEvaluator + /// @dev Inside `afterAction(fund)`: a revert here reverts the funding. Checks the spec, freezes it, records the + /// wallet's checkpoint (the AGW ticks it before each owner call, so this includes the funding call) and + /// sends the snapshot reads from the job's prepaid PC. + function startSnapshot(uint256 jobId, bytes calldata spec) external onlyHook { + IAgenticCommerce.Job memory job = KERNEL.getJob(jobId); + if (job.evaluator != address(this) || job.hook != HOOK) revert UniversalEvaluatorErrors.NotOurJob(jobId); + if (job.status != IAgenticCommerce.JobStatus.Funded) revert UniversalEvaluatorErrors.WrongStatus(jobId); + JobCache storage c = _cache[jobId]; + if (c.frozen) revert UniversalEvaluatorErrors.SpecFrozen(jobId); + if (spec.length > MAX_DESCRIPTION_LENGTH) revert JobSpecErrors.SpecTooLong(spec.length); + + JobSpec memory s = _decodeSpec(spec); // reverts if `spec` is not an encoded JobSpec + JobSpecLib.validate(s, MAX_CONFIRMATIONS); // reverts with the JobSpecErrors reason + + bytes32 specHash = keccak256(spec); + if (specHash == keccak256(bytes(job.description))) delete _replacement[jobId]; + else _replacement[jobId] = spec; // the frozen bytes, whoever replaced them + + (bool cpOk, uint64 cp) = _readCheckpoint(job.client); + c.client = job.client; + c.frozen = true; + c.checkpointOk = cpOk; + c.checkpointAtFund = cp; + c.specHash = specHash; + _cacheSpec(jobId, s); + emit SpecFrozenHere(jobId, specHash, cpOk ? OwnerCheck.CLEAN : OwnerCheck.UNKNOWN, cp); + + Snapshot storage sn = _snapshots[jobId]; + for (uint256 i; i < s.reads.length; ++i) { + Read memory r = s.reads[i]; + // Preflight only: Read State's admin can still block the domain after `fund`. + if (IReadStateDomains(address(READ_STATE)).isDomainBlocked(r.chainNamespace, r.chainId)) { + revert UniversalEvaluatorErrors.ReadDomainBlocked(i); + } + uint64 h = EvmReadLib.latestHeight(UNIVERSAL_CORE, r, MAX_HEIGHT_AGE); + _setHeight(_fundHeights[jobId], i, h); // a PRE read's block; a POST read's end block must be above it + if (r.at == ReadAt.PRE_EXECUTION) { + // forge-lint: disable-next-line(unsafe-typecast) + sn.pre |= uint32(1 << i); // safe: i < MAX_READS (32) + ++sn.needed; // answers come in later transactions, so counting as we fire is safe + _fireSnapshot(jobId, i, r, h); + } + } + if (sn.needed == 0) emit SnapshotReady(jobId); + } + + /// @inheritdoc IUniversalEvaluator + /// @dev Inside `afterAction(submit)`, called without try/catch: if the end blocks can't be fixed, `submit` reverts. + /// Fixes every read's end block first, then tries to send the reads in a separate guarded call, so a failure + /// to send (PC short, snapshot not ready, Read State paused) keeps the blocks and `submit` still succeeds. + function verifyFromSubmit(uint256 jobId) external onlyHook { + IAgenticCommerce.Job memory job = KERNEL.getJob(jobId); + if (job.status != IAgenticCommerce.JobStatus.Submitted) revert UniversalEvaluatorErrors.WrongStatus(jobId); + if (!_cache[jobId].frozen) revert UniversalEvaluatorErrors.WrongStatus(jobId); + JobSpec memory s = _frozenSpec(jobId, job.description); + _fixEndBlocks(jobId, s); + try this.sendFromSubmit(jobId) {} + catch (bytes memory err) { + emit ReadsNotSent(jobId, err); + } + } + + /// @notice The second half of `verifyFromSubmit`, as its own call so a failure doesn't undo the fixed blocks. + function sendFromSubmit(uint256 jobId) external { + if (msg.sender != address(this)) revert UniversalEvaluatorErrors.CallerIsNotSelf(msg.sender); + IAgenticCommerce.Job memory job = KERNEL.getJob(jobId); + _start(jobId, _frozenSpec(jobId, job.description)); + } + + // ═════════════════════════════════ PC ═════════════════════════════════ + + /// @notice Prepays PC for a job's reads, snapshot and evaluation. The AGW calls it in the funding batch. + /// @dev Anyone may add PC; whatever is unspent goes back to the job's client through `claimPrepaid`. + function prefund(uint256 jobId) external payable { + if (jobId == 0 || jobId > KERNEL.jobCounter()) revert UniversalEvaluatorErrors.UnknownJob(jobId); + _addPrepaid(jobId); + } + + /// @notice What the job's reads cost at current fees, for the spec as it stands (replacement or description). + /// Prepay at least the sum, with headroom: fees and the base fee can move, and retries cost again. + function prefundCost(uint256 jobId) external view returns (uint256 snapshot, uint256 evaluation) { + bytes memory spec = _replacement[jobId]; + if (spec.length == 0) spec = bytes(KERNEL.getJob(jobId).description); + JobSpec memory s = _decodeSpec(spec); + for (uint256 i; i < s.reads.length; ++i) { + bool pre = s.reads[i].at == ReadAt.PRE_EXECUTION; + uint256 p = EvmReadLib.price( + READ_STATE, s.reads[i], pre ? SNAPSHOT_CALLBACK_GAS_LIMIT : CALLBACK_GAS_LIMIT, BUDGET_MULTIPLIER + ); + if (pre) snapshot += p; + else evaluation += p; + } + } + + /// @notice Sends the job's unspent PC to its client once the job is over (Completed, Rejected, Expired), or + /// still Open past its expiry. + function claimPrepaid(uint256 jobId) external nonReentrant { + IAgenticCommerce.Job memory job = KERNEL.getJob(jobId); + if (job.client == address(0)) revert UniversalEvaluatorErrors.UnknownJob(jobId); + IAgenticCommerce.JobStatus st = job.status; + if ( + st == IAgenticCommerce.JobStatus.Funded || st == IAgenticCommerce.JobStatus.Submitted + || (st == IAgenticCommerce.JobStatus.Open && block.timestamp < job.expiredAt) + ) revert UniversalEvaluatorErrors.JobStillLive(jobId); + uint256 amount = prepaidOf[jobId]; + prepaidOf[jobId] = 0; + if (amount == 0) return; + (bool ok,) = job.client.call{value: amount}(""); + if (!ok) revert UniversalEvaluatorErrors.RefundFailed(job.client, amount); + emit PrepaidRefunded(jobId, job.client, amount); + } + + // ═════════════════════════════════ provider / client recovery ═════════════════════════════════ + + /// @notice Sends the job's reads for evaluation: POST reads at the blocks fixed at `submit`, PRE reads again at + /// their `fund` blocks. Provider only, and only while the job is Submitted: once it has ended, its PC is + /// the client's to claim. `msg.value` is added to the job's PC. + /// - If they did not go out inside `submit` (PC short, snapshot not ready, Read State paused): every POST + /// read, and every PRE read with no usable value. + /// - Once sent: every read with no usable answer that is not in flight (an error answer, an undecodable + /// or oversized one, an expired request, a failed callback). There is no attempt limit. + /// @dev Never fixes the blocks, so the provider can't choose when the job is measured. + function sendReads(uint256 jobId) external payable nonReentrant { + IAgenticCommerce.Job memory job = KERNEL.getJob(jobId); + if (msg.sender != job.provider) revert UniversalEvaluatorErrors.CallerIsNotProvider(msg.sender); + if (job.status != IAgenticCommerce.JobStatus.Submitted) revert UniversalEvaluatorErrors.WrongStatus(jobId); + Evaluation storage e = _evals[jobId]; + if (!e.endFixed) revert UniversalEvaluatorErrors.EndBlocksNotFixed(jobId); + if (e.done && e.verdict != Verdict.INCONCLUSIVE) revert UniversalEvaluatorErrors.NothingToSend(jobId); + _addPrepaid(jobId); + JobSpec memory s = _frozenSpec(jobId, job.description); + if (e.started) _sendMissing(jobId, s); + else _start(jobId, s); + } + + /// @notice Sends again, at the same blocks, every PRE read never answered and not in flight (an expired request, a + /// failed callback). The job's client or provider only, until the evaluation starts; after that, `sendReads`. + /// @dev Never takes back an answer, usable or not, so neither side can hold `ready` back; the evaluation itself + /// re-reads an unreadable PRE answer. + function retrySnapshot(uint256 jobId) external payable nonReentrant { + IAgenticCommerce.Job memory job = KERNEL.getJob(jobId); + if (msg.sender != job.client && msg.sender != job.provider) { + revert UniversalEvaluatorErrors.CallerIsNotClientOrProvider(msg.sender); + } + if (!_cache[jobId].frozen || _evals[jobId].started) revert UniversalEvaluatorErrors.NothingToSend(jobId); + if (job.status != IAgenticCommerce.JobStatus.Funded && job.status != IAgenticCommerce.JobStatus.Submitted) { + revert UniversalEvaluatorErrors.WrongStatus(jobId); + } + _addPrepaid(jobId); + JobSpec memory s = _frozenSpec(jobId, job.description); + Snapshot storage sn = _snapshots[jobId]; + uint256 sent; + for (uint256 i; i < s.reads.length; ++i) { + if ((sn.pre >> i) & 1 == 0 || (sn.answered >> i) & 1 == 1) continue; // never take back an answer + if (READ_STATE.statusOf(_request[jobId][i]) == RequestStatus.PENDING) continue; + _fireSnapshot(jobId, i, s.reads[i], _height(_fundHeights[jobId], i)); + ++sent; + } + if (sent == 0) revert UniversalEvaluatorErrors.NothingToSend(jobId); + } + + /// @notice Applies a PASS or FAIL verdict the kernel refused inside the callback, e.g. while it was paused. + function settle(uint256 jobId) external nonReentrant { + Evaluation storage e = _evals[jobId]; + if (!e.done || e.applied || (e.verdict != Verdict.PASS && e.verdict != Verdict.FAIL)) { + revert UniversalEvaluatorErrors.NothingToSettle(jobId); + } + (bool ok, bytes memory err) = _apply(jobId, e.verdict, _reason(jobId, e.verdict, e.ownerCheck)); + if (!ok) { + assembly ("memory-safe") { + revert(add(err, 32), mload(err)) // the kernel's own revert + } + } + } + + /// @notice Sends the evaluator's share of job fees (paid by the kernel on `complete`) to `FEE_RECIPIENT`. + function sweepFees() external { + IERC20 token = KERNEL.paymentToken(); + uint256 amount = token.balanceOf(address(this)); + if (amount == 0) return; + token.safeTransfer(FEE_RECIPIENT, amount); + emit FeesSwept(FEE_RECIPIENT, amount); + } + + // ═════════════════════════════════ callback ═════════════════════════════════ + + /// @notice Read State delivers one answer, to a snapshot or an evaluation request. An evaluation answer that + /// decides the root applies the verdict. + /// @dev Never reverts for a known request: bad or oversized answers become "can't tell", and a kernel revert is + /// caught. An answer to a superseded request is ignored. + function onUniversalData(uint256 requestId, bytes calldata result) external { + if (msg.sender != address(READ_STATE)) revert UniversalEvaluatorErrors.CallerIsNotReadState(msg.sender); + RequestRef memory q = _requests[requestId]; + if (q.jobId == 0) return; + delete _requests[requestId]; + if (q.snapshot) _onSnapshot(q.jobId, q.read, requestId, result); + else _onAnswer(q.jobId, q.read, requestId, result); + } + + /// @dev Usable or not, the answer completes this read's part of the snapshot. + function _onSnapshot(uint256 jobId, uint8 read, uint256 requestId, bytes calldata result) internal { + Snapshot storage sn = _snapshots[jobId]; + if (_request[jobId][read] != requestId || (sn.answered >> read) & 1 == 1) return; + (bool ok, int256 value) = _record(jobId, read, requestId, _height(_fundHeights[jobId], read), result); + sn.answered |= uint32(1) << read; + emit SnapshotAnswered(jobId, read, requestId, ok, value); + if (sn.answered == sn.pre) emit SnapshotReady(jobId); + } + + function _onAnswer(uint256 jobId, uint8 read, uint256 requestId, bytes calldata result) internal { + if (_request[jobId][read] != requestId) return; // superseded by a retry + Evaluation storage e = _evals[jobId]; + if (e.done || (e.answered >> read) & 1 == 1) return; + + uint64 height = _blockOf(jobId, read); + (bool ok, int256 value) = _record(jobId, read, requestId, height, result); + e.answered |= uint32(1) << read; + emit ReadAnswered(jobId, read, requestId, height, ok, value); + + // Judge now every check that uses this read; one still missing a usable value stays UNKNOWN (0). + if (ok) e.checkRes = _judgeRead(jobId, read, e.checkRes); + --e.pending; + + // The logic is monotone: once the root is PASS or FAIL no later answer can change it, so apply it now. + // An unreadable answer changes no check, so only a usable one can decide the root. + if (ok || e.pending == 0) { + Verdict v = JobSpecLib.verdictPacked(_packedLogic[jobId], _cache[jobId].logicCount, e.checkRes); + if (v != Verdict.INCONCLUSIVE || e.pending == 0) _finish(jobId, v); + } + } + + // ═════════════════════════════════ views ═════════════════════════════════ + + /// @notice The number to compare, from one answer. Pure; the evaluator calls it on itself with a gas cap. + function decodeAnswer(bytes calldata outputs, uint8[] calldata field, bytes calldata res) + external + pure + returns (bool, int256) + { + return EvmReadLib.decode(outputs, field, res); + } + + function evaluationOf(uint256 jobId) external view returns (Evaluation memory) { + return _evals[jobId]; + } + + /// @notice keccak256 of the frozen spec; zero until `fund` freezes it. + function specHashOf(uint256 jobId) external view returns (bytes32) { + return _cache[jobId].specHash; + } + + /// @notice True once the spec is frozen and every PRE_EXECUTION read is answered, usable or not (`answerOf`). + function ready(uint256 jobId) public view returns (bool) { + Snapshot storage sn = _snapshots[jobId]; + return _cache[jobId].frozen && sn.answered == sn.pre; + } + + /// @notice A read's value: a PRE read's snapshot, a POST read's latest answer. + function answerOf(uint256 jobId, uint256 read) external view returns (bool ok, int256 value) { + Answer memory a = _answers[jobId][read]; + return (a.ok, a.value); + } + + /// @notice The read's tracked height recorded at `fund`; a PRE_EXECUTION read is read at this block. + function fundHeightOf(uint256 jobId, uint256 read) external view returns (uint64) { + return _height(_fundHeights[jobId], read); + } + + function endHeightOf(uint256 jobId, uint256 read) external view returns (uint64) { + return _height(_endHeights[jobId], read); + } + + function requestOf(uint256 jobId, uint256 read) external view returns (uint256) { + return _request[jobId][read]; + } + + /// @notice The evidence of one read's latest answer: keccak256(read, request, block, raw answer hash, ok, value). + function evidenceOf(uint256 jobId, uint256 read) external view returns (bytes32) { + return _leaf[jobId][read]; + } + + // ═════════════════════════════════ internal ═════════════════════════════════ + + /// @dev Specs are checked by `JobSpecLib.validate` when frozen, so decoding a frozen spec never fails. + function _decodeSpec(bytes memory spec) internal pure returns (JobSpec memory) { + return abi.decode(spec, (JobSpec)); + } + + /// @dev The frozen spec: the stored replacement, or the createJob description. + function _frozenSpec(uint256 jobId, string memory description) internal view returns (JobSpec memory) { + bytes memory spec = _replacement[jobId]; + return _decodeSpec(spec.length == 0 ? bytes(description) : spec); + } + + /// @dev Decode plans, checks, which checks each read feeds, and the packed tree, so callbacks never decode. + function _cacheSpec(uint256 jobId, JobSpec memory s) internal { + ReadPlan[] storage plans = _plans[jobId]; + for (uint256 i; i < s.reads.length; ++i) { + plans.push(); + ReadPlan storage p = plans[i]; + p.outputs = s.reads[i].outputs; + p.field = s.reads[i].field; + } + JobCache storage c = _cache[jobId]; + PackedCheck[] storage checks = _checks[jobId]; + for (uint256 i; i < s.checks.length; ++i) { + Check memory chk = s.checks[i]; + uint32 left = JobSpecLib.packSide(chk.left); + uint32 right = JobSpecLib.packSide(chk.right); + checks.push( + PackedCheck({ + left: left, right: right, evaluation: chk.evaluation, operation: chk.operation, target: chk.target + }) + ); + uint256 reads = left | right; + for (uint256 r; reads != 0; ++r) { + if (reads & 1 != 0) _markCheck(c, r, i); + reads >>= 1; + } + } + _packedLogic[jobId] = JobSpecLib.packLogic(s.logic); + // forge-lint: disable-next-line(unsafe-typecast) + c.logicCount = uint8(s.logic.length); // safe: JobSpecLib caps logic at MAX_LOGIC (32) + } + + function _markCheck(JobCache storage c, uint256 read, uint256 check) internal { + c.readChecks[read / 16] |= uint256(1) << (16 * (read % 16) + check); + } + + /// @dev Each POST read's end block is its fresh tracked height, strictly above the one recorded at `fund`. + /// - A floor, not a proof of work: a height that has not moved since `fund` can't include the provider's + /// work, but one that has moved may still be below the block the work landed in. The provider (SDK) must + /// submit only once each tracked height covers that block; a too-early `submit` reads pre-work state. + /// - Applies to every POST read's chain, including one the provider did not act on, so `submit` waits until + /// each tracked height has moved on and is fresh. An intended liveness requirement. + function _fixEndBlocks(uint256 jobId, JobSpec memory s) internal { + Evaluation storage e = _evals[jobId]; + if (e.endFixed) return; + uint256[8] storage heights = _endHeights[jobId]; + uint256[8] storage atFund = _fundHeights[jobId]; + uint32 pre = _snapshots[jobId].pre; + for (uint256 i; i < s.reads.length; ++i) { + if ((pre >> i) & 1 == 1) continue; // a PRE read has no end block + uint64 h = EvmReadLib.latestHeight(UNIVERSAL_CORE, s.reads[i], MAX_HEIGHT_AGE); + uint64 f = _height(atFund, i); + if (h <= f) revert UniversalEvaluatorErrors.EndHeightNotAfterFund(jobId, i, f, h); + _setHeight(heights, i, h); + } + e.endFixed = true; + emit EndBlocksFixed(jobId); + } + + /// @dev Starts the evaluation: judges the checks on PRE values alone, then sends every POST read at its end block + /// and every unreadable PRE read again at its `fund` block. Needs every PRE read answered. + function _start(uint256 jobId, JobSpec memory s) internal { + if (!ready(jobId)) revert UniversalEvaluatorErrors.SnapshotNotReady(jobId); + Evaluation storage e = _evals[jobId]; + Snapshot storage sn = _snapshots[jobId]; + e.started = true; + // forge-lint: disable-next-line(unsafe-typecast) + e.reads = uint8(s.reads.length); // safe: JobSpecLib caps reads at MAX_READS (32) + // forge-lint: disable-next-line(unsafe-typecast) + e.pending = uint8(s.reads.length - sn.needed); // the POST reads; safe: as above + e.answered = sn.pre; + uint32 res; + for (uint256 i; i < s.checks.length; ++i) { + res = _judge(jobId, i, _checks[jobId][i], res); // a check needing a POST value stays UNKNOWN + } + e.checkRes = res; + _sendMissing(jobId, s); + } + + /// @dev Sends, at its block, every read with no usable answer that is not in flight, and reopens the verdict. On + /// the first send that is every POST read and every unreadable PRE read. + function _sendMissing(uint256 jobId, JobSpec memory s) internal { + Evaluation storage e = _evals[jobId]; + uint256 sent; + uint256 paid; + for (uint256 i; i < e.reads; ++i) { + bool answered = (e.answered >> i) & 1 == 1; + if (answered && _answers[jobId][i].ok) continue; + uint256 req = _request[jobId][i]; + if (req != 0 && READ_STATE.statusOf(req) == RequestStatus.PENDING) continue; + if (answered) { + // forge-lint: disable-next-line(unsafe-typecast) + e.answered = uint32(uint256(e.answered) & ~(uint256(1) << i)); // safe: clears one bit of a uint32 + ++e.pending; // it had been counted as answered + } + paid += _fireRead(jobId, i, s.reads[i]); + ++sent; + } + if (sent == 0) revert UniversalEvaluatorErrors.NothingToSend(jobId); + e.done = false; + e.verdict = Verdict.NONE; + emit ReadsSent(jobId, sent, paid); + } + + function _fireRead(uint256 jobId, uint256 read, Read memory r) internal returns (uint256 value) { + value = _spend(jobId, EvmReadLib.price(READ_STATE, r, CALLBACK_GAS_LIMIT, BUDGET_MULTIPLIER)); + uint256 requestId = _fire(r, _blockOf(jobId, read), value, CALLBACK_GAS_LIMIT, READ_TTL, jobId); + _request[jobId][read] = requestId; + // forge-lint: disable-next-line(unsafe-typecast) + _requests[requestId] = RequestRef({jobId: jobId, read: uint8(read), snapshot: false}); // safe: read < 32 + } + + function _fireSnapshot(uint256 jobId, uint256 read, Read memory r, uint64 height) internal { + uint256 value = _spend(jobId, EvmReadLib.price(READ_STATE, r, SNAPSHOT_CALLBACK_GAS_LIMIT, BUDGET_MULTIPLIER)); + uint256 requestId = _fire(r, height, value, SNAPSHOT_CALLBACK_GAS_LIMIT, READ_TTL, jobId); + _request[jobId][read] = requestId; + // forge-lint: disable-next-line(unsafe-typecast) + _requests[requestId] = RequestRef({jobId: jobId, read: uint8(read), snapshot: true}); // safe: read < 32 + // forge-lint: disable-next-line(unsafe-typecast) + emit SnapshotRequested(jobId, uint8(read), requestId, height); // safe: as above + } + + function _fire(Read memory r, uint64 height, uint256 value, uint64 gasLimit, uint64 ttl, uint256 jobId) + internal + returns (uint256) + { + address client = _cache[jobId].client; + return EvmReadLib.fire( + READ_STATE, + r, + FireParams({ + owner: client, + height: height, + value: value, + ttl: ttl, + revertRecipient: client, // unspent callback budget goes back to the client + callbackSelector: this.onUniversalData.selector, + callbackGasLimit: gasLimit + }) + ); + } + + function _spend(uint256 jobId, uint256 value) internal returns (uint256) { + uint256 available = prepaidOf[jobId]; + if (available < value) revert UniversalEvaluatorErrors.PrepaidTooLow(value, available); + prepaidOf[jobId] = available - value; + return value; + } + + function _addPrepaid(uint256 jobId) internal { + if (msg.value == 0) return; + prepaidOf[jobId] += msg.value; + emit Prefunded(jobId, msg.sender, msg.value); + } + + /// @dev Stores a read's answer, usable or not, and its evidence. + function _record(uint256 jobId, uint8 read, uint256 requestId, uint64 height, bytes calldata result) + internal + returns (bool ok, int256 value) + { + bytes32 resultHash; + (ok, value, resultHash) = _decodeResult(jobId, read, result); + _answers[jobId][read] = Answer({ok: ok, value: value}); + _leaf[jobId][read] = keccak256(abi.encode(read, requestId, height, resultHash, ok, value)); + } + + /// @dev The block a read is read at: a PRE read's recorded at `fund`, a POST read's fixed at `submit`. + function _blockOf(uint256 jobId, uint256 read) internal view returns (uint64) { + bool pre = (_snapshots[jobId].pre >> read) & 1 == 1; + return _height(pre ? _fundHeights[jobId] : _endHeights[jobId], read); + } + + /// @dev Caps, then decodes. Oversized answers are unreadable and are not hashed (the hash would copy them). + function _decodeResult(uint256 jobId, uint256 read, bytes calldata result) + internal + view + returns (bool ok, int256 value, bytes32 resultHash) + { + if (result.length > MAX_RESULT_LENGTH) return (false, 0, bytes32(0)); + resultHash = keccak256(result); + ReadPlan storage plan = _plans[jobId][read]; + try this.decodeAnswer{gas: DECODE_GAS}(plan.outputs, plan.field, result) returns (bool k, int256 v) { + (ok, value) = (k, v); + } catch {} + } + + /// @dev Judges every check that uses `read`. + function _judgeRead(uint256 jobId, uint256 read, uint32 checkRes) internal view returns (uint32) { + uint256 mask = (_cache[jobId].readChecks[read / 16] >> (16 * (read % 16))) & type(uint16).max; + for (uint256 i; mask != 0; ++i) { + if (mask & 1 != 0) checkRes = _judge(jobId, i, _checks[jobId][i], checkRes); + mask >>= 1; + } + return checkRes; + } + + /// @dev Sets check `i`'s result from the values in so far; a missing or unreadable one leaves it UNKNOWN. + function _judge(uint256 jobId, uint256 i, PackedCheck memory chk, uint32 checkRes) internal view returns (uint32) { + Answer memory b; + if (chk.right != 0) b = _sum(jobId, chk.right); + return JobSpecLib.setCheck( + checkRes, i, JobSpecLib.checkResult(chk.evaluation, chk.operation, chk.target, _sum(jobId, chk.left), b) + ); + } + + /// @dev The sum of the reads in `mask`: not ok if any is missing or unreadable, or the sum overflows. + function _sum(uint256 jobId, uint256 mask) internal view returns (Answer memory total) { + total.ok = true; + for (uint256 r; mask != 0; ++r) { + if (mask & 1 != 0) { + Answer storage v = _answers[jobId][r]; + if (!v.ok) return Answer({ok: false, value: 0}); + (total.ok, total.value) = JobSpecLib.add(total.value, v.value); + if (!total.ok) return total; + } + mask >>= 1; + } + } + + /// @dev Records the verdict `v` (worked out from the per-check results), then tries to apply PASS or FAIL on the + /// kernel. + function _finish(uint256 jobId, Verdict v) internal { + Evaluation storage e = _evals[jobId]; + e.done = true; + e.verdict = v; + OwnerCheck oc = _ownerCheck(jobId); + e.ownerCheck = oc; + bytes32 reason = _reason(jobId, v, oc); + emit Verified(jobId, v, oc, reason); + + if (v == Verdict.INCONCLUSIVE) return; // the provider retries; otherwise the job ends through the kernel + (bool ok, bytes memory err) = _apply(jobId, v, reason); + if (!ok) emit SettleFailed(jobId, err); // anyone can `settle` later + } + + /// @dev PASS completes the job, FAIL rejects it. Returns the kernel's revert data if it refused. + function _apply(uint256 jobId, Verdict v, bytes32 reason) internal returns (bool ok, bytes memory err) { + bytes4 action = v == Verdict.PASS ? IAgenticCommerce.complete.selector : IAgenticCommerce.reject.selector; + (ok, err) = address(KERNEL).call(abi.encodeWithSelector(action, jobId, reason, bytes(""))); + if (ok) _evals[jobId].applied = true; // the kernel emits JobCompleted / JobRejected + } + + /// @dev Recorded, not acted on. UNKNOWN when either read of the wallet's counter failed. + function _ownerCheck(uint256 jobId) internal view returns (OwnerCheck) { + JobCache storage c = _cache[jobId]; + if (!c.checkpointOk) return OwnerCheck.UNKNOWN; + (bool ok, uint64 nowCount) = _readCheckpoint(c.client); + if (!ok) return OwnerCheck.UNKNOWN; + return nowCount == c.checkpointAtFund ? OwnerCheck.CLEAN : OwnerCheck.TOUCHED; + } + + /// @dev A raw, gas-capped staticcall, so a wallet without the counter is "unknown" instead of a revert. + function _readCheckpoint(address wallet) internal view returns (bool, uint64) { + (bool ok, bytes memory ret) = + wallet.staticcall{gas: CHECKPOINT_GAS}(abi.encodeCall(IAGWCheckpoints.checkpointCount, ())); + if (!ok || ret.length < 32) return (false, 0); + uint256 v = abi.decode(ret, (uint256)); + if (v > type(uint64).max) return (false, 0); + // forge-lint: disable-next-line(unsafe-typecast) + return (true, uint64(v)); // safe: checked on the line above + } + + /// @dev The kernel `reason`: the job, the exact frozen spec, every read's evidence in index order, the verdict + /// and the owner check. Independent of the order answers arrived in. + function _reason(uint256 jobId, Verdict v, OwnerCheck oc) internal view returns (bytes32) { + uint256 n = _evals[jobId].reads; + bytes32[] memory leaves = new bytes32[](n); + for (uint256 i; i < n; ++i) { + leaves[i] = _leaf[jobId][i]; + } + return keccak256(abi.encode(jobId, _cache[jobId].specHash, leaves, v, oc)); + } + + function _setHeight(uint256[8] storage heights, uint256 read, uint64 h) internal { + uint256 shift = 64 * (read % 4); + heights[read / 4] = (heights[read / 4] & ~(uint256(type(uint64).max) << shift)) | (uint256(h) << shift); + } + + function _height(uint256[8] storage heights, uint256 read) internal view returns (uint64) { + // forge-lint: disable-next-line(unsafe-typecast) + return uint64(heights[read / 4] >> (64 * (read % 4))); // safe: masked to 64 bits by the cast + } +} diff --git a/plan/marketplace/research/2026-10-20/evaluator-source-manifest.json b/plan/marketplace/research/2026-10-20/evaluator-source-manifest.json new file mode 100644 index 00000000..c086882c --- /dev/null +++ b/plan/marketplace/research/2026-10-20/evaluator-source-manifest.json @@ -0,0 +1,14 @@ +{ + "source_commit": "8059817591cca16c59f1cc154f475f51e1736a67", + "authority": "comparison source linked in Nilesh Oct16 comment; not a deployed v2 dependency", + "files": [ + { + "file": "research/2026-10-20/evaluator-8059817/JobSpecTypes.sol", + "sha256": "dad44d25e1793c5c9303eb1d38b27de61472ba8aa749b487cd7e5b3039c3d363" + }, + { + "file": "research/2026-10-20/evaluator-8059817/UniversalEvaluator.sol", + "sha256": "efb2f1a4045e3be2101c92ba47e192adafa0478a86897d80a5041505e0a3e98a" + } + ] +} diff --git a/plan/marketplace/research/2026-10-20/evidence-archives.json b/plan/marketplace/research/2026-10-20/evidence-archives.json new file mode 100644 index 00000000..a1fe86a4 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/evidence-archives.json @@ -0,0 +1,13 @@ +{ + "archives": [ + { + "file": "invariant-tests.log.gz", + "compression": "gzip", + "uncompressed_name": "invariant-tests.log", + "uncompressed_bytes": 45180847, + "uncompressed_sha256": "8352680abe26d8fdbda1c12c5dd003a84b2d91c0320bf9ca4e6471f4b6ca5cdc", + "compressed_bytes": 4466951, + "sha256": "dec8bc21a83014b1d5479796ce621ef4f419c3f304be14db82542d0feae2b6b5" + } + ] +} diff --git a/plan/marketplace/research/2026-10-20/final-source-recheck.json b/plan/marketplace/research/2026-10-20/final-source-recheck.json new file mode 100644 index 00000000..16f18860 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/final-source-recheck.json @@ -0,0 +1,6 @@ +{ + "checked_at": "2026-10-20T10:03:15.266171+00:00", + "branch": "sdk-iteration-v1", + "head": "443b4e2dd9ca5dd9ffc8efebdfcecd619dd66c47", + "matches_reviewed_pin": true +} diff --git a/plan/marketplace/research/2026-10-20/fork-tests-summary.json b/plan/marketplace/research/2026-10-20/fork-tests-summary.json new file mode 100644 index 00000000..d07ced50 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/fork-tests-summary.json @@ -0,0 +1,47 @@ +{ + "args": [ + "forge", + "test", + "--root", + "/var/folders/4_/d47r2_4s1wb3x2dvmt2ghp800000gp/T/marketplace-review-443b4e2-_ib864pr", + "--match-path", + "test/8183-tests/*.fork.t.sol", + "--offline", + "--json" + ], + "environment": { + "PUSH_CHAIN_TESTNET_RPC_URL": "https://evm.donut.rpc.push.org/", + "FORK_BLOCK": "24447347" + }, + "exit_code": 0, + "seconds": 41.36, + "counts": { + "Success": 2 + }, + "tests": [ + { + "suite": "test/8183-tests/RulesBindingHook.fork.t.sol:RulesBindingHookForkTest", + "test": "test_fork_mirrorsMatchDeployedAGW()", + "status": "Success", + "reason": null, + "decoded_logs": [], + "kind": { + "Unit": { + "gas": 193974 + } + } + }, + { + "suite": "test/8183-tests/UniversalMarketplace.fork.t.sol:UniversalMarketplaceForkTest", + "test": "test_fork_openJob_realAGWv6()", + "status": "Success", + "reason": null, + "decoded_logs": [], + "kind": { + "Unit": { + "gas": 21035856 + } + } + } + ] +} diff --git a/plan/marketplace/research/2026-10-20/fork-tests.log b/plan/marketplace/research/2026-10-20/fork-tests.log new file mode 100644 index 00000000..c4aaa2b2 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/fork-tests.log @@ -0,0 +1 @@ +{"test/8183-tests/RulesBindingHook.fork.t.sol:RulesBindingHookForkTest":{"duration":"5s 674ms 840µs 667ns","test_results":{"test_fork_mirrorsMatchDeployedAGW()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":193974}},"traces":[],"labeled_addresses":{"0x95906919abef897340abe05fec8c78d9c0658cec":"forkWalletOwner","0x3bd52ac93106ecf372507350a717905f93b74d5a":"nobody"},"duration":"5s 671ms 69µs 41ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/UniversalMarketplace.fork.t.sol:UniversalMarketplaceForkTest":{"duration":"39s 650ms 455µs 333ns","test_results":{"test_fork_openJob_realAGWv6()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":21035856}},"traces":[],"labeled_addresses":{"0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0x540da3418be99da0614998034fcb817e9d8a0644":"forkAdmin","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0x238ec72e0743bd4c21497d4157854dd3a1dd2f0d":"forkRelayer","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0x0bd7513c1db25948b7a05301ec3698f379f4af13":"ceaFactory","0x22aa0d0bcc922d549618bd1ef8253cc8dee5a3cc":"forkProvider","0x15773a5a32018dc9fb19262d7d5f422eadd5d3e9":"forkOwner"},"duration":"39s 645ms 384µs 625ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]}} diff --git a/plan/marketplace/research/2026-10-20/invariant-tests-summary.json b/plan/marketplace/research/2026-10-20/invariant-tests-summary.json new file mode 100644 index 00000000..e28b5c72 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/invariant-tests-summary.json @@ -0,0 +1,520 @@ +{ + "args": [ + "forge", + "test", + "--root", + "/var/folders/4_/d47r2_4s1wb3x2dvmt2ghp800000gp/T/marketplace-review-443b4e2-_ib864pr", + "--match-path", + "test/8183-tests/*.t.sol", + "--match-test", + "invariant_", + "--offline", + "--json" + ], + "environment": { + "FOUNDRY_INVARIANT_RUNS": "64", + "FOUNDRY_INVARIANT_DEPTH": "64" + }, + "exit_code": 0, + "seconds": 51.29, + "counts": { + "Success": 10 + }, + "tests": [ + { + "suite": "test/8183-tests/AgenticCommerce.invariants.t.sol:AgenticCommerceInvariantsTest", + "test": "invariant_balanceCoversEscrow()", + "status": "Success", + "reason": null, + "decoded_logs": [], + "kind": { + "Invariant": { + "runs": 64, + "calls": 4096, + "reverts": 0, + "metrics": { + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.setBudget": { + "calls": 430, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.setFees": { + "calls": 422, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.complete": { + "calls": 381, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.reject": { + "calls": 424, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.setProvider": { + "calls": 398, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.fund": { + "calls": 422, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.submit": { + "calls": 398, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.createJob": { + "calls": 403, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.warp": { + "calls": 395, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.claimRefund": { + "calls": 423, + "reverts": 0, + "discards": 0 + } + }, + "failed_corpus_replays": 0 + } + } + }, + { + "suite": "test/8183-tests/AgenticCommerce.invariants.t.sol:AgenticCommerceInvariantsTest", + "test": "invariant_onlyLegalTransitions()", + "status": "Success", + "reason": null, + "decoded_logs": [], + "kind": { + "Invariant": { + "runs": 64, + "calls": 4096, + "reverts": 0, + "metrics": { + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.warp": { + "calls": 395, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.setProvider": { + "calls": 398, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.setFees": { + "calls": 422, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.submit": { + "calls": 398, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.reject": { + "calls": 424, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.fund": { + "calls": 422, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.setBudget": { + "calls": 430, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.createJob": { + "calls": 403, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.claimRefund": { + "calls": 423, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.complete": { + "calls": 381, + "reverts": 0, + "discards": 0 + } + }, + "failed_corpus_replays": 0 + } + } + }, + { + "suite": "test/8183-tests/AgenticCommerce.invariants.t.sol:AgenticCommerceInvariantsTest", + "test": "invariant_totalEscrowedMatchesLiveBudgets()", + "status": "Success", + "reason": null, + "decoded_logs": [], + "kind": { + "Invariant": { + "runs": 64, + "calls": 4096, + "reverts": 0, + "metrics": { + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.claimRefund": { + "calls": 423, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.submit": { + "calls": 398, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.reject": { + "calls": 424, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.warp": { + "calls": 395, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.createJob": { + "calls": 403, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.fund": { + "calls": 422, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.setProvider": { + "calls": 398, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.setFees": { + "calls": 422, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.complete": { + "calls": 381, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/AgenticCommerce.invariants.t.sol:KernelHandler.setBudget": { + "calls": 430, + "reverts": 0, + "discards": 0 + } + }, + "failed_corpus_replays": 0 + } + } + }, + { + "suite": "test/8183-tests/UniversalMarketplace.invariants.t.sol:UniversalMarketplaceInvariants", + "test": "invariant_MI01_activeJobIsTheAgwsOwnJob()", + "status": "Success", + "reason": null, + "decoded_logs": [], + "kind": { + "Invariant": { + "runs": 64, + "calls": 6400, + "reverts": 0, + "metrics": { + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.update": { + "calls": 1322, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.open": { + "calls": 1290, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.warp": { + "calls": 1246, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.cancel": { + "calls": 1294, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.register": { + "calls": 1248, + "reverts": 0, + "discards": 0 + } + }, + "failed_corpus_replays": 0 + } + } + }, + { + "suite": "test/8183-tests/UniversalMarketplace.invariants.t.sol:UniversalMarketplaceInvariants", + "test": "invariant_MI02_marketplaceHoldsNothing()", + "status": "Success", + "reason": null, + "decoded_logs": [], + "kind": { + "Invariant": { + "runs": 64, + "calls": 6400, + "reverts": 0, + "metrics": { + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.cancel": { + "calls": 1294, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.warp": { + "calls": 1246, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.register": { + "calls": 1248, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.update": { + "calls": 1322, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.open": { + "calls": 1290, + "reverts": 0, + "discards": 0 + } + }, + "failed_corpus_replays": 0 + } + } + }, + { + "suite": "test/8183-tests/UniversalMarketplace.invariants.t.sol:UniversalMarketplaceInvariants", + "test": "invariant_MI03_outcomesExactlyExpected()", + "status": "Success", + "reason": null, + "decoded_logs": [], + "kind": { + "Invariant": { + "runs": 64, + "calls": 6400, + "reverts": 0, + "metrics": { + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.cancel": { + "calls": 1294, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.register": { + "calls": 1248, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.warp": { + "calls": 1246, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.update": { + "calls": 1322, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.open": { + "calls": 1290, + "reverts": 0, + "discards": 0 + } + }, + "failed_corpus_replays": 0 + } + } + }, + { + "suite": "test/8183-tests/UniversalMarketplace.invariants.t.sol:UniversalMarketplaceInvariants", + "test": "invariant_MI04_everyJobIsWellFormed()", + "status": "Success", + "reason": null, + "decoded_logs": [], + "kind": { + "Invariant": { + "runs": 64, + "calls": 6400, + "reverts": 0, + "metrics": { + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.register": { + "calls": 1248, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.update": { + "calls": 1322, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.warp": { + "calls": 1246, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.open": { + "calls": 1290, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.cancel": { + "calls": 1294, + "reverts": 0, + "discards": 0 + } + }, + "failed_corpus_replays": 0 + } + } + }, + { + "suite": "test/8183-tests/UniversalMarketplace.invariants.t.sol:UniversalMarketplaceInvariants", + "test": "invariant_MI05_userBalanceNeverMovedByOpenJob()", + "status": "Success", + "reason": null, + "decoded_logs": [], + "kind": { + "Invariant": { + "runs": 64, + "calls": 6400, + "reverts": 0, + "metrics": { + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.open": { + "calls": 1290, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.register": { + "calls": 1248, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.update": { + "calls": 1322, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.warp": { + "calls": 1246, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.cancel": { + "calls": 1294, + "reverts": 0, + "discards": 0 + } + }, + "failed_corpus_replays": 0 + } + } + }, + { + "suite": "test/8183-tests/UniversalMarketplace.invariants.t.sol:UniversalMarketplaceInvariants", + "test": "invariant_MI06_onePerProvider()", + "status": "Success", + "reason": null, + "decoded_logs": [], + "kind": { + "Invariant": { + "runs": 64, + "calls": 6400, + "reverts": 0, + "metrics": { + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.register": { + "calls": 1248, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.cancel": { + "calls": 1294, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.open": { + "calls": 1290, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.update": { + "calls": 1322, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.warp": { + "calls": 1246, + "reverts": 0, + "discards": 0 + } + }, + "failed_corpus_replays": 0 + } + } + }, + { + "suite": "test/8183-tests/UniversalMarketplace.invariants.t.sol:UniversalMarketplaceInvariants", + "test": "invariant_MI07_principalCapEqualsPrincipal()", + "status": "Success", + "reason": null, + "decoded_logs": [], + "kind": { + "Invariant": { + "runs": 64, + "calls": 6400, + "reverts": 0, + "metrics": { + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.warp": { + "calls": 1246, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.cancel": { + "calls": 1294, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.update": { + "calls": 1322, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.open": { + "calls": 1290, + "reverts": 0, + "discards": 0 + }, + "test/8183-tests/UniversalMarketplace.invariants.t.sol:MarketplaceHandler.register": { + "calls": 1248, + "reverts": 0, + "discards": 0 + } + }, + "failed_corpus_replays": 0 + } + } + } + ] +} diff --git a/plan/marketplace/research/2026-10-20/invariant-tests.log.gz b/plan/marketplace/research/2026-10-20/invariant-tests.log.gz new file mode 100644 index 00000000..959c6b4b Binary files /dev/null and b/plan/marketplace/research/2026-10-20/invariant-tests.log.gz differ diff --git a/plan/marketplace/research/2026-10-20/live-deployment.json b/plan/marketplace/research/2026-10-20/live-deployment.json new file mode 100644 index 00000000..978c2910 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/live-deployment.json @@ -0,0 +1,146 @@ +{ + "observedAt": "2026-10-20T09:47:56.301Z", + "rpc": "https://evm.donut.rpc.push.org/", + "chainId": 42101, + "blockNumber": "24447347", + "addresses": { + "marketplace": "0x9071ebE01B75123A91e88eB6ec4BF163F3fE9BF4", + "kernel": "0x977cf1AC973E9eC4332791d531507575006157Ed", + "hook": "0xDe7A94e510b6C571DE7880d441349689F73A32b3", + "rules": "0x5b98A8E0df5b918DF76cD2BE84bA7995B39dfd44", + "builder": "0x2de1e3F053b0bBa0cE0C6953144534a0b055f59e", + "factory": "0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc", + "engine": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "pUSDC": "0x7A58048036206bB898008b5bBDA85697DB1e5d66", + "evaluator": "0x1afC81396f1bb36F91f74506284952b81e4bd47c" + }, + "components": { + "marketplace": { + "address": "0x9071ebE01B75123A91e88eB6ec4BF163F3fE9BF4", + "codeBytes": 1033, + "codeHash": "0xec110641b71085ab23f3614eca15d149d9cc83dfecbeeea076e140e6c7882b0e", + "implementation": "0xd683545f84698df4341b0031c892c53384ff30be", + "proxyAdmin": "0xb7d9315813fe87a13833871ce673073dd4b8c8af", + "implementationCodeBytes": 22156, + "implementationCodeHash": "0xabad53926791b8ea4089b86e2d7eb11397e6ede4f91deefd123a0369e2839ce3" + }, + "kernel": { + "address": "0x977cf1AC973E9eC4332791d531507575006157Ed", + "codeBytes": 1033, + "codeHash": "0xbc67b4b15b395df23ca79660448955f993ee75c2e9e4650e0c4c6d2f30ce3e89", + "implementation": "0x1d631e9d0e0a7a7423743c3076054c784af8fa40", + "proxyAdmin": "0x5f5ef9dbbc31d59a28626d1f913a35b5b6ea0cb9", + "implementationCodeBytes": 10930, + "implementationCodeHash": "0x97f198ec46563a5906240f99aa9eeaf76d547bb0c79475486dc233bce5d4c1bc" + }, + "pUSDC": { + "address": "0x7A58048036206bB898008b5bBDA85697DB1e5d66", + "codeBytes": 1201, + "codeHash": "0xed2764096d54cbdeccb8952d602675293f894e03faa9ad78e8d135f15cc16ac3" + }, + "factory": { + "address": "0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc", + "codeBytes": 141, + "codeHash": "0x58e6a6553bb3565097e3d3a08dd1e72e339f004ecca9285b569286d8f459c43c" + }, + "rules": { + "address": "0x5b98A8E0df5b918DF76cD2BE84bA7995B39dfd44", + "codeBytes": 7832, + "codeHash": "0x75daf3f6953e873ad056184e9c491487e96882bd3548beca9d4b5700c9c79c1a" + }, + "engine": { + "address": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "codeBytes": 22581, + "codeHash": "0x5fa747bb1b2fb6635dbc22608f86a18a743d6ed9b3f394abf812ee3d4199bdde" + }, + "evaluator": { + "address": "0x1afC81396f1bb36F91f74506284952b81e4bd47c", + "codeBytes": 0, + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" + }, + "builder": { + "address": "0x2de1e3F053b0bBa0cE0C6953144534a0b055f59e", + "codeBytes": 5597, + "codeHash": "0x9f4d23c0b4a3ace3e37841c331fa9b0d639c6684cd94b6e8a03093c3f2fb4de0" + }, + "hook": { + "address": "0xDe7A94e510b6C571DE7880d441349689F73A32b3", + "codeBytes": 1033, + "codeHash": "0x610391ddca2489a14762aaa988da87e8a0dc2398bccfc1cdab75146024bd3611", + "implementation": "0x58bd6951b653b5028aa77b4904e83df668bcef7e", + "proxyAdmin": "0xba96c7fb588ac17aba00c7aa920e282c088b1746", + "implementationCodeBytes": 3477, + "implementationCodeHash": "0x73d02a69e7fb974656b028d41d140d967ae9efa7564af5f49707b43f1445ed12" + } + }, + "getters": { + "marketplace.RULES": "0x5b98A8E0df5b918DF76cD2BE84bA7995B39dfd44", + "marketplace.PUSH_CHAIN_HASH": "0x3d6bc1f1d3fb03065860265a8e93840b586e57075d956cd41b4319d040be87f9", + "marketplace.AGW_FACTORY": "0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc", + "marketplace.OPENJOB_LANE": "3138550867693340381917894711603833208051177722232017256448", + "marketplace.KERNEL": "0x977cf1AC973E9eC4332791d531507575006157Ed", + "marketplace.evaluator": "0x1afC81396f1bb36F91f74506284952b81e4bd47c", + "marketplace.agentCardCount": "0", + "marketplace.hook": "0xDe7A94e510b6C571DE7880d441349689F73A32b3", + "marketplace.version": "2.0.0", + "marketplace.paused": false, + "kernel.paymentToken": "0x7A58048036206bB898008b5bBDA85697DB1e5d66", + "kernel.platformFeeBP": "0", + "hook.SESSION_ENGINE": "0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d", + "hook.KERNEL": "0x977cf1AC973E9eC4332791d531507575006157Ed", + "kernel.MIN_EXPIRY_WINDOW": "300", + "kernel.evaluatorFeeBP": "0", + "hook.AGW_FACTORY": "0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc", + "kernel.jobCounter": "0", + "kernel.paused": false, + "pUSDC.symbol": "USDC.eth", + "kernel.EVALUATOR_GRACE_PERIOD": "3600", + "pUSDC.decimals": 6, + "kernel.whitelistedHooks": true + }, + "chains": [ + { + "chain": "eip155:11155111", + "chainHash": "0xafa90c317deacd3d68f330a30f96e4fa7736e35e8d1426b2e1b2c04bce1c2fb7", + "factory": "0x8ED594A83301FEc545fC6c19fc12cF7111777029", + "implementation": "0x0a4F7be62B56830070266be81114edB93e68DA09", + "cea": "0x33996E73ee53988B4c446457e5f497e9a4B87B0D", + "independentCEA": "0x33996E73ee53988B4c446457e5f497e9a4B87B0D", + "matches": true + }, + { + "chain": "eip155:84532", + "chainHash": "0x8a9a9c58b754a98f1ff302a7ead652cfd23eb36a5791767b5d185067dd9481c2", + "factory": "0x0A75ca7736b488Eb41675ADc3b3156BACF659F55", + "implementation": "0x6c9Cfef12155bEE91ecD6d0C8f516cABA2890656", + "cea": "0xf1981b90F0207135B396F698F33119FaED32e5cF", + "independentCEA": "0xf1981b90F0207135B396F698F33119FaED32e5cF", + "matches": true + }, + { + "chain": "eip155:421614", + "chainHash": "0xf0b5e5225193cfd0cd1b399b5597eb35e33f77deb76267030dc6d28cf2a8d16b", + "factory": "0x88DC189275078Cf509E4Cc773F089c8ad07b7EA2", + "implementation": "0x512d1B8C185a0Fd533a69f8973A3DD6513233009", + "cea": "0xcE8377D906a057fEBBF5c898729B2D31644AFAf2", + "independentCEA": "0xcE8377D906a057fEBBF5c898729B2D31644AFAf2", + "matches": true + }, + { + "chain": "eip155:97", + "chainHash": "0x42a13880db2f2fe1c95fc8d04876a774745355a97dfe8f3397694d11f135eccf", + "factory": "0x3f1B16e0B072d472951C4563d29d3da6a3EE3Ce8", + "implementation": "0x0ff5d8b7d9Ac3ee2Ad420e9b70Ed6Dc465f593e9", + "cea": "0x3223037344F37C1bf32a0d6b13035d55d88F39C7", + "independentCEA": "0x3223037344F37C1bf32a0d6b13035d55d88F39C7", + "matches": true + } + ], + "errors": [], + "sampleWallet": { + "owner": "0x1111111111111111111111111111111111111111", + "index": 0, + "wallet": "0xa932F2f3903379FEcAe7936559543862D4C3AbBa", + "deployed": false + } +} diff --git a/plan/marketplace/research/2026-10-20/notion-discussions.md b/plan/marketplace/research/2026-10-20/notion-discussions.md new file mode 100644 index 00000000..06d693b1 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/notion-discussions.md @@ -0,0 +1,42 @@ +# Notion discussion observations — October 20 + +Read from signed-in Chrome's current **All discussions** panels. These notes are paraphrases, separate from the body-only Markdown export. Dates below are the displayed dates. This is not a full export of resolved/hidden history. No team replies or page edits were made. + +## Page 2 — Universal Marketplace + +- **Zaryab, Oct 16**, attached to M7 owner approvals: AGW v6 can EQ-pin the spender and MAX-cap approve amounts; its change doc explicitly uses an Aave allowance example. Asks Harsh to reconsider the old approval restriction. No resolution is visible in this discussion panel. The newly deployed branch independently implements pinned agent approvals, so page 6's public API still needs alignment. +- **Harsh, Oct 12**, recurring-jobs open item: asks Aman/Zaryab how 7/15-day renewals interact with one-live-job-per-wallet, including a successor slot. **Aman, Oct 13**: ERC-8183 has no renewal concept; renewal must create another job, with sequencing a product/AGW choice. +- **Aman, Oct 13**, Open cancellation: confirms client can reject an Open unfunded kernel job. Does not establish AGW permission cleanup. + +## Page 6 — Marketplace SDK + +- **Harsh, Oct 12**, card enumeration: asks Zaryab to distinguish on-chain count/ID-range/provider lookup from indexer needs and practical scale. No visible answer in that thread. Source now supplies agentCardCount/getAgentCard/agentCardOf; initial enumeration is SDK-owned work. + +## Page 3 — Kernel and hook + +- **Harsh, Oct 12**, fees: assigns client baseline prefund/provider verification costs and platform/external-chain fee research to Aman. **Aman, Oct 15**: client prepays snapshots; provider pays verification; suggests zero kernel platform fee when neither sponsorship nor triggers are supplied, with any additional fee potentially in marketplace. This is a recommendation, not evidence of an implemented marketplace fee. Live kernel fees are zero. +- **Harsh, Oct 12**, renewals: asks Aman/Zaryab to research per-period escrow and occupancy. **Aman, Oct 15**: says initial research will begin. No delivered renewal protocol is established. +- **Harsh, Oct 12**, phase 2: requests EvaluatorGateway planning. **Aman, Oct 13**: says a proposal has already been presented/agreed and no theoretical blockers found; links `3f0188aea7f480169cdcc33375f564a5`. That linked phase-2 proposal was not part of this v1 contract review, and no gateway deployment is inferred. +- **Harsh, Oct 12**, cancellation: asks for hook/narrow-role cleanup so cancellation also releases wallet rules. **Aman, Oct 13**: reject is hookable; direct hook→AGW authority appears missing. Independent review now distinguishes occupancy from permission and proves an owner-batch cleanup path on current v6. Automatic cleanup by a hook still needs its own authority design. + +## Page 7 — Job SDK + +- **Harsh, Oct 12**, verify/retry: asks whether anyone or only provider can rerun verification and for exact function name. **Aman, Oct 15**: refers to Nilesh, notes verifyFromSubmit is currently onlyHook in evaluator revision `4391181a143616bfe16c49be163b663c82cfe58f`, and says ideally anyone may call the retry. +- Later linked evaluator revision `8059817` was read directly: verifyFromSubmit remains onlyHook; public sendReads/retrySnapshot are separate operations. Do not equate a retry desire with a public verifyFromSubmit capability. Live v2 uses neither contract; evaluator is an EOA. + +## Page 4 — Evaluation + +- **Nilesh, Oct 16**, attached to the shared Solidity format: links [JobSpecTypes at `8059817591cca16c59f1cc154f475f51e1736a67`](https://github.com/pushchain/push-chain-core-contracts/blob/8059817591cca16c59f1cc154f475f51e1736a67/src/agentic-commerce-8183/libraries/JobSpecTypes.sol#L48-L77). Adds Read.at (POST/PRE); baseline is explicit in PRE reads; Check.left/right are arrays whose values are summed; MAX_READS grows to 32. Rationale includes protocol totals and cross-chain comparisons. The actual linked file also changes top-level order, Logic/CHECK representation and enum ordinals, beyond what this comment lists. [Comparison](wire-comparison.json). +- **Harsh, Oct 12**, shared wire: says content-first order with origin must be the one imported definition. Also asks Aman/Nilesh to use direct check references rather than CHECK leaf nodes, with common Evaluation/Operation/AllowedMutability vocabulary. Those body decisions are not implemented by the later linked evaluator profile. +- **Harsh, Oct 12**, verify retry: asks for authorization/name; **Aman, Oct 15** says Nilesh can verify the name and anyone can trigger. Current code distinguishes hook trigger and public retries. +- **Harsh, Oct 12**, source kinds: Push-local reads should use direct staticcall; evaluator web2 path is not defined and is future scope. **Aman, Oct 15** acknowledges. +- **Harsh, Oct 12**, fees: asks about evaluator fees/external settlement. **Aman, Oct 15** says current design has the provider pay evaluator invocation via hook or directly, reflected in profitable provider quotes. This remains distinct from client baseline prefunding. +- **Harsh, Oct 12**, recurring jobs: asks what each renewal needs (fresh baseline/spec/rearmed spec). No visible resolved design in this panel. + +## Page 8 — retired placeholder + +Current title is “SDK: Evaluation (retired, placeholder)”, edited Oct 12. The body explicitly retires client.evaluation, moves authoring helpers to utils.job/market and job-side state to client.job. No Comments toolbar button was exposed in this page's current UI. No absence-of-all-historical-comments claim is made. + +## Supplied team message + +The user supplied M4/K-12 concerns plus Zaryab's subsequent v2 deployment notice. Treat that as session evidence of intended rollout: current pUSDC-only kernel, EOA evaluator, four EVM testnets, SDK branch sdk-iteration-v1. The proposed NONE-only scope, token allowlist, CLIENT route and fund spec-hash commitment were questions/proposals in that discussion, not settled implementations. They are analyzed in [M4/M6](../../analysis/mutability-and-payment.md). diff --git a/plan/marketplace/research/2026-10-20/notion-export.zip b/plan/marketplace/research/2026-10-20/notion-export.zip new file mode 100644 index 00000000..519da4ef Binary files /dev/null and b/plan/marketplace/research/2026-10-20/notion-export.zip differ diff --git a/plan/marketplace/research/2026-10-20/notion-source-manifest.json b/plan/marketplace/research/2026-10-20/notion-source-manifest.json new file mode 100644 index 00000000..e7a0b055 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/notion-source-manifest.json @@ -0,0 +1,57 @@ +{ + "exported_at": "2026-10-20T09:44:55.670557+00:00", + "method": "signed-in Chrome UI, Markdown & CSV, stack index with subpages", + "archive": "notion-export.zip", + "archive_sha256": "14778ebb329966c82950c6ffad8e0a6324ea041221b58e426b3a9de4b6a66fb4", + "comments_included": false, + "pages": [ + { + "page_id": "3e9188aea7f48118b90ac9b267496295", + "url": "https://app.notion.com/p/3e9188aea7f48118b90ac9b267496295", + "local_file": "notion/2-universal-marketplace.md", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/2 Universal Marketplace 3e9188aea7f48118b90ac9b267496295.md", + "sha256": "a4313308d8a7ae836dc32c6202b37892a34ea683b9600d18481e6ec858808c64", + "bytes": 23371 + }, + { + "page_id": "3ea188aea7f481e2961ed97129f3a4e6", + "url": "https://app.notion.com/p/3ea188aea7f481e2961ed97129f3a4e6", + "local_file": "notion/6-sdk-universal-marketplace.md", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/6 SDK Universal Marketplace 3ea188aea7f481e2961ed97129f3a4e6.md", + "sha256": "2fa9093f077601b16f5a0410def51df5f0dd2c7324d96402fa3b9dddd2d4ef91", + "bytes": 48935 + }, + { + "page_id": "3e9188aea7f48188a838c3a740d8c858", + "url": "https://app.notion.com/p/3e9188aea7f48188a838c3a740d8c858", + "local_file": "notion/3-8183-job-kernel-and-hook.md", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/3 8183 (job kernel and hook) 3e9188aea7f48188a838c3a740d8c858.md", + "sha256": "0e9100c1eba4ff3e163f15ef1725a00f044fec19be95a744aed064be0037b030", + "bytes": 11616 + }, + { + "page_id": "3ea188aea7f481e0a137f5a896723376", + "url": "https://app.notion.com/p/3ea188aea7f481e0a137f5a896723376", + "local_file": "notion/7-sdk-8183-job.md", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/7 SDK 8183 Job 3ea188aea7f481e0a137f5a896723376.md", + "sha256": "bfb79eadeaba235da9b9bde28ef598ca5163a2caf489e4cee313c2166a433080", + "bytes": 16646 + }, + { + "page_id": "3e9188aea7f4817bb03ef4c78c883f8b", + "url": "https://app.notion.com/p/3e9188aea7f4817bb03ef4c78c883f8b", + "local_file": "notion/4-universal-evaluation.md", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/4 Universal Evaluation 3e9188aea7f4817bb03ef4c78c883f8b.md", + "sha256": "2271987bba0cbfd9e5a3790168437c4820cc81b815043f37060e5294658fb3f4", + "bytes": 19325 + }, + { + "page_id": "3ea188aea7f48197a3b3cfdedfa74fee", + "url": "https://app.notion.com/p/3ea188aea7f48197a3b3cfdedfa74fee", + "local_file": "notion/8-sdk-evaluation-placeholder.md", + "export_entry": "Private & Shared/AGW + UniversalMarketplace + 8183 + UniversalEvalu/8 SDK Evaluation (retired, placeholder) 3ea188aea7f48197a3b3cfdedfa74fee.md", + "sha256": "5a1acc551814a9b05868fc9b3d3dacfb8cbdf26414e9bac240ffbf970e2d1b0c", + "bytes": 2301 + } + ] +} diff --git a/plan/marketplace/research/2026-10-20/review-gaps-summary.json b/plan/marketplace/research/2026-10-20/review-gaps-summary.json new file mode 100644 index 00000000..f08411d7 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/review-gaps-summary.json @@ -0,0 +1,45 @@ +{ + "args": [ + "forge", + "test", + "--root", + "/var/folders/4_/d47r2_4s1wb3x2dvmt2ghp800000gp/T/marketplace-review-443b4e2-_ib864pr", + "--match-path", + "test/8183-tests/ReviewGaps.t.sol", + "--match-test", + "test_review_", + "--offline", + "--json" + ], + "exit_code": 0, + "seconds": 70.58, + "counts": { + "Success": 4 + }, + "tests": [ + { + "suite": "test/8183-tests/ReviewGaps.t.sol:ReviewLocalGaps", + "test": "test_review_cardFeeIsReferenceAndFundOnlyChecksAcceptedBudget()", + "status": "Success", + "reason": null + }, + { + "suite": "test/8183-tests/ReviewGaps.t.sol:ReviewLocalGaps", + "test": "test_review_nonNoneIsAcceptedButReplacementPayloadIsInert()", + "status": "Success", + "reason": null + }, + { + "suite": "test/8183-tests/ReviewGaps.t.sol:ReviewRealAgwCancellation", + "test": "test_review_cancelFreesWalletButOldAndNewGrantsBothRemainLive()", + "status": "Success", + "reason": null + }, + { + "suite": "test/8183-tests/ReviewGaps.t.sol:ReviewRealAgwCancellation", + "test": "test_review_ownerCanAtomicallyCancelAndRevokeWithoutNewAgwRole()", + "status": "Success", + "reason": null + } + ] +} diff --git a/plan/marketplace/research/2026-10-20/review-gaps.log b/plan/marketplace/research/2026-10-20/review-gaps.log new file mode 100644 index 00000000..fe140dab --- /dev/null +++ b/plan/marketplace/research/2026-10-20/review-gaps.log @@ -0,0 +1 @@ +{"test/8183-tests/ReviewGaps.t.sol:ReviewLocalGaps":{"duration":"9ms 591µs 125ns","test_results":{"test_review_cardFeeIsReferenceAndFundOnlyChecksAcceptedBudget()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7340929}},"traces":[],"labeled_addresses":{"0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin"},"duration":"1ms 345µs 292ns","breakpoints":{},"gas_snapshots":{}},"test_review_nonNoneIsAcceptedButReplacementPayloadIsInert()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":7378198}},"traces":[],"labeled_addresses":{"0xbe57cdad49a1d68545d529fca9298a841621eb6c":"vault","0x952c59c00bc7e96202b1ae82aa80f887422cc8f8":"userUEA","0xd5e069bc58dedb2a3a348995ee753eef0274004f":"client","0x31af8d96c3d532c6ab33c1e5b77366cd4de4c44a":"sessionValidator","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0x2d1e3d67e9cc5f95f17143108ad330c1fa324669":"gateway","0x1a7126be3438aca07d6d8ff452bfbbf1915fa2f0":"universalEvaluator","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x011f44c68a9877b052c5de168e499e05573f8db8":"relayer","0xdad018fdf469e68cd5cb63da97a057bb880f947e":"universalGatewayPC","0xc6df7efa69bbc88b352644eb471f353aa45506eb":"urp","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0x49052147f5d97a723debdf07680fffadad29a5dc":"stranger","0x6481431770cb268b1b5085a2c4d1a9f32d802b59":"ceaAdmin","0xa7c25dd02068ddc53ebab008955d97ca81247cef":"provider2","0xaa10a84ce7d9ae517a52c6d5ca153b369af99ecf":"admin","0x9b78803558f9ea56f4f0a966322c8dd9b2fbebc0":"provider","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x6118a5fc63087cb6297bb2b107b22b1b734ff9e9":"WETH.sepolia","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0xaee40976dd07664e7e8bfa60dbb16685177036d3":"ceaImpl","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin"},"duration":"1ms 610µs 458ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]},"test/8183-tests/ReviewGaps.t.sol:ReviewRealAgwCancellation":{"duration":"36s 126ms 821µs 750ns","test_results":{"test_review_cancelFreesWalletButOldAndNewGrantsBothRemainLive()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":20306518}},"traces":[],"labeled_addresses":{"0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x15773a5a32018dc9fb19262d7d5f422eadd5d3e9":"forkOwner","0x238ec72e0743bd4c21497d4157854dd3a1dd2f0d":"forkRelayer","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x0bd7513c1db25948b7a05301ec3698f379f4af13":"ceaFactory","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x22aa0d0bcc922d549618bd1ef8253cc8dee5a3cc":"forkProvider","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x540da3418be99da0614998034fcb817e9d8a0644":"forkAdmin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"36s 120ms 520µs 792ns","breakpoints":{},"gas_snapshots":{}},"test_review_ownerCanAtomicallyCancelAndRevokeWithoutNewAgwRole()":{"status":"Success","reason":null,"counterexample":null,"logs":[],"decoded_logs":[],"kind":{"Unit":{"gas":17388935}},"traces":[],"labeled_addresses":{"0xca5453e74f0ccc802add48a547cd965512ffd45d":"evaluator","0x15773a5a32018dc9fb19262d7d5f422eadd5d3e9":"forkOwner","0x238ec72e0743bd4c21497d4157854dd3a1dd2f0d":"forkRelayer","0x919d35e718c04fbc3bd9b098899520515cfdb314":"USDC.sepolia","0x1be57ea2ee4ae3a8330fd2fd90a4cf841b8dc4a5":"aavePool.sepolia","0x0bd7513c1db25948b7a05301ec3698f379f4af13":"ceaFactory","0xf93f5348654f103940e6572fa5e7122c2343845d":"mktAdmin","0xa081e81b06ed97291a863d20895b1842ecadb456":"hookAdmin","0x22aa0d0bcc922d549618bd1ef8253cc8dee5a3cc":"forkProvider","0xe0842c7973a357d001a707bee27e8773f7a8c39a":"ceaProxyImpl","0xd49279c8fc3454d7328eb8777274812e84b658df":"kernelProxyAdminOwner","0xd3776133024ed4410f2977b65e042ab9ede78944":"aUSDC.sepolia","0x540da3418be99da0614998034fcb817e9d8a0644":"forkAdmin","0xf43bca55e8091977223fa5b776e23528d205dca8":"treasury"},"duration":"26s 979ms 895µs 417ns","breakpoints":{},"gas_snapshots":{}}},"warnings":[]}} diff --git a/plan/marketplace/research/2026-10-20/review-workspace.txt b/plan/marketplace/research/2026-10-20/review-workspace.txt new file mode 100644 index 00000000..f1d48567 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/review-workspace.txt @@ -0,0 +1 @@ +/var/folders/4_/d47r2_4s1wb3x2dvmt2ghp800000gp/T/marketplace-review-443b4e2-_ib864pr diff --git a/plan/marketplace/research/2026-10-20/runtime-comparison.json b/plan/marketplace/research/2026-10-20/runtime-comparison.json new file mode 100644 index 00000000..1a3d1382 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/runtime-comparison.json @@ -0,0 +1,140 @@ +{ + "blockNumber": "24447347", + "sourceCommit": "443b4e2dd9ca5dd9ffc8efebdfcecd619dd66c47", + "results": [ + { + "artifact": "UniversalMarketplace.json", + "component": "marketplace", + "address": "0xd683545f84698df4341b0031c892c53384ff30be", + "optimizerRuns": 1000, + "sourceBytes": 22156, + "liveBytes": 22156, + "exactMatch": false, + "executableMatchExcludingMetadata": true, + "builderLinkResolved": true, + "librarySelfAddressNormalized": false, + "executableHash": "0xa427de90878b45e09c78f4ff2dfb9158aa3d737349777960b7247e799ec1ba38", + "expectedExecutableHash": "0xa427de90878b45e09c78f4ff2dfb9158aa3d737349777960b7247e799ec1ba38", + "candidateProfiles": [ + { + "artifact": "UniversalMarketplace.json", + "optimizerRuns": 1000, + "sourceBytes": 22156, + "executableMatchExcludingMetadata": true + } + ] + }, + { + "artifact": "AgenticCommerce.marketplace-size.json", + "component": "kernel", + "address": "0x1d631e9d0e0a7a7423743c3076054c784af8fa40", + "optimizerRuns": 1000, + "sourceBytes": 10930, + "liveBytes": 10930, + "exactMatch": false, + "executableMatchExcludingMetadata": true, + "builderLinkResolved": false, + "librarySelfAddressNormalized": false, + "executableHash": "0x718bd7e85b020816b8893dbb594a58677754c3caad687b4ba3862711daf4e84e", + "expectedExecutableHash": "0x718bd7e85b020816b8893dbb594a58677754c3caad687b4ba3862711daf4e84e", + "candidateProfiles": [ + { + "artifact": "AgenticCommerce.json", + "optimizerRuns": 99999, + "sourceBytes": 14282, + "executableMatchExcludingMetadata": false + }, + { + "artifact": "AgenticCommerce.marketplace-size.json", + "optimizerRuns": 1000, + "sourceBytes": 10930, + "executableMatchExcludingMetadata": true + } + ] + }, + { + "artifact": "RulesBindingHook.marketplace-size.json", + "component": "hook", + "address": "0x58bd6951b653b5028aa77b4904e83df668bcef7e", + "optimizerRuns": 1000, + "sourceBytes": 3477, + "liveBytes": 3477, + "exactMatch": false, + "executableMatchExcludingMetadata": true, + "builderLinkResolved": false, + "librarySelfAddressNormalized": false, + "executableHash": "0x655c3c92cb2c58404bec34fb1480174312de73f6acaa3770d41ac62ff57ba204", + "expectedExecutableHash": "0x655c3c92cb2c58404bec34fb1480174312de73f6acaa3770d41ac62ff57ba204", + "candidateProfiles": [ + { + "artifact": "RulesBindingHook.json", + "optimizerRuns": 99999, + "sourceBytes": 4499, + "executableMatchExcludingMetadata": false + }, + { + "artifact": "RulesBindingHook.marketplace-size.json", + "optimizerRuns": 1000, + "sourceBytes": 3477, + "executableMatchExcludingMetadata": true + } + ] + }, + { + "artifact": "UniversalMarketplaceRules.marketplace-size.json", + "component": "rules", + "address": "0x5b98A8E0df5b918DF76cD2BE84bA7995B39dfd44", + "optimizerRuns": 1000, + "sourceBytes": 7832, + "liveBytes": 7832, + "exactMatch": false, + "executableMatchExcludingMetadata": true, + "builderLinkResolved": false, + "librarySelfAddressNormalized": false, + "executableHash": "0xfbb751181bf0aa2e3ab5273277d689fca1531126a6390c29450d3b394e9be18e", + "expectedExecutableHash": "0xfbb751181bf0aa2e3ab5273277d689fca1531126a6390c29450d3b394e9be18e", + "candidateProfiles": [ + { + "artifact": "UniversalMarketplaceRules.json", + "optimizerRuns": 99999, + "sourceBytes": 9376, + "executableMatchExcludingMetadata": false + }, + { + "artifact": "UniversalMarketplaceRules.marketplace-size.json", + "optimizerRuns": 1000, + "sourceBytes": 7832, + "executableMatchExcludingMetadata": true + } + ] + }, + { + "artifact": "JobSpecBuilder.marketplace-size.json", + "component": "builder", + "address": "0x2de1e3F053b0bBa0cE0C6953144534a0b055f59e", + "optimizerRuns": 1000, + "sourceBytes": 5597, + "liveBytes": 5597, + "exactMatch": false, + "executableMatchExcludingMetadata": true, + "builderLinkResolved": false, + "librarySelfAddressNormalized": false, + "executableHash": "0x85280ca6b74a0b851f8524c435d2c6e5a60fe6e16e924e7c98b59361650d061b", + "expectedExecutableHash": "0x85280ca6b74a0b851f8524c435d2c6e5a60fe6e16e924e7c98b59361650d061b", + "candidateProfiles": [ + { + "artifact": "JobSpecBuilder.json", + "optimizerRuns": 99999, + "sourceBytes": 6352, + "executableMatchExcludingMetadata": false + }, + { + "artifact": "JobSpecBuilder.marketplace-size.json", + "optimizerRuns": 1000, + "sourceBytes": 5597, + "executableMatchExcludingMetadata": true + } + ] + } + ] +} diff --git a/plan/marketplace/research/2026-10-20/summary.json b/plan/marketplace/research/2026-10-20/summary.json new file mode 100644 index 00000000..1b246d1c --- /dev/null +++ b/plan/marketplace/research/2026-10-20/summary.json @@ -0,0 +1,18 @@ +{ + "ordinary_contract_tests": { + "Success": 248, + "Skipped": 2 + }, + "fork_tests": { + "Success": 2 + }, + "bounded_invariants": { + "Success": 10 + }, + "independent_review_cases": { + "Success": 4 + }, + "runtime_matches": 5, + "cea_matches": 4, + "fresh_notion_pages": 6 +} diff --git a/plan/marketplace/research/2026-10-20/validation.md b/plan/marketplace/research/2026-10-20/validation.md new file mode 100644 index 00000000..9306fd2c --- /dev/null +++ b/plan/marketplace/research/2026-10-20/validation.md @@ -0,0 +1,58 @@ +# Validation and limitations — October 20 + +Source pin `443b4e2dd9ca5dd9ffc8efebdfcecd619dd66c47`, source branch sdk-iteration-v1. Remote head was rechecked after the review and remained at that SHA. Full source was archived into an isolated temporary workspace, with all five dependencies at their actual submodule SHAs. No .env file exists in that workspace. SDK production files and sibling working-tree checkouts were not modified by this research. + +## Results + +| Check | Result / evidence | +| --- | --- | +| Fresh Notion download | 6/6 requested page bodies imported from a new stack-index export; ZIP, entries, SHA-256 and timestamp retained in [manifest](notion-source-manifest.json). Visible discussions reviewed separately. | +| Ordinary contract unit/fuzz suite | **248 passed, 0 failed, 2 fork tests skipped** without RPC env. [Summary](contract-test-summary.json), [command/exit](contract-test-command.json), [raw JSON log](contract-tests.log). Source fuzz setting 1,024 runs. Invariant functions excluded from this invocation. | +| Upstream fork suite | **2 passed, 0 skipped/failed**, separately with public Donut RPC. [Summary/commands](fork-tests-summary.json), [log](fork-tests.log). Real AGW v6; marketplace/kernel/hook created on fork. Hook test honors FORK_BLOCK=24447347. The marketplace test selects latest internally; its emitted block is not retained in this quiet JSON artifact, so no exact block is claimed for that case. | +| Kernel/marketplace invariants | **10 passed**, separately at **64 runs × depth 64**, 4,096 handler calls per invariant. [Summary and per-test metrics](invariant-tests-summary.json), [compressed raw log](invariant-tests.log.gz). This is a bounded review configuration, not the repository's full CI invariant budget. | +| Independent review cases | **4 passed**, two local real-kernel/mock-wallet cases and two real-AGW fork cases pinned to 24447347. [Source](ReviewGaps.t.sol), [summary](review-gaps-summary.json), [log](review-gaps.log). Findings below. | +| Live state/code/wiring | Block **24447347**, chain 42101, version 2.0.0, correct factory/kernel/hook/rules/engine/evaluator/token wiring, whitelist true, fees zero, EOA evaluator code empty, 0 cards / 0 jobs. [RPC observations](live-deployment.json). | +| CEA computation | **4/4** supported chain configurations match address book and independent EIP-1167/CREATE2 calculation for a predicted AGW. Checks registered derivation, not destination protocol execution. | +| Runtime/source parity | **5/5** stack component executable runtimes match pinned build after metadata exclusion and explicit library link/self-address resolution. [Profile-by-profile comparison](runtime-comparison.json). All matching artifacts use 1,000 optimizer runs. Full bytecode including metadata differs. | +| Wire comparison | Controlled old/new nonempty JobSpec vectors each roundtrip canonically in their own profile and fail the other decoder. [Vectors/results](wire-comparison.json). Also samples template/spec decoding separately. Does not prove every hostile/ambiguous payload is rejected. | +| ABI collection | Marketplace, kernel, hook, helper, library and complete 40-error library ABIs extracted from pinned build under [contracts/abi](../../contracts/abi). | + +The passes above are separate invocations, not one single full-suite result. Research work did not rerun the SDK's full AGW unit suite; October 18 AGW counts in plan/agw remain earlier evidence. + +## Independent review findings + +1. A BOTH template can register/open/fund today, but arbitrary setBudget replacement bytes are ignored by the interim hook and kernel description stays unchanged. Stored flags are not implemented mutability. +2. Card providerFee is not a protocol-enforced fixed price: funding at three times that reference succeeds when the client accepts that exact budget. +3. Client reject of an Open job frees marketplace occupancy. Old permission remains enabled; opening another job for the same wallet/provider creates a second enabled permission. +4. One owner batch calling kernel.reject and wallet.revokeRules atomically cancels and disables that job's grant on existing real AGW v6. No new AGW stop role is required for this **owner-authorized SDK path**. It does not prove hook/provider-triggered cleanup or external UEA wallet UX. + +The two local cases use the pinned suite's mock AGW signatures; they are not owner-signature proofs. The two cancellation fork cases use the actual factory/wallet/engine and signed OwnerIntent. All fork writes are ephemeral local EVM state, never public transactions. + +## Commands + +Workspace location is captured in review-workspace.txt; source dependencies are pinned in dependency-pins.json. Test records retain exact absolute invocation roots and exit codes. For a fresh run, archive the same Git SHA plus pinned dependencies first; contracts/ is a selected reference snapshot, not a standalone full build tree. + +```sh +forge test --root "$review_root" --match-path 'test/8183-tests/*.t.sol' --no-match-test invariant_ --offline --json +PUSH_CHAIN_TESTNET_RPC_URL=https://evm.donut.rpc.push.org/ FORK_BLOCK=24447347 \ + forge test --root "$review_root" --match-path 'test/8183-tests/*.fork.t.sol' --offline --json +FOUNDRY_INVARIANT_RUNS=64 FOUNDRY_INVARIANT_DEPTH=64 \ + forge test --root "$review_root" --match-path 'test/8183-tests/*.t.sol' --match-test invariant_ --offline --json +# Copy ReviewGaps.t.sol into that workspace's test/8183-tests before this command: +forge test --root "$review_root" --match-path test/8183-tests/ReviewGaps.t.sol --match-test test_review_ --offline --json +node plan/marketplace/scripts/probe-live.cjs +node plan/marketplace/scripts/compare-runtime.cjs +node plan/marketplace/scripts/check-wire.cjs +``` + +RPC scripts use the existing installed viem package, load no keys and have no send/broadcast calls. Runtime comparison uses the saved block and generated artifacts. These scripts currently write this dated evidence directory; select another output directory before a later baseline refresh. + +## Corrections made during verification + +- Initial dependency extraction refused an archived outward symlink. Dependencies were re-extracted at the correct pins with links omitted; final tests use that corrected workspace. +- First standalone RPC probe used predictWallet's index as uint96 because IntentRequest.index is uint96. Factory ABI actually takes uint256; corrected against the pinned interface before the successful probe. Initial failure was a probe ABI mistake, not a contract failure. +- First runtime comparison selected the default 99,999-run dependency artifacts. The live deployments use the 1,000-run variants emitted by the marketplace build profile. Comparison now records both candidates and the matching profile; no unexplained runtime mismatch remains. + +## Not established by this review + +No funded live transaction, card registration, open/fund/execute/settle roundtrip, destination liquidity check, public deployment or publication occurred. No automatic evaluator, baseline, mutable agreement, recurring job or rating was exercised. There were no live registry cards/jobs at the observation to inspect. No full security audit, exhaustive mutation run, all-mainnet claim, complete explorer source verification or user-wallet signing-prompt count is implied. diff --git a/plan/marketplace/research/2026-10-20/wire-comparison.json b/plan/marketplace/research/2026-10-20/wire-comparison.json new file mode 100644 index 00000000..cc957882 --- /dev/null +++ b/plan/marketplace/research/2026-10-20/wire-comparison.json @@ -0,0 +1,50 @@ +{ + "marketplaceSource": "443b4e2dd9ca5dd9ffc8efebdfcecd619dd66c47", + "evaluatorSource": "8059817591cca16c59f1cc154f475f51e1736a67", + "schemaChanges": [ + "JobSpec top-level field order", + "Read.at appended", + "Check.read replaced by left/right arrays", + "Logic checks[] replaced by CHECK leaf structure", + "AllowedMutability.NONE ordinal 0 -> 1; BOTH 3 -> 0", + "Logic ALL ordinal 0 -> 1; ANY 1 -> 2; AT_LEAST 2 -> 3", + "MAX_READS 16 -> 32" + ], + "oldRoundtrip": { + "decoded": true, + "canonicalRoundtrip": true + }, + "newRoundtrip": { + "decoded": true, + "canonicalRoundtrip": true + }, + "oldDecodedAsNew": { + "decoded": false, + "error": "Position `1344` is out of bounds (`0 < position < 1344`)." + }, + "newDecodedAsOld": { + "decoded": false, + "error": "Position `1800000032` is out of bounds (`0 < position < 1472`)." + }, + "deployedJobDecodedAsTemplate": { + "decoded": false, + "error": "Position `1375` is out of bounds (`0 < position < 1344`)." + }, + "templateDecodedAsDeployedJob": { + "decoded": false, + "error": "Number \"3.618509717477737e+75\" is not in safe 8-bit unsigned integer range (0 to 255)" + }, + "old": { + "bytes": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000360000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006b49d200000000000000000000000000000000000000000000000000000000006b49ee200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000111111111111111111111111111111111111111170a0823100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000066569703135350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000831313135353131310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060800010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000001dbe22c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "hash": "0xd87e5ea5bad8aa297d039a9624f341c16b12c905421e50ec41a8c790785f612f" + }, + "modern": { + "bytes": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000006b49d200000000000000000000000000000000000000000000000000000000006b49ee2000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000004c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000111111111111111111111111111111111111111170a082310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066569703135350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000831313135353131310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060800010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000001dbe22c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "hash": "0xdb0a5d96f5989b91ceb5552c46d93d31bf24cdb81119d903967fbe5bf82154b9" + }, + "template": { + "bytes": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000003600000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000111111111111111111111111111111111111111170a082310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000006656970313535000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083131313535313131000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000608000101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001dbe22c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "hash": "0xfa711861a92dacf51b35a04f50038d7a5fe9cb13029b3dc90faa8cbb8b85667f" + }, + "scope": "Controlled nonempty ABI vectors, not a proof that every malformed/cross-profile payload is rejected. No evaluator deployment or settlement is tested." +} diff --git a/plan/marketplace/research/sdk-completion-2026-10-20/README.md b/plan/marketplace/research/sdk-completion-2026-10-20/README.md new file mode 100644 index 00000000..2af0701d --- /dev/null +++ b/plan/marketplace/research/sdk-completion-2026-10-20/README.md @@ -0,0 +1,48 @@ +# Deposits, paid preview and external EVM owners — October 20 + +Follow-up to the first SDK checkpoint `fbd0e032`. Targets remain UniversalMarketplace v2 `443b4e2`, AGW v6 `ffd567d` and the pUSDC/manual-evaluator Donut deployment. [API coverage and remaining work](../../implementation-status.md), [consumer guide](../../../../packages/core/MARKETPLACE.md). + +## Acceptance + +| Check | Result / evidence | +| --- | --- | +| Full units | 2,228 passed, 12 existing skips, no failures; [losslessly compressed Jest output](unit-results.json.gz) | +| Real-stack fork | Eight passed on an isolated Anvil fork at block 24447347; [Jest output](fork-results.json) | +| Live | Three passed, none failed/skipped, runner exited 0; [raw report](live-results.json), [transactions and read request](live-evidence.json) | +| Cleanup | Card 3 inactive; jobs 2/3 Rejected (kernel ordinal 4), both grants disabled; [read-only post-state](post-live-state.json) | +| Package | Build, library/spec/fork types, changed-production lint, CJS/ESM imports, compiled guide declarations, npm dry-run contents and six source-guide TS blocks pass | +| API | Source and compiled surfaces match; [report](api-comparison.json). Its comparison baseline predates this checkpoint and includes earlier SDK changes. | + +The 23 added unit cases cover historical/shared-token deposits, shortages before writes, pending receipt/broadcast recovery, origin-route matching, already-used permissions, fee caps, template CEA resolution, immutable preview inputs, dynamic ABI paths, unknown/baseline logic, typed-signing gates and domain mismatch before prompting. Fork tests add actual principal/fee/PC deposits after a card update, fresh-client history recovery, a wrong-signature simulation failure and a real UEA owner signature to the earlier lifecycle coverage. + +The fork's UEA signature case uses a native submitting transport because Anvil does not implement Cosmos MsgExecutePayload. It verifies the actual UEA/factory/wallet signature path. The separate live case opens and cancels through the real external EVM owner's SDK UEA transport. No successful contract or SDK outcome is fabricated. + +The live paid preview submits a raw BSC Testnet ERC20 balance read through the registry and reaches validator consensus (`SUCCESS`, decoded zero). Its quoted/paid callback-plus-protocol deposit is 0.0016875 PC, below the explicit 0.01 PC request cap; native transaction gas is separate. The criterion is balance >= 0, a smoke check rather than evidence of a completed strategy. Requests and hashes are retained without keys or unbroadcast signatures. + +The existing CI reporter again sampled `success: false` in onRunComplete despite three passed tests and runner exit 0. Its report is preserved unchanged; [validation summary](validation-summary.json) records the counts and actual exit separately. + +## Limits + +- Principal, pUSDC escrow and payout transfers are fork-only, using existing assets borrowed under local impersonation. Live funding uses bounded PC for fresh wallets, gas and a read callback. No destination protocol transaction or automatic evaluator verdict is claimed. +- Explicit origin-bridge deposits are unit-tested, including wrong-chain rejection and recovery; funded inbound bridging through `market.deposit` still needs its own live acceptance. +- Deposits are separate transactions and target current wallet balances. They require Open/unexpired jobs and unused enabled permissions. Available historical state is required; same-block version ambiguity fails closed. PC defaults to one card gas cap rather than a whole-job estimate. Coordinate other deposit clients and keep the agent idle during funding. +- Arbitrary ERC-1271 adapters and EIP-7702 delegates require their own acceptance. Full signed-request simulation prevents broadcast when the deployed owner verifier refuses a signature. An undeployed external UEA is refused before signing. +- Three CEA rollout mismatches and the incompatible/missing automatic evaluator remain documented dependencies. No global routing address was changed to bypass a guard. +- No marketplace, kernel, hook or evaluator was deployed or upgraded; only fresh test accounts/wallets were created through existing factories. No package was published. + +## Reproduction + +```sh +node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand --silent +node node_modules/jest/bin/jest.js --config packages/core/jest.marketplace-local.config.ts --runInBand +node node_modules/ts-node/dist/bin.js --compiler-options '{"module":"commonjs"}' packages/core/__e2e__/ci/run.ts --group marketplace-live --verify +node node_modules/ts-node/dist/bin.js --compiler-options '{"module":"commonjs"}' packages/core/__e2e__/ci/run.ts --group marketplace-live +NX_DAEMON=false node node_modules/nx/bin/nx.js run core:build --skip-nx-cache +node node_modules/typescript/bin/tsc -p packages/core/tsconfig.spec.json --noEmit +node node_modules/typescript/bin/tsc -p packages/core/tsconfig.marketplace-local.json --noEmit +node packages/core/scripts/check-agw-docs.js packages/core/MARKETPLACE.md +node packages/core/scripts/check-agw-package.js +node packages/core/scripts/check-agw-api.js --output /tmp/marketplace-api.json +``` + +Marketplace live remains opt-in and needs the existing test fixture configuration. Default `all` selection is unchanged. Checksums of retained raw results and checked source files are recorded in [validation summary](validation-summary.json) and [checked files](checked-files.json). diff --git a/plan/marketplace/research/sdk-completion-2026-10-20/api-comparison.json b/plan/marketplace/research/sdk-completion-2026-10-20/api-comparison.json new file mode 100644 index 00000000..9374c0d0 --- /dev/null +++ b/plan/marketplace/research/sdk-completion-2026-10-20/api-comparison.json @@ -0,0 +1,13371 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "fbd0e032940e523b18bb0d6f8fd80b23beae1c67", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [ + "AgentCard", + "AgentCardInput", + "AgentCardRules", + "AgentCardSummary", + "AgenticPresets", + "AllowedMutability", + "ArgumentPath", + "BuildJobSpecOptions", + "BuildJobSpecTemplateOptions", + "CreateJobOptions", + "DecodedSolanaRule", + "Evaluation", + "FundJobOptions", + "Job", + "JobCheck", + "JobCheckTemplate", + "JobError", + "JobEvent", + "JobNamespace", + "JobPlan", + "JobRead", + "JobReadInput", + "JobSpec", + "JobSpecError", + "JobSpecPreview", + "JobSpecTemplate", + "JobStatus", + "LogicKind", + "LogicTree", + "MarketAssetToken", + "MarketDepositOptions", + "MarketDepositResult", + "MarketDepositStep", + "MarketError", + "MarketNamespace", + "MarketPin", + "MarketPreviewOptions", + "MarketWriteOptions", + "Operation", + "OwnerIntent", + "Pin", + "PrepareJobReadOptions", + "PreparedJobRead", + "Preset", + "PresetAsset", + "PresetCallIssue", + "PresetCategory", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetOptions", + "PresetResult", + "PresetRuleTemplate", + "PreviewJobSpecOptions", + "PrincipalMarker", + "ReadyPresetOptions", + "RuleInput", + "Spent", + "WalletMarker" + ], + "removedExports": [ + "AgenticNetworkConstants", + "NativeRule", + "UniversalRule" + ], + "changedAgwTypes": [ + "AgenticWallet", + "AgenticError", + "AgenticRevertError", + "AGENTIC_ERROR_CODE", + "Rule", + "RuleInput", + "Pin", + "Spent", + "NativeRule", + "AssetCap", + "AllowedCall", + "UniversalRule", + "RulesRecord", + "CreateOptions", + "AgenticTxMetadata" + ], + "publicTypeChanges": [ + "MarketError", + "JobError", + "JobSpecError", + "AgentCardRules", + "MarketAssetToken", + "MarketPin", + "AgentCard", + "AgentCardInput", + "AgentCardSummary", + "MarketNamespace", + "MarketPreviewOptions", + "MarketWriteOptions", + "MarketDepositOptions", + "MarketDepositResult", + "MarketDepositStep", + "JobPlan", + "OwnerIntent", + "JobNamespace", + "Job", + "JobStatus", + "JobEvent", + "CreateJobOptions", + "FundJobOptions", + "JobSpec", + "JobSpecTemplate", + "JobRead", + "PreparedJobRead", + "JobReadInput", + "JobCheck", + "JobCheckTemplate", + "LogicTree", + "Evaluation", + "Operation", + "LogicKind", + "AllowedMutability", + "PrincipalMarker", + "PrepareJobReadOptions", + "BuildJobSpecOptions", + "BuildJobSpecTemplateOptions", + "JobSpecPreview", + "PreviewJobSpecOptions", + "ReadOptions", + "ReadPrepareOptions", + "ReadQueryOptions", + "ReadValue", + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticRevertError", + "AgenticErrorCode", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "CreateOptions", + "DecodedSolanaRule", + "Rule", + "RuleInput", + "Pin", + "Spent", + "WalletMarker", + "ArgumentPath", + "RulesRecord", + "PushChain", + "Preset", + "PresetCategory", + "PresetAsset", + "PresetOptions", + "ReadyPresetOptions", + "PresetRuleTemplate", + "PresetResult", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetCallIssue", + "AgenticPresets" + ], + "transactionMethodChanges": [ + "read" + ], + "instanceMethodChanges": [ + "job", + "market", + "universal" + ], + "agwConstantsChanged": true, + "before": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address(token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }): {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "after": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgentCard", + "AgentCardInput", + "AgentCardRules", + "AgentCardSummary", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticPresets", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AllowedMutability", + "ArgumentPath", + "AssetCap", + "BatchReadResponse", + "BuildJobSpecOptions", + "BuildJobSpecTemplateOptions", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateJobOptions", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DecodedSolanaRule", + "DerivedExecutorAccount", + "EncodedReadQuery", + "Evaluation", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundJobOptions", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "Job", + "JobCheck", + "JobCheckTemplate", + "JobError", + "JobEvent", + "JobNamespace", + "JobPlan", + "JobRead", + "JobReadInput", + "JobSpec", + "JobSpecError", + "JobSpecPreview", + "JobSpecTemplate", + "JobStatus", + "LogicKind", + "LogicTree", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MarketAssetToken", + "MarketDepositOptions", + "MarketDepositResult", + "MarketDepositStep", + "MarketError", + "MarketNamespace", + "MarketPin", + "MarketPreviewOptions", + "MarketWriteOptions", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "Operation", + "OutboundTxDetails", + "OwnerIntent", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "Pin", + "PrepareJobReadOptions", + "PreparedJobRead", + "PreparedRead", + "PreparedUniversalTx", + "Preset", + "PresetAsset", + "PresetCallIssue", + "PresetCategory", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetOptions", + "PresetResult", + "PresetRuleTemplate", + "PreviewJobSpecOptions", + "PrincipalMarker", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReadyPresetOptions", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RuleInput", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "Spent", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletMarker", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n delete(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n delete(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "Code" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "userMessage": { + "optional": false, + "readonly": true, + "type": "string" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "userMessage": { + "optional": false, + "readonly": true, + "type": "string" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly DELETE_NEEDS_TARGET: \"DELETE_NEEDS_TARGET\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REQUEST_REJECTED: \"REQUEST_REJECTED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly TOKEN_ROUTE_UNAVAILABLE: \"TOKEN_ROUTE_UNAVAILABLE\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "DELETE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"DELETE_NEEDS_TARGET\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REQUEST_REJECTED": { + "optional": false, + "readonly": true, + "type": "\"REQUEST_REJECTED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "TOKEN_ROUTE_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"TOKEN_ROUTE_UNAVAILABLE\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RuleInput": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[] | import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Pin": { + "type": "{\n account: number;\n arg?: never;\n expected: \"agentic:wallet\" | string;\n max?: never;\n token?: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected: \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint;\n max?: never;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected?: never;\n max: bigint;\n}", + "members": { + "account": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "arg": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath | undefined" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "bigint | string | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "Spent": { + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"native\" | \"universal\"" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall", + "members": { + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Pin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "spent": { + "optional": false, + "readonly": false, + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "MarketError": { + "type": "import(\"sdk/src/lib/market/errors\").MarketError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "userMessage": { + "optional": false, + "readonly": true, + "type": "string" + } + } + }, + "JobError": { + "type": "import(\"sdk/src/lib/market/errors\").JobError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "userMessage": { + "optional": false, + "readonly": true, + "type": "string" + } + } + }, + "JobSpecError": { + "type": "import(\"sdk/src/lib/market/errors\").JobSpecError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "userMessage": { + "optional": false, + "readonly": true, + "type": "string" + } + } + }, + "AgentCardRules": { + "type": "import(\"sdk/src/lib/market/rules\").AgentCardRules", + "members": { + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "{\n maxValue?: bigint;\n pins?: import(\"sdk/src/lib/market/rules\").MarketPin[];\n selector: string;\n target: `0x${string}`;\n}[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: \"agentic:principal\" | bigint;\n maxTotal?: \"agentic:principal\" | bigint;\n token: import(\"sdk/src/lib/market/rules\").MarketAssetToken;\n}[]" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "principalAsset": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "MarketAssetToken": { + "type": "{\n prc20: `0x${string}`;\n} | import(\"sdk/src/lib/constants/tokens\").MoveableToken | string", + "members": {} + }, + "MarketPin": { + "type": "{\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected: \"agentic:principal\" | \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint | boolean;\n max?: never;\n} | {\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected?: never;\n max: \"agentic:principal\" | bigint;\n}", + "members": { + "arg": { + "optional": false, + "readonly": false, + "type": "number | readonly number[]" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "\"agentic:principal\" | \"agentic:wallet\" | `0x${string}` | bigint | boolean | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "\"agentic:principal\" | bigint | undefined" + } + } + }, + "AgentCard": { + "type": "import(\"sdk/src/lib/market/types\").AgentCard", + "members": { + "active": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "cardId": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "disabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "jobSpecTemplate": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate" + }, + "jobSpecTemplateBytes": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "jobType": { + "optional": false, + "readonly": false, + "type": "string" + }, + "maxDuration": { + "optional": false, + "readonly": false, + "type": "number" + }, + "metadataHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "metadataURI": { + "optional": false, + "readonly": false, + "type": "string" + }, + "minDuration": { + "optional": false, + "readonly": false, + "type": "number" + }, + "minExecuteWindow": { + "optional": false, + "readonly": false, + "type": "number" + }, + "paymentToken": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "principalMax": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "principalMin": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "provider": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "providerFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "rating": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/market/rules\").AgentCardRules" + }, + "rulesBytes": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "settleWindow": { + "optional": false, + "readonly": false, + "type": "number" + }, + "verified": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "AgentCardInput": { + "type": "import(\"sdk/src/lib/market/types\").AgentCardInput", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "jobType": { + "optional": false, + "readonly": false, + "type": "string" + }, + "maxDuration": { + "optional": false, + "readonly": false, + "type": "number" + }, + "metadataHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "metadataURI": { + "optional": false, + "readonly": false, + "type": "string" + }, + "minDuration": { + "optional": false, + "readonly": false, + "type": "number" + }, + "minExecuteWindow": { + "optional": false, + "readonly": false, + "type": "number" + }, + "paymentToken": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "principalMax": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "principalMin": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "providerFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "settleWindow": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AgentCardSummary": { + "type": "{\n active: boolean;\n cardId: bigint;\n chain: string;\n disabled: boolean;\n jobType: string;\n maxDuration: number;\n metadataHash: `0x${string}`;\n metadataURI: string;\n minDuration: number;\n minExecuteWindow: number;\n paymentToken: `0x${string}`;\n principalMax: bigint;\n principalMin: bigint;\n provider: `0x${string}`;\n providerFee: bigint;\n rating: bigint;\n settleWindow: number;\n verified: boolean;\n version: bigint;\n}", + "members": { + "active": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "cardId": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "disabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "jobType": { + "optional": false, + "readonly": false, + "type": "string" + }, + "maxDuration": { + "optional": false, + "readonly": false, + "type": "number" + }, + "metadataHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "metadataURI": { + "optional": false, + "readonly": false, + "type": "string" + }, + "minDuration": { + "optional": false, + "readonly": false, + "type": "number" + }, + "minExecuteWindow": { + "optional": false, + "readonly": false, + "type": "number" + }, + "paymentToken": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "principalMax": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "principalMin": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "provider": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "providerFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "rating": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "settleWindow": { + "optional": false, + "readonly": false, + "type": "number" + }, + "verified": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MarketNamespace": { + "type": "import(\"sdk/src/lib/market/types\").MarketNamespace", + "members": { + "activeJob": { + "optional": false, + "readonly": false, + "type": "(wallet: `0x${string}`) => Promise<{\n jobId: bigint;\n}>" + }, + "agent": { + "optional": false, + "readonly": false, + "type": "{\n card(): Promise;\n register(card: import(\"sdk/src/lib/market/types\").AgentCardInput, options: {\n jobSpecTemplate: import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate;\n rules: import(\"sdk/src/lib/market/rules\").AgentCardRules;\n } & import(\"sdk/src/lib/market/types\").MarketWriteOptions): Promise<{\n cardId: bigint;\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n version: bigint;\n }>;\n setActive(cardId: bigint, active: boolean, options?: import(\"sdk/src/lib/market/types\").MarketWriteOptions): Promise;\n update(cardId: bigint, card: import(\"sdk/src/lib/market/types\").AgentCardInput, options: {\n jobSpecTemplate: import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate;\n rules: import(\"sdk/src/lib/market/rules\").AgentCardRules;\n } & import(\"sdk/src/lib/market/types\").MarketWriteOptions): Promise<{\n cardId: bigint;\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n version: bigint;\n }>;\n}" + }, + "card": { + "optional": false, + "readonly": false, + "type": "(cardId: bigint) => Promise" + }, + "cards": { + "optional": false, + "readonly": false, + "type": "(options?: {\n active?: boolean;\n chain?: string;\n provider?: `0x${string}`;\n}) => Promise<{\n cards: import(\"sdk/src/lib/market/types\").AgentCardSummary[];\n}>" + }, + "deposit": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, options?: import(\"sdk/src/lib/market/types\").MarketDepositOptions) => Promise" + }, + "job": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint) => Promise<{\n cardId: bigint;\n cardVersion: bigint;\n rulesId: `0x${string}`;\n wallet: `0x${string}`;\n}>" + }, + "openJob": { + "optional": false, + "readonly": false, + "type": "(plan: import(\"sdk/src/lib/market/types\").JobPlan, options?: {\n relay?: boolean;\n} & import(\"sdk/src/lib/market/types\").MarketWriteOptions) => Promise<{\n jobId: bigint;\n rulesId: `0x${string}`;\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n wallet: `0x${string}`;\n}>" + }, + "preview": { + "optional": false, + "readonly": false, + "type": "(cardId: bigint, options: import(\"sdk/src/lib/market/types\").MarketPreviewOptions) => Promise" + } + } + }, + "MarketPreviewOptions": { + "type": "import(\"sdk/src/lib/market/types\").MarketPreviewOptions", + "members": { + "deadline": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "executeBy": { + "optional": false, + "readonly": false, + "type": "number" + }, + "expiredAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "params": { + "optional": true, + "readonly": false, + "type": "bigint[] | undefined" + }, + "principal": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "walletIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "MarketWriteOptions": { + "type": "import(\"sdk/src/lib/market/types\").MarketWriteOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/market/runtime\").StackProgressHook | undefined" + } + } + }, + "MarketDepositOptions": { + "type": "import(\"sdk/src/lib/market/types\").MarketDepositOptions", + "members": { + "funding": { + "optional": true, + "readonly": false, + "type": "\"origin\" | \"push\" | undefined" + }, + "pcAmount": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/market/runtime\").StackProgressHook | undefined" + }, + "providerFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "resume": { + "optional": true, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/market/types\").MarketDepositStep[] | undefined" + } + } + }, + "MarketDepositResult": { + "type": "import(\"sdk/src/lib/market/types\").MarketDepositResult", + "members": { + "cardId": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "cardVersion": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "jobId": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pending": { + "optional": true, + "readonly": false, + "type": "({\n chain: string;\n txHash: string;\n} & Omit) | undefined" + }, + "txs": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/market/types\").MarketDepositStep[]" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "MarketDepositStep": { + "type": "import(\"sdk/src/lib/market/types\").MarketDepositStep", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "step": { + "optional": false, + "readonly": false, + "type": "\"PC\" | \"PRINCIPAL_AND_FEE\" | \"PRINCIPAL\" | \"PROVIDER_FEE\"" + }, + "token": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + } + } + }, + "JobPlan": { + "type": "import(\"sdk/src/lib/market/types\").JobPlan", + "members": { + "calldata": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "cardId": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "cardVersion": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "deposit": { + "optional": false, + "readonly": false, + "type": "{\n pc: bigint;\n principal: {\n amount: bigint;\n prc20: `0x${string}`;\n };\n providerFee: {\n amount: bigint;\n token: `0x${string}`;\n };\n}" + }, + "intent": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/market/types\").OwnerIntent" + }, + "job": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/market/types\").MarketJobInputs" + }, + "jobSpec": { + "optional": false, + "readonly": false, + "type": "{\n bytes: `0x${string}`;\n spec: import(\"sdk/src/lib/job-spec/types\").JobSpec;\n}" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "preview": { + "optional": false, + "readonly": false, + "type": "{\n judgedBy: string[];\n mayDo: string[];\n mayMove: string[];\n until: string;\n}" + }, + "session": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/codec/session\").SessionWire" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "walletDeployed": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "OwnerIntent": { + "type": "import(\"sdk/src/lib/market/types\").OwnerIntent", + "members": { + "deadline": { + "optional": false, + "readonly": false, + "type": "number" + }, + "execCalldataHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "grantNonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "index": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "mode": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "nonceKey": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nonceSeq": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "sessionHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "signerChainId": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "JobNamespace": { + "type": "import(\"sdk/src/lib/job/types\").JobNamespace", + "members": { + "cancel": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, options?: import(\"sdk/src/lib/job/types\").JobWriteOptions) => Promise" + }, + "claimRefund": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, options?: import(\"sdk/src/lib/job/types\").JobWriteOptions) => Promise" + }, + "create": { + "optional": false, + "readonly": false, + "type": "(options: import(\"sdk/src/lib/job/types\").CreateJobOptions) => Promise<{\n jobId: bigint;\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n}>" + }, + "fund": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, options?: import(\"sdk/src/lib/job/types\").FundJobOptions) => Promise" + }, + "list": { + "optional": false, + "readonly": false, + "type": "(options?: {\n client?: `0x${string}`;\n fromJobId?: bigint;\n provider?: `0x${string}`;\n status?: import(\"sdk/src/lib/job/types\").JobStatus;\n}) => Promise<{\n jobs: import(\"sdk/src/lib/job/types\").Job[];\n}>" + }, + "setBudget": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, amount: bigint, options?: {\n jobSpec?: `0x${string}`;\n} & import(\"sdk/src/lib/job/types\").JobWriteOptions) => Promise" + }, + "status": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint) => Promise" + }, + "submit": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, options: {\n deliverable: `0x${string}` | string;\n} & import(\"sdk/src/lib/job/types\").JobWriteOptions) => Promise" + }, + "verify": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, options?: import(\"sdk/src/lib/job/types\").JobWriteOptions) => Promise" + }, + "watch": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, callback: (event: import(\"sdk/src/lib/job/types\").JobEvent) => void, options?: {\n fromBlock?: bigint;\n pollIntervalMs?: number;\n}) => () => void" + } + } + }, + "Job": { + "type": "import(\"sdk/src/lib/job/types\").Job", + "members": { + "budget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "client": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deliverable": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "description": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "evaluation": { + "optional": false, + "readonly": false, + "type": "{\n available: false;\n reason: \"MANUAL_EVALUATOR\" | \"UNVERIFIED_EVALUATOR\";\n}" + }, + "evaluator": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "expiredAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hook": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "jobId": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "jobSpec": { + "optional": true, + "readonly": false, + "type": "{\n bytes: `0x${string}`;\n frozen?: boolean;\n spec: import(\"sdk/src/lib/job-spec/types\").JobSpec;\n} | undefined" + }, + "jobSpecDecodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "paymentToken": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "provider": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"Completed\" | \"Expired\" | \"Funded\" | \"Open\" | \"Rejected\" | \"Submitted\"" + } + } + }, + "JobStatus": { + "type": "\"Completed\" | \"Expired\" | \"Funded\" | \"Open\" | \"Rejected\" | \"Submitted\"", + "members": {} + }, + "JobEvent": { + "type": "import(\"sdk/src/lib/job/types\").JobEvent", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "unknown" + }, + "error": { + "optional": true, + "readonly": false, + "type": "unknown" + }, + "jobId": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "string" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "CreateJobOptions": { + "type": "import(\"sdk/src/lib/job/types\").CreateJobOptions", + "members": { + "description": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "evaluator": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "expiredAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hook": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "jobSpec": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "paymentToken": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/market/runtime\").StackProgressHook | undefined" + }, + "provider": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "FundJobOptions": { + "type": "import(\"sdk/src/lib/job/types\").FundJobOptions", + "members": { + "expectedBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/market/runtime\").StackProgressHook | undefined" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "JobSpec": { + "type": "import(\"sdk/src/lib/job-spec/types\").JobSpec", + "members": { + "allowedMutability": { + "optional": false, + "readonly": false, + "type": "\"BOTH\" | \"CLIENT\" | \"NONE\" | \"PROVIDER\"" + }, + "checks": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobCheck[]" + }, + "executeBy": { + "optional": false, + "readonly": false, + "type": "number" + }, + "failFinalAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "logic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").LogicTree" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobRead[]" + } + } + }, + "JobSpecTemplate": { + "type": "import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate", + "members": { + "allowedMutability": { + "optional": false, + "readonly": false, + "type": "\"BOTH\" | \"CLIENT\" | \"NONE\" | \"PROVIDER\"" + }, + "checks": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobCheckTemplate[]" + }, + "logic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").LogicTree" + }, + "params": { + "optional": false, + "readonly": false, + "type": "{\n max: bigint;\n min: bigint;\n}[]" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobRead[]" + } + } + }, + "JobRead": { + "type": "import(\"sdk/src/lib/job-spec/types\").JobRead", + "members": { + "args": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "field": { + "optional": false, + "readonly": false, + "type": "number[]" + }, + "fills": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobFill[] | undefined" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outputs": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedJobRead": { + "type": "import(\"sdk/src/lib/job-spec/types\").PreparedJobRead", + "members": { + "args": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fills": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobFill[] | undefined" + }, + "outputs": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "JobReadInput": { + "type": "import(\"sdk/src/lib/job-spec/types\").JobReadInput", + "members": { + "field": { + "optional": true, + "readonly": false, + "type": "number[] | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "read": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").PreparedJobRead" + } + } + }, + "JobCheck": { + "type": "import(\"sdk/src/lib/job-spec/types\").JobCheck", + "members": { + "evaluation": { + "optional": false, + "readonly": false, + "type": "\"BOOLEAN\" | \"COMPARE\" | \"NUMBER\" | \"PERCENTAGE\"" + }, + "operation": { + "optional": false, + "readonly": false, + "type": "\"EQUAL\" | \"GREATER_OR_EQUAL\" | \"GREATER_THAN\" | \"LESS_OR_EQUAL\" | \"LESS_THAN\" | \"NOT_EQUAL\"" + }, + "read": { + "optional": false, + "readonly": false, + "type": "number" + }, + "target": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "JobCheckTemplate": { + "type": "import(\"sdk/src/lib/job-spec/types\").JobCheckTemplate", + "members": { + "evaluation": { + "optional": false, + "readonly": false, + "type": "\"BOOLEAN\" | \"COMPARE\" | \"NUMBER\" | \"PERCENTAGE\"" + }, + "operation": { + "optional": false, + "readonly": false, + "type": "\"EQUAL\" | \"GREATER_OR_EQUAL\" | \"GREATER_THAN\" | \"LESS_OR_EQUAL\" | \"LESS_THAN\" | \"NOT_EQUAL\"" + }, + "read": { + "optional": false, + "readonly": false, + "type": "number" + }, + "target": { + "optional": false, + "readonly": false, + "type": "\"agentic:principal\" | \"agentic:wallet\" | {\n param: number;\n} | {\n principalBps: bigint;\n} | bigint" + } + } + }, + "LogicTree": { + "type": "import(\"sdk/src/lib/job-spec/types\").LogicTree", + "members": { + "k": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"ALL\" | \"ANY\" | \"AT_LEAST\"" + }, + "of": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/job-spec/types\").LogicTree | number)[]" + } + } + }, + "Evaluation": { + "type": "\"BOOLEAN\" | \"COMPARE\" | \"NUMBER\" | \"PERCENTAGE\"", + "members": {} + }, + "Operation": { + "type": "\"EQUAL\" | \"GREATER_OR_EQUAL\" | \"GREATER_THAN\" | \"LESS_OR_EQUAL\" | \"LESS_THAN\" | \"NOT_EQUAL\"", + "members": {} + }, + "LogicKind": { + "type": "\"ALL\" | \"ANY\" | \"AT_LEAST\"", + "members": {} + }, + "AllowedMutability": { + "type": "\"BOTH\" | \"CLIENT\" | \"NONE\" | \"PROVIDER\"", + "members": {} + }, + "PrincipalMarker": { + "type": "\"agentic:principal\"", + "members": {} + }, + "PrepareJobReadOptions": { + "type": "import(\"sdk/src/lib/job-spec/types\").PrepareJobReadOptions", + "members": { + "abi": { + "optional": false, + "readonly": false, + "type": "readonly (import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/abitype/dist/types/abi\").AbiConstructor | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/abitype/dist/types/abi\").AbiError | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/abitype/dist/types/abi\").AbiFallback | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/abitype/dist/types/abi\").AbiReceive | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiEvent | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction)[]" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "functionName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "BuildJobSpecOptions": { + "type": "import(\"sdk/src/lib/job-spec/types\").BuildJobSpecOptions", + "members": { + "allowedMutability": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").AllowedMutability | undefined" + }, + "checks": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobCheck[]" + }, + "executeBy": { + "optional": false, + "readonly": false, + "type": "number" + }, + "expiredAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "failFinalAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "logic": { + "optional": false, + "readonly": false, + "type": "\"ALL\" | \"ANY\" | import(\"sdk/src/lib/job-spec/types\").LogicTree" + }, + "origin": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/job-spec/types\").JobReadInput | import(\"sdk/src/lib/job-spec/types\").PreparedJobRead)[]" + } + } + }, + "BuildJobSpecTemplateOptions": { + "type": "import(\"sdk/src/lib/job-spec/types\").BuildJobSpecTemplateOptions", + "members": { + "allowedMutability": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").AllowedMutability | undefined" + }, + "checks": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobCheckTemplate[]" + }, + "logic": { + "optional": false, + "readonly": false, + "type": "\"ALL\" | \"ANY\" | import(\"sdk/src/lib/job-spec/types\").LogicTree" + }, + "params": { + "optional": true, + "readonly": false, + "type": "{\n max: bigint;\n min: bigint;\n}[] | undefined" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/job-spec/types\").JobReadInput | import(\"sdk/src/lib/job-spec/types\").PreparedJobRead)[]" + } + } + }, + "JobSpecPreview": { + "type": "import(\"sdk/src/lib/job-spec/types\").JobSpecPreview", + "members": { + "checks": { + "optional": false, + "readonly": false, + "type": "{\n pass: boolean | null;\n reason?: string;\n value: bigint | null;\n}[]" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n paid: bigint;\n quoted: bigint;\n}" + }, + "pass": { + "optional": false, + "readonly": false, + "type": "boolean | null" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n decoded: bigint | null;\n error?: string;\n response: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse;\n value: `0x${string}` | null;\n}[]" + } + } + }, + "PreviewJobSpecOptions": { + "type": "import(\"sdk/src/lib/job-spec/types\").PreviewJobSpecOptions", + "members": { + "accounts": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "baseline": { + "optional": true, + "readonly": false, + "type": "readonly (bigint | null)[] | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "client": { + "optional": false, + "readonly": false, + "type": "{\n universal: {\n get origin(): ReturnType;\n get account(): ReturnType;\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n read: ((subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>) & {\n prepare: (options: import(\"sdk/src/lib/job-spec/types\").PrepareJobReadOptions) => import(\"sdk/src/lib/job-spec/types\").PreparedJobRead;\n };\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n };\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxTotalFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "params": { + "optional": true, + "readonly": false, + "type": "bigint[] | undefined" + }, + "principal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n callData: `0x${string}`;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"callData\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "callData": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n callData: `0x${string}`;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"callData\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "callData": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n callData: `0x${string}`;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"callData\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n callData?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "callData": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n callData: unknown;\n} | {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly DELETE_NEEDS_TARGET: \"DELETE_NEEDS_TARGET\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REQUEST_REJECTED: \"REQUEST_REJECTED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly TOKEN_ROUTE_UNAVAILABLE: \"TOKEN_ROUTE_UNAVAILABLE\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "DELETE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"DELETE_NEEDS_TARGET\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REQUEST_REJECTED": { + "optional": false, + "readonly": true, + "type": "\"REQUEST_REJECTED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "TOKEN_ROUTE_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"TOKEN_ROUTE_UNAVAILABLE\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "Code" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "userMessage": { + "optional": false, + "readonly": true, + "type": "string" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "userMessage": { + "optional": false, + "readonly": true, + "type": "string" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REQUEST_REJECTED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"TOKEN_ROUTE_UNAVAILABLE\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n delete(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n delete(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall", + "members": { + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Pin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "DecodedSolanaRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[]" + }, + "ceaAccounts": { + "optional": false, + "readonly": false, + "type": "readonly `0x${string}`[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`solana:${string}`" + }, + "dataPins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmDataPinWire[]" + }, + "expectedCEA": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "format": { + "optional": false, + "readonly": false, + "type": "\"decoded\"" + }, + "gatewayProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmAccountPinWire[]" + }, + "programs": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").AllowedProgramWire[]" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RuleInput": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[] | import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Pin": { + "type": "{\n account: number;\n arg?: never;\n expected: \"agentic:wallet\" | string;\n max?: never;\n token?: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected: \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint;\n max?: never;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected?: never;\n max: bigint;\n}", + "members": { + "account": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "arg": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath | undefined" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "bigint | string | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "Spent": { + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"native\" | \"universal\"" + } + } + }, + "WalletMarker": { + "type": "\"agentic:wallet\"", + "members": {} + }, + "ArgumentPath": { + "type": "number | readonly number[]", + "members": {} + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "spent": { + "optional": false, + "readonly": false, + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "job": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job/types\").JobNamespace" + }, + "market": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/market/types\").MarketNamespace" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: ((subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>) & {\n prepare: (options: import(\"sdk/src/lib/job-spec/types\").PrepareJobReadOptions) => import(\"sdk/src/lib/job-spec/types\").PreparedJobRead;\n };\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + }, + "Preset": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").Preset", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace[]" + }, + "constant": { + "optional": false, + "readonly": false, + "type": "\"DEXES\" | \"LENDING\" | \"PREDICTION\" | \"STAKING\"" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"CATEGORY\"" + } + } + }, + "PresetCategory": { + "type": "\"DEXES\" | \"LENDING\" | \"PREDICTION\" | \"STAKING\"", + "members": {} + }, + "PresetAsset": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "PresetOptions": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetOptions", + "members": { + "agent": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "funding": { + "optional": true, + "readonly": false, + "type": "\"destination\" | \"push\" | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "network": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadyPresetOptions": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").ReadyPresetOptions", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "funding": { + "optional": true, + "readonly": false, + "type": "\"destination\" | \"push\" | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "network": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "PresetRuleTemplate": { + "type": "{\n agent?: `0x${string}`;\n validUntil?: number;\n} & Omit", + "members": { + "agent": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "PresetResult": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetResult", + "members": { + "readiness": { + "optional": false, + "readonly": false, + "type": "{\n chains: import(\"sdk/src/lib/agentic/presets/types\").PresetChainReadiness[];\n ready: boolean;\n}" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "T[]" + } + } + }, + "PresetChainReadiness": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetChainReadiness", + "members": { + "bridgeAssets": { + "optional": false, + "readonly": false, + "type": "{\n prc20?: `0x${string}`;\n status: \"registered\" | \"unavailable\";\n token: string;\n}[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "configurationReady": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "disabledCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetCallIssue[]" + }, + "excludedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetCallIssue[]" + }, + "funding": { + "optional": false, + "readonly": false, + "type": "\"destination\" | \"push\"" + }, + "issues": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetConfigurationIssue[]" + }, + "knownTokens": { + "optional": false, + "readonly": false, + "type": "string[]" + }, + "ready": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "selectedAssets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[]" + }, + "zeroBridgeLimits": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "PresetConfigurationIssue": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetConfigurationIssue", + "members": { + "code": { + "optional": false, + "readonly": false, + "type": "\"AGENT_REQUIRED\" | \"AGW_NETWORK_UNAVAILABLE\" | \"ASSETS_REQUIRED\" | \"BRIDGE_ASSET_UNAVAILABLE\" | \"DESTINATION_UNAVAILABLE\" | \"EXPIRY_REQUIRED\" | \"GAS_BUDGET_REQUIRED\" | \"NO_ENABLED_OPERATION\" | \"TOKEN_PAIR_REQUIRED\"" + }, + "message": { + "optional": false, + "readonly": false, + "type": "string" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PresetCallIssue": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetCallIssue", + "members": { + "alternative": { + "optional": true, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector | undefined" + }, + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "reason": { + "optional": false, + "readonly": false, + "type": "\"DYNAMIC_AMOUNT\" | \"POSITION_AMOUNT\" | \"SHARE_AMOUNT\" | \"TOKEN_REQUIRED\" | \"UNSELECTED_TOKEN\" | \"ZERO_CAP\"" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "AgenticPresets": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").AgenticPresets", + "members": { + "get": { + "optional": false, + "readonly": false, + "type": "{\n (preset: import(\"sdk/src/lib/agentic/presets/types\").PresetCategory, options: import(\"sdk/src/lib/agentic/presets/types\").ReadyPresetOptions): import(\"sdk/src/lib/agentic/presets/types\").PresetResult;\n (preset: import(\"sdk/src/lib/agentic/presets/types\").PresetCategory, options?: import(\"sdk/src/lib/agentic/presets/types\").PresetOptions): import(\"sdk/src/lib/agentic/presets/types\").PresetResult;\n}" + }, + "list": { + "optional": false, + "readonly": false, + "type": "(options?: {\n type?: \"CATEGORY\";\n}) => {\n presets: import(\"sdk/src/lib/agentic/presets/types\").Preset[];\n}" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly<{\n JOB: Readonly<{\n ADDRESS: Readonly<{\n \"eip155:42101\": Readonly<{\n EVALUATOR: \"0x1afC81396f1bb36F91f74506284952b81e4bd47c\";\n HOOK: \"0xDe7A94e510b6C571DE7880d441349689F73A32b3\";\n KERNEL: \"0x977cf1AC973E9eC4332791d531507575006157Ed\";\n }>;\n }>;\n ALLOWED_MUTABILITY: Readonly<{\n readonly BOTH: \"BOTH\";\n readonly CLIENT: \"CLIENT\";\n readonly NONE: \"NONE\";\n readonly PROVIDER: \"PROVIDER\";\n }>;\n EVALUATION: Readonly<{\n readonly BOOLEAN: \"BOOLEAN\";\n readonly COMPARE: \"COMPARE\";\n readonly NUMBER: \"NUMBER\";\n readonly PERCENTAGE: \"PERCENTAGE\";\n }>;\n LOGIC: Readonly<{\n readonly ALL: \"ALL\";\n readonly ANY: \"ANY\";\n readonly AT_LEAST: \"AT_LEAST\";\n }>;\n OPERATION: Readonly<{\n readonly EQUAL: \"EQUAL\";\n readonly GREATER_OR_EQUAL: \"GREATER_OR_EQUAL\";\n readonly GREATER_THAN: \"GREATER_THAN\";\n readonly LESS_OR_EQUAL: \"LESS_OR_EQUAL\";\n readonly LESS_THAN: \"LESS_THAN\";\n readonly NOT_EQUAL: \"NOT_EQUAL\";\n }>;\n }>;\n PRESETS: Readonly<{\n CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n }>;\n PRINCIPAL: \"agentic:principal\";\n WALLET: \"agentic:wallet\";\n }>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "job": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job/types\").JobNamespace" + }, + "market": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/market/types\").MarketNamespace" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: ((subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>) & {\n prepare: (options: import(\"sdk/src/lib/job-spec/types\").PrepareJobReadOptions) => import(\"sdk/src/lib/job-spec/types\").PreparedJobRead;\n };\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "((subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>) & {\n prepare: (options: import(\"sdk/src/lib/job-spec/types\").PrepareJobReadOptions) => import(\"sdk/src/lib/job-spec/types\").PreparedJobRead;\n}" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": true, + "type": "{\n readonly presets: import(\"sdk/src/lib/agentic/presets/types\").AgenticPresets;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "job": { + "optional": false, + "readonly": true, + "type": "{\n readonly buildJobSpec: (options: import(\"sdk/src/lib/job-spec/types\").BuildJobSpecOptions) => import(\"sdk/src/lib/job-spec/types\").JobSpec;\n readonly buildJobSpecTemplate: (options: import(\"sdk/src/lib/job-spec/types\").BuildJobSpecTemplateOptions) => import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate;\n readonly decodeJobSpec: (bytes: `0x${string}`, options?: {\n format?: \"spec\" | \"template\";\n }) => import(\"sdk/src/lib/job-spec/types\").JobSpec | import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate;\n readonly describeJobSpec: (spec: import(\"sdk/src/lib/job-spec/types\").JobSpec | import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate, options?: {\n decimals?: Record<`0x${string}`, number>;\n principal?: bigint;\n }) => {\n checks: string[];\n logic: string;\n timing: string;\n };\n readonly encodeJobSpec: (spec: import(\"sdk/src/lib/job-spec/types\").JobSpec | import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate) => `0x${string}`;\n readonly prepareRead: (options: import(\"sdk/src/lib/job-spec/types\").PrepareJobReadOptions) => import(\"sdk/src/lib/job-spec/types\").PreparedJobRead;\n readonly previewJobSpec: (subject: import(\"sdk/src/lib/job-spec/types\").JobSpec | import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate, options: import(\"sdk/src/lib/job-spec/types\").PreviewJobSpecOptions) => Promise;\n}" + }, + "market": { + "optional": false, + "readonly": true, + "type": "{\n readonly decodeAgentCardRules: (bytes: `0x${string}`, _options?: {\n chain?: string;\n }) => import(\"sdk/src/lib/market/rules\").AgentCardRules;\n readonly encodeAgentCardRules: (rules: import(\"sdk/src/lib/market/rules\").AgentCardRules, options: {\n chain: string;\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => `0x${string}`;\n readonly validateAgentCardRules: (rules: import(\"sdk/src/lib/market/rules\").AgentCardRules) => void;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address: (token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "JOB": { + "optional": false, + "readonly": true, + "type": "{\n readonly ADDRESS: Readonly<{\n \"eip155:42101\": Readonly<{\n EVALUATOR: \"0x1afC81396f1bb36F91f74506284952b81e4bd47c\";\n HOOK: \"0xDe7A94e510b6C571DE7880d441349689F73A32b3\";\n KERNEL: \"0x977cf1AC973E9eC4332791d531507575006157Ed\";\n }>;\n }>;\n readonly ALLOWED_MUTABILITY: Readonly<{\n readonly BOTH: \"BOTH\";\n readonly CLIENT: \"CLIENT\";\n readonly NONE: \"NONE\";\n readonly PROVIDER: \"PROVIDER\";\n }>;\n readonly EVALUATION: Readonly<{\n readonly BOOLEAN: \"BOOLEAN\";\n readonly COMPARE: \"COMPARE\";\n readonly NUMBER: \"NUMBER\";\n readonly PERCENTAGE: \"PERCENTAGE\";\n }>;\n readonly LOGIC: Readonly<{\n readonly ALL: \"ALL\";\n readonly ANY: \"ANY\";\n readonly AT_LEAST: \"AT_LEAST\";\n }>;\n readonly OPERATION: Readonly<{\n readonly EQUAL: \"EQUAL\";\n readonly GREATER_OR_EQUAL: \"GREATER_OR_EQUAL\";\n readonly GREATER_THAN: \"GREATER_THAN\";\n readonly LESS_OR_EQUAL: \"LESS_OR_EQUAL\";\n readonly LESS_THAN: \"LESS_THAN\";\n readonly NOT_EQUAL: \"NOT_EQUAL\";\n }>;\n}" + }, + "PRESETS": { + "optional": false, + "readonly": true, + "type": "{\n readonly CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n}" + }, + "PRINCIPAL": { + "optional": false, + "readonly": true, + "type": "\"agentic:principal\"" + }, + "WALLET": { + "optional": false, + "readonly": true, + "type": "\"agentic:wallet\"" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly JOB: Readonly<{\n ADDRESS: Readonly<{\n \"eip155:42101\": Readonly<{\n EVALUATOR: \"0x1afC81396f1bb36F91f74506284952b81e4bd47c\";\n HOOK: \"0xDe7A94e510b6C571DE7880d441349689F73A32b3\";\n KERNEL: \"0x977cf1AC973E9eC4332791d531507575006157Ed\";\n }>;\n }>;\n ALLOWED_MUTABILITY: Readonly<{\n readonly BOTH: \"BOTH\";\n readonly CLIENT: \"CLIENT\";\n readonly NONE: \"NONE\";\n readonly PROVIDER: \"PROVIDER\";\n }>;\n EVALUATION: Readonly<{\n readonly BOOLEAN: \"BOOLEAN\";\n readonly COMPARE: \"COMPARE\";\n readonly NUMBER: \"NUMBER\";\n readonly PERCENTAGE: \"PERCENTAGE\";\n }>;\n LOGIC: Readonly<{\n readonly ALL: \"ALL\";\n readonly ANY: \"ANY\";\n readonly AT_LEAST: \"AT_LEAST\";\n }>;\n OPERATION: Readonly<{\n readonly EQUAL: \"EQUAL\";\n readonly GREATER_OR_EQUAL: \"GREATER_OR_EQUAL\";\n readonly GREATER_THAN: \"GREATER_THAN\";\n readonly LESS_OR_EQUAL: \"LESS_OR_EQUAL\";\n readonly LESS_THAN: \"LESS_THAN\";\n readonly NOT_EQUAL: \"NOT_EQUAL\";\n }>;\n }>;\n readonly PRESETS: Readonly<{\n CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n }>;\n readonly PRINCIPAL: \"agentic:principal\";\n readonly WALLET: \"agentic:wallet\";\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "scope": "All root exports and declared public members, PushChain static/instance members, universal transaction methods, utility groups, readonly/optional markers and constants. Behavior/default/deployment changes need the written session review." +} diff --git a/plan/marketplace/research/sdk-completion-2026-10-20/checked-files.json b/plan/marketplace/research/sdk-completion-2026-10-20/checked-files.json new file mode 100644 index 00000000..e3dbd419 --- /dev/null +++ b/plan/marketplace/research/sdk-completion-2026-10-20/checked-files.json @@ -0,0 +1,26 @@ +{ + "packages/core/MARKETPLACE.md": "547516cf3ef347d8e059142fc8d967afca3f03e1c47193bebde6fae6eeaaa801", + "packages/core/__e2e__/ci/suite.ts": "fd528e0c75b4d2e0bfc01b6336091ba136178f7952db07a33ae7452f24a7596f", + "packages/core/__e2e__/marketplace/lifecycle.spec.ts": "b7ea948bb8a8540e27eef856af067d7d51f9bd77e441aa13180cdf07cb33295e", + "packages/core/__market-local__/marketplace.spec.ts": "23b3f0870757aeaabe2b85ae313285c02ffea85c716ab4baec922c2b55bf6ea5", + "packages/core/src/lib/agentic/contracts/reader.ts": "921505236f5638fd18c0d2fcc8785aa745fa3303e8021d93c3c930f9424927e8", + "packages/core/src/lib/index.ts": "d5f9ad83b60a66aa6e783e1f5d4f17207d8e377a1b3a688d7ddca232426448ac", + "packages/core/src/lib/job-spec/__tests__/preview.spec.ts": "79dabbfcf0dd263bee30ecaf9e6a8be49f98060e9198a7737a2bc0845a7721c7", + "packages/core/src/lib/job-spec/index.ts": "3b73738d3ec98ebcf1647290b6cefc19336c44b14cb6bd41286fe84d406b3552", + "packages/core/src/lib/job-spec/preview.ts": "4dc58baca25f0d8c32256f46a3cf031904658a677c60d684489e415a369bc9e4", + "packages/core/src/lib/job-spec/types.ts": "b366597ed55fc9422e9b28061df9b9415706ca5dc573a476743483d96b908220", + "packages/core/src/lib/market/__tests__/deposit.spec.ts": "e1bf898a9f968bed106966c8a242aac4b84e76733212cb09875dd570722c745a", + "packages/core/src/lib/market/__tests__/namespace.spec.ts": "c0dcb8a6935eff9b699ae83315af947865b19abfda827ed54d1731d88f3d9878", + "packages/core/src/lib/market/deposit.ts": "08477c23eb1e9839314b44dadb5b3f2d4caff13bb1ff4591c449ed0b41851e2b", + "packages/core/src/lib/market/market.ts": "16bb784e3b85ea7142eb3dae3330d3bcf8e63d8871eeaf4a8718a1da028f089b", + "packages/core/src/lib/market/runtime.ts": "c1edc24388a95017faf40c61787450065b7e45eea04f0a592dca9163579f5117", + "packages/core/src/lib/market/types.ts": "5efae83dfa72700bea8b4ba0b2dd5bcb12763bd25a44240b58f713e39cb11ec0", + "packages/core/src/lib/push-chain/push-chain.ts": "07557f22aeca81fdbf439809d250c9b82db12407f118dedd158033dc843c4986", + "packages/core/src/lib/read-state/__tests__/read-params.spec.ts": "9697bb18f68d77c992660afeb7c3054d714578d9e2990c0ea3957070f7113b0e", + "packages/core/src/lib/read-state/__tests__/read-types.spec.ts": "aff7635de52788f01ec0bdb179107955f75596b1e00424cf7bb8ccdfe4f8e801", + "packages/core/src/lib/read-state/read-params.ts": "7498768193f8a52e62588ea5bd69ffa644382df3429309a2944f384a0982adbb", + "plan/SDK-CHANGELOG.md": "73f250af43684b7b4eb229ff9c25ced774f17a9f00bb22dd2e92985f9e756f0f", + "plan/marketplace/README.md": "b3cc6d56410ca0021437460a5030dfe70240a7b84c68dc2b19bbb4855b1c491a", + "plan/marketplace/implementation-status.md": "3e6c1640db31edff2afd8691acaff0c4b0cf5558895f6c24226ae1992d37d97e", + "plan/marketplace/questions.md": "5477c16741f46abcecedd8867e23541469a484291ad15713889695ea151ec182" +} diff --git a/plan/marketplace/research/sdk-completion-2026-10-20/fork-results.json b/plan/marketplace/research/sdk-completion-2026-10-20/fork-results.json new file mode 100644 index 00000000..f148240f --- /dev/null +++ b/plan/marketplace/research/sdk-completion-2026-10-20/fork-results.json @@ -0,0 +1 @@ +{"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":1,"numPassedTests":8,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":1,"numTotalTests":8,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1792499329850,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":[],"duration":34624,"failureDetails":[],"failureMessages":[],"fullName":"registers and discovers a real v2 provider card through the public namespace","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"registers and discovers a real v2 provider card through the public namespace"},{"ancestorTitles":[],"duration":34253,"failureDetails":[],"failureMessages":[],"fullName":"previews and signs the exact on-chain JobSpec, opens on real AGW v6, and preserves binary bytes","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"previews and signs the exact on-chain JobSpec, opens on real AGW v6, and preserves binary bytes"},{"ancestorTitles":[],"duration":28,"failureDetails":[],"failureMessages":[],"fullName":"updates a decoded card without losing rule constraints or template wire bytes","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"updates a decoded card without losing rule constraints or template wire bytes"},{"ancestorTitles":[],"duration":8963,"failureDetails":[],"failureMessages":[],"fullName":"deposits original principal, fee and PC after a card update and recovers history in a fresh client","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"deposits original principal, fee and PC after a card update and recovers history in a fresh client"},{"ancestorTitles":[],"duration":3188,"failureDetails":[],"failureMessages":[],"fullName":"funds through the real rules hook and submits as the provider; manual evaluator completes locally","invocations":1,"location":null,"numPassingAsserts":10,"retryReasons":[],"status":"passed","title":"funds through the real rules hook and submits as the provider; manual evaluator completes locally"},{"ancestorTitles":[],"duration":3661,"failureDetails":[],"failureMessages":[],"fullName":"creates a plain job and allows third-party refund while the kernel is paused","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"creates a plain job and allows third-party refund while the kernel is paused"},{"ancestorTitles":[],"duration":31613,"failureDetails":[],"failureMessages":[],"fullName":"rejects a tampered plan before signing and atomically cancels a second job with permission revocation","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"rejects a tampered plan before signing and atomically cancels a second job with permission revocation"},{"ancestorTitles":[],"duration":32169,"failureDetails":[],"failureMessages":[],"fullName":"accepts a real deployed EVM UEA owner signature with its home-chain domain","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"accepts a real deployed EVM UEA owner signature with its home-chain domain"}],"endTime":1792499484318,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__market-local__/marketplace.spec.ts","startTime":1792499329873,"status":"passed","summary":""}],"wasInterrupted":false} diff --git a/plan/marketplace/research/sdk-completion-2026-10-20/live-evidence.json b/plan/marketplace/research/sdk-completion-2026-10-20/live-evidence.json new file mode 100644 index 00000000..da4e14b9 --- /dev/null +++ b/plan/marketplace/research/sdk-completion-2026-10-20/live-evidence.json @@ -0,0 +1,67 @@ +[ + { + "name": "marketplace-register", + "at": "2026-10-20T12:21:32.942Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "cardId": "3", + "txHash": "0x4fa8144b3187a138f1dafd2e15fb7e2746caf9d6c1b5792f58559de049faef0d" + }, + { + "name": "marketplace-open", + "at": "2026-10-20T12:21:51.874Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "jobId": "2", + "wallet": "0x3dA787ac28639116EDe5Fd34CFce0820e74f91f1", + "rulesId": "0xf7789ce3dc79b3a52ec15584ae208e3cc987e95f27d520c424c5284e9a124f47", + "txHash": "0x5ccf837039ea26439624c48f187715de40684a069f4d41b3bf63b0dcbd70fe60" + }, + { + "name": "marketplace-cancel-cleanup", + "at": "2026-10-20T12:22:10.902Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "cardId": "3", + "wallet": "0x3dA787ac28639116EDe5Fd34CFce0820e74f91f1", + "jobId": "2", + "txHash": "0x83465e2001df92c35a26add94647c3d1a55a435f7658acaed168babf589116aa" + }, + { + "name": "marketplace-paid-preview", + "at": "2026-10-20T12:22:27.580Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "pass": true, + "fees": { + "quoted": "1687500000000000", + "paid": "1687500000000000" + }, + "reads": [ + { + "decoded": "0", + "requestId": "0xdf67c96355ab3ba26248c0dd05a597683336927ebfdcee568948f12070ebb3bc", + "txHash": "0xbb03de6faffaebb972e77a07e6887028ed6b59d3adcb44bb7a4627f108ea57a5", + "outcome": "SUCCESS" + } + ] + }, + { + "name": "marketplace-external-open", + "at": "2026-10-20T12:23:09.977Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "jobId": "3", + "wallet": "0x1772FE5B6C48F1A0D78F65342dF62C99F25C094F", + "uea": "0x5C2029EbBAC9F5643775CB60a7609d0e8D57412D", + "signerChainId": "11155111" + }, + { + "name": "marketplace-external-cleanup", + "at": "2026-10-20T12:23:29.162Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "jobId": "3", + "cardId": "3" + } +] diff --git a/plan/marketplace/research/sdk-completion-2026-10-20/live-results.json b/plan/marketplace/research/sdk-completion-2026-10-20/live-results.json new file mode 100644 index 00000000..39109f12 --- /dev/null +++ b/plan/marketplace/research/sdk-completion-2026-10-20/live-results.json @@ -0,0 +1,31 @@ +{ + "completedAt": "2026-10-20T12:23:34.223Z", + "numTotalTests": 3, + "numPassedTests": 3, + "numFailedTests": 0, + "numPendingTests": 0, + "success": false, + "tests": [ + { + "file": "marketplace/lifecycle.spec.ts", + "fullName": "marketplace live 1. native provider registration, reviewed open and atomic cancel/revoke on BSC Testnet", + "status": "passed", + "duration": 49337, + "error": null + }, + { + "file": "marketplace/lifecycle.spec.ts", + "fullName": "marketplace live 2. paid JobSpec preview reaches live validator consensus through the registry", + "status": "passed", + "duration": 16678, + "error": null + }, + { + "file": "marketplace/lifecycle.spec.ts", + "fullName": "marketplace live 3. external EVM owner opens and cancels through its real Push UEA transport", + "status": "passed", + "duration": 61582, + "error": null + } + ] +} \ No newline at end of file diff --git a/plan/marketplace/research/sdk-completion-2026-10-20/post-live-state.json b/plan/marketplace/research/sdk-completion-2026-10-20/post-live-state.json new file mode 100644 index 00000000..aa8c1816 --- /dev/null +++ b/plan/marketplace/research/sdk-completion-2026-10-20/post-live-state.json @@ -0,0 +1,45 @@ +{ + "observedAt": "2026-10-20T12:29:52.424Z", + "block": "24451338", + "card": { + "cardId": "3", + "version": "1", + "active": false + }, + "jobs": [ + { + "jobId": "2", + "status": 4, + "budget": "0", + "client": "0x3dA787ac28639116EDe5Fd34CFce0820e74f91f1", + "owner": "0xFeC7BB20316c4BB85EE0517958F7A80BA0c59b68", + "rulesId": "0xf7789ce3dc79b3a52ec15584ae208e3cc987e95f27d520c424c5284e9a124f47", + "permissionEnabled": false + }, + { + "jobId": "3", + "status": 4, + "budget": "0", + "client": "0x1772FE5B6C48F1A0D78F65342dF62C99F25C094F", + "owner": "0x5C2029EbBAC9F5643775CB60a7609d0e8D57412D", + "rulesId": "0xf7789ce3dc79b3a52ec15584ae208e3cc987e95f27d520c424c5284e9a124f47", + "permissionEnabled": false + } + ], + "openings": [ + { + "jobId": "2", + "txHash": "0x5ccf837039ea26439624c48f187715de40684a069f4d41b3bf63b0dcbd70fe60", + "blockNumber": "24451140", + "agw": "0x3dA787ac28639116EDe5Fd34CFce0820e74f91f1", + "owner": "0xFeC7BB20316c4BB85EE0517958F7A80BA0c59b68" + }, + { + "jobId": "3", + "txHash": "0x261fee7f7ade8d13527345af4184f22e4b4e8010a9ef000d16f7ca2cd3157aa9", + "blockNumber": "24451172", + "agw": "0x1772FE5B6C48F1A0D78F65342dF62C99F25C094F", + "owner": "0x5C2029EbBAC9F5643775CB60a7609d0e8D57412D" + } + ] +} diff --git a/plan/marketplace/research/sdk-completion-2026-10-20/unit-results.json.gz b/plan/marketplace/research/sdk-completion-2026-10-20/unit-results.json.gz new file mode 100644 index 00000000..2b0f07b2 Binary files /dev/null and b/plan/marketplace/research/sdk-completion-2026-10-20/unit-results.json.gz differ diff --git a/plan/marketplace/research/sdk-completion-2026-10-20/validation-summary.json b/plan/marketplace/research/sdk-completion-2026-10-20/validation-summary.json new file mode 100644 index 00000000..2f160b61 --- /dev/null +++ b/plan/marketplace/research/sdk-completion-2026-10-20/validation-summary.json @@ -0,0 +1,42 @@ +{ + "observedAt": "2026-10-20T12:35:01.320Z", + "baselineCommit": "fbd0e032940e523b18bb0d6f8fd80b23beae1c67", + "unit": { + "passed": 2228, + "skipped": 12, + "failed": 0, + "success": true + }, + "fork": { + "passed": 8, + "failed": 0, + "runnerExitCode": 0 + }, + "live": { + "passed": 3, + "failed": 0, + "skipped": 0, + "runnerExitCode": 0, + "originalReporterSuccessField": false + }, + "build": "passed", + "libraryTypes": "passed via build", + "specTypes": "passed", + "forkTypes": "passed", + "productionLint": "passed with zero warnings", + "guideBlocks": 6, + "compiledPackageChecks": "passed", + "sourceBuiltApiMatches": true, + "unitCompression": { + "originalBytes": 867010, + "originalSha256": "8914770e18d3d0506c35ec3c4a8d22c5401a5d1e84385a91c0f37e5df560fbdc", + "compressedBytes": 73812, + "compressedSha256": "dc570dc99cf90c567bb1ebacc3a59b76ce3b30b6461f1057f35d6dbad15b9b2a" + }, + "limits": [ + "Origin deposit routing is unit-tested; no funded live origin bridge deposit.", + "Principal, escrow and payouts are fork-only.", + "No compatible automatic evaluator or destination protocol execution.", + "Arbitrary ERC-1271 adapters require separate acceptance." + ] +} diff --git a/plan/marketplace/research/sdk-implementation-2026-10-20/README.md b/plan/marketplace/research/sdk-implementation-2026-10-20/README.md new file mode 100644 index 00000000..4ef384a5 --- /dev/null +++ b/plan/marketplace/research/sdk-implementation-2026-10-20/README.md @@ -0,0 +1,42 @@ +# SDK implementation acceptance — October 20 + +Implementation targets `sdk-iteration-v1@443b4e2`, AGW `ffd567d`, and the deployed v2 stack. This is separate from the earlier contract-only review in research/2026-10-20. Consumer documentation: [MARKETPLACE.md](../../../../packages/core/MARKETPLACE.md). + +## Evidence + +| Check | Result | +| --- | --- | +| Full units | [unit-results.json](unit-results.json): 2,205 passed, 12 existing skips, no failures | +| Fork E2Es | [fork-results.json](fork-results.json): 6 passed against real deployed v2/v6 on Anvil fork block 24447347 | +| Live smoke | [live-results.json](live-results.json), [transactions](live-evidence.json): runner exited 0; one matching test passed, none failed/pending | +| CEA routing | [cea-routing.json](cea-routing.json): three factory/account mismatches; BSC Testnet matches | +| API | [api-comparison.json](api-comparison.json): compiled public surface matches source. Recorded baseline changes include earlier AGW work; this is not an assertion that every listed delta was introduced by this checkpoint. | + +Fork writes and evaluator/admin impersonation occur **only on localhost**. The paid case transfers existing pUSDC from a fork-impersonated holder to the test AGW, approves/pulls actual pUSDC into the real kernel, and checks the provider payout. It does not mint or transfer those tokens on public Donut. The live test has zero provider fee and no principal deposit/export or escrow transfer. + +The local fixture uses actual viem actions/contracts, short polling, longer local RPC timeouts and explicit Anvil confirmation mining. No successful SDK/contract result is mocked. This avoids premature receipt queries falling through to the fork provider. Native sender confirmation timing can still make the run take around two minutes. + +## Live scope and cleanup + +Card 1 registered in the initial attempt; opening failed at gas estimation with the shared master, whose code is EIP-7702 delegation. That card was deactivated. No job was opened by that attempt. The SDK now gates delegated/contract owners before signing rather than applying an untested plain-EOA signature path. + +The passing attempt used a new native owner and provider, registered card 2, opened job 1 on wallet `0xAc1A9778518AbaAE12367f7932C30c114d4940AE`, cancelled it and revoked its grant, then deactivated card 2. Public transaction hashes are in live-evidence.json. No signing keys or unbroadcast authorization payloads are retained here. + +The existing CI reporter sampled `results.success` as false in its onRunComplete callback despite one passed test, zero failures and runner exit 0. The raw live report is retained unchanged. Assess this run using its test status/counts and actual runner exit; the discrepancy is recorded rather than silently rewriting evidence. It is not a claim of one clean full marketplace suite invocation across local/live groups. + +## Commands + +```sh +node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand --silent +node node_modules/jest/bin/jest.js --config packages/core/jest.marketplace-local.config.ts --runInBand +node node_modules/ts-node/dist/bin.js --compiler-options '{"module":"commonjs"}' packages/core/__e2e__/ci/run.ts --group marketplace +node node_modules/ts-node/dist/bin.js --compiler-options '{"module":"commonjs"}' packages/core/__e2e__/ci/run.ts --group marketplace-live +node packages/core/scripts/check-agw-docs.js packages/core/MARKETPLACE.md +NX_DAEMON=false node node_modules/nx/bin/nx.js run core:build --skip-nx-cache +node packages/core/scripts/check-agw-package.js +node packages/core/scripts/check-agw-api.js --output /tmp/marketplace-api.json +``` + +Earlier selected test attempts exposed the old constant-key assertion, the three-chain CEA mismatch, local receipt timing and the test's card-version/implicit-price assumption. They were corrected or explicitly gated. The final unit/fork result files contain the final passing runs, not a claim that every earlier attempt passed. + +No package publication, contract deployment, mainnet transaction, automated evaluator execution or destination protocol transaction was performed. Existing full AGW contract harness counts remain their earlier evidence; this checkpoint's real-contract coverage is the six SDK fork E2Es plus the live smoke. diff --git a/plan/marketplace/research/sdk-implementation-2026-10-20/api-comparison.json b/plan/marketplace/research/sdk-implementation-2026-10-20/api-comparison.json new file mode 100644 index 00000000..df1175b1 --- /dev/null +++ b/plan/marketplace/research/sdk-implementation-2026-10-20/api-comparison.json @@ -0,0 +1,13167 @@ +{ + "baseline": "b1597b91a25dbf7f691f589b4e1e154add604315", + "head": "51487e21486f50722765e82c5cfd1374e8e22ad7", + "compiledMatchesSource": true, + "initializeSignatureChanged": false, + "addedExports": [ + "AgentCard", + "AgentCardInput", + "AgentCardRules", + "AgentCardSummary", + "AgenticPresets", + "AllowedMutability", + "ArgumentPath", + "BuildJobSpecOptions", + "BuildJobSpecTemplateOptions", + "CreateJobOptions", + "DecodedSolanaRule", + "Evaluation", + "FundJobOptions", + "Job", + "JobCheck", + "JobCheckTemplate", + "JobError", + "JobEvent", + "JobNamespace", + "JobPlan", + "JobRead", + "JobReadInput", + "JobSpec", + "JobSpecError", + "JobSpecPreview", + "JobSpecTemplate", + "JobStatus", + "LogicKind", + "LogicTree", + "MarketAssetToken", + "MarketError", + "MarketNamespace", + "MarketPin", + "MarketPreviewOptions", + "Operation", + "OwnerIntent", + "Pin", + "PrepareJobReadOptions", + "PreparedJobRead", + "Preset", + "PresetAsset", + "PresetCallIssue", + "PresetCategory", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetOptions", + "PresetResult", + "PresetRuleTemplate", + "PrincipalMarker", + "ReadyPresetOptions", + "RuleInput", + "Spent", + "WalletMarker" + ], + "removedExports": [ + "AgenticNetworkConstants", + "NativeRule", + "UniversalRule" + ], + "changedAgwTypes": [ + "AgenticWallet", + "AgenticError", + "AgenticRevertError", + "AGENTIC_ERROR_CODE", + "Rule", + "RuleInput", + "Pin", + "Spent", + "NativeRule", + "AssetCap", + "AllowedCall", + "UniversalRule", + "RulesRecord", + "CreateOptions", + "AgenticTxMetadata" + ], + "publicTypeChanges": [ + "MarketError", + "JobError", + "JobSpecError", + "AgentCardRules", + "MarketAssetToken", + "MarketPin", + "AgentCard", + "AgentCardInput", + "AgentCardSummary", + "MarketNamespace", + "MarketPreviewOptions", + "JobPlan", + "OwnerIntent", + "JobNamespace", + "Job", + "JobStatus", + "JobEvent", + "CreateJobOptions", + "FundJobOptions", + "JobSpec", + "JobSpecTemplate", + "JobRead", + "PreparedJobRead", + "JobReadInput", + "JobCheck", + "JobCheckTemplate", + "LogicTree", + "Evaluation", + "Operation", + "LogicKind", + "AllowedMutability", + "PrincipalMarker", + "PrepareJobReadOptions", + "BuildJobSpecOptions", + "BuildJobSpecTemplateOptions", + "JobSpecPreview", + "AGENTIC_ERROR_CODE", + "AgenticError", + "AgenticRevertError", + "AgenticErrorCode", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "CreateOptions", + "DecodedSolanaRule", + "Rule", + "RuleInput", + "Pin", + "Spent", + "WalletMarker", + "ArgumentPath", + "RulesRecord", + "PushChain", + "Preset", + "PresetCategory", + "PresetAsset", + "PresetOptions", + "ReadyPresetOptions", + "PresetRuleTemplate", + "PresetResult", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetCallIssue", + "AgenticPresets" + ], + "transactionMethodChanges": [ + "read" + ], + "instanceMethodChanges": [ + "job", + "market", + "universal" + ], + "agwConstantsChanged": true, + "before": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticNetworkConstants", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AssetCap", + "BatchReadResponse", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DerivedExecutorAccount", + "EncodedReadQuery", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "NativeRule", + "OutboundTxDetails", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "PreparedRead", + "PreparedUniversalTx", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalRule", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly CREATE_PARTIAL: \"CREATE_PARTIAL\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly GATEWAY_ALLOWANCE_INSUFFICIENT: \"GATEWAY_ALLOWANCE_INSUFFICIENT\";\n readonly GENERATION_UNSUPPORTED: \"GENERATION_UNSUPPORTED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REVOKE_NEEDS_TARGET: \"REVOKE_NEEDS_TARGET\";\n readonly RULE_LIMIT_EXCEEDED: \"RULE_LIMIT_EXCEEDED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "CREATE_PARTIAL": { + "optional": false, + "readonly": true, + "type": "\"CREATE_PARTIAL\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "GATEWAY_ALLOWANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"GATEWAY_ALLOWANCE_INSUFFICIENT\"" + }, + "GENERATION_UNSUPPORTED": { + "optional": false, + "readonly": true, + "type": "\"GENERATION_UNSUPPORTED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REVOKE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"REVOKE_NEEDS_TARGET\"" + }, + "RULE_LIMIT_EXCEEDED": { + "optional": false, + "readonly": true, + "type": "\"RULE_LIMIT_EXCEEDED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"CREATE_PARTIAL\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"GATEWAY_ALLOWANCE_INSUFFICIENT\" | \"GENERATION_UNSUPPORTED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REVOKE_NEEDS_TARGET\" | \"RULE_LIMIT_EXCEEDED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticNetworkConstants": { + "type": "import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants", + "members": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").Rule[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n revoke(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n revoke(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall", + "members": { + "beneficiary": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`${string}(${string})` | `0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/constants/tokens\").MoveableToken" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "NativeRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "amount": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AmountLimit | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "maxCalls": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "maxValuePerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxValueTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgPin[] | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").NativeRule | import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "UniversalRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").UniversalRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AllowedCall[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AssetCap[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "ref": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly>>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "{\n actionId: (target: `0x${string}`, selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector) => `0x${string}`;\n configId: (wallet: `0x${string}`, rulesId: `0x${string}`, actionId: `0x${string}`) => `0x${string}`;\n decodeRules: (bytes: `0x${string}`, ctx?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n pushChainNamespace?: string;\n }) => import(\"sdk/src/lib/agentic/agentic.types\").Rule;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address(token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }): {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "ENVELOPE_VERSION": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "FACTORY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "MAX_ALLOWED_CALLS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "MAX_PINS": { + "optional": false, + "readonly": false, + "type": "number" + }, + "RULES_POLICY": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly LOCALNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly MAINNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n readonly TESTNET_DONUT?: import(\"sdk/src/lib/agentic/constants\").AgenticNetworkConstants | undefined;\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "after": { + "exports": [ + "AGENTIC_ERROR_CODE", + "AccountRole", + "AccountStatus", + "AccountType", + "AgentCard", + "AgentCardInput", + "AgentCardRules", + "AgentCardSummary", + "AgenticAddress", + "AgenticDoor", + "AgenticError", + "AgenticErrorCode", + "AgenticHex", + "AgenticNamespace", + "AgenticPresets", + "AgenticProgressHook", + "AgenticRevertError", + "AgenticTxMetadata", + "AgenticWallet", + "AllowedCall", + "AllowedMutability", + "ArgumentPath", + "AssetCap", + "BatchReadResponse", + "BuildJobSpecOptions", + "BuildJobSpecTemplateOptions", + "BuildReadSpecParams", + "CHAIN", + "CONTRACT_REQUEST_STATUS", + "CascadeCompletionResult", + "CascadeHopInfo", + "CascadeProgressEvent", + "CascadeTrackOptions", + "CascadedTxResponse", + "ChainSource", + "ChainTarget", + "Checkpoint", + "CheckpointKind", + "ConversionQuote", + "CreateJobOptions", + "CreateOptions", + "CreateResult", + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS", + "DecodedErrorPayload", + "DecodedReadResult", + "DecodedSolanaRule", + "DerivedExecutorAccount", + "EncodedReadQuery", + "Evaluation", + "EvmReadQuery", + "ForeignChainNamespace", + "FulfilOutcome", + "FundJobOptions", + "FundsToken", + "InsufficientPC20BalanceError", + "InvalidPC20AddressError", + "InvalidPC20MetadataError", + "InvalidReadQueryError", + "InvalidReadSpecError", + "Job", + "JobCheck", + "JobCheckTemplate", + "JobError", + "JobEvent", + "JobNamespace", + "JobPlan", + "JobRead", + "JobReadInput", + "JobSpec", + "JobSpecError", + "JobSpecPreview", + "JobSpecTemplate", + "JobStatus", + "LogicKind", + "LogicTree", + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT", + "MarketAssetToken", + "MarketError", + "MarketNamespace", + "MarketPin", + "MarketPreviewOptions", + "MaxPCForGasCapFromNativeValueInput", + "MaxPCForGasCapInput", + "MaxPCForGasCapQuote", + "MultiChainTxResponse", + "Operation", + "OutboundTxDetails", + "OwnerIntent", + "PC20AddressResult", + "PC20AmbiguousAddressError", + "PC20Error", + "PC20ExpectedButPRC20Error", + "PC20ExportRevertedError", + "PC20FactoryMismatchError", + "PC20RegistryEntry", + "PC20RegistryMismatchError", + "PC20TokenChainMismatchError", + "PC20TokenReference", + "PC20UnknownChainNamespaceError", + "PC20UnsafeEmptyPayloadError", + "PC20WrapperNotRegisteredError", + "PC20WrapperPredictionUnavailableError", + "ParsedReadRequest", + "Pin", + "PrepareJobReadOptions", + "PreparedJobRead", + "PreparedRead", + "PreparedUniversalTx", + "Preset", + "PresetAsset", + "PresetCallIssue", + "PresetCategory", + "PresetChainReadiness", + "PresetConfigurationIssue", + "PresetOptions", + "PresetResult", + "PresetRuleTemplate", + "PrincipalMarker", + "PushChain", + "PushChainBatchExecutionError", + "PushChainExecutionError", + "PushChainInitializeOptions", + "READ_ERROR_CODE", + "READ_OUTCOME", + "READ_STATUS", + "ReadCallback", + "ReadCallbackOptions", + "ReadChain", + "ReadDecodeError", + "ReadDestination", + "ReadExecuteOptions", + "ReadFees", + "ReadHeightUnavailableError", + "ReadLifecycleOptions", + "ReadNotFoundError", + "ReadOptions", + "ReadPreflight", + "ReadPrepareOptions", + "ReadQuery", + "ReadQueryOptions", + "ReadRef", + "ReadRegistryUnavailableError", + "ReadResponseTuple", + "ReadResultShape", + "ReadSpec", + "ReadSpecTuple", + "ReadSpecViolation", + "ReadStateError", + "ReadTimeoutError", + "ReadTrackOptions", + "ReadValue", + "ReadWeb2Options", + "ReadyPresetOptions", + "ReceiptLike", + "RescueFundsParams", + "ResolvedAccount", + "ResolvedControllerAccounts", + "ResolvedDestination", + "Rule", + "RuleInput", + "RulesRecord", + "Selector", + "SignAuthorizationParams", + "SignedAuthorization", + "SimulateReadResult", + "Spent", + "SvmExecutePayloadFields", + "SvmGatewayAccountMeta", + "SvmReadQuery", + "TERMINAL_READ_STATUSES", + "TransactionRoute", + "TransactionRouteType", + "UEAStatus", + "UNIVERSAL_CALLBACK_EVM", + "UNIVERSAL_READ_REGISTRY_EVM", + "UNIVERSAL_READ_STATUS", + "UniversalAccount", + "UniversalExecuteParams", + "UniversalOutboundTxRequest", + "UniversalReadResponse", + "UniversalSigner", + "UniversalSignerSkeleton", + "UniversalTo", + "UnsupportedPC20DestinationError", + "UnsupportedReadDestinationError", + "ValidateReadCall", + "WaitForOutboundOptions", + "WalletInfo", + "WalletMarker", + "WalletSummary", + "Web2Extract", + "Web2ReadQuery", + "Web2ValueType", + "buildErc20WithdrawalMulticall", + "buildMigrationPayload", + "buildReadSpecFromPreflight", + "chainSupportsCEA", + "chainSupportsOutbound", + "decodeReadResult", + "detectRoute", + "encodeReadQuery", + "encodeSvmExecutePayload", + "getAllCEAAddresses", + "getCEAAddress", + "getCEAFactoryAddress", + "getPushAccountForCEA", + "inferResultShape", + "isCEA", + "isChainTarget", + "isPC20Reference", + "isSvmChain", + "isValidSolanaHexAddress", + "parseFulfilOutcome", + "parseReadRequestsFromReceipt", + "parseUEAVersion", + "quoteMaxPCForGasCap", + "quoteMaxPCForGasCapFromNativeValue", + "resolveDestination", + "sizeCallbackBudget", + "toCallData", + "toReadQuery", + "toRequestIdHex", + "validateReadSpec" + ], + "agw": { + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n delete(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n delete(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "Code" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "userMessage": { + "optional": false, + "readonly": true, + "type": "string" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "userMessage": { + "optional": false, + "readonly": true, + "type": "string" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly DELETE_NEEDS_TARGET: \"DELETE_NEEDS_TARGET\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REQUEST_REJECTED: \"REQUEST_REJECTED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly TOKEN_ROUTE_UNAVAILABLE: \"TOKEN_ROUTE_UNAVAILABLE\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "DELETE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"DELETE_NEEDS_TARGET\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REQUEST_REJECTED": { + "optional": false, + "readonly": true, + "type": "\"REQUEST_REJECTED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "TOKEN_ROUTE_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"TOKEN_ROUTE_UNAVAILABLE\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RuleInput": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[] | import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Pin": { + "type": "{\n account: number;\n arg?: never;\n expected: \"agentic:wallet\" | string;\n max?: never;\n token?: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected: \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint;\n max?: never;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected?: never;\n max: bigint;\n}", + "members": { + "account": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "arg": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath | undefined" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "bigint | string | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "Spent": { + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"native\" | \"universal\"" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall", + "members": { + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Pin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "spent": { + "optional": false, + "readonly": false, + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + } + }, + "publicSurface": { + "MarketError": { + "type": "import(\"sdk/src/lib/market/errors\").MarketError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "userMessage": { + "optional": false, + "readonly": true, + "type": "string" + } + } + }, + "JobError": { + "type": "import(\"sdk/src/lib/market/errors\").JobError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "userMessage": { + "optional": false, + "readonly": true, + "type": "string" + } + } + }, + "JobSpecError": { + "type": "import(\"sdk/src/lib/market/errors\").JobSpecError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "userMessage": { + "optional": false, + "readonly": true, + "type": "string" + } + } + }, + "AgentCardRules": { + "type": "import(\"sdk/src/lib/market/rules\").AgentCardRules", + "members": { + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "{\n maxValue?: bigint;\n pins?: import(\"sdk/src/lib/market/rules\").MarketPin[];\n selector: string;\n target: `0x${string}`;\n}[]" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: \"agentic:principal\" | bigint;\n maxTotal?: \"agentic:principal\" | bigint;\n token: import(\"sdk/src/lib/market/rules\").MarketAssetToken;\n}[]" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "principalAsset": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "MarketAssetToken": { + "type": "{\n prc20: `0x${string}`;\n} | import(\"sdk/src/lib/constants/tokens\").MoveableToken | string", + "members": {} + }, + "MarketPin": { + "type": "{\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected: \"agentic:principal\" | \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint | boolean;\n max?: never;\n} | {\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected?: never;\n max: \"agentic:principal\" | bigint;\n}", + "members": { + "arg": { + "optional": false, + "readonly": false, + "type": "number | readonly number[]" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "\"agentic:principal\" | \"agentic:wallet\" | `0x${string}` | bigint | boolean | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "\"agentic:principal\" | bigint | undefined" + } + } + }, + "AgentCard": { + "type": "import(\"sdk/src/lib/market/types\").AgentCard", + "members": { + "active": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "cardId": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "disabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "jobSpecTemplate": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate" + }, + "jobSpecTemplateBytes": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "jobType": { + "optional": false, + "readonly": false, + "type": "string" + }, + "maxDuration": { + "optional": false, + "readonly": false, + "type": "number" + }, + "metadataHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "metadataURI": { + "optional": false, + "readonly": false, + "type": "string" + }, + "minDuration": { + "optional": false, + "readonly": false, + "type": "number" + }, + "minExecuteWindow": { + "optional": false, + "readonly": false, + "type": "number" + }, + "paymentToken": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "principalMax": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "principalMin": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "provider": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "providerFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "rating": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/market/rules\").AgentCardRules" + }, + "rulesBytes": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "settleWindow": { + "optional": false, + "readonly": false, + "type": "number" + }, + "verified": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "AgentCardInput": { + "type": "import(\"sdk/src/lib/market/types\").AgentCardInput", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "jobType": { + "optional": false, + "readonly": false, + "type": "string" + }, + "maxDuration": { + "optional": false, + "readonly": false, + "type": "number" + }, + "metadataHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "metadataURI": { + "optional": false, + "readonly": false, + "type": "string" + }, + "minDuration": { + "optional": false, + "readonly": false, + "type": "number" + }, + "minExecuteWindow": { + "optional": false, + "readonly": false, + "type": "number" + }, + "paymentToken": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "principalMax": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "principalMin": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "providerFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "settleWindow": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "AgentCardSummary": { + "type": "{\n active: boolean;\n cardId: bigint;\n chain: string;\n disabled: boolean;\n jobType: string;\n maxDuration: number;\n metadataHash: `0x${string}`;\n metadataURI: string;\n minDuration: number;\n minExecuteWindow: number;\n paymentToken: `0x${string}`;\n principalMax: bigint;\n principalMin: bigint;\n provider: `0x${string}`;\n providerFee: bigint;\n rating: bigint;\n settleWindow: number;\n verified: boolean;\n version: bigint;\n}", + "members": { + "active": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "cardId": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "disabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "jobType": { + "optional": false, + "readonly": false, + "type": "string" + }, + "maxDuration": { + "optional": false, + "readonly": false, + "type": "number" + }, + "metadataHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "metadataURI": { + "optional": false, + "readonly": false, + "type": "string" + }, + "minDuration": { + "optional": false, + "readonly": false, + "type": "number" + }, + "minExecuteWindow": { + "optional": false, + "readonly": false, + "type": "number" + }, + "paymentToken": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "principalMax": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "principalMin": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "provider": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "providerFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "rating": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "settleWindow": { + "optional": false, + "readonly": false, + "type": "number" + }, + "verified": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MarketNamespace": { + "type": "import(\"sdk/src/lib/market/types\").MarketNamespace", + "members": { + "activeJob": { + "optional": false, + "readonly": false, + "type": "(wallet: `0x${string}`) => Promise<{\n jobId: bigint;\n}>" + }, + "agent": { + "optional": false, + "readonly": false, + "type": "{\n card(): Promise;\n register(card: import(\"sdk/src/lib/market/types\").AgentCardInput, options: {\n jobSpecTemplate: import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate;\n rules: import(\"sdk/src/lib/market/rules\").AgentCardRules;\n } & import(\"sdk/src/lib/market/types\").MarketWriteOptions): Promise<{\n cardId: bigint;\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n version: bigint;\n }>;\n setActive(cardId: bigint, active: boolean, options?: import(\"sdk/src/lib/market/types\").MarketWriteOptions): Promise;\n update(cardId: bigint, card: import(\"sdk/src/lib/market/types\").AgentCardInput, options: {\n jobSpecTemplate: import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate;\n rules: import(\"sdk/src/lib/market/rules\").AgentCardRules;\n } & import(\"sdk/src/lib/market/types\").MarketWriteOptions): Promise<{\n cardId: bigint;\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n version: bigint;\n }>;\n}" + }, + "card": { + "optional": false, + "readonly": false, + "type": "(cardId: bigint) => Promise" + }, + "cards": { + "optional": false, + "readonly": false, + "type": "(options?: {\n active?: boolean;\n chain?: string;\n provider?: `0x${string}`;\n}) => Promise<{\n cards: import(\"sdk/src/lib/market/types\").AgentCardSummary[];\n}>" + }, + "deposit": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, options?: import(\"sdk/src/lib/market/types\").MarketWriteOptions) => Promise" + }, + "job": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint) => Promise<{\n cardId: bigint;\n cardVersion: bigint;\n rulesId: `0x${string}`;\n wallet: `0x${string}`;\n}>" + }, + "openJob": { + "optional": false, + "readonly": false, + "type": "(plan: import(\"sdk/src/lib/market/types\").JobPlan, options?: {\n relay?: boolean;\n} & import(\"sdk/src/lib/market/types\").MarketWriteOptions) => Promise<{\n jobId: bigint;\n rulesId: `0x${string}`;\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n wallet: `0x${string}`;\n}>" + }, + "preview": { + "optional": false, + "readonly": false, + "type": "(cardId: bigint, options: import(\"sdk/src/lib/market/types\").MarketPreviewOptions) => Promise" + } + } + }, + "MarketPreviewOptions": { + "type": "import(\"sdk/src/lib/market/types\").MarketPreviewOptions", + "members": { + "deadline": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "executeBy": { + "optional": false, + "readonly": false, + "type": "number" + }, + "expiredAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "params": { + "optional": true, + "readonly": false, + "type": "bigint[] | undefined" + }, + "principal": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "walletIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "JobPlan": { + "type": "import(\"sdk/src/lib/market/types\").JobPlan", + "members": { + "calldata": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "cardId": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "cardVersion": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "deposit": { + "optional": false, + "readonly": false, + "type": "{\n pc: bigint;\n principal: {\n amount: bigint;\n prc20: `0x${string}`;\n };\n providerFee: {\n amount: bigint;\n token: `0x${string}`;\n };\n}" + }, + "intent": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/market/types\").OwnerIntent" + }, + "job": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/market/types\").MarketJobInputs" + }, + "jobSpec": { + "optional": false, + "readonly": false, + "type": "{\n bytes: `0x${string}`;\n spec: import(\"sdk/src/lib/job-spec/types\").JobSpec;\n}" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "preview": { + "optional": false, + "readonly": false, + "type": "{\n judgedBy: string[];\n mayDo: string[];\n mayMove: string[];\n until: string;\n}" + }, + "session": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/codec/session\").SessionWire" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "walletDeployed": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "OwnerIntent": { + "type": "import(\"sdk/src/lib/market/types\").OwnerIntent", + "members": { + "deadline": { + "optional": false, + "readonly": false, + "type": "number" + }, + "execCalldataHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "grantNonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "index": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "mode": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "nonceKey": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nonceSeq": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "sessionHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "signerChainId": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "JobNamespace": { + "type": "import(\"sdk/src/lib/job/types\").JobNamespace", + "members": { + "cancel": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, options?: import(\"sdk/src/lib/job/types\").JobWriteOptions) => Promise" + }, + "claimRefund": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, options?: import(\"sdk/src/lib/job/types\").JobWriteOptions) => Promise" + }, + "create": { + "optional": false, + "readonly": false, + "type": "(options: import(\"sdk/src/lib/job/types\").CreateJobOptions) => Promise<{\n jobId: bigint;\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n}>" + }, + "fund": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, options?: import(\"sdk/src/lib/job/types\").FundJobOptions) => Promise" + }, + "list": { + "optional": false, + "readonly": false, + "type": "(options?: {\n client?: `0x${string}`;\n fromJobId?: bigint;\n provider?: `0x${string}`;\n status?: import(\"sdk/src/lib/job/types\").JobStatus;\n}) => Promise<{\n jobs: import(\"sdk/src/lib/job/types\").Job[];\n}>" + }, + "setBudget": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, amount: bigint, options?: {\n jobSpec?: `0x${string}`;\n} & import(\"sdk/src/lib/job/types\").JobWriteOptions) => Promise" + }, + "status": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint) => Promise" + }, + "submit": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, options: {\n deliverable: `0x${string}` | string;\n} & import(\"sdk/src/lib/job/types\").JobWriteOptions) => Promise" + }, + "verify": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, options?: import(\"sdk/src/lib/job/types\").JobWriteOptions) => Promise" + }, + "watch": { + "optional": false, + "readonly": false, + "type": "(jobId: bigint, callback: (event: import(\"sdk/src/lib/job/types\").JobEvent) => void, options?: {\n fromBlock?: bigint;\n pollIntervalMs?: number;\n}) => () => void" + } + } + }, + "Job": { + "type": "import(\"sdk/src/lib/job/types\").Job", + "members": { + "budget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "client": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deliverable": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "description": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "evaluation": { + "optional": false, + "readonly": false, + "type": "{\n available: false;\n reason: \"MANUAL_EVALUATOR\" | \"UNVERIFIED_EVALUATOR\";\n}" + }, + "evaluator": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "expiredAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hook": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "jobId": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "jobSpec": { + "optional": true, + "readonly": false, + "type": "{\n bytes: `0x${string}`;\n frozen?: boolean;\n spec: import(\"sdk/src/lib/job-spec/types\").JobSpec;\n} | undefined" + }, + "jobSpecDecodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "paymentToken": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "provider": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"Completed\" | \"Expired\" | \"Funded\" | \"Open\" | \"Rejected\" | \"Submitted\"" + } + } + }, + "JobStatus": { + "type": "\"Completed\" | \"Expired\" | \"Funded\" | \"Open\" | \"Rejected\" | \"Submitted\"", + "members": {} + }, + "JobEvent": { + "type": "import(\"sdk/src/lib/job/types\").JobEvent", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "unknown" + }, + "error": { + "optional": true, + "readonly": false, + "type": "unknown" + }, + "jobId": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "string" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "CreateJobOptions": { + "type": "import(\"sdk/src/lib/job/types\").CreateJobOptions", + "members": { + "description": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "evaluator": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "expiredAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hook": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "jobSpec": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "paymentToken": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/market/runtime\").StackProgressHook | undefined" + }, + "provider": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "FundJobOptions": { + "type": "import(\"sdk/src/lib/job/types\").FundJobOptions", + "members": { + "expectedBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/market/runtime\").StackProgressHook | undefined" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "JobSpec": { + "type": "import(\"sdk/src/lib/job-spec/types\").JobSpec", + "members": { + "allowedMutability": { + "optional": false, + "readonly": false, + "type": "\"BOTH\" | \"CLIENT\" | \"NONE\" | \"PROVIDER\"" + }, + "checks": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobCheck[]" + }, + "executeBy": { + "optional": false, + "readonly": false, + "type": "number" + }, + "failFinalAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "logic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").LogicTree" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobRead[]" + } + } + }, + "JobSpecTemplate": { + "type": "import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate", + "members": { + "allowedMutability": { + "optional": false, + "readonly": false, + "type": "\"BOTH\" | \"CLIENT\" | \"NONE\" | \"PROVIDER\"" + }, + "checks": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobCheckTemplate[]" + }, + "logic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").LogicTree" + }, + "params": { + "optional": false, + "readonly": false, + "type": "{\n max: bigint;\n min: bigint;\n}[]" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobRead[]" + } + } + }, + "JobRead": { + "type": "import(\"sdk/src/lib/job-spec/types\").JobRead", + "members": { + "args": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "field": { + "optional": false, + "readonly": false, + "type": "number[]" + }, + "fills": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobFill[] | undefined" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outputs": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedJobRead": { + "type": "import(\"sdk/src/lib/job-spec/types\").PreparedJobRead", + "members": { + "args": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fills": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobFill[] | undefined" + }, + "outputs": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "JobReadInput": { + "type": "import(\"sdk/src/lib/job-spec/types\").JobReadInput", + "members": { + "field": { + "optional": true, + "readonly": false, + "type": "number[] | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "read": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").PreparedJobRead" + } + } + }, + "JobCheck": { + "type": "import(\"sdk/src/lib/job-spec/types\").JobCheck", + "members": { + "evaluation": { + "optional": false, + "readonly": false, + "type": "\"BOOLEAN\" | \"COMPARE\" | \"NUMBER\" | \"PERCENTAGE\"" + }, + "operation": { + "optional": false, + "readonly": false, + "type": "\"EQUAL\" | \"GREATER_OR_EQUAL\" | \"GREATER_THAN\" | \"LESS_OR_EQUAL\" | \"LESS_THAN\" | \"NOT_EQUAL\"" + }, + "read": { + "optional": false, + "readonly": false, + "type": "number" + }, + "target": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "JobCheckTemplate": { + "type": "import(\"sdk/src/lib/job-spec/types\").JobCheckTemplate", + "members": { + "evaluation": { + "optional": false, + "readonly": false, + "type": "\"BOOLEAN\" | \"COMPARE\" | \"NUMBER\" | \"PERCENTAGE\"" + }, + "operation": { + "optional": false, + "readonly": false, + "type": "\"EQUAL\" | \"GREATER_OR_EQUAL\" | \"GREATER_THAN\" | \"LESS_OR_EQUAL\" | \"LESS_THAN\" | \"NOT_EQUAL\"" + }, + "read": { + "optional": false, + "readonly": false, + "type": "number" + }, + "target": { + "optional": false, + "readonly": false, + "type": "\"agentic:principal\" | \"agentic:wallet\" | {\n param: number;\n} | {\n principalBps: bigint;\n} | bigint" + } + } + }, + "LogicTree": { + "type": "import(\"sdk/src/lib/job-spec/types\").LogicTree", + "members": { + "k": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"ALL\" | \"ANY\" | \"AT_LEAST\"" + }, + "of": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/job-spec/types\").LogicTree | number)[]" + } + } + }, + "Evaluation": { + "type": "\"BOOLEAN\" | \"COMPARE\" | \"NUMBER\" | \"PERCENTAGE\"", + "members": {} + }, + "Operation": { + "type": "\"EQUAL\" | \"GREATER_OR_EQUAL\" | \"GREATER_THAN\" | \"LESS_OR_EQUAL\" | \"LESS_THAN\" | \"NOT_EQUAL\"", + "members": {} + }, + "LogicKind": { + "type": "\"ALL\" | \"ANY\" | \"AT_LEAST\"", + "members": {} + }, + "AllowedMutability": { + "type": "\"BOTH\" | \"CLIENT\" | \"NONE\" | \"PROVIDER\"", + "members": {} + }, + "PrincipalMarker": { + "type": "\"agentic:principal\"", + "members": {} + }, + "PrepareJobReadOptions": { + "type": "import(\"sdk/src/lib/job-spec/types\").PrepareJobReadOptions", + "members": { + "abi": { + "optional": false, + "readonly": false, + "type": "readonly (import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/abitype/dist/types/abi\").AbiConstructor | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/abitype/dist/types/abi\").AbiError | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/abitype/dist/types/abi\").AbiFallback | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/abitype/dist/types/abi\").AbiReceive | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiEvent | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction)[]" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "functionName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "BuildJobSpecOptions": { + "type": "import(\"sdk/src/lib/job-spec/types\").BuildJobSpecOptions", + "members": { + "allowedMutability": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").AllowedMutability | undefined" + }, + "checks": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobCheck[]" + }, + "executeBy": { + "optional": false, + "readonly": false, + "type": "number" + }, + "expiredAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "failFinalAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "logic": { + "optional": false, + "readonly": false, + "type": "\"ALL\" | \"ANY\" | import(\"sdk/src/lib/job-spec/types\").LogicTree" + }, + "origin": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/job-spec/types\").JobReadInput | import(\"sdk/src/lib/job-spec/types\").PreparedJobRead)[]" + } + } + }, + "BuildJobSpecTemplateOptions": { + "type": "import(\"sdk/src/lib/job-spec/types\").BuildJobSpecTemplateOptions", + "members": { + "allowedMutability": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").AllowedMutability | undefined" + }, + "checks": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job-spec/types\").JobCheckTemplate[]" + }, + "logic": { + "optional": false, + "readonly": false, + "type": "\"ALL\" | \"ANY\" | import(\"sdk/src/lib/job-spec/types\").LogicTree" + }, + "params": { + "optional": true, + "readonly": false, + "type": "{\n max: bigint;\n min: bigint;\n}[] | undefined" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/job-spec/types\").JobReadInput | import(\"sdk/src/lib/job-spec/types\").PreparedJobRead)[]" + } + } + }, + "JobSpecPreview": { + "type": "import(\"sdk/src/lib/job-spec/types\").JobSpecPreview", + "members": { + "checks": { + "optional": false, + "readonly": false, + "type": "{\n pass: boolean | null;\n value: bigint;\n}[]" + }, + "pass": { + "optional": false, + "readonly": false, + "type": "boolean | null" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n decoded: bigint;\n value: `0x${string}`;\n}[]" + } + } + }, + "CHAIN": { + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN", + "members": { + "ARBITRUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA" + }, + "BASE_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA" + }, + "BNB_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET" + }, + "ETHEREUM_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET" + }, + "ETHEREUM_SEPOLIA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA" + }, + "PUSH_LOCALNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET" + }, + "PUSH_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET" + }, + "PUSH_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "PUSH_TESTNET_DONUT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET" + }, + "SOLANA_DEVNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET" + }, + "SOLANA_MAINNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET" + }, + "SOLANA_TESTNET": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET" + }, + "WEB2": { + "optional": false, + "readonly": false, + "type": "\"web2\"" + } + } + }, + "ConversionQuote": { + "type": "import(\"sdk/src/lib/constants/tokens\").ConversionQuote", + "members": { + "amountIn": { + "optional": false, + "readonly": false, + "type": "string" + }, + "amountOut": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rate": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": true, + "readonly": false, + "type": "string[] | undefined" + }, + "timestamp": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "UniversalSigner": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSigner", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "UniversalAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalSignerSkeleton": { + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "signAndSendTransaction": { + "optional": false, + "readonly": false, + "type": "(unsignedTx: Uint8Array) => Promise" + }, + "signAuthorization": { + "optional": true, + "readonly": false, + "type": "((params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise) | undefined" + }, + "signerId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": true, + "readonly": false, + "type": "(({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise) | undefined" + } + } + }, + "SignAuthorizationParams": { + "type": "{\n chainId?: number;\n contractAddress: `0x${string}`;\n executor?: \"self\";\n nonce?: number;\n}", + "members": { + "chainId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "contractAddress": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executor": { + "optional": true, + "readonly": false, + "type": "\"self\" | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SignedAuthorization": { + "type": "{\n address: `0x${string}`;\n chainId: number;\n nonce: number;\n r: `0x${string}`;\n s: `0x${string}`;\n v?: bigint;\n yParity: number;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "number" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "number" + }, + "r": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "s": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "v": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "yParity": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "DerivedExecutorAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").DerivedExecutorAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean | null" + } + } + }, + "ResolvedAccount": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + }, + "exists": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "role": { + "optional": true, + "readonly": false, + "type": "\"controller\" | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"cea\" | \"uea\" | \"uoa\"" + } + } + }, + "ResolvedControllerAccounts": { + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedControllerAccounts", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").ResolvedAccount[]" + } + } + }, + "AccountType": { + "type": "\"cea\" | \"uea\" | \"uoa\"", + "members": {} + }, + "AccountRole": { + "type": "\"controller\"", + "members": {} + }, + "PC20TokenReference": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "FundsToken": { + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20RegistryEntry": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "chainName": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "PC20AddressResult": { + "type": "{\n address: `0x${string}`;\n decimals: number;\n name: string;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n registry: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[];\n symbol: string;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "decimals": { + "optional": false, + "readonly": false, + "type": "number" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "registry": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20RegistryEntry[]" + }, + "symbol": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "isPC20Reference": { + "type": "(token: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken | undefined) => token is import(\"sdk/src/lib/orchestrator/orchestrator.types\").PC20TokenReference", + "members": {} + }, + "PC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20AddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20AddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20TokenChainMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20TokenChainMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperNotRegisteredError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperNotRegisteredError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20RegistryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20RegistryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20FactoryMismatchError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20FactoryMismatchError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidPC20MetadataError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InvalidPC20MetadataError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExpectedButPRC20Error": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExpectedButPRC20Error", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20AmbiguousAddressError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20AmbiguousAddressError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "candidates": { + "optional": false, + "readonly": true, + "type": "{\n chain: string;\n pushAddress: string;\n}[]" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedPC20DestinationError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").UnsupportedPC20DestinationError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InsufficientPC20BalanceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").InsufficientPC20BalanceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnknownChainNamespaceError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnknownChainNamespaceError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20WrapperPredictionUnavailableError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20WrapperPredictionUnavailableError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20ExportRevertedError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20ExportRevertedError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lockedAmount": { + "optional": true, + "readonly": true, + "type": "bigint | undefined" + }, + "outboundTxId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "revertRecipient": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PC20UnsafeEmptyPayloadError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/pc20/errors\").PC20UnsafeEmptyPayloadError", + "members": { + "address": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "expectedChain": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ChainTarget": { + "type": "{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "ChainSource": { + "type": "{\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n}", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + } + } + }, + "UniversalTo": { + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "TransactionRouteType": { + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"", + "members": {} + }, + "UniversalExecuteParams": { + "type": "{\n from?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource;\n migration?: boolean;\n to: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTo;\n} & Omit", + "members": { + "_minimumDepositUsd": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_requiredFundsOverride": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "_skipFeeLocking": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "_ueaStatus": { + "optional": true, + "readonly": false, + "type": "{\n balance: bigint;\n isDeployed: boolean;\n nonce: bigint;\n} | undefined" + }, + "data": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[] | undefined" + }, + "deadline": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "feeLockTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "from": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainSource | undefined" + }, + "funds": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n token?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").FundsToken;\n} | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPCForGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxPriorityFeePerGas": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "migration": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "nonce": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "options": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions | undefined" + }, + "payGasWith": { + "optional": true, + "readonly": false, + "type": "{\n minAmountOut?: bigint | string;\n slippageBps?: number;\n token?: import(\"sdk/src/lib/constants/tokens\").PayableToken;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "to": { + "optional": false, + "readonly": false, + "type": "`0x${string}` | import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget" + }, + "value": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "UniversalOutboundTxRequest": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "token": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "PreparedUniversalTx": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx", + "members": { + "_hop": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").HopDescriptor" + }, + "deadline": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "estimatedGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "gatewayRequest": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalOutboundTxRequest | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxRequest" + }, + "nonce": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "payload": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + } + } + }, + "CascadedTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse", + "members": { + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopCount": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "initialTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "initialTxResponse": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + }, + "waitForAll": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions) => Promise" + } + } + }, + "CascadeHopInfo": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo", + "members": { + "executionChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "expectedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "outboundDetails": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails | undefined" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"pending\" | \"submitted\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeTrackOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeTrackOptions", + "members": { + "eventHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "CascadeProgressEvent": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeProgressEvent", + "members": { + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "elapsed": { + "optional": false, + "readonly": false, + "type": "number" + }, + "hopIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "route": { + "optional": false, + "readonly": false, + "type": "\"CEA_TO_CEA\" | \"CEA_TO_PUSH\" | \"UOA_TO_CEA\" | \"UOA_TO_PUSH\"" + }, + "status": { + "optional": false, + "readonly": false, + "type": "\"confirmed\" | \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\"" + }, + "txHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "CascadeCompletionResult": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeCompletionResult", + "members": { + "failedAt": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "finalTxHash": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "finalTxResponse": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadedTxResponse | undefined" + }, + "hops": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeHopInfo[]" + }, + "success": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "MultiChainTxResponse": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiChainTxResponse", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "{\n blockNumber: bigint;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n hash: string;\n status: \"confirmed\" | \"failed\" | \"pending\";\n}[]" + }, + "transactions": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse[]" + } + } + }, + "OutboundTxDetails": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").OutboundTxDetails", + "members": { + "amount": { + "optional": false, + "readonly": false, + "type": "string" + }, + "assetAddr": { + "optional": false, + "readonly": false, + "type": "string" + }, + "destinationChain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "externalTxHash": { + "optional": false, + "readonly": false, + "type": "string" + }, + "recipient": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "WaitForOutboundOptions": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").WaitForOutboundOptions", + "members": { + "_expectedDestinationChain": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "_outboundIndex": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "_resolvedSubTxId": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "initialWaitMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: {\n elapsed: number;\n status: \"failed\" | \"found\" | \"polling\" | \"timeout\" | \"waiting\";\n}) => void) | undefined" + }, + "timeout": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "SvmGatewayAccountMeta": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta", + "members": { + "isWritable": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "pubkey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "SvmExecutePayloadFields": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields", + "members": { + "accounts": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmGatewayAccountMeta[]" + }, + "instructionId": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "ixData": { + "optional": false, + "readonly": false, + "type": "Uint8Array" + }, + "targetProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AccountStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus", + "members": { + "mode": { + "optional": false, + "readonly": false, + "type": "\"read-only\" | \"signer\"" + }, + "uea": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus" + } + } + }, + "UEAStatus": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UEAStatus", + "members": { + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "loaded": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "minRequiredVersion": { + "optional": false, + "readonly": false, + "type": "string" + }, + "requiresUpgrade": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "version": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "RescueFundsParams": { + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams", + "members": { + "prc20": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalTxId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "parseUEAVersion": { + "type": "(version: string) => number", + "members": {} + }, + "TransactionRoute": { + "type": "typeof import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": { + "CEA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_CEA" + }, + "CEA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.CEA_TO_PUSH" + }, + "UOA_TO_CEA": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_CEA" + }, + "UOA_TO_PUSH": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute.UOA_TO_PUSH" + } + } + }, + "detectRoute": { + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams) => import(\"sdk/src/lib/orchestrator/route-detector\").TransactionRoute", + "members": {} + }, + "isChainTarget": { + "type": "(to: unknown) => to is import(\"sdk/src/lib/orchestrator/orchestrator.types\").ChainTarget", + "members": {} + }, + "DEFAULT_MAX_PC_FOR_GAS_BUFFER_BPS": { + "type": "1000", + "members": {} + }, + "MAX_PC_FOR_GAS_BUFFER_BPS_LIMIT": { + "type": "10000", + "members": {} + }, + "quoteMaxPCForGasCap": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "quoteMaxPCForGasCapFromNativeValue": { + "type": "(input: import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput) => import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": {} + }, + "MaxPCForGasCapInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "MaxPCForGasCapFromNativeValueInput": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapFromNativeValueInput", + "members": { + "bufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "MaxPCForGasCapQuote": { + "type": "import(\"sdk/src/lib/orchestrator/max-pc-for-gas\").MaxPCForGasCapQuote", + "members": { + "bufferBps": { + "optional": false, + "readonly": false, + "type": "number" + }, + "gasLegNativePc": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxPCForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "nativeValueForGas": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "getCEAAddress": { + "type": "(ueaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "getPushAccountForCEA": { + "type": "(ceaAddress: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise<`0x${string}`>", + "members": {} + }, + "isCEA": { + "type": "(address: `0x${string}`, chain: import(\"sdk/src/lib/constants/enums\").CHAIN, rpcUrl?: string) => Promise", + "members": {} + }, + "chainSupportsCEA": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "chainSupportsOutbound": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "getCEAFactoryAddress": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => `0x${string}` | undefined", + "members": {} + }, + "getAllCEAAddresses": { + "type": "(ueaAddress: `0x${string}`, rpcUrls?: Partial>) => Promise", + "members": {} + }, + "encodeSvmExecutePayload": { + "type": "(fields: import(\"sdk/src/lib/orchestrator/orchestrator.types\").SvmExecutePayloadFields) => `0x${string}`", + "members": {} + }, + "isSvmChain": { + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => boolean", + "members": {} + }, + "isValidSolanaHexAddress": { + "type": "(address: string) => boolean", + "members": {} + }, + "buildMigrationPayload": { + "type": "() => `0x${string}`", + "members": {} + }, + "buildErc20WithdrawalMulticall": { + "type": "(tokenAddress: `0x${string}`, recipientAddress: `0x${string}`, amount: bigint) => import(\"sdk/src/lib/orchestrator/orchestrator.types\").MultiCall[]", + "members": {} + }, + "ReadChain": { + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain", + "members": {} + }, + "ReadDestination": { + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}", + "members": {} + }, + "ResolvedDestination": { + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}", + "members": { + "caip2": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainId": { + "optional": false, + "readonly": false, + "type": "string" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + } + } + }, + "ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"http\" | \"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\" | \"storageSlot\"" + } + } + }, + "EvmReadQuery": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n callData: `0x${string}`;\n target: `0x${string}`;\n type: \"contractCall\";\n} | {\n slot: `0x${string}` | bigint;\n target: `0x${string}`;\n type: \"storageSlot\";\n} | {\n target: `0x${string}`;\n type: \"accountBalance\";\n}", + "members": { + "target": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"accountBalance\" | \"contractCall\" | \"storageSlot\"" + } + } + }, + "SvmReadQuery": { + "type": "{\n account: string | Uint8Array;\n accountName?: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n type: \"rawAccountData\";\n} | {\n account: string | Uint8Array;\n type: \"lamportBalance\";\n} | {\n account: string | Uint8Array;\n type: \"splTokenAccount\";\n}", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "string | Uint8Array" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"lamportBalance\" | \"rawAccountData\" | \"splTokenAccount\"" + } + } + }, + "Web2ReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"http\"" + }, + "url": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "Web2Extract": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract", + "members": { + "decimals": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "path": { + "optional": false, + "readonly": false, + "type": "string" + }, + "valueType": { + "optional": false, + "readonly": false, + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"" + } + } + }, + "Web2ValueType": { + "type": "\"bool\" | \"bytes\" | \"int256\" | \"string\" | \"uint256\"", + "members": {} + }, + "EncodedReadQuery": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": { + "blockRef": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "encoded": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "namespace": { + "optional": false, + "readonly": false, + "type": "\"eip155\" | \"solana\" | \"web2\"" + }, + "ownerBytes": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "queryType": { + "optional": false, + "readonly": false, + "type": "number" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadResultShape": { + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "DecodedReadResult": { + "type": "{\n accountName: string;\n kind: \"svmAccount\";\n value: unknown;\n} | {\n kind: \"bytes32\";\n value: `0x${string}`;\n} | {\n kind: \"evmCall\";\n value: unknown;\n} | {\n kind: \"raw\";\n value: `0x${string}`;\n} | {\n kind: \"uint256\";\n value: bigint;\n} | {\n kind: \"web2\";\n values: readonly unknown[];\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"bytes32\" | \"evmCall\" | \"raw\" | \"svmAccount\" | \"uint256\" | \"web2\"" + } + } + }, + "ReadPreflight": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight", + "members": { + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "fetchedAt": { + "optional": false, + "readonly": false, + "type": "number" + }, + "observedChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushBlockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pushGasPrice": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "universalCallback": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "universalCore": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpec": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec", + "members": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n chainId: string;\n chainNamespace: string;\n owner: `0x${string}`;\n}" + }, + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "expiryPushChainHeight": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "minConfirmations": { + "optional": false, + "readonly": false, + "type": "number" + }, + "query": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "revertRecipient": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ReadSpecTuple": { + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "readonly [\n string,\n string,\n `0x${string}`\n]" + }, + "1": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "2": { + "optional": false, + "readonly": true, + "type": "number" + }, + "3": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "4": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "5": { + "optional": false, + "readonly": true, + "type": "bigint" + }, + "6": { + "optional": false, + "readonly": true, + "type": "`0x${string}`" + }, + "length": { + "optional": false, + "readonly": true, + "type": "7" + } + } + }, + "BuildReadSpecParams": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams", + "members": { + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "budgetBuffer": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n chain: import(\"sdk/src/lib/read-state/read-state.types\").ReadChain;\n} | {\n chainId: string;\n chainNamespace: string;\n}" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "expiryPushChainHeight": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxFeeBufferBps": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "owner": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "query": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").SvmReadQuery | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadQuery" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "PreparedRead": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": { + "__@preparedReadValue": { + "optional": true, + "readonly": true, + "type": "T | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "encodedQuery": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery" + }, + "encodedSpec": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "{\n callbackBudget: bigint;\n protocolFee: bigint;\n total: bigint;\n}" + }, + "preflight": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "queryKey": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "resultShape": { + "optional": false, + "readonly": false, + "type": "{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: string;\n kind: \"evmCall\";\n} | {\n accountName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n kind: \"svmAccount\";\n} | {\n extract: readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n kind: \"web2\";\n} | {\n kind: \"bytes32\";\n} | {\n kind: \"raw\";\n} | {\n kind: \"uint256\";\n}" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "specTuple": { + "optional": false, + "readonly": false, + "type": "readonly [\n readonly [\n string,\n string,\n `0x${string}`\n ],\n `0x${string}`,\n number,\n bigint,\n bigint,\n bigint,\n `0x${string}`\n]" + }, + "value": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "warnings": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "ReadCallback": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadCallback", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "((spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[]) | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "gasLimit": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "target": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "SimulateReadResult": { + "type": "{\n args?: readonly unknown[];\n error: string;\n errorName?: string;\n ok: false;\n} | {\n ok: true;\n}", + "members": { + "ok": { + "optional": false, + "readonly": false, + "type": "boolean" + } + } + }, + "ParsedReadRequest": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest", + "members": { + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackGasLimit": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "callbackTarget": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "logIndex": { + "optional": false, + "readonly": false, + "type": "number" + }, + "originalFunder": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "spec": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec" + }, + "totalPaid": { + "optional": false, + "readonly": false, + "type": "bigint" + } + } + }, + "FulfilOutcome": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "delivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "expired": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "failReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "gasReported": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + } + } + }, + "ReceiptLike": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike", + "members": { + "logs": { + "optional": false, + "readonly": false, + "type": "readonly {\n address: string;\n data: string;\n logIndex?: number | string;\n topics: readonly string[];\n}[]" + } + } + }, + "ReadRef": { + "type": "{\n requestId: `0x${string}` | bigint;\n} | {\n txHash: `0x${string}`;\n}", + "members": {} + }, + "ReadLifecycleOptions": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions", + "members": { + "pollingIntervalMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadFees": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees", + "members": { + "burned": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callbackBudget": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "paid": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "protocolFee": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "refunded": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "refundFailed": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UniversalReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse", + "members": { + "callbackDelivered": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "callbackFailReason": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "decoded": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult | undefined" + }, + "decodeError": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destination": { + "optional": false, + "readonly": false, + "type": "{\n caip2: string;\n chainId: string;\n chainNamespace: string;\n namespace: import(\"sdk/src/lib/constants/read-state\").ReadNamespace;\n}" + }, + "errorMsg": { + "optional": false, + "readonly": false, + "type": "string" + }, + "explorerUrl": { + "optional": false, + "readonly": false, + "type": "string" + }, + "fees": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadFees" + }, + "isTerminal": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "outcome": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME" + }, + "pcTx": { + "optional": false, + "readonly": false, + "type": "readonly {\n blockHeight: number;\n errorMsg: string;\n status: string;\n txHash: `0x${string}`;\n}[]" + }, + "raw": { + "optional": false, + "readonly": false, + "type": "{\n errorCode: import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n resultData: `0x${string}`;\n status: import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n} | null" + }, + "refresh": { + "optional": false, + "readonly": false, + "type": "() => Promise>" + }, + "request": { + "optional": false, + "readonly": false, + "type": "{\n callbackGasLimit: bigint;\n callbackTarget: `0x${string}`;\n createdAtHeight: bigint;\n logIndex: number;\n originalFunder: `0x${string}`;\n refundTo: `0x${string}`;\n spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpec;\n}" + }, + "requestId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "requestIdUint": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "status": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "value": { + "optional": true, + "readonly": false, + "type": "T | undefined" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: import(\"sdk/src/lib/read-state/read-state.types\").ReadLifecycleOptions) => Promise>" + } + } + }, + "ReadResponseTuple": { + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}", + "members": {} + }, + "BatchReadResponse": { + "type": "import(\"sdk/src/lib/read-state/read-state.types\").BatchReadResponse", + "members": { + "atomic": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "count": { + "optional": false, + "readonly": false, + "type": "number" + }, + "reads": { + "optional": false, + "readonly": false, + "type": "{\n -readonly [K in keyof R]: import(\"sdk/src/lib/read-state/read-state.types\").UniversalReadResponse ? T : unknown>;\n}" + }, + "transactionHashes": { + "optional": true, + "readonly": false, + "type": "readonly `0x${string}`[] | undefined" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "wait": { + "optional": false, + "readonly": false, + "type": "(opts?: Omit) => Promise>" + } + } + }, + "ReadOptions": { + "type": "((import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">) | (import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions & Omit<{\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n} & {\n blockNumber?: never;\n minConfirmations?: never;\n} & {\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\"> & Pick, \"advanced\" | \"progressHook\" | \"waitForCompletion\">)) & {\n callback?: (Pick & Required>) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} & {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n}) | ({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick & Pick & Required>) | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadPrepareOptions": { + "type": "((((({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">)) & {\n blockNumber?: bigint | undefined;\n minConfirmations?: number | undefined;\n}) | ((({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)) & {\n blockNumber?: never;\n minConfirmations?: never;\n})) & {\n advanced?: never;\n progressHook?: never;\n waitForCompletion?: never;\n}) & import(\"sdk/src/lib/read-state/read-params\").ReadCallbackOptions & Pick", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "advanced": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "blockNumber": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "expiryBlocks": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "maxFee": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "minConfirmations": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "refundTo": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadQueryOptions": { + "type": "({\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: readonly unknown[];\n functionName: string;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"abi\" | \"args\" | \"functionName\">) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n}) | ({\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n}) | ({\n args?: readonly unknown[];\n functionName?: string;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} & {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"args\" | \"functionName\" | \"idl\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n storageSlot: `0x${string}` | bigint;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"storageSlot\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n} & {\n token: string;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"token\">) | ({\n chain: import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain;\n} & {\n web2: import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options;\n} & Omit<{\n abi?: never;\n accountName?: never;\n args?: never;\n functionName?: never;\n idl?: never;\n storageSlot?: never;\n token?: never;\n tokenProgram?: never;\n web2?: never;\n}, \"web2\">)", + "members": { + "abi": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi | undefined" + }, + "accountName": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "args": { + "optional": true, + "readonly": false, + "type": "readonly unknown[] | undefined" + }, + "chain": { + "optional": false, + "readonly": false, + "type": "(import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET) | (import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET | import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET) | import(\"sdk/src/lib/read-state/read-state.types\").Web2ReadChain" + }, + "functionName": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "idl": { + "optional": true, + "readonly": false, + "type": "import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl | undefined" + }, + "storageSlot": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | bigint | undefined" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "tokenProgram": { + "optional": true, + "readonly": false, + "type": "undefined" + }, + "web2": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options | undefined" + } + } + }, + "ReadCallbackOptions": { + "type": "{\n callback?: ({\n gasLimit?: bigint;\n target: `0x${string}`;\n } & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n };\n}", + "members": { + "callback": { + "optional": true, + "readonly": false, + "type": "({\n gasLimit?: bigint;\n target: `0x${string}`;\n} & Pick) | {\n abi?: never;\n args?: never;\n functionName?: never;\n gasLimit?: bigint;\n target?: never;\n} | undefined" + } + } + }, + "ReadValue": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? number extends A[\"length\"] ? unknown : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, O extends {\n args: infer Args extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} ? Args : readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> & readonly [\n] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>> extends infer Selected ? Selected extends {\n outputs: readonly unknown[];\n type: \"function\";\n} & import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiFunction ? {\n [key in keyof {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }]: {\n [key in keyof import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ExtractAbiFunctionForArgs, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"]]: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterToPrimitiveType, import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>>[\"outputs\"][key], import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").AbiParameterKind>;\n }[key];\n} extends infer types ? types extends readonly [\n] ? void : types extends readonly [\n infer type\n] ? type : types : never : never : never : O extends {\n web2: {\n extract: infer E extends readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[];\n };\n} ? {\n readonly [K in keyof E]: {\n bool: boolean;\n bytes: `0x${string}`;\n int256: bigint;\n string: string;\n uint256: bigint;\n }[E[K][\"valueType\"]];\n} : O extends {\n storageSlot: unknown;\n} ? `0x${string}` : O extends {\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : (O extends {\n functionName: infer N extends string;\n} ? N : undefined) extends string ? import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[{\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase<(O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string extends `${infer H}_${infer T}` ? `${H}${Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : (O extends {\n functionName: infer N extends string;\n } ? N : undefined) & string> ? K : never;\n}[Extract, string>]] : import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/index\").IdlAccounts[Extract, string>] : bigint", + "members": {} + }, + "ValidateReadCall": { + "type": "O extends {\n abi: infer A extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n functionName: infer F extends string;\n} ? (readonly [\n] extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs> ? {\n args?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n} : {\n args: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionArgs>;\n}) & {\n functionName: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").ContractFunctionName;\n} : O extends {\n functionName: infer N extends string;\n idl: infer I extends import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n} ? string extends Extract, string> ? unknown : [\n {\n [K in Extract, string>]: Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : K> extends Lowercase}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : T>}` : N> ? K : never;\n }[Extract, string>]\n] extends [\n never\n] ? {\n functionName: Extract, string>;\n} : unknown : unknown", + "members": {} + }, + "ReadWeb2Options": { + "type": "import(\"sdk/src/lib/read-state/read-params\").ReadWeb2Options", + "members": { + "body": { + "optional": true, + "readonly": false, + "type": "string | Uint8Array | undefined" + }, + "extract": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/read-state/read-state.types\").Web2Extract[]" + }, + "headers": { + "optional": true, + "readonly": false, + "type": "Record | undefined" + }, + "method": { + "optional": true, + "readonly": false, + "type": "\"GET\" | \"POST\" | undefined" + }, + "timeoutMs": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadTrackOptions": { + "type": "{\n advanced?: Omit, \"enforceGasCheck\">;\n resultShape?: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "Omit<{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n}, \"enforceGasCheck\"> | undefined" + }, + "resultShape": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape | undefined" + } + } + }, + "ReadExecuteOptions": { + "type": "{\n advanced?: {\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n } | undefined;\n progressHook?: ((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined;\n waitForCompletion?: boolean | undefined;\n}", + "members": { + "advanced": { + "optional": true, + "readonly": false, + "type": "{\n enforceGasCheck?: boolean;\n pollingIntervalMs?: number;\n timeout?: number;\n} | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "waitForCompletion": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + } + } + }, + "UNIVERSAL_READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.ABORTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FAILED" + }, + "FULFILLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.FULFILLED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.PENDING" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.UNSPECIFIED" + }, + "VOTING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS.VOTING" + } + } + }, + "READ_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS", + "members": { + "ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.SUCCESS" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS.UNSPECIFIED" + } + } + }, + "READ_ERROR_CODE": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE", + "members": { + "INVALID_QUERY": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_QUERY" + }, + "INVALID_RESULT": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.INVALID_RESULT" + }, + "NOT_FOUND": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.NOT_FOUND" + }, + "REJECTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REJECTED" + }, + "REVERTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.REVERTED" + }, + "UNSPECIFIED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSPECIFIED" + }, + "UNSUPPORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE.UNSUPPORTED" + } + } + }, + "READ_OUTCOME": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME", + "members": { + "ABORTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.ABORTED" + }, + "CALLBACK_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.CALLBACK_FAILED" + }, + "DECODE_FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.DECODE_FAILED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.EXPIRED" + }, + "FAILED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.FAILED" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.PENDING" + }, + "SOURCE_ERROR": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SOURCE_ERROR" + }, + "SUCCESS": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.SUCCESS" + }, + "UNKNOWN": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME.UNKNOWN" + } + } + }, + "CONTRACT_REQUEST_STATUS": { + "type": "typeof import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS", + "members": { + "EXECUTED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXECUTED" + }, + "EXPIRED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.EXPIRED" + }, + "NONE": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.NONE" + }, + "PENDING": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.PENDING" + }, + "SETTLED": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/read-state/read-state.types\").CONTRACT_REQUEST_STATUS.SETTLED" + } + } + }, + "TERMINAL_READ_STATUSES": { + "type": "ReadonlySet", + "members": {} + }, + "ReadStateError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadStateError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadQueryError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadQueryError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "InvalidReadSpecError": { + "type": "import(\"sdk/src/lib/read-state/errors\").InvalidReadSpecError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "violations": { + "optional": false, + "readonly": true, + "type": "readonly import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[]" + } + } + }, + "ReadHeightUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadHeightUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "UnsupportedReadDestinationError": { + "type": "import(\"sdk/src/lib/read-state/errors\").UnsupportedReadDestinationError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadDecodeError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadDecodeError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadTimeoutError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadTimeoutError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "lastStatus": { + "optional": false, + "readonly": true, + "type": "number" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadNotFoundError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadNotFoundError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadRegistryUnavailableError": { + "type": "import(\"sdk/src/lib/read-state/errors\").ReadRegistryUnavailableError", + "members": { + "code": { + "optional": false, + "readonly": true, + "type": "string" + }, + "destination": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "requestId": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "transactionHashes": { + "optional": true, + "readonly": true, + "type": "`0x${string}`[] | undefined" + }, + "txHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "ReadSpecViolation": { + "type": "\"CALLBACK_GAS_LIMIT_EXCEEDED\" | \"DOMAIN_BLOCKED\" | \"EMPTY_QUERY\" | \"EXCESSIVE_FEE\" | \"INSUFFICIENT_CALLBACK_BUDGET\" | \"INSUFFICIENT_FEE\" | \"INVALID_ACCOUNT_ID\" | \"INVALID_BLOCK_NUMBER\" | \"INVALID_EXPIRY_HEIGHT\" | \"INVALID_MIN_CONFIRMATIONS\" | \"SVM_OWNER_NOT_32_BYTES\" | \"ZERO_CALLBACK_BUDGET\" | \"ZERO_CALLBACK_GAS_LIMIT\" | \"ZERO_REVERT_RECIPIENT\"", + "members": {} + }, + "resolveDestination": { + "type": "(dest: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination) => import(\"sdk/src/lib/read-state/read-state.types\").ResolvedDestination", + "members": {} + }, + "encodeReadQuery": { + "type": "(destination: import(\"sdk/src/lib/read-state/read-state.types\").ReadDestination, query: import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery, options?: {\n blockNumber?: bigint;\n minSlot?: bigint;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").EncodedReadQuery", + "members": {} + }, + "decodeReadResult": { + "type": "(resultData: `0x${string}`, shape: import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape) => import(\"sdk/src/lib/read-state/read-state.types\").DecodedReadResult", + "members": {} + }, + "parseReadRequestsFromReceipt": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ParsedReadRequest[]", + "members": {} + }, + "parseFulfilOutcome": { + "type": "(receipt: import(\"sdk/src/lib/read-state/read-state.types\").ReceiptLike, universalCallback: `0x${string}`, requestId: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").FulfilOutcome", + "members": {} + }, + "buildReadSpecFromPreflight": { + "type": "(preflight: import(\"sdk/src/lib/read-state/read-state.types\").ReadPreflight, params: import(\"sdk/src/lib/read-state/read-state.types\").BuildReadSpecParams, defaults?: {\n refundTo?: `0x${string}`;\n}) => import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead", + "members": {} + }, + "validateReadSpec": { + "type": "(input: import(\"sdk/src/lib/read-state/validate\").ValidateReadSpecInput) => {\n ok: false;\n violations: import(\"sdk/src/lib/read-state/errors\").ReadSpecViolation[];\n} | {\n ok: true;\n}", + "members": {} + }, + "toCallData": { + "type": "(prepared: import(\"sdk/src/lib/read-state/read-state.types\").PreparedRead, target: {\n abi: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").Abi;\n args?: (spec: import(\"sdk/src/lib/read-state/read-state.types\").ReadSpecTuple, callbackGasLimit: bigint) => readonly unknown[];\n functionName: string;\n}) => {\n data: `0x${string}`;\n value: bigint;\n}", + "members": {} + }, + "sizeCallbackBudget": { + "type": "(callbackGasLimit: bigint, pushGasPrice: bigint, buffer?: number) => bigint", + "members": {} + }, + "inferResultShape": { + "type": "(namespace: string, query: `0x${string}`) => import(\"sdk/src/lib/read-state/read-state.types\").ReadResultShape", + "members": {} + }, + "toRequestIdHex": { + "type": "(id: `0x${string}` | bigint) => `0x${string}`", + "members": {} + }, + "toReadQuery": { + "type": "(subject: string, o: ReadOptionsInput, resolvedTokenProgram?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").PublicKey) => import(\"sdk/src/lib/read-state/read-state.types\").ReadQuery", + "members": {} + }, + "UNIVERSAL_CALLBACK_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n },\n {\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"requestExternalReadSelf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"estimateFee\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"statusOf\";\n readonly outputs: readonly [\n {\n readonly internalType: \"enum RequestStatus\";\n readonly name: \"\";\n readonly type: \"uint8\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"isFulfilled\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getPendingRead\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"bytes4\";\n readonly name: \"callbackSelector\";\n readonly type: \"bytes4\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly internalType: \"struct PendingRead\";\n readonly name: \"\";\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"totalEscrowed\";\n readonly outputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"blockedDomains\";\n readonly outputs: readonly [\n {\n readonly internalType: \"bool\";\n readonly name: \"\";\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly indexed: false;\n readonly internalType: \"struct ReadSpec\";\n readonly name: \"readSpec\";\n readonly type: \"tuple\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"callbackTarget\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"originalFunder\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint64\";\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"totalPaid\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"protocolFee\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"callbackBudget\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ReadRequested\";\n readonly type: \"event\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"ReadFulfilled\";\n readonly type: \"event\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"bytes\";\n readonly name: \"reason\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"CallbackFailed\";\n readonly type: \"event\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"gasReported\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"burned\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"CallbackGasReported\";\n readonly type: \"event\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundSent\";\n readonly type: \"event\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"recipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RefundFailed\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"refunded\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"RequestExpired\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly anonymous: false;\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly internalType: \"address\";\n readonly name: \"vaultPC\";\n readonly type: \"address\";\n },\n {\n readonly indexed: false;\n readonly internalType: \"uint256\";\n readonly name: \"amount\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ProtocolFeeDistributed\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidAccountId\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"EmptyQuery\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidMinConfirmations\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n }\n ];\n readonly name: \"DomainBlocked\";\n readonly type: \"error\";\n}" + }, + "19": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidBlockNumber\";\n readonly type: \"error\";\n}" + }, + "20": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidExpiryHeight\";\n readonly type: \"error\";\n}" + }, + "21": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroRevertRecipient\";\n readonly type: \"error\";\n}" + }, + "22": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroCallbackGasLimit\";\n readonly type: \"error\";\n}" + }, + "23": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint64\";\n readonly name: \"provided\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"max\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"CallbackGasLimitExceeded\";\n readonly type: \"error\";\n}" + }, + "24": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"required\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"InsufficientFee\";\n readonly type: \"error\";\n}" + }, + "25": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"provided\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"ExcessiveFee\";\n readonly type: \"error\";\n}" + }, + "26": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly internalType: \"uint256\";\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"actual\";\n readonly type: \"uint8\";\n },\n {\n readonly internalType: \"uint8\";\n readonly name: \"expected\";\n readonly type: \"uint8\";\n }\n ];\n readonly name: \"InvalidRequestStatus\";\n readonly type: \"error\";\n}" + }, + "27": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ContractIsPaused\";\n readonly type: \"error\";\n}" + }, + "28": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"CallerIsNotUCallbackModule\";\n readonly type: \"error\";\n}" + }, + "29": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "30" + } + } + }, + "UNIVERSAL_READ_REGISTRY_EVM": { + "type": "readonly [\n {\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n },\n {\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n },\n {\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n }\n]", + "members": { + "0": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly components: readonly [\n {\n readonly components: readonly [\n {\n readonly internalType: \"string\";\n readonly name: \"chainNamespace\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"string\";\n readonly name: \"chainId\";\n readonly type: \"string\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"owner\";\n readonly type: \"bytes\";\n }\n ];\n readonly internalType: \"struct UniversalAccountId\";\n readonly name: \"account\";\n readonly type: \"tuple\";\n },\n {\n readonly internalType: \"bytes\";\n readonly name: \"query\";\n readonly type: \"bytes\";\n },\n {\n readonly internalType: \"uint16\";\n readonly name: \"minConfirmations\";\n readonly type: \"uint16\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"blockNumber\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint64\";\n readonly name: \"expiryPushChainHeight\";\n readonly type: \"uint64\";\n },\n {\n readonly internalType: \"uint256\";\n readonly name: \"maxFee\";\n readonly type: \"uint256\";\n },\n {\n readonly internalType: \"address\";\n readonly name: \"revertRecipient\";\n readonly type: \"address\";\n }\n ];\n readonly name: \"spec\";\n readonly type: \"tuple\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n },\n {\n readonly name: \"callbackGasLimit\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"read\";\n readonly outputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"payable\";\n readonly type: \"function\";\n}" + }, + "1": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"universalCallback_\";\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"constructor\";\n}" + }, + "2": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"initialize\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "3": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"getLocalContext\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "4": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"hasResult\";\n readonly outputs: readonly [\n {\n readonly type: \"bool\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "5": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n }\n ];\n readonly name: \"onUniversalData\";\n readonly outputs: readonly [\n ];\n readonly stateMutability: \"nonpayable\";\n readonly type: \"function\";\n}" + }, + "6": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"queryKeyOf\";\n readonly outputs: readonly [\n {\n readonly type: \"bytes32\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "7": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"readerOf\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "8": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"requestOrderOf\";\n readonly outputs: readonly [\n {\n readonly type: \"uint256\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "9": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"universalCallback\";\n readonly outputs: readonly [\n {\n readonly type: \"address\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "10": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n }\n ];\n readonly name: \"resultByRequestId\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "11": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"latestResult\";\n readonly outputs: readonly [\n {\n readonly components: readonly [\n {\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly name: \"resultData\";\n readonly type: \"bytes\";\n },\n {\n readonly name: \"updatedAtBlock\";\n readonly type: \"uint64\";\n }\n ];\n readonly type: \"tuple\";\n }\n ];\n readonly stateMutability: \"view\";\n readonly type: \"function\";\n}" + }, + "12": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly name: \"version\";\n readonly type: \"uint64\";\n }\n ];\n readonly name: \"Initialized\";\n readonly type: \"event\";\n}" + }, + "13": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadRequested\";\n readonly type: \"event\";\n}" + }, + "14": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n {\n readonly indexed: true;\n readonly name: \"requestId\";\n readonly type: \"uint256\";\n },\n {\n readonly indexed: true;\n readonly name: \"reader\";\n readonly type: \"address\";\n },\n {\n readonly indexed: true;\n readonly name: \"queryKey\";\n readonly type: \"bytes32\";\n }\n ];\n readonly name: \"RegistryReadStored\";\n readonly type: \"event\";\n}" + }, + "15": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"InvalidInitialization\";\n readonly type: \"error\";\n}" + }, + "16": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"NotInitializing\";\n readonly type: \"error\";\n}" + }, + "17": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"UnauthorizedCaller\";\n readonly type: \"error\";\n}" + }, + "18": { + "optional": false, + "readonly": true, + "type": "{\n readonly inputs: readonly [\n ];\n readonly name: \"ZeroAddressInit\";\n readonly type: \"error\";\n}" + }, + "length": { + "optional": false, + "readonly": true, + "type": "19" + } + } + }, + "PushChainExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + } + } + }, + "PushChainBatchExecutionError": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").PushChainBatchExecutionError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "pendingTransactionHash": { + "optional": true, + "readonly": true, + "type": "`0x${string}` | undefined" + }, + "transactionHashes": { + "optional": false, + "readonly": true, + "type": "`0x${string}`[]" + } + } + }, + "DecodedErrorPayload": { + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload", + "members": { + "decoded": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "hint": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "name": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "selector": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PushChainInitializeOptions": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions", + "members": { + "agenticWallet": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "blockExplorers": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + }, + "network": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "printTraces": { + "optional": true, + "readonly": false, + "type": "boolean | undefined" + }, + "progressHook": { + "optional": true, + "readonly": false, + "type": "((progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void) | undefined" + }, + "rpcUrls": { + "optional": true, + "readonly": false, + "type": "Partial> | undefined" + } + } + }, + "AGENTIC_ERROR_CODE": { + "type": "{\n readonly AGENT_GAS_INSUFFICIENT: \"AGENT_GAS_INSUFFICIENT\";\n readonly AGENT_IS_OWNER: \"AGENT_IS_OWNER\";\n readonly AMBIGUOUS_RULE: \"AMBIGUOUS_RULE\";\n readonly ASSET_CHAIN_MISMATCH: \"ASSET_CHAIN_MISMATCH\";\n readonly CAPABILITY_UNAVAILABLE: \"CAPABILITY_UNAVAILABLE\";\n readonly DELETE_NEEDS_TARGET: \"DELETE_NEEDS_TARGET\";\n readonly DUPLICATE_RULE: \"DUPLICATE_RULE\";\n readonly FROM_NOT_ALLOWED: \"FROM_NOT_ALLOWED\";\n readonly INCONSISTENT_READ: \"INCONSISTENT_READ\";\n readonly INDEX_RACE: \"INDEX_RACE\";\n readonly INVALID_RULE: \"INVALID_RULE\";\n readonly NO_RULES_FOR_CHAIN: \"NO_RULES_FOR_CHAIN\";\n readonly NOT_AGENTIC_WALLET: \"NOT_AGENTIC_WALLET\";\n readonly NOT_ALLOWED_IN_AGENTIC_MODE: \"NOT_ALLOWED_IN_AGENTIC_MODE\";\n readonly NOT_OWNER_OR_AGENT: \"NOT_OWNER_OR_AGENT\";\n readonly NOT_WALLET_OWNER: \"NOT_WALLET_OWNER\";\n readonly READ_ONLY: \"READ_ONLY\";\n readonly RECEIPT_MISMATCH: \"RECEIPT_MISMATCH\";\n readonly RECEIPT_UNAVAILABLE: \"RECEIPT_UNAVAILABLE\";\n readonly REQUEST_REJECTED: \"REQUEST_REJECTED\";\n readonly RULE_NOT_FOUND: \"RULE_NOT_FOUND\";\n readonly RULE_READ_FAILED: \"RULE_READ_FAILED\";\n readonly TARGET_NOT_ON_RULE_CHAIN: \"TARGET_NOT_ON_RULE_CHAIN\";\n readonly TOKEN_ROUTE_UNAVAILABLE: \"TOKEN_ROUTE_UNAVAILABLE\";\n readonly WALLET_BALANCE_INSUFFICIENT: \"WALLET_BALANCE_INSUFFICIENT\";\n readonly WALLET_NOT_DEPLOYED: \"WALLET_NOT_DEPLOYED\";\n}", + "members": { + "AGENT_GAS_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"AGENT_GAS_INSUFFICIENT\"" + }, + "AGENT_IS_OWNER": { + "optional": false, + "readonly": true, + "type": "\"AGENT_IS_OWNER\"" + }, + "AMBIGUOUS_RULE": { + "optional": false, + "readonly": true, + "type": "\"AMBIGUOUS_RULE\"" + }, + "ASSET_CHAIN_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"ASSET_CHAIN_MISMATCH\"" + }, + "CAPABILITY_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"CAPABILITY_UNAVAILABLE\"" + }, + "DELETE_NEEDS_TARGET": { + "optional": false, + "readonly": true, + "type": "\"DELETE_NEEDS_TARGET\"" + }, + "DUPLICATE_RULE": { + "optional": false, + "readonly": true, + "type": "\"DUPLICATE_RULE\"" + }, + "FROM_NOT_ALLOWED": { + "optional": false, + "readonly": true, + "type": "\"FROM_NOT_ALLOWED\"" + }, + "INCONSISTENT_READ": { + "optional": false, + "readonly": true, + "type": "\"INCONSISTENT_READ\"" + }, + "INDEX_RACE": { + "optional": false, + "readonly": true, + "type": "\"INDEX_RACE\"" + }, + "INVALID_RULE": { + "optional": false, + "readonly": true, + "type": "\"INVALID_RULE\"" + }, + "NO_RULES_FOR_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"NO_RULES_FOR_CHAIN\"" + }, + "NOT_AGENTIC_WALLET": { + "optional": false, + "readonly": true, + "type": "\"NOT_AGENTIC_WALLET\"" + }, + "NOT_ALLOWED_IN_AGENTIC_MODE": { + "optional": false, + "readonly": true, + "type": "\"NOT_ALLOWED_IN_AGENTIC_MODE\"" + }, + "NOT_OWNER_OR_AGENT": { + "optional": false, + "readonly": true, + "type": "\"NOT_OWNER_OR_AGENT\"" + }, + "NOT_WALLET_OWNER": { + "optional": false, + "readonly": true, + "type": "\"NOT_WALLET_OWNER\"" + }, + "READ_ONLY": { + "optional": false, + "readonly": true, + "type": "\"READ_ONLY\"" + }, + "RECEIPT_MISMATCH": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_MISMATCH\"" + }, + "RECEIPT_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"RECEIPT_UNAVAILABLE\"" + }, + "REQUEST_REJECTED": { + "optional": false, + "readonly": true, + "type": "\"REQUEST_REJECTED\"" + }, + "RULE_NOT_FOUND": { + "optional": false, + "readonly": true, + "type": "\"RULE_NOT_FOUND\"" + }, + "RULE_READ_FAILED": { + "optional": false, + "readonly": true, + "type": "\"RULE_READ_FAILED\"" + }, + "TARGET_NOT_ON_RULE_CHAIN": { + "optional": false, + "readonly": true, + "type": "\"TARGET_NOT_ON_RULE_CHAIN\"" + }, + "TOKEN_ROUTE_UNAVAILABLE": { + "optional": false, + "readonly": true, + "type": "\"TOKEN_ROUTE_UNAVAILABLE\"" + }, + "WALLET_BALANCE_INSUFFICIENT": { + "optional": false, + "readonly": true, + "type": "\"WALLET_BALANCE_INSUFFICIENT\"" + }, + "WALLET_NOT_DEPLOYED": { + "optional": false, + "readonly": true, + "type": "\"WALLET_NOT_DEPLOYED\"" + } + } + }, + "AgenticError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticError", + "members": { + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "Code" + }, + "details": { + "optional": true, + "readonly": true, + "type": "Readonly> | undefined" + }, + "hint": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "userMessage": { + "optional": false, + "readonly": true, + "type": "string" + } + } + }, + "AgenticRevertError": { + "type": "import(\"sdk/src/lib/agentic/errors\").AgenticRevertError", + "members": { + "agenticCode": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "cause": { + "optional": true, + "readonly": true, + "type": "unknown" + }, + "code": { + "optional": false, + "readonly": true, + "type": "\"PUSH_CHAIN_EXECUTION_FAILED\"" + }, + "decodedError": { + "optional": true, + "readonly": true, + "type": "import(\"sdk/src/lib/orchestrator/internals/errors\").DecodedErrorPayload | undefined" + }, + "gatewayTxHash": { + "optional": true, + "readonly": true, + "type": "string | undefined" + }, + "userMessage": { + "optional": false, + "readonly": true, + "type": "string" + } + } + }, + "AgenticAddress": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticDoor": { + "type": "\"agent\" | \"owner\"", + "members": {} + }, + "AgenticErrorCode": { + "type": "\"AGENT_GAS_INSUFFICIENT\" | \"AGENT_IS_OWNER\" | \"AMBIGUOUS_RULE\" | \"ASSET_CHAIN_MISMATCH\" | \"CAPABILITY_UNAVAILABLE\" | \"DELETE_NEEDS_TARGET\" | \"DUPLICATE_RULE\" | \"FROM_NOT_ALLOWED\" | \"INCONSISTENT_READ\" | \"INDEX_RACE\" | \"INVALID_RULE\" | \"NO_RULES_FOR_CHAIN\" | \"NOT_AGENTIC_WALLET\" | \"NOT_ALLOWED_IN_AGENTIC_MODE\" | \"NOT_OWNER_OR_AGENT\" | \"NOT_WALLET_OWNER\" | \"READ_ONLY\" | \"RECEIPT_MISMATCH\" | \"RECEIPT_UNAVAILABLE\" | \"REQUEST_REJECTED\" | \"RULE_NOT_FOUND\" | \"RULE_READ_FAILED\" | \"TARGET_NOT_ON_RULE_CHAIN\" | \"TOKEN_ROUTE_UNAVAILABLE\" | \"WALLET_BALANCE_INSUFFICIENT\" | \"WALLET_NOT_DEPLOYED\"", + "members": {} + }, + "AgenticHex": { + "type": "`0x${string}`", + "members": {} + }, + "AgenticNamespace": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace", + "members": { + "create": { + "optional": false, + "readonly": false, + "type": "(label: string, options: import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions) => Promise" + }, + "derive": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n index?: number;\n}) => Promise<{\n address: `0x${string}`;\n deployed: boolean;\n index: number;\n}>" + }, + "list": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n wallets: import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary[];\n}>" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "(address: `0x${string}`) => import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet" + } + } + }, + "AgenticProgressHook": { + "type": "(event: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void", + "members": {} + }, + "AgenticTxMetadata": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticTxMetadata", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "destinationAccount": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "destinationCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "destinationInstruction": { + "optional": true, + "readonly": false, + "type": "{\n accounts: readonly {\n isWritable: boolean;\n pubkey: `0x${string}`;\n }[];\n data: `0x${string}`;\n program: `0x${string}`;\n} | undefined" + }, + "destinationTransfer": { + "optional": true, + "readonly": false, + "type": "{\n amount: bigint;\n recipient: `0x${string}`;\n token: `0x${string}`;\n} | undefined" + }, + "door": { + "optional": false, + "readonly": false, + "type": "\"agent\" | \"owner\"" + }, + "nativeCalls": { + "optional": true, + "readonly": false, + "type": "readonly {\n data: `0x${string}`;\n to: `0x${string}`;\n value: bigint;\n}[] | undefined" + }, + "rawData": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rawTo": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesId": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "AgenticWallet": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticWallet", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "checkpoints": { + "optional": false, + "readonly": false, + "type": "(opts?: {\n sinceBlock?: bigint;\n}) => Promise<{\n checkpoints: import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint[];\n}>" + }, + "info": { + "optional": false, + "readonly": false, + "type": "() => Promise" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "() => Promise<{\n owner: `0x${string}`;\n}>" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "{\n add(rules: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise<{\n rulesIds: `0x${string}`[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n delete(rulesIds: `0x${string}`[], opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n delete(params: {\n all: true;\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n }): Promise;\n get(rulesId: `0x${string}`): Promise;\n list(): Promise<{\n rules: import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord[];\n }>;\n update(params: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n rules: {\n rule: import(\"sdk/src/lib/agentic/agentic.types\").RuleInput;\n rulesId: `0x${string}`;\n }[];\n }): Promise<{\n rules: {\n replaced: `0x${string}`;\n rulesId: `0x${string}`;\n }[];\n tx: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse;\n }>;\n}" + }, + "setLabel": { + "optional": false, + "readonly": false, + "type": "(label: string, opts?: {\n progressHook?: import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook;\n}) => Promise" + } + } + }, + "AllowedCall": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall", + "members": { + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "label": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "maxValue": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "pins": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Pin[] | undefined" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + } + } + }, + "AssetCap": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset", + "members": { + "maxPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "Checkpoint": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Checkpoint", + "members": { + "blockNumber": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "kind": { + "optional": false, + "readonly": false, + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"" + }, + "ref": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "seq": { + "optional": false, + "readonly": false, + "type": "number" + }, + "txHash": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "CheckpointKind": { + "type": "\"OWNER_ACTION\" | \"RULES_GRANTED\" | \"RULES_REVOKED\"", + "members": {} + }, + "CreateOptions": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateOptions", + "members": { + "progressHook": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticProgressHook | undefined" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleInput[]" + } + } + }, + "CreateResult": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").CreateResult", + "members": { + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "rulesIds": { + "optional": false, + "readonly": false, + "type": "`0x${string}`[]" + }, + "tx": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalTxResponse" + }, + "wallet": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + } + } + }, + "ForeignChainNamespace": { + "type": "`eip155:${string}` | `solana:${string}`", + "members": {} + }, + "DecodedSolanaRule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": false, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[]" + }, + "ceaAccounts": { + "optional": false, + "readonly": false, + "type": "readonly `0x${string}`[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`solana:${string}`" + }, + "dataPins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmDataPinWire[]" + }, + "expectedCEA": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "format": { + "optional": false, + "readonly": false, + "type": "\"decoded\"" + }, + "gatewayProgram": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "maxGasPerCall": { + "optional": false, + "readonly": false, + "type": "bigint" + }, + "pins": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").SvmAccountPinWire[]" + }, + "programs": { + "optional": false, + "readonly": false, + "type": "readonly import(\"sdk/src/lib/agentic/codec/svm-terms\").AllowedProgramWire[]" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Rule": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "RuleInput": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "{\n maxPerCall: bigint;\n maxTotal: bigint;\n token: string;\n}[] | import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Pin": { + "type": "{\n account: number;\n arg?: never;\n expected: \"agentic:wallet\" | string;\n max?: never;\n token?: import(\"sdk/src/lib/constants/tokens\").MoveableToken | string;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected: \"agentic:wallet\" | `0x${string}` | `0x${string}` | bigint;\n max?: never;\n} | {\n account?: never;\n arg: import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath;\n expected?: never;\n max: bigint;\n}", + "members": { + "account": { + "optional": true, + "readonly": false, + "type": "number | undefined" + }, + "arg": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ArgumentPath | undefined" + }, + "expected": { + "optional": true, + "readonly": false, + "type": "bigint | string | undefined" + }, + "max": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + } + } + }, + "Spent": { + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}", + "members": { + "kind": { + "optional": false, + "readonly": false, + "type": "\"native\" | \"universal\"" + } + } + }, + "WalletMarker": { + "type": "\"agentic:wallet\"", + "members": {} + }, + "ArgumentPath": { + "type": "number | readonly number[]", + "members": {} + }, + "RulesRecord": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RulesRecord", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "string" + }, + "enabled": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "rule": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").DecodedSolanaRule | import(\"sdk/src/lib/agentic/agentic.types\").Rule" + }, + "rulesId": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "spent": { + "optional": false, + "readonly": false, + "type": "{\n actions: {\n amountSpent: bigint;\n callsUsed: number;\n selector: \"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector;\n target: `0x${string}`;\n valueSpent: bigint;\n }[];\n kind: \"native\";\n} | {\n amountSpent: bigint;\n callsUsed: number;\n kind: \"native\";\n valueSpent: bigint;\n} | {\n assets: {\n spent: bigint;\n token: string;\n }[];\n kind: \"universal\";\n}" + }, + "validUntil": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "Selector": { + "type": "`${string}(${string})` | `0x${string}`", + "members": {} + }, + "WalletInfo": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletInfo", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "owner": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "WalletSummary": { + "type": "import(\"sdk/src/lib/agentic/agentic.types\").WalletSummary", + "members": { + "address": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "deployed": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "index": { + "optional": false, + "readonly": false, + "type": "number" + }, + "label": { + "optional": false, + "readonly": false, + "type": "string" + }, + "rulesCount": { + "optional": false, + "readonly": false, + "type": "number" + } + } + }, + "PushChain": { + "type": "import(\"sdk/src/lib/push-chain/push-chain\").PushChain", + "members": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "job": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job/types\").JobNamespace" + }, + "market": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/market/types\").MarketNamespace" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: ((subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>) & {\n prepare: (options: import(\"sdk/src/lib/job-spec/types\").PrepareJobReadOptions) => import(\"sdk/src/lib/job-spec/types\").PreparedJobRead;\n };\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + } + }, + "Preset": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").Preset", + "members": { + "chains": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace[]" + }, + "constant": { + "optional": false, + "readonly": false, + "type": "\"DEXES\" | \"LENDING\" | \"PREDICTION\" | \"STAKING\"" + }, + "name": { + "optional": false, + "readonly": false, + "type": "string" + }, + "type": { + "optional": false, + "readonly": false, + "type": "\"CATEGORY\"" + } + } + }, + "PresetCategory": { + "type": "\"DEXES\" | \"LENDING\" | \"PREDICTION\" | \"STAKING\"", + "members": {} + }, + "PresetAsset": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset", + "members": { + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "maxTotal": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "token": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/tokens\").MoveableToken | string" + } + } + }, + "PresetOptions": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetOptions", + "members": { + "agent": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "funding": { + "optional": true, + "readonly": false, + "type": "\"destination\" | \"push\" | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "network": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "ReadyPresetOptions": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").ReadyPresetOptions", + "members": { + "agent": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "funding": { + "optional": true, + "readonly": false, + "type": "\"destination\" | \"push\" | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "network": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "PresetRuleTemplate": { + "type": "{\n agent?: `0x${string}`;\n validUntil?: number;\n} & Omit", + "members": { + "agent": { + "optional": true, + "readonly": false, + "type": "`0x${string}` | undefined" + }, + "allowedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleCall[]" + }, + "assets": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[] | undefined" + }, + "chainNamespace": { + "optional": true, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").ForeignChainNamespace | undefined" + }, + "maxGasPerCall": { + "optional": true, + "readonly": false, + "type": "bigint | undefined" + }, + "validUntil": { + "optional": true, + "readonly": false, + "type": "number | undefined" + } + } + }, + "PresetResult": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetResult", + "members": { + "readiness": { + "optional": false, + "readonly": false, + "type": "{\n chains: import(\"sdk/src/lib/agentic/presets/types\").PresetChainReadiness[];\n ready: boolean;\n}" + }, + "rules": { + "optional": false, + "readonly": false, + "type": "T[]" + } + } + }, + "PresetChainReadiness": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetChainReadiness", + "members": { + "bridgeAssets": { + "optional": false, + "readonly": false, + "type": "{\n prc20?: `0x${string}`;\n status: \"registered\" | \"unavailable\";\n token: string;\n}[]" + }, + "chainNamespace": { + "optional": false, + "readonly": false, + "type": "`eip155:${string}` | `solana:${string}`" + }, + "configurationReady": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "disabledCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetCallIssue[]" + }, + "excludedCalls": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetCallIssue[]" + }, + "funding": { + "optional": false, + "readonly": false, + "type": "\"destination\" | \"push\"" + }, + "issues": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetConfigurationIssue[]" + }, + "knownTokens": { + "optional": false, + "readonly": false, + "type": "string[]" + }, + "ready": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "selectedAssets": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").RuleAsset[]" + }, + "zeroBridgeLimits": { + "optional": false, + "readonly": false, + "type": "string[]" + } + } + }, + "PresetConfigurationIssue": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetConfigurationIssue", + "members": { + "code": { + "optional": false, + "readonly": false, + "type": "\"AGENT_REQUIRED\" | \"AGW_NETWORK_UNAVAILABLE\" | \"ASSETS_REQUIRED\" | \"BRIDGE_ASSET_UNAVAILABLE\" | \"DESTINATION_UNAVAILABLE\" | \"EXPIRY_REQUIRED\" | \"GAS_BUDGET_REQUIRED\" | \"NO_ENABLED_OPERATION\" | \"TOKEN_PAIR_REQUIRED\"" + }, + "message": { + "optional": false, + "readonly": false, + "type": "string" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "PresetCallIssue": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").PresetCallIssue", + "members": { + "alternative": { + "optional": true, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector | undefined" + }, + "app": { + "optional": true, + "readonly": false, + "type": "string | undefined" + }, + "reason": { + "optional": false, + "readonly": false, + "type": "\"DYNAMIC_AMOUNT\" | \"POSITION_AMOUNT\" | \"SHARE_AMOUNT\" | \"TOKEN_REQUIRED\" | \"UNSELECTED_TOKEN\" | \"ZERO_CAP\"" + }, + "selector": { + "optional": false, + "readonly": false, + "type": "\"value-only\" | import(\"sdk/src/lib/agentic/agentic.types\").Selector" + }, + "target": { + "optional": false, + "readonly": false, + "type": "string" + }, + "token": { + "optional": true, + "readonly": false, + "type": "string | undefined" + } + } + }, + "AgenticPresets": { + "type": "import(\"sdk/src/lib/agentic/presets/types\").AgenticPresets", + "members": { + "get": { + "optional": false, + "readonly": false, + "type": "{\n (preset: import(\"sdk/src/lib/agentic/presets/types\").PresetCategory, options: import(\"sdk/src/lib/agentic/presets/types\").ReadyPresetOptions): import(\"sdk/src/lib/agentic/presets/types\").PresetResult;\n (preset: import(\"sdk/src/lib/agentic/presets/types\").PresetCategory, options?: import(\"sdk/src/lib/agentic/presets/types\").PresetOptions): import(\"sdk/src/lib/agentic/presets/types\").PresetResult;\n}" + }, + "list": { + "optional": false, + "readonly": false, + "type": "(options?: {\n type?: \"CATEGORY\";\n}) => {\n presets: import(\"sdk/src/lib/agentic/presets/types\").Preset[];\n}" + } + } + } + }, + "pushChainStatic": { + "CONSTANTS": { + "optional": false, + "readonly": false, + "type": "{\n AGENTIC: Readonly<{\n JOB: Readonly<{\n ADDRESS: Readonly<{\n \"eip155:42101\": Readonly<{\n EVALUATOR: \"0x1afC81396f1bb36F91f74506284952b81e4bd47c\";\n HOOK: \"0xDe7A94e510b6C571DE7880d441349689F73A32b3\";\n KERNEL: \"0x977cf1AC973E9eC4332791d531507575006157Ed\";\n }>;\n }>;\n ALLOWED_MUTABILITY: Readonly<{\n readonly BOTH: \"BOTH\";\n readonly CLIENT: \"CLIENT\";\n readonly NONE: \"NONE\";\n readonly PROVIDER: \"PROVIDER\";\n }>;\n EVALUATION: Readonly<{\n readonly BOOLEAN: \"BOOLEAN\";\n readonly COMPARE: \"COMPARE\";\n readonly NUMBER: \"NUMBER\";\n readonly PERCENTAGE: \"PERCENTAGE\";\n }>;\n LOGIC: Readonly<{\n readonly ALL: \"ALL\";\n readonly ANY: \"ANY\";\n readonly AT_LEAST: \"AT_LEAST\";\n }>;\n OPERATION: Readonly<{\n readonly EQUAL: \"EQUAL\";\n readonly GREATER_OR_EQUAL: \"GREATER_OR_EQUAL\";\n readonly GREATER_THAN: \"GREATER_THAN\";\n readonly LESS_OR_EQUAL: \"LESS_OR_EQUAL\";\n readonly LESS_THAN: \"LESS_THAN\";\n readonly NOT_EQUAL: \"NOT_EQUAL\";\n }>;\n }>;\n PRESETS: Readonly<{\n CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n }>;\n PRINCIPAL: \"agentic:principal\";\n WALLET: \"agentic:wallet\";\n }>;\n CHAIN: typeof import(\"sdk/src/lib/constants/enums\").CHAIN;\n LIBRARY: typeof import(\"sdk/src/lib/constants/enums\").LIBRARY;\n MOVEABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n };\n PAYABLE: {\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n };\n PUSH_NETWORK: typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n READ: {\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n };\n}" + }, + "initialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "utils": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/utils\").Utils" + } + }, + "pushChainInstance": { + "accountStatus": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/orchestrator/orchestrator.types\").AccountStatus" + }, + "accountStatusReady": { + "optional": false, + "readonly": false, + "type": "Promise" + }, + "agentic": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/agentic/agentic.types\").AgenticNamespace" + }, + "explorer": { + "optional": false, + "readonly": false, + "type": "{\n getTransactionUrl: (txHash: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n listAllUrls: () => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n listUrls: (options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => {\n explorers: Array<{\n chain: string;\n chainName: string;\n urls: string[];\n }>;\n };\n}" + }, + "funds": { + "optional": false, + "readonly": false, + "type": "{\n getConversionQuote: (amountIn: bigint, options: {\n from: import(\"sdk/src/lib/constants/tokens\").PayableToken | undefined;\n to: import(\"sdk/src/lib/constants/tokens\").MoveableToken | undefined;\n }) => Promise;\n}" + }, + "getAccountStatus": { + "optional": false, + "readonly": false, + "type": "(options?: {\n forceRefresh?: boolean;\n}) => Promise" + }, + "isReadMode": { + "optional": false, + "readonly": false, + "type": "boolean" + }, + "job": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/job/types\").JobNamespace" + }, + "market": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/market/types\").MarketNamespace" + }, + "moveable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").MoveableTokenAccessor;\n}" + }, + "payable": { + "optional": false, + "readonly": false, + "type": "{\n token: import(\"sdk/src/lib/constants/tokens\").PayableTokenAccessor;\n}" + }, + "reinitialize": { + "optional": false, + "readonly": false, + "type": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise" + }, + "universal": { + "optional": false, + "readonly": false, + "type": "{\n readonly account: `0x${string}`;\n executeReads: (reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>;\n executeTransactions: (txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise;\n migrateCEA: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"migrateCEA\"];\n readonly origin: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n prepareRead: (subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>;\n prepareTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"prepareTransaction\"];\n read: ((subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>) & {\n prepare: (options: import(\"sdk/src/lib/job-spec/types\").PrepareJobReadOptions) => import(\"sdk/src/lib/job-spec/types\").PreparedJobRead;\n };\n rescueFunds: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"rescueFunds\"];\n sendTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"execute\"];\n signMessage: (data: Uint8Array) => Promise;\n signTypedData: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n trackRead: {\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n };\n trackTransaction: import(\"sdk/src/lib/orchestrator/orchestrator\").Orchestrator[\"trackTransaction\"];\n}" + }, + "upgradeAccount": { + "optional": false, + "readonly": false, + "type": "(options?: {\n progressHook?: (progress: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n}) => Promise" + } + }, + "transactionMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "`0x${string}`" + }, + "executeReads": { + "optional": false, + "readonly": false, + "type": "(reads: R, options?: import(\"sdk/src/lib/read-state/read-params\").ReadExecuteOptions) => Promise>" + }, + "executeTransactions": { + "optional": false, + "readonly": false, + "type": "(txs: import(\"sdk/src/lib/orchestrator/orchestrator.types\").PreparedUniversalTx[], options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").CascadeExecutionOptions) => Promise" + }, + "migrateCEA": { + "optional": false, + "readonly": false, + "type": "(chain: import(\"sdk/src/lib/constants/enums\").CHAIN) => Promise" + }, + "origin": { + "optional": false, + "readonly": false, + "type": "import(\"sdk/src/lib/universal/universal.types\").UniversalAccount" + }, + "prepareRead": { + "optional": false, + "readonly": false, + "type": "(subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>" + }, + "prepareTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "read": { + "optional": false, + "readonly": false, + "type": "((subject: string, options: import(\"sdk/src/lib/read-state/read-params\").ValidateReadCall & O) => Promise>>) & {\n prepare: (options: import(\"sdk/src/lib/job-spec/types\").PrepareJobReadOptions) => import(\"sdk/src/lib/job-spec/types\").PreparedJobRead;\n}" + }, + "rescueFunds": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").RescueFundsParams) => Promise" + }, + "sendTransaction": { + "optional": false, + "readonly": false, + "type": "(params: import(\"sdk/src/lib/orchestrator/orchestrator.types\").ExecuteParams | import(\"sdk/src/lib/orchestrator/orchestrator.types\").UniversalExecuteParams, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TransactionExecutionOptions) => Promise" + }, + "signMessage": { + "optional": false, + "readonly": false, + "type": "(data: Uint8Array) => Promise" + }, + "signTypedData": { + "optional": false, + "readonly": false, + "type": "({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n}) => Promise" + }, + "trackRead": { + "optional": false, + "readonly": false, + "type": "{\n (ref: {\n txHash: `0x${string}`;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n (ref: {\n requestId: `0x${string}` | bigint;\n }, options?: {\n progressHook?: (e: import(\"sdk/src/lib/progress-hook/progress-hook.types\").ProgressEvent) => void;\n } & import(\"sdk/src/lib/read-state/read-params\").ReadTrackOptions): Promise;\n}" + }, + "trackTransaction": { + "optional": false, + "readonly": false, + "type": "(txHash: string, options?: import(\"sdk/src/lib/orchestrator/orchestrator.types\").TrackTransactionOptions) => Promise" + } + }, + "utilityMethods": { + "account": { + "optional": false, + "readonly": false, + "type": "{\n convertExecutorToOriginAccount: (ueaAddress: `0x${string}`, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => Promise;\n convertOriginToExecutor: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n onlyCompute?: boolean;\n }) => Promise;\n deriveExecutorAccount: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n fromChainAgnostic: (caip: string) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n resolveControllerAccount: (address: string, options?: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n skipNetworkCheck?: boolean;\n }) => Promise;\n toChainAgnostic: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => string;\n toUniversal: (address: string, options: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalAccount;\n}" + }, + "agentic": { + "optional": false, + "readonly": true, + "type": "{\n readonly presets: import(\"sdk/src/lib/agentic/presets/types\").AgenticPresets;\n}" + }, + "chains": { + "optional": false, + "readonly": false, + "type": "{\n getChainName: (chainNamespace: string) => string | undefined;\n getChainNamespace: (chainName: string) => string | undefined;\n getSupportedChains: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: import(\"sdk/src/lib/constants/enums\").CHAIN[];\n };\n getSupportedChainsByName: (network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK) => {\n chains: string[];\n };\n}" + }, + "conversion": { + "optional": false, + "readonly": false, + "type": "{\n slippageToMinAmount(amount: string, options: {\n slippageBps: number;\n }): string;\n}" + }, + "helpers": { + "optional": false, + "readonly": false, + "type": "{\n encodeTxData({ abi, idl, functionName, args, }: {\n abi?: any;\n args?: any[];\n functionName: string;\n idl?: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }): `0x${string}`;\n formatUnits(value: bigint | string, decimalsOrOptions: {\n decimals: number;\n precision?: number;\n } | number): string;\n getChainName: (chainName: string) => string | undefined;\n parseUnits(value: string, exponent: {\n decimals: number;\n } | number): bigint;\n}" + }, + "job": { + "optional": false, + "readonly": true, + "type": "{\n readonly buildJobSpec: (options: import(\"sdk/src/lib/job-spec/types\").BuildJobSpecOptions) => import(\"sdk/src/lib/job-spec/types\").JobSpec;\n readonly buildJobSpecTemplate: (options: import(\"sdk/src/lib/job-spec/types\").BuildJobSpecTemplateOptions) => import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate;\n readonly decodeJobSpec: (bytes: `0x${string}`, options?: {\n format?: \"spec\" | \"template\";\n }) => import(\"sdk/src/lib/job-spec/types\").JobSpec | import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate;\n readonly describeJobSpec: (spec: import(\"sdk/src/lib/job-spec/types\").JobSpec | import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate, options?: {\n decimals?: Record<`0x${string}`, number>;\n principal?: bigint;\n }) => {\n checks: string[];\n logic: string;\n timing: string;\n };\n readonly encodeJobSpec: (spec: import(\"sdk/src/lib/job-spec/types\").JobSpec | import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate) => `0x${string}`;\n readonly prepareRead: (options: import(\"sdk/src/lib/job-spec/types\").PrepareJobReadOptions) => import(\"sdk/src/lib/job-spec/types\").PreparedJobRead;\n readonly previewJobSpec: (_spec: import(\"sdk/src/lib/job-spec/types\").JobSpec | import(\"sdk/src/lib/job-spec/types\").JobSpecTemplate, _options: import(\"sdk/src/lib/job-spec/types\").PreviewJobSpecOptions) => Promise;\n}" + }, + "market": { + "optional": false, + "readonly": true, + "type": "{\n readonly decodeAgentCardRules: (bytes: `0x${string}`, _options?: {\n chain?: string;\n }) => import(\"sdk/src/lib/market/rules\").AgentCardRules;\n readonly encodeAgentCardRules: (rules: import(\"sdk/src/lib/market/rules\").AgentCardRules, options: {\n chain: string;\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => `0x${string}`;\n readonly validateAgentCardRules: (rules: import(\"sdk/src/lib/market/rules\").AgentCardRules) => void;\n}" + }, + "signer": { + "optional": false, + "readonly": false, + "type": "{\n construct: (account: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount, options: {\n signAndSendTransaction: (unsignedTx: Uint8Array) => Promise;\n signAuthorization?: (params: import(\"sdk/src/lib/universal/universal.types\").SignAuthorizationParams) => Promise;\n signMessage: (data: Uint8Array) => Promise;\n signTypedData?: ({ domain, types, primaryType, message, }: {\n domain: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedDataDomain;\n message: Record;\n primaryType: string;\n types: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").TypedData;\n }) => Promise;\n }) => import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton;\n toUniversal: (signer: import(\"sdk/src/lib/universal/universal.types\").EthersV5SignerType | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType | import(\"sdk/src/lib/universal/universal.types\").UniversalSignerSkeleton | import(\"sdk/src/lib/universal/universal.types\").ViemSignerType) => Promise;\n toUniversalFromKeypair: (clientOrAccount: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@solana/web3.js/lib/index\").Keypair | import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/viem/_types/index\").WalletClient | import(\"sdk/src/lib/universal/universal.types\").EthersV6SignerType, { chain, library }: {\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n library: import(\"sdk/src/lib/constants/enums\").LIBRARY;\n }) => Promise;\n}" + }, + "svm": { + "optional": false, + "readonly": false, + "type": "{\n getRegisteredIdls: () => Array<{\n address: `0x${string}`;\n idl: import(\"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/node_modules/@coral-xyz/anchor/dist/cjs/idl\").Idl;\n }>;\n registerIdl: (idl: unknown) => void;\n}" + }, + "tokens": { + "optional": false, + "readonly": false, + "type": "{\n getMoveableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n prc20Address?: `0x${string}`;\n sourceChain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n symbol: string;\n }>;\n };\n getPayableTokens(chainOrClient?: import(\"sdk/src/lib/constants/enums\").CHAIN | import(\"sdk/src/lib/push-chain/push-chain\").PushChain): {\n tokens: Array<{\n address: string;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n chainName: string;\n decimals: number;\n mechanism: \"approve\" | \"native\" | \"permit2\";\n symbol: string;\n }>;\n };\n getPC20Address(address: string, options: {\n chain?: import(\"sdk/src/lib/constants/enums\").CHAIN;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n rpcUrls?: Partial>;\n strict?: boolean;\n }): Promise;\n getPRC20Address: (token: {\n address: string;\n chain: string;\n } | import(\"sdk/src/lib/constants/tokens\").MoveableToken, options?: {\n network?: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n }) => {\n address: `0x${string}`;\n chain: import(\"sdk/src/lib/constants/enums\").CHAIN;\n decimals: number;\n network: import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK;\n symbol: string;\n };\n}" + } + }, + "initialize": "(universalSigner: import(\"sdk/src/lib/universal/universal.types\").UniversalAccount | import(\"sdk/src/lib/universal/universal.types\").UniversalSigner, options?: import(\"sdk/src/lib/push-chain/push-chain\").PushChainInitializeOptions) => Promise", + "agwConstants": { + "JOB": { + "optional": false, + "readonly": true, + "type": "{\n readonly ADDRESS: Readonly<{\n \"eip155:42101\": Readonly<{\n EVALUATOR: \"0x1afC81396f1bb36F91f74506284952b81e4bd47c\";\n HOOK: \"0xDe7A94e510b6C571DE7880d441349689F73A32b3\";\n KERNEL: \"0x977cf1AC973E9eC4332791d531507575006157Ed\";\n }>;\n }>;\n readonly ALLOWED_MUTABILITY: Readonly<{\n readonly BOTH: \"BOTH\";\n readonly CLIENT: \"CLIENT\";\n readonly NONE: \"NONE\";\n readonly PROVIDER: \"PROVIDER\";\n }>;\n readonly EVALUATION: Readonly<{\n readonly BOOLEAN: \"BOOLEAN\";\n readonly COMPARE: \"COMPARE\";\n readonly NUMBER: \"NUMBER\";\n readonly PERCENTAGE: \"PERCENTAGE\";\n }>;\n readonly LOGIC: Readonly<{\n readonly ALL: \"ALL\";\n readonly ANY: \"ANY\";\n readonly AT_LEAST: \"AT_LEAST\";\n }>;\n readonly OPERATION: Readonly<{\n readonly EQUAL: \"EQUAL\";\n readonly GREATER_OR_EQUAL: \"GREATER_OR_EQUAL\";\n readonly GREATER_THAN: \"GREATER_THAN\";\n readonly LESS_OR_EQUAL: \"LESS_OR_EQUAL\";\n readonly LESS_THAN: \"LESS_THAN\";\n readonly NOT_EQUAL: \"NOT_EQUAL\";\n }>;\n}" + }, + "PRESETS": { + "optional": false, + "readonly": true, + "type": "{\n readonly CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n}" + }, + "PRINCIPAL": { + "optional": false, + "readonly": true, + "type": "\"agentic:principal\"" + }, + "WALLET": { + "optional": false, + "readonly": true, + "type": "\"agentic:wallet\"" + } + }, + "constants": { + "AGENTIC": { + "optional": false, + "readonly": false, + "type": "{\n readonly JOB: Readonly<{\n ADDRESS: Readonly<{\n \"eip155:42101\": Readonly<{\n EVALUATOR: \"0x1afC81396f1bb36F91f74506284952b81e4bd47c\";\n HOOK: \"0xDe7A94e510b6C571DE7880d441349689F73A32b3\";\n KERNEL: \"0x977cf1AC973E9eC4332791d531507575006157Ed\";\n }>;\n }>;\n ALLOWED_MUTABILITY: Readonly<{\n readonly BOTH: \"BOTH\";\n readonly CLIENT: \"CLIENT\";\n readonly NONE: \"NONE\";\n readonly PROVIDER: \"PROVIDER\";\n }>;\n EVALUATION: Readonly<{\n readonly BOOLEAN: \"BOOLEAN\";\n readonly COMPARE: \"COMPARE\";\n readonly NUMBER: \"NUMBER\";\n readonly PERCENTAGE: \"PERCENTAGE\";\n }>;\n LOGIC: Readonly<{\n readonly ALL: \"ALL\";\n readonly ANY: \"ANY\";\n readonly AT_LEAST: \"AT_LEAST\";\n }>;\n OPERATION: Readonly<{\n readonly EQUAL: \"EQUAL\";\n readonly GREATER_OR_EQUAL: \"GREATER_OR_EQUAL\";\n readonly GREATER_THAN: \"GREATER_THAN\";\n readonly LESS_OR_EQUAL: \"LESS_OR_EQUAL\";\n readonly LESS_THAN: \"LESS_THAN\";\n readonly NOT_EQUAL: \"NOT_EQUAL\";\n }>;\n }>;\n readonly PRESETS: Readonly<{\n CATEGORY: Readonly<{\n DEXES: \"DEXES\";\n LENDING: \"LENDING\";\n PREDICTION: \"PREDICTION\";\n STAKING: \"STAKING\";\n }>;\n }>;\n readonly PRINCIPAL: \"agentic:principal\";\n readonly WALLET: \"agentic:wallet\";\n}" + }, + "CHAIN": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").CHAIN" + }, + "LIBRARY": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").LIBRARY" + }, + "MOVEABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").MoveableTokenConstantsMap;\n}" + }, + "PAYABLE": { + "optional": false, + "readonly": false, + "type": "{\n TOKEN: import(\"sdk/src/lib/constants/tokens\").PayableTokenConstantsMap;\n}" + }, + "PUSH_NETWORK": { + "optional": false, + "readonly": false, + "type": "typeof import(\"sdk/src/lib/constants/enums\").PUSH_NETWORK" + }, + "READ": { + "optional": false, + "readonly": false, + "type": "{\n readonly CALLBACK_BUDGET_BUFFER: 3;\n readonly CHAIN: {\n readonly WEB2: \"web2\";\n } & Readonly<{\n readonly ARBITRUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ARBITRUM_SEPOLIA;\n readonly BASE_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.BASE_SEPOLIA;\n readonly BNB_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.BNB_TESTNET;\n readonly ETHEREUM_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_MAINNET;\n readonly ETHEREUM_SEPOLIA: import(\"sdk/src/lib/constants/enums\").CHAIN.ETHEREUM_SEPOLIA;\n readonly PUSH_LOCALNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_LOCALNET;\n readonly PUSH_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_MAINNET;\n readonly PUSH_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly PUSH_TESTNET_DONUT: import(\"sdk/src/lib/constants/enums\").CHAIN.PUSH_TESTNET;\n readonly SOLANA_DEVNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_DEVNET;\n readonly SOLANA_MAINNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_MAINNET;\n readonly SOLANA_TESTNET: import(\"sdk/src/lib/constants/enums\").CHAIN.SOLANA_TESTNET;\n readonly WEB2: \"web2\";\n }>;\n readonly DEFAULT_EXPIRY_BLOCKS: 300n;\n readonly ERROR_CODE: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_ERROR_CODE;\n readonly MAX_CALLBACK_GAS_LIMIT: 1000000n;\n readonly MIN_CONFIRMATIONS_FLOOR: 1;\n readonly NAMESPACE: {\n readonly EVM: \"eip155\";\n readonly SVM: \"solana\";\n readonly WEB2: \"web2\";\n };\n readonly OUTCOME: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_OUTCOME;\n readonly REGISTRY_CALLBACK_GAS: 500000n;\n readonly RESULT_STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").READ_STATUS;\n readonly STATUS: typeof import(\"sdk/src/lib/read-state/read-state.types\").UNIVERSAL_READ_STATUS;\n readonly UNIVERSAL_CALLBACK_ADDRESSES: Record;\n readonly UNIVERSAL_CORE_ADDRESSES: Record;\n readonly UNIVERSAL_READ_REGISTRY_ADDRESS: {\n readonly TESTNET_DONUT: \"0x00000000000000000000000000000000000000b2\";\n };\n readonly WEB2: \"web2\";\n readonly WEB2_DEFAULT_TIMEOUT_MS: 5000;\n readonly WEB2_MAX_EXTRACT_ENTRIES: 16;\n}" + } + } + }, + "scope": "All root exports and declared public members, PushChain static/instance members, universal transaction methods, utility groups, readonly/optional markers and constants. Behavior/default/deployment changes need the written session review." +} diff --git a/plan/marketplace/research/sdk-implementation-2026-10-20/cea-routing.json b/plan/marketplace/research/sdk-implementation-2026-10-20/cea-routing.json new file mode 100644 index 00000000..9df788bc --- /dev/null +++ b/plan/marketplace/research/sdk-implementation-2026-10-20/cea-routing.json @@ -0,0 +1,85 @@ +{ + "at": "2026-10-20T10:42:17.933Z", + "rows": [ + { + "chain": "eip155:11155111", + "sdkFactory": "0x5E191fbBe22F8866C5e4250557664fCE760e8870", + "marketplaceFactory": "0x8ED594A83301FEc545fC6c19fc12cF7111777029", + "sdkGateway": "0x05bD7a3D18324c1F7e216f7fBF2b15985aE5281A", + "marketFactoryCEA": [ + "0x33996E73ee53988B4c446457e5f497e9a4B87B0D", + false + ], + "marketFactoryImpl": "0x0a4F7be62B56830070266be81114edB93e68DA09", + "gatewayFactory": { + "error": "The contract function \"ceaFactory\" reverted." + }, + "marketFactoryGateway": "0x05bD7a3D18324c1F7e216f7fBF2b15985aE5281A", + "sdkCEA": [ + "0x0ec3c8720D66929edec8Ff23Dfa47B888d9aC111", + false + ], + "sdkFactoryGateway": "0x05bD7a3D18324c1F7e216f7fBF2b15985aE5281A" + }, + { + "chain": "eip155:84532", + "sdkFactory": "0x7e8CeeDA043ED1460540616103dD57581a66C856", + "marketplaceFactory": "0x0A75ca7736b488Eb41675ADc3b3156BACF659F55", + "sdkGateway": "0xFD4fef1F43aFEc8b5bcdEEc47f35a1431479aC16", + "marketFactoryImpl": "0x6c9Cfef12155bEE91ecD6d0C8f516cABA2890656", + "marketFactoryGateway": "0xFD4fef1F43aFEc8b5bcdEEc47f35a1431479aC16", + "marketFactoryCEA": [ + "0xf1981b90F0207135B396F698F33119FaED32e5cF", + false + ], + "gatewayFactory": { + "error": "The contract function \"ceaFactory\" reverted." + }, + "sdkCEA": [ + "0x6437D6B60D2Ba2a76e0f791d84286020c2e93cBC", + false + ], + "sdkFactoryGateway": "0xFD4fef1F43aFEc8b5bcdEEc47f35a1431479aC16" + }, + { + "chain": "eip155:421614", + "sdkFactory": "0x65572FFa81c230360a8a53C1682C7f0Ee321E5E7", + "marketplaceFactory": "0x88DC189275078Cf509E4Cc773F089c8ad07b7EA2", + "sdkGateway": "0x2cd870e0166Ba458dEC615168Fd659AacD795f34", + "sdkCEA": [ + "0xC9bCC1c420Fb0Ef862ba2f7082a8449641cAad1f", + false + ], + "gatewayFactory": { + "error": "The contract function \"ceaFactory\" reverted." + }, + "marketFactoryCEA": [ + "0xcE8377D906a057fEBBF5c898729B2D31644AFAf2", + false + ], + "marketFactoryImpl": "0x512d1B8C185a0Fd533a69f8973A3DD6513233009", + "sdkFactoryGateway": "0x2cd870e0166Ba458dEC615168Fd659AacD795f34", + "marketFactoryGateway": "0x2cd870e0166Ba458dEC615168Fd659AacD795f34" + }, + { + "chain": "eip155:97", + "sdkFactory": "0x3f1B16e0B072d472951C4563d29d3da6a3EE3Ce8", + "marketplaceFactory": "0x3f1B16e0B072d472951C4563d29d3da6a3EE3Ce8", + "sdkGateway": "0x44aFFC61983F4348DdddB886349eb992C061EaC0", + "sdkCEA": [ + "0x3223037344F37C1bf32a0d6b13035d55d88F39C7", + false + ], + "marketFactoryGateway": "0x44aFFC61983F4348DdddB886349eb992C061EaC0", + "sdkFactoryGateway": "0x44aFFC61983F4348DdddB886349eb992C061EaC0", + "marketFactoryCEA": [ + "0x3223037344F37C1bf32a0d6b13035d55d88F39C7", + false + ], + "marketFactoryImpl": "0x0ff5d8b7d9Ac3ee2Ad420e9b70Ed6Dc465f593e9", + "gatewayFactory": { + "error": "The contract function \"ceaFactory\" reverted with the following reason:\nexecution reverted: 0x" + } + } + ] +} diff --git a/plan/marketplace/research/sdk-implementation-2026-10-20/checked-files.json b/plan/marketplace/research/sdk-implementation-2026-10-20/checked-files.json new file mode 100644 index 00000000..b8fecf75 --- /dev/null +++ b/plan/marketplace/research/sdk-implementation-2026-10-20/checked-files.json @@ -0,0 +1,185 @@ +{ + "at": "2026-10-20T11:20:11.358467+00:00", + "files": [ + { + "path": "packages/core/MARKETPLACE.md", + "sha256": "1212a00942feb179bb1e39522d9cca7857c90a19f2f9340ff0ba8329b0b3aa17" + }, + { + "path": "packages/core/__e2e__/ci/suite.ts", + "sha256": "277331424ea7d5d64b451873154843a8fce3d9ae3cb125b3d7bd7aedfc3479b2" + }, + { + "path": "packages/core/__e2e__/marketplace/lifecycle.spec.ts", + "sha256": "de5aba539b7779b97354b28b75afcbac9636aec83c37ee7c73a23bcb6df385b1" + }, + { + "path": "packages/core/__e2e__/marketplace/readiness.spec.ts", + "sha256": "a72d3c427602ecc9089c5a8823168986bf6ce978ccc201aebfd3096d03e7e287" + }, + { + "path": "packages/core/__market-local__/marketplace.spec.ts", + "sha256": "9fe8110fd9bef6ef21229f15c2551015fe5f0042c9b1f01170480b29b5eef62c" + }, + { + "path": "packages/core/__market-local__/setup.ts", + "sha256": "49013def98fb026fc408430fce66273c1d33a45ae5f66a95a68ad5240e0ef46f" + }, + { + "path": "packages/core/jest.marketplace-local.config.ts", + "sha256": "6344b13077e277d591f0bad4e94a9722527c7a5b5a9fd3539fdb4ed5b69165cc" + }, + { + "path": "packages/core/package.json", + "sha256": "f8204973c67d237e630e52c0efe5c742060b787cc095d26d4881a17d5cbf991c" + }, + { + "path": "packages/core/scripts/check-agw-api.js", + "sha256": "b376215aadf2d81b5c1528ef4b2d060af7638fcee52323010299bb169c5c1fc8" + }, + { + "path": "packages/core/scripts/check-agw-docs.js", + "sha256": "caeba5794c27f616f0744b1748f7a73c641af70a0a9bfb9ab11bb8bb50929a4c" + }, + { + "path": "packages/core/scripts/check-agw-package.js", + "sha256": "ee4d68213993c3b4a494cb067ece5e8d28a785d9a3092942d2b9adc46465169b" + }, + { + "path": "packages/core/src/lib/agentic/__tests__/response-surface.spec.ts", + "sha256": "147bc7400eaae3a7221a16035c3a722be7ac8154034257578de3aadb40bc6b80" + }, + { + "path": "packages/core/src/lib/agentic/constants.ts", + "sha256": "b5f57def2edbc5d1c22eeded1e8ab32197f8875ac8e630ed9f4085132747ca7d" + }, + { + "path": "packages/core/src/lib/agentic/contracts/reader.ts", + "sha256": "2c90f098fe374aaf2a92e54fb50e1fbbbe3bd5a138a85f34c56fb6999a178bd9" + }, + { + "path": "packages/core/src/lib/agentic/errors.ts", + "sha256": "97dfee6107e27f6dad66e0d58e996ff1225df131f018d3efa1f98ad1f075c7b1" + }, + { + "path": "packages/core/src/lib/index.ts", + "sha256": "f92d4899691d98d30243f2e8fd86eef62c10b995322a2a92a3fb3691996a25ea" + }, + { + "path": "packages/core/src/lib/job-spec/__tests__/codec.spec.ts", + "sha256": "26c64f27223a35fc716a3f64618901423397cbbcf69c6ff639e69bb92d0e12db" + }, + { + "path": "packages/core/src/lib/job-spec/codec.ts", + "sha256": "ee27c032038b7f4f38093531c5fa97e7655c1c77857c000a72390a448de2533c" + }, + { + "path": "packages/core/src/lib/job-spec/constants.ts", + "sha256": "f5c14e73d8c9ef664ca48b5f489ed406fd6367f7df61cd882aa92a528210b153" + }, + { + "path": "packages/core/src/lib/job-spec/helpers.ts", + "sha256": "5d2ec2b0cc1d746cba5006cfbe0a13c73629821c975860431a831759d51e3690" + }, + { + "path": "packages/core/src/lib/job-spec/index.ts", + "sha256": "910ca188c273fc7d4d8c564d7c1d279b3f2860af7c04942864f78eeeec4219c9" + }, + { + "path": "packages/core/src/lib/job-spec/read.ts", + "sha256": "a572900f9b316e443ffdedfc83fd043f0d944f4e431d29dc8781ea38de79a8a4" + }, + { + "path": "packages/core/src/lib/job-spec/schema.ts", + "sha256": "7f780d3b826a7acf56b43cd80ce7870d182ddc04be3a8bc5205bc095869dfbe8" + }, + { + "path": "packages/core/src/lib/job-spec/types.ts", + "sha256": "0fcaeab75d76124854e0f84ba4bc0daf8512db091b261d6cdb059be6889161a3" + }, + { + "path": "packages/core/src/lib/job/job.ts", + "sha256": "1e63af2e7eb55f2a7bea1efceab089d5778dcbbb7a70aa042ab923f0a6b20032" + }, + { + "path": "packages/core/src/lib/job/types.ts", + "sha256": "85659e00c3a0b4565b813b599d3a05d6f9efb981225162636a6ca010da9c99d9" + }, + { + "path": "packages/core/src/lib/market/__tests__/kernel-wire.spec.ts", + "sha256": "6753167bfe07aef7398c6d72f95103b78b58e945691b9da8ab850c3eeb3a04d5" + }, + { + "path": "packages/core/src/lib/market/__tests__/namespace.spec.ts", + "sha256": "f9d24545c8b1b8e9451f4952678dd65c06cf7905b1f33d0405e4e6a2b41b6b7e" + }, + { + "path": "packages/core/src/lib/market/__tests__/rules.spec.ts", + "sha256": "0eb697c4cd7e9bed6d2bf39a2b4ebe54da169d66598aa7cfc9bef386288467f5" + }, + { + "path": "packages/core/src/lib/market/contracts/AgenticCommerce.ts", + "sha256": "d77269e520a2878b5e1343e127c021d953ec2f14e1352648b6bb402f6bdb5535" + }, + { + "path": "packages/core/src/lib/market/contracts/RulesBindingHook.ts", + "sha256": "794798248d9100b7bbd4da39bd21ae0a24faec843d74df0d62e6cb66d1b62e87" + }, + { + "path": "packages/core/src/lib/market/contracts/UniversalMarketplace.ts", + "sha256": "90c2675ba46778994606da25a8d5264700c009a44837b634ef07f81070116b4d" + }, + { + "path": "packages/core/src/lib/market/contracts/UniversalMarketplaceErrors.ts", + "sha256": "09436a0f219d49077eb66899dcd047649b897ead6fa72332fa54111c1c4de477" + }, + { + "path": "packages/core/src/lib/market/contracts/UniversalMarketplaceRules.ts", + "sha256": "f3218839eeb9ac1b911c42d38ab2d8461d7ce253d06fe797c40fdc0d556b9b69" + }, + { + "path": "packages/core/src/lib/market/deployment.ts", + "sha256": "aeec7a7a45453d510f3f3a545b89bd76b4fa900c30cfd939845dc7a82e44bbc3" + }, + { + "path": "packages/core/src/lib/market/errors.ts", + "sha256": "f2199e6a618d416a862aef6e4b8950fe6804071b1d8bace8249ce9b41e25a52a" + }, + { + "path": "packages/core/src/lib/market/index.ts", + "sha256": "b219661de10456cb2510f061440747fc2dc97c0bc84103617a1aeaeae651ca2b" + }, + { + "path": "packages/core/src/lib/market/kernel-wire.ts", + "sha256": "a10226752326ebdbf76a3b01720217ed0dbf0efe27e6a62049df1774e10ef6b4" + }, + { + "path": "packages/core/src/lib/market/market.ts", + "sha256": "a72581409445c285aad217ee4e74d9f231f59da90dbb133959ec69d1b5cd8b84" + }, + { + "path": "packages/core/src/lib/market/rules.ts", + "sha256": "7aefbf7480a48d04caa8b3255282cd51886807d6082ce600daaba0aa85a5549f" + }, + { + "path": "packages/core/src/lib/market/runtime.ts", + "sha256": "c03cf0ae352e7432652647a86ad87596a6af5ddeef4da39d232ec1384251350e" + }, + { + "path": "packages/core/src/lib/market/types.ts", + "sha256": "28a7ed37d8cc787471b2271b052962c0dee2ef86050891f6252940931049ee82" + }, + { + "path": "packages/core/src/lib/push-chain/push-chain.ts", + "sha256": "be53f83582055abab1d3df1156b4e9521209db9bba8bed0fafe1036d5841cc0a" + }, + { + "path": "packages/core/src/lib/utils.ts", + "sha256": "34d7d956be03e5bbd82130088a15f2601e609b7ef5484b9a899f90dfeb13f659" + }, + { + "path": "packages/core/tsconfig.marketplace-local.json", + "sha256": "632b093629b7a442a93e2189973c2484b25fecc162bf622f1ca896070b155391" + } + ] +} diff --git a/plan/marketplace/research/sdk-implementation-2026-10-20/fork-results.json b/plan/marketplace/research/sdk-implementation-2026-10-20/fork-results.json new file mode 100644 index 00000000..f2830a22 --- /dev/null +++ b/plan/marketplace/research/sdk-implementation-2026-10-20/fork-results.json @@ -0,0 +1 @@ +{"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":1,"numPassedTests":6,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":1,"numTotalTests":6,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1792494853973,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":[],"duration":34158,"failureDetails":[],"failureMessages":[],"fullName":"registers and discovers a real v2 provider card through the public namespace","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"registers and discovers a real v2 provider card through the public namespace"},{"ancestorTitles":[],"duration":33849,"failureDetails":[],"failureMessages":[],"fullName":"previews and signs the exact on-chain JobSpec, opens on real AGW v6, and preserves binary bytes","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"previews and signs the exact on-chain JobSpec, opens on real AGW v6, and preserves binary bytes"},{"ancestorTitles":[],"duration":38,"failureDetails":[],"failureMessages":[],"fullName":"updates a decoded card without losing rule constraints or template wire bytes","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"updates a decoded card without losing rule constraints or template wire bytes"},{"ancestorTitles":[],"duration":7647,"failureDetails":[],"failureMessages":[],"fullName":"funds through the real rules hook and submits as the provider; manual evaluator completes locally","invocations":1,"location":null,"numPassingAsserts":11,"retryReasons":[],"status":"passed","title":"funds through the real rules hook and submits as the provider; manual evaluator completes locally"},{"ancestorTitles":[],"duration":3119,"failureDetails":[],"failureMessages":[],"fullName":"creates a plain job and allows third-party refund while the kernel is paused","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"creates a plain job and allows third-party refund while the kernel is paused"},{"ancestorTitles":[],"duration":34188,"failureDetails":[],"failureMessages":[],"fullName":"rejects a tampered plan before signing and atomically cancels a second job with permission revocation","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"rejects a tampered plan before signing and atomically cancels a second job with permission revocation"}],"endTime":1792494974170,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__market-local__/marketplace.spec.ts","startTime":1792494853998,"status":"passed","summary":""}],"wasInterrupted":false} diff --git a/plan/marketplace/research/sdk-implementation-2026-10-20/live-evidence.json b/plan/marketplace/research/sdk-implementation-2026-10-20/live-evidence.json new file mode 100644 index 00000000..e197a909 --- /dev/null +++ b/plan/marketplace/research/sdk-implementation-2026-10-20/live-evidence.json @@ -0,0 +1,41 @@ +{ + "marketplaceSource": "443b4e2dd9ca5dd9ffc8efebdfcecd619dd66c47", + "attempts": [ + { + "name": "marketplace-register", + "at": "2026-10-20T10:51:09.364Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "cardId": "1", + "txHash": "0x160f9367778751c4a72adfdb99dca1b9ef2f572e86b1841b4353b457b4ae838b" + }, + { + "name": "marketplace-register", + "at": "2026-10-20T10:53:14.353Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "cardId": "2", + "txHash": "0xfca44fa6a7e1d1d36a07771b04dd3f753a51dac0d72b3594ee1fca3d223dd674" + }, + { + "name": "marketplace-open", + "at": "2026-10-20T10:53:34.470Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "jobId": "1", + "wallet": "0xAc1A9778518AbaAE12367f7932C30c114d4940AE", + "rulesId": "0x13bfdc44a54323df70f44481a6882fb2bc805fbf9d61611799ca3a3d585a1f49", + "txHash": "0x6fd25c6cc4c7f8283863bd404cdb7689f3e481341166493ebbcb716d3f5ac67c" + }, + { + "name": "marketplace-cancel-cleanup", + "at": "2026-10-20T10:53:54.879Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "cardId": "2", + "wallet": "0xAc1A9778518AbaAE12367f7932C30c114d4940AE", + "jobId": "1", + "txHash": "0x185ba491236cc85ee7a369781e7fda93fa172e49f7ade56e8ee2d16a5781ba92" + } + ] +} diff --git a/plan/marketplace/research/sdk-implementation-2026-10-20/live-results.json b/plan/marketplace/research/sdk-implementation-2026-10-20/live-results.json new file mode 100644 index 00000000..e02b42ae --- /dev/null +++ b/plan/marketplace/research/sdk-implementation-2026-10-20/live-results.json @@ -0,0 +1,17 @@ +{ + "completedAt": "2026-10-20T10:53:57.903Z", + "numTotalTests": 1, + "numPassedTests": 1, + "numFailedTests": 0, + "numPendingTests": 0, + "success": false, + "tests": [ + { + "file": "marketplace/lifecycle.spec.ts", + "fullName": "marketplace live 1. native provider registration, reviewed open and atomic cancel/revoke on BSC Testnet", + "status": "passed", + "duration": 48852, + "error": null + } + ] +} diff --git a/plan/marketplace/research/sdk-implementation-2026-10-20/post-live-state.json b/plan/marketplace/research/sdk-implementation-2026-10-20/post-live-state.json new file mode 100644 index 00000000..28be8a98 --- /dev/null +++ b/plan/marketplace/research/sdk-implementation-2026-10-20/post-live-state.json @@ -0,0 +1,11 @@ +{ + "observedAt": "2026-10-20T11:18:53.682Z", + "blockNumber": "24449590", + "card1Active": false, + "card2Active": false, + "jobId": "1", + "jobStatus": 4, + "jobBudget": "0", + "wallet": "0xAc1A9778518AbaAE12367f7932C30c114d4940AE", + "permissionEnabled": false +} diff --git a/plan/marketplace/research/sdk-implementation-2026-10-20/readonly-results.json b/plan/marketplace/research/sdk-implementation-2026-10-20/readonly-results.json new file mode 100644 index 00000000..ddbf9e72 --- /dev/null +++ b/plan/marketplace/research/sdk-implementation-2026-10-20/readonly-results.json @@ -0,0 +1 @@ +{"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":1,"numPassedTests":2,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":1,"numTotalTests":2,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1792494947872,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":["marketplace deployed v2 read-only"],"duration":5386,"failureDetails":[],"failureMessages":[],"fullName":"marketplace deployed v2 read-only enumerates registry and jobs through public SDK bindings and confirms the deployment/token","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"enumerates registry and jobs through public SDK bindings and confirms the deployment/token"},{"ancestorTitles":["marketplace deployed v2 read-only"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"marketplace deployed v2 read-only returns explicit placeholders for unavailable verification and deposit orchestration","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns explicit placeholders for unavailable verification and deposit orchestration"}],"endTime":1792494956765,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__e2e__/marketplace/readiness.spec.ts","startTime":1792494947888,"status":"passed","summary":""}],"wasInterrupted":false} diff --git a/plan/marketplace/research/sdk-implementation-2026-10-20/unit-results.json b/plan/marketplace/research/sdk-implementation-2026-10-20/unit-results.json new file mode 100644 index 00000000..bfbb52a2 --- /dev/null +++ b/plan/marketplace/research/sdk-implementation-2026-10-20/unit-results.json @@ -0,0 +1 @@ +{"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":136,"numPassedTests":2205,"numPendingTestSuites":1,"numPendingTests":12,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":137,"numTotalTests":2217,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1792494853253,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":["detectUniversalTx (live)"],"duration":null,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx (live) user-supplied BSC Testnet hash decodes into a known kind","invocations":1,"location":null,"numPassingAsserts":0,"retryReasons":[],"status":"pending","title":"user-supplied BSC Testnet hash decodes into a known kind"},{"ancestorTitles":["detectUniversalTx (live)"],"duration":null,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx (live) Sepolia FUNDS R3 success decodes as OUTBOUND_FINALIZED with subTxId + universalTxId","invocations":1,"location":null,"numPassingAsserts":0,"retryReasons":[],"status":"pending","title":"Sepolia FUNDS R3 success decodes as OUTBOUND_FINALIZED with subTxId + universalTxId"},{"ancestorTitles":["detectUniversalTx (live)"],"duration":null,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx (live) Stage 2 — Sepolia detection resolves child inbound → follow-up Push Chain tx","invocations":1,"location":null,"numPassingAsserts":0,"retryReasons":[],"status":"pending","title":"Stage 2 — Sepolia detection resolves child inbound → follow-up Push Chain tx"},{"ancestorTitles":["detectUniversalTx (live)"],"duration":null,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx (live) Stage 3 — full cascade from Push root → Sepolia → follow-up Push tx","invocations":1,"location":null,"numPassingAsserts":0,"retryReasons":[],"status":"pending","title":"Stage 3 — full cascade from Push root → Sepolia → follow-up Push tx"},{"ancestorTitles":["detectUniversalTx (live)"],"duration":null,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx (live) Stage 4a — detectUniversalTxAuto resolves Push root without explicit chain","invocations":1,"location":null,"numPassingAsserts":0,"retryReasons":[],"status":"pending","title":"Stage 4a — detectUniversalTxAuto resolves Push root without explicit chain"},{"ancestorTitles":["detectUniversalTx (live)"],"duration":null,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx (live) Stage 4a — detectUniversalTxAuto resolves Sepolia finalize without explicit chain","invocations":1,"location":null,"numPassingAsserts":0,"retryReasons":[],"status":"pending","title":"Stage 4a — detectUniversalTxAuto resolves Sepolia finalize without explicit chain"},{"ancestorTitles":["detectUniversalTx (live)"],"duration":null,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx (live) Stage 5 — advanced fan-out cascade (2 BSC outbounds + CEA follow-up → Solana leg)","invocations":1,"location":null,"numPassingAsserts":0,"retryReasons":[],"status":"pending","title":"Stage 5 — advanced fan-out cascade (2 BSC outbounds + CEA follow-up → Solana leg)"},{"ancestorTitles":["detectUniversalTx (live)"],"duration":null,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx (live) Stage 6 — Push fan-out to Solana: delivered + reverted legs with separate pc-refunds","invocations":1,"location":null,"numPassingAsserts":0,"retryReasons":[],"status":"pending","title":"Stage 6 — Push fan-out to Solana: delivered + reverted legs with separate pc-refunds"},{"ancestorTitles":["detectUniversalTx (live)"],"duration":null,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx (live) Stage 7 — mixed-destination fan-out cascade across ≥3 chains","invocations":1,"location":null,"numPassingAsserts":0,"retryReasons":[],"status":"pending","title":"Stage 7 — mixed-destination fan-out cascade across ≥3 chains"},{"ancestorTitles":["detectUniversalTx (live)"],"duration":null,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx (live) SVM R3 source signature decodes via the SVM branch","invocations":1,"location":null,"numPassingAsserts":0,"retryReasons":[],"status":"pending","title":"SVM R3 source signature decodes via the SVM branch"}],"coverage":{},"endTime":1792494888309,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/detector.live.spec.ts","startTime":1792494888309,"status":"skipped","summary":""},{"assertionResults":[{"ancestorTitles":["Universal Account Utilities","toChainAgnostic()"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities toChainAgnostic() converts an address and chain to a CAIP-10 string for EVM","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"converts an address and chain to a CAIP-10 string for EVM"},{"ancestorTitles":["Universal Account Utilities","toChainAgnostic()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities toChainAgnostic() converts an address and chain to a CAIP-10 string for Solana","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"converts an address and chain to a CAIP-10 string for Solana"},{"ancestorTitles":["Universal Account Utilities","fromChainAgnostic()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities fromChainAgnostic() converts a CAIP-10 string to a UniversalAccount (EVM)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"converts a CAIP-10 string to a UniversalAccount (EVM)"},{"ancestorTitles":["Universal Account Utilities","fromChainAgnostic()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities fromChainAgnostic() converts a CAIP-10 string to a UniversalAccount (Solana)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"converts a CAIP-10 string to a UniversalAccount (Solana)"},{"ancestorTitles":["Universal Account Utilities","fromChainAgnostic()"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities fromChainAgnostic() throws an error if the CAIP string is unsupported","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws an error if the CAIP string is unsupported"},{"ancestorTitles":["Universal Account Utilities","convertOriginToExecutor() - Not Mocked"],"duration":1567,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities convertOriginToExecutor() - Not Mocked should return same address and pushChainClient.universal.account","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should return same address and pushChainClient.universal.account"},{"ancestorTitles":["Universal Account Utilities","convertExecutorToOrigin()"],"duration":328,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities convertExecutorToOrigin() Solana: should return valid origin data for a UEA address","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"Solana: should return valid origin data for a UEA address"},{"ancestorTitles":["Universal Account Utilities","convertExecutorToOrigin()"],"duration":317,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities convertExecutorToOrigin() Ethereum: should return valid origin data for a UEA address","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"Ethereum: should return valid origin data for a UEA address"},{"ancestorTitles":["Universal Account Utilities","convertOriginToExecutor() - Direct Tests"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities convertOriginToExecutor() - Direct Tests should return same address for Push Chain with onlyCompute=true","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return same address for Push Chain with onlyCompute=true"},{"ancestorTitles":["Universal Account Utilities","convertOriginToExecutor() - Direct Tests"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities convertOriginToExecutor() - Direct Tests should return address without deployed status for Push Chain with onlyCompute=false","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return address without deployed status for Push Chain with onlyCompute=false"},{"ancestorTitles":["Universal Account Utilities","convertOriginToExecutor() - Direct Tests"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities convertOriginToExecutor() - Direct Tests should return address without deployed status for Push Chain with default options","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return address without deployed status for Push Chain with default options"},{"ancestorTitles":["Universal Account Utilities","convertOriginToExecutor() - Direct Tests"],"duration":689,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities convertOriginToExecutor() - Direct Tests should compute and cache address for EVM chain","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should compute and cache address for EVM chain"},{"ancestorTitles":["Universal Account Utilities","convertOriginToExecutor() - with options.chain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities convertOriginToExecutor() - with options.chain should return same address for Push Chain input when options.chain is Push","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return same address for Push Chain input when options.chain is Push"},{"ancestorTitles":["Universal Account Utilities","convertOriginToExecutor() - with options.chain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities convertOriginToExecutor() - with options.chain should default to UEA behavior when no chain is provided","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should default to UEA behavior when no chain is provided"},{"ancestorTitles":["Universal Account Utilities","toUniversal()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities toUniversal() returns a checksummed address for EVM chains","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns a checksummed address for EVM chains"},{"ancestorTitles":["Universal Account Utilities","toUniversal()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities toUniversal() returns the address as-is for non-EVM chains","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns the address as-is for non-EVM chains"},{"ancestorTitles":["Universal Account Utilities","toUniversal()"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities toUniversal() throws an error on invalid EVM address format","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws an error on invalid EVM address format"},{"ancestorTitles":["Universal Account Utilities","toUniversal()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities toUniversal() works with different EVM chains","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"works with different EVM chains"},{"ancestorTitles":["Universal Account Utilities","toUniversal()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities toUniversal() works with different Solana chains","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"works with different Solana chains"},{"ancestorTitles":["Universal Account Utilities","deriveExecutorAccount()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities deriveExecutorAccount() is accessible on PushChain.utils.account","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"is accessible on PushChain.utils.account"},{"ancestorTitles":["Universal Account Utilities","deriveExecutorAccount()"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities deriveExecutorAccount() returns same address for Push Chain input with skipNetworkCheck","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns same address for Push Chain input with skipNetworkCheck"},{"ancestorTitles":["Universal Account Utilities","deriveExecutorAccount()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities deriveExecutorAccount() returns deployed as null when skipNetworkCheck is true","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns deployed as null when skipNetworkCheck is true"},{"ancestorTitles":["Universal Account Utilities","resolveControllerAccount()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Universal Account Utilities resolveControllerAccount() is accessible on PushChain.utils.account","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"is accessible on PushChain.utils.account"}],"endTime":1792494861516,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal/account/account.spec.ts","startTime":1792494857994,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["EndBlock RPC transport"],"duration":15,"failureDetails":[],"failureMessages":[],"fullName":"EndBlock RPC transport retains finalize_block_events without passing through a lossy decoder","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"retains finalize_block_events without passing through a lossy decoder"},{"ancestorTitles":["EndBlock RPC transport"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EndBlock RPC transport retains end_block_events without passing through a lossy decoder","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"retains end_block_events without passing through a lossy decoder"},{"ancestorTitles":["EndBlock RPC transport"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EndBlock RPC transport prefers CometBFT finalize events when legacy events also exist","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"prefers CometBFT finalize events when legacy events also exist"},{"ancestorTitles":["EndBlock RPC transport"],"duration":204,"failureDetails":[],"failureMessages":[],"fullName":"EndBlock RPC transport retries a transient HTTP failure without treating it as an empty successful block","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"retries a transient HTTP failure without treating it as an empty successful block"},{"ancestorTitles":["EndBlock RPC transport"],"duration":831,"failureDetails":[],"failureMessages":[],"fullName":"EndBlock RPC transport surfaces a pruned-height JSON-RPC error for the tracker to classify as unknown","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"surfaces a pruned-height JSON-RPC error for the tracker to classify as unknown"},{"ancestorTitles":["EndBlock RPC transport"],"duration":411,"failureDetails":[],"failureMessages":[],"fullName":"EndBlock RPC transport a height the prune node dropped (HTTP 500 + JSON-RPC error) is served by the archive, without transient backoff","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"a height the prune node dropped (HTTP 500 + JSON-RPC error) is served by the archive, without transient backoff"}],"endTime":1792494863082,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/block-results-client.spec.ts","startTime":1792494861519,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["sendUniversalTx — InvalidEVMSignature retry"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sendUniversalTx — InvalidEVMSignature retry retries once with fresh signature when first broadcast fails with 0xc7dbd31d","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"retries once with fresh signature when first broadcast fails with 0xc7dbd31d"},{"ancestorTitles":["sendUniversalTx — InvalidEVMSignature retry"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"sendUniversalTx — InvalidEVMSignature retry does not retry when resignFn is undefined even if selector matches","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not retry when resignFn is undefined even if selector matches"},{"ancestorTitles":["sendUniversalTx — InvalidEVMSignature retry"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"sendUniversalTx — InvalidEVMSignature retry does not retry when revert selector is different (e.g. InsufficientBalance)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"does not retry when revert selector is different (e.g. InsufficientBalance)"},{"ancestorTitles":["sendUniversalTx — InvalidEVMSignature retry"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sendUniversalTx — InvalidEVMSignature retry gives up after MAX_SIG_RETRIES and throws the last rawLog","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"gives up after MAX_SIG_RETRIES and throws the last rawLog"},{"ancestorTitles":["sendUniversalTx — InvalidEVMSignature retry"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sendUniversalTx — InvalidEVMSignature retry does not retry on first-attempt success","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not retry on first-attempt success"},{"ancestorTitles":["sendUniversalTx — InvalidEVMSignature retry"],"duration":1003,"failureDetails":[],"failureMessages":[],"fullName":"sendUniversalTx — InvalidEVMSignature retry retries Push transaction lookup after receipt when RPC indexing lags","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"retries Push transaction lookup after receipt when RPC indexing lags"},{"ancestorTitles":["sendUniversalTx — decoder on broadcast-failed path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"sendUniversalTx — decoder on broadcast-failed path throws a compact InsufficientBalance message + decodedError on 0xf4d678b8","invocations":1,"location":null,"numPassingAsserts":10,"retryReasons":[],"status":"passed","title":"throws a compact InsufficientBalance message + decodedError on 0xf4d678b8"},{"ancestorTitles":["sendUniversalTx — decoder on broadcast-failed path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"sendUniversalTx — decoder on broadcast-failed path logs unknown selectors at INFO and still throws PushChainExecutionError without decodedError","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"logs unknown selectors at INFO and still throws PushChainExecutionError without decodedError"}],"endTime":1792494864303,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/push-chain-tx-retry.spec.ts","startTime":1792494863085,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["PushClient archive fallback — searchCosmosByQuery"],"duration":14,"failureDetails":[],"failureMessages":[],"fullName":"PushClient archive fallback — searchCosmosByQuery re-queries archive when prune returns empty, and returns the archive hit","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"re-queries archive when prune returns empty, and returns the archive hit"},{"ancestorTitles":["PushClient archive fallback — searchCosmosByQuery"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PushClient archive fallback — searchCosmosByQuery does NOT touch archive when prune already has a result","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does NOT touch archive when prune already has a result"},{"ancestorTitles":["PushClient archive fallback — searchCosmosByQuery"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PushClient archive fallback — searchCosmosByQuery chain without an archive endpoint never consults archive (inert)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"chain without an archive endpoint never consults archive (inert)"},{"ancestorTitles":["PushClient archive fallback — getCosmosTx"],"duration":405,"failureDetails":[],"failureMessages":[],"fullName":"PushClient archive fallback — getCosmosTx falls back to archive when prune has no indexed tx (op throws on empty)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"falls back to archive when prune has no indexed tx (op throws on empty)"},{"ancestorTitles":["PushClient archive fallback — getCosmosTx"],"duration":413,"failureDetails":[],"failureMessages":[],"fullName":"PushClient archive fallback — getCosmosTx chain without an archive endpoint throws when prune has no indexed tx","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"chain without an archive endpoint throws when prune has no indexed tx"},{"ancestorTitles":["PushClient archive fallback — getTransactionReceiptWithArchiveFallback"],"duration":7,"failureDetails":[],"failureMessages":[],"fullName":"PushClient archive fallback — getTransactionReceiptWithArchiveFallback builds the prune probe without transport retries","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"builds the prune probe without transport retries"},{"ancestorTitles":["PushClient archive fallback — getTransactionReceiptWithArchiveFallback"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"PushClient archive fallback — getTransactionReceiptWithArchiveFallback races the no-retry prune probe against the archive: a pruned receipt costs one archive round trip","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"races the no-retry prune probe against the archive: a pruned receipt costs one archive round trip"},{"ancestorTitles":["PushClient archive fallback — getTransactionReceiptWithArchiveFallback"],"duration":24,"failureDetails":[],"failureMessages":[],"fullName":"PushClient archive fallback — getTransactionReceiptWithArchiveFallback a fresh receipt the archive has not indexed yet comes from the prune node","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"a fresh receipt the archive has not indexed yet comes from the prune node"},{"ancestorTitles":["PushClient archive fallback — getTransactionReceiptWithArchiveFallback"],"duration":24,"failureDetails":[],"failureMessages":[],"fullName":"PushClient archive fallback — getTransactionReceiptWithArchiveFallback rejects with the prune error when neither has it","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects with the prune error when neither has it"},{"ancestorTitles":["PushClient archive fallback — getTransactionReceiptWithArchiveFallback"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PushClient archive fallback — getTransactionReceiptWithArchiveFallback without an archive endpoint it is the plain shared-client call (retries intact)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"without an archive endpoint it is the plain shared-client call (retries intact)"}],"endTime":1792494865297,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-client/push-client.archive-fallback.spec.ts","startTime":1792494864306,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["waitForOutboundTx OBSERVED gate"],"duration":308,"failureDetails":[],"failureMessages":[],"fullName":"waitForOutboundTx OBSERVED gate does NOT return FOUND when outboundStatus is UNSPECIFIED even if txHash is set","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does NOT return FOUND when outboundStatus is UNSPECIFIED even if txHash is set"},{"ancestorTitles":["waitForOutboundTx OBSERVED gate"],"duration":309,"failureDetails":[],"failureMessages":[],"fullName":"waitForOutboundTx OBSERVED gate does NOT return FOUND when outboundStatus is PENDING even if txHash is set","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does NOT return FOUND when outboundStatus is PENDING even if txHash is set"},{"ancestorTitles":["waitForOutboundTx OBSERVED gate"],"duration":25,"failureDetails":[],"failureMessages":[],"fullName":"waitForOutboundTx OBSERVED gate returns FOUND once outboundStatus transitions to OBSERVED","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns FOUND once outboundStatus transitions to OBSERVED"},{"ancestorTitles":["waitForOutboundTx OBSERVED gate"],"duration":25,"failureDetails":[],"failureMessages":[],"fullName":"waitForOutboundTx OBSERVED gate throws OutboundFailedError when outboundStatus transitions to REVERTED (existing behavior preserved)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"throws OutboundFailedError when outboundStatus transitions to REVERTED (existing behavior preserved)"},{"ancestorTitles":["waitForOutboundTx OBSERVED gate"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"waitForOutboundTx OBSERVED gate throws OutboundFailedError when a child pcTx fails before outbound emission","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"throws OutboundFailedError when a child pcTx fails before outbound emission"},{"ancestorTitles":["waitForOutboundTx OBSERVED gate"],"duration":8,"failureDetails":[],"failureMessages":[],"fullName":"waitForOutboundTx OBSERVED gate normalizes Push Chain native balance errors from child pcTx before outbound emission","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"normalizes Push Chain native balance errors from child pcTx before outbound emission"},{"ancestorTitles":["waitForOutboundTx OBSERVED gate"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"waitForOutboundTx OBSERVED gate multi-outbound: picks the OBSERVED entry even when an UNSPECIFIED entry with txHash appears first in the array","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"multi-outbound: picks the OBSERVED entry even when an UNSPECIFIED entry with txHash appears first in the array"},{"ancestorTitles":["waitForOutboundTx OBSERVED gate"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"waitForOutboundTx OBSERVED gate multi-outbound same-chain: _outboundIndex selects the later matching destination entry","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"multi-outbound same-chain: _outboundIndex selects the later matching destination entry"},{"ancestorTitles":["waitForOutboundTx OBSERVED gate"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"waitForOutboundTx OBSERVED gate waitForAllOutboundTxsV2 maps same-chain outbounds to hops by ordinal","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"waitForAllOutboundTxsV2 maps same-chain outbounds to hops by ordinal"}],"endTime":1792494866156,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/outbound-confirmation-gate.spec.ts","startTime":1792494865304,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Helpers Utils Namespace","getChainName"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getChainName should get chain name","invocations":1,"location":null,"numPassingAsserts":11,"retryReasons":[],"status":"passed","title":"should get chain name"},{"ancestorTitles":["Helpers Utils Namespace","getChainName"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getChainName should handle chain values directly","invocations":1,"location":null,"numPassingAsserts":10,"retryReasons":[],"status":"passed","title":"should handle chain values directly"},{"ancestorTitles":["Helpers Utils Namespace","getChainName"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getChainName should return undefined for invalid chain values","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should return undefined for invalid chain values"},{"ancestorTitles":["Helpers Utils Namespace","getChainName"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getChainName should handle case sensitivity correctly (returns undefined)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle case sensitivity correctly (returns undefined)"},{"ancestorTitles":["Helpers Utils Namespace","getChainName"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getChainName should handle whitespace correctly (returns undefined)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle whitespace correctly (returns undefined)"},{"ancestorTitles":["Helpers Utils Namespace","getChainNamespace"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getChainNamespace should get chain namespace from enum key name","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"should get chain namespace from enum key name"},{"ancestorTitles":["Helpers Utils Namespace","getChainNamespace"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getChainNamespace should return input unchanged when already a namespace","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should return input unchanged when already a namespace"},{"ancestorTitles":["Helpers Utils Namespace","getChainNamespace"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getChainNamespace should return undefined for unsupported names","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should return undefined for unsupported names"},{"ancestorTitles":["Helpers Utils Namespace","getSupportedChains"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getSupportedChains should return supported chains for TESTNET","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return supported chains for TESTNET"},{"ancestorTitles":["Helpers Utils Namespace","getSupportedChains"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getSupportedChains should return supported chains for TESTNET_DONUT","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return supported chains for TESTNET_DONUT"},{"ancestorTitles":["Helpers Utils Namespace","getSupportedChains"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getSupportedChains should return supported chains for LOCALNET","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return supported chains for LOCALNET"},{"ancestorTitles":["Helpers Utils Namespace","getSupportedChains"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getSupportedChains should return empty list for MAINNET","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return empty list for MAINNET"},{"ancestorTitles":["Helpers Utils Namespace","getSupportedChainsByName"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getSupportedChainsByName should return supported chain names for TESTNET","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return supported chain names for TESTNET"},{"ancestorTitles":["Helpers Utils Namespace","getSupportedChainsByName"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getSupportedChainsByName should return supported chain names for TESTNET_DONUT","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return supported chain names for TESTNET_DONUT"},{"ancestorTitles":["Helpers Utils Namespace","getSupportedChainsByName"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getSupportedChainsByName should return supported chain names for LOCALNET","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return supported chain names for LOCALNET"},{"ancestorTitles":["Helpers Utils Namespace","getSupportedChainsByName"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace getSupportedChainsByName should return empty list for MAINNET","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return empty list for MAINNET"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData should encode function data correctly","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should encode function data correctly"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData should encode function data with arguments","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should encode function data with arguments"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData should throw error for invalid ABI","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should throw error for invalid ABI"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData should throw error for invalid arguments","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw error for invalid arguments"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData should throw error for non-existent function","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw error for non-existent function"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData should handle empty args array","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle empty args array"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData","Anchor IDL input (Solana)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData Anchor IDL input (Solana) produces discriminator + Borsh-encoded args for receive_sol amount=0","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"produces discriminator + Borsh-encoded args for receive_sol amount=0"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData","Anchor IDL input (Solana)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData Anchor IDL input (Solana) accepts camelCase function name","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts camelCase function name"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData","Anchor IDL input (Solana)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData Anchor IDL input (Solana) throws when args is not an array on IDL path","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws when args is not an array on IDL path"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData","Anchor IDL input (Solana)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData Anchor IDL input (Solana) throws when instruction is not in IDL","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws when instruction is not in IDL"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData","Anchor IDL input (Solana)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData Anchor IDL input (Solana) auto-registers the IDL in PushChain.utils.svm under idl.address","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"auto-registers the IDL in PushChain.utils.svm under idl.address"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData","Anchor IDL input (Solana)","explicit 'idl' param"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData Anchor IDL input (Solana) explicit 'idl' param produces identical bytes to passing the IDL as abi","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"produces identical bytes to passing the IDL as abi"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData","Anchor IDL input (Solana)","explicit 'idl' param"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData Anchor IDL input (Solana) explicit 'idl' param auto-registers the IDL when passed via the idl param","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"auto-registers the IDL when passed via the idl param"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData","param validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData param validation throws when both 'abi' and 'idl' are provided","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws when both 'abi' and 'idl' are provided"},{"ancestorTitles":["Helpers Utils Namespace","encodeTxData","param validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace encodeTxData param validation throws when neither 'abi' nor 'idl' is provided","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws when neither 'abi' nor 'idl' is provided"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should parse integer values correctly","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should parse integer values correctly"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should parse decimal values correctly","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should parse decimal values correctly"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should handle zero values","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should handle zero values"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should handle negative values","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle negative values"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should handle values without decimals","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle values without decimals"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should handle values with leading/trailing whitespace","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle values with leading/trailing whitespace"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should handle values starting with decimal point","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle values starting with decimal point"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should handle exact decimal place matches","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle exact decimal place matches"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should throw error for invalid value types","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should throw error for invalid value types"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should throw error for invalid exponent types","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should throw error for invalid exponent types"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should throw error for empty or invalid value strings","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"should throw error for empty or invalid value strings"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should throw error when decimal places exceed exponent","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should throw error when decimal places exceed exponent"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should handle large numbers","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle large numbers"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should handle common token decimal scenarios","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should handle common token decimal scenarios"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should handle object-based exponent input","invocations":1,"location":null,"numPassingAsserts":21,"retryReasons":[],"status":"passed","title":"should handle object-based exponent input"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should throw error for invalid object-based exponent types","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"should throw error for invalid object-based exponent types"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should throw error when decimal places exceed exponent with object format","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should throw error when decimal places exceed exponent with object format"},{"ancestorTitles":["Helpers Utils Namespace","parseUnits"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace parseUnits should produce same results for number and object-based exponent formats","invocations":1,"location":null,"numPassingAsserts":21,"retryReasons":[],"status":"passed","title":"should produce same results for number and object-based exponent formats"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","EVM-style usage (number decimals)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits EVM-style usage (number decimals) should format bigint values correctly","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should format bigint values correctly"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","EVM-style usage (number decimals)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits EVM-style usage (number decimals) should format string values correctly","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should format string values correctly"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","EVM-style usage (number decimals)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits EVM-style usage (number decimals) should handle different decimal scenarios","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should handle different decimal scenarios"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Push-style usage (options object)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Push-style usage (options object) should format with decimals option","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should format with decimals option"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Push-style usage (options object)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Push-style usage (options object) should format with precision option","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should format with precision option"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Push-style usage (options object)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Push-style usage (options object) should handle edge cases with precision","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should handle edge cases with precision"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Common token scenarios"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Common token scenarios should handle ETH scenarios","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should handle ETH scenarios"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Common token scenarios"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Common token scenarios should handle USDC scenarios","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should handle USDC scenarios"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Common token scenarios"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Common token scenarios should handle BTC scenarios","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should handle BTC scenarios"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Error handling and validation"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Error handling and validation should throw error for invalid value types","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should throw error for invalid value types"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Error handling and validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Error handling and validation should throw error for invalid decimals parameter","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should throw error for invalid decimals parameter"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Error handling and validation"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Error handling and validation should throw error for invalid decimals values","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should throw error for invalid decimals values"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Error handling and validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Error handling and validation should throw error for invalid precision values","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should throw error for invalid precision values"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Error handling and validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Error handling and validation should throw error for invalid string values","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw error for invalid string values"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Edge cases"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Edge cases should handle very large numbers","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle very large numbers"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Edge cases"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Edge cases should handle very small numbers","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle very small numbers"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Edge cases"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Edge cases should handle zero with different decimals","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should handle zero with different decimals"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Edge cases"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Edge cases should handle negative numbers","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle negative numbers"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Consistency between EVM-style and Push-style"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Consistency between EVM-style and Push-style should produce same results for number and object-based formats","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"should produce same results for number and object-based formats"},{"ancestorTitles":["Helpers Utils Namespace","formatUnits","Consistency between EVM-style and Push-style"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace formatUnits Consistency between EVM-style and Push-style should handle bigint and string inputs consistently","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should handle bigint and string inputs consistently"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","basic functionality"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount basic functionality should calculate minimum amount out with 1% slippage","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should calculate minimum amount out with 1% slippage"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","basic functionality"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount basic functionality should calculate minimum amount out with 1% slippage for large amounts","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should calculate minimum amount out with 1% slippage for large amounts"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","basic functionality"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount basic functionality should calculate minimum amount out with 0.5% slippage","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should calculate minimum amount out with 0.5% slippage"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","basic functionality"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount basic functionality should calculate minimum amount out with 2% slippage","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should calculate minimum amount out with 2% slippage"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","basic functionality"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount basic functionality should handle zero slippage","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle zero slippage"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","basic functionality"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount basic functionality should handle maximum slippage (100%)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle maximum slippage (100%)"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","edge cases"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount edge cases should handle very small amounts","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle very small amounts"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","edge cases"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount edge cases should handle very large amounts","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle very large amounts"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","edge cases"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount edge cases should handle fractional slippage calculations correctly","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle fractional slippage calculations correctly"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","different slippage rates"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount different slippage rates should handle 0.1% slippage (10 bps)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle 0.1% slippage (10 bps)"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","different slippage rates"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount different slippage rates should handle 0.25% slippage (25 bps)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle 0.25% slippage (25 bps)"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","different slippage rates"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount different slippage rates should handle 5% slippage (500 bps)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle 5% slippage (500 bps)"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","different slippage rates"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount different slippage rates should handle 10% slippage (1000 bps)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle 10% slippage (1000 bps)"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","different slippage rates"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount different slippage rates should handle 50% slippage (5000 bps)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle 50% slippage (5000 bps)"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","error handling"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount error handling should throw error for non-string amount","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw error for non-string amount"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","error handling"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount error handling should throw error for non-number slippageBps","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw error for non-number slippageBps"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","error handling"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount error handling should throw error for non-integer slippageBps","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw error for non-integer slippageBps"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","error handling"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount error handling should throw error for negative slippageBps","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw error for negative slippageBps"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","error handling"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount error handling should throw error for slippageBps exceeding 10000","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw error for slippageBps exceeding 10000"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","error handling"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount error handling should throw error for empty amount string","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw error for empty amount string"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","error handling"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount error handling should throw error for whitespace-only amount string","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw error for whitespace-only amount string"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","error handling"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount error handling should throw error for invalid amount format","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw error for invalid amount format"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","real-world scenarios"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount real-world scenarios should work with USDC amounts (6 decimals)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should work with USDC amounts (6 decimals)"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","real-world scenarios"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount real-world scenarios should work with ETH amounts (18 decimals)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should work with ETH amounts (18 decimals)"},{"ancestorTitles":["Helpers Utils Namespace","slippageToMinAmount","real-world scenarios"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace slippageToMinAmount real-world scenarios should work with small token amounts","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should work with small token amounts"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should list all moveable tokens across all chains","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should list all moveable tokens across all chains"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should list moveable tokens for a specific chain (Ethereum Sepolia)","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should list moveable tokens for a specific chain (Ethereum Sepolia)"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should list moveable tokens for a specific chain (Arbitrum Sepolia)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should list moveable tokens for a specific chain (Arbitrum Sepolia)"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should list moveable tokens for a specific chain (Base Sepolia)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should list moveable tokens for a specific chain (Base Sepolia)"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should list moveable tokens for Push Chain (PRC-20 synthetics)","invocations":1,"location":null,"numPassingAsserts":68,"retryReasons":[],"status":"passed","title":"should list moveable tokens for Push Chain (PRC-20 synthetics)"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should include Push Chain PRC-20s in the all-chains moveable list","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should include Push Chain PRC-20s in the all-chains moveable list"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should return Push Chain PRC-20s via MOVEABLE_TOKENS registry lookup","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return Push Chain PRC-20s via MOVEABLE_TOKENS registry lookup"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should list all payable tokens across all chains","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should list all payable tokens across all chains"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should list payable tokens for a specific chain (Solana Devnet)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should list payable tokens for a specific chain (Solana Devnet)"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should list payable tokens for a specific chain (Arbitrum Sepolia)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should list payable tokens for a specific chain (Arbitrum Sepolia)"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should list payable tokens for a specific chain (Base Sepolia)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should list payable tokens for a specific chain (Base Sepolia)"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should resolve chain via client instance for moveable tokens","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should resolve chain via client instance for moveable tokens"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should get PRC20 address from a MoveableToken","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"should get PRC20 address from a MoveableToken"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should get PRC20 address from a { chain, address } token input","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should get PRC20 address from a { chain, address } token input"},{"ancestorTitles":["Helpers Utils Namespace","Tokens Utils"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Helpers Utils Namespace Tokens Utils should throw when the PRC20 address is unresolved on the target network","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw when the PRC20 address is unresolved on the target network"}],"endTime":1792494866908,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/utils.spec.ts","startTime":1792494866160,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["response identity"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"response identity live adaptation keeps origin/hash/raw and records the wrapped call","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"live adaptation keeps origin/hash/raw and records the wrapped call"},{"ancestorTitles":["response identity"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"response identity replay: a tracked execute on a registered wallet is re-presented as the wallet’s call","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"replay: a tracked execute on a registered wallet is re-presented as the wallet’s call"},{"ancestorTitles":["response identity"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"response identity replay: an outbound through the gateway restores the destination call and route","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"replay: an outbound through the gateway restores the destination call and route"},{"ancestorTitles":["response identity"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"response identity replay: anything not provably an AGW call is left untouched","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"replay: anything not provably an AGW call is left untouched"},{"ancestorTitles":["revert decoding"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"revert decoding decodes AGW errors with arguments","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"decodes AGW errors with arguments"},{"ancestorTitles":["revert decoding"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"revert decoding names a truncated PolicyCheckReverted by its inner selector","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"names a truncated PolicyCheckReverted by its inner selector"},{"ancestorTitles":["revert decoding"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"revert decoding finds revert data through error causes and viem-style messages","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"finds revert data through error causes and viem-style messages"},{"ancestorTitles":["revert decoding"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"revert decoding decodes viem simulation errors whose full revert lives in raw","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"decodes viem simulation errors whose full revert lives in raw"},{"ancestorTitles":["public surface"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"public surface exports the AGW errors, and the base execution error for instanceof checks","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"exports the AGW errors, and the base execution error for instanceof checks"},{"ancestorTitles":["public surface"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"public surface exposes the wallet marker and preset API, keeping deployment wiring and codecs internal","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"exposes the wallet marker and preset API, keeping deployment wiring and codecs internal"}],"endTime":1792494867522,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/response-surface.spec.ts","startTime":1792494866911,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["waitForOutboundTx initial-wait clamp"],"duration":103,"failureDetails":[],"failureMessages":[],"fullName":"waitForOutboundTx initial-wait clamp throws OutboundTimeoutError within the clamped budget (100ms)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"throws OutboundTimeoutError within the clamped budget (100ms)"},{"ancestorTitles":["waitForOutboundTx initial-wait clamp"],"duration":202,"failureDetails":[],"failureMessages":[],"fullName":"waitForOutboundTx initial-wait clamp throws with elapsedMs matching the override (not the default)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"throws with elapsedMs matching the override (not the default)"}],"endTime":1792494867956,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/outbound-timeout-clamp.spec.ts","startTime":1792494867525,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"a provider’s malformed unverified template cannot break registry summary enumeration","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"a provider’s malformed unverified template cannot break registry summary enumeration"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"lets a provider deactivate a malformed card without decoding its broken template","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"lets a provider deactivate a malformed card without decoding its broken template"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"delivers the correct terminal family to the per-call hook once when waiting repeatedly","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"delivers the correct terminal family to the per-call hook once when waiting repeatedly"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"plain jobs require an explicitly reviewed budget rather than silently adopting a re-quote","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"plain jobs require an explicitly reviewed budget rather than silently adopting a re-quote"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"placeholder methods and replacement proposals fail before any reads or signatures","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"placeholder methods and replacement proposals fail before any reads or signatures"}],"endTime":1792494868248,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/market/__tests__/namespace.spec.ts","startTime":1792494867959,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["R2 outbound REVERTED → 299-02 + externalStatus=failed (full-chain)"],"duration":25,"failureDetails":[],"failureMessages":[],"fullName":"R2 outbound REVERTED → 299-02 + externalStatus=failed (full-chain) cosmos REVERTED transition drives OutboundFailedError → 299-02 + failed receipt","invocations":1,"location":null,"numPassingAsserts":10,"retryReasons":[],"status":"passed","title":"cosmos REVERTED transition drives OutboundFailedError → 299-02 + failed receipt"},{"ancestorTitles":["R2 outbound REVERTED → 299-02 + externalStatus=failed (full-chain)"],"duration":222,"failureDetails":[],"failureMessages":[],"fullName":"R2 outbound REVERTED → 299-02 + externalStatus=failed (full-chain) cosmos timeout (UNSPECIFIED forever) drives OutboundTimeoutError → 299-03 + timeout receipt","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"cosmos timeout (UNSPECIFIED forever) drives OutboundTimeoutError → 299-03 + timeout receipt"}],"endTime":1792494868620,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/r2-outbound-revert-flow.spec.ts","startTime":1792494868253,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["buildPayloadForRoute — SVM Route 3"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"buildPayloadForRoute — SVM Route 3 keeps native SOL drains payload-only on Push while ixData carries the drain amount","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"keeps native SOL drains payload-only on Push while ixData carries the drain amount"},{"ancestorTitles":["buildPayloadForRoute — SVM Route 3"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"buildPayloadForRoute — SVM Route 3 keeps SPL drains payload-only on Push while ixData carries the drain amount","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"keeps SPL drains payload-only on Push while ixData carries the drain amount"},{"ancestorTitles":["buildPayloadForRoute — SVM Route 3"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildPayloadForRoute — SVM Route 3 wraps array data in an inbound UniversalPayload carrying a Push multicall","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"wraps array data in an inbound UniversalPayload carrying a Push multicall"},{"ancestorTitles":["buildPayloadForRoute — SVM Route 3"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildPayloadForRoute — SVM Route 3 wraps single calldata in an inbound UniversalPayload instead of sending raw calldata","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"wraps single calldata in an inbound UniversalPayload instead of sending raw calldata"},{"ancestorTitles":["buildPayloadForRoute — SVM Route 3"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildPayloadForRoute — SVM Route 3 uses the PC20 CEA-burn instruction and always embeds a forwarding payload","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"uses the PC20 CEA-burn instruction and always embeds a forwarding payload"},{"ancestorTitles":["outbound fee-locking skip decision"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"outbound fee-locking skip decision requires deployed UEA balance to cover native gas value plus reserve","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"requires deployed UEA balance to cover native gas value plus reserve"}],"endTime":1792494868950,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/route-handlers-svm-r3.spec.ts","startTime":1792494868623,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"reports unmapped source tokens without silently changing the default Push grant","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"reports unmapped source tokens without silently changing the default Push grant"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"supports the explicit destination-funded grant with preserved token/amount pins and review metadata","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"supports the explicit destination-funded grant with preserved token/amount pins and review metadata"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"an explicitly selected mapped source token can be ready for Push funding","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"an explicitly selected mapped source token can be ready for Push funding"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"never treats a mainnet template or undeployed Push generation as executable","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"never treats a mainnet template or undeployed Push generation as executable"},{"ancestorTitles":[],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"supports the TESTNET alias, rejects invalid modes and preserves empty selections","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"supports the TESTNET alias, rejects invalid modes and preserves empty selections"}],"endTime":1792494869205,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/preset-routes.spec.ts","startTime":1792494868953,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"encodes v2’s four-field rules, accepts pinned approvals and fills published markers","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"encodes v2’s four-field rules, accepts pinned approvals and fills published markers"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"retains legacy beneficiary fields during an unchanged decode/encode","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"retains legacy beneficiary fields during an unchanged decode/encode"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"uses the explicit execution chain for native-token objects shared by several networks","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"uses the explicit execution chain for native-token objects shared by several networks"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"refuses unsupported approval or transfer authority: spender","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"refuses unsupported approval or transfer authority: spender"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"refuses unsupported approval or transfer authority: amount","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"refuses unsupported approval or transfer authority: amount"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"refuses unsupported approval or transfer authority: recipient","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"refuses unsupported approval or transfer authority: recipient"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"refuses unsupported approval or transfer authority: increaseAllowance","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"refuses unsupported approval or transfer authority: increaseAllowance"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"refuses unsupported approval or transfer authority: oldArray","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"refuses unsupported approval or transfer authority: oldArray"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"does not silently drop duplicate alternatives or caps off the principal asset","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not silently drop duplicate alternatives or caps off the principal asset"}],"endTime":1792494869263,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/market/__tests__/rules.spec.ts","startTime":1792494869210,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["resolveUniversalTxFromSourceHash"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolveUniversalTxFromSourceHash resolves universalTxId → record → first pcTx hash + sender","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"resolves universalTxId → record → first pcTx hash + sender"},{"ancestorTitles":["resolveUniversalTxFromSourceHash"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"resolveUniversalTxFromSourceHash throws an actionable error when the detector resolves no universalTxId","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws an actionable error when the detector resolves no universalTxId"},{"ancestorTitles":["resolveUniversalTxFromSourceHash"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolveUniversalTxFromSourceHash throws when no universal record exists on Push Chain yet","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws when no universal record exists on Push Chain yet"},{"ancestorTitles":["resolveUniversalTxFromSourceHash"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolveUniversalTxFromSourceHash throws when the record has no Push pcTx recorded yet","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws when the record has no Push pcTx recorded yet"}],"endTime":1792494869473,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/source-hash-resolution.spec.ts","startTime":1792494869266,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"confirms pending Cosmos signature EyFYDWDhksPYpRk3DLzeW4izQagJZte6bKCQFagLYBdtJyaEyjbQpAWCbqDhHVymzjPJ4vdeHG1HHQp1qi6FhZD through Solana RPC","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"confirms pending Cosmos signature EyFYDWDhksPYpRk3DLzeW4izQagJZte6bKCQFagLYBdtJyaEyjbQpAWCbqDhHVymzjPJ4vdeHG1HHQp1qi6FhZD through Solana RPC"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"confirms pending Cosmos signature 0x0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c through Solana RPC","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"confirms pending Cosmos signature 0x0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c through Solana RPC"},{"ancestorTitles":[],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"waits through processed status before finalization","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"waits through processed status before finalization"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"reports a confirmed signature error as failure, preserving the hash","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"reports a confirmed signature error as failure, preserving the hash"},{"ancestorTitles":[],"duration":21,"failureDetails":[],"failureMessages":[],"fullName":"keeps wrong-cluster pending until timeout","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"keeps wrong-cluster pending until timeout"},{"ancestorTitles":[],"duration":20,"failureDetails":[],"failureMessages":[],"fullName":"keeps missing pending until timeout","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"keeps missing pending until timeout"},{"ancestorTitles":[],"duration":20,"failureDetails":[],"failureMessages":[],"fullName":"keeps processed-error pending until timeout","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"keeps processed-error pending until timeout"},{"ancestorTitles":[],"duration":21,"failureDetails":[],"failureMessages":[],"fullName":"keeps rpc-error pending until timeout","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"keeps rpc-error pending until timeout"},{"ancestorTitles":[],"duration":21,"failureDetails":[],"failureMessages":[],"fullName":"keeps malformed-hash pending until timeout","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"keeps malformed-hash pending until timeout"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"keeps an authoritative Cosmos revert ahead of the RPC tiebreaker","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"keeps an authoritative Cosmos revert ahead of the RPC tiebreaker"}],"endTime":1792494869710,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/outbound-svm-confirmation.spec.ts","startTime":1792494869475,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"public LENDING create gives a typed token-route error before any transaction","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"public LENDING create gives a typed token-route error before any transaction"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"public STAKING create gives a typed token-route error before any transaction","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"public STAKING create gives a typed token-route error before any transaction"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"reports the complete 40-condition count for duplicated DEX entries, without dropping them","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"reports the complete 40-condition count for duplicated DEX entries, without dropping them"},{"ancestorTitles":[],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"validates stock DEX rules independently: two 20-condition rules do not become a 40-condition rule","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"validates stock DEX rules independently: two 20-condition rules do not become a 40-condition rule"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"does not misclassify a destination RPC failure as an unavailable token","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not misclassify a destination RPC failure as an unavailable token"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for DUPLICATE_RULE while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for DUPLICATE_RULE while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for AGENT_IS_OWNER while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for AGENT_IS_OWNER while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for AMBIGUOUS_RULE while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for AMBIGUOUS_RULE while retaining diagnostic text"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for TARGET_NOT_ON_RULE_CHAIN while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for TARGET_NOT_ON_RULE_CHAIN while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for ASSET_CHAIN_MISMATCH while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for ASSET_CHAIN_MISMATCH while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for TOKEN_ROUTE_UNAVAILABLE while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for TOKEN_ROUTE_UNAVAILABLE while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for REQUEST_REJECTED while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for REQUEST_REJECTED while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for NOT_OWNER_OR_AGENT while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for NOT_OWNER_OR_AGENT while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for WALLET_NOT_DEPLOYED while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for WALLET_NOT_DEPLOYED while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for NOT_AGENTIC_WALLET while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for NOT_AGENTIC_WALLET while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for DELETE_NEEDS_TARGET while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for DELETE_NEEDS_TARGET while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for NO_RULES_FOR_CHAIN while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for NO_RULES_FOR_CHAIN while retaining diagnostic text"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for FROM_NOT_ALLOWED while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for FROM_NOT_ALLOWED while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for NOT_ALLOWED_IN_AGENTIC_MODE while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for NOT_ALLOWED_IN_AGENTIC_MODE while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for INVALID_RULE while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for INVALID_RULE while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for CAPABILITY_UNAVAILABLE while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for CAPABILITY_UNAVAILABLE while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for READ_ONLY while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for READ_ONLY while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for NOT_WALLET_OWNER while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for NOT_WALLET_OWNER while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for RULE_NOT_FOUND while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for RULE_NOT_FOUND while retaining diagnostic text"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for RULE_READ_FAILED while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for RULE_READ_FAILED while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for INCONSISTENT_READ while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for INCONSISTENT_READ while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for INDEX_RACE while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for INDEX_RACE while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for RECEIPT_MISMATCH while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for RECEIPT_MISMATCH while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for RECEIPT_UNAVAILABLE while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for RECEIPT_UNAVAILABLE while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for AGENT_GAS_INSUFFICIENT while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for AGENT_GAS_INSUFFICIENT while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"provides safe UI copy for WALLET_BALANCE_INSUFFICIENT while retaining diagnostic text","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"provides safe UI copy for WALLET_BALANCE_INSUFFICIENT while retaining diagnostic text"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"keeps submitted hashes and uncertainty visible instead of inviting a blind retry","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"keeps submitted hashes and uncertainty visible instead of inviting a blind retry"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"explains the create and native action ceilings using the available structured reason","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"explains the create and native action ceilings using the available structured reason"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"preserves decoded contract failures and cancellation causes with UI messages","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"preserves decoded contract failures and cancellation causes with UI messages"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"explains OwnerSigExpired without confusing approvals, rules and balances","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"explains OwnerSigExpired without confusing approvals, rules and balances"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"explains RulesExpired without confusing approvals, rules and balances","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"explains RulesExpired without confusing approvals, rules and balances"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"explains ERC20InsufficientAllowance without confusing approvals, rules and balances","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"explains ERC20InsufficientAllowance without confusing approvals, rules and balances"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"explains ERC20InsufficientBalance without confusing approvals, rules and balances","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"explains ERC20InsufficientBalance without confusing approvals, rules and balances"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"explains TooManyAllowedCallPins without confusing approvals, rules and balances","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"explains TooManyAllowedCallPins without confusing approvals, rules and balances"}],"endTime":1792494870032,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/creation-errors.spec.ts","startTime":1792494869711,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["findChildUtxIdFromExternalTx — detector-first derivation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"findChildUtxIdFromExternalTx — detector-first derivation happy path: detector returns a UniversalTx resolution, utxId is returned with derivedFrom=detector","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"happy path: detector returns a UniversalTx resolution, utxId is returned with derivedFrom=detector"},{"ancestorTitles":["findChildUtxIdFromExternalTx — detector-first derivation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"findChildUtxIdFromExternalTx — detector-first derivation prefers UniversalTx resolution over RevertUniversalTx when both are present","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"prefers UniversalTx resolution over RevertUniversalTx when both are present"},{"ancestorTitles":["findChildUtxIdFromExternalTx — detector-first derivation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"findChildUtxIdFromExternalTx — detector-first derivation detector returns empty resolutions → falls through to cosmos search (which also empty) → utxId=null","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"detector returns empty resolutions → falls through to cosmos search (which also empty) → utxId=null"},{"ancestorTitles":["findChildUtxIdFromExternalTx — detector-first derivation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"findChildUtxIdFromExternalTx — detector-first derivation detector throws → cosmos fallback finds a hit → utxId returned with derivedFrom=cosmos-fallback","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"detector throws → cosmos fallback finds a hit → utxId returned with derivedFrom=cosmos-fallback"},{"ancestorTitles":["findChildUtxIdFromExternalTx — detector-first derivation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"findChildUtxIdFromExternalTx — detector-first derivation no sourceChain provided: skips detector entirely, uses cosmos fallback only","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"no sourceChain provided: skips detector entirely, uses cosmos fallback only"},{"ancestorTitles":["findChildUtxIdFromExternalTx — detector-first derivation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"findChildUtxIdFromExternalTx — detector-first derivation both detector and cosmos fail → returns {utxId:null, error}","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"both detector and cosmos fail → returns {utxId:null, error}"},{"ancestorTitles":["findChildUtxIdFromExternalTx — detector-first derivation"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"findChildUtxIdFromExternalTx — detector-first derivation normalizes Push Chain native balance errors from failed inbound pcTx","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"normalizes Push Chain native balance errors from failed inbound pcTx"},{"ancestorTitles":["findChildUtxIdFromExternalTx — detector-first derivation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"findChildUtxIdFromExternalTx — detector-first derivation fails fast when inbound pcTx is failed before universalStatus becomes terminal","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"fails fast when inbound pcTx is failed before universalStatus becomes terminal"}],"endTime":1792494870266,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/inbound-tracker-derivation.spec.ts","startTime":1792494870035,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["UniversalSigner utilities","createUniversalSigner"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities createUniversalSigner should return a signer with provided methods and account","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should return a signer with provided methods and account"},{"ancestorTitles":["UniversalSigner utilities","toUniversalFromKeypair - viem"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities toUniversalFromKeypair - viem wraps WalletClient correctly","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"wraps WalletClient correctly"},{"ancestorTitles":["UniversalSigner utilities","toUniversalFromKeypair - viem"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities toUniversalFromKeypair - viem rejects invalid account","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects invalid account"},{"ancestorTitles":["UniversalSigner utilities","toUniversalFromKeypair - EIP-7702 capability gating (viem)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities toUniversalFromKeypair - EIP-7702 capability gating (viem) exposes signAuthorization for a local account","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"exposes signAuthorization for a local account"},{"ancestorTitles":["UniversalSigner utilities","toUniversalFromKeypair - EIP-7702 capability gating (viem)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities toUniversalFromKeypair - EIP-7702 capability gating (viem) omits signAuthorization for a JSON-RPC account","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"omits signAuthorization for a JSON-RPC account"},{"ancestorTitles":["UniversalSigner utilities","toUniversalFromKeypair - ethers v6"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities toUniversalFromKeypair - ethers v6 wraps ethers.Wallet correctly","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"wraps ethers.Wallet correctly"},{"ancestorTitles":["UniversalSigner utilities","toUniversalFromKeypair - ethers v6"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities toUniversalFromKeypair - ethers v6 throws if no provider","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws if no provider"},{"ancestorTitles":["UniversalSigner utilities","toUniversalFromKeypair - solana"],"duration":21,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities toUniversalFromKeypair - solana wraps Solana Keypair correctly","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"wraps Solana Keypair correctly"},{"ancestorTitles":["UniversalSigner utilities","toUniversalFromKeypair - solana"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities toUniversalFromKeypair - solana throws on wrong chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws on wrong chain"},{"ancestorTitles":["UniversalSigner utilities","toUniversal"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities toUniversal preserves skeleton methods","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"preserves skeleton methods"},{"ancestorTitles":["UniversalSigner utilities","construct"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities construct should create a UniversalSignerSkeleton with required parameters","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"should create a UniversalSignerSkeleton with required parameters"},{"ancestorTitles":["UniversalSigner utilities","construct"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities construct should include signTypedData when provided","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should include signTypedData when provided"},{"ancestorTitles":["UniversalSigner utilities","construct"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities construct should include signAuthorization when provided","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should include signAuthorization when provided"},{"ancestorTitles":["UniversalSigner utilities","construct"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities construct should throw error when signTypedData is provided for Solana chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw error when signTypedData is provided for Solana chain"},{"ancestorTitles":["UniversalSigner utilities","construct"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities construct should work with Solana chain when signTypedData is not provided","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should work with Solana chain when signTypedData is not provided"},{"ancestorTitles":["UniversalSigner utilities","construct"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities construct should throw when signAuthorization is provided for a Solana chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw when signAuthorization is provided for a Solana chain"},{"ancestorTitles":["UniversalSigner utilities","construct + toUniversal two-step process"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities construct + toUniversal two-step process should create a UniversalSigner through construct + toUniversal","invocations":1,"location":null,"numPassingAsserts":16,"retryReasons":[],"status":"passed","title":"should create a UniversalSigner through construct + toUniversal"},{"ancestorTitles":["UniversalSigner utilities","construct + toUniversal two-step process"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UniversalSigner utilities construct + toUniversal two-step process should work without signTypedData for Solana chain","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should work without signTypedData for Solana chain"}],"endTime":1792494870460,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal/signer/signer.spec.ts","startTime":1792494870270,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 101 — Origin Chain Detected","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"101 — Origin Chain Detected"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 102-01 — Estimating Gas","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"102-01 — Estimating Gas"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 103-03-04 — Prepaid Deposit Estimated","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"103-03-04 — Prepaid Deposit Estimated"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 103-01 — Resolving Universal Execution Account","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"103-01 — Resolving Universal Execution Account"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 103-02 — Universal Execution Account Resolved","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"103-02 — Universal Execution Account Resolved"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 104-01 — Awaiting Transaction","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"104-01 — Awaiting Transaction"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 104-02 — Awaiting Signature","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"104-02 — Awaiting Signature"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 104-03 — Verification Success","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"104-03 — Verification Success"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 104-04 — Verification Declined (user decline)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"104-04 — Verification Declined (user decline)"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 104-04 — Signature Failed (non-decline error)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"104-04 — Signature Failed (non-decline error)"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 105-01 — Gas Funding In Progress","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"105-01 — Gas Funding In Progress"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 105-02 — Gas Funding Confirmed","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"105-02 — Gas Funding Confirmed"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 106-01 — Preparing Funds Transfer","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"106-01 — Preparing Funds Transfer"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 106-02 — Funds Lock Submitted","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"106-02 — Funds Lock Submitted"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 106-03 — Awaiting Confirmations","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"106-03 — Awaiting Confirmations"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 106-03-01 — Confirmation intermediate (INFO)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"106-03-01 — Confirmation intermediate (INFO)"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 106-03-02 — Confirmation terminal (SUCCESS)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"106-03-02 — Confirmation terminal (SUCCESS)"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 106-04 — Funds Confirmed","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"106-04 — Funds Confirmed"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 106-05 — Syncing with Push Chain","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"106-05 — Syncing with Push Chain"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 106-06 — Funds Credited on Push Chain","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"106-06 — Funds Credited on Push Chain"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 107 — Broadcasting to Push Chain","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"107 — Broadcasting to Push Chain"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 199-01 — Push Chain Tx Success","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"199-01 — Push Chain Tx Success"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 199-02 — Push Chain Tx Failed","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"199-02 — Push Chain Tx Failed"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 199-03 — Syncing State with Push Chain Timeout","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"199-03 — Syncing State with Push Chain Timeout"},{"ancestorTitles":["Route 1 spec strings (101–199)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Route 1 spec strings (101–199) 199-99 — Intermediate Push Chain Tx Completed","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"199-99 — Intermediate Push Chain Tx Completed"}],"endTime":1792494870588,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/progress-hook/__tests__/r1-spec-strings.spec.ts","startTime":1792494870462,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["sendPushTx native multicall routing"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"sendPushTx native multicall routing uses the atomic EIP-7702 route for a constructed signer","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"uses the atomic EIP-7702 route for a constructed signer"},{"ancestorTitles":["sendPushTx native multicall routing"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"sendPushTx native multicall routing estimates gas per operation in the sequential fallback","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"estimates gas per operation in the sequential fallback"},{"ancestorTitles":["sendPushTx native multicall routing"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"sendPushTx native multicall routing a revert in the sequential fallback carries the hashes already mined on the error","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"a revert in the sequential fallback carries the hashes already mined on the error"},{"ancestorTitles":["sendPushTx native multicall routing"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sendPushTx native multicall routing falls back when authorization is unsupported before broadcast","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"falls back when authorization is unsupported before broadcast"},{"ancestorTitles":["sendPushTx native multicall routing"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sendPushTx native multicall routing transforms a direct Push transaction only after its receipt succeeds","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"transforms a direct Push transaction only after its receipt succeeds"},{"ancestorTitles":["sendPushTx native multicall routing"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"sendPushTx native multicall routing rejects a reverted direct Push receipt before indexing or transforming it","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"rejects a reverted direct Push receipt before indexing or transforming it"},{"ancestorTitles":["atomic-only native batches (AGW sender-preserving arrays)"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"atomic-only native batches (AGW sender-preserving arrays) rejects missing signer capability without sending any sequential call","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"rejects missing signer capability without sending any sequential call"},{"ancestorTitles":["atomic-only native batches (AGW sender-preserving arrays)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"atomic-only native batches (AGW sender-preserving arrays) refuses a missing executor before authorization or broadcast","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"refuses a missing executor before authorization or broadcast"},{"ancestorTitles":["atomic-only native batches (AGW sender-preserving arrays)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"atomic-only native batches (AGW sender-preserving arrays) does not fall back when authorization is exposed but unsupported at runtime","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"does not fall back when authorization is exposed but unsupported at runtime"},{"ancestorTitles":["atomic-only native batches (AGW sender-preserving arrays)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"atomic-only native batches (AGW sender-preserving arrays) uses the atomic transport when signer and executor are available","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"uses the atomic transport when signer and executor are available"}],"endTime":1792494870764,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts","startTime":1792494870590,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["executeReads app-contract path"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path retains all sequential hashes for a missing request mismatch","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"retains all sequential hashes for a missing request mismatch"},{"ancestorTitles":["executeReads app-contract path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path retains all sequential hashes for a extra request mismatch","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"retains all sequential hashes for a extra request mismatch"},{"ancestorTitles":["executeReads app-contract path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path announces a stale prepared read (READ-TX-102-04) before revalidating it","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"announces a stale prepared read (READ-TX-102-04) before revalidating it"},{"ancestorTitles":["executeReads app-contract path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path a fresh prepared read is not announced stale","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"a fresh prepared read is not announced stale"},{"ancestorTitles":["executeReads app-contract path"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path empty batches perform no execution or tracking","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"empty batches perform no execution or tracking"},{"ancestorTitles":["executeReads app-contract path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path maps identical prepared reads to distinct requests in log order","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"maps identical prepared reads to distinct requests in log order"},{"ancestorTitles":["executeReads app-contract path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path rejects a matching spec with a different callbackTarget","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a matching spec with a different callbackTarget"},{"ancestorTitles":["executeReads app-contract path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path rejects a matching spec with a different callbackGasLimit","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a matching spec with a different callbackGasLimit"},{"ancestorTitles":["executeReads app-contract path","partial batches through the real native execution layers"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path partial batches through the real native execution layers retains recovery metadata after send failure","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"retains recovery metadata after send failure"},{"ancestorTitles":["executeReads app-contract path","partial batches through the real native execution layers"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path partial batches through the real native execution layers retains recovery metadata after decline failure","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"retains recovery metadata after decline failure"},{"ancestorTitles":["executeReads app-contract path","partial batches through the real native execution layers"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path partial batches through the real native execution layers retains recovery metadata after nonce-refresh failure","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"retains recovery metadata after nonce-refresh failure"},{"ancestorTitles":["executeReads app-contract path","partial batches through the real native execution layers"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path partial batches through the real native execution layers retains recovery metadata after receipt failure","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"retains recovery metadata after receipt failure"},{"ancestorTitles":["executeReads app-contract path","partial batches through the real native execution layers"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path partial batches through the real native execution layers retains recovery metadata after first-receipt failure","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"retains recovery metadata after first-receipt failure"},{"ancestorTitles":["executeReads app-contract path","partial batches through the real native execution layers"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path partial batches through the real native execution layers retains recovery metadata after revert failure","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"retains recovery metadata after revert failure"},{"ancestorTitles":["executeReads app-contract path","partial batches through the real native execution layers"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path partial batches through the real native execution layers retains recovery metadata after index failure","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"retains recovery metadata after index failure"},{"ancestorTitles":["executeReads app-contract path","partial batches through the real native execution layers"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path partial batches through the real native execution layers retains recovery metadata after response failure","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"retains recovery metadata after response failure"},{"ancestorTitles":["executeReads app-contract path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path supports explicit request argument mapping","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"supports explicit request argument mapping"},{"ancestorTitles":["executeReads app-contract path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path passes an IDL result shape through batch execution and waiting","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"passes an IDL result shape through batch execution and waiting"},{"ancestorTitles":["executeReads app-contract path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path encodes the app entrypoint, forwards escrow and preserves each decode shape and input order","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"encodes the app entrypoint, forwards escrow and preserves each decode shape and input order"},{"ancestorTitles":["executeReads app-contract path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path waitForCompletion=false returns resumable snapshots without polling","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"waitForCompletion=false returns resumable snapshots without polling"},{"ancestorTitles":["executeReads app-contract path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path collects every hash after sequential wallet fallback","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"collects every hash after sequential wallet fallback"},{"ancestorTitles":["executeReads app-contract path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path validates the entire batch before broadcasting","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"validates the entire batch before broadcasting"},{"ancestorTitles":["executeReads app-contract path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path rejects missing or extra request logs with the transaction hash for recovery","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects missing or extra request logs with the transaction hash for recovery"},{"ancestorTitles":["executeReads app-contract path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path a non-atomic batch that fails midway surfaces the hashes already mined","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"a non-atomic batch that fails midway surfaces the hashes already mined"},{"ancestorTitles":["executeReads app-contract path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path assertRequestEntrypoint rejects a malformed entrypoint without any network","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"assertRequestEntrypoint rejects a malformed entrypoint without any network"},{"ancestorTitles":["executeReads app-contract path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path does not track a reverted request transaction","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not track a reverted request transaction"},{"ancestorTitles":["executeReads app-contract path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"executeReads app-contract path preserves callback failure responses and propagates read timeouts","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"preserves callback failure responses and propagates read timeouts"},{"ancestorTitles":["execution validation and observable progress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"execution validation and observable progress emits the OG balance event and enforces the read-value check when requested","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"emits the OG balance event and enforces the read-value check when requested"},{"ancestorTitles":["execution validation and observable progress"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"execution validation and observable progress does not broadcast any read when a later prepared request is invalid","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not broadcast any read when a later prepared request is invalid"},{"ancestorTitles":["execution validation and observable progress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"execution validation and observable progress deduplicates shared hooks and emits batch success only after completion","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"deduplicates shared hooks and emits batch success only after completion"},{"ancestorTitles":["execution validation and observable progress"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"execution validation and observable progress emits confirmed events but no completion for no-wait requests","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"emits confirmed events but no completion for no-wait requests"},{"ancestorTitles":["execution validation and observable progress"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"execution validation and observable progress reports callback failure as batch failure while resolving terminal results","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"reports callback failure as batch failure while resolving terminal results"}],"endTime":1792494870937,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/read-executor.spec.ts","startTime":1792494870779,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["agentic.create"],"duration":5,"failureDetails":[],"failureMessages":[],"fullName":"agentic.create validates first, then sends deploy + grants in input order and returns receipt IDs","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"validates first, then sends deploy + grants in input order and returns receipt IDs"},{"ancestorTitles":["agentic.create"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"agentic.create a bare wallet is one deployWallet call, no funding","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"a bare wallet is one deployWallet call, no funding"},{"ancestorTitles":["agentic.create"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"agentic.create invalid input never reaches the signer","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"invalid input never reaches the signer"},{"ancestorTitles":["agentic.create"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"agentic.create refuses a changed URP version before grant signing","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"refuses a changed URP version before grant signing"},{"ancestorTitles":["agentic.create"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"agentic.create a different wallet in the receipt is RECEIPT_MISMATCH, not a safe-to-retry race","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"a different wallet in the receipt is RECEIPT_MISMATCH, not a safe-to-retry race"},{"ancestorTitles":["agentic.create"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"agentic.create IDs that differ from the input order are a RECEIPT_MISMATCH, not a silent reorder","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"IDs that differ from the input order are a RECEIPT_MISMATCH, not a silent reorder"},{"ancestorTitles":["agentic.create"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"agentic.create creation never uses the batch transport or a sequential fallback","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"creation never uses the batch transport or a sequential fallback"},{"ancestorTitles":["agentic.create"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"agentic.create a receipt that cannot be read after submission keeps the hash and reports unknown state","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"a receipt that cannot be read after submission keeps the hash and reports unknown state"},{"ancestorTitles":["agentic.create"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"agentic.create the deploy is index-bound: a raced slot reverts and is reported as INDEX_RACE with nothing committed","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"the deploy is index-bound: a raced slot reverts and is reported as INDEX_RACE with nothing committed"},{"ancestorTitles":["agentic.create"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"agentic.create a later rename alone does not establish a competing creation","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"a later rename alone does not establish a competing creation"},{"ancestorTitles":["agentic.create"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"agentic.create a slot that is already deployed is refused before signing","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"a slot that is already deployed is refused before signing"},{"ancestorTitles":["rules.add / rules.delete"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"rules.add / rules.delete add: owner-only, duplicate agent/chain refused before signing","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"add: owner-only, duplicate agent/chain refused before signing"},{"ancestorTitles":["rules.add / rules.delete"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"rules.add / rules.delete add: several rules are one atomic owner execute batch (one signature on any signer)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"add: several rules are one atomic owner execute batch (one signature on any signer)"},{"ancestorTitles":["rules.add / rules.delete"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"rules.add / rules.delete revoke: bare and empty are refused; unknown IDs fail before signing; several IDs are one atomic owner execute","invocations":1,"location":null,"numPassingAsserts":10,"retryReasons":[],"status":"passed","title":"revoke: bare and empty are refused; unknown IDs fail before signing; several IDs are one atomic owner execute"},{"ancestorTitles":["rules.update — one owner batch: assert → revoke → grant"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"rules.update — one owner batch: assert → revoke → grant builds exactly one execute(batch) with the observed spend asserted per pair","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"builds exactly one execute(batch) with the observed spend asserted per pair"},{"ancestorTitles":["rules.update — one owner batch: assert → revoke → grant"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"rules.update — one owner batch: assert → revoke → grant universal replacement asserts every asset in stored order before revoke/grant","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"universal replacement asserts every asset in stored order before revoke/grant"},{"ancestorTitles":["rules.update — one owner batch: assert → revoke → grant"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"rules.update — one owner batch: assert → revoke → grant replacement may name another live agent, but may not repeat an old ID","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"replacement may name another live agent, but may not repeat an old ID"}],"endTime":1792494871320,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/management.spec.ts","startTime":1792494870941,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Orchestrator.createCascadedBuilder — per-call progressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.createCascadedBuilder — per-call progressHook does NOT wrap ctx.progressHook when no per-call hook is provided","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"does NOT wrap ctx.progressHook when no per-call hook is provided"},{"ancestorTitles":["Orchestrator.createCascadedBuilder — per-call progressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.createCascadedBuilder — per-call progressHook passes the per-call hook as defaultEventHook (4th arg) to the cascade builder","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"passes the per-call hook as defaultEventHook (4th arg) to the cascade builder"},{"ancestorTitles":["Orchestrator.createCascadedBuilder — per-call progressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.createCascadedBuilder — per-call progressHook passes cascade-level enforceGasCheck to the cascade builder","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"passes cascade-level enforceGasCheck to the cascade builder"},{"ancestorTitles":["Orchestrator.createCascadedBuilder — per-call progressHook"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.createCascadedBuilder — per-call progressHook wraps ctx.progressHook to fan events to BOTH init-time and per-call hooks during send()","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"wraps ctx.progressHook to fan events to BOTH init-time and per-call hooks during send()"},{"ancestorTitles":["Orchestrator.createCascadedBuilder — per-call progressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.createCascadedBuilder — per-call progressHook dedups when the per-call hook IS the init-time hook (same reference fires once)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"dedups when the per-call hook IS the init-time hook (same reference fires once)"},{"ancestorTitles":["Orchestrator.createCascadedBuilder — per-call progressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.createCascadedBuilder — per-call progressHook delivers events to the per-call hook even when no init-time hook is configured","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"delivers events to the per-call hook even when no init-time hook is configured"},{"ancestorTitles":["Orchestrator.createCascadedBuilder — per-call progressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.createCascadedBuilder — per-call progressHook restores ctx.progressHook after send() resolves","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"restores ctx.progressHook after send() resolves"},{"ancestorTitles":["Orchestrator.createCascadedBuilder — per-call progressHook"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.createCascadedBuilder — per-call progressHook restores ctx.progressHook even when send() rejects","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"restores ctx.progressHook even when send() rejects"},{"ancestorTitles":["Orchestrator.createCascadedBuilder — per-call progressHook"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.createCascadedBuilder — per-call progressHook isolates per-call hooks across two sequential cascade calls","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"isolates per-call hooks across two sequential cascade calls"}],"endTime":1792494871453,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/cascade-builder-progress-hook.spec.ts","startTime":1792494871323,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["v5 internal SVM wire codec"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"v5 internal SVM wire codec round-trips ordered per-token caps and all four data-pin modes","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"round-trips ordered per-token caps and all four data-pin modes"},{"ancestorTitles":["v5 internal SVM wire codec"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"v5 internal SVM wire codec rejects expired before encoding","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects expired before encoding"},{"ancestorTitles":["v5 internal SVM wire codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"v5 internal SVM wire codec rejects zero CEA before encoding","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects zero CEA before encoding"},{"ancestorTitles":["v5 internal SVM wire codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"v5 internal SVM wire codec rejects empty assets before encoding","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects empty assets before encoding"},{"ancestorTitles":["v5 internal SVM wire codec"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"v5 internal SVM wire codec rejects duplicate tokens before encoding","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects duplicate tokens before encoding"},{"ancestorTitles":["v5 internal SVM wire codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"v5 internal SVM wire codec rejects system program before encoding","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects system program before encoding"},{"ancestorTitles":["v5 internal SVM wire codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"v5 internal SVM wire codec rejects ambiguous prefixes before encoding","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects ambiguous prefixes before encoding"},{"ancestorTitles":["v5 internal SVM wire codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"v5 internal SVM wire codec rejects missing pin before encoding","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects missing pin before encoding"},{"ancestorTitles":["v5 internal SVM wire codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"v5 internal SVM wire codec rejects duplicate pin before encoding","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects duplicate pin before encoding"},{"ancestorTitles":["v5 internal SVM wire codec"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"v5 internal SVM wire codec rejects CEA absent before encoding","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects CEA absent before encoding"},{"ancestorTitles":["v5 internal SVM wire codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"v5 internal SVM wire codec rejects fixed count outside bound before encoding","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects fixed count outside bound before encoding"},{"ancestorTitles":["v5 internal SVM wire codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"v5 internal SVM wire codec refuses misleading integer/raw alignment and zero ratio denominators","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"refuses misleading integer/raw alignment and zero ratio denominators"},{"ancestorTitles":["wallet-scoped SVM value accounts"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"wallet-scoped SVM value accounts derives the exact PDA from wallet20 and the selected gateway","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"derives the exact PDA from wallet20 and the selected gateway"},{"ancestorTitles":["wallet-scoped SVM value accounts"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"wallet-scoped SVM value accounts resolved token caps cannot omit their corresponding protected ATAs","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"resolved token caps cannot omit their corresponding protected ATAs"},{"ancestorTitles":["wallet-scoped SVM value accounts"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"wallet-scoped SVM value accounts includes input/output ATAs, deduplicates, and separates Token-2022 accounts","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"includes input/output ATAs, deduplicates, and separates Token-2022 accounts"},{"ancestorTitles":["S12–S18 payload checks"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"S12–S18 payload checks matches the existing node encoder and parses every byte including writable flags","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"matches the existing node encoder and parses every byte including writable flags"},{"ancestorTitles":["S12–S18 payload checks"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"S12–S18 payload checks rejects trailing data with the corresponding contract error","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects trailing data with the corresponding contract error"},{"ancestorTitles":["S12–S18 payload checks"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"S12–S18 payload checks rejects truncated with the corresponding contract error","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects truncated with the corresponding contract error"},{"ancestorTitles":["S12–S18 payload checks"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"S12–S18 payload checks rejects oversized count with the corresponding contract error","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects oversized count with the corresponding contract error"},{"ancestorTitles":["S12–S18 payload checks"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"S12–S18 payload checks pins prevent key substitution and protected-account aliasing","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"pins prevent key substitution and protected-account aliasing"},{"ancestorTitles":["S12–S18 payload checks"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"S12–S18 payload checks enforces little-endian floors/ceilings, from-end offsets, ratios and exact byte pins","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"enforces little-endian floors/ceilings, from-end offsets, ratios and exact byte pins"},{"ancestorTitles":["internal SVM outbound action"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"internal SVM outbound action uses the program recipient, wallet refund and quoted PC while preserving the exact payload","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"uses the program recipient, wallet refund and quoted PC while preserving the exact payload"},{"ancestorTitles":["internal SVM outbound action"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"internal SVM outbound action rejects caps, zero gas and unknown assets before signing","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"rejects caps, zero gas and unknown assets before signing"}],"endTime":1792494871746,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/svm-internals.spec.ts","startTime":1792494871457,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 201 — {ChainName} Detected","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"201 — {ChainName} Detected"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 202-01 — Estimating {ChainName} Chain Gas","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"202-01 — Estimating {ChainName} Chain Gas"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 202-02 — {ChainName} Chain Gas Estimated","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"202-02 — {ChainName} Chain Gas Estimated"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 203-01 — Resolving {ChainName} Execution Account","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"203-01 — Resolving {ChainName} Execution Account"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 203-02 — {ChainName} Execution Account Resolved","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"203-02 — {ChainName} Execution Account Resolved"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 204-01 — Awaiting Signature","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"204-01 — Awaiting Signature"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 204-02 — Signature Received","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"204-02 — Signature Received"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 204-03 — Verification Success","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"204-03 — Verification Success"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 204-04 — Verification Declined (genuine user decline)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"204-04 — Verification Declined (genuine user decline)"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 207 — Broadcasting from Push Chain → {ChainName}","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"207 — Broadcasting from Push Chain → {ChainName}"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 209-01 — Awaiting Push Chain Relay","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"209-01 — Awaiting Push Chain Relay"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 209-02 — Syncing State with {ChainName}","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"209-02 — Syncing State with {ChainName}"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 299-01 — {ChainName} Tx Success","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"299-01 — {ChainName} Tx Success"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 299-02 — {ChainName} Tx Failed","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"299-02 — {ChainName} Tx Failed"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 299-03 — Syncing State with {ChainName} Timeout","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"299-03 — Syncing State with {ChainName} Timeout"},{"ancestorTitles":["Route 2 spec strings (201–299)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 2 spec strings (201–299) 299-99 — Intermediate {ChainName} Tx Completed","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"299-99 — Intermediate {ChainName} Tx Completed"}],"endTime":1792494871934,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/progress-hook/__tests__/r2-spec-strings.spec.ts","startTime":1792494871751,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["gateway request recipient"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gateway request recipient names the UEA for a PC20 burn so the native gas leg can be credited","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"names the UEA for a PC20 burn so the native gas leg can be credited"},{"ancestorTitles":["gateway request recipient"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"gateway request recipient keeps the zero sentinel for a non-PC20 transfer","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"keeps the zero sentinel for a non-PC20 transfer"},{"ancestorTitles":["gateway request recipient"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gateway request recipient keeps the zero sentinel for a PC20 export (no burn leg on the source)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"keeps the zero sentinel for a PC20 export (no burn leg on the source)"}],"endTime":1792494872064,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/pc20-request-recipient.spec.ts","startTime":1792494871939,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["route-detector","isChainTarget"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector isChainTarget should return true for valid ChainTarget object","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return true for valid ChainTarget object"},{"ancestorTitles":["route-detector","isChainTarget"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector isChainTarget should return false for simple string address","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return false for simple string address"},{"ancestorTitles":["route-detector","isChainTarget"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector isChainTarget should return false for null/undefined","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return false for null/undefined"},{"ancestorTitles":["route-detector","isChainTarget"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector isChainTarget should return false for object without chain property","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return false for object without chain property"},{"ancestorTitles":["route-detector","isPushChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector isPushChain should return true for Push Chain testnet","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return true for Push Chain testnet"},{"ancestorTitles":["route-detector","isPushChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector isPushChain should return true for Push Chain mainnet","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return true for Push Chain mainnet"},{"ancestorTitles":["route-detector","isPushChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector isPushChain should return true for Push Chain localnet","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return true for Push Chain localnet"},{"ancestorTitles":["route-detector","isPushChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector isPushChain should return false for external EVM chains","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should return false for external EVM chains"},{"ancestorTitles":["route-detector","isPushChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector isPushChain should return false for Solana","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return false for Solana"},{"ancestorTitles":["route-detector","isSupportedExternalChain"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"route-detector isSupportedExternalChain should return true for supported EVM chains","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should return true for supported EVM chains"},{"ancestorTitles":["route-detector","isSupportedExternalChain"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"route-detector isSupportedExternalChain should return false for Push Chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return false for Push Chain"},{"ancestorTitles":["route-detector","isSupportedExternalChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector isSupportedExternalChain should return true for Solana","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return true for Solana"},{"ancestorTitles":["route-detector","detectRoute","Route 1: UOA_TO_PUSH"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector detectRoute Route 1: UOA_TO_PUSH should detect simple string address as UOA_TO_PUSH","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should detect simple string address as UOA_TO_PUSH"},{"ancestorTitles":["route-detector","detectRoute","Route 1: UOA_TO_PUSH"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector detectRoute Route 1: UOA_TO_PUSH should detect ChainTarget with Push Chain as UOA_TO_PUSH","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should detect ChainTarget with Push Chain as UOA_TO_PUSH"},{"ancestorTitles":["route-detector","detectRoute","Route 2: UOA_TO_CEA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector detectRoute Route 2: UOA_TO_CEA should detect ChainTarget with external chain as UOA_TO_CEA","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should detect ChainTarget with external chain as UOA_TO_CEA"},{"ancestorTitles":["route-detector","detectRoute","Route 2: UOA_TO_CEA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector detectRoute Route 2: UOA_TO_CEA should detect with Ethereum Sepolia","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should detect with Ethereum Sepolia"},{"ancestorTitles":["route-detector","detectRoute","Route 3: CEA_TO_PUSH"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector detectRoute Route 3: CEA_TO_PUSH should detect from.chain with Push target as CEA_TO_PUSH","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should detect from.chain with Push target as CEA_TO_PUSH"},{"ancestorTitles":["route-detector","detectRoute","Route 4: CEA_TO_CEA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector detectRoute Route 4: CEA_TO_CEA should detect from.chain with external target as CEA_TO_CEA","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should detect from.chain with external target as CEA_TO_CEA"},{"ancestorTitles":["route-detector","validateRouteParams"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector validateRouteParams should pass for valid UOA_TO_PUSH params","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should pass for valid UOA_TO_PUSH params"},{"ancestorTitles":["route-detector","validateRouteParams"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector validateRouteParams should pass for valid UOA_TO_CEA params","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should pass for valid UOA_TO_CEA params"},{"ancestorTitles":["route-detector","validateRouteParams"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"route-detector validateRouteParams should throw for invalid to address","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw for invalid to address"},{"ancestorTitles":["route-detector","validateRouteParams"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector validateRouteParams should throw for ChainTarget with invalid address","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw for ChainTarget with invalid address"},{"ancestorTitles":["route-detector","validateRouteParams"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector validateRouteParams rejects CHAIN.WEB2 at the transaction runtime boundary","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects CHAIN.WEB2 at the transaction runtime boundary"},{"ancestorTitles":["route-detector","C-5: Enhanced unsupported token validation","Route 2 (UOA_TO_CEA) token validation"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"route-detector C-5: Enhanced unsupported token validation Route 2 (UOA_TO_CEA) token validation should throw with clientChain in error message for unsupported token","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should throw with clientChain in error message for unsupported token"},{"ancestorTitles":["route-detector","C-5: Enhanced unsupported token validation","Route 2 (UOA_TO_CEA) token validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector C-5: Enhanced unsupported token validation Route 2 (UOA_TO_CEA) token validation should pass for USDT on Ethereum Sepolia (compatible token)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should pass for USDT on Ethereum Sepolia (compatible token)"},{"ancestorTitles":["route-detector","C-5: Enhanced unsupported token validation","Route 2 (UOA_TO_CEA) token validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector C-5: Enhanced unsupported token validation Route 2 (UOA_TO_CEA) token validation should throw for Push PRC-20 whose sourceChain does not match destination","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should throw for Push PRC-20 whose sourceChain does not match destination"},{"ancestorTitles":["route-detector","C-5: Enhanced unsupported token validation","Route 2 (UOA_TO_CEA) token validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector C-5: Enhanced unsupported token validation Route 2 (UOA_TO_CEA) token validation should pass for Push PRC-20 whose sourceChain matches destination","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should pass for Push PRC-20 whose sourceChain matches destination"},{"ancestorTitles":["route-detector","C-5: Enhanced unsupported token validation","Route 2 (UOA_TO_CEA) token validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector C-5: Enhanced unsupported token validation Route 2 (UOA_TO_CEA) token validation should pass for Push PRC-20 USDT variant matching destination","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should pass for Push PRC-20 USDT variant matching destination"},{"ancestorTitles":["route-detector","C-5: Enhanced unsupported token validation","Route 2 (UOA_TO_CEA) token validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector C-5: Enhanced unsupported token validation Route 2 (UOA_TO_CEA) token validation should show \"unknown\" clientChain when context is omitted","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should show \"unknown\" clientChain when context is omitted"},{"ancestorTitles":["route-detector","C-5: Enhanced unsupported token validation","Route 3 (CEA_TO_PUSH) token validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector C-5: Enhanced unsupported token validation Route 3 (CEA_TO_PUSH) token validation should throw for incompatible token on source chain","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should throw for incompatible token on source chain"},{"ancestorTitles":["route-detector","C-5: Enhanced unsupported token validation","Route 3 (CEA_TO_PUSH) token validation"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"route-detector C-5: Enhanced unsupported token validation Route 3 (CEA_TO_PUSH) token validation should pass for compatible token on source chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should pass for compatible token on source chain"},{"ancestorTitles":["route-detector","C-5: Enhanced unsupported token validation","Route 3 (CEA_TO_PUSH) token validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector C-5: Enhanced unsupported token validation Route 3 (CEA_TO_PUSH) token validation should pass for Push PRC-20 whose sourceChain matches from.chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should pass for Push PRC-20 whose sourceChain matches from.chain"},{"ancestorTitles":["route-detector","C-5: Enhanced unsupported token validation","Route 3 (CEA_TO_PUSH) token validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector C-5: Enhanced unsupported token validation Route 3 (CEA_TO_PUSH) token validation should throw for Push PRC-20 whose sourceChain does not match from.chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw for Push PRC-20 whose sourceChain does not match from.chain"},{"ancestorTitles":["route-detector","C-5: Enhanced unsupported token validation","Route 3 (CEA_TO_PUSH) token validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector C-5: Enhanced unsupported token validation Route 3 (CEA_TO_PUSH) token validation should throw for ETH on Solana source chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw for ETH on Solana source chain"},{"ancestorTitles":["route-detector","C-5: Enhanced unsupported token validation","error message format"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector C-5: Enhanced unsupported token validation error message format should include token label with chain prefix when token is found in registry","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should include token label with chain prefix when token is found in registry"},{"ancestorTitles":["route-detector","chainEnumToName"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector chainEnumToName should return friendly name for known chains","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should return friendly name for known chains"},{"ancestorTitles":["route-detector","chainEnumToName"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector chainEnumToName should return the raw value for unknown chains","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return the raw value for unknown chains"},{"ancestorTitles":["route-detector","findTokenChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector findTokenChain should find USDT on Ethereum Sepolia by address match","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should find USDT on Ethereum Sepolia by address match"},{"ancestorTitles":["route-detector","findTokenChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route-detector findTokenChain should return undefined for unknown token","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return undefined for unknown token"}],"endTime":1792494872199,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/route-detector.spec.ts","startTime":1792494872067,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["dispatchCascadeProgressEvent"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"dispatchCascadeProgressEvent no-op when both channels are undefined","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"no-op when both channels are undefined"},{"ancestorTitles":["dispatchCascadeProgressEvent"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"dispatchCascadeProgressEvent delivers to the explicit eventHook only when ctx.progressHook is unset","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"delivers to the explicit eventHook only when ctx.progressHook is unset"},{"ancestorTitles":["dispatchCascadeProgressEvent"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"dispatchCascadeProgressEvent bridges to ctx.progressHook when no explicit eventHook is supplied (THE redeem-flow fix)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"bridges to ctx.progressHook when no explicit eventHook is supplied (THE redeem-flow fix)"},{"ancestorTitles":["dispatchCascadeProgressEvent"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"dispatchCascadeProgressEvent fans out to both channels when they are different references","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"fans out to both channels when they are different references"},{"ancestorTitles":["dispatchCascadeProgressEvent"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"dispatchCascadeProgressEvent dedups when both channels reference the SAME function","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"dedups when both channels reference the SAME function"},{"ancestorTitles":["dispatchCascadeProgressEvent"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"dispatchCascadeProgressEvent drops events with empty id (pickWaitHooks no-op sentinel)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"drops events with empty id (pickWaitHooks no-op sentinel)"},{"ancestorTitles":["dispatchCascadeProgressEvent"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"dispatchCascadeProgressEvent preserves the ProgressEvent shape (no field reshaping)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"preserves the ProgressEvent shape (no field reshaping)"},{"ancestorTitles":["dispatchCascadeProgressEvent"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"dispatchCascadeProgressEvent handles cascade-failure markers (999-02) the same way as success","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"handles cascade-failure markers (999-02) the same way as success"},{"ancestorTitles":["dispatchCascadeProgressEvent"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"dispatchCascadeProgressEvent delivers a multi-event sequence in order across the bridge","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"delivers a multi-event sequence in order across the bridge"}],"endTime":1792494872327,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/cascade-event-hook-bridge.spec.ts","startTime":1792494872201,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"resolves explicit native ETH on eip155:11155111 to the same burn token as omitted native funds","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"resolves explicit native ETH on eip155:11155111 to the same burn token as omitted native funds"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolves explicit native ETH on eip155:84532 to the same burn token as omitted native funds","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"resolves explicit native ETH on eip155:84532 to the same burn token as omitted native funds"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolves explicit native ETH on eip155:421614 to the same burn token as omitted native funds","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"resolves explicit native ETH on eip155:421614 to the same burn token as omitted native funds"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"does not infer a token from a different destination chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does not infer a token from a different destination chain"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"preserves a matching explicit Push PRC20 reference and rejects a different destination","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"preserves a matching explicit Push PRC20 reference and rejects a different destination"}],"endTime":1792494872633,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/runtime-token-chain.spec.ts","startTime":1792494872330,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Outbound/inbound error classification","Typed error shapes"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification Typed error shapes OutboundTimeoutError carries code + timings","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"OutboundTimeoutError carries code + timings"},{"ancestorTitles":["Outbound/inbound error classification","Typed error shapes"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification Typed error shapes OutboundFailedError carries code + destination chain","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"OutboundFailedError carries code + destination chain"},{"ancestorTitles":["Outbound/inbound error classification","Typed error shapes"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification Typed error shapes InboundTimeoutError carries correlation key + elapsed","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"InboundTimeoutError carries correlation key + elapsed"},{"ancestorTitles":["Outbound/inbound error classification","R2 emit + receipt mutation (replicates response-builder.wait()) "],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification R2 emit + receipt mutation (replicates response-builder.wait()) Timeout → SEND-TX-299-03 + externalStatus=timeout","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"Timeout → SEND-TX-299-03 + externalStatus=timeout"},{"ancestorTitles":["Outbound/inbound error classification","R2 emit + receipt mutation (replicates response-builder.wait()) "],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification R2 emit + receipt mutation (replicates response-builder.wait()) Failure (terminal) → SEND-TX-299-02 + externalStatus=failed","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"Failure (terminal) → SEND-TX-299-02 + externalStatus=failed"},{"ancestorTitles":["Outbound/inbound error classification","R2 emit + receipt mutation (replicates response-builder.wait()) "],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification R2 emit + receipt mutation (replicates response-builder.wait()) Failure (per-outbound REVERTED) → SEND-TX-299-02 with target chain in error","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"Failure (per-outbound REVERTED) → SEND-TX-299-02 with target chain in error"},{"ancestorTitles":["Outbound/inbound error classification","R2 emit + receipt mutation (replicates response-builder.wait()) "],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification R2 emit + receipt mutation (replicates response-builder.wait()) Classifier must NOT misclassify an OutboundFailedError whose message happens to start with \"Timeout\"","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"Classifier must NOT misclassify an OutboundFailedError whose message happens to start with \"Timeout\""},{"ancestorTitles":["Outbound/inbound error classification","Receipt externalStatus semantics"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification Receipt externalStatus semantics R2 outbound success → externalStatus=success + externalTxHash populated","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"R2 outbound success → externalStatus=success + externalTxHash populated"},{"ancestorTitles":["Outbound/inbound error classification","Receipt externalStatus semantics"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification Receipt externalStatus semantics R3 payload-only: outbound success is the terminal milestone — externalStatus stays \"success\"","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"R3 payload-only: outbound success is the terminal milestone — externalStatus stays \"success\""},{"ancestorTitles":["Outbound/inbound error classification","Receipt externalStatus semantics"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification Receipt externalStatus semantics R2 live failure path: partial receipt carries externalError + undefined externalTxHash","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"R2 live failure path: partial receipt carries externalError + undefined externalTxHash"},{"ancestorTitles":["Outbound/inbound error classification","Receipt externalStatus semantics"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification Receipt externalStatus semantics trackTransaction-style reconstruction of terminal failure → 299-02 + failed annotation","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"trackTransaction-style reconstruction of terminal failure → 299-02 + failed annotation"},{"ancestorTitles":["Outbound/inbound error classification","wait hook hash metadata"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification wait hook hash metadata R2 awaiting/polling events carry the root Push tx hash as pushTxHash","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"R2 awaiting/polling events carry the root Push tx hash as pushTxHash"},{"ancestorTitles":["Outbound/inbound error classification","wait hook hash metadata"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification wait hook hash metadata R3 wait events carry pushTxHash without replacing txHash successes","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"R3 wait events carry pushTxHash without replacing txHash successes"},{"ancestorTitles":["Outbound/inbound error classification","R3 inbound emit + receipt mutation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification R3 inbound emit + receipt mutation InboundTimeoutError → 399-03 + timeout annotation","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"InboundTimeoutError → 399-03 + timeout annotation"},{"ancestorTitles":["Outbound/inbound error classification","R3 inbound emit + receipt mutation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification R3 inbound emit + receipt mutation Generic inbound Error → 399-02 + failed annotation","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"Generic inbound Error → 399-02 + failed annotation"},{"ancestorTitles":["Outbound/inbound error classification","204-04 Verification Declined heuristic"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification 204-04 Verification Declined heuristic classifies EIP-1193 4001 as user decline (generic title/message)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"classifies EIP-1193 4001 as user decline (generic title/message)"},{"ancestorTitles":["Outbound/inbound error classification","204-04 Verification Declined heuristic"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification 204-04 Verification Declined heuristic classifies UserRejectedRequestError as user decline","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"classifies UserRejectedRequestError as user decline"},{"ancestorTitles":["Outbound/inbound error classification","204-04 Verification Declined heuristic"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification 204-04 Verification Declined heuristic non-decline errors keep the original error message and flip title","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"non-decline errors keep the original error message and flip title"},{"ancestorTitles":["Outbound/inbound error classification","204-04 Verification Declined heuristic"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification 204-04 Verification Declined heuristic no-arg invocation classifies as user decline (self-consistent event)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"no-arg invocation classifies as user decline (self-consistent event)"},{"ancestorTitles":["Outbound/inbound error classification","204-04 Verification Declined heuristic"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification 204-04 Verification Declined heuristic classifies \"declined by user\" message as user decline","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classifies \"declined by user\" message as user decline"},{"ancestorTitles":["Outbound/inbound error classification","204-04 Verification Declined heuristic"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Outbound/inbound error classification 204-04 Verification Declined heuristic classifies ACTION_REJECTED (ethers) as user decline","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"classifies ACTION_REJECTED (ethers) as user decline"}],"endTime":1792494872771,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/outbound-error-classification.spec.ts","startTime":1792494872639,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["v5 wallet labels"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"v5 wallet labels allows empty, 64 ASCII bytes and sixteen four-byte emoji without altering the label","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"allows empty, 64 ASCII bytes and sixteen four-byte emoji without altering the label"},{"ancestorTitles":["v5 wallet labels"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"v5 wallet labels refuses non-strings and overlong UTF-8 labels before a create reads or signs","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"refuses non-strings and overlong UTF-8 labels before a create reads or signs"},{"ancestorTitles":["v5 wallet labels"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"v5 wallet labels encodes a direct reset and forwards the per-call progress hook","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"encodes a direct reset and forwards the per-call progress hook"},{"ancestorTitles":["v5 wallet labels"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"v5 wallet labels refuses non-owner and read-only renames before signing","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"refuses non-owner and read-only renames before signing"},{"ancestorTitles":["v5 wallet labels"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"v5 wallet labels uses a direct label call for an external owner identity","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"uses a direct label call for an external owner identity"},{"ancestorTitles":["v5 wallet labels"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"v5 wallet labels maps the new contract length error and emits a failed operation hook","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"maps the new contract length error and emits a failed operation hook"}],"endTime":1792494873080,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/labels.spec.ts","startTime":1792494872775,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["READ.CHAIN"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ.CHAIN is an enumerable superset of CHAIN with WEB2 = \"web2\"","invocations":1,"location":null,"numPassingAsserts":15,"retryReasons":[],"status":"passed","title":"is an enumerable superset of CHAIN with WEB2 = \"web2\""},{"ancestorTitles":["READ.CHAIN"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"READ.CHAIN CHAIN itself still enumerates only blockchains","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"CHAIN itself still enumerates only blockchains"},{"ancestorTitles":["READ.CHAIN.WEB2"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ.CHAIN.WEB2 normalizes to the unchanged wire identity","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"normalizes to the unchanged wire identity"},{"ancestorTitles":["READ.CHAIN.WEB2"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ.CHAIN.WEB2 builds an http query and spec params","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"builds an http query and spec params"},{"ancestorTitles":["READ.CHAIN.WEB2"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"READ.CHAIN.WEB2 is rejected by transaction routing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"is rejected by transaction routing"},{"ancestorTitles":["deprecated CHAIN.WEB2"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deprecated CHAIN.WEB2 normalizes to the unchanged wire identity","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"normalizes to the unchanged wire identity"},{"ancestorTitles":["deprecated CHAIN.WEB2"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deprecated CHAIN.WEB2 builds an http query and spec params","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"builds an http query and spec params"},{"ancestorTitles":["deprecated CHAIN.WEB2"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deprecated CHAIN.WEB2 is rejected by transaction routing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"is rejected by transaction routing"},{"ancestorTitles":["legacy literal"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"legacy literal normalizes to the unchanged wire identity","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"normalizes to the unchanged wire identity"},{"ancestorTitles":["legacy literal"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"legacy literal builds an http query and spec params","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"builds an http query and spec params"},{"ancestorTitles":["legacy literal"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"legacy literal is rejected by transaction routing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"is rejected by transaction routing"},{"ancestorTitles":["type-level separation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"type-level separation compiles","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"compiles"}],"endTime":1792494873336,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/web2-compat.spec.ts","startTime":1792494873085,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["READ-TX spec strings"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-101","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-101"},{"ancestorTitles":["READ-TX spec strings"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-102-01","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-102-01"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-102-02","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-102-02"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-102-03","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-102-03"},{"ancestorTitles":["READ-TX spec strings"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-102-04","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-102-04"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-102-05","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-102-05"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-103-01","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-103-01"},{"ancestorTitles":["READ-TX spec strings"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-103-01","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-103-01"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-103-02","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-103-02"},{"ancestorTitles":["READ-TX spec strings"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-103-03","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-103-03"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-104-01","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-104-01"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-104-02","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-104-02"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-104-03","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-104-03"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-104-03","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-104-03"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-104-04","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-104-04"},{"ancestorTitles":["READ-TX spec strings"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-104-05","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-104-05"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-105-01","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-105-01"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-105-02","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-105-02"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-105-03","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-105-03"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-105-04","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-105-04"},{"ancestorTitles":["READ-TX spec strings"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-106-01","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-106-01"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-106-02","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-106-02"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-106-03","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-106-03"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-106-04","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-106-04"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-106-05","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-106-05"},{"ancestorTitles":["READ-TX spec strings"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-106-06","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-106-06"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-199-01","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-199-01"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-199-02","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-199-02"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-199-03","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-199-03"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-199-99","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-199-99"},{"ancestorTitles":["READ-TX spec strings"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-001","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-001"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-002-01","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-002-01"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-002-99-99","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-002-99-99"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-999-01","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-999-01"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-999-02","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-999-02"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings READ-TX-999-03","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"READ-TX-999-03"},{"ancestorTitles":["READ-TX spec strings"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings every READ_TX id in the enum has a hook, and none leaks a bigint into response","invocations":1,"location":null,"numPassingAsserts":71,"retryReasons":[],"status":"passed","title":"every READ_TX id in the enum has a hook, and none leaks a bigint into response"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings serializes nested contract-call and web2 results without mutating them","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"serializes nested contract-call and web2 results without mutating them"},{"ancestorTitles":["READ-TX spec strings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"READ-TX spec strings 199-01 with a non-delivered callback says so in the message","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"199-01 with a non-delivered callback says so in the message"}],"endTime":1792494873523,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/progress-hook/__tests__/read-tx-spec-strings.spec.ts","startTime":1792494873339,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node FULFILLED + delivered: value decoded, fees from the fulfil and settle receipts","invocations":1,"location":null,"numPassingAsserts":22,"retryReasons":[],"status":"passed","title":"FULFILLED + delivered: value decoded, fees from the fulfil and settle receipts"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node FULFILLED but the callback reverted: callbackDelivered=false, no value (I4)","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"FULFILLED but the callback reverted: callbackDelivered=false, no value (I4)"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node FULFILLED with an ERROR result: raw carries the code, value undefined, delivered still parsed","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"FULFILLED with an ERROR result: raw carries the code, value undefined, delivered still parsed"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node EXPIRED: never fetches a receipt; the refund is confirmed from the EndBlock tx_log events","invocations":1,"location":null,"numPassingAsserts":9,"retryReasons":[],"status":"passed","title":"EXPIRED: never fetches a receipt; the refund is confirmed from the EndBlock tx_log events"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node EXPIRED: when the block results are unavailable the refund stays unknown, never guessed","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"EXPIRED: when the block results are unavailable the refund stays unknown, never guessed"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node EXPIRED: scans unique attempt heights newest first when newer logs are empty","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"EXPIRED: scans unique attempt heights newest first when newer logs are empty"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node EXPIRED: scans unique attempt heights newest first when newer logs are unavailable","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"EXPIRED: scans unique attempt heights newest first when newer logs are unavailable"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node EXPIRED: ignores unrelated malformed logs without hiding valid refund logs","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"EXPIRED: ignores unrelated malformed logs without hiding valid refund logs"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node EXPIRED: does not confirm refunds from wrong-mode logs","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"EXPIRED: does not confirm refunds from wrong-mode logs"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node EXPIRED: does not confirm refunds from wrong-address logs","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"EXPIRED: does not confirm refunds from wrong-address logs"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node EXPIRED: does not confirm refunds from wrong-request logs","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"EXPIRED: does not confirm refunds from wrong-request logs"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node EXPIRED: does not confirm refunds from expiry-only logs","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"EXPIRED: does not confirm refunds from expiry-only logs"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node EXPIRED: a RefundFailed log reports refundFailed=true and no amount","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"EXPIRED: a RefundFailed log reports refundFailed=true and no amount"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node SVM and web2 records infer their result shape from the envelope","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"SVM and web2 records infer their result shape from the envelope"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node resultShape option overrides inference (a contract call carries no ABI on chain)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"resultShape option overrides inference (a contract call carries no ABI on chain)"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node retains IDL decoding across request lookup, wait and refresh; bad layouts report decodeError","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"retains IDL decoding across request lookup, wait and refresh; bad layouts report decodeError"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node by txHash resolves to an array; requestId accepts bigint","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"by txHash resolves to an array; requestId accepts bigint"},{"ancestorTitles":["trackRead — terminal records straight from the node"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — terminal records straight from the node toRequestIdHex normalises","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"toRequestIdHex normalises"},{"ancestorTitles":["trackRead — lookup retry"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — lookup retry retries a not-yet-ingested record, then throws ReadNotFoundError","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"retries a not-yet-ingested record, then throws ReadNotFoundError"},{"ancestorTitles":["trackRead — lookup retry"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — lookup retry a terminal record answers in one lookup, announcing the lookup and the find","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"a terminal record answers in one lookup, announcing the lookup and the find"},{"ancestorTitles":["trackRead — lookup retry"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — lookup retry a txHash lookup announces the tx and every record found","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"a txHash lookup announces the tx and every record found"},{"ancestorTitles":["trackRead — lookup retry"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"trackRead — lookup retry finds a record that appears on the second poll","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"finds a record that appears on the second poll"},{"ancestorTitles":["wait()"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"wait() recomputes remaining lifetime on each wait and keeps the expiry observation margin","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"recomputes remaining lifetime on each wait and keeps the expiry observation margin"},{"ancestorTitles":["wait()"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"wait() explicit timeouts never wait on the head lookup, including values above the default ceiling","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"explicit timeouts never wait on the head lookup, including values above the default ceiling"},{"ancestorTitles":["wait()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wait() announces READ-TX-105-04 once when the request is near expiry, from one head lookup","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"announces READ-TX-105-04 once when the request is near expiry, from one head lookup"},{"ancestorTitles":["wait()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wait() does not warn while expiry is far away","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does not warn while expiry is far away"},{"ancestorTitles":["wait()"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"wait() terminal snapshots need no head lookup","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"terminal snapshots need no head lookup"},{"ancestorTitles":["wait()"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"wait() bounds stalled height lookups and propagates failed lookups","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"bounds stalled height lookups and propagates failed lookups"},{"ancestorTitles":["wait()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wait() a missing snapshot respects the shared timeout and retains the last status","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"a missing snapshot respects the shared timeout and retains the last status"},{"ancestorTitles":["wait()"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"wait() a stalled RPC cannot exceed the wait deadline","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"a stalled RPC cannot exceed the wait deadline"},{"ancestorTitles":["wait()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wait() recovers from a missing snapshot without resetting the deadline","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"recovers from a missing snapshot without resetting the deadline"},{"ancestorTitles":["wait()"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"wait() PENDING → VOTING → FULFILLED resolves with the terminal snapshot and hooks in order","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"PENDING → VOTING → FULFILLED resolves with the terminal snapshot and hooks in order"},{"ancestorTitles":["wait()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wait() wait({ resultShape }) re-decodes even an already-terminal record (the ABI is not on chain)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"wait({ resultShape }) re-decodes even an already-terminal record (the ABI is not on chain)"},{"ancestorTitles":["wait()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wait() already terminal: resolves at once without polling","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"already terminal: resolves at once without polling"},{"ancestorTitles":["wait()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wait() reverted callback emits 106-03 instead of 106-02","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"reverted callback emits 106-03 instead of 106-02"},{"ancestorTitles":["wait()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wait() 199-02 names the outcome of a FULFILLED read that did not work","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"199-02 names the outcome of a FULFILLED read that did not work"},{"ancestorTitles":["wait()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wait() a successful read ends on 199-01 and exposes requestIdUint","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"a successful read ends on 199-01 and exposes requestIdUint"},{"ancestorTitles":["wait()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wait() an expired read announces its confirmed refund before 199-02","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"an expired read announces its confirmed refund before 199-02"},{"ancestorTitles":["wait()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wait() EXPIRED is a status, not a throw — 199-02 emitted","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"EXPIRED is a status, not a throw — 199-02 emitted"},{"ancestorTitles":["wait()"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"wait() FAILED is a status, not a throw — 199-02 emitted","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"FAILED is a status, not a throw — 199-02 emitted"},{"ancestorTitles":["wait()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wait() ABORTED is a status, not a throw — 199-02 emitted","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"ABORTED is a status, not a throw — 199-02 emitted"},{"ancestorTitles":["wait()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wait() timeout throws ReadTimeoutError with the last status and emits 199-03","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"timeout throws ReadTimeoutError with the last status and emits 199-03"},{"ancestorTitles":["wait()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wait() default timeout is remaining blocks plus 10 seconds, capped","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"default timeout is remaining blocks plus 10 seconds, capped"},{"ancestorTitles":["wait()"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"wait() polling interval floors at 500 ms","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"polling interval floors at 500 ms"},{"ancestorTitles":["wait()"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"wait() refresh() re-reads by requestId and returns a new snapshot","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"refresh() re-reads by requestId and returns a new snapshot"},{"ancestorTitles":["through the orchestrator: READ-TX hooks are not R1-suppressed"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"through the orchestrator: READ-TX hooks are not R1-suppressed a non-R1 currentRoute still receives every READ-TX event","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"a non-R1 currentRoute still receives every READ-TX event"},{"ancestorTitles":["deriveReadOutcome — one field that means \"it worked\""],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"deriveReadOutcome — one field that means \"it worked\" PENDING","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"PENDING"},{"ancestorTitles":["deriveReadOutcome — one field that means \"it worked\""],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deriveReadOutcome — one field that means \"it worked\" VOTING","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"VOTING"},{"ancestorTitles":["deriveReadOutcome — one field that means \"it worked\""],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deriveReadOutcome — one field that means \"it worked\" EXPIRED","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"EXPIRED"},{"ancestorTitles":["deriveReadOutcome — one field that means \"it worked\""],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deriveReadOutcome — one field that means \"it worked\" FAILED","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"FAILED"},{"ancestorTitles":["deriveReadOutcome — one field that means \"it worked\""],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deriveReadOutcome — one field that means \"it worked\" ABORTED","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"ABORTED"},{"ancestorTitles":["deriveReadOutcome — one field that means \"it worked\""],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deriveReadOutcome — one field that means \"it worked\" source error beats callback failure","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"source error beats callback failure"},{"ancestorTitles":["deriveReadOutcome — one field that means \"it worked\""],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deriveReadOutcome — one field that means \"it worked\" source error, delivered","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"source error, delivered"},{"ancestorTitles":["deriveReadOutcome — one field that means \"it worked\""],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deriveReadOutcome — one field that means \"it worked\" callback reverted","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"callback reverted"},{"ancestorTitles":["deriveReadOutcome — one field that means \"it worked\""],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deriveReadOutcome — one field that means \"it worked\" receipt unavailable","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"receipt unavailable"},{"ancestorTitles":["deriveReadOutcome — one field that means \"it worked\""],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deriveReadOutcome — one field that means \"it worked\" decode failed","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"decode failed"},{"ancestorTitles":["deriveReadOutcome — one field that means \"it worked\""],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deriveReadOutcome — one field that means \"it worked\" success","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"success"},{"ancestorTitles":["deriveReadOutcome — one field that means \"it worked\""],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"deriveReadOutcome — one field that means \"it worked\" no result on a FULFILLED record","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"no result on a FULFILLED record"}],"endTime":1792494873697,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/read-tracker.spec.ts","startTime":1792494873527,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["isPC20Reference"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"isPC20Reference accepts a { chain, address } reference","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts a { chain, address } reference"},{"ancestorTitles":["isPC20Reference"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"isPC20Reference rejects a MoveableToken","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a MoveableToken"},{"ancestorTitles":["isPC20Reference"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"isPC20Reference rejects undefined","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects undefined"},{"ancestorTitles":["isPC20Reference"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"isPC20Reference does not misclassify a MoveableToken that also carries a chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does not misclassify a MoveableToken that also carries a chain"},{"ancestorTitles":["PC20 gate"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 gate passes a legacy MoveableToken through unchanged","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"passes a legacy MoveableToken through unchanged"},{"ancestorTitles":["PC20 gate"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 gate passes native funds (no token) through unchanged","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"passes native funds (no token) through unchanged"},{"ancestorTitles":["PC20 gate"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"PC20 gate refuses to let an unresolved PC20 reference reach a legacy builder","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"refuses to let an unresolved PC20 reference reach a legacy builder"},{"ancestorTitles":["PC20 import payload safety"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 import payload safety recognizes only resolved imports with a positive wrapper amount","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"recognizes only resolved imports with a positive wrapper amount"},{"ancestorTitles":["PC20 import payload safety"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 import payload safety fails closed before a resolved wrapper burn can carry an empty payload","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"fails closed before a resolved wrapper burn can carry an empty payload"},{"ancestorTitles":["PC20 import payload safety"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 import payload safety allows the same import once a real forwarding payload exists","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"allows the same import once a real forwarding payload exists"},{"ancestorTitles":["route validation with PC20 funds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route validation with PC20 funds accepts an unresolved PC20 reference (pre-gate, e.g. prepareTransaction)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts an unresolved PC20 reference (pre-gate, e.g. prepareTransaction)"},{"ancestorTitles":["route validation with PC20 funds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"route validation with PC20 funds accepts the gate-resolved internal form (_pc20 present)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts the gate-resolved internal form (_pc20 present)"},{"ancestorTitles":["route validation with PC20 funds"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"route validation with PC20 funds still rejects an unregistered MoveableToken","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"still rejects an unregistered MoveableToken"}],"endTime":1792494873824,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/__tests__/gate.spec.ts","startTime":1792494873698,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"expands both token directions and exact-input/output with wallet and amount pins","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"expands both token directions and exact-input/output with wallet and amount pins"},{"ancestorTitles":[],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"rejects native-token markers and oversized pin expansion","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects native-token markers and oversized pin expansion"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"defaults omitted caps to zero without introducing an unlimited approval","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"defaults omitted caps to zero without introducing an unlimited approval"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"scopes money-market approvals to their actual underlying token","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"scopes money-market approvals to their actual underlying token"},{"ancestorTitles":[],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"normalizes every DEX call on eip155:1 to the exact ABI bytes","invocations":1,"location":null,"numPassingAsserts":16,"retryReasons":[],"status":"passed","title":"normalizes every DEX call on eip155:1 to the exact ABI bytes"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"normalizes every DEX call on eip155:8453 to the exact ABI bytes","invocations":1,"location":null,"numPassingAsserts":16,"retryReasons":[],"status":"passed","title":"normalizes every DEX call on eip155:8453 to the exact ABI bytes"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"normalizes every DEX call on eip155:42161 to the exact ABI bytes","invocations":1,"location":null,"numPassingAsserts":16,"retryReasons":[],"status":"passed","title":"normalizes every DEX call on eip155:42161 to the exact ABI bytes"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"normalizes every DEX call on eip155:56 to the exact ABI bytes","invocations":1,"location":null,"numPassingAsserts":16,"retryReasons":[],"status":"passed","title":"normalizes every DEX call on eip155:56 to the exact ABI bytes"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"normalizes every DEX call on eip155:11155111 to the exact ABI bytes","invocations":1,"location":null,"numPassingAsserts":16,"retryReasons":[],"status":"passed","title":"normalizes every DEX call on eip155:11155111 to the exact ABI bytes"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"normalizes every DEX call on eip155:84532 to the exact ABI bytes","invocations":1,"location":null,"numPassingAsserts":16,"retryReasons":[],"status":"passed","title":"normalizes every DEX call on eip155:84532 to the exact ABI bytes"},{"ancestorTitles":[],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"normalizes every DEX call on eip155:421614 to the exact ABI bytes","invocations":1,"location":null,"numPassingAsserts":16,"retryReasons":[],"status":"passed","title":"normalizes every DEX call on eip155:421614 to the exact ABI bytes"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"normalizes every DEX call on eip155:97 to the exact ABI bytes","invocations":1,"location":null,"numPassingAsserts":16,"retryReasons":[],"status":"passed","title":"normalizes every DEX call on eip155:97 to the exact ABI bytes"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"supports tuple/fixed-array positions but never descends into dynamic storage","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"supports tuple/fixed-array positions but never descends into dynamic storage"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"tuple-authored pins re-encode using the raw-selector word indexes returned by reads","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"tuple-authored pins re-encode using the raw-selector word indexes returned by reads"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"mutating a returned tuple path cannot change a later preset","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"mutating a returned tuple path cannot change a later preset"},{"ancestorTitles":[],"duration":6,"failureDetails":[],"failureMessages":[],"fullName":"includes a curated capped token pair and exact pair pins on every DEX chain","invocations":1,"location":null,"numPassingAsserts":179,"retryReasons":[],"status":"passed","title":"includes a curated capped token pair and exact pair pins on every DEX chain"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"keeps single-token swaps disabled and generates approvals only for the supplied asset","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"keeps single-token swaps disabled and generates approvals only for the supplied asset"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"keeps chains without supplied assets discoverable and regenerates complete pairs without disabled alternatives","invocations":1,"location":null,"numPassingAsserts":26,"retryReasons":[],"status":"passed","title":"keeps chains without supplied assets discoverable and regenerates complete pairs without disabled alternatives"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"mainnet eip155:1 templates preserve one rule per chain, selectors and wallet pins","invocations":1,"location":null,"numPassingAsserts":12,"retryReasons":[],"status":"passed","title":"mainnet eip155:1 templates preserve one rule per chain, selectors and wallet pins"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"mainnet eip155:8453 templates preserve one rule per chain, selectors and wallet pins","invocations":1,"location":null,"numPassingAsserts":12,"retryReasons":[],"status":"passed","title":"mainnet eip155:8453 templates preserve one rule per chain, selectors and wallet pins"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"mainnet eip155:42161 templates preserve one rule per chain, selectors and wallet pins","invocations":1,"location":null,"numPassingAsserts":12,"retryReasons":[],"status":"passed","title":"mainnet eip155:42161 templates preserve one rule per chain, selectors and wallet pins"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"mainnet eip155:56 templates preserve one rule per chain, selectors and wallet pins","invocations":1,"location":null,"numPassingAsserts":12,"retryReasons":[],"status":"passed","title":"mainnet eip155:56 templates preserve one rule per chain, selectors and wallet pins"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"mainnet Lido uses the selected token units and excludes unbounded withdrawal/claim methods","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"mainnet Lido uses the selected token units and excludes unbounded withdrawal/claim methods"}],"endTime":1792494874176,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/preset-catalog.spec.ts","startTime":1792494873828,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-101 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-101 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-102-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-102-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-103-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-103-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-103-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-103-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-103-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-103-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-103-03-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-103-03-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-103-03-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-103-03-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-103-03-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-103-03-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-103-03-04 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-103-03-04 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-104-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-104-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-104-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-104-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-104-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-104-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-104-04 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-104-04 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-105-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-105-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-105-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-105-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-106-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-106-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-106-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-106-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-106-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-106-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-106-03-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-106-03-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-106-03-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-106-03-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-106-04 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-106-04 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-106-05 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-106-05 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-106-06 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-106-06 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-107 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-107 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-199-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-199-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-199-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-199-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-199-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-199-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-199-99 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-199-99 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-201 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-201 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-202-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-202-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-202-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-202-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-203-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-203-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-203-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-203-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-203-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-203-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-203-04 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-203-04 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-203-05 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-203-05 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-204-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-204-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-204-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-204-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-204-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-204-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-204-04 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-204-04 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-207 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-207 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-209-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-209-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-209-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-209-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-299-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-299-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-299-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-299-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-299-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-299-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-299-99 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-299-99 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-301 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-301 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-302-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-302-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-302-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-302-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-303-03-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-303-03-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-303-03-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-303-03-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-303-03-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-303-03-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-303-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-303-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-303-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-303-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-303-04 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-303-04 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-303-05 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-303-05 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-303-06 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-303-06 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-304-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-304-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-304-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-304-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-304-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-304-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-304-04 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-304-04 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-307 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-307 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-309-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-309-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-309-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-309-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-309-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-309-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-310-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-310-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-310-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-310-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-399-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-399-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-399-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-399-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-399-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-399-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-399-99 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-399-99 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-001 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-001 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-002-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-002-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-002-99-99 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-002-99-99 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-003-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-003-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-003-04 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-003-04 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-003-05 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-003-05 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-999-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-999-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-999-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-999-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants SEND-TX-999-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SEND-TX-999-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants UEA-MIG-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"UEA-MIG-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants UEA-MIG-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"UEA-MIG-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants UEA-MIG-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"UEA-MIG-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants UEA-MIG-9901 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"UEA-MIG-9901 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants UEA-MIG-9902 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"UEA-MIG-9902 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants UEA-MIG-9903 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"UEA-MIG-9903 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-101 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-101 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-102-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-102-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-102-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-102-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-102-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-102-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-102-04 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-102-04 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-102-05 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-102-05 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-103-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-103-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-103-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-103-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-103-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-103-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-104-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-104-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-104-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-104-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-104-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-104-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-104-04 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-104-04 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-104-05 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-104-05 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-105-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-105-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-105-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-105-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-105-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-105-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-105-04 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-105-04 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-106-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-106-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-106-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-106-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-106-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-106-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-106-04 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-106-04 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-106-05 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-106-05 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-106-06 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-106-06 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-199-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-199-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-199-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-199-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-199-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-199-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-199-99 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-199-99 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-001 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-001 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-002-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-002-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-002-99-99 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-002-99-99 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-999-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-999-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-999-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-999-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants READ-TX-999-03 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"READ-TX-999-03 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants AGENTIC-TX-101 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"AGENTIC-TX-101 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants AGENTIC-TX-102 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"AGENTIC-TX-102 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants AGENTIC-TX-104 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"AGENTIC-TX-104 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants AGENTIC-TX-105 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"AGENTIC-TX-105 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants AGENTIC-TX-106 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"AGENTIC-TX-106 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants AGENTIC-TX-107 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"AGENTIC-TX-107 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants AGENTIC-TX-199-01 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"AGENTIC-TX-199-01 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants AGENTIC-TX-199-02 returns response of type object | null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"AGENTIC-TX-199-02 returns response of type object | null"},{"ancestorTitles":["progress-hook response invariants"],"duration":33,"failureDetails":[],"failureMessages":[],"fullName":"progress-hook response invariants every hook event carries an id, title, message, level, timestamp","invocations":1,"location":null,"numPassingAsserts":774,"retryReasons":[],"status":"passed","title":"every hook event carries an id, title, message, level, timestamp"}],"endTime":1792494874397,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/progress-hook/__tests__/response-invariant.spec.ts","startTime":1792494874179,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["guards fail before the signer is ever invoked"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"guards fail before the signer is ever invoked from (Routes 3/4)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"from (Routes 3/4)"},{"ancestorTitles":["guards fail before the signer is ever invoked"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"guards fail before the signer is ever invoked payGasWith","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"payGasWith"},{"ancestorTitles":["guards fail before the signer is ever invoked"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"guards fail before the signer is ever invoked migration","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"migration"},{"ancestorTitles":["guards fail before the signer is ever invoked"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"guards fail before the signer is ever invoked funds on a Push send","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"funds on a Push send"},{"ancestorTitles":["guards fail before the signer is ever invoked"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"guards fail before the signer is ever invoked read-only clients never sign","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"read-only clients never sign"},{"ancestorTitles":["guards fail before the signer is ever invoked"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"guards fail before the signer is ever invoked agent native arrays require an atomic sender-preserving transport (Push EOA=true)","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"agent native arrays require an atomic sender-preserving transport (Push EOA=true)"},{"ancestorTitles":["guards fail before the signer is ever invoked"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"guards fail before the signer is ever invoked agent native arrays require an atomic sender-preserving transport (Push EOA=false)","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"agent native arrays require an atomic sender-preserving transport (Push EOA=false)"},{"ancestorTitles":["guards fail before the signer is ever invoked"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"guards fail before the signer is ever invoked empty native arrays fail before any transport is called","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"empty native arrays fail before any transport is called"},{"ancestorTitles":["guards fail before the signer is ever invoked"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"guards fail before the signer is ever invoked NO_RULES_FOR_CHAIN and AMBIGUOUS_RULE are pre-signature","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"NO_RULES_FOR_CHAIN and AMBIGUOUS_RULE are pre-signature"},{"ancestorTitles":["guards fail before the signer is ever invoked"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"guards fail before the signer is ever invoked an external agent whose deployed UEA cannot pay Push gas fails loudly; an undeployed UEA takes the first-use path","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"an external agent whose deployed UEA cannot pay Push gas fails loudly; an undeployed UEA takes the first-use path"},{"ancestorTitles":["explicit Push destinations"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"explicit Push destinations a ChainTarget on the connected Push chain is a native send, same as a bare address","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"a ChainTarget on the connected Push chain is a native send, same as a bare address"},{"ancestorTitles":["explicit Push destinations"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"explicit Push destinations the owner door treats it the same way","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"the owner door treats it the same way"},{"ancestorTitles":["explicit Push destinations"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"explicit Push destinations another Push network is refused, not routed outbound","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"another Push network is refused, not routed outbound"},{"ancestorTitles":["native wrapping and logical identity"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native wrapping and logical identity agent door: executeAsAgent(selected rule, exact call); response shows the wallet as from","invocations":1,"location":null,"numPassingAsserts":9,"retryReasons":[],"status":"passed","title":"agent door: executeAsAgent(selected rule, exact call); response shows the wallet as from"},{"ancestorTitles":["native wrapping and logical identity"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"native wrapping and logical identity owner door: arrays become one atomic execute(batch)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"owner door: arrays become one atomic execute(batch)"},{"ancestorTitles":["native wrapping and logical identity"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native wrapping and logical identity wallet waits report the wallet on the receipt too","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"wallet waits report the wallet on the receipt too"},{"ancestorTitles":["native wrapping and logical identity"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"native wrapping and logical identity an on-chain policy revert becomes AgenticRevertError with the decoded gate and 199-02","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"an on-chain policy revert becomes AgenticRevertError with the decoded gate and 199-02"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet destination gas: deployed=false explicit=undefined quotes 2000000n","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"destination gas: deployed=false explicit=undefined quotes 2000000n"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet destination gas: deployed=true explicit=undefined quotes 0n","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"destination gas: deployed=true explicit=undefined quotes 0n"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet destination gas: deployed=false explicit=123456n quotes 123456n","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"destination gas: deployed=false explicit=123456n quotes 123456n"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet destination gas: deployed=true explicit=123456n quotes 123456n","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"destination gas: deployed=true explicit=123456n quotes 123456n"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet destination gas: deployed=false explicit=0n quotes 0n","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"destination gas: deployed=false explicit=0n quotes 0n"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet builds the policy-compatible request: empty recipient, wallet refund, nonzero gas cap, multicall payload, CEA of the wallet","invocations":1,"location":null,"numPassingAsserts":10,"retryReasons":[],"status":"passed","title":"builds the policy-compatible request: empty recipient, wallet refund, nonzero gas cap, multicall payload, CEA of the wallet"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet agent sends without a standing allowance; the wallet handles approval","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"agent sends without a standing allowance; the wallet handles approval"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet wallet funding is checked locally; rule PC limits are enforced by the contract","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"wallet funding is checked locally; rule PC limits are enforced by the contract"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet a committed destination account that no longer matches derivation is drift, not a send","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"a committed destination account that no longer matches derivation is drift, not a send"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet a zero gas quote is refused (URP rejects an uncapped gas swap)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"a zero gas quote is refused (URP rejects an uncapped gas swap)"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet SVM destinations reject EVM-width program addresses","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"SVM destinations reject EVM-width program addresses"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet owner door never writes an allowance: it sends only the outbound and consumes the existing allowance","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"owner door never writes an allowance: it sends only the outbound and consumes the existing allowance"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet owner sends without a standing allowance","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"owner sends without a standing allowance"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet an existing unlimited allowance is consumed as-is","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"an existing unlimited allowance is consumed as-is"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet a transfer-only ERC-20 outbound instructs a transfer to the requested recipient","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"a transfer-only ERC-20 outbound instructs a transfer to the requested recipient"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet a value-only outbound burns the native PRC20 for that value and forwards it to the recipient","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"a value-only outbound burns the native PRC20 for that value and forwards it to the recipient"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet an outbound with no destination call (parking in the CEA) is refused before signing","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"an outbound with no destination call (parking in the CEA) is refused before signing"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet an agent value-only destination call is refused before signing (the policy admits only allow-listed calls)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"an agent value-only destination call is refused before signing (the policy admits only allow-listed calls)"},{"ancestorTitles":["EVM outbound composition from the wallet"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EVM outbound composition from the wallet more than 10 destination calls are refused","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"more than 10 destination calls are refused"}],"endTime":1792494874791,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/send.spec.ts","startTime":1792494874404,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["canonical outbound response on send and replay"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"canonical outbound response on send and replay explicit ERC20 transfer preserves its token target and calldata","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"explicit ERC20 transfer preserves its token target and calldata"},{"ancestorTitles":["canonical outbound response on send and replay"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"canonical outbound response on send and replay funds-only transfer describes the actual generated token call","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"funds-only transfer describes the actual generated token call"},{"ancestorTitles":["canonical outbound response on send and replay"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"canonical outbound response on send and replay funds plus app call keeps the generated transfer and app call in order","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"funds plus app call keeps the generated transfer and app call in order"},{"ancestorTitles":["canonical outbound response on send and replay"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"canonical outbound response on send and replay explicit call array retains all calls without guessing a primary action","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"explicit call array retains all calls without guessing a primary action"},{"ancestorTitles":["canonical outbound response on send and replay"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"canonical outbound response on send and replay native transfer preserves the actual destination value","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"native transfer preserves the actual destination value"},{"ancestorTitles":["outbound replay wait on the owner door"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"outbound replay wait on the owner door handles an early Push-only route with a success Push receipt","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"handles an early Push-only route with a success Push receipt"},{"ancestorTitles":["outbound replay wait on the owner door"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"outbound replay wait on the owner door handles an early Push-only route with a reverted Push receipt","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"handles an early Push-only route with a reverted Push receipt"},{"ancestorTitles":["outbound replay wait on the agent door"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"outbound replay wait on the agent door handles an early Push-only route with a success Push receipt","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"handles an early Push-only route with a success Push receipt"},{"ancestorTitles":["outbound replay wait on the agent door"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"outbound replay wait on the agent door handles an early Push-only route with a reverted Push receipt","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"handles an early Push-only route with a reverted Push receipt"}],"endTime":1792494875098,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/outbound-response.spec.ts","startTime":1792494874793,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["canonical registry integration"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"canonical registry integration rejects entrypoint fields without a custom target and rejects the removed nesting","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects entrypoint fields without a custom target and rejects the removed nesting"},{"ancestorTitles":["canonical registry integration"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"canonical registry integration encodes the deployed three-argument entrypoint with default gas, key and unchanged refund","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"encodes the deployed three-argument entrypoint with default gas, key and unchanged refund"},{"ancestorTitles":["canonical registry integration"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"canonical registry integration keeps keys stable across pinning, payment and callback options","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"keeps keys stable across pinning, payment and callback options"},{"ancestorTitles":["canonical registry integration"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"canonical registry integration separates query identity but treats ERC20 shorthand and explicit balanceOf equivalently","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"separates query identity but treats ERC20 shorthand and explicit balanceOf equivalently"},{"ancestorTitles":["canonical registry integration"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"canonical registry integration includes Solana account, mint and token program in identity","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"includes Solana account, mint and token program in identity"},{"ancestorTitles":["canonical registry integration"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"canonical registry integration canonicalizes Web2 headers and excludes timeout while retaining extraction identity","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"canonicalizes Web2 headers and excludes timeout while retaining extraction identity"},{"ancestorTitles":["canonical registry integration"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"canonical registry integration does not assume this deployment exists on other networks; custom receivers still work","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"does not assume this deployment exists on other networks; custom receivers still work"},{"ancestorTitles":["canonical registry integration"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"canonical registry integration executes a prepared registry request through the existing batch tracker","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"executes a prepared registry request through the existing batch tracker"},{"ancestorTitles":["canonical registry integration"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"canonical registry integration exposes the supplied ABI lookup shapes without inventing consensus status","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"exposes the supplied ABI lookup shapes without inventing consensus status"}],"endTime":1792494875235,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/registry.spec.ts","startTime":1792494875101,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["computeExecutionHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeExecutionHash returns a 32-byte keccak hash (0x + 64 hex chars)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns a 32-byte keccak hash (0x + 64 hex chars)"},{"ancestorTitles":["computeExecutionHash"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"computeExecutionHash is deterministic for the same inputs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"is deterministic for the same inputs"},{"ancestorTitles":["computeExecutionHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeExecutionHash changes when the payload nonce differs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"changes when the payload nonce differs"},{"ancestorTitles":["computeExecutionHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeExecutionHash changes when the payload value differs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"changes when the payload value differs"},{"ancestorTitles":["computeExecutionHash"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"computeExecutionHash changes when verifyingContract differs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"changes when verifyingContract differs"},{"ancestorTitles":["computeExecutionHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeExecutionHash changes when version differs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"changes when version differs"},{"ancestorTitles":["computeExecutionHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeExecutionHash defaults version to \"0.1.0\" when omitted","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"defaults version to \"0.1.0\" when omitted"},{"ancestorTitles":["computeExecutionHash"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"computeExecutionHash produces a different hash for SVM vs EVM chains (different domain separator)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"produces a different hash for SVM vs EVM chains (different domain separator)"},{"ancestorTitles":["computeExecutionHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeExecutionHash uses the correct EIP-712 domain type string for EVM","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"uses the correct EIP-712 domain type string for EVM"},{"ancestorTitles":["computeExecutionHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeExecutionHash uses SVM domain type string for SVM chains","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"uses SVM domain type string for SVM chains"},{"ancestorTitles":["computeExecutionHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeExecutionHash handles zero-value payload fields","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"handles zero-value payload fields"},{"ancestorTitles":["computeExecutionHash"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"computeExecutionHash handles empty data (0x)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"handles empty data (0x)"},{"ancestorTitles":["computeExecutionHash"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"computeExecutionHash changes when payload data differs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"changes when payload data differs"},{"ancestorTitles":["computeExecutionHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeExecutionHash changes when vType differs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"changes when vType differs"},{"ancestorTitles":["computeMigrationHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeMigrationHash returns a 32-byte keccak hash","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns a 32-byte keccak hash"},{"ancestorTitles":["computeMigrationHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeMigrationHash is deterministic for the same inputs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"is deterministic for the same inputs"},{"ancestorTitles":["computeMigrationHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeMigrationHash changes when nonce differs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"changes when nonce differs"},{"ancestorTitles":["computeMigrationHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeMigrationHash changes when deadline differs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"changes when deadline differs"},{"ancestorTitles":["computeMigrationHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeMigrationHash changes when migrationContractAddress differs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"changes when migrationContractAddress differs"},{"ancestorTitles":["computeMigrationHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeMigrationHash changes when verifyingContract differs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"changes when verifyingContract differs"},{"ancestorTitles":["computeMigrationHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeMigrationHash defaults version to \"0.1.0\" when omitted","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"defaults version to \"0.1.0\" when omitted"},{"ancestorTitles":["computeMigrationHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeMigrationHash changes when version differs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"changes when version differs"},{"ancestorTitles":["computeMigrationHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeMigrationHash produces different hashes for SVM vs EVM chains","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"produces different hashes for SVM vs EVM chains"},{"ancestorTitles":["computeMigrationHash"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeMigrationHash handles zero nonce and deadline","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"handles zero nonce and deadline"},{"ancestorTitles":["signUniversalPayload","EVM path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"signUniversalPayload EVM path calls signTypedData with correct domain, types, and message","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"calls signTypedData with correct domain, types, and message"},{"ancestorTitles":["signUniversalPayload","EVM path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"signUniversalPayload EVM path uses custom version when provided","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"uses custom version when provided"},{"ancestorTitles":["signUniversalPayload","EVM path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"signUniversalPayload EVM path defaults version to \"0.1.0\" when not provided","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"defaults version to \"0.1.0\" when not provided"},{"ancestorTitles":["signUniversalPayload","EVM path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"signUniversalPayload EVM path returns the signature bytes from signTypedData","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns the signature bytes from signTypedData"},{"ancestorTitles":["signUniversalPayload","EVM path"],"duration":10,"failureDetails":[],"failureMessages":[],"fullName":"signUniversalPayload EVM path throws if signTypedData is not defined","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws if signTypedData is not defined"},{"ancestorTitles":["signUniversalPayload","SVM path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"signUniversalPayload SVM path calls signMessage (not signTypedData) for SVM chains","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"calls signMessage (not signTypedData) for SVM chains"},{"ancestorTitles":["signUniversalPayload","SVM path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"signUniversalPayload SVM path returns the signature bytes from signMessage","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns the signature bytes from signMessage"},{"ancestorTitles":["signUniversalPayload","SVM path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"signUniversalPayload SVM path passes the execution digest as bytes to signMessage","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"passes the execution digest as bytes to signMessage"},{"ancestorTitles":["signMigrationPayload","EVM path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"signMigrationPayload EVM path calls signTypedData with correct domain and MigrationPayload types","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"calls signTypedData with correct domain and MigrationPayload types"},{"ancestorTitles":["signMigrationPayload","EVM path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"signMigrationPayload EVM path returns the signature bytes","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns the signature bytes"},{"ancestorTitles":["signMigrationPayload","EVM path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"signMigrationPayload EVM path throws if signTypedData is not defined","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws if signTypedData is not defined"},{"ancestorTitles":["signMigrationPayload","SVM path"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"signMigrationPayload SVM path calls signMessage for SVM chains","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"calls signMessage for SVM chains"},{"ancestorTitles":["signMigrationPayload","SVM path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"signMigrationPayload SVM path returns the signature bytes from signMessage","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns the signature bytes from signMessage"},{"ancestorTitles":["signMigrationPayload","SVM path"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"signMigrationPayload SVM path passes the migration digest as bytes to signMessage","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"passes the migration digest as bytes to signMessage"},{"ancestorTitles":["encodeUniversalPayload"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayload encodes and round-trips a standard payload","invocations":1,"location":null,"numPassingAsserts":10,"retryReasons":[],"status":"passed","title":"encodes and round-trips a standard payload"},{"ancestorTitles":["encodeUniversalPayload"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayload encodes zero-value fields correctly","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"encodes zero-value fields correctly"},{"ancestorTitles":["encodeUniversalPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayload preserves large BigInt values","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"preserves large BigInt values"},{"ancestorTitles":["encodeUniversalPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayload returns a hex string starting with 0x","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns a hex string starting with 0x"},{"ancestorTitles":["encodeUniversalPayloadSvm"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayloadSvm returns a Buffer","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns a Buffer"},{"ancestorTitles":["encodeUniversalPayloadSvm"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayloadSvm starts with 20 address bytes","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"starts with 20 address bytes"},{"ancestorTitles":["encodeUniversalPayloadSvm"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayloadSvm encodes value as little-endian u64 at offset 20","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"encodes value as little-endian u64 at offset 20"},{"ancestorTitles":["encodeUniversalPayloadSvm"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayloadSvm encodes data with a 4-byte LE length prefix","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"encodes data with a 4-byte LE length prefix"},{"ancestorTitles":["encodeUniversalPayloadSvm"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayloadSvm encodes empty data (0x) with zero length","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"encodes empty data (0x) with zero length"},{"ancestorTitles":["encodeUniversalPayloadSvm"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayloadSvm encodes gasLimit, maxFeePerGas, maxPriorityFeePerGas, nonce as u64 LE","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"encodes gasLimit, maxFeePerGas, maxPriorityFeePerGas, nonce as u64 LE"},{"ancestorTitles":["encodeUniversalPayloadSvm"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayloadSvm encodes deadline as i64 LE (signed)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"encodes deadline as i64 LE (signed)"},{"ancestorTitles":["encodeUniversalPayloadSvm"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayloadSvm does not require Buffer BigInt write methods (browser polyfill compatibility)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does not require Buffer BigInt write methods (browser polyfill compatibility)"},{"ancestorTitles":["encodeUniversalPayloadSvm"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayloadSvm encodes vType as a single byte at the end","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"encodes vType as a single byte at the end"},{"ancestorTitles":["encodeUniversalPayloadSvm"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayloadSvm total length for empty-data payload is 73 bytes","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"total length for empty-data payload is 73 bytes"},{"ancestorTitles":["encodeUniversalPayloadSvm","u64 bounds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayloadSvm u64 bounds passes at u64 max","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"passes at u64 max"},{"ancestorTitles":["encodeUniversalPayloadSvm","u64 bounds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeUniversalPayloadSvm u64 bounds throws on u64 max + 1","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws on u64 max + 1"},{"ancestorTitles":["buildUniversalTxRequest"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildUniversalTxRequest returns a well-formed UniversalTxRequest","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"returns a well-formed UniversalTxRequest"},{"ancestorTitles":["buildUniversalTxRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildUniversalTxRequest sets revertInstruction.fundRecipient to the signer address","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"sets revertInstruction.fundRecipient to the signer address"},{"ancestorTitles":["buildUniversalTxRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildUniversalTxRequest handles zero amount","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"handles zero amount"},{"ancestorTitles":["buildUniversalTxRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildUniversalTxRequest preserves the payload as-is without modification","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"preserves the payload as-is without modification"},{"ancestorTitles":["buildUniversalTxRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildUniversalTxRequest works with zeroAddress as token","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"works with zeroAddress as token"},{"ancestorTitles":["buildUniversalTxRequest"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildUniversalTxRequest works with zeroAddress as recipient","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"works with zeroAddress as recipient"},{"ancestorTitles":["buildMulticallPayloadData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildMulticallPayloadData starts with the UEA_MULTICALL selector (first 4 bytes of keccak)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"starts with the UEA_MULTICALL selector (first 4 bytes of keccak)"},{"ancestorTitles":["buildMulticallPayloadData"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildMulticallPayloadData encodes a single multicall entry that can be decoded","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"encodes a single multicall entry that can be decoded"},{"ancestorTitles":["buildMulticallPayloadData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildMulticallPayloadData encodes multiple multicall entries","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"encodes multiple multicall entries"},{"ancestorTitles":["buildMulticallPayloadData"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildMulticallPayloadData checksums addresses via getAddress","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"checksums addresses via getAddress"},{"ancestorTitles":["buildMulticallPayloadData"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildMulticallPayloadData throws for unsupported chains","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws for unsupported chains"},{"ancestorTitles":["buildMulticallPayloadData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildMulticallPayloadData works for Arbitrum Sepolia chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"works for Arbitrum Sepolia chain"},{"ancestorTitles":["buildMulticallPayloadData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildMulticallPayloadData works for Base Sepolia chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"works for Base Sepolia chain"},{"ancestorTitles":["buildMulticallPayloadData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildMulticallPayloadData works for BNB Testnet chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"works for BNB Testnet chain"},{"ancestorTitles":["buildMulticallPayloadData"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildMulticallPayloadData works for Solana Devnet chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"works for Solana Devnet chain"},{"ancestorTitles":["buildMulticallPayloadData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildMulticallPayloadData handles zero-value calls with empty data","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"handles zero-value calls with empty data"}],"endTime":1792494875439,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/signing-payload.spec.ts","startTime":1792494875238,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["tx-transformer","transformToUniversalTxReceipt"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer transformToUniversalTxReceipt should map viem TransactionReceipt fields to UniversalTxReceipt","invocations":1,"location":null,"numPassingAsserts":13,"retryReasons":[],"status":"passed","title":"should map viem TransactionReceipt fields to UniversalTxReceipt"},{"ancestorTitles":["tx-transformer","transformToUniversalTxReceipt"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer transformToUniversalTxReceipt should set status=0 for reverted receipt","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should set status=0 for reverted receipt"},{"ancestorTitles":["tx-transformer","transformToUniversalTxReceipt"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer transformToUniversalTxReceipt should use contractAddress from receipt when present","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should use contractAddress from receipt when present"},{"ancestorTitles":["tx-transformer","transformToUniversalTxReceipt"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer transformToUniversalTxReceipt should fallback to BigInt(0) when gasPrice is undefined","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should fallback to BigInt(0) when gasPrice is undefined"},{"ancestorTitles":["tx-transformer","transformToUniversalTxReceipt"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer transformToUniversalTxReceipt should use raw from originalTxResponse when present","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should use raw from originalTxResponse when present"},{"ancestorTitles":["tx-transformer","transformToUniversalTxReceipt"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer transformToUniversalTxReceipt should construct fallback raw when originalTxResponse.raw is undefined","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should construct fallback raw when originalTxResponse.raw is undefined"},{"ancestorTitles":["tx-transformer","transformToUniversalTxReceipt"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer transformToUniversalTxReceipt should pass through logs from receipt","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should pass through logs from receipt"},{"ancestorTitles":["tx-transformer","transformToUniversalTxReceipt"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer transformToUniversalTxReceipt should default logsBloom to 0x when receipt has no logsBloom","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should default logsBloom to 0x when receipt has no logsBloom"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents should always include SEND_TX_101, SEND_TX_102_01, SEND_TX_103_03_04","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should always include SEND_TX_101, SEND_TX_102_01, SEND_TX_103_03_04"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents should always end with a final event (success or error)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should always end with a final event (success or error)"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents should include UEA resolution events for non-Push origins","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should include UEA resolution events for non-Push origins"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents should NOT include UEA resolution events for Push Chain origins","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should NOT include UEA resolution events for Push Chain origins"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents should NOT include sub-path-specific events in R1 reconstruction","invocations":1,"location":null,"numPassingAsserts":11,"retryReasons":[],"status":"passed","title":"should NOT include sub-path-specific events in R1 reconstruction"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents should include broadcasting event (SEND_TX_107)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should include broadcasting event (SEND_TX_107)"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents should emit error event for OUTBOUND_FAILED status","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should emit error event for OUTBOUND_FAILED status"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents should emit error event when pcTx status is FAILED","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should emit error event when pcTx status is FAILED"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents should emit success event for successful transactions","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should emit success event for successful transactions"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents should parse origin with only namespace (no address part)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should parse origin with only namespace (no address part)"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents should handle FAILED pcTx with empty errorMsg","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle FAILED pcTx with empty errorMsg"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents should emit success when universalTxData is undefined","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should emit success when universalTxData is undefined"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents R2 reconstruction: pcTx.FAILED emits 299-02 terminal","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"R2 reconstruction: pcTx.FAILED emits 299-02 terminal"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents R2 reconstruction: universalStatus=OUTBOUND_FAILED without pcFailed does not emit terminal failure","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"R2 reconstruction: universalStatus=OUTBOUND_FAILED without pcFailed does not emit terminal failure"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents R3 reconstruction: pcTx.FAILED emits 399-02 terminal with phase=push","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"R3 reconstruction: pcTx.FAILED emits 399-02 terminal with phase=push"},{"ancestorTitles":["tx-transformer","reconstructProgressEvents"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer reconstructProgressEvents R3 reconstruction: universalStatus=OUTBOUND_FAILED without pcFailed does not emit terminal failure","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"R3 reconstruction: universalStatus=OUTBOUND_FAILED without pcFailed does not emit terminal failure"},{"ancestorTitles":["tx-transformer","detectRouteFromUniversalTxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer detectRouteFromUniversalTxData should return undefined for undefined input","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return undefined for undefined input"},{"ancestorTitles":["tx-transformer","detectRouteFromUniversalTxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer detectRouteFromUniversalTxData should return UOA_TO_PUSH when no outbound and no inbound","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return UOA_TO_PUSH when no outbound and no inbound"},{"ancestorTitles":["tx-transformer","detectRouteFromUniversalTxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer detectRouteFromUniversalTxData should return UOA_TO_CEA when outbound present but no inbound","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return UOA_TO_CEA when outbound present but no inbound"},{"ancestorTitles":["tx-transformer","detectRouteFromUniversalTxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer detectRouteFromUniversalTxData should return CEA_TO_CEA when both outbound and inbound present","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return CEA_TO_CEA when both outbound and inbound present"},{"ancestorTitles":["tx-transformer","detectRouteFromUniversalTxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer detectRouteFromUniversalTxData should return CEA_TO_PUSH when inbound present but no outbound","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return CEA_TO_PUSH when inbound present but no outbound"},{"ancestorTitles":["tx-transformer","detectRouteFromUniversalTxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer detectRouteFromUniversalTxData should detect outbound route from status alone (OUTBOUND_PENDING, empty outboundTx)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should detect outbound route from status alone (OUTBOUND_PENDING, empty outboundTx)"},{"ancestorTitles":["tx-transformer","detectRouteFromUniversalTxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer detectRouteFromUniversalTxData should detect outbound route from OUTBOUND_SUCCESS status","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should detect outbound route from OUTBOUND_SUCCESS status"},{"ancestorTitles":["tx-transformer","detectRouteFromUniversalTxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer detectRouteFromUniversalTxData should detect outbound route from OUTBOUND_FAILED status","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should detect outbound route from OUTBOUND_FAILED status"},{"ancestorTitles":["tx-transformer","detectRouteFromUniversalTxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"tx-transformer detectRouteFromUniversalTxData should return CEA_TO_CEA when OUTBOUND_PENDING status and inbound present","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return CEA_TO_CEA when OUTBOUND_PENDING status and inbound present"},{"ancestorTitles":["gas-calculator","ensureErc20Allowance"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator ensureErc20Allowance should return immediately if existing allowance >= required","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return immediately if existing allowance >= required"},{"ancestorTitles":["gas-calculator","ensureErc20Allowance"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator ensureErc20Allowance should return immediately if existing allowance equals required","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return immediately if existing allowance equals required"},{"ancestorTitles":["gas-calculator","ensureErc20Allowance"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator ensureErc20Allowance should set new allowance when current is zero","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should set new allowance when current is zero"},{"ancestorTitles":["gas-calculator","ensureErc20Allowance"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator ensureErc20Allowance should reset then set allowance when current is non-zero but insufficient","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should reset then set allowance when current is non-zero but insufficient"},{"ancestorTitles":["gas-calculator","ensureErc20Allowance"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator ensureErc20Allowance should wait for confirmations after each write","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should wait for confirmations after each write"},{"ancestorTitles":["gas-calculator","ensureErc20Allowance"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator ensureErc20Allowance should not throw when verification read fails","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should not throw when verification read fails"},{"ancestorTitles":["gas-calculator","calculateNativeAmountForDeposit"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateNativeAmountForDeposit should calculate native amount based on deficit and price","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should calculate native amount based on deficit and price"},{"ancestorTitles":["gas-calculator","calculateNativeAmountForDeposit"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateNativeAmountForDeposit should use $1 minimum deposit when deficit is zero","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should use $1 minimum deposit when deficit is zero"},{"ancestorTitles":["gas-calculator","calculateNativeAmountForDeposit"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateNativeAmountForDeposit should throw if deposit exceeds $1000","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw if deposit exceeds $1000"},{"ancestorTitles":["gas-calculator","calculateNativeAmountForDeposit"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateNativeAmountForDeposit should clamp deposit up to $1 minimum","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should clamp deposit up to $1 minimum"},{"ancestorTitles":["gas-calculator","calculateNativeAmountForDeposit"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateNativeAmountForDeposit should fire progress hooks","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should fire progress hooks"},{"ancestorTitles":["gas-calculator","calculateGasAmountFromAmountOutMinETH"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateGasAmountFromAmountOutMinETH should return amountOutMinETH directly when gasToken is WETH","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return amountOutMinETH directly when gasToken is WETH"},{"ancestorTitles":["gas-calculator","calculateGasAmountFromAmountOutMinETH"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateGasAmountFromAmountOutMinETH should return amountOutMinETH for WETH regardless of case","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return amountOutMinETH for WETH regardless of case"},{"ancestorTitles":["gas-calculator","calculateGasAmountFromAmountOutMinETH"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateGasAmountFromAmountOutMinETH should accept string amountOutMinETH","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should accept string amountOutMinETH"},{"ancestorTitles":["gas-calculator","calculateGasAmountFromAmountOutMinETH"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateGasAmountFromAmountOutMinETH should call quoteExactOutputFn and add 1% slippage for non-WETH tokens","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should call quoteExactOutputFn and add 1% slippage for non-WETH tokens"},{"ancestorTitles":["gas-calculator","calculateGasAmountFromAmountOutMinETH"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateGasAmountFromAmountOutMinETH should throw for unsupported chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw for unsupported chain"},{"ancestorTitles":["gas-calculator","calculateGasAmountFromAmountOutMinETH"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateGasAmountFromAmountOutMinETH should throw when WETH is not configured for chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw when WETH is not configured for chain"},{"ancestorTitles":["gas-calculator","calculateGasAmountFromAmountOutMinETH"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateGasAmountFromAmountOutMinETH should throw when from/to tokens are not found in registry","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw when from/to tokens are not found in registry"},{"ancestorTitles":["gas-calculator","calculateGasAmountFromAmountOutMinETH"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateGasAmountFromAmountOutMinETH should work for Arbitrum Sepolia","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should work for Arbitrum Sepolia"},{"ancestorTitles":["gas-calculator","calculateGasAmountFromAmountOutMinETH"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateGasAmountFromAmountOutMinETH should work for Base Sepolia","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should work for Base Sepolia"},{"ancestorTitles":["gas-calculator","calculateGasAmountFromAmountOutMinETH"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"gas-calculator calculateGasAmountFromAmountOutMinETH should handle zero amountOutMinETH","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle zero amountOutMinETH"}],"endTime":1792494875627,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/tx-transformer-gas.spec.ts","startTime":1792494875451,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["R3 error classification","SEND_TX_304_04 builder"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"R3 error classification SEND_TX_304_04 builder emits decline copy for a real wallet rejection","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"emits decline copy for a real wallet rejection"},{"ancestorTitles":["R3 error classification","SEND_TX_304_04 builder"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R3 error classification SEND_TX_304_04 builder emits signature-failed copy for a generic sign-time error","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"emits signature-failed copy for a generic sign-time error"},{"ancestorTitles":["R3 error classification","SEND_TX_304_04 builder"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R3 error classification SEND_TX_304_04 builder treats undefined errorMessage as a decline","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"treats undefined errorMessage as a decline"},{"ancestorTitles":["R3 error classification","SEND_TX_304_04 builder"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R3 error classification SEND_TX_304_04 builder classifies ethers ACTION_REJECTED as a decline","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"classifies ethers ACTION_REJECTED as a decline"},{"ancestorTitles":["R3 error classification","SEND_TX_304_04 builder"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R3 error classification SEND_TX_304_04 builder classifies EIP-1193 4001 code as a decline","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"classifies EIP-1193 4001 code as a decline"},{"ancestorTitles":["R3 error classification","SEND_TX_304_04 builder"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R3 error classification SEND_TX_304_04 builder classifies RPC timeout during signing as signature-failed (not decline)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"classifies RPC timeout during signing as signature-failed (not decline)"},{"ancestorTitles":["R3 error classification","104_04 / 204_04 / 304_04 parity (shared classifier)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"R3 error classification 104_04 / 204_04 / 304_04 parity (shared classifier) emits identical title + message across all three routes for: UserRejectedRequestError: The user rejected the request.","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"emits identical title + message across all three routes for: UserRejectedRequestError: The user rejected the request."},{"ancestorTitles":["R3 error classification","104_04 / 204_04 / 304_04 parity (shared classifier)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R3 error classification 104_04 / 204_04 / 304_04 parity (shared classifier) emits identical title + message across all three routes for: user rejected transaction [ACTION_REJECTED]","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"emits identical title + message across all three routes for: user rejected transaction [ACTION_REJECTED]"},{"ancestorTitles":["R3 error classification","104_04 / 204_04 / 304_04 parity (shared classifier)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R3 error classification 104_04 / 204_04 / 304_04 parity (shared classifier) emits identical title + message across all three routes for: insufficient funds for intrinsic transaction cost","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"emits identical title + message across all three routes for: insufficient funds for intrinsic transaction cost"},{"ancestorTitles":["R3 error classification","104_04 / 204_04 / 304_04 parity (shared classifier)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R3 error classification 104_04 / 204_04 / 304_04 parity (shared classifier) emits identical title + message across all three routes for: something went wrong","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"emits identical title + message across all three routes for: something went wrong"},{"ancestorTitles":["R3 error classification","104_04 / 204_04 / 304_04 parity (shared classifier)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R3 error classification 104_04 / 204_04 / 304_04 parity (shared classifier) emits identical title + message across all three routes for: undefined","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"emits identical title + message across all three routes for: undefined"}],"endTime":1792494875763,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/r3-error-classification.spec.ts","startTime":1792494875632,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["context","printLog"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"context printLog should log when printTraces is true","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should log when printTraces is true"},{"ancestorTitles":["context","printLog"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"context printLog should NOT log when printTraces is false","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should NOT log when printTraces is false"},{"ancestorTitles":["context","printLog"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"context printLog should handle empty message","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle empty message"},{"ancestorTitles":["context","fireProgressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"context fireProgressHook should call progressHook callback when provided","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should call progressHook callback when provided"},{"ancestorTitles":["context","fireProgressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"context fireProgressHook should NOT call progressHook when callback is undefined","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should NOT call progressHook when callback is undefined"},{"ancestorTitles":["context","fireProgressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"context fireProgressHook should also print the message via printLog when printTraces is true","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should also print the message via printLog when printTraces is true"},{"ancestorTitles":["context","fireProgressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"context fireProgressHook should forward extra arguments to the hook factory","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should forward extra arguments to the hook factory"},{"ancestorTitles":["context","OrchestratorContext interface"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"context OrchestratorContext interface should accept the minimal mock shape without errors","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should accept the minimal mock shape without errors"},{"ancestorTitles":["context","OrchestratorContext interface"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"context OrchestratorContext interface should allow mutable caches to be set","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should allow mutable caches to be set"},{"ancestorTitles":["helpers","isPushChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers isPushChain should return true for PUSH_MAINNET","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return true for PUSH_MAINNET"},{"ancestorTitles":["helpers","isPushChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers isPushChain should return true for PUSH_TESTNET_DONUT","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return true for PUSH_TESTNET_DONUT"},{"ancestorTitles":["helpers","isPushChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers isPushChain should return true for PUSH_LOCALNET","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return true for PUSH_LOCALNET"},{"ancestorTitles":["helpers","isPushChain"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"helpers isPushChain should return false for EVM external chains","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should return false for EVM external chains"},{"ancestorTitles":["helpers","isPushChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers isPushChain should return false for SVM chains","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should return false for SVM chains"},{"ancestorTitles":["helpers","getPushChainForNetwork"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getPushChainForNetwork should return PUSH_MAINNET for MAINNET","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return PUSH_MAINNET for MAINNET"},{"ancestorTitles":["helpers","getPushChainForNetwork"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getPushChainForNetwork should return PUSH_TESTNET_DONUT for TESTNET_DONUT","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return PUSH_TESTNET_DONUT for TESTNET_DONUT"},{"ancestorTitles":["helpers","getPushChainForNetwork"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getPushChainForNetwork should return PUSH_TESTNET_DONUT for TESTNET","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return PUSH_TESTNET_DONUT for TESTNET"},{"ancestorTitles":["helpers","getPushChainForNetwork"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getPushChainForNetwork should return PUSH_LOCALNET for LOCALNET","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return PUSH_LOCALNET for LOCALNET"},{"ancestorTitles":["helpers","getChainNamespace"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getChainNamespace should return correct CAIP-2 namespace for Ethereum Sepolia","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return correct CAIP-2 namespace for Ethereum Sepolia"},{"ancestorTitles":["helpers","getChainNamespace"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getChainNamespace should return correct CAIP-2 namespace for Solana Devnet","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return correct CAIP-2 namespace for Solana Devnet"},{"ancestorTitles":["helpers","getChainNamespace"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getChainNamespace should return correct namespace for Push Testnet Donut","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return correct namespace for Push Testnet Donut"},{"ancestorTitles":["helpers","getChainNamespace"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getChainNamespace should return correct namespace for BNB Testnet","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return correct namespace for BNB Testnet"},{"ancestorTitles":["helpers","getChainNamespace"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getChainNamespace should match VM_NAMESPACE prefix for every chain","invocations":1,"location":null,"numPassingAsserts":12,"retryReasons":[],"status":"passed","title":"should match VM_NAMESPACE prefix for every chain"},{"ancestorTitles":["helpers","chainFromNamespace"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers chainFromNamespace should resolve Ethereum Sepolia from its CAIP-2 namespace","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should resolve Ethereum Sepolia from its CAIP-2 namespace"},{"ancestorTitles":["helpers","chainFromNamespace"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers chainFromNamespace should resolve Solana Devnet from its namespace","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should resolve Solana Devnet from its namespace"},{"ancestorTitles":["helpers","chainFromNamespace"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers chainFromNamespace should resolve Push Testnet Donut","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should resolve Push Testnet Donut"},{"ancestorTitles":["helpers","chainFromNamespace"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers chainFromNamespace should return null for unknown namespace","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return null for unknown namespace"},{"ancestorTitles":["helpers","chainFromNamespace"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers chainFromNamespace should return null for empty string","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return null for empty string"},{"ancestorTitles":["helpers","chainFromNamespace"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers chainFromNamespace should be the inverse of getChainNamespace","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should be the inverse of getChainNamespace"},{"ancestorTitles":["helpers","getNativePRC20ForChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getNativePRC20ForChain should return pETH for Ethereum Sepolia","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return pETH for Ethereum Sepolia"},{"ancestorTitles":["helpers","getNativePRC20ForChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getNativePRC20ForChain should return pETH for Ethereum Mainnet","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return pETH for Ethereum Mainnet"},{"ancestorTitles":["helpers","getNativePRC20ForChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getNativePRC20ForChain should return pETH_ARB for Arbitrum Sepolia","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return pETH_ARB for Arbitrum Sepolia"},{"ancestorTitles":["helpers","getNativePRC20ForChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getNativePRC20ForChain should return pETH_BASE for Base Sepolia","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return pETH_BASE for Base Sepolia"},{"ancestorTitles":["helpers","getNativePRC20ForChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getNativePRC20ForChain should return pBNB for BNB Testnet","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return pBNB for BNB Testnet"},{"ancestorTitles":["helpers","getNativePRC20ForChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getNativePRC20ForChain should return pSOL for Solana Devnet","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return pSOL for Solana Devnet"},{"ancestorTitles":["helpers","getNativePRC20ForChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getNativePRC20ForChain should return pSOL for Solana Testnet","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return pSOL for Solana Testnet"},{"ancestorTitles":["helpers","getNativePRC20ForChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getNativePRC20ForChain should return pSOL for Solana Mainnet","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return pSOL for Solana Mainnet"},{"ancestorTitles":["helpers","getNativePRC20ForChain"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"helpers getNativePRC20ForChain should throw for Push Chain chains","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw for Push Chain chains"},{"ancestorTitles":["helpers","getNativePRC20ForChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getNativePRC20ForChain should throw for Push Localnet","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw for Push Localnet"},{"ancestorTitles":["helpers","getUniversalGatewayPCAddress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getUniversalGatewayPCAddress should return the fixed precompile address","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return the fixed precompile address"},{"ancestorTitles":["helpers","getUniversalGatewayPCAddress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers getUniversalGatewayPCAddress should be 0x-prefixed","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should be 0x-prefixed"},{"ancestorTitles":["helpers","validateMainnetConnection"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers validateMainnetConnection should throw when Ethereum Mainnet is used with non-mainnet Push Chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw when Ethereum Mainnet is used with non-mainnet Push Chain"},{"ancestorTitles":["helpers","validateMainnetConnection"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers validateMainnetConnection should throw when Solana Mainnet is used with non-mainnet Push Chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw when Solana Mainnet is used with non-mainnet Push Chain"},{"ancestorTitles":["helpers","validateMainnetConnection"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers validateMainnetConnection should NOT throw for Ethereum Mainnet with Push Mainnet chainId","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should NOT throw for Ethereum Mainnet with Push Mainnet chainId"},{"ancestorTitles":["helpers","validateMainnetConnection"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"helpers validateMainnetConnection should NOT throw for non-mainnet chains regardless of Push chainId","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should NOT throw for non-mainnet chains regardless of Push chainId"},{"ancestorTitles":["helpers","bigintReplacer"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers bigintReplacer should convert bigint to string","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should convert bigint to string"},{"ancestorTitles":["helpers","bigintReplacer"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers bigintReplacer should convert BigInt(0) to \"0\"","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should convert BigInt(0) to \"0\""},{"ancestorTitles":["helpers","bigintReplacer"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers bigintReplacer should pass through strings unchanged","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should pass through strings unchanged"},{"ancestorTitles":["helpers","bigintReplacer"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers bigintReplacer should pass through numbers unchanged","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should pass through numbers unchanged"},{"ancestorTitles":["helpers","bigintReplacer"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers bigintReplacer should pass through null unchanged","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should pass through null unchanged"},{"ancestorTitles":["helpers","bigintReplacer"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers bigintReplacer should pass through objects unchanged","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should pass through objects unchanged"},{"ancestorTitles":["helpers","bigintReplacer"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers bigintReplacer should work as a JSON.stringify replacer","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should work as a JSON.stringify replacer"},{"ancestorTitles":["helpers","toExecuteParams"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers toExecuteParams should extract address from string `to`","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should extract address from string `to`"},{"ancestorTitles":["helpers","toExecuteParams"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers toExecuteParams should extract address from ChainTarget `to`","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should extract address from ChainTarget `to`"},{"ancestorTitles":["helpers","toExecuteParams"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers toExecuteParams should forward value, data, funds, gasLimit, and deadline","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"should forward value, data, funds, gasLimit, and deadline"},{"ancestorTitles":["helpers","toExecuteParams"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers toExecuteParams should forward feeLockTxHash when present","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should forward feeLockTxHash when present"},{"ancestorTitles":["helpers","toExecuteParams"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"helpers toExecuteParams should leave optional fields as undefined when not provided","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should leave optional fields as undefined when not provided"},{"ancestorTitles":["helpers","toExecuteParams"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers toExecuteParams should forward funds parameter","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should forward funds parameter"},{"ancestorTitles":["helpers","toExecuteParams"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"helpers toExecuteParams should NOT include `from` or `svmExecute` in the result","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should NOT include `from` or `svmExecute` in the result"},{"ancestorTitles":["helpers","SUPPORTED_GATEWAY_CHAINS"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers SUPPORTED_GATEWAY_CHAINS should be an array","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should be an array"},{"ancestorTitles":["helpers","SUPPORTED_GATEWAY_CHAINS"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers SUPPORTED_GATEWAY_CHAINS should contain known chains","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should contain known chains"},{"ancestorTitles":["helpers","SUPPORTED_GATEWAY_CHAINS"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"helpers SUPPORTED_GATEWAY_CHAINS should NOT contain Push Chain variants","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should NOT contain Push Chain variants"},{"ancestorTitles":["outbound-tracker","computeUniversalTxId"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker computeUniversalTxId should return a 0x-prefixed keccak256 hash","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return a 0x-prefixed keccak256 hash"},{"ancestorTitles":["outbound-tracker","computeUniversalTxId"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker computeUniversalTxId should produce deterministic output for same inputs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should produce deterministic output for same inputs"},{"ancestorTitles":["outbound-tracker","computeUniversalTxId"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker computeUniversalTxId should produce different output for different tx hashes","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should produce different output for different tx hashes"},{"ancestorTitles":["outbound-tracker","computeUniversalTxId"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker computeUniversalTxId should produce different output for different networks","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should produce different output for different networks"},{"ancestorTitles":["outbound-tracker","computeUniversalTxId"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker computeUniversalTxId should incorporate the push chain chainId in the hash input","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should incorporate the push chain chainId in the hash input"},{"ancestorTitles":["outbound-tracker","computeUniversalTxId"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker computeUniversalTxId should handle empty tx hash","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle empty tx hash"},{"ancestorTitles":["outbound-tracker","extractAllUniversalSubTxIds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker extractAllUniversalSubTxIds should return sub-tx IDs from outbound_created events","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return sub-tx IDs from outbound_created events"},{"ancestorTitles":["outbound-tracker","extractAllUniversalSubTxIds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker extractAllUniversalSubTxIds should prefix values that lack 0x","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should prefix values that lack 0x"},{"ancestorTitles":["outbound-tracker","extractAllUniversalSubTxIds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker extractAllUniversalSubTxIds should collect multiple sub-tx IDs from multiple events","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should collect multiple sub-tx IDs from multiple events"},{"ancestorTitles":["outbound-tracker","extractAllUniversalSubTxIds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker extractAllUniversalSubTxIds should ignore events that are not outbound_created","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should ignore events that are not outbound_created"},{"ancestorTitles":["outbound-tracker","extractAllUniversalSubTxIds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker extractAllUniversalSubTxIds should skip outbound_created events without utx_id attribute","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should skip outbound_created events without utx_id attribute"},{"ancestorTitles":["outbound-tracker","extractAllUniversalSubTxIds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker extractAllUniversalSubTxIds should return empty array when Cosmos tx has no events","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return empty array when Cosmos tx has no events"},{"ancestorTitles":["outbound-tracker","extractAllUniversalSubTxIds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker extractAllUniversalSubTxIds should return empty array when Cosmos tx is null","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return empty array when Cosmos tx is null"},{"ancestorTitles":["outbound-tracker","extractAllUniversalSubTxIds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker extractAllUniversalSubTxIds should return empty array when getCosmosTx throws","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return empty array when getCosmosTx throws"},{"ancestorTitles":["outbound-tracker","extractAllUniversalSubTxIds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker extractAllUniversalSubTxIds should skip utx_id attributes with empty value","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should skip utx_id attributes with empty value"},{"ancestorTitles":["outbound-tracker","extractAllUniversalSubTxIds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker extractAllUniversalSubTxIds should return empty array when events array is empty","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return empty array when events array is empty"},{"ancestorTitles":["outbound-tracker","extractUniversalSubTxIdFromTx"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker extractUniversalSubTxIdFromTx should return the first sub-tx ID","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return the first sub-tx ID"},{"ancestorTitles":["outbound-tracker","extractUniversalSubTxIdFromTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker extractUniversalSubTxIdFromTx should return null when no sub-tx IDs are found","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return null when no sub-tx IDs are found"},{"ancestorTitles":["outbound-tracker","extractUniversalSubTxIdFromTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"outbound-tracker extractUniversalSubTxIdFromTx should return null when getCosmosTx throws","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return null when getCosmosTx throws"}],"endTime":1792494875908,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/context-helpers-tracker.spec.ts","startTime":1792494875766,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["classifyIntoSegments"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should return empty array for empty hops","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return empty array for empty hops"},{"ancestorTitles":["classifyIntoSegments"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should create single PUSH_EXECUTION segment for one Route 1 hop","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should create single PUSH_EXECUTION segment for one Route 1 hop"},{"ancestorTitles":["classifyIntoSegments"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should merge consecutive Route 1 hops into single PUSH_EXECUTION segment","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should merge consecutive Route 1 hops into single PUSH_EXECUTION segment"},{"ancestorTitles":["classifyIntoSegments"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should create single OUTBOUND_TO_CEA segment for one Route 2 hop","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should create single OUTBOUND_TO_CEA segment for one Route 2 hop"},{"ancestorTitles":["classifyIntoSegments"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should merge consecutive Route 2 hops to same chain","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"should merge consecutive Route 2 hops to same chain"},{"ancestorTitles":["classifyIntoSegments"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should NOT merge Route 2 hops targeting different chains","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should NOT merge Route 2 hops targeting different chains"},{"ancestorTitles":["classifyIntoSegments"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should create INBOUND_FROM_CEA segment for Route 3 hop","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should create INBOUND_FROM_CEA segment for Route 3 hop"},{"ancestorTitles":["classifyIntoSegments"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should merge consecutive Route 3 hops from the same source chain into one INBOUND_FROM_CEA segment","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should merge consecutive Route 3 hops from the same source chain into one INBOUND_FROM_CEA segment"},{"ancestorTitles":["classifyIntoSegments"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should NOT merge Route 3 hops from different source chains","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should NOT merge Route 3 hops from different source chains"},{"ancestorTitles":["classifyIntoSegments"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should handle mixed routes: Route 1 -> Route 2 -> Route 3","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should handle mixed routes: Route 1 -> Route 2 -> Route 3"},{"ancestorTitles":["classifyIntoSegments"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should keep gasLimit as max across merged hops","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should keep gasLimit as max across merged hops"},{"ancestorTitles":["classifyIntoSegments"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should sum non-zero maxPCForGas caps across merged outbound hops","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should sum non-zero maxPCForGas caps across merged outbound hops"},{"ancestorTitles":["classifyIntoSegments"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should keep merged outbound cap uncapped when any hop is uncapped","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should keep merged outbound cap uncapped when any hop is uncapped"},{"ancestorTitles":["classifyIntoSegments"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should retain quoted gasPrice on outbound segments","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should retain quoted gasPrice on outbound segments"},{"ancestorTitles":["classifyIntoSegments"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"classifyIntoSegments should keep the highest gasPrice across merged outbound hops","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should keep the highest gasPrice across merged outbound hops"},{"ancestorTitles":["composeCascadeDetailed"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"composeCascadeDetailed keeps the quoted gasPrice on immediate outbound requests","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"keeps the quoted gasPrice on immediate outbound requests"},{"ancestorTitles":["composeCascadeDetailed"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"composeCascadeDetailed uses live gas price resolution for Route 3 source-chain outbounds","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"uses live gas price resolution for Route 3 source-chain outbounds"},{"ancestorTitles":["composeCascadeDetailed"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"composeCascadeDetailed uses pool-quoted native value for SVM Route 3 inbound cascade outbounds","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"uses pool-quoted native value for SVM Route 3 inbound cascade outbounds"},{"ancestorTitles":["composeCascadeDetailed"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"composeCascadeDetailed uses pool-quoted native value for EVM cascade outbounds instead of flat balance split","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"uses pool-quoted native value for EVM cascade outbounds instead of flat balance split"},{"ancestorTitles":["composeCascadeDetailed"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"composeCascadeDetailed uses the live EVM pool quote for Route 3 wrapper gas instead of the flat split","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"uses the live EVM pool quote for Route 3 wrapper gas instead of the flat split"},{"ancestorTitles":["composeCascadeDetailed"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"composeCascadeDetailed always forwards a funds-only EVM PC20 import inside the inbound payload","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"always forwards a funds-only EVM PC20 import inside the inbound payload"},{"ancestorTitles":["composeCascadeDetailed"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"composeCascadeDetailed always forwards a funds-only SVM PC20 import with the dedicated burn instruction","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"always forwards a funds-only SVM PC20 import with the dedicated burn instruction"},{"ancestorTitles":["composeCascadeDetailed"],"duration":6,"failureDetails":[],"failureMessages":[],"fullName":"composeCascadeDetailed rejects oversized SVM Route 3 cascade payloads before broadcast","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects oversized SVM Route 3 cascade payloads before broadcast"}],"endTime":1792494876057,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/cascade-composition.spec.ts","startTime":1792494875911,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"an agent alone produces typed, locally complete DEXES rules on all catalog chains","invocations":1,"location":null,"numPassingAsserts":34,"retryReasons":[],"status":"passed","title":"an agent alone produces typed, locally complete DEXES rules on all catalog chains"},{"ancestorTitles":[],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"an agent alone produces typed, locally complete LENDING rules on all catalog chains","invocations":1,"location":null,"numPassingAsserts":34,"retryReasons":[],"status":"passed","title":"an agent alone produces typed, locally complete LENDING rules on all catalog chains"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"an agent alone produces typed, locally complete STAKING rules on all catalog chains","invocations":1,"location":null,"numPassingAsserts":10,"retryReasons":[],"status":"passed","title":"an agent alone produces typed, locally complete STAKING rules on all catalog chains"},{"ancestorTitles":[],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"generates one expiry seven days from this get call, refreshing on the next call","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"generates one expiry seven days from this get call, refreshing on the next call"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"uses verified raw-unit limits for stablecoins with different decimals","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"uses verified raw-unit limits for stablecoins with different decimals"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"uses token quantities for native, wrapped-native and LINK defaults","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"uses token quantities for native, wrapped-native and LINK defaults"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"preserves explicit expiry and gas, including a zero gas ceiling","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"preserves explicit expiry and gas, including a zero gas ceiling"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"never invents caps for explicit assets, even when their address is a default","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"never invents caps for explicit assets, even when their address is a default"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"does not grant the default tokens on a different chain when assets is explicit","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not grant the default tokens on a different chain when assets is explicit"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"refuses unreviewed default tokens instead of inferring permissions from symbols","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"refuses unreviewed default tokens instead of inferring permissions from symbols"}],"endTime":1792494876424,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/preset-default-policy.spec.ts","startTime":1792494876059,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"ships verified mainnet and testnet templates and keeps prediction empty","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"ships verified mainnet and testnet templates and keeps prediction empty"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"groups apps on a chain into one editable template with default expiry and omitted identity","invocations":1,"location":null,"numPassingAsserts":9,"retryReasons":[],"status":"passed","title":"groups apps on a chain into one editable template with default expiry and omitted identity"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"returns ready Rule types with identity and expiry; routes assets and defaults missing caps to zero","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"returns ready Rule types with identity and expiry; routes assets and defaults missing caps to zero"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"does not type an incomplete template as a ready rule","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does not type an incomplete template as a ready rule"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"adds only spender-pinned and amount-bounded ERC20 approvals; native assets have none","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"adds only spender-pinned and amount-bounded ERC20 approvals; native assets have none"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"does not mutate caller assets, returned records, or the bundled catalog","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"does not mutate caller assets, returned records, or the bundled catalog"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rejects malformed or mismatched options before returning templates (case 0)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects malformed or mismatched options before returning templates (case 0)"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"rejects malformed or mismatched options before returning templates (case 1)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects malformed or mismatched options before returning templates (case 1)"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rejects malformed or mismatched options before returning templates (case 2)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects malformed or mismatched options before returning templates (case 2)"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rejects malformed or mismatched options before returning templates (case 3)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects malformed or mismatched options before returning templates (case 3)"},{"ancestorTitles":[],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"rejects malformed or mismatched options before returning templates (case 4)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects malformed or mismatched options before returning templates (case 4)"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rejects malformed or mismatched options before returning templates (case 5)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects malformed or mismatched options before returning templates (case 5)"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rejects malformed or mismatched options before returning templates (case 6)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects malformed or mismatched options before returning templates (case 6)"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rejects malformed or mismatched options before returning templates (case 7)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects malformed or mismatched options before returning templates (case 7)"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rejects malformed or mismatched options before returning templates (case 8)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects malformed or mismatched options before returning templates (case 8)"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"rejects unknown presets, unsupported list types and unsupported chain filters","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"rejects unknown presets, unsupported list types and unsupported chain filters"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"produces separate pinned alternatives for multiple spenders","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"produces separate pinned alternatives for multiple spenders"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"enforces the 32-call ceiling including generated approvals","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"enforces the 32-call ceiling including generated approvals"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"requires full signatures and rejects duplicate function entries","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"requires full signatures and rejects duplicate function entries"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"compiles preset spender and amount pins with the deployed v6 policy","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"compiles preset spender and amount pins with the deployed v6 policy"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"keeps OR alternatives EVM-only: repeated Solana instructions are refused","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"keeps OR alternatives EVM-only: repeated Solana instructions are refused"}],"endTime":1792494876707,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/presets.spec.ts","startTime":1792494876426,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["resolveWrapperToSource"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolveWrapperToSource resolves a registered wrapper to its Push source","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"resolves a registered wrapper to its Push source"},{"ancestorTitles":["resolveWrapperToSource"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"resolveWrapperToSource rejects an unknown wrapper","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects an unknown wrapper"},{"ancestorTitles":["resolveWrapperToSource"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolveWrapperToSource rejects when forward and reverse registry lookups disagree","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects when forward and reverse registry lookups disagree"},{"ancestorTitles":["resolveWrapperToSource"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolveWrapperToSource rejects a wrapper that is not registered on the supplied chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a wrapper that is not registered on the supplied chain"},{"ancestorTitles":["resolveWrapperToSource"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"resolveWrapperToSource caches positive results and does not re-read","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"caches positive results and does not re-read"},{"ancestorTitles":["resolveWrapperToSource"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolveWrapperToSource can bypass a positive cache entry for prepared-transaction revalidation","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"can bypass a positive cache entry for prepared-transaction revalidation"},{"ancestorTitles":["resolveWrapperToSource"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"resolveWrapperToSource does not cache negative results","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"does not cache negative results"},{"ancestorTitles":["resolveWrapperToSource"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"resolveWrapperToSource stays within the cold round-trip budget","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"stays within the cold round-trip budget"},{"ancestorTitles":["resolveWrapperToSource"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolveWrapperToSource stays within the warm round-trip budget","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"stays within the warm round-trip budget"},{"ancestorTitles":["readPushPC20Metadata"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"readPushPC20Metadata accepts a plain ERC-20 with standard metadata and no custom PC20 method","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts a plain ERC-20 with standard metadata and no custom PC20 method"},{"ancestorTitles":["readPushPC20Metadata"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"readPushPC20Metadata rejects a token whose name() metadata read fails","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a token whose name() metadata read fails"},{"ancestorTitles":["readPushPC20Metadata"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"readPushPC20Metadata rejects a token whose symbol() metadata read fails","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a token whose symbol() metadata read fails"},{"ancestorTitles":["readPushPC20Metadata"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"readPushPC20Metadata rejects a token whose decimals() metadata read fails","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a token whose decimals() metadata read fails"},{"ancestorTitles":["readPushPC20Metadata"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"readPushPC20Metadata rejects a token with no ERC-20 metadata surface","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a token with no ERC-20 metadata surface"},{"ancestorTitles":["readPushPC20Metadata"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"readPushPC20Metadata rejects a metadata-compatible synthetic PRC20 with a distinct error","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects a metadata-compatible synthetic PRC20 with a distinct error"},{"ancestorTitles":["readPushPC20Metadata"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"readPushPC20Metadata rejects empty name or symbol","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects empty name or symbol"},{"ancestorTitles":["readPushPC20Metadata"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"readPushPC20Metadata rejects decimals outside the uint8 range","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects decimals outside the uint8 range"},{"ancestorTitles":["readPushPC20Metadata"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"readPushPC20Metadata rejects an address with no deployed bytecode","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects an address with no deployed bytecode"},{"ancestorTitles":["listPC20Deployments"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"listPC20Deployments returns only confirmed deployments","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"returns only confirmed deployments"},{"ancestorTitles":["listPC20Deployments"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"listPC20Deployments issues exactly one batched round trip regardless of chain count","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"issues exactly one batched round trip regardless of chain count"},{"ancestorTitles":["listPC20Deployments"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"listPC20Deployments returns an empty list rather than throwing for a never-exported token","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns an empty list rather than throwing for a never-exported token"},{"ancestorTitles":["discoverPC20Chain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"discoverPC20Chain short-circuits on a Push-native address without probing the registry","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"short-circuits on a Push-native address without probing the registry"},{"ancestorTitles":["discoverPC20Chain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"discoverPC20Chain finds the chain a wrapper is registered on","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"finds the chain a wrapper is registered on"},{"ancestorTitles":["discoverPC20Chain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"discoverPC20Chain returns null when no chain claims the address","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns null when no chain claims the address"},{"ancestorTitles":["discoverPC20Chain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"discoverPC20Chain accepts the same address on several chains when they agree","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts the same address on several chains when they agree"},{"ancestorTitles":["discoverPC20Chain"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"discoverPC20Chain throws rather than guessing when chains disagree on the source","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws rather than guessing when chains disagree on the source"},{"ancestorTitles":["discoverPC20Chain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"discoverPC20Chain narrows by address format so a hex address never probes SVM chains","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"narrows by address format so a hex address never probes SVM chains"},{"ancestorTitles":["resolvePC20Token"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolvePC20Token resolves an external wrapper as an import","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"resolves an external wrapper as an import"},{"ancestorTitles":["resolvePC20Token"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolvePC20Token resolves a Push-native token as an export","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"resolves a Push-native token as an export"},{"ancestorTitles":["resolvePC20Token"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolvePC20Token never infers identity from symbol","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"never infers identity from symbol"}],"endTime":1792494876853,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/__tests__/resolver.spec.ts","startTime":1792494876709,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend validates explicit wire accounts for dataless instructions","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"validates explicit wire accounts for dataless instructions"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend validates explicit wire accounts for non-anchor instructions","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"validates explicit wire accounts for non-anchor instructions"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend validates explicit wire accounts for wrong-account instructions","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"validates explicit wire accounts for wrong-account instructions"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend resolves output mint Token-2022 ownership, rejecting a wrong supplied program: false","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"resolves output mint Token-2022 ownership, rejecting a wrong supplied program: false"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend resolves output mint Token-2022 ownership, rejecting a wrong supplied program: true","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"resolves output mint Token-2022 ownership, rejecting a wrong supplied program: true"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend reads initialized mint owner TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA length 82","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"reads initialized mint owner TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA length 82"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend reads initialized mint owner TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb length 82","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"reads initialized mint owner TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb length 82"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend reads initialized mint owner TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb length 166","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"reads initialized mint owner TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb length 166"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend rejects wrong cluster RPCs and falls back to the configured correct cluster","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects wrong cluster RPCs and falls back to the configured correct cluster"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend rejects missing as a mint","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects missing as a mint"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend rejects executable as a mint","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects executable as a mint"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend rejects token-account as a mint","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects token-account as a mint"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend rejects uninitialized as a mint","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects uninitialized as a mint"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend rejects wrong-owner as a mint","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects wrong-owner as a mint"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend requires a configured gateway/RPC, rather than choosing a devnet default","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"requires a configured gateway/RPC, rather than choosing a devnet default"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend pins all PRC20 reads and rejects a source-chain mismatch","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"pins all PRC20 reads and rejects a source-chain mismatch"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend rejects registry and mint substitution","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects registry and mint substitution"},{"ancestorTitles":["SVM metadata and resolved instruction backend"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"SVM metadata and resolved instruction backend derives the wallet authority for IDL accounts, not the signer/default gateway authority","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"derives the wallet authority for IDL accounts, not the signer/default gateway authority"}],"endTime":1792494877140,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/svm-backend.spec.ts","startTime":1792494876856,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["scenario S-A — INBOUND_FROM_EOA — Sepolia EOA sends FUNDS"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-A — INBOUND_FROM_EOA — Sepolia EOA sends FUNDS classify() picks the expected primary kind","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classify() picks the expected primary kind"},{"ancestorTitles":["scenario S-A — INBOUND_FROM_EOA — Sepolia EOA sends FUNDS"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-A — INBOUND_FROM_EOA — Sepolia EOA sends FUNDS classifyAll() yields the expected per-log kinds","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classifyAll() yields the expected per-log kinds"},{"ancestorTitles":["scenario S-A — INBOUND_FROM_EOA — Sepolia EOA sends FUNDS"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-A — INBOUND_FROM_EOA — Sepolia EOA sends FUNDS classify() decodes expected identifiers","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classify() decodes expected identifiers"},{"ancestorTitles":["scenario S-C — INBOUND_FROM_CEA — Sepolia CEA round-trip"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-C — INBOUND_FROM_CEA — Sepolia CEA round-trip classify() picks the expected primary kind","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classify() picks the expected primary kind"},{"ancestorTitles":["scenario S-C — INBOUND_FROM_CEA — Sepolia CEA round-trip"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-C — INBOUND_FROM_CEA — Sepolia CEA round-trip classifyAll() yields the expected per-log kinds","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classifyAll() yields the expected per-log kinds"},{"ancestorTitles":["scenario S-C — INBOUND_FROM_CEA — Sepolia CEA round-trip"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-C — INBOUND_FROM_CEA — Sepolia CEA round-trip classify() decodes expected identifiers","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"classify() decodes expected identifiers"},{"ancestorTitles":["scenario S-D — OUTBOUND_INITIATED — Push root with one OBSERVED outbound to BSC"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-D — OUTBOUND_INITIATED — Push root with one OBSERVED outbound to BSC classify() picks the expected primary kind","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classify() picks the expected primary kind"},{"ancestorTitles":["scenario S-D — OUTBOUND_INITIATED — Push root with one OBSERVED outbound to BSC"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-D — OUTBOUND_INITIATED — Push root with one OBSERVED outbound to BSC classifyAll() yields the expected per-log kinds","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classifyAll() yields the expected per-log kinds"},{"ancestorTitles":["scenario S-D — OUTBOUND_INITIATED — Push root with one OBSERVED outbound to BSC"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-D — OUTBOUND_INITIATED — Push root with one OBSERVED outbound to BSC classify() decodes expected identifiers","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"classify() decodes expected identifiers"},{"ancestorTitles":["scenario S-E — OUTBOUND_FINALIZED — Sepolia Vault finalize"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-E — OUTBOUND_FINALIZED — Sepolia Vault finalize classify() picks the expected primary kind","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classify() picks the expected primary kind"},{"ancestorTitles":["scenario S-E — OUTBOUND_FINALIZED — Sepolia Vault finalize"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-E — OUTBOUND_FINALIZED — Sepolia Vault finalize classifyAll() yields the expected per-log kinds","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classifyAll() yields the expected per-log kinds"},{"ancestorTitles":["scenario S-E — OUTBOUND_FINALIZED — Sepolia Vault finalize"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-E — OUTBOUND_FINALIZED — Sepolia Vault finalize classify() decodes expected identifiers","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classify() decodes expected identifiers"},{"ancestorTitles":["scenario S-F — OUTBOUND_REVERTED — BSC Vault emitted UniversalTxReverted"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-F — OUTBOUND_REVERTED — BSC Vault emitted UniversalTxReverted classify() picks the expected primary kind","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classify() picks the expected primary kind"},{"ancestorTitles":["scenario S-F — OUTBOUND_REVERTED — BSC Vault emitted UniversalTxReverted"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-F — OUTBOUND_REVERTED — BSC Vault emitted UniversalTxReverted classifyAll() yields the expected per-log kinds","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classifyAll() yields the expected per-log kinds"},{"ancestorTitles":["scenario S-F — OUTBOUND_REVERTED — BSC Vault emitted UniversalTxReverted"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-F — OUTBOUND_REVERTED — BSC Vault emitted UniversalTxReverted classify() decodes expected identifiers","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classify() decodes expected identifiers"},{"ancestorTitles":["scenario S-G — INBOUND_REVERTED — Sepolia RevertUniversalTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-G — INBOUND_REVERTED — Sepolia RevertUniversalTx classify() picks the expected primary kind","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classify() picks the expected primary kind"},{"ancestorTitles":["scenario S-G — INBOUND_REVERTED — Sepolia RevertUniversalTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-G — INBOUND_REVERTED — Sepolia RevertUniversalTx classifyAll() yields the expected per-log kinds","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classifyAll() yields the expected per-log kinds"},{"ancestorTitles":["scenario S-G — INBOUND_REVERTED — Sepolia RevertUniversalTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-G — INBOUND_REVERTED — Sepolia RevertUniversalTx classify() decodes expected identifiers","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classify() decodes expected identifiers"},{"ancestorTitles":["scenario S-H — EXECUTED_ON_DEST — Destination payload executed"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-H — EXECUTED_ON_DEST — Destination payload executed classify() picks the expected primary kind","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classify() picks the expected primary kind"},{"ancestorTitles":["scenario S-H — EXECUTED_ON_DEST — Destination payload executed"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-H — EXECUTED_ON_DEST — Destination payload executed classifyAll() yields the expected per-log kinds","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classifyAll() yields the expected per-log kinds"},{"ancestorTitles":["scenario S-H — EXECUTED_ON_DEST — Destination payload executed"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-H — EXECUTED_ON_DEST — Destination payload executed classify() decodes expected identifiers","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classify() decodes expected identifiers"},{"ancestorTitles":["scenario S-I — RESCUED_FUNDS — Vault-side FundsRescued"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-I — RESCUED_FUNDS — Vault-side FundsRescued classify() picks the expected primary kind","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classify() picks the expected primary kind"},{"ancestorTitles":["scenario S-I — RESCUED_FUNDS — Vault-side FundsRescued"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-I — RESCUED_FUNDS — Vault-side FundsRescued classifyAll() yields the expected per-log kinds","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classifyAll() yields the expected per-log kinds"},{"ancestorTitles":["scenario S-I — RESCUED_FUNDS — Vault-side FundsRescued"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-I — RESCUED_FUNDS — Vault-side FundsRescued classify() decodes expected identifiers","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"classify() decodes expected identifiers"},{"ancestorTitles":["scenario S-J — UNKNOWN — receipt with no universal-tx events"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-J — UNKNOWN — receipt with no universal-tx events classify() picks the expected primary kind","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classify() picks the expected primary kind"},{"ancestorTitles":["scenario S-J — UNKNOWN — receipt with no universal-tx events"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-J — UNKNOWN — receipt with no universal-tx events classifyAll() yields the expected per-log kinds","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classifyAll() yields the expected per-log kinds"},{"ancestorTitles":["scenario S-K — PENDING outbound — Push root, outbound not yet observed"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-K — PENDING outbound — Push root, outbound not yet observed classify() picks the expected primary kind","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classify() picks the expected primary kind"},{"ancestorTitles":["scenario S-L — UNKNOWN + no utx record — cascade root resolves with zero children"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-L — UNKNOWN + no utx record — cascade root resolves with zero children classify() picks the expected primary kind","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classify() picks the expected primary kind"},{"ancestorTitles":["scenario S-L — UNKNOWN + no utx record — cascade root resolves with zero children"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-L — UNKNOWN + no utx record — cascade root resolves with zero children classifyAll() yields the expected per-log kinds","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classifyAll() yields the expected per-log kinds"},{"ancestorTitles":["scenario S-M — Mixed-destination fan-out — BSC + Sepolia + Solana"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-M — Mixed-destination fan-out — BSC + Sepolia + Solana classify() picks the expected primary kind","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classify() picks the expected primary kind"},{"ancestorTitles":["scenario S-N — Fan-out delivered + reverted — dual pc-refund/pc-revert edges"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-N — Fan-out delivered + reverted — dual pc-refund/pc-revert edges classify() picks the expected primary kind","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classify() picks the expected primary kind"},{"ancestorTitles":["scenario S-O — SVM CEA payload-only self-call — GasAndPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-O — SVM CEA payload-only self-call — GasAndPayload classify() picks the expected primary kind","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classify() picks the expected primary kind"},{"ancestorTitles":["scenario S-O — SVM CEA payload-only self-call — GasAndPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-O — SVM CEA payload-only self-call — GasAndPayload classifyAll() yields the expected per-log kinds","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classifyAll() yields the expected per-log kinds"},{"ancestorTitles":["scenario S-O — SVM CEA payload-only self-call — GasAndPayload"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"scenario S-O — SVM CEA payload-only self-call — GasAndPayload classify() decodes expected identifiers","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"classify() decodes expected identifiers"},{"ancestorTitles":["cascade scenario S-D — OUTBOUND_INITIATED — Push root with one OBSERVED outbound to BSC"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"cascade scenario S-D — OUTBOUND_INITIATED — Push root with one OBSERVED outbound to BSC walker resolves expected shape","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"walker resolves expected shape"},{"ancestorTitles":["cascade scenario S-K — PENDING outbound — Push root, outbound not yet observed"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"cascade scenario S-K — PENDING outbound — Push root, outbound not yet observed walker resolves expected shape","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"walker resolves expected shape"},{"ancestorTitles":["cascade scenario S-L — UNKNOWN + no utx record — cascade root resolves with zero children"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"cascade scenario S-L — UNKNOWN + no utx record — cascade root resolves with zero children walker resolves expected shape","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"walker resolves expected shape"},{"ancestorTitles":["cascade scenario S-M — Mixed-destination fan-out — BSC + Sepolia + Solana"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"cascade scenario S-M — Mixed-destination fan-out — BSC + Sepolia + Solana walker resolves expected shape","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"walker resolves expected shape"},{"ancestorTitles":["cascade scenario S-N — Fan-out delivered + reverted — dual pc-refund/pc-revert edges"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"cascade scenario S-N — Fan-out delivered + reverted — dual pc-refund/pc-revert edges walker resolves expected shape","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"walker resolves expected shape"}],"endTime":1792494877376,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/scenarios.spec.ts","startTime":1792494877146,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["svm-rent — derivations"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"svm-rent — derivations deriveSvmCeaPda is deterministic for a given EVM address","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"deriveSvmCeaPda is deterministic for a given EVM address"},{"ancestorTitles":["svm-rent — derivations"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"svm-rent — derivations deriveAtaPubkey matches the standard SPL ATA derivation","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"deriveAtaPubkey matches the standard SPL ATA derivation"},{"ancestorTitles":["getSvmFinalizeGasBudget"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getSvmFinalizeGasBudget returns base finalize budget for native SOL / payload-only SVM outbounds","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns base finalize budget for native SOL / payload-only SVM outbounds"},{"ancestorTitles":["getSvmFinalizeGasBudget"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"getSvmFinalizeGasBudget includes CEA ATA rent when an SPL outbound ATA does not exist yet","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"includes CEA ATA rent when an SPL outbound ATA does not exist yet"},{"ancestorTitles":["getSvmFinalizeGasBudget"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"getSvmFinalizeGasBudget does not include CEA ATA rent when the SPL outbound ATA already exists","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not include CEA ATA rent when the SPL outbound ATA already exists"},{"ancestorTitles":["getSvmFinalizeGasBudget"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getSvmFinalizeGasBudget falls back to protocol rent constants on RPC failure","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"falls back to protocol rent constants on RPC failure"},{"ancestorTitles":["getSvmFinalizeGasBudget"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getSvmFinalizeGasBudget rounds required gas fee up to the next whole gasLimit unit","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rounds required gas fee up to the next whole gasLimit unit"},{"ancestorTitles":["maybeBumpForCeaAtaRent"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"maybeBumpForCeaAtaRent returns input unchanged when burnAmount is 0 (native SOL outbound)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns input unchanged when burnAmount is 0 (native SOL outbound)"},{"ancestorTitles":["maybeBumpForCeaAtaRent"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"maybeBumpForCeaAtaRent returns input unchanged when splMintBase58 is undefined","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns input unchanged when splMintBase58 is undefined"},{"ancestorTitles":["maybeBumpForCeaAtaRent"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"maybeBumpForCeaAtaRent bumps effectiveGasLimit by CEA_ATA_RENT_LAMPORTS_BUMP when ATA does not exist","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"bumps effectiveGasLimit by CEA_ATA_RENT_LAMPORTS_BUMP when ATA does not exist"},{"ancestorTitles":["maybeBumpForCeaAtaRent"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"maybeBumpForCeaAtaRent does not bump when ATA already exists with non-empty data","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not bump when ATA already exists with non-empty data"},{"ancestorTitles":["maybeBumpForCeaAtaRent"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"maybeBumpForCeaAtaRent returns input unchanged on RPC failure (logs warning, does not throw)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns input unchanged on RPC failure (logs warning, does not throw)"},{"ancestorTitles":["maybeBumpForCeaAtaRent"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"maybeBumpForCeaAtaRent falls back to CHAIN_INFO defaultRPC when ctx.rpcUrls is empty","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"falls back to CHAIN_INFO defaultRPC when ctx.rpcUrls is empty"},{"ancestorTitles":["maybeBumpForCeaAtaRent"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"maybeBumpForCeaAtaRent CEA_ATA_RENT_LAMPORTS_BUMP equals 3_090_840 (gateway finalize budget with ATA)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"CEA_ATA_RENT_LAMPORTS_BUMP equals 3_090_840 (gateway finalize budget with ATA)"}],"endTime":1792494877511,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/svm-rent.spec.ts","startTime":1792494877380,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["buildPayloadForRoute — EVM Route 3 native Push EOA"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildPayloadForRoute — EVM Route 3 native Push EOA uses the supplied native-EOA nonce without probing delegated code","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"uses the supplied native-EOA nonce without probing delegated code"},{"ancestorTitles":["floorR3NativeValueForGas"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"floorR3NativeValueForGas raises the USD-sized value to the live buffered pool requirement","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"raises the USD-sized value to the live buffered pool requirement"},{"ancestorTitles":["floorR3NativeValueForGas"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"floorR3NativeValueForGas preserves a larger category value and includes native protocol fees","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"preserves a larger category value and includes native protocol fees"}],"endTime":1792494877645,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/route-handlers-evm-r3-native-eoa.spec.ts","startTime":1792494877513,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["toGatewayRequestV1"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"toGatewayRequestV1 should flatten revertInstruction to revertRecipient","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should flatten revertInstruction to revertRecipient"},{"ancestorTitles":["toGatewayRequestV1"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"toGatewayRequestV1 should preserve recipient, token, amount, payload, signatureData","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should preserve recipient, token, amount, payload, signatureData"},{"ancestorTitles":["toGatewayRequestV1"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"toGatewayRequestV1 should produce exactly 6 keys in the V1 output","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should produce exactly 6 keys in the V1 output"},{"ancestorTitles":["toGatewayRequestV1"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"toGatewayRequestV1 should handle zero amount","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle zero amount"},{"ancestorTitles":["toGatewayRequestV1"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"toGatewayRequestV1 should handle empty payload","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle empty payload"},{"ancestorTitles":["toGatewayTokenRequestV1"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"toGatewayTokenRequestV1 should flatten revertInstruction to revertRecipient","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should flatten revertInstruction to revertRecipient"},{"ancestorTitles":["toGatewayTokenRequestV1"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"toGatewayTokenRequestV1 should preserve all token-specific fields","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should preserve all token-specific fields"},{"ancestorTitles":["toGatewayTokenRequestV1"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"toGatewayTokenRequestV1 should preserve base fields","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should preserve base fields"},{"ancestorTitles":["toGatewayTokenRequestV1"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"toGatewayTokenRequestV1 should produce exactly 10 keys in the V1 output","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should produce exactly 10 keys in the V1 output"},{"ancestorTitles":["toGatewayTokenRequestV1"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"toGatewayTokenRequestV1 should handle zero gasAmount and amountOutMinETH","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle zero gasAmount and amountOutMinETH"},{"ancestorTitles":["computeUEAOffchain"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeUEAOffchain should return a 0x-prefixed address for EVM signer","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return a 0x-prefixed address for EVM signer"},{"ancestorTitles":["computeUEAOffchain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"computeUEAOffchain should produce deterministic output for same inputs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should produce deterministic output for same inputs"},{"ancestorTitles":["computeUEAOffchain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"computeUEAOffchain should produce different addresses for different signer addresses","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should produce different addresses for different signer addresses"},{"ancestorTitles":["computeUEAOffchain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"computeUEAOffchain should produce different addresses for different chains","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should produce different addresses for different chains"},{"ancestorTitles":["computeUEAOffchain"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"computeUEAOffchain should return the raw signer address for Push Chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return the raw signer address for Push Chain"},{"ancestorTitles":["computeUEAOffchain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"computeUEAOffchain should use the UEA_PROXY for the current pushNetwork in minimal proxy code","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should use the UEA_PROXY for the current pushNetwork in minimal proxy code"},{"ancestorTitles":["getUeaNonceForExecution"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getUeaNonceForExecution should not probe EIP-7702 delegation code for a native Push EOA","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should not probe EIP-7702 delegation code for a native Push EOA"},{"ancestorTitles":["getUeaNonceForExecution"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getUeaNonceForExecution should return 0 when UEA is not deployed (no code)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return 0 when UEA is not deployed (no code)"},{"ancestorTitles":["getUeaNonceForExecution"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getUeaNonceForExecution should query nonce from contract when UEA is deployed","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should query nonce from contract when UEA is deployed"},{"ancestorTitles":["getUeaNonceForExecution"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"getUeaNonceForExecution should call getCode with the computed UEA address","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should call getCode with the computed UEA address"},{"ancestorTitles":["getUeaNonceForExecution"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getUeaNonceForExecution should call readContract with nonce function when deployed","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should call readContract with nonce function when deployed"},{"ancestorTitles":["getUeaStatusAndNonce"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getUeaStatusAndNonce should classify an EIP-7702 delegated native Push account as an EOA","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should classify an EIP-7702 delegated native Push account as an EOA"},{"ancestorTitles":["getUeaStatusAndNonce"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getUeaStatusAndNonce should return deployed=false, nonce=0 when no code exists","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return deployed=false, nonce=0 when no code exists"},{"ancestorTitles":["getUeaStatusAndNonce"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"getUeaStatusAndNonce should return deployed=true with on-chain nonce when code exists","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return deployed=true with on-chain nonce when code exists"},{"ancestorTitles":["getUeaStatusAndNonce"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getUeaStatusAndNonce should not call readContract when UEA is not deployed","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should not call readContract when UEA is not deployed"},{"ancestorTitles":["getUEANonce"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getUEANonce should use no UEA nonce for a native Push EOA","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should use no UEA nonce for a native Push EOA"},{"ancestorTitles":["getAccountStatus"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getAccountStatus should skip UEA lifecycle checks for an EIP-7702 native Push EOA","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should skip UEA lifecycle checks for an EIP-7702 native Push EOA"},{"ancestorTitles":["getAccountStatus"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"getAccountStatus should return cached status on second call","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should return cached status on second call"},{"ancestorTitles":["getAccountStatus"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getAccountStatus should bypass cache when forceRefresh is true","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should bypass cache when forceRefresh is true"},{"ancestorTitles":["getAccountStatus"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getAccountStatus should set mode to signer","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should set mode to signer"},{"ancestorTitles":["getAccountStatus"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getAccountStatus should return deployed=false with empty versions when UEA not deployed","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should return deployed=false with empty versions when UEA not deployed"},{"ancestorTitles":["getAccountStatus"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getAccountStatus should fetch versions when UEA is deployed","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should fetch versions when UEA is deployed"},{"ancestorTitles":["getAccountStatus"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"getAccountStatus should set requiresUpgrade=false when versions match","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should set requiresUpgrade=false when versions match"},{"ancestorTitles":["getAccountStatus"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getAccountStatus should persist status to ctx.accountStatusCache","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should persist status to ctx.accountStatusCache"},{"ancestorTitles":["fetchLatestUEAVersion"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"fetchLatestUEAVersion should call readContract with UEA_VERSION and keccak256 of VM string","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should call readContract with UEA_VERSION and keccak256 of VM string"},{"ancestorTitles":["fetchLatestUEAVersion"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"fetchLatestUEAVersion should return empty string when readContract throws","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return empty string when readContract throws"},{"ancestorTitles":["fetchLatestUEAVersion"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"fetchLatestUEAVersion should return empty string when factory address is 0xTBD","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return empty string when factory address is 0xTBD"},{"ancestorTitles":["fetchLatestUEAVersion"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"fetchLatestUEAVersion should work for SVM vm type","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should work for SVM vm type"},{"ancestorTitles":["migrateCEA"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"migrateCEA should throw \"Cannot migrate CEA on Push Chain\" for Push Chain","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should throw \"Cannot migrate CEA on Push Chain\" for Push Chain"},{"ancestorTitles":["migrateCEA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"migrateCEA should throw \"Cannot migrate CEA on Push Chain\" for Push Localnet","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw \"Cannot migrate CEA on Push Chain\" for Push Localnet"},{"ancestorTitles":["migrateCEA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"migrateCEA should throw when chain does not support CEA","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw when chain does not support CEA"},{"ancestorTitles":["migrateCEA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"migrateCEA should throw when CEA is not deployed on the target chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw when CEA is not deployed on the target chain"},{"ancestorTitles":["migrateCEA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"migrateCEA should call executeFn with cea address and migration flag when valid","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should call executeFn with cea address and migration flag when valid"},{"ancestorTitles":["migrateCEA"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"migrateCEA should call getCEAAddress with computed UEA and chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should call getCEAAddress with computed UEA and chain"}],"endTime":1792494877787,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/gateway-uea-account.spec.ts","startTime":1792494877648,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["PC20 export payload"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PC20 export payload starts with exactly the PC20 selector","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"starts with exactly the PC20 selector"},{"ancestorTitles":["PC20 export payload"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"PC20 export payload encodes the metadata tuple exactly","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"encodes the metadata tuple exactly"},{"ancestorTitles":["PC20 export payload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 export payload appends destination user data verbatim after the metadata","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"appends destination user data verbatim after the metadata"},{"ancestorTitles":["PC20 export payload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 export payload produces an identical payload when user data is empty or omitted","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"produces an identical payload when user data is empty or omitted"},{"ancestorTitles":["PC20 export payload"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"PC20 export payload rejects an unsupported destination chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects an unsupported destination chain"},{"ancestorTitles":["PC20 metadata factory limits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 metadata factory limits accepts metadata at the limit","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts metadata at the limit"},{"ancestorTitles":["PC20 metadata factory limits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 metadata factory limits rejects an over-long name","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects an over-long name"},{"ancestorTitles":["PC20 metadata factory limits"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PC20 metadata factory limits rejects an over-long symbol","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects an over-long symbol"},{"ancestorTitles":["PC20 metadata factory limits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 metadata factory limits measures bytes, not characters","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"measures bytes, not characters"},{"ancestorTitles":["PC20 metadata factory limits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 metadata factory limits rejects empty name or symbol","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects empty name or symbol"},{"ancestorTitles":["PC20 metadata factory limits"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 metadata factory limits pins the limits to the reference PC20Factory constants","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"pins the limits to the reference PC20Factory constants"},{"ancestorTitles":["PC20 export gas quote"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PC20 export gas quote re-quotes and returns a destination gas limit that includes wrapper deployment","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"re-quotes and returns a destination gas limit that includes wrapper deployment"},{"ancestorTitles":["PC20 export gas quote"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 export gas quote leaves Solana requoting to the rent and compute-budget path","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"leaves Solana requoting to the rent and compute-budget path"}],"endTime":1792494878045,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/__tests__/export.spec.ts","startTime":1792494877789,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["traceUniversalTxCascade"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"traceUniversalTxCascade builds cascade: Push root → (outbound → Sepolia → child-inbound → follow-up) + (pc-refund → Push refund)","invocations":1,"location":null,"numPassingAsserts":11,"retryReasons":[],"status":"passed","title":"builds cascade: Push root → (outbound → Sepolia → child-inbound → follow-up) + (pc-refund → Push refund)"},{"ancestorTitles":["traceUniversalTxCascade"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"traceUniversalTxCascade flattenCascade returns nodes depth-first","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"flattenCascade returns nodes depth-first"},{"ancestorTitles":["traceUniversalTxCascade"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"traceUniversalTxCascade respects maxDepth","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"respects maxDepth"},{"ancestorTitles":["traceUniversalTxCascade"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"traceUniversalTxCascade cycle-safe: revisiting a node does not recurse","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"cycle-safe: revisiting a node does not recurse"},{"ancestorTitles":["traceUniversalTxCascade"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"traceUniversalTxCascade onNode callback fires per resolved node","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"onNode callback fires per resolved node"}],"endTime":1792494878184,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/cascade.spec.ts","startTime":1792494878048,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["rescueFunds","universalTxId validation"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds universalTxId validation should reject empty string","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should reject empty string"},{"ancestorTitles":["rescueFunds","universalTxId validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds universalTxId validation should reject id without 0x prefix","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should reject id without 0x prefix"},{"ancestorTitles":["rescueFunds","universalTxId validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds universalTxId validation should reject id that is too short (< 66 chars)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should reject id that is too short (< 66 chars)"},{"ancestorTitles":["rescueFunds","universalTxId validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds universalTxId validation should reject id that is too long (> 66 chars)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should reject id that is too long (> 66 chars)"},{"ancestorTitles":["rescueFunds","universalTxId validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds universalTxId validation should reject id with non-hex characters","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should reject id with non-hex characters"},{"ancestorTitles":["rescueFunds","universalTxId validation"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds universalTxId validation should reject undefined/null universalTxId","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should reject undefined/null universalTxId"},{"ancestorTitles":["rescueFunds","prc20 validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds prc20 validation should reject zero address prc20","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should reject zero address prc20"},{"ancestorTitles":["rescueFunds","prc20 validation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds prc20 validation should reject empty/undefined prc20","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should reject empty/undefined prc20"},{"ancestorTitles":["rescueFunds","gas fee query failure"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds gas fee query failure should propagate queryRescueGasFee errors","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should propagate queryRescueGasFee errors"},{"ancestorTitles":["rescueFunds","nativeValueForGas balance capping"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds nativeValueForGas balance capping should cap at EVM_NATIVE_VALUE_TARGET when balance > target + reserve","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should cap at EVM_NATIVE_VALUE_TARGET when balance > target + reserve"},{"ancestorTitles":["rescueFunds","nativeValueForGas balance capping"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds nativeValueForGas balance capping should use balance - reserve when balance <= target + reserve but > reserve","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should use balance - reserve when balance <= target + reserve but > reserve"},{"ancestorTitles":["rescueFunds","nativeValueForGas balance capping"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds nativeValueForGas balance capping should fall back to nativeValueForGas when balance <= reserve","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should fall back to nativeValueForGas when balance <= reserve"},{"ancestorTitles":["rescueFunds","ExecuteParams construction"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds ExecuteParams construction should call executeFn with correctly structured params","invocations":1,"location":null,"numPassingAsserts":10,"retryReasons":[],"status":"passed","title":"should call executeFn with correctly structured params"},{"ancestorTitles":["rescueFunds","ExecuteParams construction"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds ExecuteParams construction should set isDeployed=false and nonce=0 when UEA has no code","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should set isDeployed=false and nonce=0 when UEA has no code"},{"ancestorTitles":["rescueFunds","ExecuteParams construction"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"rescueFunds ExecuteParams construction should return the result of executeFn","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return the result of executeFn"},{"ancestorTitles":["buildSvmUniversalTxRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmUniversalTxRequest should convert hex payload (0x-prefixed) to Buffer","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should convert hex payload (0x-prefixed) to Buffer"},{"ancestorTitles":["buildSvmUniversalTxRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmUniversalTxRequest should handle empty hex payload (0x)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle empty hex payload (0x)"},{"ancestorTitles":["buildSvmUniversalTxRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmUniversalTxRequest should handle odd-length hex payload by zero-padding","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should handle odd-length hex payload by zero-padding"},{"ancestorTitles":["buildSvmUniversalTxRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmUniversalTxRequest should convert Uint8Array payload to Buffer","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should convert Uint8Array payload to Buffer"},{"ancestorTitles":["buildSvmUniversalTxRequest"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmUniversalTxRequest should handle hex signatureData","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should handle hex signatureData"},{"ancestorTitles":["buildSvmUniversalTxRequest"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmUniversalTxRequest should produce empty signatureData buffer when undefined","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should produce empty signatureData buffer when undefined"},{"ancestorTitles":["buildSvmUniversalTxRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmUniversalTxRequest should handle empty hex signatureData (0x)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle empty hex signatureData (0x)"},{"ancestorTitles":["buildSvmUniversalTxRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmUniversalTxRequest should handle Uint8Array signatureData","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle Uint8Array signatureData"},{"ancestorTitles":["buildSvmUniversalTxRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmUniversalTxRequest should pass through recipient, token, amount, revertRecipient","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should pass through recipient, token, amount, revertRecipient"},{"ancestorTitles":["buildSvmUniversalTxRequestFromReq"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmUniversalTxRequestFromReq should extract first 20 bytes of recipient as number array","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should extract first 20 bytes of recipient as number array"},{"ancestorTitles":["buildSvmUniversalTxRequestFromReq"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmUniversalTxRequestFromReq should map zero address token to PublicKey.default","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should map zero address token to PublicKey.default"},{"ancestorTitles":["buildSvmUniversalTxRequestFromReq"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmUniversalTxRequestFromReq should convert 0x-prefixed token to a 32-byte PublicKey (zero-padded at left)","invocations":1,"location":null,"numPassingAsserts":13,"retryReasons":[],"status":"passed","title":"should convert 0x-prefixed token to a 32-byte PublicKey (zero-padded at left)"},{"ancestorTitles":["buildSvmUniversalTxRequestFromReq"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmUniversalTxRequestFromReq should throw for non-0x, non-special token format","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw for non-0x, non-special token format"},{"ancestorTitles":["buildSvmUniversalTxRequestFromReq"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmUniversalTxRequestFromReq should use signatureDataOverride when provided","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should use signatureDataOverride when provided"},{"ancestorTitles":["getSvmGatewayLogIndexFromTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getSvmGatewayLogIndexFromTx should return 0 when no logs exist","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should return 0 when no logs exist"},{"ancestorTitles":["getSvmGatewayLogIndexFromTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getSvmGatewayLogIndexFromTx should return 0 when no matching discriminator found","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return 0 when no matching discriminator found"},{"ancestorTitles":["getSvmGatewayLogIndexFromTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getSvmGatewayLogIndexFromTx should return index of first match when only one match exists","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return index of first match when only one match exists"},{"ancestorTitles":["getSvmGatewayLogIndexFromTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getSvmGatewayLogIndexFromTx should return index of second match when two matches exist","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return index of second match when two matches exist"},{"ancestorTitles":["getSvmGatewayLogIndexFromTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getSvmGatewayLogIndexFromTx should ignore log lines without \"Program data: \" prefix","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should ignore log lines without \"Program data: \" prefix"},{"ancestorTitles":["getSvmGatewayLogIndexFromTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getSvmGatewayLogIndexFromTx should skip entries with invalid base64","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should skip entries with invalid base64"},{"ancestorTitles":["getSvmGatewayLogIndexFromTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"getSvmGatewayLogIndexFromTx should skip entries where decoded data is less than 8 bytes","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should skip entries where decoded data is less than 8 bytes"},{"ancestorTitles":["waitForLockerFeeConfirmation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"waitForLockerFeeConfirmation should dispatch to EVM path (construct EvmClient) for EVM chain","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should dispatch to EVM path (construct EvmClient) for EVM chain"},{"ancestorTitles":["waitForLockerFeeConfirmation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"waitForLockerFeeConfirmation should dispatch to SVM path (construct SvmClient) for SVM chain","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should dispatch to SVM path (construct SvmClient) for SVM chain"},{"ancestorTitles":["waitForLockerFeeConfirmation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"waitForLockerFeeConfirmation should use custom rpcUrls from context over defaults","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should use custom rpcUrls from context over defaults"},{"ancestorTitles":["waitForLockerFeeConfirmation"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"waitForLockerFeeConfirmation should throw for unsupported VM type","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw for unsupported VM type"},{"ancestorTitles":["waitForEvmConfirmationsWithCountdown"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"waitForEvmConfirmationsWithCountdown should return immediately when confirmations <= 0","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return immediately when confirmations <= 0"},{"ancestorTitles":["waitForSvmConfirmationsWithCountdown"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"waitForSvmConfirmationsWithCountdown should return immediately when confirmations <= 0","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return immediately when confirmations <= 0"}],"endTime":1792494878328,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/rescue-svm-confirmation.spec.ts","startTime":1792494878188,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["SVM relayable payload size guard"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM relayable payload size guard reports hex payload byte length","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"reports hex payload byte length"},{"ancestorTitles":["SVM relayable payload size guard"],"duration":6,"failureDetails":[],"failureMessages":[],"fullName":"SVM relayable payload size guard throws a clear error when instruction payload exceeds the safe limit","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws a clear error when instruction payload exceeds the safe limit"},{"ancestorTitles":["buildExecuteMulticall"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildExecuteMulticall should not emit a native value self-call when funds park PC on the UEA","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should not emit a native value self-call when funds park PC on the UEA"},{"ancestorTitles":["buildExecuteMulticall"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildExecuteMulticall should treat 0x as empty data when parking value + funds on the UEA","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should treat 0x as empty data when parking value + funds on the UEA"},{"ancestorTitles":["buildExecuteMulticall"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildExecuteMulticall should allow Route 3 inbound payloads to carry a self value seed","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should allow Route 3 inbound payloads to carry a self value seed"},{"ancestorTitles":["buildExecuteMulticall"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildExecuteMulticall should keep native value transfers for non-self recipients","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should keep native value transfers for non-self recipients"},{"ancestorTitles":["buildExecuteMulticall"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildExecuteMulticall should treat an empty multicall array as empty data for ERC-20 funds forwarding","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should treat an empty multicall array as empty data for ERC-20 funds forwarding"},{"ancestorTitles":["buildCeaMulticallPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildCeaMulticallPayload should return 0x for empty array","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return 0x for empty array"},{"ancestorTitles":["buildCeaMulticallPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildCeaMulticallPayload should include UEA_MULTICALL_SELECTOR prefix","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should include UEA_MULTICALL_SELECTOR prefix"},{"ancestorTitles":["buildCeaMulticallPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildCeaMulticallPayload should encode a single multicall entry","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should encode a single multicall entry"},{"ancestorTitles":["buildCeaMulticallPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildCeaMulticallPayload should encode multiple multicall entries","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should encode multiple multicall entries"},{"ancestorTitles":["buildOutboundRequest"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildOutboundRequest should build correct UniversalOutboundTxRequest struct","invocations":1,"location":null,"numPassingAsserts":9,"retryReasons":[],"status":"passed","title":"should build correct UniversalOutboundTxRequest struct"},{"ancestorTitles":["buildOutboundRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildOutboundRequest should allow custom maxPCForGas cap","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should allow custom maxPCForGas cap"},{"ancestorTitles":["buildOutboundRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildOutboundRequest should allow custom outbound gasPrice override","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should allow custom outbound gasPrice override"},{"ancestorTitles":["buildOutboundRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildOutboundRequest should handle zero address token","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should handle zero address token"},{"ancestorTitles":["buildOutboundRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildOutboundRequest should reject empty CEA payloads unless recipient parks funds","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should reject empty CEA payloads unless recipient parks funds"},{"ancestorTitles":["buildOutboundRequest"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildOutboundRequest should allow empty CEA payloads with zero recipient","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should allow empty CEA payloads with zero recipient"},{"ancestorTitles":["buildErc20Transfer"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildErc20Transfer should encode ERC20 transfer call","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should encode ERC20 transfer call"},{"ancestorTitles":["buildOutboundApprovalAndCall"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildOutboundApprovalAndCall should produce burn approval + outbound call with pre-computed native value","invocations":1,"location":null,"numPassingAsserts":11,"retryReasons":[],"status":"passed","title":"should produce burn approval + outbound call with pre-computed native value"},{"ancestorTitles":["buildOutboundApprovalAndCall"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildOutboundApprovalAndCall should skip burn approval when zero address token","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should skip burn approval when zero address token"},{"ancestorTitles":["buildOutboundApprovalAndCall"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildOutboundApprovalAndCall should skip burn approval when burnAmount is zero","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should skip burn approval when burnAmount is zero"},{"ancestorTitles":["buildOutboundApprovalAndCall"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildOutboundApprovalAndCall should fallback to 5x gasFee when nativeValueForGas not provided","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should fallback to 5x gasFee when nativeValueForGas not provided"},{"ancestorTitles":["buildOutboundApprovalAndCall"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildOutboundApprovalAndCall no bridge-swap entries → plain approve-zero + approve + outbound emission","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"no bridge-swap entries → plain approve-zero + approve + outbound emission"},{"ancestorTitles":["MIGRATION_SELECTOR"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MIGRATION_SELECTOR should equal bytes4(keccak256(\"UEA_MIGRATION\"))","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should equal bytes4(keccak256(\"UEA_MIGRATION\"))"},{"ancestorTitles":["MIGRATION_SELECTOR"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MIGRATION_SELECTOR should be exactly 10 hex characters (4 bytes)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should be exactly 10 hex characters (4 bytes)"},{"ancestorTitles":["buildMigrationPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildMigrationPayload should return the MIGRATION_SELECTOR value","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return the MIGRATION_SELECTOR value"},{"ancestorTitles":["buildMigrationPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildMigrationPayload should return 0xcac656d6","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return 0xcac656d6"},{"ancestorTitles":["buildMigrationPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildMigrationPayload should return exactly 4 bytes (10 hex chars)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return exactly 4 bytes (10 hex chars)"},{"ancestorTitles":["buildErc20WithdrawalMulticall"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildErc20WithdrawalMulticall should return a single-element MultiCall array","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return a single-element MultiCall array"},{"ancestorTitles":["buildErc20WithdrawalMulticall"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildErc20WithdrawalMulticall should target the token address","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should target the token address"},{"ancestorTitles":["buildErc20WithdrawalMulticall"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildErc20WithdrawalMulticall should have value 0","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should have value 0"},{"ancestorTitles":["buildErc20WithdrawalMulticall"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildErc20WithdrawalMulticall should encode an ERC20 transfer call","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should encode an ERC20 transfer call"},{"ancestorTitles":["buildErc20WithdrawalMulticall"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildErc20WithdrawalMulticall should produce output matching buildErc20Transfer wrapped in array","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should produce output matching buildErc20Transfer wrapped in array"},{"ancestorTitles":["buildSendUniversalTxToUEA"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildSendUniversalTxToUEA should encode sendUniversalTxToUEA function call on CEA_EVM ABI","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should encode sendUniversalTxToUEA function call on CEA_EVM ABI"},{"ancestorTitles":["buildSendUniversalTxToUEA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSendUniversalTxToUEA should return ERC20 MultiCall with to = ceaAddress and value = 0","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should return ERC20 MultiCall with to = ceaAddress and value = 0"},{"ancestorTitles":["buildSendUniversalTxToUEA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSendUniversalTxToUEA should encode correct args (token, amount, payload, revertRecipient)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should encode correct args (token, amount, payload, revertRecipient)"},{"ancestorTitles":["buildSendUniversalTxToUEA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSendUniversalTxToUEA should work with native token (ZERO_ADDRESS) without forwarding call value","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should work with native token (ZERO_ADDRESS) without forwarding call value"},{"ancestorTitles":["buildSendUniversalTxToUEA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSendUniversalTxToUEA should work with empty payload","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should work with empty payload"},{"ancestorTitles":["isSvmChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"isSvmChain should return true for Solana chains","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should return true for Solana chains"},{"ancestorTitles":["isSvmChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"isSvmChain should return false for EVM chains","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return false for EVM chains"},{"ancestorTitles":["isValidSolanaHexAddress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"isValidSolanaHexAddress should accept 32-byte hex addresses","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should accept 32-byte hex addresses"},{"ancestorTitles":["isValidSolanaHexAddress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"isValidSolanaHexAddress should reject 20-byte EVM addresses","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should reject 20-byte EVM addresses"},{"ancestorTitles":["isValidSolanaHexAddress"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"isValidSolanaHexAddress should reject addresses without 0x prefix","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should reject addresses without 0x prefix"},{"ancestorTitles":["encodeSvmExecutePayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeSvmExecutePayload should encode a payload with no accounts","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should encode a payload with no accounts"},{"ancestorTitles":["encodeSvmExecutePayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeSvmExecutePayload should encode a payload with accounts","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should encode a payload with accounts"},{"ancestorTitles":["findTokenChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"findTokenChain should find the chain for a chain-specific registered token","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should find the chain for a chain-specific registered token"},{"ancestorTitles":["findTokenChain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"findTokenChain should return undefined for an unregistered token","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return undefined for an unregistered token"},{"ancestorTitles":["validateRouteParams — unsupported token"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateRouteParams — unsupported token should throw RouteValidationError when token symbol is not available on target chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw RouteValidationError when token symbol is not available on target chain"},{"ancestorTitles":["validateRouteParams — unsupported token"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"validateRouteParams — unsupported token should include token symbol and destination in error message","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should include token symbol and destination in error message"},{"ancestorTitles":["validateRouteParams — unsupported token"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateRouteParams — unsupported token should NOT throw when token symbol exists on target chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should NOT throw when token symbol exists on target chain"},{"ancestorTitles":["validateRouteParams — unsupported token"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateRouteParams — unsupported token should NOT throw when target is Push Chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should NOT throw when target is Push Chain"},{"ancestorTitles":["encodeSvmCeaToUeaPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeSvmCeaToUeaPayload should encode SOL drain (no token mint, no extra payload)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should encode SOL drain (no token mint, no extra payload)"},{"ancestorTitles":["encodeSvmCeaToUeaPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeSvmCeaToUeaPayload should encode SPL drain (with token mint)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should encode SPL drain (with token mint)"},{"ancestorTitles":["encodeSvmCeaToUeaPayload"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"encodeSvmCeaToUeaPayload should encode with extraPayload","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should encode with extraPayload"},{"ancestorTitles":["encodeSvmCeaToUeaPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeSvmCeaToUeaPayload should produce different output with vs without extraPayload","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should produce different output with vs without extraPayload"},{"ancestorTitles":["encodeSvmCeaToUeaPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeSvmCeaToUeaPayload should produce same output for empty extraPayload and no extraPayload","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should produce same output for empty extraPayload and no extraPayload"}],"endTime":1792494878471,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/payload-builders.spec.ts","startTime":1792494878330,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"DEXES includes destination tokens independently on every supported network within policy limits","invocations":1,"location":null,"numPassingAsserts":43,"retryReasons":[],"status":"passed","title":"DEXES includes destination tokens independently on every supported network within policy limits"},{"ancestorTitles":[],"duration":5,"failureDetails":[],"failureMessages":[],"fullName":"LENDING includes destination tokens independently on every supported network within policy limits","invocations":1,"location":null,"numPassingAsserts":43,"retryReasons":[],"status":"passed","title":"LENDING includes destination tokens independently on every supported network within policy limits"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"STAKING includes destination tokens independently on every supported network within policy limits","invocations":1,"location":null,"numPassingAsserts":13,"retryReasons":[],"status":"passed","title":"STAKING includes destination tokens independently on every supported network within policy limits"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"selects protocol-specific testnet tokens rather than reusing the DEX pair for lending","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"selects protocol-specific testnet tokens rather than reusing the DEX pair for lending"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"preserves an explicit empty list instead of silently repopulating tokens","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"preserves an explicit empty list instead of silently repopulating tokens"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"an explicit selection replaces defaults on all chains without filling other networks","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"an explicit selection replaces defaults on all chains without filling other networks"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"regenerates token constraints and approvals from returned default assets with supplied caps","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"regenerates token constraints and approvals from returned default assets with supplied caps"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"isolates defaults from returned assets, caller mutations and input catalog mutations","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"isolates defaults from returned assets, caller mutations and input catalog mutations"}],"endTime":1792494878815,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/preset-default-tokens.spec.ts","startTime":1792494878474,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["runPreflight"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight emits 203_03 INFO and returns ok when balance is sufficient","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"emits 203_03 INFO and returns ok when balance is sufficient"},{"ancestorTitles":["runPreflight"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight defaults to warning-only and proceeds on native shortfall","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"defaults to warning-only and proceeds on native shortfall"},{"ancestorTitles":["runPreflight"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight emits 203_03 WARNING + 203_04 ERROR and throws when enforceGasCheck=true","invocations":1,"location":null,"numPassingAsserts":9,"retryReasons":[],"status":"passed","title":"emits 203_03 WARNING + 203_04 ERROR and throws when enforceGasCheck=true"},{"ancestorTitles":["runPreflight"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight error carries structured fields (required, available, shortfall, pathTag)","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"error carries structured fields (required, available, shortfall, pathTag)"},{"ancestorTitles":["runPreflight"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight PRC-20 burn-balance shortfall throws with reason=PRC20","invocations":1,"location":null,"numPassingAsserts":10,"retryReasons":[],"status":"passed","title":"PRC-20 burn-balance shortfall throws with reason=PRC20"},{"ancestorTitles":["runPreflight"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight skips PRC-20 check when burnToken/burnAmount/prc20Balance are undefined (native value transfer)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"skips PRC-20 check when burnToken/burnAmount/prc20Balance are undefined (native value transfer)"},{"ancestorTitles":["runPreflight"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight PRC-20 sufficient + native sufficient → 203_03 INFO twice, no throw","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"PRC-20 sufficient + native sufficient → 203_03 INFO twice, no throw"},{"ancestorTitles":["runPreflight"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight InsufficientUEABalanceError auto-populates decodedError for terminal hook payload","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"InsufficientUEABalanceError auto-populates decodedError for terminal hook payload"},{"ancestorTitles":["runPreflight"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight PRC-20 InsufficientUEABalanceError decodedError hint is PRC-20-flavoured","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"PRC-20 InsufficientUEABalanceError decodedError hint is PRC-20-flavoured"},{"ancestorTitles":["runPreflight"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight InsufficientUEABalanceError is also instanceof PushChainExecutionError (for legacy catch handlers)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"InsufficientUEABalanceError is also instanceof PushChainExecutionError (for legacy catch handlers)"},{"ancestorTitles":["runPreflight"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight CASCADE pathTag fires 003-03/04 (cascade bucket), NOT 203-03/04","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"CASCADE pathTag fires 003-03/04 (cascade bucket), NOT 203-03/04"},{"ancestorTitles":["runPreflight"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight R2_SVM pathTag fires 203-03/04 (R2 single-route bucket)","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"R2_SVM pathTag fires 203-03/04 (R2 single-route bucket)"},{"ancestorTitles":["runPreflight"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight R3_EVM pathTag fires 303-04/05 (R3 single-route bucket, not R2)","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"R3_EVM pathTag fires 303-04/05 (R3 single-route bucket, not R2)"},{"ancestorTitles":["runPreflight"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight R3_SVM pathTag fires 303-04/05 (R3 single-route bucket)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"R3_SVM pathTag fires 303-04/05 (R3 single-route bucket)"},{"ancestorTitles":["runPreflight"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"runPreflight cascade segmentIndex propagates through to error and hook payload","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"cascade segmentIndex propagates through to error and hook payload"},{"ancestorTitles":["maybeFireSvmWarnThreshold"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"maybeFireSvmWarnThreshold does NOT fire when buffered quote is at or below threshold","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does NOT fire when buffered quote is at or below threshold"},{"ancestorTitles":["maybeFireSvmWarnThreshold"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"maybeFireSvmWarnThreshold fires SEND_TX_203_05 INFO when R2_SVM buffered quote exceeds threshold","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"fires SEND_TX_203_05 INFO when R2_SVM buffered quote exceeds threshold"},{"ancestorTitles":["maybeFireSvmWarnThreshold"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"maybeFireSvmWarnThreshold fires SEND_TX_303_06 INFO (R3 bucket) when pathTag is R3_SVM","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"fires SEND_TX_303_06 INFO (R3 bucket) when pathTag is R3_SVM"},{"ancestorTitles":["maybeFireSvmWarnThreshold"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"maybeFireSvmWarnThreshold fires SEND_TX_003_05 INFO (cascade bucket) when pathTag is CASCADE","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"fires SEND_TX_003_05 INFO (cascade bucket) when pathTag is CASCADE"}],"endTime":1792494878962,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/preflight.spec.ts","startTime":1792494878819,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["sizeOutboundGas — EVM destination (Ethereum Sepolia)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"sizeOutboundGas — EVM destination (Ethereum Sepolia) Case A: gas < $1 → category A, gasLegNativePc = $1 worth","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"Case A: gas < $1 → category A, gasLegNativePc = $1 worth"},{"ancestorTitles":["sizeOutboundGas — EVM destination (Ethereum Sepolia)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeOutboundGas — EVM destination (Ethereum Sepolia) Case B: $1 ≤ gas ≤ $10 → category B, gasLegNativePc = gasUsd equivalent","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"Case B: $1 ≤ gas ≤ $10 → category B, gasLegNativePc = gasUsd equivalent"},{"ancestorTitles":["sizeOutboundGas — EVM destination (Ethereum Sepolia)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeOutboundGas — EVM destination (Ethereum Sepolia) Case C: gas > $10 → category C, $10 gas leg + overflow bridged","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"Case C: gas > $10 → category C, $10 gas leg + overflow bridged"},{"ancestorTitles":["sizeOutboundGas — EVM destination (Ethereum Sepolia)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeOutboundGas — EVM destination (Ethereum Sepolia) exactly $1 boundary → Case B (not A)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"exactly $1 boundary → Case B (not A)"},{"ancestorTitles":["sizeOutboundGas — EVM destination (Ethereum Sepolia)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"sizeOutboundGas — EVM destination (Ethereum Sepolia) exactly $10 boundary → Case B (not C)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"exactly $10 boundary → Case B (not C)"},{"ancestorTitles":["sizeOutboundGas — SVM destination (Solana Devnet)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeOutboundGas — SVM destination (Solana Devnet) Case B on Solana: 0.02 SOL @ $150 = $3.00","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"Case B on Solana: 0.02 SOL @ $150 = $3.00"},{"ancestorTitles":["sizeOutboundGas — oracle fallback"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeOutboundGas — oracle fallback falls back to pushClient.usdcToPush when QuoterV2 returns 0","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"falls back to pushClient.usdcToPush when QuoterV2 returns 0"},{"ancestorTitles":["sizeOutboundGas — oracle fallback"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeOutboundGas — oracle fallback factory probes fee tier when defaultFeeTier returns 0 (real testnet shape)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"factory probes fee tier when defaultFeeTier returns 0 (real testnet shape)"},{"ancestorTitles":["sizeOutboundGas — oracle fallback"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeOutboundGas — oracle fallback PriceFetch failure → passthrough as Case B at $1 floor","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"PriceFetch failure → passthrough as Case B at $1 floor"},{"ancestorTitles":["sizeR1PushGas — R1 Push-chain gas sizing"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeR1PushGas — R1 Push-chain gas sizing Case A: pushGasUsd < $1 → category A, paddedDepositUsd = $1","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"Case A: pushGasUsd < $1 → category A, paddedDepositUsd = $1"},{"ancestorTitles":["sizeR1PushGas — R1 Push-chain gas sizing"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeR1PushGas — R1 Push-chain gas sizing Case B: $1 ≤ pushGasUsd ≤ $10 → category B, paddedDepositUsd = pushGasUsd (pass-through)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"Case B: $1 ≤ pushGasUsd ≤ $10 → category B, paddedDepositUsd = pushGasUsd (pass-through)"},{"ancestorTitles":["sizeR1PushGas — R1 Push-chain gas sizing"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeR1PushGas — R1 Push-chain gas sizing Case C: pushGasUsd > $10 → category C, paddedDepositUsd = pushGasUsd (pass-through, no cap)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"Case C: pushGasUsd > $10 → category C, paddedDepositUsd = pushGasUsd (pass-through, no cap)"},{"ancestorTitles":["sizeR1PushGas — R1 Push-chain gas sizing"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeR1PushGas — R1 Push-chain gas sizing boundary: pushGasUsd === $1 exactly → category B (not A)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"boundary: pushGasUsd === $1 exactly → category B (not A)"},{"ancestorTitles":["sizeR1PushGas — R1 Push-chain gas sizing"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeR1PushGas — R1 Push-chain gas sizing boundary: pushGasUsd === $10 exactly → category B (not C)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"boundary: pushGasUsd === $10 exactly → category B (not C)"}],"endTime":1792494879096,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/gas-usd-sizer.spec.ts","startTime":1792494878965,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["detectUniversalTx"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx returns UNKNOWN when receipt has no logs","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns UNKNOWN when receipt has no logs"},{"ancestorTitles":["detectUniversalTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx returns UNKNOWN when receipt is null","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns UNKNOWN when receipt is null"},{"ancestorTitles":["detectUniversalTx"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx decodes UniversalTx (fromCEA=false) and derives universalTxId","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"decodes UniversalTx (fromCEA=false) and derives universalTxId"},{"ancestorTitles":["detectUniversalTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx decodes UniversalTx (fromCEA=true) as INBOUND_FROM_CEA","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"decodes UniversalTx (fromCEA=true) as INBOUND_FROM_CEA"},{"ancestorTitles":["detectUniversalTx"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx decodes UniversalTxFinalized as OUTBOUND_FINALIZED with subTxId/universalTxId","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"decodes UniversalTxFinalized as OUTBOUND_FINALIZED with subTxId/universalTxId"},{"ancestorTitles":["detectUniversalTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx decodes UniversalTxReverted as OUTBOUND_REVERTED and parses revertInstruction","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"decodes UniversalTxReverted as OUTBOUND_REVERTED and parses revertInstruction"},{"ancestorTitles":["detectUniversalTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx decodes RevertUniversalTx (gateway) as INBOUND_REVERTED","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"decodes RevertUniversalTx (gateway) as INBOUND_REVERTED"},{"ancestorTitles":["detectUniversalTx"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx decodes UniversalTxOutbound as OUTBOUND_INITIATED","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"decodes UniversalTxOutbound as OUTBOUND_INITIATED"},{"ancestorTitles":["detectUniversalTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx UniversalTxExecuted-only is classified as EXECUTED_ON_DEST","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"UniversalTxExecuted-only is classified as EXECUTED_ON_DEST"},{"ancestorTitles":["detectUniversalTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx cross-references Push Chain when pushClient is provided","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"cross-references Push Chain when pushClient is provided"},{"ancestorTitles":["detectUniversalTx"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx flags stuckObservation=UNSPECIFIED when cosmos status is UNSPECIFIED for inbound tx","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"flags stuckObservation=UNSPECIFIED when cosmos status is UNSPECIFIED for inbound tx"},{"ancestorTitles":["detectUniversalTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx marks notFound when cosmos returns no universalTx record","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"marks notFound when cosmos returns no universalTx record"},{"ancestorTitles":["detectUniversalTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx records note when receipt fetch throws","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"records note when receipt fetch throws"},{"ancestorTitles":["detectUniversalTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx dispatches SVM chain to the SVM detector (no legacy EVM-only throw)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"dispatches SVM chain to the SVM detector (no legacy EVM-only throw)"},{"ancestorTitles":["detectUniversalTx"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTx UNKNOWN when only a non-universal log (e.g. an ERC20 Transfer)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"UNKNOWN when only a non-universal log (e.g. an ERC20 Transfer)"}],"endTime":1792494879232,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/detector.spec.ts","startTime":1792494879101,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"Aave pins the selected reserve, operation amount and wallet beneficiary for every method","invocations":1,"location":null,"numPassingAsserts":22,"retryReasons":[],"status":"passed","title":"Aave pins the selected reserve, operation amount and wallet beneficiary for every method"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"default lending policy needs only the agent to become locally ready","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"default lending policy needs only the agent to become locally ready"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"zero operation caps remain valid disabled configurations, while zero bridge totals are separately reported","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"zero operation caps remain valid disabled configurations, while zero bridge totals are separately reported"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"does not approve or grant a positive amount for an unlisted Aave asset","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"does not approve or grant a positive amount for an unlisted Aave asset"},{"ancestorTitles":[],"duration":5,"failureDetails":[],"failureMessages":[],"fullName":"regenerating a token/limit replaces old operation and approval constraints without mutating the old template","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"regenerating a token/limit replaces old operation and approval constraints without mutating the old template"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"Moonwell applies underlying units and reports the share-based redeem alternative","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"Moonwell applies underlying units and reports the share-based redeem alternative"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EigenLayer pins the chosen token and deposit amount","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"EigenLayer pins the chosen token and deposit amount"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"Lido distinguishes stETH, wstETH and native value units","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"Lido distinguishes stETH, wstETH and native value units"},{"ancestorTitles":[],"duration":71,"failureDetails":[],"failureMessages":[],"fullName":"readiness is per chain and cannot be mutated to change later results","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"readiness is per chain and cannot be mutated to change later results"},{"ancestorTitles":[],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"refuses an overlarge token expansion without dropping restrictions","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"refuses an overlarge token expansion without dropping restrictions"}],"endTime":1792494879617,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/preset-operation-limits.spec.ts","startTime":1792494879236,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["parseUEAVersion"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"parseUEAVersion should parse \"1.0.2\" to 1000002","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should parse \"1.0.2\" to 1000002"},{"ancestorTitles":["parseUEAVersion"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"parseUEAVersion should parse \"1.1.3\" to 1001003","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should parse \"1.1.3\" to 1001003"},{"ancestorTitles":["parseUEAVersion"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"parseUEAVersion should parse \"0.0.0\" to 0","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should parse \"0.0.0\" to 0"},{"ancestorTitles":["parseUEAVersion"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"parseUEAVersion should parse \"1.0.0\" to 1000000","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should parse \"1.0.0\" to 1000000"},{"ancestorTitles":["parseUEAVersion"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"parseUEAVersion should parse \"2.10.5\" to 2010005","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should parse \"2.10.5\" to 2010005"},{"ancestorTitles":["parseUEAVersion"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"parseUEAVersion should return 0 for invalid format","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should return 0 for invalid format"},{"ancestorTitles":["parseUEAVersion"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"parseUEAVersion should return 0 for empty string","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should return 0 for empty string"},{"ancestorTitles":["UEA version comparison"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA version comparison should detect upgrade required when version < minRequiredVersion","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should detect upgrade required when version < minRequiredVersion"},{"ancestorTitles":["UEA version comparison"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA version comparison should detect no upgrade when version === minRequiredVersion","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should detect no upgrade when version === minRequiredVersion"},{"ancestorTitles":["UEA version comparison"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA version comparison should detect no upgrade when version > minRequiredVersion","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should detect no upgrade when version > minRequiredVersion"},{"ancestorTitles":["UEA version comparison"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA version comparison should handle minor version comparison correctly","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle minor version comparison correctly"},{"ancestorTitles":["UEA version comparison"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA version comparison should handle major version rollover","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should handle major version rollover"},{"ancestorTitles":["UEA version comparison"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA version comparison should treat empty string as 0 (no upgrade from empty)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should treat empty string as 0 (no upgrade from empty)"},{"ancestorTitles":["AccountStatus default (unloaded)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AccountStatus default (unloaded) should have loaded = false","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should have loaded = false"},{"ancestorTitles":["AccountStatus default (unloaded)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AccountStatus default (unloaded) should have deployed = false","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should have deployed = false"},{"ancestorTitles":["AccountStatus default (unloaded)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AccountStatus default (unloaded) should have version as empty string","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should have version as empty string"},{"ancestorTitles":["AccountStatus default (unloaded)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AccountStatus default (unloaded) should have requiresUpgrade = false","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should have requiresUpgrade = false"},{"ancestorTitles":["AccountStatus default (unloaded)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AccountStatus default (unloaded) should have mode as signer or read-only","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should have mode as signer or read-only"},{"ancestorTitles":["AccountStatus loaded — upgrade required"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"AccountStatus loaded — upgrade required should have loaded = true","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should have loaded = true"},{"ancestorTitles":["AccountStatus loaded — upgrade required"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AccountStatus loaded — upgrade required should have deployed = true","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should have deployed = true"},{"ancestorTitles":["AccountStatus loaded — upgrade required"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AccountStatus loaded — upgrade required should have requiresUpgrade = true when version < minRequiredVersion","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should have requiresUpgrade = true when version < minRequiredVersion"},{"ancestorTitles":["AccountStatus loaded — no upgrade needed"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AccountStatus loaded — no upgrade needed should have requiresUpgrade = false when version >= minRequiredVersion","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should have requiresUpgrade = false when version >= minRequiredVersion"},{"ancestorTitles":["AccountStatus loaded — not deployed"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AccountStatus loaded — not deployed should have deployed = false with empty version","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should have deployed = false with empty version"},{"ancestorTitles":["AccountStatus loaded — not deployed"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AccountStatus loaded — not deployed should not require upgrade when not deployed","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should not require upgrade when not deployed"},{"ancestorTitles":["UEA Migration progress hook enum values"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA Migration progress hook enum values should have UEA_MIG_01 = \"UEA-MIG-01\"","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should have UEA_MIG_01 = \"UEA-MIG-01\""},{"ancestorTitles":["UEA Migration progress hook enum values"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA Migration progress hook enum values should have UEA_MIG_02 = \"UEA-MIG-02\"","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should have UEA_MIG_02 = \"UEA-MIG-02\""},{"ancestorTitles":["UEA Migration progress hook enum values"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA Migration progress hook enum values should have UEA_MIG_03 = \"UEA-MIG-03\"","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should have UEA_MIG_03 = \"UEA-MIG-03\""},{"ancestorTitles":["UEA Migration progress hook enum values"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA Migration progress hook enum values should have UEA_MIG_9901 = \"UEA-MIG-9901\"","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should have UEA_MIG_9901 = \"UEA-MIG-9901\""},{"ancestorTitles":["UEA Migration progress hook enum values"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA Migration progress hook enum values should have UEA_MIG_9902 = \"UEA-MIG-9902\"","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should have UEA_MIG_9902 = \"UEA-MIG-9902\""},{"ancestorTitles":["UEA Migration progress hook enum values"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA Migration progress hook enum values should have UEA_MIG_9903 = \"UEA-MIG-9903\"","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should have UEA_MIG_9903 = \"UEA-MIG-9903\""},{"ancestorTitles":["UEA Migration progress hook definitions"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA Migration progress hook definitions UEA_MIG_01 should produce INFO level event","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"UEA_MIG_01 should produce INFO level event"},{"ancestorTitles":["UEA Migration progress hook definitions"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"UEA Migration progress hook definitions UEA_MIG_02 should produce INFO level event for signature","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UEA_MIG_02 should produce INFO level event for signature"},{"ancestorTitles":["UEA Migration progress hook definitions"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA Migration progress hook definitions UEA_MIG_03 should produce INFO level event for broadcasting","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UEA_MIG_03 should produce INFO level event for broadcasting"},{"ancestorTitles":["UEA Migration progress hook definitions"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA Migration progress hook definitions UEA_MIG_9901 should produce SUCCESS level event with version string","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"UEA_MIG_9901 should produce SUCCESS level event with version string"},{"ancestorTitles":["UEA Migration progress hook definitions"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA Migration progress hook definitions UEA_MIG_9902 should produce ERROR level event","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UEA_MIG_9902 should produce ERROR level event"},{"ancestorTitles":["UEA Migration progress hook definitions"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"UEA Migration progress hook definitions UEA_MIG_9903 should produce INFO level event for skipped","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UEA_MIG_9903 should produce INFO level event for skipped"},{"ancestorTitles":["UEA_FACTORY_ABI"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA_FACTORY_ABI should have UEA_VERSION function","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"should have UEA_VERSION function"},{"ancestorTitles":["UEA_FACTORY_ABI"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"UEA_FACTORY_ABI should have UEA_MIGRATION_CONTRACT function","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should have UEA_MIGRATION_CONTRACT function"}],"endTime":1792494879770,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/account-status.spec.ts","startTime":1792494879623,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["named SVM IDL rule compilation"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"named SVM IDL rule compilation enforces named constraints against independently Borsh-encoded data","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"enforces named constraints against independently Borsh-encoded data"},{"ancestorTitles":["named SVM IDL rule compilation"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"named SVM IDL rule compilation rejects unknown account","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects unknown account"},{"ancestorTitles":["named SVM IDL rule compilation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"named SVM IDL rule compilation rejects unlisted ATA","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects unlisted ATA"},{"ancestorTitles":["named SVM IDL rule compilation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"named SVM IDL rule compilation rejects unknown field","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects unknown field"},{"ancestorTitles":["named SVM IDL rule compilation"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"named SVM IDL rule compilation rejects overflow","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects overflow"},{"ancestorTitles":["named SVM IDL rule compilation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"named SVM IDL rule compilation rejects duplicate instruction","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects duplicate instruction"},{"ancestorTitles":["named SVM IDL rule compilation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"named SVM IDL rule compilation rejects mismatched program","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects mismatched program"},{"ancestorTitles":["named SVM IDL rule compilation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"named SVM IDL rule compilation rejects conflicting comparison","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects conflicting comparison"},{"ancestorTitles":["named SVM IDL rule compilation"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"named SVM IDL rule compilation refuses unsupported layouts \"bytes\"","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"refuses unsupported layouts \"bytes\""},{"ancestorTitles":["named SVM IDL rule compilation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"named SVM IDL rule compilation refuses unsupported layouts \"string\"","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"refuses unsupported layouts \"string\""},{"ancestorTitles":["named SVM IDL rule compilation"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"named SVM IDL rule compilation refuses unsupported layouts {\"vec\":\"u8\"}","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"refuses unsupported layouts {\"vec\":\"u8\"}"},{"ancestorTitles":["named SVM IDL rule compilation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"named SVM IDL rule compilation refuses unsupported layouts {\"defined\":{\"name\":\"Unknown\"}}","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"refuses unsupported layouts {\"defined\":{\"name\":\"Unknown\"}}"},{"ancestorTitles":["named SVM IDL rule compilation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"named SVM IDL rule compilation does not mutate the caller IDL","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does not mutate the caller IDL"}],"endTime":1792494880039,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/svm-idl.spec.ts","startTime":1792494879773,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["chain namespace mapping"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"chain namespace mapping round-trips every external chain","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"round-trips every external chain"},{"ancestorTitles":["chain namespace mapping"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"chain namespace mapping agrees with the SDK-wide getChainNamespace convention","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"agrees with the SDK-wide getChainNamespace convention"},{"ancestorTitles":["chain namespace mapping"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"chain namespace mapping produces CAIP-2 chain ids, not bare prefixes","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"produces CAIP-2 chain ids, not bare prefixes"},{"ancestorTitles":["chain namespace mapping"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"chain namespace mapping rejects a bare namespace prefix","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects a bare namespace prefix"},{"ancestorTitles":["chain namespace mapping"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"chain namespace mapping rejects an unknown namespace instead of returning a negative result","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects an unknown namespace instead of returning a negative result"},{"ancestorTitles":["chain namespace mapping"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"chain namespace mapping rejects chains whose chainId is still a TBD placeholder","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects chains whose chainId is still a TBD placeholder"},{"ancestorTitles":["chain namespace mapping"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"chain namespace mapping offers a non-throwing probe","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"offers a non-throwing probe"},{"ancestorTitles":["chain namespace mapping"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"chain namespace mapping excludes Push chains from the external set","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"excludes Push chains from the external set"},{"ancestorTitles":["chain namespace mapping"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"chain namespace mapping identifies Push chains including the DONUT alias","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"identifies Push chains including the DONUT alias"},{"ancestorTitles":["chain namespace mapping"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"chain namespace mapping reports the VM per chain","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"reports the VM per chain"}],"endTime":1792494880171,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/__tests__/chain-namespace.spec.ts","startTime":1792494880042,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["R1 error-scenario hook emission","SEND-TX-104-04 (sign / fee-lock decline)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission SEND-TX-104-04 (sign / fee-lock decline) emits decline copy for viem UserRejectedRequestError","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"emits decline copy for viem UserRejectedRequestError"},{"ancestorTitles":["R1 error-scenario hook emission","SEND-TX-104-04 (sign / fee-lock decline)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission SEND-TX-104-04 (sign / fee-lock decline) emits decline copy for ethers ACTION_REJECTED","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"emits decline copy for ethers ACTION_REJECTED"},{"ancestorTitles":["R1 error-scenario hook emission","SEND-TX-104-04 (sign / fee-lock decline)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission SEND-TX-104-04 (sign / fee-lock decline) emits decline copy for EIP-1193 code 4001","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"emits decline copy for EIP-1193 code 4001"},{"ancestorTitles":["R1 error-scenario hook emission","SEND-TX-104-04 (sign / fee-lock decline)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission SEND-TX-104-04 (sign / fee-lock decline) emits Signature Failed copy for non-decline errors (insufficient funds)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"emits Signature Failed copy for non-decline errors (insufficient funds)"},{"ancestorTitles":["R1 error-scenario hook emission","SEND-TX-104-04 (sign / fee-lock decline)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission SEND-TX-104-04 (sign / fee-lock decline) emits Signature Failed copy for RPC failure","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"emits Signature Failed copy for RPC failure"},{"ancestorTitles":["R1 error-scenario hook emission","SEND-TX-199-02 (Push Chain broadcast failure)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission SEND-TX-199-02 (Push Chain broadcast failure) emits 199-02 and wraps plain Error in PushChainExecutionError","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"emits 199-02 and wraps plain Error in PushChainExecutionError"},{"ancestorTitles":["R1 error-scenario hook emission","SEND-TX-199-02 (Push Chain broadcast failure)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission SEND-TX-199-02 (Push Chain broadcast failure) emits 199-02 and preserves an already-typed PushChainExecutionError","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"emits 199-02 and preserves an already-typed PushChainExecutionError"},{"ancestorTitles":["R1 error-scenario hook emission","SEND-TX-199-02 (Push Chain broadcast failure)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission SEND-TX-199-02 (Push Chain broadcast failure) emits 199-02 even when the underlying error message contains \"Timeout\"","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"emits 199-02 even when the underlying error message contains \"Timeout\""},{"ancestorTitles":["R1 error-scenario hook emission","Push-to-Push combined decline + failure branch"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission Push-to-Push combined decline + failure branch fires 104-04 when sendPushTx fails with a wallet rejection","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"fires 104-04 when sendPushTx fails with a wallet rejection"},{"ancestorTitles":["R1 error-scenario hook emission","Push-to-Push combined decline + failure branch"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission Push-to-Push combined decline + failure branch fires 199-02 + PushChainExecutionError when sendPushTx fails non-decline","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"fires 199-02 + PushChainExecutionError when sendPushTx fails non-decline"},{"ancestorTitles":["R1 error-scenario hook emission","Coverage matrix — every sign / broadcast site is covered"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission Coverage matrix — every sign / broadcast site is covered execute-standard.ts — signUniversalPayload fires SEND-TX-104-04","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"execute-standard.ts — signUniversalPayload fires SEND-TX-104-04"},{"ancestorTitles":["R1 error-scenario hook emission","Coverage matrix — every sign / broadcast site is covered"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission Coverage matrix — every sign / broadcast site is covered execute-standard.ts — lockFee fires SEND-TX-104-04","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"execute-standard.ts — lockFee fires SEND-TX-104-04"},{"ancestorTitles":["R1 error-scenario hook emission","Coverage matrix — every sign / broadcast site is covered"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission Coverage matrix — every sign / broadcast site is covered execute-funds-only.ts — sendGatewayTxWithFallback (EVM) fires SEND-TX-104-04","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"execute-funds-only.ts — sendGatewayTxWithFallback (EVM) fires SEND-TX-104-04"},{"ancestorTitles":["R1 error-scenario hook emission","Coverage matrix — every sign / broadcast site is covered"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission Coverage matrix — every sign / broadcast site is covered execute-funds-payload.ts — sendGatewayTxWithFallback fires SEND-TX-104-04","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"execute-funds-payload.ts — sendGatewayTxWithFallback fires SEND-TX-104-04"},{"ancestorTitles":["R1 error-scenario hook emission","Coverage matrix — every sign / broadcast site is covered"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission Coverage matrix — every sign / broadcast site is covered execute-standard.ts — sendUniversalTx fires SEND-TX-199-02","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"execute-standard.ts — sendUniversalTx fires SEND-TX-199-02"},{"ancestorTitles":["R1 error-scenario hook emission","Coverage matrix — every sign / broadcast site is covered"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission Coverage matrix — every sign / broadcast site is covered execute-standard.ts — queryUniversalTxStatusFromGatewayTx+extract fires SEND-TX-199-02","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"execute-standard.ts — queryUniversalTxStatusFromGatewayTx+extract fires SEND-TX-199-02"},{"ancestorTitles":["R1 error-scenario hook emission","Coverage matrix — every sign / broadcast site is covered"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission Coverage matrix — every sign / broadcast site is covered execute-funds-only.ts — queryUniversalTxStatusFromGatewayTx+extract (EVM) fires SEND-TX-199-02","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"execute-funds-only.ts — queryUniversalTxStatusFromGatewayTx+extract (EVM) fires SEND-TX-199-02"},{"ancestorTitles":["R1 error-scenario hook emission","Coverage matrix — every sign / broadcast site is covered"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission Coverage matrix — every sign / broadcast site is covered execute-funds-only.ts — queryUniversalTxStatusFromGatewayTx+extract (SVM) fires SEND-TX-199-02","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"execute-funds-only.ts — queryUniversalTxStatusFromGatewayTx+extract (SVM) fires SEND-TX-199-02"},{"ancestorTitles":["R1 error-scenario hook emission","Coverage matrix — every sign / broadcast site is covered"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission Coverage matrix — every sign / broadcast site is covered execute-funds-payload.ts — queryUniversalTxStatusFromGatewayTx+extract fires SEND-TX-199-02","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"execute-funds-payload.ts — queryUniversalTxStatusFromGatewayTx+extract fires SEND-TX-199-02"},{"ancestorTitles":["R1 error-scenario hook emission","Coverage matrix — every sign / broadcast site is covered"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission Coverage matrix — every sign / broadcast site is covered push-chain-tx.ts — extractPcTxAndTransform (pcTx FAILED) fires SEND-TX-199-02","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"push-chain-tx.ts — extractPcTxAndTransform (pcTx FAILED) fires SEND-TX-199-02"},{"ancestorTitles":["R1 error-scenario hook emission","Coverage matrix — every sign / broadcast site is covered"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission Coverage matrix — every sign / broadcast site is covered execute-standard.ts — sendPushTx (decline) fires SEND-TX-104-04","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"execute-standard.ts — sendPushTx (decline) fires SEND-TX-104-04"},{"ancestorTitles":["R1 error-scenario hook emission","Coverage matrix — every sign / broadcast site is covered"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error-scenario hook emission Coverage matrix — every sign / broadcast site is covered execute-standard.ts — sendPushTx (non-decline) fires SEND-TX-199-02","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"execute-standard.ts — sendPushTx (non-decline) fires SEND-TX-199-02"}],"endTime":1792494880327,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/r1-error-emission.spec.ts","startTime":1792494880176,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"normalizes unified native calls into exact EQ/MAX words with zero PC default","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"normalizes unified native calls into exact EQ/MAX words with zero PC default"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"rejects retired top-level actions before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects retired top-level actions before signing"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rejects retired top-level target before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects retired top-level target before signing"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rejects retired top-level amount before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects retired top-level amount before signing"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rejects retired top-level maxCalls before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects retired top-level maxCalls before signing"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rejects retired top-level maxValueTotal before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects retired top-level maxValueTotal before signing"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rejects retired top-level ref before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects retired top-level ref before signing"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"supports multiple native MAX pins","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"supports multiple native MAX pins"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"compiles the existing EVM WALLET beneficiary and defaults asset total to zero","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"compiles the existing EVM WALLET beneficiary and defaults asset total to zero"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"supports general destination EQ/MAX pins","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"supports general destination EQ/MAX pins"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"computes top-level offsets after static arrays and preserves a raw-word round trip","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"computes top-level offsets after static arrays and preserves a raw-word round trip"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"compiles numeric Solana arg/account pins without a caller IDL","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"compiles numeric Solana arg/account pins without a caller IDL"},{"ancestorTitles":[],"duration":71,"failureDetails":[],"failureMessages":[],"fullName":"public create rejects missing options asynchronously, and update rejects malformed pairs before reads","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"public create rejects missing options asynchronously, and update rejects malformed pairs before reads"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"does not silently discard a token qualifier on an argument pin","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does not silently discard a token qualifier on an argument pin"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"reads native wallet equality as WALLET and re-encodes its exact word","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"reads native wallet equality as WALLET and re-encodes its exact word"}],"endTime":1792494880688,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/public-rule.spec.ts","startTime":1792494880336,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Orchestrator.execute — sendTransaction per-call progressHook"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.execute — sendTransaction per-call progressHook fans progress events to both init-time and per-call hooks","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"fans progress events to both init-time and per-call hooks"},{"ancestorTitles":["Orchestrator.execute — sendTransaction per-call progressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.execute — sendTransaction per-call progressHook delivers events to the init-time hook when no per-call hook is configured","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"delivers events to the init-time hook when no per-call hook is configured"},{"ancestorTitles":["Orchestrator.execute — sendTransaction per-call progressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.execute — sendTransaction per-call progressHook does not double-fire when the per-call hook is the init-time hook","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not double-fire when the per-call hook is the init-time hook"},{"ancestorTitles":["Orchestrator.execute — sendTransaction per-call progressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.execute — sendTransaction per-call progressHook delivers per-call events when no init-time hook is configured","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"delivers per-call events when no init-time hook is configured"},{"ancestorTitles":["Orchestrator.execute — sendTransaction per-call progressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.execute — sendTransaction per-call progressHook delivers per-call events when progressHook is embedded in sendTransaction params","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"delivers per-call events when progressHook is embedded in sendTransaction params"},{"ancestorTitles":["Orchestrator.execute — sendTransaction per-call progressHook"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.execute — sendTransaction per-call progressHook restores the init-time hook when execution rejects","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"restores the init-time hook when execution rejects"},{"ancestorTitles":["Orchestrator.execute — sendTransaction per-call progressHook"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Orchestrator.execute — sendTransaction per-call progressHook keeps the per-call hook active across multi-chain outer and recursive inner execute paths","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"keeps the per-call hook active across multi-chain outer and recursive inner execute paths"}],"endTime":1792494880825,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/send-transaction-progress-hook.spec.ts","startTime":1792494880693,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["R1 error classification","classifyDeclineError — true wallet rejections"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification classifyDeclineError — true wallet rejections classifies as user decline: viem UserRejectedRequestError","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classifies as user decline: viem UserRejectedRequestError"},{"ancestorTitles":["R1 error classification","classifyDeclineError — true wallet rejections"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification classifyDeclineError — true wallet rejections classifies as user decline: ethers ACTION_REJECTED","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classifies as user decline: ethers ACTION_REJECTED"},{"ancestorTitles":["R1 error classification","classifyDeclineError — true wallet rejections"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification classifyDeclineError — true wallet rejections classifies as user decline: EIP-1193 4001 code","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classifies as user decline: EIP-1193 4001 code"},{"ancestorTitles":["R1 error classification","classifyDeclineError — true wallet rejections"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification classifyDeclineError — true wallet rejections classifies as user decline: textual \"user rejected\"","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classifies as user decline: textual \"user rejected\""},{"ancestorTitles":["R1 error classification","classifyDeclineError — true wallet rejections"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification classifyDeclineError — true wallet rejections classifies as user decline: textual \"user denied\"","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classifies as user decline: textual \"user denied\""},{"ancestorTitles":["R1 error classification","classifyDeclineError — true wallet rejections"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification classifyDeclineError — true wallet rejections classifies as user decline: textual \"declined by user\"","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classifies as user decline: textual \"declined by user\""},{"ancestorTitles":["R1 error classification","classifyDeclineError — true wallet rejections"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification classifyDeclineError — true wallet rejections classifies as user decline: undefined errorMessage","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classifies as user decline: undefined errorMessage"},{"ancestorTitles":["R1 error classification","classifyDeclineError — generic sign-time failures"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification classifyDeclineError — generic sign-time failures classifies as signature failure: insufficient funds","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classifies as signature failure: insufficient funds"},{"ancestorTitles":["R1 error classification","classifyDeclineError — generic sign-time failures"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification classifyDeclineError — generic sign-time failures classifies as signature failure: contract revert during sign","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classifies as signature failure: contract revert during sign"},{"ancestorTitles":["R1 error classification","classifyDeclineError — generic sign-time failures"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification classifyDeclineError — generic sign-time failures classifies as signature failure: RPC failure","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classifies as signature failure: RPC failure"},{"ancestorTitles":["R1 error classification","classifyDeclineError — generic sign-time failures"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification classifyDeclineError — generic sign-time failures classifies as signature failure: generic error","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classifies as signature failure: generic error"},{"ancestorTitles":["R1 error classification","SEND_TX_104_04 builder"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification SEND_TX_104_04 builder emits decline copy for a real wallet rejection","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"emits decline copy for a real wallet rejection"},{"ancestorTitles":["R1 error classification","SEND_TX_104_04 builder"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification SEND_TX_104_04 builder emits signature-failed copy for a generic sign-time error","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"emits signature-failed copy for a generic sign-time error"},{"ancestorTitles":["R1 error classification","SEND_TX_104_04 builder"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification SEND_TX_104_04 builder normalizes Push Chain native balance errors in 199-02 copy","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"normalizes Push Chain native balance errors in 199-02 copy"},{"ancestorTitles":["R1 error classification","SEND_TX_104_04 builder"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification SEND_TX_104_04 builder treats undefined errorMessage as a decline","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"treats undefined errorMessage as a decline"},{"ancestorTitles":["R1 error classification","PushChainExecutionError"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification PushChainExecutionError carries a readonly PUSH_CHAIN_EXECUTION_FAILED code","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"carries a readonly PUSH_CHAIN_EXECUTION_FAILED code"},{"ancestorTitles":["R1 error classification","PushChainExecutionError"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification PushChainExecutionError gatewayTxHash defaults to undefined","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"gatewayTxHash defaults to undefined"},{"ancestorTitles":["R1 error classification","PushChainExecutionError","consumer-side classification (anti-regression vs string-prefix)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification PushChainExecutionError consumer-side classification (anti-regression vs string-prefix) instanceof correctly classifies a PushChainExecutionError whose message starts with \"Timeout\"","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"instanceof correctly classifies a PushChainExecutionError whose message starts with \"Timeout\""},{"ancestorTitles":["R1 error classification","PushChainExecutionError","consumer-side classification (anti-regression vs string-prefix)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification PushChainExecutionError consumer-side classification (anti-regression vs string-prefix) string-prefix WOULD mis-classify the same error — demonstrates the regression being prevented","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"string-prefix WOULD mis-classify the same error — demonstrates the regression being prevented"},{"ancestorTitles":["R1 error classification","PushChainExecutionError","consumer-side classification (anti-regression vs string-prefix)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R1 error classification PushChainExecutionError consumer-side classification (anti-regression vs string-prefix) instanceof distinguishes timeout error from execution failure","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"instanceof distinguishes timeout error from execution failure"}],"endTime":1792494880962,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/r1-error-classification.spec.ts","startTime":1792494880828,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["estimateNativeValueForSwap"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"estimateNativeValueForSwap uses QuoterV2 exact-output before slot0 math","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"uses QuoterV2 exact-output before slot0 math"},{"ancestorTitles":["estimateNativeValueForSwap"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"estimateNativeValueForSwap does NOT undersize nativeValueForGas when the UEA PC sits in the STF dead-zone","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does NOT undersize nativeValueForGas when the UEA PC sits in the STF dead-zone"},{"ancestorTitles":["capSwapEstimate"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"capSwapEstimate returns the full buffered estimate when balance is ample","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns the full buffered estimate when balance is ample"},{"ancestorTitles":["capSwapEstimate"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"capSwapEstimate reduces the buffer to balance-reserve while still above the swap floor","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"reduces the buffer to balance-reserve while still above the swap floor"},{"ancestorTitles":["capSwapEstimate"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"capSwapEstimate does NOT undersize below the swap floor (the STF bug) - returns true need","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does NOT undersize below the swap floor (the STF bug) - returns true need"},{"ancestorTitles":["capSwapEstimate"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"capSwapEstimate returns the full requirement when balance is below the reserve","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns the full requirement when balance is below the reserve"},{"ancestorTitles":["capSwapEstimate"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"capSwapEstimate preserves legacy behavior when no floor is supplied (minNeeded defaults to 0)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"preserves legacy behavior when no floor is supplied (minNeeded defaults to 0)"}],"endTime":1792494881093,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/gas-calculator.spec.ts","startTime":1792494880965,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 301 — {Source Chain}'s Executor Account Detected","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"301 — {Source Chain}'s Executor Account Detected"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 302-01 — Estimating {Source Chain} Gas","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"302-01 — Estimating {Source Chain} Gas"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 302-02 — {Source Chain} Gas Estimated","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"302-02 — {Source Chain} Gas Estimated"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 303-03-01 — Adjusting Prepaid Deposit to be >$1","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"303-03-01 — Adjusting Prepaid Deposit to be >$1"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 303-03-02 — Prepaid Deposit in range (>=$1 and <$10)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"303-03-02 — Prepaid Deposit in range (>=$1 and <$10)"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 303-03-03 — Prepaid Deposit Exceeds $10 Cap, splitting Gas and Funds","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"303-03-03 — Prepaid Deposit Exceeds $10 Cap, splitting Gas and Funds"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 303-01 — Resolving Execution Accounts on Chains","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"303-01 — Resolving Execution Accounts on Chains"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 303-02 — Execution Accounts Resolved","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"303-02 — Execution Accounts Resolved"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 304-01 — Awaiting Signature","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"304-01 — Awaiting Signature"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 304-02 — Signature Received","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"304-02 — Signature Received"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 304-03 — Verification Success","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"304-03 — Verification Success"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 304-04 — Verification Declined (genuine user decline)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"304-04 — Verification Declined (genuine user decline)"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 307 — Broadcasting from Push Chain → {Source Chain}","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"307 — Broadcasting from Push Chain → {Source Chain}"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 309-01 — Awaiting {Source Chain} Relay","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"309-01 — Awaiting {Source Chain} Relay"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 309-02 — Syncing State with {Source Chain}","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"309-02 — Syncing State with {Source Chain}"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 309-03 — {Source Chain} Tx Confirmed","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"309-03 — {Source Chain} Tx Confirmed"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 310-01 — {Source Chain} → Push Chain Inbound Tx Submitted","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"310-01 — {Source Chain} → Push Chain Inbound Tx Submitted"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 310-02 — Syncing State with Push Chain for Inbound Tx","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"310-02 — Syncing State with Push Chain for Inbound Tx"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 399-01 — Push Chain Inbound Tx Success","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"399-01 — Push Chain Inbound Tx Success"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 399-02 [inbound] — Push Chain Inbound Tx Failed","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"399-02 [inbound] — Push Chain Inbound Tx Failed"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 399-02 [outbound] — {Source Chain} Tx Failed","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"399-02 [outbound] — {Source Chain} Tx Failed"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 399-02 [push] — Push Chain Tx Failed","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"399-02 [push] — Push Chain Tx Failed"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 399-03 [inbound] — Push Chain Inbound Tx Timeout","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"399-03 [inbound] — Push Chain Inbound Tx Timeout"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 399-03 [outbound] — Push Chain Inbound Tx Timeout","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"399-03 [outbound] — Push Chain Inbound Tx Timeout"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 399-03 [push] — Push Chain Inbound Tx Timeout","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"399-03 [push] — Push Chain Inbound Tx Timeout"},{"ancestorTitles":["Route 3 spec strings (301–399)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Route 3 spec strings (301–399) 399-99 — Intermediate {Source Chain} to Push Tx Completed","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"399-99 — Intermediate {Source Chain} to Push Tx Completed"}],"endTime":1792494881316,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/progress-hook/__tests__/r3-spec-strings.spec.ts","startTime":1792494881101,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["multichain (multi-hop) progress hooks"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"multichain (multi-hop) progress hooks SEND_TX_001 renders hop count and chain arrow","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"SEND_TX_001 renders hop count and chain arrow"},{"ancestorTitles":["multichain (multi-hop) progress hooks"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"multichain (multi-hop) progress hooks SEND_TX_002_01 includes hop number/total and from→to chains","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"SEND_TX_002_01 includes hop number/total and from→to chains"},{"ancestorTitles":["multichain (multi-hop) progress hooks"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"multichain (multi-hop) progress hooks SEND_TX_002_99_99 marks intermediate completion","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"SEND_TX_002_99_99 marks intermediate completion"},{"ancestorTitles":["multichain (multi-hop) progress hooks"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"multichain (multi-hop) progress hooks SEND_TX_003_03 uses Multichain user-facing text","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"SEND_TX_003_03 uses Multichain user-facing text"},{"ancestorTitles":["multichain (multi-hop) progress hooks"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"multichain (multi-hop) progress hooks SEND_TX_999_01 emits multichain success","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"SEND_TX_999_01 emits multichain success"},{"ancestorTitles":["multichain (multi-hop) progress hooks"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"multichain (multi-hop) progress hooks SEND_TX_999_02 reports failedAt and error","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"SEND_TX_999_02 reports failedAt and error"},{"ancestorTitles":["multichain (multi-hop) progress hooks"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"multichain (multi-hop) progress hooks SEND_TX_999_03 reports timeout location","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"SEND_TX_999_03 reports timeout location"}],"endTime":1792494881454,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/progress-hook/__tests__/multichain-hooks.spec.ts","startTime":1792494881321,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["reconstructProgressEvents — cascade multichain replay"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"reconstructProgressEvents — cascade multichain replay recovers user-level hopCount from an R3 leg with merged R1 calls","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"recovers user-level hopCount from an R3 leg with merged R1 calls"},{"ancestorTitles":["reconstructProgressEvents — cascade multichain replay"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"reconstructProgressEvents — cascade multichain replay falls back to outboundTx.length when no R3 legs (pure R2 cascade)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"falls back to outboundTx.length when no R3 legs (pure R2 cascade)"},{"ancestorTitles":["reconstructProgressEvents — cascade multichain replay"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"reconstructProgressEvents — cascade multichain replay clamps defensively — never reports fewer hops than external legs visible","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"clamps defensively — never reports fewer hops than external legs visible"},{"ancestorTitles":["reconstructProgressEvents — cascade multichain replay"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"reconstructProgressEvents — cascade multichain replay emits SEND-TX-999-02 with failedAt on a reverted leg","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"emits SEND-TX-999-02 with failedAt on a reverted leg"},{"ancestorTitles":["reconstructProgressEvents — single-route R2 pre-flight reconstruction"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"reconstructProgressEvents — single-route R2 pre-flight reconstruction reconstructs R2 stream with NATIVE 203-03 only (no funds.amount → no PRC-20 hook)","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"reconstructs R2 stream with NATIVE 203-03 only (no funds.amount → no PRC-20 hook)"},{"ancestorTitles":["reconstructProgressEvents — single-route R2 pre-flight reconstruction"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"reconstructProgressEvents — single-route R2 pre-flight reconstruction reconstructs R2 stream with both PRC-20 and NATIVE 203-03 when funds.amount > 0","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"reconstructs R2 stream with both PRC-20 and NATIVE 203-03 when funds.amount > 0"},{"ancestorTitles":["reconstructProgressEvents — single-route R3 pre-flight reconstruction"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"reconstructProgressEvents — single-route R3 pre-flight reconstruction reconstructs R3 stream with single NATIVE 303-04 from historical tx data","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"reconstructs R3 stream with single NATIVE 303-04 from historical tx data"}],"endTime":1792494881587,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/tx-transformer-multichain.spec.ts","startTime":1792494881456,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["trackTransaction() chain guard"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"trackTransaction() chain guard throws an actionable error naming the offending chain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws an actionable error naming the offending chain"},{"ancestorTitles":["trackTransaction() chain guard"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"trackTransaction() chain guard points the caller at PushChain.CONSTANTS.CHAIN","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"points the caller at PushChain.CONSTANTS.CHAIN"},{"ancestorTitles":["trackTransaction() chain guard"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"trackTransaction() chain guard rejects a raw numeric chainId passed in place of a CHAIN enum","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a raw numeric chainId passed in place of a CHAIN enum"}],"endTime":1792494881739,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/track-transaction-guard.spec.ts","startTime":1792494881591,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["resolveRequiredFunds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolveRequiredFunds uses gas fee plus execute value when no override is provided","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"uses gas fee plus execute value when no override is provided"},{"ancestorTitles":["resolveRequiredFunds"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"resolveRequiredFunds uses the override when route-level required funds are higher","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"uses the override when route-level required funds are higher"},{"ancestorTitles":["resolveRequiredFunds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolveRequiredFunds keeps the base required funds when the override is lower","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"keeps the base required funds when the override is lower"}],"endTime":1792494882065,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/execute-standard-required-funds.spec.ts","startTime":1792494881741,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["executeFundsOnly — PC20 burn backstop"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"executeFundsOnly — PC20 burn backstop refuses to broadcast a PC20 import (would burn the wrapper and lock the token)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"refuses to broadcast a PC20 import (would burn the wrapper and lock the token)"},{"ancestorTitles":["executeFundsOnly — PC20 burn backstop"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"executeFundsOnly — PC20 burn backstop names the offending path so the failure is diagnosable","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"names the offending path so the failure is diagnosable"},{"ancestorTitles":["executeFundsOnly — PC20 burn backstop"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"executeFundsOnly — PC20 burn backstop reports the wrapper being burned, not the canonical token","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"reports the wrapper being burned, not the canonical token"},{"ancestorTitles":["executeFundsOnly — PC20 burn backstop"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"executeFundsOnly — PC20 burn backstop does not fire for an export — locking the source token is the safe direction","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does not fire for an export — locking the source token is the safe direction"},{"ancestorTitles":["executeFundsOnly — PC20 burn backstop"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"executeFundsOnly — PC20 burn backstop does not fire for an ordinary PRC20 funds transfer","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does not fire for an ordinary PRC20 funds transfer"}],"endTime":1792494882206,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/__tests__/funds-only-burn-guard.spec.ts","startTime":1792494882068,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["cascade buildHopDescriptor — SVM CEA-ATA rent bump wire-in"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"cascade buildHopDescriptor — SVM CEA-ATA rent bump wire-in re-queries with CEA ATA finalize budget for cascade SPL hop when ATA missing","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"re-queries with CEA ATA finalize budget for cascade SPL hop when ATA missing"},{"ancestorTitles":["cascade buildHopDescriptor — SVM CEA-ATA rent bump wire-in"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"cascade buildHopDescriptor — SVM CEA-ATA rent bump wire-in bumps native-SOL hop to the base finalize budget without ATA query","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"bumps native-SOL hop to the base finalize budget without ATA query"},{"ancestorTitles":["cascade buildHopDescriptor — SVM CEA-ATA rent bump wire-in"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"cascade buildHopDescriptor — SVM CEA-ATA rent bump wire-in resolves Push-side pSOL to native SOL before estimating cascade rent","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"resolves Push-side pSOL to native SOL before estimating cascade rent"},{"ancestorTitles":["cascade buildHopDescriptor — SVM CEA-ATA rent bump wire-in"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"cascade buildHopDescriptor — SVM CEA-ATA rent bump wire-in uses only the base finalize budget when ATA already exists","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"uses only the base finalize budget when ATA already exists"}],"endTime":1792494882340,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/cascade-svm-rent.spec.ts","startTime":1792494882209,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["buildSvmPayloadFromParams — prepareTransaction parity"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmPayloadFromParams — prepareTransaction parity produces byte-identical svmPayload vs legacy svmExecute for amount=0","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"produces byte-identical svmPayload vs legacy svmExecute for amount=0"},{"ancestorTitles":["buildSvmPayloadFromParams — prepareTransaction parity"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmPayloadFromParams — prepareTransaction parity produces byte-identical svmPayload for non-zero amount","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"produces byte-identical svmPayload for non-zero amount"},{"ancestorTitles":["buildSvmPayloadFromParams — prepareTransaction parity"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmPayloadFromParams — prepareTransaction parity returns empty payload + to.address targetBytes for withdraw-only (no data)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"returns empty payload + to.address targetBytes for withdraw-only (no data)"},{"ancestorTitles":["buildSvmPayloadFromParams — prepareTransaction parity"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmPayloadFromParams — prepareTransaction parity returns empty payload when data is the empty-hex sentinel \"0x\"","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns empty payload when data is the empty-hex sentinel \"0x\""},{"ancestorTitles":["buildSvmPayloadFromParams — prepareTransaction parity"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"buildSvmPayloadFromParams — prepareTransaction parity throws at submit time if IDL was never registered for the program","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws at submit time if IDL was never registered for the program"}],"endTime":1792494882477,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/svm-idl/build-payload.spec.ts","startTime":1792494882343,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Gap B: terminal-suppression flag on OrchestratorContext","R3 (CEA_TO_PUSH)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Gap B: terminal-suppression flag on OrchestratorContext R3 (CEA_TO_PUSH) suppresses 399-02 when 304-04 has fired (single terminal)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"suppresses 399-02 when 304-04 has fired (single terminal)"},{"ancestorTitles":["Gap B: terminal-suppression flag on OrchestratorContext","R3 (CEA_TO_PUSH)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Gap B: terminal-suppression flag on OrchestratorContext R3 (CEA_TO_PUSH) emits 399-02 (phase=push) when no inner terminal fired (pre-sign failure)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"emits 399-02 (phase=push) when no inner terminal fired (pre-sign failure)"},{"ancestorTitles":["Gap B: terminal-suppression flag on OrchestratorContext","R3 (CEA_TO_PUSH)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Gap B: terminal-suppression flag on OrchestratorContext R3 (CEA_TO_PUSH) recursive inner call does not emit terminal even if flag is unset","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"recursive inner call does not emit terminal even if flag is unset"},{"ancestorTitles":["Gap B: terminal-suppression flag on OrchestratorContext","R2 (UOA_TO_CEA)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Gap B: terminal-suppression flag on OrchestratorContext R2 (UOA_TO_CEA) suppresses 299-02 when 204-04 has fired","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"suppresses 299-02 when 204-04 has fired"},{"ancestorTitles":["Gap B: terminal-suppression flag on OrchestratorContext","R2 (UOA_TO_CEA)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Gap B: terminal-suppression flag on OrchestratorContext R2 (UOA_TO_CEA) emits 299-02 when no inner terminal fired","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"emits 299-02 when no inner terminal fired"},{"ancestorTitles":["Gap B: terminal-suppression flag on OrchestratorContext","R1 (UOA_TO_PUSH)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Gap B: terminal-suppression flag on OrchestratorContext R1 (UOA_TO_PUSH) suppresses 199-02 when 104-04 has fired (user decline)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"suppresses 199-02 when 104-04 has fired (user decline)"},{"ancestorTitles":["Gap B: terminal-suppression flag on OrchestratorContext","R1 (UOA_TO_PUSH)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Gap B: terminal-suppression flag on OrchestratorContext R1 (UOA_TO_PUSH) suppresses second 199-02 when inner pipeline already fired 199-02","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"suppresses second 199-02 when inner pipeline already fired 199-02"},{"ancestorTitles":["Gap B: terminal-suppression flag on OrchestratorContext","Flag lifecycle (reset at execute() entry)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Gap B: terminal-suppression flag on OrchestratorContext Flag lifecycle (reset at execute() entry) fresh ctx does not have flag set — outer catch fires terminal","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"fresh ctx does not have flag set — outer catch fires terminal"},{"ancestorTitles":["Gap B: terminal-suppression flag on OrchestratorContext","Flag lifecycle (reset at execute() entry)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Gap B: terminal-suppression flag on OrchestratorContext Flag lifecycle (reset at execute() entry) flag from a prior execute() is reset at the start of the next one","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"flag from a prior execute() is reset at the start of the next one"}],"endTime":1792494882716,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/terminal-suppression.spec.ts","startTime":1792494882480,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["UniversalTxResponse.wait() Push-chain failure gate"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"UniversalTxResponse.wait() Push-chain failure gate returns the failed Push receipt without polling for a nonexistent outbound","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"returns the failed Push receipt without polling for a nonexistent outbound"}],"endTime":1792494882880,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/response-builder-push-revert.spec.ts","startTime":1792494882718,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["resolveSvmCall — byte-for-byte parity against legacy svmExecute"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"resolveSvmCall — byte-for-byte parity against legacy svmExecute produces the same triple as hand-rolled buildReceiveSol* helpers (amount=0)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"produces the same triple as hand-rolled buildReceiveSol* helpers (amount=0)"},{"ancestorTitles":["resolveSvmCall — byte-for-byte parity against legacy svmExecute"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"resolveSvmCall — byte-for-byte parity against legacy svmExecute preserves parity for non-zero amount","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"preserves parity for non-zero amount"},{"ancestorTitles":["resolveSvmCall — byte-for-byte parity against legacy svmExecute"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"resolveSvmCall — byte-for-byte parity against legacy svmExecute throws when no IDL is registered","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws when no IDL is registered"},{"ancestorTitles":["resolveSvmCall — byte-for-byte parity against legacy svmExecute"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolveSvmCall — byte-for-byte parity against legacy svmExecute throws when discriminator does not match any instruction","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws when discriminator does not match any instruction"}],"endTime":1792494883038,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/svm-idl/resolve.spec.ts","startTime":1792494882882,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"recognizes a verified 7702 self-call and retains every native agent action","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"recognizes a verified 7702 self-call and retains every native agent action"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"recognizes a verified UEA multicall carrying single agent-door entries","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"recognizes a verified UEA multicall carrying single agent-door entries"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"does not label an arbitrary forwarding contract as a trusted sender batch","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not label an arbitrary forwarding contract as a trusted sender batch"}],"endTime":1792494883385,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/native-batch-response.spec.ts","startTime":1792494883040,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["SVM PC20 finalize rent floor"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"SVM PC20 finalize rent floor covers mint and state rent on a first export","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"covers mint and state rent on a first export"},{"ancestorTitles":["SVM PC20 finalize rent floor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM PC20 finalize rent floor drops deployment rents on a repeat export but keeps the ATA","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"drops deployment rents on a repeat export but keeps the ATA"},{"ancestorTitles":["SVM PC20 finalize rent floor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM PC20 finalize rent floor pins the rent constants to Solana protocol values","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"pins the rent constants to Solana protocol values"}],"endTime":1792494883571,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm-rent-pc20.spec.ts","startTime":1792494883388,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["PC20 inbound — Push-side payload"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PC20 inbound — Push-side payload transfers the resolved Push-native PC20, not the wrapper","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"transfers the resolved Push-native PC20, not the wrapper"},{"ancestorTitles":["PC20 inbound — Push-side payload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 inbound — Push-side payload transfers the full funds amount to the requested recipient","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"transfers the full funds amount to the requested recipient"},{"ancestorTitles":["PC20 inbound — Push-side payload"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PC20 inbound — Push-side payload orders funds-plus-data as transfer then call","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"orders funds-plus-data as transfer then call"},{"ancestorTitles":["PC20 inbound — Push-side payload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 inbound — Push-side payload leaves distribution to the caller for an explicit MultiCall[]","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"leaves distribution to the caller for an explicit MultiCall[]"},{"ancestorTitles":["PC20 inbound — Push-side payload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 inbound — Push-side payload never routes a PC20 through the PRC20 synthetic lookup","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"never routes a PC20 through the PRC20 synthetic lookup"},{"ancestorTitles":["PC20 inbound — approval behavior"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 inbound — approval behavior uses a mechanism that is neither approve nor native","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"uses a mechanism that is neither approve nor native"},{"ancestorTitles":["PC20 inbound — approval behavior"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 inbound — approval behavior carries the wrapper address for the gateway request","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"carries the wrapper address for the gateway request"}],"endTime":1792494883799,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/__tests__/inbound-payload.spec.ts","startTime":1792494883579,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["read-state public surface"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read-state public surface keeps registry helpers out of the public package exports","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"keeps registry helpers out of the public package exports"},{"ancestorTitles":["read-state public surface"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"read-state public surface exports the pure helpers, errors and enums","invocations":1,"location":null,"numPassingAsserts":30,"retryReasons":[],"status":"passed","title":"exports the pure helpers, errors and enums"},{"ancestorTitles":["read-state public surface"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read-state public surface PushChain.CONSTANTS.READ pins the contract-derived values","invocations":1,"location":null,"numPassingAsserts":16,"retryReasons":[],"status":"passed","title":"PushChain.CONSTANTS.READ pins the contract-derived values"}],"endTime":1792494884092,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/public-surface.spec.ts","startTime":1792494883802,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["PushClient","pushToUSDC"],"duration":14,"failureDetails":[],"failureMessages":[],"fullName":"PushClient pushToUSDC converts 1 PUSH (1e18) to 0.1 USDC (1e7)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"converts 1 PUSH (1e18) to 0.1 USDC (1e7)"},{"ancestorTitles":["PushClient","pushToUSDC"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PushClient pushToUSDC returns 0 when input is 0","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns 0 when input is 0"},{"ancestorTitles":["PushClient","usdcToPush"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PushClient usdcToPush converts 0.1 USDC (1e7) to 1 PUSH (1e18)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"converts 0.1 USDC (1e7) to 1 PUSH (1e18)"},{"ancestorTitles":["PushClient","usdcToPush"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PushClient usdcToPush returns 0 when input is 0","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns 0 when input is 0"},{"ancestorTitles":["PushClient","PushClient Msg & Cosmos Tx Tests"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PushClient PushClient Msg & Cosmos Tx Tests decodes the live Donut Params protobuf wire shape","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"decodes the live Donut Params protobuf wire shape"},{"ancestorTitles":["PushClient","PushClient Msg & Cosmos Tx Tests"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"PushClient PushClient Msg & Cosmos Tx Tests signs gasless Cosmos transactions at the on-chain gas cap","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"signs gasless Cosmos transactions at the on-chain gas cap"},{"ancestorTitles":["PushClient","PushClient Msg & Cosmos Tx Tests"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PushClient PushClient Msg & Cosmos Tx Tests clamps gasless Cosmos transactions to a lower governance cap","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"clamps gasless Cosmos transactions to a lower governance cap"},{"ancestorTitles":["PushClient","PushClient Msg & Cosmos Tx Tests"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PushClient PushClient Msg & Cosmos Tx Tests does not increase the SDK ceiling when governance raises the cap","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does not increase the SDK ceiling when governance raises the cap"},{"ancestorTitles":["PushClient","PushClient Msg & Cosmos Tx Tests"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PushClient PushClient Msg & Cosmos Tx Tests falls back to the safe SDK ceiling when the params query fails","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"falls back to the safe SDK ceiling when the params query fails"},{"ancestorTitles":["PushClient","PushClient Msg & Cosmos Tx Tests"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"PushClient PushClient Msg & Cosmos Tx Tests caches the gasless cap for subsequent signatures","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"caches the gasless cap for subsequent signatures"},{"ancestorTitles":["PushClient","PushClient Msg & Cosmos Tx Tests"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PushClient PushClient Msg & Cosmos Tx Tests does not query gasless params for a non-gasless Cosmos message","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not query gasless params for a non-gasless Cosmos message"},{"ancestorTitles":["PushClient","PushClient Msg & Cosmos Tx Tests"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PushClient PushClient Msg & Cosmos Tx Tests creates MsgDeployUEA","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"creates MsgDeployUEA"},{"ancestorTitles":["PushClient","PushClient Msg & Cosmos Tx Tests"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PushClient PushClient Msg & Cosmos Tx Tests creates MsgMintPC","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"creates MsgMintPC"},{"ancestorTitles":["PushClient","PushClient Msg & Cosmos Tx Tests"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"PushClient PushClient Msg & Cosmos Tx Tests creates MsgExecutePayload","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"creates MsgExecutePayload"},{"ancestorTitles":["PushClient","PushClient Msg & Cosmos Tx Tests"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PushClient PushClient Msg & Cosmos Tx Tests creates TxBody from multiple messages","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"creates TxBody from multiple messages"},{"ancestorTitles":["PushClient","PushClient Msg & Cosmos Tx Tests"],"duration":null,"failureDetails":[],"failureMessages":[],"fullName":"PushClient PushClient Msg & Cosmos Tx Tests signs tx","invocations":1,"location":null,"numPassingAsserts":0,"retryReasons":[],"status":"pending","title":"signs tx"},{"ancestorTitles":["PushClient","PushClient Msg & Cosmos Tx Tests"],"duration":null,"failureDetails":[],"failureMessages":[],"fullName":"PushClient PushClient Msg & Cosmos Tx Tests get tx","invocations":1,"location":null,"numPassingAsserts":0,"retryReasons":[],"status":"pending","title":"get tx"}],"endTime":1792494884221,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/push-client/push-client.spec.ts","startTime":1792494884094,"status":"focused","summary":""},{"assertionResults":[{"ancestorTitles":["PC20 tracked leg selection"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 tracked leg selection picks the PC20 burn leg, not the trailing fee-credit leg","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"picks the PC20 burn leg, not the trailing fee-credit leg"},{"ancestorTitles":["PC20 tracked leg selection"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PC20 tracked leg selection finds the PC20 leg regardless of emission order","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"finds the PC20 leg regardless of emission order"},{"ancestorTitles":["PC20 tracked leg selection"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 tracked leg selection returns null when no PC20 leg is present, leaving default behaviour","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns null when no PC20 leg is present, leaving default behaviour"},{"ancestorTitles":["PC20 tracked leg selection"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 tracked leg selection ignores a payload that merely contains the selector later on","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"ignores a payload that merely contains the selector later on"},{"ancestorTitles":["PC20 tracked leg selection"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 tracked leg selection skips logs that are not decodable UniversalTx events","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"skips logs that are not decodable UniversalTx events"}],"endTime":1792494884356,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg.spec.ts","startTime":1792494884223,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["buildReadSpecFromPreflight — defaults"],"duration":12,"failureDetails":[],"failureMessages":[],"fullName":"buildReadSpecFromPreflight — defaults rejects a preflight from another destination","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a preflight from another destination"},{"ancestorTitles":["buildReadSpecFromPreflight — defaults"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"buildReadSpecFromPreflight — defaults pins blockNumber at observedChainHeight − minConfirmations and sets expiry from the Push head","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"pins blockNumber at observedChainHeight − minConfirmations and sets expiry from the Push head"},{"ancestorTitles":["buildReadSpecFromPreflight — defaults"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildReadSpecFromPreflight — defaults backs off by a larger minConfirmations and clamps at 1","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"backs off by a larger minConfirmations and clamps at 1"},{"ancestorTitles":["buildReadSpecFromPreflight — defaults"],"duration":63,"failureDetails":[],"failureMessages":[],"fullName":"buildReadSpecFromPreflight — defaults value = protocolFee + sized budget; maxFee = value by default, or value × (1 + bps)","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"value = protocolFee + sized budget; maxFee = value by default, or value × (1 + bps)"},{"ancestorTitles":["buildReadSpecFromPreflight — defaults"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildReadSpecFromPreflight — defaults honours explicit callbackBudget / maxFee / expiryPushChainHeight / blockNumber","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"honours explicit callbackBudget / maxFee / expiryPushChainHeight / blockNumber"},{"ancestorTitles":["buildReadSpecFromPreflight — defaults"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildReadSpecFromPreflight — defaults EVM owner defaults to refundTo (20 bytes) and can be overridden","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"EVM owner defaults to refundTo (20 bytes) and can be overridden"},{"ancestorTitles":["buildReadSpecFromPreflight — defaults"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildReadSpecFromPreflight — defaults SVM: owner is the raw 32-byte pubkey from the query; blockNumber doubles as minSlot; `owner` param rejected","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"SVM: owner is the raw 32-byte pubkey from the query; blockNumber doubles as minSlot; `owner` param rejected"},{"ancestorTitles":["buildReadSpecFromPreflight — defaults"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildReadSpecFromPreflight — defaults web2: blockNumber forced to 0; a non-zero pin is rejected","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"web2: blockNumber forced to 0; a non-zero pin is rejected"},{"ancestorTitles":["buildReadSpecFromPreflight — defaults"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildReadSpecFromPreflight — defaults throws ZERO_REVERT_RECIPIENT when neither refundTo nor a default is available","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"throws ZERO_REVERT_RECIPIENT when neither refundTo nor a default is available"},{"ancestorTitles":["buildReadSpecFromPreflight — defaults"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildReadSpecFromPreflight — defaults carries encoder warnings through","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"carries encoder warnings through"},{"ancestorTitles":["buildReadSpecFromPreflight — defaults"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildReadSpecFromPreflight — defaults encodedSpec round-trips and specTuple is positional","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"encodedSpec round-trips and specTuple is positional"},{"ancestorTitles":["toCallData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"toCallData default arg order is (spec, callbackGasLimit) and value is the prepared msg.value","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"default arg order is (spec, callbackGasLimit) and value is the prepared msg.value"},{"ancestorTitles":["toCallData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"toCallData args remaps into the app signature","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"args remaps into the app signature"},{"ancestorTitles":["prepareRead — refundTo default and the UEA-aware contract warning"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"prepareRead — refundTo default and the UEA-aware contract warning defaults refundTo to the sending account","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"defaults refundTo to the sending account"},{"ancestorTitles":["prepareRead — refundTo default and the UEA-aware contract warning"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"prepareRead — refundTo default and the UEA-aware contract warning a UEA refundTo (contract with code, isUEA=true) does NOT warn","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"a UEA refundTo (contract with code, isUEA=true) does NOT warn"},{"ancestorTitles":["prepareRead — refundTo default and the UEA-aware contract warning"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"prepareRead — refundTo default and the UEA-aware contract warning a non-UEA contract refundTo warns about a possibly forfeited refund","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"a non-UEA contract refundTo warns about a possibly forfeited refund"},{"ancestorTitles":["prepareRead — refundTo default and the UEA-aware contract warning"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"prepareRead — refundTo default and the UEA-aware contract warning an EIP-7702-delegated EOA (code 0xef0100…) is treated as an EOA — no warning","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"an EIP-7702-delegated EOA (code 0xef0100…) is treated as an EOA — no warning"},{"ancestorTitles":["prepareRead — refundTo default and the UEA-aware contract warning"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"prepareRead — refundTo default and the UEA-aware contract warning throws when no refundTo can be resolved (read-only client without an account)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws when no refundTo can be resolved (read-only client without an account)"},{"ancestorTitles":["simulateRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"simulateRead ok when the call does not revert","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"ok when the call does not revert"},{"ancestorTitles":["simulateRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"simulateRead reports a generic revert with viem short message","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"reports a generic revert with viem short message"},{"ancestorTitles":["simulateRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"simulateRead flags a stale preflight","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"flags a stale preflight"},{"ancestorTitles":["simulateRead"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"simulateRead is not tripped by an unrelated ERC-20 abi passed as the app abi","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"is not tripped by an unrelated ERC-20 abi passed as the app abi"}],"endTime":1792494884547,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/spec-builder.spec.ts","startTime":1792494884359,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["ReadRequested topic0 is pinned to the node decoder"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"ReadRequested topic0 is pinned to the node decoder matches the hash derived independently with cast from read_event.go","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"matches the hash derived independently with cast from read_event.go"},{"ancestorTitles":["parseReadRequestsFromReceipt"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"parseReadRequestsFromReceipt parses the real EOA request receipt (read 0xf3d62fb9…)","invocations":1,"location":null,"numPassingAsserts":12,"retryReasons":[],"status":"passed","title":"parses the real EOA request receipt (read 0xf3d62fb9…)"},{"ancestorTitles":["parseReadRequestsFromReceipt"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"parseReadRequestsFromReceipt parses the UEA-originated receipt (read 0xdc0a66ba…) — two logs, one from the UEA, one from the contract","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"parses the UEA-originated receipt (read 0xdc0a66ba…) — two logs, one from the UEA, one from the contract"},{"ancestorTitles":["parseReadRequestsFromReceipt"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"parseReadRequestsFromReceipt ignores a matching topic0 emitted by a DIFFERENT address (address filter is a security control)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"ignores a matching topic0 emitted by a DIFFERENT address (address filter is a security control)"},{"ancestorTitles":["parseReadRequestsFromReceipt"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"parseReadRequestsFromReceipt returns two ids in log order when one tx requests two reads","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns two ids in log order when one tx requests two reads"},{"ancestorTitles":["parseFulfilOutcome"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"parseFulfilOutcome delivered: the real fulfil receipt carries ReadFulfilled","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"delivered: the real fulfil receipt carries ReadFulfilled"},{"ancestorTitles":["parseFulfilOutcome"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"parseFulfilOutcome NOT delivered: the reverting-callback fulfil receipt carries CallbackFailed with the reason","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"NOT delivered: the reverting-callback fulfil receipt carries CallbackFailed with the reason"},{"ancestorTitles":["parseFulfilOutcome"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"parseFulfilOutcome settlement: burned + refunded from CallbackGasReported, refundTo from RefundSent","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"settlement: burned + refunded from CallbackGasReported, refundTo from RefundSent"},{"ancestorTitles":["parseFulfilOutcome"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"parseFulfilOutcome is scoped to the requested id — another request in the same receipt is ignored","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"is scoped to the requested id — another request in the same receipt is ignored"}],"endTime":1792494884592,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/read-events.spec.ts","startTime":1792494884549,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["ucallback.v1 codecs against real Donut responses"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"ucallback.v1 codecs against real Donut responses skips future unknown fields while preserving known record bytes","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"skips future unknown fields while preserving known record bytes"},{"ancestorTitles":["ucallback.v1 codecs against real Donut responses"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"ucallback.v1 codecs against real Donut responses rejects uint64 heights that cannot be represented safely instead of rounding","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects uint64 heights that cannot be represented safely instead of rounding"},{"ancestorTitles":["ucallback.v1 codecs against real Donut responses"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"ucallback.v1 codecs against real Donut responses SUCCESS EVM read 0xf3d62fb9… — every field","invocations":1,"location":null,"numPassingAsserts":23,"retryReasons":[],"status":"passed","title":"SUCCESS EVM read 0xf3d62fb9… — every field"},{"ancestorTitles":["ucallback.v1 codecs against real Donut responses"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"ucallback.v1 codecs against real Donut responses ERROR read 0xeba3eb9e… — INVALID_QUERY with empty result_data","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"ERROR read 0xeba3eb9e… — INVALID_QUERY with empty result_data"},{"ancestorTitles":["ucallback.v1 codecs against real Donut responses"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"ucallback.v1 codecs against real Donut responses EXPIRED read 0x4a6e27e0… — one pc_tx, expiry_attempts 1, no result","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"EXPIRED read 0x4a6e27e0… — one pc_tx, expiry_attempts 1, no result"},{"ancestorTitles":["ucallback.v1 codecs against real Donut responses"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"ucallback.v1 codecs against real Donut responses callback-reverted read 0x9f0466e2… — node still says FULFILLED with SUCCESS (documented semantics)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"callback-reverted read 0x9f0466e2… — node still says FULFILLED with SUCCESS (documented semantics)"},{"ancestorTitles":["ucallback.v1 codecs against real Donut responses"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"ucallback.v1 codecs against real Donut responses SVM and web2 reads decode with their namespaces and result bytes","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"SVM and web2 reads decode with their namespaces and result bytes"},{"ancestorTitles":["ucallback.v1 codecs against real Donut responses"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"ucallback.v1 codecs against real Donut responses ReadsByTx keyed on the SDK tx hash — the UEA-originated read","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"ReadsByTx keyed on the SDK tx hash — the UEA-originated read"},{"ancestorTitles":["ucallback.v1 codecs against real Donut responses"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"ucallback.v1 codecs against real Donut responses request encoders produce the exact bytes the node expects (field 1, wire type 2)","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"request encoders produce the exact bytes the node expects (field 1, wire type 2)"},{"ancestorTitles":["ucallback.v1 codecs against real Donut responses"],"duration":5,"failureDetails":[],"failureMessages":[],"fullName":"ucallback.v1 codecs against real Donut responses UniversalRead round-trips through encode/decode","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"UniversalRead round-trips through encode/decode"},{"ancestorTitles":["ucallback.v1 codecs against real Donut responses"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"ucallback.v1 codecs against real Donut responses empty response → no record, no throw","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"empty response → no record, no throw"}],"endTime":1792494884633,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/ucallback-codec.spec.ts","startTime":1792494884594,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"detects mint owner TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA and derives its ATA","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"detects mint owner TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA and derives its ATA"},{"ancestorTitles":[],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"detects mint owner TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb and derives its ATA","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"detects mint owner TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb and derives its ATA"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"rejects missing mints, wrong owners and token accounts instead of guessing","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"rejects missing mints, wrong owners and token accounts instead of guessing"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"falls back on RPC failure but never defaults the token program","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"falls back on RPC failure but never defaults the token program"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"uses unchanged raw-account wire bytes while retaining IDL decoding metadata","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"uses unchanged raw-account wire bytes while retaining IDL decoding metadata"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"carries account decoding through async public preparation without a destination query","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"carries account decoding through async public preparation without a destination query"},{"ancestorTitles":[],"duration":5,"failureDetails":[],"failureMessages":[],"fullName":"rejects invalid IDLs and incompatible public options","invocations":1,"location":null,"numPassingAsserts":9,"retryReasons":[],"status":"passed","title":"rejects invalid IDLs and incompatible public options"},{"ancestorTitles":["idl without functionName: the layout comes from the discriminator"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"idl without functionName: the layout comes from the discriminator decodes each account type with the layout its 8-byte discriminator names","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"decodes each account type with the layout its 8-byte discriminator names"},{"ancestorTitles":["idl without functionName: the layout comes from the discriminator"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"idl without functionName: the layout comes from the discriminator names the discriminator when nothing matches","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"names the discriminator when nothing matches"},{"ancestorTitles":["idl without functionName: the layout comes from the discriminator"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"idl without functionName: the layout comes from the discriminator accepts functionName in snake, camel or Pascal case and pins the layout","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"accepts functionName in snake, camel or Pascal case and pins the layout"},{"ancestorTitles":["idl with the program id as subject: args are the PDA seeds"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"idl with the program id as subject: args are the PDA seeds derives a constant-seed PDA with no args","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"derives a constant-seed PDA with no args"},{"ancestorTitles":["idl with the program id as subject: args are the PDA seeds"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"idl with the program id as subject: args are the PDA seeds fills an account seed from base58, 0x-hex or a PublicKey","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"fills an account seed from base58, 0x-hex or a PublicKey"},{"ancestorTitles":["idl with the program id as subject: args are the PDA seeds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"idl with the program id as subject: args are the PDA seeds accepts the program id in 0x-hex form too","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts the program id in 0x-hex form too"},{"ancestorTitles":["idl with the program id as subject: args are the PDA seeds"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"idl with the program id as subject: args are the PDA seeds refuses to guess: wrong seed count, bad pubkey, missing functionName, args on a non-program subject","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"refuses to guess: wrong seed count, bad pubkey, missing functionName, args on a non-program subject"},{"ancestorTitles":["idl with the program id as subject: args are the PDA seeds"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"idl with the program id as subject: args are the PDA seeds refuses layouts the IDL gives no seeds for, and conflicting seed templates","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"refuses layouts the IDL gives no seeds for, and conflicting seed templates"}],"endTime":1792494884719,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/svm-account.spec.ts","startTime":1792494884634,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["native rule codec — multiple actions"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions encodes each action with its own limits, in input order, sharing the rule expiry","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"encodes each action with its own limits, in input order, sharing the rule expiry"},{"ancestorTitles":["native rule codec — multiple actions"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions the single-action shorthand is unchanged and equals a one-entry actions list","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"the single-action shorthand is unchanged and equals a one-entry actions list"},{"ancestorTitles":["native rule codec — multiple actions"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions round-trips: stored terms decode to the actions form and re-encode identically","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"round-trips: stored terms decode to the actions form and re-encode identically"},{"ancestorTitles":["native rule codec — multiple actions"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions a single stored action decodes to the shorthand form","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"a single stored action decodes to the shorthand form"},{"ancestorTitles":["native rule codec — multiple actions"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions per-action expiries are kept: the rule shows the earliest, later actions carry their own","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"per-action expiries are kept: the rule shows the earliest, later actions carry their own"},{"ancestorTitles":["native rule codec — multiple actions"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions rejects a null action before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a null action before signing"},{"ancestorTitles":["native rule codec — multiple actions"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions rejects a non-object action before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a non-object action before signing"},{"ancestorTitles":["native rule codec — multiple actions"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions rejects missing rule expiry despite overrides before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects missing rule expiry despite overrides before signing"},{"ancestorTitles":["native rule codec — multiple actions"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions rejects expired rule expiry despite overrides before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects expired rule expiry despite overrides before signing"},{"ancestorTitles":["native rule codec — multiple actions"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions rejects an empty actions list before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects an empty actions list before signing"},{"ancestorTitles":["native rule codec — multiple actions"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions rejects more than the contract limit before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects more than the contract limit before signing"},{"ancestorTitles":["native rule codec — multiple actions"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions rejects a repeated target and selector before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a repeated target and selector before signing"},{"ancestorTitles":["native rule codec — multiple actions"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions rejects top-level action fields mixed with actions before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects top-level action fields mixed with actions before signing"},{"ancestorTitles":["native rule codec — multiple actions"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions rejects an invalid action, reported with its index before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects an invalid action, reported with its index before signing"},{"ancestorTitles":["native rule codec — multiple actions"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec — multiple actions the same function on different targets is allowed (distinct action IDs)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"the same function on different targets is allowed (distinct action IDs)"},{"ancestorTitles":["prepareRules — one session, one rule ID, several actions"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"prepareRules — one session, one rule ID, several actions builds one session action per native action, each with its own URP envelope on the Push chain","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"builds one session action per native action, each with its own URP envelope on the Push chain"},{"ancestorTitles":["prepareRules — one session, one rule ID, several actions"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"prepareRules — one session, one rule ID, several actions refuses an infrastructure target in any action, naming it","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"refuses an infrastructure target in any action, naming it"},{"ancestorTitles":["prepareRules — one session, one rule ID, several actions"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"prepareRules — one session, one rule ID, several actions one multi-action rule is one rule per agent on Push, so it never collides with itself","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"one multi-action rule is one rule per agent on Push, so it never collides with itself"},{"ancestorTitles":["utils.agentic.decodeRules — several actions"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"utils.agentic.decodeRules — several actions decodes a multi-action session into the actions form","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"decodes a multi-action session into the actions form"},{"ancestorTitles":["rules.get / rules.list — reading several stored actions"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"rules.get / rules.list — reading several stored actions decodes every action in engine order at one block","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"decodes every action in engine order at one block"}],"endTime":1792494885072,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/native-multi-action.spec.ts","startTime":1792494884720,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["generation registry"],"duration":5,"failureDetails":[],"failureMessages":[],"fullName":"generation registry ships Donut v6 only; other networks are unsupported","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"ships Donut v6 only; other networks are unsupported"},{"ancestorTitles":["generation registry"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"generation registry initialize against any wallet fails before signing when no generation is registered","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"initialize against any wallet fails before signing when no generation is registered"},{"ancestorTitles":["Donut log-range limit"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Donut log-range limit covers the full range in contiguous pages of at most 1,000 blocks","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"covers the full range in contiguous pages of at most 1,000 blocks"},{"ancestorTitles":["native PRC20 metadata"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native PRC20 metadata accepts a zero address word only for the registered gas token","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"accepts a zero address word only for the registered gas token"},{"ancestorTitles":["initialize with agenticWallet — door resolution"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"initialize with agenticWallet — door resolution owner → owner door; universal account context keeps signer identity separate","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"owner → owner door; universal account context keeps signer identity separate"},{"ancestorTitles":["initialize with agenticWallet — door resolution"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"initialize with agenticWallet — door resolution agent named in an enabled rule → agent door, even when that rule is expired","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"agent named in an enabled rule → agent door, even when that rule is expired"},{"ancestorTitles":["initialize with agenticWallet — door resolution"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"initialize with agenticWallet — door resolution anyone else → NOT_OWNER_OR_AGENT","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"anyone else → NOT_OWNER_OR_AGENT"},{"ancestorTitles":["initialize with agenticWallet — door resolution"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"initialize with agenticWallet — door resolution no code → WALLET_NOT_DEPLOYED; a contract that is not an AGW → NOT_AGENTIC_WALLET","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"no code → WALLET_NOT_DEPLOYED; a contract that is not an AGW → NOT_AGENTIC_WALLET"},{"ancestorTitles":["initialize with agenticWallet — door resolution"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"initialize with agenticWallet — door resolution wiring that does not match the registered generation is refused","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"wiring that does not match the registered generation is refused"},{"ancestorTitles":["per-send rule selection"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"per-send rule selection exactly one enabled (agent, chain) match is selected, at one block","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"exactly one enabled (agent, chain) match is selected, at one block"},{"ancestorTitles":["per-send rule selection"],"duration":5,"failureDetails":[],"failureMessages":[],"fullName":"per-send rule selection zero matches → NO_RULES_FOR_CHAIN","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"zero matches → NO_RULES_FOR_CHAIN"},{"ancestorTitles":["per-send rule selection"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"per-send rule selection direct-grant duplicates → AMBIGUOUS_RULE listing every candidate, never an arbitrary pick","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"direct-grant duplicates → AMBIGUOUS_RULE listing every candidate, never an arbitrary pick"},{"ancestorTitles":["per-send rule selection"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"per-send rule selection a revoked rule is not a candidate; lookups are not cached between sends","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"a revoked rule is not a candidate; lookups are not cached between sends"},{"ancestorTitles":["per-send rule selection"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"per-send rule selection an RPC failure is an error, never an empty rule set","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"an RPC failure is an error, never an empty rule set"},{"ancestorTitles":["rules.list / rules.get"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rules.list / rules.get decodes active native records with spend","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"decodes active native records with spend"},{"ancestorTitles":["rules.list / rules.get"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"rules.list / rules.get public records contain native spend","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"public records contain native spend"},{"ancestorTitles":["rules.list / rules.get"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rules.list / rules.get lists native and universal rules without truncating","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"lists native and universal rules without truncating"},{"ancestorTitles":["rules.list / rules.get"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"rules.list / rules.get an empty source-token address is native only for the chain registry gas token","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"an empty source-token address is native only for the chain registry gas token"},{"ancestorTitles":["rules.list / rules.get"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"rules.list / rules.get unknown and revoked IDs both return RULE_NOT_FOUND without history reconstruction","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"unknown and revoked IDs both return RULE_NOT_FOUND without history reconstruction"},{"ancestorTitles":["wallet reads"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"wallet reads derive defaults to the next unused index; beyond it is refused","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"derive defaults to the next unused index; beyond it is refused"},{"ancestorTitles":["wallet reads"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"wallet reads derivation drift between the factory and the SDK mirror is detected (obligation 13)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"derivation drift between the factory and the SDK mirror is detected (obligation 13)"},{"ancestorTitles":["wallet reads"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wallet reads list returns deployed slots with labels and rule counts plus the next undeployed slot","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"list returns deployed slots with labels and rule counts plus the next undeployed slot"},{"ancestorTitles":["wallet reads"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wallet reads an empty owner lists only slot 0, undeployed","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"an empty owner lists only slot 0, undeployed"},{"ancestorTitles":["wallet reads"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"wallet reads reads current labels without depending on deployment logs","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"reads current labels without depending on deployment logs"},{"ancestorTitles":["wallet reads"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wallet reads info of the signer’s next slot describes it as undeployed; other undeployed addresses are refused","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"info of the signer’s next slot describes it as undeployed; other undeployed addresses are refused"},{"ancestorTitles":["checkpoints"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"checkpoints orders by block, tx and log index and counts five ticks for a replacement in one block","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"orders by block, tx and log index and counts five ticks for a replacement in one block"},{"ancestorTitles":["checkpoints"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"checkpoints a count/event mismatch is reported (after one retry) rather than returned","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"a count/event mismatch is reported (after one retry) rather than returned"},{"ancestorTitles":["checkpoints"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"checkpoints uses retained logs only when a complete sequence proves no checkpoint was pruned","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"uses retained logs only when a complete sequence proves no checkpoint was pruned"},{"ancestorTitles":["checkpoints"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"checkpoints does not skip arbitrary RPC errors or a pruned explicit sinceBlock range","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"does not skip arbitrary RPC errors or a pruned explicit sinceBlock range"},{"ancestorTitles":["checkpoints"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"checkpoints validateSequence checks contiguity and the count","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"validateSequence checks contiguity and the count"}],"endTime":1792494885355,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/reads-context.spec.ts","startTime":1792494885073,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["prepareRules — spec 1.b checks before any signature"],"duration":5,"failureDetails":[],"failureMessages":[],"fullName":"prepareRules — spec 1.b checks before any signature AGENT_IS_OWNER","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"AGENT_IS_OWNER"},{"ancestorTitles":["prepareRules — spec 1.b checks before any signature"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"prepareRules — spec 1.b checks before any signature allows multiple rules for the same agent and chain","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"allows multiple rules for the same agent and chain"},{"ancestorTitles":["prepareRules — spec 1.b checks before any signature"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"prepareRules — spec 1.b checks before any signature native and universal rules coexist for the same agent","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"native and universal rules coexist for the same agent"},{"ancestorTitles":["prepareRules — spec 1.b checks before any signature"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"prepareRules — spec 1.b checks before any signature removed ref inputs fail explicitly instead of being silently dropped","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"removed ref inputs fail explicitly instead of being silently dropped"},{"ancestorTitles":["prepareRules — spec 1.b checks before any signature"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"prepareRules — spec 1.b checks before any signature refuses infrastructure targets the contracts would reject","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"refuses infrastructure targets the contracts would reject"},{"ancestorTitles":["prepareRules — spec 1.b checks before any signature"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"prepareRules — spec 1.b checks before any signature a universal rule naming the Push chain is rejected","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"a universal rule naming the Push chain is rejected"},{"ancestorTitles":["prepareRules — spec 1.b checks before any signature"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"prepareRules — spec 1.b checks before any signature valid native rules produce one Session each, agent bound in the validator config","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"valid native rules produce one Session each, agent bound in the validator config"},{"ancestorTitles":["universal rules — validated, then capability-gated (A01, A05)"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"universal rules — validated, then capability-gated (A01, A05) structural validation runs before the capability gate","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"structural validation runs before the capability gate"},{"ancestorTitles":["universal rules — validated, then capability-gated (A01, A05)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"universal rules — validated, then capability-gated (A01, A05) approval policy belongs to UI/marketplace; structurally valid approval calls are accepted","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"approval policy belongs to UI/marketplace; structurally valid approval calls are accepted"},{"ancestorTitles":["universal rules — validated, then capability-gated (A01, A05)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"universal rules — validated, then capability-gated (A01, A05) a beneficiary must be an address argument of a known signature","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"a beneficiary must be an address argument of a known signature"},{"ancestorTitles":["universal rules — validated, then capability-gated (A01, A05)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"universal rules — validated, then capability-gated (A01, A05) requires resolved wallet/token context and named SVM IDL inputs","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"requires resolved wallet/token context and named SVM IDL inputs"},{"ancestorTitles":["internal generation codecs (pure)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"internal generation codecs (pure) encodeRules → decodeRules round-trips a native rule","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"encodeRules → decodeRules round-trips a native rule"},{"ancestorTitles":["internal generation codecs (pure)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"internal generation codecs (pure) decodeRules rejects a foreign-chain envelope carrying native terms","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"decodeRules rejects a foreign-chain envelope carrying native terms"},{"ancestorTitles":["internal generation codecs (pure)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"internal generation codecs (pure) pure decoding resolves known v5 assets and preserves the exact beneficiary offset","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"pure decoding resolves known v5 assets and preserves the exact beneficiary offset"},{"ancestorTitles":["internal generation codecs (pure)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"internal generation codecs (pure) actionId accepts signatures and hex alike","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"actionId accepts signatures and hex alike"}],"endTime":1792494885562,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/rules-policy.spec.ts","startTime":1792494885356,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery derives Token-2022 ATAs using the selected program","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"derives Token-2022 ATAs using the selected program"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery EVM: no query key → native balance of subject","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"EVM: no query key → native balance of subject"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery EVM: token → balanceOf(subject) on the token, typed uint256","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"EVM: token → balanceOf(subject) on the token, typed uint256"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery EVM: abi + functionName → typed call on subject","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"EVM: abi + functionName → typed call on subject"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery EVM: storageSlot","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"EVM: storageSlot"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery SVM: native → lamports of subject; token → the ATA derived offline","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"SVM: native → lamports of subject; token → the ATA derived offline"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery web2: subject is the URL, options.web2 becomes the http query","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"web2: subject is the URL, options.web2 becomes the http query"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery rejects two query keys","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects two query keys"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery rejects functionName without abi","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects functionName without abi"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery rejects abi without functionName","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects abi without functionName"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery rejects web2 key on a blockchain","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects web2 key on a blockchain"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery rejects web2 chain without web2 key","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects web2 chain without web2 key"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery rejects web2 subject not https","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects web2 subject not https"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery rejects EVM subject not an address","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects EVM subject not an address"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery rejects EVM token not an address","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects EVM token not an address"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery rejects SVM storageSlot","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects SVM storageSlot"},{"ancestorTitles":["read(subject, options) grammar → ReadQuery"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"read(subject, options) grammar → ReadQuery rejects SVM abi call","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects SVM abi call"},{"ancestorTitles":["toBuildReadSpecParams"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"toBuildReadSpecParams maps pinning / callback / refund options and the destination","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"maps pinning / callback / refund options and the destination"},{"ancestorTitles":["toBuildReadSpecParams"],"duration":8,"failureDetails":[],"failureMessages":[],"fullName":"toBuildReadSpecParams defaults callback gas to 500_000n for the registry and custom targets; an explicit value wins","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"defaults callback gas to 500_000n for the registry and custom targets; an explicit value wins"},{"ancestorTitles":["toBuildReadSpecParams"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"toBuildReadSpecParams keeps SVM and web2 pinning internal","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"keeps SVM and web2 pinning internal"},{"ancestorTitles":["toBuildReadSpecParams"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"toBuildReadSpecParams lifecycle options map advanced.* to the tracker","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"lifecycle options map advanced.* to the tracker"}],"endTime":1792494885652,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/read-params.spec.ts","startTime":1792494885567,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["revalidateRead"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"revalidateRead accepts an old but valid preparation without changing any field","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts an old but valid preparation without changing any field"},{"ancestorTitles":["revalidateRead"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"revalidateRead rejects remaining escrow of 1n wei without changing the prepared payment","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects remaining escrow of 1n wei without changing the prepared payment"},{"ancestorTitles":["revalidateRead"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"revalidateRead rejects remaining escrow of 199999999999999n wei without changing the prepared payment","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects remaining escrow of 199999999999999n wei without changing the prepared payment"},{"ancestorTitles":["revalidateRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"revalidateRead accepts the exact affordability boundary, using base fee rather than suggested gas price","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"accepts the exact affordability boundary, using base fee rather than suggested gas price"},{"ancestorTitles":["revalidateRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"revalidateRead rejects a rise in base fee even when the protocol fee and gas suggestion are unchanged","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a rise in base fee even when the protocol fee and gas suggestion are unchanged"},{"ancestorTitles":["revalidateRead"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"revalidateRead does not guess when the base fee is missing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does not guess when the base fee is missing"},{"ancestorTitles":["revalidateRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"revalidateRead uses a reported zero base fee without substituting a sizing floor","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"uses a reported zero base fee without substituting a sizing floor"},{"ancestorTitles":["revalidateRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"revalidateRead rejects changed expiry conditions","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects changed expiry conditions"},{"ancestorTitles":["revalidateRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"revalidateRead rejects changed fee conditions","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects changed fee conditions"},{"ancestorTitles":["revalidateRead"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"revalidateRead rejects changed budget conditions","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects changed budget conditions"},{"ancestorTitles":["revalidateRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"revalidateRead rejects changed height conditions","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects changed height conditions"},{"ancestorTitles":["revalidateRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"revalidateRead rejects changed blocked conditions","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects changed blocked conditions"},{"ancestorTitles":["preparation progress"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"preparation progress emits requested, preflight and assembled in order","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"emits requested, preflight and assembled in order"},{"ancestorTitles":["preparation progress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"preparation progress emits height failure without claiming the spec was assembled","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"emits height failure without claiming the spec was assembled"},{"ancestorTitles":["preparation progress"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"preparation progress warns with header names, never secret values","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"warns with header names, never secret values"}],"endTime":1792494885730,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/revalidate-read.spec.ts","startTime":1792494885653,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"decodes the overload selected by the encoded arguments","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"decodes the overload selected by the encoded arguments"},{"ancestorTitles":["EVM query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EVM query envelope golden vector: evm.accountBalance","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"golden vector: evm.accountBalance"},{"ancestorTitles":["EVM query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EVM query envelope golden vector: evm.contractCall.rawCalldata","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"golden vector: evm.contractCall.rawCalldata"},{"ancestorTitles":["EVM query envelope"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EVM query envelope golden vector: evm.storageSlot.bigintSlot","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"golden vector: evm.storageSlot.bigintSlot"},{"ancestorTitles":["EVM query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EVM query envelope is abi.encode of ONE tuple (0x20 head offset), not three parameters","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"is abi.encode of ONE tuple (0x20 head offset), not three parameters"},{"ancestorTitles":["EVM query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EVM query envelope AccountBalance payload is abi.encode(address) — 32 bytes, not the raw 20","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"AccountBalance payload is abi.encode(address) — 32 bytes, not the raw 20"},{"ancestorTitles":["EVM query envelope"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EVM query envelope contractCall with abi encodes the call and records an evmCall result shape","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"contractCall with abi encodes the call and records an evmCall result shape"},{"ancestorTitles":["EVM query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EVM query envelope encodes nonpayable and payable functions — validators simulate them with eth_call","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"encodes nonpayable and payable functions — validators simulate them with eth_call"},{"ancestorTitles":["EVM query envelope"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"EVM query envelope rejects an unknown function and a bad target","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects an unknown function and a bad target"},{"ancestorTitles":["EVM query envelope"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EVM query envelope normalises storage slots given as bigint or short hex to bytes32","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"normalises storage slots given as bigint or short hex to bytes32"},{"ancestorTitles":["EVM query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EVM query envelope rejects an out-of-range blockNumber","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects an out-of-range blockNumber"}],"endTime":1792494885806,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/envelope-evm.spec.ts","startTime":1792494885734,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["unfunded AGW SVM wire fixture gate"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"unfunded AGW SVM wire fixture gate records program fingerprints, slot and the actual IDL-decoded counter/config","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"records program fingerprints, slot and the actual IDL-decoded counter/config"},{"ancestorTitles":["unfunded AGW SVM wire fixture gate"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"unfunded AGW SVM wire fixture gate rejects an RPC for another cluster before reading account state","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects an RPC for another cluster before reading account state"},{"ancestorTitles":["unfunded AGW SVM wire fixture gate"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"unfunded AGW SVM wire fixture gate rejects a non-executable program before reading ProgramData","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects a non-executable program before reading ProgramData"},{"ancestorTitles":["unfunded AGW SVM wire fixture gate"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"unfunded AGW SVM wire fixture gate rejects a paused gateway using the actual Config decoder","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a paused gateway using the actual Config decoder"},{"ancestorTitles":["unfunded AGW SVM wire fixture gate"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"unfunded AGW SVM wire fixture gate rejects a substituted counter owner and an incompatible discriminator","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"rejects a substituted counter owner and an incompatible discriminator"},{"ancestorTitles":["unfunded AGW SVM wire fixture gate"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"unfunded AGW SVM wire fixture gate rejects missing ProgramData rather than treating program metadata as delivery proof","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects missing ProgramData rather than treating program metadata as delivery proof"}],"endTime":1792494885887,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/svm-wire-fixture.spec.ts","startTime":1792494885807,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["SVM query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM query envelope golden vector: svm.lamportBalance","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"golden vector: svm.lamportBalance"},{"ancestorTitles":["SVM query envelope"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"SVM query envelope golden vector: svm.splTokenAccount.minSlot0","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"golden vector: svm.splTokenAccount.minSlot0"},{"ancestorTitles":["SVM query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM query envelope golden vector: svm.rawAccountData","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"golden vector: svm.rawAccountData"},{"ancestorTitles":["SVM query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM query envelope is a single tuple with a 0x20 head offset and an empty payload","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"is a single tuple with a 0x20 head offset and an empty payload"},{"ancestorTitles":["SVM query envelope"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"SVM query envelope owner bytes: base58 → exactly 32 bytes; raw bytes accepted; anything else rejected","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"owner bytes: base58 → exactly 32 bytes; raw bytes accepted; anything else rejected"},{"ancestorTitles":["SVM query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM query envelope result shapes: balances are uint256, raw account data is raw","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"result shapes: balances are uint256, raw account data is raw"},{"ancestorTitles":["SVM query envelope"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"SVM query envelope derives the associated token address deterministically (matches spl-token)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"derives the associated token address deterministically (matches spl-token)"},{"ancestorTitles":["SVM query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM query envelope rejects an out-of-range minSlot","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects an out-of-range minSlot"}],"endTime":1792494885965,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/envelope-svm.spec.ts","startTime":1792494885888,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["decodeReadResult"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeReadResult decodes signed and dynamic Web2 values in extract order without rescaling","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"decodes signed and dynamic Web2 values in extract order without rescaling"},{"ancestorTitles":["decodeReadResult"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"decodeReadResult uses viem semantics for a single dynamic array output","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"uses viem semantics for a single dynamic array output"},{"ancestorTitles":["decodeReadResult"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeReadResult uint256 — EVM balance / SVM lamports / SPL amount (real Donut bytes)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"uint256 — EVM balance / SVM lamports / SPL amount (real Donut bytes)"},{"ancestorTitles":["decodeReadResult"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"decodeReadResult bytes32 — storage slot","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"bytes32 — storage slot"},{"ancestorTitles":["decodeReadResult"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeReadResult raw — passthrough, including empty","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"raw — passthrough, including empty"},{"ancestorTitles":["decodeReadResult"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeReadResult evmCall — viem unwraps one output and preserves multiple outputs as a tuple","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"evmCall — viem unwraps one output and preserves multiple outputs as a tuple"},{"ancestorTitles":["decodeReadResult"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeReadResult web2 — FLAT argument list, one value per extract, in order (real Donut bytes)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"web2 — FLAT argument list, one value per extract, in order (real Donut bytes)"},{"ancestorTitles":["decodeReadResult"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeReadResult web2 — decoding against the WRONG extract list throws instead of mis-decoding","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"web2 — decoding against the WRONG extract list throws instead of mis-decoding"},{"ancestorTitles":["decodeReadResult"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"decodeReadResult rejects wrong sizes, empty data for typed shapes, and non-hex","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"rejects wrong sizes, empty data for typed shapes, and non-hex"}],"endTime":1792494886038,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/result-decoder.spec.ts","startTime":1792494885970,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["AGW Solana finalization quote context"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"AGW Solana finalization quote context uses the wallet identity and actual source mint for SPL rent budgeting","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"uses the wallet identity and actual source mint for SPL rent budgeting"},{"ancestorTitles":["AGW Solana finalization quote context"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AGW Solana finalization quote context native transfers carry no SPL mint or ATA requirement","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"native transfers carry no SPL mint or ATA requirement"},{"ancestorTitles":["AGW Solana finalization quote context"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AGW Solana finalization quote context zero-burn instruction quotes do not add a transfer ATA requirement","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"zero-burn instruction quotes do not add a transfer ATA requirement"},{"ancestorTitles":["AGW Solana finalization quote context"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AGW Solana finalization quote context an asset from another chain fails route validation without a quote","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"an asset from another chain fails route validation without a quote"},{"ancestorTitles":["AGW Solana finalization quote context"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AGW Solana finalization quote context decodes the real precompile word when a Solidity string ABI cannot decode it","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"decodes the real precompile word when a Solidity string ABI cannot decode it"},{"ancestorTitles":["AGW Solana finalization quote context"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AGW Solana finalization quote context does not fabricate a mint when both metadata representations fail","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not fabricate a mint when both metadata representations fail"},{"ancestorTitles":["AGW Solana finalization quote context"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"AGW Solana finalization quote context uses the current registered SPL mint when Donut metadata returns a zero word","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"uses the current registered SPL mint when Donut metadata returns a zero word"},{"ancestorTitles":["AGW Solana finalization quote context"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"AGW Solana finalization quote context canonicalizes a decoded SPL mint before resolving its PRC20 mapping","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"canonicalizes a decoded SPL mint before resolving its PRC20 mapping"}],"endTime":1792494886283,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/svm-quote.spec.ts","startTime":1792494886039,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["detectUniversalTxSvm log index handling"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTxSvm log index handling uses the legacy Solana logMessages index for pre-emit_cpi transactions","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"uses the legacy Solana logMessages index for pre-emit_cpi transactions"},{"ancestorTitles":["detectUniversalTxSvm log index handling"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTxSvm log index handling decodes emit_cpi inner instructions and uses the gateway-event ordinal","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"decodes emit_cpi inner instructions and uses the gateway-event ordinal"}],"endTime":1792494886352,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/detector-svm-log-index.spec.ts","startTime":1792494886285,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["PC20 address codec — EVM"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PC20 address codec — EVM left-pads a 20-byte address to bytes32","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"left-pads a 20-byte address to bytes32"},{"ancestorTitles":["PC20 address codec — EVM"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 address codec — EVM round-trips and returns the checksummed form","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"round-trips and returns the checksummed form"},{"ancestorTitles":["PC20 address codec — EVM"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"PC20 address codec — EVM rejects the zero address","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects the zero address"},{"ancestorTitles":["PC20 address codec — EVM"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 address codec — EVM rejects a malformed address","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a malformed address"},{"ancestorTitles":["PC20 address codec — EVM"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PC20 address codec — EVM rejects a bytes32 whose high bytes are set","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a bytes32 whose high bytes are set"},{"ancestorTitles":["PC20 address codec — SVM"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 address codec — SVM round-trips base58 through the raw 32-byte form","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"round-trips base58 through the raw 32-byte form"},{"ancestorTitles":["PC20 address codec — SVM"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 address codec — SVM accepts the hex form and normalizes it back to base58","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"accepts the hex form and normalizes it back to base58"},{"ancestorTitles":["PC20 address codec — SVM"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 address codec — SVM rejects the default public key","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects the default public key"},{"ancestorTitles":["PC20 address codec — SVM"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 address codec — SVM rejects a malformed base58 key","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a malformed base58 key"},{"ancestorTitles":["isZeroBytes32"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"isZeroBytes32 detects the unset registry value","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"detects the unset registry value"},{"ancestorTitles":["isZeroBytes32"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"isZeroBytes32 rejects decoding an unset value rather than returning the zero address","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects decoding an unset value rather than returning the zero address"}],"endTime":1792494886423,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/__tests__/address-codec.spec.ts","startTime":1792494886353,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["detector-svm — argument normalization"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"detector-svm — argument normalization renames snake_case keys classify.ts reads via camelCase","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"renames snake_case keys classify.ts reads via camelCase"},{"ancestorTitles":["detector-svm — argument normalization"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detector-svm — argument normalization adds `to` alias for RevertUniversalTx.revertRecipient","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"adds `to` alias for RevertUniversalTx.revertRecipient"},{"ancestorTitles":["detector-svm — argument normalization"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detector-svm — argument normalization surfaces UniversalTx fromCEA as a boolean and preserves tx_type enum as number","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"surfaces UniversalTx fromCEA as a boolean and preserves tx_type enum as number"},{"ancestorTitles":["detector-svm — argument normalization"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detector-svm — argument normalization normalizeSolanaSignature round-trips 0x-hex ↔ base58 and leaves base58 untouched","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"normalizeSolanaSignature round-trips 0x-hex ↔ base58 and leaves base58 untouched"},{"ancestorTitles":["detector-svm — argument normalization"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"detector-svm — argument normalization extractTxTypeIndex resolves every declared variant and returns undefined for unknown ones","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"extractTxTypeIndex resolves every declared variant and returns undefined for unknown ones"}],"endTime":1792494886494,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/detector-svm.spec.ts","startTime":1792494886427,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","ETHEREUM_SEPOLIA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) ETHEREUM_SEPOLIA should expose USDT with correct metadata","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should expose USDT with correct metadata"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","ETHEREUM_SEPOLIA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) ETHEREUM_SEPOLIA should expose ETH as native token","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should expose ETH as native token"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","ETHEREUM_SEPOLIA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) ETHEREUM_SEPOLIA should expose USDC","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should expose USDC"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","ETHEREUM_SEPOLIA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) ETHEREUM_SEPOLIA should expose WETH","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should expose WETH"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","ETHEREUM_SEPOLIA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) ETHEREUM_SEPOLIA should expose stETH","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should expose stETH"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","ARBITRUM_SEPOLIA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) ARBITRUM_SEPOLIA should expose USDT","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should expose USDT"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","ARBITRUM_SEPOLIA"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) ARBITRUM_SEPOLIA should expose ETH as native","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should expose ETH as native"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","BASE_SEPOLIA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) BASE_SEPOLIA should expose USDT and USDC","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should expose USDT and USDC"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","BNB_TESTNET"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) BNB_TESTNET should expose USDT","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should expose USDT"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","BNB_TESTNET"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) BNB_TESTNET should expose USDC","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should expose USDC"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","BNB_TESTNET"],"duration":6,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) BNB_TESTNET should throw for SOL (unavailable on BNB)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw for SOL (unavailable on BNB)"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","SOLANA_DEVNET"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) SOLANA_DEVNET should expose SOL as native token","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should expose SOL as native token"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","SOLANA_DEVNET"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) SOLANA_DEVNET should expose USDT","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should expose USDT"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","SOLANA_DEVNET"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) SOLANA_DEVNET should throw for ETH (unavailable on Solana)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should throw for ETH (unavailable on Solana)"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens)","ETHEREUM_MAINNET"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS (C-2: external chain tokens) ETHEREUM_MAINNET should expose ETH, USDT, WETH","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should expose ETH, USDT, WETH"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","deployed stable PRC-20 addresses on Push Chain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) deployed stable PRC-20 addresses on Push Chain should use the current USDT deployment addresses","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"should use the current USDT deployment addresses"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","deployed stable PRC-20 addresses on Push Chain"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) deployed stable PRC-20 addresses on Push Chain should use the current USDC BSC deployment address","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should use the current USDC BSC deployment address"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","native wrapped tokens"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) native wrapped tokens should expose pEth with correct sourceChain and prc20Address","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"should expose pEth with correct sourceChain and prc20Address"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","native wrapped tokens"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) native wrapped tokens should expose pEthArb sourced from Arbitrum","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should expose pEthArb sourced from Arbitrum"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","native wrapped tokens"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) native wrapped tokens should expose pEthBase sourced from Base","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should expose pEthBase sourced from Base"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","native wrapped tokens"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) native wrapped tokens should expose pBnb sourced from BNB","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should expose pBnb sourced from BNB"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","native wrapped tokens"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) native wrapped tokens should expose pSol sourced from Solana","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should expose pSol sourced from Solana"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","USDT chain-suffix accessor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) USDT chain-suffix accessor should expose USDT.eth from Ethereum Sepolia","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"should expose USDT.eth from Ethereum Sepolia"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","USDT chain-suffix accessor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) USDT chain-suffix accessor should expose USDT.arb from Arbitrum","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should expose USDT.arb from Arbitrum"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","USDT chain-suffix accessor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) USDT chain-suffix accessor should expose USDT.base from Base","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should expose USDT.base from Base"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","USDT chain-suffix accessor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) USDT chain-suffix accessor should expose USDT.bsc from BSC","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should expose USDT.bsc from BSC"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","USDT chain-suffix accessor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) USDT chain-suffix accessor should keep USDT.bnb as a deprecated alias","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should keep USDT.bnb as a deprecated alias"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","USDT chain-suffix accessor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) USDT chain-suffix accessor should expose USDT.sol from Solana","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should expose USDT.sol from Solana"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","USDT chain-suffix accessor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) USDT chain-suffix accessor USDT.eth and USDT.sol should have different prc20Addresses","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"USDT.eth and USDT.sol should have different prc20Addresses"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","USDC chain-suffix accessor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) USDC chain-suffix accessor should expose USDC.eth from Ethereum Sepolia","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should expose USDC.eth from Ethereum Sepolia"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","USDC chain-suffix accessor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) USDC chain-suffix accessor should expose USDC.arb from Arbitrum","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should expose USDC.arb from Arbitrum"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","USDC chain-suffix accessor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) USDC chain-suffix accessor should expose USDC.base from Base","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should expose USDC.base from Base"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","USDC chain-suffix accessor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) USDC chain-suffix accessor should expose USDC.sol from Solana","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should expose USDC.sol from Solana"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","USDC chain-suffix accessor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) USDC chain-suffix accessor should expose USDC.bsc from BSC","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should expose USDC.bsc from BSC"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","USDC chain-suffix accessor"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) USDC chain-suffix accessor should keep USDC.bnb as a deprecated alias","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should keep USDC.bnb as a deprecated alias"},{"ancestorTitles":["MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens)","PushChainMoveableToken interface compliance"],"duration":5,"failureDetails":[],"failureMessages":[],"fullName":"MOVEABLE_TOKEN_CONSTANTS.PUSH_TESTNET_DONUT (C-3: outward tokens) PushChainMoveableToken interface compliance all tokens should have required PushChainMoveableToken fields","invocations":1,"location":null,"numPassingAsserts":150,"retryReasons":[],"status":"passed","title":"all tokens should have required PushChainMoveableToken fields"},{"ancestorTitles":["PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens)","ETHEREUM_SEPOLIA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens) ETHEREUM_SEPOLIA should expose USDT","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should expose USDT"},{"ancestorTitles":["PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens)","ETHEREUM_SEPOLIA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens) ETHEREUM_SEPOLIA should expose ETH as native","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should expose ETH as native"},{"ancestorTitles":["PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens)","ETHEREUM_SEPOLIA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens) ETHEREUM_SEPOLIA should expose USDC","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should expose USDC"},{"ancestorTitles":["PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens)","ETHEREUM_SEPOLIA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens) ETHEREUM_SEPOLIA should expose stETH","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should expose stETH"},{"ancestorTitles":["PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens)","BNB_TESTNET"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens) BNB_TESTNET should expose USDT","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should expose USDT"},{"ancestorTitles":["PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens)","BNB_TESTNET"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens) BNB_TESTNET should expose USDC","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"should expose USDC"},{"ancestorTitles":["PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens)","SOLANA_DEVNET"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens) SOLANA_DEVNET should expose SOL as native token (payable)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should expose SOL as native token (payable)"},{"ancestorTitles":["PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens)","ARBITRUM_SEPOLIA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens) ARBITRUM_SEPOLIA should expose ETH and USDT","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should expose ETH and USDT"},{"ancestorTitles":["PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens)","BASE_SEPOLIA"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens) BASE_SEPOLIA should expose ETH, USDT, USDC","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"should expose ETH, USDT, USDC"},{"ancestorTitles":["PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens)","ETHEREUM_MAINNET"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PAYABLE_TOKEN_CONSTANTS (C-4: payable tokens) ETHEREUM_MAINNET should expose ETH and USDT","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"should expose ETH and USDT"}],"endTime":1792494886560,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/constants/__tests__/token-constants.spec.ts","startTime":1792494886496,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"reads exact non-native source identity from the string ABI","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"reads exact non-native source identity from the string ABI"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"reads exact non-native source identity from the address ABI","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"reads exact non-native source identity from the address ABI"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"accepts an address-word zero only for the registered native gas token","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"accepts an address-word zero only for the registered native gas token"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"preserves a failed read when neither source encoding can be read","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"preserves a failed read when neither source encoding can be read"}],"endTime":1792494886875,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/prc20-source-encoding.spec.ts","startTime":1792494886561,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["PC20 tracked leg selection (SVM)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 tracked leg selection (SVM) default behaviour is unchanged: second gateway event wins","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"default behaviour is unchanged: second gateway event wins"},{"ancestorTitles":["PC20 tracked leg selection (SVM)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 tracked leg selection (SVM) preferPC20 selects the burn leg rather than the trailing funds leg","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"preferPC20 selects the burn leg rather than the trailing funds leg"},{"ancestorTitles":["PC20 tracked leg selection (SVM)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 tracked leg selection (SVM) finds the PC20 leg regardless of emission order","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"finds the PC20 leg regardless of emission order"},{"ancestorTitles":["PC20 tracked leg selection (SVM)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 tracked leg selection (SVM) falls back to default selection when no PC20 leg is present","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"falls back to default selection when no PC20 leg is present"},{"ancestorTitles":["PC20 tracked leg selection (SVM)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 tracked leg selection (SVM) a single PC20 event is selected under either mode","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"a single PC20 event is selected under either mode"},{"ancestorTitles":["PC20 tracked leg selection (SVM)"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"PC20 tracked leg selection (SVM) uses emit_cpi gateway-event ordinals and preserves PC20 selection","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"uses emit_cpi gateway-event ordinals and preserves PC20 selection"}],"endTime":1792494886916,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/pc20-tracked-leg-svm.spec.ts","startTime":1792494886877,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["SVM payload encoding (post-Option-B fix)","encoder dispatch"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"SVM payload encoding (post-Option-B fix) encoder dispatch SVM signer dispatches to the SVM Borsh encoder, EVM signer to ABI","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"SVM signer dispatches to the SVM Borsh encoder, EVM signer to ABI"},{"ancestorTitles":["SVM payload encoding (post-Option-B fix)","SVM encoder bounds"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"SVM payload encoding (post-Option-B fix) SVM encoder bounds rejects Riyanshu’s exact value (still > u64)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects Riyanshu’s exact value (still > u64)"},{"ancestorTitles":["SVM payload encoding (post-Option-B fix)","SVM encoder bounds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM payload encoding (post-Option-B fix) SVM encoder bounds passes at u64 max (the boundary)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"passes at u64 max (the boundary)"},{"ancestorTitles":["SVM payload encoding (post-Option-B fix)","EVM-signer workaround documented in the error message"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM payload encoding (post-Option-B fix) EVM-signer workaround documented in the error message encodes Riyanshu’s value cleanly via ABI uint256","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"encodes Riyanshu’s value cleanly via ABI uint256"}],"endTime":1792494886971,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/__tests__/signing.spec.ts","startTime":1792494886919,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["normalize — PushChainOutboundSummary.externalTxHash for SVM","normalizeOutboundSummaryForUser"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"normalize — PushChainOutboundSummary.externalTxHash for SVM normalizeOutboundSummaryForUser returns the SAME reference for an EVM destination (passthrough)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns the SAME reference for an EVM destination (passthrough)"},{"ancestorTitles":["normalize — PushChainOutboundSummary.externalTxHash for SVM","normalizeOutboundSummaryForUser"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"normalize — PushChainOutboundSummary.externalTxHash for SVM normalizeOutboundSummaryForUser converts 0x-hex → base58 for Solana Devnet destination","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"converts 0x-hex → base58 for Solana Devnet destination"},{"ancestorTitles":["normalize — PushChainOutboundSummary.externalTxHash for SVM","normalizeOutboundSummaryForUser"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"normalize — PushChainOutboundSummary.externalTxHash for SVM normalizeOutboundSummaryForUser is idempotent — running the helper twice yields the same value","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"is idempotent — running the helper twice yields the same value"},{"ancestorTitles":["normalize — PushChainOutboundSummary.externalTxHash for SVM","normalizeOutboundSummaryForUser"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"normalize — PushChainOutboundSummary.externalTxHash for SVM normalizeOutboundSummaryForUser passes through a value that already lacks 0x prefix (already base58)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"passes through a value that already lacks 0x prefix (already base58)"},{"ancestorTitles":["normalize — PushChainOutboundSummary.externalTxHash for SVM","normalizeOutboundSummaryForUser"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"normalize — PushChainOutboundSummary.externalTxHash for SVM normalizeOutboundSummaryForUser passes through when externalTxHash is undefined","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"passes through when externalTxHash is undefined"},{"ancestorTitles":["normalize — PushChainOutboundSummary.externalTxHash for SVM","normalizeOutboundSummaryForUser"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"normalize — PushChainOutboundSummary.externalTxHash for SVM normalizeOutboundSummaryForUser does not mutate the input","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"does not mutate the input"},{"ancestorTitles":["normalize — PushChainOutboundSummary.externalTxHash for SVM","normalizeDetectionForUser"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"normalize — PushChainOutboundSummary.externalTxHash for SVM normalizeDetectionForUser returns same reference when pushChainTx is undefined","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns same reference when pushChainTx is undefined"},{"ancestorTitles":["normalize — PushChainOutboundSummary.externalTxHash for SVM","normalizeDetectionForUser"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"normalize — PushChainOutboundSummary.externalTxHash for SVM normalizeDetectionForUser returns same reference when no nested outbound needs normalization (EVM only)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns same reference when no nested outbound needs normalization (EVM only)"},{"ancestorTitles":["normalize — PushChainOutboundSummary.externalTxHash for SVM","normalizeDetectionForUser"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"normalize — PushChainOutboundSummary.externalTxHash for SVM normalizeDetectionForUser rewrites SVM externalTxHash inside pushChainTx.outboundHashes","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"rewrites SVM externalTxHash inside pushChainTx.outboundHashes"},{"ancestorTitles":["normalize — PushChainOutboundSummary.externalTxHash for SVM","normalizeChildInboundResolutionForUser"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"normalize — PushChainOutboundSummary.externalTxHash for SVM normalizeChildInboundResolutionForUser passes through pcTxHashes unchanged","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"passes through pcTxHashes unchanged"},{"ancestorTitles":["normalize — PushChainOutboundSummary.externalTxHash for SVM","normalizeChildInboundResolutionForUser"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"normalize — PushChainOutboundSummary.externalTxHash for SVM normalizeChildInboundResolutionForUser rewrites SVM externalTxHash inside outboundHashes","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"rewrites SVM externalTxHash inside outboundHashes"},{"ancestorTitles":["normalize — PushChainOutboundSummary.externalTxHash for SVM","normalizeCascadeNodeForUser"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"normalize — PushChainOutboundSummary.externalTxHash for SVM normalizeCascadeNodeForUser returns same reference when nothing in the tree needs normalization","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns same reference when nothing in the tree needs normalization"},{"ancestorTitles":["normalize — PushChainOutboundSummary.externalTxHash for SVM","normalizeCascadeNodeForUser"],"duration":3,"failureDetails":[],"failureMessages":[],"fullName":"normalize — PushChainOutboundSummary.externalTxHash for SVM normalizeCascadeNodeForUser rewrites SVM externalTxHash in edge.relation (outbound) and recurses into edge.node","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"rewrites SVM externalTxHash in edge.relation (outbound) and recurses into edge.node"},{"ancestorTitles":["normalize — PushChainOutboundSummary.externalTxHash for SVM","normalizeCascadeNodeForUser"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"normalize — PushChainOutboundSummary.externalTxHash for SVM normalizeCascadeNodeForUser does not mutate the input tree","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not mutate the input tree"}],"endTime":1792494887026,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/normalize.spec.ts","startTime":1792494886972,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) rulesId(agent, nonce) = engine.getPermissionId — nonce 0","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rulesId(agent, nonce) = engine.getPermissionId — nonce 0"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) rulesId(agent, nonce) = engine.getPermissionId — nonce 1","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rulesId(agent, nonce) = engine.getPermissionId — nonce 1"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) rulesId(agent, nonce) = engine.getPermissionId — nonce 7","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rulesId(agent, nonce) = engine.getPermissionId — nonce 7"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) rulesId(agent, nonce) = engine.getPermissionId — nonce 9223372036854775808","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rulesId(agent, nonce) = engine.getPermissionId — nonce 9223372036854775808"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) rulesId(agent, nonce) = engine.getPermissionId — nonce 0","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rulesId(agent, nonce) = engine.getPermissionId — nonce 0"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) rulesId(agent, nonce) = engine.getPermissionId — nonce 1","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rulesId(agent, nonce) = engine.getPermissionId — nonce 1"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) rulesId(agent, nonce) = engine.getPermissionId — nonce 7","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rulesId(agent, nonce) = engine.getPermissionId — nonce 7"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) rulesId(agent, nonce) = engine.getPermissionId — nonce 9223372036854775808","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rulesId(agent, nonce) = engine.getPermissionId — nonce 9223372036854775808"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) rulesId(agent, nonce) = engine.getPermissionId — nonce 0","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rulesId(agent, nonce) = engine.getPermissionId — nonce 0"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) rulesId(agent, nonce) = engine.getPermissionId — nonce 1","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rulesId(agent, nonce) = engine.getPermissionId — nonce 1"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) rulesId(agent, nonce) = engine.getPermissionId — nonce 7","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rulesId(agent, nonce) = engine.getPermissionId — nonce 7"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) rulesId(agent, nonce) = engine.getPermissionId — nonce 9223372036854775808","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rulesId(agent, nonce) = engine.getPermissionId — nonce 9223372036854775808"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) deriveWallet mirrors factory.predictWallet for 0x90F79bf6EB2c4f870365E785982E1f101E93b906","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"deriveWallet mirrors factory.predictWallet for 0x90F79bf6EB2c4f870365E785982E1f101E93b906"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) deriveWallet mirrors factory.predictWallet for 0x1111111111111111111111111111111111111111","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"deriveWallet mirrors factory.predictWallet for 0x1111111111111111111111111111111111111111"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) actionId/configId: the policy holds an initialized config under exactly this key","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"actionId/configId: the policy holds an initialized config under exactly this key"},{"ancestorTitles":["IDs against contract-generated vectors (v5)"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"IDs against contract-generated vectors (v5) rulesId rejects a grant nonce outside uint64","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rulesId rejects a grant nonce outside uint64"},{"ancestorTitles":["native rule codec"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec encodes the session the contracts accepted and stored","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"encodes the session the contracts accepted and stored"},{"ancestorTitles":["native rule codec"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec round-trips terms through the envelope and back to a public rule","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"round-trips terms through the envelope and back to a public rule"},{"ancestorTitles":["native rule codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec decoding never invents argument indexes: a static array before a pin stays a raw offset","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"decoding never invents argument indexes: a static array before a pin stays a raw offset"},{"ancestorTitles":["native rule codec"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec a decoded address pin re-encodes in argument form once the signature is restored","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"a decoded address pin re-encodes in argument form once the signature is restored"},{"ancestorTitles":["native rule codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec offset-form pins must be exact words at a valid offset","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"offset-form pins must be exact words at a valid offset"},{"ancestorTitles":["native rule codec"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec applies confirmed zero PC defaults and independent token/call defaults","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"applies confirmed zero PC defaults and independent token/call defaults"},{"ancestorTitles":["native rule codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec rejects ambiguous arg-plus-offset authoring for both pins and amount","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects ambiguous arg-plus-offset authoring for both pins and amount"},{"ancestorTitles":["native rule codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec keeps an explicit zero as zero","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"keeps an explicit zero as zero"},{"ancestorTitles":["native rule codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec value-only rules encode the reserved selector and refuse pins/amount","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"value-only rules encode the reserved selector and refuse pins/amount"},{"ancestorTitles":["native rule codec"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec rejects past expiry before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects past expiry before signing"},{"ancestorTitles":["native rule codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec rejects zero target before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects zero target before signing"},{"ancestorTitles":["native rule codec"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec rejects too many pins before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects too many pins before signing"},{"ancestorTitles":["native rule codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec rejects pin needs a signature before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects pin needs a signature before signing"},{"ancestorTitles":["native rule codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec rejects pin on a dynamic argument before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects pin on a dynamic argument before signing"},{"ancestorTitles":["native rule codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec rejects pin index out of range before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects pin index out of range before signing"},{"ancestorTitles":["native rule codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec rejects pin value of the wrong type before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects pin value of the wrong type before signing"},{"ancestorTitles":["native rule codec"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec rejects amount on a non-uint before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects amount on a non-uint before signing"},{"ancestorTitles":["native rule codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec rejects amount also pinned before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects amount also pinned before signing"},{"ancestorTitles":["native rule codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec rejects negative cap before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects negative cap before signing"},{"ancestorTitles":["native rule codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec rejects maxCalls beyond uint32 before signing","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects maxCalls beyond uint32 before signing"},{"ancestorTitles":["native rule codec"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"native rule codec approval policy is external while caller-supplied pins remain ABI-validated","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"approval policy is external while caller-supplied pins remain ABI-validated"},{"ancestorTitles":["ABI layout offsets"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"ABI layout offsets accounts for dynamic heads and multi-word static tuples before the pinned argument","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"accounts for dynamic heads and multi-word static tuples before the pinned argument"},{"ancestorTitles":["ABI layout offsets"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"ABI layout offsets rejects pinning a tuple","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects pinning a tuple"},{"ancestorTitles":["ABI layout offsets"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"ABI layout offsets parses hex, signature and value-only selectors","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"parses hex, signature and value-only selectors"},{"ancestorTitles":["wallet call encoders decode back to the same calls"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wallet call encoders decode back to the same calls execute single uses packed ERC-7579 calldata","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"execute single uses packed ERC-7579 calldata"},{"ancestorTitles":["wallet call encoders decode back to the same calls"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"wallet call encoders decode back to the same calls execute batch uses abi.encode(Execution[])","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"execute batch uses abi.encode(Execution[])"},{"ancestorTitles":["wallet call encoders decode back to the same calls"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wallet call encoders decode back to the same calls executeAsAgent carries the rule ID and one packed call","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"executeAsAgent carries the rule ID and one packed call"},{"ancestorTitles":["wallet call encoders decode back to the same calls"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"wallet call encoders decode back to the same calls unknown calldata is not mistaken for a wallet call","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"unknown calldata is not mistaken for a wallet call"}],"endTime":1792494887289,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/agentic/__tests__/codec.spec.ts","startTime":1792494887027,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["preflightRead"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"preflightRead keys the oracle height by the FULL CAIP-2 id and the fee/blocklist by the split pair","invocations":1,"location":null,"numPassingAsserts":11,"retryReasons":[],"status":"passed","title":"keys the oracle height by the FULL CAIP-2 id and the fee/blocklist by the split pair"},{"ancestorTitles":["preflightRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"preflightRead accepts the explicit { chainNamespace, chainId } form","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"accepts the explicit { chainNamespace, chainId } form"},{"ancestorTitles":["preflightRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"preflightRead web2 is heightless: a 0 oracle height is NOT an error","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"web2 is heightless: a 0 oracle height is NOT an error"},{"ancestorTitles":["preflightRead"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"preflightRead a blockchain with a 0 oracle height is unreadable → ReadHeightUnavailableError","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"a blockchain with a 0 oracle height is unreadable → ReadHeightUnavailableError"},{"ancestorTitles":["preflightRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"preflightRead a blocklisted domain fails fast","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"a blocklisted domain fails fast"},{"ancestorTitles":["preflightRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"preflightRead rejects a CAIP-2 string smuggled in as the namespace (would route as eip155:1:1 on the node)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a CAIP-2 string smuggled in as the namespace (would route as eip155:1:1 on the node)"},{"ancestorTitles":["preflightRead"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"preflightRead rejects an unknown namespace before touching the chain","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects an unknown namespace before touching the chain"}],"endTime":1792494887338,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/preflight.spec.ts","startTime":1792494887290,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["ABI pins against the deployed UniversalCallback"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"ABI pins against the deployed UniversalCallback registry read uses the deployed spec, query key and callback gas tuple","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"registry read uses the deployed spec, query key and callback gas tuple"},{"ancestorTitles":["ABI pins against the deployed UniversalCallback"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"ABI pins against the deployed UniversalCallback requestExternalReadSelf uses the 7-field ReadSpec (with revertRecipient)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"requestExternalReadSelf uses the 7-field ReadSpec (with revertRecipient)"},{"ancestorTitles":["ABI pins against the deployed UniversalCallback"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"ABI pins against the deployed UniversalCallback estimateFee is (string,string) — protocol fee only, no callbackGasLimit arg","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"estimateFee is (string,string) — protocol fee only, no callbackGasLimit arg"},{"ancestorTitles":["ABI pins against the deployed UniversalCallback"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"ABI pins against the deployed UniversalCallback UniversalCore read getters","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"UniversalCore read getters"},{"ancestorTitles":["ABI pins against the deployed UniversalCallback"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"ABI pins against the deployed UniversalCallback addresses are the genesis predeploys on every network","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"addresses are the genesis predeploys on every network"},{"ancestorTitles":["ABI pins against the deployed UniversalCallback"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"ABI pins against the deployed UniversalCallback contract constants","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"contract constants"}],"endTime":1792494887393,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/abi-selectors.spec.ts","startTime":1792494887343,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["EvmClient — native currency symbol in error messages"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EvmClient — native currency symbol in error messages getPushViemChain(PUSH_TESTNET_DONUT) exposes a chain whose native symbol is \"PC\"","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"getPushViemChain(PUSH_TESTNET_DONUT) exposes a chain whose native symbol is \"PC\""},{"ancestorTitles":["EvmClient — native currency symbol in error messages"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EvmClient — native currency symbol in error messages EvmClient built with a Push chain threads it into its PublicClient","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"EvmClient built with a Push chain threads it into its PublicClient"},{"ancestorTitles":["EvmClient — native currency symbol in error messages"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EvmClient — native currency symbol in error messages formats insufficient-funds error with \"PC\" when chain is Push","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"formats insufficient-funds error with \"PC\" when chain is Push"},{"ancestorTitles":["EvmClient — native currency symbol in error messages"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EvmClient — native currency symbol in error messages mechanism: without a chain, viem formats value as \"ETH\"","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"mechanism: without a chain, viem formats value as \"ETH\""}],"endTime":1792494887445,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/vm-client/evm-client.chain-symbol.spec.ts","startTime":1792494887394,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"resolves verified Sepolia WETH for lowercase/checksummed address input","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"resolves verified Sepolia WETH for lowercase/checksummed address input"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolves verified Sepolia stETH for lowercase/checksummed address input","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"resolves verified Sepolia stETH for lowercase/checksummed address input"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"preserves case-sensitive Solana identities while accepting EVM casing variations","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"preserves case-sensitive Solana identities while accepting EVM casing variations"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"never aliases mainnet ETH/WETH or a different chain WETH to Sepolia","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"never aliases mainnet ETH/WETH or a different chain WETH to Sepolia"}],"endTime":1792494887498,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal/prc20-address.spec.ts","startTime":1792494887448,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["deriveChildUniversalTxId (sha256 formula)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deriveChildUniversalTxId (sha256 formula) matches the chain GetInboundUniversalTxKey for real Sepolia inbound","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"matches the chain GetInboundUniversalTxKey for real Sepolia inbound"},{"ancestorTitles":["deriveChildUniversalTxId (sha256 formula)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deriveChildUniversalTxId (sha256 formula) handles externalTxHash without 0x prefix","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"handles externalTxHash without 0x prefix"},{"ancestorTitles":["deriveChildUniversalTxId (sha256 formula)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"deriveChildUniversalTxId (sha256 formula) includes logIndex — different indices produce different ids","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"includes logIndex — different indices produce different ids"},{"ancestorTitles":["deriveChildUniversalTxId (sha256 formula)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"deriveChildUniversalTxId (sha256 formula) normalizes SVM base58 signatures to the keeper hex form","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"normalizes SVM base58 signatures to the keeper hex form"},{"ancestorTitles":["derivePcUniversalTxId (sha256 formula, no logIndex)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"derivePcUniversalTxId (sha256 formula, no logIndex) matches the chain GetPcUniversalTxKey for real Push Chain outbound","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"matches the chain GetPcUniversalTxKey for real Push Chain outbound"},{"ancestorTitles":["resolveChildInboundsFromLogs"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolveChildInboundsFromLogs derives child id and stitches pcTx/outboundTx from cosmos","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"derives child id and stitches pcTx/outboundTx from cosmos"},{"ancestorTitles":["resolveChildInboundsFromLogs"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolveChildInboundsFromLogs marks notFound when cosmos returns null universalTx","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"marks notFound when cosmos returns null universalTx"},{"ancestorTitles":["resolveChildInboundsFromLogs"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"resolveChildInboundsFromLogs records diagnostic + marks notFound when getUniversalTxByIdV2 throws","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"records diagnostic + marks notFound when getUniversalTxByIdV2 throws"},{"ancestorTitles":["resolveChildInboundsFromLogs"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"resolveChildInboundsFromLogs resolves one entry per inbound log","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"resolves one entry per inbound log"}],"endTime":1792494887550,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/child-inbounds.spec.ts","startTime":1792494887499,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["listAutoProbeChains"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"listAutoProbeChains puts Push CAIPs first","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"puts Push CAIPs first"},{"ancestorTitles":["detectUniversalTxAuto"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTxAuto returns the first non-UNKNOWN detection in probe order","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"returns the first non-UNKNOWN detection in probe order"},{"ancestorTitles":["detectUniversalTxAuto"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTxAuto returns undefined detection and UNKNOWN attempts when no chain matches","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns undefined detection and UNKNOWN attempts when no chain matches"},{"ancestorTitles":["detectUniversalTxAuto"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTxAuto prefers Push Chain when both Push and Sepolia match","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"prefers Push Chain when both Push and Sepolia match"},{"ancestorTitles":["detectUniversalTxAuto"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTxAuto records per-chain errors without failing the overall probe","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"records per-chain errors without failing the overall probe"},{"ancestorTitles":["detectUniversalTxAuto"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"detectUniversalTxAuto passes through probe options to detectUniversalTx","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"passes through probe options to detectUniversalTx"}],"endTime":1792494887601,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/auto-detect.spec.ts","startTime":1792494887553,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["SVM PC20 seeds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM PC20 seeds pins the seeds to the program source","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"pins the seeds to the program source"},{"ancestorTitles":["SVM PC20 seeds"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"SVM PC20 seeds pins the Pc20State length","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"pins the Pc20State length"},{"ancestorTitles":["derivePC20Mint"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"derivePC20Mint seeds on the raw 20-byte source asset, not a padded 32-byte form","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"seeds on the raw 20-byte source asset, not a padded 32-byte form"},{"ancestorTitles":["derivePC20Mint"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"derivePC20Mint is case-insensitive on the source address","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"is case-insensitive on the source address"},{"ancestorTitles":["derivePC20Mint"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"derivePC20Mint derives distinct mints for distinct sources","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"derives distinct mints for distinct sources"},{"ancestorTitles":["derivePC20Mint"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"derivePC20Mint rejects a malformed source address","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a malformed source address"},{"ancestorTitles":["derivePC20Mint"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"derivePC20Mint matches predictSvmWrapperMint","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"matches predictSvmWrapperMint"},{"ancestorTitles":["derivePC20State"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"derivePC20State seeds on the mint","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"seeds on the mint"},{"ancestorTitles":["decodePc20State"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"decodePc20State decodes the account layout","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"decodes the account layout"},{"ancestorTitles":["decodePc20State"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodePc20State rejects a truncated account","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a truncated account"},{"ancestorTitles":["validatePC20Mint"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validatePC20Mint accepts a mutually consistent mint, state, and source","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts a mutually consistent mint, state, and source"},{"ancestorTitles":["validatePC20Mint"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"validatePC20Mint rejects a state PDA that does not derive from the mint","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a state PDA that does not derive from the mint"},{"ancestorTitles":["validatePC20Mint"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validatePC20Mint rejects a state whose wrapped_mint is a different mint","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a state whose wrapped_mint is a different mint"},{"ancestorTitles":["validatePC20Mint"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"validatePC20Mint rejects a source that disagrees with UniversalCore","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a source that disagrees with UniversalCore"},{"ancestorTitles":["validatePC20Mint"],"duration":5,"failureDetails":[],"failureMessages":[],"fullName":"validatePC20Mint rejects a mint that does not re-derive from the stored source","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects a mint that does not re-derive from the stored source"},{"ancestorTitles":["buildPC20BurnAccounts"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildPC20BurnAccounts orders remaining accounts as [pc20_state, pc20_mint]","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"orders remaining accounts as [pc20_state, pc20_mint]"},{"ancestorTitles":["buildPC20BurnAccounts"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildPC20BurnAccounts passes no gateway token account","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"passes no gateway token account"},{"ancestorTitles":["buildPC20SvmDeliveryFields"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildPC20SvmDeliveryFields encodes SPL TransferChecked (index 12, u64 LE amount, decimals)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"encodes SPL TransferChecked (index 12, u64 LE amount, decimals)"},{"ancestorTitles":["buildPC20SvmDeliveryFields"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildPC20SvmDeliveryFields orders accounts source, mint, destination, owner with correct flags","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"orders accounts source, mint, destination, owner with correct flags"},{"ancestorTitles":["buildPC20SvmCeaBurnPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildPC20SvmCeaBurnPayload starts with the send_universal_tx anchor discriminator","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"starts with the send_universal_tx anchor discriminator"},{"ancestorTitles":["buildPC20SvmCeaBurnPayload"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"buildPC20SvmCeaBurnPayload lays out SendUniversalTxIxArgs exactly (state.rs:67 field order)","invocations":1,"location":null,"numPassingAsserts":9,"retryReasons":[],"status":"passed","title":"lays out SendUniversalTxIxArgs exactly (state.rs:67 field order)"},{"ancestorTitles":["buildPC20SvmCeaBurnPayload"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"buildPC20SvmCeaBurnPayload orders accounts [state ro, mint w, ceaAta w, tokenProgram ro]","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"orders accounts [state ro, mint w, ceaAta w, tokenProgram ro]"}],"endTime":1792494887655,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/__tests__/svm.spec.ts","startTime":1792494887602,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"prepares exact selectors, binary output codes and literal zero arguments without inventing holes","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"prepares exact selectors, binary output codes and literal zero arguments without inventing holes"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"preserves WALLET/PARAM positions and resolves them independently of literal zeros","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"preserves WALLET/PARAM positions and resolves them independently of literal zeros"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"encodes the deployed field and enum order and roundtrips a complete spec canonically","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"encodes the deployed field and enum order and roundtrips a complete spec canonically"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"roundtrips templates including principal-BPS targets and bounds","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"roundtrips templates including principal-BPS targets and bounds"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"keeps a valid non-DFS topological logic order when decoding unchanged signed bytes","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"keeps a valid non-DFS topological logic order when decoding unchanged signed bytes"},{"ancestorTitles":[],"duration":6,"failureDetails":[],"failureMessages":[],"fullName":"rejects cycles, invalid indexes and unsupported template holes before encoding","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"rejects cycles, invalid indexes and unsupported template holes before encoding"},{"ancestorTitles":[],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"rejects malformed enums, trailing bytes, foreign wire and filled format ambiguity","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"rejects malformed enums, trailing bytes, foreign wire and filled format ambiguity"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"binds origin to marketplace, integer card version and principal with ABI words","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"binds origin to marketplace, integer card version and principal with ABI words"}],"endTime":1792494887696,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/job-spec/__tests__/codec.spec.ts","startTime":1792494887656,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert a good spec passes","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"a good spec passes"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert UniversalCallback.sol:98 empty chainNamespace → (b) => ({ ...b, spec: { ...b.spec, account: { ...b.spec.account, chainNamespace: '' } } })","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UniversalCallback.sol:98 empty chainNamespace → (b) => ({ ...b, spec: { ...b.spec, account: { ...b.spec.account, chainNamespace: '' } } })"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert UniversalCallback.sol:98 empty chainId → (b) => ({ ...b, spec: { ...b.spec, account: { ...b.spec.account, chainId: '' } } })","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UniversalCallback.sol:98 empty chainId → (b) => ({ ...b, spec: { ...b.spec, account: { ...b.spec.account, chainId: '' } } })"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert UniversalCallback.sol:100 empty owner → (b) => ({ ...b, spec: { ...b.spec, account: { ...b.spec.account, owner: '0x' } } })","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UniversalCallback.sol:100 empty owner → (b) => ({ ...b, spec: { ...b.spec, account: { ...b.spec.account, owner: '0x' } } })"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert UniversalCallback.sol:104 empty query → (b) => ({ ...b, spec: { ...b.spec, query: '0x' } })","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UniversalCallback.sol:104 empty query → (b) => ({ ...b, spec: { ...b.spec, query: '0x' } })"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert UniversalCallback.sol:107 minConfirmations 0 → (b) => ({ ...b, spec: { ...b.spec, minConfirmations: 0 } })","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UniversalCallback.sol:107 minConfirmations 0 → (b) => ({ ...b, spec: { ...b.spec, minConfirmations: 0 } })"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert uint16 overflow minConfirmations → (b) => ({ ...b, spec: { ...b.spec, minConfirmations: 70_000 } })","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"uint16 overflow minConfirmations → (b) => ({ ...b, spec: { ...b.spec, minConfirmations: 70_000 } })"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert UniversalCallback.sol:131 blockNumber 0 on a chain with a height → (b) => ({ ...b, spec: { ...b.spec, blockNumber: 0n } })","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UniversalCallback.sol:131 blockNumber 0 on a chain with a height → (b) => ({ ...b, spec: { ...b.spec, blockNumber: 0n } })"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert UniversalCallback.sol:131 blockNumber above the oracle height → (b) => ({ ...b, spec: { ...b.spec, blockNumber: PF.observedChainHeight + 1n } })","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UniversalCallback.sol:131 blockNumber above the oracle height → (b) => ({ ...b, spec: { ...b.spec, blockNumber: PF.observedChainHeight + 1n } })"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert UniversalCallback.sol:129 heightless namespace with non-zero blockNumber → (b) => ({ ...b, preflight: { ...PF, observedChainHeight: 0n }, spec: { ...b.spec, blockNumber: 1n } })","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UniversalCallback.sol:129 heightless namespace with non-zero blockNumber → (b) => ({ ...b, preflight: { ...PF, observedChainHeight: 0n }, spec: { ...b.spec, blockNumber: 1n } })"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert UniversalCallback.sol:119 expiry == current height → (b) => ({ ...b, spec: { ...b.spec, expiryPushChainHeight: PF.pushBlockNumber } })","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UniversalCallback.sol:119 expiry == current height → (b) => ({ ...b, spec: { ...b.spec, expiryPushChainHeight: PF.pushBlockNumber } })"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert UniversalCallback.sol:122 zero revertRecipient → (b) => ({ ...b, spec: { ...b.spec, revertRecipient: '0x0000000000000000000000000000000000000000' } })","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UniversalCallback.sol:122 zero revertRecipient → (b) => ({ ...b, spec: { ...b.spec, revertRecipient: '0x0000000000000000000000000000000000000000' } })"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert UniversalCallback.sol:125 callbackGasLimit 0 → { callbackGasLimit: 0n }","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UniversalCallback.sol:125 callbackGasLimit 0 → { callbackGasLimit: 0n }"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert ReadTypes.sol:50 callbackGasLimit > 1_000_000 → { callbackGasLimit: 1000001n }","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"ReadTypes.sol:50 callbackGasLimit > 1_000_000 → { callbackGasLimit: 1000001n }"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert UniversalCallback.sol:134 value below protocol fee → { value: 999n }","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UniversalCallback.sol:134 value below protocol fee → { value: 999n }"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert UniversalCallback.sol:137 value above maxFee → { value: 10001n }","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"UniversalCallback.sol:137 value above maxFee → { value: 10001n }"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert node CanAffordCallback: value == fee leaves zero budget → { value: 1000n }","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"node CanAffordCallback: value == fee leaves zero budget → { value: 1000n }"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert svm/read_executor.go:29 owner not 32 bytes on solana → (b) => ({ ...b, preflight: { ...PF, destination: (0, destination_1.resolveDestination)({ chainNamespace: 'solana', chainId: 'x' }) }, spec: { ...b.spec, account: { chainNamespace: 'solana', chainId: 'x', owner: OK_OWNER } } })","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"svm/read_executor.go:29 owner not 32 bytes on solana → (b) => ({ ...b, preflight: { ...PF, destination: (0, destination_1.resolveDestination)({ chainNamespace: 'solana', chainId: 'x' }) }, spec: { ...b.spec, account: { chainNamespace: 'solana', chainId: 'x', owner: OK_OWNER } } })"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert heightless namespace with blockNumber 0 is valid","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"heightless namespace with blockNumber 0 is valid"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert without a preflight, only the chain-independent rules apply","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"without a preflight, only the chain-independent rules apply"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert reports every violation at once, not just the first","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"reports every violation at once, not just the first"},{"ancestorTitles":["validateReadSpec — one row per contract revert"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"validateReadSpec — one row per contract revert the thrown error carries the violations and the destination","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"the thrown error carries the violations and the destination"}],"endTime":1792494887733,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/validate.spec.ts","startTime":1792494887698,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["Web2 query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Web2 query envelope golden vector: web2.get.twoExtracts.liveRead3870d2af","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"golden vector: web2.get.twoExtracts.liveRead3870d2af"},{"ancestorTitles":["Web2 query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Web2 query envelope golden vector: web2.post.body.headersScrambled","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"golden vector: web2.post.body.headersScrambled"},{"ancestorTitles":["Web2 query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Web2 query envelope is a single tuple with a 0x20 head offset","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"is a single tuple with a 0x20 head offset"},{"ancestorTitles":["Web2 query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Web2 query envelope round-trips through the decoder shape with defaults applied","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"round-trips through the decoder shape with defaults applied"},{"ancestorTitles":["Web2 query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Web2 query envelope canonicalises headers: sorted keys, no whitespace, identical bytes regardless of input order","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"canonicalises headers: sorted keys, no whitespace, identical bytes regardless of input order"},{"ancestorTitles":["Web2 query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Web2 query envelope warns — does not throw — on sensitive-looking header names","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"warns — does not throw — on sensitive-looking header names"},{"ancestorTitles":["Web2 query envelope"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"Web2 query envelope maps every value type and keeps decimals","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"maps every value type and keeps decimals"},{"ancestorTitles":["Web2 query envelope"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"Web2 query envelope accepts exactly 16 extracts and rejects 17 or 0","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"accepts exactly 16 extracts and rejects 17 or 0"},{"ancestorTitles":["Web2 query envelope"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"Web2 query envelope rejects http://, a body on GET, decimals on a non-numeric type, and a bad path","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"rejects http://, a body on GET, decimals on a non-numeric type, and a bad path"},{"ancestorTitles":["Web2 query envelope"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"Web2 query envelope POST with a body encodes the body bytes","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"POST with a body encodes the body bytes"}],"endTime":1792494887767,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/envelope-web2.spec.ts","startTime":1792494887734,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["EvmClient dynamic gas estimation"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EvmClient dynamic gas estimation serializes an estimate above the former 500k multicall limit","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"serializes an estimate above the former 500k multicall limit"},{"ancestorTitles":["EvmClient dynamic gas estimation"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EvmClient dynamic gas estimation estimates empty-calldata transfers to EIP-7702 delegated accounts","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"estimates empty-calldata transfers to EIP-7702 delegated accounts"},{"ancestorTitles":["EvmClient dynamic gas estimation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EvmClient dynamic gas estimation keeps the 21k fast path for empty-calldata transfers to code-free EOAs","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"keeps the 21k fast path for empty-calldata transfers to code-free EOAs"},{"ancestorTitles":["EvmClient dynamic gas estimation"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"EvmClient dynamic gas estimation adds headroom for the observed AGW outbound estimate unless gas is explicit (undefined)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"adds headroom for the observed AGW outbound estimate unless gas is explicit (undefined)"},{"ancestorTitles":["EvmClient dynamic gas estimation"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"EvmClient dynamic gas estimation adds headroom for the observed AGW outbound estimate unless gas is explicit (500000)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"adds headroom for the observed AGW outbound estimate unless gas is explicit (500000)"}],"endTime":1792494887796,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/vm-client/evm-client.dynamic-gas.spec.ts","startTime":1792494887768,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["7702 estimation without guessed per-call ceilings"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"7702 estimation without guessed per-call ceilings uses a real estimate for an already delegated account when authorization RPC support is absent","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"uses a real estimate for an already delegated account when authorization RPC support is absent"},{"ancestorTitles":["7702 estimation without guessed per-call ceilings"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"7702 estimation without guessed per-call ceilings uses a delegation override for a fresh account only when authorization estimation fails","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"uses a delegation override for a fresh account only when authorization estimation fails"},{"ancestorTitles":["7702 estimation without guessed per-call ceilings"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"7702 estimation without guessed per-call ceilings does not broadcast a guessed gas budget when all supported estimates fail","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"does not broadcast a guessed gas budget when all supported estimates fail"}],"endTime":1792494887826,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/vm-client/evm-client.batch-gas.spec.ts","startTime":1792494887797,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"preserves arbitrary binary JobSpec bytes in the Solidity string slot with its original selector","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"preserves arbitrary binary JobSpec bytes in the Solidity string slot with its original selector"},{"ancestorTitles":[],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"supports plain UTF-8 descriptions but refuses conflicting carriers","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"supports plain UTF-8 descriptions but refuses conflicting carriers"}],"endTime":1792494887855,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/market/__tests__/kernel-wire.spec.ts","startTime":1792494887827,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["svm-idl/registry — single-arg registerIdl(idl)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl/registry — single-arg registerIdl(idl) registers an IDL keyed by toSvmHexAddress(idl.address)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"registers an IDL keyed by toSvmHexAddress(idl.address)"},{"ancestorTitles":["svm-idl/registry — single-arg registerIdl(idl)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl/registry — single-arg registerIdl(idl) is idempotent — re-registering the same IDL is a no-op","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"is idempotent — re-registering the same IDL is a no-op"},{"ancestorTitles":["svm-idl/registry — single-arg registerIdl(idl)"],"duration":2,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl/registry — single-arg registerIdl(idl) rejects non-Anchor input","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"rejects non-Anchor input"},{"ancestorTitles":["svm-idl/registry — single-arg registerIdl(idl)"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl/registry — single-arg registerIdl(idl) rejects an IDL whose address is not a valid Solana pubkey","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects an IDL whose address is not a valid Solana pubkey"},{"ancestorTitles":["svm-idl/registry — single-arg registerIdl(idl)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl/registry — single-arg registerIdl(idl) getRegisteredIdls returns normalized hex keys","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"getRegisteredIdls returns normalized hex keys"}],"endTime":1792494887886,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/svm-idl/registry.spec.ts","startTime":1792494887857,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["encodeAnchorIxData"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"encodeAnchorIxData matches hand-rolled receive_sol bytes for amount=0","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"matches hand-rolled receive_sol bytes for amount=0"},{"ancestorTitles":["encodeAnchorIxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeAnchorIxData matches hand-rolled receive_sol bytes for non-zero amount","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"matches hand-rolled receive_sol bytes for non-zero amount"},{"ancestorTitles":["encodeAnchorIxData"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"encodeAnchorIxData accepts camelCase function name equivalent to snake_case IDL name","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts camelCase function name equivalent to snake_case IDL name"},{"ancestorTitles":["encodeAnchorIxData"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"encodeAnchorIxData throws when instruction is not in IDL","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws when instruction is not in IDL"},{"ancestorTitles":["encodeAnchorIxData"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"encodeAnchorIxData throws on arg count mismatch","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"throws on arg count mismatch"},{"ancestorTitles":["isAnchorIdl"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"isAnchorIdl returns true for the test_counter IDL","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns true for the test_counter IDL"},{"ancestorTitles":["isAnchorIdl"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"isAnchorIdl returns false for an EVM ABI array","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns false for an EVM ABI array"},{"ancestorTitles":["isAnchorIdl"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"isAnchorIdl returns false for null/primitives","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"returns false for null/primitives"}],"endTime":1792494887914,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/svm-idl/ix-encoder.spec.ts","startTime":1792494887887,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"public read type contracts compile","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"public read type contracts compile"},{"ancestorTitles":[],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"overload and package export type contracts compile","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"overload and package export type contracts compile"}],"endTime":1792494888164,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/read-types.spec.ts","startTime":1792494887918,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["SVM gateway IDL"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"SVM gateway IDL includes the Anchor event CPI accounts for send_universal_tx","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"includes the Anchor event CPI accounts for send_universal_tx"}],"endTime":1792494888186,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/constants/__tests__/svm-gateway-idl.spec.ts","startTime":1792494888166,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["svm-idl normalize-address","toSvmHexAddress"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl normalize-address toSvmHexAddress accepts canonical 0x-hex and returns lowercase","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"accepts canonical 0x-hex and returns lowercase"},{"ancestorTitles":["svm-idl normalize-address","toSvmHexAddress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl normalize-address toSvmHexAddress accepts base58 and returns the matching 0x-hex","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts base58 and returns the matching 0x-hex"},{"ancestorTitles":["svm-idl normalize-address","toSvmHexAddress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl normalize-address toSvmHexAddress accepts the canonical System Program base58","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts the canonical System Program base58"},{"ancestorTitles":["svm-idl normalize-address","toSvmHexAddress"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl normalize-address toSvmHexAddress rejects hex with wrong length","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"rejects hex with wrong length"},{"ancestorTitles":["svm-idl normalize-address","toSvmHexAddress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl normalize-address toSvmHexAddress rejects base58 that decodes to a non-32-byte length","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects base58 that decodes to a non-32-byte length"},{"ancestorTitles":["svm-idl normalize-address","toSvmHexAddress"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl normalize-address toSvmHexAddress rejects malformed base58 (contains 0/O/I/l)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects malformed base58 (contains 0/O/I/l)"},{"ancestorTitles":["svm-idl normalize-address","toSvmHexAddress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl normalize-address toSvmHexAddress rejects empty / non-string","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"rejects empty / non-string"},{"ancestorTitles":["svm-idl normalize-address","isValidSvmAddress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl normalize-address isValidSvmAddress accepts 0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts 0x7673075a980bfd5d6b1dffe99c31f63e8938519cc1c2af009dda5e568a94460d"},{"ancestorTitles":["svm-idl normalize-address","isValidSvmAddress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl normalize-address isValidSvmAddress accepts 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts 8yNqjrMnFiFbVTVQcKij8tNWWTMdFkrDf9abCGgc2sgx"},{"ancestorTitles":["svm-idl normalize-address","isValidSvmAddress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl normalize-address isValidSvmAddress accepts 11111111111111111111111111111111","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts 11111111111111111111111111111111"},{"ancestorTitles":["svm-idl normalize-address","isValidSvmAddress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl normalize-address isValidSvmAddress rejects ","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects "},{"ancestorTitles":["svm-idl normalize-address","isValidSvmAddress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl normalize-address isValidSvmAddress rejects not-base58-at-all-!","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects not-base58-at-all-!"},{"ancestorTitles":["svm-idl normalize-address","isValidSvmAddress"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl normalize-address isValidSvmAddress rejects 0xdeadbeef","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects 0xdeadbeef"},{"ancestorTitles":["svm-idl normalize-address","isValidSvmAddress"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"svm-idl normalize-address isValidSvmAddress rejects 123","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects 123"}],"endTime":1792494888201,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/svm-idl/normalize-address.spec.ts","startTime":1792494888187,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["classify()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classify() returns UNKNOWN for empty logs","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns UNKNOWN for empty logs"},{"ancestorTitles":["classify()"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"classify() classifies UniversalTx + fromCEA=false as INBOUND_FROM_EOA","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"classifies UniversalTx + fromCEA=false as INBOUND_FROM_EOA"},{"ancestorTitles":["classify()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classify() classifies UniversalTx + fromCEA=true as INBOUND_FROM_CEA","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"classifies UniversalTx + fromCEA=true as INBOUND_FROM_CEA"},{"ancestorTitles":["classify()"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"classify() classifies UniversalTxOutbound as OUTBOUND_INITIATED","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"classifies UniversalTxOutbound as OUTBOUND_INITIATED"},{"ancestorTitles":["classify()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classify() classifies UniversalTxFinalized as OUTBOUND_FINALIZED and enriches pushAccount from sibling executed log","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"classifies UniversalTxFinalized as OUTBOUND_FINALIZED and enriches pushAccount from sibling executed log"},{"ancestorTitles":["classify()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classify() classifies UniversalTxReverted as OUTBOUND_REVERTED","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"classifies UniversalTxReverted as OUTBOUND_REVERTED"},{"ancestorTitles":["classify()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classify() classifies RevertUniversalTx (gateway) as INBOUND_REVERTED with tuple array decode","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"classifies RevertUniversalTx (gateway) as INBOUND_REVERTED with tuple array decode"},{"ancestorTitles":["classify()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classify() priority: finalized beats executed-only","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"priority: finalized beats executed-only"},{"ancestorTitles":["classify()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classify() returns UNKNOWN when no known universal event matches","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns UNKNOWN when no known universal event matches"},{"ancestorTitles":["classify()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classify() classifyAll surfaces every universal-tx log independently","invocations":1,"location":null,"numPassingAsserts":9,"retryReasons":[],"status":"passed","title":"classifyAll surfaces every universal-tx log independently"},{"ancestorTitles":["classify()"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"classify() classifyAll returns empty array when no logs","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classifyAll returns empty array when no logs"},{"ancestorTitles":["classify()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classify() classifyAll drops unrecognized event names","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"classifyAll drops unrecognized event names"},{"ancestorTitles":["classify()"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"classify() maps unknown txType to UNKNOWN","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"maps unknown txType to UNKNOWN"}],"endTime":1792494888217,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/universal-tx-detector/__tests__/classify.spec.ts","startTime":1792494888202,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["maxPCForGas quote helpers"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"maxPCForGas quote helpers adds the default 10% cap buffer and returns the matching native value","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"adds the default 10% cap buffer and returns the matching native value"},{"ancestorTitles":["maxPCForGas quote helpers"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"maxPCForGas quote helpers rounds buffered caps up so tiny gas legs are not rounded to zero","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rounds buffered caps up so tiny gas legs are not rounded to zero"},{"ancestorTitles":["maxPCForGas quote helpers"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"maxPCForGas quote helpers supports an explicit zero-buffer cap","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"supports an explicit zero-buffer cap"},{"ancestorTitles":["maxPCForGas quote helpers"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"maxPCForGas quote helpers derives the gas leg from queryOutboundGasFee nativeValueForGas","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"derives the gas leg from queryOutboundGasFee nativeValueForGas"},{"ancestorTitles":["maxPCForGas quote helpers"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"maxPCForGas quote helpers returns an uncapped sentinel when the gas leg is zero","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns an uncapped sentinel when the gas leg is zero"},{"ancestorTitles":["maxPCForGas quote helpers"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"maxPCForGas quote helpers rejects impossible native/protocol fee combinations","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"rejects impossible native/protocol fee combinations"},{"ancestorTitles":["maxPCForGas quote helpers"],"duration":4,"failureDetails":[],"failureMessages":[],"fullName":"maxPCForGas quote helpers rejects invalid buffer values","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"rejects invalid buffer values"}],"endTime":1792494888232,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/max-pc-for-gas.spec.ts","startTime":1792494888218,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["decodeRevert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeRevert returns null on empty input","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns null on empty input"},{"ancestorTitles":["decodeRevert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeRevert returns null when no `ret 0x...` blob present","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns null when no `ret 0x...` blob present"},{"ancestorTitles":["decodeRevert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeRevert decodes a known parameterless custom selector","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"decodes a known parameterless custom selector"},{"ancestorTitles":["decodeRevert"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"decodeRevert decodes a known parameterized custom selector (extra ABI args appended)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"decodes a known parameterized custom selector (extra ABI args appended)"},{"ancestorTitles":["decodeRevert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeRevert decodes InvalidInput from CEA self-call validation","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"decodes InvalidInput from CEA self-call validation"},{"ancestorTitles":["decodeRevert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeRevert decodes GasPriceBelowBase from stale outbound gas-price overrides","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"decodes GasPriceBelowBase from stale outbound gas-price overrides"},{"ancestorTitles":["decodeRevert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeRevert decodes ABI-encoded Error(string) (\"STF\")","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"decodes ABI-encoded Error(string) (\"STF\")"},{"ancestorTitles":["decodeRevert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeRevert returns kind=unknown for unmapped selectors","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"returns kind=unknown for unmapped selectors"},{"ancestorTitles":["decodeRevert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeRevert returns null for malformed blob shorter than the 10-char selector","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"returns null for malformed blob shorter than the 10-char selector"},{"ancestorTitles":["decodeRevert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeRevert handles Error(string) with malformed length gracefully (falls through to unknown)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"handles Error(string) with malformed length gracefully (falls through to unknown)"},{"ancestorTitles":["decodeRevert"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"decodeRevert lowercases the selector regardless of input casing","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"lowercases the selector regardless of input casing"},{"ancestorTitles":["KNOWN_ERROR_SELECTORS table"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"KNOWN_ERROR_SELECTORS table every entry has name + hint + provenance","invocations":1,"location":null,"numPassingAsserts":36,"retryReasons":[],"status":"passed","title":"every entry has name + hint + provenance"},{"ancestorTitles":["KNOWN_ERROR_SELECTORS table"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"KNOWN_ERROR_SELECTORS table selectors are 10 chars (0x + 8 hex)","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"selectors are 10 chars (0x + 8 hex)"}],"endTime":1792494888244,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/error-decoder.spec.ts","startTime":1792494888233,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["PC20 protobuf fields"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 protobuf fields round-trips OutboundObservation.pc20WrapperAddress (field 6)","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"round-trips OutboundObservation.pc20WrapperAddress (field 6)"},{"ancestorTitles":["PC20 protobuf fields"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 protobuf fields round-trips OutboundTx PC20 fields (22, 23)","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"round-trips OutboundTx PC20 fields (22, 23)"},{"ancestorTitles":["PC20 protobuf fields"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PC20 protobuf fields defaults PC20 fields for a non-PC20 outbound","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"defaults PC20 fields for a non-PC20 outbound"},{"ancestorTitles":["PC20 protobuf fields"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PC20 protobuf fields round-trips Inbound.isPc20 (field 14) alongside its neighbours","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"round-trips Inbound.isPc20 (field 14) alongside its neighbours"}],"endTime":1792494888258,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/internals/pc20/__tests__/tracking.spec.ts","startTime":1792494888248,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["formatters"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"formatters formats PC exactly by default","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"formats PC exactly by default"},{"ancestorTitles":["formatters"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"formatters formats PC with truncated precision when requested","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"formats PC with truncated precision when requested"},{"ancestorTitles":["formatters"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"formatters normalizes Push Chain insufficient-funds wei amounts","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"normalizes Push Chain insufficient-funds wei amounts"},{"ancestorTitles":["formatters"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"formatters leaves unrelated insufficient-funds messages unchanged","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"leaves unrelated insufficient-funds messages unchanged"},{"ancestorTitles":["formatters"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"formatters shortens source-chain insufficient gas/value errors for public display","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"shortens source-chain insufficient gas/value errors for public display"},{"ancestorTitles":["formatters"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"formatters shortens Solana no-prior-credit simulation errors for public display","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"shortens Solana no-prior-credit simulation errors for public display"},{"ancestorTitles":["formatters"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"formatters prefers library shortMessage when normalizing error objects","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"prefers library shortMessage when normalizing error objects"},{"ancestorTitles":["formatters"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"formatters looks through generic viem shortMessage wrappers for nested balance details","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"looks through generic viem shortMessage wrappers for nested balance details"},{"ancestorTitles":["formatters"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"formatters keeps plain object errors readable for terminal hooks","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"keeps plain object errors readable for terminal hooks"}],"endTime":1792494888270,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/formatters.spec.ts","startTime":1792494888259,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["sizeCallbackBudget"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeCallbackBudget is gasLimit × gasPrice × buffer","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"is gasLimit × gasPrice × buffer"},{"ancestorTitles":["sizeCallbackBudget"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeCallbackBudget never returns zero — a zero gas price falls back to the 1 gwei floor","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"never returns zero — a zero gas price falls back to the 1 gwei floor"},{"ancestorTitles":["sizeCallbackBudget"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeCallbackBudget covers what Donut actually burned for a 200k-limit callback (118,289 gas at 1 gwei)","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"covers what Donut actually burned for a 200k-limit callback (118,289 gas at 1 gwei)"},{"ancestorTitles":["sizeCallbackBudget"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"sizeCallbackBudget bigint math is exact at the 1M gas ceiling","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"bigint math is exact at the 1M gas ceiling"},{"ancestorTitles":["sizeCallbackBudget"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"sizeCallbackBudget rejects a non-positive gas limit or a bad buffer","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"rejects a non-positive gas limit or a bad buffer"}],"endTime":1792494888280,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/read-state/__tests__/budget.spec.ts","startTime":1792494888271,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["R3 execute-phase hook emission order (static guard)"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"R3 execute-phase hook emission order (static guard) EVM variant: emission sites are in numeric-ascending order","invocations":1,"location":null,"numPassingAsserts":11,"retryReasons":[],"status":"passed","title":"EVM variant: emission sites are in numeric-ascending order"},{"ancestorTitles":["R3 execute-phase hook emission order (static guard)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R3 execute-phase hook emission order (static guard) SVM variant: emission sites are in numeric-ascending order","invocations":1,"location":null,"numPassingAsserts":11,"retryReasons":[],"status":"passed","title":"SVM variant: emission sites are in numeric-ascending order"},{"ancestorTitles":["R3 execute-phase hook emission order (static guard)"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"R3 execute-phase hook emission order (static guard) 304-04 (decline) appears in the catch-branch between 304-01 and 304-02","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"304-04 (decline) appears in the catch-branch between 304-01 and 304-02"}],"endTime":1792494888294,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/r3-execute-order.spec.ts","startTime":1792494888285,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["PushChainExecutionError"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"PushChainExecutionError default construction has undefined decodedError + gatewayTxHash","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"default construction has undefined decodedError + gatewayTxHash"},{"ancestorTitles":["PushChainExecutionError"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PushChainExecutionError preserves gatewayTxHash + decodedError when provided","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"preserves gatewayTxHash + decodedError when provided"},{"ancestorTitles":["PushChainExecutionError"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"PushChainExecutionError is throwable and survives instanceof through async/await","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"is throwable and survives instanceof through async/await"},{"ancestorTitles":["InsufficientUEABalanceError carries decodedError"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"InsufficientUEABalanceError carries decodedError NATIVE shortfall populates decodedError.name + hint","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"NATIVE shortfall populates decodedError.name + hint"},{"ancestorTitles":["InsufficientUEABalanceError carries decodedError"],"duration":1,"failureDetails":[],"failureMessages":[],"fullName":"InsufficientUEABalanceError carries decodedError formats native UPC amounts as decimal PC in the thrown message","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"formats native UPC amounts as decimal PC in the thrown message"},{"ancestorTitles":["InsufficientUEABalanceError carries decodedError"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"InsufficientUEABalanceError carries decodedError PRC20 shortfall populates decodedError with PRC-20-flavoured hint","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"PRC20 shortfall populates decodedError with PRC-20-flavoured hint"},{"ancestorTitles":["InsufficientUEABalanceError carries decodedError"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"InsufficientUEABalanceError carries decodedError still satisfies instanceof PushChainExecutionError (legacy compat)","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"still satisfies instanceof PushChainExecutionError (legacy compat)"},{"ancestorTitles":["InsufficientUEABalanceError carries decodedError"],"duration":0,"failureDetails":[],"failureMessages":[],"fullName":"InsufficientUEABalanceError carries decodedError preserves segmentIndex for cascade callers","invocations":1,"location":null,"numPassingAsserts":3,"retryReasons":[],"status":"passed","title":"preserves segmentIndex for cascade callers"}],"endTime":1792494888307,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/src/lib/orchestrator/__tests__/errors.spec.ts","startTime":1792494888295,"status":"passed","summary":""}],"wasInterrupted":false} diff --git a/plan/marketplace/research/sdk-implementation-2026-10-20/validation-summary.json b/plan/marketplace/research/sdk-implementation-2026-10-20/validation-summary.json new file mode 100644 index 00000000..cadb5af7 --- /dev/null +++ b/plan/marketplace/research/sdk-implementation-2026-10-20/validation-summary.json @@ -0,0 +1,30 @@ +{ + "observedAt": "2026-10-20T11:20:11.358467+00:00", + "unit": { + "passed": 2205, + "skipped": 12, + "failed": 0 + }, + "fork": { + "passed": 6, + "failed": 0 + }, + "readonlyLive": { + "passed": 2, + "failed": 0 + }, + "fundedLive": { + "runnerExitCode": 0, + "passed": 1, + "failed": 0, + "originalReporterSuccessField": false, + "note": "Known reporter callback sampling discrepancy; passing test status/counts and actual runner exit 0 retained." + }, + "build": "passed", + "specTypes": "passed", + "forkTypes": "passed", + "newProductionLint": "passed with zero warnings", + "guideBlocks": 4, + "packageAndDeclarationChecks": "passed", + "sourceBuiltApiMatches": true +} diff --git a/plan/marketplace/research/sdk-independent-2026-10-20/README.md b/plan/marketplace/research/sdk-independent-2026-10-20/README.md new file mode 100644 index 00000000..b31750b8 --- /dev/null +++ b/plan/marketplace/research/sdk-independent-2026-10-20/README.md @@ -0,0 +1,54 @@ +# Independent SDK completion — October 20 + +Follow-up to `fdfcd460`, on `feat/agw-sdk-v4`. Source/deployment targets remain UniversalMarketplace v2 `443b4e2` and AGW v6 `ffd567d`. [Completed checklist and external boundaries](../../sdk-readiness.md), [consumer guide](../../../../packages/core/MARKETPLACE.md). + +## Final acceptance + +| Check | Result / evidence | +| --- | --- | +| Full units | 2,246 passed, 12 existing skips, zero failures; [compressed raw Jest output](unit-results.json.gz) | +| Real-contract fork | 11 passed, zero failures; [Jest output](fork-results.json) | +| Basic live run | 3 passed, zero failures/skips, process exit 0; [report](live-results.json), [transactions/read requests](live-evidence.json) | +| Owned-token live funding run | 3 passed, zero failures/skips, process exit 0; [report](funding-results.json), [transactions](funding-evidence.json) | +| Cleanup | Cards 4/5 inactive; market jobs 4/7/8/9 Rejected with grants disabled; plain jobs 5/6 Completed; all six clients have zero principal/payment token balances; [read-only post-state](post-live-state.json) | +| Build/types/docs/package | Build, library/spec/fork types, eight guide TS blocks, compiled CJS/ESM imports, declarations and npm dry-run contents pass | +| API | Source/compiled surfaces match; [compressed report](api-comparison.json.gz). Its baseline includes earlier SDK changes. | +| Lint | New marketplace/job modules pass with zero warnings; native transport retains its 13 baseline warnings, with no new diagnostic. [Summary](validation-summary.json) | + +The 18 added unit cases cover history authentication, watcher delivery/recovery, descriptions, prepared-read sending, paid-preview recovery/mismatch rejection, CI completion reporting, opening receipt errors and native broadcast-hash preservation. Native atomic confirmation failures cannot fall back to sequential execution after broadcast. + +The real-contract fork adds a valid ERC-1271 owner through a public UniversalSigner adapter, invalid magic/trailing-data/short returns, compatible and echo-only 7702 delegates, and same-block opening/card-update history. The self-contained fixture builds from repository source using cached solc 0.8.26; it needs no sibling contract checkout or live deployment. The existing fork lifecycle still covers escrow/payout, price/version drift, binary descriptions, paused refunds, permissions and cancellation. Its external UEA signature uses a native submitting transport because Anvil has no Cosmos transport; actual external-owner transport is tested live. + +The basic live run covers native and external UEA opening/cancellation, receipt recovery, paid validator-consensus preview, sending a pure prepared read and authenticated request-ID recovery with zero new payment. The CI reporter now derives success from final counts and preserves Jest's pre-final `success` flag separately. + +The funding run uses assets owned by the configured master, without public impersonation: actual principal/fee/PC deposits; 0.01 pUSDC escrow/payout per native/AGW plain job; 0.01 USDT bridged from a fresh BSC origin; and up to 0.01 pBNB for BSC source-gas setup. A fresh controlled evaluator completes the plain jobs. The marketplace evaluator is unchanged. Principal, reserve and payout tokens are returned; bounded PC/BNB funds test gas. Cleanup is independently checked on-chain. + +## Earlier failure and correction + +An earlier local acceptance run passed ten cases but timed out reading the ERC-1271 adapter's submitted transaction receipt. [Raw earlier report](fork-before-confirmation-fix.json.gz). The local adapter now waits for explicit Anvil confirmation mining before returning its hash. The audit also exposed missing recovery metadata in shared native single/atomic transport: those errors now retain broadcast hashes, and a typed unsupported-signing error after broadcast cannot cause sequential fallback. Regression cases and the final full unit/fork runs pass. This is not a claim that every intermediate attempt passed. + +The live runs precede the final native error-only recovery guard; that guard is covered by the final unit and fork runs. Its successful transaction path is unchanged. + +The funding run completed before the reporter correction and retains its original `success: false` sampling discrepancy despite three passed tests and process exit 0. The later basic live report has `success: true` and `jestReportedSuccess: false`, exercising the corrected counter-based reporting. Raw reports are unchanged. + +## Remaining boundary + +There is no SDK-only implementation or acceptance item left in the current EVM v2 checklist. The contract/deployment dependencies are (1) aligned CEA manifests on three destinations and (2) a compatible automatic evaluator/hook/shared schema with a public verify/retry ABI. No automatic verdict, marketplace-evaluator impersonation, mainnet rollout, new marketplace/kernel/hook/evaluator deployment or npm publication is claimed. Deferred product features remain outside this boundary. + +## Reproduction + +```sh +node node_modules/jest/bin/jest.js --config packages/core/jest.config.ts --runInBand --silent +node node_modules/jest/bin/jest.js --config packages/core/jest.marketplace-local.config.ts --runInBand +node node_modules/ts-node/dist/bin.js --compiler-options '{"module":"commonjs"}' packages/core/__e2e__/ci/run.ts --group marketplace-funding --verify +node node_modules/ts-node/dist/bin.js --compiler-options '{"module":"commonjs"}' packages/core/__e2e__/ci/run.ts --group marketplace-funding +node node_modules/ts-node/dist/bin.js --compiler-options '{"module":"commonjs"}' packages/core/__e2e__/ci/run.ts --group marketplace-live +NX_DAEMON=false node node_modules/nx/bin/nx.js run core:build --skip-nx-cache +node node_modules/typescript/bin/tsc -p packages/core/tsconfig.spec.json --noEmit +node node_modules/typescript/bin/tsc -p packages/core/tsconfig.marketplace-local.json --noEmit +node packages/core/scripts/check-agw-docs.js packages/core/MARKETPLACE.md +node packages/core/scripts/check-agw-package.js +node packages/core/scripts/check-agw-api.js --output /tmp/marketplace-api.json +``` + +Run funded groups serially: they share the configured master for setup and gas. All marketplace groups remain excluded from default `all`; funding acceptance is explicit. [Checked source hashes](checked-files.json) and retained-result checksums are recorded with the validation summary. diff --git a/plan/marketplace/research/sdk-independent-2026-10-20/api-comparison.json.gz b/plan/marketplace/research/sdk-independent-2026-10-20/api-comparison.json.gz new file mode 100644 index 00000000..b6132efa Binary files /dev/null and b/plan/marketplace/research/sdk-independent-2026-10-20/api-comparison.json.gz differ diff --git a/plan/marketplace/research/sdk-independent-2026-10-20/checked-files.json b/plan/marketplace/research/sdk-independent-2026-10-20/checked-files.json new file mode 100644 index 00000000..db3a93c5 --- /dev/null +++ b/plan/marketplace/research/sdk-independent-2026-10-20/checked-files.json @@ -0,0 +1,42 @@ +{ + "packages/core/MARKETPLACE.md": "600c24a6656468dd9fe955d4b08154b540d3c6e200267485df48d1df83f0dbc4", + "packages/core/__e2e__/ci/ci-reporter.js": "bfcdfa65da3b93a640b997b7ba883a7cb38d005981f39ec50a052ddf61dafe84", + "packages/core/__e2e__/ci/suite.ts": "ca2016afb28af05318583db62cf01463576146dc1d9f921fc2ff73e795e9f0cc", + "packages/core/__e2e__/marketplace/funding.spec.ts": "8f0ec7f3aa19c7869f90e7d65f9ad27423f4c3494592c88ed216dd41f012ef03", + "packages/core/__e2e__/marketplace/lifecycle.spec.ts": "4d88a7623b42599c46ba4415d26f3b250ba82738d0e46c3b30f9808f132450ee", + "packages/core/__market-local__/marketplace.spec.ts": "0ba4ce8053d658684433b5e452b53e8b983d338cc006b44cf66294e99432e30a", + "packages/core/scripts/agw-local/contracts/MarketplaceOwnerFixtures.sol": "ea23b3d864c8a87ce4bb9db6c98735f281a5c949e07bbca39f078fc1d41319c5", + "packages/core/scripts/marketplace-local/prepare.sh": "2dcfcba03dc8d5088b59700a59ac1d57193897338d8a8dfabb0788ddfa3f8d3f", + "packages/core/src/lib/agentic/contracts/reader.ts": "266a5beaaa9076354c68781181384ae87a98bfccc36c7c4e9e89f9784a8dc42d", + "packages/core/src/lib/index.ts": "0b1a4c353c795fae08bae978b6eff341f56ed46e2020be47b554269564c81d2f", + "packages/core/src/lib/job-spec/__tests__/description.spec.ts": "040cf351932fe6e75248919abbd9c3f7a53a342d11a9c6c1b3e2ba4915be5098", + "packages/core/src/lib/job-spec/__tests__/preview.spec.ts": "33551743a46c045a4f027c818c557437ab0cfef03a108079f38b3f59949a3ca9", + "packages/core/src/lib/job-spec/codec.ts": "d0a37d7e282aa27ba8dcf100bbb03736fc553a4b71e0b2bf92f59b6cfdc1be8b", + "packages/core/src/lib/job-spec/helpers.ts": "a98280f583e03d9c4e96aace9126152507d0e6af9e12793129147fe3e7ab631c", + "packages/core/src/lib/job-spec/preview.ts": "af57c318fae6872fc69f70629ed1ed67264e931cdde859bc9d7d41dcae20ce82", + "packages/core/src/lib/job-spec/read.ts": "33ede00e2f9202ac8bfb84e4a233ad8a9c1ac06dd3e1dba37ac5e22c14460e1a", + "packages/core/src/lib/job-spec/types.ts": "261d61a5425b8183091c3dc5109ec2e9becdb81adc9c63bbbaab021bd71a6eb7", + "packages/core/src/lib/job/job.ts": "c522ea2a3bfa0e3d5db5f62ec97be1613460f64ad764daea382239977da5c706", + "packages/core/src/lib/job/types.ts": "2f2292379620f18872ea264c76ea7792a3d6f51b09003435d0fa1cfd325e51c9", + "packages/core/src/lib/job/watch.spec.ts": "fb016ae2cea1babd3872e2b0911edc8b1875d6ad73f8e58c32dfc94724194589", + "packages/core/src/lib/job/watch.ts": "94d884ec2f4c983782e7e08dc97bc228bb3c2b907964741ab8f7e4863bb92709", + "packages/core/src/lib/market/__tests__/ci-reporter.spec.ts": "502768def296eeb117ee08e9789f84ff812ec1465ce53b68ddad918691ee5320", + "packages/core/src/lib/market/__tests__/history.spec.ts": "dda4b62ee703fa65de758ff826ca44905803b31fb4034bb998833d240db919a5", + "packages/core/src/lib/market/__tests__/namespace.spec.ts": "b658f308d92a04b0db11508a3c3f3f33865fb91139e5eb5109fa5dd2a4aabe84", + "packages/core/src/lib/market/data.ts": "2f46adcb1f4705490587afb5855cb7c0c10023dc255c4e0fee9aaa7ed6eeb96c", + "packages/core/src/lib/market/deposit.ts": "4ca106853bbb1ce470aa2bab291a259d9a75aa8af90d920c51f8687b776d5928", + "packages/core/src/lib/market/errors.ts": "5f68664f0179c36bfe65628285557180bdde280d646daa116638cea1a6930168", + "packages/core/src/lib/market/history.ts": "5aebf030f13df6589e5da4c8dfee1074da07ad6e2691fb3913e10ff0025e327b", + "packages/core/src/lib/market/market.ts": "ac5955a5dba038a7dc54f521c8452e1908cd05737bcef20e740f63431572bfce", + "packages/core/src/lib/market/types.ts": "0fdfad31ef34dc90dbac6c300735b815b38c596c66538d3aa567cdc799d200f3", + "packages/core/src/lib/orchestrator/__tests__/push-chain-native-multicall.spec.ts": "e507ba83bd8e813f03e092b5d758e2fe611fa21cf990169a26b334f5acbb61ef", + "packages/core/src/lib/orchestrator/internals/errors.ts": "f1db5b10bd4a1420667c5d5bf16ea16868dada4196185bf682dcdd93993b4f57", + "packages/core/src/lib/orchestrator/internals/push-chain-tx.ts": "63914c60f05c0dba2327564c601df9422423c116f8142b65c4088efbbcc54105", + "packages/core/src/lib/push-chain/push-chain.ts": "6ef99aae37c99001c4d8c6aee6d5efd45a41ee0c556721f4aec81aa9c6b04642", + "packages/core/src/lib/read-state/__tests__/read-types.spec.ts": "85367520d6220a3d3789ef04dc64f4dbbfbd722fa76310d7f3dc867b32f75e60", + "plan/SDK-CHANGELOG.md": "bff998a3388be05242e203b38b6cc032243bcca41703d78752b651b340647e94", + "plan/marketplace/README.md": "b0b5a980d4904c1ae72c8923acc4d83554df911d8f63d61aa5749991106159dd", + "plan/marketplace/implementation-status.md": "087d5c7087b1ceb97c7a9cb03df87ff75db37315b1bd610cf9b542095506a866", + "plan/marketplace/questions.md": "8ad917e8324d9a63b2a9f19536f2821591c4cf8e47114d4712d65954ec1c4667", + "plan/marketplace/sdk-readiness.md": "8925640a99aa75caac5a0bd157145e3c0038080f8edf3f2f07cafd50b787d0cc" +} diff --git a/plan/marketplace/research/sdk-independent-2026-10-20/fork-before-confirmation-fix.json.gz b/plan/marketplace/research/sdk-independent-2026-10-20/fork-before-confirmation-fix.json.gz new file mode 100644 index 00000000..663e798d Binary files /dev/null and b/plan/marketplace/research/sdk-independent-2026-10-20/fork-before-confirmation-fix.json.gz differ diff --git a/plan/marketplace/research/sdk-independent-2026-10-20/fork-results.json b/plan/marketplace/research/sdk-independent-2026-10-20/fork-results.json new file mode 100644 index 00000000..ab891137 --- /dev/null +++ b/plan/marketplace/research/sdk-independent-2026-10-20/fork-results.json @@ -0,0 +1 @@ +{"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":1,"numPassedTests":11,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":1,"numTotalTests":11,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1792502503903,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":[],"duration":35353,"failureDetails":[],"failureMessages":[],"fullName":"registers and discovers a real v2 provider card through the public namespace","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"registers and discovers a real v2 provider card through the public namespace"},{"ancestorTitles":[],"duration":36365,"failureDetails":[],"failureMessages":[],"fullName":"previews and signs the exact on-chain JobSpec, opens on real AGW v6, and preserves binary bytes","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"previews and signs the exact on-chain JobSpec, opens on real AGW v6, and preserves binary bytes"},{"ancestorTitles":[],"duration":40,"failureDetails":[],"failureMessages":[],"fullName":"updates a decoded card without losing rule constraints or template wire bytes","invocations":1,"location":null,"numPassingAsserts":4,"retryReasons":[],"status":"passed","title":"updates a decoded card without losing rule constraints or template wire bytes"},{"ancestorTitles":[],"duration":7814,"failureDetails":[],"failureMessages":[],"fullName":"deposits original principal, fee and PC after a card update and recovers history in a fresh client","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"deposits original principal, fee and PC after a card update and recovers history in a fresh client"},{"ancestorTitles":[],"duration":3265,"failureDetails":[],"failureMessages":[],"fullName":"funds through the real rules hook and submits as the provider; manual evaluator completes locally","invocations":1,"location":null,"numPassingAsserts":10,"retryReasons":[],"status":"passed","title":"funds through the real rules hook and submits as the provider; manual evaluator completes locally"},{"ancestorTitles":[],"duration":3476,"failureDetails":[],"failureMessages":[],"fullName":"creates a plain job and allows third-party refund while the kernel is paused","invocations":1,"location":null,"numPassingAsserts":2,"retryReasons":[],"status":"passed","title":"creates a plain job and allows third-party refund while the kernel is paused"},{"ancestorTitles":[],"duration":31595,"failureDetails":[],"failureMessages":[],"fullName":"rejects a tampered plan before signing and atomically cancels a second job with permission revocation","invocations":1,"location":null,"numPassingAsserts":5,"retryReasons":[],"status":"passed","title":"rejects a tampered plan before signing and atomically cancels a second job with permission revocation"},{"ancestorTitles":[],"duration":32846,"failureDetails":[],"failureMessages":[],"fullName":"accepts a real deployed EVM UEA owner signature with its home-chain domain","invocations":1,"location":null,"numPassingAsserts":6,"retryReasons":[],"status":"passed","title":"accepts a real deployed EVM UEA owner signature with its home-chain domain"},{"ancestorTitles":[],"duration":31781,"failureDetails":[],"failureMessages":[],"fullName":"uses a real ERC-1271 owner adapter, rejects malformed success values, and recovers without a second signature","invocations":1,"location":null,"numPassingAsserts":8,"retryReasons":[],"status":"passed","title":"uses a real ERC-1271 owner adapter, rejects malformed success values, and recovers without a second signature"},{"ancestorTitles":[],"duration":32758,"failureDetails":[],"failureMessages":[],"fullName":"accepts a compatible EIP-7702 verifier and refuses an echo fallback before broadcast","invocations":1,"location":null,"numPassingAsserts":1,"retryReasons":[],"status":"passed","title":"accepts a compatible EIP-7702 verifier and refuses an echo fallback before broadcast"},{"ancestorTitles":[],"duration":66957,"failureDetails":[],"failureMessages":[],"fullName":"recovers the original card and opening when a provider updates in the same mined block","invocations":1,"location":null,"numPassingAsserts":7,"retryReasons":[],"status":"passed","title":"recovers the original card and opening when a provider updates in the same mined block"}],"endTime":1792502793438,"message":"","name":"/Users/shoaibmohammed/Desktop/work/PUSH/push-chain-sdk/packages/core/__market-local__/marketplace.spec.ts","startTime":1792502503921,"status":"passed","summary":""}],"wasInterrupted":false} diff --git a/plan/marketplace/research/sdk-independent-2026-10-20/funding-evidence.json b/plan/marketplace/research/sdk-independent-2026-10-20/funding-evidence.json new file mode 100644 index 00000000..6c824cc5 --- /dev/null +++ b/plan/marketplace/research/sdk-independent-2026-10-20/funding-evidence.json @@ -0,0 +1,86 @@ +[ + { + "name": "marketplace-funding-register", + "at": "2026-10-20T13:02:36.549Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "cardId": "4", + "txHash": "0x2918939cb4ff99909d0169495d1e2ad7fd08b3d571aef35f716697b57993ab82" + }, + { + "name": "marketplace-funding-agw-paid", + "at": "2026-10-20T13:04:38.710Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "cardId": "4", + "marketJobId": "4", + "plainJobId": "5", + "wallet": "0x5FA6AF920028Fd96fB8541f2cA74557384c4FdC0", + "depositHashes": [ + "0x1b01fa8fbe213626dd65e115b50f882eb3b176de4d71d8cd8e795f000eb272fd", + "0x0774c597d2fe7c73a354898858818b3ddd57e4c56ea457df1d6c8201103b9ae7", + "0x03ff3a23dd366d1fa7c5144e50c17f18bde6b2f7e2d39fbdb7ac73e923d34b4a" + ], + "fundingHash": "0xca52cb7ef8fa2133f4e5ab12c71c5a8dd61be93d4c5a36c5975e7e711efcb9f1", + "completionHash": "0xf3a6ab8bd6b70bfc5cd2a3709ba8775e26ed2e740a5f220e7164b76f3b979768", + "budget": "10000" + }, + { + "name": "marketplace-funding-native-paid", + "at": "2026-10-20T13:05:35.771Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "jobId": "6", + "fundingHash": "0x0226f10376116df3c9da52d53f11e032e3a134f399333e479dc061a64549c87b", + "completionHash": "0xd468555f7d6cf1c3027cc9fac285e3caa874f640ca33eb90d95e905c32dcb00a", + "budget": "10000" + }, + { + "name": "marketplace-funding-bsc-gas", + "at": "2026-10-20T13:06:51.695Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "txHash": "0x436b9a2e98c56cafd765cdb495056f72b54742054255f48be1f2528d0ea5f435", + "amount": "10000000000000000" + }, + { + "name": "marketplace-funding-origin", + "at": "2026-10-20T13:08:51.073Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "cardId": "4", + "jobId": "7", + "wallet": "0x7f7D461A5E9aF9deAC2F15dfC4a964baCeF94424", + "uea": "0x871cB7aF3f196fF5c47C37d5ea05B1560465F7d5", + "depositHashes": [ + "0xd246f1ade3345ae72db2cdbd51008a9bcb4822a981a0e1b42099b197df031338" + ], + "principal": "10000", + "origin": "eip155:97" + }, + { + "name": "marketplace-funding-cleanup", + "at": "2026-10-20T13:09:46.681Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "cardId": "4", + "jobs": [ + { + "jobId": "4", + "status": "Rejected" + }, + { + "jobId": "5", + "status": "Completed" + }, + { + "jobId": "6", + "status": "Completed" + }, + { + "jobId": "7", + "status": "Rejected" + } + ] + } +] diff --git a/plan/marketplace/research/sdk-independent-2026-10-20/funding-results.json b/plan/marketplace/research/sdk-independent-2026-10-20/funding-results.json new file mode 100644 index 00000000..23ed3308 --- /dev/null +++ b/plan/marketplace/research/sdk-independent-2026-10-20/funding-results.json @@ -0,0 +1,31 @@ +{ + "completedAt": "2026-10-20T13:09:46.691Z", + "numTotalTests": 3, + "numPassedTests": 3, + "numFailedTests": 0, + "numPendingTests": 0, + "success": false, + "tests": [ + { + "file": "marketplace/funding.spec.ts", + "fullName": "marketplace funding 1. deposits real principal and fee, cancels the market job, then pays an AGW plain job through a controlled manual evaluator", + "status": "passed", + "duration": 122161, + "error": null + }, + { + "file": "marketplace/funding.spec.ts", + "fullName": "marketplace funding 2. funds a native plain job with an atomic token approval and pays out on live Donut", + "status": "passed", + "duration": 57058, + "error": null + }, + { + "file": "marketplace/funding.spec.ts", + "fullName": "marketplace funding 3. bridges principal from a fresh BSC origin into the opened wallet and recovers its funds after cancellation", + "status": "passed", + "duration": 195301, + "error": null + } + ] +} \ No newline at end of file diff --git a/plan/marketplace/research/sdk-independent-2026-10-20/live-evidence.json b/plan/marketplace/research/sdk-independent-2026-10-20/live-evidence.json new file mode 100644 index 00000000..8c9f1417 --- /dev/null +++ b/plan/marketplace/research/sdk-independent-2026-10-20/live-evidence.json @@ -0,0 +1,79 @@ +[ + { + "name": "marketplace-register", + "at": "2026-10-20T13:12:50.195Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "cardId": "5", + "txHash": "0x263ad38fdce757fdbbd3f690403ad469a9e76eecc7000d9983bb0e7def4e3c86" + }, + { + "name": "marketplace-open", + "at": "2026-10-20T13:13:05.086Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "jobId": "8", + "wallet": "0x803b9a0fD190afC823e2DdDd5fA3Ac3EA882EAbC", + "rulesId": "0x2084b21f68d24374f68a7b8f7a2fdb5129e9b19cabb8b33c2b0de92826afb0f7", + "txHash": "0x5d4008cb375289992771b069a58481ab73bcea1a913df2dc6709e5aa2009474b" + }, + { + "name": "marketplace-cancel-cleanup", + "at": "2026-10-20T13:13:31.501Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "cardId": "5", + "wallet": "0x803b9a0fD190afC823e2DdDd5fA3Ac3EA882EAbC", + "jobId": "8", + "txHash": "0xb46174399a14ff570c319dd68ba7b8fa058e194c4f50a74c9b88acc0fad8d6d2" + }, + { + "name": "marketplace-paid-preview", + "at": "2026-10-20T13:13:50.238Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "pass": true, + "fees": { + "quoted": "1687500000000000", + "paid": "1687500000000000", + "newlyPaid": "1687500000000000" + }, + "reads": [ + { + "decoded": "0", + "requestId": "0xad56c9aebd7f7e49a9f5ba7c87962b48c0591f735556f3bc47b5a32aaf9bf5c3", + "txHash": "0x7a9de048a37bc091208c110ad36408ba0a86176b92dbcabeb0e872ae8f53c4e9", + "outcome": "SUCCESS" + } + ] + }, + { + "name": "marketplace-preview-recovery", + "at": "2026-10-20T13:14:10.538Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "originalRequestId": "0xad56c9aebd7f7e49a9f5ba7c87962b48c0591f735556f3bc47b5a32aaf9bf5c3", + "preparedReadRequestId": "0xa72eba4c7bb78f500aec02efa2950b8a229f0b64fe261eb1ef52da95c89e9800", + "additionalPaymentOnResume": "0" + }, + { + "name": "marketplace-external-open", + "at": "2026-10-20T13:15:05.075Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "jobId": "9", + "wallet": "0x4C8d290cad724e9f251806D09f51D6b2911000d3", + "uea": "0x69977cF1645523b59229A3c59E103732e1B5B44C", + "signerChainId": "11155111", + "txHash": "0xc12012a1b055e49b50789d81b5d48d14a9fa03f1d8c45638f0cec22ebf59db8e" + }, + { + "name": "marketplace-external-cleanup", + "at": "2026-10-20T13:15:28.076Z", + "network": "TESTNET_DONUT", + "sourceCommit": "ffd567d3e49b2d27c6f50ad36093274dbac3090f", + "jobId": "9", + "cardId": "5", + "txHash": "0xb7d4bbe0fe19e633ab3d707fd962f21e60ddffc86b111691bb7c87e8b997f825" + } +] diff --git a/plan/marketplace/research/sdk-independent-2026-10-20/live-results.json b/plan/marketplace/research/sdk-independent-2026-10-20/live-results.json new file mode 100644 index 00000000..aa228899 --- /dev/null +++ b/plan/marketplace/research/sdk-independent-2026-10-20/live-results.json @@ -0,0 +1,32 @@ +{ + "completedAt": "2026-10-20T13:15:33.181Z", + "numTotalTests": 3, + "numPassedTests": 3, + "numFailedTests": 0, + "numPendingTests": 0, + "success": true, + "jestReportedSuccess": false, + "tests": [ + { + "file": "marketplace/lifecycle.spec.ts", + "fullName": "marketplace live 1. native provider registration, reviewed open and atomic cancel/revoke on BSC Testnet", + "status": "passed", + "duration": 46877, + "error": null + }, + { + "file": "marketplace/lifecycle.spec.ts", + "fullName": "marketplace live 2. paid JobSpec preview reaches live validator consensus through the registry", + "status": "passed", + "duration": 39035, + "error": null + }, + { + "file": "marketplace/lifecycle.spec.ts", + "fullName": "marketplace live 3. external EVM owner opens and cancels through its real Push UEA transport", + "status": "passed", + "duration": 77538, + "error": null + } + ] +} \ No newline at end of file diff --git a/plan/marketplace/research/sdk-independent-2026-10-20/post-live-state.json b/plan/marketplace/research/sdk-independent-2026-10-20/post-live-state.json new file mode 100644 index 00000000..cd8bb990 --- /dev/null +++ b/plan/marketplace/research/sdk-independent-2026-10-20/post-live-state.json @@ -0,0 +1,78 @@ +{ + "observedAt": "2026-10-20T13:27:56.374Z", + "block": "24452765", + "cards": [ + { + "cardId": "4", + "active": false, + "provider": "0x632783531D86bE4285C24f93850B24CF1Ec6050E", + "providerTokenBalance": "0" + }, + { + "cardId": "5", + "active": false, + "provider": "0x63ca68a97AA2eD6C8fDa3A67d063F27D198BaB16", + "providerTokenBalance": "0" + } + ], + "jobs": [ + { + "jobId": "4", + "cardId": "4", + "status": 4, + "budget": "0", + "client": "0x5FA6AF920028Fd96fB8541f2cA74557384c4FdC0", + "permissionEnabled": false, + "paymentBalance": "0", + "principalBalance": "0" + }, + { + "jobId": "5", + "cardId": "0", + "status": 3, + "budget": "10000", + "client": "0x5FA6AF920028Fd96fB8541f2cA74557384c4FdC0", + "paymentBalance": "0", + "principalBalance": "0" + }, + { + "jobId": "6", + "cardId": "0", + "status": 3, + "budget": "10000", + "client": "0xB5C87db8f78C2597f605440de5A11790B551C9Ff", + "paymentBalance": "0", + "principalBalance": "0" + }, + { + "jobId": "7", + "cardId": "4", + "status": 4, + "budget": "0", + "client": "0x7f7D461A5E9aF9deAC2F15dfC4a964baCeF94424", + "permissionEnabled": false, + "paymentBalance": "0", + "principalBalance": "0" + }, + { + "jobId": "8", + "cardId": "5", + "status": 4, + "budget": "0", + "client": "0x803b9a0fD190afC823e2DdDd5fA3Ac3EA882EAbC", + "permissionEnabled": false, + "paymentBalance": "0", + "principalBalance": "0" + }, + { + "jobId": "9", + "cardId": "5", + "status": 4, + "budget": "0", + "client": "0x4C8d290cad724e9f251806D09f51D6b2911000d3", + "permissionEnabled": false, + "paymentBalance": "0", + "principalBalance": "0" + } + ] +} diff --git a/plan/marketplace/research/sdk-independent-2026-10-20/unit-results.json.gz b/plan/marketplace/research/sdk-independent-2026-10-20/unit-results.json.gz new file mode 100644 index 00000000..07c5f5e2 Binary files /dev/null and b/plan/marketplace/research/sdk-independent-2026-10-20/unit-results.json.gz differ diff --git a/plan/marketplace/research/sdk-independent-2026-10-20/validation-summary.json b/plan/marketplace/research/sdk-independent-2026-10-20/validation-summary.json new file mode 100644 index 00000000..68da837c --- /dev/null +++ b/plan/marketplace/research/sdk-independent-2026-10-20/validation-summary.json @@ -0,0 +1,71 @@ +{ + "observedAt": "2026-10-20T13:33:13.358Z", + "baselineCommit": "fdfcd4608f2d3db26ee4b3c5dc4a694f93f85097", + "unit": { + "passed": 2246, + "failed": 0, + "skipped": 12 + }, + "fork": { + "passed": 11, + "failed": 0, + "skipped": 0, + "runnerExitCode": 0 + }, + "basicLive": { + "passed": 3, + "failed": 0, + "skipped": 0, + "runnerExitCode": 0, + "reporterSuccess": true, + "jestReportedSuccess": false + }, + "fundingLive": { + "passed": 3, + "failed": 0, + "skipped": 0, + "runnerExitCode": 0, + "originalReporterSuccess": false, + "note": "Run completed before the counter-based reporter fix." + }, + "build": "passed", + "libraryTypes": "passed via build", + "specTypes": "passed", + "forkTypes": "passed", + "newProductionLint": "zero warnings", + "nativeTransportLint": { + "errors": 0, + "warnings": 13, + "baselineWarnings": 13, + "newDiagnostics": 0 + }, + "guideBlocks": 8, + "compiledPackageChecks": "passed", + "sourceBuiltApiMatches": true, + "artifacts": { + "unit-results.json.gz": { + "originalBytes": 874494, + "originalSha256": "87cd86ed94626e214341f5ae20ff20f9600c8557eb1c6219c50cabfbdd980584", + "compressedBytes": 74643, + "compressedSha256": "e2fa5448a43ad622c16cf6df81069b9bbd47e6e5129f429d2221fc149c310d84" + }, + "api-comparison.json.gz": { + "originalBytes": 722796, + "originalSha256": "6d9fb8f0efc6887e2dd05da14212f4724af268cd71b256ff9ca7db897592e12f", + "compressedBytes": 52200, + "compressedSha256": "3082df634d01370b14ea7560cf425dbb5ac63ee05206e4fd7b0e127012ff572c" + }, + "fork-before-confirmation-fix.json.gz": { + "originalBytes": 8620, + "originalSha256": "7eec3411f6fa5cedff4e1fd560032bd80479292f333dc8ca6ddcbd5a47d070bf", + "compressedBytes": 2047, + "compressedSha256": "3935189b50b89225d8efd72ad57377af9726a818f90c1bac3304c0f9f6ffe47b" + } + }, + "scope": "Current EVM marketplace v2; SDK-only checklist complete", + "remainingExternal": [ + "Three destination CEA manifests must align", + "Compatible automatic evaluator/hook/schema/verify ABI" + ], + "publication": "not performed" +} diff --git a/plan/marketplace/scripts/check-wire.cjs b/plan/marketplace/scripts/check-wire.cjs new file mode 100644 index 00000000..d20a6cef --- /dev/null +++ b/plan/marketplace/scripts/check-wire.cjs @@ -0,0 +1,37 @@ +// Research vectors only: contrasts deployed marketplace wire with the evaluator comment's source. +const fs = require('node:fs'); +const path = require('node:path'); +const { parseAbiParameters, encodeAbiParameters, decodeAbiParameters, keccak256 } = require('viem'); +const oldType = parseAbiParameters('((string,string,uint16,address,bytes4,bytes,bytes,uint8[])[],(uint8,uint8,uint8,int256)[],(uint8,uint8[],uint8[],uint8)[],uint8,bytes32,uint64,uint64)'); +const newType = parseAbiParameters('(uint64,uint64,(string,string,uint16,address,bytes4,bytes,bytes,uint8[],uint8)[],(uint8[],uint8[],uint8,uint8,int256)[],(uint8,uint8,uint8[],uint8)[],uint8,bytes32)'); +const templateType = parseAbiParameters('((string,string,uint16,address,bytes4,bytes,(uint8,uint8,uint8)[],bytes,uint8[])[],(uint8,uint8,uint8,uint8,int256)[],(uint8,uint8[],uint8[],uint8)[],uint8,(int256,int256)[])'); +const zeroHash = '0x' + '00'.repeat(32); +const read = ['eip155','11155111',12,'0x1111111111111111111111111111111111111111','0x70a08231','0x'+'00'.repeat(32),'0x080001010100',[0]]; +const old = [[read],[[0,1,3,499_000_000n]],[[0,[0],[],0]],0,zeroHash,1_800_000_000n,1_800_007_200n]; +// New evaluator NONE=1 and CHECK=0, ALL=1. These are different ordinal mappings. +const modern = [1_800_000_000n,1_800_007_200n,[[...read,0]],[[[0],[],1,3,499_000_000n]],[[0,0,[],0]],1,zeroHash]; +const oldBytes = encodeAbiParameters(oldType,[old]); +const newBytes = encodeAbiParameters(newType,[modern]); +const template = [[[...read.slice(0,6),[],...read.slice(6)]],[[0,1,3,0,499_000_000n]],[[0,[0],[],0]],0,[]]; +const templateBytes = encodeAbiParameters(templateType,[template]); +function attempt(bytes, schema) { + try { + const decoded = decodeAbiParameters(schema, bytes); + return { decoded: true, canonicalRoundtrip: encodeAbiParameters(schema, decoded).toLowerCase() === bytes.toLowerCase() }; + } catch (error) { return { decoded: false, error: error.shortMessage || error.message }; } +} +const report = { + marketplaceSource: '443b4e2dd9ca5dd9ffc8efebdfcecd619dd66c47', + evaluatorSource: '8059817591cca16c59f1cc154f475f51e1736a67', + schemaChanges: ['JobSpec top-level field order', 'Read.at appended', 'Check.read replaced by left/right arrays', 'Logic checks[] replaced by CHECK leaf structure', 'AllowedMutability.NONE ordinal 0 -> 1; BOTH 3 -> 0', 'Logic ALL ordinal 0 -> 1; ANY 1 -> 2; AT_LEAST 2 -> 3', 'MAX_READS 16 -> 32'], + oldRoundtrip: attempt(oldBytes,oldType), newRoundtrip: attempt(newBytes,newType), + oldDecodedAsNew: attempt(oldBytes,newType), newDecodedAsOld: attempt(newBytes,oldType), + deployedJobDecodedAsTemplate: attempt(oldBytes,templateType), templateDecodedAsDeployedJob: attempt(templateBytes,oldType), + old: { bytes: oldBytes, hash: keccak256(oldBytes) }, modern: { bytes: newBytes, hash: keccak256(newBytes) }, + template: { bytes: templateBytes, hash: keccak256(templateBytes) }, + scope: 'Controlled nonempty ABI vectors, not a proof that every malformed/cross-profile payload is rejected. No evaluator deployment or settlement is tested.' +}; +const out = path.resolve(__dirname,'../research/2026-10-20/wire-comparison.json'); +fs.writeFileSync(out,JSON.stringify(report,null,2)+'\n'); +console.log(JSON.stringify(Object.fromEntries(Object.entries(report).filter(([key])=>!['old','modern','template'].includes(key))),null,2)); +if (!report.oldRoundtrip.canonicalRoundtrip || !report.newRoundtrip.canonicalRoundtrip) process.exitCode=1; diff --git a/plan/marketplace/scripts/compare-runtime.cjs b/plan/marketplace/scripts/compare-runtime.cjs new file mode 100644 index 00000000..922701f7 --- /dev/null +++ b/plan/marketplace/scripts/compare-runtime.cjs @@ -0,0 +1,52 @@ +// Compares the pinned build to live code using the block from probe-live.cjs. +const fs = require('node:fs'); +const path = require('node:path'); +const { createPublicClient, http, keccak256 } = require('viem'); +const ROOT = path.resolve(__dirname, '..'); +const EVIDENCE = path.join(ROOT, 'research/2026-10-20'); +const workspace = fs.readFileSync(path.join(EVIDENCE, 'review-workspace.txt'), 'utf8').trim(); +const live = JSON.parse(fs.readFileSync(path.join(EVIDENCE, 'live-deployment.json'), 'utf8')); +const names = { marketplace: 'UniversalMarketplace', kernel: 'AgenticCommerce', hook: 'RulesBindingHook', rules: 'UniversalMarketplaceRules', builder: 'JobSpecBuilder' }; +function stripMetadata(code) { + const bytes = (code.length - 2) / 2; + const length = Number.parseInt(code.slice(-4), 16); + if (length > 0 && length + 2 < bytes) return code.slice(0, -(length + 2) * 2); + return code; +} +async function main() { + const client = createPublicClient({ transport: http(live.rpc) }); + const results = []; + for (const [key, name] of Object.entries(names)) { + const folder = path.join(workspace, 'out', `${name}.sol`); + const candidates = fs.readdirSync(folder).filter(file => file.startsWith(name + '.') && file.endsWith('.json')); + const comparisons = []; + for (const file of candidates) { + const artifact = JSON.parse(fs.readFileSync(path.join(folder, file), 'utf8')); + const address = live.components[key].implementation || live.addresses[key]; + let expected = artifact.deployedBytecode.object; + for (const refs of Object.values(artifact.deployedBytecode.linkReferences || {})) { + for (const entries of Object.values(refs)) { + for (const ref of entries) { + const start = 2 + ref.start * 2; + expected = expected.slice(0, start) + live.addresses.builder.slice(2) + expected.slice(start + ref.length * 2); + } + } + } + const actual = await client.getCode({ address, blockNumber: BigInt(live.blockNumber) }); + // Solidity's deployed library runtime substitutes its own address for PUSH20 0. + let selfAddressNormalized = false; + if (key === 'builder' && expected.startsWith('0x730000000000000000000000000000000000000000')) { + expected = '0x73' + address.slice(2) + expected.slice(44); + selfAddressNormalized = true; + } + const a = stripMetadata(actual).toLowerCase(); + const e = stripMetadata(expected).toLowerCase(); + comparisons.push({ artifact: file, component: key, address, optimizerRuns: artifact.metadata.settings.optimizer.runs, sourceBytes: (expected.length - 2) / 2, liveBytes: (actual.length - 2) / 2, exactMatch: actual.toLowerCase() === expected.toLowerCase(), executableMatchExcludingMetadata: a === e, builderLinkResolved: key === 'marketplace', librarySelfAddressNormalized: selfAddressNormalized, executableHash: keccak256(a), expectedExecutableHash: keccak256(e) }); + } + const selected = comparisons.find(item => item.executableMatchExcludingMetadata) || comparisons[0]; + results.push({ ...selected, candidateProfiles: comparisons.map(({artifact, optimizerRuns, sourceBytes, executableMatchExcludingMetadata}) => ({artifact, optimizerRuns, sourceBytes, executableMatchExcludingMetadata})) }); + } + fs.writeFileSync(path.join(EVIDENCE, 'runtime-comparison.json'), JSON.stringify({ blockNumber: live.blockNumber, sourceCommit: '443b4e2dd9ca5dd9ffc8efebdfcecd619dd66c47', results }, null, 2) + '\n'); + console.log(JSON.stringify(results.map(({ component, sourceBytes, liveBytes, exactMatch, executableMatchExcludingMetadata }) => ({ component, sourceBytes, liveBytes, exactMatch, executableMatchExcludingMetadata })), null, 2)); +} +main().catch(error => { console.error(error); process.exitCode = 1; }); diff --git a/plan/marketplace/scripts/probe-live.cjs b/plan/marketplace/scripts/probe-live.cjs new file mode 100644 index 00000000..15d2051b --- /dev/null +++ b/plan/marketplace/scripts/probe-live.cjs @@ -0,0 +1,68 @@ +// Read-only Donut deployment probe. Never loads keys or broadcasts transactions. +const fs = require('node:fs'); +const path = require('node:path'); +const { + createPublicClient, http, parseAbi, keccak256, encodeAbiParameters, + parseAbiParameters, getCreate2Address, +} = require('viem'); + +const ROOT = path.resolve(__dirname, '..'); +const OUT = path.join(ROOT, 'research/2026-10-20/live-deployment.json'); +const addresses = { + marketplace: '0x9071ebE01B75123A91e88eB6ec4BF163F3fE9BF4', + kernel: '0x977cf1AC973E9eC4332791d531507575006157Ed', + hook: '0xDe7A94e510b6C571DE7880d441349689F73A32b3', + rules: '0x5b98A8E0df5b918DF76cD2BE84bA7995B39dfd44', + builder: '0x2de1e3F053b0bBa0cE0C6953144534a0b055f59e', + factory: '0xFBBEB6a365178fAaA81A9789a5f64b300c37e5bc', + engine: '0xf63DC0628fe1B25049FE3E3a3585Ef051CB98c1d', + pUSDC: '0x7A58048036206bB898008b5bBDA85697DB1e5d66', + evaluator: '0x1afC81396f1bb36F91f74506284952b81e4bd47c', +}; +const implementationSlot = '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc'; +const adminSlot = '0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103'; +const getters = { + marketplace: ['version() view returns (string)', 'AGW_FACTORY() view returns (address)', 'KERNEL() view returns (address)', 'RULES() view returns (address)', 'hook() view returns (address)', 'evaluator() view returns (address)', 'PUSH_CHAIN_HASH() view returns (bytes32)', 'agentCardCount() view returns (uint256)', 'OPENJOB_LANE() view returns (uint192)', 'paused() view returns (bool)'], + kernel: ['paymentToken() view returns (address)', 'jobCounter() view returns (uint256)', 'platformFeeBP() view returns (uint256)', 'evaluatorFeeBP() view returns (uint256)', 'EVALUATOR_GRACE_PERIOD() view returns (uint256)', 'MIN_EXPIRY_WINDOW() view returns (uint256)', 'paused() view returns (bool)'], + hook: ['KERNEL() view returns (address)', 'AGW_FACTORY() view returns (address)', 'SESSION_ENGINE() view returns (address)'], + pUSDC: ['symbol() view returns (string)', 'decimals() view returns (uint8)'], +}; +async function main() { + const client = createPublicClient({ transport: http('https://evm.donut.rpc.push.org/', { timeout: 20000, retryCount: 2 }) }); + const blockNumber = await client.getBlockNumber(); + const report = { observedAt: new Date().toISOString(), rpc: 'https://evm.donut.rpc.push.org/', chainId: await client.getChainId(), blockNumber, addresses, components: {}, getters: {}, chains: [], errors: [] }; + await Promise.all(Object.entries(addresses).map(async ([name, address]) => { + try { + const code = (await client.getCode({ address, blockNumber })) || '0x'; + report.components[name] = { address, codeBytes: (code.length - 2) / 2, codeHash: keccak256(code) }; + if (['marketplace', 'kernel', 'hook'].includes(name)) { + const [impl, admin] = await Promise.all([implementationSlot, adminSlot].map(slot => client.getStorageAt({ address, slot, blockNumber }))); + report.components[name].implementation = '0x' + impl.slice(-40); + report.components[name].proxyAdmin = '0x' + admin.slice(-40); + const implCode = (await client.getCode({ address: report.components[name].implementation, blockNumber })) || '0x'; + report.components[name].implementationCodeBytes = (implCode.length - 2) / 2; + report.components[name].implementationCodeHash = keccak256(implCode); + } + } catch (error) { report.errors.push({ stage: 'code', name, message: error.shortMessage || error.message }); } + })); + await Promise.all(Object.entries(getters).flatMap(([name, signatures]) => signatures.map(async signature => { + const fn = signature.slice(0, signature.indexOf('(')); + try { report.getters[`${name}.${fn}`] = await client.readContract({ address: addresses[name], abi: parseAbi(['function ' + signature]), functionName: fn, blockNumber }); } + catch (error) { report.errors.push({ stage: 'getter', name, fn, message: error.shortMessage || error.message }); } + }))); + report.getters['kernel.whitelistedHooks'] = await client.readContract({ address: addresses.kernel, abi: parseAbi(['function whitelistedHooks(address) view returns (bool)']), functionName: 'whitelistedHooks', args: [addresses.hook], blockNumber }); + const owner = '0x1111111111111111111111111111111111111111'; + const [wallet, deployed] = await client.readContract({ address: addresses.factory, abi: parseAbi(['function predictWallet(address,uint256) view returns (address,bool)']), functionName: 'predictWallet', args: [owner, 0n], blockNumber }); + report.sampleWallet = { owner, index: 0, wallet, deployed }; + for (const chain of ['eip155:11155111', 'eip155:84532', 'eip155:421614', 'eip155:97']) { + const chainHash = keccak256(Buffer.from(chain)); + const [factory, implementation] = await client.readContract({ address: addresses.marketplace, abi: parseAbi(['function ceaDeployment(bytes32) view returns (address,address)']), functionName: 'ceaDeployment', args: [chainHash], blockNumber }); + const cea = await client.readContract({ address: addresses.marketplace, abi: parseAbi(['function computeCEA(address,bytes32) view returns (address)']), functionName: 'computeCEA', args: [wallet, chainHash], blockNumber }); + const init = `0x3d602d80600a3d3981f3363d3d373d3d3d363d73${implementation.slice(2)}5af43d82803e903d91602b57fd5bf3`; + const independentCEA = getCreate2Address({ from: factory, salt: keccak256(encodeAbiParameters(parseAbiParameters('address'), [wallet])), bytecodeHash: keccak256(init) }); + report.chains.push({ chain, chainHash, factory, implementation, cea, independentCEA, matches: cea.toLowerCase() === independentCEA.toLowerCase() }); + } + fs.writeFileSync(OUT, JSON.stringify(report, (_, value) => typeof value === 'bigint' ? value.toString() : value, 2) + '\n'); + console.log(JSON.stringify({ file: OUT, blockNumber: blockNumber.toString(), version: report.getters['marketplace.version'], cards: String(report.getters['marketplace.agentCardCount']), jobs: String(report.getters['kernel.jobCounter']), errors: report.errors, ceaChecks: report.chains.map(x => ({ chain: x.chain, matches: x.matches })) }, null, 2)); +} +main().catch(error => { console.error(error); process.exitCode = 1; }); diff --git a/plan/marketplace/sdk-readiness.md b/plan/marketplace/sdk-readiness.md new file mode 100644 index 00000000..2504af72 --- /dev/null +++ b/plan/marketplace/sdk-readiness.md @@ -0,0 +1,32 @@ +# SDK-only completion boundary + +October 20, 2026, `feat/agw-sdk-v4`. Scope: deployed UniversalMarketplace v2, AGW v6, current EVM JobSpec wire, immutable criteria and pUSDC. The SDK does not require new team decisions to finish the items below. [Current acceptance evidence](research/sdk-independent-2026-10-20/README.md). + +| SDK-owned work | Completion / acceptance | +| --- | --- | +| Contracts, types, constants, codecs and authoring | Implemented; canonical wire, markers, constraints, public exports and package checks | +| Card/provider lifecycle | Implemented; immutable identity, pre-submission simulation, malformed-card summary tolerance, register/update/activation acceptance | +| Exact preview and signing | Implemented; independent CEA, hashes, nonces and factory domain; native/external EVM UEAs live, ERC-1271 reference adapter and compatible/incompatible 7702 verifiers on real local contracts | +| Opening proof and recovery | Implemented; input copied before awaits, deterministic permission ID, event/kernel/wallet/mapping checks, mined-input recovery without another signature or write; native broadcast hashes survive receipt/indexing failures | +| Deposits and historical versions | Implemented; original principal/fee/gas, shared-token aggregation, no implicit price acceptance, pending receipt/hash recovery, same-block/archive-less history authenticated by event content hashes and transaction input | +| Funded acceptance | Live owned-token deposits, native/AGW atomic escrow, provider submission and controlled manual-evaluator payout; live BSC-origin principal bridge; market grants revoked, test cards deactivated, deposited/reserve/payout tokens returned | +| Job lifecycle and safety | Create/price/fund/submit/status/list/cancel/refund implemented; explicit re-quotes, allowance handling, expiry/grace and paused refund accepted on the fork | +| Event delivery | Implemented; exact cursor, within-block resume, deduplication, retry without gaps, callback isolation, unsubscribe and canonical-cursor reorg stop | +| Read helpers and descriptions | Pure preparation and direct resolved-read sending, ABI names and explicit decimals, paid previews, checked fee cap, raw/nested decoding, explicit baselines/unknowns and request-ID recovery without new payment | +| Reproducible development checks | Unit/fork/live acceptance, repo-owned signature fixture compilation, corrected CI completion reporting, public guide examples, build/types, CJS/ESM and declaration/package/API checks | +| History and handoff | Changelog, evidence, consumer guide and narrowed team questions updated; source snapshots preserved | + +There is no remaining implementation item in this scoped checklist waiting for an SDK-only follow-up. The evidence distinguishes local simulation, fork execution and live transactions; it does not substitute one for another. + +## External contract/deployment boundary + +- **`job.verify` and automatic evaluation:** a compatible hook/evaluator, agreed shared JobSpec schema and callable verify/retry interface must be delivered. The current marketplace evaluator is an EOA. Live paid tests use fresh controlled evaluators on plain kernel jobs; they do not replace or impersonate the marketplace evaluator. +- **Three CEA rollouts:** align marketplace and routing manifests for Sepolia, Base Sepolia and Arbitrum Sepolia. Both tables currently answer but derive different accounts. BSC works. Changing SDK globals without coordinated routing evidence would redirect account derivation. + +Only these current dependencies should go to the team. [Ready-to-share questions](questions.md). + +## Later scope and release action + +Mutable criteria, per-job payment tokens, recurring jobs, relaying, verified ratings, non-EVM JobSpec sources/OwnerIntent conventions and mainnet rollout remain outside this delivered EVM v2 boundary. They require additional product/protocol scope; they are not unfinished implementations of current supported behavior. Custom contract-wallet vendors supply their own signer transport; a valid reference adapter and actual deployed verifier paths are accepted here. + +Package publication is a separate release action. Source, built declarations/imports and npm contents are checked, but no release version was chosen and no package was published. Continuing contract integration later should append to the existing changelog on this branch. diff --git a/scripts/release-automated.sh b/scripts/release-automated.sh index 04b4476c..187a4dba 100755 --- a/scripts/release-automated.sh +++ b/scripts/release-automated.sh @@ -44,6 +44,10 @@ else npx ts-node scripts/bumpAndGenerateChangelog.ts "$SCOPE" "$BUMP" fi +# Version bumps can change workspace semver matching (especially stable -> alpha). +# Refresh the lockfile deliberately; the workflow's initial install stays immutable. +YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install --mode=update-lockfile + # Step 2: Build the package npx nx run "$SCOPE:build" @@ -68,8 +72,8 @@ else npm publish "$PACKAGE_DIR" --access public fi -# Step 5: Commit version + changelog -git add "packages/$SCOPE/package.json" "packages/$SCOPE/CHANGELOG.md" +# Step 5: Commit version + changelog + lockfile +git add "packages/$SCOPE/package.json" "packages/$SCOPE/CHANGELOG.md" yarn.lock git commit -m "release($SCOPE): bump to $VERSION [skip ci]" # Step 6: Git tag + push diff --git a/scripts/release.sh b/scripts/release.sh index f1f9fb07..56fa8045 100644 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -36,6 +36,10 @@ echo "🚀 Releasing @$SCOPE with a $BUMP bump..." # Step 1: Bump version and generate changelog markdown ts-node scripts/bumpAndGenerateChangelog.ts "$SCOPE" "$BUMP" +# Version bumps can change workspace semver matching (especially stable -> alpha). +# Refresh the lockfile deliberately; the workflow's initial install stays immutable. +YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install --mode=update-lockfile + # Step 2: Build the package nx run "$SCOPE:build" @@ -46,8 +50,8 @@ VERSION=$(node -p "require('./packages/$SCOPE/package.json').version") npm publish "$PACKAGE_DIR" --access public --otp="$OTP" -# Step 4: Commit version + changelog -git add "packages/$SCOPE/package.json" "packages/$SCOPE/CHANGELOG.md" +# Step 4: Commit version + changelog + lockfile +git add "packages/$SCOPE/package.json" "packages/$SCOPE/CHANGELOG.md" yarn.lock git commit -m "release($SCOPE): bump to $VERSION" # Step 5: Git tag + push diff --git a/yarn.lock b/yarn.lock index 1a09b363..50dbcabb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1464,6 +1464,13 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.12.5": + version: 7.29.10 + resolution: "@babel/runtime@npm:7.29.10" + checksum: 10/883bb39a09f4773cf46cdd7ba0080ef6b30ff996a4ed21f8d34511ec0836122e697716533da5efc9b5016f763110b19aa07e81cec6e2036fe72cb26aad556af2 + languageName: node + linkType: hard + "@babel/runtime@npm:^7.5.5": version: 7.27.6 resolution: "@babel/runtime@npm:7.27.6" @@ -8860,7 +8867,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-macros@npm:^2.8.0, babel-plugin-macros@npm:^3.1.0": +"babel-plugin-macros@npm:^2.8.0": version: 2.8.0 resolution: "babel-plugin-macros@npm:2.8.0" dependencies: @@ -8871,6 +8878,17 @@ __metadata: languageName: node linkType: hard +"babel-plugin-macros@npm:^3.1.0": + version: 3.1.0 + resolution: "babel-plugin-macros@npm:3.1.0" + dependencies: + "@babel/runtime": "npm:^7.12.5" + cosmiconfig: "npm:^7.0.0" + resolve: "npm:^1.19.0" + checksum: 10/30be6ca45e9a124c58ca00af9a0753e5410ec0b79a737714fc4722bbbeb693e55d9258f05c437145ef4a867c2d1603e06a1c292d66c243ce1227458c8ea2ca8c + languageName: node + linkType: hard + "babel-plugin-polyfill-corejs2@npm:^0.4.10": version: 0.4.13 resolution: "babel-plugin-polyfill-corejs2@npm:0.4.13" @@ -9631,7 +9649,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^13.1.0, commander@npm:^4.0.0": +"commander@npm:^13.1.0": version: 13.1.0 resolution: "commander@npm:13.1.0" checksum: 10/d3b4b79e6be8471ddadacbb8cd441fe82154d7da7393b50e76165a9e29ccdb74fa911a186437b9a211d0fc071db6051915c94fb8ef16d77511d898e9dbabc6af @@ -9645,6 +9663,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^4.0.0": + version: 4.1.1 + resolution: "commander@npm:4.1.1" + checksum: 10/3b2dc4125f387dab73b3294dbcb0ab2a862f9c0ad748ee2b27e3544d25325b7a8cdfbcc228d103a98a716960b14478114a5206b5415bd48cdafa38797891562c + languageName: node + linkType: hard + "compare-func@npm:^2.0.0": version: 2.0.0 resolution: "compare-func@npm:2.0.0" @@ -9870,6 +9895,19 @@ __metadata: languageName: node linkType: hard +"cosmiconfig@npm:^7.0.0": + version: 7.1.0 + resolution: "cosmiconfig@npm:7.1.0" + dependencies: + "@types/parse-json": "npm:^4.0.0" + import-fresh: "npm:^3.2.1" + parse-json: "npm:^5.0.0" + path-type: "npm:^4.0.0" + yaml: "npm:^1.10.0" + checksum: 10/03600bb3870c80ed151b7b706b99a1f6d78df8f4bdad9c95485072ea13358ef294b13dd99f9e7bf4cc0b43bcd3599d40df7e648750d21c2f6817ca2cd687e071 + languageName: node + linkType: hard + "cosmiconfig@npm:^9.0.0": version: 9.0.0 resolution: "cosmiconfig@npm:9.0.0" @@ -12178,6 +12216,15 @@ __metadata: languageName: node linkType: hard +"hasown@npm:^2.0.4": + version: 2.0.4 + resolution: "hasown@npm:2.0.4" + dependencies: + function-bind: "npm:^1.1.2" + checksum: 10/13823863ae48161068b4c51606a3128451c66f14545a5169d667fe9fca168dcd38c27570c7a299e32ef844b8da3d55def7fe88602f8970d4311fb543ee88001a + languageName: node + linkType: hard + "he@npm:^1.2.0": version: 1.2.0 resolution: "he@npm:1.2.0" @@ -12541,6 +12588,15 @@ __metadata: languageName: node linkType: hard +"is-core-module@npm:^2.17.0": + version: 2.17.0 + resolution: "is-core-module@npm:2.17.0" + dependencies: + hasown: "npm:^2.0.4" + checksum: 10/0020f71b7eb525ccd684012cd1cfba235e7596e0addbc993732f7d8faff7ccd3a399e16dac7eb317b63459ea23f97efd661d6bf32584f6bf1d0a607fd8e21a6b + languageName: node + linkType: hard + "is-deflate@npm:^1.0.0": version: 1.0.0 resolution: "is-deflate@npm:1.0.0" @@ -16245,6 +16301,20 @@ __metadata: languageName: node linkType: hard +"resolve@npm:^1.19.0": + version: 1.22.13 + resolution: "resolve@npm:1.22.13" + dependencies: + es-errors: "npm:^1.3.0" + is-core-module: "npm:^2.17.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/4fc4242f448c5a679921bbac6e74268ca76893d7379cb9cfaa49f40ce6b1cea884c2df901d0617c92d927375fe66a05ccbbf17bbb0262cdcd6cb196e33fa1baa + languageName: node + linkType: hard + "resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.12.0#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.8#optional!builtin, resolve@patch:resolve@npm%3A~1.22.1#optional!builtin, resolve@patch:resolve@npm%3A~1.22.2#optional!builtin": version: 1.22.10 resolution: "resolve@patch:resolve@npm%3A1.22.10#optional!builtin::version=1.22.10&hash=c3c19d" @@ -16258,6 +16328,20 @@ __metadata: languageName: node linkType: hard +"resolve@patch:resolve@npm%3A^1.19.0#optional!builtin": + version: 1.22.13 + resolution: "resolve@patch:resolve@npm%3A1.22.13#optional!builtin::version=1.22.13&hash=c3c19d" + dependencies: + es-errors: "npm:^1.3.0" + is-core-module: "npm:^2.17.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/f0b8e2c897327b5edc4b277c90d19c7bd06975817183ef51f5c79367b8b8e6d637f6ca20ba6eb3ef964944157cc2eb6970fef1c2202edbe65e6e7be4f268fc7f + languageName: node + linkType: hard + "restore-cursor@npm:^3.1.0": version: 3.1.0 resolution: "restore-cursor@npm:3.1.0" @@ -18771,6 +18855,13 @@ __metadata: languageName: node linkType: hard +"yaml@npm:^1.10.0": + version: 1.10.3 + resolution: "yaml@npm:1.10.3" + checksum: 10/e2ef2feb92c708138f016c69777a0f1e45f6d3c5e7cbcda30807a98a37eda2e008bd4fa57352b043c65245a4c799d0c99d1f9b3425de40e70929e26d2ea38215 + languageName: node + linkType: hard + "yaml@npm:^1.7.2": version: 1.10.2 resolution: "yaml@npm:1.10.2"